Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 3 months ago
parent
commit
a3917b6661
  1. 8
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  2. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  3. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  4. 76
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

8
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -2037,7 +2037,7 @@
lawo.create_time AS createTime, lawo.create_time AS createTime,
lawo.commit_time AS commitTime, lawo.commit_time AS commitTime,
GROUP_CONCAT( laprr.result_type ) AS resultType, GROUP_CONCAT( laprr.result_type ) AS resultType,
SUM(laprr.money) AS money, (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money,
lawo.warehouse_service_name AS warehouseServiceName, lawo.warehouse_service_name AS warehouseServiceName,
lawo.headquarters_name AS headquartersName, lawo.headquarters_name AS headquartersName,
GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName,
@ -2222,7 +2222,7 @@
lawo.commit_time AS commitTime, lawo.commit_time AS commitTime,
lawo.over_time AS overTime, lawo.over_time AS overTime,
GROUP_CONCAT(DISTINCT laprr.result_type ) AS resultType, GROUP_CONCAT(DISTINCT laprr.result_type ) AS resultType,
SUM(laprr.money) AS money, (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money,
lawo.warehouse_service_name AS warehouseServiceName, lawo.warehouse_service_name AS warehouseServiceName,
lawo.headquarters_name AS headquartersName, lawo.headquarters_name AS headquartersName,
GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName,
@ -3758,7 +3758,7 @@
lawo.commit_time AS commitTime, lawo.commit_time AS commitTime,
lawo.over_time AS overTime, lawo.over_time AS overTime,
GROUP_CONCAT( laprr.result_type ) AS resultType, GROUP_CONCAT( laprr.result_type ) AS resultType,
SUM(laprr.money) AS money, (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money,
lawo.warehouse_service_name AS warehouseServiceName, lawo.warehouse_service_name AS warehouseServiceName,
lawo.headquarters_name AS headquartersName, lawo.headquarters_name AS headquartersName,
GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName,
@ -3948,7 +3948,7 @@
lawo.commit_time AS commitTime, lawo.commit_time AS commitTime,
lawo.over_time AS overTime, lawo.over_time AS overTime,
GROUP_CONCAT( laprr.result_type ) AS resultType, GROUP_CONCAT( laprr.result_type ) AS resultType,
SUM(laprr.money) AS money, (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money,
lawo.warehouse_service_name AS warehouseServiceName, lawo.warehouse_service_name AS warehouseServiceName,
lawo.headquarters_name AS headquartersName, lawo.headquarters_name AS headquartersName,
GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName,

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -1581,6 +1581,7 @@
logpm_distribution_stock AS ldss logpm_distribution_stock AS ldss
WHERE WHERE
ldss.is_deleted = 0 ldss.is_deleted = 0
AND ldss.cancel_status != 1
AND ldss.reservation_id = ldr.id AND ldss.reservation_id = ldr.id
) AS scanNum, ) AS scanNum,
IFNULL( SUM( ldr.reservation_stock_list_num ), 0 ) AS inventoryNum IFNULL( SUM( ldr.reservation_stock_list_num ), 0 ) AS inventoryNum
@ -1655,7 +1656,7 @@
logpm_distribution_stock AS ldss logpm_distribution_stock AS ldss
WHERE WHERE
ldss.is_deleted = 0 ldss.is_deleted = 0
and ldss.cancel_status != 1 AND ldss.cancel_status != 1
AND ldss.reservation_id = ldbl.id AND ldss.reservation_id = ldbl.id
) AS scanNum, ) AS scanNum,
( (
@ -2162,7 +2163,7 @@
GROUP BY GROUP BY
ldsi.stockup_id,ldr.id,ldpl.id ldsi.stockup_id,ldr.id,ldpl.id
HAVING HAVING
count( ldr.id )>0 count( ldpl.id ) > 0
</select> </select>
<select id="selectBillStockupPackageEntityList" <select id="selectBillStockupPackageEntityList"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity"> resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
@ -2248,7 +2249,7 @@
ldbl.id, ldbl.id,
ldpl.id ldpl.id
HAVING HAVING
count( ldbl.id )> 0 count( ldpl.id )> 0
</select> </select>
<select id="selectDeliveryStockupInventoryEntityList" <select id="selectDeliveryStockupInventoryEntityList"
resultType="com.logpm.distribution.entity.DisStockListDetailEntity"> resultType="com.logpm.distribution.entity.DisStockListDetailEntity">

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

@ -5716,9 +5716,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
builder.append(distributionSignforEntity.getDriverRemarks()).append(deliverySelfEntity.getDriverName() + ":" + distributionSignfor.getDriverRemarks()); builder.append(distributionSignforEntity.getDriverRemarks()).append(deliverySelfEntity.getDriverName() + ":" + distributionSignfor.getDriverRemarks());
distributionSignforEntity.setDriverRemarks(builder.toString()); distributionSignforEntity.setDriverRemarks(builder.toString());
} }
if (!aaa.isEmpty()){
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
} else { } else {
if (distributionDeliveryListEntity.getKind().equals("1")){ if (distributionDeliveryListEntity.getKind().equals("1")){
if (deliverySelfEntity.getIsMaster().equals(1)) { if (deliverySelfEntity.getIsMaster().equals(1)) {
@ -6162,7 +6160,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!packageLockIds.isEmpty()) { if (!packageLockIds.isEmpty()) {
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + distributionDeliveryListEntity.getTrainNumber() + ":orderPackageCode:"); List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + distributionDeliveryListEntity.getTrainNumber() + ":orderPackageCode:");
if (Func.isNotEmpty(a)) { if (Func.isNotEmpty(a)) {
boolean flag = a.stream().anyMatch(any -> packageLockIds.contains(any)); assert a != null;
boolean flag = a.stream().anyMatch(any -> packageLockIds.contains(any));
if (flag) { if (flag) {
//正在操作,请稍后重试 //正在操作,请稍后重试
throw new CustomerException("该包件正在被操作,请稍后再试!!!"); throw new CustomerException("该包件正在被操作,请稍后再试!!!");
@ -6174,6 +6173,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + distributionDeliveryListEntity.getTrainNumber() + "orderPackageCode:", packageLockIds, 60L); bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + distributionDeliveryListEntity.getTrainNumber() + "orderPackageCode:", packageLockIds, 60L);
} }
} }
if (!aaa.isEmpty()){
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + ":reservationId:", distributionSignfor.getReservationId(), 60L); bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + ":reservationId:", distributionSignfor.getReservationId(), 60L);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists); NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists);
distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());

