八项作业与优化三方定位系统后台地址的查询

pull/5/head^2
dearlin 2024-03-01 11:41:16 +08:00
parent ee5192518b
commit f7ebc6a958
2 changed files with 43 additions and 34 deletions

View File

@ -39,7 +39,7 @@ public class PLSUtil {
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange( ResponseEntity<JSONObject> exchange = restTemplate.exchange(
PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/deploy/card/list?sortThePowerLevel=1&pageNum=" + getBakeAddr(CORPINFO_ID) + "/deploy/card/list?sortThePowerLevel=1&pageNum=" +
currentPage + currentPage +
"&pageSize=" + showCount, "&pageSize=" + showCount,
HttpMethod.GET, httpEntity, HttpMethod.GET, httpEntity,
@ -52,7 +52,7 @@ public class PLSUtil {
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange( ResponseEntity<JSONObject> exchange = restTemplate.exchange(
PLSUtil.BAKEADDR.get(CORPINFO_ID) + url, getBakeAddr(CORPINFO_ID) + url,
HttpMethod.GET, httpEntity, HttpMethod.GET, httpEntity,
JSONObject.class); JSONObject.class);
return exchange.getBody(); return exchange.getBody();
@ -77,7 +77,7 @@ public class PLSUtil {
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange( ResponseEntity<JSONObject> exchange = restTemplate.exchange(
PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/region/alarm/alarmStatistics?type=day", getBakeAddr(CORPINFO_ID) + "/region/alarm/alarmStatistics?type=day",
HttpMethod.GET, httpEntity, HttpMethod.GET, httpEntity,
JSONObject.class); JSONObject.class);
return exchange.getBody(); return exchange.getBody();
@ -88,7 +88,7 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + Url, ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + Url,
HttpMethod.POST, HttpMethod.POST,
httpEntity, httpEntity,
JSONObject.class); JSONObject.class);
@ -99,7 +99,7 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + Url + id, ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + Url + id,
HttpMethod.GET, HttpMethod.GET,
httpEntity, httpEntity,
JSONObject.class); JSONObject.class);
@ -112,7 +112,7 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + Url + params, ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + Url + params,
HttpMethod.GET, HttpMethod.GET,
httpEntity, httpEntity,
JSONObject.class); JSONObject.class);
@ -124,7 +124,7 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + Url, ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + Url,
HttpMethod.PUT, HttpMethod.PUT,
httpEntity, httpEntity,
JSONObject.class); JSONObject.class);
@ -135,7 +135,7 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + Url + id, ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + Url + id,
HttpMethod.DELETE, HttpMethod.DELETE,
httpEntity, httpEntity,
JSONObject.class); JSONObject.class);
@ -158,7 +158,7 @@ public class PLSUtil {
if (Tools.notEmpty(keywords)) { if (Tools.notEmpty(keywords)) {
url = url + keywords; url = url + keywords;
} }
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + url ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + url
, HttpMethod.GET, httpEntity, JSONObject.class); , HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -177,7 +177,7 @@ public class PLSUtil {
// "/region/alarm/list?pageNum=" + // "/region/alarm/list?pageNum=" +
// currentPage + "&pageSize=" + showCount +"&str=" + "&eleType="+eleType+ "&status="+status // currentPage + "&pageSize=" + showCount +"&str=" + "&eleType="+eleType+ "&status="+status
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) +
"/region/alarm/list?eleType=" + eleType + "+&status=" + status + "&pageNum=" + currentPage + "&pageSize=" + showCount + "&str=" "/region/alarm/list?eleType=" + eleType + "+&status=" + status + "&pageNum=" + currentPage + "&pageSize=" + showCount + "&str="
, HttpMethod.GET, httpEntity, JSONObject.class); , HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
@ -200,7 +200,7 @@ public class PLSUtil {
url = url + keywords; url = url + keywords;
} }
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + url ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + url
, HttpMethod.GET, httpEntity, JSONObject.class); , HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -217,7 +217,7 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) +
"/device/camera/list?pageNum=1&pageSize=100000&str=", HttpMethod.GET, httpEntity, JSONObject.class); "/device/camera/list?pageNum=1&pageSize=100000&str=", HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -246,11 +246,11 @@ public class PLSUtil {
uriVariables.put("alt", ""); uriVariables.put("alt", "");
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers);
// HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables,headers); // HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables,headers);
// ResponseEntity<JSONObject> jsonObjectResponseEntity = restTemplate.postForEntity(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/device/camera", // ResponseEntity<JSONObject> jsonObjectResponseEntity = restTemplate.postForEntity(getBakeAddr(CORPINFO_ID) + "/device/camera",
// httpEntity, JSONObject.class); // httpEntity, JSONObject.class);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/device/camera", ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/device/camera",
HttpMethod.POST, HttpMethod.POST,
httpEntity, httpEntity,
JSONObject.class); JSONObject.class);
@ -273,7 +273,7 @@ public class PLSUtil {
uriVariables.put("camName", camera.getString("VIDEONAME")); uriVariables.put("camName", camera.getString("VIDEONAME"));
uriVariables.put("camId", camera.getString("PLS_ID")); uriVariables.put("camId", camera.getString("PLS_ID"));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/device/camera", ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/device/camera",
HttpMethod.PUT, httpEntity, HttpMethod.PUT, httpEntity,
JSONObject.class, uriVariables); JSONObject.class, uriVariables);
return exchange.getBody(); return exchange.getBody();
@ -290,7 +290,7 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/device/camera/" + Integer.parseInt(camera.getString("PLS_ID")), HttpMethod.DELETE, httpEntity, JSONObject.class); ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/device/camera/" + Integer.parseInt(camera.getString("PLS_ID")), HttpMethod.DELETE, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -311,7 +311,7 @@ public class PLSUtil {
if (Tools.notEmpty(keywords)) url += keywords; if (Tools.notEmpty(keywords)) url += keywords;
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + url, HttpMethod.GET, httpEntity, JSONObject.class); ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + url, HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -325,7 +325,7 @@ public class PLSUtil {
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/region/region/list?pageNum=" + ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/region/region/list?pageNum=" +
currentPage + currentPage +
"&pageSize=" + showCount, HttpMethod.GET, httpEntity, JSONObject.class); "&pageSize=" + showCount, HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
@ -341,7 +341,7 @@ public class PLSUtil {
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/region/region/" + ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/region/region/" +
id, HttpMethod.GET, httpEntity, JSONObject.class); id, HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -355,7 +355,7 @@ public class PLSUtil {
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/location/loca/personnelTrajectories",HttpMethod.GET, httpEntity, JSONObject.class); ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/location/loca/personnelTrajectories",HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -375,7 +375,7 @@ public class PLSUtil {
uriVariables.put("type", type); uriVariables.put("type", type);
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(uriVariables, headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/location/loca/characterTrajectories", ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/location/loca/characterTrajectories",
HttpMethod.POST, HttpMethod.POST,
httpEntity, httpEntity,
JSONObject.class); JSONObject.class);
@ -393,7 +393,7 @@ public class PLSUtil {
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<JSONObject> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/api/prod-api/coordinate/realTime/data", HttpMethod.GET, httpEntity, JSONObject.class); ResponseEntity<JSONObject> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/api/prod-api/coordinate/realTime/data", HttpMethod.GET, httpEntity, JSONObject.class);
return exchange.getBody(); return exchange.getBody();
} }
@ -408,21 +408,30 @@ public class PLSUtil {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", getToken(CORPINFO_ID)); headers.set("Authorization", getToken(CORPINFO_ID));
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers); HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
ResponseEntity<Boolean> exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/region/api/electronicFence/determineWhetherThePersonIsInTheElectronicFence2?psn=" + ResponseEntity<Boolean> exchange = restTemplate.exchange(getBakeAddr(CORPINFO_ID) + "/region/api/electronicFence/determineWhetherThePersonIsInTheElectronicFence2?psn=" +
PLS_ID + PLS_ID +
"&id=" + ELECTRONIC_FENCE_ID, HttpMethod.GET, httpEntity, Boolean.class); "&id=" + ELECTRONIC_FENCE_ID, HttpMethod.GET, httpEntity, Boolean.class);
return exchange.getBody(); return exchange.getBody();
} }
@PostConstruct private static void initBakeAddr(){
private void initBakeAddr() throws Exception { List<PageData> dataList = null;
List<PageData> dataList = corpplsinfoService.listAll(new PageData()); try {
dataList = corpplsinfoService.listAll(new PageData());
} catch (Exception e) {
throw new RuntimeException(e);
}
dataList.forEach(item -> { dataList.forEach(item -> {
BAKEADDR.put(item.getString("CORPINFO_ID"), item.getString("POST_URL")); BAKEADDR.put(item.getString("CORPINFO_ID"), item.getString("POST_URL"));
}); });
} }
private static String getBakeAddr(String CORPINFO_ID) throws Exception {
return BAKEADDR.computeIfAbsent(CORPINFO_ID, key -> {
initBakeAddr();
return BAKEADDR.get(CORPINFO_ID);
});
}
/** /**
* @Description: token * @Description: token
* @Author: dearLin * @Author: dearLin
@ -449,7 +458,7 @@ public class PLSUtil {
if (response != null) { if (response != null) {
PageData valueData = JSONObject.parseObject(response.getString("data"), PageData.class); PageData valueData = JSONObject.parseObject(response.getString("data"), PageData.class);
token = valueData.getString("access_token"); token = valueData.getString("access_token");
String newExpireTime = DateUtil.getAfterHourDate("12"); String newExpireTime = DateUtil.getAfterHourDate("24");
pd.put("TOKEN", token); pd.put("TOKEN", token);
pd.put("EXPIRE_TIME", newExpireTime); pd.put("EXPIRE_TIME", newExpireTime);
corpplsinfoService.edit(pd); corpplsinfoService.edit(pd);
@ -472,7 +481,7 @@ public class PLSUtil {
public static boolean hasCardNumber(PageData user) throws Exception { public static boolean hasCardNumber(PageData user) throws Exception {
if (Tools.isEmpty(user.getString("CARDNO"))) {return true;} if (Tools.isEmpty(user.getString("CARDNO"))) {return true;}
// 根据 定位卡号获取对应的人 // 根据 定位卡号获取对应的人
String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/card/peopleDisplay/" + user.getString("CARDNO"); String url = getBakeAddr(Jurisdiction.getCORPINFO_ID()) + "/deploy/card/peopleDisplay/" + user.getString("CARDNO");
PageData response = sendGetHttpRequest(url, null, getToken(Jurisdiction.getCORPINFO_ID())); PageData response = sendGetHttpRequest(url, null, getToken(Jurisdiction.getCORPINFO_ID()));
if (response != null) { if (response != null) {
if (!"200".equals(response.getString("code"))) { if (!"200".equals(response.getString("code"))) {
@ -493,7 +502,7 @@ public class PLSUtil {
*/ */
public static PageData getCardNumberPeople(PageData user) throws Exception { public static PageData getCardNumberPeople(PageData user) throws Exception {
// 根据 定位卡号获取对应的人 // 根据 定位卡号获取对应的人
String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/card/peopleDisplay/" + user.getString("CARDNO"); String url = getBakeAddr(Jurisdiction.getCORPINFO_ID()) + "/deploy/card/peopleDisplay/" + user.getString("CARDNO");
PageData response = sendGetHttpRequest(url, null, getToken(Jurisdiction.getCORPINFO_ID())); PageData response = sendGetHttpRequest(url, null, getToken(Jurisdiction.getCORPINFO_ID()));
if (response != null) { if (response != null) {
if (!"200".equals(response.getString("code"))) { if (!"200".equals(response.getString("code"))) {
@ -513,7 +522,7 @@ public class PLSUtil {
* @Return: void * @Return: void
*/ */
public static PageData saveUser(PageData user) throws Exception { public static PageData saveUser(PageData user) throws Exception {
String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/psnmgt/insertPsnIfon"; String url = getBakeAddr(Jurisdiction.getCORPINFO_ID()) + "/deploy/psnmgt/insertPsnIfon";
JSONObject loginPayload = new JSONObject(); JSONObject loginPayload = new JSONObject();
loginPayload.put("name", user.getString("NAME")); loginPayload.put("name", user.getString("NAME"));
loginPayload.put("cardNo", user.getString("CARDNO")); loginPayload.put("cardNo", user.getString("CARDNO"));
@ -555,7 +564,7 @@ public class PLSUtil {
} }
return false; return false;
} }
String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/psnmgt/updPsnInfoById"; String url = getBakeAddr(Jurisdiction.getCORPINFO_ID()) + "/deploy/psnmgt/updPsnInfoById";
JSONObject loginPayload = new JSONObject(); JSONObject loginPayload = new JSONObject();
loginPayload.put("name", user.getString("NAME")); loginPayload.put("name", user.getString("NAME"));
loginPayload.put("psnId", user.getString("PLS_ID")); loginPayload.put("psnId", user.getString("PLS_ID"));
@ -582,7 +591,7 @@ public class PLSUtil {
} }
public static boolean removeUser(PageData user) throws Exception { public static boolean removeUser(PageData user) throws Exception {
String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/psnmgt"; String url = getBakeAddr(Jurisdiction.getCORPINFO_ID()) + "/deploy/psnmgt";
PageData removeUser = usersService.findById(user); PageData removeUser = usersService.findById(user);
PageData response = sendDeleteHttpRequest(url, Long.parseLong(removeUser.getString("PLS_ID")), getToken(Jurisdiction.getCORPINFO_ID())); PageData response = sendDeleteHttpRequest(url, Long.parseLong(removeUser.getString("PLS_ID")), getToken(Jurisdiction.getCORPINFO_ID()));
return "200".equals(response.getString("code")); return "200".equals(response.getString("code"));

View File

@ -98,6 +98,6 @@
) tmp group by tmp.WORK_ID) log on log.WORK_ID = f.${TYPE}_ID ) tmp group by tmp.WORK_ID) log on log.WORK_ID = f.${TYPE}_ID
where f.ISDELETE = '0' and f.WORK_POSITION is not null where f.ISDELETE = '0' and f.WORK_POSITION is not null
and f.CORPINFO_ID = #{CORPINFO_ID} and f.CORPINFO_ID = #{CORPINFO_ID}
and f.STEP_ID &gt; 0 and log.NEXT_STEP_ID != 99 -- and f.STEP_ID &gt; 0 and log.NEXT_STEP_ID != 99
</select> </select>
</mapper> </mapper>