feat(taskflow): 添加作业步骤查询功能并更新系统配置
- 新增getFlowByWorkType接口用于获取指定作业类型的步骤信息
- 在TaskFlowController中添加/getFlowByWorkType/{workType} REST端点
- 实现TaskFlowQueryExe中的getFlowByWorkType业务逻辑
- 更新nacos.yml配置文件,设置环境为prod并添加用户名密码认证
- 修改sdk.yml中的app-key和uri配置,将负载均衡改为直连模式
- 在EightworkInfo相关DTO和实体类中新增gasFlag字段支持气体检测标识
- 在MeasuresLogs相关DTO和实体类中新增signPath字段支持签字功能
- 在TaskLogPageQry中新增eqCurrentStep字段用于当前步骤查询
- 更新.gitignore文件,忽略nacos和templates目录
master
parent
040673973e
commit
34c34f4b29
|
|
@ -36,3 +36,5 @@ build/
|
|||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
/start/src/main/resources/templates/
|
||||
/start/src/main/resources/nacos/
|
||||
|
|
|
|||
|
|
@ -11,12 +11,14 @@ spring:
|
|||
name: ${application.name}${application.version}
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: test
|
||||
active: prod
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
namespace: ${nacos.namespace}
|
||||
server-addr: ${nacos.url}
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- config-common.yml
|
||||
|
|
@ -36,3 +38,5 @@ spring:
|
|||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
namespace: ${spring.cloud.nacos.config.namespace}
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
sdk:
|
||||
server:
|
||||
app-key: 722091ff53dd4abba078c2a00efd4a42
|
||||
app-key: 2b6c5d517947438bab66b8da0daf68a4
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
|
|
@ -14,7 +14,7 @@ sdk:
|
|||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: lb://${application.name}
|
||||
uri: http://${application.name}
|
||||
path: /${application.gateway}/**
|
||||
- client:
|
||||
system-code: ${application.name}-container
|
||||
|
|
@ -25,7 +25,7 @@ sdk:
|
|||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: lb://jjb-saas-base
|
||||
uri: http://jjb-saas-base
|
||||
path: /${application.gateway}/container/**
|
||||
order: -2
|
||||
openapi:
|
||||
|
|
|
|||
|
|
@ -57,12 +57,19 @@ public class TaskFlowController {
|
|||
return SingleResponse.of(taskFlowService.getFlowInit(qry));
|
||||
}
|
||||
|
||||
@ApiOperation("获取作业步骤")
|
||||
@GetMapping("/getFlowByWorkType/{workType}")
|
||||
public MultiResponse<TaskFlowCO> getFlowByWorkType(@PathVariable("workType") String workType) {
|
||||
return MultiResponse.of(taskFlowService.getFlowByWorkType(workType));
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<TaskFlowCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new TaskFlowCO());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public Response remove(@PathVariable("id") Long id) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.zcloud.eightwork.command.query;
|
|||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.eightwork.command.convertor.EightworkTaskCoConvertor;
|
||||
import com.zcloud.eightwork.command.convertor.TaskFlowCoConvertor;
|
||||
|
|
@ -36,7 +37,7 @@ public class TaskFlowQueryExe {
|
|||
private final TaskFlowRepository taskFlowRepository;
|
||||
private final TaskFlowCoConvertor taskFlowCoConvertor;
|
||||
private final EightworkTaskRepository eightworkTaskRepository;
|
||||
private final EightworkTaskCoConvertor eightworkTaskCoConvertor;
|
||||
private final EightworkTaskCoConvertor eightworkTaskCoConvertor;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
|
|
@ -62,6 +63,7 @@ public class TaskFlowQueryExe {
|
|||
));
|
||||
return taskWorkInitCO;
|
||||
}
|
||||
|
||||
public TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry) {
|
||||
List<TaskFlowDO> flows = taskFlowRepository.listAllByWorkType(qry.getWorkType(), qry.getWorkLevel());
|
||||
TaskFlowInitCO taskFlowInitCO = new TaskFlowInitCO();
|
||||
|
|
@ -73,5 +75,19 @@ public class TaskFlowQueryExe {
|
|||
|
||||
return taskFlowInitCO;
|
||||
}
|
||||
|
||||
public List<TaskFlowCO> getFlowByWorkType(String workType) {
|
||||
List<EightworkTaskDO> taskDOs = eightworkTaskRepository.list(new LambdaQueryWrapper<EightworkTaskDO>().eq(EightworkTaskDO::getWorkType, workType));
|
||||
List<Long> taskIds = taskDOs.stream().map(EightworkTaskDO::getId).collect(Collectors.toList());
|
||||
|
||||
List<TaskFlowDO> flows = taskFlowRepository.list(new QueryWrapper<TaskFlowDO>()
|
||||
.select("DISTINCT step_id")
|
||||
.select("step_name")
|
||||
.in("task_id", taskIds)
|
||||
.ne("step_id", 1)
|
||||
.orderByAsc("step_order"));
|
||||
|
||||
return taskFlowCoConvertor.converDOsToCOs(flows);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,5 +67,10 @@ public class TaskFlowServiceImpl implements TaskFlowServiceI {
|
|||
public TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry){
|
||||
return taskFlowQueryExe.getFlowInit(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskFlowCO> getFlowByWorkType(String workType){
|
||||
return taskFlowQueryExe.getFlowByWorkType(workType);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,5 +31,7 @@ public interface TaskFlowServiceI {
|
|||
|
||||
|
||||
TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry);
|
||||
|
||||
List<TaskFlowCO> getFlowByWorkType(String workType);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ public class EightworkInfoAddCmd extends Command {
|
|||
@NotNull(message = "相关方id不能为空")
|
||||
private Long xgfId;
|
||||
|
||||
@ApiModelProperty(value = "是否需要气体检测1是2否", name = "gasFlag")
|
||||
private Integer gasFlag;
|
||||
|
||||
@ApiModelProperty(value = "票号", name = "checkNo", required = true)
|
||||
@NotEmpty(message = "票号不能为空")
|
||||
private String checkNo;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ public class EightworkInfoUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "相关方id", name = "xgfId", required = true)
|
||||
@NotNull(message = "相关方id不能为空")
|
||||
private Long xgfId;
|
||||
@ApiModelProperty(value = "是否需要气体检测1是2否", name = "gasFlag")
|
||||
private Integer gasFlag;
|
||||
@ApiModelProperty(value = "票号", name = "checkNo", required = true)
|
||||
@NotEmpty(message = "票号不能为空")
|
||||
private String checkNo;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ public class MeasuresLogsAddCmd extends Command {
|
|||
@NotEmpty(message = "答案 &&分割不能为空")
|
||||
private String answer;
|
||||
|
||||
@ApiModelProperty(value = "签字", name = "signPath")
|
||||
private String signPath;
|
||||
|
||||
@ApiModelProperty(value = "排序", name = "orderBy", required = true)
|
||||
@NotNull(message = "排序不能为空")
|
||||
private Integer orderBy;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ public class MeasuresLogsUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "答案 &&分割", name = "answer", required = true)
|
||||
@NotEmpty(message = "答案 &&分割不能为空")
|
||||
private String answer;
|
||||
@ApiModelProperty(value = "签字", name = "signPath")
|
||||
private String signPath;
|
||||
@ApiModelProperty(value = "排序", name = "orderBy", required = true)
|
||||
@NotNull(message = "排序不能为空")
|
||||
private Integer orderBy;
|
||||
|
|
|
|||
|
|
@ -26,5 +26,6 @@ public class TaskLogPageQry extends PageQuery {
|
|||
*/
|
||||
private String eqWorkType;
|
||||
private int eqStatus;
|
||||
private int eqCurrentStep;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ public class EightworkInfoCO extends ClientObject {
|
|||
//相关方id
|
||||
@ApiModelProperty(value = "相关方id")
|
||||
private Long xgfId;
|
||||
//是否需要气体检测1是2否
|
||||
@ApiModelProperty(value = "是否需要气体检测1是2否")
|
||||
private Integer gasFlag;
|
||||
//票号
|
||||
@ApiModelProperty(value = "票号")
|
||||
private String checkNo;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ public class MeasuresLogsCO extends ClientObject {
|
|||
//答案 &&分割
|
||||
@ApiModelProperty(value = "答案 &&分割")
|
||||
private String answer;
|
||||
//签字
|
||||
@ApiModelProperty(value = "签字")
|
||||
private String signPath;
|
||||
//排序
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer orderBy;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ public class EightworkInfoE extends BaseE {
|
|||
private String projectId;
|
||||
//相关方id
|
||||
private Long xgfId;
|
||||
//是否需要气体检测1是2否
|
||||
private Integer gasFlag;
|
||||
//票号
|
||||
private String checkNo;
|
||||
//工作类型
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public class MeasuresLogsE extends BaseE {
|
|||
private String workId;
|
||||
//答案 &&分割
|
||||
private String answer;
|
||||
//签字
|
||||
private String signPath;
|
||||
//排序
|
||||
private Integer orderBy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ public class EightworkInfoDO extends BaseDO {
|
|||
//相关方id
|
||||
@ApiModelProperty(value = "相关方id")
|
||||
private Long xgfId;
|
||||
//是否需要气体检测1是2否
|
||||
@ApiModelProperty(value = "是否需要气体检测1是2否")
|
||||
private Integer gasFlag;
|
||||
//票号
|
||||
@ApiModelProperty(value = "票号")
|
||||
private String checkNo;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ public class MeasuresLogsDO extends BaseDO {
|
|||
//答案 &&分割
|
||||
@ApiModelProperty(value = "答案 &&分割")
|
||||
private String answer;
|
||||
//签字
|
||||
@ApiModelProperty(value = "签字")
|
||||
private String signPath;
|
||||
//类型1主要2其他
|
||||
@ApiModelProperty(value = "类型1主要2其他")
|
||||
private Integer type;
|
||||
|
|
|
|||
Loading…
Reference in New Issue