| | |
| | | |
| | | @Override |
| | | public String equipmentDaySchedule(String msg) { |
| | | log.info("MES上报日计划原始数据 === {}", msg); |
| | | log.info("接收MES上报日计划原始数据 === {}", msg); |
| | | List<EquipmentDaySchedule> equipmentDayScheduleList = JSONObject.parseArray(msg, EquipmentDaySchedule.class); |
| | | if (equipmentDayScheduleList == null || equipmentDayScheduleList.isEmpty()) { |
| | | WsResult wsResult = new WsResult("0", "json解析失败"); |
| | |
| | | } |
| | | mdcEquipmentDayScheduleService.saveBatch(mdcEquipmentDayScheduleList); |
| | | |
| | | log.info("MES上报日计划数据成功!"); |
| | | log.info("接收MES上报日计划数据成功!"); |
| | | WsResult wsResult = new WsResult("1", "成功"); |
| | | return JSONObject.toJSONString(wsResult); |
| | | } |
| | | |
| | | @Override |
| | | public String equipmentDaySummary(String msg) { |
| | | log.info("MES上报日汇总原始数据 === {}", msg); |
| | | log.info("接收MES上报日汇总原始数据 === {}", msg); |
| | | List<EquipmentDaySummary> equipmentDaySummaryList = JSONObject.parseArray(msg, EquipmentDaySummary.class); |
| | | if (equipmentDaySummaryList == null || equipmentDaySummaryList.isEmpty()) { |
| | | WsResult wsResult = new WsResult("0", "json解析失败"); |
| | |
| | | mdcEquipmentDaySummaryList.add(mdcEquipmentDaySummary); |
| | | } |
| | | mdcEquipmentDaySummaryService.saveBatch(mdcEquipmentDaySummaryList); |
| | | log.info("MES上报日汇总数据成功!"); |
| | | log.info("接收MES上报日汇总数据成功!"); |
| | | WsResult wsResult = new WsResult("1", "成功"); |
| | | return JSONObject.toJSONString(wsResult); |
| | | } |