增加部分接口,修改部分表代码

This commit is contained in:
wulin 2020-10-19 11:36:25 +08:00
parent 8b562bd684
commit a9a2349cd5
23 changed files with 308 additions and 71 deletions

View File

@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.flow.entity.ResultDimension;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ResultDimensionMapper extends BaseMapper<ResultDimension> {
@ -30,4 +33,5 @@ public interface ResultDimensionMapper extends BaseMapper<ResultDimension> {
int deleteResultDimensionById(@Param("id")Long id);
List<ResultDimension> selectResultDimensionAll();
}

View File

@ -9,8 +9,12 @@ package com.lz.modules.flow.dao;
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.flow.entity.ResultGrade;
import com.lz.modules.flow.model.ResultGradeDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ResultGradeMapper extends BaseMapper<ResultGrade> {
@ -30,4 +34,5 @@ public interface ResultGradeMapper extends BaseMapper<ResultGrade> {
int deleteResultGradeById(@Param("id")Long id);
List<ResultGradeDto> selectResultGradeByGroupId(Long gid);
}

View File

@ -12,7 +12,7 @@ import java.util.Date;
* <p>
* </p>*考核维度表
* @author quyixiao
* @since 2020-10-16
* @since 2020-10-19
*/
@Data
@ -56,8 +56,8 @@ public class ResultModel implements java.io.Serializable {
@ApiModelProperty(value = "使用的哪个等级。等级组idlz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
//排序
@ApiModelProperty(value = "排序", name = "order")
private Integer order;
@ApiModelProperty(value = "排序", name = "orderBy")
private Integer orderBy;
/**
*
* @return
@ -242,15 +242,15 @@ public class ResultModel implements java.io.Serializable {
* 排序
* @return
*/
public Integer getOrder() {
return order;
public Integer getOrderBy() {
return orderBy;
}
/**
* 排序
* @param order
* @param orderBy
*/
public void setOrder(Integer order) {
this.order = order;
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
@Override
@ -268,7 +268,7 @@ public class ResultModel implements java.io.Serializable {
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
",order=" + order +
",orderBy=" + orderBy +
"}";
}
}

View File

@ -12,7 +12,7 @@ import java.util.Date;
* <p>
* </p>*考核指标库表
* @author quyixiao
* @since 2020-10-16
* @since 2020-10-19
*/
@Data
@ -44,8 +44,8 @@ public class ResultTagetLib implements java.io.Serializable {
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
//排序
@ApiModelProperty(value = "排序", name = "order")
private Integer order;
@ApiModelProperty(value = "排序", name = "orderBy")
private Integer orderBy;
/**
*
* @return
@ -170,15 +170,15 @@ public class ResultTagetLib implements java.io.Serializable {
* 排序
* @return
*/
public Integer getOrder() {
return order;
public Integer getOrderBy() {
return orderBy;
}
/**
* 排序
* @param order
* @param orderBy
*/
public void setOrder(Integer order) {
this.order = order;
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
@Override
@ -192,7 +192,7 @@ public class ResultTagetLib implements java.io.Serializable {
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
",order=" + order +
",orderBy=" + orderBy +
"}";
}
}

View File

@ -10,7 +10,7 @@ import java.util.List;
* <p>
* </p>*考核维度表
* @author quyixiao
* @since 2020-10-16
* @since 2020-10-19
*/
@Data
@ -44,8 +44,8 @@ public class ResultModelDto {
@ApiModelProperty(value = "使用的哪个等级。等级组idlz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
//排序
@ApiModelProperty(value = "排序", name = "order")
private Integer order;
@ApiModelProperty(value = "排序", name = "orderBy")
private Integer orderBy;
@ApiModelProperty(value = "已添加的指标", name = "tagetLibs")
private List<ResultTagetLibDto> tagetLibs;
/**
@ -187,15 +187,15 @@ public class ResultModelDto {
* 排序
* @return
*/
public Integer getOrder() {
return order;
public Integer getOrderBy() {
return orderBy;
}
/**
* 排序
* @param order
* @param orderBy
*/
public void setOrder(Integer order) {
this.order = order;
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
@Override
@ -210,7 +210,7 @@ public class ResultModelDto {
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
",order=" + order +
",orderBy=" + orderBy +
"}";
}
}

View File

@ -9,7 +9,7 @@ import java.math.BigDecimal;
* <p>
* </p>*考核指标库表
* @author quyixiao
* @since 2020-10-16
* @since 2020-10-19
*/
@Data
@ -31,10 +31,8 @@ public class ResultTagetLibDto {
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
//排序
@ApiModelProperty(value = "排序", name = "order")
private Integer order;
@ApiModelProperty(value = "排序", name = "orderBy")
private Integer orderBy;
/**
*
* @return
@ -114,15 +112,15 @@ public class ResultTagetLibDto {
* 排序
* @return
*/
public Integer getOrder() {
return order;
public Integer getOrderBy() {
return orderBy;
}
/**
* 排序
* @param order
* @param orderBy
*/
public void setOrder(Integer order) {
this.order = order;
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
@Override
@ -133,7 +131,7 @@ public class ResultTagetLibDto {
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
",order=" + order +
",orderBy=" + orderBy +
"}";
}
}

View File

@ -0,0 +1,130 @@
package com.lz.modules.flow.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*流程图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 +
"}";
}
}

View File

@ -11,14 +11,14 @@ import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*考核模板
* </p>*考核维度
* @author quyixiao
* @since 2020-10-16
* @since 2020-10-19
*/
@Data
@ApiModel(value = "考核维度Req")
@ApiModel(value = "考核维度Req")
public class ResultModelReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
@ -49,13 +49,13 @@ public class ResultModelReq implements java.io.Serializable {
//1:业绩 2文化价值观
@ApiModelProperty(value = "1:业绩 2文化价值观", name = "type")
private Integer type;
//权重
//权重 0不限权重
@ApiModelProperty(value = "权重 0不限权重", name = "weight")
private BigDecimal weight;
//考核子项目个数最大限制
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
private Integer maxCount;
//lz_result_calculate 的id
//lz_result_calculate 的id计算法方法id
@ApiModelProperty(value = "lz_result_calculate 的id计算法方法id", name = "calculateId")
private Long calculateId;
//等级开关0关闭1开启
@ -64,6 +64,9 @@ public class ResultModelReq implements java.io.Serializable {
//使用的哪个等级等级组idlz_result_grade的group_id
@ApiModelProperty(value = "使用的哪个等级。等级组idlz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
//排序
@ApiModelProperty(value = "排序", name = "orderBy")
private Integer orderBy;
/**
*
* @return
@ -170,14 +173,14 @@ public class ResultModelReq implements java.io.Serializable {
}
/**
* 权重
* 权重 0不限权重
* @return
*/
public BigDecimal getWeight() {
return weight;
}
/**
* 权重
* 权重 0不限权重
* @param weight
*/
public void setWeight(BigDecimal weight) {
@ -200,14 +203,14 @@ public class ResultModelReq implements java.io.Serializable {
}
/**
* lz_result_calculate 的id
* lz_result_calculate 的id计算法方法id
* @return
*/
public Long getCalculateId() {
return calculateId;
}
/**
* lz_result_calculate 的id
* lz_result_calculate 的id计算法方法id
* @param calculateId
*/
public void setCalculateId(Long calculateId) {
@ -244,6 +247,21 @@ public class ResultModelReq implements java.io.Serializable {
this.gradeGroupId = gradeGroupId;
}
/**
* 排序
* @return
*/
public Integer getOrderBy() {
return orderBy;
}
/**
* 排序
* @param orderBy
*/
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
@Override
public String toString() {
return "ResultModel{" +
@ -259,6 +277,7 @@ public class ResultModelReq implements java.io.Serializable {
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
",orderBy=" + orderBy +
"}";
}
}

View File

@ -13,12 +13,12 @@ import java.util.Date;
* 菜单权限表
* </p>*考核指标库表
* @author quyixiao
* @since 2020-10-16
* @since 2020-10-19
*/
@Data
@ApiModel(value = "考核指标库Req")
@ApiModel(value = "考核指标库Req")
public class ResultTagetLibReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
@ -52,6 +52,9 @@ public class ResultTagetLibReq implements java.io.Serializable {
//考核标准关键结果
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
//排序
@ApiModelProperty(value = "排序", name = "orderBy")
private Integer orderBy;
/**
*
* @return
@ -172,6 +175,21 @@ public class ResultTagetLibReq implements java.io.Serializable {
this.keyResult = keyResult;
}
/**
* 排序
* @return
*/
public Integer getOrderBy() {
return orderBy;
}
/**
* 排序
* @param orderBy
*/
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
@Override
public String toString() {
return "ResultTagetLib{" +
@ -183,6 +201,7 @@ public class ResultTagetLibReq implements java.io.Serializable {
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
",orderBy=" + orderBy +
"}";
}
}

View File

@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.ResultDimension;
import java.util.List;
/**
* <p>
* 考核维度表 服务类
@ -30,4 +32,5 @@ public interface ResultDimensionService extends IService<ResultDimension> {
int deleteResultDimensionById(Long id);
List<ResultDimension> selectResultDimensionAll();
}

View File

@ -2,6 +2,9 @@ package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.ResultGrade;
import com.lz.modules.flow.model.ResultGradeDto;
import java.util.List;
/**
* <p>
@ -30,4 +33,5 @@ public interface ResultGradeService extends IService<ResultGrade> {
int deleteResultGradeById(Long id);
List<ResultGradeDto> selectResultGradeByGroupId(Long gid);
}

View File

@ -7,6 +7,8 @@ import com.lz.modules.flow.service.ResultDimensionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 考核维度表 服务类
@ -58,6 +60,11 @@ public class ResultDimensionServiceImpl extends ServiceImpl<ResultDimensionMappe
return resultDimensionMapper.deleteResultDimensionById(id);
}
@Override
public List<ResultDimension> selectResultDimensionAll(){
return resultDimensionMapper.selectResultDimensionAll();
}
}

View File

@ -3,10 +3,13 @@ package com.lz.modules.flow.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.flow.dao.ResultGradeMapper;
import com.lz.modules.flow.entity.ResultGrade;
import com.lz.modules.flow.model.ResultGradeDto;
import com.lz.modules.flow.service.ResultGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 等级表 服务类
@ -58,6 +61,11 @@ public class ResultGradeServiceImpl extends ServiceImpl<ResultGradeMapper, Resul
return resultGradeMapper.deleteResultGradeById(id);
}
@Override
public List<ResultGradeDto> selectResultGradeByGroupId(Long gid){
return resultGradeMapper.selectResultGradeByGroupId(gid);
}
}

View File

@ -66,7 +66,7 @@ public class ResultModelServiceImpl extends ServiceImpl<ResultModelMapper, Resul
@Override
public R deleteResultModelById(Long id){
//
log.info("删除考核模板{}", id);
log.info("删除考核模板维度{}", id);
resultTargetLibService.deleteResultTagetLibByModelId(id);
resultModelMapper.deleteResultModelById(id);
return R.ok();

View File

@ -22,7 +22,7 @@ import java.util.Map;
@RestController
@RequestMapping("/flowChart")
@Api(value="流程", tags={"流程接口"})
@Api(tags={"考核节点"})
public class FlowChartController {
@ -33,7 +33,7 @@ public class FlowChartController {
private FlowManagerService flowManagerService;
@GetMapping("/getByFlowManagerId")
@ApiOperation("根据Manager Id获取大流程")
@ApiOperation("根据Manager Id获取大流程节点")
@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) {
@ -56,8 +56,8 @@ public class FlowChartController {
}
@PostMapping("/getById")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChart.class)})
public R getById(@RequestBody @ApiParam FlowChart flowChart) {
flowChart = flowChartService.selectFlowChartById(flowChart.getId());
return R.ok().put("data",flowChart);
@ -70,8 +70,9 @@ public class FlowChartController {
}
@RequestMapping("/save")
public R save(@RequestBody FlowChart flowChart) {
@RequestMapping("/saveDetailProc")
@ApiOperation("根据id保存节点中流程")
public R saveDetailProc(@RequestBody FlowChart flowChart) {
flowChartService.insertFlowChart(flowChart);
return R.ok();
}

View File

@ -6,9 +6,12 @@ import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.ResultDimension;
import com.lz.modules.flow.model.ResultDimensionDto;
import com.lz.modules.flow.service.ResultDimensionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -16,11 +19,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/resultDimension")
@Api(tags = "维度类型")
@Api(tags = "考核维度类型")
public class ResultDimensionController {
@ -31,9 +35,11 @@ public class ResultDimensionController {
@GetMapping("/getDimensions")
@ApiOperation("获取维度类型")
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = ResultDimensionDto.class)})
public R getDimensions() {
//resultDimension = resultDimensionService.selectResultDimensionById(resultDimension.getId());
return R.ok();//.put("resultDimension",resultDimension);
List<ResultDimension> resultDimensions
= resultDimensionService.selectResultDimensionAll();
return R.ok().put("data",resultDimensions);
}
@RequestMapping("/getById")

View File

@ -6,17 +6,25 @@ import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.ResultGrade;
import com.lz.modules.flow.model.ResultGradeDto;
import com.lz.modules.flow.service.ResultGradeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/resultGrade")
@Api(tags = "考核等级")
public class ResultGradeController {
@ -25,6 +33,13 @@ public class ResultGradeController {
@GetMapping("/get375")
@ApiOperation("获取3.75分等级列表")
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = ResultGradeDto.class)})
public R get375() {
List<ResultGradeDto> resultGradeDtos = resultGradeService.selectResultGradeByGroupId(1L);
return R.ok().put("data",resultGradeDtos);
}
@RequestMapping("/getById")

View File

@ -29,7 +29,7 @@ public class ResultModelController {
@GetMapping("/getByGroupId")
@ApiOperation(value="根据考核组id获取模板列表")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultModelDto.class)})
public R getByGroupId(@RequestParam Long id) {
public R getByGroupId(@RequestParam @ApiParam("考核组ID") Long id) {
//List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(id);
List<ResultModelDto> resultModelDtos = resultModelService.selectResultDtoByGroupId(id);
@ -57,7 +57,7 @@ public class ResultModelController {
@PostMapping("/save")
@ApiOperation("新增模板")
@ApiOperation("新增模板中的考核维度")
public R save(@RequestBody @ApiParam ResultModel resultModel) {
resultModelService.insertResultModel(resultModel);
return R.ok().put("data",resultModel);
@ -65,8 +65,8 @@ public class ResultModelController {
@GetMapping("/delete")
@ApiOperation("删除模板")
public R delete(@RequestParam @ApiParam("模板id") Long id) {
@ApiOperation("删除模板中的考核维度")
public R delete(@RequestParam @ApiParam("维度id") Long id) {
return resultModelService.deleteResultModelById(id);
}

View File

@ -105,7 +105,7 @@ public class ResultTagetLibServiceImpl extends ServiceImpl<ResultTagetLibMapper,
@Override
public int deleteResultTagetLibByModelId(Long id){
log.info("删除模板下面的指标,模板id={}", id);
log.info("删除模板下面的指标,模板维度id={}", id);
return resultTagetLibMapper.deleteResultTagetLibByModelId(id);
}

View File

@ -69,5 +69,9 @@
update lz_result_dimension set is_delete = 1 where id=#{id} limit 1
</update>
<select id="selectResultDimensionAll" resultType="ResultDimension" >
select * from lz_result_dimension where is_delete = 0
</select>
</mapper>

View File

@ -89,5 +89,9 @@
update lz_result_grade set is_delete = 1 where id=#{id} limit 1
</update>
<select id="selectResultGradeByGroupId" resultType="com.lz.modules.flow.model.ResultGradeDto" >
select * from lz_result_grade where group_id=#{gid} and is_delete = 0
</select>
</mapper>

View File

@ -16,12 +16,13 @@
<result column="calculate_id" property="calculateId"/>
<result column="grade_status" property="gradeStatus"/>
<result column="grade_group_id" property="gradeGroupId"/>
<result column="order_by" property="orderBy"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, evaluation_group_id AS evaluationGroupId, type AS type, weight AS weight, max_count AS maxCount, calculate_id AS calculateId, grade_status AS gradeStatus, grade_group_id AS gradeGroupId
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, evaluation_group_id AS evaluationGroupId, type AS type, weight AS weight, max_count AS maxCount, calculate_id AS calculateId, grade_status AS gradeStatus, grade_group_id AS gradeGroupId, order_by AS orderBy
</sql>
@ -42,6 +43,7 @@
<if test="calculateId != null">calculate_id, </if>
<if test="gradeStatus != null">grade_status, </if>
<if test="gradeGroupId != null">grade_group_id, </if>
<if test="orderBy != null">order_by, </if>
is_delete,
gmt_create,
gmt_modified
@ -54,6 +56,7 @@
<if test="calculateId != null">#{ calculateId}, </if>
<if test="gradeStatus != null">#{ gradeStatus}, </if>
<if test="gradeGroupId != null">#{ gradeGroupId}, </if>
<if test="orderBy != null">#{ orderBy}, </if>
0,
now(),
now()
@ -74,7 +77,8 @@
<if test="maxCount != null">max_count = #{maxCount},</if>
<if test="calculateId != null">calculate_id = #{calculateId},</if>
<if test="gradeStatus != null">grade_status = #{gradeStatus},</if>
<if test="gradeGroupId != null">grade_group_id = #{gradeGroupId}</if>
<if test="gradeGroupId != null">grade_group_id = #{gradeGroupId},</if>
<if test="orderBy != null">order_by = #{orderBy}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -94,7 +98,8 @@
max_count = #{maxCount},
calculate_id = #{calculateId},
grade_status = #{gradeStatus},
grade_group_id = #{gradeGroupId}
grade_group_id = #{gradeGroupId},
order_by = #{orderBy}
,gmt_modified = now()
where id = #{id}
</update>
@ -109,7 +114,7 @@
</select>
<select id="selectResultDtoByGroupId" resultType="com.lz.modules.flow.model.ResultModelDto" >
select * from lz_result_model where evaluation_group_id=#{id} and is_delete = 0
select * from lz_result_model where evaluation_group_id=#{id} and is_delete = 0 order by order_by desc
</select>
<update id="deleteResultModelByGroupId" parameterType="java.lang.Long">

View File

@ -12,12 +12,13 @@
<result column="model_id" property="modelId"/>
<result column="weight" property="weight"/>
<result column="key_result" property="keyResult"/>
<result column="order_by" property="orderBy"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, model_id AS modelId, weight AS weight, key_result AS keyResult
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, model_id AS modelId, weight AS weight, key_result AS keyResult, order_by AS orderBy
</sql>
@ -34,6 +35,7 @@
<if test="modelId != null">model_id, </if>
<if test="weight != null">weight, </if>
<if test="keyResult != null">key_result, </if>
<if test="orderBy != null">order_by, </if>
is_delete,
gmt_create,
gmt_modified
@ -42,6 +44,7 @@
<if test="modelId != null">#{ modelId}, </if>
<if test="weight != null">#{ weight}, </if>
<if test="keyResult != null">#{ keyResult}, </if>
<if test="orderBy != null">#{ orderBy}, </if>
0,
now(),
now()
@ -58,7 +61,8 @@
<if test="name != null">name = #{name},</if>
<if test="modelId != null">model_id = #{modelId},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="keyResult != null">key_result = #{keyResult}</if>
<if test="keyResult != null">key_result = #{keyResult},</if>
<if test="orderBy != null">order_by = #{orderBy}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -74,7 +78,8 @@
name = #{name},
model_id = #{modelId},
weight = #{weight},
key_result = #{keyResult}
key_result = #{keyResult},
order_by = #{orderBy}
,gmt_modified = now()
where id = #{id}
</update>
@ -85,7 +90,7 @@
</update>
<select id="selectResultTagetLibByModelId" resultType="com.lz.modules.flow.model.ResultTagetLibDto" >
select * from lz_result_taget_lib where model_id=#{id} and is_delete = 0 limit 1
select * from lz_result_taget_lib where model_id=#{id} and is_delete = 0 order by order_by desc
</select>
<select id="selectByCondition" resultType="ResultTagetLib" >