Commit 343c1597 authored by chenzhao's avatar chenzhao

空角色/部分封装异常去除

parent 27a8b0de
...@@ -674,9 +674,7 @@ public class UnitInfoController extends BaseController { ...@@ -674,9 +674,7 @@ public class UnitInfoController extends BaseController {
FeignClientResult<Collection<CompanyModel>> feignClientResult= Privilege.companyClient.querySubAgencyTree(regionalCompanies); FeignClientResult<Collection<CompanyModel>> feignClientResult= Privilege.companyClient.querySubAgencyTree(regionalCompanies);
companyModel = (List<CompanyModel>)feignClientResult.getResult(); companyModel = (List<CompanyModel>)feignClientResult.getResult();
} }
return ResponseHelper.buildResponse(companyModel); return ResponseHelper.buildResponse(companyModel);
} }
...@@ -759,9 +757,6 @@ public class UnitInfoController extends BaseController { ...@@ -759,9 +757,6 @@ public class UnitInfoController extends BaseController {
public ResponseModel< List<Map<String,Object>> > getUnitInfoListData( public ResponseModel< List<Map<String,Object>> > getUnitInfoListData(
@RequestParam(required=false) Long unitInfoId, @RequestParam(required=false) Long unitInfoId,
@RequestParam(required=false) Long regionalCompaniesSeq @RequestParam(required=false) Long regionalCompaniesSeq
) { ) {
UnitInfo unitInfo=unitInfoMapper.selectById(unitInfoId); UnitInfo unitInfo=unitInfoMapper.selectById(unitInfoId);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,null,null,null); List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,null,null,null);
......
...@@ -110,13 +110,12 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer ...@@ -110,13 +110,12 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return false; return false;
//throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!"); //
} }
} }
public WorkDto getNodeInfoCode(String flowTaskId, boolean token) { public WorkDto getNodeInfoCode(String flowTaskId, boolean token) {
WorkDto workDto = null; WorkDto workDto = null;
try {
FeignClientResult<JSONObject> jSONObject = null; FeignClientResult<JSONObject> jSONObject = null;
if (token) { if (token) {
jSONObject = workflowFeignClient.getNodeInfo(flowTaskId); jSONObject = workflowFeignClient.getNodeInfo(flowTaskId);
...@@ -145,16 +144,11 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer ...@@ -145,16 +144,11 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
} }
return workDto; return workDto;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
} }
public String getTaskNoAuth(String processInstanceId, boolean token) { public String getTaskNoAuth(String processInstanceId, boolean token) {
String flowTaskId = null; String flowTaskId = null;
try {
JSONObject jSONObject = null; JSONObject jSONObject = null;
if (token) { if (token) {
jSONObject = workflowFeignClient.getTaskNoAuth(processInstanceId); jSONObject = workflowFeignClient.getTaskNoAuth(processInstanceId);
...@@ -170,11 +164,7 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer ...@@ -170,11 +164,7 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!"); throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
} }
return flowTaskId; return flowTaskId;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
} }
} }
package com.yeejoin.amos.boot.module.hygf.biz.service.impl; package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -369,10 +370,10 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD ...@@ -369,10 +370,10 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
System.out.println("删除旧管理员===================================:"+publicAgencyUsex.getAmosUserId()); System.out.println("删除旧管理员===================================:"+publicAgencyUsex.getAmosUserId());
List<String> userId1 = new ArrayList<>();
if(roidx!=null&&!roidx.isEmpty()&&roidx.size()==1&&roidx.get(0).longValue()==userGroupId){ if(roidx!=null&&!roidx.isEmpty()&&roidx.size()==1&&roidx.get(0).longValue()==userGroupId){
//新增空角色防止单位丢失 //新增空角色防止单位丢失
List<String> userId1 = new ArrayList<>();
userId1.add(publicAgencyUsex.getAmosUserId()); userId1.add(publicAgencyUsex.getAmosUserId());
Privilege.groupUserClient.create(userGroupempty, userId1); Privilege.groupUserClient.create(userGroupempty, userId1);
} }
...@@ -394,7 +395,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD ...@@ -394,7 +395,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
publicAgencyUsex.setRole(null); publicAgencyUsex.setRole(null);
}else{ }else{
roidx.remove(userGroupId); roidx.remove(userGroupId);
publicAgencyUsex.setRole(JSON.toJSONString(roidx)); publicAgencyUsex.setRole(CollectionUtil.isEmpty(roidx)? JSON.toJSONString(Arrays.asList(userGroupempty)):JSON.toJSONString(roidx));
} }
//修改当前用户角色权限 //修改当前用户角色权限
List<Long> roid= JSONArray.parseArray(publicAgencyUse.getRole(),Long.class); List<Long> roid= JSONArray.parseArray(publicAgencyUse.getRole(),Long.class);
......
...@@ -152,7 +152,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -152,7 +152,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
@Override @Override
@Transactional @Transactional
public boolean savePowerStation(PowerStation powerStation, boolean flag,String name,String meg) { public boolean savePowerStation(PowerStation powerStation, boolean flag,String name,String meg) {
try{ try {
//流程节点code //流程节点code
// if (flag) { // if (flag) {
// String flowTaskIdnext = this.getTaskNoAuth(powerStation.getProcessInstanceId()); // String flowTaskIdnext = this.getTaskNoAuth(powerStation.getProcessInstanceId());
...@@ -220,8 +220,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -220,8 +220,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
return fl; return fl;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
} }
return false;
} }
@Override @Override
...@@ -353,7 +353,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -353,7 +353,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// } // }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
} }
return code; return code;
...@@ -438,7 +438,6 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -438,7 +438,6 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
public WorkDto getNodeInfoCode(String flowTaskId) { public WorkDto getNodeInfoCode(String flowTaskId) {
WorkDto workDto = null; WorkDto workDto = null;
try {
FeignClientResult<JSONObject> jSONObject = workflowFeignClient.getNodeInfo(flowTaskId); FeignClientResult<JSONObject> jSONObject = workflowFeignClient.getNodeInfo(flowTaskId);
if (IDX_REQUEST_STATE.equals(String.valueOf(jSONObject.getStatus()))) { if (IDX_REQUEST_STATE.equals(String.valueOf(jSONObject.getStatus()))) {
JSONObject js = jSONObject.getResult(); JSONObject js = jSONObject.getResult();
...@@ -463,16 +462,12 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -463,16 +462,12 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
} }
return workDto; return workDto;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
} }
public String getTaskNoAuth(String processInstanceId) { public String getTaskNoAuth(String processInstanceId) {
String flowTaskId = null; String flowTaskId = null;
try {
JSONObject jSONObject = workflowFeignClient.getTaskNoAuth(processInstanceId); JSONObject jSONObject = workflowFeignClient.getTaskNoAuth(processInstanceId);
if (IDX_REQUEST_STATE.equals(String.valueOf(jSONObject.get("code")))) { if (IDX_REQUEST_STATE.equals(String.valueOf(jSONObject.get("code")))) {
LinkedHashMap jsd = jSONObject.get("data") != null ? (LinkedHashMap) jSONObject.get("data") : null; LinkedHashMap jsd = jSONObject.get("data") != null ? (LinkedHashMap) jSONObject.get("data") : null;
...@@ -482,11 +477,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -482,11 +477,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!"); throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
} }
return flowTaskId; return flowTaskId;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
} }
// 设计信息填充 // 设计信息填充
......
...@@ -282,7 +282,6 @@ public class SurveyInformationServiceImpl ...@@ -282,7 +282,6 @@ public class SurveyInformationServiceImpl
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new BadRequest("系统异常");
} }
return surveyInfoAllDto; return surveyInfoAllDto;
...@@ -369,7 +368,6 @@ public class SurveyInformationServiceImpl ...@@ -369,7 +368,6 @@ public class SurveyInformationServiceImpl
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
} }
// PowerStation powerStation = powerStationService.getObjByNhId(String.valueOf(peasantHousehold.getSequenceNbr()), PowerStationProcessStateEnum.作废.getCode()); // PowerStation powerStation = powerStationService.getObjByNhId(String.valueOf(peasantHousehold.getSequenceNbr()), PowerStationProcessStateEnum.作废.getCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment