Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Quilan
/
medicinal-supplier
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c0702d3c
authored
2019-12-03 10:55:35 +0800
by
shiyunfei
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://test.csylcloud.com:8000/zsef5966/medicinal-supplier
2 parents
d6e710be
bbbac712
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
0 deletions
conf/prod/config.properties
conf/test/config.properties
src/main/java/com/phxl/common/constants/PlatformConstant.java
src/main/java/com/phxl/modules/goods/web/spd/SpdControlller.java
src/main/resources/config.properties
conf/prod/config.properties
View file @
c0702d3
...
...
@@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy
spd_service_url
=
http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/
spd_common_url
=
http://10.146.9.50:8080/medicinal-web/a/
huarun_service_url
=
http://61.190.54.189:8001/huarun/spd/syn/
platform_url
=
http://61.190.54.189:8001/huarun/
#spd服务地址
spd_wechat_url
=
http://10.146.9.50:8080/medicinal-web/a/wechat/
spd_wechat_login
=
http://10.146.9.50:8080/medicinal-web/a/login
...
...
conf/test/config.properties
View file @
c0702d3
...
...
@@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy
spd_service_url
=
http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/
spd_common_url
=
http://10.146.8.221:9002/medicinal-web/a/
huarun_service_url
=
http://61.190.54.189:8001/huarun/spd/syn/
platform_url
=
http://61.190.54.189:8005/huarun/
#spd服务地址
spd_wechat_url
=
http://10.146.9.50:8080/medicinal-web/a/wechat/
spd_wechat_login
=
http://10.146.9.50:8080/medicinal-web/a/login
...
...
src/main/java/com/phxl/common/constants/PlatformConstant.java
View file @
c0702d3
...
...
@@ -10,6 +10,9 @@ public class PlatformConstant {
//SPD接口地址
public
static
final
String
PlatForm_SPD_Url
=
Global
.
getConfig
(
"spd_service_url"
);
//SPD接口地址
public
static
final
String
PlatForm_SPD_Common_Url
=
Global
.
getConfig
(
"spd_common_url"
);
//推送对账,发药,库存平台地址
public
static
final
String
PlatForm_URL
=
Global
.
getConfig
(
"platform_url"
);
...
...
src/main/java/com/phxl/modules/goods/web/spd/SpdControlller.java
View file @
c0702d3
...
...
@@ -8,11 +8,14 @@ import javax.servlet.http.HttpServletRequest;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.mime.MultipartEntityBuilder
;
import
org.apache.http.entity.mime.content.FileBody
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.util.EntityUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -111,6 +114,7 @@ public class SpdControlller {
@Autowired
private
SuInvoiceBackService
suInvoiceBackService
;
private
static
HttpClient
client
;
@RequestMapping
(
value
=
"/setMFMedGoods"
)
@ResponseBody
...
...
@@ -926,4 +930,74 @@ public class SpdControlller {
interfaceLogService
.
setResultLog
(
response
,
logId
,
exception
);
return
result
;
}
/**
* 库存查询接口
* @param params
* @return
*/
@RequestMapping
(
"/querystock"
)
@ResponseBody
public
String
querystock
(
@RequestBody
String
params
){
logger
.
debug
(
"查询库存:{}"
,
params
);
String
result
=
""
;
try
{
result
=
HTTPClient
.
sendJsonDataByPost
(
PlatformConstant
.
PlatForm_SPD_Common_Url
+
"StoreDetail/queryDrugByDeptAll"
,
params
);
}
catch
(
Exception
e
)
{
result
=
e
.
getMessage
();
}
return
result
;
}
/**
* 近效期查询接口
* @param params
* @return
*/
@RequestMapping
(
"/queryexpir"
)
@ResponseBody
public
String
queryexpir
(
@RequestBody
String
params
){
logger
.
debug
(
"查询近效期:{}"
,
params
);
String
result
=
""
;
try
{
result
=
HTTPClient
.
sendJsonDataByPost
(
PlatformConstant
.
PlatForm_SPD_Common_Url
+
"ypjxq/statics/list"
,
params
);
}
catch
(
Exception
e
)
{
result
=
e
.
getMessage
();
}
return
result
;
}
/**
* 呆滞品查询接口
* @param params
* @return
*/
@RequestMapping
(
"/querydetained"
)
@ResponseBody
public
String
querydetained
(
@RequestBody
String
params
){
logger
.
debug
(
"查询近效期:{}"
,
params
);
String
result
=
""
;
if
(
client
==
null
){
client
=
HttpClients
.
createDefault
();
}
try
{
JSONObject
objec
=
JSON
.
parseObject
(
params
);
List
<
NameValuePair
>
param
=
new
ArrayList
<
NameValuePair
>();
param
.
add
(
new
BasicNameValuePair
(
"depetCode"
,
objec
.
getString
(
"depetCode"
)));
param
.
add
(
new
BasicNameValuePair
(
"pageNo"
,
objec
.
getString
(
"pageNo"
)));
param
.
add
(
new
BasicNameValuePair
(
"pageSize"
,
objec
.
getString
(
"pageSize"
)));
param
.
add
(
new
BasicNameValuePair
(
"startTime"
,
objec
.
getString
(
"startTime"
)));
param
.
add
(
new
BasicNameValuePair
(
"endTime"
,
objec
.
getString
(
"endTime"
)));
HttpPost
post
=
new
HttpPost
(
PlatformConstant
.
PlatForm_SPD_Common_Url
+
"statics/delayStore/list"
);
post
.
setHeader
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
post
.
setEntity
(
new
UrlEncodedFormEntity
(
param
));
HttpResponse
reponse
=
client
.
execute
(
post
);
HttpEntity
entity
=
reponse
.
getEntity
();
result
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
}
catch
(
Exception
e
)
{
result
=
e
.
getMessage
();
}
return
result
;
}
}
...
...
src/main/resources/config.properties
View file @
c0702d3
...
...
@@ -7,8 +7,11 @@ jdbc.password=BOE190326jdfyy
spd_service_url
=
http://10.146.9.50:8080/medicinal-web/a/spdrecvsupplier/
spd_common_url
=
http://10.146.9.50:8080/medicinal-web/a/
huarun_service_url
=
http://61.190.54.189:8001/huarun/spd/syn/
platform_url
=
http://61.190.54.189:8001/huarun/
#spd服务地址
spd_wechat_url
=
http://10.146.9.50:8080/medicinal-web/a/wechat/
spd_wechat_login
=
http://10.146.9.50:8080/medicinal-web/a/login
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment