提交修改

This commit is contained in:
quyixiao 2020-10-26 19:03:13 +08:00
parent 41e6a8a7c7
commit cbd67d402b
6 changed files with 57 additions and 13 deletions

View File

@ -654,11 +654,7 @@ public class ResultRecordController extends AbstractController {
public R approval(ApprovalDto approvalDto) {
approvalDto.setLoginUserId(approvalDto.getLoginUserId());
return resultRecordService.newApproval(approvalDto);
}
}

View File

@ -8,4 +8,5 @@ public class ApprovalDto {
private Integer status; //1 提交审批,审批通过,2 撤回,3 催办,5 驳回6 申述7 流程终止
private Long loginUserId;
private String menuName; //按钮名称
private String comment;
}

View File

@ -1,41 +1,55 @@
package com.lz.modules.sys.entity.app;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*业绩评论表
* @author quyixiao
* @since 2020-09-21
* @since 2020-10-26
*/
@Data
@TableName("lz_result_comment")
@ApiModel(value = "业绩评论表")
public class ResultComment implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//是否删除状态1删除0有效
@ApiModelProperty(value = "是否删除状态1删除0有效", name = "isDelete")
private Integer isDelete;
//创建时间
@ApiModelProperty(value = "创建时间", name = "gmtCreate")
private Date gmtCreate;
//最后修改时间
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
private Date gmtModified;
//记录id
@ApiModelProperty(value = "记录id", name = "recordId")
private Long recordId;
//评论用户id
@ApiModelProperty(value = "评论用户id", name = "staffId")
private Long staffId;
//评论内容
@ApiModelProperty(value = "评论内容", name = "comment")
private String comment;
//评论用户名称
@ApiModelProperty(value = "评论用户名称", name = "staffName")
private String staffName;
//状态
@ApiModelProperty(value = "状态", name = "status")
private Integer status;
//流程id
@ApiModelProperty(value = "流程id", name = "flowRecordId")
private Long flowRecordId;
//操作名称
@ApiModelProperty(value = "操作名称", name = "optDesc")
private String optDesc;
/**
*
* @return
@ -186,6 +200,21 @@ public class ResultComment implements java.io.Serializable {
this.flowRecordId = flowRecordId;
}
/**
* 操作名称
* @return
*/
public String getOptDesc() {
return optDesc;
}
/**
* 操作名称
* @param optDesc
*/
public void setOptDesc(String optDesc) {
this.optDesc = optDesc;
}
@Override
public String toString() {
return "ResultComment{" +
@ -199,6 +228,7 @@ public class ResultComment implements java.io.Serializable {
",staffName=" + staffName +
",status=" + status +
",flowRecordId=" + flowRecordId +
",optDesc=" + optDesc +
"}";
}
}

View File

@ -31,6 +31,7 @@ import com.lz.modules.performance.req.AssessDetailReq;
import com.lz.modules.performance.res.ChartStatistical;
import com.lz.modules.sys.dao.app.ResultRecordMapper;
import com.lz.modules.sys.entity.SysUserEntity;
import com.lz.modules.sys.entity.app.ResultComment;
import com.lz.modules.sys.entity.app.ResultDetail;
import com.lz.modules.sys.entity.app.ResultRecord;
import com.lz.modules.sys.service.app.ResultCommentService;
@ -839,6 +840,17 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
return newReject(approvalDto);
}
public void comment (ApprovalDto approvalDto,FlowChart flowChart){
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
StaffEntity staffEntity = staffService.selectStaffById(resultRecord.getCurrentApprovalStaffId());
ResultComment resultComment = new ResultComment();
resultComment.setComment(approvalDto.getComment());
resultComment.setStaffName(staffEntity.getName());
resultComment.setRecordId(approvalDto.getResultRecordId());
resultComment.setOptDesc(approvalDto.getMenuName() + flowChart.getName());
resultCommentService.insertResultComment(resultComment);
}
private R newSubmit(ApprovalDto approvalDto) {
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(approvalDto.getResultRecordId());
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
@ -864,6 +876,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
resultRecord.setCurrentApprovalStaffId(currentFlowRecord.getApprovalStaffId());
resultRecord.setCurrentApprovalStaffName(currentFlowRecord.getApprovalStaffName());
resultRecordService.updateResultRecordById(resultRecord);
comment(approvalDto,flowChart);
return R.ok();
}
@ -887,6 +900,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
FlowChart flowChart = flowService.selectFlowChartByChartId(lastFlowRecord.getFlowId());
resultRecord.setFlowProcess(flowChart.getFlowProcess());
resultRecordService.updateResultRecordById(resultRecord);
comment(approvalDto,flowChart);
}
return R.ok();
}
@ -903,8 +917,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
return R.ok();
}
private R explain(ApprovalDto approvalDto) {
return R.ok();

View File

@ -14,12 +14,13 @@
<result column="staff_name" property="staffName"/>
<result column="status" property="status"/>
<result column="flow_record_id" property="flowRecordId"/>
<result column="opt_desc" property="optDesc"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, record_id AS recordId, staff_id AS staffId, comment AS comment, staff_name AS staffName, status AS status, flow_record_id AS flowRecordId
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, record_id AS recordId, staff_id AS staffId, comment AS comment, staff_name AS staffName, status AS status, flow_record_id AS flowRecordId, opt_desc AS optDesc
</sql>
@ -38,6 +39,7 @@
<if test="staffName != null">staff_name, </if>
<if test="status != null">status, </if>
<if test="flowRecordId != null">flow_record_id, </if>
<if test="optDesc != null">opt_desc, </if>
is_delete,
gmt_create,
gmt_modified
@ -48,6 +50,7 @@
<if test="staffName != null">#{ staffName}, </if>
<if test="status != null">#{ status}, </if>
<if test="flowRecordId != null">#{ flowRecordId}, </if>
<if test="optDesc != null">#{ optDesc}, </if>
0,
now(),
now()
@ -66,7 +69,8 @@
<if test="comment != null">comment = #{comment},</if>
<if test="staffName != null">staff_name = #{staffName},</if>
<if test="status != null">status = #{status},</if>
<if test="flowRecordId != null">flow_record_id = #{flowRecordId}</if>
<if test="flowRecordId != null">flow_record_id = #{flowRecordId},</if>
<if test="optDesc != null">opt_desc = #{optDesc}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -84,7 +88,8 @@
comment = #{comment},
staff_name = #{staffName},
status = #{status},
flow_record_id = #{flowRecordId}
flow_record_id = #{flowRecordId},
opt_desc = #{optDesc}
,gmt_modified = now()
where id = #{id}
</update>

View File

@ -96,7 +96,7 @@ public class MysqlMain {
//list.add(new TablesBean("lz_flow_chart_detail_record"));
//list.add(new TablesBean("lz_flow_approval_role"));
list.add(new TablesBean("lz_flow_chart"));
list.add(new TablesBean("lz_result_comment"));
List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();