forked from I3-YF/i3plus-mes-pcn-yfai
离线检查是否拉数据
parent
f682deee4d
commit
3d77e70d79
@ -0,0 +1,12 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.api.busi;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 边缘端检测同步数据
|
||||||
|
*/
|
||||||
|
public interface IMesCheckSyncDataService {
|
||||||
|
|
||||||
|
|
||||||
|
void doCheckSyncData(String organizeCode, List<String> workCenterCodeList, List<String> workCellCodeList);
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.schedulejob;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesEquipmentLogService;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||||
|
import cn.estsh.impp.framework.boot.init.ApplicationProperties;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.quartz.DisallowConcurrentExecution;
|
||||||
|
import org.quartz.JobExecutionContext;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Castle
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2021/2/2 16:44
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@ApiOperation("检测离线服务同步数据")
|
||||||
|
public class MesCheckSyncDataJob extends BaseMesScheduleJob {
|
||||||
|
|
||||||
|
|
||||||
|
public MesCheckSyncDataJob() {
|
||||||
|
super(MesCheckSyncDataJob.class, "检测离线服务同步数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void executeMesJob(JobExecutionContext context, ApplicationProperties applicationProperties) {
|
||||||
|
|
||||||
|
log.info("检测离线服务同步数据 --- START ");
|
||||||
|
|
||||||
|
String jobParam = this.getJobParam();
|
||||||
|
JSONObject params= JSONUtil.parseObj(jobParam);
|
||||||
|
String organizeCode = params.getStr("organizeCode");
|
||||||
|
String email = params.getStr("email");
|
||||||
|
if (StringUtils.isEmpty(organizeCode)){
|
||||||
|
log.info("保存工艺参数JOB --- ERROR --- JOB未配置工厂参数");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesCheckSyncDataService;
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.repository.MesCheckListRepository;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class MesCheckSyncDataServiceImpl implements IMesCheckSyncDataService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MesCheckListRepository checkListRao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doCheckSyncData(String organizeCode, List<String> workCenterCodeList, List<String> workCellCodeList) {
|
||||||
|
|
||||||
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||||
|
if (workCellCodeList !=null && !workCellCodeList.isEmpty()){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue