列异允许上级发起下级业务

This commit is contained in:
zhouxy 2026-01-06 20:23:54 +08:00
parent a34e5bdf41
commit bc1377c888
4 changed files with 34 additions and 10 deletions

View File

@ -410,10 +410,10 @@ public class BizSpeListController extends BaseController {
String bizSeq = UUID.randomUUID().toString();
EBaseinfo eBaseinfo = eBaseinfoService.getById(pripid);
//该主体登记机关是其他机关登记
if (!code.equals(eBaseinfo.getRegorg().substring(0, 6))) {
return RestResult.error(ResultCode.BUSINESS_LOGIC_ERROR, "该主体登记机关是其他机关登记,请重新选择!");
}
// //该主体登记机关是其他机关登记
// if (!code.equals(eBaseinfo.getRegorg().substring(0, 6))) {
// return RestResult.error(ResultCode.BUSINESS_LOGIC_ERROR, "该主体登记机关是其他机关登记,请重新选择!");
// }
String entertype = "";
String enttype = eBaseinfo.getEnttype();

View File

@ -226,7 +226,7 @@ public class EBaseinfoController extends BaseController {
IPage<ToIncludeAbnDto> page = null;
String searchtype = StringUtils.tranObject(customParamMap.get("searchtype"));
if ("2".equals(searchtype)) { // 个案
String suporg = aicorgService.getRegionCodeByUser(curUser);
String suporg = aicorgService.getRegionCodeByOrgLevel(curUser);
customParamMap.put("suporg", suporg);
page = toincludeabnMapper.listByEb(new Page<>(pageRequestDto.getCurPage(), pageRequestDto.getPageSize()), customParamMap);
} else {

View File

@ -76,4 +76,6 @@ public interface AicorgService extends IService<OrgUnits> {
OrgUnits queryByOrgNumberMap(Map<String, String> params);
String getRegionCodeByOrgLevel(AICUser curUser);
}

View File

@ -256,4 +256,26 @@ public class AicorgServiceImpl extends ServiceImpl<AicorgMapper, OrgUnits> imple
public OrgUnits queryByOrgNumberMap(Map<String, String> params) {
return aicorgMapper.queryByOrgNumberMap(params);
}
@Override
public String getRegionCodeByOrgLevel(com.chinaweal.aicorg.model.AICUser curUser) {
Map<String, String> map = new HashMap<>();
map.put("orgNumber", curUser.getRegionID());
map.put("deleted", "0");
map.put("unittype", "1");
OrgUnits org = this.queryByOrgNumberMap(map);
Integer orgLevel = org.getOrgLevel();
String suporg = "";
//根据机构等级判断
if (orgLevel == 1) { //省局
suporg = StringUtils.substring(org.getOrgNumber(), 0, 2);
} else if (orgLevel == 2) { //市局
suporg = StringUtils.substring(org.getOrgNumber(), 0, 4);
} else if (orgLevel == 3) { //区局
suporg = StringUtils.substring(org.getOrgNumber(), 0, 6);
} else if (orgLevel >= 4) { //所
suporg = StringUtils.substring(org.getOrgNumber(), 0, 6);
}
return suporg;
}
}