Browse Source

Merge remote-tracking branch 'origin/master'

‘xugp 1 year ago
parent
commit
2d9b9d6b2d
18 changed files with 733 additions and 10 deletions
  1. 32 6
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptResponsibilityController.java
  2. 72 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/MenuOperationController.java
  3. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/UserController.java
  4. 120 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/WorkflowController.java
  5. 4 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/DeptResponsibilityMapper.java
  6. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/DataAuthType.java
  7. 8 2
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/UserDataAuth.java
  8. 39 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/DoAction.java
  9. 27 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/GetInstance.java
  10. 53 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/IsOkAction.java
  11. 49 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/TodoTask.java
  12. 18 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/DeptResponsibilityResDTO.java
  13. 4 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IDeptResponsibilityService.java
  14. 80 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/MenuOperationService.java
  15. 151 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/WorkflowService.java
  16. 14 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptResponsibilityServiceImpl.java
  17. 53 0
      ims-service/ims-eval/src/main/resources/mappers/DeptResponsibilityMapper.xml
  18. 3 2
      ims-service/ims-eval/src/main/resources/mappers/UserDataAuthMapper.xml

+ 32 - 6
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptResponsibilityController.java

@@ -5,14 +5,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.DeptResponsibility;
 import com.ims.eval.entity.Indicator;
