Commit 343c1597 authored by chenzhao's avatar chenzhao

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

parent 27a8b0de
......@@ -674,9 +674,7 @@ public class UnitInfoController extends BaseController {
FeignClientResult<Collection<CompanyModel>> feignClientResult= Privilege.companyClient.querySubAgencyTree(regionalCompanies);
companyModel = (List<CompanyModel>)feignClientResult.getResult();
}
return ResponseHelper.buildResponse(companyModel);
}
......@@ -759,9 +757,6 @@ public class UnitInfoController extends BaseController {
public ResponseModel< List<Map<String,Object>> > getUnitInfoListData(
@RequestParam(required=false) Long unitInfoId,
@RequestParam(required=false) Long regionalCompaniesSeq
) {
UnitInfo unitInfo=unitInfoMapper.selectById(unitInfoId);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,null,null,null);
......
......@@ -110,13 +110,12 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
} catch (Exception e) {
e.printStackTrace();
return false;
//throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
//
}
}
public WorkDto getNodeInfoCode(String flowTaskId, boolean token) {
WorkDto workDto = null;
try {
FeignClientResult<JSONObject> jSONObject = null;
if (token) {
jSONObject = workflowFeignClient.getNodeInfo(flowTaskId);
......@@ -145,16 +144,11 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
}
return workDto;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
}
public String getTaskNoAuth(String processInstanceId, boolean token) {
String flowTaskId = null;
try {
JSONObject jSONObject = null;
if (token) {
jSONObject = workflowFeignClient.getTaskNoAuth(processInstanceId);
......@@ -170,11 +164,7 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
return flowTaskId;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
}
}
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.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -369,10 +370,10 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
System.out.println("删除旧管理员===================================:"+publicAgencyUsex.getAmosUserId());
List<String> userId1 = new ArrayList<>();
if(roidx!=null&&!roidx.isEmpty()&&roidx.size()==1&&roidx.get(0).longValue()==userGroupId){
//新增空角色防止单位丢失
List<String> userId1 = new ArrayList<>();
userId1.add(publicAgencyUsex.getAmosUserId());
Privilege.groupUserClient.create(userGroupempty, userId1);
}
......@@ -394,7 +395,7 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
publicAgencyUsex.setRole(null);
}else{
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);
......
......@@ -152,7 +152,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
@Override
@Transactional
public boolean savePowerStation(PowerStation powerStation, boolean flag,String name,String meg) {
try{
try {
//流程节点code
// if (flag) {
// String flowTaskIdnext = this.getTaskNoAuth(powerStation.getProcessInstanceId());
......@@ -220,8 +220,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
return fl;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
return false;
}
@Override
......@@ -353,7 +353,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// }
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
return code;
......@@ -438,7 +438,6 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
public WorkDto getNodeInfoCode(String flowTaskId) {
WorkDto workDto = null;
try {
FeignClientResult<JSONObject> jSONObject = workflowFeignClient.getNodeInfo(flowTaskId);
if (IDX_REQUEST_STATE.equals(String.valueOf(jSONObject.getStatus()))) {
JSONObject js = jSONObject.getResult();
......@@ -463,16 +462,12 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
}
return workDto;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
}
public String getTaskNoAuth(String processInstanceId) {
String flowTaskId = null;
try {
JSONObject jSONObject = workflowFeignClient.getTaskNoAuth(processInstanceId);
if (IDX_REQUEST_STATE.equals(String.valueOf(jSONObject.get("code")))) {
LinkedHashMap jsd = jSONObject.get("data") != null ? (LinkedHashMap) jSONObject.get("data") : null;
......@@ -482,11 +477,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
return flowTaskId;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
}
// 设计信息填充
......
......@@ -282,7 +282,6 @@ public class SurveyInformationServiceImpl
} catch (Exception e) {
e.printStackTrace();
throw new BadRequest("系统异常");
}
return surveyInfoAllDto;
......@@ -369,7 +368,6 @@ public class SurveyInformationServiceImpl
} catch (Exception e) {
e.printStackTrace();
throw new BaseException("获取工作流节点失败!", "400", "获取工作流节点失败!");
}
// 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