fix:日志配置,回传MES改成同步

This commit is contained in:
zhangzq
2025-04-11 14:38:23 +08:00
parent e588a32472
commit 636e347177
5 changed files with 15 additions and 21 deletions

View File

@@ -47,7 +47,6 @@ public class BstIvtPackageinfoivtController {
*/
@GetMapping
@SaIgnore
@Log("查询点位库存")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
return new ResponseEntity<>(TableDataInfo.build(bstIvtPackageinfoivtService.queryAll(whereJson, page)), HttpStatus.OK);
}

View File

@@ -298,21 +298,14 @@ public class InBussManageServiceImpl implements InBussManageService {
tableData.add(jsonDtl);
}
String package_box_sn = (String) tableData.get(0).get("package_box_sn");
CompletableFuture.runAsync(() -> {
try {
String isConnect2 = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_CONNECT_MES2").getValue();
if ("1".equals(isConnect2)) {
JSONObject param_jo = new JSONObject();
param_jo.put("box_no", package_box_sn);
param_jo.put("box_weight", subList.get(0).getString("box_weight"));
lmsToMesServiceImpl.BoxDataCollectionSubmit2(param_jo);
}
} catch (Exception e) {
log.error("验箱回传MES异常BoxDataCollectionSubmit2给MES传输子卷包装关系异常,木箱号为:" + package_box_sn + ",异常信息:" + e);
}
}, pool);
try {
JSONObject param_jo = new JSONObject();
param_jo.put("box_no", package_box_sn);
param_jo.put("box_weight", subList.get(0).getString("box_weight"));
lmsToMesServiceImpl.BoxDataCollectionSubmit2(param_jo);
} catch (Exception e) {
log.error("验箱回传MES异常BoxDataCollectionSubmit2给MES传输子卷包装关系异常,木箱号为:" + package_box_sn + ",异常信息:" + e);
}
mst.put("tableData", tableData);
// 判断是否已经生成过入库单
JSONObject param = new JSONObject();

View File

@@ -1044,10 +1044,10 @@ public class LmsToMesServiceImpl implements LmsToMesService {
String RTYPE = result.getString("RTYPE");
if ("E".equals(RTYPE)) {
throw new BadRequestException(result.getString("RTMSG"));
throw new BadRequestException("MES提示错误" +result.getString("RTMSG"));
}
} catch (Exception e) {
throw new BadRequestException("MES提示错误:" + e.getMessage());
throw new BadRequestException("MES错误" + e.getMessage());
}
return result;
}

View File

@@ -6,7 +6,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
data:

View File

@@ -58,7 +58,7 @@ https://juejin.cn/post/6844903775631572999
<!--异步到文件-->
<appender name="asyncFileAppender" class="com.yomahub.tlog.core.enhance.logback.async.AspectLogbackAsyncAppender">
<discardingThreshold>0</discardingThreshold>
<queueSize>500</queueSize>
<queueSize>2000</queueSize>
<appender-ref ref="FILE"/>
</appender>
@@ -92,7 +92,8 @@ https://juejin.cn/post/6844903775631572999
</appender>
<appender name="asyncLuceneAppender" class="org.nl.config.lucene.AsyncLuceneAppender">
<appender-ref ref="luceneAppender" />
<queueSize>512</queueSize>
<discardingThreshold>0</discardingThreshold>
<queueSize>3000</queueSize>
</appender>
<!--开发环境:打印控制台-->
@@ -134,6 +135,7 @@ https://juejin.cn/post/6844903775631572999
<root level="info">
<appender-ref ref="asyncFileAppender"/>
<appender-ref ref="asyncLuceneAppender"/>
<appender-ref ref="CONSOLE"/>
</root>
<logger name="jdbc" level="ERROR" additivity="true">
<appender-ref ref="asyncFileAppender"/>