Browse Source

1.bug修复

2.无数据库存品打托bug修复
dist.1.3.0
zhenghaoyu 9 months ago
parent
commit
9178be12ae
  1. 3
      blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java
  2. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java
  3. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java
  4. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  5. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java
  6. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java
  7. 104
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  8. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/IncomingController.java
  9. 54
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  10. 16
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java
  11. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  12. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  13. 51
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
  14. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  15. 255
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  16. 27
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java
  17. 15
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/NoDataStockListDTO.java
  18. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/TrayTypeDTO.java
  19. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml
  20. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java
  21. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/AsyncDataServiceImpl.java
  22. 133
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  23. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java
  24. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

3
blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java

@ -15,7 +15,8 @@ public enum IncomingTypeEnum {
UNLOAD_TRAY_INCOMING(8, "托盘卸车入库"),
UNLOAD_TRAY_ONE(9, "卸分一体"),
OPEN_TO_IN(10, "开单及入库"),
FACTORY_TO_INCOMING(11, "工厂推送数据入库");
FACTORY_TO_INCOMING(11, "工厂推送数据入库"),
SUPPLE_INCOMING(12, "数据补录入库");
private Integer code;

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java

@ -25,6 +25,7 @@ public class CarsLoadAllOrderVO implements Serializable {
private String goodsName;//货物名称
private String customerTrain;//客户车次号
private String remark;//备注好
private Integer orderNum;//订单件数
private Integer totalNum;//总件数
private Integer stockNum;//在库件数
private Integer planNum;//计划件数

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java

@ -11,6 +11,9 @@ public class TrunklineLoadSignOrderVO extends TrunklineLoadSignOrderEntity {
private String driverName;
private String carsNo;
private String carsLineName;
private String carNumber;
private String driverMobile;
private List<TrunklineLoadSignPhotoEntity> signPhotoList;

12
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -98,6 +98,18 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
return r;
}
}
}else if("4".equals(abnormalType)){
Integer dealType = abnormalRecordDTO.getDealType();
Long carsLoadScanId = abnormalRecordEntity.getAssociationId();
if(dealType.equals(3)){
//本车次少货
abnormalRecordEntity.setRemark("本车次少货("+upWarehouseName+" "+AuthUtil.getNickName()+")");
}else if(dealType.equals(4)){
//已入库
abnormalRecordEntity.setRemark("已入库("+upWarehouseName+" "+AuthUtil.getNickName()+")");
}
}
abnormalRecordEntity.setAbnormalStatus(1);
abnormalRecordEntity.setDealTime(new Date());

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java

@ -897,7 +897,7 @@ public class CarsLoadApiController {
return R.fail(405,"包件码为空");
}
return carsLoadService.signScanPackageCode(signOrderId,orderPackageCode,"PDA扫码签收");
return carsLoadService.signScanPackageCode(signOrderId,orderPackageCode,"PDA扫码签收",loadCarsDTO.getWarehouseId());
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

18
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java

