列严信用修复允许上级办理下级业务
This commit is contained in:
parent
3544961e37
commit
0ec4082387
|
|
@ -1057,21 +1057,45 @@ public class BizSerIllegalRemController extends BaseController implements Servle
|
||||||
@RequestMapping(value = "/creditValidateBiz.do", method = RequestMethod.POST)
|
@RequestMapping(value = "/creditValidateBiz.do", method = RequestMethod.POST)
|
||||||
public RestResult<?> creditValidateBiz(HttpServletRequest request, String illegallistids) {
|
public RestResult<?> creditValidateBiz(HttpServletRequest request, String illegallistids) {
|
||||||
AICUser aicUser = getLoginUser(request);
|
AICUser aicUser = getLoginUser(request);
|
||||||
if (aicUser == null) return RestResult.error(ResultCode.USER_NOT_LOGGED_IN);
|
if (aicUser == null) {
|
||||||
String userOrg = org.apache.commons.lang.StringUtils.substring(aicUser.getRegionID(), 0, 6);
|
return RestResult.error(ResultCode.USER_NOT_LOGGED_IN);
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, String> resultMap = new HashMap<>();
|
Map<String, String> resultMap = new HashMap<>();
|
||||||
List<Map<String, String>> list = new ArrayList<>();
|
List<Map<String, String>> list = new ArrayList<>();
|
||||||
|
//这一步进行判断,且允许上级办理下级的信用修复
|
||||||
|
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;
|
||||||
|
|
||||||
String[] illegallistidArr = illegallistids.split(Constant.SEMICOLON);
|
if (org != null) {
|
||||||
for (String illegallistid : illegallistidArr) {
|
String[] illegallistidArr = illegallistids.split(Constant.SEMICOLON);
|
||||||
TSSerIllegalList serIllegalListModel = tsSerIllegalListService.getById(illegallistid);
|
for (String illegallistid : illegallistidArr) {
|
||||||
String unitCode = gzaiccodeService.changeUnitCn(serIllegalListModel.getDecorg(), serIllegalListModel.getDecorgCn());
|
TSSerIllegalList serIllegalListModel = tsSerIllegalListService.getById(illegallistid);
|
||||||
if(StringUtils.isNotBlank(unitCode) && !userOrg.equals(unitCode)){
|
Integer orgLevel = org.getOrgLevel();
|
||||||
LambdaQueryWrapper<EBaseinfo> wrapper = new LambdaQueryWrapper<>();
|
//根据机构等级判断
|
||||||
wrapper.eq(EBaseinfo::getPripid, serIllegalListModel.getPripid());
|
if (orgLevel == 1) { //省局
|
||||||
EBaseinfo eBaseinfo = eBaseinfoService.getOne(wrapper);
|
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
||||||
if(!userOrg.equals(StringUtils.substring(eBaseinfo.getRegorg(),0,6))){
|
StringUtils.substring(aicUser.getRegionID(), 0, 2),
|
||||||
|
StringUtils.substring(serIllegalListModel.getDecorg(), 0, 2));
|
||||||
|
} else if (orgLevel == 2) { //市局
|
||||||
|
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
||||||
|
StringUtils.substring(aicUser.getRegionID(), 0, 4),
|
||||||
|
StringUtils.substring(serIllegalListModel.getDecorg(), 0, 4));
|
||||||
|
} else if (orgLevel == 3) { //区局
|
||||||
|
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
||||||
|
StringUtils.substring(aicUser.getRegionID(), 0, 6),
|
||||||
|
StringUtils.substring(serIllegalListModel.getDecorg(), 0, 6));
|
||||||
|
} else if (orgLevel >= 4) { //所
|
||||||
|
isSame = com.chinaweal.aiccs.common.util.StringUtils.equals(
|
||||||
|
StringUtils.substring(aicUser.getRegionID(), 0, 6),
|
||||||
|
StringUtils.substring(serIllegalListModel.getDecorg(), 0, 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isSame){
|
||||||
resultMap.put("regno", serIllegalListModel.getRegno());
|
resultMap.put("regno", serIllegalListModel.getRegno());
|
||||||
resultMap.put("entname", serIllegalListModel.getEntname());
|
resultMap.put("entname", serIllegalListModel.getEntname());
|
||||||
resultMap.put("pripid", serIllegalListModel.getPripid());
|
resultMap.put("pripid", serIllegalListModel.getPripid());
|
||||||
|
|
@ -1080,10 +1104,9 @@ public class BizSerIllegalRemController extends BaseController implements Servle
|
||||||
list.add(resultMap);
|
list.add(resultMap);
|
||||||
return RestResult.ok(list);
|
return RestResult.ok(list);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String validateResult = this.validate(illegallistid);
|
String validateResult = this.validate(illegallistid);
|
||||||
int days = (int) ((int)LocalDate.now().toEpochDay() - serIllegalListModel.getAbntime().toEpochDay());
|
int days = (int) ((int)LocalDate.now().toEpochDay() - serIllegalListModel.getAbntime().toEpochDay());
|
||||||
// Period period = Period.between(serIllegalListModel.getAbntime(),LocalDate.now());
|
// Period period = Period.between(serIllegalListModel.getAbntime(),LocalDate.now());
|
||||||
// if(!"该记录正在被移出".equals(validateResult)){
|
// if(!"该记录正在被移出".equals(validateResult)){
|
||||||
// if (days < 365){
|
// if (days < 365){
|
||||||
|
|
@ -1092,15 +1115,17 @@ public class BizSerIllegalRemController extends BaseController implements Servle
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (!"success".equals(validateResult)) {
|
if (!"success".equals(validateResult)) {
|
||||||
|
resultMap.put("regno", serIllegalListModel.getRegno());
|
||||||
resultMap.put("regno", serIllegalListModel.getRegno());
|
resultMap.put("entname", serIllegalListModel.getEntname());
|
||||||
resultMap.put("entname", serIllegalListModel.getEntname());
|
resultMap.put("pripid", serIllegalListModel.getPripid());
|
||||||
resultMap.put("pripid", serIllegalListModel.getPripid());
|
resultMap.put("illegallistid", illegallistid);
|
||||||
resultMap.put("illegallistid", illegallistid);
|
resultMap.put("reason", validateResult);
|
||||||
resultMap.put("reason", validateResult);
|
list.add(resultMap);
|
||||||
list.add(resultMap);
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return RestResult.error(ResultCode.MYSTERIOUS_ERROR, "当前用户所属机关不存在");
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(list)) return RestResult.ok(list);
|
if (CollectionUtils.isNotEmpty(list)) return RestResult.ok(list);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -641,7 +641,8 @@ public class TSBizSerIllegalServiceImpl extends BaseServiceImpl<TSBizSerIllegall
|
||||||
tsSerIllegalList.setIntoSponsorIllegalId(user.getPrimaryKey());
|
tsSerIllegalList.setIntoSponsorIllegalId(user.getPrimaryKey());
|
||||||
tsSerIllegalList.setBatchAndCase(dbTSBizSerIllegal.getBatchAndCase());
|
tsSerIllegalList.setBatchAndCase(dbTSBizSerIllegal.getBatchAndCase());
|
||||||
tsSerIllegalList.setOperationStatus("0");
|
tsSerIllegalList.setOperationStatus("0");
|
||||||
tsSerIllegalList.setAreaCode("440100"); // 统一设置为440100
|
String areaCode = tsBizSerIllegal.getDecorg();
|
||||||
|
tsSerIllegalList.setAreaCode(StringUtils.isEmpty(areaCode)?"150000":areaCode.substring(0,6));
|
||||||
tsSerIllegalList.setIsshow("1");
|
tsSerIllegalList.setIsshow("1");
|
||||||
tsSerIllegalList.setDecorg(orgUnits.getOrgNumber());
|
tsSerIllegalList.setDecorg(orgUnits.getOrgNumber());
|
||||||
tsSerIllegalList.setDecorgCn(orgUnits.getOrgUnitName());// 列入决定机关中文
|
tsSerIllegalList.setDecorgCn(orgUnits.getOrgUnitName());// 列入决定机关中文
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue