修复bug,添加消息推送,添加脚本采集数据

This commit is contained in:
wyt 2025-05-27 16:14:41 +08:00
parent 271b2716e9
commit 21fbe8a063
40 changed files with 1328 additions and 487 deletions

View File

@ -33,7 +33,6 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
@ -46,6 +45,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.20.1</version>
</dependency>
<!-- spring-boot-web -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -7,6 +7,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
@ -21,6 +22,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
})
@EnableConfigurationProperties(ConfigProperties.class)
@SpringBootApplication
@EnableScheduling
public class EleAdminApplication {
public static void main(String[] args) {

View File

@ -0,0 +1,73 @@
package com.eleadmin.api;
import lombok.Getter;
import lombok.Setter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.support.RestClientAdapter;
import org.springframework.web.service.annotation.HttpExchange;
import org.springframework.web.service.annotation.PostExchange;
import org.springframework.web.service.invoker.HttpServiceProxyFactory;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Configuration
public class MessageConfig {
@HttpExchange
public interface MessageService {
@PostExchange("/alarm-api/v1/alarms/push")
String push(@RequestBody Map<String, Object> body);
}
@Bean
MessageService messageService() {
HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(RestClient.create("http://25.64.66.102:28080"))).build();
return factory.createClient(MessageService.class);
}
@Getter
@Setter
public static class Message {
String title;
String content;
String phone;
}
public static Map<String, Object> buildMessage(List<Message> messages) {
if (messages == null || messages.isEmpty()) {
throw new RuntimeException("消息列表不能为空");
}
Map<String, Object> message = new HashMap<>();
message.put("detailSwitch", 1);
message.put("tenantId", 7);
message.put("secret", "54f46177c0de12fb6ee274b11ca31361");
List<Map<String, Object>> list = messages.stream()
.map(it -> {
Map<String, Object> alarms = new HashMap<>();
alarms.put("smsAction", 1);
alarms.put("repeatAction", 0);
alarms.put("pushSoundIndex", 0);
alarms.put("userPhone", it.getPhone());
alarms.put("personalMsgAction", 1);
alarms.put("templateId", 1255);
alarms.put("title", it.getTitle());
alarms.put("type", 5);
alarms.put("portalMsgAction", 0);
alarms.put("content", it.getContent());
return alarms;
}).toList();
message.put("alarms", list);
return message;
}
}

View File

@ -1,20 +0,0 @@
package com.eleadmin.common.core.excel.convert;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.ReadConverterContext;
import java.time.LocalDateTime;
import static cn.hutool.core.date.LocalDateTimeUtil.parse;
public class LocalDateTimeConverter implements Converter<LocalDateTime> {
@Override
public Class<?> supportJavaTypeKey() {
return LocalDateTime.class; // 指定要转换的 Java 类型
}
@Override
public LocalDateTime convertToJavaData(ReadConverterContext<?> context) {
// 实现从 Excel 单元格数据到 Java 对象的转换逻辑
return parse(context.getReadCellData().getStringValue());
}
}

View File

@ -3,6 +3,7 @@ package com.eleadmin.common.core.excel.convert;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.ReadConverterContext;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.data.WriteCellData;
public class OutageTypeConverter implements Converter<Integer> {
@ -19,14 +20,21 @@ public class OutageTypeConverter implements Converter<Integer> {
case "带电作业" -> 2;
case "不对外停电" -> 1;
case "对外停电" -> 0;
default ->
throw new IllegalArgumentException("Invalid value for " + context.getContentProperty().getField().getName() + ": " + description);
default -> null;
};
}
@Override
public WriteCellData<?> convertToExcelData(WriteConverterContext<Integer> context) {
return new WriteCellData<>(context.getValue() == 1 ? "" : "");
if (context.getValue() == null) {
return new WriteCellData<>("");
}
return switch (context.getValue()) {
case 0 -> new WriteCellData<>("对外停电");
case 1 -> new WriteCellData<>("不对外停电");
case 2 -> new WriteCellData<>("带电作业");
default -> new WriteCellData<>("");
};
}
}

View File

@ -3,6 +3,7 @@ package com.eleadmin.common.core.excel.convert;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.ReadConverterContext;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.data.WriteCellData;
public class YesNoConverter implements Converter<Integer> {
@ -20,12 +21,15 @@ public class YesNoConverter implements Converter<Integer> {
} else if ("".equals(description)) {
return 0;
} else {
throw new IllegalArgumentException("Invalid value for " + context.getContentProperty().getField().getName() + ": " + description);
return null;
}
}
@Override
public WriteCellData<?> convertToExcelData(WriteConverterContext<Integer> context) {
if (context.getValue() == null) {
return new WriteCellData<>("");
}
return new WriteCellData<>(context.getValue() == 1 ? "" : "");
}

View File

@ -0,0 +1,43 @@
package com.eleadmin.common.core.utils;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PhoneNumberUtil {
/**
* 提取字符串中符合中国电话号码规范的号码
*
* @param input 输入文本
* @return 匹配到的电话号码列表
*/
public static List<String> extractPhoneNumbers(String input) {
List<String> results = new ArrayList<>();
// 支持的电话号码正则表达式
String phoneRegex = "1[3-9]\\d{9}"; // 手机号
String fixedLineRegex = "0[1-9]\\d{1,2}-[1-9]\\d{5,7}"; // 固话含区号
String internationalMobileRegex = "\\+86\\s?1[3-9]\\d{9}"; // 手机国际格式
String internationalFixedLineRegex = "\\+86\\s?0[1-9]\\d{1,2}\\s?[1-9]\\d{5,7}"; // 固话国际格式
String formattedMobileRegex = "1[3-9]\\d{3}[-\\s]?\\d{4}[-\\s]?\\d{4}"; // 带分隔符的手机号
// 合并所有规则
String fullRegex = String.join("|",
phoneRegex,
fixedLineRegex,
internationalMobileRegex,
internationalFixedLineRegex,
formattedMobileRegex
);
Pattern pattern = Pattern.compile(fullRegex);
Matcher matcher = pattern.matcher(input);
while (matcher.find()) {
results.add(matcher.group());
}
return results;
}
}

View File

@ -299,9 +299,12 @@ public final class SmartExcelUtil {
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
// 验证表头
BusinessException exception = new BusinessException("你导入的excel表头与系统模板不一致请仔细核查后再重新上传");
if (expectedHeaders.size() != actualHeaders.size()) {
throw exception;
}
if (!IntStream.range(0, expectedHeaders.size()).allMatch(i -> expectedHeaders.get(i).equals(actualHeaders.get(i)))) {
throw new BusinessException("表头格式不正确");
throw exception;
}
}
}

View File

@ -144,7 +144,7 @@
select a.user_id, a.nickname
from sys_user a
left join sys_user_role b on a.user_id = b.user_id
where b.role_id = (select role_id from sys_role where role_code = 'tmhzz' limit 1)
where a.deleted = 0 and b.role_id = (select role_id from sys_role where role_code = 'tmhzz' limit 1)
order by a.task_count
limit 1
</select>

View File

