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