diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhPingceController.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhPingceController.java index 72718bb..7ad9057 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhPingceController.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhPingceController.java @@ -86,13 +86,13 @@ public class KhPingceController extends BaseController { khPingceService.insertKhPingce(khPingce); //增加关联表 - List pcEmps = khPingce.getPcEmps(); + List 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 pcEmps = khPingce.getPcEmps(); + List 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); diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhVoteController.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhVoteController.java index 01afd6c..511dee6 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhVoteController.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhVoteController.java @@ -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()); diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/Bkhdx.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/Bkhdx.java new file mode 100644 index 0000000..7b3e2b3 --- /dev/null +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/Bkhdx.java @@ -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; + }*/ +} + diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPcEmp.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPcEmp.java index 4ccbe19..690abb7 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPcEmp.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPcEmp.java @@ -7,9 +7,9 @@ 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,78 +22,92 @@ 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; /** 部门名称 */ @Excel(name = "部门名称") private String deptName; - public void setId(Long id) + public void setId(Long id) { this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setPcId(Long pcId) + public void setPcId(Long pcId) { this.pcId = pcId; } - public Long getPcId() + public Long getPcId() { 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) { this.deptId = deptId; } - public Long getDeptId() + public Long getDeptId() { return deptId; } - public void setDeptName(String deptName) + public void setDeptName(String deptName) { this.deptName = deptName; } - public String getDeptName() + public String getDeptName() { return deptName; } @@ -101,17 +115,18 @@ public class KhPcEmp extends BaseEntity @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("pcId", getPcId()) - .append("empId", getEmpId()) - .append("empName", getEmpName()) - .append("deptId", getDeptId()) - .append("deptName", getDeptName()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); + .append("id", getId()) + .append("pcId", getPcId()) + .append("bkhdxType", getBkhdxType()) + .append("bkhdxId", getBkhdxId()) + .append("bkhdxName", getBkhdxName()) + .append("deptId", getDeptId()) + .append("deptName", getDeptName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); } } diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPingce.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPingce.java index 84de18d..657ceda 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPingce.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhPingce.java @@ -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 pcEmps; + public String getBkhdxType() { + return bkhdxType; + } + + public void setBkhdxType(String bkhdxType) { + this.bkhdxType = bkhdxType; + } + + private List pcBkhdxs; - public List getPcEmps() { - return pcEmps; + public List getPcBkhdxs() { + return pcBkhdxs; } - public void setPcEmps(List pcEmps) { - this.pcEmps = pcEmps; + public void setPcBkhdxs(List pcBkhdxs) { + this.pcBkhdxs = pcBkhdxs; } public void setId(Long id) @@ -127,18 +140,19 @@ public class KhPingce extends BaseEntity @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("pcTitle", getPcTitle()) - .append("pcDescription", getPcDescription()) - .append("templateId", getTemplateId()) - .append("templateName", getTemplateName()) - .append("pcResultId", getPcResultId()) - .append("state", getState()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); + .append("id", getId()) + .append("pcTitle", getPcTitle()) + .append("pcDescription", getPcDescription()) + .append("templateId", getTemplateId()) + .append("templateName", getTemplateName()) + .append("bkhdxType", getBkhdxType()) + .append("pcResultId", getPcResultId()) + .append("state", getState()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); } } diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVote.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVote.java index 6e133ec..f4b8d9c 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVote.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVote.java @@ -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()) diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteEmp.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteEmp.java index eef7360..5ff2fd9 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteEmp.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteEmp.java @@ -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()) diff --git a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhPcEmpMapper.xml b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhPcEmpMapper.xml index b78a923..815c8fa 100644 --- a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhPcEmpMapper.xml +++ b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhPcEmpMapper.xml @@ -1,14 +1,15 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - + + + @@ -19,20 +20,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - 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 - + @@ -51,8 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + select bkhdx_id,bkhdx_name,dept_id,dept_name from kh_pc_emp pe pe.pc_id = #{id} @@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" pc_description, template_id, template_name, + bkhdx_type, pc_result_id, state, create_by, @@ -78,12 +79,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, update_time, remark, - + #{pcTitle}, #{pcDescription}, #{templateId}, #{templateName}, + #{bkhdxType}, #{pcResultId}, #{state}, #{createBy}, @@ -91,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateBy}, #{updateTime}, #{remark}, - + @@ -101,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" pc_description = #{pcDescription}, template_id = #{templateId}, template_name = #{templateName}, + bkhdx_type = #{bkhdxType}, pc_result_id = #{pcResultId}, state = #{state}, create_by = #{createBy}, @@ -117,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from kh_pingce where id in + delete from kh_pingce where id in #{id} diff --git a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteEmpMapper.xml b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteEmpMapper.xml index 101a01f..bec70e7 100644 --- a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteEmpMapper.xml +++ b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteEmpMapper.xml @@ -6,13 +6,15 @@ + - - + + + @@ -23,19 +25,21 @@ - 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 @@ -36,6 +37,8 @@ and pingce_name like concat('%', #{pingceName}, '%') and khitem_id = #{khitemId} and khitem_name like concat('%', #{khitemName}, '%') + and khitem_typeId = #{khitemTypeid} + and vote_items = #{voteItems} and vote_title = #{voteTitle} and v_description = #{vDescription} and s_time = #{sTime} @@ -58,6 +61,8 @@ pingce_name, khitem_id, khitem_name, + khitem_typeId, + vote_items, vote_title, v_description, s_time, @@ -76,6 +81,8 @@ #{pingceName}, #{khitemId}, #{khitemName}, + #{khitemTypeid}, + #{voteItems}, #{voteTitle}, #{vDescription}, #{sTime}, @@ -98,6 +105,8 @@ pingce_name = #{pingceName}, khitem_id = #{khitemId}, khitem_name = #{khitemName}, + khitem_typeId = #{khitemTypeid}, + vote_items = #{voteItems}, vote_title = #{voteTitle}, v_description = #{vDescription}, s_time = #{sTime},