|
@@ -126,7 +126,7 @@ public class TBDeviceInOutServiceImpl extends ServiceImpl<TBDeviceInOutMapper, T
|
|
|
e.setDefaultData(true);
|
|
|
e.setExpressNo(tbDeviceDelivery.getExpressNo());
|
|
|
result.add(e);
|
|
|
- } else if (deliveryCrmNo == null || deliveryCrmNo.length() == 0){
|
|
|
+ } else if (deliveryCrmNo == null || deliveryCrmNo.length() == 0) {
|
|
|
// 也可以选用设备发货管理里没有绑sop的
|
|
|
e.setDefaultData(true);
|
|
|
e.setExpressNo(tbDeviceDelivery.getExpressNo());
|
|
@@ -166,9 +166,12 @@ public class TBDeviceInOutServiceImpl extends ServiceImpl<TBDeviceInOutMapper, T
|
|
|
String crmNo = deviceInOutSubmitParam.getCrmNo();
|
|
|
String sopNo = deviceInOutSubmitParam.getSopNo();
|
|
|
|
|
|
- List<TBDeviceInOut> alreadyOutList = this.list(
|
|
|
- new QueryWrapper<TBDeviceInOut>().lambda().eq(TBDeviceInOut::getSopNo, sopNo)
|
|
|
- .eq(TBDeviceInOut::getType, InOutTypeEnum.OUT));
|
|
|
+ // 设备出库时因为可以sop编辑的原因,去掉重复出库的
|
|
|
+ List<TBDeviceInOut> alreadyOutList = new ArrayList<>();
|
|
|
+ if (InOutTypeEnum.OUT.equals(inOutType)) {
|
|
|
+ alreadyOutList = this.list(new QueryWrapper<TBDeviceInOut>().lambda().eq(TBDeviceInOut::getSopNo, sopNo)
|
|
|
+ .eq(TBDeviceInOut::getType, InOutTypeEnum.OUT));
|
|
|
+ }
|
|
|
List<String> alreadyOutSerialNoList = alreadyOutList.stream().map(TBDeviceInOut::getDeviceSerialNo).distinct().collect(Collectors.toList());
|
|
|
|
|
|
String customName = null;
|