Browse Source

代码合并

master
汤建军 10 months ago
parent
commit
10fdb853f7
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  2. 82
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  4. 124
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  5. 96
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -2976,7 +2976,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Override
@Async
@LogpmAsync("asyncExecutor")
public void recordsReservationDeliveryLog(String reservationIds,BasicdataWarehouseEntity warehouse,BladeUser user,String trainNumber) {
List<Long> list = Func.toLongList(reservationIds);
if (!list.isEmpty()) {

82
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -583,7 +583,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
// synchronized
public R loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
try{
//查询该包件是否能够从库存品包件表中查到
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
@ -772,26 +771,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.setHeader("x-delay", 3000);
return message;
});
JSONObject trunklinePackageTrackLog= new JSONObject();
try {
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
}catch (Exception e){
log.error("装车日志数据错误",e);
}
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
@ -952,21 +933,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
packageLockIds.add(loadscanEntity.getPackageId());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描托盘:"+loadscanEntity.getTrayNo()+"装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
pushList.add(parcelListEntity);
@ -1057,12 +1024,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer carLaodNum = getCarLaodNum(distrilbutionloadingscanDTO.getDeliveryId());
return Resp.scanSuccessWithData("装车成功", carLaodNum + "件", carLaodNum);
}catch (Exception e){
log.error("装车扫码错误",e);
throw new CustomerException(e.getMessage());
}
}
private void extracteOrderPackageStatus(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO, DistributionParcelListEntity parcelListEntity, BasicdataWarehouseEntity myCurrentWarehouse, DistributionReservationEntity reservationEntity) {
@ -5507,25 +5468,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描异常装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
try {
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_ABNORMAL_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
}catch (Exception e){
log.info("异常装车日志数据错误>>>>>>>>>>>>>>>>>>>data:{}",trunklinePackageTrackLog);
}
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_LOADING.getCode());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
@ -7387,4 +7330,23 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
this.updateById(deliveryListEntity);
}
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse,BladeUser user,String orderPackageCode,String content,Integer node) {
JSONObject trunklinePackageTrackLog = new JSONObject();
trunklinePackageTrackLog.put("tenantId",user.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",user.getUserId());
trunklinePackageTrackLog.put("updateUser",user.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",warehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",orderPackageCode);
trunklinePackageTrackLog.put("warehouseId",warehouse.getId());
trunklinePackageTrackLog.put("warehouseName",warehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",user.getNickName());
return trunklinePackageTrackLog;
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1375,7 +1375,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setDeliveryNumber(packageNum.get());
distributionDeliveryListEntity.setInventoryNub(inventoryNum.get());
distributionDeliveryListService.updateById(distributionDeliveryListEntity);
// distributionAsyncService.recordsReservationDeliveryLog(reservationIds,myCurrentWarehouse,user,distributionDeliveryListEntity.getTrainNumber());
distributionAsyncService.recordsReservationDeliveryLog(reservationIds,myCurrentWarehouse,user,distributionDeliveryListEntity.getTrainNumber());
return R.status(true);
}

124
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2494,21 +2494,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
//维护订单状态
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getSigningUser()+"扫描签收,装车方式:扫描装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
} else {
@ -2584,25 +2570,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.info("content 参数:>>>>>>>>>>Warehouse:{},ScanUser:{},TrainNumber:{},ReservationCode:{}",myCurrentWarehouse.getName(),distributionLoadscanEntity.getSigningUser(),deliveryListEntity.getTrainNumber(),distributionReservationEntity.getReservationCode());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+distributionLoadscanEntity.getSigningUser()+"扫描签收,装车方式:补录装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",distributionLoadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",distributionLoadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",distributionLoadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",distributionLoadscanEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",distributionLoadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",distributionLoadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",distributionLoadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getScanUser());
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(distributionLoadscanEntity.getOrderPackageCode());
}
//修改包件状态为装车、签收
DistributionParcelListEntity updatePackage = collect.get(0);
@ -3169,7 +3139,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"扫描异常签收,装车方式:补录装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
switch (reservationEntity.getDeliveryType()) {
case "1":
//商配
@ -3249,24 +3218,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanService.updateById(distributionLoadscanEntity);
distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
try {
trunklinePackageTrackLog.put("tenantId",distributionLoadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",distributionLoadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",distributionLoadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",distributionLoadscanEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",distributionLoadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",distributionLoadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",distributionLoadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getSigningUser());
}catch (Exception e){
log.error("商配异常签收日志参数错误",e);
}
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
aaa.add(trunklinePackageTrackLog);
assert loadscanEntity != null;
orderPackageCodes.add(distributionLoadscanEntity.getOrderPackageCode());
@ -3340,26 +3292,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//修改包件装车、签收状态
packageLockIds.add(distributionLoadscanEntity.getPackageId());
try {
trunklinePackageTrackLog.put("tenantId",distributionLoadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",distributionLoadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",distributionLoadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",distributionLoadscanEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",distributionLoadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",distributionLoadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",distributionLoadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getSigningUser());
}catch (Exception e){
log.info("市配异常签收日志参数错误>>>>>>>>>>>>>>>>data:{}",trunklinePackageTrackLog);
throw new RuntimeException("该包件正在被操作,请稍后再试!!!");
}
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
@ -5178,18 +5111,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
jsonObject.put("remark","批量签收下架");
jsonObjects.add(jsonObject);
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getSigningUser()+"司机一键签收,装车方式:扫描装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("operator",loadscanEntity.getSigningUser());
trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
} else {
//存在装车数据
if (distributionSignfor.getIsClerk()) {
@ -5210,18 +5133,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanService.updateById(loadscanEntities);
packageLockIds.add(loadscanEntities.getPackageId());
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntities.getSigningUser()+"司机一键签收,装车方式:补录装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
trunklinePackageTrackLog.put("tenantId",loadscanEntities.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntities.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntities.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntities.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntities.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntities.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntities.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntities.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntities.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("operator",loadscanEntities.getSigningUser());
trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
}
}
@ -5234,7 +5147,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
packageCodes.add(parcelListEntity.getOrderPackageCode());
}
if (Func.isNotEmpty(packageIds)) {
distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId());
//批量推送
@ -6518,4 +6430,24 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse,BladeUser user,String orderPackageCode,String content,Integer node) {
JSONObject trunklinePackageTrackLog = new JSONObject();
trunklinePackageTrackLog.put("tenantId",user.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",user.getUserId());
trunklinePackageTrackLog.put("updateUser",user.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",warehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",orderPackageCode);
trunklinePackageTrackLog.put("warehouseId",warehouse.getId());
trunklinePackageTrackLog.put("warehouseName",warehouse.getName());
trunklinePackageTrackLog.put("workNode",node);
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",user.getNickName());
return trunklinePackageTrackLog;
}
}

