commit
This commit is contained in:
+6
-5
@@ -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();
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
+2
-2
@@ -142,7 +142,7 @@ public class GhkhXghshController {
|
||||
List<String> 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<Kh_xghsh> 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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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("线下最终得分")
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,15 +170,15 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="校工会评分" prop="schools" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.schools" maxlength="4"
|
||||
placeholder="请填写评分"></el-input>
|
||||
<el-input v-model="row.schools" maxlength="4"
|
||||
placeholder="请填写评分" type="number"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="加、减原因" prop="addition" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.addition" maxlength="50"
|
||||
<el-input v-model="row.addition" maxlength="50"
|
||||
placeholder="请填写加、减原因"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user