Browse Source

1.修复订单没有商场id问题

training
zhenghaoyu 2 years ago
parent
commit
6df722b9c4
  1. 1
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  2. 24
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java
  3. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java
  4. 38
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

1
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -440,6 +440,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
logger.info("订单同步出现的客户编号{} 匹配的客户", basicdataClientEntity);
if (!Objects.isNull(basicdataClientEntity)) {
//商城
distributionStockArticleEntity.setMallId(basicdataClientEntity.getId());
distributionStockArticleEntity.setMallName(basicdataClientEntity.getClientName());
distributionStockArticleEntity.setMallCode(basicdataClientEntity.getClientCode());

24
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java

@ -505,6 +505,30 @@ public class WarehouseUpdownTypeApiController {
}
}
@ResponseBody
@PostMapping("/downScanTrayCode")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "下架扫描托盘", notes = "传入trayTypeDTO")
public R downScanTrayCode(@RequestBody UpdownTypeDTO updownTypeDTO ) {
String method = "###########downScanTrayCode: ";
log.info(method + "下架扫描托盘 downScanTrayCode={}", updownTypeDTO);
String trayCode = updownTypeDTO.getTrayCode();
try{
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
}
//查询该库位的货物信息
return warehouseUpdownTypeService.downScanTrayCode(trayCode);
}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("/downTrayCode")
@ApiOperationSupport(order = 1)

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java

@ -59,4 +59,6 @@ public interface IWarehouseUpdownTypeService extends BaseService<WarehouseUpdown
R moveAllocationScanTrayCode(String trayCode);
R moveAllocationByTrayCode(String trayCode, Long allocationId);
R downScanTrayCode(String trayCode);
}

38
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -1191,6 +1191,44 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
return R.success("移库成功");
}
@Override
public R downScanTrayCode(String trayCode) {
BasicdataTrayEntity trayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);//托盘信息
if(Objects.isNull(trayEntity)){
log.warn("#################findUpShelfScanGoods: 托盘信息不存在 trayCode={}",trayCode);
throw new CustomerException(403,"托盘信息不存在");
}
Long allocationId = warehouseTaryAllocationService.getAllocationIdByTrayId(trayEntity.getId());
if (Objects.isNull(allocationId)){
log.warn("#################findUpShelfScanGoods: 托盘未上架 trayCode={}",trayCode);
throw new CustomerException(403,"托盘未上架");
}
Long trayId = trayEntity.getId();
QueryWrapper<WarehouseTrayTypeEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("tray_id",trayId)
.eq("is_deleted",0);
WarehouseTrayTypeEntity trayTypeEntity = warehouseTrayTypeService.getOne(queryWrapper);
if(Objects.isNull(trayTypeEntity)){
log.warn("#################findUpShelfScanGoods: 托盘没有货物信息 trayCode={}",trayCode);
throw new CustomerException(403,"托盘没有货物信息");
}
Long trayTypeId = trayTypeEntity.getId();//打托方式id
String type = trayTypeEntity.getType();//打托分类
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
return R.data(listByTrayTypeId);
}
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark) {
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>();
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){

Loading…
Cancel
Save