|
@@ -265,6 +265,7 @@ public class WcsTaskSubService {
|
|
|
break;
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ log.error("excute callBack exception was happened, taskNo is {}, cause by {}, ", taskNo, e);
|
|
|
throw new BaseException(wcsTask.getTaskNo() + "-----" + "回调状态:" + state + "异常");
|
|
|
}
|
|
|
wcsTask.setState(state.longValue());
|
|
@@ -342,8 +343,10 @@ public class WcsTaskSubService {
|
|
|
String orderNo = wcsTask.getExt1();
|
|
|
List<WmsDocOrderDetails> wmsDocOrderDetailList = iWmsDocOrderDetailsService.selectWmsDocOrderDetailsByOrderNo(orderNo);
|
|
|
WmsDocOrderDetails docOrderDetail = wmsDocOrderDetailList.get(0);
|
|
|
- BigDecimal qtyAllocated = docOrderDetail.getQtyAllocated();
|
|
|
- BigDecimal qtyPicked = docOrderDetail.getQtyPicked();
|
|
|
+ BigDecimal qtyAllocated = ObjectUtil.isNull(docOrderDetail.getQtyAllocated())
|
|
|
+ ? BigDecimal.ZERO : docOrderDetail.getQtyAllocated();
|
|
|
+ BigDecimal qtyPicked = ObjectUtil.isNull(docOrderDetail.getQtyPicked())
|
|
|
+ ? BigDecimal.ZERO : docOrderDetail.getQtyPicked() ;
|
|
|
BigDecimal stillNeedQty = qtyAllocated.subtract(qtyPicked);
|
|
|
|
|
|
Long locationId = StringUtils.isNotBlank(wcsTask.getLocationFrom()) ? Long.parseLong(wcsTask.getLocationFrom()) : -1L;
|
|
@@ -369,7 +372,10 @@ public class WcsTaskSubService {
|
|
|
|
|
|
if (ObjectUtil.equal(Boolean.TRUE, isComplete)) {
|
|
|
updateWmsDocOrderHeader(orderNo, docOrderDetail.getSku());
|
|
|
- }else {
|
|
|
+ if(!StringUtils.equals(Constant.TaskType.RGV.getDesc(), wcsTask.getWhTypeFrom())){
|
|
|
+ turnOffTheUnpacker(docOrderDetail.getSku());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
WmsDocOrderHeader wmsDocOrderHeader = iWmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(orderNo);
|
|
|
// 修改 单头30
|
|
|
wmsDocOrderHeader.setOrderStatus(Constant.ORDER_STS.STS30.getValue());
|
|
@@ -378,6 +384,20 @@ public class WcsTaskSubService {
|
|
|
return AjaxResult.success("success");
|
|
|
}
|
|
|
|
|
|
+ private void turnOffTheUnpacker(String sku) {
|
|
|
+ if (sku.equals("Na2CO3")) {
|
|
|
+ wcsToWmsApiService.turnOffTheUnpacker();
|
|
|
+ } else if (sku.equals("C5H10OS2")) {
|
|
|
+ wcsToWmsApiService.turnOffTheUnpacker1();
|
|
|
+ } else if (sku.equals("(NaPO3)6")) {
|
|
|
+ wcsToWmsApiService.turnOffTheUnpacker2();
|
|
|
+ } else if (sku.equals("(NH4)2SO4")) {
|
|
|
+ wcsToWmsApiService.turnOffTheUnpacker3();
|
|
|
+ } else if (sku.equals("CH3CH2OCS2Na")) {
|
|
|
+ wcsToWmsApiService.turnOffTheUnpacker4();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private Boolean updateWmsDocOrderDetails(WmsDocOrderDetails docOrderDetail) {
|
|
|
return iWmsDocOrderDetailsService.updateWmsDocOrderDetails(docOrderDetail) > 0;
|
|
|
}
|
|
@@ -428,17 +448,6 @@ public class WcsTaskSubService {
|
|
|
WmsDocOrderHeader wmsDocOrderHeader = iWmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(orderNo);
|
|
|
wmsDocOrderHeader.setOrderStatus(Constant.ORDER_STS.STS40.getValue());
|
|
|
iWmsDocOrderHeaderService.updateWmsDocOrderHeader(wmsDocOrderHeader);
|
|
|
- if (sku.equals("Na2CO3")) {
|
|
|
- wcsToWmsApiService.turnOffTheUnpacker();
|
|
|
- } else if (sku.equals("C5H10OS2")) {
|
|
|
- wcsToWmsApiService.turnOffTheUnpacker1();
|
|
|
- } else if (sku.equals("(NaPO3)6")) {
|
|
|
- wcsToWmsApiService.turnOffTheUnpacker2();
|
|
|
- } else if (sku.equals("(NH4)2SO4")) {
|
|
|
- wcsToWmsApiService.turnOffTheUnpacker3();
|
|
|
- } else if (sku.equals("CH3CH2OCS2Na")) {
|
|
|
- wcsToWmsApiService.turnOffTheUnpacker4();
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|