@ -51,7 +51,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
billladingDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -110,7 +110,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
billladingDTO.setWarehouseId(myCurrentWarehouse.getId());
billladingDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -187,7 +187,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
billladingDTO.setWarehouseId(myCurrentWarehouse.getId());
billladingDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -257,7 +257,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(type)){
@ -295,7 +295,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(billladingId)){
log.warn(method+"提货单id不能为空 billladingId={}",billladingId);
@ -334,7 +334,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
billladingDTO.setWarehouseId(myCurrentWarehouse.getId());
billladingDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -370,7 +370,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
billladingDTO.setWarehouseId(myCurrentWarehouse.getId());
billladingDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -406,7 +406,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
billladingDTO.setWarehouseId(myCurrentWarehouse.getId());
billladingDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -442,7 +442,7 @@ public class BillladingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
billladingDTO.setWarehouseId(myCurrentWarehouse.getId());
billladingDTO.setWarehouseName(myCurrentWarehouse.getName());

104
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -105,7 +105,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
verifySaveNewCarsLoad(carsLoadDTO);
@ -135,7 +135,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
@ -178,7 +178,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
@ -250,7 +250,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
// if(Objects.isNull(loadId)){
@ -284,7 +284,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -322,7 +322,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -389,7 +389,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(carsOrderId)){
@ -430,7 +430,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(StringUtil.isBlank(carsOrderIds)){
@ -464,7 +464,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -503,7 +503,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -539,7 +539,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(carsOrderId)){
@ -745,7 +745,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -794,7 +794,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -830,7 +830,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -875,7 +875,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -921,7 +921,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -968,7 +968,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
log.warn(method + "仓库信息为空 myCurrentWarehouse={}", myCurrentWarehouse);
return R.fail(405, "仓库信息为空");
return R.fail(405, "多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1031,7 +1031,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
log.warn(method + "仓库信息为空 myCurrentWarehouse={}", myCurrentWarehouse);
return R.fail(405, "仓库信息为空");
return R.fail(405, "多仓权限无法操作,请选择仓库");
}
return carsLoadService.findLoadInitData(myCurrentWarehouse.getId());
}catch (CustomerException e){
@ -1057,7 +1057,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
log.warn(method + "仓库信息为空 myCurrentWarehouse={}", myCurrentWarehouse);
return R.fail(405, "仓库信息为空");
return R.fail(405, "多仓权限无法操作,请选择仓库");
}
return carsLoadService.findLoadFeeByNodeId(loadId,myCurrentWarehouse.getId());
}catch (CustomerException e){
@ -1096,7 +1096,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
log.warn(method + "仓库信息为空 myCurrentWarehouse={}", myCurrentWarehouse);
return R.fail(405, "仓库信息为空");
return R.fail(405, "多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
@ -1174,7 +1174,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1222,7 +1222,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1255,7 +1255,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1285,7 +1285,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1323,7 +1323,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1387,7 +1387,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1437,7 +1437,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1475,7 +1475,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1512,7 +1512,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1546,7 +1546,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1582,7 +1582,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
batchUnloadDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1624,7 +1624,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1659,7 +1659,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1696,7 +1696,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1735,7 +1735,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1802,7 +1802,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1836,7 +1836,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
loadCarsDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -1872,7 +1872,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
@ -1885,7 +1885,7 @@ public class CarsLoadController {
return R.fail(405,"包件码为空");
}
return carsLoadService.signScanPackageCode(signOrderId,orderPackageCode,"PC签收");
return carsLoadService.signScanPackageCode(signOrderId,orderPackageCode,"PC签收",loadCarsDTO.getWarehouseId());
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -1913,7 +1913,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
@ -1951,7 +1951,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -1985,7 +1985,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -2019,7 +2019,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -2052,7 +2052,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -2089,7 +2089,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -2123,7 +2123,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -2156,7 +2156,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -2189,7 +2189,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
@ -2221,7 +2221,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -2299,7 +2299,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(ObjectUtil.isNull(loadId)){
@ -2330,7 +2330,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -2359,7 +2359,7 @@ public class CarsLoadController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/IncomingController.java

@ -42,7 +42,7 @@ public class IncomingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"当前仓库信息为空");
return R.fail(405,"请选择仓库");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
inComingDTO.setWarehouseId(myCurrentWarehouse.getId());
inComingDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -80,7 +80,7 @@ public class IncomingController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"当前仓库信息为空");
return R.fail(405,"请选择仓库");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
inComingDTO.setWarehouseId(myCurrentWarehouse.getId());
inComingDTO.setWarehouseName(myCurrentWarehouse.getName());

54
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java

@ -102,7 +102,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
advanceDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -137,7 +137,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
advanceDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -178,7 +178,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
advanceDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -218,7 +218,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
advanceDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -255,7 +255,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
advanceDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -290,7 +290,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
if(advanceIds.isEmpty()){
@ -325,7 +325,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
if(advanceIds.isEmpty()){
@ -357,7 +357,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
if(advanceIds.isEmpty()){
@ -389,7 +389,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -419,7 +419,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
return openOrderService.openZeroWaybillInfo(myCurrentWarehouse.getId());
@ -446,7 +446,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
return openOrderService.findPayWayByClientId(clientId);
@ -473,7 +473,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -985,7 +985,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openLabelDTO.setWarehouseId(myCurrentWarehouse.getId());
openLabelDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -1063,7 +1063,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
return openOrderService.batchOpenLabel(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),myCurrentWarehouse.getWarehouseCode(),file);
@ -1090,7 +1090,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
return openOrderService.openLabelHasPacakage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
@ -1116,7 +1116,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
return openOrderService.importOrderNoPackage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),myCurrentWarehouse.getWarehouseCode(),file);
@ -1145,7 +1145,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
return openOrderService.importCustomizedOuPai(myCurrentWarehouse.getId(), myCurrentWarehouse.getName(), file);
@ -1172,7 +1172,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
return openOrderService.importStandardOuPai(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
@ -1201,7 +1201,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -1241,7 +1241,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -1280,7 +1280,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -1318,7 +1318,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -1350,7 +1350,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
@ -1382,7 +1382,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
return R.fail(403,"多仓权限无法操作,请选择仓库");
}
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
@ -1608,7 +1608,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"请选择仓库 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"请选择仓库");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
@ -1640,7 +1640,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"请选择仓库 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"请选择仓库");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
if(CollUtil.isEmpty(waybillIds)){
@ -1673,7 +1673,7 @@ public class OpenOrderController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"请选择仓库 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"请选择仓库");
return R.fail(405,"多仓权限无法操作,请选择仓库");
}
if(CollUtil.isEmpty(waybillIds)){

16
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java

@ -75,7 +75,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
verifySaveNewTripartiteTransfer(carsLoadDTO);
@ -189,7 +189,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
log.warn(method+"三方中转id为空 loadId={}",loadId);
@ -221,7 +221,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
log.warn(method+"三方中转id为空 loadId={}",loadId);
@ -254,7 +254,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
log.warn(method+"三方中转id为空 loadId={}",loadId);
@ -290,7 +290,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
log.warn(method+"三方中转id为空 loadId={}",loadId);
@ -323,7 +323,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
return carsLoadService.signLoadScanByIds(loadScanIds,myCurrentWarehouse.getId());
@ -352,7 +352,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){
log.warn(method+"三方中转id为空 loadId={}",loadId);
@ -399,7 +399,7 @@ public class TripartiteTransferController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
return R.fail(400,"多仓权限无法操作,请选择仓库");
}
if(Objects.isNull(loadId)){

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -145,7 +145,8 @@
lww.consignee consignee,
lww.consignee_name consigneeName,
lww.goods_name goodsName,
m.total_number totalNum,
m.total_number orderNum,
lww.total_count totalNum,
lww.total_weight totalWeight,
lww.total_volume totalVolume,
lww.customer_train customerTrain,

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -371,7 +371,7 @@
<select id="findPlanUnloadNumByLoadIdAndFinalNodeId" resultType="int">
select sum(IFNULL(num-IFNULL(unload_num,0),0))
select sum(IFNULL(num,0))
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and final_node_id = #{warehouseId}
@ -837,7 +837,7 @@
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and unload_node_id = #{warehouseId}
and scan_status != '1'
and scan_status = '2'
</select>
<update id="updateFinalNodeIdAndFinalNodeNameByLoadIdNoData" >

51
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml

@ -17,11 +17,21 @@
</delete>
<select id="finaSignOrderList" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
select ltlso.*,
ltcl.driver_name driverName,
ltcl.cars_no carsNo
select ltlso.id id,
ltlso.load_id loadId,
ltlso.warehouse_id warehouseId,
ltlso.plan_num planNum,
ltlso.load_sign_code loadSignCode,
ltlso.sign_num signNum,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.cars_line_name carsLineName,
ltcl.cars_no carsNo,
SUM(ltco.real_num) AS loadingNum
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
LEFT JOIN logpm_trunkline_cars_order ltco on ltco.sign_order_id = ltlso.id
<where>
and (ltlso.warehouse_id = #{param.warehouseId} or ltlso.final_node_id = #{param.warehouseId} or ltlso.driver_user_id = #{param.userId} or ltlso.assistant_user_id = #{param.userId})
@ -39,15 +49,27 @@
and ltlso.create_time &lt;= #{param.enterTimeEnd}
</if>
</where>
GROUP BY ltlso.id
</select>
<select id="finaSignOrderDetail" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
select ltlso.*,
ltcl.driver_name driverName,
ltcl.cars_no carsNo
select ltlso.id id,
ltlso.load_id loadId,
ltlso.warehouse_id warehouseId,
ltlso.plan_num planNum,
ltlso.load_sign_code loadSignCode,
ltlso.sign_num signNum,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.cars_line_name carsLineName,
ltcl.cars_no carsNo,
SUM(ltco.real_num) AS loadingNum
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
LEFT JOIN logpm_trunkline_cars_order ltco on ltco.sign_order_id = ltlso.id
where ltlso.id = #{signOrderId}
GROUP BY ltlso.id
</select>
<select id="findSignOrderDetailList" resultType="com.logpm.trunkline.vo.SignOrderDetailVO">
@ -86,11 +108,21 @@
</update>
<select id="findSignOrderPageList" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
select ltlso.*,
select ltlso.id id,
ltlso.load_id loadId,
ltlso.warehouse_id warehouseId,
ltlso.plan_num planNum,
ltlso.load_sign_code loadSignCode,
ltlso.sign_num signNum,
ltcl.driver_name driverName,
ltcl.cars_no carsNo
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.cars_line_name carsLineName,
ltcl.cars_no carsNo,
SUM(ltco.real_num) AS loadingNum
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
LEFT JOIN logpm_trunkline_cars_order ltco on ltco.sign_order_id = ltlso.id
<where>
and (ltlso.warehouse_id = #{param.warehouseId} or ltlso.final_node_id = #{param.warehouseId})
@ -111,6 +143,7 @@
and ltlso.create_time &lt;= #{param.enterTimeEnd}
</if>
</where>
GROUP BY ltlso.id
</select>
</mapper>

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -156,7 +156,7 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
R finaSignOrderDetail(LoadCarsDTO loadCarsDTO);
R signScanPackageCode(Long signOrderId,String orderPackageCode,String remark);
R signScanPackageCode(Long signOrderId,String orderPackageCode,String remark,Long warehouseId);
R signZeroOrder(Long signOrderId,Long carsLoadScanId,Integer enterNum, String remark);

255
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -2297,8 +2297,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "包件已经装车到" + loadCode);
}
Integer realLoadingNumber = carsLoadEntity.getRealLoadingNumber();
String audio = "";
String loadCode = carsLoadEntity.getCarsNo();
Long waybillId = null;
@ -2361,6 +2359,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
log.warn("##################loadingScan: 包件暂未入库 orderPackageCode={}", orderPackageCode);
remark = "有系统数据,包件暂未入库";
audio = "包件未入库";
return Resp.scanFail(405,"包件暂未入库","包件暂未入库");
} else {
//已入库
String waybillNo1 = trunklineAdvanceDetailEntity.getWaybillNo();
@ -2484,7 +2483,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setLoadingAbnormal(0);
isAbnormal = 0;
remark = "正常装车";
audio = (realLoadingNumber+1)+"件";
//audio = (realLoadingNumber+1)+"件";
}
Long finalNodeId = carsOrderEntity.getFinalNodeId();
BasicdataWarehouseEntity finalNode = basicdataWarehouseClient.getEntityWarehouseId(finalNodeId);
@ -2532,6 +2531,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}catch (Exception e){
log.error("推送数据失败",e);
}
if(StringUtil.isBlank(audio)){
TrunklineCarsLoadEntity carsLoad = baseMapper.selectById(loadId);
Integer realLoadingNumber = carsLoad.getRealLoadingNumber();
audio = realLoadingNumber+"件";
}
return Resp.scanSuccess("装车成功",audio);
}
@ -3532,8 +3537,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//先判断包件是否在配载计划的装车扫描中
QueryWrapper<TrunklineCarsLoadScanEntity> loadScanQueryWrapper = new QueryWrapper<>();
loadScanQueryWrapper.eq("load_id", loadId)
.eq("scan_code", orderPackageCode)
.eq("scan_status", "1");
.eq("scan_code", orderPackageCode);
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getOne(loadScanQueryWrapper);
//判断是否有装车扫描记录
if (Objects.isNull(carsLoadScanEntity)) {
@ -3542,33 +3546,72 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode);
if (Objects.isNull(parcelListEntity)) {
//没有包件数据
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setLoadId(loadId);
trunklineCarsLoadScanEntity.setLoadCode(loadCode);
trunklineCarsLoadScanEntity.setScanCode(orderPackageCode);
trunklineCarsLoadScanEntity.setScanStatus("2");
trunklineCarsLoadScanEntity.setNum(1);
trunklineCarsLoadScanEntity.setType(1);
trunklineCarsLoadScanEntity.setIsData(0);
trunklineCarsLoadScanEntity.setLoadingAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadNodeId(warehouseId);
trunklineCarsLoadScanEntity.setUnloadNum(1);
trunklineCarsLoadScanEntity.setUnloadTime(new Date());
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
trunklineCarsLoadScanEntity.setIsSupple(0);
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
Long loadScanId = trunklineCarsLoadScanEntity.getId();
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,补装车计划,异常装车");
TrunklineAdvanceDetailEntity trunklineAdvanceDetail = trunklineAdvanceDetailService.findEntityByOrderPackageCode(orderPackageCode);
if(!Objects.isNull(trunklineAdvanceDetail)){
InComingDTO inComingDTO = new InComingDTO();
inComingDTO.setOrderPackageCode(orderPackageCode);
inComingDTO.setIncomingType(IncomingTypeEnum.SUPPLE_INCOMING.getCode());
inComingDTO.setWarehouseId(warehouseId);
inComingService.incomingPackage(inComingDTO);
DistributionParcelListEntity distributionParcelList = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId);
if(!Objects.isNull(distributionParcelList)){
carsLoadScanEntity = new TrunklineCarsLoadScanEntity();
carsLoadScanEntity.setLoadId(loadId);
carsLoadScanEntity.setLoadCode(loadCode);
carsLoadScanEntity.setScanCode(orderPackageCode);
carsLoadScanEntity.setScanStatus("2");
carsLoadScanEntity.setNum(1);
carsLoadScanEntity.setType(1);
carsLoadScanEntity.setIsData(1);
carsLoadScanEntity.setLoadingAbnormal(1);
carsLoadScanEntity.setUnloadAbnormal(1);
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadNodeId(warehouseId);
carsLoadScanEntity.setUnloadNodeName(warehouseName);
carsLoadScanEntity.setUnloadTime(new Date());
carsLoadScanEntity.setRemark("未入库卸车");
trunklineCarsLoadScanService.save(carsLoadScanEntity);
trunklineCarsLoadingLogService.savaLoadingLog(null, null, loadId, loadCode, null, null, null, orderPackageCode, 1, 1, 1, 1, null, null, null, null, carsLoadScanEntity.getId(), "未入库补装车记录");
trunklineCarsSignLogService.saveSignLog(null, null, loadId, loadCode, null, null, null, orderPackageCode, 1, 1, 1, 1, null, null, null, null, carsLoadScanEntity.getId(), "未入库异常卸车");
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,异常卸车");
}else{
log.warn("##############signScanPackageCode: 包件未入库 orderPackageCode={}", orderPackageCode);
return R.fail(405, "包件未入库");
}
}else{
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setLoadId(loadId);
trunklineCarsLoadScanEntity.setLoadCode(loadCode);
trunklineCarsLoadScanEntity.setScanCode(orderPackageCode);
trunklineCarsLoadScanEntity.setScanStatus("2");
trunklineCarsLoadScanEntity.setNum(1);
trunklineCarsLoadScanEntity.setType(1);
trunklineCarsLoadScanEntity.setIsData(0);
trunklineCarsLoadScanEntity.setLoadingAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadNodeId(warehouseId);
trunklineCarsLoadScanEntity.setUnloadNum(1);
trunklineCarsLoadScanEntity.setUnloadTime(new Date());
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
trunklineCarsLoadScanEntity.setIsSupple(0);
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
Long loadScanId = trunklineCarsLoadScanEntity.getId();
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,补装车计划,异常装车");
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,异常卸车");
}
} else {
String waybillNumber = parcelListEntity.getWaybillNumber();
String orderCode = parcelListEntity.getOrderCode();
@ -3626,7 +3669,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "中转卸车下架解托");
}
} else {
// carsLoadScanEntity.getS
String scanStatus = carsLoadScanEntity.getScanStatus();
if("2".equals(scanStatus)){
log.warn("##############unloadPackage: 包件已卸车 orderPackageCode={}", orderPackageCode);
return R.fail(405, "包件已卸车");
}
if("3".equals(scanStatus)){
log.warn("##############unloadPackage: 包件已签收 orderPackageCode={}", orderPackageCode);
return R.fail(405, "包件已签收");
}
Long finalNodeId = carsLoadScanEntity.getFinalNodeId();
Long waybillId = carsLoadScanEntity.getWaybillId();
@ -4389,38 +4441,48 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "签收单信息不存在");
}
Long loadId = signOrderVO.getLoadId();
Long warehouseId = signOrderVO.getWarehouseId();
Long warehouseId = loadCarsDTO.getWarehouseId();
Long fromWarehouseId = signOrderVO.getWarehouseId();
//查询订单列表
List<SignScanOrderVO> signScanOrderList = trunklineCarsOrderService.findSignOrderList(loadId, warehouseId,signOrderId);
List<SignScanOrderVO> signScanOrderList = trunklineCarsOrderService.findSignOrderList(loadId, fromWarehouseId,signOrderId);
for (SignScanOrderVO signScanOrderVO : signScanOrderList) {
String waybillNo = signScanOrderVO.getWaybillNo();
String orderCode = signScanOrderVO.getOrderCode();
List<SignPackageVO> signPackageList = trunklineCarsLoadScanService.findSignPackageList(loadId, warehouseId, orderCode, waybillNo);
List<SignPackageVO> signPackageList = trunklineCarsLoadScanService.findSignPackageList(loadId, fromWarehouseId, orderCode, waybillNo);
signScanOrderVO.setSignPackageList(signPackageList);
}
List<SignScanOrderVO> signScanZeroOrderList = trunklineCarsOrderService.findSignZeroOrderList(loadId, warehouseId,signOrderId);
List<SignScanOrderVO> signScanZeroOrderList = trunklineCarsOrderService.findSignZeroOrderList(loadId, fromWarehouseId,signOrderId);
for (SignScanOrderVO signScanOrderVO : signScanZeroOrderList) {
String waybillNo = signScanOrderVO.getWaybillNo();
String orderCode = signScanOrderVO.getOrderCode();
List<SignPackageVO> signPackageList = trunklineCarsLoadScanService.findSignPackageList(loadId, warehouseId, orderCode, waybillNo);
List<SignPackageVO> signPackageList = trunklineCarsLoadScanService.findSignPackageList(loadId, fromWarehouseId, orderCode, waybillNo);
signScanOrderVO.setSignPackageList(signPackageList);
}
//查询异常列表
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("load_id", loadId)
.eq("unload_node_id", warehouseId)
.eq("sign_abnormal", 1);
List<TrunklineCarsLoadScanEntity> exceptionList = trunklineCarsLoadScanService.list(queryWrapper);
List<TrunklineLoadSignPhotoEntity> signPhotoList = loadSignPhotoService.findBySignPhotoList(signOrderId);
Map<String, Object> map = new HashMap<>();
map.put("signOrder", signOrderVO);
map.put("signScanOrderList", signScanOrderList);
map.put("signScanZeroOrderList", signScanZeroOrderList);
map.put("exceptionList", exceptionList);
map.put("signPhotoList", signPhotoList);
return R.data(map);
}
@Override
public R signScanPackageCode(Long signOrderId, String orderPackageCode, String remark) {
public R signScanPackageCode(Long signOrderId, String orderPackageCode, String remark,Long warehouseId) {
TrunklineLoadSignOrderEntity signOrderEntity = trunklineLoadSignOrderService.getById(signOrderId);
if (Objects.isNull(signOrderEntity)) {
@ -4428,7 +4490,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "签收单信息不存在");
}
Long loadId = signOrderEntity.getLoadId();
Long warehouseId = signOrderEntity.getWarehouseId();
Long fromWarehouseId = signOrderEntity.getWarehouseId();
String marketName = signOrderEntity.getMallName();
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
@ -4451,46 +4513,81 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//因为没有装车记录,补装车记录
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode);
if (Objects.isNull(parcelListEntity)) {
//没有找到在库的包件信息,所以是无数据包件
carsLoadScanEntity = new TrunklineCarsLoadScanEntity();
carsLoadScanEntity.setLoadId(loadId);
carsLoadScanEntity.setLoadCode(carsNo);
carsLoadScanEntity.setScanCode(orderPackageCode);
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setNum(1);
carsLoadScanEntity.setType(1);
carsLoadScanEntity.setIsData(0);
carsLoadScanEntity.setLoadingAbnormal(1);
carsLoadScanEntity.setUnloadAbnormal(1);
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadNodeId(warehouseId);
carsLoadScanEntity.setUnloadNodeName(warehouseEntity.getName());
carsLoadScanEntity.setSignTime(date);
carsLoadScanEntity.setSignAbnormal(1);
carsLoadScanEntity.setSignUserName(AuthUtil.getNickName());
carsLoadScanEntity.setSignOrderId(signOrderId);
carsLoadScanEntity.setUnloadTime(date);
carsLoadScanEntity.setRemark("无数据签收");
trunklineCarsLoadScanService.save(carsLoadScanEntity);
//没有找到在库的包件信息,看下暂存单有没有数据
TrunklineAdvanceDetailEntity trunklineAdvanceDetail = trunklineAdvanceDetailService.findEntityByOrderPackageCode(orderPackageCode);
if(Objects.isNull(trunklineAdvanceDetail)){
log.warn("##############signScanPackageCode: 系统无编码 orderPackageCode={}", orderPackageCode);
return R.fail(405, "系统无编码");
}else{
InComingDTO inComingDTO = new InComingDTO();
inComingDTO.setOrderPackageCode(orderPackageCode);
inComingDTO.setIncomingType(IncomingTypeEnum.SUPPLE_INCOMING.getCode());
inComingDTO.setWarehouseId(warehouseId);
inComingService.incomingPackage(inComingDTO);
trunklineCarsLoadingLogService.savaLoadingLog(null, null, loadId, carsNo, null, null, null, orderPackageCode, 1, 1, 0, 1, null, null, null, null, carsLoadScanEntity.getId(), "无数据异常补装车记录");
String orderCode = trunklineAdvanceDetail.getOrderCode();
trunklineCarsSignLogService.saveSignLog(null, null, loadId, carsNo, null, null, null, orderPackageCode, 1, 1, 0, 1, null, null, null, null, carsLoadScanEntity.getId(), "无数据异常签收");
DistributionParcelListEntity distributionParcelList = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId);
if(!Objects.isNull(distributionParcelList)){
DistributionStockArticleEntity distributionStockArticle = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
String mallName = distributionStockArticle.getMallName();
if (!marketName.equals(mallName)) {
log.warn("##############signScanPackageCode: 包件不属于该商家 marketName={}", marketName);
return R.fail(405, "包件不属于该商家");
}
carsLoadScanEntity = new TrunklineCarsLoadScanEntity();
carsLoadScanEntity.setLoadId(loadId);
carsLoadScanEntity.setLoadCode(carsNo);
carsLoadScanEntity.setWarehouseId(warehouseId);
carsLoadScanEntity.setWarehouseName(warehouseEntity.getName());
carsLoadScanEntity.setScanCode(orderPackageCode);
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setNum(1);
carsLoadScanEntity.setType(1);
carsLoadScanEntity.setIsData(1);
carsLoadScanEntity.setFromWarehouseId(warehouseId);
carsLoadScanEntity.setLoadingAbnormal(1);
carsLoadScanEntity.setUnloadAbnormal(1);
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadNodeId(warehouseId);
carsLoadScanEntity.setUnloadNodeName(warehouseEntity.getName());
carsLoadScanEntity.setSignTime(date);
carsLoadScanEntity.setSignAbnormal(1);
carsLoadScanEntity.setSignUserName(AuthUtil.getNickName());
carsLoadScanEntity.setSignOrderId(signOrderId);
carsLoadScanEntity.setUnloadTime(date);
carsLoadScanEntity.setRemark("未入库签收");
trunklineCarsLoadScanService.save(carsLoadScanEntity);
trunklineCarsLoadingLogService.savaLoadingLog(null, null, loadId, carsNo, null, null, null, orderPackageCode, 1, 1, 1, 1, null, null, null, null, carsLoadScanEntity.getId(), "未入库补装车记录");
trunklineCarsSignLogService.saveSignLog(null, null, loadId, carsNo, null, null, null, orderPackageCode, 1, 1, 1, 1, null, null, null, null, carsLoadScanEntity.getId(), "未入库异常签收");
}else{
log.warn("##############signScanPackageCode: 包件未入库 orderPackageCode={}", orderPackageCode);
return R.fail(405, "包件未入库");
}
}
} else {
Long wid = parcelListEntity.getWarehouseId();
String wName = parcelListEntity.getWarehouse();
String waybillNumber = parcelListEntity.getWaybillNumber();
Long waybillId = parcelListEntity.getWaybillId();
String orderCode = parcelListEntity.getOrderCode();
Long stockArticleId = parcelListEntity.getStockArticleId();
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findEntityByStockArticleId(stockArticleId);
if (!Objects.isNull(stockArticleEntity)) {
String mallName = stockArticleEntity.getMallName();
if (!marketName.equals(mallName)) {
log.warn("##############signScanPackageCode: 包件属于该商家 marketName={}", marketName);
return R.fail(405, "包件属于该商家");
log.warn("##############signScanPackageCode: 包件属于该商家 marketName={}", marketName);
return R.fail(405, "包件属于该商家");
}
}
@ -4499,7 +4596,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setLoadCode(carsNo);
carsLoadScanEntity.setWarehouseId(wid);
carsLoadScanEntity.setWarehouseName(wName);
carsLoadScanEntity.setWaybillId(waybillId);
carsLoadScanEntity.setWaybillNo(waybillNumber);
carsLoadScanEntity.setFromWarehouseId(wid);
carsLoadScanEntity.setOrderCode(orderCode);
carsLoadScanEntity.setScanCode(orderPackageCode);
carsLoadScanEntity.setScanStatus("3");
@ -4507,11 +4606,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setType(1);
carsLoadScanEntity.setIsData(1);
carsLoadScanEntity.setLoadingAbnormal(1);
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadAbnormal(1);
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadNodeId(warehouseId);
carsLoadScanEntity.setUnloadNodeName(warehouseEntity.getName());
carsLoadScanEntity.setUnloadCheck(0);
carsLoadScanEntity.setIsSupple(0);
carsLoadScanEntity.setSignTime(date);
carsLoadScanEntity.setSignAbnormal(1);
carsLoadScanEntity.setSignUserName(AuthUtil.getNickName());
@ -4542,7 +4644,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
String waybillNo = carsLoadScanEntity.getWaybillNo();
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, fromWarehouseId);
if (Objects.isNull(parcelListEntity)) {
@ -4562,9 +4663,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "包件不属于当前商场");
}
TrunklineCarsOrderEntity carsOrderEntity = trunklineCarsOrderService.findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(loadId, warehouseId, orderCode, waybillNo);
TrunklineCarsOrderEntity carsOrderEntity = trunklineCarsOrderService.findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(loadId, fromWarehouseId, orderCode, waybillNo);
if (Objects.isNull(carsOrderEntity)) {
log.warn("##############signScanPackageCode: 配载订单信息不存在 loadId={},warehouseId={} orderCode={} waybillNo={}", loadId, warehouseId, orderCode, waybillNo);
log.warn("##############signScanPackageCode: 配载订单信息不存在 loadId={},warehouseId={} orderCode={} waybillNo={}", loadId, fromWarehouseId, orderCode, waybillNo);
return R.fail(405, "配载订单信息不存在");
}
@ -4575,11 +4676,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setSignAbnormal(0);
}
Long wid = carsLoadScanEntity.getWarehouseId();
if (!wid.equals(warehouseId)) {
log.warn("##############signScanPackageCode: 包件不在签收计划中 loadId={},orderPackageCode={} scanStatus={}", loadId, orderPackageCode, scanStatus);
return R.fail(405, "包件不在签收计划中");
}
// Long wid = carsLoadScanEntity.getWarehouseId();
// if (!wid.equals(warehouseId)) {
// log.warn("##############signScanPackageCode: 包件不在签收计划中 loadId={},orderPackageCode={} scanStatus={}", loadId, orderPackageCode, scanStatus);
// return R.fail(405, "包件不在签收计划中");
// }
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setUnloadNum(1);
carsLoadScanEntity.setSignTime(date);
@ -5827,6 +5928,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.data(trunklineCarsLoadVO);
}
@Transactional(rollbackFor = Exception.class)
@Override
public R removeCarsLoadScan(String carsLoadScanIds, Long warehouseId) {
@ -6034,7 +6136,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
Long trayId = null;
Integer isData = 0;
Integer isData = 1;
String trayName = null;
String trayCode = null;
String orderCode = null;
@ -6118,6 +6220,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadScanEntity.setNum(1);
trunklineCarsLoadScanEntity.setType(1);
trunklineCarsLoadScanEntity.setIsData(0);
isData=0;
trunklineCarsLoadScanEntity.setLoadingAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadNodeName(warehouseName);
@ -6509,12 +6612,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
JSONObject jsonObject = trunklineCarsLoadScanService.findUnloadNumAudio(loadId,warehouseId);
Integer totalUnloadNum = jsonObject.getInteger("totalUnloadNum");
Integer abnormalUnloadNum = jsonObject.getInteger("abnormalUnloadNum");
StringBuilder audio = new StringBuilder();
audio.append("卸车").append(totalUnloadNum).append("件");
if(!Objects.isNull(abnormalUnloadNum) && !abnormalUnloadNum.equals(0)){
audio.append("异常卸车").append(abnormalUnloadNum).append("件");
}
if (isData == 0) {
return Resp.scanSuccess("卸车成功", "系统无编码");
}
return Resp.scanSuccess("卸车成功", "卸车"+totalUnloadNum+"件,异常卸车"+abnormalUnloadNum+"件");
return Resp.scanSuccess("卸车成功", audio.toString());
}

