| | |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | |
| | | reportingWork.setReportingWorkTime(localDateTime); |
| | | } |
| | | //是否线补 1现补 0未现补 |
| | | int isPatch = (int) reportingWorkJson.get("isPatch"); |
| | | int isPatch = (reportingWorkJson.get("isPatch") != null) ? (int) reportingWorkJson.get("isPatch") : 0; |
| | | |
| | | reportingWork.setNextProcess(orderProcessDetailMapper.selectNextProcess(processIdStr[0],processIdStr[1],reportingWork.getThisProcess())); |
| | | //主表插入 |
| | |
| | | //跨工序次破修改质检状态 |
| | | if (!damageDetail.getResponsibleProcess().equals(reportingWork.getThisProcess()) && qualityInsStatus==2) { |
| | | damageDetail.setQualityInsStatus(1); |
| | | } |
| | | if (isPatch == 1){ |
| | | damageDetail.setQualityInsStatus(2); |
| | | } |
| | | damageDetailsMapper.insert(damageDetail); |
| | | }); |
| | |
| | | String result = processId.substring(index); |
| | | String technologyStr = reportingWork.get("technologyStr"); |
| | | String[] processIdStr = processId.split("/"); |
| | | String nowDate = LocalDate.now().toString(); |
| | | //获取报工工序是否为复合工程 |
| | | String laminating = reportingWorkMapper.getProcessLaminating(thisProcess); |
| | | //合片工序 |
| | | if (thisProcess.equals("夹胶") || thisProcess.equals("中空") || thisProcess.equals("包装")){ |
| | | if (laminating.equals("laminating")){ |
| | | LambdaUpdateWrapper |
| | | <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper |
| | |
| | | .eq(ReportingWork::getThisProcess, reportingWork.get("process")) |
| | | .eq(ReportingWork::getReviewedState, 0) |
| | | .setSql("reviewed_state =1") |
| | | .set(ReportingWork::getReviewed, userName); |
| | | .set(ReportingWork::getReviewed, userName) |
| | | .set(ReportingWork::getExamineTime, nowDate); |
| | | reportingWorkMapper.update(null, updateWrapper); |
| | | }else { |
| | | reportingWorkMapper.ReviewReportingWorkMp(processIdStr[0],reportingWork.get("process"),technologyStr,userName); |