列异的信用修复可由上级发起办理下级的业务
This commit is contained in:
parent
d93ff733c6
commit
e01d81e451
|
|
@ -26,6 +26,7 @@ import com.chinaweal.aiccs.common.base.controller.BaseController;
|
|||
import com.chinaweal.aiccs.common.constant.BaseDataConstant;
|
||||
import com.chinaweal.aiccs.common.constant.Constant;
|
||||
import com.chinaweal.aiccs.common.util.*;
|
||||
import com.chinaweal.aiccs.org.entity.OrgUnits;
|
||||
import com.chinaweal.aiccs.org.service.AicorgService;
|
||||
import com.chinaweal.aicorg.model.AICUser;
|
||||
import com.chinaweal.aicorg.services.OrgUM;
|
||||
|
|
@ -260,47 +261,63 @@ public class BizRemListController extends BaseController implements ServletConte
|
|||
if (aicUser == null) throw new BusinessException("登录超时,请重新登录");
|
||||
|
||||
List<Map<String, String>> list = new ArrayList<>();
|
||||
|
||||
TSAbnList tsAbnList = tsAbnListService.getById(abnlistid);
|
||||
String userOrg = StringUtils.substring(aicUser.getRegionID(), 0, 6);
|
||||
String unitCode = gzaiccodeService.changeUnitCn(tsAbnList.getDecorg(), tsAbnList.getIntoDecorg());
|
||||
boolean flag = false;
|
||||
if (StringUtils.isNotBlank(unitCode)) {
|
||||
if (unitCode.equals("440100") || unitCode.equals("440101")) {
|
||||
if (!userOrg.equals("440100") && !userOrg.equals("440101")) {
|
||||
flag = true;
|
||||
}
|
||||
} else if (!userOrg.equals(unitCode)) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
|
||||
//这一步进行判断,且允许上级办理下级的信用修复
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("orgNumber", aicUser.getRegionID());
|
||||
map.put("deleted", "0");
|
||||
map.put("unittype", "1");
|
||||
OrgUnits org = aicorgService.queryByOrgNumberMap(map);
|
||||
boolean isSame = true;
|
||||
if (org != null) {
|
||||
LambdaQueryWrapper<EBaseinfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(EBaseinfo::getPripid, tsAbnList.getPripid());
|
||||
EBaseinfo eBaseinfo = eBaseinfoService.getOne(wrapper);
|
||||
if (com.chinaweal.aiccs.common.util.StringUtils.notEquals(userOrg,
|
||||
com.chinaweal.aiccs.common.util.StringUtils.substring(eBaseinfo.getRegorg(), 0, 6))) {
|
||||
Map<String, String> resultMap = new HashMap<String, String>();
|
||||
resultMap.put("regno", tsAbnList.getRegno());
|
||||
resultMap.put("entname", tsAbnList.getEntname());
|
||||
resultMap.put("pripid", tsAbnList.getPripid());
|
||||
resultMap.put("abnlistid", abnlistid);
|
||||
resultMap.put("reason", "列入机关与当前用户所属机关不匹配!");
|
||||
list.add(resultMap);
|
||||
return RestResult.ok(list);
|
||||
Integer orgLevel = org.getOrgLevel();
|
||||
//根据机构等级判断
|
||||
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));
|
||||
}
|
||||
} else {
|
||||
return RestResult.error(ResultCode.MYSTERIOUS_ERROR, "当前用户所属机关不存在");
|
||||
}
|
||||
|
||||
String validateResult = this.validate(abnlistid);
|
||||
if (!"success".equals(validateResult)) {
|
||||
TSAbnList tsAbnListModel = tsAbnListService.getById(abnlistid);
|
||||
if(isSame){ //登记机关码值等于用户所在单位
|
||||
String validateResult = this.validate(abnlistid);
|
||||
if (!"success".equals(validateResult)) {
|
||||
TSAbnList tsAbnListModel = tsAbnListService.getById(abnlistid);
|
||||
Map<String, String> resultMap = new HashMap<String, String>();
|
||||
resultMap.put("regno", tsAbnListModel.getRegno());
|
||||
resultMap.put("entname", tsAbnListModel.getEntname());
|
||||
resultMap.put("pripid", tsAbnListModel.getPripid());
|
||||
resultMap.put("abnlistid", abnlistid);
|
||||
resultMap.put("reason", validateResult);
|
||||
list.add(resultMap);
|
||||
}
|
||||
} else {
|
||||
Map<String, String> resultMap = new HashMap<String, String>();
|
||||
resultMap.put("regno", tsAbnListModel.getRegno());
|
||||
resultMap.put("entname", tsAbnListModel.getEntname());
|
||||
resultMap.put("pripid", tsAbnListModel.getPripid());
|
||||
resultMap.put("regno", tsAbnList.getRegno());
|
||||
resultMap.put("entname", tsAbnList.getEntname());
|
||||
resultMap.put("pripid", tsAbnList.getPripid());
|
||||
resultMap.put("abnlistid", abnlistid);
|
||||
resultMap.put("reason", validateResult);
|
||||
resultMap.put("reason", "列入机关与当前用户所属机关不匹配!");
|
||||
list.add(resultMap);
|
||||
return RestResult.ok(list);
|
||||
}
|
||||
return RestResult.ok(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.chinaweal.aicorg.pojo.AICUser;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 组织架构相关查询
|
||||
|
|
@ -79,4 +80,6 @@ public interface AicorgMapper extends BaseMapper<OrgUnits> {
|
|||
|
||||
OrgUnits selectTOrgunitsById(String orgUnitID);
|
||||
|
||||
OrgUnits queryByOrgNumberMap(@Param("params") Map<String, String> params);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.chinaweal.aiccs.org.entity.dto.OrgTreeNode;
|
|||
import com.chinaweal.aicorg.model.AICUser;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 组织架构相关接口
|
||||
|
|
@ -73,4 +74,6 @@ public interface AicorgService extends IService<OrgUnits> {
|
|||
|
||||
OrgUnits getTOrgunitsById(String orgUnitID);
|
||||
|
||||
OrgUnits queryByOrgNumberMap(Map<String, String> params);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,4 +251,9 @@ public class AicorgServiceImpl extends ServiceImpl<AicorgMapper, OrgUnits> imple
|
|||
public OrgUnits getTOrgunitsById(String orgUnitID) {
|
||||
return baseMapper.selectTOrgunitsById(orgUnitID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrgUnits queryByOrgNumberMap(Map<String, String> params) {
|
||||
return aicorgMapper.queryByOrgNumberMap(params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,4 +146,15 @@
|
|||
from t_orgUnits
|
||||
where orgUnitID = #{orgUnitID}
|
||||
</select>
|
||||
|
||||
<select id="queryByOrgNumberMap" resultType="com.chinaweal.aiccs.org.entity.OrgUnits">
|
||||
SELECT * FROM cxaicorg.t_orgunits
|
||||
WHERE orgNumber = #{params.orgNumber}
|
||||
<if test="params.deleted !=null and params.deleted !=''">
|
||||
AND deleted = #{params.deleted}
|
||||
</if>
|
||||
<if test="params.unittype !=null and params.unittype !=''">
|
||||
AND unittype = #{params.unittype}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue