Compare commits
No commits in common. "3544961e3793fc8c4d7463da0cd57d4b4e6b6e9d" and "419511e82ce67ae72c948bc5b41dbd03d6ce95fe" have entirely different histories.
3544961e37
...
419511e82c
|
|
@ -36,7 +36,6 @@ import com.chinaweal.aiccs.common.util.ExcelUtil;
|
||||||
import com.chinaweal.aiccs.common.util.FlowUtil;
|
import com.chinaweal.aiccs.common.util.FlowUtil;
|
||||||
import com.chinaweal.aiccs.common.util.StringUtils;
|
import com.chinaweal.aiccs.common.util.StringUtils;
|
||||||
import com.chinaweal.aiccs.common.util.WorkFlowUtil;
|
import com.chinaweal.aiccs.common.util.WorkFlowUtil;
|
||||||
import com.chinaweal.aiccs.org.entity.OrgUnits;
|
|
||||||
import com.chinaweal.aiccs.org.service.AicorgService;
|
import com.chinaweal.aiccs.org.service.AicorgService;
|
||||||
import com.chinaweal.aicorg.model.AICUser;
|
import com.chinaweal.aicorg.model.AICUser;
|
||||||
import com.chinaweal.youfool.framework.springboot.exception.custom.BusinessException;
|
import com.chinaweal.youfool.framework.springboot.exception.custom.BusinessException;
|
||||||
|
|
@ -959,47 +958,4 @@ public class BizSerIllegalController extends BaseController {
|
||||||
return RestResult.ok(b);
|
return RestResult.ok(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断用户机构是否能发起
|
|
||||||
*/
|
|
||||||
@PostMapping("/checkIllegalStart")
|
|
||||||
public RestResult<?> checkIllegalStart(@RequestBody TSBizSerIllegal tsBizSerIllegal, HttpServletRequest request) {
|
|
||||||
AICUser aicUser = getLoginUser(request);
|
|
||||||
//进行判断,且允许上级办理下级的信用修复
|
|
||||||
Map<String, String> map = new HashMap<>();
|
|
||||||
map.put("orgNumber", aicUser.getRegionID());
|
|
||||||
map.put("deleted", "0");
|
|
||||||
map.put("unittype", "1");
|
|
||||||
OrgUnits org = aicorgService.queryByOrgNumberMap(map);
|
|
||||||
|
|
||||||
EBaseinfo eBaseinfo = eBaseinfoService.getOneByPripid(tsBizSerIllegal.getPripid());
|
|
||||||
Integer orgLevel = org.getOrgLevel();
|
|
||||||
boolean isSame = true;
|
|
||||||
//根据机构等级判断
|
|
||||||
if (orgLevel == 1) { //省局
|
|
||||||
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
|
||||||
StringUtils.substring(aicUser.getRegionID(), 0, 2),
|
|
||||||
StringUtils.substring(eBaseinfo.getRegorg(), 0, 2));
|
|
||||||
} else if (orgLevel == 2) { //市局
|
|
||||||
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
|
||||||
StringUtils.substring(aicUser.getRegionID(), 0, 4),
|
|
||||||
StringUtils.substring(eBaseinfo.getRegorg(), 0, 4));
|
|
||||||
} else if (orgLevel == 3) { //区局
|
|
||||||
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
|
||||||
StringUtils.substring(aicUser.getRegionID(), 0, 6),
|
|
||||||
StringUtils.substring(eBaseinfo.getRegorg(), 0, 6));
|
|
||||||
} else if (orgLevel >= 4) { //所
|
|
||||||
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
|
||||||
StringUtils.substring(aicUser.getRegionID(), 0, 6),
|
|
||||||
StringUtils.substring(eBaseinfo.getRegorg(), 0, 6));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isSame) {
|
|
||||||
return RestResult.ok(ResultCode.SUCCESS);
|
|
||||||
} else {
|
|
||||||
return RestResult.error(ResultCode.BUSINESS_LOGIC_ERROR, "该主体登记机关是其他机关登记,无法发起");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue