|
|
|
@ -351,7 +351,9 @@ public class ZyjhController {
|
|
|
|
|
|
|
|
|
|
ArrayList<DmYlInfo> updateYlList = new ArrayList<>();
|
|
|
|
|
ArrayList<MpDhsj> MpDhsjSaveList = new ArrayList<>();
|
|
|
|
|
ArrayList<DmYlInfo> addYlList=new ArrayList<>();
|
|
|
|
|
for (DmYdjh item : list) {
|
|
|
|
|
//当前使用余料时需要修正余料库信息
|
|
|
|
|
if ("Y".equalsIgnoreCase(item.getYlbs())){
|
|
|
|
|
List<DmYlInfo> ylList = ylInfoService.list(Wrappers.<DmYlInfo>lambdaQuery()
|
|
|
|
|
.eq(DmYlInfo::get使用船号, item.getDcCh())
|
|
|
|
@ -378,7 +380,7 @@ public class ZyjhController {
|
|
|
|
|
.filter(it -> StrUtil.isNotEmpty(it.getYlbh()))
|
|
|
|
|
.map(it -> DmYlInfo.of(it,item))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
ylInfoService.saveBatch(ylList);
|
|
|
|
|
addYlList.addAll(ylList);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
@ -412,10 +414,15 @@ public class ZyjhController {
|
|
|
|
|
MpDhsjSaveList.add(mpDhsj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// mpDhsjServcie.saveBatch(collect);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mpDhsjServcie.saveBatch(MpDhsjSaveList);
|
|
|
|
|
ylInfoService.updateBatchById(updateYlList);
|
|
|
|
|
if (ObjUtil.isNotEmpty(updateYlList)){
|
|
|
|
|
ylInfoService.updateBatchById(updateYlList);
|
|
|
|
|
}
|
|
|
|
|
if (ObjUtil.isNotEmpty(addYlList)){
|
|
|
|
|
ylInfoService.saveBatch(addYlList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
zyjhService.updateBatchById(list);
|
|
|
|
|