Selaa lähdekoodia

添加编辑标记

wangchangsheng 1 vuosi sitten
vanhempi
commit
d6f7a9802a

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

@@ -137,6 +137,53 @@ public class WorkflowService {
 		}
 
 
+	/**
+	 * 检查当前数据(对应的用户)是或否存在代办
+	 * @param instId
+	 * @param request
+	 * @return
+	 */
+	public boolean todoTaskList2(String instId,HttpServletRequest request) {
+		try {
+			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", request.getHeader("code"));
+			map.put("order", "ASC");
+			map.put("sort", "");
+			map.put("offset", "");
+			map.put("limit", "99999");
+			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()) {
+				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;
+						}
+						String resinstId = result.getRows().getJSONObject(i).get("instId").toString();
+						if(instId.equals(resinstId)){
+							return true;
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+		return false;
+	}
+
+
 
 	/**
 	 * 流程审批

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

@@ -13,6 +13,7 @@ import com.ims.eval.entity.dto.response.IndicatorResDTO;
 import com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO;
 import com.ims.eval.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.eval.service.custom.WorkflowService;
 import com.ims.eval.util.MathCalculatorUtil;
 import lombok.extern.log4j.Log4j2;
 import org.apache.commons.io.output.ByteArrayOutputStream;
@@ -25,6 +26,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.io.InputStream;
@@ -62,7 +64,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	private IEvaluationScoreCountService iEvaluatioinScoreCountService;
 
 
-	@Autowired
+	@Resource
 	private CalculateIndicatorItemInfoMapper calculateIndicatorItemInfoMapper;
 
 	@Autowired
@@ -75,6 +77,9 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	@Autowired
 	private  IOrganizationEvaluationRuleService organizationEvaluationRuleService;
 
+	@Autowired
+	private WorkflowService workflowService;
+
 
 
 
@@ -384,6 +389,15 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	public Map getEvaluationInfoList(String organizationEvaluationId, String indicatorId, String binSection, String binStage, HttpServletRequest request) {
 
 		Map data = new HashMap();
+
+		OrganizationEvaluation evaluation =  organizationEvaluationService.getById(organizationEvaluationId);
+		boolean instFlag = false;
+		if(StringUtils.isNotEmpty(evaluation.getInstId())){
+			instFlag = workflowService.todoTaskList2(evaluation.getInstId(),request);
+		}
+
+		data.put("instFlag",instFlag);
+
 		boolean titlemark = true;//标记生成标题
 		List<OrganizationEvaluationInfoResDTO> infoResDTOList = baseMapper.selectEvaluationInfoList(organizationEvaluationId, indicatorId,binSection,binStage,"");
 		List<IndicatorDictionary> dictionaryList = indicatorDictionaryService.list("", indicatorId, "", "");
@@ -449,7 +463,6 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					mark = false;
 				}
 
-				System.out.println(resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getId());
 				//指标属性
 				indicatormap.put(d.getChildCode() + "_" + d.getOptionCode(), null == resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue() ? "" : resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue());
 				//指标id

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

@@ -23,7 +23,7 @@ spring:
 
 
 iam:
-  active: pro
+  active: dev
   gateway-url:
     dev: http://10.65.78.23:18600/
     pro: http://10.65.79.83:86/