Browse Source

预约备货多次提交限制

single_db
汤建军 1 year ago
parent
commit
a4c34130e4
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  2. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  3. 3
      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/DistributionDeliveryListMapper.xml

@ -774,7 +774,7 @@
</if>
</where>
/*ORDER BY lddl.create_time DESC*/
ORDER BY lddl.create_time DESC
</select>
<select id="getDeliveryStockArticleInfo" resultType="com.logpm.distribution.vo.DistributionStockArticleVO">
SELECT

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

@ -980,9 +980,23 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
return R.fail("请先选择作业仓库!!!");
}
boolean result = false;
if (Func.isEmpty(stockUpInfo.get("ids"))) {
log.error("参数异常:+{" + stockUpInfo.get("ids") + "}");
return R.fail("服务器正忙!!!");
}
String ids = (String) stockUpInfo.get("ids");
List<Long> list = Func.toLongList(",", ids);
List<DistributionReservationEntity> distributionReservationEntities = this.listByIds(list);
if (Func.isNotEmpty(distributionReservationEntities)){
//查询此次进行提交的预约是否已经进行备货任务的提交
List<DistributionReservationEntity> yijingbeihuo = distributionReservationEntities.stream().filter(p -> p.getStockupStatus().equals(ReservationStockupStatusConstant.daibeihuo.getValue())).collect(Collectors.toList());
if (Func.isNotEmpty(yijingbeihuo) && yijingbeihuo.size() >=1){
String errorReservationCode = yijingbeihuo.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(","));
return R.fail("预约单号:"+errorReservationCode+"已经提交过备货任务!!!");
}
}
try {
//获取前端携带批量转备货的id
String ids = (String) stockUpInfo.get("ids");
//完成对备货表数据的保存
String stockUpDate = (String) stockUpInfo.get("stockupDate");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");

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

@ -632,7 +632,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}else {
signforEntity.setIsHaveAbnormalPackage(2);
}
}
this.updateById(signforEntity);
}
@ -1584,7 +1583,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//查询这个包件是否满足该客户的要求
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId());
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(reservationEntity.getId());
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity();
@ -1769,6 +1767,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity);
}
//修改对应的签收为可审核
DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(reservationEntity.getId());
signforEntity.setIsHaveAbnormalPackage(2);
this.updateById(signforEntity);
//修改包件的签收数量

Loading…
Cancel
Save