修改关键零部件型号库-替换

This commit is contained in:
梁琦涛
2024-10-10 11:59:41 +08:00
parent 726815123e
commit f2c9e15023
2 changed files with 7 additions and 8 deletions
@@ -148,8 +148,8 @@ public class LawsPartTypeController {
* @param lawsPartType
* @return
*/
@AutoLog(value = "业务支持-关键零部件型号库-编辑")
@ApiOperation(value = "业务支持-关键零部件型号库-编辑", notes = "业务支持-关键零部件型号库-编辑")
@AutoLog(value = "业务支持-关键零部件型号库-替换")
@ApiOperation(value = "业务支持-关键零部件型号库-替换", notes = "业务支持-关键零部件型号库-替换")
@ApiOperationSupport(order = 6)
@PostMapping(value = "/replace")
// @RequiresPermissions("keyPartBindingManage:import")
@@ -135,12 +135,11 @@ public class LawsPartTypeServiceImpl extends ServiceImpl<LawsPartTypeMapper, Law
throw new JeroBootException((Objects.equals(LocaleContextHolder.getLocale(), Locale.ENGLISH) ?
"Out of state" : "状态不正确"));
}
LawsPartType lawsPartTypeNew = JSON.parseObject(JSON.toJSONString(lawsPartTypeOld),LawsPartType.class);
lawsPartTypeNew.setId(null);
lawsPartTypeNew.setUpdateBy(null);
lawsPartTypeNew.setCreateTime(null);
lawsPartTypeNew.setLastId(lawsPartTypeOld.getId());
save(lawsPartTypeNew);
lawsPartType.setId(null);
lawsPartType.setUpdateBy(null);
lawsPartType.setCreateTime(null);
lawsPartType.setLastId(lawsPartTypeOld.getId());
save(lawsPartType);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LambdaUpdateWrapper<LawsPartType> updateLawsPartType = new LambdaUpdateWrapper<>();