Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
Gree
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 83bc3b27
由
sunke
编写于
2021-09-14 17:37:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
接口更新
1 个父辈
02bfb2a9
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
417 行增加
和
417 行删除
myproject/src/main/java/com/myproject/util/QisdaApi.java
myproject/src/main/java/com/myproject/util/QisdaApi.java
查看文件 @
83bc3b2
...
...
@@ -91,38 +91,38 @@ public class QisdaApi {
* 获取库存进行比对
*/
public
static
Map
<
String
,
DiffInfo
>
getInventory
(
String
area
)
throws
ApiException
{
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIStcok"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"area"
,
area
);
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIStcok";
//
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("area",area);
Map
<
String
,
DiffInfo
>
diffInfoMap
=
new
HashMap
<>();
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
debug
(
"Qisda获取库存信息进行比对返回:"
+
result
);
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
result
);
String
code
=
resultMap
.
get
(
"code"
).
toString
();
if
(
code
.
equals
(
"200"
)){
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
resultMap
.
get
(
"data"
);
for
(
Map
<
String
,
Object
>
itemMap
:
data
)
{
DiffInfo
diffInfo
=
new
DiffInfo
();
String
partno
=
itemMap
.
get
(
"partno"
).
toString
();
String
facility
=
itemMap
.
get
(
"facility"
).
toString
();
String
location
=
itemMap
.
get
(
"location"
).
toString
();
String
reelid
=
itemMap
.
get
(
"reelid"
).
toString
();
String
qty
=
itemMap
.
get
(
"qty"
).
toString
();
diffInfo
.
setPn
(
partno
);
diffInfo
.
setReelId
(
reelid
);
diffInfo
.
setLocation
(
location
);
diffInfo
.
setQty
(
qty
);
diffInfo
.
setFacility
(
facility
);
diffInfoMap
.
put
(
reelid
,
diffInfo
);
}
}
else
{
String
errorMsg
=
" Qisda获取库存信息进行比对转换出错:"
+
resultMap
.
get
(
"msg"
);
log
.
info
(
errorMsg
);
throw
new
ApiException
(
errorMsg
);
}
//
String result = HttpHelper.postParam(url,paramMap);
//
log.debug("Qisda获取库存信息进行比对返回:" + result);
//
//
Map<String, Object> resultMap = JsonUtil.toMap(result);
//
String code = resultMap.get("code").toString();
//
if(code.equals("200")){
//
List<Map<String,Object>> data = (List<Map<String, Object>>) resultMap.get("data");
//
for (Map<String, Object> itemMap : data) {
//
DiffInfo diffInfo = new DiffInfo();
//
String partno = itemMap.get("partno").toString();
//
String facility = itemMap.get("facility").toString();
//
String location = itemMap.get("location").toString();
//
String reelid = itemMap.get("reelid").toString();
//
String qty = itemMap.get("qty").toString();
//
diffInfo.setPn(partno);
//
diffInfo.setReelId(reelid);
//
diffInfo.setLocation(location);
//
diffInfo.setQty(qty);
//
diffInfo.setFacility(facility);
//
diffInfoMap.put(reelid,diffInfo);
//
}
//
}else{
//
String errorMsg = " Qisda获取库存信息进行比对转换出错:" + resultMap.get("msg");
//
log.info(errorMsg);
//
throw new ApiException(errorMsg);
//
}
return
diffInfoMap
;
}
...
...
@@ -137,45 +137,45 @@ public class QisdaApi {
* @param lessBind 是否是绑定缺料反馈
*/
public
static
void
VMILocationOutFeedback
(
List
<
OutItem
>
outItemList
,
boolean
lessBind
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOutFeedback"
;
List
<
Map
<
String
,
Object
>>
materialInfoList
=
new
ArrayList
<>();
for
(
OutItem
outItem
:
outItemList
)
{
Map
<
String
,
Object
>
materialInfoMap
=
new
HashMap
<
String
,
Object
>();
materialInfoMap
.
put
(
"so"
,
outItem
.
getSo
());
//DN单号或者是厂别
materialInfoMap
.
put
(
"partNum"
,
outItem
.
getPn
());
//料号
int
lossqty
=
outItem
.
outLessQty
();
if
(
lessBind
){
//绑定缺料反馈
lossqty
=
outItem
.
preBindLessQty
();
}
if
(
lossqty
>
0
){
materialInfoMap
.
put
(
"lossqty"
,
lossqty
+
""
);
//缺料数量
materialInfoMap
.
put
(
"slot"
,
outItem
.
getSlotStr
());
//料站
materialInfoMap
.
put
(
"serial"
,
outItem
.
gethSerial
());
//需求单号
materialInfoList
.
add
(
materialInfoMap
);
}
}
if
(
materialInfoList
.
isEmpty
()){
log
.
info
(
"需求单不缺料,不进行缺料反馈"
);
}
else
{
String
lackOfMaterial
=
JsonUtil
.
toJsonStr
(
materialInfoList
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"lackOfMaterial"
,
lackOfMaterial
);
log
.
info
(
"缺料反馈接口(VMILocationOutFeedback)参数lackOfMaterial="
+
lackOfMaterial
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"收到缺料反馈接口(VMILocationOutFeedback)返回:"
+
result
);
}
catch
(
ApiException
e
)
{
log
.
error
(
"缺料反馈接口(VMILocationOutFeedback)接口出错"
,
e
);
}
}
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOutFeedback";
//
List<Map<String,Object>> materialInfoList = new ArrayList<>();
//
for (OutItem outItem : outItemList) {
//
Map<String,Object> materialInfoMap = new HashMap<String,Object>();
//
materialInfoMap.put("so",outItem.getSo());//DN单号或者是厂别
//
materialInfoMap.put("partNum",outItem.getPn());//料号
//
int lossqty = outItem.outLessQty();
//
if(lessBind){
//
//绑定缺料反馈
//
lossqty = outItem.preBindLessQty();
//
}
//
if(lossqty > 0){
//
materialInfoMap.put("lossqty",lossqty + "");//缺料数量
//
materialInfoMap.put("slot",outItem.getSlotStr());//料站
//
materialInfoMap.put("serial",outItem.gethSerial());//需求单号
//
//
materialInfoList.add(materialInfoMap);
//
}
//
//
}
//
//
if(materialInfoList.isEmpty()){
//
log.info("需求单不缺料,不进行缺料反馈");
//
}else{
//
String lackOfMaterial = JsonUtil.toJsonStr(materialInfoList);
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("lackOfMaterial",lackOfMaterial);
//
log.info("缺料反馈接口(VMILocationOutFeedback)参数lackOfMaterial="+lackOfMaterial);
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info("收到缺料反馈接口(VMILocationOutFeedback)返回:" + result);
//
} catch (ApiException e) {
//
log.error("缺料反馈接口(VMILocationOutFeedback)接口出错",e);
//
}
//
}
}
/**
...
...
@@ -186,75 +186,75 @@ public class QisdaApi {
* @throws ApiException
*/
public
static
List
<
DNItem
>
GetDNDetails
(
String
dnNo
,
boolean
isCheck
)
throws
ApiException
{
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return
new
ArrayList
<>();
}
String
url
=
"http://10.85.17.43:8080/WMSWeb.asmx/GetDNDetailsJson"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
//paramMap.put("DHNO","DNMISW1911197845");
paramMap
.
put
(
"DHNO"
,
dnNo
);
String
isCheckStr
=
"N"
;
if
(
isCheck
){
isCheckStr
=
"Y"
;
}
paramMap
.
put
(
"ISCheck"
,
isCheckStr
);
paramMap
.
put
(
"isBack"
,
"Y"
);
String
errorMsg
=
""
;
Map
<
String
,
DNItem
>
itemMap
=
new
HashMap
<>();
try
{
String
returnResult
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"获取DN单详情结果:"
+
returnResult
);
String
resultStr
=
XmlUtil
.
getNodeBody
(
"string"
,
returnResult
);
if
(
resultStr
.
startsWith
(
"["
)){
List
<
Map
<
String
,
Object
>>
items
=
JsonUtil
.
toObj
(
resultStr
,
List
.
class
);
for
(
Map
<
String
,
Object
>
map
:
items
)
{
DNItem
item
=
new
DNItem
();
String
no
=
map
.
get
(
"DLNO"
).
toString
();
item
.
setDnNo
(
no
);
String
dnDateStr
=
map
.
get
(
"DLCRDTE"
).
toString
()+
" "
+
map
.
get
(
"DLCRTIME"
).
toString
();
item
.
setDnDateStr
(
dnDateStr
);
int
dnQty
=
Float
.
valueOf
(
map
.
get
(
"WACTQTY"
).
toString
()).
intValue
();
item
.
setDnQty
(
dnQty
);
String
facility
=
map
.
get
(
"WPORD"
).
toString
();
item
.
setFacility
(
facility
);
String
company
=
map
.
get
(
"DSN"
).
toString
();
item
.
setCompany
(
company
);
String
pn
=
map
.
get
(
"WPROD"
).
toString
();
item
.
setPn
(
pn
);
DNItem
dnItem
=
itemMap
.
get
(
pn
);
if
(
dnItem
!=
null
){
int
totalDNQty
=
dnItem
.
getDnQty
()
+
item
.
getDnQty
();
log
.
info
(
"PN["
+
pn
+
"]有重复,合并数量["
+
dnItem
.
getDnQty
()
+
" + "
+
item
.
getDnQty
()
+
" = "
+
totalDNQty
);
dnItem
.
setDnQty
(
totalDNQty
);
}
else
{
dnItem
=
item
;
}
itemMap
.
put
(
pn
,
dnItem
);
}
}
else
{
//返回错训误了
errorMsg
=
resultStr
;
}
}
catch
(
Exception
e
)
{
errorMsg
=
e
.
getMessage
();
log
.
error
(
"获取DN单详情接口出错"
,
e
);
}
if
(!
Strings
.
isNullOrEmpty
(
errorMsg
)){
throw
new
ApiException
(
errorMsg
);
}
List
<
DNItem
>
dnItems
=
Lists
.
newArrayList
();
if
(!
itemMap
.
isEmpty
()){
dnItems
.
addAll
(
itemMap
.
values
());
}
return
dnItems
;
//
}
//
String url = "http://10.85.17.43:8080/WMSWeb.asmx/GetDNDetailsJson";
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
//paramMap.put("DHNO","DNMISW1911197845");
//
paramMap.put("DHNO",dnNo);
//
String isCheckStr = "N";
//
if(isCheck){
//
isCheckStr = "Y";
//
}
//
paramMap.put("ISCheck",isCheckStr);
//
paramMap.put("isBack","Y");
//
String errorMsg = "";
//
Map<String,DNItem> itemMap = new HashMap<>();
//
try {
//
String returnResult = HttpHelper.postParam(url,paramMap);
//
log.info("获取DN单详情结果:" + returnResult);
//
String resultStr = XmlUtil.getNodeBody("string", returnResult);
//
if(resultStr.startsWith("[")){
//
List<Map<String,Object>> items = JsonUtil.toObj(resultStr, List.class);
//
for (Map<String,Object> map : items) {
//
DNItem item = new DNItem();
//
String no = map.get("DLNO").toString();
//
item.setDnNo(no);
//
//
String dnDateStr = map.get("DLCRDTE").toString()+ " " + map.get("DLCRTIME").toString();
//
item.setDnDateStr(dnDateStr);
//
//
int dnQty = Float.valueOf(map.get("WACTQTY").toString()).intValue();
//
item.setDnQty(dnQty);
//
//
String facility = map.get("WPORD").toString();
//
item.setFacility(facility);
//
//
String company = map.get("DSN").toString();
//
item.setCompany(company);
//
//
String pn = map.get("WPROD").toString();
//
item.setPn(pn);
//
//
DNItem dnItem = itemMap.get(pn);
//
if(dnItem != null){
//
int totalDNQty = dnItem.getDnQty() + item.getDnQty();
//
log.info("PN["+pn+"]有重复,合并数量[" + dnItem.getDnQty() +" + " + item.getDnQty() + " = " + totalDNQty);
//
dnItem.setDnQty(totalDNQty);
//
}else{
//
dnItem = item;
//
}
//
itemMap.put(pn, dnItem);
//
}
//
}else{
//
//返回错训误了
//
errorMsg = resultStr;
//
}
//
} catch (Exception e) {
//
errorMsg = e.getMessage();
//
log.error("获取DN单详情接口出错",e);
//
}
//
//
if(!Strings.isNullOrEmpty(errorMsg)){
//
throw new ApiException(errorMsg);
//
}
//
List<DNItem> dnItems = Lists.newArrayList();
//
if(!itemMap.isEmpty()){
//
dnItems.addAll(itemMap.values());
//
}
//
return dnItems;
}
...
...
@@ -262,55 +262,55 @@ public class QisdaApi {
* 6. CIS收料判定接口(绑过料串的条码扫码入库时判断)
*/
public
static
void
VMIMateriaReceiveJudge
(
DNInfo
dnInfo
,
Barcode
barcode
)
throws
ValidateException
{
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceiveJudge"
;
Map
<
String
,
Object
>
materialInfoMap
=
new
HashMap
<
String
,
Object
>();
String
dnOrFacility
=
dnInfo
.
getDnNo
();
if
(
dnInfo
.
isFacilityIn
()){
dnOrFacility
=
dnInfo
.
getFacility
();
}
materialInfoMap
.
put
(
"dnOrFacility"
,
dnOrFacility
);
//DN单号或者是厂别
materialInfoMap
.
put
(
"reelID"
,
barcode
.
getBarcode
());
//料卷ID
materialInfoMap
.
put
(
"partNum"
,
barcode
.
getPartNumber
());
//料号
materialInfoMap
.
put
(
"qty"
,
barcode
.
getAmount
());
//数量
materialInfoMap
.
put
(
"lifeCycle"
,
barcode
.
getLifeCycle
());
//生命周期
String
productCode
=
DateUtil
.
toDateString
(
barcode
.
getProduceDate
(),
"yyyyMMdd"
);
materialInfoMap
.
put
(
"productCode"
,
productCode
);
//生产日期
materialInfoMap
.
put
(
"lot"
,
barcode
.
getBatch
());
//生产批次(批次号)
materialInfoMap
.
put
(
"vendor"
,
barcode
.
getProvider
());
//供应商
materialInfoMap
.
put
(
"location"
,
""
);
//location
materialInfoMap
.
put
(
"qrCodeInfo"
,
barcode
.
getFullCodeStr
());
//完整的二维码信息
String
materialInfo
=
JsonUtil
.
toJsonStr
(
materialInfoMap
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"materialInfo"
,
materialInfo
);
log
.
info
(
"DN单Facility收料判断参数:materialInfo="
+
materialInfo
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"DN单Facility收料("
+
barcode
.
getBarcode
()+
")判定接口返回:"
+
result
);
String
resultStr
=
XmlUtil
.
getNodeBody
(
"string"
,
result
);
//0+提示信息/1/-1 0为NG,1为OK,-1为系统内部异常
if
(
resultStr
.
startsWith
(
"1"
)){
log
.
info
(
barcode
.
getBarcode
()
+
" ["
+
dnOrFacility
+
"]收料判定: OK"
);
}
else
{
log
.
info
(
barcode
.
getBarcode
()
+
" ["
+
dnOrFacility
+
"]收料判定: NG"
+
resultStr
);
if
(
resultStr
.
startsWith
(
"0"
)){
throw
new
ValidateException
(
" ["
+
dnOrFacility
+
"]收料判定NG:"
+
resultStr
);
}
else
{
throw
new
ValidateException
(
" ["
+
dnOrFacility
+
"]收料判定NG:"
+
resultStr
);
}
}
}
catch
(
ApiException
e
)
{
log
.
error
(
" ["
+
dnOrFacility
+
"]收料判定接口"
,
e
);
throw
new
ValidateException
(
" ["
+
dnOrFacility
+
"]收料接口处理异常:"
+
e
.
getMessage
());
}
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceiveJudge";
//
//
Map<String,Object> materialInfoMap = new HashMap<String,Object>();
//
String dnOrFacility = dnInfo.getDnNo();
//
if(dnInfo.isFacilityIn()){
//
dnOrFacility = dnInfo.getFacility();
//
}
//
materialInfoMap.put("dnOrFacility",dnOrFacility);//DN单号或者是厂别
//
materialInfoMap.put("reelID",barcode.getBarcode());//料卷ID
//
materialInfoMap.put("partNum",barcode.getPartNumber());//料号
//
materialInfoMap.put("qty",barcode.getAmount());//数量
//
materialInfoMap.put("lifeCycle",barcode.getLifeCycle());//生命周期
//
String productCode = DateUtil.toDateString(barcode.getProduceDate(),"yyyyMMdd");
//
materialInfoMap.put("productCode",productCode);//生产日期
//
materialInfoMap.put("lot", barcode.getBatch());//生产批次(批次号)
//
materialInfoMap.put("vendor",barcode.getProvider());//供应商
//
materialInfoMap.put("location","");//location
//
materialInfoMap.put("qrCodeInfo",barcode.getFullCodeStr());//完整的二维码信息
//
String materialInfo = JsonUtil.toJsonStr(materialInfoMap);
//
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("materialInfo",materialInfo);
//
log.info("DN单Facility收料判断参数:materialInfo=" + materialInfo);
//
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info("DN单Facility收料("+barcode.getBarcode()+")判定接口返回:" + result);
//
String resultStr = XmlUtil.getNodeBody("string", result);
//
//0+提示信息/1/-1 0为NG,1为OK,-1为系统内部异常
//
if(resultStr.startsWith("1")){
//
log.info(barcode.getBarcode() + " ["+dnOrFacility+"]收料判定: OK");
//
}else{
//
log.info(barcode.getBarcode() + " ["+dnOrFacility+"]收料判定: NG" + resultStr);
//
if(resultStr.startsWith("0")){
//
throw new ValidateException(" ["+dnOrFacility+"]收料判定NG:" + resultStr);
//
}else{
//
throw new ValidateException(" ["+dnOrFacility+"]收料判定NG:" + resultStr);
//
}
//
}
//
//
//
} catch (ApiException e) {
//
log.error(" ["+dnOrFacility+"]收料判定接口",e);
//
throw new ValidateException(" ["+dnOrFacility+"]收料接口处理异常:" + e.getMessage());
//
}
}
...
...
@@ -319,7 +319,7 @@ public class QisdaApi {
* 3. CIS入库判定接口 (没绑过料串的条码调用此接口)
*/
public
static
Barcode
VMILocationInCheck
(
Barcode
barcode
)
throws
ValidateException
{
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
NANRUI
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
barcode
;
}
...
...
@@ -432,32 +432,32 @@ public class QisdaApi {
* 纯入库操作完成时通知Qisda
*/
public
static
void
VMILocationInThread
(
String
reelID
,
String
location
,
String
fullCodeStr
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationIn"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"reelID"
,
reelID
);
paramMap
.
put
(
"location"
,
location
);
paramMap
.
put
(
"userName"
,
USER_NAME
);
paramMap
.
put
(
"code"
,
fullCodeStr
);
log
.
info
(
"纯入库操作完成时通知Qisda接口(VMILocationIn):reelID="
+
reelID
+
"&location="
+
location
+
"&code="
+
fullCodeStr
);
QisdaApiRequest
apiRequest
=
new
QisdaApiRequest
(
"纯入库"
,
paramMap
,
reelID
,
url
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
reelID
+
"纯入库操作完成时通知Qisda接口(VMILocationIn)返回:"
+
result
);
String
resultStr
=
XmlUtil
.
getNodeBody
(
"string"
,
result
);
if
(
resultStr
.
startsWith
(
"-1"
)
||
resultStr
.
startsWith
(
"0"
)){
log
.
info
(
reelID
+
"Qisda接口调用失败,需要进行重发"
);
}
else
{
QisdaCache
.
removeFailedRequest
(
apiRequest
);
return
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
reelID
+
"纯入库操作完成时通知Qisda接口(VMILocationIn)出错"
,
e
);
}
QisdaCache
.
addFailedRequest
(
apiRequest
);
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationIn";
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("reelID",reelID);
//
paramMap.put("location",location);
//
paramMap.put("userName",USER_NAME);
//
paramMap.put("code",fullCodeStr);
//
log.info("纯入库操作完成时通知Qisda接口(VMILocationIn):reelID=" + reelID + "&location="+location +"&code=" + fullCodeStr);
//
QisdaApiRequest apiRequest = new QisdaApiRequest("纯入库",paramMap,reelID,url);
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info(reelID + "纯入库操作完成时通知Qisda接口(VMILocationIn)返回:" + result);
//
String resultStr = XmlUtil.getNodeBody("string", result);
//
if(resultStr.startsWith("-1") || resultStr.startsWith("0")){
//
log.info(reelID + "Qisda接口调用失败,需要进行重发");
//
}else{
//
QisdaCache.removeFailedRequest(apiRequest);
//
return;
//
}
//
} catch (Exception e) {
//
log.error(reelID + "纯入库操作完成时通知Qisda接口(VMILocationIn)出错",e);
//
}
//
QisdaCache.addFailedRequest(apiRequest);
}
...
...
@@ -466,49 +466,49 @@ public class QisdaApi {
* CIS收料入库接口
*/
public
static
void
VMIMateriaReceiveThread
(
Barcode
barcode
,
DataLog
task
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceive"
;
Map
<
String
,
Object
>
materialInfoMap
=
new
HashMap
<
String
,
Object
>();
materialInfoMap
.
put
(
"dnOrFacility"
,
barcode
.
getAppendInfo
().
getDnOrFacility
());
//DN单号或者是厂别
materialInfoMap
.
put
(
"reelID"
,
barcode
.
getBarcode
());
//料卷ID
materialInfoMap
.
put
(
"partNum"
,
barcode
.
getPartNumber
());
//料号
materialInfoMap
.
put
(
"qty"
,
barcode
.
getInitialAmount
()
+
""
);
//数量
materialInfoMap
.
put
(
"lifeCycle"
,
barcode
.
getLifeCycle
());
//生命周期
String
productCode
=
DateUtil
.
toDateString
(
barcode
.
getProduceDate
(),
"yyyyMMdd"
);
materialInfoMap
.
put
(
"productCode"
,
productCode
);
//生产日期
materialInfoMap
.
put
(
"lot"
,
barcode
.
getBatch
());
//生产批次(批次号)
materialInfoMap
.
put
(
"vendor"
,
barcode
.
getProvider
());
//供应商
materialInfoMap
.
put
(
"location"
,
task
.
getPosName
());
//location
materialInfoMap
.
put
(
"qrCodeInfo"
,
barcode
.
getFullCodeStr
());
//完整的二维码信息
materialInfoMap
.
put
(
"reelType"
,
"0"
);
//料卷类型
String
materialInfo
=
JsonUtil
.
toJsonStr
(
materialInfoMap
);
//materialInfo = "{\"dnOrFacility\":\"DNMIST1901002587\",\"reelID\":\"R000002014042300013\",\"reelType\":\"0\",\"partNum\":\"6H.15010.204\",\"qty\":\"3\",\"lifeCycle\":\"240\",\"productCode\":\"20191102\",\"lot\":\"L00000000IA9617JL1D81\",\"vendor\":\"82012\",\"location\":\"1-1\",\"qrCodeInfo\":\"L00000000IA9617JL1D81;E20190101 0730;B8C.00501.010503562019010103000;R000002014042300013\"}";
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"materialInfo"
,
materialInfo
);
paramMap
.
put
(
"userName"
,
USER_NAME
);
log
.
info
(
"DN单收料或Facility收料通知Qisda接口(VMIMateriaReceive):"
+
materialInfo
);
QisdaApiRequest
apiRequest
=
new
QisdaApiRequest
(
"收料入库"
,
paramMap
,
barcode
.
getBarcode
(),
url
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"DN单收料或Facility收料["
+
barcode
.
getBarcode
()+
"]接口返回:"
+
result
);
String
resultStr
=
XmlUtil
.
getNodeBody
(
"string"
,
result
);
if
(
resultStr
.
startsWith
(
"-1"
)
||
resultStr
.
startsWith
(
"0"
)){
log
.
info
(
barcode
.
getBarcode
()
+
"Qisda接口调用失败,需要进行重发"
);
}
else
{
QisdaCache
.
removeFailedRequest
(
apiRequest
);
return
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"DN单收料或Facility收料接口出错"
,
e
);
}
QisdaCache
.
addFailedRequest
(
apiRequest
);
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceive";
//
//
Map<String,Object> materialInfoMap = new HashMap<String,Object>();
//
materialInfoMap.put("dnOrFacility",barcode.getAppendInfo().getDnOrFacility());//DN单号或者是厂别
//
materialInfoMap.put("reelID",barcode.getBarcode());//料卷ID
//
materialInfoMap.put("partNum",barcode.getPartNumber());//料号
//
materialInfoMap.put("qty",barcode.getInitialAmount() + "");//数量
//
materialInfoMap.put("lifeCycle",barcode.getLifeCycle());//生命周期
//
String productCode = DateUtil.toDateString(barcode.getProduceDate(),"yyyyMMdd");
//
materialInfoMap.put("productCode",productCode);//生产日期
//
materialInfoMap.put("lot", barcode.getBatch());//生产批次(批次号)
//
materialInfoMap.put("vendor",barcode.getProvider());//供应商
//
materialInfoMap.put("location",task.getPosName());//location
//
materialInfoMap.put("qrCodeInfo",barcode.getFullCodeStr());//完整的二维码信息
//
materialInfoMap.put("reelType","0");//料卷类型
//
String materialInfo = JsonUtil.toJsonStr(materialInfoMap);
//
//
//materialInfo = "{\"dnOrFacility\":\"DNMIST1901002587\",\"reelID\":\"R000002014042300013\",\"reelType\":\"0\",\"partNum\":\"6H.15010.204\",\"qty\":\"3\",\"lifeCycle\":\"240\",\"productCode\":\"20191102\",\"lot\":\"L00000000IA9617JL1D81\",\"vendor\":\"82012\",\"location\":\"1-1\",\"qrCodeInfo\":\"L00000000IA9617JL1D81;E20190101 0730;B8C.00501.010503562019010103000;R000002014042300013\"}";
//
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("materialInfo",materialInfo);
//
paramMap.put("userName",USER_NAME);
//
log.info("DN单收料或Facility收料通知Qisda接口(VMIMateriaReceive):" + materialInfo);
//
QisdaApiRequest apiRequest = new QisdaApiRequest("收料入库",paramMap,barcode.getBarcode(),url);
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info("DN单收料或Facility收料["+barcode.getBarcode()+"]接口返回:" + result);
//
String resultStr = XmlUtil.getNodeBody("string", result);
//
if(resultStr.startsWith("-1") || resultStr.startsWith("0")){
//
log.info(barcode.getBarcode() + "Qisda接口调用失败,需要进行重发");
//
}else{
//
QisdaCache.removeFailedRequest(apiRequest);
//
return;
//
}
//
//
} catch (Exception e) {
//
log.error("DN单收料或Facility收料接口出错",e);
//
}
//
QisdaCache.addFailedRequest(apiRequest);
}
...
...
@@ -519,32 +519,32 @@ public class QisdaApi {
* @param materialInfoMap
*/
private
static
void
VMILocationOutThread
(
String
reelId
,
Map
<
String
,
Object
>
materialInfoMap
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOut"
;
String
materialInfo
=
JsonUtil
.
toJsonStr
(
materialInfoMap
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"materialInfo"
,
materialInfo
);
paramMap
.
put
(
"userName"
,
USER_NAME
);
log
.
info
(
"出仓完成时通知Qisda:materialInfo="
+
materialInfo
);
QisdaApiRequest
apiRequest
=
new
QisdaApiRequest
(
"出仓"
,
paramMap
,
reelId
,
url
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
reelId
+
"出仓完成时通知Qisda(VMILocationOut)返回:"
+
result
);
String
resultStr
=
XmlUtil
.
getNodeBody
(
"string"
,
result
);
if
(
resultStr
.
startsWith
(
"-1"
)
||
resultStr
.
startsWith
(
"0"
)){
log
.
info
(
reelId
+
"Qisda接口调用失败,需要进行重发"
);
}
else
{
QisdaCache
.
removeFailedRequest
(
apiRequest
);
return
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"出仓完成时通知Qisda(VMILocationOut)接口出错"
,
e
);
}
QisdaCache
.
addFailedRequest
(
apiRequest
);
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOut";
//
String materialInfo = JsonUtil.toJsonStr(materialInfoMap);
//
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("materialInfo",materialInfo);
//
paramMap.put("userName",USER_NAME);
//
log.info("出仓完成时通知Qisda:materialInfo=" + materialInfo);
//
QisdaApiRequest apiRequest = new QisdaApiRequest("出仓",paramMap,reelId,url);
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info(reelId + "出仓完成时通知Qisda(VMILocationOut)返回:" + result);
//
String resultStr = XmlUtil.getNodeBody("string", result);
//
if(resultStr.startsWith("-1") || resultStr.startsWith("0")){
//
log.info(reelId + "Qisda接口调用失败,需要进行重发");
//
}else{
//
QisdaCache.removeFailedRequest(apiRequest);
//
return;
//
}
//
} catch (Exception e) {
//
log.error("出仓完成时通知Qisda(VMILocationOut)接口出错",e);
//
}
//
QisdaCache.addFailedRequest(apiRequest);
}
...
...
@@ -555,71 +555,71 @@ public class QisdaApi {
* @param latest 本次工单第几盘料(F 第一次,L 最后一次, M 中间)
*/
private
static
void
VMIMateriaRecAssThread
(
DataLog
task
,
Barcode
barcode
,
String
latest
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaRecAss"
;
Map
<
String
,
Object
>
materialInfoMap
=
new
HashMap
<
String
,
Object
>();
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
materialInfoMap
.
put
(
"action"
,
appendInfo
.
getAction
());
materialInfoMap
.
put
(
"facility"
,
appendInfo
.
getFacility
());
materialInfoMap
.
put
(
"so"
,
appendInfo
.
getSo
());
materialInfoMap
.
put
(
"partNum"
,
task
.
getPartNumber
());
materialInfoMap
.
put
(
"reelID"
,
task
.
getBarcode
());
materialInfoMap
.
put
(
"slot"
,
appendInfo
.
getSlotStr
());
materialInfoMap
.
put
(
"slotserial"
,
appendInfo
.
getSlotIndex
());
materialInfoMap
.
put
(
"qty"
,
task
.
getNum
()
+
""
);
materialInfoMap
.
put
(
"latest"
,
latest
);
//本次工单第几盘料(F 第一次,L 最后一次, M 中间, E是错误)
materialInfoMap
.
put
(
"cloudLocation"
,
task
.
getPosName
());
//云料仓的库位
materialInfoMap
.
put
(
"location"
,
""
);
//料架库位
String
rfid
=
appendInfo
.
getRfid
();
if
(
task
.
isLessSendReel
()){
rfid
=
"B"
;
}
if
(
latest
.
equals
(
"E"
)){
//错误状态不发料车编号
rfid
=
""
;
}
materialInfoMap
.
put
(
"vehicleID"
,
rfid
);
//料车编号
int
rfidLoc
=
appendInfo
.
getRfidLoc
();
rfidLoc
=
task
.
resolveRfidLoc
(
rfidLoc
+
""
);
materialInfoMap
.
put
(
"vehicleLocation"
,
rfidLoc
);
//料车架位号
materialInfoMap
.
put
(
"lot"
,
barcode
.
getBatch
());
//生产批次(批次号)
String
productCode
=
DateUtil
.
toDateString
(
barcode
.
getProduceDate
(),
"yyyyMMdd"
);
materialInfoMap
.
put
(
"productCode"
,
productCode
);
//生产日期
materialInfoMap
.
put
(
"vendorCode"
,
barcode
.
getProvider
());
//供应商
materialInfoMap
.
put
(
"hSerial"
,
appendInfo
.
gethSerial
());
materialInfoMap
.
put
(
"flag"
,
""
);
//子盘或母盘(L:子盘,M:母盘,其他'')
String
idte
=
DateUtil
.
toDateString
(
task
.
getUpdateDate
(),
"yyyyMMdd"
);
String
idme
=
DateUtil
.
toDateString
(
task
.
getUpdateDate
(),
"HHmmss"
);
materialInfoMap
.
put
(
"idte"
,
idte
);
//发料日期
materialInfoMap
.
put
(
"itme"
,
idme
);
//发料时间
materialInfoMap
.
put
(
"soseq"
,
appendInfo
.
getSoseq
());
//工单序号
String
materialInfo
=
JsonUtil
.
toJsonStr
(
materialInfoMap
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"materialInfo"
,
materialInfo
);
paramMap
.
put
(
"userName"
,
USER_NAME
);
log
.
info
(
"物料放上小车时通知Qisda:materialInfo="
+
materialInfo
);
QisdaApiRequest
apiRequest
=
new
QisdaApiRequest
(
"发料"
,
paramMap
,
task
.
getBarcode
(),
url
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
task
.
getBarcode
()
+
"物料放上小车时通知Qisda(VMIMateriaRecAss)返回:"
+
result
);
String
resultStr
=
XmlUtil
.
getNodeBody
(
"string"
,
result
);
if
(
resultStr
.
startsWith
(
"-1"
)
||
resultStr
.
startsWith
(
"0"
)){
log
.
info
(
task
.
getBarcode
()
+
"Qisda接口调用失败,需要进行重发"
);
}
else
{
QisdaCache
.
removeFailedRequest
(
apiRequest
);
return
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
task
.
getBarcode
()
+
"物料放上小车时通知Qisda(VMIMateriaRecAss)接口出错"
,
e
);
}
QisdaCache
.
addFailedRequest
(
apiRequest
);
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaRecAss";
//
Map<String,Object> materialInfoMap = new HashMap<String,Object>();
//
AppendInfo appendInfo = task.getAppendInfo();
//
materialInfoMap.put("action",appendInfo.getAction());
//
materialInfoMap.put("facility",appendInfo.getFacility());
//
materialInfoMap.put("so",appendInfo.getSo());
//
materialInfoMap.put("partNum",task.getPartNumber());
//
materialInfoMap.put("reelID",task.getBarcode());
//
materialInfoMap.put("slot", appendInfo.getSlotStr());
//
materialInfoMap.put("slotserial", appendInfo.getSlotIndex());
//
materialInfoMap.put("qty",task.getNum() +"");
//
materialInfoMap.put("latest",latest);//本次工单第几盘料(F 第一次,L 最后一次, M 中间, E是错误)
//
materialInfoMap.put("cloudLocation",task.getPosName());//云料仓的库位
//
materialInfoMap.put("location","");//料架库位
//
String rfid = appendInfo.getRfid();
//
//
if(task.isLessSendReel()){
//
rfid = "B";
//
}
//
if(latest.equals("E")){
//
//错误状态不发料车编号
//
rfid = "";
//
}
//
//
materialInfoMap.put("vehicleID",rfid);//料车编号
//
int rfidLoc = appendInfo.getRfidLoc();
//
rfidLoc = task.resolveRfidLoc(rfidLoc + "");
//
materialInfoMap.put("vehicleLocation",rfidLoc);//料车架位号
//
materialInfoMap.put("lot", barcode.getBatch());//生产批次(批次号)
//
String productCode = DateUtil.toDateString(barcode.getProduceDate(),"yyyyMMdd");
//
materialInfoMap.put("productCode",productCode);//生产日期
//
materialInfoMap.put("vendorCode",barcode.getProvider());//供应商
//
materialInfoMap.put("hSerial",appendInfo.gethSerial());
//
materialInfoMap.put("flag", "");//子盘或母盘(L:子盘,M:母盘,其他'')
//
String idte = DateUtil.toDateString(task.getUpdateDate(), "yyyyMMdd");
//
String idme = DateUtil.toDateString(task.getUpdateDate(), "HHmmss");
//
materialInfoMap.put("idte",idte);//发料日期
//
materialInfoMap.put("itme",idme);//发料时间
//
materialInfoMap.put("soseq",appendInfo.getSoseq());//工单序号
//
String materialInfo = JsonUtil.toJsonStr(materialInfoMap);
//
//
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("materialInfo",materialInfo);
//
paramMap.put("userName",USER_NAME);
//
log.info("物料放上小车时通知Qisda:materialInfo=" + materialInfo);
//
QisdaApiRequest apiRequest = new QisdaApiRequest("发料",paramMap,task.getBarcode(),url);
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info(task.getBarcode() + "物料放上小车时通知Qisda(VMIMateriaRecAss)返回:" + result);
//
String resultStr = XmlUtil.getNodeBody("string", result);
//
if(resultStr.startsWith("-1") || resultStr.startsWith("0")){
//
log.info(task.getBarcode() + "Qisda接口调用失败,需要进行重发");
//
}else{
//
QisdaCache.removeFailedRequest(apiRequest);
//
return;
//
}
//
} catch (Exception e) {
//
log.error(task.getBarcode() + "物料放上小车时通知Qisda(VMIMateriaRecAss)接口出错",e);
//
}
//
QisdaCache.addFailedRequest(apiRequest);
}
...
...
@@ -627,25 +627,25 @@ public class QisdaApi {
* 移远料号转换
*/
public
static
String
PartNoMapping
(
String
vdPartNum
)
throws
ApiException
{
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return
vdPartNum
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoMapping"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"vdPartNum"
,
vdPartNum
);
log
.
info
(
"从Qisda获取料号转换:vdPartNum="
+
vdPartNum
);
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"从Qisda获取料号转换:(PartNoMapping)返回:"
+
result
);
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
result
);
String
msg
=
resultMap
.
get
(
"msg"
).
toString
();
if
(
msg
.
startsWith
(
"0"
)){
String
errorMsg
=
"从Qisda获取料号["
+
vdPartNum
+
"]转换NG:"
+
msg
;
log
.
info
(
errorMsg
);
throw
new
ApiException
(
errorMsg
);
}
return
msg
;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoMapping";
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("vdPartNum",vdPartNum);
//
log.info("从Qisda获取料号转换:vdPartNum=" + vdPartNum);
//
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info("从Qisda获取料号转换:(PartNoMapping)返回:" + result);
//
Map<String, Object> resultMap = JsonUtil.toMap(result);
//
String msg = resultMap.get("msg").toString();
//
if(msg.startsWith("0")){
//
String errorMsg = "从Qisda获取料号["+vdPartNum+"]转换NG:" + msg;
//
log.info(errorMsg);
//
throw new ApiException(errorMsg);
//
}
//
return msg;
}
/**
...
...
@@ -687,51 +687,51 @@ public class QisdaApi {
* 清理Qisda库存
*/
public
static
void
ClearStockBy
(
String
posName
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/ClearStockBy"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"location"
,
posName
);
paramMap
.
put
(
"userName"
,
USER_NAME
);
log
.
info
(
"清理Qisda库存(ClearStockBy):posName="
+
posName
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"清理Qisda库存["
+
posName
+
"](ClearStockBy)返回:"
+
result
);
return
;
}
catch
(
Exception
e
)
{
log
.
error
(
"清理Qisda库存["
+
posName
+
"](ClearStockBy)接口出错"
,
e
);
}
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/ClearStockBy";
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("location",posName);
//
paramMap.put("userName",USER_NAME);
//
log.info("清理Qisda库存(ClearStockBy):posName=" + posName);
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info("清理Qisda库存["+posName+"](ClearStockBy)返回:" + result);
//
return;
//
} catch (Exception e) {
//
log.error("清理Qisda库存["+posName+"](ClearStockBy)接口出错",e);
//
}
}
/**
* 检查工单料架是否解绑 [{"data":[{"Serial":"58890","VehicleID":"D15","Status":""},{"Serial":"58890","VehicleID":"D44","Status":""},{"Serial":"58890","VehicleID":"D83","Status":""},{"Serial":"58890","VehicleID":"D90","Status":""},{"Serial":"58890","VehicleID":"D98","Status":""}]}]
*/
public
static
String
GetSerialData
(
String
line
,
String
hserial
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
""
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/GetSerialData"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"line"
,
line
);
paramMap
.
put
(
"hserial"
,
hserial
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
debug
(
"从Qisda检查工单料架是否解绑["
+
line
+
"](GetSerialData)返回:"
+
result
);
if
(
result
.
contains
(
"VehicleID"
)){
return
result
;
}
if
(
result
.
toLowerCase
().
contains
(
"wait"
)){
return
result
;
}
// if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
// log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return
""
;
}
catch
(
Exception
e
)
{
log
.
error
(
"从Qisda检查工单料架是否解绑"
+
hserial
+
"["
+
line
+
"])接口(GetSerialData)出错"
,
e
);
return
"检查出错:"
+
e
.
getMessage
();
}
// }
// String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/GetSerialData";
// Map<String,Object> paramMap = new HashMap<String,Object>();
// paramMap.put("line",line);
// paramMap.put("hserial",hserial);
// try {
// String result = HttpHelper.postParam(url,paramMap);
// log.debug("从Qisda检查工单料架是否解绑["+line+"](GetSerialData)返回:" + result);
// if(result.contains("VehicleID")){
// return result;
// }
//
// if(result.toLowerCase().contains("wait")){
// return result;
// }
// return "";
// } catch (Exception e) {
// log.error("从Qisda检查工单料架是否解绑"+hserial+"["+line+"])接口(GetSerialData)出错",e);
// return "检查出错:" + e.getMessage();
// }
}
/**
...
...
@@ -740,20 +740,20 @@ public class QisdaApi {
* @return
*/
public
static
String
UpdateBatchRefillMark
(
String
soseq
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
""
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/UpdateBatchRefillMark"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"soseq"
,
soseq
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"更新Qisda工单序号["
+
soseq
+
"]的最后一个需求单状态为非最后一个需求单(UpdateBatchRefillMark)返回:"
+
result
);
// if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
// log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return
""
;
}
catch
(
Exception
e
)
{
log
.
error
(
"更新Qisda工单序号["
+
soseq
+
"]的最后一个需求单状态为非最后一个需求单(UpdateBatchRefillMark)出错"
,
e
);
return
"工单序号最后一个需求单状态更新出错:"
+
e
.
getMessage
();
}
// }
// String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/UpdateBatchRefillMark";
// Map<String,Object> paramMap = new HashMap<String,Object>();
// paramMap.put("soseq",soseq);
// try {
// String result = HttpHelper.postParam(url,paramMap);
// log.info("更新Qisda工单序号["+soseq+"]的最后一个需求单状态为非最后一个需求单(UpdateBatchRefillMark)返回:" + result);
// return "";
// } catch (Exception e) {
// log.error("更新Qisda工单序号["+soseq+"]的最后一个需求单状态为非最后一个需求单(UpdateBatchRefillMark)出错",e);
// return "工单序号最后一个需求单状态更新出错:" + e.getMessage();
// }
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论