1.修改自动生成工单时时间判断问题

main
yitonglei 3 years ago
parent 2138517a35
commit 57dc5285e6
  1. 6
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/homepage/service/impl/HomePageServiceImpl.java
  2. 2
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/listener/ProcessEndListener.java
  3. 4
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workbench/entity/AutoStartModel.java
  4. 4
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workbench/service/impl/AutoStartModelServiceImpl.java

@ -2,10 +2,8 @@ package org.springblade.plugin.homepage.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.shaded.com.google.gson.JsonObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import liquibase.pro.packaged.E;
import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringUtils;
import org.flowable.engine.HistoryService;
@ -21,7 +19,6 @@ import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.plugin.homepage.enumutil.TaskTypeColorEnum;
import org.springblade.plugin.homepage.enumutil.WorkingStatusEnum;
import org.springblade.plugin.homepage.service.IHomePageService;
@ -34,10 +31,7 @@ import org.springblade.system.user.entity.User;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.time.LocalDate;
import java.util.*;
import java.util.concurrent.Future;

@ -47,7 +47,7 @@ public class ProcessEndListener implements ExecutionListener {
if (Func.isNotEmpty(variablesMap.get("chongfumoshi")) && !StringUtils.equals(RepeatEnum.不重复.getCode(), variablesMap.get("chongfumoshi").toString())) {
String s = autoStartModelService.saveStartProcess(processInstanceId, variablesMap);
try {
response.sendError(500,s);
response.sendError(200,s);
} catch (IOException e) {
e.printStackTrace();
}

@ -23,7 +23,7 @@ public class AutoStartModel extends TenantEntity {
private String processInstanceId;
private Long processSeconds;
// private Long processSeconds;
//发起人id
private Long applyUser;
@ -69,7 +69,7 @@ public class AutoStartModel extends TenantEntity {
//下次期望结束时间
private Date nextEndTime;
//标识,下次任务的表单是否建立
private Integer nextFlag;
// private Integer nextFlag;
/**
* 开始时间
*/

@ -503,7 +503,9 @@ public class AutoStartModelServiceImpl extends BaseServiceImpl<BladeManMadeMappe
autoStartModel.setNextEndTime(nextEndTime);
baseMapper.updateById(autoStartModel);
while(DateUtil.between(nextStartTime,now).getSeconds() >= 0){
boolean ii = DateUtil.between(nextStartTime,now).isNegative();
if(!DateUtil.between(nextStartTime,now).isNegative()){
autoCreateWorkOrder(now,autoStartModel);
}
}

Loading…
Cancel
Save