1.修改自动生成工单时时间拼接错误,中英文标点符号问题

main
yitonglei 3 years ago
parent 6dad9c0007
commit 7d70014dc6
  1. 2
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/config/SpringContextHolder.java
  2. 16
      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/service/impl/AutoStartModelServiceImpl.java

@ -7,7 +7,7 @@ import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
/**
* @Description
* @Description 手动获取bean
* @Author ytl
* @Date 2023/3/2 0002 15:36
*/

@ -35,7 +35,7 @@ public class ProcessEndListener implements ExecutionListener {
Map<String, Object> variablesMap = new HashMap<>();
variablesMap.putAll(variables);
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = servletRequestAttributes.getResponse();
// HttpServletResponse response = servletRequestAttributes.getResponse();
switch (event) {
case "start":
System.out.println("ProcessEndListener-start event-------------------");
@ -43,15 +43,15 @@ public class ProcessEndListener implements ExecutionListener {
if(variablesMap.containsKey("wf_process_terminate")) return;
IAutoStartModelService autoStartModelService = (IAutoStartModelService) SpringContextHolder.getBean(AutoStartModelServiceImpl.class);
//判断工作流的的重复模式1
//判断工作流的的重复模式,重复的任务生成工单、保存任务信息,计算下次任务开始时间
if (Func.isNotEmpty(variablesMap.get("chongfumoshi")) && !StringUtils.equals(RepeatEnum.不重复.getCode(), variablesMap.get("chongfumoshi").toString())) {
String s = autoStartModelService.saveStartProcess(processInstanceId, variablesMap);
try {
response.sendError(200,s);
} catch (IOException e) {
e.printStackTrace();
}
} else {//不重复任务
// try {
// response.sendError(200,s);
// } catch (IOException e) {
// e.printStackTrace();
// }
} else {//不重复任务,生成工单
autoStartModelService.newWorkOrder(processInstanceId, variablesMap);
}
break;

@ -310,7 +310,7 @@ public class AutoStartModelServiceImpl extends BaseServiceImpl<BladeManMadeMappe
AutoStartModel autoStartModel = new AutoStartModel();
autoStartModel.setProcessInstanceId(processinstanceId);
String chongfumoshi = variables.get("chongfumoshi") == null ? "" : variables.get("chongfumoshi").toString();
Date qiwangwanchengshijian = DateUtil.parse(variables.get("qiwangwanchengshijian").toString().substring(0,10) + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
Date qiwangwanchengshijian = DateUtil.parse(variables.get("qiwangwanchengshijian").toString().substring(0,10) + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
Date nextStartTime = this.setStartTime(qiwangwanchengshijian, chongfumoshi);
//第一次创建工单的开始时间和结束时间都是以工作流的期望结束时间为基准的
autoStartModel.setNextStartTime(nextStartTime);
@ -503,7 +503,7 @@ public class AutoStartModelServiceImpl extends BaseServiceImpl<BladeManMadeMappe
autoStartModel.setNextEndTime(nextEndTime);
baseMapper.updateById(autoStartModel);
boolean ii = DateUtil.between(nextStartTime,now).isNegative();
// boolean ii = DateUtil.between(nextStartTime,now).isNegative();
if(!DateUtil.between(nextStartTime,now).isNegative()){
autoCreateWorkOrder(now,autoStartModel);

Loading…
Cancel
Save