| | |
| | | //工艺流程 |
| | | map.put("technologicalProcess", technologicalProcess); |
| | | |
| | | //获取服务器时间 |
| | | map.put("reportingWorkTiem", LocalDateTime.now()); |
| | | //设备下拉框 |
| | | map.put("device", reportingWorkMapper.SelectWorkBasicDeviceMp(process)); |
| | | //班组下拉框 |
| | |
| | | // if (reviewedState==1){//已审核 |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, splitTechNumbers(technologyStr), process,previousProcess,laminating); |
| | | if(process.equals("中空")){ |
| | | if(laminating.equals("stepD")){ |
| | | //获取该流程卡订单号 |
| | | String orderId = reportingWorkMapper.selectOrderid(processIdStr); |
| | | details.forEach( detail -> { |
| | |
| | | }); |
| | | } |
| | | map.put("Detail",details ); |
| | | // }else { |
| | | // //不是第一道工序,查询报工数据 |
| | | // List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess,laminating); |
| | | // if(process.equals("中空")){ |
| | | // String orderId = reportingWorkMapper.selectOrderid(processIdStr); |
| | | // details.forEach( detail -> { |
| | | // Integer glassId = orderGlassDetailMapper. |
| | | // getMinIdByGroup(orderId, |
| | | // String.valueOf(detail.get("order_number")), |
| | | // String.valueOf(detail.get("group"))); |
| | | // int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId"))); |
| | | // if(listGlassId !=glassId){ |
| | | // detail.put("rowClass","latter"); |
| | | // } |
| | | // }); |
| | | // } |
| | | // map.put("Detail",details ); |
| | | // } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | JSONObject reportingWorkJson = new JSONObject(reportingWorkMap); |
| | | ReportingWork reportingWork = JSONObject.parseObject(JSONObject.toJSONString(reportingWorkJson.get("title")), ReportingWork.class); |
| | | List<ReportingWorkDetail> reportingWorkDetails = JSONArray.parseArray(JSONObject.toJSONString(reportingWorkJson.get("detail")), ReportingWorkDetail.class); |
| | | |
| | | |
| | | ReportingWork reportingWork1 = reportingWorkMapper.selectOne(new LambdaQueryWrapper<ReportingWork>() |
| | | .eq(ReportingWork::getReportingWorkId, reportingWork.getReportingWorkId())); |
| | | reportingWork.setCreatorId(reportingWork1.getCreatorId()); |
| | | reportingWork.setCreator(reportingWork1.getCreator()); |
| | | reportingWork.setUpdateTime(LocalDateTime.now()); |
| | | |
| | | //查询该报工是否为报工转移订单 |
| | | Integer transferState = reportingWorkMapper.selectReviewedState(reportingWork.getReportingWorkId()); |
| | | if (transferState !=3){ |
| | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("并行查询报工记录异常:" + e.getMessage(), e); |
| | | throw new RuntimeException("报工查询并行查询报工记录异常:" + e.getMessage(), e); |
| | | } |
| | | |
| | | return result; |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result addWorkInProgress(Map<String, Object> object) { |
| | | List<Map<String,Object>> list = (List<Map<String,Object>>) object.get("reportingWorks"); |
| | | |
| | | list.forEach(item -> { |
| | | ReportingWork reportingWork = JSONObject.parseObject( |
| | | JSONObject.toJSONString(item.get("processTitle")), ReportingWork.class); |
| | | Map<String, String> mapTitle = new HashMap<>(); |
| | | String[] processIdStr = reportingWork.getProcessId() != null |
| | | ? reportingWork.getProcessId().split("/") |
| | | : new String[]{""}; |
| | | mapTitle.put("process", reportingWork.getPreviousProcess()); |
| | | mapTitle.put("processId", reportingWork.getProcessId()); |
| | | mapTitle.put("thisProcess", reportingWork.getThisProcess()); |
| | | mapTitle.put("technologyStr", processIdStr[1]); |
| | | mapTitle.put("userName", object.get("userName").toString()); |
| | | ReviewReportingWorkSv(mapTitle); |
| | | |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("detail", item.get("processList")); |
| | | map.put("title", item.get("processTitle")); |
| | | map.put("type", object.get("type")); |
| | | map.put("userId", object.get("userId")); |
| | | map.put("userName", object.get("userName")); |
| | | map.put("qualityInsStatus", object.get("qualityInsStatus")); |
| | | map.put("class", object.get("class")); |
| | | SaveReportingWorkSv(map); |
| | | }); |
| | | |
| | | return Result.success(true); |
| | | } |
| | | } |