package org.jeecg.modules.mdc.webservice.impl;
|
|
import com.alibaba.fastjson.JSONObject;
|
import lombok.extern.slf4j.Slf4j;
|
import org.jeecg.modules.mdc.entity.MdcEquipmentDaySchedule;
|
import org.jeecg.modules.mdc.entity.MdcEquipmentDaySummary;
|
import org.jeecg.modules.mdc.service.IMdcEquipmentDayScheduleService;
|
import org.jeecg.modules.mdc.service.IMdcEquipmentDaySummaryService;
|
import org.jeecg.modules.mdc.vo.EquipmentDaySchedule;
|
import org.jeecg.modules.mdc.vo.EquipmentDaySummary;
|
import org.jeecg.modules.mdc.vo.WsResult;
|
import org.jeecg.modules.mdc.webservice.EquipmentWebService;
|
import org.springframework.beans.BeanUtils;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
import javax.jws.WebService;
|
|
|
/**
|
* @author Lius
|
* @date 2024/6/11 11:07
|
*/
|
@Service
|
@WebService(name = "EquipmentWebService",
|
targetNamespace = "http://mdc.webservice.equipment.com",
|
endpointInterface = "org.jeecg.modules.mdc.webservice.EquipmentWebService"
|
)
|
@Slf4j
|
public class EquipmentWebServiceImpl implements EquipmentWebService {
|
|
@Resource
|
private IMdcEquipmentDaySummaryService mdcEquipmentDaySummaryService;
|
|
@Resource
|
private IMdcEquipmentDayScheduleService mdcEquipmentDayScheduleService;
|
|
@Override
|
public String equipmentDaySchedule(String msg) {
|
log.info("MES上报日计划原始数据 === {}", msg);
|
EquipmentDaySchedule equipmentDaySchedule = JSONObject.parseObject(msg, EquipmentDaySchedule.class);
|
MdcEquipmentDaySchedule mdcEquipmentDaySchedule = new MdcEquipmentDaySchedule();
|
BeanUtils.copyProperties(equipmentDaySchedule, mdcEquipmentDaySchedule);
|
mdcEquipmentDayScheduleService.save(mdcEquipmentDaySchedule);
|
|
log.info("MES上报日计划数据成功!");
|
WsResult wsResult = new WsResult("1", "成功");
|
return JSONObject.toJSONString(wsResult);
|
}
|
|
@Override
|
public String equipmentDaySummary(String msg) {
|
log.info("MES上报日汇总原始数据 === {}", msg);
|
EquipmentDaySummary equipmentDaySummary = JSONObject.parseObject(msg, EquipmentDaySummary.class);
|
MdcEquipmentDaySummary mdcEquipmentDaySummary = new MdcEquipmentDaySummary();
|
BeanUtils.copyProperties(equipmentDaySummary, mdcEquipmentDaySummary);
|
mdcEquipmentDaySummaryService.save(mdcEquipmentDaySummary);
|
|
log.info("MES上报日汇总数据成功!");
|
WsResult wsResult = new WsResult("1", "成功");
|
return JSONObject.toJSONString(wsResult);
|
}
|
}
|