@ -4,6 +4,9 @@ import cn.hutool.core.io.IoUtil;
import cn.hutool.core.io.StreamProgress;
import cn.hutool.core.lang.Tuple;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.eleadmin.api.MessageConfig;
import com.eleadmin.common.core.utils.LoginUtil;
import com.eleadmin.common.core.utils.PhoneNumberUtil;
import com.eleadmin.common.core.utils.Tuple2;
import com.eleadmin.common.core.web.*;
import com.eleadmin.common.system.entity.User;
@ -13,6 +16,7 @@ import com.eleadmin.distributiondeviceinfo.domain.entity.DistributionDeviceInfoE
import com.eleadmin.distributiondeviceinfo.service.DistributionDeviceInfoService;
import com.eleadmin.flowable.dto.FlowCompleteDTO;
import com.eleadmin.flowable.service.FlowableService;
import com.eleadmin.flowable.vo.ProcessProgressDetail;
import com.eleadmin.flowable.vo.TaskInfo;
import com.eleadmin.outagework.domain.entity.OutageWorkEntity;
import com.eleadmin.outagework.service.OutageWorkService;
@ -27,13 +31,17 @@ import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.task.api.Task;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@RestController
@RequestMapping("/api/common-flow")
@ -45,6 +53,46 @@ public class CommonFlowController extends BaseController {
private final OutageWorkService outageWorkService;
private final PowerDebugService powerDebugService;
private final DistributionDeviceInfoService distributionDeviceInfoService;
private final MessageConfig.MessageService messageService;
/**
* 定时任务
*/
@Scheduled(cron = "0 0 12 * * ?")
public void sendMessage() {
List<Task> tasks = flowableService.taskService.createTaskQuery().taskName("资料收集").list();
if (tasks.isEmpty()) {
return;
}
Set<String> list = tasks.stream().map(Task::getProcessInstanceId).collect(Collectors.toSet());
List<OutageWorkEntity> entities = outageWorkService.lambdaQuery().in(OutageWorkEntity::getProcessInstanceId, list).apply("now() > work_start_time - INTERVAL 3 DAY").list();
if (entities.isEmpty()) {
return;
}
List<MessageConfig.Message> messages = entities.stream().flatMap(entity -> {
String remarks = entity.getRemarks();
List<String> numbers = PhoneNumberUtil.extractPhoneNumbers(remarks);
if (numbers.isEmpty()) {
return Stream.empty();
}
String format = entity.getWorkStartTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
String line = entity.getLineName();
String content = "您有一条(" + format + " " + line + ")的工作未提供(信息表/台账)资料。请及时到图模维护工具处理。";
return numbers.stream()
.map(number -> {
var message = new MessageConfig.Message();
message.setTitle("图模通知");
message.setContent(content);
message.setPhone(number);
return message;
});
}).toList();
messageService.push(MessageConfig.buildMessage(messages));
}
/**
* 获取待办任务
@ -87,143 +135,13 @@ public class CommonFlowController extends BaseController {
}
// 按流程实例ID分组
Map<String, List<HistoricTaskInstance>> instanceMap = taskList.stream()
.collect(Collectors.groupingBy(HistoricTaskInstance::getProcessInstanceId));
Map<String, List<HistoricTaskInstance>> instanceMap = taskList.stream().collect(Collectors.groupingBy(HistoricTaskInstance::getProcessInstanceId));
// 构建任务信息列表
List<TaskInfo> result = buildTaskInfoList(instanceMap);
return new PageResult<>(result, (long) result.size());
}
/**
* 构建任务信息列表
*
* @param taskList 任务列表
* @param total 总任务数
* @return 分页结果包含任务信息列表
*/
private PageResult<TaskInfo> buildTaskInfoResult(List<? extends Task> taskList, Long total) {
// 获取所有任务的流程实例ID
Set<String> processIds = taskList.stream()
.map(Task::getProcessInstanceId)
.collect(Collectors.toSet());
// 查询流程实例的业务键
List<String> businessKeys = flowableService.queryProcesses(processIds).stream()
.map(ProcessInstance::getBusinessKey)
.toList();
// 根据业务键查询对应的OutageWorkEntity
Map<String, OutageWorkEntity> outageWorkMap = outageWorkService.listByIds(businessKeys).stream()
.collect(Collectors.toMap(OutageWorkEntity::getProcessInstanceId, v -> v));
// 获取所有OutageWorkEntity的ID
List<Integer> outageIds = outageWorkMap.values().stream()
.map(OutageWorkEntity::getId)
.toList();
// 查询与OutageWorkEntity相关的DistributionDeviceInfoEntity
Map<Integer, DistributionDeviceInfoEntity> deviceInfoMap = distributionDeviceInfoService.lambdaQuery()
.in(DistributionDeviceInfoEntity::getOutageId, outageIds)
.select(DistributionDeviceInfoEntity::getOmsNumber, DistributionDeviceInfoEntity::getOutageId, DistributionDeviceInfoEntity::getId)
.list()
.stream()
.collect(Collectors.toMap(DistributionDeviceInfoEntity::getOutageId, it -> it));
Map<Integer, PowerDebugEntity> powerDebugMap;
if (deviceInfoMap.isEmpty()) {
powerDebugMap = Collections.emptyMap();
} else {
powerDebugMap = powerDebugService.lambdaQuery()
.in(PowerDebugEntity::getDdiId, deviceInfoMap.values().stream().map(DistributionDeviceInfoEntity::getId).toList())
.select(PowerDebugEntity::getDdiId, PowerDebugEntity::getPlannedTestDate, PowerDebugEntity::getPlannedTestTime)
.list()
.stream()
.collect(Collectors.toMap(PowerDebugEntity::getDdiId, it -> it));
}
// 构建TaskInfo列表并返回
return new PageResult<>(taskList.stream().map(task -> {
TaskInfo taskInfo = TaskInfo.of(task);
OutageWorkEntity outageWork = outageWorkMap.get(task.getProcessInstanceId());
if (outageWork == null) {
return taskInfo;
}
DistributionDeviceInfoEntity deviceInfo = deviceInfoMap.get(outageWork.getId());
if (deviceInfo != null) {
PowerDebugEntity powerDebug = powerDebugMap.get(deviceInfo.getId());
if (powerDebug != null) {
outageWork.setPlannedTestDate(powerDebug.getPlannedTestDate());
outageWork.setPlannedTestTime(powerDebug.getPlannedTestTime());
}
if (deviceInfo.getOmsNumber() != null) {
outageWork.setOmsNumber(deviceInfo.getOmsNumber());
}
}
taskInfo.setBusinessObject(outageWork);
return taskInfo;
}).toList(), total);
}
/**
* 构建任务信息列表
*
* @param instanceMap 按流程实例ID分组的任务列表
* @return 任务信息列表
*/
private List<TaskInfo> buildTaskInfoList(Map<String, List<HistoricTaskInstance>> instanceMap) {
// 获取所有流程实例ID
Set<String> processIds = instanceMap.keySet();
// 查询流程实例的业务键
Set<String> businessKeys = flowableService.queryProcesses(processIds).stream()
.map(ProcessInstance::getBusinessKey)
.collect(Collectors.toSet());
businessKeys.addAll(flowableService.queryHistoryProcesses(processIds).stream()
.map(HistoricProcessInstance::getBusinessKey)
.collect(Collectors.toSet()));
// 根据业务键查询对应的OutageWorkEntity
Map<String, OutageWorkEntity> outageWorkMap = outageWorkService.listByIds(businessKeys).stream()
.collect(Collectors.toMap(OutageWorkEntity::getProcessInstanceId, v -> v));
// 获取所有OutageWorkEntity的ID
List<Integer> outageIds = outageWorkMap.values().stream()
.map(OutageWorkEntity::getId)
.toList();
// 查询与OutageWorkEntity相关的DistributionDeviceInfoEntity
Map<Integer, Object> deviceInfoMap = outageIds.isEmpty() ? Collections.emptyMap() :
distributionDeviceInfoService.list(Wrappers.lambdaQuery(DistributionDeviceInfoEntity.class)
.in(DistributionDeviceInfoEntity::getOutageId, outageIds)
.select(DistributionDeviceInfoEntity::getOmsNumber,
DistributionDeviceInfoEntity::getOutageId))
.stream()
.collect(Collectors.toMap(DistributionDeviceInfoEntity::getOutageId,
DistributionDeviceInfoEntity::getOmsNumber));
// 构建TaskInfo列表并返回
return instanceMap.entrySet().stream()
.flatMap(entry -> entry.getValue().stream().map(task -> {
TaskInfo taskInfo = TaskInfo.of(task);
OutageWorkEntity outageWork = outageWorkMap.get(task.getProcessInstanceId());
if (outageWork == null) {
return taskInfo;
}
// Optional.ofNullable((List<String>)deviceInfoMap.get(outageWork.getId())).ifPresent(outageWork::setOmsNumber);
Object omsNumbers = deviceInfoMap.get(outageWork.getId());
if (omsNumbers!=null){
outageWork.setOmsNumber((List<String>)omsNumbers);
}
taskInfo.setBusinessObject(outageWork);
return taskInfo;
}))
.toList();
}
/**
* 完成待办任务
*
@ -232,9 +150,8 @@ public class CommonFlowController extends BaseController {
*/
@PostMapping("/completeTask")
public ApiResult<?> completeTask(@RequestBody @Valid FlowCompleteDTO param) {
flowableService.completeTask(param.getTaskId(), getLoginUserId().toString(), param.getComment(), param.getVariablesLocal(), param.getVariables());
flowableService.completeTask(param.getTaskId(), getLoginUserId().toString(), param.getComment(), param.getVariablesLocal(), param.getVariables(), param.getCompleteNextTask());
return success();
}
/**
@ -285,8 +202,205 @@ public class CommonFlowController extends BaseController {
// 处理异常例如记录日志或返回错误信息
log.warn("获取流程图时发生错误", e);
}
}
/**
* 完成分配OMS编号和发起子流程
*/
@PostMapping("/startSubProcess")
@Transactional
public ApiResult<?> startSubProcess(@RequestBody @Valid FlowCompleteDTO param) {
ProcessProgressDetail detail = flowableService.getProcessDetailVyTaskId(param.getTaskId());
if (detail == null) {
return ApiResult.fail().setData("流程不存在");
}
String userId = getLoginUserId().toString();
Object isAgree = param.getVariables().get("isAgree");
if (isAgree == null) {
return ApiResult.fail().setData("请选择是否同意");
}
Map<String, Object> variables = detail.getProcessVariables();
@SuppressWarnings("unchecked")
Map<String, String[]> startedSubProcesses = (Map<String, String[]>) variables.get("startedSubProcesses");
if (startedSubProcesses == null) {
startedSubProcesses = new HashMap<>();
}
if (isAgree.equals(false)) {
if (!startedSubProcesses.isEmpty()) {
return ApiResult.fail().setData("子流程已创建,无法退回");
}
flowableService.completeTask(param.getTaskId(), userId, param.getComment(), Map.of("isAgree", isAgree));
return success();
}
String processInstanceId = detail.getProcessInstanceId();
Map<String, Object> map = Map.of(
"isTest", variables.get("isTest"),
"mainProcessInstanceId", processInstanceId,
"mainOperatingDepartment", variables.get("mainOperatingDepartment"),
"tmhzz", variables.get("tmhzz")
);
// 启动子流程
String subProcess = flowableService.startProcess("sub-flow", detail.getBusinessKey(), map);
@SuppressWarnings("unchecked")
List<String> omsNumber = (List<String>) param.getVariables().get("omsNumber");
// 更新已启动的子流程记录
startedSubProcesses.put(subProcess, omsNumber.toArray(new String[0]));
// 移除已领取的子项
@SuppressWarnings("unchecked")
List<String> availableItems = new ArrayList<>((List<String>) detail.getProcessVariables().get("availableItems"));
availableItems.removeIf(omsNumber::contains);
flowableService.setVariables(processInstanceId, Map.of("startedSubProcesses", startedSubProcesses, "availableItems", availableItems));
//完成当前任务
flowableService.completeTask(param.getTaskId(), userId, param.getComment(), Map.of("isAgree", isAgree));
//完成第一步的子流程
FlowableParam flowableParam = new FlowableParam();
flowableParam.setUserId(userId);
flowableParam.setPage(1L);
flowableParam.setLimit(1L);
flowableParam.setProcessInstanceId(subProcess);
Task task = flowableService.getTodoTasks(flowableParam).t2.get(0);
flowableService.completeTask(task.getId(), userId, param.getComment(), param.getVariablesLocal(), param.getVariables());
return success();
}
/**
* 统计资料收集数量
*/
@GetMapping("/countRecentCollectionTasks")
public ApiResult<?> countRecentCollectionTasks() {
List<String> list = flowableService.taskService.createTaskQuery().taskName("资料收集").taskCandidateOrAssigned(getLoginUserId().toString()).active().list().stream().map(org.flowable.task.api.TaskInfo::getProcessInstanceId).toList();
Long count = outageWorkService.lambdaQuery().in(OutageWorkEntity::getProcessInstanceId, list).apply("now() > work_start_time - INTERVAL 3 DAY").count();
/*
* .apply("now() > work_start_time - INTERVAL (CASE " +
"WHEN WEEKDAY(work_start_time) = 5 THEN 4 " + // 周六 -> 减4天到周三
"WHEN WEEKDAY(work_start_time) = 6 THEN 5 " + // 周日 -> 减5天到周三
"ELSE 3 " + // 正常工作日 -> 减3天
"END) DAY")
* */
return success(count);
}
/**
* 构建任务信息列表
*
* @param taskList 任务列表
* @param total 总任务数
* @return 分页结果包含任务信息列表
*/
private PageResult<TaskInfo> buildTaskInfoResult(List<? extends Task> taskList, Long total) {
// 获取所有任务的流程实例ID
Set<String> processIds = taskList.stream().map(Task::getProcessInstanceId).collect(Collectors.toSet());
// 查询流程实例的业务键
Map<String, String> businessKeys = flowableService.queryProcesses(processIds).stream().collect(Collectors.toMap(ProcessInstance::getProcessInstanceId, ProcessInstance::getBusinessKey));
// 根据业务键查询对应的OutageWorkEntity
Map<String, OutageWorkEntity> outageWorkMap = outageWorkService.listByIds(businessKeys.values()).stream()
.collect(Collectors.toMap(it -> it.getId().toString(), v -> v));
// 获取所有OutageWorkEntity的ID
List<Integer> outageIds = outageWorkMap.values().stream()
.map(OutageWorkEntity::getId)
.toList();
// 查询与OutageWorkEntity相关的DistributionDeviceInfoEntity
Map<Integer, DistributionDeviceInfoEntity> deviceInfoMap = distributionDeviceInfoService.lambdaQuery()
.in(DistributionDeviceInfoEntity::getOutageId, outageIds)
.list()
.stream()
.collect(Collectors.toMap(DistributionDeviceInfoEntity::getOutageId, it -> it));
Map<Integer, PowerDebugEntity> powerDebugMap = powerDebugService.lambdaQuery()
.in(PowerDebugEntity::getOutageId, outageIds)
.select(PowerDebugEntity::getOutageId, PowerDebugEntity::getPlannedTestDate, PowerDebugEntity::getPlannedTestTime)
.list()
.stream()
.collect(Collectors.toMap(PowerDebugEntity::getOutageId, it -> it));
// 构建TaskInfo列表并返回
return new PageResult<>(taskList.stream().map(task -> {
TaskInfo taskInfo = TaskInfo.of(task);
OutageWorkEntity outageWork = outageWorkMap.get(businessKeys.get(task.getProcessInstanceId()));
if (outageWork == null) {
return taskInfo;
}
DistributionDeviceInfoEntity deviceInfo = deviceInfoMap.get(outageWork.getId());
if (deviceInfo != null) {
Object availableItems = flowableService.getVariable(task.getProcessInstanceId(), "availableItems");
if (availableItems != null) {
@SuppressWarnings("unchecked")
List<String> items = (List<String>) availableItems;
deviceInfo.setOmsNumber(items);
}
outageWork.setDeviceInfo(deviceInfo);
}
PowerDebugEntity powerDebug = powerDebugMap.get(outageWork.getId());
if (powerDebug != null) {
outageWork.setPlannedTestDate(powerDebug.getPlannedTestDate());
outageWork.setPlannedTestTime(powerDebug.getPlannedTestTime());
}
taskInfo.setBusinessObject(outageWork);
return taskInfo;
}).toList(), total);
}
/**
* 构建任务信息列表
*
* @param instanceMap 按流程实例ID分组的任务列表
* @return 任务信息列表
*/
private List<TaskInfo> buildTaskInfoList(Map<String, List<HistoricTaskInstance>> instanceMap) {
// 获取所有流程实例ID
Set<String> processIds = instanceMap.keySet();
// 查询流程实例的业务键
Map<String, String> businessKeys = flowableService.queryProcesses(processIds).stream().collect(Collectors.toMap(ProcessInstance::getProcessInstanceId, ProcessInstance::getBusinessKey));
businessKeys.putAll(flowableService.queryHistoryProcesses(processIds).stream().collect(Collectors.toMap(HistoricProcessInstance::getId, HistoricProcessInstance::getBusinessKey)));
// 根据业务键查询对应的OutageWorkEntity
Map<String, OutageWorkEntity> outageWorkMap = businessKeys.isEmpty() ? Collections.emptyMap() : outageWorkService.listByIds(businessKeys.values()).stream().collect(Collectors.toMap(it -> it.getId().toString(), v -> v));
// 查询与OutageWorkEntity相关的DistributionDeviceInfoEntity
Map<Integer, DistributionDeviceInfoEntity> deviceInfoMap = outageWorkMap.isEmpty() ? Collections.emptyMap() :
distributionDeviceInfoService.lambdaQuery().in(DistributionDeviceInfoEntity::getOutageId, outageWorkMap.keySet()).list()
.stream()
.collect(Collectors.toMap(DistributionDeviceInfoEntity::getOutageId, it -> it));
// 构建TaskInfo列表并返回
return instanceMap.entrySet().stream()
.flatMap(entry -> entry.getValue().stream().map(task -> {
TaskInfo taskInfo = TaskInfo.of(task);
OutageWorkEntity outageWork = outageWorkMap.get(businessKeys.get(task.getProcessInstanceId()));
if (outageWork == null) {
return taskInfo;
}
DistributionDeviceInfoEntity omsNumbers = deviceInfoMap.get(outageWork.getId());
if (omsNumbers != null) {
outageWork.setDeviceInfo(omsNumbers);
}
taskInfo.setBusinessObject(outageWork);
return taskInfo;
}))
.toList();
}
}

View File

@ -0,0 +1,294 @@
package com.eleadmin.crawler;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.XmlUtil;
import cn.hutool.crypto.Mode;
import cn.hutool.crypto.Padding;
import cn.hutool.crypto.digest.MD5;
import cn.hutool.crypto.symmetric.AES;
import com.eleadmin.flowable.service.FlowableService;
import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Slf4j
@Service
@RequiredArgsConstructor
public class CrawlerService {
Pattern userTokenPattern = Pattern.compile("\\$userToken = \"[^\"]+\"");
Pattern clsIDPattern = Pattern.compile("bdGrid\\.clsID = \"[^\"]+\"");
Pattern appIDPattern = Pattern.compile("bdGrid\\.appID = \"[^\"]+\"");
Pattern userIdPattern = Pattern.compile("id {3}= \"[^\"]+\"");
private Map<String, String> cookie = null;
private final String username = "houw5243";
private final String password = "龘aa3a1fbc369a33f800edc67b437dbf4f";
private final String agent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; QIHU 360ENT)";
private String userId = null;
private String userToken = null;
private String appId = null;
private String clsId = null;
private final HttpClient client = HttpClient.newHttpClient();
private final HttpRequest loginUri = HttpRequest.newBuilder().header("User-Agent", agent).uri(URI.create("http://10.55.6.80/MWWebSite/PROJECT-HOME/NARI-OMS/login/login.jsp")).build();
private final AES aes = new AES(Mode.CBC, Padding.PKCS5Padding, "0102030405060708".getBytes(StandardCharsets.UTF_8), "0102030405060708".getBytes(StandardCharsets.UTF_8));
private final TaskService taskService;
private final FlowableService flowableService;
@PostConstruct
@Scheduled(cron = "0 0 9,17 * * ?")
public void loginUser() {
try {
CompletableFuture.runAsync(() -> {
login();
getLoginUser();
});
} catch (Exception e) {
log.warn("登录失败");
}
}
@Scheduled(cron = "0 0/30 * * * ?")
public void execute() {
CompletableFuture.runAsync(() -> {
List<Task> tasks = taskService.createTaskQuery().taskName("图模归档").active().list();
for (Task task : tasks) {
Map<String, Object> variables = task.getTaskLocalVariables();
@SuppressWarnings("unchecked")
List<String> omsNumber = (List<String>) flowableService.getVariable(task.getProcessInstanceId(), "omsNumber");
Map<String, String> omsStatus;
if (variables.containsKey("omsStatus")) {
omsStatus = (Map<String, String>) variables.get("omsStatus");
} else {
omsStatus = new HashMap<>();
}
for (String number : omsNumber) {
String status = omsStatus.get(number);
if (StrUtil.isBlank(status)) {
omsStatus.put(number, list(number) ? "已执行" : "");
}
}
taskService.setVariableLocal(task.getId(), "omsStatus", omsStatus);
}
});
}
private void loginDev() {
HashMap<String, String> t = new HashMap<>();
t.put("redirectHome", "false");
t.put("JSESSIONID", "Ut78JA6U8MacI3ZOGsOQ1cl657PTAKY7wmLSmt-VDVHNdqimHxTA!-1473293525!1747986943636");
t.put("loginName", "houw5243");
this.cookie = t;
}
@SneakyThrows
private void login() {
HttpResponse<String> response = client.send(loginUri, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200 || response.body() == null) {
return;
}
Document parse = Jsoup.parse(response.body());
String curToken = parse.body().getElementById("curToken").val();
System.out.println(curToken);
Map<String, String> map = new HashMap<>();
map.put("userName", username);
map.put("password", password);
map.put("curToken", "" + MD5.create().digestHex(curToken));
Connection.Response execute = Jsoup.connect("http://10.55.6.80/MWWebSite/handlers/securitymodel/login?redirectUrl=%2FMWWebSite%2FPROJECT-HOME%2FNARI-OMS%2Fconsole%2FDefault.jsp").data(map).method(Connection.Method.POST).execute();
this.cookie = execute.cookies();
}
@SneakyThrows
private void getLoginUser() {
Connection.Response response = Jsoup.connect("http://10.55.6.80/MWWebSite/PROJECT-HOME/NARI-OMS/business/GGYY/TYCX/TYCX.jsp?clsID=0E5F82FE-4F7B-4D12-A76B-17FA01535E3A").method(Connection.Method.POST).cookies(this.cookie).execute();
if (response.statusCode() != 200) {
return;
}
Elements scripts = response.parse().select("script");
for (Element script : scripts) {
String html = script.html();
String userId = getUserId(html);
if (userId != null) {
this.userId = userId;
}
String userToken = getUserToken(html);
if (userToken != null) {
this.userToken = userToken;
}
String appId = getAppId(html);
if (appId != null) {
this.appId = appId;
}
String clsId = getClsID(html);
if (clsId != null) {
this.clsId = clsId;
}
}
// System.out.println("userId: " + userId);
// System.out.println("userToken: " + userToken);
// System.out.println("appId: " + appId);
// System.out.println("clsId: " + this.clsId);
}
private String getUserToken(String html) {
return getString(userTokenPattern, html);
}
private String getUserId(String html) {
return getString(userIdPattern, html);
}
private String getAppId(String html) {
return getString(appIDPattern, html);
}
private String getClsID(String html) {
return getString(clsIDPattern, html);
}
private String getString(Pattern userIdPattern, String html) {
Matcher matcher = userIdPattern.matcher(html);
if (matcher.find()) {
return matcher.group(0).split("=")[1].replaceAll("\"", "").trim();
}
return null;
}
private boolean list(String omsNumber) {
try {
long l = System.currentTimeMillis();
String format = initXmlParam(omsNumber);
String code = aes.encryptBase64(format);
Connection.Response execute = Jsoup.connect("http://10.55.6.48:7001/MWBusinessModel/xmlrpc?rnd=" + l)
.header("Accept-Encoding", "gzip deflate")
.header("Accept", "*/*")
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Accept-Language", "zh-cn")
.header("Pragma", "no-cache")
.requestBody(code)
.postDataCharset("UTF-8")
.method(Connection.Method.POST)
.referrer("http://10.55.6.80/MWWebSite/PROJECT-HOME/NARI-OMS/business/GGYY/TYCX/TYCX.jsp?clsID=0E5F82FE-4F7B-4D12-A76B-17FA01535E3A#")
.userAgent("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; QIHU 360ENT)")
.execute();
String body = execute.body();
org.w3c.dom.Document document = XmlUtil.parseXml(body);
org.w3c.dom.Element element = XmlUtil.getRootElement(document);
org.w3c.dom.Element params = XmlUtil.getElement(element, "params");
org.w3c.dom.Element param = XmlUtil.getElement(params, "param");
org.w3c.dom.Element value = XmlUtil.getElement(param, "value");
org.w3c.dom.Element struct = XmlUtil.getElement(value, "struct");
List<org.w3c.dom.Element> member = XmlUtil.getElements(struct, "member");
org.w3c.dom.Element resultValue = member.get(2);
org.w3c.dom.Element value1 = XmlUtil.getElement(resultValue, "value");
org.w3c.dom.Element array = XmlUtil.getElement(value1, "array");
org.w3c.dom.Element businessDataCollection = XmlUtil.getElement(array, "businessDataCollection");
List<org.w3c.dom.Element> businessDataList = XmlUtil.getElements(businessDataCollection, "businessData");
Optional<org.w3c.dom.Element> first = businessDataList.stream().findFirst();
if (first.isEmpty()) {
log.warn("{}未查询到数据", omsNumber);
return false;
}
String id = first.get().getAttribute("id");
Document parse = Jsoup.connect("http://10.55.6.80/MWWebSite/PROJECT-HOME/NARI-OMS/business/DD/DDJHZY/PDSBXTBGTYLC/PDSBXTBGTYLC.jsp?clsID=" + clsId + "&appID=" + appId + "&prcdID=054F21D6-EF72-4882-9F41-33E9E88D4263&objID=" + id).cookies(cookie).get();
return getResult(parse.html());
} catch (Exception e) {
log.error("{}查询异常", omsNumber, e);
return false;
}
}
private String initXmlParam(String omsNumber) {
String xmlTemplate = """
<methodCall>
<methodName>businessmodel.BusinessRunTimeService.batchPagingLoadBusinessData</methodName>
<context userID="${userId}" userName="${userName}" token="${userToken}" ip="10.186.42.172" agent="W"></context>
<params>
<param><value><string><![CDATA[${clsId}]]></string></value></param>
<param><value><string><![CDATA[${userId}]]></string></value></param>
<param><value><string><![CDATA[${appId}]]></string></value></param>
<param><value><null/></value></param>
<param><value><string><![CDATA[<CLSFilters><CLSFilter clsID="${clsId}" filterString="1=1 AND SQDBH Like '${sqdbh}' AND SBDWID='${sbdwid}'" userControl="F" enabled="T"/></CLSFilters>]]></string></value></param>
<param><value><null/></value></param>
<param><value><null/></value></param>
<param><value><i4>100</i4></value></param>
<param><value><i4>0</i4></value></param>
</params>
</methodCall>
""";
Map<String, Object> params = new HashMap<>();
params.put("userId", this.userId);
params.put("userName", this.username);
params.put("userToken", this.userToken);
params.put("clsId", this.clsId);
params.put("appId", this.appId);
params.put("sbdwid", "633F65E0-164A-4A8C-BD4E-D08F2BB585B5-00115");
params.put("sqdbh", "%" + omsNumber + "%");
return replacePlaceholders(xmlTemplate, params);
}
private String replacePlaceholders(String template, Map<String, Object> params) {
for (Map.Entry<String, Object> entry : params.entrySet()) {
template = template.replaceAll("\\$\\{" + entry.getKey() + "}", entry.getValue().toString());
}
return template;
}
@SneakyThrows
private boolean getResult(String html) {
String selector = "#PDZX_table_cnt .tabItem > tbody > tr > td:last-child";
Element result = Jsoup.parse(html).selectFirst(selector);
if (result != null) {
log.warn("=============================================");
log.warn(result.html());
return result.html().contains("已执行");
} else {
log.warn("Element not found with selector: {}", selector);
}
return false;
}
}

View File

