Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1e2c16a0
由
zshaohui
编写于
2024-10-11 14:23:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.fuji功能提交
1 个父辈
0476a7b7
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
10 行增加
和
8 行删除
src/main/java/com/neotel/smfcore/custom/fuji/FujiApi.java
src/main/java/com/neotel/smfcore/custom/fuji/config/FileDirectoryConfig.java
src/main/java/com/neotel/smfcore/custom/fuji/order/OrderHandler.java
src/main/java/com/neotel/smfcore/custom/fuji/util/NotifyUtil.java
src/main/java/com/neotel/smfcore/custom/fuji/FujiApi.java
查看文件 @
1e2c16a
...
@@ -61,9 +61,9 @@ public class FujiApi extends BaseSmfApiListener {
...
@@ -61,9 +61,9 @@ public class FujiApi extends BaseSmfApiListener {
@Override
@Override
public
void
outTaskStatusChange
(
String
outNotifyUrl
,
DataLog
task
)
{
public
void
outTaskStatusChange
(
String
outNotifyUrl
,
DataLog
task
)
{
if
(
task
.
isFinished
())
{
if
(
task
.
isFinished
())
{
NotifyUtil
.
createLoadEtn
(
task
.
getBarcode
(),
task
.
getPosName
(),
task
.
getNum
(),
""
,
task
.
getW
(),
task
.
getH
(),
task
.
getPartNumber
(),
task
.
getStorageName
(),
FileDirectoryConfig
.
NOTIFY
);
//
NotifyUtil.createLoadEtn(task.getBarcode(),task.getPosName(),task.getNum(),"",task.getW(),task.getH(),task.getPartNumber(),task.getStorageName(),FileDirectoryConfig.NOTIFY);
NotifyUtil
.
createProvideEtn
(
task
.
getBarcode
(),
task
.
getPosName
(),
task
.
getNum
(),
""
,
task
.
getW
(),
task
.
getH
(),
task
.
getPartNumber
(),
task
.
getSourceName
(),
task
.
getLine
(),
task
.
getStorageName
(),
FileDirectoryConfig
.
NOTIFY
);
NotifyUtil
.
createProvideEtn
(
task
.
getBarcode
(),
task
.
getPosName
(),
task
.
getNum
(),
""
,
task
.
getW
(),
task
.
getH
(),
task
.
getPartNumber
(),
task
.
getSourceName
(),
task
.
getLine
(),
task
.
getStorageName
(),
FileDirectoryConfig
.
NOTIFY
);
NotifyUtil
.
createDeleteEtn
(
task
.
getBarcode
(),
task
.
getW
(),
task
.
getH
(),
task
.
getPartNumber
(),
FileDirectoryConfig
.
NOTIFY
);
//
NotifyUtil.createDeleteEtn(task.getBarcode(),task.getW(),task.getH(),task.getPartNumber(),FileDirectoryConfig.NOTIFY);
}
}
}
}
...
@@ -74,7 +74,7 @@ public class FujiApi extends BaseSmfApiListener {
...
@@ -74,7 +74,7 @@ public class FujiApi extends BaseSmfApiListener {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"did"
,
barcode
.
getBarcode
());
params
.
put
(
"did"
,
barcode
.
getBarcode
());
params
.
put
(
"partBarcode"
,
barcode
.
get
FullC
ode
());
params
.
put
(
"partBarcode"
,
barcode
.
get
Barc
ode
());
params
.
put
(
"quantity"
,
barcode
.
getAmount
());
params
.
put
(
"quantity"
,
barcode
.
getAmount
());
params
.
put
(
"packageType"
,
"paper"
);
//默认是paper,
params
.
put
(
"packageType"
,
"paper"
);
//默认是paper,
params
.
put
(
"partsoutWarning"
,
0
);
params
.
put
(
"partsoutWarning"
,
0
);
...
...
src/main/java/com/neotel/smfcore/custom/fuji/config/FileDirectoryConfig.java
查看文件 @
1e2c16a
package
com
.
neotel
.
smfcore
.
custom
.
fuji
.
config
;
package
com
.
neotel
.
smfcore
.
custom
.
fuji
.
config
;
public
class
FileDirectoryConfig
{
public
class
FileDirectoryConfig
{
public
static
final
String
NOTIFY
=
"
\\\\175.41.238.212\\r
emoteorder\\notify\\"
;
public
static
final
String
NOTIFY
=
"
D:\\R
emoteorder\\notify\\"
;
}
}
src/main/java/com/neotel/smfcore/custom/fuji/order/OrderHandler.java
查看文件 @
1e2c16a
...
@@ -61,14 +61,14 @@ public class OrderHandler {
...
@@ -61,14 +61,14 @@ public class OrderHandler {
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
if
(
"
nexim
"
.
equals
(
smfApi
.
getApiName
())){
if
(
"
fuji
"
.
equals
(
smfApi
.
getApiName
())){
scheduledThreadPool
.
scheduleAtFixedRate
(()
->
{
scheduledThreadPool
.
scheduleAtFixedRate
(()
->
{
try
{
try
{
handler
();
handler
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"执行fuji工单失败:"
,
e
);
log
.
info
(
"执行fuji工单失败:"
,
e
);
}
}
},
6
0
,
10
,
TimeUnit
.
SECONDS
);
},
1
0
,
10
,
TimeUnit
.
SECONDS
);
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/custom/fuji/util/NotifyUtil.java
查看文件 @
1e2c16a
...
@@ -28,7 +28,8 @@ public class NotifyUtil {
...
@@ -28,7 +28,8 @@ public class NotifyUtil {
String
localFilePath
=
""
;
String
localFilePath
=
""
;
try
{
try
{
//CARRIER_1608R-00002_LOAD_20240524_15_00_02.ETN
//CARRIER_1608R-00002_LOAD_20240524_15_00_02.ETN
localFilePath
=
path
+
"CARRIER_"
+
barcode
+
"_LOAD_"
+
new
SimpleDateFormat
(
"yyyyMMdd_HH_mm_ss"
).
format
(
new
Date
())
+
".ETN"
;
//localFilePath = path + "CARRIER_" + barcode + "_LOAD_" + new SimpleDateFormat("yyyyMMdd_HH_mm_ss").format(new Date()) + ".ETN";
localFilePath
=
path
+
barcode
+
"_LOAD"
+
".ETN"
;
log
.
info
(
"本地文件路径为:"
+
localFilePath
);
log
.
info
(
"本地文件路径为:"
+
localFilePath
);
//log.info("内容为:" + JSON.toJSONString(notify));
//log.info("内容为:" + JSON.toJSONString(notify));
...
@@ -93,7 +94,8 @@ public class NotifyUtil {
...
@@ -93,7 +94,8 @@ public class NotifyUtil {
String
localFilePath
=
""
;
String
localFilePath
=
""
;
try
{
try
{
//CARRIER_1608R-00002_LOAD_20240524_15_00_02.ETN
//CARRIER_1608R-00002_LOAD_20240524_15_00_02.ETN
localFilePath
=
path
+
"CARRIER_"
+
barcode
+
"_PROVIDE_"
+
new
SimpleDateFormat
(
"yyyyMMdd_HH_mm_ss"
).
format
(
new
Date
())
+
".ETN"
;
//localFilePath = path + "CARRIER_" + barcode + "_PROVIDE_" + new SimpleDateFormat("yyyyMMdd_HH_mm_ss").format(new Date()) + ".ETN";
localFilePath
=
path
+
barcode
+
"_PROVIDE"
+
".ETN"
;
log
.
info
(
"本地文件路径为:"
+
localFilePath
);
log
.
info
(
"本地文件路径为:"
+
localFilePath
);
//log.info("内容为:" + JSON.toJSONString(notify));
//log.info("内容为:" + JSON.toJSONString(notify));
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论