机构org修改

This commit is contained in:
anxin
2025-02-25 09:21:29 +08:00
parent 10d9b7bd6f
commit e44ccb2e07
2 changed files with 10 additions and 10 deletions

View File

@@ -54,11 +54,11 @@ public class OrganizationController {
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix()); String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
organization.setBus_no(code); organization.setBus_no(code);
boolean saveOrganizationSuccess = organizationService.save(organization); boolean saveOrgSuccess = organizationService.save(organization);
return saveOrganizationSuccess return saveOrgSuccess
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"})) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"}))
: R.fail(PromptMsgConstant.Common.M00007, null); : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"科室信息"}));
} }
/** /**
@@ -72,10 +72,10 @@ public class OrganizationController {
// Organization organization = new Organization(); // Organization organization = new Organization();
// BeanUtils.copyProperties(organizationdto, organization); // BeanUtils.copyProperties(organizationdto, organization);
boolean updateSuccess = organizationService.updateById(organization); boolean updateOrgSuccess = organizationService.updateById(organization);
return updateSuccess return updateOrgSuccess
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"})) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"}))
: R.fail(PromptMsgConstant.Common.M00007, null); : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"科室信息"}));
} }
/** /**
@@ -86,9 +86,9 @@ public class OrganizationController {
@DeleteMapping("/organization") @DeleteMapping("/organization")
public R<?> deleteSupplyRequest(@RequestParam Long orgId) { public R<?> deleteSupplyRequest(@RequestParam Long orgId) {
boolean deleteSuccess = organizationService.removeById(orgId); boolean deleteOrgSuccess = organizationService.removeById(orgId);
return deleteSuccess return deleteOrgSuccess
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"})) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"}))
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"})); : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"}));
} }
@@ -111,7 +111,7 @@ public class OrganizationController {
// 查询【科室】分页列表 // 查询【科室】分页列表
Page<Organization> organizationPage = Page<Organization> organizationPage =
organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize); organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize);
return R.ok(organizationPage); return R.ok(organizationPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"科室信息"}));
} }
} }

View File

@@ -42,7 +42,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
} }
if (activeFlag != null) { if (activeFlag != null) {
queryWrapper.eq(Organization::getTypeEnum, activeFlag); queryWrapper.eq(Organization::getActiveFlag, activeFlag);
} }
Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper); Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);