Commit 2abbe8f1 authored by chenzhao's avatar chenzhao

修改 整改人

parent 68a5d751
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.workflow.feign; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.workflow.feign;
import java.util.HashMap; import java.util.HashMap;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -12,6 +13,9 @@ import java.text.ParseException; ...@@ -12,6 +13,9 @@ import java.text.ParseException;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import feign.Response; import feign.Response;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
@FeignClient(name = "AMOS-API-WORKFLOW", path = "workflow", configuration = @FeignClient(name = "AMOS-API-WORKFLOW", path = "workflow", configuration =
{ CommonMultipartSupportConfig.class }) { CommonMultipartSupportConfig.class })
...@@ -214,4 +218,9 @@ public interface WorkflowFeignService { ...@@ -214,4 +218,9 @@ public interface WorkflowFeignService {
*/ */
@RequestMapping(value = "/activitiHistory/getTaskListForTaskName/{taskName}/{definitionKey}",method = RequestMethod.GET) @RequestMapping(value = "/activitiHistory/getTaskListForTaskName/{taskName}/{definitionKey}",method = RequestMethod.GET)
JSONObject getTaskListForTaskName(@PathVariable String taskName,@PathVariable String definitionKey) throws Exception ; JSONObject getTaskListForTaskName(@PathVariable String taskName,@PathVariable String definitionKey) throws Exception ;
@RequestMapping("/v2/task/candidateGroupsUser")
JSONObject candidateGroupsUser( @RequestParam(value="processDefinitionKey", required=false) String processDefinitionKey,
@RequestParam(value="processDefinitionId", required=false) String processDefinitionId,
@RequestParam("nodeKey") String nodeKey) throws Exception;
} }
...@@ -5,6 +5,7 @@ import java.util.stream.Collectors; ...@@ -5,6 +5,7 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum; import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
...@@ -92,6 +93,8 @@ public class OrgUsrController extends BaseController { ...@@ -92,6 +93,8 @@ public class OrgUsrController extends BaseController {
@Autowired @Autowired
EquipFeignClient equipFeignClient; EquipFeignClient equipFeignClient;
@Autowired
WorkflowFeignService workflowFeignService;
@Autowired @Autowired
DataDictionaryController dataDictionaryController; DataDictionaryController dataDictionaryController;
...@@ -1102,6 +1105,7 @@ public class OrgUsrController extends BaseController { ...@@ -1102,6 +1105,7 @@ public class OrgUsrController extends BaseController {
List<OrgUsr> orgUsrList =orgUsrMapper.selectList(wrapper); List<OrgUsr> orgUsrList =orgUsrMapper.selectList(wrapper);
return ResponseHelper.buildResponse(orgUsrList); return ResponseHelper.buildResponse(orgUsrList);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "POST", value = "查询单位基本信息", notes = "查询单位基本信息") @ApiOperation(httpMethod = "POST", value = "查询单位基本信息", notes = "查询单位基本信息")
@PostMapping(value = "/selectByAmosOrgIdDeptList") @PostMapping(value = "/selectByAmosOrgIdDeptList")
...@@ -1115,5 +1119,24 @@ public class OrgUsrController extends BaseController { ...@@ -1115,5 +1119,24 @@ public class OrgUsrController extends BaseController {
return ResponseHelper.buildResponse(orgUsrList); return ResponseHelper.buildResponse(orgUsrList);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET", value = "查询单位基本信息", notes = "查询单位基本信息")
@GetMapping(value = "/candidateGroupsUser")
public Object selectByAmosOrgIdDeptList(@RequestParam(value="processDefinitionKey", required=false) String processDefinitionKey,
@RequestParam(value="processDefinitionId", required=false) String processDefinitionId,
@RequestParam("nodeKey") String nodeKey) throws Exception {
JSONObject jsonObject = workflowFeignService.candidateGroupsUser(processDefinitionKey, processDefinitionId, nodeKey);
String result = JSONObject.toJSONString(jsonObject.get("result"));
List<Map> objects = JSONObject.parseArray(result,Map.class);
objects.stream().forEach(e->{
OrgUsr orgUsr = orgUsrMapper.queryByUserId(Long.valueOf(e.get("userId").toString()));
if (!ObjectUtils.isEmpty(orgUsr)){
e.put("realName",orgUsr.getBizOrgName());
}
});
return ResponseHelper.buildResponse(objects) ;
}
} }
\ No newline at end of file
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