@ -97,8 +97,8 @@ public class DistributionDeviceInfoController extends BaseController {
@PreAuthorize("hasAnyAuthority('distributionDeviceInfo:import','common:flow')")
public void model(HttpServletResponse response) throws IOException {
// 设置下载消息头
SmartResponseUtil.setDownloadFileHeader(response, "新投异动模板.xls", null);
IoUtil.copy(ResourceUtil.getStream("classpath:/model/model.xls"), response.getOutputStream());
SmartResponseUtil.setDownloadFileHeader(response, "新投异动模板", null);
IoUtil.copy(ResourceUtil.getStream("classpath:/model/model.xlsx"), response.getOutputStream());
}
@Operation(summary = "添加 @author 王益亭")
@ -129,7 +129,7 @@ public class DistributionDeviceInfoController extends BaseController {
@PostMapping("/api/distributionDeviceInfo/repealCommit")
@PreAuthorize("hasAnyAuthority('distributionDeviceInfo:add','common:flow')")
public ApiResult repealCommit(@RequestBody @Valid IdParam idParam) {
distributionDeviceInfoService.repealCommit(idParam);
// distributionDeviceInfoService.repealCommit(idParam);
return success();
}

View File

@ -56,7 +56,6 @@
<result column="special_equipment_user_code" property="specialEquipmentUserCode"/>
<result column="major_customer_contact" property="majorCustomerContact"/>
<result column="attachment" property="attachment"/>
<result column="whether_debug" property="whetherDebug"/>
<result column="finish_status" property="finishStatus"/>
<result column="commit_status" property="commitStatus"/>
<result column="commit_time" property="commitTime"/>
@ -75,7 +74,7 @@
and t_distribution_device_info.id = #{queryForm.id}
</if>
<if test="queryForm.outageId != null">
and (t_distribution_device_info.outage_id = #{queryForm.outageId} or t_distribution_device_info.line_name = #{queryForm.lineName})
and t_distribution_device_info.outage_id = #{queryForm.outageId}
</if>
<if test="queryForm.planWorkTime != null">
and t_distribution_device_info.plan_work_time = #{queryForm.planWorkTime}

View File

@ -2,6 +2,7 @@ package com.eleadmin.distributiondeviceinfo.domain.form;
import com.eleadmin.common.core.annotation.Schema;
import com.eleadmin.distributiondeviceinfo.domain.entity.NewDevice;
import com.eleadmin.distributiondeviceinfo.domain.vo.AttachmentVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@ -40,7 +41,7 @@ public class DistributionDeviceInfoUpdateForm {
private LocalDate planWorkTime;
@Schema(description = "OMS新投异动编号")
private String omsNumber;
private List<String> omsNumber;
@Schema(description = "主业工程名称")
private String mainProjectName;
@ -85,6 +86,6 @@ public class DistributionDeviceInfoUpdateForm {
private String majorCustomerContact;
@Schema(description = "附件")
private String attachment;
private List<AttachmentVO> attachment;
}

View File

@ -130,7 +130,6 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
if (de.getId() != null && addForm.getRight() != null) {
PowerDebugEntity right = addForm.getRight();
right.setDdiId(de.getId());
powerDebugManager.saveOrUpdate(right);
}
} catch (Exception e) {
@ -140,7 +139,7 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
}
private void setOutageId(DistributionDeviceInfoEntity de) {
if (de.getOutageId()==null) {
if (de.getOutageId() == null) {
throw new BusinessException("没有outageId");
}
LocalDate time = de.getPlanWorkTime();
@ -198,6 +197,7 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
}
@Transactional
public void importFromExcel(MultipartFile file, Integer userId, Integer commitStatus, Integer outageId) {
VerticalTableReadListener<DistributionDeviceInfoExcelVO> readListener = new VerticalTableReadListener<>(DistributionDeviceInfoExcelVO.class);
try {
@ -216,13 +216,6 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
setOutageId(entity);
distributionDeviceInfoDao.insert(entity);
powerDebugManager.update(
Wrappers.lambdaUpdate(PowerDebugEntity.class)
.eq(PowerDebugEntity::getPlannedTestDate, entity.getPlanWorkTime())
.eq(PowerDebugEntity::getLineName, entity.getPlanWorkFeeder())
.set(PowerDebugEntity::getDdiId, entity.getId())
);
} catch (Exception e) {
throw new BusinessException(e.getMessage());
}
@ -258,7 +251,7 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
form.setId(id);
PageParam<DistributionDeviceInfoEntity, DistributionDeviceInfoQueryForm> page = new PageParam<>(form);
distributionDeviceInfoDao.queryPage(page, form).stream().findFirst().ifPresent(vo::setLeft);
powerDebugManager.getOneOpt(Wrappers.lambdaQuery(PowerDebugEntity.class).eq(PowerDebugEntity::getDdiId, id).last("limit 1")).ifPresent(vo::setRight);
// powerDebugManager.getOneOpt(Wrappers.lambdaQuery(PowerDebugEntity.class).eq(PowerDebugEntity::getDdiId, id).last("limit 1")).ifPresent(vo::setRight);
return vo;
}
@ -293,13 +286,17 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
flowableParam.setPage(1L);
flowableParam.setLimit(1L);
List<Task> tasks = flowableService.getTodoTasks(flowableParam).t2;
if (tasks.isEmpty()) {
return;
}
String id = tasks.get(0).getId();
Map<String, Object> var = Map.of(
"isTest", workVO.getWhetherDebug() == 1,
"isNewCreate", entity.getPlanWorkFeeder().startsWith("新建"),
"availableItems", entity.getOmsNumber(),
//查询参数
"endDateEnd", workVO.getEndDate().toEpochSecond(ZoneOffset.UTC),
"endDateBegin", workVO.getStartDate().toEpochSecond(ZoneOffset.UTC),
"endDateBegin", workVO.getStartDate().toEpochSecond(ZoneOffset.UTC),
"inspectionContent", workVO.getInspectionContent(),
"powerOutageScope", workVO.getPowerOutageScope(),
"lineName", workVO.getLineName()
@ -320,20 +317,12 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
}
public List<Map<String, List<Map<String, Object>>>> getExcel(Integer id) throws IOException {
// DistributionDeviceInfoEntity distributionDeviceInfoEntity = distributionDeviceInfoDao.selectById(id);
// if (StringUtils.isEmpty(distributionDeviceInfoEntity.getAttachment())) {
// throw new BusinessException("没有附件");
// }
// File file = new File(fileRecordService.getUploadDir(), distributionDeviceInfoEntity.getAttachment());
// ExcelMapReader excelMapReader = new ExcelMapReader();
// return excelMapReader.readAllSheets(file);
DistributionDeviceInfoEntity distributionDeviceInfoEntity = distributionDeviceInfoDao.selectById(id);
if (CollectionUtils.isEmpty(distributionDeviceInfoEntity.getAttachment())) {
throw new BusinessException("没有附件");
}
List<Map<String, List<Map<String, Object>>>> list = new ArrayList<>();
for (AttachmentVO attachment:distributionDeviceInfoEntity.getAttachment()) {
for (AttachmentVO attachment : distributionDeviceInfoEntity.getAttachment()) {
File file = new File(fileRecordService.getUploadDir(), attachment.getPath());
ExcelMapReader excelMapReader = new ExcelMapReader();
list.add(excelMapReader.readAllSheets(file));
@ -438,22 +427,6 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
throw new RuntimeException(e);
}
}
private void extracted2(AnalysisContext analysisContext, Object vo, ReadCellData<?> cellData, Field field, ExcelProperty property) {
try {
Class<? extends Converter<?>> converterClazz = property.converter();
Converter<?> converter;
if (converterClazz == AutoConverter.class) {
converter = converterMap.get(ConverterKeyBuild.buildKey(field.getType(), cellData.getType()));
} else {
converter = converterClazz.getConstructor().newInstance();
}
field.setAccessible(true);
field.set(vo, converter);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RuntimeException(e);
}
}
private static Map<CharSequence, Tree<String>> initializeFields(Class<?> clazz) {
return Arrays.stream(ClassUtil.getDeclaredFields(clazz))
@ -477,9 +450,9 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
return nodes;
}).toList();
node.setChildren(list);
node.put("isBaseList","0");
}else if (ClassUtil.isJdkClass(realType) && isList){
node.put("isBaseList","1");
node.put("isBaseList", "0");
} else if (ClassUtil.isJdkClass(realType) && isList) {
node.put("isBaseList", "1");
}
return node;
})
@ -538,9 +511,9 @@ public class DistributionDeviceInfoService extends ServiceImpl<DistributionDevic
if ("1".equals(tree.get("isBaseList"))) {
processChildNodes2(field, (ReadCellData<?>) cellMap.get(1));
}else if (tree.hasChild()){
} else if (tree.hasChild()) {
processChildNodes(tree, field, values, analysisContext);
}else {
} else {
if (values.get(0) == null || values.get(0).getType().equals(CellDataTypeEnum.EMPTY)) {
return;
}

View File

@ -1,6 +1,7 @@
package com.eleadmin.faLine.controller;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.eleadmin.common.core.annotation.Operation;
import com.eleadmin.common.core.utils.SmartExcelUtil;
import com.eleadmin.common.core.web.ApiResult;
@ -9,10 +10,13 @@ import com.eleadmin.faLine.domain.dto.FaExcelDTO;
import com.eleadmin.faLine.domain.dto.FaLineParam;
import com.eleadmin.faLine.domain.entity.FaLine;
import com.eleadmin.faLine.service.IFaLineService;
import com.eleadmin.outagework.dao.OutageWorkDao;
import com.eleadmin.outagework.domain.entity.OutageWorkEntity;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -31,6 +35,8 @@ public class FaLineController extends BaseController {
@Resource
private IFaLineService service;
@Resource
private OutageWorkDao outageWorkDao;
@Operation(summary = "分页查询")
@ -51,6 +57,7 @@ public class FaLineController extends BaseController {
@PostMapping("")
@PreAuthorize("hasAuthority('faLine:add')")
public ApiResult save(@RequestBody FaLine faLine) {
setWhetherFaLine(faLine, 1);
return service.save(faLine) ? success() : fail();
}
@ -58,6 +65,7 @@ public class FaLineController extends BaseController {
@PutMapping("")
@PreAuthorize("hasAuthority('faLine:update')")
public ApiResult update(@RequestBody FaLine faLine) {
setWhetherFaLine(faLine, 1);
return service.updateById(faLine) ? success() : fail();
}
@ -65,6 +73,8 @@ public class FaLineController extends BaseController {
@DeleteMapping("/{id}")
@PreAuthorize("hasAuthority('faLine:remove')")
public ApiResult remove(@PathVariable Integer id) {
FaLine faLine = service.getById(id);
setWhetherFaLine(faLine, 0);
return service.removeById(id) ? success() : fail();
}
@ -73,13 +83,14 @@ public class FaLineController extends BaseController {
@GetMapping("/model")
@PreAuthorize("hasAuthority('faLine:import')")
public void model(HttpServletResponse response) {
SmartExcelUtil.exportExcel(response, "FA线路模板", "sheet1",FaExcelDTO.class,Collections.emptyList());
SmartExcelUtil.exportExcel(response, "FA线路模板", "sheet1", FaExcelDTO.class, Collections.emptyList());
}
@SneakyThrows
@Operation(summary = "导入")
@PostMapping("/import")
@PreAuthorize("hasAuthority('faLine:import')")
@Transactional
public ApiResult<?> importData(@RequestParam MultipartFile file) {
List<FaExcelDTO> list = SmartExcelUtil.readExcelWithHeaderValidation(file.getInputStream(), FaExcelDTO.class);
if (list.isEmpty()) {
@ -101,6 +112,14 @@ public class FaLineController extends BaseController {
service.saveBatch(lines);
for (FaLine line : lines) {
setWhetherFaLine(line, 1);
}
return success();
}
private void setWhetherFaLine(FaLine line, int i) {
outageWorkDao.update(Wrappers.lambdaUpdate(OutageWorkEntity.class).like(OutageWorkEntity::getInspectionContent, line.getLineName()).set(OutageWorkEntity::getWhetherFaline, i));
}
}

View File

@ -14,10 +14,15 @@ public class FlowCompleteDTO implements Serializable {
@NotBlank
private String taskId;
@NotBlank
private String comment;
private Map<String,Object> variables;
@NotNull
private Map<String,Object> variablesLocal;
private Boolean completeNextTask;
}

View File

@ -0,0 +1,58 @@
package com.eleadmin.flowable.listener;
import lombok.RequiredArgsConstructor;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.engine.delegate.JavaDelegate;
import org.flowable.task.api.Task;
import org.flowable.task.service.delegate.DelegateTask;
import org.flowable.task.service.delegate.TaskListener;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Component
@RequiredArgsConstructor
public class SubProcessCompleteListener implements JavaDelegate {
private final RuntimeService runtimeService;
private final TaskService taskService;
@Override
public void execute(DelegateExecution execution) {
String mainProcessId = (String) execution.getVariable("mainProcessInstanceId");
@SuppressWarnings("unchecked")
Map<String,String[]> startedSubProcesses = (Map<String,String[]>) runtimeService.getVariable(mainProcessId, "startedSubProcesses");
@SuppressWarnings("unchecked")
List<String> completedSubProcesses = (List<String>) runtimeService.getVariable(mainProcessId, "completedSubProcesses");
if (completedSubProcesses == null) {
completedSubProcesses = new ArrayList<>();
}
completedSubProcesses.add(execution.getProcessInstanceId());
runtimeService.setVariable(mainProcessId, "completedSubProcesses", completedSubProcesses);
runtimeService.setVariable(mainProcessId, "isTest", false);
List<String> finalCompletedSubProcesses = completedSubProcesses;
startedSubProcesses.keySet().stream().filter(it -> !it.equals(execution.getProcessInstanceId()) && !finalCompletedSubProcesses.contains(it)).forEach(it -> runtimeService.setVariable(it, "isTest", false));
if (completedSubProcesses.size() == startedSubProcesses.size()) {
// 所有子流程已完成继续执行主流程
Task task = taskService.createTaskQuery().processInstanceId(mainProcessId).taskName("等待子流程完成").singleResult();
if (task != null) {
taskService.complete(task.getId());
}
}
}
}

View File

@ -6,6 +6,7 @@ import com.eleadmin.common.core.utils.LoginUtil;
import com.eleadmin.common.system.entity.User;
import com.eleadmin.common.system.param.UserParam;
import com.eleadmin.common.system.service.UserService;
import com.eleadmin.crawler.CrawlerService;
import lombok.RequiredArgsConstructor;
import org.flowable.engine.impl.el.FixedValue;
import org.flowable.task.service.delegate.DelegateTask;
@ -28,13 +29,10 @@ public class TaskCreateListener implements TaskListener {
private FixedValue typeIdStr;
private final UserService userService;
private final CrawlerService crawlerService;
@Override
public void notify(DelegateTask delegateTask) {
// 获取流程变量
/*String applyId = (String) delegateTask.getVariable("applyId");
String taskName = delegateTask.getName();*/
// 获取待办人支持候选组/候选人
List<String> assignees = getTaskAssignees(delegateTask);
@ -46,6 +44,12 @@ public class TaskCreateListener implements TaskListener {
}else {
delegateTask.addCandidateUsers(assignees);
}
if (delegateTask.getName().equals("图模归档")) {
crawlerService.loginUser();
crawlerService.execute();
}
}
private List<String> getTaskAssignees(DelegateTask delegateTask) {
@ -66,19 +70,5 @@ public class TaskCreateListener implements TaskListener {
};
}
public static String extractChineseCharacters(String input) {
// 正则表达式匹配中文字符
String regex = "[\u4e00-\u9fa5]";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(input);
StringBuilder result = new StringBuilder();
while (matcher.find()) {
result.append(matcher.group());
}
return result.toString();
}
}

View File

@ -10,10 +10,13 @@ import com.eleadmin.commonflow.from.FlowableParam;
import com.eleadmin.flowable.vo.ProcessProgressDetail;
import com.eleadmin.flowable.vo.TaskHistory;
import com.eleadmin.flowable.vo.TaskInfo;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
import org.flowable.engine.*;
import org.flowable.engine.form.FormProperty;
import org.flowable.engine.history.HistoricProcessInstance;
@ -48,7 +51,7 @@ import java.util.stream.Collectors;
public class FlowableService {
private final RuntimeService runtimeService;
private final TaskService taskService;
public final TaskService taskService;
private final HistoryService historyService;
private final RepositoryService repositoryService;
private final FormService formService;
@ -131,7 +134,6 @@ public class FlowableService {
/**
* 查询已办任务分页
*
*/
public Tuple2<Long, List<HistoricTaskInstance>> getCompletedTasks(FlowableParam param) {
HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery()
@ -147,7 +149,7 @@ public class FlowableService {
return Tuple2.of(query.count(), query.listPage(page - 1, limit));
}
private <T extends TaskInfoQuery<?,?>> void applyCommonConditions(T query, FlowableParam param) {
private <T extends TaskInfoQuery<?, ?>> void applyCommonConditions(T query, FlowableParam param) {
if (StringUtils.isNotBlank(param.getProcessInstanceId())) {
query.processInstanceId(param.getProcessInstanceId());
}
@ -191,17 +193,34 @@ public class FlowableService {
* @param deleteReason 删除原因
*/
public void deleteProcess(String processInstanceId, String deleteReason) {
try {
runtimeService.deleteProcessInstance(processInstanceId, deleteReason);
} catch (Exception ignored) {
}
List<HistoricTaskInstance> list = historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstanceId).list();
for (HistoricTaskInstance task : list) {
historyService.deleteHistoricTaskInstance(task.getId());
}
historyService.deleteHistoricProcessInstance(processInstanceId);
deleteProcess(Collections.singletonList(processInstanceId), deleteReason);
}
/**
* 删除流程实例和历史
*
* @param processInstanceId 流程实例ID
* @param deleteReason 删除原因
*/
public void deleteProcess(Collection<String> processInstanceId, String deleteReason) {
if(processInstanceId == null || processInstanceId.isEmpty()) {
return;
}
HashSet<String> set = new HashSet<>(processInstanceId);
runtimeService.createProcessInstanceQuery().processInstanceIds(set).list().forEach(processInstance -> {
runtimeService.deleteProcessInstance(processInstance.getId(), deleteReason);
taskService.createTaskQuery().processInstanceId(processInstance.getId()).list().forEach(task -> taskService.deleteTask(task.getId(), deleteReason));
historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstance.getId()).list().forEach(task -> historyService.deleteHistoricTaskInstance(task.getId()));
});
historyService.createHistoricProcessInstanceQuery().processInstanceIds(set).list().forEach(processInstance -> {
historyService.deleteHistoricProcessInstance(processInstance.getId());
historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstance.getId()).list().forEach(task -> historyService.deleteHistoricTaskInstance(task.getId()));
});
}
/**
* 删除流程实例
*
@ -566,5 +585,44 @@ public class FlowableService {
public Long getOverdueWork(String taskName) {
return taskService.createTaskQuery().taskName(taskName).active().count();
}
public ProcessProgressDetail getProcessDetailVyTaskId(@NotBlank String taskId) {
Task task = taskService.createTaskQuery().taskId(taskId).active().singleResult();
if (task == null) {
return null;
}
return getProcessProgressDetail(task.getProcessInstanceId());
}
public void setVariable(String processInstanceId, String name, Object value) {
runtimeService.setVariable(processInstanceId, name, value);
}
public void setVariables(String processInstanceId, Map<String, Object> variables) {
runtimeService.setVariables(processInstanceId, variables);
}
public Object getVariable(String processInstanceId, String name) {
try{
return runtimeService.getVariable(processInstanceId, name);
} catch (Exception e) {
return null;
}
}
public void completeTask(@NotBlank String taskId, String userId, @NotBlank String comment, @NotNull Map<String, Object> variablesLocal, Map<String, Object> variables, Boolean completeNextTask) {
String instanceId = taskService.createTaskQuery().taskId(taskId).singleResult().getProcessInstanceId();
completeTask(taskId,userId, comment,variablesLocal, variables);
if (completeNextTask != null && completeNextTask) {
Task nextTask = taskService.createTaskQuery().processInstanceId(instanceId).active().singleResult();
if (nextTask != null) {
completeTask(nextTask.getId(), userId, comment, variablesLocal, variables);
}
}
}
public Object getHistoricVariables(String processInstanceId, String startedSubProcesses) {
return historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).variableName(startedSubProcesses).singleResult();
}
}

View File

@ -28,7 +28,7 @@ public class TaskHistory {
this.startTime = startTime;
this.endTime = endTime;
this.duration = durationInMillis;
this.status = StringUtils.isBlank(deleteReason) ? "已完成" : "取消";
this.status = deleteReason == null ? "已完成" : "删除";
}
public static TaskHistory of(HistoricTaskInstance it) {

View File

@ -32,7 +32,8 @@
t_outage_work.process_instance_id,
t_outage_work.is_temp,
t_outage_work.old_data_id,
t_outage_work.whether_debug
t_outage_work.whether_debug,
t_outage_work.whether_faline
</sql>
<!-- 分页查询 -->
@ -77,13 +78,11 @@
<select id="querySimplePage" resultType="com.eleadmin.outagework.domain.vo.OutageWorkSimpleVO">
SELECT
<include refid="base_columns"/>,
if(t_outage_work.step_number = -1,'完成',fs.step_title) `stepTitle`,
if(tl.id is not null,1,0) as whether_faline
if(t_outage_work.step_number = -1,'完成',fs.step_title) `stepTitle`
FROM t_outage_work
left join f_step fs on fs.step_number = t_outage_work.step_number and fs.flow_id = t_outage_work.flow_id and fs.deleted = 0
left join t_distribution_device_info tddi on tddi.outage_id = t_outage_work.id
left join t_fa_line tl on tl.line_name = t_outage_work.line_name
LEFT JOIN t_power_debug tpd on tpd.ddi_id = tddi.id
LEFT JOIN t_power_debug tpd on tpd.outage_id = t_outage_work.id
<where>
<!--工作开始时间-->
<if test="queryForm.workStartTime != null">

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eleadmin.distributiondeviceinfo.domain.entity.DistributionDeviceInfoEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -169,7 +170,7 @@ public class OutageWorkEntity {
* OMS新投异动编号
*/
@TableField(exist = false)
private List<String> omsNumber;
private DistributionDeviceInfoEntity deviceInfo;
/**
* 计划调试日期

View File

@ -1,6 +1,7 @@
package com.eleadmin.outagework.service;
import cn.hutool.core.lang.Tuple;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
@ -10,6 +11,11 @@ import com.eleadmin.common.core.utils.*;
import com.eleadmin.common.core.web.ApiResult;
import com.eleadmin.common.core.web.PageParam;
import com.eleadmin.common.core.web.PageResult;
import com.eleadmin.common.system.entity.Organization;
import com.eleadmin.common.system.entity.Role;
import com.eleadmin.common.system.param.UserParam;
import com.eleadmin.common.system.service.OrganizationService;
import com.eleadmin.common.system.service.UserService;
import com.eleadmin.commonflow.from.FlowableParam;
import com.eleadmin.distributiondeviceinfo.dao.DistributionDeviceInfoDao;
import com.eleadmin.distributiondeviceinfo.domain.entity.DistributionDeviceInfoEntity;
@ -32,6 +38,8 @@ import com.eleadmin.powerdebug.domain.entity.PowerDebugEntity;
import com.eleadmin.powerdebug.manager.PowerDebugManager;
import com.eleadmin.common.system.entity.User;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -58,28 +66,20 @@ import java.util.stream.Collectors;
@Service
@Slf4j
@RequiredArgsConstructor
public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEntity> implements IService<OutageWorkEntity> {
@Resource
private OutageWorkDao outageWorkDao;
@Resource
private IFaLineService faLineService;
@Resource
private IFlowService flowService;
@Resource
private IStepService stepService;
@Resource
private IFieldService fieldService;
@Resource
private IStepTableService stepTableService;
@Resource
private PowerDebugManager powerDebugManager;
@Resource
private IStepTableFieldService stepTableFieldService;
@Resource
private DistributionDeviceInfoDao distributionDeviceInfoDao;
@Resource
private FlowableService flowableService;
private final OutageWorkDao outageWorkDao;
private final IFaLineService faLineService;
private final IFlowService flowService;
private final IStepService stepService;
private final IFieldService fieldService;
private final IStepTableService stepTableService;
private final IStepTableFieldService stepTableFieldService;
private final DistributionDeviceInfoDao distributionDeviceInfoDao;
private final FlowableService flowableService;
private final OrganizationService organizationService;
/**
@ -121,10 +121,14 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
}
private void startFlow(OutageWorkEntity outageWorkEntity) {
if(outageWorkEntity.getIsNewProject() != 1) {
if (outageWorkEntity.getIsNewProject() != 1) {
return;
}
String processId = flowableService.startProcess("common-flow", outageWorkEntity.getId().toString(), Map.of());
Map<String, Object> available = Map.of(
"startedSubProcesses", new HashMap<String, String[]>(),
"completedSubProcesses", new ArrayList<>()
);
String processId = flowableService.startProcess("common-flow", outageWorkEntity.getId().toString(), available);
outageWorkDao.updateById(OutageWorkEntity.builder().id(outageWorkEntity.getId()).processInstanceId(processId).build());
FlowableParam flowableParam = new FlowableParam();
@ -148,12 +152,14 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
private void getSubLineName(OutageWorkEntity outageWorkEntity) {
if (StringUtils.isNotBlank(outageWorkEntity.getInspectionContent())) {
String substring = StrUtil.subBetween(outageWorkEntity.getInspectionContent(), "<", ">");
FaLine limit = faLineService.getOne(Wrappers.lambdaQuery(FaLine.class).eq(FaLine::getLineName, substring).last("limit 1"));
FaLine limit = faLineService.query().apply("'" + outageWorkEntity.getInspectionContent() + "'" + " like concat('%',line_name,'%')").last("limit 1").one();
if (limit != null) {
outageWorkEntity.setWhetherFaline(1);
}
outageWorkEntity.setLineName(substring);
List<String> substrings = ReUtil.findAllGroup1("<(.*?)>", outageWorkEntity.getInspectionContent());
outageWorkEntity.setLineName(String.join("", substrings));
}
}
@ -170,10 +176,10 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
outageWorkDao.updateById(outageWorkEntity);
OutageWorkEntity entity = outageWorkDao.selectOne(Wrappers.lambdaQuery(OutageWorkEntity.class).eq(OutageWorkEntity::getId, outageWorkEntity.getId()).select(OutageWorkEntity::getWorkStatus,OutageWorkEntity::getProcessInstanceId));
OutageWorkEntity entity = outageWorkDao.selectOne(Wrappers.lambdaQuery(OutageWorkEntity.class).eq(OutageWorkEntity::getId, outageWorkEntity.getId()).select(OutageWorkEntity::getWorkStatus, OutageWorkEntity::getProcessInstanceId));
if (outageWorkEntity.getWorkStatus() != null && outageWorkEntity.getWorkStatus() == 0) {
flowableService.deleteProcessInstance(entity.getProcessInstanceId(),"取消工作");
flowableService.deleteProcessInstance(entity.getProcessInstanceId(), "取消工作");
}
return ApiResult.ok();
@ -189,11 +195,29 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
// 处理导入的数据例如保存到数据库
List<OutageWorkEntity> list = SmartBeanUtil.copyList(dataList, OutageWorkEntity.class);
// 提取所有 mainOperatingDepartment 的前两位
Set<String> departmentPrefixes = list.stream().map(entity -> entity.getMainOperatingDepartment().substring(0, 2)).collect(Collectors.toSet());
// 批量查询数据库中包含这些前缀的组织数量
List<Organization> organizations = organizationService.lambdaQuery()
.and(wrapper -> departmentPrefixes.forEach(prefix -> wrapper.like(Organization::getOrganizationName, prefix).or()))
.select(Organization::getOrganizationName)
.list();
// 检查是否有不存在的前缀
for (OutageWorkEntity entity : list) {
String variable = entity.getMainOperatingDepartment().substring(0, 2);
boolean exists = organizations.stream().anyMatch(org -> org.getOrganizationName().contains(variable));
if (!exists) {
return ApiResult.fail().setData("你导入的excel文件" + (list.indexOf(entity) + 1) + "行主运行部门<" + entity.getMainOperatingDepartment() + ">在系统中不存在,请核实再上传!");
}
}
Map<String, Integer> oldDataId = outageWorkDao.selectList(
Wrappers.lambdaQuery(OutageWorkEntity.class)
.in(OutageWorkEntity::getInspectionContent, list.stream().map(OutageWorkEntity::getInspectionContent).toList())
.select(OutageWorkEntity::getId, OutageWorkEntity::getInspectionContent)
Wrappers.lambdaQuery(OutageWorkEntity.class)
.in(OutageWorkEntity::getInspectionContent, list.stream().map(OutageWorkEntity::getInspectionContent).toList())
.select(OutageWorkEntity::getId, OutageWorkEntity::getInspectionContent)
)
.stream().collect(Collectors.toMap(OutageWorkEntity::getInspectionContent, OutageWorkEntity::getId));
@ -226,20 +250,35 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
* @param idList
* @return
*/
@Transactional
public ApiResult<String> batchDelete(List<Integer> idList) {
if (CollectionUtils.isEmpty(idList)) {
return ApiResult.ok();
}
List<OutageWorkEntity> entities = listByIds(idList);
for (OutageWorkEntity entity : entities) {
if (entity.getProcessInstanceId() != null) {
flowableService.deleteProcess(entity.getProcessInstanceId(), "");
}
deleteFlow(entity);
}
outageWorkDao.deleteByIds(idList);
return ApiResult.ok();
}
@Transactional
public void deleteFlow(OutageWorkEntity entity) {
if (entity.getProcessInstanceId() != null) {
Object processes = flowableService.getVariable(entity.getProcessInstanceId(), "startedSubProcesses");
if (processes == null) {
processes = flowableService.getHistoricVariables(entity.getProcessInstanceId(), "startedSubProcesses");
if (processes == null) {
throw new BusinessException("未查询到子流程");
}
}
flowableService.deleteProcess(((Map<String, String[]>) processes).keySet(), "");
flowableService.deleteProcess(entity.getProcessInstanceId(), "");
}
}
/**
* 单个删除
*/
@ -247,7 +286,10 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
if (null == id) {
return ApiResult.ok();
}
flowableService.deleteProcess(outageWorkDao.selectById(id).getProcessInstanceId(), "");
OutageWorkEntity entity = outageWorkDao.selectById(id);
deleteFlow(entity);
outageWorkDao.deleteById(id);
return ApiResult.ok();
}
@ -312,12 +354,8 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
String strIds = step.getStrIds();
if (StringUtils.isNotBlank(strIds)) {
String[] split = strIds.split(",");
List<Integer> strIdList = Arrays.stream(split).map(item -> {
return Integer.parseInt(item);
}).collect(Collectors.toList());
List<Integer> roleIds = user.getRoles().stream().map(i -> {
return i.getRoleId();
}).collect(Collectors.toList());
List<Integer> strIdList = Arrays.stream(split).map(Integer::parseInt).collect(Collectors.toList());
List<Integer> roleIds = user.getRoles().stream().map(Role::getRoleId).collect(Collectors.toList());
if (!hasCommonElementStream(strIdList, roleIds)) {
throw new BusinessException("没有当前流程权限");
}
@ -408,12 +446,12 @@ public class OutageWorkService extends ServiceImpl<OutageWorkDao, OutageWorkEnti
form.setLineName(byId.getLineName());
PageParam<DistributionDeviceInfoEntity, DistributionDeviceInfoQueryForm> page = new PageParam<>(form);
distributionDeviceInfoDao.queryPage(page, form).stream().findFirst().ifPresent(vo::setLeft);
powerDebugManager.getOneOpt(Wrappers.lambdaQuery(PowerDebugEntity.class).eq(PowerDebugEntity::getDdiId, id).last("limit 1")).ifPresent(vo::setRight);
// powerDebugManager.getOneOpt(Wrappers.lambdaQuery(PowerDebugEntity.class).eq(PowerDebugEntity::getDdiId, id).last("limit 1")).ifPresent(vo::setRight);
return vo;
}
public long getOverdueWork() {
return flowableService.getOverdueWork( "图模归档");
return flowableService.getOverdueWork("图模归档");
}
}

View File

@ -6,6 +6,7 @@ import com.eleadmin.common.core.utils.SmartExcelUtil;
import com.eleadmin.common.core.web.ApiResult;
import com.eleadmin.common.core.web.BaseController;
import com.eleadmin.common.core.web.PageResult;
import com.eleadmin.powerdebug.domain.entity.PowerDebugEntity;
import com.eleadmin.powerdebug.domain.form.PowerDebugAddForm;
import com.eleadmin.powerdebug.domain.form.PowerDebugQueryForm;
import com.eleadmin.powerdebug.domain.form.PowerDebugUpdateForm;
@ -38,12 +39,16 @@ public class PowerDebugController extends BaseController {
@Operation(summary = "分页查询 @author 王益亭")
@PostMapping("/api/powerDebug/queryPage")
// // @SaCheckPermission("powerDebug:query")
@PreAuthorize("hasAuthority('powerDebug:query')")
public ApiResult<PageResult> queryPage(@RequestBody @Valid PowerDebugQueryForm queryForm) {
return success(powerDebugService.querySimplePage(queryForm));
}
@Operation(summary = "分页查询 @author 王益亭")
@PostMapping("/api/powerDebug/list")
public ApiResult<List<PowerDebugEntity>> list(@RequestBody PowerDebugQueryForm queryForm) {
return success(powerDebugService.lambdaQuery().eq(PowerDebugEntity::getOutageId, queryForm.getOutageId()).list());
}
@Operation(summary = "根据ID查询 @author 王益亭")
@PostMapping("/api/powerDebug/{id}")
// // @SaCheckPermission("distributionDeviceInfo:query")

View File

@ -53,6 +53,9 @@
<if test="queryForm.id != null">
and t_power_debug.id = #{queryForm.id}
</if>
<if test="queryForm.outageId != null">
and t_power_debug.outage_id = #{queryForm.outageId}
</if>
<if test="queryForm.center != null and queryForm.center != ''">
AND INSTR(t_power_debug.center,#{queryForm.center})
</if>

View File

@ -29,7 +29,7 @@ public class PowerDebugEntity {
/**
* 调试计划ID
*/
private Integer ddiId;
private Integer outageId;
/**
* 所属中心

View File

@ -18,7 +18,7 @@ import java.util.Date;
public class PowerDebugAddForm {
@Schema(description = "调试计划ID")
private Integer ddiId;
private Integer outageId;
@Schema(description = "所属中心")
private String center;

View File

@ -24,6 +24,9 @@ public class PowerDebugQueryForm extends BaseParam {
@Schema(description = "记录ID")
private Integer id;
private Integer outageId;
/**
* 计划调试日期
*/

View File

@ -23,7 +23,7 @@ public class PowerDebugUpdateForm {
private Integer id;
@Schema(description = "调试计划ID")
private Integer ddiId;
private Integer outageId;
@Schema(description = "所属中心")
private String center;

View File

@ -20,8 +20,14 @@ import java.util.Date;
@Data
public class PowerDebugExcelVO {
@ExcelProperty("所属中心")
private String center;
@ExcelProperty(value = "序号")
private Integer index;
@ExcelProperty("停电计划涉及大馈线")
private String workLineName;
@ExcelProperty("停电计划开始时间")
private Date workStartTime;
@ExcelProperty("计划调试日期")
@DateTimeFormat("yyyy-MM-dd")
@ -30,9 +36,12 @@ public class PowerDebugExcelVO {
@ExcelProperty("计划调试时间")
private String plannedTestTime;
@ExcelProperty("计划投运日期")
@DateTimeFormat("yyyy-MM-dd")
private LocalDate plannedOperationDate;
// @ExcelProperty("计划投运日期")
// @DateTimeFormat("yyyy-MM-dd")
// private LocalDate plannedOperationDate;
@ExcelProperty("图模涉及大馈线名称")
private String lineName;
@ExcelProperty("调试地点")
private String testLocation;
@ -40,15 +49,6 @@ public class PowerDebugExcelVO {
@ExcelProperty("终端名称")
private String terminalName;
@ExcelProperty("涉及的图模大馈线名称")
private String lineName;
@ExcelProperty("计划工作大馈线")
private String workLineName;
@ExcelProperty("停电计划工作开始时间")
private Date workStartTime;
@ExcelProperty("设备类型")
private String equipmentType;
@ -97,6 +97,9 @@ public class PowerDebugExcelVO {
@ExcelProperty("工程专责")
private String engineeringResponsible;
@ExcelProperty("所属中心")
private String center;
@ExcelProperty("备注")
private String remarks;

View File

@ -71,6 +71,7 @@ public class PowerDebugService extends ServiceImpl<PowerDebugDao, PowerDebugEnti
*/
public ApiResult<String> add(PowerDebugAddForm addForm) {
PowerDebugEntity powerDebugEntity = SmartBeanUtil.copy(addForm, PowerDebugEntity.class);
setOutage(powerDebugEntity);
powerDebugDao.insert(powerDebugEntity);
return ApiResult.ok();
}
@ -83,6 +84,7 @@ public class PowerDebugService extends ServiceImpl<PowerDebugDao, PowerDebugEnti
*/
public ApiResult<String> update(PowerDebugUpdateForm updateForm) {
PowerDebugEntity powerDebugEntity = SmartBeanUtil.copy(updateForm, PowerDebugEntity.class);
setOutage(powerDebugEntity);
powerDebugDao.updateById(powerDebugEntity);
return ApiResult.ok();
}
@ -120,13 +122,13 @@ public class PowerDebugService extends ServiceImpl<PowerDebugDao, PowerDebugEnti
dataList = SmartExcelUtil.readExcelWithHeaderValidation(file.getInputStream(), PowerDebugExcelVO.class);
// 处理导入的数据例如保存到数据库
List<PowerDebugEntity> list = SmartBeanUtil.copyList(dataList, PowerDebugEntity.class);
SmartMybatisUtil.batchInsert(PowerDebugDao.class, list, 1000);
for (PowerDebugEntity debug : list) {
outageWorkDao.update(Wrappers.<OutageWorkEntity>update().like("inspection_content", debug.getWorkLineName()).eq("date_format(work_start_time,'%Y-%m-%d')", DateUtil.format(debug.getWorkStartTime(), "yyyy-MM-dd")).set("whether_debug", 1));
setOutage(debug);
}
SmartMybatisUtil.batchInsert(PowerDebugDao.class, list, 1000);
} catch (IOException e) {
log.error(e.getMessage(), e);
throw new BusinessException("数据格式存在问题,无法读取");
@ -136,7 +138,15 @@ public class PowerDebugService extends ServiceImpl<PowerDebugDao, PowerDebugEnti
throw new BusinessException("数据为空");
}
return ApiResult.okMsg("成功导入" + dataList.size() + "条,具体数据为:" + JSON.toJSONString(dataList));
return ApiResult.okMsg("成功导入" + dataList.size() + "");
}
private void setOutage(PowerDebugEntity debug) {
OutageWorkEntity entity = outageWorkDao.selectOne(Wrappers.<OutageWorkEntity>query().like("inspection_content", debug.getWorkLineName()).eq("date_format(start_date,'%Y-%m-%d')", DateUtil.format(debug.getWorkStartTime(), "yyyy-MM-dd")));
if (entity != null) {
outageWorkDao.update(Wrappers.<OutageWorkEntity>update().eq("id", entity.getId()).set("whether_debug", 1));
debug.setOutageId(entity.getId());
}
}
public PowerDebugVO getById(Integer id) {

View File

@ -1,7 +1,7 @@
# 开发环境配置
# 端口
server:
port: 18080
port: 18081
# 数据源配置
spring:
datasource:
@ -16,3 +16,6 @@ logging:
level:
com.eleadmin: DEBUG
com.baomidou.mybatisplus: DEBUG
#flowable:
# check-process-definitions: false

View File

@ -17,5 +17,5 @@ logging:
name: ele-admin-api.log
level:
root: WARN
com.eleadmin: ERROR
com.baomidou.mybatisplus: ERROR
com.eleadmin: warn
com.baomidou.mybatisplus: warn

View File

@ -2,7 +2,7 @@
spring:
profiles:
# active: prod
active: dev
active: dev
web:
resources:
static-locations: [ classpath:/model/ ]

Binary file not shown.

Binary file not shown.

View File

@ -10,76 +10,10 @@
<flowable:field name="typeIdStr" stringValue="15"/>
</flowable:taskListener>
<flowable:taskListener delegateExpression="${taskCompleteListener}" event="complete"/>
<flowable:taskListener delegateExpression="${informationCreateListener}" event="create"/>
</extensionElements>
</userTask>
<sequenceFlow id="sid-8ed618b7-9466-44fb-93f3-51e425aae5b4" sourceRef="sid-36642110-c84e-49f2-b1d6-71b1ff58ea1b" targetRef="sid-37699a93-81a6-4da6-a302-5aad32f4773c"/>
<sequenceFlow id="sid-11aeaa3e-26c0-495a-8ddd-c85d377f5e9b" sourceRef="sid-4eef858e-2b35-43eb-83e7-05e3c673cd47" targetRef="sid-36642110-c84e-49f2-b1d6-71b1ff58ea1b"/>
<userTask id="sid-ae7facda-a6e4-4a7a-a7bb-0b9e21e3d135" name="图模成图">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="17"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-c3bffd05-74a7-4d9b-a62c-b15f196f7f97" name="图模审图">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="18"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-ee0ae4ce-1e27-4408-90de-e1e84070c65a" name="图模调试">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="21"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-5fbcb9b2-fa8e-46cc-a8da-5de4e26451d2" name="主配拼接">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="20"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<endEvent id="sid-ee66a4e2-b151-4370-bd7c-4845687e5a35"/>
<sequenceFlow id="sid-317521f8-b84a-49b7-83cf-05152f395818" sourceRef="sid-ae7facda-a6e4-4a7a-a7bb-0b9e21e3d135" targetRef="sid-c3bffd05-74a7-4d9b-a62c-b15f196f7f97"/>
<sequenceFlow id="sid-c319b416-65bd-429d-9f60-1c21fd456601" sourceRef="sid-c3bffd05-74a7-4d9b-a62c-b15f196f7f97" targetRef="sid-84f4c207-974c-4940-b6b2-5b095f067259"/>
<sequenceFlow id="sid-946634c0-5af5-4ee1-9b83-ed1a7100dff5" sourceRef="sid-5fbcb9b2-fa8e-46cc-a8da-5de4e26451d2" targetRef="sid-ee66a4e2-b151-4370-bd7c-4845687e5a35"/>
<exclusiveGateway id="sid-84f4c207-974c-4940-b6b2-5b095f067259"/>
<sequenceFlow id="sid-c864b755-65c2-4930-ab5c-ee031a6725e6" sourceRef="sid-84f4c207-974c-4940-b6b2-5b095f067259" targetRef="sid-1b4f99af-a51e-4eef-9300-38cc9cddeec1">
<conditionExpression xsi:type="tFormalExpression">${isAgree==true}</conditionExpression>
</sequenceFlow>
<exclusiveGateway id="sid-1b4f99af-a51e-4eef-9300-38cc9cddeec1"/>
<sequenceFlow id="sid-b561a9ec-a9e1-4c6e-9723-715c881bdfad" sourceRef="sid-1b4f99af-a51e-4eef-9300-38cc9cddeec1" targetRef="sid-ee0ae4ce-1e27-4408-90de-e1e84070c65a">
<conditionExpression xsi:type="tFormalExpression">${isTest==true}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-f955cf22-9f87-49cf-9d1a-0ec2789c29d7" sourceRef="sid-1b4f99af-a51e-4eef-9300-38cc9cddeec1" targetRef="sid-304c6295-f116-437d-a0e6-ffaa45750f54">
<conditionExpression xsi:type="tFormalExpression">${isTest==false}</conditionExpression>
</sequenceFlow>
<exclusiveGateway id="sid-18171066-f8db-4f07-a19a-0738e11f9b8c"/>
<sequenceFlow id="sid-8b608437-e2ed-4466-a427-b7b762e7c5a7" sourceRef="sid-18171066-f8db-4f07-a19a-0738e11f9b8c" targetRef="sid-5fbcb9b2-fa8e-46cc-a8da-5de4e26451d2">
<conditionExpression xsi:type="tFormalExpression">${isNewCreate==true}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-c5cbd3e2-4f2a-4ac7-9574-30188778f29d" sourceRef="sid-18171066-f8db-4f07-a19a-0738e11f9b8c" targetRef="sid-ee66a4e2-b151-4370-bd7c-4845687e5a35">
<conditionExpression xsi:type="tFormalExpression">${isNewCreate==false}</conditionExpression>
</sequenceFlow>
<userTask id="sid-304c6295-f116-437d-a0e6-ffaa45750f54" name="图模归档">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="19"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sid-e9b76c83-84f1-4fbd-adab-d168cea9289d" sourceRef="sid-304c6295-f116-437d-a0e6-ffaa45750f54" targetRef="sid-18171066-f8db-4f07-a19a-0738e11f9b8c"/>
<userTask id="sid-8fdec0b0-f3c2-4482-9a93-b9756f976d4a" name="图模绘制与推图">
<userTask id="sid-4f3df1fb-185e-4491-b062-762f38b047b0" name="图模绘制与推图">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
@ -87,19 +21,25 @@
</flowable:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sid-d778a146-4557-457f-9929-620c979effc2" sourceRef="sid-84f4c207-974c-4940-b6b2-5b095f067259" targetRef="sid-8fdec0b0-f3c2-4482-9a93-b9756f976d4a">
<conditionExpression xsi:type="tFormalExpression">${isAgree==false}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-4e434ff7-fd4f-4863-b9f2-55fcbc9c951a" sourceRef="sid-ee0ae4ce-1e27-4408-90de-e1e84070c65a" targetRef="sid-304c6295-f116-437d-a0e6-ffaa45750f54"/>
<exclusiveGateway id="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64"/>
<sequenceFlow id="sid-6c02e3f6-7ffd-453e-a455-1c47c76704be" sourceRef="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64" targetRef="sid-ae7facda-a6e4-4a7a-a7bb-0b9e21e3d135">
<conditionExpression xsi:type="tFormalExpression">${isAgree==true}</conditionExpression>
<sequenceFlow id="sid-8ed618b7-9466-44fb-93f3-51e425aae5b4" sourceRef="sid-36642110-c84e-49f2-b1d6-71b1ff58ea1b" targetRef="sid-37699a93-81a6-4da6-a302-5aad32f4773c"/>
<sequenceFlow id="sid-11aeaa3e-26c0-495a-8ddd-c85d377f5e9b" sourceRef="sid-4eef858e-2b35-43eb-83e7-05e3c673cd47" targetRef="sid-36642110-c84e-49f2-b1d6-71b1ff58ea1b"/>
<endEvent id="sid-ee66a4e2-b151-4370-bd7c-4845687e5a35"/>
<exclusiveGateway id="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64" default="sid-6c02e3f6-7ffd-453e-a455-1c47c76704be"/>
<sequenceFlow id="sid-6c02e3f6-7ffd-453e-a455-1c47c76704be" sourceRef="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64" targetRef="sid-88ecc1ae-fcd0-46eb-b0e1-2579895aa04d">
<conditionExpression xsi:type="tFormalExpression"/>
</sequenceFlow>
<sequenceFlow id="sid-38af07fc-5e68-4be1-92ed-502dd550cdf2" sourceRef="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64" targetRef="sid-37699a93-81a6-4da6-a302-5aad32f4773c">
<conditionExpression xsi:type="tFormalExpression">${isAgree==false}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-83779df2-29ea-49a0-9d75-1c3c08e4c0e6" sourceRef="sid-37699a93-81a6-4da6-a302-5aad32f4773c" targetRef="sid-8fdec0b0-f3c2-4482-9a93-b9756f976d4a"/>
<sequenceFlow id="sid-4a972d60-c3ac-475c-9c10-c28471542d12" sourceRef="sid-8fdec0b0-f3c2-4482-9a93-b9756f976d4a" targetRef="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64"/>
<sequenceFlow id="sid-83779df2-29ea-49a0-9d75-1c3c08e4c0e6" sourceRef="sid-37699a93-81a6-4da6-a302-5aad32f4773c" targetRef="sid-4f3df1fb-185e-4491-b062-762f38b047b0"/>
<sequenceFlow id="sid-4a972d60-c3ac-475c-9c10-c28471542d12" sourceRef="sid-4f3df1fb-185e-4491-b062-762f38b047b0" targetRef="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64"/>
<exclusiveGateway id="sid-88ecc1ae-fcd0-46eb-b0e1-2579895aa04d" name="检查是否有可领取子项" default="sid-34c3c353-2838-4266-af51-ad99edc97674"/>
<sequenceFlow id="sid-34c3c353-2838-4266-af51-ad99edc97674" sourceRef="sid-88ecc1ae-fcd0-46eb-b0e1-2579895aa04d" targetRef="sid-43cf7f0b-1af8-4a68-8fca-f461452ff38e"/>
<userTask id="sid-43cf7f0b-1af8-4a68-8fca-f461452ff38e" name="等待子流程完成"/>
<sequenceFlow id="sid-f8834d5c-daa8-481a-b03c-9fa8587fa46c" sourceRef="sid-43cf7f0b-1af8-4a68-8fca-f461452ff38e" targetRef="sid-ee66a4e2-b151-4370-bd7c-4845687e5a35"/>
<sequenceFlow id="sid-f591a573-18db-4013-a658-c093637916ae" sourceRef="sid-88ecc1ae-fcd0-46eb-b0e1-2579895aa04d" targetRef="sid-4f3df1fb-185e-4491-b062-762f38b047b0">
<conditionExpression xsi:type="tFormalExpression">${availableItems.size() &gt; 0}</conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_common-flow">
<bpmndi:BPMNPlane bpmnElement="common-flow" id="BPMNPlane_common-flow">
@ -110,123 +50,63 @@
<omgdc:Bounds x="-325.0" y="-106.28212" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-235f21f7-784f-4eea-b9a7-b36c982dbc2f" bpmnElement="sid-37699a93-81a6-4da6-a302-5aad32f4773c">
<omgdc:Bounds x="-110.0" y="-106.28212" width="100.0" height="80.0"/>
<omgdc:Bounds x="-170.0" y="-106.28212" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-eeb33368-5653-469c-9209-6f3818e92268" bpmnElement="sid-8ed618b7-9466-44fb-93f3-51e425aae5b4">
<omgdi:waypoint x="-225.0" y="-66.28212"/>
<omgdi:waypoint x="-110.0" y="-66.28212"/>
<omgdi:waypoint x="-170.0" y="-66.28212"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-f94f87bb-567f-4733-9136-3dfcaf8b4902" bpmnElement="sid-11aeaa3e-26c0-495a-8ddd-c85d377f5e9b">
<omgdi:waypoint x="-360.0" y="-66.28212"/>
<omgdi:waypoint x="-325.0" y="-66.28212"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-bf236526-38e8-4cdf-baf5-a1a9f2b014d3" bpmnElement="sid-ae7facda-a6e4-4a7a-a7bb-0b9e21e3d135">
<omgdc:Bounds x="305.0" y="-106.28212" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-d8b4f3ca-1dfa-4ac5-afb4-bb8ff42e61d9" bpmnElement="sid-c3bffd05-74a7-4d9b-a62c-b15f196f7f97">
<omgdc:Bounds x="305.00003" y="15.0" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-8ed7ea0b-387b-4819-a87f-19293f3cd541" bpmnElement="sid-ee0ae4ce-1e27-4408-90de-e1e84070c65a">
<omgdc:Bounds x="15.0" y="14.211575" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-ee8de8b0-3fa3-4c1e-a492-6e58e7914c2c" bpmnElement="sid-5fbcb9b2-fa8e-46cc-a8da-5de4e26451d2">
<omgdc:Bounds x="-325.0" y="14.999996" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-12d39ca3-a64e-4767-b6e6-404783d643c4" bpmnElement="sid-ee66a4e2-b151-4370-bd7c-4845687e5a35">
<omgdc:Bounds x="-390.0" y="40.0" width="30.0" height="30.0"/>
<omgdc:Bounds x="205.0" y="238.7179" width="30.0" height="30.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-ebe43c1e-0a8d-4247-9713-78de428372c0" bpmnElement="sid-317521f8-b84a-49b7-83cf-05152f395818">
<omgdi:waypoint x="355.0" y="-26.28212"/>
<omgdi:waypoint x="355.0" y="15.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-d97d6d5a-564b-4879-932f-f1505c6bf7ed" bpmnElement="sid-c319b416-65bd-429d-9f60-1c21fd456601">
<omgdi:waypoint x="305.00003" y="55.0"/>
<omgdi:waypoint x="240.0" y="55.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-342cb91e-2e6a-4dc7-8d83-680387ef8317" bpmnElement="sid-2e4daf0e-f342-4367-bb9d-1a38563285e7">
<omgdi:waypoint x="25.0" y="55.0"/>
<omgdi:waypoint x="-10.0" y="55.000004"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-3e59c5a2-cbee-4e13-bd90-9b70e3425e04" bpmnElement="sid-946634c0-5af5-4ee1-9b83-ed1a7100dff5">
<omgdi:waypoint x="-325.0" y="54.999996"/>
<omgdi:waypoint x="-360.0" y="55.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-786a7c29-d22f-4509-a338-b730e2ca06f6" bpmnElement="sid-84f4c207-974c-4940-b6b2-5b095f067259">
<omgdc:Bounds x="200.0" y="35.0" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-b13aa4cf-05b3-4a18-9243-ff1d7f1a3901" bpmnElement="sid-c864b755-65c2-4930-ab5c-ee031a6725e6">
<omgdi:waypoint x="200.0" y="55.0"/>
<omgdi:waypoint x="190.0" y="55.0"/>
<omgdi:waypoint x="180.0" y="55.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-7ea23bb6-e1c8-49e9-9581-c2792941e08f" bpmnElement="sid-1b4f99af-a51e-4eef-9300-38cc9cddeec1">
<omgdc:Bounds x="140.0" y="35.0" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-e19c4956-96bf-4940-aae9-176b6eb4b86d" bpmnElement="sid-b561a9ec-a9e1-4c6e-9723-715c881bdfad">
<omgdi:waypoint x="140.0" y="55.0"/>
<omgdi:waypoint x="115.0" y="54.211575"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-a0ace6a4-12e6-4132-aa10-8916e213ce05" bpmnElement="sid-f955cf22-9f87-49cf-9d1a-0ec2789c29d7">
<omgdi:waypoint x="160.0" y="75.0"/>
<omgdi:waypoint x="160.0" y="165.0"/>
<omgdi:waypoint x="-60.0" y="165.0"/>
<omgdi:waypoint x="-60.0" y="95.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-c2b58a19-2898-471c-840b-6a604285467a" bpmnElement="sid-18171066-f8db-4f07-a19a-0738e11f9b8c">
<omgdc:Bounds x="-195.0" y="35.0" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-36f95c87-c9a5-4045-8f92-0977817526a1" bpmnElement="sid-8b608437-e2ed-4466-a427-b7b762e7c5a7">
<omgdi:waypoint x="-195.0" y="55.0"/>
<omgdi:waypoint x="-225.0" y="54.999996"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-e0fd3d88-c73c-47c1-91a9-cad3dac6c2d7" bpmnElement="sid-c5cbd3e2-4f2a-4ac7-9574-30188778f29d">
<omgdi:waypoint x="-175.0" y="74.99999"/>
<omgdi:waypoint x="-175.0" y="164.99998"/>
<omgdi:waypoint x="-374.50003" y="164.99997"/>
<omgdi:waypoint x="-375.0" y="70.00001"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-dc282c9b-3c66-4377-897c-23b87662b54b" bpmnElement="sid-304c6295-f116-437d-a0e6-ffaa45750f54">
<omgdc:Bounds x="-110.0" y="15.000004" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-61b47b29-98a9-42db-a53f-56ac3d72bb91" bpmnElement="sid-e9b76c83-84f1-4fbd-adab-d168cea9289d">
<omgdi:waypoint x="-110.0" y="55.000004"/>
<omgdi:waypoint x="-155.0" y="55.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-76f9be07-9d8f-45b2-995d-ead321887c44" bpmnElement="sid-8fdec0b0-f3c2-4482-9a93-b9756f976d4a">
<omgdc:Bounds x="39.999985" y="-106.28213" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-189d1a0e-17fd-4722-a09e-ecb8804bcea0" bpmnElement="sid-d778a146-4557-457f-9929-620c979effc2">
<omgdi:waypoint x="220.0" y="35.0"/>
<omgdi:waypoint x="220.0" y="-3.8146973E-6"/>
<omgdi:waypoint x="90.0" y="-3.8146973E-6"/>
<omgdi:waypoint x="89.999985" y="-26.282127"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-103a470e-a6d7-452a-871d-408f9609b356" bpmnElement="sid-4e434ff7-fd4f-4863-b9f2-55fcbc9c951a">
<omgdi:waypoint x="15.0" y="54.211575"/>
<omgdi:waypoint x="-10.0" y="55.000004"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-72a6b2ee-5834-4784-bee5-0f0a6a5208ca" bpmnElement="sid-95690dc8-bd7e-4d69-a030-a79ca599ed64">
<omgdc:Bounds x="200.0" y="-86.28212" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-25384398-8ce0-4273-8a37-9490f923932e" bpmnElement="sid-6c02e3f6-7ffd-453e-a455-1c47c76704be">
<omgdi:waypoint x="240.0" y="-66.28212"/>
<omgdi:waypoint x="272.5" y="-66.28212"/>
<omgdi:waypoint x="304.99997" y="-66.28212"/>
<omgdi:waypoint x="220.0" y="-46.28212"/>
<omgdi:waypoint x="220.0" y="5.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-8b5a83f6-6860-4fff-8719-6e39cf0d9d3f" bpmnElement="sid-38af07fc-5e68-4be1-92ed-502dd550cdf2">
<omgdi:waypoint x="220.0" y="-86.28212"/>
<omgdi:waypoint x="220.0" y="-136.28212"/>
<omgdi:waypoint x="-60.0" y="-136.28214"/>
<omgdi:waypoint x="-60.0" y="-106.28212"/>
<omgdi:waypoint x="-120.0" y="-136.2821"/>
<omgdi:waypoint x="-120.0" y="-106.28212"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-e810e287-7993-436d-84f2-839d1d3a6920" bpmnElement="sid-83779df2-29ea-49a0-9d75-1c3c08e4c0e6">
<omgdi:waypoint x="-10.0" y="-66.28212"/>
<omgdi:waypoint x="39.999985" y="-66.28213"/>
<omgdi:waypoint x="-70.0" y="-66.28212"/>
<omgdi:waypoint x="34.999985" y="-66.28212"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-abb7f7b5-a573-453c-9fd8-9a71751eab85" bpmnElement="sid-4a972d60-c3ac-475c-9c10-c28471542d12">
<omgdi:waypoint x="139.99998" y="-66.28213"/>
<omgdi:waypoint x="134.99998" y="-66.28212"/>
<omgdi:waypoint x="200.0" y="-66.28212"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-555124ed-41be-421c-a082-ba4ced897f07" bpmnElement="sid-4f3df1fb-185e-4491-b062-762f38b047b0">
<omgdc:Bounds x="34.999985" y="-106.28212" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-82988540-f20d-45ec-a39f-b5c37c0b9f75" bpmnElement="sid-88ecc1ae-fcd0-46eb-b0e1-2579895aa04d">
<omgdc:Bounds x="199.99998" y="5.0" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-909ece52-8751-4e47-9cf2-dde19b2cbd18" bpmnElement="sid-34c3c353-2838-4266-af51-ad99edc97674">
<omgdi:waypoint x="219.99998" y="45.0"/>
<omgdi:waypoint x="220.0" y="57.500004"/>
<omgdi:waypoint x="220.0" y="70.00001"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-aa32faee-4330-40e2-8542-fc58293e6853" bpmnElement="sid-43cf7f0b-1af8-4a68-8fca-f461452ff38e">
<omgdc:Bounds x="170.0" y="70.0" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-de86280d-52c9-45b6-a51c-a8eefbb91d4e" bpmnElement="sid-f8834d5c-daa8-481a-b03c-9fa8587fa46c">
<omgdi:waypoint x="220.0" y="150.0"/>
<omgdi:waypoint x="220.0" y="238.7179"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-e26f2176-4637-4e33-9e02-0c36166133da" bpmnElement="sid-f591a573-18db-4013-a658-c093637916ae">
<omgdi:waypoint x="199.99998" y="25.0"/>
<omgdi:waypoint x="84.999985" y="25.0"/>
<omgdi:waypoint x="84.999985" y="-26.28212"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

View File

@ -0,0 +1,266 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef">
<process id="sub-flow" name="sub-flow" isExecutable="true">
<startEvent id="sid-f2612566-320f-4051-82d4-59487b506e66"/>
<endEvent id="sid-8029f586-ccb0-49b4-9417-0e070b220fcb">
<extensionElements>
<flowable:taskListener delegateExpression="${subProcessCompleteListener}" event="complete"/>
</extensionElements>
</endEvent>
<userTask id="sid-330ba823-2e5e-411e-a9fc-e33fafe0264a" name="图模绘制与推图">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="16"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-217c51b4-5d2a-4a73-8759-01a1ac791264" name="图模成图">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="17"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-93978fcd-2a4f-4936-aa19-45dff9aff302" name="图模审图">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="18"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-931fe628-2bbd-4b8d-b926-564887ba3df4" name="图模归档">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="19"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-773da006-b740-4ccc-b7ac-5e5c87747b72" name="主配拼接">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="20"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-5495e8b0-a7dd-4ca8-a4b6-be72177b237c" name="图模调试">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="21"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<exclusiveGateway id="sid-cf23322a-da29-4627-afd3-51768152d2fe"/>
<exclusiveGateway id="sid-3ff0f202-160e-480b-ab6e-b9e78c315e33"/>
<exclusiveGateway id="sid-7fabfd45-4633-4486-a8c5-6a71618aa1df" default="sid-1783f410-c43a-4cfd-8ef2-b9a5cdfb71f3"/>
<sequenceFlow id="sid-9707f62c-c62d-4570-bdab-7fd9b270fa25" sourceRef="sid-217c51b4-5d2a-4a73-8759-01a1ac791264" targetRef="sid-faee48cb-6cd6-4738-bd5d-e4e5900ae0cf"/>
<sequenceFlow id="sid-3f60e7d6-85dc-43e0-b1e1-9ec475eca19f" sourceRef="sid-93978fcd-2a4f-4936-aa19-45dff9aff302" targetRef="sid-cf23322a-da29-4627-afd3-51768152d2fe"/>
<sequenceFlow id="sid-55d9dad4-6905-4690-989d-55494e8475bb" sourceRef="sid-773da006-b740-4ccc-b7ac-5e5c87747b72" targetRef="sid-b1b5c056-723e-4c41-90da-53e88917ddb8"/>
<sequenceFlow id="sid-478bda22-cad3-4531-bd33-2fb887aa9e8b" sourceRef="sid-cf23322a-da29-4627-afd3-51768152d2fe" targetRef="sid-3ff0f202-160e-480b-ab6e-b9e78c315e33">
<conditionExpression xsi:type="tFormalExpression">${isAgree==true}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-c360c92d-73c3-405d-96be-8ddd244a3ba2" sourceRef="sid-3ff0f202-160e-480b-ab6e-b9e78c315e33" targetRef="sid-5495e8b0-a7dd-4ca8-a4b6-be72177b237c">
<conditionExpression xsi:type="tFormalExpression">${isTest==true}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-be3d4e74-390c-44bc-8c27-33d0fbe15784" sourceRef="sid-3ff0f202-160e-480b-ab6e-b9e78c315e33" targetRef="sid-931fe628-2bbd-4b8d-b926-564887ba3df4">
<conditionExpression xsi:type="tFormalExpression">${isTest==false}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-1783f410-c43a-4cfd-8ef2-b9a5cdfb71f3" sourceRef="sid-7fabfd45-4633-4486-a8c5-6a71618aa1df" targetRef="sid-773da006-b740-4ccc-b7ac-5e5c87747b72">
<conditionExpression xsi:type="tFormalExpression"/>
</sequenceFlow>
<sequenceFlow id="sid-01d9460b-b443-4132-a86a-86e46c6ffe01" sourceRef="sid-7fabfd45-4633-4486-a8c5-6a71618aa1df" targetRef="sid-b1b5c056-723e-4c41-90da-53e88917ddb8">
<conditionExpression xsi:type="tFormalExpression">${createNew==false}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-86624446-4700-4f57-9ce8-57bd6a6d60ad" sourceRef="sid-931fe628-2bbd-4b8d-b926-564887ba3df4" targetRef="sid-6e455a1b-7fad-44c9-b2e7-ba84649eaa10"/>
<sequenceFlow id="sid-fba2b32d-52ce-47d6-be94-2daa3beec9f1" sourceRef="sid-cf23322a-da29-4627-afd3-51768152d2fe" targetRef="sid-330ba823-2e5e-411e-a9fc-e33fafe0264a">
<conditionExpression xsi:type="tFormalExpression">${isAgree==false}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-fc5baf76-2520-4218-b509-95419a1b031f" sourceRef="sid-5495e8b0-a7dd-4ca8-a4b6-be72177b237c" targetRef="sid-931fe628-2bbd-4b8d-b926-564887ba3df4"/>
<sequenceFlow id="sid-9a8cc398-5dd5-472e-bd5e-e7f6eace0e82" sourceRef="sid-f2612566-320f-4051-82d4-59487b506e66" targetRef="sid-330ba823-2e5e-411e-a9fc-e33fafe0264a"/>
<sequenceFlow id="sid-2a255564-175f-43df-8d47-5d368eb7f963" sourceRef="sid-330ba823-2e5e-411e-a9fc-e33fafe0264a" targetRef="sid-217c51b4-5d2a-4a73-8759-01a1ac791264"/>
<serviceTask id="sid-b1b5c056-723e-4c41-90da-53e88917ddb8" flowable:exclusive="true" name="修改主流程" flowable:delegateExpression="${subProcessCompleteListener}"/>
<sequenceFlow id="sid-6525a02d-4612-4f1b-8b1c-0fecda58d2bd" sourceRef="sid-b1b5c056-723e-4c41-90da-53e88917ddb8" targetRef="sid-8029f586-ccb0-49b4-9417-0e070b220fcb"/>
<userTask id="sid-d5025022-5f78-4995-b377-b77100ac20fa" name="新建索引">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="17"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<exclusiveGateway id="sid-faee48cb-6cd6-4738-bd5d-e4e5900ae0cf" default="sid-30ea626d-bb9b-4d10-999b-b878481ae478"/>
<sequenceFlow id="sid-30ea626d-bb9b-4d10-999b-b878481ae478" sourceRef="sid-faee48cb-6cd6-4738-bd5d-e4e5900ae0cf" targetRef="sid-d5025022-5f78-4995-b377-b77100ac20fa">
<conditionExpression xsi:type="tFormalExpression"/>
</sequenceFlow>
<sequenceFlow id="sid-65e79f49-6302-4ac4-a782-0d46b7260a61" sourceRef="sid-d5025022-5f78-4995-b377-b77100ac20fa" targetRef="sid-93978fcd-2a4f-4936-aa19-45dff9aff302"/>
<sequenceFlow id="sid-3dcfe275-b928-4ebc-9605-46e8051e3215" sourceRef="sid-faee48cb-6cd6-4738-bd5d-e4e5900ae0cf" targetRef="sid-93978fcd-2a4f-4936-aa19-45dff9aff302">
<conditionExpression xsi:type="tFormalExpression">${createNew==false}</conditionExpression>
</sequenceFlow>
<userTask id="sid-e84e7fa9-8e70-4d1d-a6c1-4130515467f9" name="删除旧图">
<extensionElements>
<flowable:taskListener delegateExpression="${taskCreateListener}" event="create">
<flowable:field name="type" stringValue="2"/>
<flowable:field name="typeIdStr" stringValue="17"/>
</flowable:taskListener>
</extensionElements>
</userTask>
<exclusiveGateway id="sid-6e455a1b-7fad-44c9-b2e7-ba84649eaa10" default="sid-447bcc5e-1348-4e88-b9b1-f95f1612682d"/>
<sequenceFlow id="sid-447bcc5e-1348-4e88-b9b1-f95f1612682d" sourceRef="sid-6e455a1b-7fad-44c9-b2e7-ba84649eaa10" targetRef="sid-e84e7fa9-8e70-4d1d-a6c1-4130515467f9">
<conditionExpression xsi:type="tFormalExpression"/>
</sequenceFlow>
<sequenceFlow id="sid-e86e06c2-0d33-46d8-9c0c-c7df4e600a81" sourceRef="sid-e84e7fa9-8e70-4d1d-a6c1-4130515467f9" targetRef="sid-7fabfd45-4633-4486-a8c5-6a71618aa1df"/>
<sequenceFlow id="sid-73b43382-0916-412f-a260-d257a836db9a" sourceRef="sid-6e455a1b-7fad-44c9-b2e7-ba84649eaa10" targetRef="sid-7fabfd45-4633-4486-a8c5-6a71618aa1df">
<conditionExpression>${scrapOld==false}</conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_sub-flow">
<bpmndi:BPMNPlane bpmnElement="sub-flow" id="BPMNPlane_sub-flow">
<bpmndi:BPMNShape id="shape-03fe5abe-5b30-40cd-a3df-1efae647a963" bpmnElement="sid-f2612566-320f-4051-82d4-59487b506e66">
<omgdc:Bounds x="-365.0" y="-50.0" width="30.0" height="30.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-44ef1d1e-c051-4d2a-9e03-fa84619cb6d3" bpmnElement="sid-8029f586-ccb0-49b4-9417-0e070b220fcb">
<omgdc:Bounds x="-500.0" y="190.85217" width="30.0" height="30.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-70a69065-152d-404d-8cc3-96a16be83b45" bpmnElement="sid-217c51b4-5d2a-4a73-8759-01a1ac791264">
<omgdc:Bounds x="-123.7135" y="-75.0" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-7929686a-3aae-435b-ab28-5f76f976f42e" bpmnElement="sid-93978fcd-2a4f-4936-aa19-45dff9aff302">
<omgdc:Bounds x="278.4883" y="-75.0" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-d31be72b-fe08-4323-9b84-a2d260d50a85" bpmnElement="sid-5495e8b0-a7dd-4ca8-a4b6-be72177b237c">
<omgdc:Bounds x="326.28647" y="165.85219" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-43aad746-bcb2-47fd-8303-556037bf5313" bpmnElement="sid-773da006-b740-4ccc-b7ac-5e5c87747b72">
<omgdc:Bounds x="-283.71353" y="165.85217" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-1b89574b-9d8a-4ead-b0e9-bd3dca4ec718" bpmnElement="sid-cf23322a-da29-4627-afd3-51768152d2fe">
<omgdc:Bounds x="511.2865" y="185.85219" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-6844c0fe-b365-454e-ad31-ca5df2708707" bpmnElement="sid-3ff0f202-160e-480b-ab6e-b9e78c315e33">
<omgdc:Bounds x="451.2865" y="185.85219" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-ab92be91-3d43-476e-8505-77d08849f0d3" bpmnElement="sid-7fabfd45-4633-4486-a8c5-6a71618aa1df">
<omgdc:Bounds x="-153.71353" y="185.85217" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-d4d69b21-9193-47ab-8475-7f84ddf401de" bpmnElement="sid-931fe628-2bbd-4b8d-b926-564887ba3df4">
<omgdc:Bounds x="201.28647" y="165.85219" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="sid-296b6120-3f10-49d3-aff5-d3c5073e02c4" bpmnElement="sid-330ba823-2e5e-411e-a9fc-e33fafe0264a">
<omgdc:Bounds x="-268.71356" y="-75.0" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="sid-1fdfffea-64a6-46ef-b9ed-7f1108f40c64" bpmnElement="sid-9707f62c-c62d-4570-bdab-7fd9b270fa25">
<omgdi:waypoint x="-23.713501" y="-35.0"/>
<omgdi:waypoint x="15.0" y="-35.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-13be75e4-33f6-4144-8f51-2960d75930a6" bpmnElement="sid-3f60e7d6-85dc-43e0-b1e1-9ec475eca19f">
<omgdi:waypoint x="378.48828" y="-35.0"/>
<omgdi:waypoint x="626.2865" y="-34.999996"/>
<omgdi:waypoint x="626.2865" y="205.85217"/>
<omgdi:waypoint x="551.2865" y="205.85219"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-fcc330ed-d868-42c0-be59-518eb362e747" bpmnElement="sid-55d9dad4-6905-4690-989d-55494e8475bb">
<omgdi:waypoint x="-283.71353" y="205.85217"/>
<omgdi:waypoint x="-325.0" y="205.85217"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-c3950913-0efc-4b7e-9875-3d355ddda071" bpmnElement="sid-478bda22-cad3-4531-bd33-2fb887aa9e8b">
<omgdi:waypoint x="511.2865" y="205.85219"/>
<omgdi:waypoint x="501.2865" y="205.85219"/>
<omgdi:waypoint x="491.2865" y="205.85219"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-35115b46-d59f-4b99-bf70-8883cfa23b9c" bpmnElement="sid-c360c92d-73c3-405d-96be-8ddd244a3ba2">
<omgdi:waypoint x="451.2865" y="205.85219"/>
<omgdi:waypoint x="426.28647" y="205.85219"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-449fc535-e61b-4d55-a76b-1301114a1b1e" bpmnElement="sid-be3d4e74-390c-44bc-8c27-33d0fbe15784">
<omgdi:waypoint x="471.2865" y="225.85219"/>
<omgdi:waypoint x="471.2865" y="290.85217"/>
<omgdi:waypoint x="251.28647" y="290.85217"/>
<omgdi:waypoint x="251.28647" y="245.85219"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-8f30d159-baf6-4d00-9849-fa8774b14304" bpmnElement="sid-1783f410-c43a-4cfd-8ef2-b9a5cdfb71f3">
<omgdi:waypoint x="-153.71353" y="205.85217"/>
<omgdi:waypoint x="-183.71353" y="205.85217"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-b71d838e-0582-4983-886d-6808cae55f57" bpmnElement="sid-01d9460b-b443-4132-a86a-86e46c6ffe01">
<omgdi:waypoint x="-133.71353" y="225.85217"/>
<omgdi:waypoint x="-133.71353" y="290.85217"/>
<omgdi:waypoint x="-379.69186" y="290.85214"/>
<omgdi:waypoint x="-379.69186" y="246.17981"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-53c92334-3bde-4ec2-bd5f-86d5410b5802" bpmnElement="sid-86624446-4700-4f57-9ce8-57bd6a6d60ad">
<omgdi:waypoint x="201.28647" y="205.85219"/>
<omgdi:waypoint x="145.0" y="205.85214"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-a81358dc-120f-4f77-aef2-8b889cb386b7" bpmnElement="sid-fba2b32d-52ce-47d6-be94-2daa3beec9f1">
<omgdi:waypoint x="531.2865" y="185.85219"/>
<omgdi:waypoint x="531.2865" y="85.85218"/>
<omgdi:waypoint x="-218.7135" y="85.85217"/>
<omgdi:waypoint x="-218.7135" y="5.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="sid-a4b2bed5-5609-4a39-a644-1a065519ecee" bpmnElement="sid-fc5baf76-2520-4218-b509-95419a1b031f">
<omgdi:waypoint x="326.28647" y="205.85219"/>
<omgdi:waypoint x="301.28647" y="205.85219"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-fe843a24-918a-45dd-9b9f-135d288a27af" bpmnElement="sid-9a8cc398-5dd5-472e-bd5e-e7f6eace0e82">
<omgdi:waypoint x="-335.0" y="-35.0"/>
<omgdi:waypoint x="-268.71356" y="-35.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-14f9b99a-1d1a-4fb7-8b12-a94b190ff8bb" bpmnElement="sid-2a255564-175f-43df-8d47-5d368eb7f963">
<omgdi:waypoint x="-168.71356" y="-35.0"/>
<omgdi:waypoint x="-123.7135" y="-35.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-4ce4d81c-57af-426e-9f19-64e87dd03f25" bpmnElement="sid-b1b5c056-723e-4c41-90da-53e88917ddb8">
<omgdc:Bounds x="-425.0" y="165.85217" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-e1f7ddfd-1a68-42b0-a793-e4ee87c39d21" bpmnElement="sid-6525a02d-4612-4f1b-8b1c-0fecda58d2bd">
<omgdi:waypoint x="-424.99997" y="205.85217"/>
<omgdi:waypoint x="-470.00003" y="205.85217"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-2c72ce19-f9b0-493c-9167-85f67e7c564b" bpmnElement="sid-d5025022-5f78-4995-b377-b77100ac20fa">
<omgdc:Bounds x="85.000015" y="-75.0" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-25b318d7-dcb4-4fe0-a51c-37b9b306add0" bpmnElement="sid-faee48cb-6cd6-4738-bd5d-e4e5900ae0cf">
<omgdc:Bounds x="15.0" y="-55.0" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-09b9575e-49e2-4929-8a89-94460bc81692" bpmnElement="sid-30ea626d-bb9b-4d10-999b-b878481ae478">
<omgdi:waypoint x="55.0" y="-35.0"/>
<omgdi:waypoint x="85.000015" y="-35.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-baa8a6c6-26ac-42fb-a4da-e3bbe36182ae" bpmnElement="sid-65e79f49-6302-4ac4-a782-0d46b7260a61">
<omgdi:waypoint x="185.00002" y="-35.0"/>
<omgdi:waypoint x="278.4883" y="-35.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-5ab761bc-d8cd-48b6-8bfe-19e3a9b09d72" bpmnElement="sid-3dcfe275-b928-4ebc-9605-46e8051e3215">
<omgdi:waypoint x="35.0" y="-55.0"/>
<omgdi:waypoint x="35.0" y="-120.0"/>
<omgdi:waypoint x="328.48828" y="-120.00001"/>
<omgdi:waypoint x="328.4883" y="-75.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="shape-83a584ae-d2c6-4b73-89e2-c7dcb61d790a" bpmnElement="sid-e84e7fa9-8e70-4d1d-a6c1-4130515467f9">
<omgdc:Bounds x="-48.71353" y="165.85219" width="100.0" height="80.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape-c3e7b7a3-c268-44cb-8dd9-55cb4f829a9a" bpmnElement="sid-6e455a1b-7fad-44c9-b2e7-ba84649eaa10">
<omgdc:Bounds x="105.0" y="185.85217" width="40.0" height="40.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge-d009d096-178c-4992-b20e-ce3cacd7c92f" bpmnElement="sid-447bcc5e-1348-4e88-b9b1-f95f1612682d">
<omgdi:waypoint x="105.0" y="205.85217"/>
<omgdi:waypoint x="51.28647" y="205.85219"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-cd723ee8-b1ed-4d41-9413-b7f468d53c08" bpmnElement="sid-e86e06c2-0d33-46d8-9c0c-c7df4e600a81">
<omgdi:waypoint x="-48.71353" y="205.85219"/>
<omgdi:waypoint x="-113.71353" y="205.85217"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge-e848f9a1-c46f-479b-8254-2756cf8a1723" bpmnElement="sid-73b43382-0916-412f-a260-d257a836db9a">
<omgdi:waypoint x="125.0" y="185.85216"/>
<omgdi:waypoint x="125.0" y="135.8522"/>
<omgdi:waypoint x="-133.71353" y="135.85219"/>
<omgdi:waypoint x="-133.71353" y="185.85217"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

View File

@ -4,6 +4,8 @@ import org.junit.jupiter.api.Test;
import com.eleadmin.common.core.security.JwtUtil;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import cn.hutool.core.text.Simhash;
import cn.hutool.core.text.TextSimilarity;
/**
* Created by EleAdmin on 2020-03-23 23:37
@ -39,7 +41,6 @@ public class TestMain {
@Test
public void test() {
}
}