Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-03-28 18:40:07 +08:00
4 changed files with 15 additions and 2 deletions
@@ -117,6 +117,14 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
removeById(id); removeById(id);
} }
public void deleteByOtaId(String otaId) {
if (StringUtils.isNotEmpty(otaId)) {
LambdaQueryWrapper<OtaBaCxAqcs> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaCxAqcs::getOtaId, otaId);
remove(queryWrapper);
}
}
/** /**
* 批量删除 * 批量删除
* *
@@ -163,7 +171,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
} }
private OtaBaCxAqcs getByOtaId(String otaId) { private OtaBaCxAqcs getByOtaId(String otaId) {
if(StringUtils.isEmpty(otaId)){ if (StringUtils.isEmpty(otaId)) {
return null; return null;
} }
LambdaQueryWrapper<OtaBaCxAqcs> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OtaBaCxAqcs> queryWrapper = new LambdaQueryWrapper<>();
@@ -77,10 +77,12 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
otaBaCxJbxx.setCreateTime(now); otaBaCxJbxx.setCreateTime(now);
} else { } else {
otaBaCxJbxxOld = this.getByOtaId(otaBaCxJbxx.getOtaId()); otaBaCxJbxxOld = this.getByOtaId(otaBaCxJbxx.getOtaId());
otaBaCxJbxx.setId(otaBaCxJbxx.getId());
otaBaCxList = otaBaCxListService.queryById(otaBaCxJbxx.getOtaId()); otaBaCxList = otaBaCxListService.queryById(otaBaCxJbxx.getOtaId());
otaBaCxList.updateData(otaBaCxJbxx); otaBaCxList.updateData(otaBaCxJbxx);
otaBaCxListService.editById(otaBaCxList); otaBaCxListService.editById(otaBaCxList);
} }
otaBaCxJbxx.setOtaId(otaBaCxJbxx.getOtaId());
otaBaCxJbxx.setUpdateTime(now); otaBaCxJbxx.setUpdateTime(now);
saveOrUpdate(otaBaCxJbxx); saveOrUpdate(otaBaCxJbxx);
ComparisonUtil cu = new ComparisonUtil(); ComparisonUtil cu = new ComparisonUtil();
@@ -156,7 +158,7 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
} }
private OtaBaCxJbxx getByOtaId(String otaId) { private OtaBaCxJbxx getByOtaId(String otaId) {
if(StringUtils.isEmpty(otaId)){ if (StringUtils.isEmpty(otaId)) {
return null; return null;
} }
LambdaQueryWrapper<OtaBaCxJbxx> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OtaBaCxJbxx> queryWrapper = new LambdaQueryWrapper<>();
@@ -72,6 +72,8 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
ComparisonUtil cu = new ComparisonUtil(); ComparisonUtil cu = new ComparisonUtil();
if (ObjectUtils.isEmpty(otaBaCxJsfzbacsOld)) { if (ObjectUtils.isEmpty(otaBaCxJsfzbacsOld)) {
otaBaCxJsfzbacsOld = new OtaBaCxJsfzbacs(); otaBaCxJsfzbacsOld = new OtaBaCxJsfzbacs();
}else{
otaBaCxJsfzbacs.setId(otaBaCxJsfzbacsOld.getId());
} }
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaId, OtaModuleEnum.CX_JSFZXTJCBACS, otaBaCxJsfzbacsOld, otaBaCxJsfzbacs, sysDictService); List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaId, OtaModuleEnum.CX_JSFZXTJCBACS, otaBaCxJsfzbacsOld, otaBaCxJsfzbacs, sysDictService);
saveOrUpdate(otaBaCxJsfzbacs); saveOrUpdate(otaBaCxJsfzbacs);
@@ -60,6 +60,7 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
otaBaSjSjmbcx.setCreateTime(now); otaBaSjSjmbcx.setCreateTime(now);
} else { } else {
otaBaSjSjmbcxOld = this.getByOtaId(otaBaSjSjmbcx.getOtaId()); otaBaSjSjmbcxOld = this.getByOtaId(otaBaSjSjmbcx.getOtaId());
otaBaSjSjmbcx.setId(otaBaSjSjmbcxOld.getId());
otaBaSjList = otaBaSjListService.queryById(otaBaSjSjmbcx.getOtaId()); otaBaSjList = otaBaSjListService.queryById(otaBaSjSjmbcx.getOtaId());
otaBaSjList.updateData(otaBaSjSjmbcx); otaBaSjList.updateData(otaBaSjSjmbcx);
otaBaSjListService.editById(otaBaSjList); otaBaSjListService.editById(otaBaSjList);