|
@@ -238,6 +238,7 @@ public class TPssrAboveallController extends BaseController {
|
|
|
//endregion
|
|
|
|
|
|
//region 新增
|
|
|
+
|
|
|
/**
|
|
|
* 新增PSSR
|
|
|
*/
|
|
@@ -311,18 +312,6 @@ public class TPssrAboveallController extends BaseController {
|
|
|
for (TPssrPatrol pssrPatrol : tPssrPatrols) {
|
|
|
tPssrPatrolService.insertTPssrPatrol(pssrPatrol, userId);
|
|
|
}
|
|
|
-
|
|
|
- TPssrPatrol query = new TPssrPatrol();
|
|
|
- query.setSubId(subcontent.getId());
|
|
|
- boolean flag = true;
|
|
|
- for (TPssrPatrol patrol : tPssrPatrolService.selectTPssrPatrolList(query)) {
|
|
|
- if (patrol.getApproveStatus() != 2) {
|
|
|
- flag = false;
|
|
|
- }
|
|
|
- }
|
|
|
- if (flag) {
|
|
|
- tPssrApproveController.doApprove(subcontent.getId());
|
|
|
- }
|
|
|
} else if (subcontent.getForShort().equals("txjk")) {
|
|
|
List<TPssrPatrol> tPssrPatrols = new ArrayList<>();
|
|
|
// PAGA系统检查记录,10
|
|
@@ -332,18 +321,6 @@ public class TPssrAboveallController extends BaseController {
|
|
|
for (TPssrPatrol pssrPatrol : tPssrPatrols) {
|
|
|
tPssrPatrolService.insertTPssrPatrol(pssrPatrol, userId);
|
|
|
}
|
|
|
-
|
|
|
- TPssrPatrol query = new TPssrPatrol();
|
|
|
- query.setSubId(subcontent.getId());
|
|
|
- boolean flag = true;
|
|
|
- for (TPssrPatrol patrol : tPssrPatrolService.selectTPssrPatrolList(query)) {
|
|
|
- if (patrol.getApproveStatus() != 2) {
|
|
|
- flag = false;
|
|
|
- }
|
|
|
- }
|
|
|
- if (flag) {
|
|
|
- tPssrApproveController.doApprove(subcontent.getId());
|
|
|
- }
|
|
|
} else if (subcontent.getForShort().equals("bxsjcy")) {
|
|
|
List<TPssrPatrol> tPssrPatrols = new ArrayList<>();
|
|
|
// 四合一/苯系物/硫化氢/二氧化碳/射线一氧化碳检测仪检查记录,18
|
|
@@ -351,18 +328,6 @@ public class TPssrAboveallController extends BaseController {
|
|
|
for (TPssrPatrol pssrPatrol : tPssrPatrols) {
|
|
|
tPssrPatrolService.insertTPssrPatrol(pssrPatrol, userId);
|
|
|
}
|
|
|
-
|
|
|
- TPssrPatrol query = new TPssrPatrol();
|
|
|
- query.setSubId(subcontent.getId());
|
|
|
- boolean flag = true;
|
|
|
- for (TPssrPatrol patrol : tPssrPatrolService.selectTPssrPatrolList(query)) {
|
|
|
- if (patrol.getApproveStatus() != 2) {
|
|
|
- flag = false;
|
|
|
- }
|
|
|
- }
|
|
|
- if (flag) {
|
|
|
- tPssrApproveController.doApprove(subcontent.getId());
|
|
|
- }
|
|
|
} else if (subcontent.getForShort().equals("yfl")) {
|
|
|
genYfl(subcontent.getId(), userId);
|
|
|
} else if (subcontent.getForShort().equals("aqss")) {
|
|
@@ -594,72 +559,72 @@ public class TPssrAboveallController extends BaseController {
|
|
|
*/
|
|
|
private void genPssrDataByModel(TPssrAboveall model, TPssrAboveall newData, String userId) {
|
|
|
// new Thread(() -> {//同步模板数据
|
|
|
- TPssrSubcontent subcontent = new TPssrSubcontent();
|
|
|
- subcontent.setAboveallId(model.getId());
|
|
|
- //查询旧数据对应的子表信息,然后根据模板生成新的子表数据
|
|
|
- for (TPssrSubcontent oldSub : tPssrSubcontentService.selectTPssrSubcontentList(subcontent)) {
|
|
|
- //查询模板中是否有该子表数据,如果有则生成新的子表数据
|
|
|
- TPssrSubcontent sub = new TPssrSubcontent();
|
|
|
- sub.setAboveallId(newData.getId());
|
|
|
- sub.setForShort(oldSub.getForShort());
|
|
|
- TPssrSubcontent newSub = tPssrSubcontentService.selectTPssrSubcontentList(sub).get(0);
|
|
|
- switch (oldSub.getForShort()) {
|
|
|
- case "jxxm":
|
|
|
- genJxxm(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "kgfa":
|
|
|
- genKgfa(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "sjbg":
|
|
|
- genSjgb(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "mb":
|
|
|
- genMb(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "sbqjd":
|
|
|
- genSbqjd(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "qm":
|
|
|
- genQm(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "sksgfmzt":
|
|
|
- genSksgfmzt(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "sys":
|
|
|
- genSys(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "dj":
|
|
|
- genDj(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "dqzh":
|
|
|
- genDqzh(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "aqss":
|
|
|
- genAqss(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "jb":
|
|
|
- genJb(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "ybjy":
|
|
|
- genYbjy(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "yblscs":
|
|
|
- genYblscs(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "bjlszqr":
|
|
|
- genBjlszqr(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "djsb":
|
|
|
- genDjsb(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "qtjcy":
|
|
|
- genQtjcy(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- case "zxfxy":
|
|
|
- genZxfxy(oldSub, newSub, userId);
|
|
|
- break;
|
|
|
- }
|
|
|
+ TPssrSubcontent subcontent = new TPssrSubcontent();
|
|
|
+ subcontent.setAboveallId(model.getId());
|
|
|
+ //查询旧数据对应的子表信息,然后根据模板生成新的子表数据
|
|
|
+ for (TPssrSubcontent oldSub : tPssrSubcontentService.selectTPssrSubcontentList(subcontent)) {
|
|
|
+ //查询模板中是否有该子表数据,如果有则生成新的子表数据
|
|
|
+ TPssrSubcontent sub = new TPssrSubcontent();
|
|
|
+ sub.setAboveallId(newData.getId());
|
|
|
+ sub.setForShort(oldSub.getForShort());
|
|
|
+ TPssrSubcontent newSub = tPssrSubcontentService.selectTPssrSubcontentList(sub).get(0);
|
|
|
+ switch (oldSub.getForShort()) {
|
|
|
+ case "jxxm":
|
|
|
+ genJxxm(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "kgfa":
|
|
|
+ genKgfa(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "sjbg":
|
|
|
+ genSjgb(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "mb":
|
|
|
+ genMb(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "sbqjd":
|
|
|
+ genSbqjd(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "qm":
|
|
|
+ genQm(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "sksgfmzt":
|
|
|
+ genSksgfmzt(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "sys":
|
|
|
+ genSys(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "dj":
|
|
|
+ genDj(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "dqzh":
|
|
|
+ genDqzh(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "aqss":
|
|
|
+ genAqss(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "jb":
|
|
|
+ genJb(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "ybjy":
|
|
|
+ genYbjy(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "yblscs":
|
|
|
+ genYblscs(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "bjlszqr":
|
|
|
+ genBjlszqr(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "djsb":
|
|
|
+ genDjsb(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "qtjcy":
|
|
|
+ genQtjcy(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
+ case "zxfxy":
|
|
|
+ genZxfxy(oldSub, newSub, userId);
|
|
|
+ break;
|
|
|
}
|
|
|
+ }
|
|
|
// }, "新增模板子表数据").start();
|
|
|
}
|
|
|
|