Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

‘xugp 1 gadu atpakaļ
vecāks
revīzija
fc095f4474
28 mainītis faili ar 326 papildinājumiem un 148 dzēšanām
  1. 35 6
      ims-service/ims-eval/src/main/java/com/ims/eval/config/ImaConfig.java
  2. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptResponsibilityController.java
  3. 4 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorController.java
  4. 5 1
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationController.java
  5. 6 1
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationInfoController.java
  6. 15 2
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/ResponsibilityIndicatorInfoController.java
  7. 2 1
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/WorkflowController.java
  8. 78 78
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/Myuser.java
  9. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/OrganizationEvaluationInfoResDTO.java
  10. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/ResponsibilityIndicatorInfoResDTO.java
  11. 3 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/flow/FlowResult.java
  12. 6 0
      ims-service/ims-eval/src/main/java/com/ims/eval/feign/IGatewayUrlService.java
  13. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IDeptResponsibilityService.java
  14. 2 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationInfoService.java
  15. 3 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationService.java
  16. 2 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IResponsibilityIndicatorInfoService.java
  17. 10 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IUserService.java
  18. 2 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/MenuOperationService.java
  19. 41 27
      ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/WorkflowService.java
  20. 2 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptResponsibilityServiceImpl.java
  21. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java
  22. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorServiceImpl.java
  23. 15 7
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java
  24. 4 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationServiceImpl.java
  25. 21 3
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationStructureServiceImpl.java
  26. 15 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/ResponsibilityIndicatorInfoServiceImpl.java
  27. 32 7
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/UserServiceImpl.java
  28. 9 1
      ims-service/ims-eval/src/main/resources/application.yml

+ 35 - 6
ims-service/ims-eval/src/main/java/com/ims/eval/config/ImaConfig.java

@@ -1,23 +1,52 @@
 package com.ims.eval.config;
 
 import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.stereotype.Component;
 
 @Data
 @Component
