集成knife4j-spring-ui说明文档

This commit is contained in:
wulin 2020-10-16 09:41:47 +08:00
parent e5a72e8351
commit d024b7b3ac
22 changed files with 266 additions and 114 deletions

View File

@ -33,7 +33,7 @@
<qiniu.version>7.2.23</qiniu.version>
<aliyun.oss.version>2.8.3</aliyun.oss.version>
<qcloud.cos.version>4.4</qcloud.cos.version>
<swagger.version>2.7.0</swagger.version>
<swagger.version>2.9.2</swagger.version>
<joda.time.version>2.9.9</joda.time.version>
<gson.version>2.8.5</gson.version>
<fastjson.version>1.2.60</fastjson.version>
@ -163,6 +163,7 @@
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
@ -173,6 +174,12 @@
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>

View File

@ -9,6 +9,7 @@ package com.lz.modules.flow.dao;
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.flow.entity.FlowChart;
import com.lz.modules.flow.model.FlowChartRoleDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -34,4 +35,6 @@ public interface FlowChartMapper extends BaseMapper<FlowChart> {
List<FlowChart> selectFlowChartByFlowManagerId(@Param("id") Long id);
List<FlowChartRoleDto> selectChartRoleByChartId(Long id);
}

View File

@ -8,10 +8,9 @@ import lombok.Data;
import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*考评组表
* @author quyixiao
* @since 2020-10-13
* @since 2020-10-15
*/
@Data
@ -35,16 +34,16 @@ public class EvaluationGroup implements java.io.Serializable {
private String name;
//绩效管理员IDsystem_user,id逗号隔开
@ApiModelProperty(value = "绩效管理员IDsystem_user,id逗号隔开", name = "managerIds")
private String managerIds;
//参与考核员工staff_id或者部门id逗号隔开
@ApiModelProperty(value = "参与考核员工staff_id或者部门id逗号隔开", name = "inIds")
private String inIds;
//0部门1人员
@ApiModelProperty(value = "0部门1人员", name = "inType")
private Integer inType;
private Long managerIds;
//参与部门id逗号隔开
@ApiModelProperty(value = "参与部门id逗号隔开", name = "depIds")
private Long depIds;
//参与考核员工staff_id逗号隔开
@ApiModelProperty(value = "参与考核员工staff_id逗号隔开", name = "staffIds")
private Long staffIds;
//排除人员ids逗号隔开
@ApiModelProperty(value = "排除人员ids逗号隔开", name = "outIds")
private String outIds;
private Long outIds;
/**
*
* @return
@ -124,59 +123,60 @@ public class EvaluationGroup implements java.io.Serializable {
* 绩效管理员IDsystem_user,id逗号隔开
* @return
*/
public String getManagerIds() {
public Long getManagerIds() {
return managerIds;
}
/**
* 绩效管理员IDsystem_user,id逗号隔开
* @param managerIds
*/
public void setManagerIds(String managerIds) {
public void setManagerIds(Long managerIds) {
this.managerIds = managerIds;
}
/**
* 参与考核员工staff_id或者部门id逗号隔开
* 参与部门id逗号隔开
* @return
*/
public String getInIds() {
return inIds;
public Long getDepIds() {
return depIds;
}
/**
* 参与考核员工staff_id或者部门id逗号隔开
* @param inIds
* 参与部门id逗号隔开
* @param depIds
*/
public void setInIds(String inIds) {
this.inIds = inIds;
public void setDepIds(Long depIds) {
this.depIds = depIds;
}
/**
* 0部门1人员
* 参与考核员工staff_id逗号隔开
* @return
*/
public Integer getInType() {
return inType;
public Long getStaffIds() {
return staffIds;
}
/**
* 0部门1人员
* @param inType
* 参与考核员工staff_id逗号隔开
* @param staffIds
*/
public void setInType(Integer inType) {
this.inType = inType;
public void setStaffIds(Long staffIds) {
this.staffIds = staffIds;
}
/**
* 排除人员ids逗号隔开
* @return
*/
public String getOutIds() {
public Long getOutIds() {
return outIds;
}
/**
* 排除人员ids逗号隔开
* @param outIds
*/
public void setOutIds(String outIds) {
public void setOutIds(Long outIds) {
this.outIds = outIds;
}
@ -189,8 +189,8 @@ public class EvaluationGroup implements java.io.Serializable {
",gmtModified=" + gmtModified +
",name=" + name +
",managerIds=" + managerIds +
",inIds=" + inIds +
",inType=" + inType +
",depIds=" + depIds +
",staffIds=" + staffIds +
",outIds=" + outIds +
"}";
}

View File

@ -8,10 +8,9 @@ import lombok.Data;
import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*流程审批表
* @author quyixiao
* @since 2020-10-13
* @since 2020-10-15
*/
@Data
@ -42,6 +41,9 @@ public class FlowApprovalRole implements java.io.Serializable {
//流程表id
@ApiModelProperty(value = "流程表id", name = "flowId")
private Long flowId;
//步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可
@ApiModelProperty(value = "步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可", name = "stepType")
private Integer stepType;
/**
*
* @return
@ -162,6 +164,21 @@ public class FlowApprovalRole implements java.io.Serializable {
this.flowId = flowId;
}
/**
* 步骤类型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 "FlowApprovalRole{" +
@ -173,6 +190,7 @@ public class FlowApprovalRole implements java.io.Serializable {
",type=" + type +
",roleId=" + roleId +
",flowId=" + flowId +
",stepType=" + stepType +
"}";
}
}

View File

@ -36,8 +36,8 @@ public class FlowChart implements java.io.Serializable {
//flow_manager表中id
@ApiModelProperty(value = "flow_manager表中id", name = "processId")
private Long processId;
//0启用1不启用
@ApiModelProperty(value = "0启用1不启用", name = "status")
//是否可允许不启用节点 0不可1可以
@ApiModelProperty(value = "是否可允许不启用节点 0不可1可以", name = "status")
private Integer status;
//1可配置细节0不可配置细节一般线下操作比如执行中
@ApiModelProperty(value = "1可配置细节0不可配置细节一般线下操作。比如执行中", name = "type")

View File

@ -21,9 +21,12 @@ public class EvaluationGroupDto {
//绩效管理员IDsystem_user,id逗号隔开
@ApiModelProperty(value = "绩效管理员IDsystem_user,id逗号隔开", name = "managerIds")
private Long managerIds;
//参与考核员工staff_id或者部门id逗号隔开
@ApiModelProperty(value = "参与考核员工staff_id或者部门id逗号隔开", name = "inIds")
private Long inIds;
//参与部门id逗号隔开
@ApiModelProperty(value = "参与部门id逗号隔开", name = "depIds")
private Long depIds;
//参与考核员工staff_id逗号隔开
@ApiModelProperty(value = "参与考核员工staff_id逗号隔开", name = "staffIds")
private Long staffIds;
//0部门1人员
@ApiModelProperty(value = "0部门1人员", name = "inType")
private Integer inType;
@ -45,8 +48,6 @@ public class EvaluationGroupDto {
this.id = id;
}
/**
*
* @return
@ -78,18 +79,33 @@ public class EvaluationGroupDto {
}
/**
* 参与考核员工staff_id或者部门id逗号隔开
* 参与部门id逗号隔开
* @return
*/
public Long getInIds() {
return inIds;
public Long getDepIds() {
return depIds;
}
/**
* 参与考核员工staff_id或者部门id逗号隔开
* @param inIds
* 参与部门id逗号隔开
* @param depIds
*/
public void setInIds(Long inIds) {
this.inIds = inIds;
public void setDepIds(Long depIds) {
this.depIds = depIds;
}
/**
* 参与考核员工staff_id逗号隔开
* @return
*/
public Long getStaffIds() {
return staffIds;
}
/**
* 参与考核员工staff_id逗号隔开
* @param staffIds
*/
public void setStaffIds(Long staffIds) {
this.staffIds = staffIds;
}
/**
@ -128,7 +144,8 @@ public class EvaluationGroupDto {
",id=" + id +
",name=" + name +
",managerIds=" + managerIds +
",inIds=" + inIds +
",depIds=" + depIds +
",staffIds=" + staffIds +
",inType=" + inType +
",outIds=" + outIds +
"}";

View File

@ -27,6 +27,9 @@ public class FlowApprovalRoleDto {
//流程表id
@ApiModelProperty(value = "流程表id", name = "flowId")
private Long flowId;
//步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可
@ApiModelProperty(value = "步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可", name = "stepType")
private Integer stepType;
/**
*
* @return
@ -42,8 +45,6 @@ public class FlowApprovalRoleDto {
this.id = id;
}
/**
* 审批用户id
* @return
@ -104,6 +105,21 @@ public class FlowApprovalRoleDto {
this.flowId = flowId;
}
/**
* 步骤类型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 "FlowApprovalRole{" +
@ -112,6 +128,7 @@ public class FlowApprovalRoleDto {
",type=" + type +
",roleId=" + roleId +
",flowId=" + flowId +
",stepType=" + stepType +
"}";
}
}

View File

@ -21,8 +21,8 @@ public class FlowChartDto {
//flow_manager表中id
@ApiModelProperty(value = "flow_manager表中id", name = "processId")
private Long processId;
//0启用1不启用
@ApiModelProperty(value = "0启用1不启用", name = "status")
//是否可允许不启用节点 0不可1可以
@ApiModelProperty(value = "是否可允许不启用节点 0不可1可以", name = "status")
private Integer status;
//1可配置细节0不可配置细节一般线下操作比如执行中
@ApiModelProperty(value = "1可配置细节0不可配置细节一般线下操作。比如执行中", name = "type")

View File

@ -21,6 +21,8 @@ public class FlowChartRoleDto {
//角色id
@ApiModelProperty(value = "角色id", name = "roleId")
private Long roleId;
@ApiModelProperty(value = "角色名称", name = "roleName")
private String roleName;
//1默认权限必带权限不可修改权限0可选权限
@ApiModelProperty(value = "1默认权限必带权限不可修改权限0可选权限", name = "type")
private Integer type;
@ -92,6 +94,7 @@ public class FlowChartRoleDto {
",id=" + id +
",chartId=" + chartId +
",roleId=" + roleId +
",roleName=" + roleName +
",type=" + type +
"}";
}

View File

@ -11,7 +11,7 @@ import java.util.Date;
* 菜单权限表
* </p>*考评组表
* @author quyixiao
* @since 2020-10-13
* @since 2020-10-15
*/
@ -19,9 +19,13 @@ import java.util.Date;
@ApiModel(value = "考评组表")
public class EvaluationGroupReq implements java.io.Serializable {
@ApiModelProperty(value = "page", name = "当前页码")
private int page = 1;
@ApiModelProperty(value = "rows", name = "每页返回条数")
private int rows = 10;
@ApiModelProperty(value = "sort", name = "类型")
private String sort;
@ApiModelProperty(value = "order", name = "排序")
private String order;
//
private Long id;
@ -40,9 +44,12 @@ public class EvaluationGroupReq implements java.io.Serializable {
//绩效管理员IDsystem_user,id逗号隔开
@ApiModelProperty(value = "绩效管理员IDsystem_user,id逗号隔开", name = "managerIds")
private Long managerIds;
//参与考核员工staff_id或者部门id逗号隔开
@ApiModelProperty(value = "参与考核员工staff_id或者部门id逗号隔开", name = "inIds")
private Long inIds;
//参与部门id逗号隔开
@ApiModelProperty(value = "参与部门id逗号隔开", name = "depIds")
private Long depIds;
//参与考核员工staff_id逗号隔开
@ApiModelProperty(value = "参与考核员工staff_id逗号隔开", name = "staffIds")
private Long staffIds;
//0部门1人员
@ApiModelProperty(value = "0部门1人员", name = "inType")
private Integer inType;
@ -140,18 +147,33 @@ public class EvaluationGroupReq implements java.io.Serializable {
}
/**
* 参与考核员工staff_id或者部门id逗号隔开
* 参与部门id逗号隔开
* @return
*/
public Long getInIds() {
return inIds;
public Long getDepIds() {
return depIds;
}
/**
* 参与考核员工staff_id或者部门id逗号隔开
* @param inIds
* 参与部门id逗号隔开
* @param depIds
*/
public void setInIds(Long inIds) {
this.inIds = inIds;
public void setDepIds(Long depIds) {
this.depIds = depIds;
}
/**
* 参与考核员工staff_id逗号隔开
* @return
*/
public Long getStaffIds() {
return staffIds;
}
/**
* 参与考核员工staff_id逗号隔开
* @param staffIds
*/
public void setStaffIds(Long staffIds) {
this.staffIds = staffIds;
}
/**
@ -193,7 +215,8 @@ public class EvaluationGroupReq implements java.io.Serializable {
",gmtModified=" + gmtModified +
",name=" + name +
",managerIds=" + managerIds +
",inIds=" + inIds +
",depIds=" + depIds +
",staffIds=" + staffIds +
",inType=" + inType +
",outIds=" + outIds +
"}";

View File

@ -11,7 +11,7 @@ import java.util.Date;
* 菜单权限表
* </p>*流程审批表
* @author quyixiao
* @since 2020-10-13
* @since 2020-10-15
*/
@ -19,9 +19,13 @@ import java.util.Date;
@ApiModel(value = "流程审批表")
public class FlowApprovalRoleReq implements java.io.Serializable {
@ApiModelProperty(value = "page", name = "当前页码")
private int page = 1;
@ApiModelProperty(value = "rows", name = "每页返回条数")
private int rows = 10;
@ApiModelProperty(value = "sort", name = "类型")
private String sort;
@ApiModelProperty(value = "order", name = "排序")
private String order;
//
private Long id;
@ -46,6 +50,9 @@ public class FlowApprovalRoleReq implements java.io.Serializable {
//流程表id
@ApiModelProperty(value = "流程表id", name = "flowId")
private Long flowId;
//步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可
@ApiModelProperty(value = "步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可", name = "stepType")
private Integer stepType;
/**
*
* @return
@ -166,6 +173,21 @@ public class FlowApprovalRoleReq implements java.io.Serializable {
this.flowId = flowId;
}
/**
* 步骤类型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 "FlowApprovalRole{" +
@ -177,6 +199,7 @@ public class FlowApprovalRoleReq implements java.io.Serializable {
",type=" + type +
",roleId=" + roleId +
",flowId=" + flowId +
",stepType=" + stepType +
"}";
}
}

View File

@ -40,8 +40,8 @@ public class FlowChartReq implements java.io.Serializable {
//flow_manager表中id
@ApiModelProperty(value = "flow_manager表中id", name = "processId")
private Long processId;
//0启用1不启用
@ApiModelProperty(value = "0启用1不启用", name = "status")
//是否可允许不启用节点 0不可1可以
@ApiModelProperty(value = "是否可允许不启用节点 0不可1可以", name = "status")
private Integer status;
//1可配置细节0不可配置细节一般线下操作比如执行中
@ApiModelProperty(value = "1可配置细节0不可配置细节一般线下操作。比如执行中", name = "type")

View File

@ -2,6 +2,7 @@ package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.FlowChart;
import com.lz.modules.flow.model.FlowChartRoleDto;
import java.util.List;
@ -33,4 +34,6 @@ public interface FlowChartService extends IService<FlowChart> {
List<FlowChart> selectFlowChartByFlowManagerId(Long id);
List<FlowChartRoleDto> selectChartRoleByChartId(Long id);
}

View File

@ -3,6 +3,7 @@ package com.lz.modules.flow.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.flow.dao.FlowChartMapper;
import com.lz.modules.flow.entity.FlowChart;
import com.lz.modules.flow.model.FlowChartRoleDto;
import com.lz.modules.flow.service.FlowChartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -65,6 +66,11 @@ public class FlowChartServiceImpl extends ServiceImpl<FlowChartMapper, FlowChart
return flowChartMapper.selectFlowChartByFlowManagerId(id);
}
@Override
public List<FlowChartRoleDto> selectChartRoleByChartId(Long id){
return flowChartMapper.selectChartRoleByChartId(id);
}
}

View File

@ -9,6 +9,7 @@ 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.FlowManager;
import com.lz.modules.flow.model.FlowChartRoleDto;
import com.lz.modules.flow.service.FlowChartService;
import com.lz.modules.flow.service.FlowManagerService;
import io.swagger.annotations.*;
@ -33,7 +34,7 @@ public class FlowChartController {
@GetMapping("/getByFlowManagerId")
@ApiOperation("根据Manager Id获取大流程")
@ApiImplicitParam(name = "id",value = "流程id", required = true, dataType = "String",paramType = "query")
@ApiImplicitParam(name = "id",value = "流程id绩效请传1", required = true, dataType = "String",paramType = "query")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChart.class)})
public R getByFlowManagerId(@RequestParam Long id) {
FlowManager flowManager = flowManagerService.selectFlowManagerById(id);
@ -44,16 +45,24 @@ public class FlowChartController {
return R.error("无相关流程");
}
@GetMapping("/getRoleByChatId")
@ApiOperation("根据流程节点 Id获取相关权限")
@ApiImplicitParam(name = "id",value = "节点id", required = true, dataType = "String",paramType = "query")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChartRoleDto.class)})
public R getRoleByChatId(@RequestParam Long id) {
List<FlowChartRoleDto> flowCharts = flowChartService.selectChartRoleByChartId(id);
return R.ok().put("list",flowCharts);
}
@PostMapping("/getById")
@ApiOperation("获取流程节点")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChart.class)})
public R getById(@RequestBody @ApiParam FlowChart flowChart) {
flowChart = flowChartService.selectFlowChartById(flowChart.getId());
return R.ok().put("flowChart",flowChart);
}
@RequestMapping("/update")
public R update(@RequestBody FlowChart flowChart) {
flowChartService.updateFlowChartById(flowChart);

View File

@ -8,6 +8,7 @@ import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.ResultModel;
import com.lz.modules.flow.service.ResultModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
@ -55,7 +56,7 @@ public class ResultModelController {
@RequestMapping("/delete")
public R list(@RequestBody Long id) {
public R delete(@RequestBody Long id) {
resultModelService.deleteResultModelById(id);
return R.ok();
}

View File

@ -10,59 +10,59 @@
<result column="gmt_modified" property="gmtModified"/>
<result column="name" property="name"/>
<result column="manager_ids" property="managerIds"/>
<result column="in_ids" property="inIds"/>
<result column="in_type" property="inType"/>
<result column="dep_ids" property="depIds"/>
<result column="staff_ids" property="staffIds"/>
<result column="out_ids" property="outIds"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, manager_ids AS managerIds, in_ids AS inIds, in_type AS inType, out_ids AS outIds
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, manager_ids AS managerIds, dep_ids AS depIds, staff_ids AS staffIds, out_ids AS outIds
</sql>
<select id="selectEvaluationGroupById" resultType="EvaluationGroup" >
select * from lz_evaluation_group where id=#{id} and is_delete = 0 limit 1
select * from lz_evaluation_group where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertEvaluationGroup" parameterType="EvaluationGroup" useGeneratedKeys="true" keyProperty="id" >
insert into lz_evaluation_group(
<if test="name != null">name, </if>
<if test="managerIds != null">manager_ids, </if>
<if test="inIds != null">in_ids, </if>
<if test="inType != null">in_type, </if>
<if test="outIds != null">out_ids, </if>
is_delete,
gmt_create,
gmt_modified
<if test="name != null">name, </if>
<if test="managerIds != null">manager_ids, </if>
<if test="depIds != null">dep_ids, </if>
<if test="staffIds != null">staff_ids, </if>
<if test="outIds != null">out_ids, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="name != null">#{ name}, </if>
<if test="managerIds != null">#{ managerIds}, </if>
<if test="inIds != null">#{ inIds}, </if>
<if test="inType != null">#{ inType}, </if>
<if test="outIds != null">#{ outIds}, </if>
0,
now(),
now()
<if test="name != null">#{ name}, </if>
<if test="managerIds != null">#{ managerIds}, </if>
<if test="depIds != null">#{ depIds}, </if>
<if test="staffIds != null">#{ staffIds}, </if>
<if test="outIds != null">#{ outIds}, </if>
0,
now(),
now()
)
</insert>
<update id="updateEvaluationGroupById" parameterType="EvaluationGroup" >
update
lz_evaluation_group
lz_evaluation_group
<trim prefix="set" suffixOverrides=",">
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="name != null">name = #{name},</if>
<if test="managerIds != null">manager_ids = #{managerIds},</if>
<if test="inIds != null">in_ids = #{inIds},</if>
<if test="inType != null">in_type = #{inType},</if>
<if test="outIds != null">out_ids = #{outIds}</if>
<if test="depIds != null">dep_ids = #{depIds},</if>
<if test="staffIds != null">staff_ids = #{staffIds},</if>
<if test="outIds != null">out_ids = #{outIds}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -71,14 +71,14 @@
<update id="updateCoverEvaluationGroupById" parameterType="EvaluationGroup" >
update
lz_evaluation_group
set
lz_evaluation_group
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
name = #{name},
manager_ids = #{managerIds},
in_ids = #{inIds},
in_type = #{inType},
dep_ids = #{depIds},
staff_ids = #{staffIds},
out_ids = #{outIds}
,gmt_modified = now()
where id = #{id}

View File

@ -12,12 +12,13 @@
<result column="type" property="type"/>
<result column="role_id" property="roleId"/>
<result column="flow_id" property="flowId"/>
<result column="step_type" property="stepType"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, approval_id AS approvalId, type AS type, role_id AS roleId, flow_id AS flowId
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, approval_id AS approvalId, type AS type, role_id AS roleId, flow_id AS flowId, step_type AS stepType
</sql>
@ -34,6 +35,7 @@
<if test="type != null">type, </if>
<if test="roleId != null">role_id, </if>
<if test="flowId != null">flow_id, </if>
<if test="stepType != null">step_type, </if>
is_delete,
gmt_create,
gmt_modified
@ -42,6 +44,7 @@
<if test="type != null">#{ type}, </if>
<if test="roleId != null">#{ roleId}, </if>
<if test="flowId != null">#{ flowId}, </if>
<if test="stepType != null">#{ stepType}, </if>
0,
now(),
now()
@ -58,7 +61,8 @@
<if test="approvalId != null">approval_id = #{approvalId},</if>
<if test="type != null">type = #{type},</if>
<if test="roleId != null">role_id = #{roleId},</if>
<if test="flowId != null">flow_id = #{flowId}</if>
<if test="flowId != null">flow_id = #{flowId},</if>
<if test="stepType != null">step_type = #{stepType}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -74,7 +78,8 @@
approval_id = #{approvalId},
type = #{type},
role_id = #{roleId},
flow_id = #{flowId}
flow_id = #{flowId},
step_type = #{stepType}
,gmt_modified = now()
where id = #{id}
</update>

View File

@ -93,5 +93,9 @@
select * from lz_flow_chart where process_id=#{id} and is_delete = 0 order by step_index asc
</select>
<select id="selectChartRoleByChartId" resultType="com.lz.modules.flow.model.FlowChartRoleDto" >
SELECT crole.id as id, crole.chart_id as chart_id, crole.role_id as role_id, role.name as role_name, crole.type as type FROM lz_flow_chart_role crole left join lz_record_role role on role.id=crole.role_id where crole.chart_id=#{id}
</select>
</mapper>

View File

@ -44,6 +44,7 @@ public class MysqlMain {
public static String mysql_username = "ldd_biz";
public static String mysql_password = "Hello1234";
public static String dto_exclude = ",is_delete,gmt_create,gmt_modified,";//生成dto时排除字段前后都要加英文逗号
public static String req_exclude = "";//生成Req时排除字段前后都要加英文逗号
/**
* @param args
@ -65,17 +66,17 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_evaluation_group"));
list.add(new TablesBean("lz_evaluation_start_staff"));
//list.add(new TablesBean("lz_evaluation_start_staff"));
list.add(new TablesBean("lz_flow_approval_role"));
list.add(new TablesBean("lz_flow_change"));
list.add(new TablesBean("lz_flow_chart"));
list.add(new TablesBean("lz_flow_chart_role"));
list.add(new TablesBean("lz_flow_start"));
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_score"));
//list.add(new TablesBean("lz_flow_change"));
//list.add(new TablesBean("lz_flow_chart"));
//list.add(new TablesBean("lz_flow_chart_role"));
//list.add(new TablesBean("lz_flow_start"));
//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_score"));
List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();

View File

@ -31,17 +31,23 @@ public class MysqlUtilTable2Bean {
int i = 0;
bf.append(" \n");
bf.append(" @ApiModelProperty(value = \"page\", name = \"当前页码\")\n");
bf.append(" private int page = 1;\n");
bf.append(" @ApiModelProperty(value = \"rows\", name = \"每页返回条数\")\n");
bf.append(" private int rows = 10;\n");
bf.append(" @ApiModelProperty(value = \"sort\", name = \"类型\")\n");
bf.append(" private String sort;\n");
bf.append(" @ApiModelProperty(value = \"order\", name = \"排序\")\n");
bf.append(" private String order;\n");
// 定义声明
for (FieldBean tb : list) {
if (MysqlMain.req_exclude.contains("," + tb.getField() + ",")) {
continue;
}
String temp = "";
temp += " //" + tb.getComment() + "\n";
if (i == 0) {
@ -65,6 +71,9 @@ public class MysqlUtilTable2Bean {
// 定义get set方法
for (FieldBean tb : list) {
if (MysqlMain.req_exclude.contains("," + tb.getField() + ",")) {
continue;
}
String temp = "";
temp += " /**\n";
temp += " * " + tb.getComment() + " \n";
@ -99,6 +108,9 @@ public class MysqlUtilTable2Bean {
sb.append(" return \"" + realName + "{\" +\n");
for (FieldBean tb : list) {
if (MysqlMain.req_exclude.contains("," + tb.getField() + ",")) {
continue;
}
String temp = "";
sb.append(" \"," + tb.getJavaCode() + "=\" + " + tb.getJavaCode() + " +\n");
}

View File

@ -78,7 +78,7 @@ public class MysqlUtilTable2Contoller {
content.append("\n");
content.append("\n");
content.append(" @RequestMapping(\"/delete\")\n");
content.append(" public R list(@RequestBody Long id) {\n");
content.append(" public R delete(@RequestBody Long id) {\n");
content.append(" " + tableBean.getJavaName() + "Service.delete" + tableBean.getSpaceName() + "ById(id);\n");
content.append(" return R.ok();\n");
content.append(" }\n");