27
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java

@ -10,6 +10,7 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataTrayClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.warehouse.dto.DownPackageCodeDTO;
import com.logpm.warehouse.dto.NoDataStockListDTO;
import com.logpm.warehouse.dto.TrayTypeDTO;
import com.logpm.warehouse.dto.ZeroOrderVO;
import com.logpm.warehouse.service.IWarehouseTaryAllocationService;
@ -895,12 +896,9 @@ public class WarehouseTrayTypeApiController {
public R enterStockNoDataMaterialCode(@RequestBody TrayTypeDTO trayTypeDTO) {
String method = "###########enterStockNoDataMaterialCode: ";
log.info(method + "录入库存品物料编码 trayTypeDTO={}", trayTypeDTO);
String materialCode = trayTypeDTO.getMaterialCode();//物料编码
Long marketId = trayTypeDTO.getMarketId();//商场id
Integer num = trayTypeDTO.getNum();//数量
String trayType = trayTypeDTO.getTrayType();//打托方式
String trayCode = trayTypeDTO.getTrayCode();//托盘码
String incomingBatch = trayTypeDTO.getIncomingBatch();//批次号
List<NoDataStockListDTO> noDataStockListDTOS = trayTypeDTO.getNoDataStockListDTOS();
try{
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
@ -916,24 +914,13 @@ public class WarehouseTrayTypeApiController {
log.warn(method+"打托方式不能为空 trayType={}",trayType);
return R.fail(403,"打托方式不能为空");
}
if(StringUtil.isBlank(materialCode)){
log.warn(method+"物料编码不能为空 materialCode={}",materialCode);
return R.fail(403,"物料编码不能为空");
}
if(StringUtil.isBlank(incomingBatch)){
log.warn(method+"批次号不能为空 incomingBatch={}",incomingBatch);
return R.fail(403,"批次号不能为空");
}
if(Objects.isNull(marketId)){
log.warn(method+"商场id不能为空 marketId={}",marketId);
return R.fail(403,"商场id不能为空");
}
if(Objects.isNull(num)||num == 0){
log.warn(method+"数量不正确 num={}",num);
return R.fail(403,"数量不正确");
if(CollUtil.isEmpty(noDataStockListDTOS)){
log.warn(method+"录入数据不能为空 trayType={}",trayType);
return R.fail(403,"录入数据不能为空");
}
return warehouseTrayTypeService.enterStockNoDataMaterialCode(trayCode,trayType,materialCode,marketId,num,incomingBatch,myCurrentWarehouse.getId(),"无数据库存品打托");
return warehouseTrayTypeService.enterStockNoDataMaterialCode(trayCode,trayType,noDataStockListDTOS,myCurrentWarehouse.getId(),"无数据库存品打托");
}catch (CustomerException e){
log.warn(e.message);
return R.fail(e.code,e.message);

15
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/NoDataStockListDTO.java

@ -0,0 +1,15 @@
package com.logpm.warehouse.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class NoDataStockListDTO implements Serializable {
private String materialCode;//物料编码
private Long marketId;//商场id
private String incomingBatch;//批次号
private Integer num;//数量
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/TrayTypeDTO.java

@ -54,6 +54,7 @@ public class TrayTypeDTO implements Serializable {
private String sourceTrayCode;
private String targetTrayCode;
private List<NoDataStockListDTO> noDataStockListDTOS = new ArrayList<>();
private List<Long> trayGoodsIds = new ArrayList<>();

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml

@ -181,7 +181,7 @@
select sum(ldsl.quantity_stock) orderTotalNum,
sum(lwtg.num) enterNum
from logpm_warehouse_tray_goods lwtg
left join logpm_distribution_stock_list ldsl on ldsl.material_id = lwtg.association_id and ldsl.market_id = lwtg.market_id and ldsl.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.material_id = lwtg.association_id and ldsl.market_id = lwtg.market_id and ldsl.incoming_batch = lwtg.incoming_batch and ldsl.is_deleted = 0
where lwtg.is_deleted = 0
and lwtg.association_type = 4
and lwtg.tray_type_id = #{trayTypeId}

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.warehouse.dto.DownPackageCodeDTO;
import com.logpm.warehouse.dto.NoDataStockListDTO;
import com.logpm.warehouse.dto.TrayTypeDTO;
import com.logpm.warehouse.dto.ZeroOrderVO;
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity;
@ -55,7 +56,7 @@ public interface IWarehouseTrayTypeService extends BaseService<WarehouseTrayType
R findAllMarket(Long warehouseId);
R enterStockNoDataMaterialCode(String trayCode, String trayType, String materialCode, Long marketId,Integer num,String incomingBatch,Long warehouseId,String remark);
R enterStockNoDataMaterialCode(String trayCode, String trayType, List<NoDataStockListDTO> noDataStockListDTOS, Long warehouseId, String remark);
void downPackageByOrderPackageCode(String orderPackageCode,String remark,Long warehouseId);

12
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/AsyncDataServiceImpl.java

@ -15,6 +15,7 @@ import com.logpm.oldproject.entity.TrayEntity;
import com.logpm.oldproject.feign.ITrayClient;
import com.logpm.oldproject.feign.ITrayScanClient;
import com.logpm.oldproject.feign.ITrayScanDesClient;
import com.logpm.warehouse.dto.NoDataStockListDTO;
import com.logpm.warehouse.dto.TrayInfoDTO;
import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.ZeroOrderVO;
@ -998,7 +999,16 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
}
Long marketId = stockListEntity.getMarketId();
Long id = stockListEntity.getId();
R r = trayTypeService.enterStockNoDataMaterialCode(trayCode, trayType, materialCode, marketId, stockNum, incomingBatch, warehouseId,"系统无数据库存品打托");
List<NoDataStockListDTO> noDataStockListDTOS = new ArrayList<>();
NoDataStockListDTO noDataStockListDTO = new NoDataStockListDTO();
noDataStockListDTO.setMarketId(marketId);
noDataStockListDTO.setMaterialCode(materialCode);
noDataStockListDTO.setIncomingBatch(incomingBatch);
noDataStockListDTO.setNum(stockNum);
noDataStockListDTOS.add(noDataStockListDTO);
R r = trayTypeService.enterStockNoDataMaterialCode(trayCode, trayType,noDataStockListDTOS, warehouseId,"系统无数据库存品打托");
int code = r.getCode();
if(code == 200){
log.info("##################dealWithStockTray: 库存品打托成功 trayCode={} trayType={} materialCode={} marketId={} incomingBatch={} stockNum={}",trayCode,trayType,materialCode,marketId,incomingBatch,stockNum);

133
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -30,6 +30,7 @@ import com.logpm.trunkline.feign.ITrunklineDetailProductClient;
import com.logpm.trunkline.feign.ITrunklineWaybillOrderClient;
import com.logpm.warehouse.bean.Resp;
import com.logpm.warehouse.dto.DownPackageCodeDTO;
import com.logpm.warehouse.dto.NoDataStockListDTO;
import com.logpm.warehouse.dto.TrayTypeDTO;
import com.logpm.warehouse.dto.ZeroOrderVO;
import com.logpm.warehouse.entity.*;
@ -2458,7 +2459,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
}
@Override
public R enterStockNoDataMaterialCode(String trayCode, String trayType, String materialCode, Long marketId,Integer num,String incomingBatch,Long warehouseId,String remark) {
public R enterStockNoDataMaterialCode(String trayCode, String trayType, List<NoDataStockListDTO> noDataStockListDTOS, Long warehouseId, String remark) {
//查询托盘信息
BasicdataTrayEntity trayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);
if(Objects.isNull(trayEntity)){
@ -2467,22 +2468,25 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
}
Long trayId = trayEntity.getId();
String trayName = trayEntity.getPalletName();
NoDataStockListDTO noDataStockListDTO = noDataStockListDTOS.get(0);
//查询库存品数据
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId,materialCode,incomingBatch,warehouseId);
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(noDataStockListDTO.getMarketId(),noDataStockListDTO.getMaterialCode(),noDataStockListDTO.getIncomingBatch(),warehouseId);
if(Objects.isNull(stockListEntity)){
log.warn("#########saveTrayTypeByStock: 未找到库存品信息 marketId={} materialCode={}",marketId,materialCode);
log.warn("#########saveTrayTypeByStock: 未找到库存品信息 marketId={} materialCode={}",noDataStockListDTO.getMarketId(),noDataStockListDTO.getMaterialCode());
throw new CustomerException(403,"未找到库存品信息");
}
Long stockListId = stockListEntity.getId();
String marketName = stockListEntity.getMarketName();
Long materialId = stockListEntity.getMaterialId();
String cargoNumber = stockListEntity.getCargoNumber();
BasicMaterialEntity materialEntity = basicMaterialClient.getMaterialOwnId(materialId);
// Long stockListId = stockListEntity.getId();
// String marketName = stockListEntity.getMarketName();
// Long materialId = stockListEntity.getMaterialId();
// String materialCode = stockListEntity.getCargoNumber();
// Long marketId = stockListEntity.getMarketId();
BasicMaterialEntity materialEntity = basicMaterialClient.getMaterialOwnId(stockListEntity.getMaterialId());
if(Objects.isNull(materialEntity)){
log.warn("#########saveTrayTypeByStock: 未找到物料信息 materialId={}",materialId);
log.warn("#########saveTrayTypeByStock: 未找到物料信息 materialId={}",stockListEntity.getMaterialId());
throw new CustomerException(403,"未找到物料信息");
}
// String materialCode = materialEntity.getProductCode();//物料编码
String materialName = materialEntity.getName();//物料名称
QueryWrapper<WarehouseTrayTypeEntity> queryWrapper = new QueryWrapper<>();
@ -2492,65 +2496,85 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
if(Objects.isNull(trayTypeEntity)){
//如果为空则该托盘为空
//第一次存入数据
trayTypeEntity = saveTrayTypeByStockNoData(trayType, trayCode,trayId,materialId,materialName,materialCode,marketId,marketName,warehouseId);
}
String tt = trayTypeEntity.getTrayType();
Long filterId = trayTypeEntity.getFilterId();
String filterValue = trayTypeEntity.getFilterValue();
Long mId = trayTypeEntity.getMarketId();
String marketName1 = trayTypeEntity.getMarketName();
Long trayTypeId = trayTypeEntity.getId();
Long wid = trayTypeEntity.getWarehouseId();
if(!wid.equals(warehouseId)){
log.warn("##############enterStockNoDataMaterialCode: 托盘已在其他仓库打托 wid={} warehouseId={}",wid,warehouseId);
return R.fail(403,"托盘已在其他仓库打托");
trayTypeEntity = saveTrayTypeByStockNoData(trayType, trayCode,trayId,stockListEntity.getMaterialId(),materialName,stockListEntity.getCargoNumber(),stockListEntity.getMarketId(),stockListEntity.getMarketName(),warehouseId);
}
if(Objects.isNull(mId)){
trayTypeEntity.setMarketId(marketId);
trayTypeEntity.setMarketName(marketName);
updateById(trayTypeEntity);
}else{
if(!mId.equals(marketId)){
log.warn("#########enterStockNoDataMaterialCode: 库存品不属于该商场 marketName={} marketName1={}",marketName,marketName1);
return R.fail(403,"库存品不属于该商场");
}
}
Integer totalNum = 0;
List<Long> stockListIds = new ArrayList<>();
WarehouseTrayTypeEntity finalTrayTypeEntity = trayTypeEntity;
for (NoDataStockListDTO dataStockListDTO : noDataStockListDTOS) {
Long marketId = dataStockListDTO.getMarketId();
String materialCode = dataStockListDTO.getMaterialCode();
String incomingBatch = dataStockListDTO.getIncomingBatch();
Integer num = dataStockListDTO.getNum();
//查询库存品数据
DistributionStockListEntity newStockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId,materialCode,incomingBatch,warehouseId);
if(Objects.isNull(newStockListEntity)){
log.warn("#########saveTrayTypeByStock: 未找到库存品信息 marketId={} materialCode={}",marketId,materialCode);
}else{
stockListIds.add(newStockListEntity.getId());
String marketName = newStockListEntity.getMarketName();
Long materialId = newStockListEntity.getMaterialId();
String tt = finalTrayTypeEntity.getTrayType();
Long filterId = finalTrayTypeEntity.getFilterId();
String filterValue = finalTrayTypeEntity.getFilterValue();
Long mId = finalTrayTypeEntity.getMarketId();
String mName = finalTrayTypeEntity.getMarketName();
Long trayTypeId = finalTrayTypeEntity.getId();
Long wid = finalTrayTypeEntity.getWarehouseId();
if(!wid.equals(warehouseId)){
log.warn("##############enterStockNoDataMaterialCode: 托盘已在其他仓库打托 wid={} warehouseId={}",wid,warehouseId);
return R.fail(403,"托盘已在其他仓库打托");
}
if(Objects.isNull(mId)){
finalTrayTypeEntity.setMarketId(marketId);
finalTrayTypeEntity.setMarketName(newStockListEntity.getMarketName());
updateById(finalTrayTypeEntity);
}else{
if(!mId.equals(marketId)){
log.warn("#########enterStockNoDataMaterialCode: 库存品不属于该商场 marketName={} marketName1={}",mName,marketName);
return R.fail(403,"库存品不属于该商场");
}
}
//判断串货
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = warehouseTrayGoodsService.getStockDataByMaterialIdAndMarketId(materialId,marketId,trayTypeId,incomingBatch,warehouseId);
//判断串货
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = warehouseTrayGoodsService.getStockDataByMaterialIdAndMarketId(materialId,marketId,trayTypeId,incomingBatch,warehouseId);
boolean chuanFlag = false;
boolean chuanFlag = false;
//修改打托方式上的值
if(chuanFlag){
if(Objects.isNull(warehouseTrayGoodsEntity)){
//存入有数据库存品与托盘绑定关系表
warehouseTrayGoodsService.saveEntityStock(materialId, marketId,trayTypeEntity,incomingBatch,cargoNumber,num, "1");
}else{
warehouseTrayGoodsService.updateEntityStock(warehouseTrayGoodsEntity,num);
}
}else{
if(Objects.isNull(warehouseTrayGoodsEntity)){
//存入有数据库存品与托盘绑定关系表
warehouseTrayGoodsService.saveEntityStock(materialId, marketId,trayTypeEntity,incomingBatch,cargoNumber,num, "0");
}else{
warehouseTrayGoodsService.updateEntityStock(warehouseTrayGoodsEntity,num);
//修改打托方式上的值
if(chuanFlag){
if(Objects.isNull(warehouseTrayGoodsEntity)){
//存入有数据库存品与托盘绑定关系表
warehouseTrayGoodsService.saveEntityStock(materialId, marketId, finalTrayTypeEntity,incomingBatch,materialCode,num, "1");
}else{
warehouseTrayGoodsService.updateEntityStock(warehouseTrayGoodsEntity,num);
}
}else{
if(Objects.isNull(warehouseTrayGoodsEntity)){
//存入有数据库存品与托盘绑定关系表
warehouseTrayGoodsService.saveEntityStock(materialId, marketId, finalTrayTypeEntity,incomingBatch,materialCode,num, "0");
}else{
warehouseTrayGoodsService.updateEntityStock(warehouseTrayGoodsEntity,num);
}
}
//添加上拖日志表
warehouseTrayGoodsLogService.saveLogStock(materialId, marketId, finalTrayTypeEntity,incomingBatch,materialCode,num, "1", remark, "1");
totalNum = totalNum + num;
}
}
// //添加上拖日志表
warehouseTrayGoodsLogService.saveLogStock(materialId, marketId,trayTypeEntity,incomingBatch,cargoNumber,num, "1", remark, "1");
updateNumByTrayTypeId(trayTypeEntity);
try{
JSONObject jsonObject = new JSONObject();
jsonObject.put("dataType",3);
jsonObject.put("operation",1);
List<Long> stockListIds = new ArrayList<>();
stockListIds.add(stockListId);
jsonObject.put("stockListIds",stockListIds);
jsonObject.put("warehouseId",warehouseId);
jsonObject.put("trayName",trayName);
@ -2562,8 +2586,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
log.warn("###########saveTrayTypeByOrderPackageCode: 发送打托广播失败");
}
return Resp.scanSuccess("录入成功","成功录入"+num+"件");
return Resp.scanSuccess("录入成功","成功录入"+totalNum+"件");
}
@Transactional(rollbackFor = Exception.class)

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

@ -1423,7 +1423,15 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
if (!StringUtil.isBlank(trayCode)) {
for (UpShelfStockDTO upShelfStockDTO : upShelfStockList) {
R r = warehouseTrayTypeService.enterStockNoDataMaterialCode(trayCode, trayType, upShelfStockDTO.getMaterialCode(), upShelfStockDTO.getMarketId(), upShelfStockDTO.getEnterNum(), upShelfStockDTO.getIncomingBatch(), warehouseId, remark);
List<NoDataStockListDTO> noDataStockListDTOS = new ArrayList<>();
NoDataStockListDTO noDataStockListDTO = new NoDataStockListDTO();
noDataStockListDTO.setMarketId(upShelfStockDTO.getMarketId());
noDataStockListDTO.setMaterialCode(upShelfStockDTO.getMaterialCode());
noDataStockListDTO.setIncomingBatch(upShelfStockDTO.getIncomingBatch());
noDataStockListDTO.setNum(upShelfStockDTO.getEnterNum());
noDataStockListDTOS.add(noDataStockListDTO);
R r = warehouseTrayTypeService.enterStockNoDataMaterialCode(trayCode, trayType, noDataStockListDTOS, warehouseId, remark);
int code = r.getCode();
if (code != 200) {
throw new CustomerException(code, r.getMsg());

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -19,7 +19,6 @@ package com.logpm.warehouse.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
@ -39,11 +38,10 @@ import com.logpm.distribution.entity.DistributionStockListInfoEntity;
import com.logpm.distribution.feign.IDistributionStockListClient;
import com.logpm.distribution.feign.IDistributionStockListInfoClient;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.NoDataStockListDTO;
import com.logpm.warehouse.dto.UpShelfStockDTO;
import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.entity.WarehouseWarehouseEntity;
import com.logpm.warehouse.entity.WarehouseWarehousingDetailEntity;
import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity;
import com.logpm.warehouse.excel.WarehouseWarehousingEntryExcel;
@ -397,7 +395,15 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
//进行打托操作
BasicdataTrayEntity basicdataTray = basicdataTrayClient.findByTrayName(warehousingDetail.getTrayName());
warehouseTrayTypeService.enterStockNoDataMaterialCode(basicdataTray.getPalletCode(),"100",entity.getCargoNumber(),entity.getMarketId(),num,entity.getIncomingBatch(),entity.getWarehouseId(),"入库单录入数量,打托至"+warehousingDetail.getTrayName()+num+"件");
List<NoDataStockListDTO> noDataStockListDTOS = new ArrayList<>();
NoDataStockListDTO noDataStockListDTO = new NoDataStockListDTO();
noDataStockListDTO.setMarketId(entity.getMarketId());
noDataStockListDTO.setMaterialCode(entity.getCargoNumber());
noDataStockListDTO.setIncomingBatch(entity.getIncomingBatch());
noDataStockListDTO.setNum(num);
noDataStockListDTOS.add(noDataStockListDTO);
warehouseTrayTypeService.enterStockNoDataMaterialCode(basicdataTray.getPalletCode(),"100",noDataStockListDTOS,entity.getWarehouseId(),"入库单录入数量,打托至"+warehousingDetail.getTrayName()+num+"件");
}
}

Loading…
Cancel
Save