修改关键零部件型号库-替换
This commit is contained in:
+2
-2
@@ -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")
|
||||||
|
|||||||
+5
-6
@@ -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<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user