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

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 * @param lawsPartType
* @return * @return
*/ */
@AutoLog(value = "业务支持-关键零部件型号库-编辑") @AutoLog(value = "业务支持-关键零部件型号库-替换")
@ApiOperation(value = "业务支持-关键零部件型号库-编辑", notes = "业务支持-关键零部件型号库-编辑") @ApiOperation(value = "业务支持-关键零部件型号库-替换", notes = "业务支持-关键零部件型号库-替换")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@PostMapping(value = "/replace") @PostMapping(value = "/replace")
// @RequiresPermissions("keyPartBindingManage:import") // @RequiresPermissions("keyPartBindingManage:import")
@@ -135,12 +135,11 @@ public class LawsPartTypeServiceImpl extends ServiceImpl<LawsPartTypeMapper, Law
throw new JeroBootException((Objects.equals(LocaleContextHolder.getLocale(), Locale.ENGLISH) ? throw new JeroBootException((Objects.equals(LocaleContextHolder.getLocale(), Locale.ENGLISH) ?
"Out of state" : "状态不正确")); "Out of state" : "状态不正确"));
} }
LawsPartType lawsPartTypeNew = JSON.parseObject(JSON.toJSONString(lawsPartTypeOld),LawsPartType.class); lawsPartType.setId(null);
lawsPartTypeNew.setId(null); lawsPartType.setUpdateBy(null);
lawsPartTypeNew.setUpdateBy(null); lawsPartType.setCreateTime(null);
lawsPartTypeNew.setCreateTime(null); lawsPartType.setLastId(lawsPartTypeOld.getId());
lawsPartTypeNew.setLastId(lawsPartTypeOld.getId()); save(lawsPartType);
save(lawsPartTypeNew);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LambdaUpdateWrapper<LawsPartType> updateLawsPartType = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<LawsPartType> updateLawsPartType = new LambdaUpdateWrapper<>();