| | |
| | | import com.ruoyi.doublePrevention.enums.ResultCodes;
|
| | | import com.ruoyi.doublePrevention.enums.StatusEnum;
|
| | | import com.ruoyi.doublePrevention.enums.SyncEnum;
|
| | | import com.ruoyi.doublePrevention.repository.param.PreventPointAndMeasureParams;
|
| | | import com.ruoyi.doublePrevention.service.RiskService;
|
| | | import com.ruoyi.doublePrevention.service.baseService.*;
|
| | | import com.ruoyi.doublePrevention.vo.ResultVO;
|
| | |
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.context.annotation.Bean;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | |
| | |
|
| | | @Autowired
|
| | | private PreventRiskControlMeasureService riskControlMeasureService;
|
| | |
|
| | | @Autowired
|
| | | private PreventRiskCheckUnitService preventRiskCheckUnitService;
|
| | |
|
| | | /**
|
| | | * 为设施设备清单附属表添加uuid
|
| | |
| | | ResultVO<List<PreventRiskControlMeasurePageQueryRespDTO>> resultVO = new ResultVO<>(ResultCodes.OK,pageResult);
|
| | | resultVO.setCount(count);
|
| | | return resultVO;
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 保存原检查点与管控措施的对应关系
|
| | | */
|
| | | @Transactional
|
| | | @Override
|
| | | public int insertPointAndMeasure(PreventPointAndMeasureParams pointAndMeasureParams) {
|
| | |
|
| | | String uuid = UUID.randomUUID().toString();
|
| | | PreventRiskCheckUnit checkUnit = new PreventRiskCheckUnit();
|
| | | //封装数据 todo
|
| | |
|
| | | checkUnit.setUuid(uuid);
|
| | | checkUnit.setRiskId(pointAndMeasureParams.getRiskId());
|
| | | checkUnit.setBaseCheckPointId(pointAndMeasureParams.getBaseCheckPointId());
|
| | | checkUnit.setControlMeasureId(pointAndMeasureParams.getControlMeasureId());
|
| | | //执行插入
|
| | | int result = preventRiskCheckUnitService.insertPointAndMeasure(checkUnit);
|
| | | if (result < 1){
|
| | | throw new RuntimeException("保存原检查点与管控措施的对应关系失败");
|
| | | }
|
| | |
|
| | | return result;
|
| | | }
|
| | | }
|