| | |
| | | import java.io.IOException; |
| | | |
| | | |
| | | import java.sql.Date; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.IntStream; |
| | |
| | | } |
| | | //将原来已报工的数据更新 |
| | | if (resultList != null && !resultList.isEmpty()) { |
| | | for (OrderProcessDetail d : resultList) { |
| | | flowCardMapper.updateOrderProcessDetail(d.getProcessId(),d.getOrderNumber(),d.getTechnologyNumber(), |
| | | d.getReportingWorkNumCount(),d.getReportingWorkNum(),d.getBrokenNum(),d.getProcess()); |
| | | |
| | | for (String number : numberList) { |
| | | for (OrderProcessDetail d : resultList) { |
| | | flowCardMapper.updateOrderProcessDetail(d.getProcessId(),number,d.getTechnologyNumber(), |
| | | d.getReportingWorkNumCount(),d.getReportingWorkNum(),d.getBrokenNum(),d.getProcess()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return true; |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | public boolean getNewProcessSv(String processId, String orderNumber, String technologyNumber, List<String> orderProcess) { |
| | | |
| | | // 获取最新报工工序 |
| | | List<Map<String, Object>> newProcess = flowCardMapper.getNewProcessMp(processId, orderNumber, technologyNumber); |
| | | |
| | | if (newProcess == null || newProcess.isEmpty()) { |
| | | return false; // 找不到标准值 |
| | | } |
| | | |
| | | // 最新工序排序号 |
| | | int standardSort = Integer.parseInt(newProcess.get(0).get("sort").toString()); |
| | | |
| | | // 循环 orderProcess 的每一个工序,查询它们的 sort |
| | | for (String processName : orderProcess) { |
| | | Map<String, Object> data = flowCardMapper.getProcessInfo(processName); |
| | | |
| | | if (data == null) { |
| | | return false; // 工序查不到 |
| | | } |
| | | int orderSort = Integer.parseInt(data.get("sort").toString()); |
| | | // orderSort 必须 > standardSort |
| | | if (orderSort <= standardSort) { |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |