Browse Source

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

dist.1.3.0
zhaoqiaobo 10 months ago
parent
commit
a10eee87d4
  1. 72
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/config/RedissonConfig.java
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 168
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  6. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  7. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  8. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  9. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

72
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/config/RedissonConfig.java

@ -1,36 +1,36 @@
//package com.logpm.distribution.config;
//
//import org.redisson.Redisson;
//import org.redisson.config.Config;
//import org.springblade.core.redis.cache.BladeRedis;
//import org.springblade.core.tool.utils.SpringUtil;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.connection.RedisConnectionFactory;
//import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
//import org.springframework.stereotype.Component;
//
//@Configuration
//public class RedissonConfig {
//
// @Bean
// public Redisson redisson() {
// // 单机模式
// Config config = new Config();
//
// BladeRedis bean = SpringUtil.getBean(BladeRedis.class);
//
// RedisConnectionFactory connectionFactory = bean.getRedisTemplate().getConnectionFactory();
//
// LettuceConnectionFactory factory = (LettuceConnectionFactory) connectionFactory;
//
// String hostName = factory.getHostName();
// int port = factory.getPort();
// String password = factory.getPassword();
//
// config.useSingleServer().setAddress("redis://"+hostName+":"+port).setDatabase(1);
// config.useSingleServer().setPassword(password);
// return (Redisson) Redisson.create(config);
// }
//
//}
package com.logpm.distribution.config;
import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.utils.SpringUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.stereotype.Component;
@Configuration
public class RedissonConfig {
@Bean
public Redisson redisson() {
// 单机模式
Config config = new Config();
BladeRedis bean = SpringUtil.getBean(BladeRedis.class);
RedisConnectionFactory connectionFactory = bean.getRedisTemplate().getConnectionFactory();
LettuceConnectionFactory factory = (LettuceConnectionFactory) connectionFactory;
String hostName = factory.getHostName();
int port = factory.getPort();
String password = factory.getPassword();
config.useSingleServer().setAddress("redis://"+hostName+":"+port).setDatabase(1);
config.useSingleServer().setPassword(password);
return (Redisson) Redisson.create(config);
}
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java

@ -253,7 +253,6 @@ public interface IDistributionReservationService extends BaseService<Distributio
/**
* 维护预约计划状态
* @param reservationId
* @param warehouseId
*/
void maintenanceReservationInfo(Long reservationId);

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

@ -2986,7 +2986,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
distributionReservationPackageEntities.forEach(rp->{
String content = "包件在"+warehouse.getName()+"由"+ AuthUtil.getUser().getNickName()+"转车次任务,操作方式:批量预约任务转配送,车次号:"+trainNumber;
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",rp.getTenantId());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",user.getUserId());
trunklinePackageTrackLog.put("updateUser",user.getUserId());

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

@ -963,7 +963,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
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());

168
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);
}
@ -1405,6 +1405,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//这里查询出该订单下已经被选取的包件信息
List<DistributionParcelListEntity> packageVOList = distributionReservationPackageMapper.selectPackageVOList(reservationEntity.getId(), s.getId());
s.setPackageList(DistributionParcelListWrapper.build().listVO(packageVOList));
s.setReservationNum(pageVOList.size());
} else {
List<DistributionParcelNumberVO> parcelNumberVOS = baseMapper.selectReservationZeroOrderDetail(s.getId(), Long.parseLong(reservationId));
s.setParcelNumberVOS(parcelNumberVOS);
@ -1445,10 +1446,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
List<Long> mallId = new ArrayList<>();
HashSet<String> storeName = new HashSet<>();
HashSet<String> receivingUnit = new HashSet<>();
List<String> addOrderPackageCodes = new ArrayList<>();
List<String> cancelOrderPackageCodes = new ArrayList<>();
List<JSONObject> addPackageLog = new ArrayList<>();
List<JSONObject> cancelPackageLog = new ArrayList<>();
List<JSONObject> aaa = new ArrayList<>();
newStockArticle.forEach((k, v) -> {
List<Long> packageLockIds = new ArrayList<>();
if (Func.isEmpty(oldStockArticle.get(k))) {
@ -1475,22 +1473,21 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:新增订单选中包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",reservationEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",reservationEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",reservationEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",reservationEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",reservationEntity.getStatus());
trunklinePackageTrackLog.put("createDept",reservationEntity.getCreateDept());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("updateUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",myCurrentWarehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",p.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",reservationEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",reservationEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DELIVERY.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
addPackageLog.add(trunklinePackageTrackLog);
addOrderPackageCodes.add(p.getOrderPackageCode());
aaa.add(trunklinePackageTrackLog);
});
} else {
//添加此订单可用所有包件数量
@ -1514,42 +1511,35 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//此时订单下的所有包件都处于预约状态,可用数为0
packageNum.getAndAdd(dp.getQuantity());
//修改订单下的包件状态
// p.setOrderPackageReservationStatus();
dp.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionParcelListService.updateById(dp);
distributionAsyncService.checkStockArticleReservationStatus(dp);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:新增订单系统默认选中,预约任务号:"+reservationEntity.getReservationCode();
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:新增订单系统默认选中可用包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",reservationEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",reservationEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",reservationEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",reservationEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",reservationEntity.getStatus());
trunklinePackageTrackLog.put("createDept",reservationEntity.getCreateDept());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",myCurrentWarehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",dp.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",reservationEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",reservationEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DELIVERY.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
addPackageLog.add(trunklinePackageTrackLog);
addOrderPackageCodes.add(dp.getOrderPackageCode());
aaa.add(trunklinePackageTrackLog);
}
}
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
});
// distributionStockArticleDTO.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
// distributionStockArticleDTO.setAvailableQuantity(0);
// distributionStockArticleService.updateById(stockArticleEntity);
DistributionStockArticleEntity stockArticleEntity = Func.copy(distributionStockArticleDTO, DistributionStockArticleEntity.class);
if (Func.isNotEmpty(stockArticleEntity)){
//维护订单状态
distributionStockArticleService.updateOrderInfo(stockArticleEntity.getOrderCode(),myCurrentWarehouse.getId());
//维护配送数量
}
}
} else {
@ -1662,6 +1652,23 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(distributionParcelListEntity.getId());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionParcelListService.updateById(parcelListEntity);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:订单选中包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",myCurrentWarehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",parcelListEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.CANCEL_DELIVERY.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
aaa.add(trunklinePackageTrackLog);
} else {
//数量维护
packageNum.getAndAdd(distributionParcelListEntity.getQuantity());
@ -1681,24 +1688,21 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划市配配送,操作方式:取消选中包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",reservationEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",reservationEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",reservationEntity.getUpdateTime());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",reservationEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",reservationEntity.getStatus());
trunklinePackageTrackLog.put("createDept",reservationEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",parcelListEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",reservationEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",reservationEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.CANCEL_DELIVERY.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
cancelPackageLog.add(trunklinePackageTrackLog);
cancelOrderPackageCodes.add(parcelListEntity.getOrderPackageCode());
aaa.add(trunklinePackageTrackLog);
distributionParcelListService.updateById(parcelListEntity);
if (Func.isNotEmpty(bladeRedis.get("warehouseId:"+myCurrentWarehouse.getId()+"orderCode:"+parcelListEntity.getOrderCode()))){
List<Long> ids = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "orderCode:" + parcelListEntity.getOrderCode());
@ -1708,7 +1712,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + "orderCode:" + parcelListEntity.getOrderCode(),ids,1*60L);
}
}
//移除缓存
});
reservationStockarticleEntity.setReservationNum(packageNum.get());
distributionReservationStockarticleService.updateById(reservationStockarticleEntity);
@ -1804,10 +1807,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
storeName.add(distributionStockArticleDTO.getStoreName());
}
receivingUnit.add(distributionStockArticleDTO.getConsigneeUnit());
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(distributionStockArticleDTO.getId());
// stockArticleEntity.setReservationStatus(status);
// distributionStockArticleService.updateById(stockArticleEntity);
}
//添加缓存
if (!packageLockIds.isEmpty()){
@ -1827,16 +1826,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
}
});
if (!addOrderPackageCodes.isEmpty()) {
log.info(">>>>>>>>>>>>>>>>>>>推送新增日志");
trunklinePackageTrackLogClient.addPackageTrackLog(addPackageLog);
}
if (Func.isNotEmpty(oldStockArticle)) {
oldStockArticle.forEach((i, j) -> {
//这里就是需要进行取消的订单信息
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(i);
DistributionReservationStockarticleEntity reservationStockarticleEntity = j.get(0);
if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())) {
reservationStockarticleEntity.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue());
@ -1846,22 +1840,21 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationPackageService.updateById(p);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划市配配送,操作方式:取消订单,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",reservationEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",reservationEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",reservationEntity.getUpdateTime());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",reservationEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",reservationEntity.getStatus());
trunklinePackageTrackLog.put("createDept",reservationEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",p.getPacketBarCode());
trunklinePackageTrackLog.put("warehouseId",reservationEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",reservationEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.CANCEL_DELIVERY.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
cancelPackageLog.add(trunklinePackageTrackLog);
cancelOrderPackageCodes.add(p.getPacketBarCode());
aaa.add(trunklinePackageTrackLog);
reduceTotal.getAndAdd(distributionParcelListService.getById(p.getParceListId()).getQuantity());
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(p.getParceListId());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
@ -1898,9 +1891,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationStockarticleService.updateById(reservationStockarticleEntity);
});
}
if (!cancelOrderPackageCodes.isEmpty()) {
log.info(">>>>>>>>>>>>>>>>>>>推送取消日志");
trunklinePackageTrackLogClient.addPackageTrackLog(cancelPackageLog);
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
//库存品修改
//查询出原来的库存品信息
@ -2614,7 +2606,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
.eq(DistributionReservationStockarticleEntity::getReservationId, reservationEntity.getId())
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue()));
if (Func.isNotEmpty(reservationStockarticleEntityList) && reservationStockarticleEntityList.size() > 0) {
List<String> orderPackageCodes = new ArrayList<>();
List<JSONObject> aaa = new ArrayList<>();
reservationStockarticleEntityList.forEach(rs -> {
rs.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue());
@ -2638,24 +2629,21 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// distributionAsyncService.checkStockArticleReservationStatus(parcelListEntity);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消配送,操作方式:取消配送任务,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",reservationEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",reservationEntity.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",reservationEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",reservationEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",reservationEntity.getStatus());
trunklinePackageTrackLog.put("createDept",reservationEntity.getCreateDept());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateUser",AuthUtil.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",myCurrentWarehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",rp.getPacketBarCode());
trunklinePackageTrackLog.put("warehouseId",reservationEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",reservationEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(rp.getPacketBarCode());
} else {
log.error("#################错误包件ID:{}", rp.getParceListId());
}
@ -3064,6 +3052,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setReservationStatus(ReservationStatusConstant.yiqueren.getValue());
//新建预约单订单处于未备货状态
reservationEntity.setStockupStatus(ReservationStockupStatusConstant.weibeihuo.getValue());
reservationEntity.setReservationCode(reservationMa());
this.save(reservationEntity);
//获取新增预约信息的编号
Long reservationId = reservationEntity.getId();
@ -3191,7 +3180,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
orderPackageCodes.add(dp.getOrderPackageCode());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"计划配送,操作方式:系统默认全部包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",reservationEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",reservationEntity.getUpdateUser());
@ -3200,8 +3189,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
trunklinePackageTrackLog.put("status",reservationEntity.getStatus());
trunklinePackageTrackLog.put("createDept",reservationEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",dp.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",reservationEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",reservationEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
@ -3229,7 +3218,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
orderPackageCodes.add(p.getOrderPackageCode());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"计划市配配送,操作方式:选择包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("tenantId",AuthUtil.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",reservationEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",reservationEntity.getUpdateUser());
@ -3487,7 +3476,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} else {
reservationEntity.setFee(new BigDecimal(0));
}
reservationEntity.setReservationCode(reservationMa());
//设置预约为市配
reservationEntity.setDeliveryType(DistributionTypeConstant.shipie.getValue());
reservationEntity.setReservationNum(packageTotal.get());
@ -3643,13 +3631,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
boolean stockUpStatus = false;
if (Func.isNotEmpty(distributionParcelListEntities)){
loadStatus = distributionParcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
signStatus = distributionParcelListEntities.stream().allMatch(p->p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
// signStatus = distributionParcelListEntities.stream().allMatch(p->p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
stockUpStatus = distributionParcelListEntities.stream().allMatch(p->p.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue()));
}
if (Func.isNotEmpty(disStockListDetailEntities)){
loadStatus = disStockListDetailEntities.stream().allMatch(p -> p.getStockLockingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
signStatus = disStockListDetailEntities.stream().anyMatch(p->p.getStockSignfoStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
// signStatus = disStockListDetailEntities.stream().anyMatch(p->p.getStockSignfoStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
stockUpStatus = disStockListDetailEntities.stream().allMatch(p->p.getStockStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue()));
}

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

@ -3152,20 +3152,20 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity = loadscanEntityList.get(0);
}else {
log.error("##############异常签收包件在其他车次进行装车reservationId:{}", loadscanEntityList.stream().map(DistributionLoadscanEntity::getReservationId).map(String::valueOf).collect(Collectors.joining(",")));
return Resp.scanFail("操作失败", "包件已出库");
return Resp.scanFail("操作失败", "该包件已在其它车次进行装车");
}
}
if (loadscanEntityList.size() > 1){
log.error("##############异常签收包件在其他车次进行装车reservationId:{}", loadscanEntityList.stream().map(DistributionLoadscanEntity::getReservationId).map(String::valueOf).collect(Collectors.joining(",")));
return Resp.scanFail("操作失败", "包件已出库");
return Resp.scanFail("操作失败", "该包件已在其它车次进行装车");
}
}
if (Func.isNotEmpty(loadscanEntity)) {
if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
return Resp.scanFail("重复操作!!", "重复操作");
if (LoadScanSigningStatusConstant.yiqianshou.getValue().equals(loadscanEntity.getSignforState())) {
return Resp.scanFail("重复操作!!", "重复扫码");
}
}
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"扫描异常签收,装车方式:补录装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
@ -3179,6 +3179,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(loadscanEntity)) {
distributionLoadscanEntity = loadscanEntity;
}
if (StringUtils.isNotBlank(distributionDeliverySelfEntity.getDriverPhone())) {
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java

@ -505,6 +505,9 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
//如果send_order_status = 1 则修改工单记录
for (AftersalesAbnormalRecordEntity abnormalRecordEntity : abnormalRecordEntities) {
Integer sendOrderStatus = abnormalRecordEntity.getSendOrderStatus();
if(Objects.isNull(sendOrderStatus)){
continue;
}
if(sendOrderStatus == 1){
//修改对应工单记录

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

@ -1443,6 +1443,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//把lineCarsOrderList中的所有运单号合并成一个集合
List<String> waybillNos = addList.stream().map(TrunklineCarsOrderDTO::getWaybillNo).collect(Collectors.toList());
if(waybillNos.isEmpty()){
log.warn("##########saveNew: 运单有变动,请重新做计划");
throw new CustomerException(400, "运单有变动,请重新做计划");
}
List<WarehouseWaybillEntity> freezeOrAbolishWaybillList = warehouseWaybillClient.findFreezeOrAbolishByWaybillNos(waybillNos);
if (!CollUtil.isEmpty(freezeOrAbolishWaybillList)) {
log.warn("##########saveNew: 运单有变动,请重新做计划");

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

@ -168,7 +168,12 @@ public class TrunklineWaybillPackageServiceImpl extends BaseServiceImpl<Trunklin
QueryWrapper<TrunklineWaybillPackageEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_package_code",orderPackageCode)
.eq("is_deleted",0);
TrunklineWaybillPackageEntity waybillPackageEntity = baseMapper.selectOne(queryWrapper);
List<TrunklineWaybillPackageEntity> trunklineWaybillPackageEntities = baseMapper.selectList(queryWrapper);
if(trunklineWaybillPackageEntities.isEmpty()){
continue;
}
TrunklineWaybillPackageEntity waybillPackageEntity = trunklineWaybillPackageEntities.get(0);
if(Objects.isNull(waybillPackageEntity)){
continue;
}

Loading…
Cancel
Save