Commit 8dbfdf8e13c7503e3b920d0d50cb8d995efc54dd
1 parent
d6526160
1.维修上报
Showing
2 changed files
with
16 additions
and
2 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| ... | ... | @@ -723,6 +723,17 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 723 | 723 | String uname = user.getUserName(); |
| 724 | 724 | StringBuilder url = new StringBuilder(ConfigUtil.get("http.report.url")); |
| 725 | 725 | url.append("?nbbm=").append(param.get("nbbm")).append("&bxy=").append(uname).append("&bxbm=").append(param.get("bxType")); |
| 726 | + // 分公司保存格式 分公司编码_公司编码 | |
| 727 | + String val = BasicData.nbbm2FgsCompanyCodeMap.get(param.get("nbbm")); | |
| 728 | + String[] arr = val.split("_"); | |
| 729 | + if (!"22".equals(arr[1])) { | |
| 730 | + Map<String, Object> res = new HashMap<String, Object>(); | |
| 731 | + res.put("status", ResponseCode.ERROR); | |
| 732 | + res.put("msg", "除金高公司外暂未开通此功能"); | |
| 733 | + | |
| 734 | + return res; | |
| 735 | + } | |
| 736 | + url.append("&fgs=").append(arr[0]); | |
| 726 | 737 | |
| 727 | 738 | return request(url.toString()); |
| 728 | 739 | } |
| ... | ... | @@ -737,7 +748,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 737 | 748 | con = (HttpURLConnection)new URL(url).openConnection(); |
| 738 | 749 | con.setRequestMethod("POST"); |
| 739 | 750 | con.setRequestProperty("keep-alive", "true"); |
| 740 | - con.setRequestProperty("accept", "*/*"); | |
| 751 | + con.setRequestProperty("accept", "application/json"); | |
| 752 | + con.setRequestProperty("content-type", "application/json"); | |
| 741 | 753 | con.setDoInput(true); |
| 742 | 754 | con.setReadTimeout(2500); |
| 743 | 755 | con.setConnectTimeout(2500); | ... | ... |
src/main/resources/application-prod.properties
| ... | ... | @@ -28,4 +28,6 @@ http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all |
| 28 | 28 | ## gateway real data |
| 29 | 29 | http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ |
| 30 | 30 | ## gateway send directive |
| 31 | -http.send.directive = http://10.10.200.79:8080/transport_server/message/ | |
| 32 | 31 | \ No newline at end of file |
| 32 | +http.send.directive = http://10.10.200.79:8080/transport_server/message/ | |
| 33 | +## maintenance report | |
| 34 | +http.report.url = http://116.247.73.122:9098/jgjwsystem_j2ee/ | |
| 33 | 35 | \ No newline at end of file | ... | ... |