+import com.ims.eval.entity.dto.response.DeptResponsibilityResDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IDeptResponsibilityService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -30,6 +33,8 @@ public class DeptResponsibilityController {
 	@Autowired
 	private IDeptResponsibilityService deptResponsibilityService;
 
+	@Autowired
+	private HttpServletRequest request;
 
 	/**
 	 * 分页查询
@@ -121,6 +126,23 @@ public class DeptResponsibilityController {
 	}
 
 
+
+	/**
+	 *
+	 * @param id 目标责任书id
+	 * @return
+	 */
+	//@ImsPreAuth("eval:responsibilityIndicatorInfo:view")
+	@GetMapping(value = "getByidAndInfo")
+	public R planValueList(
+		@RequestParam(value = "id", required = false) String  id,
+		@RequestParam(value = "dept", required = false) String dept) {
+		DeptResponsibilityResDTO resDTO = deptResponsibilityService.getByidAndInfo(id, dept);
+		return R.ok().data(resDTO);
+	}
+
+
+
 	/**
 	 * 批量删除
 	 *
@@ -131,12 +153,16 @@ public class DeptResponsibilityController {
 	@PostMapping(value = "/remove/{ids}")
 	@ApiOperation(value = "删除", notes = "删除")
 	public R deleteAll(@PathVariable("ids") String ids) {
-		String[] strings = ids.split(",");
-		boolean b = deptResponsibilityService.removeByIds(Arrays.asList(strings));
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("删除失败!");
+		try {
+			String[] strings = ids.split(",");
+			boolean b = deptResponsibilityService.removeByIds(Arrays.asList(strings));
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("删除失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 

+ 72 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/MenuOperationController.java

@@ -0,0 +1,72 @@
+package com.ims.eval.controller;
+
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ims.eval.entity.custom.DoAction;
+import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.custom.MenuOperationService;
+import com.ims.eval.service.custom.WorkflowService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * <p>
+ * 工作流前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-03
+ */
+@Slf4j
+@RestController
+@RequestMapping("//menu")
+public class MenuOperationController {
+
+	@Autowired
+	private MenuOperationService menuOperationService;
+
+	@Autowired
+	private HttpServletRequest request;
+
+
+	/**
+	 * 获取菜单
+	 * @param parentId
+	 * @return
+	 */
+	@PostMapping(value = "menuList")
+	public R menuList(@RequestParam(value = "parentId", required = false) String parentId) {
+		JSONArray json = null;
+		try {
+			json = menuOperationService.menuList(parentId,request);
+		} catch (Exception e) {
+			log.error("错误",e);
+			return R.error().customError("获取菜单获取失败");
+		}
+		return R.ok().data(json);
+	}
+
+
+
+	/**
+	 * 获取用户权限
+	 * @return
+	 */
+	@PostMapping(value = "getPrivilegesOfCurrentUserAll")
+	public R getPrivilegesOfCurrentUserAll() {
+		JSONObject json = null;
+		try {
+			json = menuOperationService.getPrivilegesOfCurrentUserAll(request);
+		} catch (Exception e) {
+			log.error("错误",e);
+			return R.error().customError("获取用户权限获取失败");
+		}
+		return R.ok().data(json);
+	}
+
+
+}

+ 1 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/UserController.java

@@ -87,6 +87,7 @@ public class UserController {
 		return R.ok().data(json);
 	}
 
+
 	/**
 	 * 退出登录
 	 * @param token

+ 120 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/WorkflowController.java

@@ -0,0 +1,120 @@
+package com.ims.eval.controller;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ims.eval.entity.IndicatorDictionary;
+import com.ims.eval.entity.custom.DoAction;
+import com.ims.eval.entity.custom.GetInstance;
+import com.ims.eval.entity.custom.IsOkAction;
+import com.ims.eval.entity.custom.TodoTask;
+import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.custom.WorkflowService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * <p>
+ * 工作流前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-03
+ */
+@Slf4j
+@RestController
+@RequestMapping("//workflow")
+public class WorkflowController {
+
+	@Autowired
+	private WorkflowService workflowService;
+
+	@Autowired
+	private HttpServletRequest request;
+
+
+
+	/**
+	 * 流程启动
+	 * @param doAction
+	 * @return
+	 */
+	@PostMapping(value = "doAction")
+	public R doAction(@RequestBody DoAction doAction) {
+		JSONObject json = null;
+		try {
+			json = workflowService.doAction(doAction,request);
+		} catch (Exception e) {
+			log.error("错误",e);
+			return R.error().customError("流程发起任务失败");
+		}
+		return R.ok().data(json);
+	}
+
+
+
+
+	/**
+	 * 获取待办任务
+	 * @param todoTask
+	 * @return
+	 */
+	@PostMapping(value = "todoTaskList")
+	public R todoTaskList(@RequestBody TodoTask todoTask) {
+		JSONObject json = null;
+		try {
+			json = workflowService.todoTaskList(todoTask,request);
+		} catch (Exception e) {
+			log.error("错误",e);
+			return R.error().customError("获取待办任务失败");
+		}
+		return R.ok().data(json);
+	}
+
+
+	/**
+	 * 流程审批
+	 * @param isOkAction
+	 * @return
+	 */
+	@PostMapping(value = "isOkAction")
+	public R isOkAction(@RequestBody IsOkAction isOkAction) {
+		JSONObject json = null;
+		try {
+			json = workflowService.isOkAction(isOkAction,request);
+		} catch (Exception e) {
+			log.error("错误",e);
+			return R.error().customError("流程发送失败");
+		}
+		return R.ok().data(json);
+	}
+
+
+	/**
+	 * 获取流程实例
+	 * @param id
+	 * @param iamCode
+	 * @return
+	 */
+	@PostMapping(value = "getInstanceAndChildren")
+	public R getInstanceAndChildren(@RequestParam(value = "id", required = false) String id,
+									@RequestParam(value = "iamCode", required = false) String iamCode) {
+		JSONObject json = null;
+		try {
+			json = workflowService.getInstanceAndChildren(id,iamCode,request);
+		} catch (Exception e) {
+			log.error("错误",e);
+			return R.error().customError("流程发送失败");
+		}
+		return R.ok().data(json);
+	}
+
+
+
+
+
+
+
+}

+ 4 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/DeptResponsibilityMapper.java

@@ -2,6 +2,8 @@ package com.ims.eval.dao;
 
 import com.ims.eval.entity.DeptResponsibility;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ims.eval.entity.dto.response.DeptResponsibilityResDTO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -13,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface DeptResponsibilityMapper extends BaseMapper<DeptResponsibility> {
 
+	DeptResponsibilityResDTO selectById(@Param("id")String id);
+
 }

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/DataAuthType.java

@@ -60,5 +60,10 @@ public class DataAuthType extends Model {
      */
     private String remark;
 
+	/**
+	 * 数据优先级(数字越大,优先级越高)
+	 */
+	private String dataPriority;
+
 
 }

+ 8 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/entity/UserDataAuth.java

@@ -36,11 +36,17 @@ public class UserDataAuth extends Model {
 	 */
 	@TableField(exist = false)
 	private String dataAuthCode;
+	
+	/**
+	 * 数据优先级(数字越大,优先级越高)
+	 */
+	@TableField(exist = false)
+	private String dataPriority;
 
     /**
-     * 用户登录名
+     * 校色代码(来源于校色配置)
      */
-    private String loginName;
+    private String roleCode;
 
     /**
      * 创建时间

+ 39 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/DoAction.java

@@ -0,0 +1,39 @@
+package com.ims.eval.entity.custom;
+
+import lombok.Data;
+
+/**
+ * <p>
+ * 流程启动请求业务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Data
+public class DoAction {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 编码
+	 */
+	private String iamCode;
+	/**
+	 * 流程定义key
+	 */
+	private String defKey;
+	/**
+	 * 业务对象ID
+	 */
+	private String businessKey;
+	/**
+	 * 执行操作(固定值:start)
+	 */
+	private String action;
+	/**
+	 * 流程发起意见
+	 */
+	private String opinion;
+
+
+}

+ 27 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/GetInstance.java

@@ -0,0 +1,27 @@
+package com.ims.eval.entity.custom;
+
+import lombok.Data;
+
+/**
+ * <p>
+ * 获取流程实例请求业务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Data
+public class GetInstance {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * id
+	 */
+	private String id;
+
+	/**
+	 * 编码
+	 */
+	private String iamCode;
+}

