rev:流程引擎
This commit is contained in:
@@ -7,12 +7,14 @@ import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.flow_manage.flow.framework.engine.cmd.CommandExecutor;
|
||||
import org.nl.wms.flow_manage.flow.framework.engine.cmd.unify.impl.StartInstanceCmd;
|
||||
import org.nl.wms.flow_manage.flow.framework.entity.ExecutionEntity;
|
||||
import org.nl.wms.flow_manage.flow.service.deployment.IActReProcdefService;
|
||||
import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef;
|
||||
import org.nl.wms.flow_manage.flow.service.enums.TaskTypeEnum;
|
||||
import org.nl.wms.flow_manage.flow.service.model.IActDeModelService;
|
||||
import org.nl.wms.flow_manage.flow.service.model.dao.ActDeModel;
|
||||
import org.nl.wms.flow_manage.flow.service.model.dto.ModelInfoVo;
|
||||
@@ -25,6 +27,11 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -56,6 +63,7 @@ public class ActDeModelController {
|
||||
dto.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
dto.setCreate_time(DateUtil.now());
|
||||
dto.setId(IdUtil.getStringId());
|
||||
dto.setModel_key(IdUtil.getStringId());
|
||||
modelService.save(dto);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@@ -101,5 +109,26 @@ public class ActDeModelController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/getTaskTypes", produces = "application/json")
|
||||
public ResponseEntity<Object> startByModelId() {
|
||||
List<Map<String, String>> list = Stream.of(TaskTypeEnum.values())
|
||||
.map(enumItem -> {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("value", enumItem.getValue());
|
||||
map.put("label", enumItem.getLabel());
|
||||
return map;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
return new ResponseEntity<>(list, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getStrategyList", produces = "application/json")
|
||||
public ResponseEntity<Object> getStrategyList() {
|
||||
//TODO 需要从出入库策略表查询返回value和label
|
||||
return new ResponseEntity<>(null, HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.flow_manage.flow.service.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author Gengby
|
||||
* @Date 2024/4/19
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum TaskTypeEnum {
|
||||
EXPRESSION("1", "表达式"),
|
||||
CLASS("2", "类"),
|
||||
MAPPING("3", "映射"),
|
||||
STRATEGY("4", "策略");
|
||||
|
||||
private final String value;
|
||||
private final String label;
|
||||
}
|
||||
@@ -9,7 +9,7 @@ spring:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:password}
|
||||
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
|
||||
Reference in New Issue
Block a user