|
|
|
@ -155,7 +155,7 @@ public class WarehouseUpdownStockupAreaApiController {
|
|
|
|
|
@ResponseBody |
|
|
|
|
@GetMapping("/upShelfPackageData") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "备货库位上架包条级别扫描接口", notes = "传入trayTypeDTO") |
|
|
|
|
@ApiOperation(value = "查询库位数据", notes = "传入trayTypeDTO") |
|
|
|
|
public R upShelfPackageData(@RequestParam Long allocationId ) { |
|
|
|
|
String method = "###########upShelfScanPackage: "; |
|
|
|
|
log.info(method + "查询库位数据 allocationId={}", allocationId); |
|
|
|
@ -274,7 +274,84 @@ public class WarehouseUpdownStockupAreaApiController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
@PostMapping("/scanZeroStockArticle") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "零担订单扫描接口", notes = "传入trayTypeDTO") |
|
|
|
|
public R scanZeroStockArticle(@RequestBody UpdownTypeDTO updownTypeDTO ) { |
|
|
|
|
String method = "###########scanZeroStockArticle: "; |
|
|
|
|
log.info(method + "零担订单扫描接口 updownTypeDTO={}", updownTypeDTO); |
|
|
|
|
Long allocationId = updownTypeDTO.getAllocationId();//库位编码
|
|
|
|
|
String zeroStockArticleCode = updownTypeDTO.getOrderCode(); |
|
|
|
|
try{ |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if(Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
log.warn(method+"仓库信息不能为空"); |
|
|
|
|
return R.fail(403,"仓库信息不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(StringUtil.isBlank(zeroStockArticleCode)){ |
|
|
|
|
log.warn(method+"扫描异常"+zeroStockArticleCode); |
|
|
|
|
return R.fail(403,"无处理数据"); |
|
|
|
|
} |
|
|
|
|
//查询该库位的货物信息
|
|
|
|
|
return warehouseUpdownStockupAreaService.scanZeroStockArticle(zeroStockArticleCode,myCurrentWarehouse.getId()); |
|
|
|
|
}catch (CustomerException e){ |
|
|
|
|
log.warn(e.message); |
|
|
|
|
return R.fail(e.code,e.message); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error(method+"系统异常,联系管理员",e); |
|
|
|
|
return R.fail(500,"系统异常,联系管理员"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
@PostMapping("/upShelfZeroStockArticle") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "上架库存品维度", notes = "传入trayTypeDTO") |
|
|
|
|
public R upShelfZeroStockArticle(@RequestBody UpdownTypeDTO updownTypeDTO ) { |
|
|
|
|
String method = "###########upShelfZeroStockArticle: "; |
|
|
|
|
log.info(method + "上架零担 updownTypeDTO={}", updownTypeDTO); |
|
|
|
|
Long allocationId = updownTypeDTO.getAllocationId();//库位编码
|
|
|
|
|
List<UpShelfStockDTO> upShelfStockList = updownTypeDTO.getUpShelfStockList(); |
|
|
|
|
try{ |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if(Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
log.warn(method+"仓库信息不能为空"); |
|
|
|
|
return R.fail(403,"仓库信息不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int size = upShelfStockList.size(); |
|
|
|
|
if(size == 0 ){ |
|
|
|
|
log.warn(method+"没有处理的数据"); |
|
|
|
|
return R.fail(403,"无处理数据"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (UpShelfStockDTO dto:upShelfStockList){ |
|
|
|
|
Integer enterNum = dto.getEnterNum(); |
|
|
|
|
if(Objects.isNull(enterNum) || enterNum == 0){ |
|
|
|
|
log.warn(method+"请输入正确的数量"); |
|
|
|
|
return R.fail(403,"请输入正确的数量"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(Objects.isNull(allocationId)){ |
|
|
|
|
log.warn(method+"库位信息不能为空 allocationId={}",allocationId); |
|
|
|
|
return R.fail(403,"库位信息不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//查询该库位的货物信息
|
|
|
|
|
return warehouseUpdownStockupAreaService.upShelfStockList(upShelfStockList,allocationId,myCurrentWarehouse.getId()); |
|
|
|
|
}catch (CustomerException e){ |
|
|
|
|
log.warn(e.message); |
|
|
|
|
return R.fail(e.code,e.message); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error(method+"系统异常,联系管理员",e); |
|
|
|
|
return R.fail(500,"系统异常,联系管理员"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|