量化考核
This commit is contained in:
@@ -0,0 +1,207 @@
|
||||
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.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.service.KhZbService;
|
||||
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.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
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.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/27/20:19
|
||||
* @Description:自评
|
||||
*/
|
||||
@At("/platform/ghkh/zp")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class GhKhZpController {
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/zp.html")
|
||||
@SaCheckPermission("ghkh.zp")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
private KhzpService khzpService;
|
||||
@Inject
|
||||
private GhkhGhzbController ghkhGhzbController;
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.zp")
|
||||
public Result pageData(@Param(value = "annual") String annual,
|
||||
@Param(value = "assessment") String assessment, int pageNumber, int pageSize) {
|
||||
|
||||
|
||||
Sql sql = Sqls.create("SELECT * from kh_zb zb left join kh_record re on zb.id = re.zb_id and re.union_id = @unionid $condition").setParam("unionid", SecurityUtil.getUnionId());
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// if (ShiroUtil.hasRole("H04")) {
|
||||
// cnd.and("zp.flatid", "=", sys_user.getUnion().getId());
|
||||
// }
|
||||
cnd.and("zb.disabled", "=", true);
|
||||
if (Strings.isNotBlank(annual) && Strings.isNotBlank(annual)) {
|
||||
cnd.and("zb.annual", "=", annual);
|
||||
}
|
||||
cnd.and("zb.assessment", "!=", "模板V1.0(分工会工作量化考核评分请勿修改)");
|
||||
if (Strings.isNotBlank(assessment) && Strings.isNotBlank(assessment)) {
|
||||
cnd.where().andLike("zb.assessment", assessment);
|
||||
} else {
|
||||
cnd.desc("annual");
|
||||
}
|
||||
cnd.groupBy("zb.id");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(khzpService.listPage(pageNumber, pageSize, sql));
|
||||
}
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@At
|
||||
@POST
|
||||
@SaCheckPermission("ghkh.zp")
|
||||
public Result doHandler(@Param(value = "zp") Kh_zp[] zp, @Param(value = "handletype") String handletype) {
|
||||
|
||||
if (zp.length == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int score = 0;
|
||||
|
||||
|
||||
for (Kh_zp kh_zp : zp) {
|
||||
kh_zp.setFlatid(SecurityUtil.getUnionId());
|
||||
khzpService.dao().insertOrUpdate(kh_zp);
|
||||
score += kh_zp.getZpf() != null ? kh_zp.getZpf() : 0;
|
||||
}
|
||||
|
||||
//查询自评记录
|
||||
Kh_record record = baseService.dao().fetch(Kh_record.class, Cnd.where("zb_id", "=", zp[0].getZb_id()).and("union_id", "=", SecurityUtil.getUnionId()));
|
||||
if (null == record) {
|
||||
record = new Kh_record();
|
||||
record.setZb_id(zp[0].getZb_id());
|
||||
record.setUnion_id(SecurityUtil.getUnionId());
|
||||
record.setZp_score(score);
|
||||
record.setXgh_score(0);
|
||||
record.setState(handletype.equals("submit") ? 2 : 1);
|
||||
} else {
|
||||
record.setZp_score(score);
|
||||
if (handletype.equals("submit")) {
|
||||
record.setState(2);
|
||||
}
|
||||
}
|
||||
baseService.dao().insertOrUpdate(record);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Inject
|
||||
private KhZbService khZbService;
|
||||
|
||||
@At
|
||||
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);
|
||||
}
|
||||
});
|
||||
});
|
||||
return Result.success(khzb);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.zp")
|
||||
public Result doEdit(@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()));
|
||||
|
||||
if (record == null) {
|
||||
throw new RuntimeException("缺少record信息");
|
||||
}
|
||||
|
||||
AtomicInteger score = new AtomicInteger();
|
||||
|
||||
zb.getNrs().forEach(nr -> {
|
||||
nr.getBzs().forEach(bz -> {
|
||||
khzpService.update(bz.getZp());
|
||||
score.addAndGet(bz.getZp().getZpf() != null ? bz.getZp().getZpf() : 0);
|
||||
});
|
||||
});
|
||||
|
||||
record.setZp_score(score.get());
|
||||
baseService.dao().update(record);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交到校工会
|
||||
*
|
||||
* @param zb
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("ghkh.zp")
|
||||
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();
|
||||
|
||||
|
||||
zb.getNrs().forEach(nr -> {
|
||||
nr.getBzs().forEach(bz -> {
|
||||
Kh_zp zp = bz.getZp();
|
||||
zp.setFlatid(SecurityUtil.getUnionId());
|
||||
khzpService.insertOrUpdate(zp);
|
||||
score.addAndGet(zp.getZpf() != null ? zp.getZpf() : 0);
|
||||
});
|
||||
});
|
||||
|
||||
if (record == null) {
|
||||
record = new Kh_record();
|
||||
record.setZb_id(zb.getId());
|
||||
record.setUnion_id(SecurityUtil.getUnionId());
|
||||
record.setZp_score(score.get());
|
||||
record.setXgh_score(0);
|
||||
record.setState(2);
|
||||
baseService.dao().insert(record);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
record.setState(2);
|
||||
record.setZp_score(score.get());
|
||||
baseService.dao().update(record);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
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.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;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhNrService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
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.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.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/8:48
|
||||
* @Description:考核指标
|
||||
*/
|
||||
@At("/platform/ghkh/khzb")
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
public class GhkhGhzbController {
|
||||
|
||||
|
||||
@Inject
|
||||
private KhZbService khZbService;
|
||||
@Inject
|
||||
private KhNrService khNrService;
|
||||
@Inject
|
||||
private KhBzService khBzService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/khzb.html")
|
||||
@SaCheckPermission("ghkh.khzb")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.khzb")
|
||||
public Result pageData(@Param(value = "annual") String annual,
|
||||
@Param(value = "assessment") String assessment,
|
||||
int pageNumber, int pageSize) {
|
||||
Sql sql = Sqls.create("SELECT * FROM `kh_zb` $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Strings.isNotBlank(annual) && Strings.isNotBlank(annual)) {
|
||||
cnd.and("annual", "=", annual);
|
||||
}
|
||||
if (Strings.isNotBlank(assessment) && Strings.isNotBlank(assessment)) {
|
||||
cnd.where().andLike("assessment", assessment);
|
||||
} else {
|
||||
cnd.desc("annual");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(khZbService.listPage(pageNumber, pageSize, sql));
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
public Result getZb(String id) {
|
||||
return Result.success(khZbService.khzb(id)) ;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("ghkh.khzb")
|
||||
public Result delete(String id) {
|
||||
|
||||
khZbService.delete(id);
|
||||
|
||||
List<kh_nr> query = khNrService.query(Cnd.where("zb_id", "=", id));
|
||||
|
||||
for (kh_nr kh_nr : query) {
|
||||
khBzService.clear(Cnd.where("nr_id", "=", kh_nr.getId()));
|
||||
}
|
||||
|
||||
khNrService.clear(Cnd.where("zb_id", "=", id));
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
public Result edit(String id) {
|
||||
return getZb(id);
|
||||
}
|
||||
|
||||
@At
|
||||
@POST
|
||||
@SaCheckPermission("ghkh.khzb")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result doEdit(@Param(value = "kh_zb") Kh_zb kh_zb) {
|
||||
khZbService.updateIgnoreNull(kh_zb);
|
||||
|
||||
List<kh_nr> query = khNrService.query(Cnd.where("zb_id", "=", kh_zb.getId()));
|
||||
|
||||
for (kh_nr kh_nr : query) {
|
||||
System.err.println(kh_nr.getZb_id());
|
||||
khBzService.clear(Cnd.where("nr_id", "=", kh_nr.getId()));
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
return Result.success();
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@POST
|
||||
@SaCheckPermission("ghkh.khzb")
|
||||
public Result toggleEnable(@Param("id") String id, @Param("enable") boolean enable) {
|
||||
if (Strings.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
|
||||
Kh_zb khZb = khZbService.fetch(id);
|
||||
if (khZb == null) {
|
||||
return Result.error("未找到对应的考核指标");
|
||||
}
|
||||
|
||||
khZb.setDisabled(enable);
|
||||
khZbService.updateIgnoreNull(khZb);
|
||||
|
||||
return Result.success("操作成功");
|
||||
}
|
||||
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
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.zhgh.dayofficework.ghkh.service.KhXghshService;
|
||||
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.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.Param;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/10/09/14:27
|
||||
* @Description:考核排行
|
||||
*/
|
||||
@At("/platform/ghkh/khph")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class GhkhKhphController {
|
||||
|
||||
@Inject
|
||||
private KhXghshService khXghshService;
|
||||
|
||||
@Inject
|
||||
private KhZbService khZbService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/khph.html")
|
||||
@SaCheckPermission("ghkh.khph")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.khph")
|
||||
public Result pageData(int pageNumber, int pageSize,
|
||||
@Param(value = "khid") String khid,
|
||||
@Param(value = "annual")Integer annual) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT zb.annual,zb.assessment,un.unionname,re.* FROM `kh_record` re
|
||||
LEFT JOIN `vw_user` un ON re.union_id = un.unionId
|
||||
LEFT JOIN kh_zb zb ON zb.id = re.zb_id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("re.zb_id ", "=", khid);
|
||||
cnd.and("re.state", "=", 3);
|
||||
cnd.andEX("zb.`annual`","=",annual);
|
||||
cnd.desc("re.xgh_score");
|
||||
cnd.groupBy("re.union_id");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(khXghshService.listPage(pageNumber, pageSize, sql));
|
||||
}
|
||||
|
||||
@At
|
||||
public Result getKh(String annual) {
|
||||
Sql sql = Sqls.create("SELECT id,assessment FROM `kh_zb` WHERE annual= @annual ORDER BY addtime DESC").setParam("annual", annual);
|
||||
return Result.success(khZbService.list(sql));
|
||||
}
|
||||
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhXghshService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
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;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/10/09/11:28
|
||||
* @Description:
|
||||
*/
|
||||
@At("/platform/ghkh/lssjcx")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class GhkhLssjcxController {
|
||||
|
||||
@Inject
|
||||
private KhzpService khzpService;
|
||||
|
||||
@Inject
|
||||
private KhXghshService khXghshService;
|
||||
|
||||
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/lssjcx.html")
|
||||
@SaCheckPermission("ghkh.lssjcx")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.lssjcx")
|
||||
public Result pageData(@Param(value = "annual") String annual,
|
||||
@Param(value = "unitId")String unitId,
|
||||
@Param(value = "unionId")String unionId, int pageNumber, int pageSize) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
re.*,
|
||||
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
|
||||
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
|
||||
""");
|
||||
|
||||
cnd.and("re.state", "=", 3);
|
||||
|
||||
if (AuthUtil.hasRole(RoleConstant.SYSADMIN.name())&& AuthUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and("info.unionId", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
|
||||
cnd.andEX("re.union_id", "=", unionId);
|
||||
cnd.andEX( "zb.annual", "=", annual);
|
||||
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(khzpService.listPage(pageNumber, pageSize, sql));
|
||||
}
|
||||
|
||||
@Inject
|
||||
private KhZbService khZbService;
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.lssjcx")
|
||||
public Result getData(String zb_id, String union_id) {
|
||||
Kh_zb khzb = khZbService.khzb(zb_id);
|
||||
|
||||
List<Kh_zp> list = khzpService.query(Cnd.where("zb_id", "=", zb_id).and("flatid", "=", union_id));
|
||||
List<Kh_xghsh> xghsh = khXghshService.query(Cnd.where("zb_id", "=", zb_id).and("flatid", "=", union_id));
|
||||
|
||||
khzb.getNrs().forEach(nr -> {
|
||||
nr.getBzs().forEach(bz -> {
|
||||
Kh_xghsh sh = xghsh.stream().filter(v -> v.getBz_id().equals(bz.getId())).findFirst().orElse(null);
|
||||
Kh_zp zp = list.stream().filter(v -> v.getBz_id().equals(bz.getId())).findFirst().orElse(null);
|
||||
if (zp != null) {
|
||||
bz.setZp(zp);
|
||||
}
|
||||
if (sh != null) {
|
||||
bz.setSh(sh);
|
||||
}
|
||||
});
|
||||
});
|
||||
return Result.success(khzb);
|
||||
}
|
||||
|
||||
@At
|
||||
public Result getAgenda() {
|
||||
|
||||
final String title = "【工会考核】";
|
||||
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
if (AuthUtil.hasRole(RoleConstant.SYSADMIN.name())&& AuthUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
// result.add(new NutMap().setv("title", title).setv("url", "/platform/ghkh/xghsh").setv("iconClass", vi.getIconByPath("/platform/ghkh/xghsh")).setv("label", "校工会审核").setv("number", getXghCount()));
|
||||
}
|
||||
return Result.success(result);
|
||||
|
||||
}
|
||||
|
||||
private Result getXghCount() {
|
||||
// return kh_recordViService.count(Cnd.where("state", "=", 2));
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
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.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;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhXghshService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
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.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
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.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/10:52
|
||||
* @Description:
|
||||
*/
|
||||
@At("/platform/ghkh/xghsh")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class GhkhXghshController {
|
||||
|
||||
|
||||
@Inject
|
||||
private KhXghshService khXghshService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/xghsh.html")
|
||||
@SaCheckPermission("ghkh.xghsh")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.xghsh")
|
||||
public Result pageData(@Param(value = "annual") String annual,
|
||||
@Param(value = "isAudit") Integer isAudit,
|
||||
@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
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
/*cnd.and("re.state", "=", 2);*/
|
||||
cnd.and("zb.disabled", "=", true);
|
||||
if (isAudit == 1) {
|
||||
cnd.and("re.state", ">=", 2);
|
||||
} else {
|
||||
cnd.and("re.state", isAudit == 2 ? ">" : "=", 2);
|
||||
}
|
||||
cnd.andEX( "zb.annual", "=", annual);
|
||||
cnd.andEX("re.union_id", "=", unionid);
|
||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
}
|
||||
cnd.groupBy("re.union_id");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(khXghshService.listPage(pageNumber, pageSize, sql));
|
||||
}
|
||||
|
||||
@Inject
|
||||
private KhZbService khZbService;
|
||||
|
||||
@Inject
|
||||
private KhzpService khzpService;
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.xghsh")
|
||||
public Result getData(String zb_id, String union_id) {
|
||||
Kh_zb khzb = khZbService.khzb(zb_id);
|
||||
|
||||
List<Kh_zp> list = khzpService.query(Cnd.where("zb_id", "=", zb_id).and("flatid", "=", union_id));
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
});
|
||||
return Result.success(khzb);
|
||||
}
|
||||
|
||||
@At
|
||||
public Result xghCheck(String id) {
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@At
|
||||
@POST
|
||||
@SaCheckPermission("ghkh.xghsh")
|
||||
public Result marking(@Param(value = "pf") Kh_xghsh[] pf) {
|
||||
|
||||
if (pf.length == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int score = 0;
|
||||
|
||||
// Sys_user sys_user = (Sys_user) ShiroUtil.getPrincipal();
|
||||
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);
|
||||
record.setState(3);
|
||||
baseService.dao().update(record);
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
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.web.commons.auth.utils.SecurityUtil;
|
||||
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;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhNrService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
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 java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/27/9:23
|
||||
* @Description:
|
||||
*/
|
||||
@At("/platform/ghkh/Xjkhzb")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class GhkhXjkhzbController {
|
||||
|
||||
@Inject
|
||||
private KhZbService khZbService;
|
||||
@Inject
|
||||
private KhNrService khNrService;
|
||||
@Inject
|
||||
private KhBzService khBzService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/xjkhzb.html")
|
||||
@SaCheckPermission("ghkh.Xjkhzb")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@POST
|
||||
@SaCheckPermission("ghkh.Xjkhzb")
|
||||
public Result doAdd(@Param(value = "kh_zb") Kh_zb kh_zb) {
|
||||
kh_zb.setCreateUserId(SecurityUtil.getUserId());
|
||||
kh_zb.setCreateUserName(SecurityUtil.getUserUsername());
|
||||
kh_zb.setCreateTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); Kh_zb zb = khZbService.insert(kh_zb);
|
||||
for (kh_nr nr : kh_zb.getNrs()) {
|
||||
nr.setZb_id(zb.getId());
|
||||
khNrService.insertWith(nr, "bzs");
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
public Result getZbList() {
|
||||
return Result.success(khZbService.query());
|
||||
|
||||
}
|
||||
}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.controller;
|
||||
|
||||
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.log.Log;
|
||||
import org.nutz.log.Logs;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/TradeUnionAssessmentCalcScore")
|
||||
@Ok("json:full")
|
||||
public class TradeUnionAssessmentCalcScoreController {
|
||||
|
||||
private static final Log log = Logs.get();
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
/**
|
||||
* 赵欣雨
|
||||
*
|
||||
* @param relation_id 标准关联标识
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
public Result CalcScore(@Param("bz_relation_id") String relation_id, @Param("year") String year) {
|
||||
switch (relation_id) {
|
||||
case "proposal":
|
||||
return Result.success().addData(getProposalScore(year));
|
||||
case "secteameet":
|
||||
return Result.success().addData(getSecTeaMeetingScore(year));
|
||||
case "ConandDif":
|
||||
return Result.success().addData(getConAndDifScore(year));
|
||||
case "Performance":
|
||||
return Result.success().addData(getPerformanceScore(year));
|
||||
default:
|
||||
return Result.success().addData(null);
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
public Result getPerformanceScore(String year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
school.`name` activityName,
|
||||
ev.allName eventName,
|
||||
ar.ranking,
|
||||
ar.integral,
|
||||
ar.numberOfPeople
|
||||
FROM
|
||||
activity_results ar
|
||||
LEFT JOIN activity_school school ON school.id = ar.activityId
|
||||
LEFT JOIN activity_event ev ON ev.id = ar.eventId
|
||||
WHERE
|
||||
ev.projectType = 2
|
||||
AND YEAR ( school.startTime )= @year
|
||||
AND ar.unionId=@unionId
|
||||
ORDER BY
|
||||
school.startTime,
|
||||
ranking
|
||||
""").setParam("unionId", SecurityUtil.getUnionId()).setParam("year", year);
|
||||
|
||||
return Result.success(baseService.listMap(sql));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 双代会得分记录
|
||||
*
|
||||
* @param year
|
||||
* @return
|
||||
*/
|
||||
public Result getProposalScore(String year) {
|
||||
String query = """
|
||||
SELECT
|
||||
pi.proposalCode,
|
||||
pi.proposalName,
|
||||
u.`username`,
|
||||
pi.createTime,
|
||||
jdh.jdhallname
|
||||
FROM
|
||||
proposal_info pi
|
||||
LEFT JOIN `user` u ON u.id = pi.createUser
|
||||
LEFT JOIN jdh_jdhxx jdh ON jdh.id = pi.teacherMeetingId
|
||||
WHERE
|
||||
u.unionid = @unionid
|
||||
AND YEAR ( pi.createTime ) = @year
|
||||
AND pi.stateCode != '100'
|
||||
ORDER BY pi.createTime DESC
|
||||
""";
|
||||
|
||||
Sql sql = Sqls.create(query).setParam("year", year).setParam("unionid", SecurityUtil.getUnionId());
|
||||
return Result.success(baseService.listMap(sql));
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级教代会得分记录
|
||||
*
|
||||
* @param year
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
public Result getSecTeaMeetingScore(String year) {
|
||||
String query = """
|
||||
SELECT
|
||||
j2.meeting_name,
|
||||
j2.meeting_time,
|
||||
jdh.jdhallname,
|
||||
u.username
|
||||
FROM
|
||||
`jdh_level2` j2
|
||||
LEFT JOIN sys_unit dw ON dw.id = j2.unit_id
|
||||
LEFT JOIN sys_union gh ON gh.id = dw.unionid
|
||||
LEFT JOIN jdh_jdhxx jdh ON jdh.id = j2.session_id
|
||||
LEFT JOIN `user` u ON u.id = j2.founder
|
||||
WHERE
|
||||
u.unionid = @unionid
|
||||
AND YEAR ( j2.meeting_time ) = @year
|
||||
ORDER BY
|
||||
j2.meeting_time DESC
|
||||
""";
|
||||
Sql sql = Sqls.create(query).setParam("unionid", SecurityUtil.getUnionId()).setParam("year", year);
|
||||
return Result.success(baseService.list(sql));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 慰问得分记录 AND 困难补助得分记录
|
||||
*
|
||||
* @param year
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
public Result getConAndDifScore(String year) {
|
||||
String query = """
|
||||
SELECT
|
||||
bu.username be_username,
|
||||
bu.loginname be_loginname,
|
||||
con.apply_time,
|
||||
ct.`name` typename,
|
||||
'慰问' AS querytype\s
|
||||
FROM
|
||||
condolence con
|
||||
LEFT JOIN `user` man ON man.id = con.manager
|
||||
LEFT JOIN `user` bu ON bu.id = con.be_user
|
||||
LEFT JOIN condolence_type ct ON ct.id = con.type\s
|
||||
WHERE
|
||||
bu.unionid = @unionid
|
||||
AND con.state_id != 3100\s
|
||||
AND YEAR ( con.apply_time ) = @year
|
||||
UNION ALL
|
||||
SELECT
|
||||
bu.username be_username,
|
||||
bu.loginname be_loginname,
|
||||
bf.sqsj AS apply_time,
|
||||
CASE
|
||||
bf.sq_knlx\s
|
||||
WHEN 1 THEN
|
||||
'会员因病住院'\s
|
||||
WHEN 2 THEN
|
||||
'家庭重大意外事故'\s
|
||||
WHEN 3 THEN
|
||||
'会员去世'\s
|
||||
WHEN 4 THEN
|
||||
'重大疾病(癌症)'\s
|
||||
WHEN 5 THEN
|
||||
'困难家庭'\s
|
||||
WHEN 6 THEN
|
||||
'精神疾病'\s
|
||||
WHEN 7 THEN
|
||||
'长期病休'\s
|
||||
WHEN 8 THEN
|
||||
'其它' ELSE '无'\s
|
||||
END 'typename',
|
||||
'困难补助' AS querytype\s
|
||||
FROM
|
||||
zgfw_knbf bf
|
||||
LEFT JOIN `user` man ON man.id = bf.sqr
|
||||
LEFT JOIN `user` bu ON bu.id = bf.bbzrusername\s
|
||||
WHERE
|
||||
bu.unionid = @unionid
|
||||
AND bf.zt = 500\s
|
||||
AND YEAR ( bf.sqsj ) = @year
|
||||
""";
|
||||
Sql sql = Sqls.create(query).setParam("unionid", SecurityUtil.getUnionId()).setParam("year", year);
|
||||
return Result.success(baseService.list(sql));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:37
|
||||
* @Description:考核标准
|
||||
*/
|
||||
@Data
|
||||
@Table("Kh_bz")
|
||||
public class Kh_bz extends BaseModel {
|
||||
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("Kh_nr表的id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String nr_id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("考核标准")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String inspection;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("是否启用佐证材料")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean isEvidence;
|
||||
|
||||
@Column
|
||||
@Comment("标准分")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String score;
|
||||
|
||||
@Column
|
||||
@Comment("单项得分")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String single_score;
|
||||
|
||||
@Column
|
||||
@Comment("自评能否超过最高分")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean beyond_highestscore;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String remark;
|
||||
|
||||
@Column
|
||||
@Comment("关联模块")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
private String associatedmodule;
|
||||
|
||||
@Column
|
||||
@Comment("标准标识")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
private String bz_relation_id;
|
||||
|
||||
@Column
|
||||
@Comment("Kh_zb表的id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zb_id;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db = DB.MYSQL, value = "SELECT IFNULL(MAX(location),0)+1 FROM Kh_bz"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
@Column
|
||||
@Comment("能否删除该项")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean canDelete;
|
||||
|
||||
@One(field = "nr_id",key = "id")
|
||||
private kh_nr nr;
|
||||
|
||||
private Kh_zp zp;
|
||||
private Kh_xghsh sh;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/10/12/16:43
|
||||
* @Description: 考核记录
|
||||
*/
|
||||
@Table("Kh_record")
|
||||
public class Kh_record {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String record_id;
|
||||
|
||||
@Column
|
||||
@Comment("指标id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zb_id;
|
||||
|
||||
@Column
|
||||
@Comment("分工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String union_id;
|
||||
|
||||
@Column
|
||||
@Comment("考核状态( 1 自评成功 2 待校工会评分 3 考核完成 )")
|
||||
@ColDefine(type = ColType.INT, width = 1)
|
||||
private Integer state;
|
||||
|
||||
@Column
|
||||
@Comment("自评得分")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
private Integer zp_score;
|
||||
|
||||
@Column
|
||||
@Comment("校工会评分")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
private Integer xgh_score;
|
||||
|
||||
public String getRecord_id() {
|
||||
return record_id;
|
||||
}
|
||||
|
||||
public void setRecord_id(String record_id) {
|
||||
this.record_id = record_id;
|
||||
}
|
||||
|
||||
public String getZb_id() {
|
||||
return zb_id;
|
||||
}
|
||||
|
||||
public void setZb_id(String zb_id) {
|
||||
this.zb_id = zb_id;
|
||||
}
|
||||
|
||||
public String getUnion_id() {
|
||||
return union_id;
|
||||
}
|
||||
|
||||
public void setUnion_id(String union_id) {
|
||||
this.union_id = union_id;
|
||||
}
|
||||
|
||||
public Integer getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(Integer state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Integer getZp_score() {
|
||||
return zp_score;
|
||||
}
|
||||
|
||||
public void setZp_score(Integer zp_score) {
|
||||
this.zp_score = zp_score;
|
||||
}
|
||||
|
||||
public Integer getXgh_score() {
|
||||
return xgh_score;
|
||||
}
|
||||
|
||||
public void setXgh_score(Integer xgh_score) {
|
||||
this.xgh_score = xgh_score;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/11:59
|
||||
* @Description:校工会审核
|
||||
*/
|
||||
@Table("Kh_xghsh")
|
||||
public class Kh_xghsh extends BaseModel {
|
||||
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("校工会评分")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
private Integer schools;
|
||||
|
||||
@Column
|
||||
@Comment("加、减原因")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String addition;
|
||||
|
||||
@Column
|
||||
@Comment("分工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String flatid;
|
||||
|
||||
@Column
|
||||
@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)
|
||||
private String nr_id;
|
||||
|
||||
@One(field = "id")
|
||||
private Kh_bz bz;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
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;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/11:46
|
||||
* @Description:考核指标
|
||||
*/
|
||||
@Table("Kh_zb")
|
||||
@Data
|
||||
public class Kh_zb extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("创建人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createUserId;
|
||||
|
||||
@Column
|
||||
@Comment("创建人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createUserName;
|
||||
|
||||
@Column
|
||||
@Comment("填报人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("填报人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("填报人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("填报人电话")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("填报人单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("填报人单位id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("填报人工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("填报人工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String annual;
|
||||
|
||||
@Column
|
||||
@Comment("考核名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String assessment;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("填报开始时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
@NotNull(message = "活动开始时间不能为空")
|
||||
private Date startDateTime;
|
||||
|
||||
@Column
|
||||
@Comment("填报结束时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
@NotNull(message = "活动结束时间不能为空")
|
||||
private Date endDateTime;
|
||||
|
||||
@Column
|
||||
@Comment("申诉开始时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
@NotNull(message = "活动开始时间不能为空")
|
||||
private Date startApplyTime;
|
||||
|
||||
@Column
|
||||
@Comment("申诉结束时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
@NotNull(message = "活动结束时间不能为空")
|
||||
private Date endApplyTime;
|
||||
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createTime;
|
||||
|
||||
@Column
|
||||
@Comment("是否开启")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean disabled;
|
||||
|
||||
@Column
|
||||
@Comment("添加时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String addtime;
|
||||
|
||||
|
||||
@Many(field = "zb_id")
|
||||
private List<kh_nr> nrs;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM Kh_zb"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
public Integer getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(Integer location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public List<kh_nr> getNrs() {
|
||||
return nrs;
|
||||
}
|
||||
|
||||
public void setNrs(List<kh_nr> nrs) {
|
||||
this.nrs = nrs;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAnnual() {
|
||||
return annual;
|
||||
}
|
||||
|
||||
public void setAnnual(String annual) {
|
||||
this.annual = annual;
|
||||
}
|
||||
|
||||
public String getAssessment() {
|
||||
return assessment;
|
||||
}
|
||||
|
||||
public void setAssessment(String assessment) {
|
||||
this.assessment = assessment;
|
||||
}
|
||||
|
||||
public String getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(String addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.model;
|
||||
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf考核分工会自评
|
||||
* @Date: 2020/09/27/20:13
|
||||
* @Description:
|
||||
*/
|
||||
@Table("Kh_zp")
|
||||
public class Kh_zp {
|
||||
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@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)
|
||||
private String nr_id;
|
||||
|
||||
@Column
|
||||
@Comment("材料内容")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String clnr;
|
||||
|
||||
@Column
|
||||
@Comment("自评分")
|
||||
@ColDefine(type = ColType.INT, width = 6)
|
||||
private Integer zpf;
|
||||
|
||||
@Column
|
||||
@Comment("分工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String flatid;
|
||||
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("文件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Map> 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:34
|
||||
* @Description:考核内容
|
||||
*/
|
||||
@Data
|
||||
@Table("kh_nr")
|
||||
public class kh_nr extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("考核内容")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
@Comment("题号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String contentNumber;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("Kh_zb表的id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zb_id;
|
||||
|
||||
@One(field = "zb_id",key = "id")
|
||||
private Kh_zb zb;
|
||||
|
||||
@Many(field = "nr_id")
|
||||
private List<Kh_bz> bzs;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
@SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(location),0)+1 FROM kh_nr"),
|
||||
})
|
||||
private Integer location;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_bz;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:51
|
||||
* @Description:考核标准
|
||||
*/
|
||||
public interface KhBzService extends BaseService<Kh_bz> {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.kh_nr;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:48
|
||||
* @Description:考核内容
|
||||
*/
|
||||
public interface KhNrService extends BaseService<kh_nr> {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_xghsh;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:46
|
||||
* @Description:校工会审核
|
||||
*/
|
||||
public interface KhXghshService extends BaseService<Kh_xghsh> {
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service;
|
||||
|
||||
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:43
|
||||
* @Description:考核指标
|
||||
*/
|
||||
public interface KhZbService extends BaseService<Kh_zb> {
|
||||
List<Kh_zb> khzbs();
|
||||
|
||||
Kh_zb khzb(String zbid);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zp;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/10/10/17:44
|
||||
* @Description:
|
||||
*/
|
||||
public interface KhzpService extends BaseService<Kh_zp> {
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service.impl;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_bz;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhBzService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:52
|
||||
* @Description:
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class KhBzServiceImpl extends BaseServiceImpl<Kh_bz> implements KhBzService {
|
||||
public KhBzServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service.impl;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.kh_nr;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhNrService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:50
|
||||
* @Description:
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class KhNrServiceImpl extends BaseServiceImpl<kh_nr> implements KhNrService {
|
||||
public KhNrServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service.impl;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_xghsh;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhXghshService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:47
|
||||
* @Description:
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class KhXghshServiceImpl extends BaseServiceImpl<Kh_xghsh> implements KhXghshService {
|
||||
public KhXghshServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service.impl;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
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.KhNrService;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhZbService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/09/25/13:44
|
||||
* @Description:
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class KhZbServiceImpl extends BaseServiceImpl<Kh_zb> implements KhZbService {
|
||||
public KhZbServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Inject
|
||||
private KhNrService khNrService;
|
||||
|
||||
private void setNrBz(List<kh_nr> nrs) {
|
||||
for (kh_nr nr : nrs) {
|
||||
nr = khNrService.fetchLinks(nr, "bzs", Cnd.NEW().asc("location"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Kh_zb> khzbs() {
|
||||
List<Kh_zb> zbs = query(Cnd.NEW().asc("location"), "nrs");
|
||||
for (Kh_zb zb : zbs) {
|
||||
setNrBz(zb.getNrs());
|
||||
}
|
||||
return zbs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Kh_zb khzb(String zbid) {
|
||||
Kh_zb zb = fetchLinks(fetch(zbid), "nrs",Cnd.NEW().asc("location"));
|
||||
setNrBz(zb.getNrs());
|
||||
return zb;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.dayofficework.ghkh.service.impl;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zp;
|
||||
import com.budwk.app.zhgh.dayofficework.ghkh.service.KhzpService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Auther: zhf
|
||||
* @Date: 2020/10/10/17:45
|
||||
* @Description:
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class KhzpServiceImpl extends BaseServiceImpl<Kh_zp> implements KhzpService {
|
||||
public KhzpServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user