feat(workflow): 优化作业信息查询和流程处理功能
parent
606b4a6459
commit
a441f76b53
|
|
@ -177,6 +177,7 @@ public class TaskLogUpdateExe {
|
||||||
handleReject(cmd);
|
handleReject(cmd);
|
||||||
log.info("打回到申请步骤,结束处理步骤流转: workId={}, stepId={}, status={}",
|
log.info("打回到申请步骤,结束处理步骤流转: workId={}, stepId={}, status={}",
|
||||||
cmd.getWorkId(), cmd.getStepId(), cmd.getStatus());
|
cmd.getWorkId(), cmd.getStepId(), cmd.getStatus());
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -679,7 +680,7 @@ public class TaskLogUpdateExe {
|
||||||
// 发送待办通知
|
// 发送待办通知
|
||||||
sendTodoAddEvent(workId, next, currentLog.getWorkType());
|
sendTodoAddEvent(workId, next, currentLog.getWorkType());
|
||||||
|
|
||||||
messageNotice(next.getActUser(),next, currentLog);
|
messageNotice(next, currentLog);
|
||||||
log.info("已激活下一步:workId={},步骤={}",workId, next.getStepName());
|
log.info("已激活下一步:workId={},步骤={}",workId, next.getStepName());
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -715,6 +716,13 @@ public class TaskLogUpdateExe {
|
||||||
"已归档",
|
"已归档",
|
||||||
TaskLogStatus.ARCHIVED.getCode()
|
TaskLogStatus.ARCHIVED.getCode()
|
||||||
);
|
);
|
||||||
|
sendTodoCompleteEvent(currentLog.getId());
|
||||||
|
TaskLogE branchStep = new TaskLogE();
|
||||||
|
EightworkInfoDO eightworkInfoDO = getEightworkInfoDO(currentLog.getWorkId());
|
||||||
|
branchStep.setActUser(eightworkInfoDO.getCreateId());
|
||||||
|
branchStep.setStatus(TaskLogStatus.ARCHIVED.getCode());
|
||||||
|
branchStep.setStepName("申请人");
|
||||||
|
messageNotice(branchStep, currentLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -901,12 +909,23 @@ public class TaskLogUpdateExe {
|
||||||
// createNewApplyTaskLog(cmd.getWorkId());
|
// createNewApplyTaskLog(cmd.getWorkId());
|
||||||
|
|
||||||
// 6. 更新主表状态为打回,添加打回信息
|
// 6. 更新主表状态为打回,添加打回信息
|
||||||
updateMainInfoForReject(cmd.getWorkId(), currentLog, cmd.getOthers());
|
EightworkInfoDO infoDO = eightworkInfoRepository.getOne(
|
||||||
|
new LambdaQueryWrapper<EightworkInfoDO>()
|
||||||
|
.eq(EightworkInfoDO::getWorkId, cmd.getWorkId())
|
||||||
|
);
|
||||||
|
if (infoDO == null) {
|
||||||
|
log.warn("未找到作业信息: workId={}", cmd.getWorkId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
updateMainInfoForReject(infoDO, currentLog, cmd.getOthers());
|
||||||
|
|
||||||
// 7. 发送待办完成事件
|
// 7. 发送待办完成事件
|
||||||
sendTodoCompleteEvent(currentLog.getId());
|
sendTodoCompleteEvent(currentLog.getId());
|
||||||
|
TaskLogE branchStep = new TaskLogE();
|
||||||
|
branchStep.setActUser(infoDO.getCreateId());
|
||||||
|
branchStep.setStatus(TaskLogStatus.REJECTED.getCode());
|
||||||
|
branchStep.setStepName("申请人");
|
||||||
|
messageNotice(branchStep, currentLog);
|
||||||
log.info("工作流已打回到申请步骤: workId={}", cmd.getWorkId());
|
log.info("工作流已打回到申请步骤: workId={}", cmd.getWorkId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1043,9 +1062,9 @@ public class TaskLogUpdateExe {
|
||||||
/**
|
/**
|
||||||
* 更新主表信息(打回后)
|
* 更新主表信息(打回后)
|
||||||
*/
|
*/
|
||||||
private void updateMainInfoForReject(String workId, TaskLogE currentLog, com.alibaba.fastjson.JSONObject others) {
|
private void updateMainInfoForReject(EightworkInfoDO infoDO , TaskLogE currentLog, com.alibaba.fastjson.JSONObject others) {
|
||||||
// 获取主表记录
|
// 获取主表记录
|
||||||
EightworkInfoDO infoDO = eightworkInfoRepository.getOne(
|
/*EightworkInfoDO infoDO = eightworkInfoRepository.getOne(
|
||||||
new LambdaQueryWrapper<EightworkInfoDO>()
|
new LambdaQueryWrapper<EightworkInfoDO>()
|
||||||
.eq(EightworkInfoDO::getWorkId, workId)
|
.eq(EightworkInfoDO::getWorkId, workId)
|
||||||
);
|
);
|
||||||
|
|
@ -1053,7 +1072,7 @@ public class TaskLogUpdateExe {
|
||||||
if (infoDO == null) {
|
if (infoDO == null) {
|
||||||
log.warn("未找到作业信息: workId={}", workId);
|
log.warn("未找到作业信息: workId={}", workId);
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// 解析现有 info
|
// 解析现有 info
|
||||||
JSONObject infoJson;
|
JSONObject infoJson;
|
||||||
|
|
@ -1061,7 +1080,7 @@ public class TaskLogUpdateExe {
|
||||||
try {
|
try {
|
||||||
infoJson = JSONObject.parseObject(infoDO.getInfo());
|
infoJson = JSONObject.parseObject(infoDO.getInfo());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("解析 info 失败,使用空对象: workId={}", workId, e);
|
log.warn("解析 info 失败,使用空对象: workId={}", infoDO.getWorkId(), e);
|
||||||
infoJson = new JSONObject();
|
infoJson = new JSONObject();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1090,7 +1109,7 @@ public class TaskLogUpdateExe {
|
||||||
infoDO.setInfo(infoJson.toJSONString());
|
infoDO.setInfo(infoJson.toJSONString());
|
||||||
eightworkInfoRepository.updateById(infoDO);
|
eightworkInfoRepository.updateById(infoDO);
|
||||||
|
|
||||||
log.info("主表已更新为打回状态并添加打回信息: workId={}", workId);
|
log.info("主表已更新为打回状态并添加打回信息: workId={}", infoDO.getWorkId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1100,25 +1119,25 @@ public class TaskLogUpdateExe {
|
||||||
private void handleBranchIfNeeded(TaskLogE currentLog, List<TaskLogDO> actionLogs, List<TaskLogE> allLogs) {
|
private void handleBranchIfNeeded(TaskLogE currentLog, List<TaskLogDO> actionLogs, List<TaskLogE> allLogs) {
|
||||||
StepType stepType = StepType.getByCode(currentLog.getStepType());
|
StepType stepType = StepType.getByCode(currentLog.getStepType());
|
||||||
BranchFlag branchFlag = BranchFlag.getByCode(currentLog.getBranchFlag());
|
BranchFlag branchFlag = BranchFlag.getByCode(currentLog.getBranchFlag());
|
||||||
|
log.info("开始处理分支流程: stepName={}, branchFlag={}", currentLog.getStepName(), branchFlag);
|
||||||
// 只处理:主流程步骤完成,且为分支开始节点 → 激活分支步骤
|
// 只处理:主流程步骤完成,且为分支开始节点 → 激活分支步骤
|
||||||
if (stepType != null && stepType.isNormalStep() && branchFlag.isBranchStart()) {
|
if (stepType != null && stepType.isNormalStep() && branchFlag.isBranchStart()) {
|
||||||
TaskLogE branchStep = allLogs.stream()
|
TaskLogE branchStep = allLogs.stream()
|
||||||
.filter(log -> log.getStepId().equals(currentLog.getBranchStep()))
|
.filter(log -> log.getStepId().equals(currentLog.getBranchStep()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
log.info("找到处理分支流程: stepName={}, branchStep={}", currentLog.getStepName(), branchStep);
|
||||||
if (branchStep != null) {
|
if (branchStep != null) {
|
||||||
// 如果分支步骤已标记为跳过,则不激活
|
// 如果分支步骤已标记为跳过,则不激活
|
||||||
if (TaskLogStatus.SKIPPED.equalsCode(branchStep.getStatus())) {
|
if (TaskLogStatus.SKIPPED.equalsCode(branchStep.getStatus())) {
|
||||||
log.info("分支步骤已跳过,不激活: stepName={}", branchStep.getStepName());
|
log.info("分支步骤已跳过,不激活: stepName={}", branchStep.getStepName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
log.info("激活分支步骤: stepName={},checkNo={}", branchStep.getStepName(),branchStep.getCheckNo());
|
||||||
branchStep.setStatus(TaskLogStatus.IN_PROGRESS.getCode());
|
branchStep.setStatus(TaskLogStatus.IN_PROGRESS.getCode());
|
||||||
addActionLog(actionLogs, branchStep);
|
addActionLog(actionLogs, branchStep);
|
||||||
sendTodoAddEvent(getWorkId(currentLog.getWorkId()), branchStep, currentLog.getWorkType());
|
sendTodoAddEvent(getWorkId(currentLog.getWorkId()), branchStep, currentLog.getWorkType());
|
||||||
messageNotice(getWorkId(currentLog.getWorkId()),branchStep, currentLog);
|
messageNotice(branchStep, currentLog);
|
||||||
log.info("已激活分支步骤: stepName={}, mergeTo={}", branchStep.getStepName(), branchStep.getBranchMergeStep());
|
log.info("已激活分支步骤: stepName={}, mergeTo={}", branchStep.getStepName(), branchStep.getBranchMergeStep());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1136,6 +1155,7 @@ public class TaskLogUpdateExe {
|
||||||
log.info("未设置签字人,跳过设置签字人: workId={}", currentLog.getWorkId());
|
log.info("未设置签字人,跳过设置签字人: workId={}", currentLog.getWorkId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
log.info("开始设置签字人:signLogs={}",JSONUtil.toJsonStr(signLogs));
|
||||||
|
|
||||||
// 按 stepId 分组,处理多人签字步骤
|
// 按 stepId 分组,处理多人签字步骤
|
||||||
Map<Long, List<TaskSignStepInfoCmd>> signLogsByStepId = signLogs.stream()
|
Map<Long, List<TaskSignStepInfoCmd>> signLogsByStepId = signLogs.stream()
|
||||||
|
|
@ -1305,7 +1325,7 @@ public class TaskLogUpdateExe {
|
||||||
try {
|
try {
|
||||||
TodoListAddEvent event = new TodoListAddEvent();
|
TodoListAddEvent event = new TodoListAddEvent();
|
||||||
event.setTitle("您有一条【" + WorkCodeEnum.getNameByWorkType(workType) + "】流程待处理");
|
event.setTitle("您有一条【" + WorkCodeEnum.getNameByWorkType(workType) + "】流程待处理");
|
||||||
event.setContent(nextStep.getNextStepName());
|
event.setContent(nextStep.getStepName());
|
||||||
event.setForeignKey(workId);
|
event.setForeignKey(workId);
|
||||||
event.setForeignSubsidiaryKey(nextStep.getId());
|
event.setForeignSubsidiaryKey(nextStep.getId());
|
||||||
event.setReceiveUser(nextStep.getActUser());
|
event.setReceiveUser(nextStep.getActUser());
|
||||||
|
|
@ -1317,13 +1337,13 @@ public class TaskLogUpdateExe {
|
||||||
log.error("发送待办新增事件失败: stepId={}", nextStep.getId(), e);
|
log.error("发送待办新增事件失败: stepId={}", nextStep.getId(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void messageNotice(Long userId,TaskLogE nextStep, TaskLogE currentLog) {
|
private void messageNotice(TaskLogE nextStep, TaskLogE currentLog) {
|
||||||
//消息通知
|
//消息通知
|
||||||
try{
|
try{
|
||||||
MessageSendCmd messageSendCmd = new MessageSendCmd();
|
MessageSendCmd messageSendCmd = new MessageSendCmd();
|
||||||
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
|
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
|
||||||
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
|
||||||
messageTargetCmd.setUserId(userId);
|
messageTargetCmd.setUserId(nextStep.getActUser());
|
||||||
messageSendCmd.setTargetCmd(messageTargetCmd);
|
messageSendCmd.setTargetCmd(messageTargetCmd);
|
||||||
messageSendCmd.setSourceCode(messageConfig.getTaskLogTemplate());
|
messageSendCmd.setSourceCode(messageConfig.getTaskLogTemplate());
|
||||||
messageSendCmd.setNeedTokenEnum(false);
|
messageSendCmd.setNeedTokenEnum(false);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.zcloud.eightwork.command.query;
|
package com.zcloud.eightwork.command.query;
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||||
import com.zcloud.eightwork.command.convertor.EightworkInfoCoConvertor;
|
import com.zcloud.eightwork.command.convertor.EightworkInfoCoConvertor;
|
||||||
import com.zcloud.eightwork.dto.EightworkInfoPageQry;
|
import com.zcloud.eightwork.dto.EightworkInfoPageQry;
|
||||||
import com.zcloud.eightwork.dto.clientobject.EightworkInfoCO;
|
import com.zcloud.eightwork.dto.clientobject.EightworkInfoCO;
|
||||||
|
|
@ -47,6 +48,9 @@ public class EightworkInfoQueryExe {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public PageResponse<EightworkInfoCO> execute(EightworkInfoPageQry eightworkInfoPageQry) {
|
public PageResponse<EightworkInfoCO> execute(EightworkInfoPageQry eightworkInfoPageQry) {
|
||||||
|
if(eightworkInfoPageQry.getCorpinfoId()==null){
|
||||||
|
eightworkInfoPageQry.setCorpinfoId(AuthContext.getTenantId());
|
||||||
|
}
|
||||||
Map<String, Object> params = PageQueryHelper.toHashMap(eightworkInfoPageQry);
|
Map<String, Object> params = PageQueryHelper.toHashMap(eightworkInfoPageQry);
|
||||||
PageResponse<EightworkInfoDO> pageResponse = eightworkInfoRepository.listPage(params);
|
PageResponse<EightworkInfoDO> pageResponse = eightworkInfoRepository.listPage(params);
|
||||||
List<EightworkInfoCO> examCenterCOS = eightworkInfoCoConvertor.converDOsToCOs(pageResponse.getData());
|
List<EightworkInfoCO> examCenterCOS = eightworkInfoCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ public class TaskFlowQueryExe {
|
||||||
TaskWorkInitCO taskWorkInitCO = new TaskWorkInitCO();
|
TaskWorkInitCO taskWorkInitCO = new TaskWorkInitCO();
|
||||||
taskWorkInitCO.setApplyUser(AuthContext.getCurrentUser().getName());
|
taskWorkInitCO.setApplyUser(AuthContext.getCurrentUser().getName());
|
||||||
taskWorkInitCO.setApplyUnit(AuthContext.getCurrentUser().getTenantName());
|
taskWorkInitCO.setApplyUnit(AuthContext.getCurrentUser().getTenantName());
|
||||||
|
taskWorkInitCO.setApplyDepartment(AuthContext.getCurrentUser().getOrgName());
|
||||||
taskWorkInitCO.setTaskWorkLevels(eightworkTaskCoConvertor.converDOsToCOs(
|
taskWorkInitCO.setTaskWorkLevels(eightworkTaskCoConvertor.converDOsToCOs(
|
||||||
eightworkTaskRepository.list(new LambdaQueryWrapper<EightworkTaskDO>()
|
eightworkTaskRepository.list(new LambdaQueryWrapper<EightworkTaskDO>()
|
||||||
.eq(EightworkTaskDO::getWorkType, qry.getWorkType())
|
.eq(EightworkTaskDO::getWorkType, qry.getWorkType())
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ public class EightworkInfoPageQry extends PageQuery {
|
||||||
private String menuPath;
|
private String menuPath;
|
||||||
private String eqWorkType;
|
private String eqWorkType;
|
||||||
private List<Long> inCorpInfoId;
|
private List<Long> inCorpInfoId;
|
||||||
|
private Long corpinfoId;
|
||||||
private String eqCheckNo;
|
private String eqCheckNo;
|
||||||
private Integer eqStatus;
|
private Integer eqStatus;
|
||||||
private String eqWorkLevel;
|
private String eqWorkLevel;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.zcloud.eightwork.dto;
|
package com.zcloud.eightwork.dto;
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageQuery;
|
import com.alibaba.cola.dto.PageQuery;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -25,5 +26,7 @@ public class EightworkSupplementaryInfoPageQry extends PageQuery {
|
||||||
*/
|
*/
|
||||||
private String eqWorkId;
|
private String eqWorkId;
|
||||||
private String eqType;
|
private String eqType;
|
||||||
|
@ApiModelProperty(value = "气体分析-分析点名称")
|
||||||
|
private String analysisPointName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ public class TaskWorkInitCO extends ClientObject {
|
||||||
private String applyUnit;
|
private String applyUnit;
|
||||||
@ApiModelProperty(value = "申请人")
|
@ApiModelProperty(value = "申请人")
|
||||||
private String applyUser;
|
private String applyUser;
|
||||||
|
@ApiModelProperty(value = "申请部门")
|
||||||
|
private String applyDepartment;
|
||||||
@ApiModelProperty(value = "票号")
|
@ApiModelProperty(value = "票号")
|
||||||
private String checkNo;
|
private String checkNo;
|
||||||
@ApiModelProperty(value = "任务级别列表")
|
@ApiModelProperty(value = "任务级别列表")
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
package com.zcloud.eightwork.persistence.mapper;
|
package com.zcloud.eightwork.persistence.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.zcloud.eightwork.persistence.dataobject.EightworkSupplementaryInfoDO;
|
import com.zcloud.eightwork.persistence.dataobject.EightworkSupplementaryInfoDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-infrastructure
|
* web-infrastructure
|
||||||
*
|
*
|
||||||
|
|
@ -21,5 +25,7 @@ public interface EightworkSupplementaryInfoMapper extends BaseMapper<EightworkSu
|
||||||
* @return 删除的记录数
|
* @return 删除的记录数
|
||||||
*/
|
*/
|
||||||
int physicalDeleteByWorkId(@Param("workId") String workId);
|
int physicalDeleteByWorkId(@Param("workId") String workId);
|
||||||
|
|
||||||
|
IPage<EightworkSupplementaryInfoDO> listPage(IPage<EightworkSupplementaryInfoDO> iPage, Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@ public class EightworkSupplementaryInfoRepositoryImpl extends BaseRepositoryImpl
|
||||||
@Override
|
@Override
|
||||||
public PageResponse<EightworkSupplementaryInfoDO> listPage(Map<String, Object> params) {
|
public PageResponse<EightworkSupplementaryInfoDO> listPage(Map<String, Object> params) {
|
||||||
IPage<EightworkSupplementaryInfoDO> iPage = new Query<EightworkSupplementaryInfoDO>().getPage(params);
|
IPage<EightworkSupplementaryInfoDO> iPage = new Query<EightworkSupplementaryInfoDO>().getPage(params);
|
||||||
QueryWrapper<EightworkSupplementaryInfoDO> queryWrapper = new QueryWrapper<>();
|
// QueryWrapper<EightworkSupplementaryInfoDO> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
// queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||||
queryWrapper.orderByDesc("create_time");
|
// queryWrapper.orderByDesc("create_time");
|
||||||
IPage<EightworkSupplementaryInfoDO> result = eightworkSupplementaryInfoMapper.selectPage(iPage, queryWrapper);
|
IPage<EightworkSupplementaryInfoDO> result = eightworkSupplementaryInfoMapper.listPage(iPage, params);
|
||||||
return PageHelper.pageToResponse(result, result.getRecords());
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
select t.*
|
select t.*
|
||||||
from eightwork_info t
|
from eightwork_info t
|
||||||
where t.delete_enum = 'FALSE'
|
where t.delete_enum = 'FALSE'
|
||||||
and t.status != 0
|
and t.status !=0
|
||||||
<if test="params.eqWorkType != null and params.eqWorkType != ''">
|
<if test="params.eqWorkType != null and params.eqWorkType != ''">
|
||||||
and t.work_type = #{params.eqWorkType}
|
and t.work_type = #{params.eqWorkType}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.eqCheckNo != null and params.eqCheckNo != ''">
|
<if test="params.eqCheckNo != null and params.eqCheckNo != ''">
|
||||||
and t.check_no = #{params.eqCheckNo}
|
and t.check_no like concat('%', #{params.eqCheckNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.eqStatus != null">
|
<if test="params.eqStatus != null">
|
||||||
and t.status = #{params.eqStatus}
|
and t.status = #{params.eqStatus}
|
||||||
|
|
@ -51,11 +51,12 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="params.geCreateTime != null and params.geCreateTime != ''">
|
<if test="params.geCreateTime != null and params.geCreateTime != ''">
|
||||||
and t.create_time >= #{params.geCreateTime}
|
AND t.create_time >= DATE_FORMAT(CONCAT(#{params.geCreateTime}, ' 00:00:00'), '%Y-%m-%d %H:%i:%s')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.leCreateTime != null and params.leCreateTime != ''">
|
<if test="params.leCreateTime != null and params.leCreateTime != ''">
|
||||||
and t.create_time <= #{params.leCreateTime}
|
AND t.create_time < DATE_FORMAT(DATE_ADD(#{params.leCreateTime}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%s')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="params.eqIsInnerWork != null and params.eqIsInnerWork != ''">
|
<if test="params.eqIsInnerWork != null and params.eqIsInnerWork != ''">
|
||||||
and t.info->>'$.isInnerWork' = #{params.eqIsInnerWork}
|
and t.info->>'$.isInnerWork' = #{params.eqIsInnerWork}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -69,10 +70,10 @@
|
||||||
and t.info->>'$.blindboardWorkType' = #{params.eqBlindboardWorkType}
|
and t.info->>'$.blindboardWorkType' = #{params.eqBlindboardWorkType}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.geWorkStartTime != null and params.geWorkStartTime != ''">
|
<if test="params.geWorkStartTime != null and params.geWorkStartTime != ''">
|
||||||
and t.info->>'$.workStartTime' >= #{params.geWorkStartTime}
|
and t.info->>'$.workStartTime' >= DATE_FORMAT(CONCAT(#{params.geWorkStartTime}, ' 00:00:00'), '%Y-%m-%d %H:%i:%s')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.leWorkStartTime != null and params.leWorkStartTime != ''">
|
<if test="params.leWorkStartTime != null and params.leWorkStartTime != ''">
|
||||||
and t.info->>'$.workStartTime' <= #{params.leWorkStartTime}
|
and t.info->>'$.workStartTime' < DATE_FORMAT(DATE_ADD(#{params.leWorkStartTime}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%s')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.likeLimitedSpaceNameAndCode != null and params.likeLimitedSpaceNameAndCode != ''">
|
<if test="params.likeLimitedSpaceNameAndCode != null and params.likeLimitedSpaceNameAndCode != ''">
|
||||||
and t.info->>'$.limitedSpaceNameAndCode' like concat('%', #{params.likeLimitedSpaceNameAndCode}, '%')
|
and t.info->>'$.limitedSpaceNameAndCode' like concat('%', #{params.likeLimitedSpaceNameAndCode}, '%')
|
||||||
|
|
@ -84,7 +85,18 @@
|
||||||
and log.status = 0
|
and log.status = 0
|
||||||
and log.step_id = #{params.eqCurrentStepId})
|
and log.step_id = #{params.eqCurrentStepId})
|
||||||
</if>
|
</if>
|
||||||
order by t.create_time desc
|
<if test="params.inCorpInfoId != null and params.inCorpInfoId.size() > 0">
|
||||||
|
and t.corpinfo_id in
|
||||||
|
<foreach collection="params.inCorpInfoId" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="params.corpinfoId != null">
|
||||||
|
and t.corpinfo_id = #{params.corpinfoId}
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
CASE WHEN t.status = 0 THEN 0 ELSE 1 END ASC,
|
||||||
|
t.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="statisticsByWorkType" resultType="com.zcloud.eightwork.persistence.dataobject.dto.StatisticsByWorkTypeDTO">
|
<select id="statisticsByWorkType" resultType="com.zcloud.eightwork.persistence.dataobject.dto.StatisticsByWorkTypeDTO">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,22 @@
|
||||||
<delete id="physicalDeleteByWorkId">
|
<delete id="physicalDeleteByWorkId">
|
||||||
DELETE FROM eightwork_supplementary_info WHERE work_id = #{workId}
|
DELETE FROM eightwork_supplementary_info WHERE work_id = #{workId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="listPage" resultType="com.zcloud.eightwork.persistence.dataobject.EightworkSupplementaryInfoDO">
|
||||||
|
SELECT info.*
|
||||||
|
FROM eightwork_supplementary_info info
|
||||||
|
WHERE info.delete_enum = 'FALSE'
|
||||||
|
<if test="params.eqType != null and params.eqType != ''">
|
||||||
|
AND info.type = #{params.eqType}
|
||||||
|
</if>
|
||||||
|
<if test="params.eqWorkId != null and params.eqWorkId != ''">
|
||||||
|
AND info.work_id = #{params.eqWorkId}
|
||||||
|
</if>
|
||||||
|
<if test="params.analysisPointName != null and params.analysisPointName != ''">
|
||||||
|
AND info.details ->> '$.analysisPointName' LIKE CONCAT('%', #{params.analysisPointName}, '%')
|
||||||
|
</if>
|
||||||
|
ORDER BY info.create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue