Browse Source

增加对当前登陆人的判断

和状态变换方法提取
single_db
pref_mail@163.com 1 year ago
parent
commit
62a96cb530
  1. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  2. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -183,8 +183,12 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
.eq("is_deleted",0);
DistributionParcelListEntity parcelListEntity = baseMapper.selectOne(queryWrapper);
parcelListEntity.setOrderPackageGroundingStatus(groundingStatus);
int i = baseMapper.updateById(parcelListEntity);
if (i == 1){
// int i = baseMapper.updateById(parcelListEntity);
try{
// 更新状态
baseMapper.updateOrderPackageCodeById(parcelListEntity.getId(),groundingStatus);
String orderCode = parcelListEntity.getOrderCode();
QueryWrapper<DistributionStockArticleEntity> stockArticleEntityQueryWrapper = new QueryWrapper<>();
@ -210,7 +214,15 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
//更新订单上架状态
baseMapper.updateOrderGroundingStatus(orderCode,"20",warehouseId);
}
}catch (Exception e){
// 更新状态报错
log.error(">>>>>> updateGroundingStatus 异常信息",e);
}
}
/**

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

@ -704,8 +704,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setSigningTime(signingTime);
loadscanEntity.setSignforState(2);
loadscanEntity.setReceivedQuantity(loadscanEntity.getLoadedNub());
loadscanEntity.setSigningUser(AuthUtil.getUser().getNickName());
loadscanEntity.setSigningUserId(AuthUtil.getUser().getUserId());
String nickName = AuthUtil.getNickName();
Long userId = AuthUtil.getUserId();
try{
nickName = AuthUtil.getNickName();
userId = AuthUtil.getUserId();
}catch (Exception e){
log.error(">>>>> 签收异常报错",e);
throw new CustomerException("当前登录信息不已失效,请重新登录");
}
loadscanEntity.setSigningUser(nickName);
loadscanEntity.setSigningUserId(userId);
distributionLoadscanService.updateById(loadscanEntity);
//缺少一个异步维护包件签收的方法
// distributionAsyncService.changeOrderSignforStatus(collect.get(0));

Loading…
Cancel
Save