|
@@ -88,19 +88,19 @@ public class OpenApi {
|
|
String text = "船名: 船名" + "\n" +
|
|
String text = "船名: 船名" + "\n" +
|
|
"船次:123456 " + " \n" +
|
|
"船次:123456 " + " \n" +
|
|
"仓单号:123456 " + " \n" +
|
|
"仓单号:123456 " + " \n" +
|
|
- "货名: 广西公司由西安肌肤" + " \n" +
|
|
|
|
|
|
+ "货名: 广西公司由西安肌肤" + " \n" +
|
|
"货主单位: 船名的或者大胆" + "\n" +
|
|
"货主单位: 船名的或者大胆" + "\n" +
|
|
- "车号: 桂A025623" + "\n" +
|
|
|
|
|
|
+ "车号: 桂A025623" + "\n" +
|
|
"一次过磅时间: 23" + "\n" +
|
|
"一次过磅时间: 23" + "\n" +
|
|
- "毛重: 434" + "吨\n" +
|
|
|
|
- "二次过磅时间:22222 " + "\n" +
|
|
|
|
|
|
+ "毛重: 434" + "吨\n" +
|
|
|
|
+ "二次过磅时间:22222 " + "\n" +
|
|
"皮重: 3534" + "吨\n" +
|
|
"皮重: 3534" + "吨\n" +
|
|
"净重: 3232" + "吨\n" +
|
|
"净重: 3232" + "吨\n" +
|
|
- "件数/重量/体积: 54/48/65" + "\n" +
|
|
|
|
|
|
+ "件数/重量/体积: 54/48/65" + "\n" +
|
|
"地点: 地点" + "\n" +
|
|
"地点: 地点" + "\n" +
|
|
- "备注: 你好" ;
|
|
|
|
|
|
+ "备注: 你好";
|
|
String imageResourcePath = "/chapter/qzChapter.jpg";
|
|
String imageResourcePath = "/chapter/qzChapter.jpg";
|
|
- ThreadUtil.execute(new PrintWithChapter(imageResourcePath,text));
|
|
|
|
|
|
+ ThreadUtil.execute(new PrintWithChapter(imageResourcePath, text));
|
|
return "ok";
|
|
return "ok";
|
|
}
|
|
}
|
|
|
|
|
|
@@ -110,9 +110,9 @@ public class OpenApi {
|
|
// http://10.26.1.26/DE3/2025/4/27/桂E31655-2504270636.jpg
|
|
// http://10.26.1.26/DE3/2025/4/27/桂E31655-2504270636.jpg
|
|
String rootPath = SysConfig.channelSetting.getFileRootPath();
|
|
String rootPath = SysConfig.channelSetting.getFileRootPath();
|
|
String serverUrl = "http://" + SysConfig.channelSetting.getIp();
|
|
String serverUrl = "http://" + SysConfig.channelSetting.getIp();
|
|
- String sourcePort= SysConfig.channelSetting.getSourcePort();
|
|
|
|
- if (StrUtil.isNotEmpty(sourcePort)){
|
|
|
|
- serverUrl=serverUrl+":"+sourcePort;
|
|
|
|
|
|
+ String sourcePort = SysConfig.channelSetting.getSourcePort();
|
|
|
|
+ if (StrUtil.isNotEmpty(sourcePort)) {
|
|
|
|
+ serverUrl = serverUrl + ":" + sourcePort;
|
|
}
|
|
}
|
|
String separator = File.separator;
|
|
String separator = File.separator;
|
|
String fileName = StrUtil.replace(url, serverUrl, rootPath).replace("/", separator);
|
|
String fileName = StrUtil.replace(url, serverUrl, rootPath).replace("/", separator);
|
|
@@ -145,10 +145,11 @@ public class OpenApi {
|
|
eventBus.startEvent(event);
|
|
eventBus.startEvent(event);
|
|
return AjaxJson.getSuccess();
|
|
return AjaxJson.getSuccess();
|
|
}
|
|
}
|
|
|
|
+
|
|
@RequestMapping("say")
|
|
@RequestMapping("say")
|
|
public AjaxJson say(String msg) {
|
|
public AjaxJson say(String msg) {
|
|
- SystemObject.voiceFactory.handler(SysConfig.voiceSetting.getBrand()).weekUp();
|
|
|
|
- SystemObject.voiceFactory.handler(SysConfig.voiceSetting.getBrand()).sendMsgSpeek(msg);
|
|
|
|
|
|
+ SystemObject.voiceFactory.handler(SysConfig.voiceSetting.getBrand()).weekUp();
|
|
|
|
+ SystemObject.voiceFactory.handler(SysConfig.voiceSetting.getBrand()).sendMsgSpeek(msg);
|
|
return AjaxJson.getSuccess();
|
|
return AjaxJson.getSuccess();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -209,7 +210,7 @@ public class OpenApi {
|
|
public AjaxJson getCurrentCarImg() {
|
|
public AjaxJson getCurrentCarImg() {
|
|
ReqBO reqBO = EventDataManager.getCacheData();
|
|
ReqBO reqBO = EventDataManager.getCacheData();
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
- result.set("carNo", reqBO.getCarNo()).set("carImg", reqBO.getCarImg());
|
|
|
|
|
|
+ result.set("carNo", reqBO.getCarNo()).set("carImg", reqBO.getCarImg()).set("recordId", reqBO.getId());
|
|
return AjaxJson.getSuccess("成功", result);
|
|
return AjaxJson.getSuccess("成功", result);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -257,7 +258,7 @@ public class OpenApi {
|
|
|
|
|
|
@RequestMapping("channel/sleep")
|
|
@RequestMapping("channel/sleep")
|
|
public AjaxJson sleep(String carNo) {
|
|
public AjaxJson sleep(String carNo) {
|
|
- if (StrUtil.isEmpty(carNo)){
|
|
|
|
|
|
+ if (StrUtil.isEmpty(carNo)) {
|
|
return AjaxJson.getSuccess();
|
|
return AjaxJson.getSuccess();
|
|
}
|
|
}
|
|
//log.error("双向通道,下磅休眠5秒=======");
|
|
//log.error("双向通道,下磅休眠5秒=======");
|
|
@@ -300,7 +301,7 @@ public class OpenApi {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("channel/led")
|
|
@RequestMapping("channel/led")
|
|
- public AjaxJson led(String msg, String line) {
|
|
|
|
|
|
+ public AjaxJson led(String msg, String line,String type) {
|
|
LedOptions options = new LedOptions().setLine("0" + line).setShowType("00");
|
|
LedOptions options = new LedOptions().setLine("0" + line).setShowType("00");
|
|
SystemObject.ledFactory.handler(SysConfig.serialSetting.getLed().getBrand())
|
|
SystemObject.ledFactory.handler(SysConfig.serialSetting.getLed().getBrand())
|
|
.sendMsg(msg, options);
|
|
.sendMsg(msg, options);
|
|
@@ -324,7 +325,7 @@ public class OpenApi {
|
|
});
|
|
});
|
|
DeviceCache.setInterrupt(false);
|
|
DeviceCache.setInterrupt(false);
|
|
SubmitCache.cleanCache();
|
|
SubmitCache.cleanCache();
|
|
- if (SysConfig.channelSetting.getChannelType()==1) {
|
|
|
|
|
|
+ if (SysConfig.channelSetting.getChannelType() == 1) {
|
|
//行政通道
|
|
//行政通道
|
|
eventBus.startEvent(ModuleEnum.CAPTURE_MODULE.getModuleEn() + "." + CaptureEvent.CAPTURE_ADMIN);
|
|
eventBus.startEvent(ModuleEnum.CAPTURE_MODULE.getModuleEn() + "." + CaptureEvent.CAPTURE_ADMIN);
|
|
return AjaxJson.getSuccess();
|
|
return AjaxJson.getSuccess();
|