+ 53 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/IsOkAction.java

@@ -0,0 +1,53 @@
+package com.ims.eval.entity.custom;
+
+import lombok.Data;
+
+/**
+ * <p>
+ * 流程同意请求业务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Data
+public class IsOkAction {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 任务id
+	 */
+	private String taskId;
+
+	/**
+	 * 任务节点id
+	 */
+	private String nodeId;
+
+	/**
+	 * 执行操作(同意:agree;拒绝:reject)
+	 */
+	private String action;
+
+	/**
+	 * 流程实例id
+	 */
+	private String instanceId;
+
+	/**
+	 * 流程发起意见
+	 */
+	private String opinion;
+
+	/**
+	 * 驳回到的节点(自由驳回时生效)
+	 */
+	private String destination;
+
+	/**
+	 * 编码
+	 */
+	private String iamCode;
+
+}

+ 49 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/TodoTask.java

@@ -0,0 +1,49 @@
+package com.ims.eval.entity.custom;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 待办任务请求业务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Data
+public class TodoTask {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编码
+     */
+    private String iamCode;
+
+    /**
+     * 排序
+     */
+    private String order;
+
+    /**
+     * 排序字段
+     */
+    private String sort;
+
+    /**
+     * 起始值
+
+     */
+    private String offset;
+
+    /**
+     * 分页大小,默认20条
+     */
+    private String limit;
+
+
+
+
+}

+ 18 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/DeptResponsibilityResDTO.java

@@ -0,0 +1,18 @@
+package com.ims.eval.entity.dto.response;
+
+import com.ims.eval.entity.DeptResponsibility;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+
+@Data
+@ApiModel(value = "目标责任书明细响应类", description = "目标责任书明细响应类")
+public class DeptResponsibilityResDTO extends DeptResponsibility {
+
+
+	//明细
+	Map<String, List<ResponsibilityIndicatorInfoResDTO>> map;
+}

+ 4 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IDeptResponsibilityService.java

@@ -3,6 +3,7 @@ package com.ims.eval.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.eval.entity.DeptResponsibility;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ims.eval.entity.dto.response.DeptResponsibilityResDTO;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
@@ -23,4 +24,7 @@ public interface IDeptResponsibilityService extends IService<DeptResponsibility>
 
 	boolean generateResponsibility(String orgEvalRuleId);
 
+	DeptResponsibilityResDTO getByidAndInfo(String id, String dept);
+
+
 }

+ 80 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/MenuOperationService.java

@@ -0,0 +1,80 @@
+package com.ims.eval.service.custom;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ims.eval.config.ImaConfig;
+import com.ims.eval.entity.custom.DoAction;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.*;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * <p>
+ * 菜单 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Service
+@Slf4j
+public class MenuOperationService {
+
+	@Autowired
+	private RestTemplate restTemplate;
+
+	@Autowired
+	private ImaConfig imaConfig;
+
+	/**
+	 * 获取权限菜单
+	 * @param parentId
+	 * @return
+	 */
+	public JSONArray menuList(String parentId, HttpServletRequest request){
+		HttpHeaders headers = new HttpHeaders();
+		headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
+		headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
+		headers.add("code", request.getHeader("code"));
+
+
+		HttpEntity<Map> param = new HttpEntity<>(null, headers);
+		ResponseEntity<String> responseEntity2 = restTemplate.exchange(imaConfig.getGatewayUrl()+"ims-ext/sys/sysMenu/menuList?parentId={1}", HttpMethod.POST,param,String.class,parentId);
+		log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
+		if(200== responseEntity2.getStatusCodeValue()){
+			return JSON.parseArray(responseEntity2.getBody());
+		}
+		return null;
+	}
+
+
+
+	/**
+	 * 获取用户权限
+	 * @return
+	 */
+	public JSONObject getPrivilegesOfCurrentUserAll(HttpServletRequest request){
+		HttpHeaders headers = new HttpHeaders();
+		headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
+		headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
+		headers.add("code", request.getHeader("code"));
+
+
+		HttpEntity<Map> param = new HttpEntity<>(null, headers);
+		ResponseEntity<String> responseEntity2 = restTemplate.exchange(imaConfig.getGatewayUrl()+"ims-ext/sys/sysRole/getPrivilegesOfCurrentUserAll", HttpMethod.POST,param,String.class);
+		log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
+		if(200== responseEntity2.getStatusCodeValue()){
+			return JSON.parseObject(responseEntity2.getBody());
+		}
+		return null;
+	}
+
+
+}

+ 151 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/WorkflowService.java

