Commit 23f782af authored by hcing's avatar hcing

feat(tcm): 检验机构作业人员和检测机构作业人员角色调整

parent 628b0103
......@@ -16,8 +16,14 @@ public enum PersonManageRoleEnum {
use("使用单位", 1735591519093547010L),
agw("安装改造维修单位", 1735591458058035201L),
jyjc("检验检测机构", 1735590873120399362L);
// 需求调整 : 检验检测机构拆分,对应的业务人员也拆分
// 原先的数据:INSERT INTO "amos_project_1"."privilege_group" ("sequence_nbr", "group_name", "parent_id", "group_desc", "dims_seq", "level", "sort", "agency_code", "rec_date", "rec_user_id", "data_auth", "org_code", "group_type") VALUES (1735590873120399362, '检验检测业务办理人员', 0, '检验检测业务办理人员', 1742545453360115714, '0', 0, 'tzs', '2023-12-15 17:21:25', '8748712', NULL, '50', 'admin');
// 删除下面的数据即可删除原先已经绑定的关系
// SELECT * FROM "amos_project_1"."privilege_user_org_role" WHERE "role_seq" = '1735590873120399362';
// jyjc("检验检测机构", 1735590873120399362L);
jyjg("检验机构", 1947231335688990722L),
jcjg("检测机构", 1947231362847109122L);
String name;
Long id;
......
......@@ -404,7 +404,8 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfoVo.setPowerAttorney(ObjectUtils.isEmpty(tzsUserInfo.getPowerAttorney()) ? null : JSON.parseArray(tzsUserInfo.getPowerAttorney()));
tzsUserInfoVo.setPensionInsurance(ObjectUtils.isEmpty(tzsUserInfo.getPensionInsurance()) ? null : JSON.parseArray(tzsUserInfo.getPensionInsurance()));
tzsUserInfoVo.setInspectorCert(ObjectUtils.isEmpty(tzsUserInfo.getInspectorCert()) ? null : JSON.parseArray(tzsUserInfo.getInspectorCert()));
tzsUserInfoVo.setDataSources(enterpriseInfo.getDataSources());
// 默认省内
tzsUserInfoVo.setDataSources(ValidationUtil.isEmpty(enterpriseInfo) ? UnitDataSourceEnum.SHAANXI.getName() : enterpriseInfo.getDataSources());
String companyType = getUnitType();
tzsUserInfoVo.setCompanyType(companyType.contains("个人主体") ? "individual" : "no-individual");
Map<String, Object> userInfoMap = BeanUtil.beanToMap(tzsUserInfoVo);
......@@ -2086,8 +2087,11 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
private void setBizOperateUserRole(String companyType, List<Long> roleIds) {
if (companyType.contains(PersonManageRoleEnum.jyjc.getName())) {
roleIds.add(PersonManageRoleEnum.jyjc.getId());
if (companyType.contains(PersonManageRoleEnum.jyjg.getName())) {
roleIds.add(PersonManageRoleEnum.jyjg.getId());
}
if (companyType.contains(PersonManageRoleEnum.jcjg.getName())) {
roleIds.add(PersonManageRoleEnum.jcjg.getId());
}
if (companyType.contains(PersonManageRoleEnum.use.getName())) {
roleIds.add(PersonManageRoleEnum.use.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment