Commit b75ccd16 authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents d047d54b 55b2c02f
......@@ -13,7 +13,7 @@ public enum RuleTypeEnum {
计划提交("计划提交", "addPlan","auditPage", RuleConstant.WEB, RuleConstant.TASK),
计划审核("计划审核", "planAudit", "auditPage", RuleConstant.APP_WEB, RuleConstant.NOTIFY),
计划审核完成("计划审核完成", "planAuditAll", "formulatePage", RuleConstant.APP_WEB, RuleConstant.TASK),
计划生成("计划生成", "addPlanTask", null, RuleConstant.APP, RuleConstant.TASK),
计划生成("计划生成", "addPlanTask", null, RuleConstant.APP, RuleConstant.NOTIFY),
计划完成("计划完成", "planCompleted", null, RuleConstant.APP_WEB, RuleConstant.NOTIFY),
// 隐患
......
......@@ -669,16 +669,12 @@ GROUP BY
</select>
<select id="amosIdExist" resultType="int">
select sum(num) from (
-- SELECT count(*) AS num FROM cb_firefighters WHERE amos_user_id = #{amosId} and is_delete = 0
--
-- union all
SELECT count(*) AS num FROM cb_org_usr WHERE amos_org_id = #{amosId} and is_delete = 0
-- union all SELECT count(*) AS num FROM cb_maintenance_company WHERE amos_org_id = #{amosId} and is_delete = 0
) AS total;
SELECT count(*) AS num FROM cb_org_usr WHERE amos_org_id = #{amosId} and is_delete = 0;
</select>
<select id="amosIdExistTeam" resultType="int">
......
......@@ -18,6 +18,7 @@ public enum WorkFlowUriEnum {
当前子节点("当前子节点", "/wf/processes/{processInstanceId}/tasks?taskDefinitionKey={taskDefinitionKey}", "processInstanceId,taskDefinitionKey"),
工作流流水("工作流流水","/wf/processes/{processInstanceId}/tasks", "processInstanceId"),
子节点信息("子节点信息","/workflow/task/list/all/{instanceId}", "instanceId"),
无权限流程任务("无权限流程任务任务", "/workflow/task/getTaskNoAuth/{processInstanceId}", "processInstanceId"),
当前任务("当前任务","/workflow/task/{processInstanceId}", "processInstanceId");
private String desc;
......
......@@ -332,6 +332,21 @@ public class LatentDangerController extends AbstractBaseController {
return CommonResponseUtil.failure("系统繁忙,请稍后再试");
}
}
@ApiOperation(value = "无流程权限的隐患当前任务", notes = "无流程权限的隐患当前任务")
@GetMapping(value = "/detail/noAuthTask/{processInstanceId}")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public CommonResponse noAuthTaskDetail(@PathVariable String processInstanceId) {
try {
AgencyUserModel user = getUserInfo();
if (ObjectUtils.isEmpty(user)) {
return CommonResponseUtil.failure("用户session过期");
}
return CommonResponseUtil.success(iLatentDangerService.queryTaskNoAuthByInstanceId(processInstanceId));
} catch (Exception e) {
logger.error("获取隐患任务出错", e.getMessage());
return CommonResponseUtil.failure("系统繁忙,请稍后再试");
}
}
@ApiOperation(value = "应急指挥科人员列表", notes = "应急指挥科人员列表")
@GetMapping(value = "/emergencyCommandSection/person/list")
......
......@@ -712,7 +712,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
}
@Transactional
@Transactional
@Override
public DangerExecuteSubmitDto execute(LatentDangerExcuteParam latentDangerExcuteParam, String userId, String userRealName, String departmentId, String departmentName, RoleBo role) {
DangerExecuteSubmitDto executeSubmitDto = new DangerExecuteSubmitDto();
......@@ -1786,7 +1786,19 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
return taskId;
}
@Override
public String queryTaskNoAuthByInstanceId(String processInstanceId) {
String taskId = null;
JSONObject taskJson = remoteWorkFlowService.queryTaskNoAuth(processInstanceId);
if (null != taskJson) {
if (ValidationUtil.isEmpty(taskJson.get("data"))) {
return null;
}
JSONObject dataJson = (JSONObject) taskJson.get("data");
taskId = (String) dataJson.get("id");
}
return taskId;
}
@Override
public List<Map<String, Object>> getPersonListByCompanyId() {
List<Map<String, Object>> personList = jcsFeignClient.getPersonListByCompanyId(emergencyCommandSectionId).getResult();
......
......@@ -86,4 +86,6 @@ public interface ILatentDangerService {
String queryTaskByInstanceId(String processInstanceId);
List<Map<String, Object>> getPersonListByCompanyId();
public String queryTaskNoAuthByInstanceId(String processInstanceId);
}
......@@ -279,7 +279,19 @@ public class RemoteWorkFlowService {
logger.info("\r\n请求路径=======================>" + url + "\r\n返回参数=======================>" + resultStr);
return json;
}
public JSONObject queryTaskNoAuth(String id) {
Map<String, String> map = Maps.newHashMap();
map.put("processInstanceId", id);
String url = buildUrl(address, WorkFlowUriEnum.无权限流程任务, map);
Map<String, String> headerMap = Maps.newHashMap();
headerMap.put(XJConstant.TOKEN_KEY, RequestContext.getToken());
headerMap.put(XJConstant.PRODUCT, RequestContext.getProduct());
headerMap.put(XJConstant.APPKEY, RequestContext.getAppKey());
String resultStr = HttpUtil.sendHttpGetWithHeader(url, headerMap);
JSONObject json = handleResult(resultStr);
logger.info("\r\n请求路径=======================>" + url + "\r\n返回参数=======================>" + resultStr);
return json;
}
public JSONObject queryTaskDetail(String taskId) {
Map<String, String> map = Maps.newHashMap();
map.put("taskId", taskId);
......
......@@ -610,7 +610,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
log.info(String.format("计划对象:%s", JSON.toJSON(plan)));
// 规则推送消息
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.计划生成, extraUserIds);
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.计划生成, extraUserIds);//根据bug4150 将此处的计划生成的枚举值变成了消息,既TASK -> NOTIFY
}
@Override
......
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