Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1aa037e4
由
LN
编写于
2023-06-27 17:20:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
接口测试修改
1 个父辈
edd8a5ff
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
215 行增加
和
79 行删除
src/main/java/com/neotel/smfcore/common/utils/HttpHelper.java
src/main/java/com/neotel/smfcore/custom/micron20031/Micron20031Api.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpApiListener.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpLoadController.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpOrderController.java
src/main/java/com/neotel/smfcore/custom/micron20031/bean/DepositMatReqBean.java
src/main/java/com/neotel/smfcore/custom/micron20031/bean/MatOrderBean.java
src/main/resources/config/application-prod.yml
src/main/resources/config/application.yml
src/main/java/com/neotel/smfcore/common/utils/HttpHelper.java
查看文件 @
1aa037e
...
...
@@ -6,31 +6,37 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
com.neotel.smfcore.common.exception.ApiException
;
import
com.neotel.smfcore.custom.micron1053.bean.MicronResult
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.val
;
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.
config.CookieSpecs
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.utils.URIBuilder
;
import
org.apache.http.conn.ssl.NoopHostnameVerifier
;
import
org.apache.http.conn.ssl.SSLConnectionSocketFactory
;
import
org.apache.http.conn.ssl.TrustStrategy
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClientBuilder
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.protocol.HTTP
;
import
org.apache.http.ssl.SSLContexts
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.logging.log4j.util.Strings
;
import
org.springframework.util.CollectionUtils
;
import
javax.net.ssl.SSLContext
;
import
java.io.*
;
import
java.net.URI
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.security.KeyManagementException
;
import
java.security.KeyStoreException
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.*
;
import
java.util.Map.Entry
;
...
...
@@ -152,6 +158,7 @@ public class HttpHelper {
public
static
String
postJsonWithAuth
(
String
url
,
Object
params
,
String
auth
)
throws
ApiException
{
HttpPost
httpPost
=
new
HttpPost
(
url
);
httpPost
.
addHeader
(
"Content-Type"
,
"application/json;charset=utf-8"
);
if
(
auth
!=
null
&&
!
auth
.
isEmpty
())
{
httpPost
.
addHeader
(
"Authorization"
,
auth
);
...
...
@@ -162,14 +169,35 @@ public class HttpHelper {
ObjectMapper
mapper
=
new
ObjectMapper
();
String
requestBody
=
mapper
.
writeValueAsString
(
params
);
httpPost
.
setEntity
(
new
StringEntity
(
requestBody
,
CONTENT_CHARSET
));
RequestConfig
defaultConfig
=
RequestConfig
.
custom
().
setCookieSpec
(
CookieSpecs
.
STANDARD
).
build
();
httpPost
.
setConfig
(
defaultConfig
);
}
catch
(
JsonProcessingException
e
)
{
throw
new
ApiException
(
"Request params to ["
+
url
+
"] Json failed:"
+
e
.
getMessage
());
log
.
error
(
"Request params to ["
+
url
+
"] Json failed:"
+
e
.
getMessage
());
throw
new
ApiException
(
"smfcore.api.error"
,
"Request params to ["
+
url
+
"] Json failed:"
+
e
.
getMessage
());
}
catch
(
Exception
e
)
{
throw
new
ApiException
(
"Request params to ["
+
url
+
"] json exception:"
+
e
.
getMessage
());
log
.
error
(
"Request params to ["
+
url
+
"] json exception:"
+
e
.
getMessage
());
throw
new
ApiException
(
"smfcore.api.error"
,
"Request params to ["
+
url
+
"] json exception:"
+
e
.
getMessage
());
}
}
try
{
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
// try {
// CloseableHttpClient httpClient = HttpClients.createDefault();
// CloseableHttpResponse response = httpClient.execute(httpPost);
// HttpEntity entity = response.getEntity();
// String responseContent = EntityUtils.toString(entity, CONTENT_CHARSET);
// response.close();
// httpClient.close();
//
// log.info("postJsonWithAuth url=["+url+"] return= ["+responseContent+"]");
// return responseContent;
// } catch (Exception e) {
// log.error("Request to [" + url + "] failed:" + e.getMessage());
// throw new ApiException("Request to [" + url + "] failed:" + e.getMessage());
// }
HttpClientBuilder
httpClientBuilder
=
HttpClientBuilder
.
create
();
try
(
CloseableHttpClient
httpClient
=
httpClientBuilder
.
setSSLSocketFactory
(
getSslConnectionSocketFactory
()).
build
())
{
CloseableHttpResponse
response
=
httpClient
.
execute
(
httpPost
);
HttpEntity
entity
=
response
.
getEntity
();
String
responseContent
=
EntityUtils
.
toString
(
entity
,
CONTENT_CHARSET
);
...
...
@@ -179,8 +207,18 @@ public class HttpHelper {
log
.
info
(
"postJsonWithAuth url=["
+
url
+
"] return= ["
+
responseContent
+
"]"
);
return
responseContent
;
}
catch
(
Exception
e
)
{
throw
new
ApiException
(
"Request to ["
+
url
+
"] failed:"
+
e
.
getMessage
());
log
.
error
(
"Request to ["
+
url
+
"] failed:"
+
e
.
getMessage
());
throw
new
ApiException
(
"smfcore.api.error"
,
"Request to ["
+
url
+
"] failed:"
+
e
.
getMessage
());
}
}
/**
* 支持SSL
*
* @return SSLConnectionSocketFactory
*/
private
static
SSLConnectionSocketFactory
getSslConnectionSocketFactory
()
throws
NoSuchAlgorithmException
,
KeyStoreException
,
KeyManagementException
{
TrustStrategy
acceptingTrustStrategy
=
(
x509Certificates
,
s
)
->
true
;
SSLContext
sslContext
=
SSLContexts
.
custom
().
loadTrustMaterial
(
null
,
acceptingTrustStrategy
).
build
();
return
new
SSLConnectionSocketFactory
(
sslContext
,
new
NoopHostnameVerifier
());
}
/**
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/Micron20031Api.java
查看文件 @
1aa037e
...
...
@@ -161,12 +161,21 @@ public class Micron20031Api {
@Value
(
"${micron.getTokenUrl:}"
)
public
void
set
u
rl_GetToken
(
String
url_getToken
)
{
public
void
set
U
rl_GetToken
(
String
url_getToken
)
{
Micron20031Api
.
url_getToken
=
url_getToken
;
}
private
static
String
AUTH_TOKEN
=
""
;
private
static
String
api_AUTH_TOKEN
=
"Bearer 0f1a4408-7235-3f01-b671-f71491dc6bfa"
;
@Value
(
"${micron.defToken:Bearer 0f1a4408-7235-3f01-b671-f71491dc6bfa}"
)
public
void
setApi_AUTH_TOKEN
(
String
config
)
{
if
(
ObjectUtil
.
isNotEmpty
(
config
))
{
Micron20031Api
.
api_AUTH_TOKEN
=
config
;
}
}
private
static
String
MATERIAL_TYPE
=
"SOLDER_PASTE"
;
...
...
@@ -193,9 +202,14 @@ public class Micron20031Api {
public
static
String
getAuthToken
(){
String
url
=
"https://boapi3testgtwy.micron.com/token"
;
if
(
ObjectUtil
.
isNotEmpty
(
url_getToken
)){
url
=
url_getToken
;
url
=
url_getToken
;
if
(
ObjectUtil
.
isEmpty
(
url_getToken
)){
//直接返回默认的token
return
api_AUTH_TOKEN
;
// url=url_getToken;
}
try
{
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
dataMap
.
put
(
"grant_type"
,
"client_credentials"
);
...
...
@@ -208,9 +222,9 @@ public class Micron20031Api {
Object
MaterialType
=
resultMap
.
get
(
"MaterialType"
);
Object
Message
=
resultMap
.
get
(
"Message"
);
Object
Status
=
resultMap
.
get
(
"Status"
);
AUTH_TOKEN
=
"Bearer 03400c52-9b1d-3e10-b40c-a95fbfdcec67"
;
return
AUTH_TOKEN
;
api_AUTH_TOKEN
=
"Bearer 0f1a4408-7235-3f01-b671-f71491dc6bfa"
;
//
AUTH_TOKEN = "Bearer 03400c52-9b1d-3e10-b40c-a95fbfdcec67";
return
api_
AUTH_TOKEN
;
}
catch
(
ApiException
e
)
{
log
.
error
(
"checkUserRights Error"
,
e
);
...
...
@@ -286,13 +300,22 @@ public class Micron20031Api {
log
.
info
(
"调用MES接口 checkStockAvailable,参数:"
+
JsonUtil
.
toJsonStr
(
paramList
));
String
resultStr
=
HttpHelper
.
postJsonWithAuth
(
checkStockAvailableUrl
,
paramList
,
auth
);
log
.
info
(
"调用MES接口 checkStockAvailable 返回:"
+
resultStr
);
List
<
MatOrderBean
>
orderBeanList
=
JsonUtil
.
toList
(
resultStr
,
MatOrderBean
.
class
);
for
(
MatOrderBean
matOrderBean
:
orderBeanList
)
{
Integer
qty
=
pnMap
.
get
(
matOrderBean
.
getMicronPN
());
if
(
qty
!=
null
){
matOrderBean
.
setStockRoomQty
(
qty
);
List
<
Object
>
materials
=
getResult
(
resultStr
,
"materials"
);
List
<
MatOrderBean
>
orderBeanList
=
new
ArrayList
<>();
if
(
materials
!=
null
)
{
for
(
Object
object
:
materials
)
{
String
str
=
JsonUtil
.
toJsonStr
(
object
);
MatOrderBean
matOrderBean
=
(
MatOrderBean
)
JsonUtil
.
toObj
(
str
,
MatOrderBean
.
class
);
Integer
qty
=
pnMap
.
get
(
matOrderBean
.
getMicronPN
());
if
(
qty
!=
null
)
{
matOrderBean
.
setStockRoomQty
(
qty
);
}
orderBeanList
.
add
(
matOrderBean
);
}
}
return
orderBeanList
;
}
...
...
@@ -337,21 +360,31 @@ public class Micron20031Api {
*/
public
static
List
<
DepositMatReqBean
>
getMatReqDetail
(
String
matReqNo
)
throws
ApiException
{
//pnMap的key为pn, value为库存数量
String
getMatReqDetailUrl
=
getUrl
(
api_GetMatReqDetail
);;
String
getMatReqDetailUrl
=
getUrl
(
api_GetMatReqDetail
);
;
String
auth
=
getAuthToken
();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
dataMap
.
put
(
"MatReqNo"
,
matReqNo
);
dataMap
.
put
(
"MaterialType"
,
MATERIAL_TYPE
);
log
.
info
(
"调用MES接口 getMatReqDetail,参数:"
+
JsonUtil
.
toJsonStr
(
dataMap
));
log
.
info
(
"调用MES接口 getMatReqDetail
["
+
getMatReqDetailUrl
+
"]
,参数:"
+
JsonUtil
.
toJsonStr
(
dataMap
));
String
resultStr
=
HttpHelper
.
postJsonWithAuth
(
getMatReqDetailUrl
,
dataMap
,
auth
);
log
.
info
(
"调用MES接口 getMatReqDetail 返回:"
+
resultStr
);
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
resultStr
);
if
(
ObjectUtil
.
isEmpty
(
resultStr
))
{
throw
new
ApiException
(
"smfcore.api.returnNoData"
,
"getMatReqDetail Failed to get data"
,
new
String
[]{
"getMatReqDetail"
});
}
// Map<String, Object> resultMap = JsonUtil.toMap(resultStr);
List
<
DepositMatReqBean
>
beans
=
new
ArrayList
<>();
if
(
resultMap
.
containsKey
(
"materialDocList"
))
{
beans
=
(
List
<
DepositMatReqBean
>)
resultMap
.
get
(
"materialDocList"
);
List
<
Object
>
materialDocList
=
getResult
(
resultStr
,
"materialDocList"
);
if
(
materialDocList
!=
null
)
{
for
(
Object
obj
:
materialDocList
)
{
String
str
=
JsonUtil
.
toJsonStr
(
obj
);
DepositMatReqBean
bean
=
(
DepositMatReqBean
)
JsonUtil
.
toObj
(
str
,
DepositMatReqBean
.
class
);
beans
.
add
(
bean
);
}
}
// DepositMatReqBean depositMatReqBean = JsonUtil.toObj(resultStr,DepositMatReqBean.class);
return
beans
;
}
...
...
@@ -538,12 +571,17 @@ public class Micron20031Api {
log
.
info
(
"调用MES接口 GetEquipIDList,参数:"
+
JsonUtil
.
toJsonStr
(
dataMap
));
String
resultStr
=
HttpHelper
.
postJsonWithAuth
(
checkStockAvailableUrl
,
dataMap
,
auth
);
log
.
info
(
"调用MES接口 GetEquipIDList 返回:"
+
resultStr
);
List
<
Map
<
String
,
String
>
>
equipList
=
getResult
(
resultStr
,
"equipList"
);
List
<
Object
>
equipList
=
getResult
(
resultStr
,
"equipList"
);
if
(
equipList
!=
null
){
List
<
Map
<
String
,
String
>>
listMap
=
(
List
<
Map
<
String
,
String
>>)
equipList
;
for
(
Map
<
String
,
String
>
eqiup
:
listMap
)
{
equipIdList
.
add
(
eqiup
.
get
(
"equipId"
));
for
(
Object
obj
:
equipList
)
{
String
str
=
JsonUtil
.
toJsonStr
(
obj
);
Map
<
String
,
Object
>
map
=
JsonUtil
.
toMap
(
str
);
if
(
map
.
containsKey
(
"equipId"
)){
equipIdList
.
add
(
map
.
get
(
"equipId"
).
toString
());
}
}
}
return
equipIdList
;
}
...
...
@@ -592,42 +630,55 @@ public class Micron20031Api {
*/
public
static
void
chkAuthoriseToDispatch
(
Barcode
barcode
,
String
mode
,
String
username
)
throws
ApiException
{
String
checkStockAvailableUrl
=
getUrl
(
api_ChkAuthoriseToDispatch
);
if
(
ObjectUtil
.
isEmpty
(
checkStockAvailableUrl
))
{
if
(
ObjectUtil
.
isEmpty
(
checkStockAvailableUrl
))
{
return
;
}
String
auth
=
getAuthToken
();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
dataMap
.
put
(
"MicronPN"
,
barcode
.
getPartNumber
());
dataMap
.
put
(
"LotNo"
,
barcode
.
getBarcode
());
dataMap
.
put
(
"BatchNo"
,
barcode
.
getBatch
());
dataMap
.
put
(
"SpoolStatus"
,
"NEW"
);
dataMap
.
put
(
"Quantity"
,
barcode
.
getAmount
());
dataMap
.
put
(
"Mode"
,
mode
);
dataMap
.
put
(
"Username"
,
username
);
dataMap
.
put
(
"MaterialType"
,
MATERIAL_TYPE
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
dataMap
.
put
(
"MicronPN"
,
barcode
.
getPartNumber
());
dataMap
.
put
(
"LotNo"
,
barcode
.
getBarcode
());
dataMap
.
put
(
"BatchNo"
,
barcode
.
getBatch
());
dataMap
.
put
(
"SpoolStatus"
,
"NEW"
);
dataMap
.
put
(
"Quantity"
,
barcode
.
getAmount
());
dataMap
.
put
(
"Mode"
,
mode
);
dataMap
.
put
(
"Username"
,
username
);
dataMap
.
put
(
"MaterialType"
,
MATERIAL_TYPE
);
log
.
info
(
"调用MES接口 ChkAuthoriseToDispatch,参数:"
+
JsonUtil
.
toJsonStr
(
dataMap
));
log
.
info
(
"调用MES接口 ChkAuthoriseToDispatch,参数:"
+
JsonUtil
.
toJsonStr
(
dataMap
));
String
resultStr
=
HttpHelper
.
postJsonWithAuth
(
checkStockAvailableUrl
,
dataMap
,
auth
);
log
.
info
(
"调用MES接口 ChkAuthoriseToDispatch 返回:"
+
resultStr
);
getResult
(
resultStr
,
null
);
String
result
=
getResult
(
resultStr
,
"MicronPN"
);
}
private
static
<
T
>
T
getResult
(
String
resultJson
,
String
key
)
throws
ApiException
{
if
(
ObjectUtil
.
isEmpty
(
resultJson
))
{
return
null
;
if
(
ObjectUtil
.
isEmpty
(
resultJson
))
{
return
null
;
}
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
resultJson
);
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
resultJson
);
Object
resultStatus
=
resultMap
.
get
(
"Status"
);
if
(
resultStatus
!=
null
&&
!
resultStatus
.
toString
().
equalsIgnoreCase
(
"PASS"
))
{
if
(
resultStatus
!=
null
&&
!
resultStatus
.
toString
().
equalsIgnoreCase
(
"PASS"
))
{
String
msg
=
resultMap
.
get
(
"Message"
).
toString
();
throw
new
ApiException
(
msg
);
throw
new
ApiException
(
"smfcore.api.error"
,
msg
);
}
if
(
key
!=
null
&&
!
key
.
isEmpty
())
{
if
(
key
!=
null
&&
!
key
.
isEmpty
())
{
Object
value
=
resultMap
.
get
(
key
);
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
return
(
T
)
value
;
}
else
{
try
{
char
[]
cs
=
key
.
toCharArray
();
char
c
=
cs
[
0
];
cs
[
0
]
=
Character
.
isUpperCase
(
c
)
?
Character
.
toLowerCase
(
c
)
:
Character
.
toUpperCase
(
c
);
String
newKey
=
String
.
valueOf
(
cs
);
value
=
resultMap
.
get
(
newKey
);
if
(
value
!=
null
)
{
return
(
T
)
value
;
}
}
catch
(
Exception
ex
)
{
}
}
}
return
null
;
...
...
@@ -671,9 +722,17 @@ public class Micron20031Api {
log
.
info
(
"调用MES接口 ReturnMaterial,参数:"
+
JsonUtil
.
toJsonStr
(
dataMap
));
String
resultStr
=
HttpHelper
.
postJsonWithAuth
(
checkStockAvailableUrl
,
dataMap
,
auth
);
log
.
info
(
"调用MES接口 ReturnMaterial 返回:"
+
resultStr
);
if
(
ObjectUtil
.
isEmpty
(
resultStr
)){
log
.
info
(
"调用MES接口 ReturnMaterial 返回:"
+
resultStr
+
" ,返回数据为空,return null "
);
return
null
;
}
log
.
info
(
"调用MES接口 ReturnMaterial 返回:"
+
resultStr
);
String
expiredDateStr
=
getResult
(
resultStr
,
"ExpiredDate"
);
Date
expiredDate
=
DateUtil
.
toDate
(
expiredDateStr
.
toString
(),
"MM-dd-yyyy"
);
barcode
.
setExpireDate
(
expiredDate
);
if
(
ObjectUtil
.
isNotEmpty
(
expiredDateStr
))
{
Date
expiredDate
=
DateUtil
.
toDate
(
expiredDateStr
.
toString
(),
"MM-dd-yyyy"
);
barcode
.
setExpireDate
(
expiredDate
);
}
return
barcode
;
}
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpApiListener.java
查看文件 @
1aa037e
...
...
@@ -69,7 +69,8 @@ public class MicronSpApiListener extends BaseSmfApiListener {
@Override
public
boolean
canLogin
(
String
loginCheckUrl
,
String
userName
,
String
pwd
)
throws
ValidateException
{
try
{
return
Micron20031Api
.
checkUserRights
(
userName
);
return
true
;
// return Micron20031Api.checkUserRights(userName);
}
catch
(
ValidateException
e
){
throw
e
;
}
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpLoadController.java
查看文件 @
1aa037e
...
...
@@ -58,6 +58,11 @@ public class MicronSpLoadController {
InList
inList
=
inListCache
.
getInList
(
matReqNo
);
if
(
inList
==
null
)
{
List
<
DepositMatReqBean
>
beans
=
Micron20031Api
.
getMatReqDetail
(
matReqNo
);
if
(
beans
==
null
||
beans
.
size
()<=
0
){
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.api.nodata"
,
"Failed to get data"
);
}
inList
=
new
InList
();
inList
.
setName
(
matReqNo
);
List
<
InListItem
>
items
=
new
ArrayList
<>();
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpOrderController.java
查看文件 @
1aa037e
...
...
@@ -56,7 +56,9 @@ public class MicronSpOrderController {
}
try
{
List
<
MatOrderBean
>
stockResults
=
Micron20031Api
.
checkStockAvailable
(
pnVMap
);
if
(
stockResults
==
null
||
stockResults
.
size
()<=
0
){
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.api.nodata"
,
"Failed to get data"
);
}
for
(
MatOrderBean
bean
:
stockResults
)
{
OrderInfoDto
orderInfoDto
=
new
OrderInfoDto
(
bean
.
getMicronPN
(),
0
,
bean
.
getQuantity
(),
bean
.
getUnitOfMeasures
());
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/bean/DepositMatReqBean.java
查看文件 @
1aa037e
...
...
@@ -18,22 +18,22 @@ public class DepositMatReqBean{
* * //Input: MatReqNo, MaterialType
* * //Output: MatReqNo, Micron Part Number, Lot No, Quantity, UnitOfMeasures, MaterialType, Message, Status
*/
@JsonProperty
(
"
M
icronPN"
)
@JsonProperty
(
"
m
icronPN"
)
private
String
micronPN
;
@JsonProperty
(
"
L
otNo"
)
@JsonProperty
(
"
l
otNo"
)
private
String
lotNo
;
@JsonProperty
(
"
Q
uantity"
)
@JsonProperty
(
"
q
uantity"
)
private
Integer
quantity
;
@JsonProperty
(
"
U
nitOfMeasures"
)
@JsonProperty
(
"
u
nitOfMeasures"
)
private
String
unitOfMeasures
;
@JsonProperty
(
"
M
aterialType"
)
@JsonProperty
(
"
m
aterialType"
)
private
String
materialType
;
@JsonProperty
(
"
M
atReqNo"
)
@JsonProperty
(
"
m
atReqNo"
)
private
String
matReqNo
;
@JsonProperty
(
"
M
essage"
)
@JsonProperty
(
"
m
essage"
)
private
String
message
;
@JsonProperty
(
"
S
tatus"
)
@JsonProperty
(
"
s
tatus"
)
private
String
status
;
}
src/main/java/com/neotel/smfcore/custom/micron20031/bean/MatOrderBean.java
查看文件 @
1aa037e
...
...
@@ -10,22 +10,22 @@ import lombok.Data;
@Data
public
class
MatOrderBean
{
@JsonProperty
(
"
MicronPN
"
)
@JsonProperty
(
"
micronPn
"
)
private
String
micronPN
;
@JsonProperty
(
"
U
nitOfMeasures"
)
@JsonProperty
(
"
u
nitOfMeasures"
)
private
String
unitOfMeasures
;
@JsonProperty
(
"
Q
uantity"
)
@JsonProperty
(
"
q
uantity"
)
private
Integer
quantity
;
@JsonProperty
(
"
M
aterialType"
)
@JsonProperty
(
"
m
aterialType"
)
private
String
materialType
;
private
Integer
stockRoomQty
;
@JsonProperty
(
"
M
atReqNo"
)
@JsonProperty
(
"
m
atReqNo"
)
private
String
matReqNo
;
@JsonProperty
(
"
M
essage"
)
@JsonProperty
(
"
m
essage"
)
private
String
message
;
@JsonProperty
(
"
S
tatus"
)
@JsonProperty
(
"
s
tatus"
)
private
String
status
;
}
src/main/resources/config/application-prod.yml
查看文件 @
1aa037e
micron
:
apiAddr
:
https://testapigtwy.micron.com/t/app.mfg/mmsil/v1/DEVL/SINGAPORE/
api_CheckUserRights
:
CheckUserRights
api_CheckStockAvailable
:
CheckStockAvailable
api_TriggerMatReqOrder
:
TriggerMatReqOrder
api_GetMatReqDetail
:
GetMatReqDetail
api_DepositCreateMA
:
DepositCreateMA
api_SendEmail
:
SendEmail
api_MATrackOut
:
MATrackOut
api_GetEquipIDList
:
GetEquipIDList
api_GetMicronPN
:
GetMicronPN
api_ChkAuthoriseToDispatch
:
ChkAuthoriseToDispatch
api_ReturnMaterial
:
ReturnMaterial
defToken
:
Bearer 0f1a4408-7235-3f01-b671-f71491dc6bfa
# getTokenUrl: https://boapi3testgtwy.micron.com/token
email
:
to
:
cc
:
api
:
# name: 20031
# loginCheckUrl: https://testapigtwy.micron.com/t/app.mfg/mmsil/v1/DEVL/SINGAPORE/CheckUserRights
# 登录相关配置
login
:
...
...
src/main/resources/config/application.yml
查看文件 @
1aa037e
server
:
port
:
8800
micron
:
apiAddr
:
https://testapigtwy.micron.com/t/app.mfg/mmsil/v1/DEVL/SINGAPORE/
api_CheckUserRights
:
CheckUserRights
api_CheckStockAvailable
:
CheckStockAvailable
api_TriggerMatReqOrder
:
TriggerMatReqOrder
api_GetMatReqDetail
:
GetMatReqDetail
api_DepositCreateMA
:
DepositCreateMA
api_SendEmail
:
SendEmail
api_MATrackOut
:
MATrackOut
api_GetEquipIDList
:
GetEquipIDList
api_GetMicronPN
:
GetMicronPN
api_ChkAuthoriseToDispatch
:
ChkAuthoriseToDispatch
api_ReturnMaterial
:
ReturnMaterial
defToken
:
Bearer 0f1a4408-7235-3f01-b671-f71491dc6bfa
# getTokenUrl: https://boapi3testgtwy.micron.com/token
email
:
to
:
cc
:
api
:
name
:
inCheckUrl
:
outNotifyUrl
:
inNotifyUrl
:
hella
:
#host: 127.0.0.1
#port: 3333
# name: 20031
# loginCheckUrl: https://testapigtwy.micron.com/t/app.mfg/mmsil/v1/DEVL/SINGAPORE/CheckUserRights
# 文件存储路径
file
:
mac
:
~/file/
...
...
@@ -41,7 +52,7 @@ rsa:
app
:
version
:
'
@app.version@
'
version
:
'
3.5.150623
'
type
:
"
"
menu
:
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论