Merge branch 'main' of https://dd3skj.picp.vip/JyuHsin/zhgh_jshvc
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ public class ActivitySportsReadingController {
|
||||
ActivityBasicUnit basicUnit = dao.fetch(ActivityBasicUnit.class, Cnd.where("id", "=", SecurityUtil.getUnitId()));
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("close", "!=", true);
|
||||
cnd.and("YEAR(startTime)", "=", year);
|
||||
cnd.and("YEAR(applyStartTime)", "=", year);
|
||||
cnd.and("activityLevel", "=", activityLevel);
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SYSADMIN.name())) {
|
||||
if (activityLevel.equals("40002")) {
|
||||
|
||||
+10
-5
@@ -87,7 +87,10 @@ public class H5ActivitySportsApplyUserController {
|
||||
ActivitySchoolEvent schoolEvent = dao.fetch(ActivitySchoolEvent.class, schoolEventId);
|
||||
ActivityEvent activityEvent = dao.fetch(ActivityEvent.class, eventId);
|
||||
ActivitySchool activitySchool = dao.fetch(ActivitySchool.class, activityId);
|
||||
ActivitySchoolTeam schoolTeam = dao.fetch(ActivitySchoolTeam.class, teamId);
|
||||
ActivitySchoolTeam schoolTeam = null;
|
||||
if (teamId != null && !teamId.isEmpty()) {
|
||||
schoolTeam = dao.fetch(ActivitySchoolTeam.class, teamId);
|
||||
}
|
||||
|
||||
ActivityBasicUnit basicUnit = dao.fetch(ActivityBasicUnit.class, Cnd.where("id", "=", SecurityUtil.getUnitId()));
|
||||
ActivityBasicUnion basicUnion = dao.fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionId()));
|
||||
@@ -105,10 +108,10 @@ public class H5ActivitySportsApplyUserController {
|
||||
}
|
||||
//如果不等于空代表是个人项目
|
||||
if (ObjectUtil.isNotEmpty(activityEvent.getIsMenWomen())) {
|
||||
if (activityEvent.getIsMenWomen() == 1 && !List.of("男","男性").contains(user.getSex())) {
|
||||
if (activityEvent.getIsMenWomen() == 1 && !List.of("男", "男性").contains(user.getSex())) {
|
||||
return Result.error("当前项目只能男性能报名!");
|
||||
}
|
||||
if (activityEvent.getIsMenWomen() == 2 && !List.of("女","女性").contains(user.getSex())) {
|
||||
if (activityEvent.getIsMenWomen() == 2 && !List.of("女", "女性").contains(user.getSex())) {
|
||||
return Result.error("当前项目只能女性能报名!");
|
||||
}
|
||||
}
|
||||
@@ -182,8 +185,10 @@ public class H5ActivitySportsApplyUserController {
|
||||
schoolApply.setStatus(2);
|
||||
}
|
||||
schoolApply.setUnitname(user.getUnitName());
|
||||
schoolApply.setTeamId(schoolTeam.getId());
|
||||
schoolApply.setTeam(schoolTeam.getName());
|
||||
if (schoolTeam != null){
|
||||
schoolApply.setTeamId(schoolTeam.getId());
|
||||
schoolApply.setTeam(schoolTeam.getName());
|
||||
}
|
||||
schoolApply.setLoginname(user.getLoginname());
|
||||
schoolApply.setUsername(user.getUsername());
|
||||
schoolApply.setMobile(user.getMobile());
|
||||
|
||||
@@ -205,7 +205,7 @@ public class ActivitySchool extends BaseModel implements Serializable , SysHomeC
|
||||
sysHomeActivity.setName(this.getName());
|
||||
sysHomeActivity.setCover(this.getImage());
|
||||
sysHomeActivity.setUrl("/platform/activity/apply");
|
||||
sysHomeActivity.setH5Url(null);
|
||||
sysHomeActivity.setH5Url("/platform/activity/apply/h5/index?id=" + this.getId());
|
||||
sysHomeActivity.setStartDate(DateUtil.parseDate(this.getApplyStartTime()));
|
||||
sysHomeActivity.setEndDate(DateUtil.parseDate(this.getApplyEndTime()));
|
||||
sysHomeActivity.setAllowUserGroupId(this.getActivityGroupId());
|
||||
|
||||
-1
@@ -2,7 +2,6 @@ package com.budwk.app.zhgh.dayofficework.ghkh.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.ExamConfig;
|
||||
|
||||
+21
-18
@@ -5,13 +5,11 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
@@ -26,7 +24,6 @@ import org.nutz.mvc.annotation.POST;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
@@ -85,7 +82,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 +96,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 {
|
||||
@@ -118,14 +115,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) {
|
||||
@@ -143,7 +146,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 +173,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 +190,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();
|
||||
|
||||
+48
-11
@@ -2,8 +2,10 @@ package com.budwk.app.zhgh.dayofficework.ghkh.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_bz;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zb;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.kh_nr;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhBzService;
|
||||
@@ -16,6 +18,7 @@ import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
@@ -23,6 +26,8 @@ import org.nutz.mvc.annotation.POST;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
@@ -101,21 +106,53 @@ public class GhkhGhzbController {
|
||||
@SaCheckPermission("ghkh.khzb")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result doEdit(@Param(value = "kh_zb") Kh_zb kh_zb, @Param(value = "type") String type) {
|
||||
khZbService.updateIgnoreNull(kh_zb);
|
||||
// 查出数据库里面的考核内容和标准,找出需要删除的
|
||||
List<kh_nr> nrList = khNrService.query(Cnd.where(kh_nr::getZb_id, "=", kh_zb.getId()));
|
||||
// 查出考核内容(那个傻逼写的,他妈的zb_id都他妈的不存,真的是人才嘞,我踏马还要去根据nrList里面的主键Id去查询)
|
||||
Set<String> nrIdList = nrList.stream().map(kh_nr::getId).collect(Collectors.toSet());
|
||||
List<Kh_bz> bzList = khBzService.query(Cnd.where(Kh_bz::getNr_id, "in", nrIdList));
|
||||
|
||||
List<kh_nr> query = khNrService.query(Cnd.where("zb_id", "=", kh_zb.getId()));
|
||||
// 构建考核内容
|
||||
List<kh_nr> nrs = kh_zb.getNrs().stream().peek(v -> v.setZb_id(kh_zb.getId())).toList();
|
||||
List<String> webNrIdList = nrs.stream().map(kh_nr::getId).toList();
|
||||
|
||||
for (kh_nr kh_nr : query) {
|
||||
System.err.println(kh_nr.getZb_id());
|
||||
khBzService.clear(Cnd.where("nr_id", "=", kh_nr.getId()));
|
||||
}
|
||||
// 构建考核标准
|
||||
List<Kh_bz> bzs = nrs.stream()
|
||||
.map(v -> {
|
||||
return v.getBzs().stream().peek(bz -> {
|
||||
bz.setNr_id(v.getId());
|
||||
bz.setZb_id(kh_zb.getId());
|
||||
}).toList();
|
||||
}).flatMap(List::stream).toList();
|
||||
List<String> webBzIdList = bzs.stream().map(Kh_bz::getId).toList();
|
||||
|
||||
khNrService.clear(Cnd.where("zb_id", "=", kh_zb.getId()));
|
||||
|
||||
for (kh_nr nr : kh_zb.getNrs()) {
|
||||
nr.setZb_id(kh_zb.getId());
|
||||
khNrService.insertWith(nr, "bzs");
|
||||
}
|
||||
// 找不同,找出需要删除的内容和标准
|
||||
List<kh_nr> deleteNrs = nrList.stream().filter(v -> !webNrIdList.contains(v.getId())).toList();
|
||||
List<Kh_bz> deleteBzs = bzList.stream().filter(v -> !webBzIdList.contains(v.getId())).toList();
|
||||
|
||||
// 找出bzs和nrs中Id是null的
|
||||
List<kh_nr> insertNrList = nrs.stream().filter(v -> StrUtil.isBlank(v.getId())).toList();
|
||||
List<Kh_bz> insertBzList = bzs.stream().filter(v -> StrUtil.isBlank(v.getId())).toList();
|
||||
|
||||
// 新增数据
|
||||
khBzService.insert(insertBzList);
|
||||
khNrService.insert(insertNrList);
|
||||
|
||||
// 删除数据
|
||||
if (Lang.isNotEmpty(deleteNrs)) {
|
||||
khNrService.delete(deleteNrs.stream().map(kh_nr::getId).toList());
|
||||
}
|
||||
if (Lang.isNotEmpty(deleteBzs)) {
|
||||
khBzService.delete(deleteBzs.stream().map(Kh_bz::getId).toList());
|
||||
}
|
||||
|
||||
// 修改考核指标
|
||||
khZbService.updateIgnoreNull(kh_zb);
|
||||
// 新增或修改考核内容
|
||||
khNrService.updateIgnoreNull(nrs);
|
||||
// 新增或修改考核标准
|
||||
khBzService.updateIgnoreNull(bzs);
|
||||
return Result.success();
|
||||
|
||||
}
|
||||
|
||||
+18
-7
@@ -7,17 +7,17 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.ExamConfig;
|
||||
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.service.KhXghshService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
@@ -28,6 +28,8 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -66,6 +68,10 @@ public class GhkhKhphController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
boolean isAdmin = AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name());
|
||||
if(!isAdmin) {
|
||||
cnd.and("re.union_id", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
cnd.and("re.zb_id ", "=", khid);
|
||||
cnd.and("re.state", "=", 3);
|
||||
cnd.andEX("zb.`annual`","=",annual);
|
||||
@@ -83,16 +89,17 @@ 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());
|
||||
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"));
|
||||
@@ -113,6 +120,10 @@ public class GhkhKhphController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
boolean isAdmin = AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name());
|
||||
if(!isAdmin) {
|
||||
cnd.and("re.union_id", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
cnd.and("re.zb_id ", "=", khid);
|
||||
cnd.and("re.state", "=", 3);
|
||||
cnd.andEX("zb.`annual`","=",annual);
|
||||
@@ -130,7 +141,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));
|
||||
|
||||
-2
@@ -6,7 +6,6 @@ import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
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_xghsh;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zb;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zp;
|
||||
@@ -16,7 +15,6 @@ import com.budwk.app.zhgh.dayofficework.ghkh.service.KhzpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
+76
-47
@@ -4,7 +4,7 @@ package com.budwk.app.zhgh.dayofficework.ghkh.controller;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.*;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhXghshService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
@@ -12,15 +12,17 @@ import com.budwk.app.zhgh.dayofficework.ghkh.service.KhzpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.DaoUp;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
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;
|
||||
|
||||
/**
|
||||
@@ -50,25 +52,26 @@ public class GhkhXghshController {
|
||||
@Param(value = "unionid") String unionid, int pageNumber, int pageSize,
|
||||
@Param(value = "pageOrderName") String pageOrderName,
|
||||
@Param(value = "pageOrderBy") String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
zb.assessment,
|
||||
zb.annual,
|
||||
un.unionName,
|
||||
un.unionCode,(
|
||||
SELECT
|
||||
sum( score )
|
||||
FROM
|
||||
kh_bz
|
||||
WHERE
|
||||
nr_id IN ( SELECT id FROM kh_nr WHERE zb_id = zb.id )) bzf,
|
||||
re.*
|
||||
FROM
|
||||
kh_record re
|
||||
LEFT JOIN kh_zb zb ON re.zb_id = zb.id
|
||||
LEFT JOIN `vw_user` un ON re.union_id = un.unionId
|
||||
$condition
|
||||
""");
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
zb.assessment,
|
||||
zb.annual,
|
||||
un.unionName,
|
||||
un.unionCode,(
|
||||
SELECT
|
||||
sum( score )
|
||||
FROM
|
||||
kh_bz
|
||||
WHERE
|
||||
nr_id IN ( SELECT id FROM kh_nr WHERE zb_id = zb.id )) bzf,
|
||||
re.*,
|
||||
(select ifnull(sum(schools), 0) from kh_xghsh where flatid = re.union_id and nr_id in (select id from kh_nr where zb_id = re.zb_id and auditUser = @loginName)) as self_score
|
||||
FROM
|
||||
kh_record re
|
||||
LEFT JOIN kh_zb zb ON re.zb_id = zb.id
|
||||
LEFT JOIN `vw_user` un ON re.union_id = un.unionId
|
||||
$condition
|
||||
""").setParam("loginName", SecurityUtil.getUserLoginname());
|
||||
Cnd cnd = Cnd.NEW();
|
||||
/*cnd.and("re.state", "=", 2);*/
|
||||
cnd.and("zb.disabled", "=", true);
|
||||
@@ -132,38 +135,64 @@ public class GhkhXghshController {
|
||||
return null;
|
||||
}
|
||||
|
||||
int score = 0;
|
||||
// 查询当前用户能够审核的指标
|
||||
List<kh_nr> nrList = khzpService.dao().query(kh_nr.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).and("auditUser", "=", SecurityUtil.getUserLoginname()));
|
||||
if(Lang.isEmpty(nrList)) {
|
||||
return Result.success();
|
||||
}
|
||||
List<String> contentIds = nrList.stream().map(kh_nr::getId).toList();
|
||||
|
||||
// Sys_user sys_user = (Sys_user) ShiroUtil.getPrincipal();
|
||||
khXghshService.dao().clear(Kh_xghsh.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).and("flatid", "=", pf[0].getFlatid()));
|
||||
for (Kh_xghsh p : pf) {
|
||||
khzpService.dao().insert(p);
|
||||
score += p.getSchools() != null ? p.getSchools() : 0;
|
||||
}
|
||||
|
||||
Kh_record record = baseService.dao().fetch(Kh_record.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).and("union_id", "=", pf[0].getFlatid()));
|
||||
|
||||
if (record != null) {
|
||||
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.setTotalScore(record.getOnLineFinalScore());
|
||||
if("submit".equals(type)) {
|
||||
record.setState(3);
|
||||
khXghshService.dao().clear(Kh_xghsh.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).and("flatid", "=", pf[0].getFlatid()).and("nr_id", "in", contentIds));
|
||||
double score = 0D;
|
||||
for (Kh_xghsh p : pf) {
|
||||
if(contentIds.contains(p.getNr_id())) {
|
||||
khzpService.dao().insert(p);
|
||||
}
|
||||
baseService.dao().update(record);
|
||||
score += p.getSchools() != null ? p.getSchools() : 0;
|
||||
}
|
||||
|
||||
List<Kh_record> list = khZbService.dao().query(Kh_record.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).desc("totalScore"));
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setSort(i + 1);
|
||||
Kh_record record = baseService.dao().fetch(Kh_record.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).and("union_id", "=", pf[0].getFlatid()));
|
||||
if (record != null && "submit".equals(type)) {
|
||||
record.setXgh_score(score);
|
||||
baseService.dao().update(record);
|
||||
}
|
||||
khZbService.dao().update(list);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@POST
|
||||
@SaCheckPermission("ghkh.xghsh")
|
||||
public Result submit(String id) {
|
||||
Kh_record record = khZbService.dao().fetch(Kh_record.class, id);
|
||||
|
||||
if (record != null) {
|
||||
|
||||
List<Kh_xghsh> schoolAuditList = khZbService.dao().query(Kh_xghsh.class, Cnd.where("zb_id", "=", record.getZb_id()).and("flatid", "=", record.getUnion_id()));
|
||||
|
||||
Double score = 0D;
|
||||
for (Kh_xghsh xghsh : schoolAuditList) {
|
||||
score += xghsh.getSchools();
|
||||
}
|
||||
|
||||
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(score);
|
||||
}
|
||||
BigDecimal bd = BigDecimal.valueOf(record.getOnLineFinalScore()).setScale(2, RoundingMode.HALF_UP);
|
||||
record.setTotalScore(bd.doubleValue());
|
||||
record.setState(3);
|
||||
baseService.dao().update(record);
|
||||
|
||||
List<Kh_record> list = khZbService.dao().query(Kh_record.class, Cnd.where("zb_id", "=", record.getZb_id()).desc("totalScore"));
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setSort(i + 1);
|
||||
}
|
||||
khZbService.dao().update(list);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+33
-2
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
@@ -9,14 +10,19 @@ import com.budwk.app.zhgh.dayofficework.ghkh.model.kh_nr;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhBzService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhNrService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.POST;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
@@ -64,6 +70,31 @@ public class GhkhXjkhzbController {
|
||||
@At
|
||||
public Result getZbList() {
|
||||
return Result.success(khZbService.query());
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result getUserByKeyWord(@Valid String keyWord) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.username AS userName,
|
||||
t1.loginName AS loginName,
|
||||
t2.NAME AS unitName,
|
||||
t1.mobile,
|
||||
t1.email
|
||||
FROM
|
||||
`sys_user` t1
|
||||
LEFT JOIN sys_unit t2 ON t2.id = t1.unitId
|
||||
$condition
|
||||
limit 0, 50
|
||||
""");
|
||||
sql.setParam("keyWord", "%" + keyWord + "%");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("t1.username", keyWord).orLike("t1.loginname", keyWord);
|
||||
cnd.and(group);
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(khZbService.listMap(sql));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
@@ -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,8 +1,9 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
@@ -13,10 +14,10 @@ import java.util.Map;
|
||||
* @Date: 2020/09/27/20:13
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Table("Kh_zp")
|
||||
public class Kh_zp {
|
||||
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@@ -28,10 +29,12 @@ public class Kh_zp {
|
||||
@Comment("标准id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String bz_id;
|
||||
|
||||
@Column
|
||||
@Comment("指标id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zb_id;
|
||||
|
||||
@Column
|
||||
@Comment("内容id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@@ -52,92 +55,21 @@ public class Kh_zp {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String flatid;
|
||||
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("文件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Map> files;
|
||||
|
||||
private List<NutMap> files;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db = DB.MYSQL, value = "SELECT IFNULL(MAX(location),0)+1 FROM Kh_zp"),
|
||||
})
|
||||
|
||||
private Integer location;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBz_id() {
|
||||
return bz_id;
|
||||
}
|
||||
|
||||
public void setBz_id(String bz_id) {
|
||||
this.bz_id = bz_id;
|
||||
}
|
||||
|
||||
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 String getClnr() {
|
||||
return clnr;
|
||||
}
|
||||
|
||||
public void setClnr(String clnr) {
|
||||
this.clnr = clnr;
|
||||
}
|
||||
|
||||
public Integer getZpf() {
|
||||
return zpf;
|
||||
}
|
||||
|
||||
public void setZpf(Integer zpf) {
|
||||
this.zpf = zpf;
|
||||
}
|
||||
|
||||
public String getFlatid() {
|
||||
return flatid;
|
||||
}
|
||||
|
||||
public void setFlatid(String flatid) {
|
||||
this.flatid = flatid;
|
||||
}
|
||||
|
||||
|
||||
public List<Map> getFiles() {
|
||||
return files;
|
||||
}
|
||||
|
||||
public void setFiles(List<Map> files) {
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
public Integer getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(Integer location) {
|
||||
this.location = location;
|
||||
}
|
||||
@Column
|
||||
@Comment("是否修改,默认为false")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("0")
|
||||
private Boolean updateStatus;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -54,5 +54,8 @@ public class kh_nr extends BaseModel {
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("审核人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String auditUser;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
@@ -53,7 +53,7 @@ layout("/layouts/platform.html"){
|
||||
show-overflow-tooltip
|
||||
align="center" sortable>
|
||||
<template scope="scope">
|
||||
<div>
|
||||
<div v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')">
|
||||
<div v-if="rowDataEdit && rowDataIndex==scope.$index">
|
||||
<el-input placeholder="请输入线下得分"
|
||||
autofocus
|
||||
@@ -66,6 +66,9 @@ layout("/layouts/platform.html"){
|
||||
<i class="el-icon-edit" style="color: #0a84ff"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{scope.row.offLineScore}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="'线下最终得分' + (examConfig.offLine ? '(' + examConfig.offLine + '%)' : '')" prop="offLineFinalScore" header-align="center"
|
||||
|
||||
@@ -47,10 +47,10 @@ layout("/layouts/platform.html"){
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
show-overflow-tooltip>
|
||||
<template scope="{row}" v-if="column.prop==='startTime'">
|
||||
<template scope="{row}" v-if="column.prop=='startTime'">
|
||||
<span>{{row.startDateTime}} - {{row.endDateTime}}</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='disabled'">
|
||||
<template scope="{row}" v-else-if="column.prop=='disabled'">
|
||||
<el-switch
|
||||
v-model="row.disabled"
|
||||
active-color="#13ce66"
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
@@ -47,7 +52,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}}
|
||||
@@ -74,11 +79,15 @@ layout("/layouts/platform.html"){
|
||||
show-overflow-tooltip v-if="examConfig.selfAssessment === true"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column label="校工会评分" sortable prop="xgh_score"
|
||||
<el-table-column label="您的评分" sortable prop="self_score"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column label="校工会评分" sortable prop="xgh_score"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column label="状态" prop="name" header-align="center"
|
||||
align="center">
|
||||
@@ -90,11 +99,14 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作"
|
||||
fixed="right" width="120px">
|
||||
fixed="right" width="160px">
|
||||
<template scope="scope">
|
||||
<el-button size="mini" :disabled="scope.row.state==3" type="primary"
|
||||
@click="openShGh(scope.row)">评分
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" :disabled="scope.row.state==3"
|
||||
@click="doSubmit(scope.row)">提交
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -123,81 +135,83 @@ layout("/layouts/platform.html"){
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="考核内容" class="mt10"></table-tool>
|
||||
<el-form-item label="" label-width="0" v-for="nr,idx in formData.nrs">
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="nr.content" readonly maxlength="30" placeholder="请填写考核内容">
|
||||
<template slot="prepend"><span>{{ idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary size="small" :summary-method="getSummaries">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index" width="60">
|
||||
</el-table-column>
|
||||
<el-form-item label="" label-width="0" v-for="nr,idx in formData.nrs" v-if="nr?.auditUser === $store.state.user.loginname">
|
||||
<template>
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<el-input v-model="nr.content" readonly maxlength="30" placeholder="请填写考核内容">
|
||||
<template slot="prepend"><span>{{ idx + 1 }}</span></template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary size="small" :summary-method="getSummaries"
|
||||
:row-class-name="tableRowClassName">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index" width="60">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="考核标准" disabled prop="inspection"
|
||||
header-align="center" align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.inspection"
|
||||
readonly placeholder="请填写考核标准"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考核标准" disabled prop="inspection"
|
||||
header-align="center" align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.inspection"
|
||||
readonly placeholder="请填写考核标准"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="标准分" prop="score" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.score" readonly maxlength="4"
|
||||
placeholder="请填写标准分"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准分" prop="score" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.score" readonly maxlength="4"
|
||||
placeholder="请填写标准分"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="自评得分" prop="zpf" header-align="center"
|
||||
align="center" 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>
|
||||
<el-table-column label="自评得分" prop="zpf" header-align="center"
|
||||
align="center" 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>
|
||||
|
||||
<el-input v-else value="暂无" maxlength="4"
|
||||
readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-input v-else value="暂无" maxlength="4"
|
||||
readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="校工会评分" prop="schools" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<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"
|
||||
placeholder="请填写加、减原因"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加、减原因" prop="addition" header-align="center"
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.addition" maxlength="50"
|
||||
placeholder="请填写加、减原因"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料数量" header-align="center" align="center" width="100" prop="fileCount">
|
||||
<template scope="scope">
|
||||
<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">
|
||||
{{ scope.row.zp?.files?.length || 0 }}</span>
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料" header-align="center" align="center" prop="files">
|
||||
<template scope="{row, $index}">
|
||||
<el-button type="primary" plain size="small"
|
||||
@click="doView(nr.content,row.inspection,row, $index, idx)">
|
||||
查看佐证材料
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料" header-align="center" align="center" prop="files">
|
||||
<template scope="{row, $index}">
|
||||
<el-button type="primary" plain size="small"
|
||||
@click="doView(nr.content,row.inspection,row, $index, idx)">
|
||||
查看佐证材料
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
@@ -245,6 +259,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
window.vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
@@ -290,6 +305,12 @@ layout("/layouts/platform.html"){
|
||||
'upload-materials': httpVueLoader('/components/module/kh/UploadMaterials.vue')
|
||||
},
|
||||
methods: {
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
if(row.zp?.updateStatus === true) {
|
||||
return 'warning-row';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
addForm() {
|
||||
this.formData.nrs[this.idx].bzs[this.index].zp = this.data
|
||||
this.dialog = false
|
||||
@@ -356,6 +377,24 @@ layout("/layouts/platform.html"){
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
doSubmit(row) {
|
||||
this.$confirm('提交后不可修改,您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(()=>{
|
||||
this.$axios
|
||||
.post("/platform/ghkh/xghsh/submit", {id: row.record_id})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doView(nr, bz, row, index, idx) {
|
||||
this.dialog = true
|
||||
this.viewRow = row
|
||||
@@ -374,7 +413,7 @@ layout("/layouts/platform.html"){
|
||||
sums[index] = '';
|
||||
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;
|
||||
}) + ' 个'
|
||||
|
||||
@@ -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;
|
||||
}) + ' 个'
|
||||
@@ -628,12 +642,12 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
// 考核还没结束
|
||||
if(this.$moment().isBefore(this.$moment(row.endDateTime))) {
|
||||
if(row.state === 3) {
|
||||
if(row.state === 2 || row.state === 3) {
|
||||
this.$message.error("当前时间未在申诉期内,不能修改")
|
||||
return
|
||||
}
|
||||
} else if(this.$moment().isAfter(this.$moment(row.endDateTime)) && this.$moment().isBefore(this.$moment(row.startApplyTime))) {
|
||||
if(row.state === 3) {
|
||||
if(row.state === 2 || row.state === 3) {
|
||||
this.$message.error("当前时间未在申诉期内,不能修改")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user