76
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -4632,22 +4632,28 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (Objects.isNull(stockupEntity)) { if (Objects.isNull(stockupEntity)) {
return Resp.scanFail("备货任务信息错误", "备货任务信息错误"); return Resp.scanFail("备货任务信息错误", "备货任务信息错误");
} }
switch (scanType) { try {
case 1: switch (scanType) {
//订制品 case 1:
return handleDeliveryPackageStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity); //订制品
case 2: return handleDeliveryPackageStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
//库存品 case 2:
return handleDeliveryInventoryStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity); //库存品
case 3: return handleDeliveryInventoryStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
//配送零担备货 case 3:
return handleDeliveryZeroStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity); //配送零担备货
case 4: return handleDeliveryZeroStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
//配送托盘备货 case 4:
return handleDeliveryTrayStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity); //配送托盘备货
default: return handleDeliveryTrayStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
log.error(method + "未知scanType"); default:
return Resp.scanFail("未知操作类型", "未知操作类型"); log.error(method + "未知scanType");
return Resp.scanFail("未知操作类型", "未知操作类型");
}
}catch (Exception e){
log.error(">>>>>>>>>>>>>>>",e.getMessage());
return null;
} }
} }
@ -4698,9 +4704,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (packageData.isEmpty()) { if (packageData.isEmpty()) {
return R.fail("当前托盘无此客户的货物"); return R.fail("当前托盘无此客户的货物");
} }
List<JSONObject> logList =new ArrayList<>();
warehouseUpdownTypeClient.downTray(trayByTrayCode.getPalletCode(),myCurrentWarehouse.getId()); warehouseUpdownTypeClient.downTray(trayByTrayCode.getPalletCode(),myCurrentWarehouse.getId());
//生成扫描数据 //生成扫描数据
List<DistributionStockEntity> stockEntityList = generateDeliveryTrayPackageStockEntity(reservationEntity,packageData,myCurrentWarehouse,user,stockupDTO.getStockupId(),stockupEntity); List<DistributionStockEntity> stockEntityList = generateDeliveryTrayPackageStockEntity(reservationEntity,packageData,myCurrentWarehouse,user,stockupDTO.getStockupId(),stockupEntity,logList);
if (!stockEntityList.isEmpty()) { if (!stockEntityList.isEmpty()) {
// 备货作业节点 // 备货作业节点
distributionStockService.saveBatch(stockEntityList); distributionStockService.saveBatch(stockEntityList);
@ -4709,8 +4716,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
.in(DistributionParcelListEntity::getId,updatePackageIds) .in(DistributionParcelListEntity::getId,updatePackageIds)
.set(DistributionParcelListEntity::getOrderPackageStockupStatus,OrderPackageStockupStatusConstant.yibeihu.getValue()) .set(DistributionParcelListEntity::getOrderPackageStockupStatus,OrderPackageStockupStatusConstant.yibeihu.getValue())
); );
}
}
if (!logList.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(logList);
}
return Resp.scanSuccess("操作成功",""); return Resp.scanSuccess("操作成功","");
}else { }else {
return Resp.scanFail("订制品备货已完成",""); return Resp.scanFail("订制品备货已完成","");
@ -4722,7 +4732,8 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
BasicdataWarehouseEntity warehouse, BasicdataWarehouseEntity warehouse,
BladeUser user, BladeUser user,
Long stockUpId, Long stockUpId,
DistributionStockupEntity stockupEntity) { DistributionStockupEntity stockupEntity,
List<JSONObject> logList) {
List<DistributionStockEntity> list= new ArrayList<>(); List<DistributionStockEntity> list= new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : packageData) { for (DistributionParcelListEntity parcelListEntity : packageData) {
DistributionStockEntity distributionStockEntity = new DistributionStockEntity(); DistributionStockEntity distributionStockEntity = new DistributionStockEntity();
@ -4748,6 +4759,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (ObjectUtils.isNotNull(nodeFanoutMsg)) { if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser()); distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser());
} }
//增加备货扫描节点
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "按托盘备货作业,备货任务号:" + stockupEntity.getStockupCode();
JSONObject js = handleLogJSONObject(warehouse, user, distributionStockEntity.getCoding(), content, WorkNodeEnums.STOCKING_OPERATION.getCode());
logList.add(js);
} }
return list; return list;
} }
@ -4850,6 +4865,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
* @param stockupEntity * @param stockupEntity
* @return * @return
*/ */
@Transactional
private R handleDeliveryInventoryStockUp(StockupDTO stockupDTO, BasicdataWarehouseEntity myCurrentWarehouse, Long reservationId, DistributionStockupEntity stockupEntity) { private R handleDeliveryInventoryStockUp(StockupDTO stockupDTO, BasicdataWarehouseEntity myCurrentWarehouse, Long reservationId, DistributionStockupEntity stockupEntity) {
String method = "#######################DistributionStockupServiceImpl.handleDeliveryInventoryStockUp"; String method = "#######################DistributionStockupServiceImpl.handleDeliveryInventoryStockUp";
if (Objects.isNull(stockupDTO.getStockPrint())) { if (Objects.isNull(stockupDTO.getStockPrint())) {
@ -4873,6 +4889,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
} }
@Transactional
private R handleDeliveryUnHaveDataInventoryPackage(StockupDTO stockupDTO, BasicdataWarehouseEntity myCurrentWarehouse, Long reservationId, DistributionStockupEntity stockupEntity) { private R handleDeliveryUnHaveDataInventoryPackage(StockupDTO stockupDTO, BasicdataWarehouseEntity myCurrentWarehouse, Long reservationId, DistributionStockupEntity stockupEntity) {
String method = "#######################DistributionStockupServiceImpl.handleDeliveryUnHaveDataInventoryPackage"; String method = "#######################DistributionStockupServiceImpl.handleDeliveryUnHaveDataInventoryPackage";
//无数据库存品备货必须携带库位信息 //无数据库存品备货必须携带库位信息
@ -5319,11 +5336,15 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return R.fail("当前托盘无此客户的货物"); return R.fail("当前托盘无此客户的货物");
} }
warehouseUpdownTypeClient.downTray(trayByTrayCode.getPalletCode(),myCurrentWarehouse.getId()); warehouseUpdownTypeClient.downTray(trayByTrayCode.getPalletCode(),myCurrentWarehouse.getId());
List<JSONObject> logList = new ArrayList<>();
//生成扫描数据 //生成扫描数据
List<DistributionStockEntity> stockEntityList = generateBillTrayPackageStockEntity(billLadingEntity,packageData,myCurrentWarehouse,user,stockupDTO.getStockupId()); List<DistributionStockEntity> stockEntityList = generateBillTrayPackageStockEntity(billLadingEntity,packageData,myCurrentWarehouse,user,stockupDTO.getStockupId(),stockupEntity,logList);
if (!stockEntityList.isEmpty()) { if (!stockEntityList.isEmpty()) {
distributionStockService.saveBatch(stockEntityList); distributionStockService.saveBatch(stockEntityList);
} }
if (!logList.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(logList);
}
return Resp.scanSuccess("操作成功"," "); return Resp.scanSuccess("操作成功"," ");
} }
@ -5331,7 +5352,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
List<DistributionParcelListEntity> packageData, List<DistributionParcelListEntity> packageData,
BasicdataWarehouseEntity myCurrentWarehouse, BasicdataWarehouseEntity myCurrentWarehouse,
BladeUser user, BladeUser user,
Long stockupId) { Long stockupId,
DistributionStockupEntity stockupEntity,
List<JSONObject> logList) {
List<DistributionStockEntity> list= new ArrayList<>(); List<DistributionStockEntity> list= new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : packageData) { for (DistributionParcelListEntity parcelListEntity : packageData) {
DistributionStockEntity distributionStockEntity = new DistributionStockEntity(); DistributionStockEntity distributionStockEntity = new DistributionStockEntity();
@ -5353,6 +5376,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
distributionStockEntity.setScanUser(user.getNickName()); distributionStockEntity.setScanUser(user.getNickName());
distributionStockEntity.setIsTray(Integer.parseInt(IsOrNoConstant.yes.getValue())); distributionStockEntity.setIsTray(Integer.parseInt(IsOrNoConstant.yes.getValue()));
list.add(distributionStockEntity); list.add(distributionStockEntity);
//增加备货扫描节点
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "按托盘备货作业,备货任务号:" + stockupEntity.getStockupCode();
JSONObject js = handleLogJSONObject(myCurrentWarehouse, user, distributionStockEntity.getCoding(), content, WorkNodeEnums.STOCKING_OPERATION.getCode());
logList.add(js);
} }
return list; return list;
} }
@ -6671,7 +6698,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
DistributionStockEntity stockEntity = generateDeliveryPackageStockEntity(reservationEntity, parcelListEntity, warehouseId, warehouseName, user, stockupDTO.getStockupId()); DistributionStockEntity stockEntity = generateDeliveryPackageStockEntity(reservationEntity, parcelListEntity, warehouseId, warehouseName, user, stockupDTO.getStockupId());
DistributionReservationPackageEntity distributionReservationPackageEntity = packageEntityList.get(0);
if (parcelListEntity.getOrderPackageGroundingStatus().equals(OrderPackageGroundingStatusConstant.yishangjia.getValue())) { if (parcelListEntity.getOrderPackageGroundingStatus().equals(OrderPackageGroundingStatusConstant.yishangjia.getValue())) {
//进行下架处理 //进行下架处理
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
@ -6709,7 +6735,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
//修改包件备货状态 //修改包件备货状态
parcelListEntity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.yibeihu.getValue()); parcelListEntity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.yibeihu.getValue());
distributionParcelListService.updateById(parcelListEntity);
DistributionParcelListEntity update = new DistributionParcelListEntity();
update.setId(parcelListEntity.getId());
update.setOrderPackageStockupStatus(parcelListEntity.getOrderPackageStockupStatus());
distributionParcelListService.updateById(update);
trunklinePackageTrackLogClient.addPackageTrackLog(packageLogList); trunklinePackageTrackLogClient.addPackageTrackLog(packageLogList);
// 备货作业节点 // 备货作业节点
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity); NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity);

Loading…
Cancel
Save