bugfix:增加字段,解决报送时间不正确的问题

release_1.0.0
liu 10 months ago
parent 3a45d21bdc
commit bcf8f80cf0

@ -48,8 +48,6 @@ public class KnowledgeFlowServiceImpl implements KnowledgeFlowService {
private final KnowledgeFlowTodoService knowledgeFlowTodoService; private final KnowledgeFlowTodoService knowledgeFlowTodoService;
private final SystemFlowService systemFlowService;
private final KnowledgeService knowledgeService; private final KnowledgeService knowledgeService;
private final SystemUserService systemUserService; private final SystemUserService systemUserService;
@ -231,7 +229,8 @@ public class KnowledgeFlowServiceImpl implements KnowledgeFlowService {
Integer flowType = knowledgeFlowTodo.getFlowType(); Integer flowType = knowledgeFlowTodo.getFlowType();
// 如果是知识报送,就置为通过 // 如果是知识报送,就置为通过
if (flowType.equals(FlowTypeEnum.SUBMIT.getFlowType())) { if (flowType.equals(FlowTypeEnum.SUBMIT.getFlowType())) {
knowledgeService.lambdaUpdate().set(Knowledge::getStatus, StatusEnum.PASS.getStatus()).set(Knowledge::getDraftBelongUserId, null) // 如果是通过,就把报送时间设置为最后一次审批通过的时间
knowledgeService.lambdaUpdate().set(Knowledge::getStatus, StatusEnum.PASS.getStatus()).set(Knowledge::getSubmitDate, LocalDate.now()).set(Knowledge::getDraftBelongUserId, null)
.eq(Knowledge::getId, reqVO.getKnowledgeId()).update(); .eq(Knowledge::getId, reqVO.getKnowledgeId()).update();
} else if (flowType.equals(FlowTypeEnum.RECALL.getFlowType())) { } else if (flowType.equals(FlowTypeEnum.RECALL.getFlowType())) {
// 如果是撤回,就置为草稿,并且草稿所属人应该是提交流程的人 // 如果是撤回,就置为草稿,并且草稿所属人应该是提交流程的人

@ -3,6 +3,7 @@ package com.supervision.knowsub.model;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -78,6 +79,9 @@ public class Knowledge implements Serializable {
@Schema(description = "报送部门ID") @Schema(description = "报送部门ID")
private String submitDeptId; private String submitDeptId;
@Schema(description = "报送时间(最后一次审批通过的时间)")
private LocalDate submitDate;
@Schema(description = "草稿归属人ID,注意,在发布之后或撤回之后应该及时修改") @Schema(description = "草稿归属人ID,注意,在发布之后或撤回之后应该及时修改")
private String draftBelongUserId; private String draftBelongUserId;

@ -36,6 +36,6 @@ public class KnowledgePageResVO extends Knowledge {
@Schema(description = "发文时间") @Schema(description = "发文时间")
private LocalDate publishDate; private LocalDate publishDate;
@Schema(description = "报送时间") @Schema(description = "报送时间(最后一次审批通过的时间)")
private LocalDate submitDate; private LocalDate submitDate;
} }

@ -43,7 +43,7 @@
t2.publish_dept_id as publishDeptId, t2.publish_dept_id as publishDeptId,
t2.submit_dept_id as submitDeptId, t2.submit_dept_id as submitDeptId,
t1.submit_user_id as submitUserId, t1.submit_user_id as submitUserId,
t2.create_time as submitDate t2.submit_date as submitDate
from ks_knowledge_flow_todo t1 from ks_knowledge_flow_todo t1
left join ks_knowledge t2 on t1.knowledge_id = t2.id left join ks_knowledge t2 on t1.knowledge_id = t2.id
@ -95,7 +95,7 @@
t3.publish_date as publishDate, t3.publish_date as publishDate,
t1.submit_user_id as submitUserId, t1.submit_user_id as submitUserId,
t2.knowledge_from as knowledgeFrom, t2.knowledge_from as knowledgeFrom,
t2.create_time as submitDate t2.submit_date as submitDate
from ks_knowledge_flow_record t1 from ks_knowledge_flow_record t1
left join ks_knowledge t2 on t1.knowledge_id = t2.id left join ks_knowledge t2 on t1.knowledge_id = t2.id

@ -32,7 +32,6 @@
<select id="queryKnowledgePage" resultType="com.supervision.knowsub.vo.knowledge.KnowledgePageResVO"> <select id="queryKnowledgePage" resultType="com.supervision.knowsub.vo.knowledge.KnowledgePageResVO">
select select
t1.*, t1.*,
t1.create_time as submitDate,
t2.policy_type as policyType, t2.policy_type as policyType,
t2.timeliness as timeliness, t2.timeliness as timeliness,
t2.publish_date as publishDate t2.publish_date as publishDate

Loading…
Cancel
Save