Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 59f31eb2
由
hc
编写于
2024-06-24 16:17:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
NG料出库
1 个父辈
3ce699ec
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
100 行增加
和
0 行删除
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
src/main/java/com/neotel/smfcore/custom/luxsan/api/bean/request/GetBoxNGsnListRequest.java
src/main/java/com/neotel/smfcore/custom/luxsan/api/bean/result/GetBoxNGResult.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/LineController.java
src/main/resources/config/application-21088prod.yml
src/main/resources/config/application-21088test.yml
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
查看文件 @
59f31eb
...
...
@@ -1010,6 +1010,36 @@ public class LuxsanApi extends DefaultSmfApiListener {
}
}
public
static
List
<
GetBoxNGResult
>
getBoxNGsnList
(
GetBoxNGsnListRequest
request
)
{
try
{
log
.
info
(
"getBoxNGsnList接口请求参数为:"
+
JSON
.
toJSONString
(
request
));
String
resultStr
=
HttpHelper
.
postJson
(
getBoxNGsnListUrl
,
request
);
log
.
info
(
"getBoxNGsnList接口返回结果为:"
+
resultStr
);
JSONObject
resultJson
=
JsonUtil
.
toObj
(
resultStr
,
JSONObject
.
class
);
if
(
resultJson
!=
null
)
{
if
(
resultJson
.
getString
(
"data"
)
!=
null
)
{
JSONObject
dataJson
=
resultJson
.
getJSONObject
(
"data"
);
if
(
dataJson
.
get
(
"result"
)
!=
null
&&
!
dataJson
.
getBoolean
(
"result"
))
{
String
errorMessage
=
(
String
)
dataJson
.
get
(
"message"
);
if
(
StringUtils
.
isEmpty
(
errorMessage
))
{
errorMessage
=
""
;
}
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}],失败原因[{1}]"
,
new
String
[]{
getBoxNGsnListUrl
,
errorMessage
});
}
else
{
List
<
GetBoxNGResult
>
resultList
=
JSONObject
.
parseArray
(
dataJson
.
getString
(
"data"
),
GetBoxNGResult
.
class
);
if
(
resultList
!=
null
&&
!
resultList
.
isEmpty
())
{
return
resultList
;
}
}
}
}
}
catch
(
ApiException
e
)
{
log
.
error
(
"getBoxNGsnList接口请求失败:"
+
e
.
getMessage
());
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
e
.
getMessage
()});
}
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
"getBoxNGsnListUrl"
});
}
@Override
public
void
outTaskStatusChange
(
String
outNotifyUrl
,
DataLog
task
)
{
...
...
@@ -1291,4 +1321,10 @@ public class LuxsanApi extends DefaultSmfApiListener {
public
void
setTicketUpUrl
(
String
url
){
LuxsanApi
.
ticketUpUrl
=
url
;
}
public
static
String
getBoxNGsnListUrl
;
@Value
(
"${api.getBoxNGsnListUrl}"
)
public
void
setBoxNGsnListUrl
(
String
url
){
LuxsanApi
.
getBoxNGsnListUrl
=
url
;
}
}
src/main/java/com/neotel/smfcore/custom/luxsan/api/bean/request/GetBoxNGsnListRequest.java
0 → 100644
查看文件 @
59f31eb
package
com
.
neotel
.
smfcore
.
custom
.
luxsan
.
api
.
bean
.
request
;
import
lombok.Data
;
/**
* 获取料箱ngsn列表
*/
@Data
public
class
GetBoxNGsnListRequest
{
/**
* 机种
*/
private
String
model
;
/**
* 料箱号
*/
private
String
carton_id
;
}
src/main/java/com/neotel/smfcore/custom/luxsan/api/bean/result/GetBoxNGResult.java
0 → 100644
查看文件 @
59f31eb
package
com
.
neotel
.
smfcore
.
custom
.
luxsan
.
api
.
bean
.
result
;
import
lombok.Data
;
/**
* 获取料箱的NG列表
*/
@Data
public
class
GetBoxNGResult
{
/**
* sn号
*/
private
String
SN
;
/**
* ng的原因
*/
private
String
NGREASON
;
/**
* 行号
*/
private
Integer
ROW
;
/**
* 列号
*/
private
Integer
COLUMN
;
}
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/LineController.java
查看文件 @
59f31eb
...
...
@@ -24,9 +24,11 @@ import com.neotel.smfcore.core.system.service.po.DataLog;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.custom.luxsan.api.LuxsanApi
;
import
com.neotel.smfcore.custom.luxsan.api.bean.request.FetchPalletInfoRequest
;
import
com.neotel.smfcore.custom.luxsan.api.bean.request.GetBoxNGsnListRequest
;
import
com.neotel.smfcore.custom.luxsan.api.bean.request.PalletUpdateRequest
;
import
com.neotel.smfcore.custom.luxsan.api.bean.request.ValidCartonRequest
;
import
com.neotel.smfcore.custom.luxsan.api.bean.result.FetchPalletInfoResult
;
import
com.neotel.smfcore.custom.luxsan.api.bean.result.GetBoxNGResult
;
import
com.neotel.smfcore.custom.luxsan.api.bean.result.ValidCartonResult
;
import
com.neotel.smfcore.custom.luxsan.api.enums.PalletEnum
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil
;
...
...
@@ -332,6 +334,15 @@ public class LineController {
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
"手动绑定料箱和cartonId"
)
@RequestMapping
(
"/getBoxNGsnList"
)
@AnonymousAccess
public
ResultBean
getBoxNGsnList
(
@RequestBody
GetBoxNGsnListRequest
result
){
log
.
info
(
"机种["
+
result
.
getModel
()+
"]和CartonId:"
+
result
.
getCarton_id
());
List
<
GetBoxNGResult
>
boxNGsnList
=
LuxsanApi
.
getBoxNGsnList
(
result
);
return
ResultBean
.
newOkResult
(
boxNGsnList
);
}
@ApiOperation
(
"手动完成入库任务"
)
@RequestMapping
(
"/finishedInTask"
)
@AnonymousAccess
...
...
src/main/resources/config/application-21088prod.yml
查看文件 @
59f31eb
...
...
@@ -164,3 +164,6 @@ api:
#自动仓内单据转库
ticketMove
:
http://10.42.220.171:8082/api/mlb/TicketMove
#获取箱内NGSN列表
getBoxNGsnListUrl
:
http://10.68.25.30:8000/mesoffline/GetBoxNgSnList
src/main/resources/config/application-21088test.yml
查看文件 @
59f31eb
...
...
@@ -164,3 +164,6 @@ api:
#自动仓内单据转库
ticketMove
:
http://10.42.220.171:8082/api/mlb/TicketMove
#获取箱内NGSN列表
getBoxNGsnListUrl
:
http://10.68.25.30:8000/mesoffline/GetBoxNgSnList
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论