This commit is contained in:
DirectionOfMind 2021-01-12 14:31:40 +08:00
parent d4e9320d56
commit 61bcac7d0f
16 changed files with 987 additions and 3 deletions

View File

@ -0,0 +1,60 @@
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.performance.entity.IndicatorLibrary;
import com.lz.modules.performance.service.IndicatorLibraryService;
import org.springframework.beans.factory.annotation.Autowired;
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.Map;
@RestController
@RequestMapping("/indicatorLibrary")
public class IndicatorLibraryController {
@Autowired
private IndicatorLibraryService indicatorLibraryService;
@RequestMapping("/list")
public R list(@RequestBody String body) {
indicatorLibraryService.list();
return R.ok().put("data",null);
}
@RequestMapping("/getById")
public R getById(@RequestBody IndicatorLibrary indicatorLibrary) {
indicatorLibrary = indicatorLibraryService.selectIndicatorLibraryById(indicatorLibrary.getId());
return R.ok().put("indicatorLibrary",indicatorLibrary);
}
@RequestMapping("/update")
public R update(@RequestBody IndicatorLibrary indicatorLibrary) {
indicatorLibraryService.updateIndicatorLibraryById(indicatorLibrary);
return R.ok();
}
@RequestMapping("/save")
public R save(@RequestBody IndicatorLibrary indicatorLibrary) {
indicatorLibraryService.insertIndicatorLibrary(indicatorLibrary);
return R.ok();
}
@RequestMapping("/delete")
public R delete(@RequestBody Long id) {
indicatorLibraryService.deleteIndicatorLibraryById(id);
return R.ok();
}
}

View File

@ -0,0 +1,43 @@
package com.lz.modules.performance.controller;
import cn.hutool.core.bean.BeanUtil;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.modules.performance.dto.IndicatorTypeDto;
import com.lz.modules.performance.entity.IndicatorType;
import com.lz.modules.performance.req.IndicatorReq;
import com.lz.modules.performance.service.IndicatorTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/indicatorType")
public class IndicatorTypeController {
@Autowired
private IndicatorTypeService indicatorTypeService;
@RequestMapping("/list")
public R list(@RequestBody IndicatorReq req) {
PageUtils page = indicatorTypeService.selectIndicatorTypesByReq(req);
return R.ok().put("data", page);
}
@RequestMapping("/saveOrUpdate")
public R save(@RequestBody IndicatorTypeDto dto) {
IndicatorType indicatorType = new IndicatorType();
BeanUtil.copyProperties(dto,indicatorType);
boolean success = indicatorTypeService.saveOrUpdate(indicatorType);
if(!success){
return R.error();
}
return R.ok();
}
}

View File

@ -0,0 +1,33 @@
package com.lz.modules.performance.dao;
/**
* <p>
* (设置)指标库 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.performance.entity.IndicatorLibrary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface IndicatorLibraryMapper extends BaseMapper<IndicatorLibrary> {
IndicatorLibrary selectIndicatorLibraryById(@Param("id") Long id);
Long insertIndicatorLibrary(IndicatorLibrary indicatorLibrary);
int updateIndicatorLibraryById(IndicatorLibrary indicatorLibrary);
int updateCoverIndicatorLibraryById(IndicatorLibrary indicatorLibrary);
int deleteIndicatorLibraryById(@Param("id") Long id);
}

View File

@ -0,0 +1,43 @@
package com.lz.modules.performance.dao;
/**
* <p>
* 指标分类 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lz.modules.equipment.entity.TCountReq;
import com.lz.modules.performance.dto.IndicatorTypeDto;
import com.lz.modules.performance.entity.IndicatorType;
import com.lz.modules.performance.req.IndicatorReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface IndicatorTypeMapper extends BaseMapper<IndicatorType> {
IndicatorType selectIndicatorTypeById(@Param("id") Long id);
Long insertIndicatorType(IndicatorType indicatorType);
int updateIndicatorTypeById(IndicatorType indicatorType);
int updateCoverIndicatorTypeById(IndicatorType indicatorType);
int deleteIndicatorTypeById(@Param("id") Long id);
List<IndicatorTypeDto> selectIndicatorTypesByReq(@Param("page") IPage page, @Param("req")IndicatorReq req);
}

View File

@ -0,0 +1,22 @@
package com.lz.modules.performance.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: djc
* @Desc:
* @Date: 2021/1/12 10:21
*/
@Data
public class IndicatorTypeDto {
@ApiModelProperty(value = "id", name = "id")
private Long id;
//指标名称
@ApiModelProperty(value = "指标分类名称", name = "name")
private String name;
//排序
@ApiModelProperty(value = "排序(非必传)", name = "orderBy")
private Integer orderBy;
}

