|
@@ -73,7 +73,7 @@ public class ItdmWeituoInfoServiceImpl extends ServiceImpl<ItdmWeituoInfoMapper,
|
|
|
/**
|
|
|
* 根据委托编号修改委托状态(0未完结1已完结)
|
|
|
*/
|
|
|
- public void updateCompleteStatusByWeituoNo(@Param("weituoNo") String weituoNo){
|
|
|
+ public void updateCompleteStatusByWeituoNo(@Param("weituoNo") String weituoNo) {
|
|
|
itdmWeituoInfoMapper.updateCompleteStatusByWeituoNo(weituoNo);
|
|
|
}
|
|
|
|
|
@@ -147,9 +147,15 @@ public class ItdmWeituoInfoServiceImpl extends ServiceImpl<ItdmWeituoInfoMapper,
|
|
|
throw new JeecgBootException("审核通过不能修改数据");
|
|
|
}
|
|
|
|
|
|
+ if(Objects.equals(select.getShenheStatus(),ShenheStatus.j.getCode())){
|
|
|
+ itdmWeituoInfo.setShenheStatus("0");
|
|
|
+ itdmWeituoInfo.setShenheMsg("");
|
|
|
+ }
|
|
|
+
|
|
|
this.baseMapper.updateById(itdmWeituoInfo);
|
|
|
|
|
|
|
|
|
+
|
|
|
this.yangpinMapper.delete(Wrappers.lambdaQuery(ItdmWeituoYangpin.class).eq(ItdmWeituoYangpin::getWeituoId, command.getId()));
|
|
|
this.yangpinExtendMapper.delete(Wrappers.lambdaQuery(ItdmWeituoYangpinExtend.class).eq(ItdmWeituoYangpinExtend::getWeituoId, command.getId()));
|
|
|
|
|
@@ -257,7 +263,43 @@ public class ItdmWeituoInfoServiceImpl extends ServiceImpl<ItdmWeituoInfoMapper,
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<ItdmWeituoJieXaingVo> getWeituoList(IPage page,ItdmWeituoInfo itdmWeituoInfo) {
|
|
|
- return baseMapper.getWeituoList(page,itdmWeituoInfo);
|
|
|
+ public List<ItdmWeituoJieXaingVo> getWeituoList(IPage page, ItdmWeituoInfo itdmWeituoInfo) {
|
|
|
+ return baseMapper.getWeituoList(page, itdmWeituoInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void stagingWeituo(WeituoUpdateCommand command) {
|
|
|
+ ItdmWeituoInfo itdmWeituoInfo = WeituoConvert.INSTANCE.convert(command);
|
|
|
+ if (itdmWeituoInfo.getId() != null && !itdmWeituoInfo.getId().isEmpty()){
|
|
|
+ ItdmWeituoInfo select = this.baseMapper.selectById(command.getId());
|
|
|
+ if (select == null) throw new JeecgBootException("ID不存在");
|
|
|
+ itdmWeituoInfo.setShenheStatus("3");
|
|
|
+ this.baseMapper.updateById(itdmWeituoInfo);
|
|
|
+ this.yangpinMapper.delete(Wrappers.lambdaQuery(ItdmWeituoYangpin.class).eq(ItdmWeituoYangpin::getWeituoId, command.getId()));
|
|
|
+ this.yangpinExtendMapper.delete(Wrappers.lambdaQuery(ItdmWeituoYangpinExtend.class).eq(ItdmWeituoYangpinExtend::getWeituoId, command.getId()));
|
|
|
+ for (WeituoUpdateCommand.WeituoYangpin yangpin : command.getYangpins()) {
|
|
|
+ ItdmWeituoYangpin itdmWeituoYangpin = WeituoConvert.INSTANCE.convert(yangpin, command.getId());
|
|
|
+ this.yangpinMapper.insert(itdmWeituoYangpin);
|
|
|
+
|
|
|
+ for (WeituoUpdateCommand.WeituoYangPinShiYan shiYan : command.getPinShiYans().stream()
|
|
|
+ .filter(i -> i.getYangpinKeyId().equals(yangpin.getSampleName())).collect(Collectors.toList())) {
|
|
|
+
|
|
|
+ ItdmWeituoYangpinExtend yangpinExtend = WeituoConvert.INSTANCE.convert(shiYan, itdmWeituoYangpin.getId(), itdmWeituoInfo.getId());
|
|
|
+ this.yangpinExtendMapper.insert(yangpinExtend);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ itdmWeituoInfo.setShenheStatus("3");
|
|
|
+ this.baseMapper.insert(itdmWeituoInfo);
|
|
|
+ for (WeituoUpdateCommand.WeituoYangpin yangpin : command.getYangpins()) {
|
|
|
+ ItdmWeituoYangpin itdmWeituoYangpin = WeituoConvert.INSTANCE.convert(yangpin, itdmWeituoInfo.getId());
|
|
|
+ this.yangpinMapper.insert(itdmWeituoYangpin);
|
|
|
+ for (WeituoUpdateCommand.WeituoYangPinShiYan shiYan : command.getPinShiYans().stream()
|
|
|
+ .filter(i -> i.getYangpinKeyId().equals(yangpin.getSampleName())).collect(Collectors.toList())) {
|
|
|
+ ItdmWeituoYangpinExtend yangpinExtend = WeituoConvert.INSTANCE.convert(shiYan, itdmWeituoYangpin.getId(), itdmWeituoInfo.getId());
|
|
|
+ this.yangpinExtendMapper.insert(yangpinExtend);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|