|
@@ -192,6 +192,10 @@ public class WmspOutboundResultController extends BaseRESTfulController {
|
|
int isScan = wmspOutboundResultService.ExistScanResult(subResultMaterial);
|
|
int isScan = wmspOutboundResultService.ExistScanResult(subResultMaterial);
|
|
//判断物资是否是需要出库的物资,需要出库物资数量不等于0,通过物资唯一编码和出库实绩
|
|
//判断物资是否是需要出库的物资,需要出库物资数量不等于0,通过物资唯一编码和出库实绩
|
|
Map<String,Object> materialMap = wmspOutboundResultMaterialService.isOutboundResultMaterial(MaterialOnlyCode,resultId);
|
|
Map<String,Object> materialMap = wmspOutboundResultMaterialService.isOutboundResultMaterial(MaterialOnlyCode,resultId);
|
|
|
|
+ if (materialMap==null){
|
|
|
|
+ //物质类型错误
|
|
|
|
+ return failed(-4);
|
|
|
|
+ }
|
|
Integer materialNumber= Integer.valueOf(materialMap.get("materailNumber").toString());
|
|
Integer materialNumber= Integer.valueOf(materialMap.get("materailNumber").toString());
|
|
//获得已经扫描的物质数量
|
|
//获得已经扫描的物质数量
|
|
int scanCount = wmspOutboundScanResultService.getScanCount(MaterialOnlyCode,resultId);
|
|
int scanCount = wmspOutboundScanResultService.getScanCount(MaterialOnlyCode,resultId);
|
|
@@ -208,17 +212,19 @@ public class WmspOutboundResultController extends BaseRESTfulController {
|
|
int status= wmspOutboundResultService.createOutboundScanResult(subResultMaterial,personnelId,resultId,(BigDecimal)map1.get("inboundResultId"),new BigDecimal(materialMap.get("resultMaterialId").toString()));
|
|
int status= wmspOutboundResultService.createOutboundScanResult(subResultMaterial,personnelId,resultId,(BigDecimal)map1.get("inboundResultId"),new BigDecimal(materialMap.get("resultMaterialId").toString()));
|
|
return success(status);
|
|
return success(status);
|
|
}else {
|
|
}else {
|
|
- if (isScan>0){
|
|
|
|
- //重复扫描
|
|
|
|
- return failed(-1);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
if (list.size()==0){
|
|
if (list.size()==0){
|
|
//没有入库
|
|
//没有入库
|
|
return failed(-2);
|
|
return failed(-2);
|
|
}else {
|
|
}else {
|
|
|
|
+ if (isScan>0){
|
|
|
|
+ //重复扫描
|
|
|
|
+ return failed(-1);
|
|
|
|
+ }
|
|
//货物已满
|
|
//货物已满
|
|
return failed(-3);
|
|
return failed(-3);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -447,7 +453,7 @@ public class WmspOutboundResultController extends BaseRESTfulController {
|
|
if(result == 2){
|
|
if(result == 2){
|
|
return success(2,"该订单已出库");
|
|
return success(2,"该订单已出库");
|
|
}
|
|
}
|
|
- return success();
|
|
|
|
|
|
+ return failed(result);
|
|
}
|
|
}
|
|
@ApiOperation(value = "出库(非0:成功,0:失败)")
|
|
@ApiOperation(value = "出库(非0:成功,0:失败)")
|
|
@PostMapping("/outbountResultToSuccess2")
|
|
@PostMapping("/outbountResultToSuccess2")
|