Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
zhaoqiaobo 6 months ago
parent
commit
dcf4da885a
  1. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  2. 80
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  3. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  4. 29
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -392,10 +392,11 @@
ldrp.reservation_id = lds.reservation_id
) goodsAllocation,
ldrs.stock_article_status stockArticleState,
( select sum(loaded_nub) FROM
( select IFNULL(sum( loaded_nub ) ,0) FROM
logpm_distribution_loadscan AS ldl
WHERE ldl.order_id=ldrs.stock_article_id
and ldl.scan_status != 1
AND ldl.is_deleted = 0
and ldl.reservation_id = lds.reservation_id
) AS loadingNumber,
( select count(*) FROM

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

@ -1148,6 +1148,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setCarsLoadNum(0);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if (orderId != 0) {
Integer isTransfer = 1;
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, fromWarehouseId);
List<DistributionParcelNumberEntity> ls = new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) {
@ -1160,6 +1161,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId();
if(warehouseId.equals(acceptWarehouseId)){
newParcelListEntity.setIsTransfer(0);
isTransfer = 0;
// String operationRemark = "运单装车"+unloadNum+"件 干线批次号:"+carsLoadEntity.getCarsNo()+",车牌号:"+carsLoadEntity.getCarNumber()+",司机姓名:"+carsLoadEntity.getDriverName()+",司机手机:"+carsLoadEntity.getDriverMobile();
// openOrderAsyncService.saveLog(waybillId, waybillNo, "30", "干线装车", operationRemark, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
}else{
newParcelListEntity.setIsTransfer(1);
}
@ -1177,6 +1181,31 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
ls.add(parcelNumberEntity);
}
distributionParcelNumberClient.addBatch(ls);
if(isTransfer == 0){
QueryWrapper<TrunklineWaybillOrderEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("waybill_no",stockArticleEntity.getWaybillNumber())
.eq("order_code",stockArticleEntity.getWaybillNumber());
TrunklineWaybillOrderEntity one = trunklineWaybillOrderService.getOne(queryWrapper1);
if(!Objects.isNull(one)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(stockArticleEntity.getWaybillNumber());
Integer totalCount = waybillEntity.getTotalCount();
Integer waybillStatusInt = Integer.parseInt(waybillEntity.getWaybillStatus());
if(waybillStatusInt <= 30){
Integer handleNumber = one.getHandleNumber();
int total = handleNumber + unloadNum;
if(total < totalCount){
waybillEntity.setWaybillStatus("50");
one.setHandleNumber(total);
}else{
waybillEntity.setWaybillStatus("60");
one.setHandleNumber(totalCount);
}
warehouseWaybillClient.updateEntity(waybillEntity);
trunklineWaybillOrderService.updateById(one);
}
}
}
}
} else {
Integer hQuantity = newStockArticleEntity.getHandQuantity() + unloadNum;
@ -1202,6 +1231,33 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setIncomingNum(incomingNum);
distributionStockArticleClient.saveOrUpdate(newStockArticleEntity);
String waybillNumber = newStockArticleEntity.getWaybillNumber();
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber);
Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId();
if(warehouseId.equals(destinationWarehouseId)){
QueryWrapper<TrunklineWaybillOrderEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("waybill_no",stockArticleEntity.getWaybillNumber())
.eq("order_code",stockArticleEntity.getWaybillNumber());
TrunklineWaybillOrderEntity one = trunklineWaybillOrderService.getOne(queryWrapper1);
if(!Objects.isNull(one)){
Integer totalCount = warehouseWaybillEntity.getTotalCount();
Integer waybillStatusInt = Integer.parseInt(warehouseWaybillEntity.getWaybillStatus());
if(waybillStatusInt <= 30){
Integer handleNumber = one.getHandleNumber();
int total = handleNumber + unloadNum;
if(total < totalCount){
warehouseWaybillEntity.setWaybillStatus("50");
one.setHandleNumber(total);
}else{
warehouseWaybillEntity.setWaybillStatus("60");
one.setHandleNumber(totalCount);
}
warehouseWaybillClient.updateEntity(warehouseWaybillEntity);
trunklineWaybillOrderService.updateById(one);
}
}
}
}
}
}
@ -2908,6 +2964,30 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
audio = (enterNum)+"件";
// String operationRemark = "运单装车"+enterNum+"件 干线批次号:"+carsLoadEntity.getCarsNo()+",车牌号:"+carsLoadEntity.getCarNumber()+",司机姓名:"+carsLoadEntity.getDriverName()+",司机手机:"+carsLoadEntity.getDriverMobile();
// openOrderAsyncService.saveLog(waybillId, waybillNo, "30", "干线装车", operationRemark, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
QueryWrapper<TrunklineWaybillOrderEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("waybill_id",waybillId)
.eq("order_code",waybillNo);
TrunklineWaybillOrderEntity one = trunklineWaybillOrderService.getOne(queryWrapper1);
if(!Objects.isNull(one)){
Integer totalCount = waybillEntity.getTotalCount();
Integer waybillStatusInt = Integer.parseInt(waybillEntity.getWaybillStatus());
if(waybillStatusInt <= 30){
Integer handleNumber = one.getHandleNumber();
int total = handleNumber + enterNum;
if(total < totalCount){
waybillEntity.setWaybillStatus("30");
one.setHandleNumber(total);
}else{
waybillEntity.setWaybillStatus("40");
one.setHandleNumber(totalCount);
}
warehouseWaybillClient.updateEntity(waybillEntity);
trunklineWaybillOrderService.updateById(one);
}
}
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, goodsName, difficult,
2, isData, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark);

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -245,15 +245,15 @@
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id =#{param.warehouseId } </if>
<if test="param.allocationId != null and param.allocationId != ''">and allocation_id =#{param.allocationId } </if>
<if test="param.trayId != null and param.trayId != ''">and tray_id =#{param.trayId } </if>
<if test="param.orderCode != null and param.orderCode != ''">and order_code like concat('%',#{param.orderCode },'%') </if>
<if test="param.categoryName != null and param.categoryName != ''">and category_name like concat('%',#{param.categoryName },'%') </if>
<if test="param.materialCode != null and param.materialCode != ''">and material_code like concat('%',#{param.materialCode },'%') </if>
<if test="param.trayCode != null and param.trayCode != ''">and tray_code like concat('%',#{param.trayCode },'%') </if>
<if test="param.trayName != null and param.trayName != ''">and tray_name like concat('%',#{param.trayName },'%') </if>
<if test="param.brandName != null and param.brandName != ''">and brand_name like concat('%',#{param.brandName },'%') </if>
<if test="param.orderCode != null and param.orderCode != ''">and order_code like concat(#{param.orderCode },'%') </if>
<if test="param.categoryName != null and param.categoryName != ''">and category_name like concat(#{param.categoryName },'%') </if>
<if test="param.materialCode != null and param.materialCode != ''">and material_code like concat(#{param.materialCode },'%') </if>
<if test="param.trayCode != null and param.trayCode != ''">and tray_code like concat(#{param.trayCode },'%') </if>
<if test="param.trayName != null and param.trayName != ''">and tray_name like concat(#{param.trayName },'%') </if>
<if test="param.brandName != null and param.brandName != ''">and brand_name like concat(#{param.brandName },'%') </if>
<if test="param.marketName != null and param.marketName != ''">and market_name like concat('%',#{param.marketName},'%') </if>
<if test="param.materialName != null and param.materialName != ''">and material_name like concat('%',#{param.materialName},'%') </if>
<if test="param.positionCode != null and param.positionCode != ''">and position_code like concat('%',#{param.positionCode},'%') </if>
<if test="param.positionCode != null and param.positionCode != ''">and (position_code like concat('%',#{param.positionCode},'%') or grounding_position_code like concat('%',#{param.positionCode},'%')) </if>
<if test="param.orderPackageCode != null and param.orderPackageCode != ''">and order_package_code =#{param.orderPackageCode } </if>
<if test="param.inventoryUser != null and param.inventoryUser != ''">and inventory_user like concat('%',#{param.inventoryUser },'%') </if>
<if test="param.startTime != null and param.startTime != ''"> and inventory_time BETWEEN #{param.startTime } and #{param.endTime}</if>

29
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -263,16 +263,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
//查询托盘名称
Integer conditions = i.getConditions();
if (1==conditions) {
if (1 == conditions) {
detailEntity.setQuestTarget(1);
} else if (2==conditions) {
} else if (2 == conditions) {
detailEntity.setQuestTarget(3);
}else if( 3==conditions){
} else if (3 == conditions) {
detailEntity.setQuestTarget(2);
}else{
log.warn(">>>>>>>>>>> 警告 错误的包件数据类型 ,{}",i);
} else {
log.warn(">>>>>>>>>>> 警告 错误的包件数据类型 ,{}", i);
return null;
}
@ -312,13 +312,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
private DistributionStockArticleEntity getCacheEntityByStockArticleId(DistributionParcelListEntity i) {
String key = CacheNames.tenantKeyObj(AuthUtil.getTenantId(),"getEntityByStockArticleId", i.getStockArticleId());
String key = CacheNames.tenantKeyObj(AuthUtil.getTenantId(), "getEntityByStockArticleId", i.getStockArticleId());
DistributionStockArticleEntity temp = bladeRedis.get(key);
if(ObjectUtils.isNotNull(temp)){
if (ObjectUtils.isNotNull(temp)) {
temp = distributionStockArticleClient.findEntityByStockArticleId(i.getStockArticleId());
if(ObjectUtils.isNotNull(temp)){
if (ObjectUtils.isNotNull(temp)) {
// 设定该条数据的缓存时间 10分钟
bladeRedis.setEx(key,temp,600L);
bladeRedis.setEx(key, temp, 600L);
}
}
@ -1007,6 +1007,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
questDetailEntityIPage.getRecords().forEach(i -> {
QuestDetailVO questDetailVO = new QuestDetailVO();
BeanUtil.copyProperties(i, questDetailVO);
if (StringUtil.isNotBlank(questDetailVO.getGroundingPositionCode())) {
questDetailVO.setPositionCode(questDetailVO.getGroundingPositionCode());
}
if (!i.getQuestStatus().equals(0)) {
R<List<User>> listR = userSearchClient.listByUser(String.valueOf(i.getUpdateUser()));
if (ObjectUtils.isNotNull(listR.getData())) {
@ -2988,11 +2993,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
private R<Object> extracted(Long questId, QuestDetailEntity questDetail) {
List<TaskQuestChildVO> taskQuestChildVOS = bladeRedis.get(RedisKeyConstant.TASK_QUEST_CHILD_KEY+questId);
List<TaskQuestChildVO> taskQuestChildVOS = bladeRedis.get(RedisKeyConstant.TASK_QUEST_CHILD_KEY + questId);
if (taskQuestChildVOS == null) {
taskQuestChildVOS = taskQuestChildService.selectlistByMasterId(questId);
if(taskQuestChildVOS!=null){
bladeRedis.setEx(RedisKeyConstant.TASK_QUEST_CHILD_KEY+questId, taskQuestChildVOS, 1000L);
if (taskQuestChildVOS != null) {
bladeRedis.setEx(RedisKeyConstant.TASK_QUEST_CHILD_KEY + questId, taskQuestChildVOS, 1000L);
}
}

Loading…
Cancel
Save