巡检任务定点执行

master
zhaoxiaolin 11 months ago
parent 949f6696bf
commit 8bb60b5212

@ -155,7 +155,7 @@ public class RyTask {
} }
/************质量管理系统定时任务开始*****************/ /************质量管理系统定时任务开始*****************/
//过程巡检,每15分钟执行一次 //过程巡检,改为整点0800-2000运行
public void createProduceXJTask(){ public void createProduceXJTask(){
logger.info("++质量管理系统+过程巡检+开始++createProduceXJTask+++++"); logger.info("++质量管理系统+过程巡检+开始++createProduceXJTask+++++");
remoteQualityService.createProduceXJTask(); remoteQualityService.createProduceXJTask();

@ -189,6 +189,12 @@ public class QuaController extends BaseController {
if(CollectionUtils.isEmpty(qcCheckTaskIncome.getQcCheckTaskDetails())){ if(CollectionUtils.isEmpty(qcCheckTaskIncome.getQcCheckTaskDetails())){
return error("[List<QcCheckTaskDetail>]不能为空"); return error("[List<QcCheckTaskDetail>]不能为空");
} }
if(StringUtils.isBlank(qcCheckTaskIncome.getUpdateBy())){
return error("[updateBy]不能为空");
}
if(StringUtils.isBlank(qcCheckTaskIncome.getUpdateByName())){
return error("[updateByName]不能为空");
}
return toAjax(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskIncome)); return toAjax(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskIncome));
} }
/** /**

@ -383,14 +383,14 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
for(QcCheckTaskProduce productTask:works){ for(QcCheckTaskProduce productTask:works){
productTask.setCheckType("checkTypeSCXJ");//过程检验-巡检 productTask.setCheckType("checkTypeSCXJ");//过程检验-巡检
productTask.setOrderNo(productTask.getWorkorderCode()); productTask.setOrderNo(productTask.getWorkorderCode());
Date nowTime = DateUtils.getNowDate(); // Date nowTime = DateUtils.getNowDate();
Date startTime = productTask.getCreateTime(); // Date startTime = productTask.getCreateTime();
long mins = DateUtil.between(startTime, nowTime, DateUnit.MINUTE); // long mins = DateUtil.between(startTime, nowTime, DateUnit.MINUTE);
if(mins>=60){ // if(mins>=60){
int m = insertQcCheckTaskProduce(productTask); int m = insertQcCheckTaskProduce(productTask);
logger.info("++++++++++++过程检验巡检任务生成" + m + "++++++++++++++"); logger.info("++++++++++++过程检验巡检任务生成" + m + "++++++++++++++");
} // }
} }
logger.info("++++++++++++" + poolName + "++++过程检验巡检结束++++++++++"); logger.info("++++++++++++" + poolName + "++++过程检验巡检结束++++++++++");
} }

Loading…
Cancel
Save