@@ -0,0 +1,151 @@
+package com.ims.eval.service.custom;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.ims.eval.config.ImaConfig;
+import com.ims.eval.entity.custom.DoAction;
+import com.ims.eval.entity.custom.IsOkAction;
+import com.ims.eval.entity.custom.TodoTask;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.*;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+
+/**
+ * <p>
+ * 工作流 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Service
+@Slf4j
+public class WorkflowService {
+
+	@Autowired
+	private RestTemplate restTemplate;
+
+	@Autowired
+	private ImaConfig imaConfig;
+
+
+
+	/**
+	 * 发起流程
+	 * @param doAction
+	 * @return
+	 */
+	public JSONObject doAction(DoAction doAction, HttpServletRequest request){
+		HttpHeaders headers = new HttpHeaders();
+		headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
+		headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
+		headers.add("code", request.getHeader("code"));
+		Map<String, String> map = new LinkedHashMap<>();
+		map.put("iamCode",doAction.getIamCode());
+		map.put("defKey",doAction.getDefKey());
+		map.put("businessKey",doAction.getBusinessKey());
+		map.put("action",doAction.getAction());
+		map.put("opinion",doAction.getOpinion());
+
+		HttpEntity<Map> param = new HttpEntity<>(map, headers);
+		ResponseEntity<String> responseEntity2 = restTemplate.exchange("http://10.65.78.23:8080/bpm/instance/doAction", HttpMethod.POST,param,String.class);
+		log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
+		if(200== responseEntity2.getStatusCodeValue()){
+			return JSON.parseObject(responseEntity2.getBody());
+		}
+		return null;
+	}
+
+	/**
+	 * 获取待办任务
+	 * @param todoTask
+	 * @return
+	 */
+	public JSONObject todoTaskList(TodoTask todoTask, HttpServletRequest request){
+		HttpHeaders headers = new HttpHeaders();
+		headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
+		headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
+		headers.add("code", request.getHeader("code"));
+//		MultiValueMap<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(todoTask), LinkedMultiValueMap.class);
+		Map<String, String> map = new LinkedHashMap<>();
+		map.put("iamCode",todoTask.getIamCode());
+		map.put("order",todoTask.getOrder());
+		map.put("sort",todoTask.getSort());
+		map.put("offset",todoTask.getOffset());
+		map.put("limit",todoTask.getLimit());
+		HttpEntity<Map> param = new HttpEntity<>(map, headers);
+		ResponseEntity<String> responseEntity2 = restTemplate.exchange("http://10.65.78.23:8080/bpm/my/todoTaskList", HttpMethod.POST,param,String.class);
+		log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
+		if(200== responseEntity2.getStatusCodeValue()){
+			return JSON.parseObject(responseEntity2.getBody());
+		}
+		return null;
+	}
+
+
+
+	/**
+	 * 流程审批
+	 * @param isOkAction
+	 * @return
+	 */
+	public JSONObject isOkAction(IsOkAction isOkAction, HttpServletRequest request){
+		HttpHeaders headers = new HttpHeaders();
+		headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
+		headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
+		headers.add("code", request.getHeader("code"));
+		Map<String, String> map = new LinkedHashMap<>();
+
+		map.put("taskId",isOkAction.getTaskId());
+		map.put("nodeId",isOkAction.getNodeId());
+		map.put("action",isOkAction.getAction());
+		//发起提条件不是同意
+		if(!"agree".equals(isOkAction.getAction())){
+			map.put("destination",isOkAction.getDestination());
+		}
+		map.put("instanceId",isOkAction.getInstanceId());
+		map.put("opinion",isOkAction.getOpinion());
+		map.put("iamCode",isOkAction.getIamCode());
+		HttpEntity<Map> param = new HttpEntity<>(map, headers);
+		ResponseEntity<String> responseEntity2 = restTemplate.exchange("http://10.65.78.23:8080/bpm/task/doAction", HttpMethod.POST,param,String.class);
+		log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
+		if(200== responseEntity2.getStatusCodeValue()){
+			return JSON.parseObject(responseEntity2.getBody());
+		}
+		return null;
+	}
+
+
+	/**
+	 * 获取业务id
+	 * @param id
+	 * @param iamCode
+	 * @param request
+	 * @return
+	 */
+	public JSONObject getInstanceAndChildren(String id,String iamCode, HttpServletRequest request){
+		HttpHeaders headers = new HttpHeaders();
+		headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
+		headers.add("Blade-Auth", request.getHeader("Blade-Auth"));
+		headers.add("code", request.getHeader("code"));
+
+		HttpEntity<Map> param = new HttpEntity<>(null, headers);
+		ResponseEntity<String> responseEntity2 = restTemplate.postForEntity("http://10.65.78.23:8080/bpm/instance/getInstanceAndChildren?id={1}&iamCode={2}",
+			param, String.class, id, iamCode);
+
+		log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
+		if(200== responseEntity2.getStatusCodeValue()){
+			return JSON.parseObject(responseEntity2.getBody());
+		}
+		return null;
+	}
+
+
+}

+ 14 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptResponsibilityServiceImpl.java

@@ -9,6 +9,8 @@ import com.ims.eval.config.CustomException;
 import com.ims.eval.dao.ResponsibilityIndicatorInfoMapper;
 import com.ims.eval.entity.*;
 import com.ims.eval.dao.DeptResponsibilityMapper;
