Browse Source

增加签收方式、调整异常审核列表逻辑

dist.1.3.0
汤建军 7 months ago
parent
commit
6b342e81d5
  1. 46
      blade-biz-common/src/main/java/org/springblade/common/constant/loading/LoadScanSigningTypeStatusConstant.java
  2. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanEntity.java
  3. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java
  4. 10
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java
  5. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  6. 18
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  7. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  8. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

46
blade-biz-common/src/main/java/org/springblade/common/constant/loading/LoadScanSigningTypeStatusConstant.java

@ -0,0 +1,46 @@
package org.springblade.common.constant.loading;
/**
* 订单冻结状态枚举
* 对应码表 freeze_status
* @author pref
*/
public enum LoadScanSigningTypeStatusConstant {
sijiqianshou("司机签收",1),
sijipiliangqianshou("司机批量签收",2),
wenyuanpiliangqianshou("文员批量签收",3);
/**
* 状态
*/
private String name;
/**
*
*/
private Integer value;
private LoadScanSigningTypeStatusConstant(String name, Integer value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
}

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanEntity.java

@ -354,4 +354,10 @@ public class DistributionLoadscanEntity extends TenantEntity {
*/
@ApiModelProperty(value = "是否异常装车 1-否 2-是")
private Integer isZero;
/**
* 签收方式
*/
@ApiModelProperty(value = "签收方式")
private Integer signforType;
}

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java

@ -335,4 +335,10 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
@ApiModelProperty(value = "是否一键签收(1-不是,2-是)")
private Long signingUserId;
/**
* 签收方式
*/
@ApiModelProperty(value = "签收方式")
private Integer signforType;
}

10
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java

@ -67,11 +67,17 @@ public class DistributionLoadscanAbnormalVO extends DistributionLoadscanAbnormal
private String signingUser;
/**
* 是否异常签收
* 异常签收
*/
@ApiModelProperty(value = "签收")
@ApiModelProperty(value = "异常签收")
private Integer isAbnormalSigning;
/**
* 异常装车
*/
@ApiModelProperty(value = "异常装车")
private Integer isAbnormalLoading;
/**
* 一级品
*/

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -1106,6 +1106,7 @@
ldl.signing_time AS signingTime,
ldl.signing_user AS signingUser,
ldl.is_abnormal_signing AS isAbnormalSigning,
ldl.is_abnormal_loading AS isAbnormalLoading,
ldpl.firsts AS firsts,
ldpl.second AS `second`,
ldpl.third_product AS thirdProduct,

18
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -195,6 +195,23 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
log.info("loadscanEntity.getScanStatus() does not meet matching conditions: {}", loadscanEntity.getScanStatus());
break;
}
if (Func.isEmpty(loadscanEntity.getIsSignfor())){
switch (loadscanEntity.getScanStatus()) {
case "1":
parcel.setScanStatus(LoadingStatusConstant.quxiao.getName());
break;
case "2":
parcel.setScanStatus(LoadingStatusConstant.saomiao.getName());
break;
case "3":
parcel.setScanStatus(LoadingStatusConstant.queren.getName());
break;
default:
log.info("loadscanEntity.getIsSignfor() does not meet matching conditions: {}", loadscanEntity.getScanStatus());
break;
}
}
if (Func.isNotEmpty(loadscanEntity.getSigningTime())) {
parcel.setSigningTime(loadscanEntity.getSigningTime());
}
@ -207,6 +224,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(loadscanEntity.getSigningUser())) {
parcel.setSigningUser(loadscanEntity.getSigningUser());
}
}

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

@ -798,8 +798,33 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else if (parcelListEntityList.isEmpty()) {
//查找出该包件信息
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getOne(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()).eq(DistributionParcelListEntity::getWarehouseId, myCurrentWarehouse.getId()));
List<DistributionLoadscanAbnormalEntity> isMayList = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
.eq(DistributionLoadscanAbnormalEntity::getPackageId, parcelListEntity.getId())
//修改 状态
);
if (!isMayList.isEmpty()) {
//这里需要判定文员是否对该异常进行驳回操作
List<DistributionLoadscanAbnormalEntity> LoadscanAbnormalEntityList = isMayList.stream().filter(f -> distributionDeliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList());
if (!LoadscanAbnormalEntityList.isEmpty()) {
//存在异常操作
if (LoadscanAbnormalEntityList.size() == 1) {
//判断是否进行审核以及驳货操作
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = LoadscanAbnormalEntityList.get(0);
if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)) {
return Resp.scanFail("包件异常已驳回,请滞留回库", "包件异常已驳回,请滞留回库");
}
}
}
}
List<DistributionReservationEntity> reservationEntityList = distributionDeliveryListMapper.selectReservationByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (!reservationEntityList.isEmpty()) {
boolean shangpeiFlag = reservationEntityList.stream().allMatch(r -> r.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue()));

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

@ -70,10 +70,7 @@ import org.springblade.common.constant.billLading.BillLadingStatusConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant;
import org.springblade.common.constant.delivery.DeliveryStatusConstant;
import org.springblade.common.constant.loading.LoadScanSigningStatusConstant;
import org.springblade.common.constant.loading.LoadingAbnormalAuditingStatusConstant;
import org.springblade.common.constant.loading.LoadingIsInsertConstant;
import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.loading.*;
import org.springblade.common.constant.orderpackage.*;
import org.springblade.common.constant.reservation.*;
import org.springblade.common.constant.signing.SignforDriverSigningStatusConstant;
@ -1710,6 +1707,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
private List<DeliveryNodeVo> handleStockUp(DistributionStockupEntity distributionStockupEntity) {
List<DeliveryNodeVo> nodeVos = new ArrayList<>();
try {
@ -2498,6 +2497,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
List<Long> packageLockIds = new ArrayList<>();
try {
@ -3335,6 +3335,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setReservationId(distrilbutionloadingscanDTO.getReservationId());
distributionLoadscanEntity.setDeliveryId(distrilbutionloadingscanDTO.getDeliveryId());
distributionLoadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue());
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue());
distributionLoadscanEntity.setScanUser(AuthUtil.getUser().getNickName());
distributionLoadscanEntity.setSigningUser(AuthUtil.getUser().getNickName());
distributionLoadscanEntity.setSigningUserId(AuthUtil.getUser().getUserId());
@ -3920,6 +3921,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<DistributionStockArticleEntity> distributionStockArticleEntities = distributionStockArticleService.listByIds(orderIds);
List<DistributionReservationStockarticleEntity> reservationOrders = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.eq(DistributionReservationStockarticleEntity::getReservationId, distributionDeliveryList.getReservationId())
.in(DistributionReservationStockarticleEntity::getStockArticleId, orderIds)
@ -4059,7 +4061,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
/**
* 寻找预约单中订单
*
* @param reservationOrders
* @param id
* @return
@ -5233,6 +5234,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setReservationId(distributionSignforEntity.getReservationId());
loadscanEntity.setScanUser(user.getNickName());
loadscanEntity.setScanTime(signingTime);
loadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijipiliangqianshou.getValue());
loadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
loadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
loadscanEntity.setPackageNub(parcelListEntity.getQuantity());
@ -5291,6 +5294,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntities.setReceivedQuantity(parcelListEntity.getQuantity());
loadscanEntities.setOneClick(1);
loadscanEntities.setOneQclick(2);
loadscanEntities.setSignforType(LoadScanSigningTypeStatusConstant.sijipiliangqianshou.getValue());
loadscanEntities.setSigningUser(user.getNickName());
loadscanEntities.setSigningUserId(user.getUserId());
loadscanEntities.setReceivedQuantity(parcelListEntity.getQuantity());
@ -6023,6 +6027,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setScanTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSigningUser(user.getNickName());
distributionLoadscanEntity.setSigningUserId(user.getUserId());
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue());
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSigningUser(user.getNickName());
loadingNumber += distributionLoadscanEntity.getLoadedNub();
@ -6363,6 +6368,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return selectDistributionSignforPageCount;
}
@Override
@ -6629,10 +6635,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//维护相关的订单信息
distributionStockArticleService.maintenanceOrderInfoByIds(orderIds);
return R.success("异常驳回成功");
}
private void buildNameAndPhone(List<SignPushDataUnitDTO> pushOldPackageSigning) {
for (SignPushDataUnitDTO signPushDataUnitDTO : pushOldPackageSigning) {
User user = bladeRedis.get(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getAdministratorsId());
@ -6662,10 +6666,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
private void buildReservationNameAndPhone(List<SignPushDataContactDTO> customers) {
for (SignPushDataContactDTO signPushDataUnitDTO : customers) {
User user = bladeRedis.get(RedisKeyConstant.USER_NAME_PHONE_KEY + signPushDataUnitDTO.getSignUserId());
log.info("buildNameAndPhone >>> 获取缓存的中的用户信息{}", user);
log.info("buildNameAndPhone >>> 获取缓存的中的用户信息{}",user);
if (user == null) {
R<User> userT = userClient.userInfoById(signPushDataUnitDTO.getSignUserId());
if (userT.isSuccess()) {
@ -6676,13 +6681,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (ObjectUtils.isNotNull(user)) {
assert user != null;
signPushDataUnitDTO.setSignUserName(user.getName());
if (ObjectUtils.isNotEmpty(user.getPhone())) {
if (ObjectUtils.isNotEmpty(user.getPhone())){
signPushDataUnitDTO.setSignUserPhone(user.getPhone());
} else {
if (ObjectUtils.isNotEmpty(user.getAccount())) {
}else {
if (ObjectUtils.isNotEmpty(user.getAccount())){
signPushDataUnitDTO.setSignUserPhone(user.getAccount());
} else {
log.info("用户无电话号码且账号信息为空>>用户名称:{}", user.getName());
}else {
log.info("用户无电话号码且账号信息为空>>用户名称:{}",user.getName());
}
}
}

Loading…
Cancel
Save