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

main 11
hshansha 6 months ago
parent 0b89a3b145
commit d7921b8841

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

@ -96,8 +96,8 @@ public class KhVoteController extends BaseController
for(KhPcEmp pcEmp:pcEmps){ for(KhPcEmp pcEmp:pcEmps){
//新增投票选项关联表 //新增投票选项关联表
KhVoteEmp voteEmp = new KhVoteEmp(); KhVoteEmp voteEmp = new KhVoteEmp();
voteEmp.setEmpId(pcEmp.getEmpId()); voteEmp.setBkhdxId(pcEmp.getBkhdxId());
voteEmp.setEmpName(pcEmp.getEmpName()); voteEmp.setBkhdxName(pcEmp.getBkhdxName());
voteEmp.setVoteId(khVote.getId()); voteEmp.setVoteId(khVote.getId());
voteEmp.setVoteTitle(khVote.getVoteTitle()); voteEmp.setVoteTitle(khVote.getVoteTitle());
voteEmp.setPercentage(khVote.getPercentage()); 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 * kh_pc_emp
* *
* @author hs * @author hs
* @date 2025-06-17 * @date 2025-06-23
*/ */
public class KhPcEmp extends BaseEntity public class KhPcEmp extends BaseEntity
{ {
@ -22,16 +22,20 @@ public class KhPcEmp extends BaseEntity
@Excel(name = "评测id") @Excel(name = "评测id")
private Long pcId; private Long pcId;
/** 职工id */ /** 被考核对象(0部门1职工) */
@Excel(name = "职工id") @Excel(name = "被考核对象(0部门1职工)")
private Long empId; private String bkhdxType;
/** 职工姓名 */ /** 被考核对象id */
@Excel(name = "职工姓名") @Excel(name = "被考核对象id")
private String empName; private Long bkhdxId;
/** 员工所属部门 */ /** 被考核对象姓名 */
@Excel(name = "员工所属部门") @Excel(name = "被考核对象姓名")
private String bkhdxName;
/** 部门id */
@Excel(name = "部门id")
private Long deptId; private Long deptId;
/** 部门名称 */ /** 部门名称 */
@ -58,24 +62,34 @@ public class KhPcEmp extends BaseEntity
return pcId; 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) public void setDeptId(Long deptId)
@ -103,8 +117,9 @@ public class KhPcEmp extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("pcId", getPcId()) .append("pcId", getPcId())
.append("empId", getEmpId()) .append("bkhdxType", getBkhdxType())
.append("empName", getEmpName()) .append("bkhdxId", getBkhdxId())
.append("bkhdxName", getBkhdxName())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("deptName", getDeptName()) .append("deptName", getDeptName())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())

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

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

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

@ -1,14 +1,15 @@
<?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.KhPcEmpMapper"> <mapper namespace="com.ruoyi.kaohe.mapper.KhPcEmpMapper">
<resultMap type="KhPcEmp" id="KhPcEmpResult"> <resultMap type="KhPcEmp" id="KhPcEmpResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="pcId" column="pc_id" /> <result property="pcId" column="pc_id" />
<result property="empId" column="emp_id" /> <result property="bkhdxType" column="bkhdx_type" />
<result property="empName" column="emp_name" /> <result property="bkhdxId" column="bkhdx_id" />
<result property="bkhdxName" column="bkhdx_name" />
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
@ -19,15 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectKhPcEmpVo"> <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> </sql>
<select id="selectKhPcEmpList" parameterType="KhPcEmp" resultMap="KhPcEmpResult"> <select id="selectKhPcEmpList" parameterType="KhPcEmp" resultMap="KhPcEmpResult">
<include refid="selectKhPcEmpVo"/> <include refid="selectKhPcEmpVo"/>
<where> <where>
<if test="pcId != null "> and pc_id = #{pcId}</if> <if test="pcId != null "> and pc_id = #{pcId}</if>
<if test="empId != null "> and emp_id = #{empId}</if> <if test="bkhdxType != null and bkhdxType != ''"> and bkhdx_type = #{bkhdxType}</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="deptId != null "> and dept_id = #{deptId}</if> <if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
</where> </where>
@ -42,8 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into kh_pc_emp insert into kh_pc_emp
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pcId != null">pc_id,</if> <if test="pcId != null">pc_id,</if>
<if test="empId != null">emp_id,</if> <if test="bkhdxType != null and bkhdxType != ''">bkhdx_type,</if>
<if test="empName != null">emp_name,</if> <if test="bkhdxId != null">bkhdx_id,</if>
<if test="bkhdxName != null">bkhdx_name,</if>
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if> <if test="deptName != null">dept_name,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
@ -54,8 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pcId != null">#{pcId},</if> <if test="pcId != null">#{pcId},</if>
<if test="empId != null">#{empId},</if> <if test="bkhdxType != null and bkhdxType != ''">#{bkhdxType},</if>
<if test="empName != null">#{empName},</if> <if test="bkhdxId != null">#{bkhdxId},</if>
<if test="bkhdxName != null">#{bkhdxName},</if>
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if> <if test="deptName != null">#{deptName},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
@ -70,8 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update kh_pc_emp update kh_pc_emp
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="pcId != null">pc_id = #{pcId},</if> <if test="pcId != null">pc_id = #{pcId},</if>
<if test="empId != null">emp_id = #{empId},</if> <if test="bkhdxType != null and bkhdxType != ''">bkhdx_type = #{bkhdxType},</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="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="deptName != null">dept_name = #{deptName},</if> <if test="deptName != null">dept_name = #{deptName},</if>
<if test="createBy != null">create_by = #{createBy},</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="pcDescription" column="pc_description" />
<result property="templateId" column="template_id" /> <result property="templateId" column="template_id" />
<result property="templateName" column="template_name" /> <result property="templateName" column="template_name" />
<result property="bkhdxType" column="bkhdx_type" />
<result property="pcResultId" column="pc_result_id" /> <result property="pcResultId" column="pc_result_id" />
<result property="state" column="state" /> <result property="state" column="state" />
<result property="createBy" column="create_by" /> <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="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" javaType="ArrayList" <collection property="pcBkhdxs" javaType="ArrayList"
ofType="KhEmployee" ofType="Bkhdx"
select="getEmps" column="{id=id}"/> select="getBkhdxs" column="{id=id}"/>
<!--<collection property="pcEmps" ofType="KhEmployee" javaType="list"> <!--<collection property="pcEmps" ofType="KhEmployee" javaType="list">
<result property="id" column="emp_id" /> <result property="id" column="emp_id" />
<result property="empName" column="emp_name" /> <result property="empName" column="emp_name" />
@ -27,16 +28,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
</collection >--> </collection >-->
</resultMap> </resultMap>
<resultMap id="EmpsResult" type="KhEmployee"> <resultMap id="BkhdxsResult" type="Bkhdx">
<result property="id" column="emp_id" /> <result property="bkhdxId" column="bkhdx_id" />
<result property="empName" column="emp_name" /> <result property="bkhdxName" column="bkhdx_name" />
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
</resultMap> </resultMap>
<sql id="selectKhPingceVo"> <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 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>
</sql>
<select id="selectKhPingceList" parameterType="KhPingce" resultMap="KhPingceResult"> <select id="selectKhPingceList" parameterType="KhPingce" resultMap="KhPingceResult">
<include refid="selectKhPingceVo"></include> <include refid="selectKhPingceVo"></include>
@ -51,8 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="getEmps" resultMap="EmpsResult"> <select id="getBkhdxs" resultMap="BkhdxsResult">
select emp_id,emp_name,dept_id,dept_name from kh_pc_emp pe select bkhdx_id,bkhdx_name,dept_id,dept_name from kh_pc_emp pe
<where> <where>
<if test="id != null "> pe.pc_id = #{id}</if> <if test="id != null "> pe.pc_id = #{id}</if>
</where> </where>
@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pcDescription != null">pc_description,</if> <if test="pcDescription != null">pc_description,</if>
<if test="templateId != null">template_id,</if> <if test="templateId != null">template_id,</if>
<if test="templateName != null and templateName != ''">template_name,</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="pcResultId != null">pc_result_id,</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>
@ -84,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pcDescription != null">#{pcDescription},</if> <if test="pcDescription != null">#{pcDescription},</if>
<if test="templateId != null">#{templateId},</if> <if test="templateId != null">#{templateId},</if>
<if test="templateName != null and templateName != ''">#{templateName},</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="pcResultId != null">#{pcResultId},</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>
@ -101,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pcDescription != null">pc_description = #{pcDescription},</if> <if test="pcDescription != null">pc_description = #{pcDescription},</if>
<if test="templateId != null">template_id = #{templateId},</if> <if test="templateId != null">template_id = #{templateId},</if>
<if test="templateName != null and templateName != ''">template_name = #{templateName},</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="pcResultId != null">pc_result_id = #{pcResultId},</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>

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

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

Loading…
Cancel
Save