|
@@ -21,22 +21,19 @@ import com.ims.eval.entity.EvaluationDeptRating;
|
|
import com.ims.eval.entity.dto.request.UserDTO;
|
|
import com.ims.eval.entity.dto.request.UserDTO;
|
|
import com.ims.eval.entity.dto.response.MyuserResDTO;
|
|
import com.ims.eval.entity.dto.response.MyuserResDTO;
|
|
import com.ims.eval.entity.dto.result.ResultInfo;
|
|
import com.ims.eval.entity.dto.result.ResultInfo;
|
|
|
|
+import com.ims.eval.entity.flow.FlowResult;
|
|
import com.ims.eval.feign.RemoteServiceBuilder;
|
|
import com.ims.eval.feign.RemoteServiceBuilder;
|
|
import com.ims.eval.service.*;
|
|
import com.ims.eval.service.*;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.http.HttpEntity;
|
|
|
|
-import org.springframework.http.HttpMethod;
|
|
|
|
-import org.springframework.http.ResponseEntity;
|
|
|
|
|
|
+import org.springframework.http.*;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
import org.springframework.util.MultiValueMap;
|
|
import org.springframework.util.MultiValueMap;
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Date;
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author hlf
|
|
* @author hlf
|
|
@@ -208,7 +205,26 @@ public class DeptAssessmentDeclarationServiceImpl extends ServiceImpl<DeptAssess
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public boolean editState(String id, String state, String instId, String destination) {
|
|
|
|
|
|
+ public boolean editState(String id, String state, String instId, String destination, HttpServletRequest request) {
|
|
|
|
+ String processState = null;
|
|
|
|
+ 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("instId", instId);
|
|
|
|
+ HttpEntity<Map> param = new HttpEntity<>(map, headers);
|
|
|
|
+ ResponseEntity<String> responseEntity2 = restTemplate.exchange(imaConfig.getFlowUrl() + "/bpm/instance/getOpinion", 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()) {
|
|
|
|
+ JSONObject json = JSON.parseObject(result.getData());
|
|
|
|
+ processState = json.getString("taskName");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ state = processState;
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = baseMapper.selectById(id);
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = baseMapper.selectById(id);
|
|
if (StringUtils.isNotEmpty(state)) {
|
|
if (StringUtils.isNotEmpty(state)) {
|
|
if ("组织人事部审核".equals(state)) {
|
|
if ("组织人事部审核".equals(state)) {
|