Merge branch 'master' of http://test.csylcloud.com:8000/zsef5966/medicinal-supplier
Showing
5 changed files
with
86 additions
and
0 deletions
| ... | @@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy | ... | @@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy |
| 7 | 7 | ||
| 8 | spd_service_url = http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/ | 8 | spd_service_url = http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/ |
| 9 | 9 | ||
| 10 | spd_common_url = http://10.146.9.50:8080/medicinal-web/a/ | ||
| 11 | |||
| 10 | huarun_service_url = http://61.190.54.189:8001/huarun/spd/syn/ | 12 | huarun_service_url = http://61.190.54.189:8001/huarun/spd/syn/ |
| 11 | 13 | ||
| 14 | platform_url= http://61.190.54.189:8001/huarun/ | ||
| 12 | #spd服务地址 | 15 | #spd服务地址 |
| 13 | spd_wechat_url = http://10.146.9.50:8080/medicinal-web/a/wechat/ | 16 | spd_wechat_url = http://10.146.9.50:8080/medicinal-web/a/wechat/ |
| 14 | spd_wechat_login=http://10.146.9.50:8080/medicinal-web/a/login | 17 | spd_wechat_login=http://10.146.9.50:8080/medicinal-web/a/login | ... | ... |
| ... | @@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy | ... | @@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy |
| 7 | 7 | ||
| 8 | spd_service_url = http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/ | 8 | spd_service_url = http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/ |
| 9 | 9 | ||
| 10 | spd_common_url = http://10.146.8.221:9002/medicinal-web/a/ | ||
| 11 | |||
| 10 | huarun_service_url = http://61.190.54.189:8001/huarun/spd/syn/ | 12 | huarun_service_url = http://61.190.54.189:8001/huarun/spd/syn/ |
| 11 | 13 | ||
| 14 | platform_url= http://61.190.54.189:8005/huarun/ | ||
| 12 | #spd服务地址 | 15 | #spd服务地址 |
| 13 | spd_wechat_url = http://10.146.9.50:8080/medicinal-web/a/wechat/ | 16 | spd_wechat_url = http://10.146.9.50:8080/medicinal-web/a/wechat/ |
| 14 | spd_wechat_login=http://10.146.9.50:8080/medicinal-web/a/login | 17 | spd_wechat_login=http://10.146.9.50:8080/medicinal-web/a/login | ... | ... |
| ... | @@ -10,6 +10,9 @@ public class PlatformConstant { | ... | @@ -10,6 +10,9 @@ public class PlatformConstant { |
| 10 | //SPD接口地址 | 10 | //SPD接口地址 |
| 11 | public static final String PlatForm_SPD_Url = Global.getConfig("spd_service_url"); | 11 | public static final String PlatForm_SPD_Url = Global.getConfig("spd_service_url"); |
| 12 | 12 | ||
| 13 | //SPD接口地址 | ||
| 14 | public static final String PlatForm_SPD_Common_Url = Global.getConfig("spd_common_url"); | ||
| 15 | |||
| 13 | //推送对账,发药,库存平台地址 | 16 | //推送对账,发药,库存平台地址 |
| 14 | public static final String PlatForm_URL = Global.getConfig("platform_url"); | 17 | public static final String PlatForm_URL = Global.getConfig("platform_url"); |
| 15 | 18 | ... | ... |
| ... | @@ -8,11 +8,14 @@ import javax.servlet.http.HttpServletRequest; | ... | @@ -8,11 +8,14 @@ import javax.servlet.http.HttpServletRequest; |
| 8 | 8 | ||
| 9 | import org.apache.http.HttpEntity; | 9 | import org.apache.http.HttpEntity; |
| 10 | import org.apache.http.HttpResponse; | 10 | import org.apache.http.HttpResponse; |
| 11 | import org.apache.http.NameValuePair; | ||
| 11 | import org.apache.http.client.HttpClient; | 12 | import org.apache.http.client.HttpClient; |
| 13 | import org.apache.http.client.entity.UrlEncodedFormEntity; | ||
| 12 | import org.apache.http.client.methods.HttpPost; | 14 | import org.apache.http.client.methods.HttpPost; |
| 13 | import org.apache.http.entity.mime.MultipartEntityBuilder; | 15 | import org.apache.http.entity.mime.MultipartEntityBuilder; |
| 14 | import org.apache.http.entity.mime.content.FileBody; | 16 | import org.apache.http.entity.mime.content.FileBody; |
| 15 | import org.apache.http.impl.client.HttpClients; | 17 | import org.apache.http.impl.client.HttpClients; |
| 18 | import org.apache.http.message.BasicNameValuePair; | ||
| 16 | import org.apache.http.util.EntityUtils; | 19 | import org.apache.http.util.EntityUtils; |
| 17 | import org.slf4j.Logger; | 20 | import org.slf4j.Logger; |
| 18 | import org.slf4j.LoggerFactory; | 21 | import org.slf4j.LoggerFactory; |
| ... | @@ -111,6 +114,7 @@ public class SpdControlller { | ... | @@ -111,6 +114,7 @@ public class SpdControlller { |
| 111 | @Autowired | 114 | @Autowired |
| 112 | private SuInvoiceBackService suInvoiceBackService; | 115 | private SuInvoiceBackService suInvoiceBackService; |
| 113 | 116 | ||
| 117 | private static HttpClient client; | ||
| 114 | 118 | ||
| 115 | @RequestMapping(value="/setMFMedGoods") | 119 | @RequestMapping(value="/setMFMedGoods") |
| 116 | @ResponseBody | 120 | @ResponseBody |
| ... | @@ -926,4 +930,74 @@ public class SpdControlller { | ... | @@ -926,4 +930,74 @@ public class SpdControlller { |
| 926 | interfaceLogService.setResultLog(response, logId, exception); | 930 | interfaceLogService.setResultLog(response, logId, exception); |
| 927 | return result; | 931 | return result; |
| 928 | } | 932 | } |
| 933 | |||
| 934 | |||
| 935 | /** | ||
| 936 | * 库存查询接口 | ||
| 937 | * @param params | ||
| 938 | * @return | ||
| 939 | */ | ||
| 940 | @RequestMapping("/querystock") | ||
| 941 | @ResponseBody | ||
| 942 | public String querystock(@RequestBody String params){ | ||
| 943 | logger.debug("查询库存:{}", params); | ||
| 944 | String result = ""; | ||
| 945 | try { | ||
| 946 | result = HTTPClient.sendJsonDataByPost(PlatformConstant.PlatForm_SPD_Common_Url+"StoreDetail/queryDrugByDeptAll", params); | ||
| 947 | } catch (Exception e) { | ||
| 948 | result = e.getMessage(); | ||
| 949 | } | ||
| 950 | return result; | ||
| 951 | } | ||
| 952 | |||
| 953 | /** | ||
| 954 | * 近效期查询接口 | ||
| 955 | * @param params | ||
| 956 | * @return | ||
| 957 | */ | ||
| 958 | @RequestMapping("/queryexpir") | ||
| 959 | @ResponseBody | ||
| 960 | public String queryexpir(@RequestBody String params){ | ||
| 961 | logger.debug("查询近效期:{}", params); | ||
| 962 | String result = ""; | ||
| 963 | try { | ||
| 964 | result = HTTPClient.sendJsonDataByPost(PlatformConstant.PlatForm_SPD_Common_Url+"ypjxq/statics/list", params); | ||
| 965 | } catch (Exception e) { | ||
| 966 | result = e.getMessage(); | ||
| 967 | } | ||
| 968 | return result; | ||
| 969 | } | ||
| 970 | |||
| 971 | /** | ||
| 972 | * 呆滞品查询接口 | ||
| 973 | * @param params | ||
| 974 | * @return | ||
| 975 | */ | ||
| 976 | @RequestMapping("/querydetained") | ||
| 977 | @ResponseBody | ||
| 978 | public String querydetained(@RequestBody String params){ | ||
| 979 | logger.debug("查询近效期:{}", params); | ||
| 980 | String result = ""; | ||
| 981 | if (client == null){ | ||
| 982 | client = HttpClients.createDefault(); | ||
| 983 | } | ||
| 984 | try { | ||
| 985 | JSONObject objec = JSON.parseObject(params); | ||
| 986 | List<NameValuePair> param = new ArrayList<NameValuePair>(); | ||
| 987 | param.add(new BasicNameValuePair("depetCode",objec.getString("depetCode"))); | ||
| 988 | param.add(new BasicNameValuePair("pageNo",objec.getString("pageNo"))); | ||
| 989 | param.add(new BasicNameValuePair("pageSize",objec.getString("pageSize"))); | ||
| 990 | param.add(new BasicNameValuePair("startTime",objec.getString("startTime"))); | ||
| 991 | param.add(new BasicNameValuePair("endTime",objec.getString("endTime"))); | ||
| 992 | HttpPost post = new HttpPost(PlatformConstant.PlatForm_SPD_Common_Url+"statics/delayStore/list"); | ||
| 993 | post.setHeader("Content-Type", "application/x-www-form-urlencoded"); | ||
| 994 | post.setEntity(new UrlEncodedFormEntity(param)); | ||
| 995 | HttpResponse reponse = client.execute(post); | ||
| 996 | HttpEntity entity = reponse.getEntity(); | ||
| 997 | result = EntityUtils.toString(entity, "UTF-8"); | ||
| 998 | } catch (Exception e) { | ||
| 999 | result = e.getMessage(); | ||
| 1000 | } | ||
| 1001 | return result; | ||
| 1002 | } | ||
| 929 | } | 1003 | } | ... | ... |
| ... | @@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy | ... | @@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy |
| 7 | 7 | ||
| 8 | spd_service_url = http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/ | 8 | spd_service_url = http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/ |
| 9 | 9 | ||
| 10 | spd_common_url = http://10.146.9.50:8080/medicinal-web/a/ | ||
| 11 | |||
| 10 | huarun_service_url = http://61.190.54.189:8001/huarun/spd/syn/ | 12 | huarun_service_url = http://61.190.54.189:8001/huarun/spd/syn/ |
| 11 | 13 | ||
| 14 | platform_url= http://61.190.54.189:8001/huarun/ | ||
| 12 | #spd服务地址 | 15 | #spd服务地址 |
| 13 | spd_wechat_url = http://10.146.9.50:8080/medicinal-web/a/wechat/ | 16 | spd_wechat_url = http://10.146.9.50:8080/medicinal-web/a/wechat/ |
| 14 | spd_wechat_login=http://10.146.9.50:8080/medicinal-web/a/login | 17 | spd_wechat_login=http://10.146.9.50:8080/medicinal-web/a/login | ... | ... |
-
Please register or sign in to post a comment