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
fangjiakai 2026-03-12 10:27:13 +08:00
parent 040673973e
commit 34c34f4b29
18 changed files with 69 additions and 6 deletions

2
.gitignore vendored
View File

@ -36,3 +36,5 @@ build/
### Mac OS ### ### Mac OS ###
.DS_Store .DS_Store
/start/src/main/resources/templates/
/start/src/main/resources/nacos/

View File

@ -11,12 +11,14 @@ spring:
name: ${application.name}${application.version} name: ${application.name}${application.version}
profiles: profiles:
# 环境配置 # 环境配置
active: test active: prod
cloud: cloud:
nacos: nacos:
config: config:
namespace: ${nacos.namespace} namespace: ${nacos.namespace}
server-addr: ${nacos.url} server-addr: ${nacos.url}
username: nacos
password: u9Hc7tLFBY
file-extension: yml file-extension: yml
shared-configs: shared-configs:
- config-common.yml - config-common.yml
@ -36,3 +38,5 @@ spring:
discovery: discovery:
server-addr: ${spring.cloud.nacos.config.server-addr} server-addr: ${spring.cloud.nacos.config.server-addr}
namespace: ${spring.cloud.nacos.config.namespace} namespace: ${spring.cloud.nacos.config.namespace}
username: nacos
password: u9Hc7tLFBY

View File

@ -1,6 +1,6 @@
sdk: sdk:
server: server:
app-key: 722091ff53dd4abba078c2a00efd4a42 app-key: 2b6c5d517947438bab66b8da0daf68a4
client: client:
gateway: gateway:
url: ${common.gateway.network.http.external} url: ${common.gateway.network.http.external}
@ -14,7 +14,7 @@ sdk:
name: ${application.cn-name}-后端 name: ${application.cn-name}-后端
group-code: public_api group-code: public_api
strip-prefix: 0 strip-prefix: 0
uri: lb://${application.name} uri: http://${application.name}
path: /${application.gateway}/** path: /${application.gateway}/**
- client: - client:
system-code: ${application.name}-container system-code: ${application.name}-container
@ -25,7 +25,7 @@ sdk:
name: ${application.cn-name}-前端 name: ${application.cn-name}-前端
group-code: public_api group-code: public_api
strip-prefix: 0 strip-prefix: 0
uri: lb://jjb-saas-base uri: http://jjb-saas-base
path: /${application.gateway}/container/** path: /${application.gateway}/container/**
order: -2 order: -2
openapi: openapi:

View File

@ -57,12 +57,19 @@ public class TaskFlowController {
return SingleResponse.of(taskFlowService.getFlowInit(qry)); 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("详情") @ApiOperation("详情")
@GetMapping("/{id}") @GetMapping("/{id}")
public SingleResponse<TaskFlowCO> getInfoById(@PathVariable("id") Long id) { public SingleResponse<TaskFlowCO> getInfoById(@PathVariable("id") Long id) {
return SingleResponse.of(new TaskFlowCO()); return SingleResponse.of(new TaskFlowCO());
} }
@ApiOperation("删除") @ApiOperation("删除")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
public Response remove(@PathVariable("id") Long id) { public Response remove(@PathVariable("id") Long id) {

View File

@ -2,6 +2,7 @@ package com.zcloud.eightwork.command.query;
import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.PageResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.jjb.saas.framework.auth.utils.AuthContext;
import com.zcloud.eightwork.command.convertor.EightworkTaskCoConvertor; import com.zcloud.eightwork.command.convertor.EightworkTaskCoConvertor;
import com.zcloud.eightwork.command.convertor.TaskFlowCoConvertor; import com.zcloud.eightwork.command.convertor.TaskFlowCoConvertor;
@ -36,7 +37,7 @@ public class TaskFlowQueryExe {
private final TaskFlowRepository taskFlowRepository; private final TaskFlowRepository taskFlowRepository;
private final TaskFlowCoConvertor taskFlowCoConvertor; private final TaskFlowCoConvertor taskFlowCoConvertor;
private final EightworkTaskRepository eightworkTaskRepository; private final EightworkTaskRepository eightworkTaskRepository;
private final EightworkTaskCoConvertor eightworkTaskCoConvertor; private final EightworkTaskCoConvertor eightworkTaskCoConvertor;
/** /**
* *
@ -62,6 +63,7 @@ public class TaskFlowQueryExe {
)); ));
return taskWorkInitCO; return taskWorkInitCO;
} }
public TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry) { public TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry) {
List<TaskFlowDO> flows = taskFlowRepository.listAllByWorkType(qry.getWorkType(), qry.getWorkLevel()); List<TaskFlowDO> flows = taskFlowRepository.listAllByWorkType(qry.getWorkType(), qry.getWorkLevel());
TaskFlowInitCO taskFlowInitCO = new TaskFlowInitCO(); TaskFlowInitCO taskFlowInitCO = new TaskFlowInitCO();
@ -73,5 +75,19 @@ public class TaskFlowQueryExe {
return taskFlowInitCO; 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);
}
} }

View File

@ -67,5 +67,10 @@ public class TaskFlowServiceImpl implements TaskFlowServiceI {
public TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry){ public TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry){
return taskFlowQueryExe.getFlowInit(qry); return taskFlowQueryExe.getFlowInit(qry);
} }
@Override
public List<TaskFlowCO> getFlowByWorkType(String workType){
return taskFlowQueryExe.getFlowByWorkType(workType);
}
} }

View File

@ -31,5 +31,7 @@ public interface TaskFlowServiceI {
TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry); TaskFlowInitCO getFlowInit(TaskFlowQryCmd qry);
List<TaskFlowCO> getFlowByWorkType(String workType);
} }

View File

@ -41,6 +41,9 @@ public class EightworkInfoAddCmd extends Command {
@NotNull(message = "相关方id不能为空") @NotNull(message = "相关方id不能为空")
private Long xgfId; private Long xgfId;
@ApiModelProperty(value = "是否需要气体检测1是2否", name = "gasFlag")
private Integer gasFlag;
@ApiModelProperty(value = "票号", name = "checkNo", required = true) @ApiModelProperty(value = "票号", name = "checkNo", required = true)
@NotEmpty(message = "票号不能为空") @NotEmpty(message = "票号不能为空")
private String checkNo; private String checkNo;

View File

@ -42,6 +42,8 @@ public class EightworkInfoUpdateCmd extends Command {
@ApiModelProperty(value = "相关方id", name = "xgfId", required = true) @ApiModelProperty(value = "相关方id", name = "xgfId", required = true)
@NotNull(message = "相关方id不能为空") @NotNull(message = "相关方id不能为空")
private Long xgfId; private Long xgfId;
@ApiModelProperty(value = "是否需要气体检测1是2否", name = "gasFlag")
private Integer gasFlag;
@ApiModelProperty(value = "票号", name = "checkNo", required = true) @ApiModelProperty(value = "票号", name = "checkNo", required = true)
@NotEmpty(message = "票号不能为空") @NotEmpty(message = "票号不能为空")
private String checkNo; private String checkNo;

View File

@ -41,6 +41,9 @@ public class MeasuresLogsAddCmd extends Command {
@NotEmpty(message = "答案 &&分割不能为空") @NotEmpty(message = "答案 &&分割不能为空")
private String answer; private String answer;
@ApiModelProperty(value = "签字", name = "signPath")
private String signPath;
@ApiModelProperty(value = "排序", name = "orderBy", required = true) @ApiModelProperty(value = "排序", name = "orderBy", required = true)
@NotNull(message = "排序不能为空") @NotNull(message = "排序不能为空")
private Integer orderBy; private Integer orderBy;

View File

@ -39,6 +39,8 @@ public class MeasuresLogsUpdateCmd extends Command {
@ApiModelProperty(value = "答案 &&分割", name = "answer", required = true) @ApiModelProperty(value = "答案 &&分割", name = "answer", required = true)
@NotEmpty(message = "答案 &&分割不能为空") @NotEmpty(message = "答案 &&分割不能为空")
private String answer; private String answer;
@ApiModelProperty(value = "签字", name = "signPath")
private String signPath;
@ApiModelProperty(value = "排序", name = "orderBy", required = true) @ApiModelProperty(value = "排序", name = "orderBy", required = true)
@NotNull(message = "排序不能为空") @NotNull(message = "排序不能为空")
private Integer orderBy; private Integer orderBy;

View File

@ -26,5 +26,6 @@ public class TaskLogPageQry extends PageQuery {
*/ */
private String eqWorkType; private String eqWorkType;
private int eqStatus; private int eqStatus;
private int eqCurrentStep;
} }

View File

@ -35,6 +35,9 @@ public class EightworkInfoCO extends ClientObject {
//相关方id //相关方id
@ApiModelProperty(value = "相关方id") @ApiModelProperty(value = "相关方id")
private Long xgfId; private Long xgfId;
//是否需要气体检测1是2否
@ApiModelProperty(value = "是否需要气体检测1是2否")
private Integer gasFlag;
//票号 //票号
@ApiModelProperty(value = "票号") @ApiModelProperty(value = "票号")
private String checkNo; private String checkNo;

View File

@ -31,6 +31,9 @@ public class MeasuresLogsCO extends ClientObject {
//答案 &&分割 //答案 &&分割
@ApiModelProperty(value = "答案 &&分割") @ApiModelProperty(value = "答案 &&分割")
private String answer; private String answer;
//签字
@ApiModelProperty(value = "签字")
private String signPath;
//排序 //排序
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
private Integer orderBy; private Integer orderBy;

View File

@ -25,6 +25,8 @@ public class EightworkInfoE extends BaseE {
private String projectId; private String projectId;
//相关方id //相关方id
private Long xgfId; private Long xgfId;
//是否需要气体检测1是2否
private Integer gasFlag;
//票号 //票号
private String checkNo; private String checkNo;
//工作类型 //工作类型

View File

@ -21,6 +21,8 @@ public class MeasuresLogsE extends BaseE {
private String workId; private String workId;
//答案 &&分割 //答案 &&分割
private String answer; private String answer;
//签字
private String signPath;
//排序 //排序
private Integer orderBy; private Integer orderBy;
} }

View File

@ -38,6 +38,9 @@ public class EightworkInfoDO extends BaseDO {
//相关方id //相关方id
@ApiModelProperty(value = "相关方id") @ApiModelProperty(value = "相关方id")
private Long xgfId; private Long xgfId;
//是否需要气体检测1是2否
@ApiModelProperty(value = "是否需要气体检测1是2否")
private Integer gasFlag;
//票号 //票号
@ApiModelProperty(value = "票号") @ApiModelProperty(value = "票号")
private String checkNo; private String checkNo;

View File

@ -34,6 +34,9 @@ public class MeasuresLogsDO extends BaseDO {
//答案 &&分割 //答案 &&分割
@ApiModelProperty(value = "答案 &&分割") @ApiModelProperty(value = "答案 &&分割")
private String answer; private String answer;
//签字
@ApiModelProperty(value = "签字")
private String signPath;
//类型1主要2其他 //类型1主要2其他
@ApiModelProperty(value = "类型1主要2其他") @ApiModelProperty(value = "类型1主要2其他")
private Integer type; private Integer type;