Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 2 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.commit_time AS commitTime,
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.headquarters_name AS headquartersName,
GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName,
@ -2222,7 +2222,7 @@
lawo.commit_time AS commitTime,
lawo.over_time AS overTime,
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.headquarters_name AS headquartersName,
GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName,
@ -3758,7 +3758,7 @@
lawo.commit_time AS commitTime,
lawo.over_time AS overTime,
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.headquarters_name AS headquartersName,
GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName,
@ -3948,7 +3948,7 @@
lawo.commit_time AS commitTime,
lawo.over_time AS overTime,
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.headquarters_name AS headquartersName,
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
WHERE
ldss.is_deleted = 0
AND ldss.cancel_status != 1
AND ldss.reservation_id = ldr.id
) AS scanNum,
IFNULL( SUM( ldr.reservation_stock_list_num ), 0 ) AS inventoryNum
@ -1655,7 +1656,7 @@
logpm_distribution_stock AS ldss
WHERE
ldss.is_deleted = 0
and ldss.cancel_status != 1
AND ldss.cancel_status != 1
AND ldss.reservation_id = ldbl.id
) AS scanNum,
(
@ -2162,7 +2163,7 @@
GROUP BY
ldsi.stockup_id,ldr.id,ldpl.id
HAVING
count( ldr.id )>0
count( ldpl.id ) > 0
</select>
<select id="selectBillStockupPackageEntityList"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
@ -2248,7 +2249,7 @@
ldbl.id,
ldpl.id
HAVING
count( ldbl.id )> 0
count( ldpl.id )> 0
</select>
<select id="selectDeliveryStockupInventoryEntityList"
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());
distributionSignforEntity.setDriverRemarks(builder.toString());
}
if (!aaa.isEmpty()){
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
} else {
if (distributionDeliveryListEntity.getKind().equals("1")){
if (deliverySelfEntity.getIsMaster().equals(1)) {
@ -6162,7 +6160,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!packageLockIds.isEmpty()) {
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + distributionDeliveryListEntity.getTrainNumber() + ":orderPackageCode:");
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) {
//正在操作,请稍后重试
throw new CustomerException("该包件正在被操作,请稍后再试!!!");
@ -6174,6 +6173,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
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);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists);
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)) {
return Resp.scanFail("备货任务信息错误", "备货任务信息错误");
}
switch (scanType) {
case 1:
//订制品
return handleDeliveryPackageStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
case 2:
//库存品
return handleDeliveryInventoryStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
case 3:
//配送零担备货
return handleDeliveryZeroStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
case 4:
//配送托盘备货
return handleDeliveryTrayStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
default:
log.error(method + "未知scanType");
return Resp.scanFail("未知操作类型", "未知操作类型");
try {
switch (scanType) {
case 1:
//订制品
return handleDeliveryPackageStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
case 2:
//库存品
return handleDeliveryInventoryStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
case 3:
//配送零担备货
return handleDeliveryZeroStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
case 4:
//配送托盘备货
return handleDeliveryTrayStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
default:
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()) {
return R.fail("当前托盘无此客户的货物");
}
List<JSONObject> logList =new ArrayList<>();
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()) {
// 备货作业节点
distributionStockService.saveBatch(stockEntityList);
@ -4709,8 +4716,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
.in(DistributionParcelListEntity::getId,updatePackageIds)
.set(DistributionParcelListEntity::getOrderPackageStockupStatus,OrderPackageStockupStatusConstant.yibeihu.getValue())
);
}
}
if (!logList.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(logList);
}
return Resp.scanSuccess("操作成功","");
}else {
return Resp.scanFail("订制品备货已完成","");
@ -4722,7 +4732,8 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
BasicdataWarehouseEntity warehouse,
BladeUser user,
Long stockUpId,
DistributionStockupEntity stockupEntity) {
DistributionStockupEntity stockupEntity,
List<JSONObject> logList) {
List<DistributionStockEntity> list= new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : packageData) {
DistributionStockEntity distributionStockEntity = new DistributionStockEntity();
@ -4748,6 +4759,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
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;
}
@ -4850,6 +4865,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
* @param stockupEntity
* @return
*/
@Transactional
private R handleDeliveryInventoryStockUp(StockupDTO stockupDTO, BasicdataWarehouseEntity myCurrentWarehouse, Long reservationId, DistributionStockupEntity stockupEntity) {
String method = "#######################DistributionStockupServiceImpl.handleDeliveryInventoryStockUp";
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) {
String method = "#######################DistributionStockupServiceImpl.handleDeliveryUnHaveDataInventoryPackage";
//无数据库存品备货必须携带库位信息
@ -5319,11 +5336,15 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return R.fail("当前托盘无此客户的货物");
}
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()) {
distributionStockService.saveBatch(stockEntityList);
}
if (!logList.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(logList);
}
return Resp.scanSuccess("操作成功"," ");
}
@ -5331,7 +5352,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
List<DistributionParcelListEntity> packageData,
BasicdataWarehouseEntity myCurrentWarehouse,
BladeUser user,
Long stockupId) {
Long stockupId,
DistributionStockupEntity stockupEntity,
List<JSONObject> logList) {
List<DistributionStockEntity> list= new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : packageData) {
DistributionStockEntity distributionStockEntity = new DistributionStockEntity();
@ -5353,6 +5376,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
distributionStockEntity.setScanUser(user.getNickName());
distributionStockEntity.setIsTray(Integer.parseInt(IsOrNoConstant.yes.getValue()));
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;
}
@ -6671,7 +6698,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
BladeUser user = AuthUtil.getUser();
DistributionStockEntity stockEntity = generateDeliveryPackageStockEntity(reservationEntity, parcelListEntity, warehouseId, warehouseName, user, stockupDTO.getStockupId());
DistributionReservationPackageEntity distributionReservationPackageEntity = packageEntityList.get(0);
if (parcelListEntity.getOrderPackageGroundingStatus().equals(OrderPackageGroundingStatusConstant.yishangjia.getValue())) {
//进行下架处理
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
@ -6709,7 +6735,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
//修改包件备货状态
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);
// 备货作业节点
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity);

Loading…
Cancel
Save