From c5c815fe39927a8fbc195c9b5fb318f07857229d Mon Sep 17 00:00:00 2001 From: "@jyuhsin" <729757837@qq.com> Date: Mon, 15 Dec 2025 09:03:13 +0800 Subject: [PATCH] commit --- .../ghkh/controller/GhKhZpController.java | 11 +-- .../ghkh/controller/GhkhKhphController.java | 4 +- .../ghkh/controller/GhkhXghshController.java | 4 +- .../zhgh/dayofficework/ghkh/model/Kh_bz.java | 2 +- .../dayofficework/ghkh/model/Kh_record.java | 12 +-- .../dayofficework/ghkh/model/Kh_xghsh.java | 80 +------------------ .../zhgh/dayofficework/ghkh/xghsh.html | 6 +- 7 files changed, 24 insertions(+), 95 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhKhZpController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhKhZpController.java index 7122370..4417eac 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhKhZpController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhKhZpController.java @@ -12,6 +12,7 @@ import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zb; import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zp; import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService; import com.budwk.app.zhgh.dayofficework.ghkh.service.KhzpService; +import com.google.common.util.concurrent.AtomicDouble; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; @@ -85,7 +86,7 @@ public class GhKhZpController { if (zp.length == 0) { return null; } - int score = 0; + double score = 0; for (Kh_zp kh_zp : zp) { kh_zp.setFlatid(SecurityUtil.getUnionId()); khzpService.dao().insertOrUpdate(kh_zp); @@ -99,7 +100,7 @@ public class GhKhZpController { record.setZb_id(zp[0].getZb_id()); record.setUnion_id(SecurityUtil.getUnionId()); record.setZp_score(score); - record.setXgh_score(0); + record.setXgh_score((double) 0); record.setState("submit".equals(handletype) ? 2 : 1); record.setFillTime(DateUtil.now()); } else { @@ -143,7 +144,7 @@ public class GhKhZpController { throw new RuntimeException("缺少record信息"); } - AtomicInteger score = new AtomicInteger(); + AtomicDouble score = new AtomicDouble(); zb.getNrs().forEach(nr -> { nr.getBzs().forEach(bz -> { @@ -170,7 +171,7 @@ public class GhKhZpController { public Result subXgh(@Param(value = "zb") Kh_zb zb) { Kh_record record = baseService.dao().fetch(Kh_record.class, Cnd.where("zb_id", "=", zb.getId()).and("union_id", "=", SecurityUtil.getUnionId())); - AtomicInteger score = new AtomicInteger(); + AtomicDouble score = new AtomicDouble(); zb.getNrs().forEach(nr -> { @@ -187,7 +188,7 @@ public class GhKhZpController { record.setZb_id(zb.getId()); record.setUnion_id(SecurityUtil.getUnionId()); record.setZp_score(score.get()); - record.setXgh_score(0); + record.setXgh_score((double) 0); record.setState(2); baseService.dao().insert(record); return Result.success(); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java index a095ef5..c6b3c26 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java @@ -84,14 +84,14 @@ public class GhkhKhphController { @At @SaCheckLogin - public Result doEditScore(String id, Integer score, String khId) { + public Result doEditScore(String id, Double score, String khId) { Kh_record record = khZbService.dao().fetch(Kh_record.class, id); ExamConfig config = khZbService.dao().fetch(ExamConfig.class, Cnd.NEW()); record.setOffLineScore(score); if(config.getOffLine() != null) { record.setOffLineFinalScore(score * config.getOffLine() * 0.01); } else { - record.setOffLineFinalScore(Double.valueOf(score)); + record.setOffLineFinalScore(score); } record.setTotalScore(record.getOnLineFinalScore() + record.getOffLineFinalScore()); khZbService.dao().update(record); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhXghshController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhXghshController.java index 8b353a7..663e026 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhXghshController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhXghshController.java @@ -142,7 +142,7 @@ public class GhkhXghshController { List contentIds = nrList.stream().map(kh_nr::getId).toList(); khXghshService.dao().clear(Kh_xghsh.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).and("flatid", "=", pf[0].getFlatid()).and("nr_id", "in", contentIds)); - int score = 0; + double score = 0D; for (Kh_xghsh p : pf) { if(contentIds.contains(p.getNr_id())) { khzpService.dao().insert(p); @@ -168,7 +168,7 @@ public class GhkhXghshController { List schoolAuditList = khZbService.dao().query(Kh_xghsh.class, Cnd.where("zb_id", "=", record.getZb_id()).and("flatid", "=", record.getUnion_id())); - Integer score = 0; + Double score = 0D; for (Kh_xghsh xghsh : schoolAuditList) { score += xghsh.getSchools(); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_bz.java b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_bz.java index 485d1c5..7ba7743 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_bz.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_bz.java @@ -96,6 +96,6 @@ public class Kh_bz extends BaseModel { private Kh_zp zp; private Kh_xghsh sh; - private Integer schools; + private Double schools; private String addition; } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_record.java b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_record.java index 8f3e3be..3bee19a 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_record.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_record.java @@ -38,14 +38,14 @@ public class Kh_record { @Column @Comment("自评得分") - @ColDefine(type = ColType.INT, width = 4) - private Integer zp_score; + @ColDefine(type = ColType.DOUBLE, width = 4) + private Double zp_score; @Column @Comment("校工会评分") - @ColDefine(type = ColType.INT, width = 4) + @ColDefine(type = ColType.DOUBLE, width = 4) @Default(value = "0") - private Integer xgh_score; + private Double xgh_score; @Column @Comment("线上最终得分") @@ -60,9 +60,9 @@ public class Kh_record { @Column @Comment("线下得分") - @ColDefine(type = ColType.INT, width = 4) + @ColDefine(type = ColType.DOUBLE, width = 4) @Default(value = "0") - private Integer offLineScore; + private Double offLineScore; @Column @Comment("线下最终得分") diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_xghsh.java b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_xghsh.java index fe4df17..790b8eb 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_xghsh.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/model/Kh_xghsh.java @@ -1,5 +1,6 @@ package com.budwk.app.zhgh.dayofficework.ghkh.model; +import lombok.Data; import org.nutz.dao.DB; import org.nutz.dao.entity.annotation.*; import com.budwk.app.base.model.BaseModel; @@ -12,6 +13,7 @@ import com.budwk.app.base.model.BaseModel; * @Date: 2020/09/25/11:59 * @Description:校工会审核 */ +@Data @Table("Kh_xghsh") public class Kh_xghsh extends BaseModel { @@ -25,9 +27,9 @@ public class Kh_xghsh extends BaseModel { @Column @Comment("校工会评分") - @ColDefine(type = ColType.INT, width = 4) + @ColDefine(type = ColType.DOUBLE, width = 4) @Default("0") - private Integer schools; + private Double schools; @Column @Comment("加、减原因") @@ -61,78 +63,4 @@ public class Kh_xghsh extends BaseModel { @SQL(db = DB.MYSQL, value = "SELECT IFNULL(MAX(location),0)+1 FROM Kh_xghsh"), }) private Integer location; - - public String getZb_id() { - return zb_id; - } - - public void setZb_id(String zb_id) { - this.zb_id = zb_id; - } - - public String getNr_id() { - return nr_id; - } - - public void setNr_id(String nr_id) { - this.nr_id = nr_id; - } - - public Integer getLocation() { - return location; - } - - public void setLocation(Integer location) { - this.location = location; - } - - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Integer getSchools() { - return schools; - } - - public void setSchools(Integer schools) { - this.schools = schools; - } - - public String getAddition() { - return addition; - } - - public void setAddition(String addition) { - this.addition = addition; - } - - - public String getFlatid() { - return flatid; - } - - public void setFlatid(String flatid) { - this.flatid = flatid; - } - - public String getBz_id() { - return bz_id; - } - - public void setBz_id(String bz_id) { - this.bz_id = bz_id; - } - - public Kh_bz getBz() { - return bz; - } - - public void setBz(Kh_bz bz) { - this.bz = bz; - } } diff --git a/src/main/resources/views/platform/zhgh/dayofficework/ghkh/xghsh.html b/src/main/resources/views/platform/zhgh/dayofficework/ghkh/xghsh.html index e53e77d..dcc2303 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/ghkh/xghsh.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/ghkh/xghsh.html @@ -170,15 +170,15 @@ layout("/layouts/platform.html"){