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;
}