| | |
| | | this.reportingWorkTransferMapper = reportingWorkTransferMapper; |
| | | }*/ |
| | | |
| | | //将层数字符串用逗号隔开 |
| | | public static String splitTechNumbers(String input) { |
| | | if (input == null || input.isEmpty()) { |
| | | return ""; |
| | | } |
| | | |
| | | List<String> result = new ArrayList<>(); |
| | | for (int i = 0; i < input.length(); i++) { |
| | | // 特殊处理 "10" |
| | | if (input.charAt(i) == '1' && i + 1 < input.length() && input.charAt(i + 1) == '0') { |
| | | result.add("10"); |
| | | i++; // 跳过下一个字符 |
| | | } else { |
| | | result.add(String.valueOf(input.charAt(i))); |
| | | } |
| | | } |
| | | |
| | | return String.join(",", result); |
| | | } |
| | | |
| | | public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process, String reportType) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //获取报工工序是否为复合工程 |
| | | String laminating = reportingWorkMapper.getProcessLaminating(process); |
| | | //查询流程卡工艺流程 |
| | | String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(processIdStr,technologyStr); |
| | | String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(processIdStr,splitTechNumbers(technologyStr)); |
| | | |
| | | if (technologicalProcess!=null || !technologicalProcess.equals("")){ |
| | | String[] processList = technologicalProcess.split("->"); |
| | |
| | | nextProcess = processList[i + 1]; |
| | | } |
| | | //查询当前工序的表头数据 |
| | | map.put("data", reportingWorkMapper.AddSelectLastWorkMp(processIdStr, technologyStr, previousProcess, nextProcess, process,reportType)); |
| | | map.put("data", reportingWorkMapper.AddSelectLastWorkMp(processIdStr, splitTechNumbers(technologyStr), previousProcess, nextProcess, process,reportType)); |
| | | map.put("thisProcess", processList); |
| | | break; |
| | | } |
| | |
| | | //查询本工序报工需要哪几层,上工序是什么 |
| | | String obtainTechnology = reportingWorkMapper.SelectWorkTechnologyMp(processIdStr); |
| | | |
| | | map.put("numberList", flowCardMapper.getGlassNumber(technologyStr,processIdStr)); |
| | | map.put("numberList", flowCardMapper.getGlassNumber(splitTechNumbers(technologyStr),processIdStr)); |
| | | |
| | | //判断本工序是不是第一道工序 |
| | | if (interceptProcess.equals(process)) { |
| | | //是第一道工序,查询流程卡数据 |
| | | map.put("Detail", reportingWorkMapper.SelectTechnologicalNumMp(processIdStr, technologyStr, process,reportType)); |
| | | map.put("Detail", reportingWorkMapper.SelectTechnologicalNumMp(processIdStr, splitTechNumbers(technologyStr), process,reportType)); |
| | | } else { |
| | | ReportingWork retrievedData = (ReportingWork) map.get("data"); |
| | | if (retrievedData!=null){ |
| | |
| | | //根据审核状态查询未审核数据 |
| | | // if (reviewedState==1){//已审核 |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess,laminating); |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, splitTechNumbers(technologyStr), process,previousProcess,laminating); |
| | | if(process.equals("中空")){ |
| | | //获取该流程卡订单号 |
| | | String orderId = reportingWorkMapper.selectOrderid(processIdStr); |