Commit 9743706c6995e632132ad121cb2eedb6ee711b14
Merge branch 'qingpu' of
http://192.168.168.201:8888/panzhaov5/control_service_data_Interface.git into qingpu Conflicts: src/main/java/com/bsth/server_ws/util/WSDataConver.java src/main/resources/application-prod.properties
Showing
3 changed files
with
2 additions
and
79 deletions
src/main/java/com/bsth/server_ws/util/WSDataConver.java
| @@ -49,26 +49,8 @@ public class WSDataConver { | @@ -49,26 +49,8 @@ public class WSDataConver { | ||
| 49 | 49 | ||
| 50 | static { | 50 | static { |
| 51 | gsMap = new HashMap<>(); | 51 | gsMap = new HashMap<>(); |
| 52 | - gsMap.put("55", "上南公司"); | ||
| 53 | - gsMap.put("55_4", "上南一分公司"); | ||
| 54 | - gsMap.put("55_3", "上南六分公司"); | ||
| 55 | - gsMap.put("55_1", "上南二分公司"); | ||
| 56 | - gsMap.put("55_2", "上南三分公司"); | ||
| 57 | - gsMap.put("22", "金高公司"); | ||
| 58 | - gsMap.put("22_2", "二分公司"); | ||
| 59 | - gsMap.put("22_1", "四分公司"); | ||
| 60 | - gsMap.put("22_3", "三分公司"); | ||
| 61 | - gsMap.put("22_5", "一分公司"); | ||
| 62 | - gsMap.put("05", "杨高公司"); | ||
| 63 | - gsMap.put("05_5", "杨高分公司"); | ||
| 64 | - gsMap.put("05_6", "周浦分公司"); | ||
| 65 | - gsMap.put("05_3", "芦潮港分公司"); | ||
| 66 | - gsMap.put("05_1", "川沙分公司"); | ||
| 67 | - gsMap.put("26", "南汇公司"); | ||
| 68 | - gsMap.put("26_3", "南汇三分"); | ||
| 69 | - gsMap.put("26_2", "南汇二分"); | ||
| 70 | - gsMap.put("26_1", "南汇一分"); | ||
| 71 | - gsMap.put("26_4", "南汇维修公司"); | 52 | + gsMap.put("99", "青浦公交"); |
| 53 | + gsMap.put("99_100", "青浦公交"); | ||
| 72 | } | 54 | } |
| 73 | 55 | ||
| 74 | /** | 56 | /** |
src/main/java/com/bsth/server_ws/waybill/LD_Service.java
| @@ -34,23 +34,6 @@ public interface LD_Service { | @@ -34,23 +34,6 @@ public interface LD_Service { | ||
| 34 | @WebParam(name = "companyId") String companyId, | 34 | @WebParam(name = "companyId") String companyId, |
| 35 | @WebParam(name = "resultArray", mode = WebParam.Mode.INOUT) Holder<NH_waybill[]> result, | 35 | @WebParam(name = "resultArray", mode = WebParam.Mode.INOUT) Holder<NH_waybill[]> result, |
| 36 | @WebParam(name = "fError", mode = WebParam.Mode.INOUT) Holder<String> fError); | 36 | @WebParam(name = "fError", mode = WebParam.Mode.INOUT) Holder<String> fError); |
| 37 | - | ||
| 38 | - /*** | ||
| 39 | - * 路单接口(原南汇格式 公司内部用) | ||
| 40 | - * @param password 密码 | ||
| 41 | - * @param rq 日期 | ||
| 42 | - * @param companyId 公司编码 | ||
| 43 | - * @param result | ||
| 44 | - * @param fError | ||
| 45 | - * @return | ||
| 46 | - */ | ||
| 47 | - @WebMethod | ||
| 48 | - boolean waybill_NH4TH( | ||
| 49 | - @WebParam(name = "password") String password, | ||
| 50 | - @WebParam(name = "rq") String rq, | ||
| 51 | - @WebParam(name = "companyId") String companyId, | ||
| 52 | - @WebParam(name = "resultArray", mode = WebParam.Mode.INOUT) Holder<NH_waybill[]> result, | ||
| 53 | - @WebParam(name = "fError", mode = WebParam.Mode.INOUT) Holder<String> fError); | ||
| 54 | 37 | ||
| 55 | /** | 38 | /** |
| 56 | * 路单接口(上南格式) | 39 | * 路单接口(上南格式) |
src/main/java/com/bsth/server_ws/waybill/LD_ServiceSoap.java
| @@ -16,10 +16,8 @@ import org.springframework.context.ApplicationContextAware; | @@ -16,10 +16,8 @@ import org.springframework.context.ApplicationContextAware; | ||
| 16 | import org.springframework.stereotype.Component; | 16 | import org.springframework.stereotype.Component; |
| 17 | 17 | ||
| 18 | import com.bsth.entity.DutyEmployee; | 18 | import com.bsth.entity.DutyEmployee; |
| 19 | -import com.bsth.entity.ElecInfo; | ||
| 20 | import com.bsth.entity.OilInfo; | 19 | import com.bsth.entity.OilInfo; |
| 21 | import com.bsth.entity.ScheduleRealInfo; | 20 | import com.bsth.entity.ScheduleRealInfo; |
| 22 | -import com.bsth.redis.ElecRedisService; | ||
| 23 | import com.bsth.redis.OilRedisService; | 21 | import com.bsth.redis.OilRedisService; |
| 24 | import com.bsth.redis.ScheduleRedisService; | 22 | import com.bsth.redis.ScheduleRedisService; |
| 25 | import com.bsth.repository.DutyEmployeeRepository; | 23 | import com.bsth.repository.DutyEmployeeRepository; |
| @@ -43,7 +41,6 @@ import com.google.common.collect.ArrayListMultimap; | @@ -43,7 +41,6 @@ import com.google.common.collect.ArrayListMultimap; | ||
| 43 | public class LD_ServiceSoap implements LD_Service, ApplicationContextAware { | 41 | public class LD_ServiceSoap implements LD_Service, ApplicationContextAware { |
| 44 | 42 | ||
| 45 | static OilRedisService oilRedisService; | 43 | static OilRedisService oilRedisService; |
| 46 | - static ElecRedisService elecRedisService; | ||
| 47 | static ScheduleRedisService scheduleRedisService; | 44 | static ScheduleRedisService scheduleRedisService; |
| 48 | static DutyEmployeeRepository dutyEmployeeRepository; | 45 | static DutyEmployeeRepository dutyEmployeeRepository; |
| 49 | 46 | ||
| @@ -91,44 +88,6 @@ public class LD_ServiceSoap implements LD_Service, ApplicationContextAware { | @@ -91,44 +88,6 @@ public class LD_ServiceSoap implements LD_Service, ApplicationContextAware { | ||
| 91 | } | 88 | } |
| 92 | 89 | ||
| 93 | @Override | 90 | @Override |
| 94 | - public boolean waybill_NH4TH(String password, String rq, String companyId, Holder<NH_waybill[]> result, Holder<String> fError) { | ||
| 95 | - try { | ||
| 96 | - if(userService.get(password) == null){ | ||
| 97 | - fError.value = "无效的密码!"; | ||
| 98 | - return false; | ||
| 99 | - } | ||
| 100 | - //日期减一天,老接口是这样的 | ||
| 101 | - //rq = fmtyyyyMMdd.print(fmtyyyyMMdd.parseDateTime(rq).minusDays(1)); | ||
| 102 | - String prveRq = fmtyyyyMMdd.print(fmtyyyyMMdd.parseDateTime(rq).minusDays(1)); | ||
| 103 | - | ||
| 104 | - //实际排班 | ||
| 105 | - ArrayListMultimap<String, ScheduleRealInfo> listMap = scheduleRedisService.findByDateAndGroupByNbbm(prveRq, companyId); | ||
| 106 | - //油耗信息 | ||
| 107 | - Map<String, OilInfo> oilInfoMap = oilRedisService.findByNbbmGroup(listMap.keySet(), prveRq); | ||
| 108 | - //电耗信息 | ||
| 109 | - Map<String, ElecInfo> elecInfoMap = elecRedisService.findByNbbmGroup(listMap.keySet(), prveRq); | ||
| 110 | - //当班调派 | ||
| 111 | - long st = fmtyyyyMMddHHmm.parseMillis(prveRq + "00:00"), et = fmtyyyyMMddHHmm.parseMillis(prveRq + "23:59"); | ||
| 112 | - List<DutyEmployee> des = dutyEmployeeRepository.findByTime(st, et); | ||
| 113 | - //转换成南汇路单需要的格式 | ||
| 114 | - NH_waybill[] array = WSDataConver.to_waybill_NH4TH(listMap, oilInfoMap, elecInfoMap, des); | ||
| 115 | - result.value = array; | ||
| 116 | - | ||
| 117 | - //不再代理老接口数据 | ||
| 118 | - /*if(companyId.equals("26") && !WebServiceProxy.isAllNew(companyId)){ | ||
| 119 | - ClsLDInfo[] oldArray = OldWSClient.getNH_LD(companyId, rq); | ||
| 120 | - //合并新老系统的数据 | ||
| 121 | - result.value = WebServiceProxy.mergerData(result.value, oldArray, companyId); | ||
| 122 | - }*/ | ||
| 123 | - } catch (Exception e) { | ||
| 124 | - logger.error("", e); | ||
| 125 | - fError.value = "服务器出现异常!"; | ||
| 126 | - return false; | ||
| 127 | - } | ||
| 128 | - return true; | ||
| 129 | - } | ||
| 130 | - | ||
| 131 | - @Override | ||
| 132 | public boolean waybill_SN(String password, String rq, String companyId, Holder<SN_waybill[]> result, Holder<String> fError) { | 91 | public boolean waybill_SN(String password, String rq, String companyId, Holder<SN_waybill[]> result, Holder<String> fError) { |
| 133 | try { | 92 | try { |
| 134 | if(userService.get(password) == null){ | 93 | if(userService.get(password) == null){ |
| @@ -176,7 +135,6 @@ public class LD_ServiceSoap implements LD_Service, ApplicationContextAware { | @@ -176,7 +135,6 @@ public class LD_ServiceSoap implements LD_Service, ApplicationContextAware { | ||
| 176 | @Override | 135 | @Override |
| 177 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { | 136 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { |
| 178 | oilRedisService = applicationContext.getBean(OilRedisService.class); | 137 | oilRedisService = applicationContext.getBean(OilRedisService.class); |
| 179 | - elecRedisService = applicationContext.getBean(ElecRedisService.class); | ||
| 180 | scheduleRedisService = applicationContext.getBean(ScheduleRedisService.class); | 138 | scheduleRedisService = applicationContext.getBean(ScheduleRedisService.class); |
| 181 | dutyEmployeeRepository = applicationContext.getBean(DutyEmployeeRepository.class); | 139 | dutyEmployeeRepository = applicationContext.getBean(DutyEmployeeRepository.class); |
| 182 | userService = applicationContext.getBean(UserService.class); | 140 | userService = applicationContext.getBean(UserService.class); |