forked from I3-YF/i3plus-mes-pcn-yfai
补录操作日志
parent
f595d98629
commit
4273eba96c
@ -0,0 +1,17 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.api.busi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 补录工位操作日志
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Castle
|
||||||
|
* @CreateDate : 2024/6/30 16:44
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface IMesWorkCellScanMonitorLogService {
|
||||||
|
/**
|
||||||
|
* 每次补录的条数
|
||||||
|
* @param pageSize
|
||||||
|
* @param organizeCode
|
||||||
|
*/
|
||||||
|
void doRecordCellOperationLog(String organizeCode,Integer pageSize);
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.schedulejob;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesWorkCellScanMonitorLogService;
|
||||||
|
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.apache.commons.lang.StringUtils;
|
||||||
|
import org.quartz.DisallowConcurrentExecution;
|
||||||
|
import org.quartz.JobExecutionContext;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
/**
|
||||||
|
* @Description : 生产开模统计job
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Castle
|
||||||
|
* @CreateDate 2024/6/26 18:22
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@DisallowConcurrentExecution
|
||||||
|
@Component
|
||||||
|
@ApiOperation("工位操作日志字段补录job")
|
||||||
|
public class MesWorkCellOperationLogJob extends BaseMesScheduleJob {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMesWorkCellScanMonitorLogService logService;
|
||||||
|
|
||||||
|
public MesWorkCellOperationLogJob() {
|
||||||
|
super(MesWorkCellOperationLogJob.class, "工位操作日志字段补录job");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void executeMesJob(JobExecutionContext context, ApplicationProperties applicationProperties) {
|
||||||
|
/**
|
||||||
|
* 入参
|
||||||
|
* {
|
||||||
|
* "organizeCode":"CK01",
|
||||||
|
* "pageSize":50
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
String jobParam = this.getJobParam();
|
||||||
|
JSONObject params = JSONUtil.parseObj(jobParam);
|
||||||
|
|
||||||
|
String organizeCode = params.get("organizeCode").toString();
|
||||||
|
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||||
|
logService.doRecordCellOperationLog(organizeCode,pageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue