|
|
|
@ -1740,4 +1740,40 @@ public class OpenOrderController {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
@PostMapping("/createOrderPackage") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "创建订单包件", notes = "传入openOrderDTO") |
|
|
|
|
public R createOrderPackage(@RequestBody AdvanceDTO advanceDTO) { |
|
|
|
|
String method = "############createOrderPackage: "; |
|
|
|
|
log.info(method + "请求参数{}", advanceDTO); |
|
|
|
|
Long advanceId = advanceDTO.getAdvanceId(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if(Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
log.warn(method+"没有选择仓库 myCurrentWarehouse={}",myCurrentWarehouse); |
|
|
|
|
return R.fail(405,"多仓权限无法操作,请选择仓库"); |
|
|
|
|
} |
|
|
|
|
advanceDTO.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(Objects.isNull(advanceId)){ |
|
|
|
|
log.warn(method+"暂存单id不能为空 advanceId={}",advanceId); |
|
|
|
|
return R.fail(405,"暂存单id不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return openOrderService.createOrderPackage(advanceDTO); |
|
|
|
|
}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,"系统异常"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|