河北两级贯通接口调整
This commit is contained in:
@@ -286,7 +286,7 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
supvPlanVOList.forEach(item -> {
|
||||
PvTerminalTreeVO pvTerminalTreeVO = null;
|
||||
if (mapCode.containsKey(item.getSupvOrgId())) {
|
||||
pvTerminalTreeVO = mapCode.get(item.getSupvOrgId());
|
||||
pvTerminalTreeVO = mapCode.get(item.getPlanBelongOrg());
|
||||
item.setSupvOrgName(pvTerminalTreeVO.getName());
|
||||
int deptLevel = pvTerminalTreeVO.getPids().split(StrUtil.COMMA).length;
|
||||
if (deptLevel == 2) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import com.njcn.web.utils.GwSendUtil;
|
||||
import com.njcn.web.utils.RestTemplateUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -135,8 +136,8 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
for (SupvPlan supvPlan : supvPlanList) {
|
||||
checkParam(supvPlan);
|
||||
PvTerminalTreeVO pvTerminalTreeVO = null;
|
||||
if (mapCode.containsKey(supvPlan.getSupvOrgId())) {
|
||||
pvTerminalTreeVO = mapCode.get(supvPlan.getSupvOrgId());
|
||||
if (mapCode.containsKey(supvPlan.getPlanBelongOrg())) {
|
||||
pvTerminalTreeVO = mapCode.get(supvPlan.getPlanBelongOrg());
|
||||
supvPlan.setSupvOrgName(pvTerminalTreeVO.getName());
|
||||
int deptLevel = pvTerminalTreeVO.getPids().split(StrUtil.COMMA).length;
|
||||
if (deptLevel == 2) {
|
||||
@@ -626,7 +627,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
.contentType("application/json; charset=UTF-8") //设置请求content-type
|
||||
.accessKey("7d4cb2c0afb5468ca56e0654b1a442ef").secretKey("lW2xr6zKjbaqVDOSgQpcGrM6Rg0=");// 设置accessKey 和 设置secretKey
|
||||
builder.contentBody(cb);
|
||||
String token = LoginToken();
|
||||
String token = GwSendUtil.LoginToken();
|
||||
builder.putHeaderParamsMap("x-token", token);
|
||||
builder.putHeaderParamsMap("serviceName", "pqSupervisionReject");
|
||||
//进行调用,返回结果
|
||||
@@ -679,7 +680,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
|
||||
|
||||
builder.contentBody(cb);
|
||||
String token = LoginToken();
|
||||
String token = GwSendUtil.LoginToken();
|
||||
builder.putHeaderParamsMap("x-token", token);
|
||||
builder.putHeaderParamsMap("serviceName", serviceName);
|
||||
//进行调用,返回结果
|
||||
@@ -698,10 +699,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
return map;
|
||||
}
|
||||
|
||||
public String LoginToken() {
|
||||
/* public String LoginToken() {
|
||||
String token = null;
|
||||
String clientId = "942a9278671711eda2e10ae0b5517f6c";
|
||||
String clientSecret = "3Psd2VEhsA3dVsSPHW0ll5r/03kAqlA2P4w2IiWPA8UWSadcX0we2wffjyTUYGsK";
|
||||
String clientId = "e512d3940a7d11eeae0cd6fb272b183c";
|
||||
String clientSecret = "k8cF9CgXsj/lnuP2C4Vhx8tuNsPwieBIU8n14vHL1EoWSadcX0we2wffjyTUYGsK";
|
||||
|
||||
String userUrl = "http://" + gwUrl + "/psr-auth/oauth/accessToken?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}";
|
||||
Map<String, String> map = new HashMap<>();
|
||||
@@ -719,7 +720,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
throw new BusinessException("获取数据token出现未知异常!请检查ip端口是否正确!");
|
||||
}
|
||||
return token;
|
||||
}
|
||||
}*/
|
||||
|
||||
public Map<String,String> sendFile(String url,SupvFile supvFile) throws IOException {
|
||||
//获取文件服务器地址
|
||||
@@ -786,7 +787,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
public String requestCommon(String serviceName, String url, Map<String, String> param) {
|
||||
String str;
|
||||
HttpParameters.Builder builder = new HttpParameters.Builder();
|
||||
String token = LoginToken();
|
||||
String token = GwSendUtil.LoginToken();
|
||||
|
||||
builder.putHeaderParamsMap("x-token", token);
|
||||
builder.requestURL(url) // 设置请求的URL,可以拼接URL请求参数
|
||||
|
||||
Reference in New Issue
Block a user