|
@@ -112,7 +112,6 @@ public class WmsDocOrderSubService {
|
|
|
|
|
|
|
|
|
|
BaseSku baseSku = iBaseSkuService.selectBaseSkuByCustomerId(Constant.CUSTOMER_ID, list.get(0).getSku());
|
|
BaseSku baseSku = iBaseSkuService.selectBaseSkuByCustomerId(Constant.CUSTOMER_ID, list.get(0).getSku());
|
|
-
|
|
|
|
String pallentNo = baseLocationLotattVO1.getLotattVO().getLotatt07();
|
|
String pallentNo = baseLocationLotattVO1.getLotattVO().getLotatt07();
|
|
String locationFrom = baseLocationLotattVO1.getLocationNo();
|
|
String locationFrom = baseLocationLotattVO1.getLocationNo();
|
|
String wcsNo = "wcs" + wcsTaskSubService.generateTaskNo();//生成唯一标识wcsno
|
|
String wcsNo = "wcs" + wcsTaskSubService.generateTaskNo();//生成唯一标识wcsno
|
|
@@ -122,9 +121,14 @@ public class WmsDocOrderSubService {
|
|
String Z = baseLocationLotattVO1.getShiftNo();
|
|
String Z = baseLocationLotattVO1.getShiftNo();
|
|
String X = baseLocationLotattVO1.getRowIndex();
|
|
String X = baseLocationLotattVO1.getRowIndex();
|
|
String sku = baseLocationLotattVO1.getSku();
|
|
String sku = baseLocationLotattVO1.getSku();
|
|
-
|
|
|
|
- // 生成四向车出库任务
|
|
|
|
- AjaxResult ajaxResult = wcsTaskSubService.addWcsOutTask(locationFrom, Constant.LOC_SORTATION_CACHE.toString(), orderNo, pallentNo, wcsNo);
|
|
|
|
|
|
+ AjaxResult ajaxResult = new AjaxResult();
|
|
|
|
+ if (sku.equals("C4H9O2PSSNH4")) {
|
|
|
|
+ // 生成四向车出库任务
|
|
|
|
+ ajaxResult = wcsTaskSubService.addWcsOutTask(locationFrom, Constant.DRUM_CONNECTORS.toString(), orderNo, pallentNo, wcsNo);
|
|
|
|
+ } else {
|
|
|
|
+ // 生成四向车出库任务
|
|
|
|
+ ajaxResult = wcsTaskSubService.addWcsOutTask(locationFrom, Constant.LOC_SORTATION_CACHE.toString(), orderNo, pallentNo, wcsNo);
|
|
|
|
+ }
|
|
//调用出库任务下发接口
|
|
//调用出库任务下发接口
|
|
OutTaskForm outTaskForm = new OutTaskForm();
|
|
OutTaskForm outTaskForm = new OutTaskForm();
|
|
String taskNo = ajaxResult.get("data").toString();
|
|
String taskNo = ajaxResult.get("data").toString();
|
|
@@ -136,19 +140,21 @@ public class WmsDocOrderSubService {
|
|
outTaskForm.setMaterial(Integer.valueOf(baseSku.getDesc2()));
|
|
outTaskForm.setMaterial(Integer.valueOf(baseSku.getDesc2()));
|
|
outTaskForm.setTotal(qty.intValue());
|
|
outTaskForm.setTotal(qty.intValue());
|
|
outTaskForm.setDocNo(orderNo);
|
|
outTaskForm.setDocNo(orderNo);
|
|
- List<OutTaskForm.Dest> dests = new ArrayList<>();
|
|
|
|
- OutTaskForm.Dest dest = new OutTaskForm.Dest();
|
|
|
|
- dest.setDest(Integer.parseInt(wmsDocOrderHeader.getSoReference3()));
|
|
|
|
- if (orderNum <= qty.intValue()) {
|
|
|
|
- allocateQuantities = orderNum;
|
|
|
|
- dest.setNum(allocateQuantities);
|
|
|
|
- } else if (orderNum > qty.intValue()) {
|
|
|
|
- allocateQuantities = qty.intValue();
|
|
|
|
- orderNum = orderNum-qty.intValue();
|
|
|
|
- dest.setNum(allocateQuantities);
|
|
|
|
|
|
+ if (Integer.valueOf(baseSku.getSkuType()) ==2){
|
|
|
|
+ List<OutTaskForm.Dest> dests = new ArrayList<>();
|
|
|
|
+ OutTaskForm.Dest dest = new OutTaskForm.Dest();
|
|
|
|
+ dest.setDest(Integer.parseInt(wmsDocOrderHeader.getSoReference3()));
|
|
|
|
+ if (orderNum <= qty.intValue()) {
|
|
|
|
+ allocateQuantities = orderNum;
|
|
|
|
+ dest.setNum(allocateQuantities);
|
|
|
|
+ } else if (orderNum > qty.intValue()) {
|
|
|
|
+ allocateQuantities = qty.intValue();
|
|
|
|
+ orderNum = orderNum - qty.intValue();
|
|
|
|
+ dest.setNum(allocateQuantities);
|
|
|
|
+ }
|
|
|
|
+ dests.add(dest);
|
|
|
|
+ outTaskForm.setDests(dests);
|
|
}
|
|
}
|
|
- dests.add(dest);
|
|
|
|
- outTaskForm.setDests(dests);
|
|
|
|
WcsResponseVo wcsResponseVo = wmsToWcsApiService.wmsOutTask(outTaskForm);
|
|
WcsResponseVo wcsResponseVo = wmsToWcsApiService.wmsOutTask(outTaskForm);
|
|
if (!wcsResponseVo.isSuccess()) {
|
|
if (!wcsResponseVo.isSuccess()) {
|
|
con = false;
|
|
con = false;
|
|
@@ -229,8 +235,8 @@ public class WmsDocOrderSubService {
|
|
List<BaseLocationLotattVO> baseLocationLotattVOS2 = new ArrayList<>();
|
|
List<BaseLocationLotattVO> baseLocationLotattVOS2 = new ArrayList<>();
|
|
for (int i = 0; i < baseLocationLotattVOS.size(); i++) {
|
|
for (int i = 0; i < baseLocationLotattVOS.size(); i++) {
|
|
BaseLocationLotattVO baseLocationLotattVO = baseLocationLotattVOS.get(i);
|
|
BaseLocationLotattVO baseLocationLotattVO = baseLocationLotattVOS.get(i);
|
|
- BaseLocationLotattVO baseLocationLotattVO1 = baseLocationInfoService.checkTheSameColumnLocation1(baseLocationLotattVO,baseLocationLotattVOS2);
|
|
|
|
- if (baseLocationLotattVO1!=null){
|
|
|
|
|
|
+ BaseLocationLotattVO baseLocationLotattVO1 = baseLocationInfoService.checkTheSameColumnLocation1(baseLocationLotattVO, baseLocationLotattVOS2);
|
|
|
|
+ if (baseLocationLotattVO1 != null) {
|
|
baseLocationLotattVOS2.add(baseLocationLotattVO1);
|
|
baseLocationLotattVOS2.add(baseLocationLotattVO1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -285,19 +291,19 @@ public class WmsDocOrderSubService {
|
|
wmsDocOrderHeader.setSoReference2(asnNo);
|
|
wmsDocOrderHeader.setSoReference2(asnNo);
|
|
wmsDocOrderHeader.setOrderStatus(Constant.ORDER_STS.STS00.getValue());
|
|
wmsDocOrderHeader.setOrderStatus(Constant.ORDER_STS.STS00.getValue());
|
|
wmsDocOrderHeader.setOrderType(Constant.ORDER_TYP.YK.getValue());
|
|
wmsDocOrderHeader.setOrderType(Constant.ORDER_TYP.YK.getValue());
|
|
- if (wmsDocAsnDetails.get(0).getSku().equals("Na2CO3")){
|
|
|
|
|
|
+ if (wmsDocAsnDetails.get(0).getSku().equals("Na2CO3")) {
|
|
wmsDocOrderHeader.setSoReference3("1");
|
|
wmsDocOrderHeader.setSoReference3("1");
|
|
}
|
|
}
|
|
- if (wmsDocAsnDetails.get(0).getSku().equals("C5H10OS2")){
|
|
|
|
|
|
+ if (wmsDocAsnDetails.get(0).getSku().equals("C5H10OS2")) {
|
|
wmsDocOrderHeader.setSoReference3("2");
|
|
wmsDocOrderHeader.setSoReference3("2");
|
|
}
|
|
}
|
|
- if (wmsDocAsnDetails.get(0).getSku().equals("(NaPO3)6")){
|
|
|
|
|
|
+ if (wmsDocAsnDetails.get(0).getSku().equals("(NaPO3)6")) {
|
|
wmsDocOrderHeader.setSoReference3("3");
|
|
wmsDocOrderHeader.setSoReference3("3");
|
|
}
|
|
}
|
|
- if (wmsDocAsnDetails.get(0).getSku().equals("(NH4)2SO4")){
|
|
|
|
|
|
+ if (wmsDocAsnDetails.get(0).getSku().equals("(NH4)2SO4")) {
|
|
wmsDocOrderHeader.setSoReference3("4");
|
|
wmsDocOrderHeader.setSoReference3("4");
|
|
}
|
|
}
|
|
- if (wmsDocAsnDetails.get(0).getSku().equals("CH3CH2OCS2Na")){
|
|
|
|
|
|
+ if (wmsDocAsnDetails.get(0).getSku().equals("CH3CH2OCS2Na")) {
|
|
wmsDocOrderHeader.setSoReference3("5");
|
|
wmsDocOrderHeader.setSoReference3("5");
|
|
}
|
|
}
|
|
wmsDocOrderHeader.setCreateTime(new Date());
|
|
wmsDocOrderHeader.setCreateTime(new Date());
|