评测、投票关联被考核对象未职工或者部门

main 11
hshansha 6 months ago
parent 0b89a3b145
commit d7921b8841

@ -86,13 +86,13 @@ public class KhPingceController extends BaseController
{
khPingceService.insertKhPingce(khPingce);
//增加关联表
List<KhEmployee> pcEmps = khPingce.getPcEmps();
List<Bkhdx> pcEmps = khPingce.getPcBkhdxs();
if(pcEmps !=null&& pcEmps.size()>0){
for(KhEmployee item:pcEmps){
for(Bkhdx item:pcEmps){
KhPcEmp pcEmp = new KhPcEmp();
pcEmp.setPcId(khPingce.getId());
pcEmp.setEmpId(item.getId());
pcEmp.setEmpName(item.getEmpName());
pcEmp.setBkhdxId(item.getBkhdxId());
pcEmp.setBkhdxName(item.getBkhdxName());
pcEmp.setDeptId(item.getDeptId());
pcEmp.setDeptName(item.getDeptName());
pcEmpService.insertKhPcEmp(pcEmp);
@ -112,7 +112,7 @@ public class KhPingceController extends BaseController
{
khPingceService.updateKhPingce(khPingce);
List<KhEmployee> pcEmps = khPingce.getPcEmps();
List<Bkhdx> pcEmps = khPingce.getPcBkhdxs();
if(pcEmps !=null&& pcEmps.size()>0){
//删除原来关联
KhPcEmp query = new KhPcEmp();
@ -123,11 +123,11 @@ public class KhPingceController extends BaseController
pcEmpService.deleteKhPcEmpByIds(ids.toArray(new Long[ids.size()]));
}
//增加新的关联
for(KhEmployee item:pcEmps){
for(Bkhdx item:pcEmps){
KhPcEmp pcEmp = new KhPcEmp();
pcEmp.setPcId(khPingce.getId());
pcEmp.setEmpId(item.getId());
pcEmp.setEmpName(item.getEmpName());
pcEmp.setBkhdxId(item.getBkhdxId());
pcEmp.setBkhdxName(item.getBkhdxName());
pcEmp.setDeptId(item.getDeptId());
pcEmp.setDeptName(item.getDeptName());
pcEmpService.insertKhPcEmp(pcEmp);

@ -96,8 +96,8 @@ public class KhVoteController extends BaseController
for(KhPcEmp pcEmp:pcEmps){
//新增投票选项关联表
KhVoteEmp voteEmp = new KhVoteEmp();
voteEmp.setEmpId(pcEmp.getEmpId());
voteEmp.setEmpName(pcEmp.getEmpName());
voteEmp.setBkhdxId(pcEmp.getBkhdxId());
voteEmp.setBkhdxName(pcEmp.getBkhdxName());
voteEmp.setVoteId(khVote.getId());
voteEmp.setVoteTitle(khVote.getVoteTitle());
voteEmp.setPercentage(khVote.getPercentage());

@ -0,0 +1,73 @@
package com.ruoyi.kaohe.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
*
*/
public class Bkhdx extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 被评测对象id */
@Excel(name = "被考核对象id")
private Long bkhdxId;
/** 被评测对象名称 */
@Excel(name = "被考核对象名称")
private String bkhdxName;
/** 职工所属部门 */
@Excel(name = "部门")
private Long deptId;
/** 部门名称 */
@Excel(name = "部门名称")
private String deptName;
/* *//** 被考核对象类型 *//*
@Excel(name = "被考核对象类型")
private String bkhdxType;*/
public Long getBkhdxId() {
return bkhdxId;
}
public void setBkhdxId(Long bkhdxId) {
this.bkhdxId = bkhdxId;
}
public String getBkhdxName() {
return bkhdxName;
}
public void setBkhdxName(String bkhdxName) {
this.bkhdxName = bkhdxName;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
/* public String getBkhdxType() {
return bkhdxType;
}
public void setBkhdxType(String bkhdxType) {
this.bkhdxType = bkhdxType;
}*/
}

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* kh_pc_emp
*
* @author hs
* @date 2025-06-17
* @date 2025-06-23
*/
public class KhPcEmp extends BaseEntity
{
@ -22,16 +22,20 @@ public class KhPcEmp extends BaseEntity
@Excel(name = "评测id")
private Long pcId;
/** 职工id */
@Excel(name = "职工id")
private Long empId;
/** 被考核对象(0部门1职工) */
@Excel(name = "被考核对象(0部门1职工)")
private String bkhdxType;
/** 职工姓名 */
@Excel(name = "职工姓名")
private String empName;
/** 被考核对象id */
@Excel(name = "被考核对象id")
private Long bkhdxId;
/** 员工所属部门 */
@Excel(name = "员工所属部门")
/** 被考核对象姓名 */
@Excel(name = "被考核对象姓名")
private String bkhdxName;
/** 部门id */
@Excel(name = "部门id")
private Long deptId;
/** 部门名称 */
@ -58,24 +62,34 @@ public class KhPcEmp extends BaseEntity
return pcId;
}
public void setEmpId(Long empId)
public void setBkhdxType(String bkhdxType)
{
this.bkhdxType = bkhdxType;
}
public String getBkhdxType()
{
return bkhdxType;
}
public void setBkhdxId(Long bkhdxId)
{
this.empId = empId;
this.bkhdxId = bkhdxId;
}
public Long getEmpId()
public Long getBkhdxId()
{
return empId;
return bkhdxId;
}
public void setEmpName(String empName)
public void setBkhdxName(String bkhdxName)
{
this.empName = empName;
this.bkhdxName = bkhdxName;
}
public String getEmpName()
public String getBkhdxName()
{
return empName;
return bkhdxName;
}
public void setDeptId(Long deptId)
@ -103,8 +117,9 @@ public class KhPcEmp extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("pcId", getPcId())
.append("empId", getEmpId())
.append("empName", getEmpName())
.append("bkhdxType", getBkhdxType())
.append("bkhdxId", getBkhdxId())
.append("bkhdxName", getBkhdxName())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("createBy", getCreateBy())

@ -36,6 +36,11 @@ public class KhPingce extends BaseEntity
@Excel(name = "模板名称")
private String templateName;
/** 被考核对象类型(0部门1职工) */
@Excel(name = "被考核对象类型(0部门1职工)")
private String bkhdxType;
/** 评测结果id */
@Excel(name = "评测结果id")
private Long pcResultId;
@ -44,14 +49,22 @@ public class KhPingce extends BaseEntity
@Excel(name = "评测状态(0 开始 1 进行中 2 完成)")
private String state;
private List<KhEmployee> pcEmps;
public String getBkhdxType() {
return bkhdxType;
}
public void setBkhdxType(String bkhdxType) {
this.bkhdxType = bkhdxType;
}
private List<Bkhdx> pcBkhdxs;
public List<KhEmployee> getPcEmps() {
return pcEmps;
public List<Bkhdx> getPcBkhdxs() {
return pcBkhdxs;
}
public void setPcEmps(List<KhEmployee> pcEmps) {
this.pcEmps = pcEmps;
public void setPcBkhdxs(List<Bkhdx> pcBkhdxs) {
this.pcBkhdxs = pcBkhdxs;
}
public void setId(Long id)
@ -132,6 +145,7 @@ public class KhPingce extends BaseEntity
.append("pcDescription", getPcDescription())
.append("templateId", getTemplateId())
.append("templateName", getTemplateName())
.append("bkhdxType", getBkhdxType())
.append("pcResultId", getPcResultId())
.append("state", getState())
.append("createBy", getCreateBy())

@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* kh_vote
*
* @author hs
* @date 2025-06-18
* @date 2025-06-23
*/
public class KhVote extends BaseEntity
{
@ -21,12 +21,12 @@ public class KhVote extends BaseEntity
/** 主键 */
private Long id;
/** 评测id */
@Excel(name = "评测id")
/** 所属评测id */
@Excel(name = "所属评测id")
private Long pingceId;
/** 评测名称 */
@Excel(name = "评测名称")
/** 所属评测名称 */
@Excel(name = "所属评测名称")
private String pingceName;
/** 考核项id */
@ -37,6 +37,14 @@ public class KhVote extends BaseEntity
@Excel(name = "考核项名称")
private String khitemName;
/** 考核类型id */
@Excel(name = "考核类型id")
private Long khitemTypeid;
/** 投票选项 */
@Excel(name = "投票选项")
private String voteItems;
/** 投票主题 */
@Excel(name = "投票主题")
private String voteTitle;
@ -55,8 +63,8 @@ public class KhVote extends BaseEntity
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date eTime;
/** 最大投票数 */
@Excel(name = "最大投票数")
/** 最大数 */
@Excel(name = "最大数")
private Long maxNum;
/** 评分占比(0-1之间) */
@ -67,16 +75,6 @@ public class KhVote extends BaseEntity
@Excel(name = "状态(0 未开始 1 进行中 2 完成)")
private String state;
private String typeId;
public String getTypeId() {
return typeId;
}
public void setTypeId(String typeId) {
this.typeId = typeId;
}
public void setId(Long id)
{
this.id = id;
@ -127,6 +125,26 @@ public class KhVote extends BaseEntity
return khitemName;
}
public void setKhitemTypeid(Long khitemTypeid)
{
this.khitemTypeid = khitemTypeid;
}
public Long getKhitemTypeid()
{
return khitemTypeid;
}
public void setVoteItems(String voteItems)
{
this.voteItems = voteItems;
}
public String getVoteItems()
{
return voteItems;
}
public void setVoteTitle(String voteTitle)
{
this.voteTitle = voteTitle;
@ -142,14 +160,6 @@ public class KhVote extends BaseEntity
this.vDescription = vDescription;
}
public BigDecimal getPercentage() {
return percentage;
}
public void setPercentage(BigDecimal percentage) {
this.percentage = percentage;
}
public String getvDescription()
{
return vDescription;
@ -185,6 +195,16 @@ public class KhVote extends BaseEntity
return maxNum;
}
public void setPercentage(BigDecimal percentage)
{
this.percentage = percentage;
}
public BigDecimal getPercentage()
{
return percentage;
}
public void setState(String state)
{
this.state = state;
@ -203,6 +223,8 @@ public class KhVote extends BaseEntity
.append("pingceName", getPingceName())
.append("khitemId", getKhitemId())
.append("khitemName", getKhitemName())
.append("khitemTypeid", getKhitemTypeid())
.append("voteItems", getVoteItems())
.append("voteTitle", getVoteTitle())
.append("vDescription", getvDescription())
.append("sTime", getsTime())

@ -10,7 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* kh_vote_emp
*
* @author hs
* @date 2025-06-19
* @date 2025-06-23
*/
public class KhVoteEmp extends BaseEntity
{
@ -19,6 +19,10 @@ public class KhVoteEmp extends BaseEntity
/** 主键 */
private Long id;
/** 考核类型id */
@Excel(name = "考核类型id")
private Long khitemTypeid;
/** 投票id */
@Excel(name = "投票id")
private Long voteId;
@ -27,26 +31,30 @@ public class KhVoteEmp extends BaseEntity
@Excel(name = "投票主题")
private String voteTitle;
/** 职工id */
@Excel(name = "职工id")
private Long empId;
/** 被考核对象id */
@Excel(name = "被考核对象id")
private Long bkhdxId;
/** 职工姓名 */
@Excel(name = "职工姓名")
private String empName;
/** 被考核对象名称 */
@Excel(name = "被考核对象名称")
private String bkhdxName;
/** 选项内容 */
@Excel(name = "选项内容")
private String content;
/** 当前投票数 */
@Excel(name = "当前投票数")
/** 投票数 */
@Excel(name = "投票数")
private Long voteNum;
/** 当前投票分数 */
@Excel(name = "当前投票分数")
/** 分数 */
@Excel(name = "分数")
private Long voteScore;
/** 平均分数 */
@Excel(name = "平均分数")
private BigDecimal avgScore;
/** 评分占比(0-1之间) */
@Excel(name = "评分占比(0-1之间)")
private BigDecimal percentage;
@ -65,6 +73,16 @@ public class KhVoteEmp extends BaseEntity
return id;
}
public void setKhitemTypeid(Long khitemTypeid)
{
this.khitemTypeid = khitemTypeid;
}
public Long getKhitemTypeid()
{
return khitemTypeid;
}
public void setVoteId(Long voteId)
{
this.voteId = voteId;
@ -85,24 +103,24 @@ public class KhVoteEmp extends BaseEntity
return voteTitle;
}
public void setEmpId(Long empId)
public void setBkhdxId(Long bkhdxId)
{
this.empId = empId;
this.bkhdxId = bkhdxId;
}
public Long getEmpId()
public Long getBkhdxId()
{
return empId;
return bkhdxId;
}
public void setEmpName(String empName)
public void setBkhdxName(String bkhdxName)
{
this.empName = empName;
this.bkhdxName = bkhdxName;
}
public String getEmpName()
public String getBkhdxName()
{
return empName;
return bkhdxName;
}
public void setContent(String content)
@ -135,6 +153,16 @@ public class KhVoteEmp extends BaseEntity
return voteScore;
}
public void setAvgScore(BigDecimal avgScore)
{
this.avgScore = avgScore;
}
public BigDecimal getAvgScore()
{
return avgScore;
}
public void setPercentage(BigDecimal percentage)
{
this.percentage = percentage;
@ -159,13 +187,15 @@ public class KhVoteEmp extends BaseEntity
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("khitemTypeid", getKhitemTypeid())
.append("voteId", getVoteId())
.append("voteTitle", getVoteTitle())
.append("empId", getEmpId())
.append("empName", getEmpName())
.append("bkhdxId", getBkhdxId())
.append("bkhdxName", getBkhdxName())
.append("content", getContent())
.append("voteNum", getVoteNum())
.append("voteScore", getVoteScore())
.append("avgScore", getAvgScore())
.append("percentage", getPercentage())
.append("endScore", getEndScore())
.append("createBy", getCreateBy())

@ -1,14 +1,15 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.kaohe.mapper.KhPcEmpMapper">
<resultMap type="KhPcEmp" id="KhPcEmpResult">
<result property="id" column="id" />
<result property="pcId" column="pc_id" />
<result property="empId" column="emp_id" />
<result property="empName" column="emp_name" />
<result property="bkhdxType" column="bkhdx_type" />
<result property="bkhdxId" column="bkhdx_id" />
<result property="bkhdxName" column="bkhdx_name" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
<result property="createBy" column="create_by" />
@ -19,15 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectKhPcEmpVo">
select id, pc_id, emp_id, emp_name, dept_id, dept_name, create_by, create_time, update_by, update_time, remark from kh_pc_emp
select id, pc_id, bkhdx_type, bkhdx_id, bkhdx_name, dept_id, dept_name, create_by, create_time, update_by, update_time, remark from kh_pc_emp
</sql>
<select id="selectKhPcEmpList" parameterType="KhPcEmp" resultMap="KhPcEmpResult">
<include refid="selectKhPcEmpVo"/>
<where>
<if test="pcId != null "> and pc_id = #{pcId}</if>
<if test="empId != null "> and emp_id = #{empId}</if>
<if test="empName != null and empName != ''"> and emp_name like concat('%', #{empName}, '%')</if>
<if test="bkhdxType != null and bkhdxType != ''"> and bkhdx_type = #{bkhdxType}</if>
<if test="bkhdxId != null "> and bkhdx_id = #{bkhdxId}</if>
<if test="bkhdxName != null and bkhdxName != ''"> and bkhdx_name like concat('%', #{bkhdxName}, '%')</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
</where>
@ -42,8 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into kh_pc_emp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pcId != null">pc_id,</if>
<if test="empId != null">emp_id,</if>
<if test="empName != null">emp_name,</if>
<if test="bkhdxType != null and bkhdxType != ''">bkhdx_type,</if>
<if test="bkhdxId != null">bkhdx_id,</if>
<if test="bkhdxName != null">bkhdx_name,</if>
<if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if>
<if test="createBy != null">create_by,</if>
@ -54,8 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pcId != null">#{pcId},</if>
<if test="empId != null">#{empId},</if>
<if test="empName != null">#{empName},</if>
<if test="bkhdxType != null and bkhdxType != ''">#{bkhdxType},</if>
<if test="bkhdxId != null">#{bkhdxId},</if>
<if test="bkhdxName != null">#{bkhdxName},</if>
<if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if>
<if test="createBy != null">#{createBy},</if>
@ -70,8 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update kh_pc_emp
<trim prefix="SET" suffixOverrides=",">
<if test="pcId != null">pc_id = #{pcId},</if>
<if test="empId != null">emp_id = #{empId},</if>
<if test="empName != null">emp_name = #{empName},</if>
<if test="bkhdxType != null and bkhdxType != ''">bkhdx_type = #{bkhdxType},</if>
<if test="bkhdxId != null">bkhdx_id = #{bkhdxId},</if>
<if test="bkhdxName != null">bkhdx_name = #{bkhdxName},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="createBy != null">create_by = #{createBy},</if>

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="pcDescription" column="pc_description" />
<result property="templateId" column="template_id" />
<result property="templateName" column="template_name" />
<result property="bkhdxType" column="bkhdx_type" />
<result property="pcResultId" column="pc_result_id" />
<result property="state" column="state" />
<result property="createBy" column="create_by" />
@ -17,9 +18,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<collection property="pcEmps" javaType="ArrayList"
ofType="KhEmployee"
select="getEmps" column="{id=id}"/>
<collection property="pcBkhdxs" javaType="ArrayList"
ofType="Bkhdx"
select="getBkhdxs" column="{id=id}"/>
<!--<collection property="pcEmps" ofType="KhEmployee" javaType="list">
<result property="id" column="emp_id" />
<result property="empName" column="emp_name" />
@ -27,16 +28,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptName" column="dept_name" />
</collection >-->
</resultMap>
<resultMap id="EmpsResult" type="KhEmployee">
<result property="id" column="emp_id" />
<result property="empName" column="emp_name" />
<resultMap id="BkhdxsResult" type="Bkhdx">
<result property="bkhdxId" column="bkhdx_id" />
<result property="bkhdxName" column="bkhdx_name" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectKhPingceVo">
select id, pc_title, pc_description, template_id, template_name, pc_result_id, state, create_by, create_time, update_by, update_time, remark from kh_pingce
</sql>
select id, pc_title, pc_description, template_id, template_name, bkhdx_type, pc_result_id, state, create_by, create_time, update_by, update_time, remark from kh_pingce </sql>
<select id="selectKhPingceList" parameterType="KhPingce" resultMap="KhPingceResult">
<include refid="selectKhPingceVo"></include>
@ -51,8 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="getEmps" resultMap="EmpsResult">
select emp_id,emp_name,dept_id,dept_name from kh_pc_emp pe
<select id="getBkhdxs" resultMap="BkhdxsResult">
select bkhdx_id,bkhdx_name,dept_id,dept_name from kh_pc_emp pe
<where>
<if test="id != null "> pe.pc_id = #{id}</if>
</where>
@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pcDescription != null">pc_description,</if>
<if test="templateId != null">template_id,</if>
<if test="templateName != null and templateName != ''">template_name,</if>
<if test="bkhdxType != null and bkhdxType != ''">bkhdx_type,</if>
<if test="pcResultId != null">pc_result_id,</if>
<if test="state != null">state,</if>
<if test="createBy != null">create_by,</if>
@ -84,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pcDescription != null">#{pcDescription},</if>
<if test="templateId != null">#{templateId},</if>
<if test="templateName != null and templateName != ''">#{templateName},</if>
<if test="bkhdxType != null and bkhdxType != ''">#{bkhdxType},</if>
<if test="pcResultId != null">#{pcResultId},</if>
<if test="state != null">#{state},</if>
<if test="createBy != null">#{createBy},</if>
@ -101,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pcDescription != null">pc_description = #{pcDescription},</if>
<if test="templateId != null">template_id = #{templateId},</if>
<if test="templateName != null and templateName != ''">template_name = #{templateName},</if>
<if test="bkhdxType != null and bkhdxType != ''">bkhdx_type = #{bkhdxType},</if>
<if test="pcResultId != null">pc_result_id = #{pcResultId},</if>
<if test="state != null">state = #{state},</if>
<if test="createBy != null">create_by = #{createBy},</if>

@ -6,13 +6,15 @@
<resultMap type="KhVoteEmp" id="KhVoteEmpResult">
<result property="id" column="id" />
<result property="khitemTypeid" column="khitem_typeId" />
<result property="voteId" column="vote_id" />
<result property="voteTitle" column="vote_title" />
<result property="empId" column="emp_id" />
<result property="empName" column="emp_name" />
<result property="bkhdxId" column="bkhdx_id" />
<result property="bkhdxName" column="bkhdx_name" />
<result property="content" column="content" />
<result property="voteNum" column="vote_num" />
<result property="voteScore" column="vote_score" />
<result property="avgScore" column="avg_score" />
<result property="percentage" column="percentage" />
<result property="endScore" column="end_score" />
<result property="createBy" column="create_by" />
@ -23,19 +25,21 @@
</resultMap>
<sql id="selectKhVoteEmpVo">
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
select id, khitem_typeId, vote_id, vote_title, bkhdx_id, bkhdx_name, content, vote_num, vote_score, avg_score, percentage, end_score, create_by, create_time, update_by, update_time, remark from kh_vote_emp
</sql>
<select id="selectKhVoteEmpList" parameterType="KhVoteEmp" resultMap="KhVoteEmpResult">
<include refid="selectKhVoteEmpVo"/>
<where>
<if test="khitemTypeid != null "> and khitem_typeId = #{khitemTypeid}</if>
<if test="voteId != null "> and vote_id = #{voteId}</if>
<if test="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if>
<if test="empId != null "> and emp_id = #{empId}</if>
<if test="empName != null and empName != ''"> and emp_name like concat('%', #{empName}, '%')</if>
<if test="bkhdxId != null "> and bkhdx_id = #{bkhdxId}</if>
<if test="bkhdxName != null and bkhdxName != ''"> and bkhdx_name like concat('%', #{bkhdxName}, '%')</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="voteNum != null "> and vote_num = #{voteNum}</if>
<if test="voteScore != null "> and vote_score = #{voteScore}</if>
<if test="avgScore != null "> and avg_score = #{avgScore}</if>
<if test="percentage != null "> and percentage = #{percentage}</if>
<if test="endScore != null "> and end_score = #{endScore}</if>
</where>
@ -49,13 +53,15 @@
<insert id="insertKhVoteEmp" parameterType="KhVoteEmp" useGeneratedKeys="true" keyProperty="id">
insert into kh_vote_emp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="khitemTypeid != null">khitem_typeId,</if>
<if test="voteId != null">vote_id,</if>
<if test="voteTitle != null">vote_title,</if>
<if test="empId != null">emp_id,</if>
<if test="empName != null">emp_name,</if>
<if test="bkhdxId != null">bkhdx_id,</if>
<if test="bkhdxName != null">bkhdx_name,</if>
<if test="content != null">content,</if>
<if test="voteNum != null">vote_num,</if>
<if test="voteScore != null">vote_score,</if>
<if test="avgScore != null">avg_score,</if>
<if test="percentage != null">percentage,</if>
<if test="endScore != null">end_score,</if>
<if test="createBy != null">create_by,</if>
@ -65,13 +71,15 @@
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="khitemTypeid != null">#{khitemTypeid},</if>
<if test="voteId != null">#{voteId},</if>
<if test="voteTitle != null">#{voteTitle},</if>
<if test="empId != null">#{empId},</if>
<if test="empName != null">#{empName},</if>
<if test="bkhdxId != null">#{bkhdxId},</if>
<if test="bkhdxName != null">#{bkhdxName},</if>
<if test="content != null">#{content},</if>
<if test="voteNum != null">#{voteNum},</if>
<if test="voteScore != null">#{voteScore},</if>
<if test="avgScore != null">#{avgScore},</if>
<if test="percentage != null">#{percentage},</if>
<if test="endScore != null">#{endScore},</if>
<if test="createBy != null">#{createBy},</if>
@ -85,13 +93,15 @@
<update id="updateKhVoteEmp" parameterType="KhVoteEmp">
update kh_vote_emp
<trim prefix="SET" suffixOverrides=",">
<if test="khitemTypeid != null">khitem_typeId = #{khitemTypeid},</if>
<if test="voteId != null">vote_id = #{voteId},</if>
<if test="voteTitle != null">vote_title = #{voteTitle},</if>
<if test="empId != null">emp_id = #{empId},</if>
<if test="empName != null">emp_name = #{empName},</if>
<if test="bkhdxId != null">bkhdx_id = #{bkhdxId},</if>
<if test="bkhdxName != null">bkhdx_name = #{bkhdxName},</if>
<if test="content != null">content = #{content},</if>
<if test="voteNum != null">vote_num = #{voteNum},</if>
<if test="voteScore != null">vote_score = #{voteScore},</if>
<if test="avgScore != null">avg_score = #{avgScore},</if>
<if test="percentage != null">percentage = #{percentage},</if>
<if test="endScore != null">end_score = #{endScore},</if>
<if test="createBy != null">create_by = #{createBy},</if>

@ -10,6 +10,8 @@
<result property="pingceName" column="pingce_name" />
<result property="khitemId" column="khitem_id" />
<result property="khitemName" column="khitem_name" />
<result property="khitemTypeid" column="khitem_typeId" />
<result property="voteItems" column="vote_items" />
<result property="voteTitle" column="vote_title" />
<result property="vDescription" column="v_description" />
<result property="sTime" column="s_time" />
@ -17,7 +19,6 @@
<result property="maxNum" column="max_num" />
<result property="percentage" column="percentage" />
<result property="state" column="state" />
<result property="typeId" column="type_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
@ -26,7 +27,7 @@
</resultMap>
<sql id="selectKhVoteVo">
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
select id, pingce_id, pingce_name, khitem_id, khitem_name, khitem_typeId, vote_items, 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>
<select id="selectKhVoteList" parameterType="KhVote" resultMap="KhVoteResult">
@ -36,6 +37,8 @@
<if test="pingceName != null and pingceName != ''"> and pingce_name like concat('%', #{pingceName}, '%')</if>
<if test="khitemId != null "> and khitem_id = #{khitemId}</if>
<if test="khitemName != null and khitemName != ''"> and khitem_name like concat('%', #{khitemName}, '%')</if>
<if test="khitemTypeid != null "> and khitem_typeId = #{khitemTypeid}</if>
<if test="voteItems != null and voteItems != ''"> and vote_items = #{voteItems}</if>
<if test="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if>
<if test="vDescription != null and vDescription != ''"> and v_description = #{vDescription}</if>
<if test="sTime != null "> and s_time = #{sTime}</if>
@ -58,6 +61,8 @@
<if test="pingceName != null">pingce_name,</if>
<if test="khitemId != null">khitem_id,</if>
<if test="khitemName != null">khitem_name,</if>
<if test="khitemTypeid != null">khitem_typeId,</if>
<if test="voteItems != null">vote_items,</if>
<if test="voteTitle != null and voteTitle != ''">vote_title,</if>
<if test="vDescription != null">v_description,</if>
<if test="sTime != null">s_time,</if>
@ -76,6 +81,8 @@
<if test="pingceName != null">#{pingceName},</if>
<if test="khitemId != null">#{khitemId},</if>
<if test="khitemName != null">#{khitemName},</if>
<if test="khitemTypeid != null">#{khitemTypeid},</if>
<if test="voteItems != null">#{voteItems},</if>
<if test="voteTitle != null and voteTitle != ''">#{voteTitle},</if>
<if test="vDescription != null">#{vDescription},</if>
<if test="sTime != null">#{sTime},</if>
@ -98,6 +105,8 @@
<if test="pingceName != null">pingce_name = #{pingceName},</if>
<if test="khitemId != null">khitem_id = #{khitemId},</if>
<if test="khitemName != null">khitem_name = #{khitemName},</if>
<if test="khitemTypeid != null">khitem_typeId = #{khitemTypeid},</if>
<if test="voteItems != null">vote_items = #{voteItems},</if>
<if test="voteTitle != null and voteTitle != ''">vote_title = #{voteTitle},</if>
<if test="vDescription != null">v_description = #{vDescription},</if>
<if test="sTime != null">s_time = #{sTime},</if>

Loading…
Cancel
Save