|
@@ -30,6 +30,7 @@ import java.util.List;
|
|
|
@RestController
|
|
|
@RequestMapping("/pssr/aboveall")
|
|
|
public class TPssrAboveallController extends BaseController {
|
|
|
+ //region 注入服务层对象
|
|
|
@Autowired
|
|
|
private ITPssrAboveallService tPssrAboveallService;
|
|
|
|
|
@@ -69,6 +70,12 @@ public class TPssrAboveallController extends BaseController {
|
|
|
@Autowired
|
|
|
private ITPssrHygieneService tPssrHygieneService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITPssrFrameModelService tPssrFrameModelService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrFrameService tPssrFrameService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ITPssrProtectionService tPssrProtectionService;
|
|
|
@Autowired
|
|
@@ -80,6 +87,93 @@ public class TPssrAboveallController extends BaseController {
|
|
|
@Autowired
|
|
|
private ITPssrFranklinismService tPssrFranklinismService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITPssrOverhaulExchangerService tPssrOverhaulExchangerService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrOverhaulFilterService tPssrOverhaulFilterService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrOverhaulTowerService tPssrOverhaulTowerService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrOverhaulValveService tPssrOverhaulValveService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrBlindService tPssrBlindService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrLockService tPssrLockService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrPipeService tPssrPipeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrCleaningService tPssrCleaningService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrAirtightService tPssrAirtightService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrLaboratoryService tPssrLaboratoryService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrCircuitService tPssrCircuitService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrSafetyBleedService tPssrSafetyBleedService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrSafetyBreathService tPssrSafetyBreathService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrSafetyBrustService tPssrSafetyBrustService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrSafetyFlamearresterService tPssrSafetyFlamearresterService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrMotorService tPssrMotorService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrInstrumentCalibrationService tPssrInstrumentCalibrationService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrNitrogenService tPssrNitrogenService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrGasdetectorService tPssrGasdetectorService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrAnalyzerService tPssrAnalyzerService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrMeasureService tPssrMeasureService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrPumpFillService tPssrPumpFillService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrPumpCleaningService tPssrPumpCleaningService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrPumpOverhaulService tPssrPumpOverhaulService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrInstrumentTestService tPssrInstrumentTestService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrAlarmService tPssrAlarmService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrVesselService tPssrVesselService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITPssrProgrammeService tPssrProgrammeService;
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 系统方法
|
|
|
+
|
|
|
/**
|
|
|
* 查询PSSR列表
|
|
|
*/
|
|
@@ -112,6 +206,38 @@ public class TPssrAboveallController extends BaseController {
|
|
|
return AjaxResult.success(tPssrAboveallService.selectTPssrAboveallById(id));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改PSSR
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('pssr:aboveall:edit')")
|
|
|
+ @Log(title = "PSSR", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody TPssrAboveall tPssrAboveall) {
|
|
|
+ return toAjax(tPssrAboveallService.updateTPssrAboveall(tPssrAboveall));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除PSSR
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('pssr:aboveall:remove')")
|
|
|
+ @Log(title = "PSSR", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
+ return toAjax(tPssrAboveallService.deleteTPssrAboveallByIds(ids));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询pssr相关用户
|
|
|
+ */
|
|
|
+ @GetMapping("/listPssrUser")
|
|
|
+ public AjaxResult listPssrUser(TPssrSubcontent sub) {
|
|
|
+ SysUser user = new SysUser();
|
|
|
+ return AjaxResult.success(userService.selectPssrUser(user));
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 新增
|
|
|
/**
|
|
|
* 新增PSSR
|
|
|
*/
|
|
@@ -119,6 +245,17 @@ public class TPssrAboveallController extends BaseController {
|
|
|
@Log(title = "PSSR", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody TPssrAboveall tPssrAboveall) {
|
|
|
+ boolean model = false;
|
|
|
+ TPssrAboveall aboveall = null;
|
|
|
+ if (tPssrAboveall.getId() != null) {
|
|
|
+ model = true;
|
|
|
+ aboveall = tPssrAboveallService.selectTPssrAboveallById(tPssrAboveall.getId());
|
|
|
+ tPssrAboveall.setUnit(aboveall.getUnit());
|
|
|
+ tPssrAboveall.setRegion(aboveall.getRegion());
|
|
|
+ tPssrAboveall.setId(null);
|
|
|
+ tPssrAboveall.setDrivingTime(aboveall.getDrivingTime());
|
|
|
+ tPssrAboveall.setIncludePublic(aboveall.getIncludePublic());
|
|
|
+ }
|
|
|
if (tPssrAboveall.getIncludePublic() == 1) {
|
|
|
tPssrAboveall.setUnit(tPssrAboveall.getUnit() + ",390");
|
|
|
}
|
|
@@ -244,19 +381,63 @@ public class TPssrAboveallController extends BaseController {
|
|
|
genRsfh(subcontent.getId(), userId);
|
|
|
} else if (subcontent.getForShort().equals("jdjdkj")) {
|
|
|
genJdjdkj(subcontent.getId(), userId);
|
|
|
+ } else if (subcontent.getForShort().equals("zdj")) {
|
|
|
+ genZdj(subcontent.getId(), subcontent.getUnit(), userId);
|
|
|
}
|
|
|
}, "新增子表数据").start();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //同步模板数据
|
|
|
+ if (model) {
|
|
|
+ genPssrDataByModel(aboveall, tPssrAboveall, userId);
|
|
|
+ }
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 生成固定内容数据
|
|
|
|
|
|
+ /**
|
|
|
+ * 生成支吊架数据
|
|
|
+ */
|
|
|
+ private void genZdj(Long subId, String units, String userId) {
|
|
|
+ if (StringUtils.isNotEmpty(units)) {
|
|
|
+ for (String unit : units.split(",")) {
|
|
|
+ TPssrFrameModel model = new TPssrFrameModel();
|
|
|
+ model.setUnit(unit);
|
|
|
+ tPssrFrameModelService.selectTPssrFrameModelList(model).forEach(item -> {
|
|
|
+ TPssrFrame frame = new TPssrFrame();
|
|
|
+ frame.setSubId(subId);
|
|
|
+ frame.setRegion(item.getRegion());
|
|
|
+ frame.setBracketNumber(item.getBracketNumber());
|
|
|
+ frame.setPipelineNumber(item.getPipelineNumber());
|
|
|
+ frame.setDevNo(item.getDevNo());
|
|
|
+ frame.setSupportType(item.getSupportType());
|
|
|
+ frame.setFramePipe("✔");
|
|
|
+ frame.setFrameRoot("✔");
|
|
|
+ frame.setFunctionalPart("✔");
|
|
|
+ frame.setConnector("✔");
|
|
|
+ frame.setCreaterCode(userId);
|
|
|
+ frame.setCreatedate(new Date());
|
|
|
+ tPssrFrameService.insertTPssrFrame(frame);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成人身防护数据
|
|
|
+ */
|
|
|
private void genRsfh(Long subId, String userId) {
|
|
|
tPssrProtectionService.insertTPssrProtection(new TPssrProtection(subId, "被保温的管道/设备保温防护层外观完好,无缺失。", userId, new Date()));
|
|
|
tPssrProtectionService.insertTPssrProtection(new TPssrProtection(subId, "保温层连接密封处严密,无管道/设备裸露。", userId, new Date()));
|
|
|
tPssrProtectionService.insertTPssrProtection(new TPssrProtection(subId, "管道/设备上的保温层不妨碍操作人员进行现场作业。", userId, new Date()));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 生成静电接地跨接数据
|
|
|
+ */
|
|
|
private void genJdjdkj(Long subId, String userId) {
|
|
|
tPssrFranklinismService.insertTPssrFranklinism(new TPssrFranklinism(1L, subId, "电气设备按要求接地,接线规范。", userId, new Date()));
|
|
|
tPssrFranklinismService.insertTPssrFranklinism(new TPssrFranklinism(2L, subId, "管线按要求跨接,接线规范。", userId, new Date()));
|
|
@@ -265,6 +446,9 @@ public class TPssrAboveallController extends BaseController {
|
|
|
tPssrFranklinismService.insertTPssrFranklinism(new TPssrFranklinism(5L, subId, "接地标记/标识清晰。", userId, new Date()));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 生成现场卫生数据
|
|
|
+ */
|
|
|
private void genXcws(Long subId, String userId) {
|
|
|
tPssrHygieneService.insertTPssrHygiene(new TPssrHygiene(subId, "现场地面无油渍,积水等。", userId, new Date()));
|
|
|
tPssrHygieneService.insertTPssrHygiene(new TPssrHygiene(subId, "现场无检修施工后的残留物(碎屑, 密封材料, 螺栓,保温材料等) 。", userId, new Date()));
|
|
@@ -401,33 +585,556 @@ public class TPssrAboveallController extends BaseController {
|
|
|
tPssrPublicService.insertTPssrPublic(new TPssrPublic(subId, "公用工程系统低压蒸汽已投用或具备投用条件。", "界区阀已打开,PY9109压力达( )Mpa,TI9115温度达( )℃。", "PY9109压力达( )Mpa,TI9115温度达( )℃。", userId, new Date()));
|
|
|
tPssrPublicService.insertTPssrPublic(new TPssrPublic(subId, "公用工程系统精制凝液已投用或具备投用条件。", "界区阀已打开,P3505A/B/C压力达( )Mpa。", "P3505A/B/C压力达( )Mpa。", userId, new Date()));
|
|
|
}
|
|
|
+//endregion
|
|
|
+
|
|
|
+ //region 根据模板旧数据生成数据
|
|
|
|
|
|
/**
|
|
|
- * 修改PSSR
|
|
|
+ * 根据模板旧数据生成数据
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('pssr:aboveall:edit')")
|
|
|
- @Log(title = "PSSR", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping
|
|
|
- public AjaxResult edit(@RequestBody TPssrAboveall tPssrAboveall) {
|
|
|
- return toAjax(tPssrAboveallService.updateTPssrAboveall(tPssrAboveall));
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+// }, "新增模板子表数据").start();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 删除PSSR
|
|
|
+ * 生成短接数据
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('pssr:aboveall:remove')")
|
|
|
- @Log(title = "PSSR", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
- return toAjax(tPssrAboveallService.deleteTPssrAboveallByIds(ids));
|
|
|
+ private void genDj(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrCircuit circuit = new TPssrCircuit();
|
|
|
+ circuit.setSubId(oldSub.getId());
|
|
|
+ for (TPssrCircuit oldItem : tPssrCircuitService.selectTPssrCircuitList(circuit)) {
|
|
|
+ TPssrCircuit newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrCircuitService.insertTPssrCircuit(newItem);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询pssr相关用户
|
|
|
+ * 生成实验室数据
|
|
|
*/
|
|
|
- @GetMapping("/listPssrUser")
|
|
|
- public AjaxResult listPssrUser(TPssrSubcontent sub) {
|
|
|
- SysUser user = new SysUser();
|
|
|
- return AjaxResult.success(userService.selectPssrUser(user));
|
|
|
+ private void genSys(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrLaboratory laboratory = new TPssrLaboratory();
|
|
|
+ laboratory.setSubId(oldSub.getId());
|
|
|
+ for (TPssrLaboratory oldItem : tPssrLaboratoryService.selectTPssrLaboratoryList(laboratory)) {
|
|
|
+ TPssrLaboratory newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrLaboratoryService.insertTPssrLaboratory(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成锁开锁关数据
|
|
|
+ */
|
|
|
+ private void genSksgfmzt(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrLock lock = new TPssrLock();
|
|
|
+ lock.setSubId(oldSub.getId());
|
|
|
+ for (TPssrLock oldItem : tPssrLockService.selectTPssrLockList(lock)) {
|
|
|
+ TPssrLock newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrLockService.insertTPssrLock(newItem);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成气密数据
|
|
|
+ */
|
|
|
+ private void genQm(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrAirtight airtight = new TPssrAirtight();
|
|
|
+ airtight.setSubId(oldSub.getId());
|
|
|
+ for (TPssrAirtight oldItem : tPssrAirtightService.selectTPssrAirtightList(airtight)) {
|
|
|
+ TPssrAirtight newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrAirtightService.insertTPssrAirtight(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成设备清洁度数据
|
|
|
+ */
|
|
|
+ private void genSbqjd(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrCleaning cleaning = new TPssrCleaning();
|
|
|
+ cleaning.setSubId(oldSub.getId());
|
|
|
+ for (TPssrCleaning oldItem : tPssrCleaningService.selectTPssrCleaningList(cleaning)) {
|
|
|
+ TPssrCleaning newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrCleaningService.insertTPssrCleaning(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成盲板数据
|
|
|
+ */
|
|
|
+ private void genMb(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrBlind blind = new TPssrBlind();
|
|
|
+ blind.setSubId(oldSub.getId());
|
|
|
+ for (TPssrBlind oldItem : tPssrBlindService.selectTPssrBlindList(blind)) {
|
|
|
+ TPssrBlind newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setInstallDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrBlindService.insertTPssrBlind(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成氮气置换数据
|
|
|
+ */
|
|
|
+ private void genDqzh(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrNitrogen nitrogen = new TPssrNitrogen();
|
|
|
+ nitrogen.setSubId(oldSub.getId());
|
|
|
+ for (TPssrNitrogen oldItem : tPssrNitrogenService.selectTPssrNitrogenList(nitrogen)) {
|
|
|
+ TPssrNitrogen newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrNitrogenService.insertTPssrNitrogen(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成安全设施数据
|
|
|
+ */
|
|
|
+ private void genAqss(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ //泄放阀
|
|
|
+ TPssrSafetyBleed safetyBleed = new TPssrSafetyBleed();
|
|
|
+ safetyBleed.setSubId(oldSub.getId());
|
|
|
+ for (TPssrSafetyBleed oldItem : tPssrSafetyBleedService.selectTPssrSafetyBleedList(safetyBleed)) {
|
|
|
+ TPssrSafetyBleed newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrSafetyBleedService.insertTPssrSafetyBleed(newItem);
|
|
|
+ }
|
|
|
+ //呼吸阀
|
|
|
+ TPssrSafetyBreath safetyBreath = new TPssrSafetyBreath();
|
|
|
+ safetyBreath.setSubId(oldSub.getId());
|
|
|
+ for (TPssrSafetyBreath oldItem : tPssrSafetyBreathService.selectTPssrSafetyBreathList(safetyBreath)) {
|
|
|
+ TPssrSafetyBreath newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrSafetyBreathService.insertTPssrSafetyBreath(newItem);
|
|
|
+ }
|
|
|
+ //爆破片
|
|
|
+ TPssrSafetyBrust safetyBrust = new TPssrSafetyBrust();
|
|
|
+ safetyBrust.setSubId(oldSub.getId());
|
|
|
+ for (TPssrSafetyBrust oldItem : tPssrSafetyBrustService.selectTPssrSafetyBrustList(safetyBrust)) {
|
|
|
+ TPssrSafetyBrust newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrSafetyBrustService.insertTPssrSafetyBrust(newItem);
|
|
|
+ }
|
|
|
+ //阻火器
|
|
|
+ TPssrSafetyFlamearrester safetyFlamearrester = new TPssrSafetyFlamearrester();
|
|
|
+ safetyFlamearrester.setSubId(oldSub.getId());
|
|
|
+ for (TPssrSafetyFlamearrester oldItem : tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterList(safetyFlamearrester)) {
|
|
|
+ TPssrSafetyFlamearrester newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrSafetyFlamearresterService.insertTPssrSafetyFlamearrester(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成机泵数据
|
|
|
+ */
|
|
|
+ private void genJb(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrPumpCleaning pumpCleaning = new TPssrPumpCleaning();
|
|
|
+ pumpCleaning.setSubId(oldSub.getId());
|
|
|
+ for (TPssrPumpCleaning oldItem : tPssrPumpCleaningService.selectTPssrPumpCleaningList(pumpCleaning)) {
|
|
|
+ TPssrPumpCleaning newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrPumpCleaningService.insertTPssrPumpCleaning(newItem);
|
|
|
+ }
|
|
|
+ TPssrPumpFill pumpFill = new TPssrPumpFill();
|
|
|
+ pumpFill.setSubId(oldSub.getId());
|
|
|
+ for (TPssrPumpFill oldItem : tPssrPumpFillService.selectTPssrPumpFillList(pumpFill)) {
|
|
|
+ TPssrPumpFill newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrPumpFillService.insertTPssrPumpFill(newItem);
|
|
|
+ }
|
|
|
+ TPssrPumpOverhaul pumpOverhaul = new TPssrPumpOverhaul();
|
|
|
+ pumpOverhaul.setSubId(oldSub.getId());
|
|
|
+ for (TPssrPumpOverhaul oldItem : tPssrPumpOverhaulService.selectTPssrPumpOverhaulList(pumpOverhaul)) {
|
|
|
+ TPssrPumpOverhaul newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrPumpOverhaulService.insertTPssrPumpOverhaul(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成仪表校验数据
|
|
|
+ */
|
|
|
+ private void genYbjy(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrInstrumentCalibration instrumentCalibration = new TPssrInstrumentCalibration();
|
|
|
+ instrumentCalibration.setSubId(oldSub.getId());
|
|
|
+ for (TPssrInstrumentCalibration oldItem : tPssrInstrumentCalibrationService.selectTPssrInstrumentCalibrationList(instrumentCalibration)) {
|
|
|
+ TPssrInstrumentCalibration newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrInstrumentCalibrationService.insertTPssrInstrumentCalibration(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成仪表连锁测试数据
|
|
|
+ */
|
|
|
+ private void genYblscs(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrInstrumentTest instrumentTest = new TPssrInstrumentTest();
|
|
|
+ instrumentTest.setSubId(oldSub.getId());
|
|
|
+ for (TPssrInstrumentTest oldItem : tPssrInstrumentTestService.selectTPssrInstrumentTestList(instrumentTest)) {
|
|
|
+ TPssrInstrumentTest newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrInstrumentTestService.insertTPssrInstrumentTest(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成报警连锁值确认数据
|
|
|
+ */
|
|
|
+ private void genBjlszqr(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrAlarm alarm = new TPssrAlarm();
|
|
|
+ alarm.setSubId(oldSub.getId());
|
|
|
+ for (TPssrAlarm oldItem : tPssrAlarmService.selectTPssrAlarmList(alarm)) {
|
|
|
+ TPssrAlarm newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrAlarmService.insertTPssrAlarm(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成电机设备数据
|
|
|
+ */
|
|
|
+ private void genDjsb(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrMotor motor = new TPssrMotor();
|
|
|
+ motor.setSubId(oldSub.getId());
|
|
|
+ for (TPssrMotor oldItem : tPssrMotorService.selectTPssrMotorList(motor)) {
|
|
|
+ TPssrMotor newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrMotorService.insertTPssrMotor(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成气体检测仪数据
|
|
|
+ */
|
|
|
+ private void genQtjcy(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrGasdetector gasdetector = new TPssrGasdetector();
|
|
|
+ gasdetector.setSubId(oldSub.getId());
|
|
|
+ for (TPssrGasdetector oldItem : tPssrGasdetectorService.selectTPssrGasdetectorList(gasdetector)) {
|
|
|
+ TPssrGasdetector newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrGasdetectorService.insertTPssrGasdetector(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成在线分析仪数据
|
|
|
+ */
|
|
|
+ private void genZxfxy(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrAnalyzer analyzer = new TPssrAnalyzer();
|
|
|
+ analyzer.setSubId(oldSub.getId());
|
|
|
+ for (TPssrAnalyzer oldItem : tPssrAnalyzerService.selectTPssrAnalyzerList(analyzer)) {
|
|
|
+ TPssrAnalyzer newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrAnalyzerService.insertTPssrAnalyzer(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成设计变更数据
|
|
|
+ */
|
|
|
+ private void genSjgb(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrMoc moc = new TPssrMoc();
|
|
|
+ moc.setSubId(oldSub.getId());
|
|
|
+ for (TPssrMoc oldItem : tPssrMocService.selectTPssrMocList(moc)) {
|
|
|
+ TPssrMoc newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setConfirmationDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrMocService.insertTPssrMoc(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成检修项目数据
|
|
|
+ */
|
|
|
+ private void genJxxm(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ //换热器
|
|
|
+ TPssrOverhaulExchanger overhaulExchanger = new TPssrOverhaulExchanger();
|
|
|
+ overhaulExchanger.setSubId(oldSub.getId());
|
|
|
+ for (TPssrOverhaulExchanger exchanger : tPssrOverhaulExchangerService.selectTPssrOverhaulExchangerList(overhaulExchanger)) {
|
|
|
+ TPssrOverhaulExchanger newItem = exchanger;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setCompletionDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrOverhaulExchangerService.insertTPssrOverhaulExchanger(newItem);
|
|
|
+ }
|
|
|
+ //过滤器
|
|
|
+ TPssrOverhaulFilter overhaulFilter = new TPssrOverhaulFilter();
|
|
|
+ overhaulFilter.setSubId(oldSub.getId());
|
|
|
+ for (TPssrOverhaulFilter filter : tPssrOverhaulFilterService.selectTPssrOverhaulFilterList(overhaulFilter)) {
|
|
|
+ TPssrOverhaulFilter newItem = filter;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setCompletionDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrOverhaulFilterService.insertTPssrOverhaulFilter(newItem);
|
|
|
+ }
|
|
|
+ //塔罐
|
|
|
+ TPssrOverhaulTower overhaulTower = new TPssrOverhaulTower();
|
|
|
+ overhaulTower.setSubId(oldSub.getId());
|
|
|
+ for (TPssrOverhaulTower tower : tPssrOverhaulTowerService.selectTPssrOverhaulTowerList(overhaulTower)) {
|
|
|
+ TPssrOverhaulTower newItem = tower;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setCompletionDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrOverhaulTowerService.insertTPssrOverhaulTower(newItem);
|
|
|
+ }
|
|
|
+ //阀门
|
|
|
+ TPssrOverhaulValve overhaulValve = new TPssrOverhaulValve();
|
|
|
+ overhaulValve.setSubId(oldSub.getId());
|
|
|
+ for (TPssrOverhaulValve valve : tPssrOverhaulValveService.selectTPssrOverhaulValveList(overhaulValve)) {
|
|
|
+ TPssrOverhaulValve newItem = valve;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setDoneDate(null);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrOverhaulValveService.insertTPssrOverhaulValve(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成开工方案数据
|
|
|
+ */
|
|
|
+ private void genKgfa(TPssrSubcontent oldSub, TPssrSubcontent newSub, String userId) {
|
|
|
+ TPssrProgramme programme = new TPssrProgramme();
|
|
|
+ programme.setSubId(oldSub.getId());
|
|
|
+ for (TPssrProgramme oldItem : tPssrProgrammeService.selectTPssrProgrammeList(programme)) {
|
|
|
+ TPssrProgramme newItem = oldItem;
|
|
|
+ newItem.setSubId(newSub.getId());
|
|
|
+ newItem.setId(null);
|
|
|
+ newItem.setCreatedate(new Date());
|
|
|
+ newItem.setCreaterCode(userId);
|
|
|
+ newItem.setApproveStatus(0L);
|
|
|
+ newItem.setUpdaterCode(null);
|
|
|
+ newItem.setUpdatedate(null);
|
|
|
+ tPssrProgrammeService.insertTPssrProgramme(newItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
}
|