refactor(log): 统一API日志记录实现并优化MES服务日志
- 在MES服务中统一使用OutboundApiLogger进行API - 为所有MES接口方法添加开始时间戳用于性能监控 - 标准化所有API接口的日志记录格式和异常处理机制
This commit is contained in:
@@ -23,7 +23,6 @@ public class CrmToLmsController {
|
|||||||
private final CrmToLmsService crmToLmsService;
|
private final CrmToLmsService crmToLmsService;
|
||||||
|
|
||||||
@PostMapping("/getCustomerInfo")
|
@PostMapping("/getCustomerInfo")
|
||||||
// @Log("CRM给LMS推送客户信息")
|
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/crm/getCustomerInfo",
|
bizCode = "/crm/getCustomerInfo",
|
||||||
bizDesc = "CRM给LMS推送客户信息",
|
bizDesc = "CRM给LMS推送客户信息",
|
||||||
@@ -35,7 +34,6 @@ public class CrmToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getCPIvtInfo")
|
@PostMapping("/getCPIvtInfo")
|
||||||
// @Log("CRM获取LMS成品库存信息")
|
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/crm/getCPIvtInfo",
|
bizCode = "/crm/getCPIvtInfo",
|
||||||
bizDesc = "CRM获取LMS成品库存信息",
|
bizDesc = "CRM获取LMS成品库存信息",
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ public class MesToLmsController {
|
|||||||
private final MesToLmsService mesToLmsService;
|
private final MesToLmsService mesToLmsService;
|
||||||
|
|
||||||
@PostMapping("/momRollFoilStart")
|
@PostMapping("/momRollFoilStart")
|
||||||
// @Log("母卷批次创建信息发送智能物流(MES生箔工序Move In)")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/momRollFoilStart",
|
bizCode = "/mes/momRollFoilStart",
|
||||||
@@ -36,7 +35,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("momRollFoilWeighing")
|
@PostMapping("momRollFoilWeighing")
|
||||||
// @Log("MES获取AGV称重信息")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/momRollFoilWeighing",
|
bizCode = "/mes/momRollFoilWeighing",
|
||||||
@@ -48,7 +46,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/momRollFoilComplete")
|
@PostMapping("/momRollFoilComplete")
|
||||||
// @Log("MES执行下卷动作告诉LMS")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/momRollFoilComplete",
|
bizCode = "/mes/momRollFoilComplete",
|
||||||
@@ -60,7 +57,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/momRollBakeNextSpecTransfer")
|
@PostMapping("/momRollBakeNextSpecTransfer")
|
||||||
// @Log("MES下达烘箱温度和时间配方给智能物流(MES 包装防护工序Move Out)")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/momRollBakeNextSpecTransfer",
|
bizCode = "/mes/momRollBakeNextSpecTransfer",
|
||||||
@@ -72,7 +68,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/cutPlanTransfer")
|
@PostMapping("/cutPlanTransfer")
|
||||||
// @Log("分切包装段:分切计划(单表,包含母卷/改制子卷-包装箱号、空包装箱物料、纸筒/FRP管)MES下发智能物流")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/cutPlanTransfer",
|
bizCode = "/mes/cutPlanTransfer",
|
||||||
@@ -84,7 +79,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/callNextAssAndMomRoll")
|
@PostMapping("/callNextAssAndMomRoll")
|
||||||
// @Log("分切即将完成,呼叫配送下一个母卷/改制子卷,MES传智能物流")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/callNextAssAndMomRoll",
|
bizCode = "/mes/callNextAssAndMomRoll",
|
||||||
@@ -96,7 +90,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/childRollCutStartComp")
|
@PostMapping("/childRollCutStartComp")
|
||||||
// @Log("当母卷开始分切时,MES系统会将对应的子卷进站信息发送给只能物流系统,一方面物流系统可以预估下个母卷的送达时间,也可以闭环期分切计划指令")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/childRollCutStartComp",
|
bizCode = "/mes/childRollCutStartComp",
|
||||||
@@ -108,7 +101,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/childRollPackComplete")
|
@PostMapping("/childRollPackComplete")
|
||||||
// @Log("包装完成,传智能物流包装箱与子卷关系及子卷属性值,LMS执行入库")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/childRollPackComplete",
|
bizCode = "/mes/childRollPackComplete",
|
||||||
@@ -120,7 +112,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/inventoryTransferInfoSync")
|
@PostMapping("/inventoryTransferInfoSync")
|
||||||
// @Log("转单指令在MES平台查看后,更新信息,发送LMS(是否拆包、更新后的入库日期、是否更换外包装箱标签),LMS重打子卷标签、包装箱外标签")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/inventoryTransferInfoSync",
|
bizCode = "/mes/inventoryTransferInfoSync",
|
||||||
@@ -132,7 +123,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/childRollInfoUpdate")
|
@PostMapping("/childRollInfoUpdate")
|
||||||
// @Log("子卷信息更新:计划外需求有可能入库完成后,ERP才回传计划外需求SalesOrder")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/childRollInfoUpdate",
|
bizCode = "/mes/childRollInfoUpdate",
|
||||||
@@ -144,7 +134,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/cutPlanTransferCancel")
|
@PostMapping("/cutPlanTransferCancel")
|
||||||
// @Log("分切计划取消")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/cutPlanTransferCancel",
|
bizCode = "/mes/cutPlanTransferCancel",
|
||||||
@@ -156,7 +145,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/sendAuditResult")
|
@PostMapping("/sendAuditResult")
|
||||||
// @Log("子卷报废审批结果回传")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/sendAuditResult",
|
bizCode = "/mes/sendAuditResult",
|
||||||
@@ -168,7 +156,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/sendProcessInfo")
|
@PostMapping("/sendProcessInfo")
|
||||||
// @Log("表处母卷上料、下料接口")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/sendProcessInfo",
|
bizCode = "/mes/sendProcessInfo",
|
||||||
@@ -180,7 +167,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/momRollTRStartMock")
|
@PostMapping("/momRollTRStartMock")
|
||||||
// @Log("表处工单推送")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/momRollTRStartMock",
|
bizCode = "/mes/momRollTRStartMock",
|
||||||
@@ -193,7 +179,6 @@ public class MesToLmsController {
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping("/sendTargetHouse")
|
@PostMapping("/sendTargetHouse")
|
||||||
// @Log("MES传递给LMS入线边库或者入成品库")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/sendTargetHouse",
|
bizCode = "/mes/sendTargetHouse",
|
||||||
@@ -205,7 +190,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/momSendSplitMfgOrderBOM")
|
@PostMapping("/momSendSplitMfgOrderBOM")
|
||||||
// @Log("MES传递LMS订单BOM")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/momSendSplitMfgOrderBOM",
|
bizCode = "/mes/momSendSplitMfgOrderBOM",
|
||||||
@@ -217,7 +201,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getRollInfo")
|
@PostMapping("/getRollInfo")
|
||||||
// @Log("MES传递LMS获取子卷重量信息")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/getRollInfo",
|
bizCode = "/mes/getRollInfo",
|
||||||
@@ -229,7 +212,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/sendLevelInfo")
|
@PostMapping("/sendLevelInfo")
|
||||||
// @Log("MES传递LMS定级数据")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/sendLevelInfo",
|
bizCode = "/mes/sendLevelInfo",
|
||||||
@@ -241,7 +223,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/containerNeedDown")
|
@PostMapping("/containerNeedDown")
|
||||||
// @Log("子卷拼接完成是否下轴")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/containerNeedDown",
|
bizCode = "/mes/containerNeedDown",
|
||||||
@@ -253,7 +234,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/sendSubInfo")
|
@PostMapping("/sendSubInfo")
|
||||||
// @Log("子卷下料信息MES传递给LMS")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/sendSubInfo",
|
bizCode = "/mes/sendSubInfo",
|
||||||
@@ -265,7 +245,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/changeSect")
|
@PostMapping("/changeSect")
|
||||||
// @Log("MES传递给LMS入线边库或者入成品库、撤销入线边库、人工改变入线边还是包装")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/changeSect",
|
bizCode = "/mes/changeSect",
|
||||||
@@ -277,7 +256,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getWasteFoilWeight")
|
@PostMapping("/getWasteFoilWeight")
|
||||||
// @Log("分切子卷获取LMS,AGV废箔称重重量")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/getWasteFoilWeight",
|
bizCode = "/mes/getWasteFoilWeight",
|
||||||
@@ -289,7 +267,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/WasteFoilSuccess")
|
@PostMapping("/WasteFoilSuccess")
|
||||||
// @Log("分切子卷获取LMS,AGV废箔称重重量")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/WasteFoilSuccess",
|
bizCode = "/mes/WasteFoilSuccess",
|
||||||
@@ -301,7 +278,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/boxIsPass")
|
@PostMapping("/boxIsPass")
|
||||||
// @Log("飞书通知LMS木箱是否通过")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/boxIsPass",
|
bizCode = "/mes/boxIsPass",
|
||||||
@@ -313,7 +289,6 @@ public class MesToLmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/changeBomInfo")
|
@PostMapping("/changeBomInfo")
|
||||||
// @Log("MES更新LMS分切工单、订单BOM信息")
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@ApiLog(
|
@ApiLog(
|
||||||
bizCode = "/mes/changeBomInfo",
|
bizCode = "/mes/changeBomInfo",
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject momRollFoilWeighing(JSONObject param) {
|
public JSONObject momRollFoilWeighing(JSONObject param) {
|
||||||
log.info("momRollFoilWeighing接口输入参数为:-------------------" + param);
|
log.info("momRollFoilWeighing接口输入参数为:-------------------" + param);
|
||||||
long startTime = System.currentTimeMillis();
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
if (StrUtil.equals("0", is_connect_mes)) {
|
if (StrUtil.equals("0", is_connect_mes)) {
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
@@ -71,7 +71,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String UserName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
String UserName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||||
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||||
|
|
||||||
@@ -97,13 +97,13 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 记录失败日志
|
// 记录失败日志
|
||||||
OutboundApiLogger.logFail("mes", "/sap/center/lms/004", "LMS的PDA操作AGV下卷,AGV称重完成后AGV称重信息发送MES",
|
OutboundApiLogger.logFail("mes", "/CamstarApi/momRollFoilWeighing", "LMS的PDA操作AGV下卷,AGV称重完成后AGV称重信息发送MES",
|
||||||
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
System.currentTimeMillis() - startTime);
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
// 记录成功日志
|
// 记录成功日志
|
||||||
OutboundApiLogger.logSuccess("sap", "/sap/center/lms/004", "LMS的PDA操作AGV下卷,AGV称重完成后AGV称重信息发送MES",
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/momRollFoilWeighing", "LMS的PDA操作AGV下卷,AGV称重完成后AGV称重信息发送MES",
|
||||||
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
System.currentTimeMillis() - startTime);
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
@@ -211,7 +211,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
String UserName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
String UserName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||||
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||||
@@ -255,7 +254,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject momRollSemiFGInboundComplete(JSONObject param) {
|
public JSONObject momRollSemiFGInboundComplete(JSONObject param) {
|
||||||
log.info("momRollSemiFGInboundComplete接口输入参数为:-------------------" + param.toString());
|
log.info("momRollSemiFGInboundComplete接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
if (StrUtil.equals("0", is_connect_mes)) {
|
if (StrUtil.equals("0", is_connect_mes)) {
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
@@ -263,7 +261,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
JSONArray list = new JSONArray();
|
JSONArray list = new JSONArray();
|
||||||
|
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||||
@@ -285,8 +283,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/MomRollSemiFGInboundComplete", "AGV将母卷从烘箱暂存位转移至暂存区,传MES",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
log.info("MES提示错误:" + e.getMessage());
|
log.info("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/MomRollSemiFGInboundComplete", "AGV将母卷从烘箱暂存位转移至暂存区,传MES",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +305,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject airSwellWithPaperTubeAssComplete(JSONObject param) {
|
public JSONObject airSwellWithPaperTubeAssComplete(JSONObject param) {
|
||||||
log.info("airSwellWithPaperTubeAssComplete接口输入参数为:-------------------" + param.toString());
|
log.info("airSwellWithPaperTubeAssComplete接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String container_name = param.getString("container_name");
|
String container_name = param.getString("container_name");
|
||||||
if (StrUtil.isEmpty(container_name)) {
|
if (StrUtil.isEmpty(container_name)) {
|
||||||
throw new BadRequestException("子卷号不能为空!");
|
throw new BadRequestException("子卷号不能为空!");
|
||||||
@@ -312,7 +317,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("iContainerName", container_name);
|
jo.put("iContainerName", container_name);
|
||||||
jo.put("iisAirSwellAssComplete", 1);
|
jo.put("iisAirSwellAssComplete", 1);
|
||||||
@@ -339,8 +344,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/AirSwellWithPaperTubeAssComplete", "套轴任务完成,上架暂存区,智能物流PDA选任务、扫轴、扫料架货位,传MES套轴任务完成信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
log.info("MES提示错误:" + e.getMessage());
|
log.info("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/AirSwellWithPaperTubeAssComplete", "套轴任务完成,上架暂存区,智能物流PDA选任务、扫轴、扫料架货位,传MES套轴任务完成信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,7 +366,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject cutPlanMomRollDeliveryComplete(JSONObject param) {
|
public JSONObject cutPlanMomRollDeliveryComplete(JSONObject param) {
|
||||||
log.info("cutPlanMomRollDeliveryComplete接口输入参数为:-------------------" + param.toString());
|
log.info("cutPlanMomRollDeliveryComplete接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
if (StrUtil.equals("0", is_connect_mes)) {
|
if (StrUtil.equals("0", is_connect_mes)) {
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
@@ -361,6 +373,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
|
||||||
String container_name = param.getString("container_name");
|
String container_name = param.getString("container_name");
|
||||||
String package_box_sn = param.getString("package_box_sn");
|
String package_box_sn = param.getString("package_box_sn");
|
||||||
@@ -399,8 +412,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/CutPlanMomRollDeliveryComplete", "LMS提前做/MES呼叫后做,立库子卷出库完成/母卷配送至分切机暂存位,AGV传MES 母卷配送完成信息/立库子卷出库完成信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/CutPlanMomRollDeliveryComplete", "LMS提前做/MES呼叫后做,立库子卷出库完成/母卷配送至分切机暂存位,AGV传MES 母卷配送完成信息/立库子卷出库完成信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,12 +434,10 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject airSwellWithPaperTubeAssArrival(JSONObject param) {
|
public JSONObject airSwellWithPaperTubeAssArrival(JSONObject param) {
|
||||||
log.info("airSwellWithPaperTubeAssArrival接口输入参数为:-------------------" + param.toString());
|
log.info("airSwellWithPaperTubeAssArrival接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String container_name = param.getString("container_name");
|
String container_name = param.getString("container_name");
|
||||||
if (StrUtil.isEmpty(container_name)) {
|
if (StrUtil.isEmpty(container_name)) {
|
||||||
throw new BadRequestException("子卷号不能为空!");
|
throw new BadRequestException("子卷号不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
if (StrUtil.equals("0", is_connect_mes)) {
|
if (StrUtil.equals("0", is_connect_mes)) {
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
@@ -426,6 +445,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("iContainerName", container_name);
|
jo.put("iContainerName", container_name);
|
||||||
@@ -450,8 +470,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/AirSwellWithPaperTubeAssArrival", "提前将/按呼叫指令配送(扫码校验配送先后顺序)气涨轴套装运输到分切机,智能物流传MES 到位信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
log.info("MES提示错误:" + e.getMessage());
|
log.info("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/AirSwellWithPaperTubeAssArrival", "提前将/按呼叫指令配送(扫码校验配送先后顺序)气涨轴套装运输到分切机,智能物流传MES 到位信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,7 +492,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject childRollFGInboundComplete(JSONObject param) {
|
public JSONObject childRollFGInboundComplete(JSONObject param) {
|
||||||
log.info("childRollFGInboundComplete接口输入参数为:-------------------" + param.toString());
|
log.info("childRollFGInboundComplete接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String PackageBoxSN = param.getString("PackageBoxSN");
|
String PackageBoxSN = param.getString("PackageBoxSN");
|
||||||
String User = param.getString("User");
|
String User = param.getString("User");
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
@@ -529,8 +556,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject childRollFGOutboundComplete(JSONObject param) {
|
public JSONObject childRollFGOutboundComplete(JSONObject param) {
|
||||||
log.info("childRollFGOutboundComplete接口输入参数为:-------------------" + param.toString());
|
log.info("childRollFGOutboundComplete接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
if (StrUtil.equals("0", is_connect_mes)) {
|
if (StrUtil.equals("0", is_connect_mes)) {
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
@@ -694,7 +719,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||||
String api = "/FeiShuNoticesWebApi/CreateApproval";
|
String api = "/FeiShuNoticesWebApi/CreateApproval";
|
||||||
url = url + api;
|
url = url + api;
|
||||||
@@ -715,8 +740,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("feishu", "/FeiShuNoticesWebApi/CreateApproval", "触发飞书报废审核流程",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("飞书提示错误:" + e.getMessage());
|
throw new BadRequestException("飞书提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("feishu", "/FeiShuNoticesWebApi/CreateApproval", "触发飞书报废审核流程",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -731,7 +764,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||||
String api = "/FeiShuNoticesWebApi/SendCard";
|
String api = "/FeiShuNoticesWebApi/SendCard";
|
||||||
url = url + api;
|
url = url + api;
|
||||||
@@ -768,7 +801,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||||
String api = "CamstarApi/ChildScrapUpdate";
|
String api = "CamstarApi/ChildScrapUpdate";
|
||||||
url = url + api;
|
url = url + api;
|
||||||
@@ -794,8 +827,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/ChildScrapUpdate", "报废出库:回传mes箱号、子卷号",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/ChildScrapUpdate", "报废出库:回传mes箱号、子卷号",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -809,7 +850,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||||
String api = "/FeiShuNoticesWebApi/UploadImage";
|
String api = "/FeiShuNoticesWebApi/UploadImage";
|
||||||
url = url + api + "?fileName=" + file_name;
|
url = url + api + "?fileName=" + file_name;
|
||||||
@@ -846,7 +887,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||||
String api = "/FeiShuNoticesWebApi/SendCard";
|
String api = "/FeiShuNoticesWebApi/SendCard";
|
||||||
url = url + api;
|
url = url + api;
|
||||||
@@ -893,7 +934,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
log.info("momAutoTransterMoveIn接口输入参数为:-------------------" + param.toString());
|
log.info("momAutoTransterMoveIn接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||||
String api = "CamstarApi/momAutoTransterMoveIn";
|
String api = "CamstarApi/momAutoTransterMoveIn";
|
||||||
url = url + api;
|
url = url + api;
|
||||||
@@ -936,7 +976,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
log.info("momGetPackingInfo接口输入参数为:-------------------" + param.toString());
|
log.info("momGetPackingInfo接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||||
@@ -967,8 +1007,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/momGetPackingInfo", "根据木想号母卷获取包装信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/momGetPackingInfo", "根据木想号母卷获取包装信息",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -998,7 +1046,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
if (ObjectUtil.isEmpty(rows)) {
|
if (ObjectUtil.isEmpty(rows)) {
|
||||||
throw new BadRequestException("箱内子卷信息不能为空!");
|
throw new BadRequestException("箱内子卷信息不能为空!");
|
||||||
}
|
}
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL2").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL2").getValue();
|
||||||
@@ -1043,8 +1091,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
PdmProductSpecServiceImpl.doRecord(SpecEnum.BZ_MES, param, Boolean.TRUE, null, list);
|
PdmProductSpecServiceImpl.doRecord(SpecEnum.BZ_MES, param, Boolean.TRUE, null, list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
PdmProductSpecServiceImpl.doRecord(SpecEnum.BZ_MES, param, Boolean.FALSE, e.getMessage(), list);
|
PdmProductSpecServiceImpl.doRecord(SpecEnum.BZ_MES, param, Boolean.FALSE, e.getMessage(), list);
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/momBoxPackageSubmit", "包装回传",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/momBoxPackageSubmit", "包装回传",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1067,7 +1123,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL2").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL2").getValue();
|
||||||
String api = "CamstarApi/BoxDataCollectionSubmit2";
|
String api = "CamstarApi/BoxDataCollectionSubmit2";
|
||||||
url = url + api;
|
url = url + api;
|
||||||
@@ -1160,9 +1216,17 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
PdmProductSpecServiceImpl.doRecord(SpecEnum.YX_MES, param, Boolean.FALSE, e.getMessage(), containerName);
|
PdmProductSpecServiceImpl.doRecord(SpecEnum.YX_MES, param, Boolean.FALSE, e.getMessage(), containerName);
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/BoxDataCollectionSubmit2", "mes验箱",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES错误:" + e.getMessage());
|
throw new BadRequestException("MES错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
PdmProductSpecServiceImpl.doRecord(SpecEnum.YX_MES, param, Boolean.TRUE, null, containerName);
|
PdmProductSpecServiceImpl.doRecord(SpecEnum.YX_MES, param, Boolean.TRUE, null, containerName);
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/BoxDataCollectionSubmit2", "mes验箱",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1178,7 +1242,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String isConnect2 = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_CONNECT_MES2").getValue();
|
String isConnect2 = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_CONNECT_MES2").getValue();
|
||||||
if ("0".equals(isConnect2)) {
|
if ("0".equals(isConnect2)) {
|
||||||
return result;
|
return result;
|
||||||
@@ -1321,8 +1385,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
log.info("getInspectionResult接口输出参数为:-------------------" + result.toString());
|
log.info("getInspectionResult接口输出参数为:-------------------" + result.toString());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/GetInspectionResult", "/CamstarApi/GetInspectionResult",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/GetInspectionResult", "/CamstarApi/GetInspectionResult",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1335,7 +1407,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
log.info("GetChildWeightIsSamplePDA接口输入参数为:-------------------" + param.toString());
|
log.info("GetChildWeightIsSamplePDA接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||||
@@ -1380,8 +1452,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// 记录失败日志
|
||||||
|
OutboundApiLogger.logFail("mes", "/CamstarApi/GetChildWeightIsSamplePDA", "/CamstarApi/GetChildWeightIsSamplePDA",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), e.getMessage(),
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 记录成功日志
|
||||||
|
OutboundApiLogger.logSuccess("mes", "/CamstarApi/GetChildWeightIsSamplePDA", "/CamstarApi/GetChildWeightIsSamplePDA",
|
||||||
|
url, "POST", JSONUtil.toJsonStr(param), result.toString(), 200,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ public class LmsToBigScreenController {
|
|||||||
|
|
||||||
@PostMapping("/getStructInfo")
|
@PostMapping("/getStructInfo")
|
||||||
@Log("数字孪生请求LMS获取设备信息")
|
@Log("数字孪生请求LMS获取设备信息")
|
||||||
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> getStructInfo(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> getStructInfo(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(LmsToBigScreenService.getStructInfo(jo), HttpStatus.OK);
|
return new ResponseEntity<>(LmsToBigScreenService.getStructInfo(jo), HttpStatus.OK);
|
||||||
@@ -39,7 +38,6 @@ public class LmsToBigScreenController {
|
|||||||
|
|
||||||
@PostMapping("/getMonthFreight")
|
@PostMapping("/getMonthFreight")
|
||||||
@Log("当月发货运费信息")
|
@Log("当月发货运费信息")
|
||||||
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> getMonthFreight(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> getMonthFreight(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(LmsToBigScreenService.getMonthFreight(jo), HttpStatus.OK);
|
return new ResponseEntity<>(LmsToBigScreenService.getMonthFreight(jo), HttpStatus.OK);
|
||||||
@@ -47,7 +45,6 @@ public class LmsToBigScreenController {
|
|||||||
|
|
||||||
@PostMapping("/getMonthYield")
|
@PostMapping("/getMonthYield")
|
||||||
@Log("当月产量信息")
|
@Log("当月产量信息")
|
||||||
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> getMonthYield(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> getMonthYield(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(LmsToBigScreenService.getMonthYield(jo), HttpStatus.OK);
|
return new ResponseEntity<>(LmsToBigScreenService.getMonthYield(jo), HttpStatus.OK);
|
||||||
@@ -55,7 +52,6 @@ public class LmsToBigScreenController {
|
|||||||
|
|
||||||
@PostMapping("/getMonthDelivery")
|
@PostMapping("/getMonthDelivery")
|
||||||
@Log("当月发货信息")
|
@Log("当月发货信息")
|
||||||
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> getMonthDelivery(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> getMonthDelivery(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(LmsToBigScreenService.getMonthDelivery(jo), HttpStatus.OK);
|
return new ResponseEntity<>(LmsToBigScreenService.getMonthDelivery(jo), HttpStatus.OK);
|
||||||
@@ -63,7 +59,6 @@ public class LmsToBigScreenController {
|
|||||||
|
|
||||||
@PostMapping("/getProudDayData")
|
@PostMapping("/getProudDayData")
|
||||||
@Log("成品日报")
|
@Log("成品日报")
|
||||||
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> getProudDayData(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> getProudDayData(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(LmsToBigScreenService.getProudDayData(jo), HttpStatus.OK);
|
return new ResponseEntity<>(LmsToBigScreenService.getProudDayData(jo), HttpStatus.OK);
|
||||||
|
|||||||
Reference in New Issue
Block a user