+import com.ims.eval.entity.dto.response.DeptResponsibilityResDTO;
+import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
 import com.ims.eval.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -222,6 +224,18 @@ public class DeptResponsibilityServiceImpl extends ServiceImpl<DeptResponsibilit
 		return true;
 	}
 
+	@Override
+	public DeptResponsibilityResDTO getByidAndInfo(String id, String dept) {
+		DeptResponsibilityResDTO resDTO = baseMapper.selectById(id);
+
+		Map<String, List<ResponsibilityIndicatorInfoResDTO>> map = responsibilityIndicatorInfoService.planValueList(Arrays.asList(id), dept);
+		if(null != resDTO){
+			resDTO.setMap(map);
+		}
+
+		return resDTO;
+	}
+
 	@Transactional
 	@Override
 	public boolean saveOrUpdate(DeptResponsibility entity) {

+ 53 - 0
ims-service/ims-eval/src/main/resources/mappers/DeptResponsibilityMapper.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ims.eval.dao.DeptResponsibilityMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.ims.eval.entity.DeptResponsibility">
+        <id column="id" property="id" />
+        <result column="organization_name" property="organizationName" />
+        <result column="organization_id" property="organizationId" />
+        <result column="cycle_unit" property="cycleUnit" />
+        <result column="check_cycle" property="checkCycle" />
+        <result column="year" property="year" />
+        <result column="month" property="month" />
+        <result column="organization_evaluation_rule_id" property="organizationEvaluationRuleId" />
+        <result column="begin_date" property="beginDate" />
+        <result column="end_date" property="endDate" />
+        <result column="stage" property="stage" />
+        <result column="des" property="des" />
+        <result column="create_time" property="createTime" />
+        <result column="create_by" property="createBy" />
+        <result column="update_time" property="updateTime" />
+        <result column="update_by" property="updateBy" />
+        <result column="review_people" property="reviewPeople" />
+        <result column="review_people_time" property="reviewPeopleTime" />
+        <result column="review_opinion" property="reviewOpinion" />
+        <result column="final_review_people" property="finalReviewPeople" />
+        <result column="final_review_people_time" property="finalReviewPeopleTime" />
+        <result column="final_review_opinion" property="finalReviewOpinion" />
+        <result column="remark" property="remark" />
+        <result column="responsibility_code" property="responsibilityCode" />
+        <result column="organization_type" property="organizationType" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, organization_name, organization_id, cycle_unit, check_cycle, year, month, organization_evaluation_rule_id, begin_date, end_date, stage, des, create_time, create_by, update_time, update_by, review_people, review_people_time, review_opinion, final_review_people, final_review_people_time, final_review_opinion, remark, responsibility_code, organization_type
+    </sql>
+    <select id="selectById" resultType="com.ims.eval.entity.dto.response.DeptResponsibilityResDTO">
+        SELECT
+        *
+        FROM
+        dept_responsibility d
+
+        <where>
+            <if test="id !=null and id !=''">
+                AND d.id = #{id}
+            </if>
+
+        </where>
+
+    </select>
+
+</mapper>

+ 3 - 2
ims-service/ims-eval/src/main/resources/mappers/UserDataAuthMapper.xml

@@ -6,7 +6,7 @@
     <resultMap id="BaseResultMap" type="com.ims.eval.entity.UserDataAuth">
         <id column="id" property="id" />
         <result column="data_auth_type_id" property="dataAuthTypeId" />
-        <result column="login_name" property="loginName" />
+        <result column="role_code" property="roleCode" />
         <result column="create_time" property="createTime" />
         <result column="update_time" property="updateTime" />
         <result column="create_by" property="createBy" />
@@ -22,7 +22,8 @@
 
         select
             u.*,
-            d.data_auth_code
+            d.data_auth_code,
+            d.data_priority
             from
             user_data_auth u
             left join data_auth_type d on u.data_auth_type_id = d.id