| | |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | //获取工序对应的别称 |
| | | String processName = flowCardMapper.getProcessName(processSub); |
| | | //processName.equals("stepC") || processName.equals("stepD") |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空 |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空,流程卡查询合并 |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), |
| | | String.valueOf("null".equals(compound) |
| | | ? flowCard.getTechnologyNumber()//正常层 |
| | |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } else { |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) {//否 |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) {//未启用,配置文件flowCardMerge值为1 |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | |
| | | |
| | | } |
| | | |
| | | } else {//否 |
| | | //流程卡明细数据 |
| | | if (printLike.equals("") || printLike.equals("null")) { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListMerge(flowCard.getProcessId(), printMerge, flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(), flashback, landingSequence); |
| | | itemmap.put("detailList", detailList); |
| | | } else { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), printMerge, flowCard.getProcess(), flashback, landingSequence); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } |
| | | |
| | | //工艺流程 |
| | |
| | | // 判断是否为非空字符串 |
| | | if (orderNumber != null && !orderNumber.trim().isEmpty()) { |
| | | |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi( |
| | | List<Map<String, Object>> customDataSemi =flowCardMapper.getPrintCustomDataSemi( |
| | | flowCard.getProcessId(), |
| | | flowCard.getTechnologyNumber(), |
| | | flowCard.getProcess(), |
| | | flowCard.getOrderNumber(), flowCard.getPrintQuantity() |
| | | )); |
| | | flowCard.getOrderNumber(), flowCard.getPrintQuantity()); |
| | | for (Map<String, Object> dataMap : customDataSemi) { |
| | | dataMap.put("newList", flowCardMapper.getgetPrintCustomDataSemiSp( |
| | | flowCard.getProcessId(), |
| | | dataMap.get("technologyNumber").toString(), |
| | | flowCard.getOrderNumber() |
| | | )); |
| | | } |
| | | itemmap.put("data", customDataSemi); |
| | | } else { |
| | | //用于天津现场流程卡打印界面的小片标签打印 |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemiTj( |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> selectPrintProjectDetailSmallPiece(Map<String, Object> object) throws JsonProcessingException { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String projectNo=object.get("projectNo").toString(); |
| | | String stockIdsStr=object.get("stockId").toString(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | if (stockIdsStr != null && !stockIdsStr.isEmpty()) { |
| | | List<Integer> list = objectMapper.readValue(stockIdsStr, new TypeReference<List<Integer>>() {}); |
| | | map.put("data", flowCardMapper.getPrintProjectDetailsMpSp(projectNo,list)); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | 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>>();//最终结果 |
| | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | //是否是工程明细打印 |
| | | if (detailType == 0) {//工程打印明细 |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(), flowCard.getStockId())); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(), flowCard.getStockId(),flowCard.getPolysId())); |
| | | |
| | | |
| | | } |
| | | //非工程打印 |