96
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -1169,103 +1169,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
Map<Integer, List<DistributionParcelListEntity>> packageMap = distributionParcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getConditions));
List<DistributionBillLadingScanEntity> ladingScanEntities = new ArrayList<>();
if (!packageMap.isEmpty()) {
// packageMap.forEach((k,v)->{
// switch (k){
// case 1:
// //定制品
// for (DistributionParcelListEntity parcelListEntity : v) {
// DistributionBillLadingScanEntity distributionBillLadingScanEntity = new DistributionBillLadingScanEntity();
// distributionBillLadingScanEntity.setPacketBarCode(parcelListEntity.getOrderPackageCode());
// distributionBillLadingScanEntity.setScanType(3);
// distributionBillLadingScanEntity.setParcelListId(parcelListEntity.getId());
// distributionBillLadingScanEntity.setOrderSelfNumbering(parcelListEntity.getOrderCode());
// distributionBillLadingScanEntity.setStockArticleId(parcelListEntity.getStockArticleId());
// distributionBillLadingScanEntity.setBillLadingId(distrilbutionBillLading.getId());
// distributionBillLadingScanEntity.setMaterialType("2");
// distributionBillLadingScanEntity.setQuantity(parcelListEntity.getQuantity());
// ladingScanEntities.add(distributionBillLadingScanEntity);
// //修改包件状态
// distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()
// .eq(DistributionParcelListEntity::getId,parcelListEntity.getId())
// .set(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.yiyueyue.getValue())
// .set(DistributionParcelListEntity::getOrderPackageLoadingStatus,OrderPackageLoadingStatusConstant.yizhuangche.getValue())
// .set(DistributionParcelListEntity::getOrderPackageStatus,OrderPackageStatusConstant.yiqianshou.getValue())
// );
// //维护订单
// orderCodes.add(parcelListEntity.getOrderCode());
// }
// break;
// case 2:
// //零担
// for (DistributionParcelListEntity parcelListEntity : v) {
// //查询计划零担数量
// DistributionReservationZeroPackageEntity packageEntity = distributionZeroPackageService.getOne(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
// .eq(DistributionReservationZeroPackageEntity::getReservationId, distrilbutionBillLading.getId())
// .eq(DistributionReservationZeroPackageEntity::getType, "3")
// .eq(DistributionReservationZeroPackageEntity::getParcelListId, parcelListEntity.getId())
// .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
// );
// //维护零担品类在库信息
// DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda()
// .eq(DistributionParcelNumberEntity::getParcelListId, parcelListEntity.getId())
// .eq(DistributionParcelNumberEntity::getStockArticleId, parcelListEntity.getStockArticleId())
// );
// //零担在库数不足进行签收
// if (distributionParcelNumberEntity.getHandQuantity() < packageEntity.getQuantity()){
// log.info(method+"零担签收数量不足,计划数量:{},在库数量:{}",packageEntity.getQuantity(),distributionParcelNumberEntity.getHandQuantity());
// throw new RuntimeException("零担在库数不足此次签收!!");
// }
// DistributionBillLadingScanEntity distributionBillLadingScanEntity = new DistributionBillLadingScanEntity();
// distributionBillLadingScanEntity.setPacketBarCode(parcelListEntity.getOrderPackageCode());
// distributionBillLadingScanEntity.setScanType(3);
// distributionBillLadingScanEntity.setParcelListId(parcelListEntity.getId());
// distributionBillLadingScanEntity.setOrderSelfNumbering(parcelListEntity.getOrderCode());
// distributionBillLadingScanEntity.setStockArticleId(parcelListEntity.getStockArticleId());
// distributionBillLadingScanEntity.setBillLadingId(distrilbutionBillLading.getId());
// distributionBillLadingScanEntity.setMaterialType("3");
// distributionBillLadingScanEntity.setQuantity(packageEntity.getQuantity());
// ladingScanEntities.add(distributionBillLadingScanEntity);
// //维护零担在库信息
// int newHandQuantity = distributionParcelNumberEntity.getHandQuantity() - packageEntity.getQuantity();
// int newDeliveryQuantity = distributionParcelNumberEntity.getDeliveryQuantity() - packageEntity.getQuantity();
// int newOutboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() + packageEntity.getQuantity();
// int newSigninQuantity = distributionParcelNumberEntity.getSigninQuantity() + packageEntity.getQuantity();
// log.info(method+"维护前零担品类在库数量,在库数量:{},冻结数量:{},出库数量:{},签收数量:{}",
// distributionParcelNumberEntity.getHandQuantity(),
// distributionParcelNumberEntity.getDeliveryQuantity(),
// distributionParcelNumberEntity.getOutboundQuantity(),
// distributionParcelNumberEntity.getSigninQuantity());
// //修改零担品类
// distributionParcelNumberEntity.setHandQuantity(newHandQuantity);
// distributionParcelNumberEntity.setDeliveryQuantity(newDeliveryQuantity);
// distributionParcelNumberEntity.setOutboundQuantity(newOutboundQuantity);
// distributionParcelNumberEntity.setSigninQuantity(newSigninQuantity);
// log.info(method+"维护后零担品类在库数量,在库数量:{},冻结数量:{},出库数量:{},签收数量:{}",
// distributionParcelNumberEntity.getHandQuantity(),
// distributionParcelNumberEntity.getDeliveryQuantity(),
// distributionParcelNumberEntity.getOutboundQuantity(),
// distributionParcelNumberEntity.getSigninQuantity());
// distributionParcelNumberService.updateById(distributionParcelNumberEntity);
// if (newOutboundQuantity == parcelListEntity.getQuantity()){
// //全部出库
// parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
// parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
// parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
// }
// if (newSigninQuantity == parcelListEntity.getQuantity()){
// //全部签收
// parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
// parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
// }
// distributionParcelListService.updateById(parcelListEntity);
// orderCodes.add(parcelListEntity.getOrderCode());
// }
// break;
// }
//
// });
ladingScanEntities = handleSignPackage(packageMap, distrilbutionBillLading.getId(), myCurrentWarehouse.getId());
if (!ladingScanEntities.isEmpty()) {
// 进行签收扫描数据补录
distributionBillLadingScanService.saveBatch(ladingScanEntities);

Loading…
Cancel
Save