|
@@ -20,6 +20,7 @@ import com.github.zuihou.business.externalApi.entity.WmsAgvInfoDetail;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.OrderMapper;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.Order;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ZZoneProductionresourceMapper;
|
|
|
+import com.github.zuihou.business.util.AgvParamNormalizer;
|
|
|
import com.github.zuihou.business.util.MsgUtil;
|
|
|
import com.github.zuihou.business.wms.ApiCallLog;
|
|
|
import com.github.zuihou.business.wms.WmsTransferTask;
|
|
@@ -79,7 +80,7 @@ public class WmsTransferTaskServiceImpl extends SuperCacheServiceImpl<WmsTransfe
|
|
|
private ZZoneProductionresourceMapper zZoneProductionresourceMapper;
|
|
|
@Autowired
|
|
|
private ApiCallLogService apiCallLogService;
|
|
|
- @Value("${hz.wms}")
|
|
|
+ @Value("${hz.wms.inTask}")
|
|
|
private String url;
|
|
|
|
|
|
@Autowired
|
|
@@ -135,13 +136,33 @@ public class WmsTransferTaskServiceImpl extends SuperCacheServiceImpl<WmsTransfe
|
|
|
q.put("storgeId", from.getId());
|
|
|
List<StockInfo> stockList = Optional.ofNullable(stockInfoMapper.getListByGoodsId(q))
|
|
|
.orElse(Collections.emptyList());
|
|
|
-
|
|
|
- List<WmsMaterialDto> matList = new ArrayList<>(stockList.size());
|
|
|
- for (StockInfo vo : stockList) {
|
|
|
+ // trayNo
|
|
|
+ String trayNo = stockList.stream()
|
|
|
+ .filter(s -> "1".equals(s.getGoodsType()))
|
|
|
+ .map(StockInfo::getBrandNo) // 假设 trayNo 存在于 goodsCode 字段
|
|
|
+ .findFirst()
|
|
|
+ .orElse(null);
|
|
|
+
|
|
|
+ // boxNo
|
|
|
+ String boxNo = stockList.stream()
|
|
|
+ .filter(s -> "7".equals(s.getGoodsType()))
|
|
|
+ .map(StockInfo::getBrandNo) // 假设 boxNo 存在于 goodsCode 字段
|
|
|
+ .findFirst()
|
|
|
+ .orElse(null);
|
|
|
+
|
|
|
+ // 过滤掉 1 和 7
|
|
|
+ List<StockInfo> otherList = stockList.stream()
|
|
|
+ .filter(s -> "1".equals(s.getGoodsType()) && "7".equals(s.getGoodsType()))
|
|
|
+ .collect(java.util.stream.Collectors.toList());
|
|
|
+
|
|
|
+ List<WmsMaterialDto> matList = new ArrayList<>(otherList.size());
|
|
|
+ for (StockInfo vo : otherList) {
|
|
|
WmsMaterialDto dto = new WmsMaterialDto();
|
|
|
dto.setMaterialName(vo.getBrandName());
|
|
|
dto.setMaterialCode(vo.getBrandNo());
|
|
|
dto.setQuantity(vo.getNum());
|
|
|
+ dto.setTrayNo(trayNo);
|
|
|
+ dto.setBoxNo(boxNo);
|
|
|
matList.add(dto);
|
|
|
}
|
|
|
|