From 817379fc8e3f4b36a038d793613691ce4bcf8647 Mon Sep 17 00:00:00 2001 From: hshansha Date: Wed, 2 Jul 2025 17:12:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2typeid=E3=80=81type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/KhTemplateController.java | 2 + .../java/com/ruoyi/kaohe/domain/KhItems.java | 2 +- .../com/ruoyi/kaohe/domain/KhTemItem.java | 26 ++++++++++- .../mapper/kaohe/KhTemItemMapper.xml | 12 ++++- .../mapper/kaohe/KhTemplateMapper.xml | 44 +++++++++++-------- 5 files changed, 64 insertions(+), 22 deletions(-) diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhTemplateController.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhTemplateController.java index 861ca3c..deab0e5 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhTemplateController.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/controller/KhTemplateController.java @@ -115,6 +115,8 @@ public class KhTemplateController extends BaseController temItem.setTemId(khTemplate.getId()); temItem.setItemName(item.getItemName()); temItem.setKhitemId(item.getId()); + temItem.setType(item.getType()); + temItem.setTypeId(item.getTypeId()); temItemService.insertKhTemItem(temItem); } } diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhItems.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhItems.java index 8edb18a..1f8f7f2 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhItems.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhItems.java @@ -23,7 +23,7 @@ public class KhItems extends BaseEntity private String itemName; /** 考核类型id */ - @Excel(name = "考核类型id") + // @Excel(name = "考核类型id") private Long typeId; /** 考核类型 */ diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhTemItem.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhTemItem.java index 8d984d4..49fe383 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhTemItem.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhTemItem.java @@ -34,7 +34,31 @@ public class KhTemItem extends BaseEntity @Excel(name = "模板id") private Long temId; - public void setId(Long id) + /** 考核类型id */ + // @Excel(name = "考核类型id") + private Long typeId; + + /** 考核类型 */ + @Excel(name = "考核类型") + private String type; + + public Long getTypeId() { + return typeId; + } + + public void setTypeId(Long typeId) { + this.typeId = typeId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public void setId(Long id) { this.id = id; } diff --git a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemItemMapper.xml b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemItemMapper.xml index 7dbc28c..48dff6a 100644 --- a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemItemMapper.xml +++ b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemItemMapper.xml @@ -10,10 +10,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select id, tem_name, khitem_id, item_name, tem_id from kh_tem_item + select id, tem_name, khitem_id, item_name, tem_id, type_id, type from kh_tem_item @@ -38,12 +42,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" khitem_id, item_name, tem_id, + type_id, + type, #{temName}, #{khitemId}, #{itemName}, #{temId}, + #{typeId}, + #{type}, @@ -54,6 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" khitem_id = #{khitemId}, item_name = #{itemName}, tem_id = #{temId}, + type_id = #{typeId}, + type = #{type}, where id = #{id} diff --git a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemplateMapper.xml b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemplateMapper.xml index 5df4be1..eaa0186 100644 --- a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemplateMapper.xml +++ b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhTemplateMapper.xml @@ -1,39 +1,43 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - + + + - - + + + + - select id, tem_name, khitem_id, item_name from kh_template + select id, tem_name, khitem_id, item_name + from kh_template - + select ti.khitem_id itemId ,ti.item_name khitemName ,type,type_id from kh_tem_item ti - ti.tem_id = #{id} + ti.tem_id = #{id} - + @@ -38,6 +42,10 @@ and bkhdx_name like concat('%', #{bkhdxName}, '%') and content = #{content} and vote_num = #{voteNum} + and option_a = #{optionA} + and option_b = #{optionB} + and option_c = #{optionC} + and option_d = #{optionD} and vote_score = #{voteScore} and avg_score = #{avgScore} and percentage = #{percentage} @@ -60,6 +68,10 @@ bkhdx_name, content, vote_num, + option_a, + option_b, + option_c, + option_d, vote_score, avg_score, percentage, @@ -78,6 +90,10 @@ #{bkhdxName}, #{content}, #{voteNum}, + #{optionA}, + #{optionB}, + #{optionC}, + #{optionD}, #{voteScore}, #{avgScore}, #{percentage}, @@ -100,6 +116,10 @@ bkhdx_name = #{bkhdxName}, content = #{content}, vote_num = #{voteNum}, + option_a = #{optionA}, + option_b = #{optionB}, + option_c = #{optionC}, + option_d = #{optionD}, vote_score = #{voteScore}, avg_score = #{avgScore}, percentage = #{percentage}, From 3eaf4fbd95b876fc31c7bc6b4d8263f6599f598e Mon Sep 17 00:00:00 2001 From: hshansha Date: Thu, 3 Jul 2025 16:55:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=84=E5=88=86?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/kaohe/domain/KhVoteItems.java | 43 +++++++++++++------ .../mapper/kaohe/KhVoteItemsMapper.xml | 23 ++++++---- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteItems.java b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteItems.java index c859f6f..86e5ef7 100644 --- a/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteItems.java +++ b/ruoyi-kaohe/src/main/java/com/ruoyi/kaohe/domain/KhVoteItems.java @@ -7,9 +7,9 @@ import com.ruoyi.common.core.domain.BaseEntity; /** * 投票项对象 kh_vote_items - * + * * @author hs - * @date 2025-06-24 + * @date 2025-07-03 */ public class KhVoteItems extends BaseEntity { @@ -22,36 +22,51 @@ public class KhVoteItems extends BaseEntity @Excel(name = "投票选项名称") private String vitemName; - public void setId(Long id) + /** 分数 */ + @Excel(name = "分数") + private Long score; + + public void setId(Long id) { this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setVitemName(String vitemName) + public void setVitemName(String vitemName) { this.vitemName = vitemName; } - public String getVitemName() + public String getVitemName() { return vitemName; } + public void setScore(Long score) + { + this.score = score; + } + + public Long getScore() + { + return score; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("vitemName", getVitemName()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); + .append("id", getId()) + .append("vitemName", getVitemName()) + .append("score", getScore()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); } } diff --git a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteItemsMapper.xml b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteItemsMapper.xml index 18c54d2..589d4c3 100644 --- a/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteItemsMapper.xml +++ b/ruoyi-kaohe/src/main/resources/mapper/kaohe/KhVoteItemsMapper.xml @@ -1,12 +1,13 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + + @@ -15,16 +16,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, vitem_name, create_by, create_time, update_by, update_time, remark from kh_vote_items + select id, vitem_name, score, create_by, create_time, update_by, update_time, remark from kh_vote_items - +