| | |
| | | @Autowired |
| | | private SgGxStepMapper sgGxStepMapper; |
| | | |
| | | @Autowired |
| | | private SgProgressReportMapper sgProgressReportMapper; |
| | | |
| | | |
| | | @Override |
| | | public IPage<SgDeviceDO> queryPageList(IPage<SgDeviceDO> page, SgDeviceSearchDTO searchDTO) { |
| | |
| | | List<SgGxStepDO> sgGxStepDOS = sgGxStepMapper.queryStepList(deviceId); |
| | | return sgGxStepDOS; |
| | | } |
| | | |
| | | @Override |
| | | public boolean saveById(SgDeviceDO sgDeviceDO) { |
| | | QueryWrapper<SgProgressReportDO> queryWrapper = new QueryWrapper<>(); |
| | | SgProgressReportDO sgProgressReportDO = sgProgressReportMapper.selectOne(queryWrapper.eq("profram_id", sgDeviceDO.getProgramId()).eq("gx_step_id",26)); |
| | | if (sgProgressReportDO != null) { |
| | | if(sgProgressReportDO.getStatus().equals(2)){ |
| | | throw new ServiceException("施工验收完成不能增加设备"); |
| | | } |
| | | } |
| | | |
| | | return save(sgDeviceDO); |
| | | } |
| | | } |