-@ConfigurationProperties(prefix = "iam")
+//@ConfigurationProperties(prefix = "iam")
 public class ImaConfig {
 
+
+
+	@Value("${iam.active}")
+	private String active;
+
 	/**网关网址 **/
-	private String gatewayUrl;
+	@Value("${iam.gateway-url.dev}")
+	private String gatewayUrlDev;
 
 
-	public String getGatewayUrl() {
-		return gatewayUrl;
+	@Value("${iam.gateway-url.pro}")
+	private String gatewayUrlPro;
+
+
+	@Value("${iam.menu.dev}")
+	private String menuDev;
+
+	@Value("${iam.menu.pro}")
+	private String menuPro;
+
+
+	public String getMenu() {
+
+		if("dev".equals(active)) {
+			return menuDev;
+		}
+		return menuPro;
 	}
 
-	public void setGatewayUrl(String gatewayUrl) {
-		this.gatewayUrl = gatewayUrl;
+
+
+	public String getGatewayUrl() {
+		if("dev".equals(active)){
+			return gatewayUrlDev;
+		}
+		return gatewayUrlPro;
 	}
+
+
 }

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

@@ -140,7 +140,7 @@ public class DeptResponsibilityController {
 	public R planValueList(
 		@RequestParam(value = "id", required = false) String  id,
 		@RequestParam(value = "dept", required = false) String dept) {
-		DeptResponsibilityResDTO resDTO = deptResponsibilityService.getByidAndInfo(id, dept);
+		DeptResponsibilityResDTO resDTO = deptResponsibilityService.getByidAndInfo(id, dept, request);
 		return R.ok().data(resDTO);
 	}
 

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

@@ -10,6 +10,8 @@ import com.ims.eval.entity.Indicator;
 import com.ims.eval.service.IIndicatorDictionaryService;
 import com.ims.eval.service.IIndicatorService;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.log4j.Log4j2;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -25,6 +27,7 @@ import java.util.List;
  * @author wang
  * @since 2023-02-26
  */
+@Slf4j
 @RestController
 @RequestMapping("//indicator")
 public class IndicatorController {
@@ -171,6 +174,7 @@ public class IndicatorController {
 				return R.error().data("保存失败!");
 			}
 		} catch (CustomException e){
+			log.error("错误",e);
 			return R.customError(e.getMessage()).data("失败!");
 		}
 	}

+ 5 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationController.java

@@ -11,6 +11,7 @@ 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;
@@ -31,6 +32,9 @@ public class OrganizationEvaluationController {
 	@Autowired
 	private IOrganizationEvaluationService organizationEvaluationService;
 
+	@Autowired
+	private HttpServletRequest request;
+
 
 	/**
 	 * 分页查询
@@ -204,7 +208,7 @@ public class OrganizationEvaluationController {
 	public R planValueList(
 		@RequestParam(value = "id", required = false) String  id,
 		@RequestParam(value = "dept", required = false) String dept) {
-		OrganizationEvaluationResDTO resDTO = organizationEvaluationService.getByidAndInfo(id, dept);
+		OrganizationEvaluationResDTO resDTO = organizationEvaluationService.getByidAndInfo(id, dept,request);
 		return R.ok().data(resDTO);
 	}
 

+ 6 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationInfoController.java

@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.Map;
 
@@ -32,6 +33,10 @@ public class OrganizationEvaluationInfoController {
 	private IOrganizationEvaluationInfoService organizationEvaluationInfoService;
 
 
+	@Autowired
+	private HttpServletRequest request;
+
+
 	/**
 	 *
 	 * @param organizationEvaluationId 目标责任书id
@@ -42,7 +47,7 @@ public class OrganizationEvaluationInfoController {
 	public R finishValueList(
 		@RequestParam(value = "organizationEvaluationId", required = false) String organizationEvaluationId,
 		@RequestParam(value = "dept", required = false) String dept) {
-		Map list = organizationEvaluationInfoService.finishValueList(organizationEvaluationId, dept);
+		Map list = organizationEvaluationInfoService.finishValueList(organizationEvaluationId, dept, request);
 		return R.ok().data(list);
 	}
 

+ 15 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/controller/ResponsibilityIndicatorInfoController.java

@@ -7,9 +7,12 @@ import com.ims.eval.entity.dto.request.ResponsibilityIndicatorInfoUpdateDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IResponsibilityIndicatorInfoService;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.log4j.Log4j2;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.Map;
 
@@ -23,6 +26,7 @@ import java.util.Map;
  * @author wang
  * @since 2023-03-08
  */
+@Slf4j
 @RestController
 @RequestMapping("//responsibility-indicator-info")
 public class ResponsibilityIndicatorInfoController {
@@ -32,6 +36,10 @@ public class ResponsibilityIndicatorInfoController {
 	@Autowired
 	private IResponsibilityIndicatorInfoService responsibilityIndicatorInfoService;
 
+
+	@Autowired
+	private HttpServletRequest request;
+
 	/**
 	 *
 	 * @param deptResponsibilityIds 目标责任书id
@@ -42,8 +50,13 @@ public class ResponsibilityIndicatorInfoController {
 	public R planValueList(
 				  @RequestParam(value = "deptResponsibilityIds", required = false) List<String> deptResponsibilityIds,
 				  @RequestParam(value = "dept", required = false) String dept) {
-		Map list = responsibilityIndicatorInfoService.planValueList(deptResponsibilityIds, dept);
-		return R.ok().data(list);
+		try {
+			Map list = responsibilityIndicatorInfoService.planValueList(deptResponsibilityIds, dept,request);
+			return R.ok().data(list);
+		} catch (CustomException e) {
+			e.printStackTrace();
+			return R.customError(e.getMessage());
+		}
 	}
 
 

+ 2 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/controller/WorkflowController.java

@@ -8,6 +8,7 @@ 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.entity.flow.FlowResult;
 import com.ims.eval.service.custom.WorkflowService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -63,7 +64,7 @@ public class WorkflowController {
 	 */
 	@PostMapping(value = "todoTaskList")
 	public R todoTaskList(@RequestBody TodoTask todoTask) {
-		JSONObject json = null;
+		FlowResult json = null;
 		try {
 			json = workflowService.todoTaskList(todoTask,request);
 		} catch (Exception e) {

+ 78 - 78
ims-service/ims-eval/src/main/java/com/ims/eval/entity/Myuser.java

@@ -21,86 +21,86 @@ public class Myuser extends Model {
     private static final long serialVersionUID = 1L;
 
     private String id;
-
-    private String name;
-
-    private String mainPosName;
-
+//
+//    private String name;
+//
+////    private String mainPosName;
+//
     private String deptName;
-
-    private String orgId;
-
-    private String orgName;
-
-    private String unitId;
-
-    private String unitName;
-
-    private Boolean admin;
-
-    private Integer age;
-
-    private String companyId;
-
-    private String createBy;
-
-    private String createDate;
-
-    private String dbName;
-
-    private String delFlag;
-
-    private String deptId;
-
-    private String education;
-
-    private String email;
-
-    private String faceimageUrl;
-
-    private String gender;
-
-    private String isNewRecord;
-
-    private String loginFlag;
-
-    private String loginIp;
-
+//
+//    private String orgId;
+////
+////    private String orgName;
+////
+//    private String unitId;
+//
+//    private String unitName;
+//
+//    private Boolean admin;
+//
+//    private Integer age;
+//
+//    private String companyId;
+//
+//    private String createBy;
+//
+//    private String createDate;
+//
+//    private String dbName;
+//
+//    private String delFlag;
+//
+//    private String deptId;
+//
+//    private String education;
+//
+//    private String email;
+//
+//    private String faceimageUrl;
+//
+//    private String gender;
+//
+//    private String isNewRecord;
+//
+//    private String loginFlag;
+//
+//    private String loginIp;
+//
     private String loginName;
-
-    private String mainPosCode;
-
-    private String mainposId;
-
-    private String mobile;
-
-    private String nation;
-
-    private String no;
-
-    private String oldLoginIp;
-
-    private double partyCost;
-
-    private String phone;
-
-    private String photo;
-
-    private String posCode;
-
-    private String remarks;
-
-    private String residence;
-
-    private String roleNames;
-
-    private String token;
-
-    private String updateBy;
-
-    private Date updateDate;
-
-    private String userType;
+//
+//    private String mainPosCode;
+//
+//    private String mainposId;
+//
+//    private String mobile;
+//
+//    private String nation;
+//
+//    private String no;
+//
+//    private String oldLoginIp;
+//
+//    private double partyCost;
+//
+//    private String phone;
+//
+//    private String photo;
+//
+//    private String posCode;
+//
+//    private String remarks;
+//
+//    private String residence;
+//
+//    private String roleNames;
+//
+//    private String token;
+//
+//    private String updateBy;
+//
+//    private Date updateDate;
+//
+//    private String userType;
 
 
 }

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/OrganizationEvaluationInfoResDTO.java

@@ -112,4 +112,9 @@ public class OrganizationEvaluationInfoResDTO {
 	 * 状态
 	 */
 	private String state;
+
+	/**
+	 * 修改标记
+	 */
+	private Boolean updateMark;
 }

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/ResponsibilityIndicatorInfoResDTO.java

@@ -116,5 +116,10 @@ public class ResponsibilityIndicatorInfoResDTO {
 	 */
 	private String state;
 
+	/**
+	 * 修改标记
+	 */
+	private Boolean updateMark;
+
 
 }

+ 3 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/flow/FlowResult.java

@@ -1,5 +1,6 @@
 package com.ims.eval.entity.flow;
 
+import com.alibaba.fastjson.JSONArray;
 import lombok.Data;
 
 @Data
@@ -27,5 +28,7 @@ public class FlowResult {
 	 */
 	private String data;
 
+	private JSONArray rows;
+
 
 }

+ 6 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/feign/IGatewayUrlService.java

@@ -1,5 +1,6 @@
 package com.ims.eval.feign;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import feign.Headers;
 import feign.Param;
@@ -59,4 +60,9 @@ public interface IGatewayUrlService {
 	JSONObject removeByToken(@Param(value = "token") String token);
 
 
+	@Headers({"Content-Type: application/json", "Accept: application/json"})
+	@RequestLine("POST /ims-iam-ext/sys/sysOrg/allDataNoControl")
+	JSONArray allDataNoControl();
+
+
 }

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

@@ -26,7 +26,7 @@ public interface IDeptResponsibilityService extends IService<DeptResponsibility>
 
 	boolean generateResponsibility(String orgEvalRuleId);
 
-	DeptResponsibilityResDTO getByidAndInfo(String id, String dept);
+	DeptResponsibilityResDTO getByidAndInfo(String id, String dept,HttpServletRequest request);
 
 
 	List<Map> targetValueeport(String id, String dept, HttpServletRequest request);

+ 2 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationInfoService.java

@@ -4,6 +4,7 @@ import com.ims.eval.entity.OrganizationEvaluationInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ims.eval.entity.dto.request.OrganizationEvaluationInfoUpdateDTO;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.Map;
 
@@ -19,7 +20,7 @@ import java.util.Map;
  */
 public interface IOrganizationEvaluationInfoService extends IService<OrganizationEvaluationInfo> {
 
-	Map finishValueList(String organizationEvaluationId, String dept);
+	Map finishValueList(String organizationEvaluationId, String dept, HttpServletRequest request);
 
 	boolean saveBatchDto(List<OrganizationEvaluationInfo>  organizationEvaluationInfoList) throws Exception;
 

+ 3 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationService.java

@@ -6,8 +6,10 @@ import com.ims.eval.entity.OrganizationEvaluation;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ims.eval.entity.dto.response.OrganizationEvaluationResDTO;
 import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -42,8 +44,7 @@ public interface IOrganizationEvaluationService extends IService<OrganizationEva
 	boolean editState(String id, String state,String instId);
 
 
-	OrganizationEvaluationResDTO getByidAndInfo(String id, String dept);
-
+	OrganizationEvaluationResDTO getByidAndInfo(String id, String dept,HttpServletRequest request);
 
 
 }

+ 2 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/IResponsibilityIndicatorInfoService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.ims.eval.entity.dto.request.ResponsibilityIndicatorInfoUpdateDTO;
 import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.Map;
 
@@ -21,7 +22,7 @@ import java.util.Map;
 public interface IResponsibilityIndicatorInfoService extends IService<ResponsibilityIndicatorInfo> {
 
 
-	Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept);
+	Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept, HttpServletRequest request);
 
 	Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> finishValueList(List<String> deptResponsibilityIds, String dept);
 

+ 10 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IUserService.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.ims.eval.entity.Myuser;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 
 /**
@@ -45,6 +46,15 @@ public interface IUserService extends IService<Myuser> {
 	Myuser getSysUser(String code);
 
 	/**
+	 * 根据头信息
+	 * @param request
+	 * @return
+	 */
+	Myuser getSysUser(HttpServletRequest request);
+
+
+
+	/**
 	 * 通过token获取code
 	 *
 	 * @param token

+ 2 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/MenuOperationService.java

@@ -87,7 +87,8 @@ public class MenuOperationService {
 	 * @return
 	 */
 	public List<Menu> getMenuTree(String parentId, HttpServletRequest request) {
-		JSONArray arr = menuList(parentId, request);
+
+		JSONArray arr = menuList(imaConfig.getMenu(), request);
 		if (null == arr) {
 			return null;
 		}

+ 41 - 27
ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/WorkflowService.java

@@ -1,7 +1,9 @@
 package com.ims.eval.service.custom;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.nacos.client.naming.utils.CollectionUtils;
 import com.ims.eval.config.ImaConfig;
 import com.ims.eval.entity.custom.DoAction;
 import com.ims.eval.entity.custom.IsOkAction;
@@ -19,9 +21,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 
 /**
@@ -52,33 +52,33 @@ public class WorkflowService {
 	private ScoreCalculationSchedule scoreCalculationSchedule;
 
 
-
 	/**
 	 * 发起流程
+	 *
 	 * @param doAction
 	 * @return
 	 */
-	public JSONObject doAction(DoAction doAction, HttpServletRequest request){
+	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());
+		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);
+		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()){
+		if (200 == responseEntity2.getStatusCodeValue()) {
 			FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
 
-			if(result.getIsOk()){
-				boolean biz = updateWorkflowState(result.getData(),doAction.getDefKey(),doAction.getBusinessKey(),"");
-				if(biz){
+			if (result.getIsOk()) {
+				boolean biz = updateWorkflowState(result.getData(), doAction.getDefKey(), doAction.getBusinessKey(), "");
+				if (biz) {
 					log.info("保存流程实例id成功");
 				}
 			}
@@ -89,31 +89,45 @@ public class WorkflowService {
 
 	/**
 	 * 获取待办任务
+	 *
 	 * @param todoTask
 	 * @return
 	 */
-	public JSONObject todoTaskList(TodoTask todoTask, HttpServletRequest request){
+	public FlowResult 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());
+		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);
+		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());
+		//
+		if (200 == responseEntity2.getStatusCodeValue()) {
+			FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
+			if (result.getIsOk()) {
+				List<JSONObject> ds = new ArrayList<>();
+				for (int i = 0; i < result.getRows().size(); i++) {
+					String typeId = result.getRows().getJSONObject(i).get("typeId").toString();
+					if(!"440219646351376385".equals(typeId)){
+						ds.add(result.getRows().getJSONObject(i));
+						continue;
+					}
+				}
+				result.getRows().removeAll(ds);
+			}
+				return result;
+			}
+			return null;
 		}
-		return null;
-	}
 
-//440416982620438529
+
 
 	/**
 	 * 流程审批

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

@@ -230,10 +230,10 @@ public class DeptResponsibilityServiceImpl extends ServiceImpl<DeptResponsibilit
 	}
 
 	@Override
-	public DeptResponsibilityResDTO getByidAndInfo(String id, String dept) {
+	public DeptResponsibilityResDTO getByidAndInfo(String id, String dept,HttpServletRequest request) {
 		DeptResponsibilityResDTO resDTO = baseMapper.selectById(id);
 
-		Map<String, List<ResponsibilityIndicatorInfoResDTO>> map = responsibilityIndicatorInfoService.planValueList(Arrays.asList(id), dept);
+		Map<String, List<ResponsibilityIndicatorInfoResDTO>> map = responsibilityIndicatorInfoService.planValueList(Arrays.asList(id), dept,request);
 		if(null != resDTO){
 			resDTO.setMap(map);
 		}

+ 1 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java

@@ -60,6 +60,7 @@ public class IndicatorDictionaryServiceImpl extends ServiceImpl<IndicatorDiction
 		if (null != entity && (null == entity.getId() || "".equals(entity.getId().trim()))) {
 			QueryWrapper<IndicatorDictionary> qw = new QueryWrapper<>();
 			qw.lambda().eq(IndicatorDictionary::getIndicatorId, entity.getIndicatorId());
+			qw.lambda().eq(IndicatorDictionary::getChildCode, entity.getChildCode());
 			qw.lambda().eq(IndicatorDictionary::getOptionCode, entity.getOptionCode());
 			List<IndicatorDictionary> list = baseMapper.selectList(qw);
 			if (null != list && list.size() > 0) {

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorServiceImpl.java

@@ -159,7 +159,7 @@ public class IndicatorServiceImpl extends ServiceImpl<IndicatorMapper, Indicator
 			for (IndicatorDictionary i : dto2.getList()) {
 				if (null != i && (null == i.getId() || "".equals(i.getId().trim()))) {
 					QueryWrapper<IndicatorDictionary> qw = new QueryWrapper<>();
-					qw.lambda().eq(IndicatorDictionary::getIndicatorId, i.getIndicatorId());
+					qw.lambda().eq(IndicatorDictionary::getIndicatorId, dto.getId());
 					qw.lambda().eq(IndicatorDictionary::getChildCode, dto2.getChildCode());
 					qw.lambda().eq(IndicatorDictionary::getOptionCode, i.getOptionCode());
 					List<IndicatorDictionary> list2 = indicatorDictionaryMapper.selectList(qw);

+ 15 - 7
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java

@@ -1,24 +1,22 @@
 package com.ims.eval.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.IndicatorDictionary;
+import com.ims.eval.entity.Myuser;
 import com.ims.eval.entity.OrganizationEvaluationInfo;
 import com.ims.eval.dao.OrganizationEvaluationInfoMapper;
-import com.ims.eval.entity.ResponsibilityIndicatorInfo;
-import com.ims.eval.entity.dto.request.OrganizationEvaluationInfoUpdateDTO;
-import com.ims.eval.entity.dto.request.ResponsibilityIndicatorInfoUpdateDTO;
 import com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO;
-import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
 import com.ims.eval.service.ICalculateIndicatorItemInfoService;
 import com.ims.eval.service.IIndicatorDictionaryService;
 import com.ims.eval.service.IOrganizationEvaluationInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.eval.service.IUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
@@ -45,11 +43,21 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	@Autowired
 	private IIndicatorDictionaryService indicatorDictionaryService;
 
+	@Autowired
+	private IUserService userService;
+
 	@Override
-	public Map finishValueList(String organizationEvaluationId, String dept) {
+	public Map finishValueList(String organizationEvaluationId, String dept, HttpServletRequest request) {
 
-		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId(organizationEvaluationId,dept,"");//默认获取指定的怎目标
+		Myuser myuser = userService.getSysUser(request);
+		if(null == myuser){
+			throw new CustomException("暂无权限");
+		}
 
+		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId(organizationEvaluationId,dept,"");//默认获取指定的怎目标
+		list.stream().forEach(i->{
+			i.setUpdateMark(i.getDeptName().equals(myuser.getDeptName()));
+		});
 		Map<String  ,List<OrganizationEvaluationInfoResDTO>> map  = list.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getIsQuantified));
 		map.put("quantifiedList", map.remove("是"));
 		map.put("nonQuantifiedList", map.remove("否"));

+ 4 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationServiceImpl.java

@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
 import java.io.Serializable;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -482,10 +483,11 @@ public class OrganizationEvaluationServiceImpl extends ServiceImpl<OrganizationE
 		return b;
 	}
 
+
 	@Override
-	public OrganizationEvaluationResDTO getByidAndInfo(String id, String dept) {
+	public OrganizationEvaluationResDTO getByidAndInfo(String id, String dept,HttpServletRequest request) {
 		OrganizationEvaluationResDTO resDTO = baseMapper.selectById(id);
-		Map<String  ,List<OrganizationEvaluationInfoResDTO>> map  = organizationEvaluationInfoService.finishValueList(id,dept);
+		Map<String  ,List<OrganizationEvaluationInfoResDTO>> map  = organizationEvaluationInfoService.finishValueList(id,dept,request);
 		if(null != resDTO){
 			resDTO.setMap(map);
 		}

+ 21 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationStructureServiceImpl.java

@@ -1,13 +1,15 @@
 package com.ims.eval.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.ims.common.utils.StringUtils;
-import com.ims.eval.entity.OrganizationEvaluationRule;
 import com.ims.eval.entity.OrganizationStructure;
 import com.ims.eval.dao.OrganizationStructureMapper;
+import com.ims.eval.entity.custom.Menu;
+import com.ims.eval.feign.RemoteServiceBuilder;
 import com.ims.eval.service.IOrganizationStructureService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
@@ -29,6 +31,11 @@ public class OrganizationStructureServiceImpl extends ServiceImpl<OrganizationSt
 
 	private static String type = null;
 
+	@Autowired
+	private RemoteServiceBuilder remoteServiceBuilder;
+
+	private List<OrganizationStructure> list = new ArrayList<>();
+
 	@Override
 	public List<OrganizationStructure> getTree(String id, Integer num, String type1) {
 
@@ -36,9 +43,20 @@ public class OrganizationStructureServiceImpl extends ServiceImpl<OrganizationSt
 			type = type1;
 		}
 
+		if(null != list && list.size()>0){
+			return list;
+		}
 		QueryWrapper<OrganizationStructure> qw = new QueryWrapper<>();
 
-		List<OrganizationStructure> list = baseMapper.selectList(qw);
+//		List<OrganizationStructure> list = baseMapper.selectList(qw);
+
+//		http://10.65.79.83:86/ims-iam-ext/sys/sysOrg/allDataNoControl
+		JSONArray arr = remoteServiceBuilder.getGatewayUrl().allDataNoControl();
+		if (null == arr) {
+			return null;
+		}
+
+		List<OrganizationStructure> list = arr.toJavaList(OrganizationStructure.class);
 		List<OrganizationStructure> tr = convert(list, id, num);
 		return tr;
 	}

+ 15 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/ResponsibilityIndicatorInfoServiceImpl.java

@@ -3,6 +3,7 @@ package com.ims.eval.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.DataDictionary;
+import com.ims.eval.entity.Myuser;
 import com.ims.eval.entity.ResponsibilityIndicatorInfo;
 import com.ims.eval.dao.ResponsibilityIndicatorInfoMapper;
 import com.ims.eval.entity.dto.request.IndicatorDictionaryDTO;
@@ -10,9 +11,12 @@ import com.ims.eval.entity.dto.request.ResponsibilityIndicatorInfoUpdateDTO;
 import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
 import com.ims.eval.service.IResponsibilityIndicatorInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.eval.service.IUserService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -30,11 +34,20 @@ import java.util.stream.Collectors;
 public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<ResponsibilityIndicatorInfoMapper, ResponsibilityIndicatorInfo> implements IResponsibilityIndicatorInfoService {
 
 
+	@Autowired
+	private IUserService userService;
 
 	@Override
-	public Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept) {
-		List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.listByresponsibilityId(deptResponsibilityIds,dept,"ZRMB");//默认获取指定的怎目标
+	public Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept, HttpServletRequest request) {
 
+		Myuser myuser = userService.getSysUser(request);
+		if(null == myuser){
+			throw new CustomException("暂无权限");
+		}
+		List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.listByresponsibilityId(deptResponsibilityIds,dept,"ZRMB");//默认获取指定的怎目标
+		list.stream().forEach(i->{
+			i.setUpdateMark(i.getDeptName().equals(myuser.getDeptName()));
+		});
 		Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> map  = list.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getIsQuantified));
 		map.put("quantifiedList", map.remove("是"));
 		map.put("nonQuantifiedList", map.remove("否"));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 32 - 7
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/UserServiceImpl.java


+ 9 - 1
ims-service/ims-eval/src/main/resources/application.yml

@@ -17,7 +17,15 @@ spring:
 
 
 iam:
-  gateway-url: http://10.65.78.23:18600/
+  active: dev
+  gateway-url:
+    dev: http://10.65.78.23:18600/
+    pro: http://10.65.79.83:86/
+
+  menu:
+    dev: 10105
+    pro: 6802
+