From 32861dc01f1113ce3822d30f63efe262b6ed36b7 Mon Sep 17 00:00:00 2001 From: wulin Date: Mon, 19 Oct 2020 14:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8A=82=E7=82=B9=E5=B0=8F?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E8=AE=B0=E5=BD=95=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/dao/FlowChartDetailRecordMapper.java | 33 +++ .../flow/entity/FlowChartDetailRecord.java | 234 +++++++++++++++++ .../flow/model/FlowChartDetailRecordDto.java | 172 +++++++++++++ .../flow/req/FlowChartDetailProcReq.java | 130 ---------- .../flow/req/FlowChartDetailRecordReq.java | 243 ++++++++++++++++++ .../service/FlowChartDetailRecordService.java | 33 +++ .../FlowChartDetailRecordServiceImpl.java | 65 +++++ .../controller/FlowChartController.java | 23 +- .../flow/FlowChartDetailRecordMapper.xml | 103 ++++++++ src/test/java/com/lz/mysql/MysqlMain.java | 9 +- .../com/lz/mysql/MysqlUtilTable2Bean.java | 4 +- 11 files changed, 901 insertions(+), 148 deletions(-) create mode 100644 src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java create mode 100644 src/main/java/com/lz/modules/flow/entity/FlowChartDetailRecord.java create mode 100644 src/main/java/com/lz/modules/flow/model/FlowChartDetailRecordDto.java delete mode 100644 src/main/java/com/lz/modules/flow/req/FlowChartDetailProcReq.java create mode 100644 src/main/java/com/lz/modules/flow/req/FlowChartDetailRecordReq.java create mode 100644 src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java create mode 100644 src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java create mode 100644 src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml diff --git a/src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java b/src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java new file mode 100644 index 00000000..9eeab0c2 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/dao/FlowChartDetailRecordMapper.java @@ -0,0 +1,33 @@ +package com.lz.modules.flow.dao; +/** +*

+* 考核模板流程记录表 服务类 +*

+* +* @author quyixiao +* @since 2020-10-19 +*/ +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lz.modules.flow.entity.FlowChartDetailRecord; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface FlowChartDetailRecordMapper extends BaseMapper { + + + FlowChartDetailRecord selectFlowChartDetailRecordById(@Param("id")Long id); + + + Long insertFlowChartDetailRecord(FlowChartDetailRecord flowChartDetailRecord); + + + int updateFlowChartDetailRecordById(FlowChartDetailRecord flowChartDetailRecord); + + + int updateCoverFlowChartDetailRecordById(FlowChartDetailRecord flowChartDetailRecord); + + + int deleteFlowChartDetailRecordById(@Param("id")Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/entity/FlowChartDetailRecord.java b/src/main/java/com/lz/modules/flow/entity/FlowChartDetailRecord.java new file mode 100644 index 00000000..8129affb --- /dev/null +++ b/src/main/java/com/lz/modules/flow/entity/FlowChartDetailRecord.java @@ -0,0 +1,234 @@ +package com.lz.modules.flow.entity; +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; +/** +*

+*

*考核模板流程记录表 +* @author quyixiao +* @since 2020-10-19 +*/ + +@Data +@TableName("lz_flow_chart_detail_record") +@ApiModel(value = "考核模板流程记录表") +public class FlowChartDetailRecord 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; + //flow_chart_id ,流程图表id + @ApiModelProperty(value = "flow_chart_id ,流程图表id", name = "chartId") + private Long chartId; + //考核组ID + @ApiModelProperty(value = "考核组ID", name = "evaluationGroupId") + private Long evaluationGroupId; + //0关闭,1开启 + @ApiModelProperty(value = "0关闭,1开启", name = "status") + private Integer status; + //操作者id集合,逗号隔开,当opt_type为0时才有值 + @ApiModelProperty(value = "操作者id集合,逗号隔开,当opt_type为0时才有值", name = "optIds") + private Long optIds; + //-1考核人员自己,0人员id,1一级主管,2二级主管.... + @ApiModelProperty(value = "-1考核人员自己,0人员id,1一级主管,2二级主管....", name = "optType") + private Integer optType; + //role id集合,逗号隔开 + @ApiModelProperty(value = "role id集合,逗号隔开", name = "roleIds") + private Long roleIds; + //步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + @ApiModelProperty(value = "步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以)", name = "stepType") + private Integer stepType; + /** + * + * @return + */ + public Long getId() { + return id; + } + /** + * + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * 是否删除状态,1:删除,0:有效 + * @return + */ + public Integer getIsDelete() { + return isDelete; + } + /** + * 是否删除状态,1:删除,0:有效 + * @param isDelete + */ + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + /** + * 创建时间 + * @return + */ + public Date getGmtCreate() { + return gmtCreate; + } + /** + * 创建时间 + * @param gmtCreate + */ + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + /** + * 最后修改时间 + * @return + */ + public Date getGmtModified() { + return gmtModified; + } + /** + * 最后修改时间 + * @param gmtModified + */ + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + /** + * flow_chart_id ,流程图表id + * @return + */ + public Long getChartId() { + return chartId; + } + /** + * flow_chart_id ,流程图表id + * @param chartId + */ + public void setChartId(Long chartId) { + this.chartId = chartId; + } + + /** + * 考核组ID + * @return + */ + public Long getEvaluationGroupId() { + return evaluationGroupId; + } + /** + * 考核组ID + * @param evaluationGroupId + */ + public void setEvaluationGroupId(Long evaluationGroupId) { + this.evaluationGroupId = evaluationGroupId; + } + + /** + * 0关闭,1开启 + * @return + */ + public Integer getStatus() { + return status; + } + /** + * 0关闭,1开启 + * @param status + */ + public void setStatus(Integer status) { + this.status = status; + } + + /** + * 操作者id集合,逗号隔开,当opt_type为0时才有值 + * @return + */ + public Long getOptIds() { + return optIds; + } + /** + * 操作者id集合,逗号隔开,当opt_type为0时才有值 + * @param optIds + */ + public void setOptIds(Long optIds) { + this.optIds = optIds; + } + + /** + * -1考核人员自己,0人员id,1一级主管,2二级主管.... + * @return + */ + public Integer getOptType() { + return optType; + } + /** + * -1考核人员自己,0人员id,1一级主管,2二级主管.... + * @param optType + */ + public void setOptType(Integer optType) { + this.optType = optType; + } + + /** + * role id集合,逗号隔开 + * @return + */ + public Long getRoleIds() { + return roleIds; + } + /** + * role id集合,逗号隔开 + * @param roleIds + */ + public void setRoleIds(Long roleIds) { + this.roleIds = roleIds; + } + + /** + * 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + * @return + */ + public Integer getStepType() { + return stepType; + } + /** + * 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + * @param stepType + */ + public void setStepType(Integer stepType) { + this.stepType = stepType; + } + + @Override + public String toString() { + return "FlowChartDetailRecord{" + + ",id=" + id + + ",isDelete=" + isDelete + + ",gmtCreate=" + gmtCreate + + ",gmtModified=" + gmtModified + + ",chartId=" + chartId + + ",evaluationGroupId=" + evaluationGroupId + + ",status=" + status + + ",optIds=" + optIds + + ",optType=" + optType + + ",roleIds=" + roleIds + + ",stepType=" + stepType + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/FlowChartDetailRecordDto.java b/src/main/java/com/lz/modules/flow/model/FlowChartDetailRecordDto.java new file mode 100644 index 00000000..96b6820f --- /dev/null +++ b/src/main/java/com/lz/modules/flow/model/FlowChartDetailRecordDto.java @@ -0,0 +1,172 @@ +package com.lz.modules.flow.model; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +/** +*

+*

*考核模板流程记录表 +* @author quyixiao +* @since 2020-10-19 +*/ + +@Data +@ApiModel(value = "考核模板流程记录表Dto") +public class FlowChartDetailRecordDto { + // + @ApiModelProperty(value = "", name = "id") + private Long id; + //flow_chart_id ,流程图表id + @ApiModelProperty(value = "flow_chart_id ,流程图表id", name = "chartId") + private Long chartId; + //考核组ID + @ApiModelProperty(value = "考核组ID", name = "evaluationGroupId") + private Long evaluationGroupId; + //0关闭,1开启 + @ApiModelProperty(value = "0关闭,1开启", name = "status") + private Integer status; + //操作者id集合,逗号隔开,当opt_type为0时才有值 + @ApiModelProperty(value = "操作者id集合,逗号隔开,当opt_type为0时才有值", name = "optIds") + private Long optIds; + //-1考核人员自己,0人员id,1一级主管,2二级主管.... + @ApiModelProperty(value = "-1考核人员自己,0人员id,1一级主管,2二级主管....", name = "optType") + private Integer optType; + //role id集合,逗号隔开 + @ApiModelProperty(value = "role id集合,逗号隔开", name = "roleIds") + private Long roleIds; + //步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + @ApiModelProperty(value = "步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以)", name = "stepType") + private Integer stepType; + /** + * + * @return + */ + public Long getId() { + return id; + } + /** + * + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * flow_chart_id ,流程图表id + * @return + */ + public Long getChartId() { + return chartId; + } + /** + * flow_chart_id ,流程图表id + * @param chartId + */ + public void setChartId(Long chartId) { + this.chartId = chartId; + } + + /** + * 考核组ID + * @return + */ + public Long getEvaluationGroupId() { + return evaluationGroupId; + } + /** + * 考核组ID + * @param evaluationGroupId + */ + public void setEvaluationGroupId(Long evaluationGroupId) { + this.evaluationGroupId = evaluationGroupId; + } + + /** + * 0关闭,1开启 + * @return + */ + public Integer getStatus() { + return status; + } + /** + * 0关闭,1开启 + * @param status + */ + public void setStatus(Integer status) { + this.status = status; + } + + /** + * 操作者id集合,逗号隔开,当opt_type为0时才有值 + * @return + */ + public Long getOptIds() { + return optIds; + } + /** + * 操作者id集合,逗号隔开,当opt_type为0时才有值 + * @param optIds + */ + public void setOptIds(Long optIds) { + this.optIds = optIds; + } + + /** + * -1考核人员自己,0人员id,1一级主管,2二级主管.... + * @return + */ + public Integer getOptType() { + return optType; + } + /** + * -1考核人员自己,0人员id,1一级主管,2二级主管.... + * @param optType + */ + public void setOptType(Integer optType) { + this.optType = optType; + } + + /** + * role id集合,逗号隔开 + * @return + */ + public Long getRoleIds() { + return roleIds; + } + /** + * role id集合,逗号隔开 + * @param roleIds + */ + public void setRoleIds(Long roleIds) { + this.roleIds = roleIds; + } + + /** + * 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + * @return + */ + public Integer getStepType() { + return stepType; + } + /** + * 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + * @param stepType + */ + public void setStepType(Integer stepType) { + this.stepType = stepType; + } + + @Override + public String toString() { + return "FlowChartDetailRecordDto{" + + ",id=" + id + + ",chartId=" + chartId + + ",evaluationGroupId=" + evaluationGroupId + + ",status=" + status + + ",optIds=" + optIds + + ",optType=" + optType + + ",roleIds=" + roleIds + + ",stepType=" + stepType + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/req/FlowChartDetailProcReq.java b/src/main/java/com/lz/modules/flow/req/FlowChartDetailProcReq.java deleted file mode 100644 index a4fd0a69..00000000 --- a/src/main/java/com/lz/modules/flow/req/FlowChartDetailProcReq.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.lz.modules.flow.req; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** -*

-* 菜单权限表 -*

*流程图,lz_flow的父 -* @author quyixiao -* @since 2020-10-16 -*/ - - -@Data -@ApiModel(value = "节点小流程详情") -public class FlowChartDetailProcReq implements java.io.Serializable { - - @ApiModelProperty(value = "考核节点id", name = "charId") - private Long charId; - // - - // - @ApiModelProperty(value = "", name = "name") - private String name; - //flow_manager表中id - @ApiModelProperty(value = "flow_manager表中id", name = "processId") - private Long processId; - //是否可允许不启用节点 0不可,1可以 - @ApiModelProperty(value = "是否可允许不启用节点 0不可,1可以", name = "status") - private Integer status; - //1可配置细节,0不可配置细节,一般线下操作。比如执行中 - @ApiModelProperty(value = "1可配置细节,0不可配置细节,一般线下操作。比如执行中", name = "type") - private Integer type; - //执行步骤,第几步,从0开始 - @ApiModelProperty(value = "执行步骤,第几步,从0开始", name = "stepIndex") - private Integer stepIndex; - - - - /** - * - * @return - */ - public String getName() { - return name; - } - /** - * - * @param name - */ - public void setName(String name) { - this.name = name; - } - - /** - * flow_manager表中id - * @return - */ - public Long getProcessId() { - return processId; - } - /** - * flow_manager表中id - * @param processId - */ - public void setProcessId(Long processId) { - this.processId = processId; - } - - /** - * 是否可允许不启用节点 0不可,1可以 - * @return - */ - public Integer getStatus() { - return status; - } - /** - * 是否可允许不启用节点 0不可,1可以 - * @param status - */ - public void setStatus(Integer status) { - this.status = status; - } - - /** - * 1可配置细节,0不可配置细节,一般线下操作。比如执行中 - * @return - */ - public Integer getType() { - return type; - } - /** - * 1可配置细节,0不可配置细节,一般线下操作。比如执行中 - * @param type - */ - public void setType(Integer type) { - this.type = type; - } - - /** - * 执行步骤,第几步,从0开始 - * @return - */ - public Integer getStepIndex() { - return stepIndex; - } - /** - * 执行步骤,第几步,从0开始 - * @param stepIndex - */ - public void setStepIndex(Integer stepIndex) { - this.stepIndex = stepIndex; - } - - @Override - public String toString() { - return "FlowChart{" + - ",charId=" + charId + - ",name=" + name + - ",processId=" + processId + - ",status=" + status + - ",type=" + type + - ",stepIndex=" + stepIndex + - "}"; - } -} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/req/FlowChartDetailRecordReq.java b/src/main/java/com/lz/modules/flow/req/FlowChartDetailRecordReq.java new file mode 100644 index 00000000..57aa2ba9 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/req/FlowChartDetailRecordReq.java @@ -0,0 +1,243 @@ +package com.lz.modules.flow.req; +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; +/** +*

+* 菜单权限表 +*

*考核模板流程记录表 +* @author quyixiao +* @since 2020-10-19 +*/ + + +@Data +@ApiModel(value = "考核模板流程记录表Req") +public class FlowChartDetailRecordReq implements java.io.Serializable { + + @ApiModelProperty(value = "currPage", name = "当前页码") + private int currPage = 1; + @ApiModelProperty(value = "pageSize", name = "每页返回条数") + private int pageSize = 10; + @ApiModelProperty(value = "sort", name = "类型") + private String sort; + @ApiModelProperty(value = "order", name = "排序") + private String order; + // + 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; + //flow_chart_id ,流程图表id + @ApiModelProperty(value = "flow_chart_id ,流程图表id", name = "chartId") + private Long chartId; + //考核组ID + @ApiModelProperty(value = "考核组ID", name = "evaluationGroupId") + private Long evaluationGroupId; + //0关闭,1开启 + @ApiModelProperty(value = "0关闭,1开启", name = "status") + private Integer status; + //操作者id集合,逗号隔开,当opt_type为0时才有值 + @ApiModelProperty(value = "操作者id集合,逗号隔开,当opt_type为0时才有值", name = "optIds") + private Long optIds; + //-1考核人员自己,0人员id,1一级主管,2二级主管.... + @ApiModelProperty(value = "-1考核人员自己,0人员id,1一级主管,2二级主管....", name = "optType") + private Integer optType; + //role id集合,逗号隔开 + @ApiModelProperty(value = "role id集合,逗号隔开", name = "roleIds") + private Long roleIds; + //步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + @ApiModelProperty(value = "步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以)", name = "stepType") + private Integer stepType; + /** + * + * @return + */ + public Long getId() { + return id; + } + /** + * + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * 是否删除状态,1:删除,0:有效 + * @return + */ + public Integer getIsDelete() { + return isDelete; + } + /** + * 是否删除状态,1:删除,0:有效 + * @param isDelete + */ + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + /** + * 创建时间 + * @return + */ + public Date getGmtCreate() { + return gmtCreate; + } + /** + * 创建时间 + * @param gmtCreate + */ + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + /** + * 最后修改时间 + * @return + */ + public Date getGmtModified() { + return gmtModified; + } + /** + * 最后修改时间 + * @param gmtModified + */ + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + /** + * flow_chart_id ,流程图表id + * @return + */ + public Long getChartId() { + return chartId; + } + /** + * flow_chart_id ,流程图表id + * @param chartId + */ + public void setChartId(Long chartId) { + this.chartId = chartId; + } + + /** + * 考核组ID + * @return + */ + public Long getEvaluationGroupId() { + return evaluationGroupId; + } + /** + * 考核组ID + * @param evaluationGroupId + */ + public void setEvaluationGroupId(Long evaluationGroupId) { + this.evaluationGroupId = evaluationGroupId; + } + + /** + * 0关闭,1开启 + * @return + */ + public Integer getStatus() { + return status; + } + /** + * 0关闭,1开启 + * @param status + */ + public void setStatus(Integer status) { + this.status = status; + } + + /** + * 操作者id集合,逗号隔开,当opt_type为0时才有值 + * @return + */ + public Long getOptIds() { + return optIds; + } + /** + * 操作者id集合,逗号隔开,当opt_type为0时才有值 + * @param optIds + */ + public void setOptIds(Long optIds) { + this.optIds = optIds; + } + + /** + * -1考核人员自己,0人员id,1一级主管,2二级主管.... + * @return + */ + public Integer getOptType() { + return optType; + } + /** + * -1考核人员自己,0人员id,1一级主管,2二级主管.... + * @param optType + */ + public void setOptType(Integer optType) { + this.optType = optType; + } + + /** + * role id集合,逗号隔开 + * @return + */ + public Long getRoleIds() { + return roleIds; + } + /** + * role id集合,逗号隔开 + * @param roleIds + */ + public void setRoleIds(Long roleIds) { + this.roleIds = roleIds; + } + + /** + * 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + * @return + */ + public Integer getStepType() { + return stepType; + } + /** + * 步骤类型0:依次,1或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可以) + * @param stepType + */ + public void setStepType(Integer stepType) { + this.stepType = stepType; + } + + @Override + public String toString() { + return "FlowChartDetailRecordReq{" + + ",id=" + id + + ",isDelete=" + isDelete + + ",gmtCreate=" + gmtCreate + + ",gmtModified=" + gmtModified + + ",chartId=" + chartId + + ",evaluationGroupId=" + evaluationGroupId + + ",status=" + status + + ",optIds=" + optIds + + ",optType=" + optType + + ",roleIds=" + roleIds + + ",stepType=" + stepType + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java b/src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java new file mode 100644 index 00000000..c857159c --- /dev/null +++ b/src/main/java/com/lz/modules/flow/service/FlowChartDetailRecordService.java @@ -0,0 +1,33 @@ +package com.lz.modules.flow.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.lz.modules.flow.entity.FlowChartDetailRecord; + +/** +*

+* 考核模板流程记录表 服务类 +*

+* +* @author quyixiao +* @since 2020-10-19 +*/ +public interface FlowChartDetailRecordService extends IService { + + + + FlowChartDetailRecord selectFlowChartDetailRecordById(Long id); + + + Long insertFlowChartDetailRecord(FlowChartDetailRecord flowChartDetailRecord); + + + int updateFlowChartDetailRecordById(FlowChartDetailRecord flowChartDetailRecord); + + + int updateCoverFlowChartDetailRecordById(FlowChartDetailRecord flowChartDetailRecord); + + + int deleteFlowChartDetailRecordById(Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java new file mode 100644 index 00000000..969aeada --- /dev/null +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowChartDetailRecordServiceImpl.java @@ -0,0 +1,65 @@ +package com.lz.modules.flow.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lz.modules.flow.dao.FlowChartDetailRecordMapper; +import com.lz.modules.flow.entity.FlowChartDetailRecord; +import com.lz.modules.flow.service.FlowChartDetailRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** +*

+* 考核模板流程记录表 服务类 +*

+* +* @author quyixiao +* @since 2020-10-19 +*/ + +@Service +public class FlowChartDetailRecordServiceImpl extends ServiceImpl implements FlowChartDetailRecordService { + + + @Autowired + private FlowChartDetailRecordMapper flowChartDetailRecordMapper; + + + + @Override + public FlowChartDetailRecord selectFlowChartDetailRecordById(Long id){ + return flowChartDetailRecordMapper.selectFlowChartDetailRecordById(id); + } + + + + @Override + public Long insertFlowChartDetailRecord(FlowChartDetailRecord flowChartDetailRecord){ + return flowChartDetailRecordMapper.insertFlowChartDetailRecord(flowChartDetailRecord); + } + + + + @Override + public int updateFlowChartDetailRecordById(FlowChartDetailRecord flowChartDetailRecord){ + return flowChartDetailRecordMapper.updateFlowChartDetailRecordById(flowChartDetailRecord); + } + + + + @Override + public int updateCoverFlowChartDetailRecordById(FlowChartDetailRecord flowChartDetailRecord){ + return flowChartDetailRecordMapper.updateCoverFlowChartDetailRecordById(flowChartDetailRecord); + } + + + + @Override + public int deleteFlowChartDetailRecordById(Long id){ + return flowChartDetailRecordMapper.deleteFlowChartDetailRecordById(id); + } + + + + + +} diff --git a/src/main/java/com/lz/modules/performance/controller/FlowChartController.java b/src/main/java/com/lz/modules/performance/controller/FlowChartController.java index e2e7cc9d..d5549f2a 100644 --- a/src/main/java/com/lz/modules/performance/controller/FlowChartController.java +++ b/src/main/java/com/lz/modules/performance/controller/FlowChartController.java @@ -1,24 +1,19 @@ package com.lz.modules.performance.controller; -import com.alibaba.fastjson.JSONObject; -import com.lz.common.utils.PageUtils; import com.lz.common.utils.R; -import com.lz.common.utils.StringUtil; -import com.lz.modules.equipment.entity.model.FindEmployeeResModel; -import com.lz.modules.flow.entity.EvaluationGroup; import com.lz.modules.flow.entity.FlowChart; +import com.lz.modules.flow.entity.FlowChartDetailRecord; import com.lz.modules.flow.entity.FlowManager; import com.lz.modules.flow.model.FlowChartRoleDto; +import com.lz.modules.flow.service.FlowChartDetailRecordService; import com.lz.modules.flow.service.FlowChartService; import com.lz.modules.flow.service.FlowManagerService; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.HashMap; import java.util.List; -import java.util.Map; @RestController @RequestMapping("/flowChart") @@ -32,6 +27,9 @@ public class FlowChartController { @Autowired private FlowManagerService flowManagerService; + @Autowired + private FlowChartDetailRecordService flowChartDetailRecordService; + @GetMapping("/getByFlowManagerId") @ApiOperation("根据Manager Id获取大流程节点") @ApiImplicitParam(name = "id",value = "流程id,绩效请传1", required = true, dataType = "String",paramType = "query") @@ -70,11 +68,12 @@ public class FlowChartController { } - @RequestMapping("/saveDetailProc") - @ApiOperation("根据id保存节点中流程") - public R saveDetailProc(@RequestBody FlowChart flowChart) { - flowChartService.insertFlowChart(flowChart); - return R.ok(); + @PostMapping("/saveDetailProc") + @ApiOperation("保存流程节点小流程") + @ApiResponses({@ApiResponse(code = 200, message = "成功", response = FlowChartDetailRecord.class)}) + public R saveDetailProc(@RequestBody @ApiParam FlowChartDetailRecord flowChartDetailProc) { + flowChartDetailRecordService.insertFlowChartDetailRecord(flowChartDetailProc); + return R.ok().put("data", flowChartDetailProc); } diff --git a/src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml b/src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml new file mode 100644 index 00000000..aa4f1bab --- /dev/null +++ b/src/main/resources/mapper/flow/FlowChartDetailRecordMapper.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, chart_id AS chartId, evaluation_group_id AS evaluationGroupId, status AS status, opt_ids AS optIds, opt_type AS optType, role_ids AS roleIds, step_type AS stepType + + + + + + + + + + insert into lz_flow_chart_detail_record( + chart_id, + evaluation_group_id, + status, + opt_ids, + opt_type, + role_ids, + step_type, + is_delete, + gmt_create, + gmt_modified + )values( + #{ chartId}, + #{ evaluationGroupId}, + #{ status}, + #{ optIds}, + #{ optType}, + #{ roleIds}, + #{ stepType}, + 0, + now(), + now() + ) + + + + + update + lz_flow_chart_detail_record + + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + chart_id = #{chartId}, + evaluation_group_id = #{evaluationGroupId}, + status = #{status}, + opt_ids = #{optIds}, + opt_type = #{optType}, + role_ids = #{roleIds}, + step_type = #{stepType} + + ,gmt_modified = now() + where id = #{id} + + + + + update + lz_flow_chart_detail_record + set + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + chart_id = #{chartId}, + evaluation_group_id = #{evaluationGroupId}, + status = #{status}, + opt_ids = #{optIds}, + opt_type = #{optType}, + role_ids = #{roleIds}, + step_type = #{stepType} + ,gmt_modified = now() + where id = #{id} + + + + + update lz_flow_chart_detail_record set is_delete = 1 where id=#{id} limit 1 + + + + diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java index 04cee285..7d298621 100644 --- a/src/test/java/com/lz/mysql/MysqlMain.java +++ b/src/test/java/com/lz/mysql/MysqlMain.java @@ -75,9 +75,10 @@ public class MysqlMain { list.add(new TablesBean("lz_result_calculate")); list.add(new TablesBean("lz_result_dimension")); list.add(new TablesBean("lz_result_grade"));*/ - list.add(new TablesBean("lz_result_model")); + //list.add(new TablesBean("lz_result_model")); //list.add(new TablesBean("lz_result_score")); - list.add(new TablesBean("lz_result_taget_lib")); + //list.add(new TablesBean("lz_result_taget_lib")); + list.add(new TablesBean("lz_flow_chart_detail_record")); List list2 = new ArrayList(); Map map = MysqlUtil2ShowCreateTable.getComments(); @@ -97,7 +98,7 @@ public class MysqlMain { } - /* for (int i = 0; i < list2.size(); i++) { + for (int i = 0; i < list2.size(); i++) { MysqlUtilTable2Contoller.printController(list2.get(i)); } @@ -109,7 +110,7 @@ public class MysqlMain { for (int i = 0; i < list2.size(); i++) { MysqlUtilTable2Service.printService(list2.get(i)); MysqlUtilTable2Service.printServiceImpl(list2.get(i)); - }*/ + } for (int i = 0; i < list2.size(); i++) { MysqlUtilTable2XML.printXMLForMap(list2.get(i)); diff --git a/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java b/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java index 112749d7..faf4279c 100644 --- a/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java +++ b/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java @@ -105,7 +105,7 @@ public class MysqlUtilTable2Bean { sb.append(" @Override\n"); sb.append(" public String toString() {\n"); - sb.append(" return \"" + realName + "{\" +\n"); + sb.append(" return \"" + realName + "Req{\" +\n"); for (FieldBean tb : list) { if (MysqlMain.req_exclude.contains("," + tb.getField() + ",")) { @@ -360,7 +360,7 @@ public class MysqlUtilTable2Bean { sb.append(" @Override\n"); sb.append(" public String toString() {\n"); - sb.append(" return \"" + realName + "{\" +\n"); + sb.append(" return \"" + realName + "Dto{\" +\n"); for (FieldBean tb : list) { if (MysqlMain.dto_exclude.contains("," + tb.getField() + ",")) {