yxm
2024-07-15 eb0760c36778d07c0d13d917c0db30dfa03aa0fd
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/service/impl/SgProgressReportServiceImpl.java
@@ -457,14 +457,22 @@
         if (CollectionUtils.isNotEmpty(sgProgressReportDOS)) {
            sgProgressReportDOS.sort((u1, u2) -> u2.getCreateTime().compareTo(u1.getCreateTime()));
            SgProgressReportDO firstReport = sgProgressReportDOS.get(0);
            if (firstReport.getStatus().equals(2)) {
            SgGxStepDO sgGxStepDO = sgGxStepMapper.selectOne(wrapperss.eq("id", stepId));
            List<SgGxStepDO> sgGxStepDOS = sgGxStepMapper.selectList(
               new QueryWrapper<SgGxStepDO>()
                  .lt("id", stepId)
                  .eq("gx_info_id", sgGxStepDO.getGxInfoId())
                  .orderByDesc("gx_step_num"));
            if (!sgGxStepDOS.isEmpty()) {
               if (sgGxStepDOS.get(0).getGxStepName().equals(firstReport.getGxStepName())&&firstReport.getStatus().equals(2)) {
               sgReportVO.setGxDeviceId(deviceId);
               sgReportVO.setGxStepId(sgGxStepMapper.selectOne(wrapperss.eq("id", stepId)).getId());
                  sgReportVO.setGxStepId(sgGxStepDO.getId());
               sgReportVO.setProframId(firstReport.getProframId());
            }
            else {
               }else {
               throw new ServiceException("请完成上一步工序!");
            }
            }
         }else {
            if (stepId!=null) {
               SgGxStepDO sg = sgGxStepMapper.selectOne(wrapperss.eq("id", stepId));