|
|
|
@ -1825,4 +1825,83 @@ public class CarsLoadController {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
@PostMapping("/signPackage") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "签收包件", notes = "传入loadCarsDTO") |
|
|
|
|
public R signPackage(@RequestBody LoadCarsDTO loadCarsDTO) { |
|
|
|
|
String method = "############signPackage: "; |
|
|
|
|
log.info(method + "请求参数{}", loadCarsDTO); |
|
|
|
|
Long signOrderId = loadCarsDTO.getSignOrderId(); |
|
|
|
|
String orderPackageCode = loadCarsDTO.getOrderPackageCode(); |
|
|
|
|
try{ |
|
|
|
|
|
|
|
|
|
//当前登录人选择的仓库
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if(Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); |
|
|
|
|
return R.fail(405,"仓库信息为空"); |
|
|
|
|
} |
|
|
|
|
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
if(Objects.isNull(signOrderId)){ |
|
|
|
|
log.warn(method+"签收单Id为空 signOrderId={}",signOrderId); |
|
|
|
|
return R.fail(405,"签收单Id为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(StringUtil.isBlank(orderPackageCode)){ |
|
|
|
|
log.warn(method+"包件码为空 orderPackageCode={}",orderPackageCode); |
|
|
|
|
return R.fail(405,"包件码为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return carsLoadService.signScanPackageCode(signOrderId,orderPackageCode,"PC签收"); |
|
|
|
|
}catch (CustomerException e){ |
|
|
|
|
log.error(e.message,e); |
|
|
|
|
return R.fail(e.code,e.message); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error(method+"系统异常",e); |
|
|
|
|
return R.fail(500,"系统异常"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
@PostMapping("/signZero") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "签收零担", notes = "传入loadCarsDTO") |
|
|
|
|
public R signZero(@RequestBody LoadCarsDTO loadCarsDTO) { |
|
|
|
|
String method = "############signZero: "; |
|
|
|
|
log.info(method + "请求参数{}", loadCarsDTO); |
|
|
|
|
Long signOrderId = loadCarsDTO.getSignOrderId(); |
|
|
|
|
Long carsLoadScanId = loadCarsDTO.getCarsLoadScanId(); |
|
|
|
|
Integer enterNum = loadCarsDTO.getEnterNum(); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
|
|
//当前登录人选择的仓库
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if(Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); |
|
|
|
|
return R.fail(405,"仓库信息为空"); |
|
|
|
|
} |
|
|
|
|
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
if(Objects.isNull(signOrderId)){ |
|
|
|
|
log.warn(method+"签收单Id为空 signOrderId={}",signOrderId); |
|
|
|
|
return R.fail(405,"签收单Id为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(Objects.isNull(carsLoadScanId)){ |
|
|
|
|
log.warn(method+"签收零担id为空 carsLoadScanId={}",carsLoadScanId); |
|
|
|
|
return R.fail(405,"签收零担id为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return carsLoadService.signZeroOrder(signOrderId,carsLoadScanId,enterNum,"PC录入签收"); |
|
|
|
|
}catch (CustomerException e){ |
|
|
|
|
log.error(e.message,e); |
|
|
|
|
return R.fail(e.code,e.message); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error(method+"系统异常",e); |
|
|
|
|
return R.fail(500,"系统异常"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|