| | |
| | | * 插入检查点附属表
|
| | | */
|
| | | @Override
|
| | | public void insertCheckAndMeasure(Long id, HiddenDangerCheckPoint hdcp) {
|
| | |
|
| | | public int insertCheckAndMeasure(Long id, HiddenDangerCheckPoint hdcp) {
|
| | | System.out.println("进入核查点保存方法");
|
| | | PreventRiskDangerCheckAndMeasure checkAndMeasure = new PreventRiskDangerCheckAndMeasure();
|
| | |
|
| | | //根据检查点信息,查询对应管控措施
|
| | |
| | | if (checkUnit == null){
|
| | | throw new RuntimeException("基础检查点不存在");
|
| | | }
|
| | |
|
| | | System.out.println("通过一次检验");
|
| | | PreventRiskControlMeasure controlMeasure = riskControlMeasureService.getPreventRiskControlMeasureById(checkUnit.getControlMeasureId());
|
| | | if (controlMeasure == null){
|
| | | throw new RuntimeException("管控措施已经被删除");
|
| | | }
|
| | |
|
| | | System.out.println("通过二次检验");
|
| | | //封装数据
|
| | | checkAndMeasure.setCheckId(hdcp.getCheckId());
|
| | | checkAndMeasure.setDangerCheckPointId(id);
|
| | | checkAndMeasure.setBaseCheckPointId(hdcp.getCheckPointId());
|
| | | checkAndMeasure.setControlMeasureId(controlMeasure.getId());
|
| | | checkAndMeasure.setCheckContent(controlMeasure.getCheckContent());
|
| | | checkAndMeasure.setCheckResult(null);
|
| | |
|
| | | checkAndMeasure.setCheckResult((byte) 4);
|
| | | System.out.println("数据封装完成");
|
| | | //写入核查任务检查点与管控措施信息
|
| | | preventRiskDangerCheckAndMeasureService.insertCheckAndMeasure(checkAndMeasure);
|
| | |
|
| | | int result = preventRiskDangerCheckAndMeasureService.insertCheckAndMeasure(checkAndMeasure);
|
| | | if (result <1){
|
| | | return StatusEnum.EXEC_FAIL.getCode();
|
| | | }
|
| | | return StatusEnum.EXEC_SUCCESS.getCode();
|
| | | }
|
| | | /**
|
| | | * todo-2022 填报时的操作
|