| | |
| | | if (printMerge.equals("") || printMerge.equals("null")) { |
| | | //是否包含切割 |
| | | //boolean containsCutting = flowCard.getProcess().contains("切割"); |
| | | String processSub = flowCard.getProcess().substring(0, 2); |
| | | String processSub = flowCard.getProcess().split("->")[0]; |
| | | //获取工序对应的别称 |
| | | String processName = flowCardMapper.getProcessName(processSub); |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空 |
| | |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("composing")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | flowCardMapper.updateComposing(flowCard.getProcessId()); |
| | | //先获取排版状态 |
| | | Integer layoutStatus = flowCardMapper.getLayoutStatus(flowCard.getProcessId()); |
| | | //2优化占用 |
| | | if (layoutStatus!=2){ |
| | | flowCardMapper.updateComposing(flowCard.getProcessId()); |
| | | } |
| | | else { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | //保存日志 |
| | | Log log = new Log(); |
| | | log.setContent(object.toString()); |
| | | log.setFunction("FlowCardSv流程卡排版状态"); |
| | | log.setOperatorId((String) object.get("userId")); |
| | | log.setOperator((String) object.get("userName")); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | |
| | | |
| | | public Map<String, Object> getSelectPrintCustomLabelSv(String type, Integer lableType, Map<String, Object> object) { |
| | | String isRepeat = object.get("isRepeat").toString(); |
| | | //根据mse传过来的值,如果不存在 赋值false |
| | | String isRepeat = Optional.ofNullable(object.get("isRepeat")) |
| | | .map(Object::toString) |
| | | .orElse("false"); |
| | | 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); |
| | |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity())); |
| | | list.add(itemmap); |
| | | |
| | | Integer sumQuantity = flowCardMapper.getSumQuantity(flowCard.getOrderId()); |
| | | List<Map<String, Object>> details = flowCardMapper.getPrintCustomData(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity()); |
| | | |
| | | for (Map<String, Object> detail : details) { |
| | | detail.put("sumQuantity", sumQuantity); |
| | | } |
| | | |
| | | itemmap.put("data", details); |
| | | list.add(itemmap); |
| | | // 将该 processId 加入已处理集合 |
| | | processedKeys.add(uniqueKey); |
| | | } |
| | |
| | | List<LocalDate> date= (List<LocalDate>) dates.get("date"); |
| | | return flowCardMapper.exportDateProcessMp(date); |
| | | } |
| | | |
| | | public Map<String, Object> selectSortingCardSv(String orderId, String productionId, String flashback, String optionVal, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectSortingCardMp(orderId, productionId,flashback,optionVal, flowCard)); |
| | | map.put("maxFlowCard", flowCardMapper.selectMaxFlowCard(orderId, productionId)); |
| | | map.put("orderOtherMoney", flowCardMapper.selectorderOtherMoney()); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |