Merge remote-tracking branch 'origin/main'

main
wanglei 6 months ago
commit 046e135d1d

@ -1,9 +1,14 @@
package com.ruoyi.kaohe.controller; package com.ruoyi.kaohe.controller;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.kaohe.domain.*;
import com.ruoyi.kaohe.service.IKhPcEmpService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
@ -16,7 +21,6 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.kaohe.domain.KhPingce;
import com.ruoyi.kaohe.service.IKhPingceService; import com.ruoyi.kaohe.service.IKhPingceService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
@ -33,6 +37,8 @@ public class KhPingceController extends BaseController
{ {
@Autowired @Autowired
private IKhPingceService khPingceService; private IKhPingceService khPingceService;
@Autowired
private IKhPcEmpService pcEmpService;
/** /**
* *
@ -74,10 +80,25 @@ public class KhPingceController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('kaohe:pingce:add')") @PreAuthorize("@ss.hasPermi('kaohe:pingce:add')")
@Log(title = "考核评测", businessType = BusinessType.INSERT) @Log(title = "考核评测", businessType = BusinessType.INSERT)
@Transactional
@PostMapping @PostMapping
public AjaxResult add(@RequestBody KhPingce khPingce) public AjaxResult add(@RequestBody KhPingce khPingce)
{ {
return toAjax(khPingceService.insertKhPingce(khPingce)); khPingceService.insertKhPingce(khPingce);
//增加关联表
List<KhEmployee> pcEmps = khPingce.getPcEmps();
if(pcEmps !=null&& pcEmps.size()>0){
for(KhEmployee item:pcEmps){
KhPcEmp pcEmp = new KhPcEmp();
pcEmp.setPcId(khPingce.getId());
pcEmp.setEmpId(item.getId());
pcEmp.setEmpName(item.getEmpName());
pcEmp.setDeptId(item.getDeptId());
pcEmp.setDeptName(item.getDeptName());
pcEmpService.insertKhPcEmp(pcEmp);
}
}
return AjaxResult.success();
} }
/** /**
@ -86,9 +107,31 @@ public class KhPingceController extends BaseController
@PreAuthorize("@ss.hasPermi('kaohe:pingce:edit')") @PreAuthorize("@ss.hasPermi('kaohe:pingce:edit')")
@Log(title = "考核评测", businessType = BusinessType.UPDATE) @Log(title = "考核评测", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
@Transactional
public AjaxResult edit(@RequestBody KhPingce khPingce) public AjaxResult edit(@RequestBody KhPingce khPingce)
{ {
return toAjax(khPingceService.updateKhPingce(khPingce)); khPingceService.updateKhPingce(khPingce);
List<KhEmployee> pcEmps = khPingce.getPcEmps();
if(pcEmps !=null&& pcEmps.size()>0){
//删除原来关联
KhPcEmp query = new KhPcEmp();
query.setPcId(khPingce.getId());
List<KhPcEmp> temItems = pcEmpService.selectKhPcEmpList(query);
List<Long> ids = temItems.stream().map(KhPcEmp::getId).collect(Collectors.toList());
pcEmpService.deleteKhPcEmpByIds(ids.toArray(new Long[ids.size()]));
//增加新的关联
for(KhEmployee item:pcEmps){
KhPcEmp pcEmp = new KhPcEmp();
pcEmp.setPcId(khPingce.getId());
pcEmp.setEmpId(item.getId());
pcEmp.setEmpName(item.getEmpName());
pcEmp.setDeptId(item.getDeptId());
pcEmp.setDeptName(item.getDeptName());
pcEmpService.insertKhPcEmp(pcEmp);
}
}
return AjaxResult.success();
} }
/** /**
@ -99,6 +142,12 @@ public class KhPingceController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
for(Long id:ids){
KhPingce khPingce = khPingceService.selectKhPingceById(id);
if(!khPingce.getState().equals("0")){
return AjaxResult.error("评测:"+khPingce.getPcTitle()+" 不是未开始状态,不允许删除");
}
}
return toAjax(khPingceService.deleteKhPingceByIds(ids)); return toAjax(khPingceService.deleteKhPingceByIds(ids));
} }
} }

@ -87,6 +87,7 @@ public class KhTemplateController extends BaseController
public AjaxResult add(@RequestBody KhTemplate khTemplate) public AjaxResult add(@RequestBody KhTemplate khTemplate)
{ {
khTemplateService.insertKhTemplate(khTemplate); khTemplateService.insertKhTemplate(khTemplate);
//增加关联表
List<KhItems> items = khTemplate.getItems(); List<KhItems> items = khTemplate.getItems();
if(items !=null&& items.size()>0){ if(items !=null&& items.size()>0){
for(KhItems item:items){ for(KhItems item:items){
@ -119,6 +120,7 @@ public class KhTemplateController extends BaseController
List<KhTemItem> temItems = temItemService.selectKhTemItemList(query); List<KhTemItem> temItems = temItemService.selectKhTemItemList(query);
List<Long> ids = temItems.stream().map(KhTemItem::getId).collect(Collectors.toList()); List<Long> ids = temItems.stream().map(KhTemItem::getId).collect(Collectors.toList());
temItemService.deleteKhTemItemByIds(ids.toArray(new Long[ids.size()])); temItemService.deleteKhTemItemByIds(ids.toArray(new Long[ids.size()]));
//增加新的关联
for(KhItems item:items){ for(KhItems item:items){
KhTemItem temItem = new KhTemItem(); KhTemItem temItem = new KhTemItem();
temItem.setTemName(khTemplate.getTemName()); temItem.setTemName(khTemplate.getTemName());

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import java.util.List;
/** /**
* kh_pingce * kh_pingce
* *
@ -42,7 +44,17 @@ public class KhPingce extends BaseEntity
@Excel(name = "评测状态(0 开始 1 进行中 2 完成)") @Excel(name = "评测状态(0 开始 1 进行中 2 完成)")
private String state; private String state;
public void setId(Long id) private List<KhEmployee> pcEmps;
public List<KhEmployee> getPcEmps() {
return pcEmps;
}
public void setPcEmps(List<KhEmployee> pcEmps) {
this.pcEmps = pcEmps;
}
public void setId(Long id)
{ {
this.id = id; this.id = id;
} }

@ -1,5 +1,6 @@
package com.ruoyi.kaohe.domain; package com.ruoyi.kaohe.domain;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
@ -58,6 +59,10 @@ public class KhVote extends BaseEntity
@Excel(name = "最大投票数") @Excel(name = "最大投票数")
private Long maxNum; private Long maxNum;
/** 评分占比(0-1之间) */
@Excel(name = "评分占比(0-1之间)")
private BigDecimal percentage;
/** 状态(0 未开始 1 进行中 2 完成) */ /** 状态(0 未开始 1 进行中 2 完成) */
@Excel(name = "状态(0 未开始 1 进行中 2 完成)") @Excel(name = "状态(0 未开始 1 进行中 2 完成)")
private String state; private String state;
@ -127,6 +132,14 @@ public class KhVote extends BaseEntity
this.vDescription = vDescription; this.vDescription = vDescription;
} }
public BigDecimal getPercentage() {
return percentage;
}
public void setPercentage(BigDecimal percentage) {
this.percentage = percentage;
}
public String getvDescription() public String getvDescription()
{ {
return vDescription; return vDescription;
@ -185,6 +198,7 @@ public class KhVote extends BaseEntity
.append("sTime", getsTime()) .append("sTime", getsTime())
.append("eTime", geteTime()) .append("eTime", geteTime())
.append("maxNum", getMaxNum()) .append("maxNum", getMaxNum())
.append("percentage", getPercentage())
.append("state", getState()) .append("state", getState())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

@ -1,5 +1,6 @@
package com.ruoyi.kaohe.domain; package com.ruoyi.kaohe.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@ -7,9 +8,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* kh_vote_emp * kh_vote_emp
* *
* @author hs * @author hs
* @date 2025-06-17 * @date 2025-06-19
*/ */
public class KhVoteEmp extends BaseEntity public class KhVoteEmp extends BaseEntity
{ {
@ -46,102 +47,132 @@ public class KhVoteEmp extends BaseEntity
@Excel(name = "当前投票分数") @Excel(name = "当前投票分数")
private Long voteScore; private Long voteScore;
public void setId(Long id) /** 评分占比(0-1之间) */
@Excel(name = "评分占比(0-1之间)")
private BigDecimal percentage;
/** 最终分数 */
@Excel(name = "最终分数")
private Long endScore;
public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setVoteId(Long voteId) public void setVoteId(Long voteId)
{ {
this.voteId = voteId; this.voteId = voteId;
} }
public Long getVoteId() public Long getVoteId()
{ {
return voteId; return voteId;
} }
public void setVoteTitle(String voteTitle) public void setVoteTitle(String voteTitle)
{ {
this.voteTitle = voteTitle; this.voteTitle = voteTitle;
} }
public String getVoteTitle() public String getVoteTitle()
{ {
return voteTitle; return voteTitle;
} }
public void setEmpId(Long empId) public void setEmpId(Long empId)
{ {
this.empId = empId; this.empId = empId;
} }
public Long getEmpId() public Long getEmpId()
{ {
return empId; return empId;
} }
public void setEmpName(String empName) public void setEmpName(String empName)
{ {
this.empName = empName; this.empName = empName;
} }
public String getEmpName() public String getEmpName()
{ {
return empName; return empName;
} }
public void setContent(String content) public void setContent(String content)
{ {
this.content = content; this.content = content;
} }
public String getContent() public String getContent()
{ {
return content; return content;
} }
public void setVoteNum(Long voteNum) public void setVoteNum(Long voteNum)
{ {
this.voteNum = voteNum; this.voteNum = voteNum;
} }
public Long getVoteNum() public Long getVoteNum()
{ {
return voteNum; return voteNum;
} }
public void setVoteScore(Long voteScore) public void setVoteScore(Long voteScore)
{ {
this.voteScore = voteScore; this.voteScore = voteScore;
} }
public Long getVoteScore() public Long getVoteScore()
{ {
return voteScore; return voteScore;
} }
public void setPercentage(BigDecimal percentage)
{
this.percentage = percentage;
}
public BigDecimal getPercentage()
{
return percentage;
}
public void setEndScore(Long endScore)
{
this.endScore = endScore;
}
public Long getEndScore()
{
return endScore;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("voteId", getVoteId()) .append("voteId", getVoteId())
.append("voteTitle", getVoteTitle()) .append("voteTitle", getVoteTitle())
.append("empId", getEmpId()) .append("empId", getEmpId())
.append("empName", getEmpName()) .append("empName", getEmpName())
.append("content", getContent()) .append("content", getContent())
.append("voteNum", getVoteNum()) .append("voteNum", getVoteNum())
.append("voteScore", getVoteScore()) .append("voteScore", getVoteScore())
.append("createBy", getCreateBy()) .append("percentage", getPercentage())
.append("createTime", getCreateTime()) .append("endScore", getEndScore())
.append("updateBy", getUpdateBy()) .append("createBy", getCreateBy())
.append("updateTime", getUpdateTime()) .append("createTime", getCreateTime())
.append("remark", getRemark()) .append("updateBy", getUpdateBy())
.toString(); .append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
} }
} }

@ -17,6 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<collection property="pcEmps" ofType="KhEmployee">
<result property="id" column="emp_id" />
<result property="empName" column="emp_name" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
</collection >
</resultMap> </resultMap>
<sql id="selectKhPingceVo"> <sql id="selectKhPingceVo">
@ -24,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectKhPingceList" parameterType="KhPingce" resultMap="KhPingceResult"> <select id="selectKhPingceList" parameterType="KhPingce" resultMap="KhPingceResult">
<include refid="selectKhPingceVo"/> select p.*, emp_id,emp_name,dept_id,dept_name from kh_pingce p left join kh_pc_emp pe on p.id=pe.pc_id
<where> <where>
<if test="pcTitle != null and pcTitle != ''"> and pc_title = #{pcTitle}</if> <if test="pcTitle != null and pcTitle != ''"> and pc_title = #{pcTitle}</if>
<if test="pcDescription != null and pcDescription != ''"> and pc_description = #{pcDescription}</if> <if test="pcDescription != null and pcDescription != ''"> and pc_description = #{pcDescription}</if>
@ -36,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectKhPingceById" parameterType="Long" resultMap="KhPingceResult"> <select id="selectKhPingceById" parameterType="Long" resultMap="KhPingceResult">
<include refid="selectKhPingceVo"/> select p.*, emp_id,emp_name,dept_id,dept_name from kh_pingce p left join kh_pc_emp pe on p.id=pe.pc_id
where id = #{id} where p.id = #{id}
</select> </select>
<insert id="insertKhPingce" parameterType="KhPingce" useGeneratedKeys="true" keyProperty="id"> <insert id="insertKhPingce" parameterType="KhPingce" useGeneratedKeys="true" keyProperty="id">

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.kaohe.mapper.KhVoteEmpMapper"> <mapper namespace="com.ruoyi.kaohe.mapper.KhVoteEmpMapper">
<resultMap type="KhVoteEmp" id="KhVoteEmpResult"> <resultMap type="KhVoteEmp" id="KhVoteEmpResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="voteId" column="vote_id" /> <result property="voteId" column="vote_id" />
@ -13,6 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="content" column="content" /> <result property="content" column="content" />
<result property="voteNum" column="vote_num" /> <result property="voteNum" column="vote_num" />
<result property="voteScore" column="vote_score" /> <result property="voteScore" column="vote_score" />
<result property="percentage" column="percentage" />
<result property="endScore" column="end_score" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
@ -21,12 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectKhVoteEmpVo"> <sql id="selectKhVoteEmpVo">
select id, vote_id, vote_title, emp_id, emp_name, content, vote_num, vote_score, create_by, create_time, update_by, update_time, remark from kh_vote_emp select id, vote_id, vote_title, emp_id, emp_name, content, vote_num, vote_score, percentage, end_score, create_by, create_time, update_by, update_time, remark from kh_vote_emp
</sql> </sql>
<select id="selectKhVoteEmpList" parameterType="KhVoteEmp" resultMap="KhVoteEmpResult"> <select id="selectKhVoteEmpList" parameterType="KhVoteEmp" resultMap="KhVoteEmpResult">
<include refid="selectKhVoteEmpVo"/> <include refid="selectKhVoteEmpVo"/>
<where> <where>
<if test="voteId != null "> and vote_id = #{voteId}</if> <if test="voteId != null "> and vote_id = #{voteId}</if>
<if test="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if> <if test="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if>
<if test="empId != null "> and emp_id = #{empId}</if> <if test="empId != null "> and emp_id = #{empId}</if>
@ -34,9 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''"> and content = #{content}</if> <if test="content != null and content != ''"> and content = #{content}</if>
<if test="voteNum != null "> and vote_num = #{voteNum}</if> <if test="voteNum != null "> and vote_num = #{voteNum}</if>
<if test="voteScore != null "> and vote_score = #{voteScore}</if> <if test="voteScore != null "> and vote_score = #{voteScore}</if>
<if test="percentage != null "> and percentage = #{percentage}</if>
<if test="endScore != null "> and end_score = #{endScore}</if>
</where> </where>
</select> </select>
<select id="selectKhVoteEmpById" parameterType="Long" resultMap="KhVoteEmpResult"> <select id="selectKhVoteEmpById" parameterType="Long" resultMap="KhVoteEmpResult">
<include refid="selectKhVoteEmpVo"/> <include refid="selectKhVoteEmpVo"/>
where id = #{id} where id = #{id}
@ -52,12 +56,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null">content,</if> <if test="content != null">content,</if>
<if test="voteNum != null">vote_num,</if> <if test="voteNum != null">vote_num,</if>
<if test="voteScore != null">vote_score,</if> <if test="voteScore != null">vote_score,</if>
<if test="percentage != null">percentage,</if>
<if test="endScore != null">end_score,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="voteId != null">#{voteId},</if> <if test="voteId != null">#{voteId},</if>
<if test="voteTitle != null">#{voteTitle},</if> <if test="voteTitle != null">#{voteTitle},</if>
@ -66,12 +72,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null">#{content},</if> <if test="content != null">#{content},</if>
<if test="voteNum != null">#{voteNum},</if> <if test="voteNum != null">#{voteNum},</if>
<if test="voteScore != null">#{voteScore},</if> <if test="voteScore != null">#{voteScore},</if>
<if test="percentage != null">#{percentage},</if>
<if test="endScore != null">#{endScore},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
</trim> </trim>
</insert> </insert>
<update id="updateKhVoteEmp" parameterType="KhVoteEmp"> <update id="updateKhVoteEmp" parameterType="KhVoteEmp">
@ -84,6 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null">content = #{content},</if> <if test="content != null">content = #{content},</if>
<if test="voteNum != null">vote_num = #{voteNum},</if> <if test="voteNum != null">vote_num = #{voteNum},</if>
<if test="voteScore != null">vote_score = #{voteScore},</if> <if test="voteScore != null">vote_score = #{voteScore},</if>
<if test="percentage != null">percentage = #{percentage},</if>
<if test="endScore != null">end_score = #{endScore},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
@ -98,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteKhVoteEmpByIds" parameterType="String"> <delete id="deleteKhVoteEmpByIds" parameterType="String">
delete from kh_vote_emp where id in delete from kh_vote_emp where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>

@ -15,6 +15,7 @@
<result property="sTime" column="s_time" /> <result property="sTime" column="s_time" />
<result property="eTime" column="e_time" /> <result property="eTime" column="e_time" />
<result property="maxNum" column="max_num" /> <result property="maxNum" column="max_num" />
<result property="percentage" column="percentage" />
<result property="state" column="state" /> <result property="state" column="state" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -24,7 +25,7 @@
</resultMap> </resultMap>
<sql id="selectKhVoteVo"> <sql id="selectKhVoteVo">
select id, pingce_id, pingce_name, khitem_id, khitem_name, vote_title, v_description, s_time, e_time, max_num, state, create_by, create_time, update_by, update_time, remark from kh_vote select id, pingce_id, pingce_name, khitem_id, khitem_name, vote_title, v_description, s_time, e_time, max_num, percentage, state, create_by, create_time, update_by, update_time, remark from kh_vote
</sql> </sql>
<select id="selectKhVoteList" parameterType="KhVote" resultMap="KhVoteResult"> <select id="selectKhVoteList" parameterType="KhVote" resultMap="KhVoteResult">
@ -39,6 +40,7 @@
<if test="sTime != null "> and s_time = #{sTime}</if> <if test="sTime != null "> and s_time = #{sTime}</if>
<if test="eTime != null "> and e_time = #{eTime}</if> <if test="eTime != null "> and e_time = #{eTime}</if>
<if test="maxNum != null "> and max_num = #{maxNum}</if> <if test="maxNum != null "> and max_num = #{maxNum}</if>
<if test="percentage != null "> and percentage = #{percentage}</if>
<if test="state != null and state != ''"> and state = #{state}</if> <if test="state != null and state != ''"> and state = #{state}</if>
</where> </where>
</select> </select>
@ -60,6 +62,7 @@
<if test="sTime != null">s_time,</if> <if test="sTime != null">s_time,</if>
<if test="eTime != null">e_time,</if> <if test="eTime != null">e_time,</if>
<if test="maxNum != null">max_num,</if> <if test="maxNum != null">max_num,</if>
<if test="percentage != null">percentage,</if>
<if test="state != null">state,</if> <if test="state != null">state,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -77,6 +80,7 @@
<if test="sTime != null">#{sTime},</if> <if test="sTime != null">#{sTime},</if>
<if test="eTime != null">#{eTime},</if> <if test="eTime != null">#{eTime},</if>
<if test="maxNum != null">#{maxNum},</if> <if test="maxNum != null">#{maxNum},</if>
<if test="percentage != null">#{percentage},</if>
<if test="state != null">#{state},</if> <if test="state != null">#{state},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -98,6 +102,7 @@
<if test="sTime != null">s_time = #{sTime},</if> <if test="sTime != null">s_time = #{sTime},</if>
<if test="eTime != null">e_time = #{eTime},</if> <if test="eTime != null">e_time = #{eTime},</if>
<if test="maxNum != null">max_num = #{maxNum},</if> <if test="maxNum != null">max_num = #{maxNum},</if>
<if test="percentage != null">percentage = #{percentage},</if>
<if test="state != null">state = #{state},</if> <if test="state != null">state = #{state},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>

Loading…
Cancel
Save