| | |
| | | for (WrkMast m : wrkMast) { |
| | | if (m == null) { continue; } |
| | | if (Objects.equals(m.getWrkSts(), 11L)) { |
| | | if ("Y".equalsIgnoreCase(m.getPauseMk())) { |
| | | continue; |
| | | } |
| | | if (requiresOutboundErpConfirm(m) && !"Y".equalsIgnoreCase(m.getPdcType())) { |
| | | continue; |
| | | } |
| | | if (m.getUpdMk() != null && "WCS_SENT".equalsIgnoreCase(m.getUpdMk())) { |
| | | continue; |
| | | } |
| | |
| | | if (m.getIoPri() != null) { |
| | | t.put("taskPri", m.getIoPri().intValue()); |
| | | } |
| | | t.put("batchSeq", m.getPltType()); |
| | | if (m.getUserNo() != null) { |
| | | // 7.11:seq=0 表示无序,WCS 下发不传 batch 和 batchSeq。 |
| | | if (m.getPltType() != null && m.getPltType() > 0) { |
| | | t.put("batchSeq", m.getPltType()); |
| | | } |
| | | if (m.getPltType() != null && m.getPltType() > 0 && m.getUserNo() != null) { |
| | | t.put("batch", m.getUserNo()); |
| | | } |
| | | tasks.add(t); |
| | |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private boolean requiresOutboundErpConfirm(WrkMast wrkMast) { |
| | | Integer ioType = wrkMast == null ? null : wrkMast.getIoType(); |
| | | return ioType != null && (ioType == 101 || ioType == 103 || ioType == 104 || ioType == 107 || ioType == 110); |
| | | } |
| | | } |