Commit 1e2c16a0 zshaohui

1.fuji功能提交

1 个父辈 0476a7b7
...@@ -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.getFullCode()); params.put("partBarcode",barcode.getBarcode());
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);
......
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\\remoteorder\\notify\\"; public static final String NOTIFY = "D:\\Remoteorder\\notify\\";
} }
...@@ -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);
} }
},60, 10, TimeUnit.SECONDS); },10, 10, TimeUnit.SECONDS);
} }
} }
......
...@@ -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!