安全防护措施动态插入数据
parent
9d1e796ec7
commit
3e9f75af65
|
@ -1663,8 +1663,31 @@ public class AppHotworkCfdController extends BaseController {
|
|||
PageData condition = new PageData();
|
||||
condition.put("showInfo",pd.getString("showInfo"));
|
||||
condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID"));
|
||||
map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
|
||||
|
||||
// map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
|
||||
List<PageData> measuresList = hotworkCfdService.listAllMeasures(condition);
|
||||
for (PageData measure : measuresList) {
|
||||
String order = measure.getString("ORDER");
|
||||
String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES");
|
||||
if ("2".equals(order)) {
|
||||
String answer1 = measure.getString("ANSWER1");
|
||||
int startIndex = protectiveMeasures.indexOf('(');
|
||||
int endIndex = protectiveMeasures.indexOf(')');
|
||||
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
|
||||
protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex);
|
||||
}
|
||||
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
|
||||
} else if ("8".equals(order)) {
|
||||
String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")};
|
||||
for (String answer : answers) {
|
||||
int index = protectiveMeasures.indexOf("()");
|
||||
if (index != -1) {
|
||||
protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1);
|
||||
}
|
||||
}
|
||||
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
|
||||
}
|
||||
}
|
||||
map.put("measuresList", measuresList);
|
||||
pd = hotworkCfdService.findById(pd); //根据ID读取
|
||||
|
||||
// created by liu jun 添加(交底人、项目主管部门负责人、安全措施确认人)
|
||||
|
|
|
@ -141,13 +141,36 @@ public class HotworkCfdController extends BaseController {
|
|||
PageData condition = new PageData();
|
||||
condition.put("showInfo",pd.getString("showInfo"));
|
||||
condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID"));
|
||||
map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
|
||||
|
||||
// map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
|
||||
List<PageData> measuresList = hotworkCfdService.listAllMeasures(condition);
|
||||
for (PageData measure : measuresList) {
|
||||
String order = measure.getString("ORDER");
|
||||
String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES");
|
||||
if ("2".equals(order)) {
|
||||
String answer1 = measure.getString("ANSWER1");
|
||||
int startIndex = protectiveMeasures.indexOf('(');
|
||||
int endIndex = protectiveMeasures.indexOf(')');
|
||||
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
|
||||
protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex);
|
||||
}
|
||||
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
|
||||
} else if ("8".equals(order)) {
|
||||
String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")};
|
||||
for (String answer : answers) {
|
||||
int index = protectiveMeasures.indexOf("()");
|
||||
if (index != -1) {
|
||||
protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1);
|
||||
}
|
||||
}
|
||||
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
|
||||
}
|
||||
}
|
||||
map.put("measuresList", measuresList);
|
||||
pd = hotworkCfdService.findById(pd); //根据ID读取
|
||||
// created by liu jun 添加(交底人、项目主管部门负责人、安全措施确认人)
|
||||
hotworkCfdService.addInfo(pd);
|
||||
|
||||
map.put("measuresList", hotworkCfdService.listAllMeasures(pd));
|
||||
// map.put("measuresList", hotworkCfdService.listAllMeasures(pd));
|
||||
map.put("gasList", hotworkGasCfdService.listAll(pd));
|
||||
// imgList是接受交底人签字
|
||||
map.put("imgList", hotworkAcceptUserCfdService.findByIds(pd));
|
||||
|
|
|
@ -62,7 +62,31 @@ public class MapEightCfdServiceImpl implements MapEightCfdService {
|
|||
PageData condition = new PageData();
|
||||
condition.put("showInfo",pd.getString("showInfo"));
|
||||
condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID"));
|
||||
map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
|
||||
// map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
|
||||
List<PageData> measuresList = hotworkCfdService.listAllMeasures(condition);
|
||||
for (PageData measure : measuresList) {
|
||||
String order = measure.getString("ORDER");
|
||||
String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES");
|
||||
if ("2".equals(order)) {
|
||||
String answer1 = measure.getString("ANSWER1");
|
||||
int startIndex = protectiveMeasures.indexOf('(');
|
||||
int endIndex = protectiveMeasures.indexOf(')');
|
||||
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
|
||||
protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex);
|
||||
}
|
||||
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
|
||||
} else if ("8".equals(order)) {
|
||||
String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")};
|
||||
for (String answer : answers) {
|
||||
int index = protectiveMeasures.indexOf("()");
|
||||
if (index != -1) {
|
||||
protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1);
|
||||
}
|
||||
}
|
||||
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
|
||||
}
|
||||
}
|
||||
map.put("measuresList", measuresList);
|
||||
map.put("gasList", hotworkGasCfdService.listAll(pd));
|
||||
map.put("imgList", hotworkacceptuserCfdService.findByIds(pd));
|
||||
map.put("imgList1", hotworkacceptuserCfdService.findById(pd));
|
||||
|
|
|
@ -882,7 +882,9 @@
|
|||
</choose>
|
||||
GROUP BY
|
||||
f.HOTWORK_ID
|
||||
ORDER BY f.APPLY_STATUS,f.CREATTIME DESC
|
||||
ORDER BY
|
||||
-- f.APPLY_STATUS,
|
||||
f.CREATTIME DESC
|
||||
</select>
|
||||
<select id="aqdatalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
|
|
Loading…
Reference in New Issue