| | |
| | | map.put("data", flowCardMapper.getPrintLabel(projectNo)); |
| | | } else if (Objects.equals(type, "2")) { |
| | | map.put("data", flowCardMapper.getPrintLabel2(projectNo)); |
| | | } else if (Objects.equals(type, "3")) { |
| | | map.put("data", flowCardMapper.getPrintLabel3(projectNo)); |
| | | } |
| | | |
| | | return map; |
| | |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(),flowCard.getOrderNumber())); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getPrintQuantity())); |
| | | list.add(itemmap); |
| | | |
| | | // 将该 processId 加入已处理集合 |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getPrintCustomDataProjectNoDetailSv(String type, Map<String, Object> object) { |
| | | public Map<String, Object> getPrintCustomDataProjectNoDetailSv(String type, Integer detailType, Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(),flowCard.getStockId())); |
| | | if (detailType==0){ |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(),flowCard.getStockId())); |
| | | |
| | | } |
| | | else if (detailType==1) { |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProject(flowCard.getProjectNo())); |
| | | |
| | | } |
| | | else { |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProject(flowCard.getProjectNo())); |
| | | |
| | | } |
| | | list.add(itemmap); |
| | | } |
| | | } |
| | |
| | | map.put("title", flowCardMapper.getPrintTitle(type)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updateProcessSv(String processId, String technologyNumber, String orderId, String Orderprocess, Map<String, Object> object) { |
| | | |
| | | //判断该流程卡是否报工 |
| | | Integer count = flowCardMapper.reportingWorkCount(processId); |
| | | if (count == 0) { |
| | | //删除小片工艺表对应的数据 |
| | | flowCardMapper.deleteProcessMp(processId,technologyNumber); |
| | | //重新插入修改好工艺流程卡的数据 |
| | | List<String> newCraftList = (List<String>) object.get("newCraft"); |
| | | List<String> numberList = (List<String>) object.get("technologyNumber"); |
| | | // 判断 newCraftList 是否为空 |
| | | if (newCraftList != null) { |
| | | for (String number : numberList) { |
| | | //修改订单小片表工艺流程 |
| | | flowCardMapper.updateOrderProcessMp(orderId,number,technologyNumber,Orderprocess); |
| | | for (String process : newCraftList) { |
| | | flowCardMapper.updateProcessMp(processId,technologyNumber,process,number); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |