Browse Source

异常审核字段维护

single_db
汤建军 1 year ago
parent
commit
5c08df2a9a
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  3. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  4. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

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

@ -1056,7 +1056,7 @@
LEFT JOIN logpm_distribution_loadscan AS ldl ON ldla.package_id = ldl.package_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldla.package_id = ldpl.id
WHERE
ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId}
ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId} AND ldl.scan_status = 1
</select>
<select id="selectSignImgsUrl" resultType="com.logpm.distribution.vo.DistributionSignPrintVO">
SELECT * FROM logpm_distribution_sign_print WHERE reservation_id = #{reservationId} and is_deleted = 0

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

@ -603,7 +603,6 @@
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
LEFT JOIN order_use_num AS oun ON ldsa.id = oun.stock_article_id
<where>
ldsa.order_status in ('10','20','30','70')
and ldsa.reservation_status in ('10','20')

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java

@ -254,4 +254,10 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* @return
*/
R signforInPC(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO);
/**
* 维护签收异常状态
* @param aLong
*/
void maintenanceSignfor(Long aLong);
}

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

@ -610,6 +610,33 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.status(true);
}
@Override
@Transactional
public void maintenanceSignfor(Long reservationId) {
//签收
DistributionSignforEntity signforEntity = this.getOne(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getReservationId, reservationId)
);
if (Func.isEmpty(signforEntity)){
log.error("维护签收异常是否存在异常包件失败");
return;
}
List<DistributionLoadscanAbnormalEntity> loadscanAbnormalEntityList = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getReservationId, reservationId)
);
if (Func.isNotEmpty(loadscanAbnormalEntityList)){
//查看当前客户是否都已经完成审核
boolean flag = loadscanAbnormalEntityList.stream().allMatch(p -> p.getAuditingStatus().equals(LoadingAbnormalAuditingStatusConstant.yishenhe.getValue()));
if (flag){
signforEntity.setIsHaveAbnormalPackage(1);
}else {
signforEntity.setIsHaveAbnormalPackage(2);
}
}
this.updateById(signforEntity);
}
private boolean judgmentSignIsHavePackage(Long reservationId) {
boolean flag = false;
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId);
@ -3310,6 +3337,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
@Override
@Transactional
public R loadingAbnormalPackageListAuditing(String ids) {
// ------------------------------------2023-09-27 异常装车包件审核----------------------------------------------
// 思路:
@ -3320,6 +3348,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("#############异常包件信息异常:{}", distributionLoadscanAbnormalEntities);
return R.fail(3000, "审核失败");
}
List<Long> reservationId = distributionLoadscanAbnormalEntities.stream().distinct().map(DistributionLoadscanAbnormalEntity::getReservationId).collect(Collectors.toList());
if (distributionLoadscanAbnormalEntities.size() == 1) {
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = distributionLoadscanAbnormalEntities.get(0);
//需要将该包件追加至该客户之下
@ -3370,6 +3399,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanAbnormalEntity.getDeliveryListId())
.eq(DistributionLoadscanEntity::getPackageId, distributionLoadscanAbnormalEntity.getPackageId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, distributionLoadscanAbnormalEntity.getPackageCode())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
loadscanEntity.setIsAbnormalLoading(1);
if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){
@ -3431,6 +3461,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
//批量审核
}
//维护签收的异常签收状态
this.maintenanceSignfor(reservationId.get(0));
return R.success("操作成功");
}

Loading…
Cancel
Save