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





    }

}
