|
@@ -119,6 +119,7 @@ public class WmDaDrugEntController {
|
|
|
@SysLog("新增档案-药企")
|
|
|
@PostMapping("saves")
|
|
|
@PreAuthorize("@pms.hasPermission('admin_wmdadrugent_add')")
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public R saves(@RequestBody WmDaDrugEnt wmDaDrugEnt) {
|
|
|
|
|
|
WmDaDrugEnt query = new WmDaDrugEnt();
|
|
@@ -199,10 +200,11 @@ public class WmDaDrugEntController {
|
|
|
@PreAuthorize("@pms.hasPermission('admin_wmdadrugent_edit')")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R updateById(@RequestBody WmDaDrugEnt wmDaDrugEnt) {
|
|
|
+ if (wmDaDrugEnt.getDeptId() == null || wmDaDrugEnt.getId() == null) {
|
|
|
+ return R.failed("id和deptId必填");
|
|
|
+ }
|
|
|
|
|
|
- SysDept sysDept1 = new SysDept();
|
|
|
- sysDept1.setDeptId(Integer.parseInt(wmDaDrugEnt.getDeptId()));
|
|
|
- SysDept sysDept = sysDeptMapper.selectDept(sysDept1);
|
|
|
+ SysDept sysDept = new SysDept();
|
|
|
sysDept.setDelFlag(wmDaDrugEnt.getEnableFlag());
|
|
|
sysDept.setName(wmDaDrugEnt.getEntname());
|
|
|
sysDept.setDeptId(Integer.parseInt(wmDaDrugEnt.getDeptId()));
|