|
@@ -402,6 +402,7 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
|
|
|
case RECEIVE:
|
|
|
// 变更为已签收状态(设备发货列表点击签收触发||sop现场测试签收 -> DELIVER -> RECEIVE)
|
|
|
// 入库签收终止该入库记录的生命周期(出库签收不终止,设备发货出库生命周期的终止是在设备出库提交,生成设备发货入库记录时触发)
|
|
|
+ List<Long> needAutoReceiveIdList = new ArrayList<>();
|
|
|
if (tbDeviceDeliveryList.stream()
|
|
|
.anyMatch(e -> !DeviceDeliveryStatusEnum.DELIVER.equals(e.getStatus()) || !e.getEffect())) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(
|
|
@@ -422,9 +423,12 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
|
|
|
if (DeviceUsageTypeEnum.PROJECT.equals(e.getUsageType())) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("项目用途的设备不能手动签收(sop现场环境测试签收)");
|
|
|
}
|
|
|
- this.autoOutDeviceForTrain(deviceDeliveryIdList);
|
|
|
+ needAutoReceiveIdList.add(e.getId());
|
|
|
}
|
|
|
}).collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(needAutoReceiveIdList)) {
|
|
|
+ this.autoOutDeviceForTrain(needAutoReceiveIdList);
|
|
|
+ }
|
|
|
this.updateBatchById(tbDeviceDeliveryList);
|
|
|
break;
|
|
|
case CANCEL:
|