Browse Source

零担PC签收BUG修复

master
汤建军 9 months ago
parent
commit
3e433c5635
  1. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  2. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  3. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

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

@ -118,6 +118,7 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
Long selectIdByOrderId(Long id); Long selectIdByOrderId(Long id);
Integer updateloadByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub); Integer updateloadByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
Integer updateLnumAndSnumByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub1") Integer nub1,@Param("nub2") Integer nub2);
Integer updateloadreduceByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub); Integer updateloadreduceByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("nub") Integer nub);
/** /**

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

@ -46,6 +46,12 @@
UPDATE logpm_distribution_signfor lds set lds.loaded_number = ( lds.loaded_number + #{nub} ) WHERE UPDATE logpm_distribution_signfor lds set lds.loaded_number = ( lds.loaded_number + #{nub} ) WHERE
lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId} lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}
</update> </update>
<update id="updateLnumAndSnumByReservationId">
UPDATE logpm_distribution_signfor lds set lds.loaded_number = ( lds.loaded_number + #{nub1} ),lds.received_quantity = ( lds.received_quantity + #{nub2}
) WHERE
lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}
</update>
<update id="updateloadByinvn"> <update id="updateloadByinvn">
UPDATE logpm_distribution_signfor lds set lds.loadedin_number = ( lds.loadedin_number + #{nub} ) WHERE UPDATE logpm_distribution_signfor lds set lds.loadedin_number = ( lds.loadedin_number + #{nub} ) WHERE
lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId} lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id = #{deliveryId}

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

@ -1069,6 +1069,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.in(DistributionLoadscanEntity::getPackageId, reservationZeroPackageEntity.getParcelListId()) .in(DistributionLoadscanEntity::getPackageId, reservationZeroPackageEntity.getParcelListId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
); );
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
if (Func.isEmpty(loadscanEntity)) { if (Func.isEmpty(loadscanEntity)) {
if ("1".equals(deliveryListEntity.getKind())) { if ("1".equals(deliveryListEntity.getKind())) {
//自主配送 //自主配送
@ -1089,7 +1090,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
d = distributionParcelNumberEntity.getDeliveryQuantity() - reservationZeroPackageEntity.getQuantity(); d = distributionParcelNumberEntity.getDeliveryQuantity() - reservationZeroPackageEntity.getQuantity();
//未进行装车操作 //未进行装车操作
DistributionLoadscanEntity unLoadscanEntity = new DistributionLoadscanEntity(); DistributionLoadscanEntity unLoadscanEntity = new DistributionLoadscanEntity();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
unLoadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue()); unLoadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue());
unLoadscanEntity.setIsInsert(2); unLoadscanEntity.setIsInsert(2);
unLoadscanEntity.setLoadingId(loadingId.toString()); unLoadscanEntity.setLoadingId(loadingId.toString());
@ -1140,7 +1140,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
c = distributionParcelNumberEntity.getOutboundQuantity() - loadscanEntity.getReceivedQuantity() + reservationZeroPackageEntity.getQuantity(); c = distributionParcelNumberEntity.getOutboundQuantity() - loadscanEntity.getReceivedQuantity() + reservationZeroPackageEntity.getQuantity();
d = distributionParcelNumberEntity.getDeliveryQuantity() + loadscanEntity.getReceivedQuantity() - reservationZeroPackageEntity.getQuantity(); d = distributionParcelNumberEntity.getDeliveryQuantity() + loadscanEntity.getReceivedQuantity() - reservationZeroPackageEntity.getQuantity();
//存在装车操作 //存在装车操作
//计算差值
int i1 = reservationZeroPackageEntity.getQuantity() - loadscanEntity.getLoadedNub();
loadscanEntity.setSigningUser(user.getNickName()); loadscanEntity.setSigningUser(user.getNickName());
loadscanEntity.setSigningUserId(user.getUserId());
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscanEntity.setIsSignfor(2); loadscanEntity.setIsSignfor(2);
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
// loadscanEntity.setSigningTime(new Date().toString()); // loadscanEntity.setSigningTime(new Date().toString());
@ -1153,6 +1157,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionParcelNumberEntity.setSigninQuantity(b); distributionParcelNumberEntity.setSigninQuantity(b);
distributionParcelNumberEntity.setOutboundQuantity(c); distributionParcelNumberEntity.setOutboundQuantity(c);
distributionParcelNumberEntity.setDeliveryQuantity(d); distributionParcelNumberEntity.setDeliveryQuantity(d);
//更新装车信息
//获取计划和当前装车的差值
//更新装车数量
distributionSignforMapper.updateLnumAndSnumByReservationId(loadscanEntity.getDeliveryId(),loadscanEntity.getReservationId(),i1,reservationZeroPackageEntity.getQuantity());
} }
distributionParcelListService.maintenanceZeroPackageInfo(distributionParcelNumberEntity.getParcelListId(), stockArticleEntity.getWarehouseId()); distributionParcelListService.maintenanceZeroPackageInfo(distributionParcelNumberEntity.getParcelListId(), stockArticleEntity.getWarehouseId());
@ -1332,6 +1340,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//存在装车操作 //存在装车操作
loadscanEntity.setSigningUser(user.getNickName()); loadscanEntity.setSigningUser(user.getNickName());
loadscanEntity.setIsSignfor(2); loadscanEntity.setIsSignfor(2);
loadscanEntity.setIsZero(1);
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
// loadscanEntity.setSigningTime(new Date().toString()); // loadscanEntity.setSigningTime(new Date().toString());
loadscanEntity.setReceivedQuantity(reservationZeroPackageEntities.getQuantity()); loadscanEntity.setReceivedQuantity(reservationZeroPackageEntities.getQuantity());

Loading…
Cancel
Save