commit
This commit is contained in:
+15
-11
@@ -7,9 +7,7 @@ import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_record;
|
||||
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.model.*;
|
||||
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;
|
||||
@@ -119,14 +117,20 @@ public class GhKhZpController {
|
||||
public Result openView(String id) {
|
||||
Kh_zb khzb = khZbService.khzb(id);
|
||||
List<Kh_zp> list = khzpService.query(Cnd.where("zb_id", "=", id).and("flatid", "=", SecurityUtil.getUnionId()));
|
||||
khzb.getNrs().forEach(nr -> {
|
||||
nr.getBzs().forEach(bz -> {
|
||||
Kh_zp zp = list.stream().filter(v -> v.getBz_id().equals(bz.getId())).findFirst().orElse(null);
|
||||
if (zp != null) {
|
||||
bz.setZp(zp);
|
||||
}
|
||||
});
|
||||
});
|
||||
for (kh_nr nr : khzb.getNrs()) {
|
||||
for (Kh_bz bz : nr.getBzs()) {
|
||||
Kh_zp zp = list.stream().filter(v -> v.getBz_id().equals(bz.getId())).findFirst().orElse(null);
|
||||
if (zp != null) {
|
||||
bz.setZp(zp);
|
||||
}
|
||||
Kh_xghsh xghsh = khZbService.dao().fetch(Kh_xghsh.class, Cnd.where("zb_id", "=", id).and("bz_id", "=", bz.getId())
|
||||
.and("flatid", "=", SecurityUtil.getUnionId()));
|
||||
if(xghsh != null) {
|
||||
bz.setSchools(xghsh.getSchools());
|
||||
bz.setAddition(xghsh.getAddition());
|
||||
}
|
||||
}
|
||||
}
|
||||
NutMap nutMap = Lang.obj2nutmap(khzb);
|
||||
Kh_record record = khZbService.dao().fetch(Kh_record.class, Cnd.where("zb_id", "=", id).and("union_id", "=", SecurityUtil.getUnionId()));
|
||||
if(record != null) {
|
||||
|
||||
+5
-2
@@ -32,6 +32,8 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -100,7 +102,8 @@ public class GhkhKhphController {
|
||||
} else {
|
||||
record.setOffLineFinalScore(score);
|
||||
}
|
||||
record.setTotalScore(record.getOnLineFinalScore() + record.getOffLineFinalScore());
|
||||
BigDecimal bd = BigDecimal.valueOf(record.getOffLineFinalScore()).setScale(2, RoundingMode.HALF_UP);
|
||||
record.setTotalScore(record.getOnLineFinalScore() + bd.doubleValue());
|
||||
khZbService.dao().update(record);
|
||||
|
||||
List<Kh_record> list = khZbService.dao().query(Kh_record.class, Cnd.where("zb_id", "=", khId).desc("totalScore"));
|
||||
@@ -142,7 +145,7 @@ public class GhkhKhphController {
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
exportEntities.add(new ExcelExportEntity("年度", "annual", 10));
|
||||
exportEntities.add(new ExcelExportEntity("分工会名称", "unionname", 30));
|
||||
exportEntities.add(new ExcelExportEntity("分工会名称", "unionName", 30));
|
||||
exportEntities.add(new ExcelExportEntity("线上得分", "xgh_score", 20));
|
||||
exportEntities.add(new ExcelExportEntity("线上最终得分" + (config.getOnLine() != null ? "(" + config.getOnLine() + "%)" : ""), "onLineFinalScore", 20));
|
||||
exportEntities.add(new ExcelExportEntity("线下得分", "offLineScore", 20));
|
||||
|
||||
+6
-2
@@ -23,6 +23,8 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.POST;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -176,12 +178,14 @@ public class GhkhXghshController {
|
||||
|
||||
record.setXgh_score(score);
|
||||
ExamConfig config = baseService.dao().fetch(ExamConfig.class, Cnd.NEW());
|
||||
|
||||
if(config.getOnLine() != null) {
|
||||
record.setOnLineFinalScore(score * config.getOnLine() * 0.01);
|
||||
} else {
|
||||
record.setOnLineFinalScore((double) score);
|
||||
record.setOnLineFinalScore(score);
|
||||
}
|
||||
record.setTotalScore(record.getOnLineFinalScore());
|
||||
BigDecimal bd = BigDecimal.valueOf(record.getOnLineFinalScore()).setScale(2, RoundingMode.HALF_UP);
|
||||
record.setTotalScore(bd.doubleValue());
|
||||
record.setState(3);
|
||||
baseService.dao().update(record);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="年度" prop="annual" header-align="center"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="分工会名称" prop="unionname" header-align="center"
|
||||
<el-table-column label="分工会名称" prop="unionName" header-align="center"
|
||||
show-overflow-tooltip
|
||||
align="center" sortable></el-table-column>
|
||||
<el-table-column label="线上得分" prop="xgh_score" header-align="center"
|
||||
|
||||
@@ -47,7 +47,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="年度" prop="annual" header-align="center"
|
||||
width="300px" sortable
|
||||
sortable
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
{{scope.row.annual}}
|
||||
|
||||
@@ -203,14 +203,14 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单项分" prop="single_score" header-align="center" align="center"
|
||||
v-if="examConfig.displaySingleItem === true" width="250px">
|
||||
v-if="examConfig.displaySingleItem === true" width="120px">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.single_score" readonly maxlength="4"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center"
|
||||
width="250px">
|
||||
width="120px">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.score" readonly maxlength="4"
|
||||
placeholder="请填写标准分"></el-input>
|
||||
@@ -218,7 +218,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="自评得分" prop="zpf" header-align="center" align="center"
|
||||
width="250px" v-if="examConfig.selfAssessment === true">
|
||||
width="120px" v-if="examConfig.selfAssessment === true">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="row.zpf" v-model.number="row.zpf" maxlength="4"
|
||||
readonly placeholder="请填写自评分"></el-input>
|
||||
@@ -227,6 +227,20 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="校工会评分" prop="schools" header-align="center"
|
||||
align="center" width="120px">
|
||||
<template scope="{row}">
|
||||
{{ row.schools || '暂无评分' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="加、减原因" prop="addition" header-align="center"
|
||||
align="center" show-overflow-tooltip width="200">
|
||||
<template scope="{row}">
|
||||
{{ row.addition || '暂无原因' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料数量" header-align="center" align="center" width="100" prop="fileCount">
|
||||
<template scope="scope">
|
||||
<span v-if="scope.row.zp?.files?.length > 0" class="text-success" style="font-weight: bolder; font-size: 16px">
|
||||
@@ -236,7 +250,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料" header-align="center" align="center"
|
||||
width="250px" prop="files">
|
||||
width="200px" prop="files">
|
||||
<template scope="{row}">
|
||||
<el-button v-if="!row.isEvidence" plain size="small" type="info">此项无需佐证材料</el-button>
|
||||
<el-button :type="row.zp?.files?.length > 0 ? 'success' : 'primary'"
|
||||
@@ -543,17 +557,17 @@ layout("/layouts/platform.html"){
|
||||
if (index === 0) {
|
||||
sums[index] = '小计';
|
||||
return;
|
||||
} else if (['inspection', 'files'].includes(column.property)) {
|
||||
} else if (['inspection', 'files', 'addition'].includes(column.property)) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
} else if (column.property === 'zp.zpf' && this.examConfig.selfAssessment === true) {
|
||||
const zpfs = data.map(v => v['zp']['zpf'] || 0)
|
||||
const zpfs = data.map(v => v.zp?.zpf || 0)
|
||||
sums[index] = zpfs.reduce((a, b) => {
|
||||
return a + b;
|
||||
}) + ' 分'
|
||||
return;
|
||||
} else if (column.property === 'fileCount') {
|
||||
const zpfs = data.map(v => v['zp']['files']?.length || 0)
|
||||
const zpfs = data.map(v => v.zp?.files?.length || 0)
|
||||
sums[index] = zpfs.reduce((a, b) => {
|
||||
return a + b;
|
||||
}) + ' 个'
|
||||
|
||||
Reference in New Issue
Block a user