View File

@ -0,0 +1,217 @@
package com.lz.modules.performance.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.math.BigDecimal;
import java.util.Date;
/**
* <p>
* </p>*(设置)指标库
* @author quyixiao
* @since 2021-01-12
*/
@Data
@TableName("lz_indicator_library")
@ApiModel(value = "(设置)指标库")
public class IndicatorLibrary implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//
@ApiModelProperty(value = "", name = "isDelete")
private Integer isDelete;
//
@ApiModelProperty(value = "", name = "gmtCreate")
private Date gmtCreate;
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//指标名称
@ApiModelProperty(value = "指标名称", name = "name")
private String name;
//指标类型 0量化指标 1行为价值观指标 2:团队管理
@ApiModelProperty(value = "指标类型 0量化指标 1行为价值观指标 2:团队管理", name = "type")
private Integer type;
//指标分类 lz_indicator_type 表id
@ApiModelProperty(value = "指标分类 lz_indicator_type 表id", name = "indicatorType")
private Integer indicatorType;
//权重
@ApiModelProperty(value = "权重", name = "weight")
private BigDecimal weight;
//考核标准关键结果
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
//排序
@ApiModelProperty(value = "排序", name = "sort")
private Integer sort;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
*
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
*
* @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;
}
/**
* 指标名称
* @return
*/
public String getName() {
return name;
}
/**
* 指标名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 指标类型 0量化指标 1行为价值观指标 2:团队管理
* @return
*/
public Integer getType() {
return type;
}
/**
* 指标类型 0量化指标 1行为价值观指标 2:团队管理
* @param type
*/
public void setType(Integer type) {
this.type = type;
}
/**
* 指标分类 lz_indicator_type 表id
* @return
*/
public Integer getIndicatorType() {
return indicatorType;
}
/**
* 指标分类 lz_indicator_type 表id
* @param indicatorType
*/
public void setIndicatorType(Integer indicatorType) {
this.indicatorType = indicatorType;
}
/**
* 权重
* @return
*/
public BigDecimal getWeight() {
return weight;
}
/**
* 权重
* @param weight
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* 考核标准关键结果
* @return
*/
public String getKeyResult() {
return keyResult;
}
/**
* 考核标准关键结果
* @param keyResult
*/
public void setKeyResult(String keyResult) {
this.keyResult = keyResult;
}
/**
* 排序
* @return
*/
public Integer getSort() {
return sort;
}
/**
* 排序
* @param sort
*/
public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
return "IndicatorLibrary{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",type=" + type +
",indicatorType=" + indicatorType +
",weight=" + weight +
",keyResult=" + keyResult +
",sort=" + sort +
"}";
}
}

View File

@ -0,0 +1,158 @@
package com.lz.modules.performance.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;
/**
* <p>
* </p>*指标分类
* @author quyixiao
* @since 2021-01-12
*/
@Data
@TableName("lz_indicator_type")
@ApiModel(value = "指标分类")
public class IndicatorType implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//
@ApiModelProperty(value = "", name = "isDelete")
private Integer isDelete;
//
@ApiModelProperty(value = "", name = "gmtCreate")
private Date gmtCreate;
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//指标分类名称
@ApiModelProperty(value = "指标分类名称", name = "name")
private String name;
//0: 指标分类 1指标类型
@ApiModelProperty(value = "0: 指标分类 1指标类型", name = "type")
private Integer type;
//排序
@ApiModelProperty(value = "排序", name = "sort")
private Integer sort;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
*
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
*
* @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;
}
/**
* 指标分类名称
* @return
*/
public String getName() {
return name;
}
/**
* 指标分类名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 0: 指标分类 1指标类型
* @return
*/
public Integer getType() {
return type;
}
/**
* 0: 指标分类 1指标类型
* @param type
*/
public void setType(Integer type) {
this.type = type;
}
/**
* 排序
* @return
*/
public Integer getSort() {
return sort;
}
/**
* 排序
* @param sort
*/
public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
return "IndicatorType{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",type=" + type +
",sort=" + sort +
"}";
}
}

View File

@ -0,0 +1,20 @@
package com.lz.modules.performance.req;
import com.lz.modules.equipment.entity.model.BasePage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: djc
* @Desc:
* @Date: 2021/1/12 11:39
*/
@Data
public class IndicatorReq extends BasePage{
//指标名称
@ApiModelProperty(value = "指标分类名称", name = "name")
private String name;
//指标名称
@ApiModelProperty(value = "类型 0: 指标分类 1指标类型", name = "type")
private Integer type;
}

View File

@ -0,0 +1,33 @@
package com.lz.modules.performance.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.performance.entity.IndicatorLibrary;
/**
* <p>
* (设置)指标库 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
public interface IndicatorLibraryService extends IService<IndicatorLibrary> {
IndicatorLibrary selectIndicatorLibraryById(Long id);
Long insertIndicatorLibrary(IndicatorLibrary indicatorLibrary);
int updateIndicatorLibraryById(IndicatorLibrary indicatorLibrary);
int updateCoverIndicatorLibraryById(IndicatorLibrary indicatorLibrary);
int deleteIndicatorLibraryById(Long id);
}

View File

@ -0,0 +1,37 @@
package com.lz.modules.performance.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.common.utils.PageUtils;
import com.lz.modules.performance.req.IndicatorReq;
import com.lz.modules.performance.entity.IndicatorType;
/**
* <p>
* 指标分类 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
public interface IndicatorTypeService extends IService<IndicatorType> {
IndicatorType selectIndicatorTypeById(Long id);
Long insertIndicatorType(IndicatorType indicatorType);
int updateIndicatorTypeById(IndicatorType indicatorType);
int updateCoverIndicatorTypeById(IndicatorType indicatorType);
int deleteIndicatorTypeById(Long id);
PageUtils selectIndicatorTypesByReq(IndicatorReq req);
}

View File

@ -0,0 +1,63 @@
package com.lz.modules.performance.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.performance.dao.IndicatorLibraryMapper;
import com.lz.modules.performance.entity.IndicatorLibrary;
import com.lz.modules.performance.service.IndicatorLibraryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* (设置)指标库 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
@Service
public class IndicatorLibraryServiceImpl extends ServiceImpl<IndicatorLibraryMapper, IndicatorLibrary> implements IndicatorLibraryService {
@Autowired
private IndicatorLibraryMapper indicatorLibraryMapper;
@Override
public IndicatorLibrary selectIndicatorLibraryById(Long id){
return indicatorLibraryMapper.selectIndicatorLibraryById(id);
}
@Override
public Long insertIndicatorLibrary(IndicatorLibrary indicatorLibrary){
return indicatorLibraryMapper.insertIndicatorLibrary(indicatorLibrary);
}
@Override
public int updateIndicatorLibraryById(IndicatorLibrary indicatorLibrary){
return indicatorLibraryMapper.updateIndicatorLibraryById(indicatorLibrary);
}
@Override
public int updateCoverIndicatorLibraryById(IndicatorLibrary indicatorLibrary){
return indicatorLibraryMapper.updateCoverIndicatorLibraryById(indicatorLibrary);
}
@Override
public int deleteIndicatorLibraryById(Long id){
return indicatorLibraryMapper.deleteIndicatorLibraryById(id);
}
}

View File

@ -0,0 +1,71 @@
package com.lz.modules.performance.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.common.utils.PageUtils;
import com.lz.modules.performance.dao.IndicatorTypeMapper;
import com.lz.modules.performance.req.IndicatorReq;
import com.lz.modules.performance.entity.IndicatorType;
import com.lz.modules.performance.service.IndicatorTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 指标分类 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
@Service
public class IndicatorTypeServiceImpl extends ServiceImpl<IndicatorTypeMapper, IndicatorType> implements IndicatorTypeService {
@Autowired
private IndicatorTypeMapper indicatorTypeMapper;
@Override
public IndicatorType selectIndicatorTypeById(Long id){
return indicatorTypeMapper.selectIndicatorTypeById(id);
}
@Override
public Long insertIndicatorType(IndicatorType indicatorType){
return indicatorTypeMapper.insertIndicatorType(indicatorType);
}
@Override
public int updateIndicatorTypeById(IndicatorType indicatorType){
return indicatorTypeMapper.updateIndicatorTypeById(indicatorType);
}
@Override
public int updateCoverIndicatorTypeById(IndicatorType indicatorType){
return indicatorTypeMapper.updateCoverIndicatorTypeById(indicatorType);
}
@Override
public int deleteIndicatorTypeById(Long id){
return indicatorTypeMapper.deleteIndicatorTypeById(id);
}
@Override
public PageUtils selectIndicatorTypesByReq(IndicatorReq req) {
PageUtils page = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
page1 -> indicatorTypeMapper.selectIndicatorTypesByReq(page1,req)
);
return page;
}
}

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lz.modules.performance.dao.IndicatorLibraryMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.lz.modules.performance.entity.IndicatorLibrary">
<id column="id" property="id"/>
<result column="is_delete" property="isDelete"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="name" property="name"/>
<result column="type" property="type"/>
<result column="indicator_type" property="indicatorType"/>
<result column="weight" property="weight"/>
<result column="key_result" property="keyResult"/>
<result column="sort" property="sort"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, type AS type, indicator_type AS indicatorType, weight AS weight, key_result AS keyResult, sort AS sort
</sql>
<select id="selectIndicatorLibraryById" resultType="IndicatorLibrary" >
select * from lz_indicator_library where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertIndicatorLibrary" parameterType="IndicatorLibrary" useGeneratedKeys="true" keyProperty="id" >
insert into lz_indicator_library(
<if test="name != null">name, </if>
<if test="type != null">type, </if>
<if test="indicatorType != null">indicator_type, </if>
<if test="weight != null">weight, </if>
<if test="keyResult != null">key_result, </if>
<if test="sort != null">sort, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="name != null">#{ name}, </if>
<if test="type != null">#{ type}, </if>
<if test="indicatorType != null">#{ indicatorType}, </if>
<if test="weight != null">#{ weight}, </if>
<if test="keyResult != null">#{ keyResult}, </if>
<if test="sort != null">#{ sort}, </if>
0,
now(),
now()
)
</insert>
<update id="updateIndicatorLibraryById" parameterType="IndicatorLibrary" >
update
lz_indicator_library
<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="type != null">type = #{type},</if>
<if test="indicatorType != null">indicator_type = #{indicatorType},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="keyResult != null">key_result = #{keyResult},</if>
<if test="sort != null">sort = #{sort}</if>
</trim>
,gmt_modified = now()
where id = #{id}
</update>
<update id="updateCoverIndicatorLibraryById" parameterType="IndicatorLibrary" >
update
lz_indicator_library
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
name = #{name},
type = #{type},
indicator_type = #{indicatorType},
weight = #{weight},
key_result = #{keyResult},
sort = #{sort}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteIndicatorLibraryById" parameterType="java.lang.Long">
update lz_indicator_library set is_delete = 1 where id=#{id} limit 1
</update>
</mapper>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lz.modules.performance.dao.IndicatorTypeMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.lz.modules.performance.entity.IndicatorType">
<id column="id" property="id"/>
<result column="is_delete" property="isDelete"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="name" property="name"/>
<result column="type" property="type"/>
<result column="sort" property="sort"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, type AS type, sort AS sort
</sql>
<select id="selectIndicatorTypeById" resultType="IndicatorType" >
select * from lz_indicator_type where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertIndicatorType" parameterType="IndicatorType" useGeneratedKeys="true" keyProperty="id" >
insert into lz_indicator_type(
<if test="name != null">name, </if>
<if test="type != null">type, </if>
<if test="sort != null">sort, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="name != null">#{ name}, </if>
<if test="type != null">#{ type}, </if>
<if test="sort != null">#{ sort}, </if>
0,
now(),
now()
)
</insert>
<update id="updateIndicatorTypeById" parameterType="IndicatorType" >
update
lz_indicator_type
<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="type != null">type = #{type},</if>
<if test="sort != null">sort = #{sort}</if>
</trim>
,gmt_modified = now()
where id = #{id}
</update>
<update id="updateCoverIndicatorTypeById" parameterType="IndicatorType" >
update
lz_indicator_type
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
name = #{name},
type = #{type},
sort = #{sort}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteIndicatorTypeById" parameterType="java.lang.Long">
update lz_indicator_type set is_delete = 1 where id=#{id} limit 1
</update>
<select id="selectIndicatorTypesByReq" resultType="com.lz.modules.performance.dto.IndicatorTypeDto">
select id,name,sort from lz_indicator_type where name LIKE CONCAT('%',#{req.name},'%') and type = #{req.type} and is_delete = 0 order by sort
</select>
</mapper>

View File

@ -85,8 +85,8 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>(); List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_flow_chart_role")); list.add(new TablesBean("lz_indicator_library"));
list.add(new TablesBean("lz_flow_chart_role_group")); list.add(new TablesBean("lz_indicator_type"));
List<TablesBean> list2 = new ArrayList<TablesBean>(); List<TablesBean> list2 = new ArrayList<TablesBean>();

View File

@ -46,7 +46,7 @@ public class MysqlUtilTable2Contoller {
content.append(" if(StringUtil.isNotBlank(body)){\n"); content.append(" if(StringUtil.isNotBlank(body)){\n");
content.append(" params = JSONObject.parseObject(body,Map.class);\n"); content.append(" params = JSONObject.parseObject(body,Map.class);\n");
content.append(" }\n"); content.append(" }\n");
content.append(" PageUtils page = " + tableBean.getJavaName() + "service.queryPage(params);\n"); content.append(" PageUtils page = " + tableBean.getJavaName() + "Service.queryPage(params);\n");
content.append(" return R.ok().put(\"page\", page);\n"); content.append(" return R.ok().put(\"page\", page);\n");
content.append(" }\n"); content.append(" }\n");
content.append("\n"); content.append("\n");