提交
This commit is contained in:
+3
-3
@@ -1,9 +1,9 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.util.ShiroUtil;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
+31
-7
@@ -1,15 +1,17 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.lxy.model.Lxy_bm;
|
||||
import io.v.nutz.lxy.model.Lxy_grxx;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import io.v.nutz.lxy.service.LxyGrxxService;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_grxx;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.zgfw.service.LxyGrxxService;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
@@ -19,9 +21,12 @@ 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.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
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.List;
|
||||
|
||||
@@ -59,7 +64,14 @@ public class LxyFghShController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(Integer year, String hdid, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
@RequiresPermissions("zgfw.lxy.fghsh")
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "hdid", required = false) String hdid,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tunit.name unitname,\n" +
|
||||
"\tl.id,\n" +
|
||||
@@ -121,6 +133,7 @@ public class LxyFghShController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.fghsh")
|
||||
public Object sh(String hdid, String uid, Integer bmzt) {
|
||||
lxyBmService.update(Chain.make("bmzt", bmzt), Cnd.where("hdid", "=", hdid).and("userid", "=", uid));
|
||||
return null;
|
||||
@@ -128,11 +141,22 @@ public class LxyFghShController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"zgfw.lxy.xghsh", "zgfw.lxy.fghsh"}, logical = Logical.OR)
|
||||
public Object getBmInfo(String id) {
|
||||
Lxy_grxx grxx = lxyGrxxService.fetch(id);
|
||||
List<Sys_file> files = baseService.dao().query(Sys_file.class, Cnd.where("reid", "=", id));
|
||||
grxx.setFiles(files);
|
||||
return grxx;
|
||||
|
||||
Lxy_bm lxyBm = lxyBmService.dao().fetch(Lxy_bm.class, Cnd.where("hdid", "=", grxx.getHdid())
|
||||
.and("userid", "=", grxx.getUserid()));
|
||||
|
||||
NutMap nutMap = Lang.obj2nutmap(grxx);
|
||||
nutMap.put("bmFiles", lxyBm.getFiles());
|
||||
nutMap.put("mobile", lxyBm.getMobile());
|
||||
nutMap.put("idcard", lxyBm.getIdcard());
|
||||
nutMap.put("zyhj", lxyBm.getZyhj());
|
||||
nutMap.put("bz", lxyBm.getBz());
|
||||
return nutMap;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.lxy.model.Lxy_bm;
|
||||
import io.v.nutz.lxy.model.Lxy_grxx;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import io.v.nutz.lxy.service.LxyGrxxService;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
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.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
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 org.nutz.trans.Trans;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: 1V
|
||||
* @DateTime: 2020/8/28 9:21
|
||||
* @Description: 院级工会统一报名
|
||||
*/
|
||||
@At("/platform/zgfw/lxy/ghbm")
|
||||
@Ok("json")
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
public class LxyGhbmController {
|
||||
|
||||
@Inject
|
||||
private LxyHdService lxyHdService;
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private LxyBmService lxyBmService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
@Inject
|
||||
private LxyGrxxService lxyGrxxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/lxy/HdGhbm.html")
|
||||
@RequiresPermissions("zgfw.lxy.ghbm")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.ghbm")
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "hdid", required = false) String hdid,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param(value = "pageNumber", required = false) int pageNumber,
|
||||
@Param(value = "pageSize", required = false) int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
mefp.*,
|
||||
(
|
||||
mefp.number - ( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt not in (2,4))\s
|
||||
) remain,
|
||||
(
|
||||
( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt =5 )\s
|
||||
) passnum,
|
||||
(
|
||||
( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt = 3 )\s
|
||||
) reviewnum,
|
||||
un.unionname,
|
||||
un.unioncode,
|
||||
hd.*
|
||||
FROM
|
||||
lxy_mefp mefp
|
||||
LEFT JOIN sys_union un ON mefp.ghid = un.id
|
||||
LEFT JOIN lxy_hd hd ON mefp.hdid = hd.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and(new Static("now() < hd.bmjzsj"));
|
||||
|
||||
cnd.and("mefp.hdid", "=", hdid);
|
||||
cnd.andEX("un.id", "=", unionId);
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "SchoolUnionAdmin"})) {
|
||||
cnd.and(new Static("mefp.ghid in " + vi.getMangeUnionStr()));
|
||||
//工会管理员查看分配名额大于0的
|
||||
cnd.and("mefp.number", ">", 0);
|
||||
}
|
||||
|
||||
if (year != null) {
|
||||
cnd.and("YEAR(hdcjsj)", "=", year);
|
||||
}
|
||||
|
||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderName)) {
|
||||
cnd.orderBy(pageOrderName, PageUtil.getOrder(pageOrderBy));
|
||||
} else {
|
||||
cnd.desc("hdcjsj");
|
||||
}
|
||||
|
||||
|
||||
sql.setCondition(cnd);
|
||||
|
||||
return lxyHdService.listPage(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.ghbm")
|
||||
public Object getNotApply(String unionid, String hdid,
|
||||
@Param(value = "query", required = false) String query,
|
||||
@Param(value = "checks", required = false) String[] checks) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
u.sex,
|
||||
u.mobile,
|
||||
u.unitid,
|
||||
TIMESTAMPDIFF(
|
||||
YEAR,
|
||||
u.birthday,
|
||||
CURDATE()) age,
|
||||
u.username,
|
||||
u.loginname,
|
||||
unit.`name` unitname,
|
||||
un.unionname,
|
||||
u.idcard
|
||||
FROM
|
||||
sys_user u
|
||||
LEFT JOIN lxy_bm bm ON bm.userid = u.id
|
||||
AND bm.hdid = @hdid
|
||||
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
||||
LEFT JOIN ry_rygl_gr ry ON ry.userid = u.id
|
||||
LEFT JOIN sys_union un ON unit.unionid = un.id $condition
|
||||
""").setParam("hdid", hdid).setParam("unionid", unionid);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("member", "=", 1);
|
||||
cnd.and("unit.unionid", "=", unionid);
|
||||
cnd.and(new Static("u.id NOT IN ( SELECT bm.userid FROM lxy_bm bm WHERE bm.hdid = '" + hdid + "' ) "));
|
||||
if (checks != null && checks.length > 0) {
|
||||
for (String check : checks) {
|
||||
if (check.equals("honer")) {
|
||||
cnd.and(new Static("ry.zyxjsj is not null"));
|
||||
}
|
||||
|
||||
if (check.equals("five")) {
|
||||
cnd.and(new Static(" u.id not in (SELECT bm.userid from lxy_bm bm WHERE YEAR (NOW())- 5 < YEAR ( bm.bmsj ) )"));
|
||||
}
|
||||
}
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return lxyBmService.list(sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.ghbm")
|
||||
public Object getHasApply(String unionid, String hdid,
|
||||
@Param(value = "query", required = false) String query,
|
||||
@Param(value = "checks", required = false) String[] checks) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
u.loginname,
|
||||
u.username,
|
||||
bm.bmzt,
|
||||
bm.age,
|
||||
bm.files,
|
||||
bm.zyhj,
|
||||
bm.bz,
|
||||
bm.mobile,
|
||||
bm.idcard,
|
||||
bm.unitid,
|
||||
bm.unitname,
|
||||
bm.unionname
|
||||
FROM
|
||||
lxy_bm bm
|
||||
LEFT JOIN `user` u ON u.id = bm.userid
|
||||
where bm.hdid = @hdid and u.unionid = @unionid ORDER BY bm.bmzt ASC
|
||||
""").setParam("hdid", hdid).setParam("unionid", unionid);
|
||||
return Result.success().addData(lxyBmService.list(sql));
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.ghbm")
|
||||
public Object bm(@Param("::data") List<NutMap> bmMapList, @Param("flag") boolean flag) {
|
||||
|
||||
Trans.exec(() -> {
|
||||
List<Lxy_bm> bmList = Lang.collection2list(bmMapList, Lxy_bm.class);
|
||||
if (Lang.isNotEmpty(bmList)) {
|
||||
lxyBmService.clear(Cnd
|
||||
.NEW().and(Cnd.exps("bmzt", "is", null).or("bmzt", "=", 4))
|
||||
.and("ghid", "=", bmList.get(0).getGhid())
|
||||
.and("hdid", "=", bmList.get(0).getHdid()));
|
||||
|
||||
List<Lxy_grxx> grxxList = new ArrayList<>();
|
||||
for (Lxy_bm bm : bmList) {
|
||||
lxyBmService.clear(Cnd
|
||||
.where("userid","=",bm.getUserid())
|
||||
.and("ghid", "=", bmList.get(0).getGhid())
|
||||
.and("hdid", "=", bmList.get(0).getHdid()));
|
||||
|
||||
Lxy_bm fetch = lxyBmService.fetch(Cnd.where("hdid", "=", bm.getGhid()).and("userid", "=", bm.getUserid()).and("bmzt", "=", 3));
|
||||
if (Lang.isNotEmpty(fetch)) {
|
||||
continue;
|
||||
}
|
||||
bm.setBmzt(flag ? 3 : null);
|
||||
bm.setBmlx(1);
|
||||
bm.setBmsj(DateUtil.getDate());
|
||||
|
||||
if (flag) {
|
||||
Sql sql = Sqls.create("SELECT u.loginname,u.username,u.mobile,TIMESTAMPDIFF(YEAR,u.birthday,CURDATE()) age,u.sex,u.position,u.personType,u.nation,u.idcard FROM sys_user u WHERE u.id = '" + bm.getUserid() + "'");
|
||||
List<Record> records = sysUserService.list(sql);
|
||||
records.forEach(item -> {
|
||||
Lxy_grxx lxy_grxx = new Lxy_grxx();
|
||||
lxy_grxx.setLoginname(item.getString("loginname"));
|
||||
lxy_grxx.setUsername(item.getString("username"));
|
||||
lxy_grxx.setMobile(bm.getMobile());
|
||||
lxy_grxx.setAge(bm.getAge());
|
||||
lxy_grxx.setSex(item.getString("sex"));
|
||||
lxy_grxx.setZw(item.getString("position"));
|
||||
lxy_grxx.setRsbz(item.getString("personType"));
|
||||
lxy_grxx.setMz(item.getString("nation"));
|
||||
lxy_grxx.setIdcard(bm.getIdcard());
|
||||
lxy_grxx.setChry(new ArrayList());
|
||||
lxy_grxx.setUserid(bm.getUserid());
|
||||
lxy_grxx.setHdid(bm.getHdid());
|
||||
lxy_grxx.setGhid(bm.getGhid());
|
||||
grxxList.add(lxy_grxx);
|
||||
});
|
||||
}
|
||||
}
|
||||
lxyBmService.insert(bmList);
|
||||
lxyGrxxService.insert(grxxList);
|
||||
}
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.ghbm")
|
||||
public Object findBm(String ghId, String hdId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
l.id,
|
||||
hd.id hdid,
|
||||
u.id uid,
|
||||
u.loginname,
|
||||
u.username,
|
||||
u.sex,
|
||||
bm.age,
|
||||
bm.mobile,
|
||||
bm.idcard,
|
||||
bm.unitname,
|
||||
bm.bmzt,
|
||||
bm.zyhj,
|
||||
bm.bz,
|
||||
bm.ghid
|
||||
FROM
|
||||
lxy_bm bm
|
||||
LEFT JOIN lxy_hd hd ON hd.id = bm.hdid
|
||||
LEFT JOIN sys_user u ON u.id = bm.userid
|
||||
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
||||
LEFT JOIN Lxy_grxx l ON l.loginname = u.loginname
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("bm.bmzt","NOT IN",List.of(2,4,6));
|
||||
cnd.and("bm.hdid","=",hdId);
|
||||
cnd.and("bm.ghid","=",ghId);
|
||||
cnd.groupBy("u.loginname");
|
||||
cnd.desc("bm.bmzt");
|
||||
sql.setCondition(cnd);
|
||||
return lxyBmService.list(sql);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+44
-33
@@ -1,16 +1,16 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.lxy.model.Lxy_grxx;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import io.v.nutz.lxy.service.LxyGrxxService;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_grxx;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.zgfw.service.LxyGrxxService;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
@@ -66,34 +66,42 @@ public class LxyGrBmController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(Integer year, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"hd.id hdid,\n" +
|
||||
"hd.`name`,\n" +
|
||||
"hd.hdcd,\n" +
|
||||
"hd.hdkssj,\n" +
|
||||
"hd.hdjssj,\n" +
|
||||
"hd.bmjzsj,\n" +
|
||||
"u.id uid,\n" +
|
||||
"u.loginname,\n" +
|
||||
"u.username,\n" +
|
||||
"u.chry,\n" +
|
||||
"u.rsbz,\n" +
|
||||
"u.zw,\n" +
|
||||
"u.sex,\n" +
|
||||
"u.mobile,\n" +
|
||||
"u.mz,\n" +
|
||||
"u.idcard,\n" +
|
||||
"unit.unionid,\n" +
|
||||
"bm.bmzt ,\n" +
|
||||
"g.id gid,\n" +
|
||||
"TIMESTAMPDIFF(YEAR,u.birthday,CURDATE()) age\n" +
|
||||
"FROM lxy_bm bm\n" +
|
||||
"LEFT JOIN lxy_hd hd ON hd.id = bm.hdid\n" +
|
||||
"LEFT JOIN sys_user u ON u.id = bm.userid \n" +
|
||||
"LEFT JOIN sys_unit unit ON unit.id = u.unitid\n" +
|
||||
"LEFT JOIN sys_union un ON un.id = unit.unionid\n" +
|
||||
"LEFT JOIN lxy_grxx g ON g.userid = bm.userid $condition");
|
||||
@RequiresPermissions("zgfw.lxy.grbm")
|
||||
public Object pageData(@Param(value = "year",required = false) Integer year,
|
||||
@Param(value = "searchName",required = false) String searchName,
|
||||
@Param(value = "searchKeyword",required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber,@Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName",required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy",required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
hd.id hdid,
|
||||
hd.`name`,
|
||||
hd.hdcd,
|
||||
hd.hdkssj,
|
||||
hd.hdjssj,
|
||||
hd.bmjzsj,
|
||||
u.id uid,
|
||||
u.loginname,
|
||||
u.username,
|
||||
u.chry,
|
||||
u.rsbz,
|
||||
u.zw,
|
||||
u.sex,
|
||||
u.mobile,
|
||||
u.mz,
|
||||
u.idcard,
|
||||
unit.unionid,
|
||||
bm.bmzt ,
|
||||
g.id gid,
|
||||
TIMESTAMPDIFF(YEAR,u.birthday,CURDATE()) age
|
||||
FROM lxy_bm bm
|
||||
LEFT JOIN lxy_hd hd ON hd.id = bm.hdid
|
||||
LEFT JOIN sys_user u ON u.id = bm.userid
|
||||
LEFT JOIN sys_unit unit ON unit.id = u.unitid
|
||||
LEFT JOIN sys_union un ON un.id = unit.unionid
|
||||
LEFT JOIN lxy_grxx g ON g.userid = bm.userid $condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and(new Static("now() < hd.bmjzsj"));
|
||||
@@ -126,6 +134,7 @@ public class LxyGrBmController {
|
||||
@POST
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.grbm")
|
||||
public Object doAdd(Lxy_grxx lxy_grxx, @Param("fileList") TempFile[] fileList) throws IOException {
|
||||
|
||||
lxy_grxx = lxyGrxxService.insert(lxy_grxx);
|
||||
@@ -154,6 +163,7 @@ public class LxyGrBmController {
|
||||
@POST
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.grbm")
|
||||
public Object doEdit(Lxy_grxx lxy_grxx, @Param("fileList") TempFile[] fileList, String[] delFiles) throws IOException {
|
||||
|
||||
lxyGrxxService.updateIgnoreNull(lxy_grxx);
|
||||
@@ -184,6 +194,7 @@ public class LxyGrBmController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.grbm")
|
||||
public Object findOne(String id) {
|
||||
Lxy_grxx grxx = lxyGrxxService.fetch(id);
|
||||
List<Sys_file> files = baseService.dao().query(Sys_file.class, Cnd.where("reid", "=", id));
|
||||
+26
-12
@@ -1,14 +1,14 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.dao.CndPlus;
|
||||
import io.v.nutz.lxy.model.Lxy_hd;
|
||||
import io.v.nutz.lxy.model.Lxy_mefp;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import io.v.nutz.lxy.service.LxyMefpService;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_hd;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_mefp;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import io.v.nutz.zgfw.service.LxyMefpService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
@@ -62,12 +62,20 @@ public class LxyHdCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(String hdcd,String pastQuota,Integer year, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
CndPlus cnd = CndPlus.create();
|
||||
@RequiresPermissions("zgfw.lxy.hdmange")
|
||||
public Object pageData(@Param(value = "hdcd",required = false) String hdcd,
|
||||
@Param(value = "pastQuota",required = false) String pastQuota,
|
||||
@Param(value = "year",required = false) Integer year,
|
||||
@Param(value = "searchName",required = false) String searchName,
|
||||
@Param(value = "searchKeyword",required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName",required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy",required = false) String pageOrderBy) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.andExcludeEmpty("YEAR(hdcjsj)", "=", year);
|
||||
cnd.andExcludeEmpty("id", "=", hdcd);
|
||||
cnd.andExcludeEmpty("id", "=", pastQuota);
|
||||
cnd.andEX("YEAR(hdcjsj)", "=", year);
|
||||
cnd.andEX("id", "=", hdcd);
|
||||
cnd.andEX("id", "=", pastQuota);
|
||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
@@ -85,7 +93,8 @@ public class LxyHdCon {
|
||||
@POST
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
@ViReturn
|
||||
public Object doAdd(Lxy_hd hd, @Param("files") TempFile[] files, Lxy_mefp[] mefp) throws IOException {
|
||||
@RequiresPermissions("zgfw.lxy.hdmange")
|
||||
public Object doAdd(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, Lxy_mefp[] mefp) throws IOException {
|
||||
|
||||
hd.setHdcjsj(new Date());
|
||||
hd = lxyHdService.insert(hd);
|
||||
@@ -114,6 +123,7 @@ public class LxyHdCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.hdmange")
|
||||
public Object doEditMefp(Lxy_mefp[] mefp) {
|
||||
for (Lxy_mefp lxyMefp : mefp) {
|
||||
baseService.dao().update("lxy_mefp", Chain.make("number", lxyMefp.getNumber()), Cnd.where("ghid", "=", lxyMefp.getGhid()).and("hdid", "=", lxyMefp.getHdid()));
|
||||
@@ -125,7 +135,8 @@ public class LxyHdCon {
|
||||
@POST
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
@ViReturn
|
||||
public Object doEdit(Lxy_hd hd, @Param("files") TempFile[] files, String[] delFiles) throws IOException {
|
||||
@RequiresPermissions("zgfw.lxy.hdmange")
|
||||
public Object doEdit(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, String[] delFiles) throws IOException {
|
||||
lxyHdService.updateIgnoreNull(hd);
|
||||
|
||||
for (TempFile file : files) {
|
||||
@@ -152,6 +163,7 @@ public class LxyHdCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.hdmange")
|
||||
public Object delete(String id) {
|
||||
List<Record> files = baseService.dao().query("sys_file", Cnd.where("reid", "=", id));
|
||||
files.forEach(file -> {
|
||||
@@ -167,12 +179,14 @@ public class LxyHdCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.hdmange")
|
||||
public Object getPastQuota(String pastQuota) {
|
||||
return lxyMefpService.list(Sqls.create("SELECT fp.ghid,fp.number,un.unionname FROM lxy_mefp fp LEFT JOIN sys_union un ON fp.ghid = un.id WHERE hdid = '" + pastQuota + "'"));
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.hdmange")
|
||||
public Object getUnions(){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -0,0 +1,180 @@
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.lxy.model.Lxy_bm;
|
||||
import io.v.nutz.lxy.service.LxyGrxxService;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import io.v.nutz.util.ViTool;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
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.json.Json;
|
||||
import org.nutz.lang.Strings;
|
||||
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 javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author: Aaron
|
||||
* @create: 2020-09-25 14:55
|
||||
* @description: 疗休养活动统计
|
||||
**/
|
||||
@At("/platform/zgfw/lxy/hdtj")
|
||||
@Ok("json")
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
public class LxyHdTjController {
|
||||
|
||||
@Inject
|
||||
private LxyHdService lxyHdService;
|
||||
|
||||
@Inject
|
||||
private LxyGrxxService lxyGrxxService;
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
|
||||
@Inject
|
||||
private MsgApi msgApi;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/lxy/HdTj.html")
|
||||
@RequiresPermissions("zgfw.lxy.hdtj")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.hdtj")
|
||||
public Object pageData(@Param(value = "hdid", required = false) String hdid,
|
||||
@Param(value = "ghid", required = false) String ghid,
|
||||
@Param(value = "searchKey", required = false) String searchKey,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("SELECT gr.* ,u.unionname,u.unioncode,u.unitname unitname,u.unitcode FROM `lxy_grxx` gr \n" +
|
||||
"LEFT JOIN lxy_bm bm ON bm.userid = gr.userid \n" +
|
||||
"LEFT JOIN `user` u ON u.id=bm.userid $condition");
|
||||
|
||||
cnd.and(new Static("bm.bmzt = 5"));
|
||||
cnd.and("gr.hdid", "=", hdid);
|
||||
|
||||
if (Strings.isNotBlank(ghid)) {
|
||||
cnd.and("gr.ghid", "=", ghid);
|
||||
}
|
||||
if (Strings.isNotBlank(searchKey)) {
|
||||
cnd.where().andLike("u.loginname", searchKey).orLike("u.username", searchKey);
|
||||
}
|
||||
cnd.groupBy("bm.userid");
|
||||
cnd.asc("u.unioncode");
|
||||
sql.setCondition(cnd);
|
||||
return lxyGrxxService.listPage(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.hdtj")
|
||||
public Object getLxyHd(String year) {
|
||||
return lxyHdService.list(Sqls.create("SELECT id,`name` FROM `lxy_hd` WHERE YEAR(hdcjsj) = @year ORDER BY hdcjsj DESC ").setParam("year", year));
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("zgfw.lxy.hdtj")
|
||||
public void doExport(@Param(value = "hdid", required = false) String hdid,
|
||||
@Param(value = "hdname", required = false) String hdname,
|
||||
@Param(value = "ghid", required = false) String ghid, HttpServletResponse response) throws IOException {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
gr.*,
|
||||
bm.unionname,
|
||||
bm.unitname,
|
||||
bm.zyhj,
|
||||
bm.bz
|
||||
FROM
|
||||
`lxy_grxx` gr
|
||||
LEFT JOIN lxy_bm bm ON bm.userid = gr.userid
|
||||
LEFT JOIN `user` u ON u.id = bm.userid
|
||||
$condition
|
||||
""");
|
||||
|
||||
cnd.and(new Static("bm.bmzt = 5"));
|
||||
cnd.and("gr.hdid", "=", hdid);
|
||||
|
||||
if (Strings.isNotBlank(ghid)) {
|
||||
cnd.and("gr.ghid", "=", ghid);
|
||||
}
|
||||
cnd.groupBy("bm.userid");
|
||||
cnd.asc("bm.unionname").asc("bm.unitname").asc("gr.age");
|
||||
sql.setCondition(cnd);
|
||||
List<Record> list = lxyGrxxService.list(sql);
|
||||
int i = 1;
|
||||
for (Record r : list) {
|
||||
r.set("index", i);
|
||||
List<NutMap> chry = Json.fromJsonAsList(NutMap.class, r.getString("chry"));
|
||||
for (NutMap map : chry) {
|
||||
r.set("rych", (r.getString("rych") == null ? "" : r.getString("rych")) + " " + map.getString("shry"));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
entities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||
entities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||
entities.add(new ExcelExportEntity("年龄", "age", 20));
|
||||
entities.add(new ExcelExportEntity("手机号", "mobile", 20));
|
||||
entities.add(new ExcelExportEntity("身份证号", "idcard", 20));
|
||||
entities.add(new ExcelExportEntity("工会", "unionname", 20));
|
||||
entities.add(new ExcelExportEntity("单位", "unitname", 20));
|
||||
entities.add(new ExcelExportEntity("单位", "unitname", 20));
|
||||
entities.add(new ExcelExportEntity("获奖名称", "zyhj", 20));
|
||||
entities.add(new ExcelExportEntity("备注", "bz", 20));
|
||||
|
||||
ViTool.excelResponse(response, "疗休养人员名单汇总表.xlsx");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setTitle(hdname);
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list);
|
||||
workbook.write(response.getOutputStream());
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("zgfw.lxy.hdtj")
|
||||
public Object openSendMessage(String hdid,
|
||||
@Param("sendTypes") String[] sendTypes,
|
||||
@Param("content") String content) {
|
||||
List<Lxy_bm> grxxes = lxyGrxxService.dao().query(Lxy_bm.class, Cnd.where("hdid", "=", hdid).and("bmzt", "=", 5));
|
||||
List<String> loginnames = grxxes.stream().map(Lxy_bm::getLoginname).collect(Collectors.toList());
|
||||
loginnames.forEach(loginname -> {
|
||||
/* msgApi.sendMsg(content, "", "", "", "4", new ArrayList<>() {{
|
||||
add(NutMap.NEW().addv("userId", loginname));
|
||||
}});*/
|
||||
});
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,15 +1,15 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.lxy.model.Lxy_bm;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_bm;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -78,7 +78,7 @@ public class LxyMetjController {
|
||||
|
||||
cnd.and("mefp.hdid", "=", hdid);
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06"})) {
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "SchoolUnionAdmin"})) {
|
||||
cnd.and(new Static("mefp.ghid in " + vi.getMangeUnionStr()));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,336 @@
|
||||
package io.v.nutz.lxy.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.lxy.model.Lxy_grxx;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.web.commons.utils.FileUtil;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Chain;
|
||||
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.impl.PropertiesProxy;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.random.R;
|
||||
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 org.nutz.trans.Trans;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: 1V
|
||||
* @DateTime: 2020/8/28 9:21
|
||||
* @Description: 校工会审核
|
||||
*/
|
||||
@At("/platform/zgfw/lxy/xghsh")
|
||||
@Ok("json")
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
public class LxyXghshController {
|
||||
|
||||
@Inject
|
||||
private LxyHdService lxyHdService;
|
||||
|
||||
@Inject
|
||||
private LxyBmService lxyBmService;
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
protected PropertiesProxy conf;
|
||||
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/lxy/HdXghsh.html")
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public Object pageData(@Param(value = "hdid", required = false) String hdid,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
mefp.*,
|
||||
un.unionname,
|
||||
un.unioncode,
|
||||
hd.*,
|
||||
(mefp.number - ( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt NOT IN (2,4)) ) remain,
|
||||
(SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt = 3) dsh,
|
||||
(SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt = 5) ysh,
|
||||
(SELECT GROUP_CONCAT(u.username) FROM lxy_bm bm LEFT JOIN `user` u on u.id=bm.userid WHERE bm.hdid=@hdid AND bm.ghid=mefp.ghid AND bm.bmzt != 4) username ,
|
||||
(SELECT GROUP_CONCAT(DISTINCT concat(u.username,'(',u.mobile,')') ) FROM `user` u LEFT JOIN sys_user_role ur ON u.id = ur.userId WHERE u.unionid = mefp.ghid AND ur.roleId = @roleId ) fglyname
|
||||
FROM
|
||||
lxy_mefp mefp
|
||||
LEFT JOIN sys_union un ON mefp.ghid = un.id
|
||||
LEFT JOIN lxy_bm bm ON bm.ghid = mefp.ghid
|
||||
LEFT JOIN sys_user u ON u.id = bm.userid AND bm.bmzt IN (3,5)
|
||||
LEFT JOIN lxy_hd hd ON mefp.hdid = hd.id
|
||||
$condition
|
||||
""").setParam("hdid", hdid).setParam("roleId", Roles.UNION_MANGER);
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.andEX("mefp.ghid", "=", unionId);
|
||||
cnd.and(new Static("now()<hd.bmjzsj"));
|
||||
cnd.and("mefp.number", ">", 0);
|
||||
cnd.and("mefp.hdid", "=", hdid);
|
||||
cnd.and(new Static("(select count(1) from lxy_bm lb where lb.hdid = '" + hdid + "' and lb.ghid = mefp.ghid AND lb.bmzt is NOT null) > 0 "));
|
||||
|
||||
if (isAudit == 2) {
|
||||
cnd.and(new Static("(SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt = 3 )=0"));
|
||||
} else if (isAudit == 3) {
|
||||
cnd.and(new Static("(SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt = 3 )>0"));
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "SchoolUnionAdmin"})) {
|
||||
cnd.and(new Static("mefp.ghid in " + vi.getMangeUnionStr()));
|
||||
}
|
||||
if (year != null) {
|
||||
cnd.and("YEAR(hdkssj)", "=", year);
|
||||
}
|
||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderName)) {
|
||||
cnd.orderBy(pageOrderName, PageUtil.getOrder(pageOrderBy));
|
||||
} else {
|
||||
cnd.desc("hdcjsj");
|
||||
cnd.desc("username");
|
||||
}
|
||||
cnd.groupBy(" mefp.ghid ");
|
||||
|
||||
sql.setCondition(cnd);
|
||||
|
||||
return lxyHdService.listPage(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询通过审核及待校工会审核的人员
|
||||
*
|
||||
* @param ghId
|
||||
* @param hdId
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public Object findBm(String ghId, String hdId, Integer pageNumber, Integer pageSize) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
l.id,
|
||||
hd.id hdid,
|
||||
u.id uid,
|
||||
u.loginname,
|
||||
u.username,
|
||||
u.sex,
|
||||
bm.age,
|
||||
bm.mobile,
|
||||
bm.idcard,
|
||||
bm.unitname,
|
||||
bm.bmzt,
|
||||
bm.zyhj,
|
||||
bm.bz,
|
||||
bm.ghid
|
||||
FROM
|
||||
lxy_bm bm
|
||||
LEFT JOIN lxy_hd hd ON hd.id = bm.hdid
|
||||
LEFT JOIN sys_user u ON u.id = bm.userid
|
||||
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
||||
LEFT JOIN Lxy_grxx l ON l.loginname = u.loginname
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("bm.bmzt", "NOT IN", List.of(2, 4, 6));
|
||||
cnd.and("bm.hdid", "=", hdId);
|
||||
cnd.and("bm.ghid", "=", ghId);
|
||||
cnd.groupBy("u.loginname");
|
||||
cnd.desc("bm.bmzt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = lxyBmService.listPage(pageNumber, pageSize, sql);
|
||||
return Result.success().addData(pagination);
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public Object sh(String hdid, String ghid, Integer bmzt, String[] users) {
|
||||
for (String user : users) {
|
||||
lxyBmService.update(Chain.make("bmzt", bmzt), Cnd.where("ghid", "=", ghid).and("hdid", "=", hdid).and("userid", "=", user));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public Object grsh(String hdid, String ghid, Integer bmzt, String userid) {
|
||||
lxyBmService.update(Chain.make("bmzt", bmzt), Cnd.where("ghid", "=", ghid).and("hdid", "=", hdid).and("userid", "=", userid));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public Object yjSh(NutMap[] maps) {
|
||||
for (NutMap map : maps) {
|
||||
lxyBmService.update(Chain.make("bmzt", 5), Cnd.where("ghid", "=", map.get("ghid")).and("hdid", "=", map.get("hdid")).and("bmzt", "=", 3));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public Object doDelete(String id, String unionid, String userid, String hdid) {
|
||||
Trans.exec(() -> {
|
||||
lxyBmService.clear(Cnd.where("userid", "=", userid).and("hdid", "=", hdid).and("ghid", "=", unionid));
|
||||
baseService.dao().delete(Lxy_grxx.class, id);
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public void downLoadAll(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "hdid", required = false) String hdid,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit, HttpServletResponse response) throws IOException {
|
||||
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
b.*,
|
||||
u.username,
|
||||
u.unionId,
|
||||
u.unionname
|
||||
FROM
|
||||
lxy_bm b
|
||||
LEFT JOIN `user` u ON b.userid = u.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("hdid", "=", hdid);
|
||||
cnd.andEX("year(bmsj)", "=", year);
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
if (isAudit != null) {
|
||||
if (isAudit == 2) {
|
||||
cnd.and("bmzt", ">", 3);
|
||||
} else if (isAudit == 3) {
|
||||
cnd.and("bmzt", "=", 3);
|
||||
}
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
|
||||
try {
|
||||
|
||||
response.reset();
|
||||
response.setContentType("application/x-msdownload;charset=utf-8");
|
||||
|
||||
/**
|
||||
* 创建临时文件夹
|
||||
*/
|
||||
String tmpPath = "tmp/" + R.UU32();
|
||||
File tmpDir = new File(tmpPath + "/报名人员材料");
|
||||
tmpDir.mkdirs();
|
||||
|
||||
Map<String, List<NutMap>> unionNameMap = list.stream()
|
||||
.collect(Collectors.groupingBy(l -> l.getString("unionname")));
|
||||
|
||||
|
||||
unionNameMap.forEach((k, v) -> {
|
||||
File unionTmpDir = new File(tmpDir + "/" + k);
|
||||
unionTmpDir.mkdirs();
|
||||
List<NutMap> unionNameList = list.stream().filter(li -> li.getString("unionname").equals(k)).collect(Collectors.toList());
|
||||
|
||||
unionNameList.forEach(item -> {
|
||||
|
||||
File tDir = new File(unionTmpDir + "/" + item.getString("username"));
|
||||
tDir.mkdirs();
|
||||
|
||||
if (StrUtil.isNotBlank(item.getString("files"))) {
|
||||
List<Sys_file> fileList = Json.fromJsonAsList(Sys_file.class, item.getString("files"));
|
||||
fileList.forEach(file -> {
|
||||
try {
|
||||
FileOutputStream outputStream = new FileOutputStream(tDir.getPath() + "/" + file.getFilename());
|
||||
ftpService.download(file.getFilepath(), outputStream);
|
||||
outputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
String aimsDir = "zipTmp/" + R.UU32();
|
||||
String aimsName = "报名人员材料.zip";
|
||||
String aimsPath = aimsDir + "/" + aimsName;
|
||||
FileUtil.compressToZip(tmpDir.getPath(), aimsDir, aimsName);
|
||||
|
||||
response.setHeader("content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode(aimsName, "UTF-8"));
|
||||
|
||||
File aimsFile = new File(aimsPath);
|
||||
FileInputStream inputStream = new FileInputStream(aimsFile);
|
||||
org.apache.commons.io.IOUtils.copy(inputStream, response.getOutputStream());
|
||||
inputStream.close();
|
||||
aimsFile.delete();
|
||||
|
||||
FileUtil.deleteDir(new File(tmpPath));
|
||||
FileUtil.deleteDir(new File(aimsDir));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package io.v.nutz.lxy.model;
|
||||
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: 1V
|
||||
* @DateTime: 2020/8/27 9:11
|
||||
* @Description: 疗休养报名
|
||||
*/
|
||||
@Data
|
||||
@Table("Lxy_bm")
|
||||
public class Lxy_bm {
|
||||
|
||||
@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 hdid;
|
||||
|
||||
@Column
|
||||
@Comment("用户id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userid;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String loginname;
|
||||
|
||||
@Column
|
||||
@Comment("工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String ghid;
|
||||
|
||||
@Column
|
||||
@Comment("报名时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String bmsj;
|
||||
|
||||
@Column
|
||||
@Comment("报名状态(1.待分工会审核 2.分工会审核不通过 3.待校工会审核 4 校工会审核不通过 5 报名成功 6 待填写个人资料)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer bmzt;
|
||||
|
||||
@Column
|
||||
@Comment("报名类型(1.分工会统一报名 2.个人报名)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer bmlx;
|
||||
|
||||
@Column
|
||||
@Comment("单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unitname;
|
||||
@Column
|
||||
@Comment("单位id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitid;
|
||||
|
||||
@Column
|
||||
@Comment("年龄")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private String age;
|
||||
|
||||
@Column
|
||||
@Comment("工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unionname;
|
||||
|
||||
@Column
|
||||
@Comment("手机号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 11)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("身份证号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String idcard;
|
||||
|
||||
@Column
|
||||
@Comment("主要获奖")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 1000)
|
||||
private String zyhj;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 1000)
|
||||
private String bz;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> files;
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.v.nutz.zgfw.model.lxy;
|
||||
package io.v.nutz.lxy.model;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.wizzer.framework.base.model.BaseModel;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package io.v.nutz.zgfw.model.lxy;
|
||||
package io.v.nutz.lxy.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
@@ -63,4 +63,4 @@ public class Lxy_hd {
|
||||
@Comment("活动内容")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String hdnr;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package io.v.nutz.zgfw.model.lxy;
|
||||
package io.v.nutz.lxy.model;
|
||||
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package io.v.nutz.zgfw.service;
|
||||
package io.v.nutz.lxy.service;
|
||||
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_bm;
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.lxy.model.Lxy_bm;
|
||||
|
||||
public interface LxyBmService extends BaseService<Lxy_bm> {
|
||||
}
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
package io.v.nutz.zgfw.service;
|
||||
|
||||
package io.v.nutz.lxy.service;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_grxx;
|
||||
import io.v.nutz.lxy.model.Lxy_grxx;
|
||||
|
||||
public interface LxyGrxxService extends BaseService<Lxy_grxx> {
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package io.v.nutz.zgfw.service;
|
||||
package io.v.nutz.lxy.service;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_hd;
|
||||
import io.v.nutz.lxy.model.Lxy_hd;
|
||||
|
||||
public interface LxyHdService extends BaseService<Lxy_hd> {
|
||||
}
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
package io.v.nutz.zgfw.service;
|
||||
package io.v.nutz.lxy.service;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_mefp;
|
||||
import io.v.nutz.lxy.model.Lxy_mefp;
|
||||
|
||||
|
||||
public interface LxyMefpService extends BaseService<Lxy_mefp> {
|
||||
}
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package io.v.nutz.zgfw.service.impl;
|
||||
package io.v.nutz.lxy.service.impl;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseServiceImpl;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_bm;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.lxy.model.Lxy_bm;
|
||||
import io.v.nutz.lxy.service.LxyBmService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package io.v.nutz.zgfw.service.impl;
|
||||
package io.v.nutz.lxy.service.impl;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseServiceImpl;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_grxx;
|
||||
import io.v.nutz.zgfw.service.LxyGrxxService;
|
||||
import io.v.nutz.lxy.model.Lxy_grxx;
|
||||
import io.v.nutz.lxy.service.LxyGrxxService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package io.v.nutz.zgfw.service.impl;
|
||||
package io.v.nutz.lxy.service.impl;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseServiceImpl;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_hd;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import io.v.nutz.lxy.model.Lxy_hd;
|
||||
import io.v.nutz.lxy.service.LxyHdService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package io.v.nutz.zgfw.service.impl;
|
||||
package io.v.nutz.lxy.service.impl;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseServiceImpl;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_mefp;
|
||||
import io.v.nutz.zgfw.service.LxyMefpService;
|
||||
import io.v.nutz.lxy.model.Lxy_mefp;
|
||||
import io.v.nutz.lxy.service.LxyMefpService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@@ -1,390 +0,0 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_bm;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_grxx;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.zgfw.service.LxyGrxxService;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
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.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.trans.Trans;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: 1V
|
||||
* @DateTime: 2020/8/28 9:21
|
||||
* @Description: 院级工会统一报名
|
||||
*/
|
||||
@At("/platform/zgfw/lxy/ghbm")
|
||||
@Ok("json")
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
public class LxyGhbmController {
|
||||
|
||||
@Inject
|
||||
private LxyHdService lxyHdService;
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private LxyBmService lxyBmService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
@Inject
|
||||
private LxyGrxxService lxyGrxxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/lxy/HdGhbm.html")
|
||||
@RequiresPermissions("zgfw.lxy.ghbm")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(Integer year, String hdid, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tmefp.*,\n" +
|
||||
"\t(\n" +
|
||||
"\tmefp.number - ( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt not in (2,4)) \n" +
|
||||
"\t) remain,\n" +
|
||||
"\t(\n" +
|
||||
"\t( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt =5 ) \n" +
|
||||
"\t) passnum,\n" +
|
||||
"\t(\n" +
|
||||
"\t( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt = 3 ) \n" +
|
||||
"\t) reviewnum,\n" +
|
||||
"\tun.unionname,\n" +
|
||||
"\tun.unioncode,\n" +
|
||||
"\thd.* \n" +
|
||||
"FROM\n" +
|
||||
"\tlxy_mefp mefp\n" +
|
||||
"\tLEFT JOIN sys_union un ON mefp.ghid = un.id\n" +
|
||||
"\tLEFT JOIN lxy_hd hd ON mefp.hdid = hd.id $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and(new Static("now() < hd.bmjzsj"));
|
||||
|
||||
cnd.and("mefp.hdid", "=", hdid);
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06"})) {
|
||||
cnd.and(new Static("mefp.ghid in " + vi.getMangeUnionStr()));
|
||||
//工会管理员查看分配名额大于0的
|
||||
cnd.and("mefp.number", ">", 0);
|
||||
}
|
||||
|
||||
if (year != null) {
|
||||
cnd.and("YEAR(hdcjsj)", "=", year);
|
||||
}
|
||||
|
||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderName)) {
|
||||
cnd.orderBy(pageOrderName, PageUtil.getOrder(pageOrderBy));
|
||||
} else {
|
||||
cnd.desc("hdcjsj");
|
||||
}
|
||||
|
||||
|
||||
sql.setCondition(cnd);
|
||||
|
||||
return lxyHdService.listPage(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getNotApply(String unionid, String hdid, String query, String[] checks) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
u.sex,
|
||||
u.mobile,
|
||||
TIMESTAMPDIFF(
|
||||
YEAR,
|
||||
u.birthday,
|
||||
CURDATE()) age,
|
||||
u.username,
|
||||
u.loginname,
|
||||
unit.`name` unitname,
|
||||
un.unionname\s
|
||||
FROM
|
||||
sys_user u
|
||||
LEFT JOIN lxy_bm bm ON bm.userid = u.id\s
|
||||
AND bm.hdid = @hdid
|
||||
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
||||
LEFT JOIN ry_rygl_gr ry ON ry.userid = u.id
|
||||
LEFT JOIN sys_union un ON unit.unionid = un.id $condition
|
||||
""").setParam("hdid", hdid).setParam("unionid", unionid);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("member", "=", 1);
|
||||
cnd.and("unit.unionid", "=", unionid);
|
||||
cnd.and(new Static("u.id NOT IN ( SELECT bm.userid FROM lxy_bm bm WHERE bm.hdid = '" + hdid + "' ) "));
|
||||
if (checks != null && checks.length > 0) {
|
||||
for (String check : checks) {
|
||||
if (check.equals("honer")) {
|
||||
cnd.and(new Static("ry.zyxjsj is not null"));
|
||||
}
|
||||
|
||||
if (check.equals("five")) {
|
||||
cnd.and(new Static(" u.id not in (SELECT bm.userid from lxy_bm bm WHERE YEAR (NOW())- 5 < YEAR ( bm.bmsj ) )"));
|
||||
}
|
||||
}
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return lxyBmService.list(sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getHasApply(String unionid, String hdid, String query, String[] checks) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
u.loginname,
|
||||
u.username,
|
||||
u.unitname,
|
||||
bm.bmzt,
|
||||
TIMESTAMPDIFF(
|
||||
YEAR,
|
||||
u.birthday,
|
||||
CURDATE()) age
|
||||
FROM
|
||||
lxy_bm bm
|
||||
LEFT JOIN `user` u ON u.id = bm.userid
|
||||
where bm.hdid = @hdid and u.unionid = @unionid ORDER BY bm.bmzt ASC
|
||||
""").setParam("hdid", hdid).setParam("unionid", unionid);
|
||||
return Result.success().addData(lxyBmService.list(sql));
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getUser(Integer sign, String unionid, String hdid, String query, String[] checks, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tu.id,\n" +
|
||||
"\tu.sex,u.mobile, TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) age,\n" +
|
||||
"\tu.username,\n" +
|
||||
"\tu.loginname,\n" +
|
||||
"\tunit.`name` unitname,\n" +
|
||||
"\tun.unionname \n" +
|
||||
"FROM\n" +
|
||||
"\tsys_user u\n" +
|
||||
"\tLEFT JOIN lxy_bm bm ON bm.userid = u.id AND bm.hdid = '" + hdid + "'\n" +
|
||||
"\tLEFT JOIN sys_unit unit ON u.unitid = unit.id\n" +
|
||||
"\tLEFT JOIN ry_rygl_gr ry ON ry.userid = u.id\n" +
|
||||
"\tLEFT JOIN sys_union un ON unit.unionid = un.id $condition");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and("unit.unionid", "=", unionid);
|
||||
|
||||
if (sign == 0) {
|
||||
cnd.and(new Static("u.id not in (SELECT bm.userid from lxy_bm bm WHERE bm.hdid = '" + hdid + "')"));
|
||||
}
|
||||
|
||||
if (checks.length > 0) {
|
||||
for (String check : checks) {
|
||||
if (check.equals("honer")) {
|
||||
cnd.and(new Static("ry.zyxjsj is not null"));
|
||||
}
|
||||
|
||||
if (check.equals("five")) {
|
||||
cnd.and(new Static(" u.id not in (SELECT bm.userid from lxy_bm bm WHERE YEAR (NOW())- 5 < YEAR ( bm.bmsj ) )"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Strings.isNotBlank(query)) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("u.username", query).orLike("u.loginname", query);
|
||||
cnd.and(group);
|
||||
}
|
||||
|
||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderName)) {
|
||||
cnd.orderBy(pageOrderName, PageUtil.getOrder(pageOrderBy));
|
||||
}
|
||||
|
||||
cnd.desc("bm.bmzt");
|
||||
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = lxyHdService.listPage(pageNumber, pageSize, sql);
|
||||
return pagination;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getNumberData(String unionid, String hdid) {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tun.unionname,\n" +
|
||||
"\tmefp.number sum,\n" +
|
||||
"\t( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt = 5) ybm,\n" +
|
||||
"\t( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt in (1,3)) dsh ,\n" +
|
||||
"\t( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt in (2,4)) btg ,\n" +
|
||||
"\t(mefp.number - (SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid and bm.bmzt not in (2,4))) kxz\n" +
|
||||
"FROM\n" +
|
||||
"\tlxy_mefp mefp\n" +
|
||||
"\tLEFT JOIN sys_union un ON mefp.ghid = un.id WHERE mefp.hdid=@hdid and mefp.ghid=@unionid").setParam("hdid", hdid).setParam("unionid", unionid);
|
||||
Record record = lxyHdService.list(sql).get(0);
|
||||
record.set("multiple", lxyBmService.list(Sqls.create("SELECT bm.userid id from lxy_bm bm WHERE bm.hdid = '" + hdid + "' AND bm.ghid = '" + unionid + "'")));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object bm(String hdid, String unionid, @Param("users[]") String[] users, boolean flag) {
|
||||
List<Lxy_bm> lxyBms = lxyBmService.query(Cnd.where("ghid", "=", unionid).and("hdid", "=", hdid));
|
||||
|
||||
Trans.exec(() -> {
|
||||
|
||||
lxyBmService.clear(Cnd
|
||||
.where("bmzt", "is", null)
|
||||
.and("ghid", "=", unionid)
|
||||
.and("hdid", "=", hdid));
|
||||
for (String user : users) {
|
||||
Lxy_bm bm = new Lxy_bm();
|
||||
bm.setBmzt(flag ? 3 : null);
|
||||
bm.setBmlx(1);
|
||||
bm.setBmsj(DateUtil.getDate());
|
||||
bm.setUserid(user);
|
||||
bm.setHdid(hdid);
|
||||
bm.setGhid(unionid);
|
||||
lxyBmService.insert(bm);
|
||||
}
|
||||
|
||||
|
||||
if (Lang.isNotEmpty(users)) {
|
||||
for (String user : users) {
|
||||
if (flag) {
|
||||
Sql sql = Sqls.create("SELECT u.loginname,u.username,u.mobile,TIMESTAMPDIFF(YEAR,u.birthday,CURDATE()) age,u.sex,u.position,u.personType,u.nation,u.idcard FROM sys_user u WHERE u.id = '" + user + "'");
|
||||
List<Record> records = sysUserService.list(sql);
|
||||
records.forEach(item -> {
|
||||
Lxy_grxx lxy_grxx = new Lxy_grxx();
|
||||
lxy_grxx.setLoginname(item.getString("loginname"));
|
||||
lxy_grxx.setUsername(item.getString("username"));
|
||||
lxy_grxx.setMobile(item.getString("mobile"));
|
||||
lxy_grxx.setAge(item.getString("age"));
|
||||
lxy_grxx.setSex(item.getString("sex"));
|
||||
lxy_grxx.setZw(item.getString("position"));
|
||||
lxy_grxx.setRsbz(item.getString("personType"));
|
||||
lxy_grxx.setMz(item.getString("nation"));
|
||||
lxy_grxx.setIdcard(item.getString("idcard"));
|
||||
lxy_grxx.setChry(new ArrayList());
|
||||
lxy_grxx.setUserid(user);
|
||||
lxy_grxx.setHdid(hdid);
|
||||
lxy_grxx.setGhid(unionid);
|
||||
|
||||
lxyGrxxService.insert(lxy_grxx);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doEdit(String hdid, String unionid, String[] users) {
|
||||
for (String userid : users) {
|
||||
if (userid == null) {
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
lxyBmService.clear(Cnd.where("hdid", "=", hdid).and("ghid", "=", unionid).and("bmlx", "=", 1));
|
||||
lxyGrxxService.clear(Cnd.where("hdid", "=", hdid).and("ghid", "=", unionid));
|
||||
for (String userid : users) {
|
||||
Lxy_bm bm = new Lxy_bm();
|
||||
bm.setBmzt(3);
|
||||
bm.setBmlx(1);
|
||||
bm.setBmsj(DateUtil.getDate());
|
||||
bm.setUserid(userid);
|
||||
bm.setHdid(hdid);
|
||||
bm.setGhid(unionid);
|
||||
lxyBmService.insert(bm);
|
||||
|
||||
Sql sql = Sqls.create("SELECT u.loginname,u.username,u.mobile,TIMESTAMPDIFF(YEAR,u.birthday,CURDATE()) age,u.sex,u.position,u.preparedBy,u.nation,u.idcard FROM sys_user u WHERE u.id = '" + userid + "'");
|
||||
List<Record> records = sysUserService.list(sql);
|
||||
records.forEach(item -> {
|
||||
Lxy_grxx lxy_grxx = new Lxy_grxx();
|
||||
lxy_grxx.setLoginname(item.getString("loginname"));
|
||||
lxy_grxx.setUsername(item.getString("username"));
|
||||
lxy_grxx.setMobile(item.getString("mobile"));
|
||||
lxy_grxx.setAge(item.getString("age"));
|
||||
lxy_grxx.setSex(item.getString("sex"));
|
||||
lxy_grxx.setZw(item.getString("position"));
|
||||
lxy_grxx.setRsbz(item.getString("preparedBy"));
|
||||
lxy_grxx.setMz(item.getString("nation"));
|
||||
lxy_grxx.setIdcard(item.getString("idcard"));
|
||||
lxy_grxx.setChry(new ArrayList());
|
||||
lxy_grxx.setUserid(userid);
|
||||
lxy_grxx.setHdid(hdid);
|
||||
lxy_grxx.setGhid(unionid);
|
||||
|
||||
lxyGrxxService.insert(lxy_grxx);
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
public Object findBm(String ghId, String hdId) {
|
||||
try {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"unit.`name` unitname,\n" +
|
||||
"l.id,\n" +
|
||||
"hd.id hdid,\n" +
|
||||
"u.id uid,\n" +
|
||||
"u.loginname,\n" +
|
||||
"u.username,\n" +
|
||||
"u.sex,\n" +
|
||||
"u.mobile,\n" +
|
||||
"TIMESTAMPDIFF(YEAR,u.birthday,CURDATE()) age,\n" +
|
||||
"bm.bmzt,\n" +
|
||||
"bm.ghid\n" +
|
||||
"FROM lxy_bm bm\n" +
|
||||
"LEFT JOIN lxy_hd hd ON hd.id = bm.hdid\n" +
|
||||
"LEFT JOIN sys_user u ON u.id = bm.userid\n" +
|
||||
"LEFT JOIN sys_unit unit ON u.unitid = unit.id\n" +
|
||||
"LEFT JOIN Lxy_grxx l ON l.loginname = u.loginname \n" +
|
||||
"WHERE bm.bmzt NOT IN (2,4,6) AND bm.hdid = @hdid \n" +
|
||||
"AND bm.ghid = @ghid \n" +
|
||||
"GROUP BY u.loginname\n" +
|
||||
"ORDER BY bm.bmzt DESC");
|
||||
sql.setParam("hdid", hdId);
|
||||
sql.setParam("ghid", ghId);
|
||||
List<Record> list = lxyBmService.list(sql);
|
||||
return Result.success().addData(list);
|
||||
} catch (Exception e) {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,137 +0,0 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zgfw.service.LxyGrxxService;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
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.json.Json;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author: Aaron
|
||||
* @create: 2020-09-25 14:55
|
||||
* @description: 疗休养活动统计
|
||||
**/
|
||||
@At("/platform/zgfw/lxy/hdtj")
|
||||
@Ok("json")
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
public class LxyHdTjController {
|
||||
|
||||
@Inject
|
||||
private LxyHdService lxyHdService;
|
||||
|
||||
@Inject
|
||||
private LxyGrxxService lxyGrxxService;
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/lxy/HdTj.html")
|
||||
@RequiresPermissions("zgfw.lxy.hdtj")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(String hdid, String ghid, String searchKey, int pageNumber, int pageSize) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("SELECT gr.* ,u.unionname,u.unioncode,u.unitname unitname,u.unitcode FROM `lxy_grxx` gr \n" +
|
||||
"LEFT JOIN lxy_bm bm ON bm.userid = gr.userid \n" +
|
||||
"LEFT JOIN `user` u ON u.id=bm.userid $condition");
|
||||
|
||||
cnd.and(new Static("bm.bmzt = 5"));
|
||||
cnd.and("gr.hdid", "=", hdid);
|
||||
|
||||
if (Strings.isNotBlank(ghid)) {
|
||||
cnd.and("gr.ghid", "=", ghid);
|
||||
}
|
||||
if (Strings.isNotBlank(searchKey)) {
|
||||
cnd.where().andLike("loginname", searchKey).orLike("username", searchKey);
|
||||
}
|
||||
cnd.groupBy("bm.userid");
|
||||
cnd.asc("u.unioncode");
|
||||
sql.setCondition(cnd);
|
||||
return lxyGrxxService.listPage(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getLxyHd(String year) {
|
||||
return lxyHdService.list(Sqls.create("SELECT id,`name` FROM `lxy_hd` WHERE YEAR(hdcjsj) = @year ORDER BY hdcjsj DESC ").setParam("year", year));
|
||||
}
|
||||
|
||||
@At
|
||||
public void doExport(String hdid, String hdname, String ghid, HttpServletResponse response) throws IOException {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("SELECT gr.* ,u.unionname,u.unioncode,u.unitname unitname,u.unitcode FROM `lxy_grxx` gr \n" +
|
||||
"LEFT JOIN lxy_bm bm ON bm.userid = gr.userid \n" +
|
||||
"LEFT JOIN `user` u ON u.id=bm.userid $condition");
|
||||
|
||||
cnd.and(new Static("bm.bmzt = 5"));
|
||||
cnd.and("gr.hdid", "=", hdid);
|
||||
|
||||
if (Strings.isNotBlank(ghid)) {
|
||||
cnd.and("gr.ghid", "=", ghid);
|
||||
}
|
||||
cnd.groupBy("bm.userid");
|
||||
cnd.asc("u.unionname").asc("u.unitcode").asc("gr.age");
|
||||
sql.setCondition(cnd);
|
||||
List<Record> list = lxyGrxxService.list(sql);
|
||||
int i = 1;
|
||||
for (Record r : list) {
|
||||
r.set("index", i);
|
||||
List<NutMap> chry = Json.fromJsonAsList(NutMap.class, r.getString("chry"));
|
||||
for (NutMap map : chry) {
|
||||
r.set("rych", (r.getString("rych") == null ? "" : r.getString("rych")) + " " + map.getString("shry"));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
// HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
// Configure config = Configure.newBuilder().bind("list", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("hdmc", hdname);
|
||||
map.put("mapList", list);
|
||||
String fileName = "疗休养人员名单汇总表.xls";
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes("utf-8"), "ISO8859-1"));
|
||||
TemplateExportParams params = new TemplateExportParams(
|
||||
"templates/lxy/lxyrymd.xls");
|
||||
// Workbook workbook = ExcelExportUtil.exportExcel(params, map);
|
||||
// workbook.write(response.getOutputStream());
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(params, map);
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
// String fileName = "疗休养人员名单汇总表";
|
||||
// response.addHeader("Content-Type", "application/octet-stream");
|
||||
// response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx;filename*=UTF-8''" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1"));
|
||||
// InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/lxyrymd.docx");
|
||||
// XWPFTemplate.compile(inputStream, config).render(map, response.getOutputStream());
|
||||
// inputStream.close();
|
||||
}
|
||||
}
|
||||
@@ -1,197 +0,0 @@
|
||||
package io.v.nutz.zgfw.controller.lxy;
|
||||
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zgfw.model.lxy.Lxy_grxx;
|
||||
import io.v.nutz.zgfw.service.LxyBmService;
|
||||
import io.v.nutz.zgfw.service.LxyHdService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
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.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.trans.Trans;
|
||||
|
||||
/**
|
||||
* @Author: 1V
|
||||
* @DateTime: 2020/8/28 9:21
|
||||
* @Description: 校工会审核
|
||||
*/
|
||||
@At("/platform/zgfw/lxy/xghsh")
|
||||
@Ok("json")
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
public class LxyXghshController {
|
||||
|
||||
@Inject
|
||||
private LxyHdService lxyHdService;
|
||||
|
||||
@Inject
|
||||
private LxyBmService lxyBmService;
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/lxy/HdXghsh.html")
|
||||
@RequiresPermissions("zgfw.lxy.xghsh")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(String hdid, Integer year, Integer isAudit, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
mefp.*,
|
||||
un.unionname,
|
||||
un.unioncode,
|
||||
hd.*,
|
||||
(mefp.number - ( SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt NOT IN (2,4)) ) remain,
|
||||
(SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt = 3) dsh,
|
||||
(SELECT GROUP_CONCAT(u.username) FROM lxy_bm bm LEFT JOIN `user` u on u.id=bm.userid WHERE bm.hdid=@hdid AND bm.ghid=mefp.ghid AND bm.bmzt = 5) username ,
|
||||
(SELECT GROUP_CONCAT(DISTINCT concat(u.username,'(',u.mobile,')') ) FROM `user` u LEFT JOIN sys_user_role ur ON u.id = ur.userId WHERE u.unionid = mefp.ghid AND ur.roleId = @roleId ) fglyname
|
||||
FROM
|
||||
lxy_mefp mefp
|
||||
LEFT JOIN sys_union un ON mefp.ghid = un.id
|
||||
LEFT JOIN lxy_bm bm ON bm.ghid = mefp.ghid
|
||||
LEFT JOIN sys_user u ON u.id = bm.userid AND bm.bmzt IN (3,5)
|
||||
LEFT JOIN lxy_hd hd ON mefp.hdid = hd.id
|
||||
$condition
|
||||
""").setParam("hdid", hdid).setParam("roleId", Roles.UNION_MANGER);
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and(new Static("now()<hd.bmjzsj"));
|
||||
cnd.and("mefp.number", ">", 0);
|
||||
cnd.and("mefp.hdid", "=", hdid);
|
||||
cnd.and(new Static("(select count(1) from lxy_bm lb where lb.hdid = '" + hdid + "' and lb.ghid = mefp.ghid AND lb.bmzt is NOT null) > 0 "));
|
||||
|
||||
if (isAudit == 2) {
|
||||
cnd.and(new Static("(SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt = 3 )=0"));
|
||||
} else if (isAudit == 3) {
|
||||
cnd.and(new Static("(SELECT count( 1 ) FROM lxy_bm bm WHERE bm.hdid = mefp.hdid AND bm.ghid = mefp.ghid AND bm.bmzt = 3 )>0"));
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06"})) {
|
||||
cnd.and(new Static("mefp.ghid in " + vi.getMangeUnionStr()));
|
||||
}
|
||||
if (year != null) {
|
||||
cnd.and("YEAR(hdkssj)", "=", year);
|
||||
}
|
||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderName)) {
|
||||
cnd.orderBy(pageOrderName, PageUtil.getOrder(pageOrderBy));
|
||||
} else {
|
||||
cnd.desc("hdcjsj");
|
||||
cnd.desc("username");
|
||||
}
|
||||
cnd.groupBy(" mefp.ghid ");
|
||||
|
||||
sql.setCondition(cnd);
|
||||
|
||||
return lxyHdService.listPage(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询通过审核及待校工会审核的人员
|
||||
*
|
||||
* @param ghId
|
||||
* @param hdId
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
public Object findBm(String ghId, String hdId, Integer pageNumber, Integer pageSize) {
|
||||
try {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"l.id,\n" +
|
||||
"hd.id hdid,\n" +
|
||||
"u.id uid,\n" +
|
||||
"u.loginname,\n" +
|
||||
"u.username,\n" +
|
||||
"u.unitname,\n" +
|
||||
"u.unionname,\n" +
|
||||
"u.sex,\n" +
|
||||
"u.mobile,\n" +
|
||||
"TIMESTAMPDIFF(YEAR,u.birthday,CURDATE()) age,\n" +
|
||||
"bm.bmzt,\n" +
|
||||
"bm.ghid\n" +
|
||||
"FROM lxy_bm bm\n" +
|
||||
"LEFT JOIN lxy_hd hd ON hd.id = bm.hdid\n" +
|
||||
"LEFT JOIN Lxy_grxx l ON l.userid = bm.userid\n" +
|
||||
"LEFT JOIN `user` u ON u.id = bm.userid \n" +
|
||||
"WHERE bm.bmzt IN (3,4,5) AND bm.hdid = @hdid \n" +
|
||||
"AND bm.ghid = @ghid \n" +
|
||||
"GROUP BY u.username \n" +
|
||||
"ORDER BY bm.bmzt ASC");
|
||||
sql.setParam("hdid", hdId);
|
||||
sql.setParam("ghid", ghId);
|
||||
// List<Record> list = lxyBmService.list(sql);
|
||||
Pagination pagination = lxyBmService.listPage(pageNumber, pageSize, sql);
|
||||
return Result.success().addData(pagination);
|
||||
} catch (Exception e) {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object sh(String hdid, String ghid, Integer bmzt, String[] users) {
|
||||
for (String user : users) {
|
||||
lxyBmService.update(Chain.make("bmzt", bmzt), Cnd.where("ghid", "=", ghid).and("hdid", "=", hdid).and("userid", "=", user));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object grsh(String hdid, String ghid, Integer bmzt, String userid) {
|
||||
lxyBmService.update(Chain.make("bmzt", bmzt), Cnd.where("ghid", "=", ghid).and("hdid", "=", hdid).and("userid", "=", userid));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object yjSh(NutMap[] maps) {
|
||||
for (NutMap map : maps) {
|
||||
lxyBmService.update(Chain.make("bmzt", 5), Cnd.where("ghid", "=", map.get("ghid")).and("hdid", "=", map.get("hdid")).and("bmzt", "=", 3));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doDelete(String id, String unionid, String userid, String hdid) {
|
||||
Trans.exec(() -> {
|
||||
lxyBmService.clear(Cnd.where("userid", "=", userid).and("hdid", "=", hdid).and("ghid", "=", unionid));
|
||||
baseService.dao().delete(Lxy_grxx.class, id);
|
||||
});
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
package io.v.nutz.zgfw.model.lxy;
|
||||
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author: 1V
|
||||
* @DateTime: 2020/8/27 9:11
|
||||
* @Description: 疗休养报名
|
||||
*/
|
||||
@Table("Lxy_bm")
|
||||
public class Lxy_bm {
|
||||
@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 hdid;
|
||||
|
||||
@Column
|
||||
@Comment("用户id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userid;
|
||||
|
||||
@Column
|
||||
@Comment("工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String ghid;
|
||||
|
||||
@Column
|
||||
@Comment("报名时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String bmsj;
|
||||
|
||||
@Column
|
||||
@Comment("报名状态(1.待分工会审核 2.分工会审核不通过 3.待校工会审核 4 校工会审核不通过 5 报名成功 6 待填写个人资料)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer bmzt;
|
||||
|
||||
@Column
|
||||
@Comment("报名类型(1.分工会统一报名 2.个人报名)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer bmlx;
|
||||
|
||||
public Integer getBmlx() {
|
||||
return bmlx;
|
||||
}
|
||||
|
||||
public void setBmlx(Integer bmlx) {
|
||||
this.bmlx = bmlx;
|
||||
}
|
||||
|
||||
public String getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(String userid) {
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getHdid() {
|
||||
return hdid;
|
||||
}
|
||||
|
||||
public void setHdid(String hdid) {
|
||||
this.hdid = hdid;
|
||||
}
|
||||
|
||||
public String getGhid() {
|
||||
return ghid;
|
||||
}
|
||||
|
||||
public void setGhid(String ghid) {
|
||||
this.ghid = ghid;
|
||||
}
|
||||
|
||||
public String getBmsj() {
|
||||
return bmsj;
|
||||
}
|
||||
|
||||
public void setBmsj(String bmsj) {
|
||||
this.bmsj = bmsj;
|
||||
}
|
||||
|
||||
public Integer getBmzt() {
|
||||
return bmzt;
|
||||
}
|
||||
|
||||
public void setBmzt(Integer bmzt) {
|
||||
this.bmzt = bmzt;
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="报名状态" prop="bmzt" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==6">待填写报名资料</span>
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==1">待院级工会审核</span>
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==1">待分工会审核</span>
|
||||
<span style="color: #F56C6C" v-if="scope.row.bmzt==2">分工会审核未通过</span>
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==3">待校工会审核</span>
|
||||
<span style="color: #F56C6C" v-if="scope.row.bmzt==4">校工会审核未通过</span>
|
||||
@@ -354,4 +354,4 @@ display: -webkit-box;
|
||||
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -42,111 +42,122 @@ layout("/layouts/platform.html"){
|
||||
<guava>
|
||||
<el-row class="transition-row">
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='index'" class="transition-item">
|
||||
<div class="transition-item" v-show="v=='index'">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年度">
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select class="d-select" v-model="pageForm.pastQuota" filterable clearable
|
||||
width="300px"
|
||||
placeholder="请选择活动">
|
||||
<el-select class="d-select" clearable filterable
|
||||
placeholder="请选择活动"
|
||||
v-model="pageForm.pastQuota"
|
||||
width="300px">
|
||||
<el-option
|
||||
v-for="item in lxyHd"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
:value="item.id"
|
||||
v-for="item in lxyHd">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select class="d-select" v-model="pageForm.hdcd" filterable clearable
|
||||
width="300px"
|
||||
placeholder="请选择场地">
|
||||
<el-select class="d-select" clearable filterable placeholder="请选择场地"
|
||||
v-model="pageForm.hdcd"
|
||||
width="300px">
|
||||
<el-option
|
||||
v-for="item in lxyHdCd"
|
||||
:key="item.id"
|
||||
:label="item.hdcd"
|
||||
:value="item.id">
|
||||
:value="item.id"
|
||||
v-for="item in lxyHdCd">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search"
|
||||
type="primary"></el-button>
|
||||
</div>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button icon="el-icon-plus" @click="openAdd">创建活动</el-button>
|
||||
<el-button @click="openAdd" icon="el-icon-plus">创建活动</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
width="100px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="name" header-align="center" width="300px"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="name"
|
||||
width="300px">
|
||||
<template scope="scope">
|
||||
<el-link type="primary" @click="lxy_app.openView(scope.row.id)">
|
||||
<el-link @click="lxy_app.openView(scope.row.id)" type="primary">
|
||||
{{scope.row.name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动场地" prop="hdcd" header-align="center" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="活动场地"
|
||||
prop="hdcd"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column label="活动时间" prop="hdkssj" header-align="center" sortable
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动时间"
|
||||
prop="hdkssj"
|
||||
sortable>
|
||||
<template scope="scope">
|
||||
{{scope.row.hdkssj}} 至 {{scope.row.hdjssj}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="报名时间" prop="bmsj" header-align="center" sortable
|
||||
align="center" width="330px">
|
||||
<el-table-column align="center" header-align="center" label="报名时间"
|
||||
prop="bmsj"
|
||||
sortable width="330px">
|
||||
|
||||
<template scope="scope">
|
||||
{{scope.row.bmkssj}} 至 {{scope.row.bmjzsj}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="状态" prop="name" header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="状态"
|
||||
prop="name">
|
||||
<template scope="scope">
|
||||
<span :class="lxy_app.getStatus(scope.row).class">{{lxy_app.getStatus(scope.row).name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
<el-table-column align="center" fixed="right" header-align="center"
|
||||
label="操作"
|
||||
width="250px">
|
||||
<template scope="scope">
|
||||
<!-- <el-button size="mini" @click="openView(scope.row.id)">查看</el-button>-->
|
||||
<el-button size="mini" type="primary" @click="openEdit(scope.row.id)" plain>编辑
|
||||
<el-button @click="openEdit(scope.row.id)" plain
|
||||
size="mini" type="primary">编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" @click="doDelete(scope.row.id)" plain>删除
|
||||
<el-button @click="doDelete(scope.row.id)" plain
|
||||
size="mini" type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -155,44 +166,51 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!-- 新增 -->
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='add'" class="transition-item">
|
||||
<div class="transition-item" v-show="v=='add'">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'" style="font-size: 18px">返回
|
||||
<div class="clearfix" slot="header">
|
||||
<el-button @click="v='index'" icon="el-icon-back"
|
||||
style="font-size: 18px"
|
||||
type="text">返回
|
||||
</el-button>
|
||||
</div>
|
||||
<el-row style="padding: 0 10%;" v-loading="loading">
|
||||
|
||||
<el-steps :active="stepActive" simple finish-status="success">
|
||||
<el-step title="活动信息" description="">
|
||||
<el-steps :active="stepActive" finish-status="success" simple>
|
||||
<el-step description="" title="活动信息">
|
||||
|
||||
</el-step>
|
||||
<el-step title="名额分配" description="">
|
||||
<el-step description="" title="名额分配">
|
||||
|
||||
</el-step>
|
||||
</el-steps>
|
||||
|
||||
|
||||
<transition name="el-zoom-in-top">
|
||||
<div v-show="stepActive==0" class="transition-box" style="margin-top: 20px;">
|
||||
<el-form :model="formData" ref="form" :rules="formRules"
|
||||
label-width="120px">
|
||||
<el-form-item label="填写活动信息 " label-width="135px" class="view-header">
|
||||
<div class="transition-box" style="margin-top: 20px;"
|
||||
v-show="stepActive==0">
|
||||
<el-form :model="formData" :rules="formRules"
|
||||
label-width="120px"
|
||||
ref="form">
|
||||
<el-form-item class="view-header" label="填写活动信息 "
|
||||
label-width="135px">
|
||||
</el-form-item>
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input type="text" v-model="formData.name" maxlength="100"
|
||||
placeholder="请填写活动名称"></el-input>
|
||||
<el-input maxlength="100" placeholder="请填写活动名称"
|
||||
type="text"
|
||||
v-model="formData.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名时间" label-width="120px" prop="bmsj">
|
||||
<el-form-item label="报名时间" label-width="120px"
|
||||
prop="bmsj">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.bmsj"
|
||||
type="datetimerange"
|
||||
align="right"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.bmsj"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@@ -200,12 +218,12 @@ layout("/layouts/platform.html"){
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动时间" prop="hdsj">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.hdsj"
|
||||
type="daterange"
|
||||
align="right"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.hdsj"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@@ -213,13 +231,15 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="活动场地" prop="hdcd">
|
||||
<el-input type="text" v-model="formData.hdcd" maxlength="100"
|
||||
placeholder="请填写活动场地"></el-input>
|
||||
<el-input maxlength="100" placeholder="请填写活动场地"
|
||||
type="text"
|
||||
v-model="formData.hdcd"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报名条件" prop="hdzysx">
|
||||
<el-input type="textarea" rows="4" v-model="formData.hdzysx" maxlength="500"
|
||||
placeholder="请填写报名条件"></el-input>
|
||||
<el-input maxlength="500" placeholder="请填写报名条件"
|
||||
rows="4" type="textarea"
|
||||
v-model="formData.hdzysx"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<div class="hdnr">
|
||||
@@ -229,67 +249,76 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
|
||||
<el-form-item prop="accessory" label="附件上传">
|
||||
<el-form-item label="附件上传" prop="accessory">
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
action="**"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChange"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList"
|
||||
:on-change="handleChange"
|
||||
:on-remove="handleRemove"
|
||||
action="**"
|
||||
limit="5"
|
||||
:file-list="fileList">
|
||||
<el-button size="small" type="primary">选择文件</el-button>
|
||||
name="file"
|
||||
ref="upload">
|
||||
<el-button size="small" type="primary">选择文件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="next">下一步</el-button>
|
||||
<el-button @click="next" type="primary">下一步</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<div v-show="stepActive==1" class="transition-box" style="margin-top: 20px;">
|
||||
<div class="transition-box" style="margin-top: 20px;"
|
||||
v-show="stepActive==1">
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<span style="color:#409EFF">沿用之前活动名额 </span>
|
||||
<el-select class="d-select" v-model="pastQuota" filterable clearable
|
||||
width="300px"
|
||||
placeholder="请选择活动" @change="mefpChange">
|
||||
<el-select @change="mefpChange" class="d-select" clearable
|
||||
filterable
|
||||
placeholder="请选择活动"
|
||||
v-model="pastQuota" width="300px">
|
||||
<el-option
|
||||
v-for="item in lxyHd"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
:value="item.id"
|
||||
v-for="item in lxyHd">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-table :data="unions_" size="medium" height="70vh">
|
||||
<el-table-column align="center" type="index" header-align="center"
|
||||
label="序号"></el-table-column>
|
||||
<el-table :data="unions_" height="70vh" size="medium">
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="序号"
|
||||
type="index"></el-table-column>
|
||||
|
||||
<el-table-column label="院级工会" prop="unionname" sortable>
|
||||
<el-table-column label="分工会" prop="unionname" sortable>
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unioncode+')':null}}{{row.unionname}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="会员人数" prop="membercount" sortable></el-table-column>
|
||||
<el-table-column label="会员人数" prop="membercount"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column label="名额" prop="number" header-align="center" width="200px"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="名额" prop="number"
|
||||
width="200px">
|
||||
<template scope="scope">
|
||||
<el-input-number v-model="scope.row.number" placeholder="请填写名额数"
|
||||
controls-position="right" :min="0"
|
||||
:max="1000"></el-input-number>
|
||||
<el-input-number :max="1000"
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
placeholder="请填写名额数"
|
||||
v-model="scope.row.number"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="stepActive=0">上一步</el-button>
|
||||
<el-button type="primary" :disabled="subDis" @click="doAdd()">提
|
||||
<el-button :disabled="subDis" @click="doAdd()"
|
||||
type="primary">提
|
||||
交
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -302,33 +331,38 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!-- 编辑 -->
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-show="v=='edit'" class="transition-item">
|
||||
<div class="transition-item" v-show="v=='edit'">
|
||||
<el-card class="box-card v-box" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" type="text" @click="v='index'" style="font-size: 18px">返回
|
||||
<div class="clearfix" slot="header">
|
||||
<el-button @click="v='index'" icon="el-icon-back"
|
||||
style="font-size: 18px"
|
||||
type="text">返回
|
||||
</el-button>
|
||||
</div>
|
||||
<el-row style="padding: 0 10%;" v-loading="loading">
|
||||
|
||||
<el-tabs v-model="tabs_active" stretch>
|
||||
<el-tabs stretch v-model="tabs_active">
|
||||
<el-tab-pane label="活动信息" name="1">
|
||||
<el-form :model="formData" ref="form" :rules="formRules"
|
||||
label-width="120px">
|
||||
<el-form :model="formData" :rules="formRules"
|
||||
label-width="120px"
|
||||
ref="form">
|
||||
<vi-title title="修改活动信息"></vi-title>
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input type="text" v-model="formData.name" maxlength="100"
|
||||
placeholder="请填写活动名称"></el-input>
|
||||
<el-input maxlength="100" placeholder="请填写活动名称"
|
||||
type="text"
|
||||
v-model="formData.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名时间" label-width="120px" prop="bmsj">
|
||||
<el-form-item label="报名时间" label-width="120px"
|
||||
prop="bmsj">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.bmsj"
|
||||
type="datetimerange"
|
||||
align="right"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.bmsj"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@@ -336,12 +370,12 @@ layout("/layouts/platform.html"){
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动时间" prop="hdsj">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.hdsj"
|
||||
type="daterange"
|
||||
align="right"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.hdsj"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@@ -349,36 +383,41 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="活动场地" prop="hdcd">
|
||||
<el-input type="text" v-model="formData.hdcd" maxlength="100"
|
||||
placeholder="请填写活动场地"></el-input>
|
||||
<el-input maxlength="100" placeholder="请填写活动场地"
|
||||
type="text"
|
||||
v-model="formData.hdcd"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报名条件" prop="hdzysx">
|
||||
<el-input type="textarea" rows="4" v-model="formData.hdzysx" maxlength="500"
|
||||
placeholder="请填写报名条件"></el-input>
|
||||
<el-input maxlength="500" placeholder="请填写报名条件"
|
||||
rows="4" type="textarea"
|
||||
v-model="formData.hdzysx"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="活动内容" prop="hdnr">
|
||||
<div v-if="v=='edit'" id="lrEditor"></div>
|
||||
<div id="lrEditor" v-if="v=='edit'"></div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="accessory" label="附件上传">
|
||||
<el-form-item label="附件上传" prop="accessory">
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
action="**"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChange"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList"
|
||||
:on-change="handleChange"
|
||||
:on-remove="handleRemove"
|
||||
action="**"
|
||||
limit="5"
|
||||
:file-list="fileList">
|
||||
<el-button size="small" type="primary">选择文件</el-button>
|
||||
name="file"
|
||||
ref="upload">
|
||||
<el-button size="small" type="primary">选择文件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" :disabled="subDis" @click="doEdit()">修 改</el-button>
|
||||
<el-button :disabled="subDis" @click="doEdit()"
|
||||
type="primary">修 改
|
||||
</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="名额分配" name="2">
|
||||
@@ -386,43 +425,51 @@ layout("/layouts/platform.html"){
|
||||
<vi-title title="修改名额分配"></vi-title>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<span style="color:#409EFF">沿用之前活动名额 </span>
|
||||
<el-select class="d-select" v-model="pastQuota" filterable clearable
|
||||
width="300px"
|
||||
placeholder="请选择活动" @change="mefpChange">
|
||||
<el-select @change="mefpChange" class="d-select"
|
||||
clearable filterable
|
||||
placeholder="请选择活动"
|
||||
v-model="pastQuota" width="300px">
|
||||
<el-option
|
||||
v-for="item in lxyHd"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
:value="item.id"
|
||||
v-for="item in lxyHd">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-table :data="unions_" size="medium" height="70vh">
|
||||
<el-table-column align="center" type="index" header-align="center"
|
||||
label="序号"></el-table-column>
|
||||
<el-table :data="unions_" height="70vh" size="medium">
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="序号"
|
||||
type="index"></el-table-column>
|
||||
|
||||
<el-table-column label="院级工会" prop="unionname" sortable>
|
||||
<el-table-column label="分工会" prop="unionname" sortable>
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unioncode+')':null}}{{row.unionname}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="会员人数" prop="membercount" sortable></el-table-column>
|
||||
<el-table-column label="会员人数" prop="membercount"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column label="名额" prop="number" header-align="center" width="200px"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="名额" prop="number"
|
||||
width="200px">
|
||||
<template scope="scope">
|
||||
<el-input-number v-model="scope.row.number" placeholder="请填写名额数"
|
||||
controls-position="right" :min="0"
|
||||
:max="1000"></el-input-number>
|
||||
<el-input-number :max="1000"
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
placeholder="请填写名额数"
|
||||
v-model="scope.row.number"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
|
||||
<el-button type="primary" :disabled="subDis" @click="doEditMefp">提 交</el-button>
|
||||
<el-button :disabled="subDis" @click="doEditMefp"
|
||||
type="primary">提 交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -671,11 +718,20 @@ layout("/layouts/platform.html"){
|
||||
if (data.code == 0) {
|
||||
data.data.hdsj = [data.data.hdkssj, data.data.hdjssj]
|
||||
data.data.bmsj = [data.data.bmkssj, data.data.bmjzsj]
|
||||
data.data.mefp.map(m => {
|
||||
const union = this.unions.find(un => un.id === m.ghid)
|
||||
m.membercount = union.membercount
|
||||
})
|
||||
this.unions_ = data.data.mefp
|
||||
this.formData = data.data
|
||||
//files
|
||||
data.data.files.forEach(v => {
|
||||
this.fileList.push({id: v.id, name: v.filename, url: v.filepath, status: 'success'})
|
||||
this.fileList.push({
|
||||
id: v.id,
|
||||
name: v.filename,
|
||||
url: v.filepath,
|
||||
status: 'success'
|
||||
})
|
||||
})
|
||||
|
||||
this.$nextTick(() => {
|
||||
@@ -865,4 +921,4 @@ layout("/layouts/platform.html"){
|
||||
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="院级工会" prop="unionname" header-align="center"
|
||||
<el-table-column label="分工会" prop="unionname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column label="总名额" prop="number" header-align="center"
|
||||
@@ -660,4 +660,4 @@ layout("/layouts/platform.html"){
|
||||
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -12,6 +12,10 @@ layout("/layouts/platform.html"){
|
||||
bottom: -100px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.viewFile {
|
||||
height: 150px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
@@ -60,7 +64,10 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button @click="doExport" icon="el-icon-download" plain type="primary">导 出</el-button>
|
||||
<el-button :disabled="!pageForm.hdid" @click="$refs.customMessage.open()"
|
||||
type="primary">一键发送
|
||||
</el-button>
|
||||
<el-button @click="doExport" icon="el-icon-download" type="primary">导 出</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -87,11 +94,10 @@ layout("/layouts/platform.html"){
|
||||
prop="unionname" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="单位"
|
||||
prop="unitname" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="职务"
|
||||
prop="zw" sortable></el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="120px">
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template scope="scope">
|
||||
<el-button @click="openView(scope.row)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
@@ -130,11 +136,6 @@ layout("/layouts/platform.html"){
|
||||
{{viewData.username}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务:">
|
||||
{{viewData.zw}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人事编制:">
|
||||
{{viewData.rsbz}}
|
||||
@@ -160,46 +161,22 @@ layout("/layouts/platform.html"){
|
||||
{{viewData.mobile}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证号:">
|
||||
{{viewData.idcard}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="获奖名称:">
|
||||
{{viewData.zyhj}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:">
|
||||
{{viewData.bz}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<vi-title title="曾获荣誉"></vi-title>
|
||||
<el-table :data="viewData.chry" show-header="false" size="mini" style="width: 100%">
|
||||
<el-table-column align="center" header-align="center" label="获得时间" prop="hdsj"
|
||||
width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-date-picker format="yyyy-MM-dd" readonly type="date"
|
||||
v-model="row.hdsj"></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="曾获荣誉" prop="shry">
|
||||
<template slot-scope="{row}">
|
||||
<el-input readonly v-model="row.shry"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="附件" width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<div @click="dd3s.download(row.filepath,row.filename)"
|
||||
class="file-down-span">
|
||||
<i class="el-icon-download"></i>
|
||||
</div>
|
||||
<el-image :src="'${AppFileDomain!}'+row.filepath" @click="dd3s.showpic(row.filepath)"
|
||||
fit="cover"
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
v-if="dd3s.isPic(row.filepath)">
|
||||
</el-image>
|
||||
<el-image src="***"
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
v-else>
|
||||
<div class="image-slot" slot="error"
|
||||
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
|
||||
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
|
||||
text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical">{{row.filename}}</span>
|
||||
</div>
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template v-if="viewData.files&&viewData.files.length">
|
||||
<vi-title title="身份证复印件"></vi-title>
|
||||
<div style="text-align: left;">
|
||||
@@ -209,7 +186,8 @@ layout("/layouts/platform.html"){
|
||||
class="file-down-span">
|
||||
<i class="el-icon-download"></i>
|
||||
</div>
|
||||
<el-image :src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)"
|
||||
<el-image :src="'${AppFileDomain!}'+item.filepath"
|
||||
@click="dd3s.showpic(item.filepath)"
|
||||
fit="cover"
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
v-if="dd3s.isPic(item.filepath)">
|
||||
@@ -230,10 +208,17 @@ display: -webkit-box;
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<vi-title title="个人材料"></vi-title>
|
||||
<file-upload :files="viewData.bmFiles"
|
||||
:view="true"
|
||||
v-if="viewData.bmFiles && viewData.bmFiles.length > 0"></file-upload>
|
||||
<span v-else>暂无个人材料</span>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<custom-message @confirm="confirmMsg" ref="customMessage"></custom-message>
|
||||
|
||||
</guava>
|
||||
|
||||
|
||||
@@ -275,6 +260,26 @@ display: -webkit-box;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async confirmMsg(val) {
|
||||
const confirm = await this.$confirm('确定要给报名人员发送消息吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = await $.get(base + "/platform/zgfw/lxy/hdtj/openSendMessage", {hdid: this.pageForm.hdid, ...val})
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.$refs.customMessage.close()
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
doExport() {
|
||||
let obj = this.lxyHd.find(o => {
|
||||
return o.id === this.pageForm.hdid
|
||||
@@ -327,7 +332,6 @@ display: -webkit-box;
|
||||
return data
|
||||
},
|
||||
async openView(row) {
|
||||
this.v = "view"
|
||||
this.$refs.guava.view()
|
||||
this.viewData = await this.getLxyBmInfo(row.id)
|
||||
this.viewData.unitname = row.unitname
|
||||
@@ -358,4 +362,4 @@ display: -webkit-box;
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -2,35 +2,8 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.w-e-text-container {
|
||||
height: 250px !important;
|
||||
}
|
||||
|
||||
.v-box .el-card__header {
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.el-select-dropdown {
|
||||
z-index: 99999999 !important;
|
||||
}
|
||||
|
||||
.el-loading-mask {
|
||||
z-index: 99999999 !important;
|
||||
}
|
||||
|
||||
.el-picker-panel {
|
||||
z-index: 99999999 !important;
|
||||
}
|
||||
|
||||
.demo-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
width: 600px;
|
||||
text-align: center;
|
||||
.viewFile {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -41,13 +14,13 @@ layout("/layouts/platform.html"){
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
v-model="ghPageForm.year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select @change="pageData" clearable filterable placeholder="请选择活动"
|
||||
v-model="ghPageForm.hdid">
|
||||
v-model="pageForm.hdid">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
@@ -57,25 +30,36 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入工会名称"
|
||||
v-model="ghPageForm.searchKeyword"></el-input>
|
||||
<el-select clearable="true" filterable="true" placeholder="所属工会"
|
||||
style="width: 100%;" v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button @click="doSearchGh" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-radio-group @change="doSearchGh" v-model="ghPageForm.isAudit">
|
||||
<el-radio-group @change="doSearchGh" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="1">全部</el-radio-button>
|
||||
<el-radio-button :label="2">已审核</el-radio-button>
|
||||
<el-radio-button :label="3">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-button @click="yjTg" type="primary">一键通过</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="ghTableData" @selection-change="handleSelectionChangeGh" @sort-change="pageOrder"
|
||||
<vi-title2 title="审核列表">
|
||||
<template #func>
|
||||
<el-button @click="yjTg" size="small" type="primary">一键通过</el-button>
|
||||
|
||||
<el-button @click="downLoadAll" size="small" type="primary">
|
||||
一键下载材料
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="ghTableData" @selection-change="handleSelectionChangeGh"
|
||||
@sort-change="pageOrder"
|
||||
ref="multipleTableGh" row-key="ghid"
|
||||
style="width: 100%" v-loading="tabLoading">
|
||||
|
||||
@@ -93,13 +77,14 @@ layout("/layouts/platform.html"){
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="院级工会"
|
||||
<el-table-column align="center" header-align="center" label="分工会"
|
||||
prop="unionname"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动场地" prop="hdcd"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="联系人及联系方式" prop="fglyname"
|
||||
<el-table-column align="center" header-align="center" label="联系人及联系方式"
|
||||
prop="fglyname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
|
||||
|
||||
@@ -124,6 +109,9 @@ layout("/layouts/platform.html"){
|
||||
<span style="color: tomato">{{scope.row.number}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="已报名成功人数"
|
||||
prop="ysh">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="审核状态" prop="dsh"
|
||||
show-overflow-tooltip>
|
||||
@@ -136,72 +124,92 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column align="center" header-align="center" label="报名人员" prop="username"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="120px">
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template scope="scope">
|
||||
<el-button @click="openSh(scope.row)" plain size="mini" type="primary">查看人员</el-button>
|
||||
<el-button @click="openSh(scope.row)" size="mini" type="primary">
|
||||
查看人员
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-size="pageForm.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button @click="sh(5)" size="small" type="primary">批量审核</el-button>
|
||||
</template>
|
||||
<template #edit>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="sh(5)" plain type="primary">批量审核</el-button>
|
||||
<!--<el-button type="danger" @click="sh(4)" plain>不通过</el-button>-->
|
||||
</el-row>
|
||||
<el-table :data="bmTableData" @selection-change="handleSelectionChange"
|
||||
ref="multipleTableRy"
|
||||
row-key="id"
|
||||
style="width: 100%" tooltip-effect="dark">
|
||||
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="bmTableData" @selection-change="handleSelectionChange" ref="multipleTableRy"
|
||||
row-key="id"
|
||||
style="width: 100%" tooltip-effect="dark">
|
||||
<el-table-column :reserve-selection="true" :selectable='checkboxT' disabled
|
||||
type="selection"
|
||||
width="55"></el-table-column>
|
||||
|
||||
<el-table-column :reserve-selection="true" :selectable='checkboxT' disabled type="selection"
|
||||
width="55"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="loginname"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="姓名"
|
||||
prop="username"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="性别" prop="sex"
|
||||
sortable width="80"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="年龄" prop="age"
|
||||
sortable width="80"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="手机号码"
|
||||
prop="mobile"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="身份证号"
|
||||
prop="idcard"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="获奖名称"
|
||||
prop="zyhj"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="备注"
|
||||
prop="bz"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="报名状态" prop="bmzt">
|
||||
<template scope="scope">
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==1">待分工会审核</span>
|
||||
<span style="color: #F56C6C" v-if="scope.row.bmzt==2">分工会审核未通过</span>
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==3">待校工会审核</span>
|
||||
<span style="color: #F56C6C" v-if="scope.row.bmzt==4">校工会审核未通过</span>
|
||||
<span style="color: #67C23A" v-if="scope.row.bmzt==5">报名成功</span>
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==6">待填写个人资料</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="loginname"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="姓名"
|
||||
prop="username"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="性别" prop="sex"
|
||||
sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="年龄" prop="age"
|
||||
sortable></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="联系电话"
|
||||
prop="mobile"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="报名状态" prop="bmzt">
|
||||
<template scope="scope">
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==1">待分工会审核</span>
|
||||
<span style="color: #F56C6C" v-if="scope.row.bmzt==2">分工会审核未通过</span>
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==3">待校工会审核</span>
|
||||
<span style="color: #F56C6C" v-if="scope.row.bmzt==4">校工会审核未通过</span>
|
||||
<span style="color: #67C23A" v-if="scope.row.bmzt==5">报名成功</span>
|
||||
<span style="color: #E6A23C" v-if="scope.row.bmzt==6">待填写个人资料</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="150px">
|
||||
<template scope="{row}">
|
||||
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'Review',data:row}" :disabled="row.bmzt==5">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'Review',data:row}"
|
||||
:disabled="row.bmzt==5">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@@ -216,9 +224,12 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="viewDialogSh" custom-class="ViewDialogClass"
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="viewDialogSh"
|
||||
custom-class="ViewDialogClass"
|
||||
top="3%" width="60%">
|
||||
<el-form label-position="right" label-width="120px" style="padding: 20px 0">
|
||||
<vi-title title="个人信息"></vi-title>
|
||||
@@ -263,55 +274,34 @@ layout("/layouts/platform.html"){
|
||||
{{ viewData.mobile }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身份证号:">
|
||||
{{ viewData.idcard }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="获奖名称:">
|
||||
{{ viewData.zyhj }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:">
|
||||
{{ viewData.bz }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<vi-title title="曾获荣誉"></vi-title>
|
||||
<el-table :data="viewData.chry" show-header="false" size="mini" style="width: 100%">
|
||||
<el-table-column align="center" header-align="center" label="获得时间" prop="hdsj"
|
||||
width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-date-picker format="yyyy-MM-dd" readonly type="date"
|
||||
v-model="row.hdsj"></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="曾获荣誉" prop="shry">
|
||||
<template slot-scope="{row}">
|
||||
<el-input readonly v-model="row.shry"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="附件" width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<div @click="dd3s.download(row.ryfj,row.ryfj)" class="file-down-span">
|
||||
<i class="el-icon-download"></i>
|
||||
</div>
|
||||
<el-image :src="'${AppFileDomain!}'+row.ryfj" @click="dd3s.showpic(row.ryfj)"
|
||||
fit="cover"
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
v-if="dd3s.isPic(row.ryfj)">
|
||||
</el-image>
|
||||
<el-image src="***"
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
v-else>
|
||||
<div class="image-slot" slot="error"
|
||||
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
|
||||
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
|
||||
text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical">{{row.ryfj}}</span>
|
||||
</div>
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template v-if="viewData.files&&viewData.files.length">
|
||||
<vi-title title="身份证复印件"></vi-title>
|
||||
<div style="text-align: left;">
|
||||
<div style="display: inline-block;width: 100px;margin-right:10px"
|
||||
v-for="item in viewData.files">
|
||||
<div @click="dd3s.download(item.filepath,item.filename)" class="file-down-span">
|
||||
<div @click="dd3s.download(item.filepath,item.filename)"
|
||||
class="file-down-span">
|
||||
<i class="el-icon-download"></i>
|
||||
</div>
|
||||
<el-image :src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)"
|
||||
<el-image :src="'${AppFileDomain!}'+item.filepath"
|
||||
@click="dd3s.showpic(item.filepath)"
|
||||
fit="cover"
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
v-if="dd3s.isPic(item.filepath)">
|
||||
@@ -332,16 +322,26 @@ display: -webkit-box;
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<vi-title style="margin-top: 10px" title="个人材料"></vi-title>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-upload :files="viewData.bmFiles"
|
||||
:view="true"
|
||||
v-if="viewData.bmFiles && viewData.bmFiles.length > 0"></file-upload>
|
||||
<span v-else>暂无个人材料</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<span class="dialog-footer" slot="footer" v-if="this.viewData.num==2">
|
||||
<el-button type="danger" @click="grsh(4)" plain>不通过</el-button>
|
||||
<el-button type="success" @click="grsh(5)" plain>通 过</el-button>
|
||||
<el-button @click="grsh(4)" type="danger">不通过</el-button>
|
||||
<el-button @click="grsh(5)" type="primary">通 过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tabKey: new Date().getTime(),
|
||||
@@ -361,14 +361,16 @@ display: -webkit-box;
|
||||
bmTableData: [],
|
||||
ghTableData: [],
|
||||
pageForm: {
|
||||
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
pageOrderBy: "",
|
||||
isAudit: 1,
|
||||
year: new Date().getFullYear() + "",
|
||||
hdid: ""
|
||||
},
|
||||
ghPageForm: {
|
||||
isAudit: 1,
|
||||
@@ -385,6 +387,12 @@ display: -webkit-box;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
downLoadAll() {
|
||||
location.href = '/platform/zgfw/lxy/xghsh/downLoadAll?year=' + this.pageForm.year +
|
||||
'&hdid=' + this.pageForm.hdid + '&searchKeyword=' + this.pageForm.searchKeyword +
|
||||
'&isAudit=' + this.pageForm.isAudit
|
||||
},
|
||||
checkboxT(row) {
|
||||
if (row.bmzt == 5) {
|
||||
return false;
|
||||
@@ -405,22 +413,21 @@ display: -webkit-box;
|
||||
return data
|
||||
},
|
||||
async openView(row, num) {
|
||||
|
||||
this.viewData = await this.getLxyBmInfo(row.id)
|
||||
this.viewData.num = num
|
||||
this.pageForm.hdid = row.hdid
|
||||
this.pageForm.uid = row.uid
|
||||
this.ghPageForm.hdid = row.hdid
|
||||
this.ghPageForm.uid = row.uid
|
||||
this.viewData.unitname = row.unitname
|
||||
this.viewDialogSh = true
|
||||
},
|
||||
openShGh(row) {
|
||||
this.ghPageForm.hdid = row.id
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/pageData", this.ghPageForm, (data) => {
|
||||
this.pageForm.hdid = row.id
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.ghTableData = data.data.list;
|
||||
this.ghPageForm.totalCount = data.data.totalCount;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
@@ -431,14 +438,14 @@ display: -webkit-box;
|
||||
},
|
||||
|
||||
openSh(row) {
|
||||
this.pageForm.hdid = row.hdid
|
||||
this.pageForm.ghid = row.ghid
|
||||
this.ghPageForm.hdid = row.hdid
|
||||
this.ghPageForm.ghid = row.ghid
|
||||
this.$refs.guava.edit()
|
||||
this.showGh = false
|
||||
this.$nextTick(() => {
|
||||
this.toggleSelection()
|
||||
})
|
||||
this.refresh(this.pageForm.ghid, this.pageForm.hdid)
|
||||
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
|
||||
|
||||
},
|
||||
refresh(ghid, hdid) {
|
||||
@@ -460,13 +467,21 @@ display: -webkit-box;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
yjTg() {
|
||||
async yjTg() {
|
||||
if (this.multipleSelectionGh.length == 0) {
|
||||
this.$message({
|
||||
message: '请选择工会!',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('确定要给报名人员发送消息吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
|
||||
}
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
@@ -478,22 +493,22 @@ display: -webkit-box;
|
||||
this.multipleSelectionGh.map(v => {
|
||||
arr.push({ghid: v.ghid, hdid: v.hdid})
|
||||
})
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/yjSh", {maps: JSON.stringify(arr)}, (data) => {
|
||||
loading.close()
|
||||
if (data.code == 0) {
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.toggleSelectionGh()
|
||||
this.openShGh({id: this.ghPageForm.hdid});
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
const data = await $.post(base + "/platform/zgfw/lxy/xghsh/yjSh", {maps: JSON.stringify(arr)})
|
||||
|
||||
if (data.code == 0) {
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.toggleSelectionGh()
|
||||
this.openShGh({id: this.pageForm.hdid});
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
loading.close()
|
||||
},
|
||||
sh(zt) {
|
||||
if (this.multipleSelection.length == 0) {
|
||||
@@ -503,39 +518,41 @@ display: -webkit-box;
|
||||
});
|
||||
return
|
||||
}
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据提交中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
let arr = []
|
||||
this.multipleSelection.map(v => {
|
||||
arr.push(v.uid)
|
||||
})
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/sh", {
|
||||
hdid: this.pageForm.hdid,
|
||||
ghid: this.pageForm.ghid,
|
||||
bmzt: zt,
|
||||
users: JSON.stringify(arr)
|
||||
}, (data) => {
|
||||
loading.close()
|
||||
if (data.code == 0) {
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.viewDialogSh = false
|
||||
this.pageData()
|
||||
this.toggleSelection()
|
||||
this.refresh(this.pageForm.ghid, this.pageForm.hdid)
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
|
||||
this.$confirm('此操作将全部审核通过,确认通过吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/sh", {
|
||||
hdid: this.ghPageForm.hdid,
|
||||
ghid: this.ghPageForm.ghid,
|
||||
bmzt: zt,
|
||||
users: JSON.stringify(arr)
|
||||
}, (data) => {
|
||||
if (data.code == 0) {
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.viewDialogSh = false
|
||||
this.pageData()
|
||||
this.toggleSelection()
|
||||
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
grsh(zt) {
|
||||
const loading = this.$loading({
|
||||
@@ -545,8 +562,8 @@ display: -webkit-box;
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/grsh", {
|
||||
hdid: this.pageForm.hdid,
|
||||
ghid: this.pageForm.ghid,
|
||||
hdid: this.ghPageForm.hdid,
|
||||
ghid: this.ghPageForm.ghid,
|
||||
userid: this.viewData.userid,
|
||||
bmzt: zt,
|
||||
}, (data) => {
|
||||
@@ -559,7 +576,7 @@ display: -webkit-box;
|
||||
this.viewDialogSh = false
|
||||
this.pageData()
|
||||
this.toggleSelection()
|
||||
this.refresh(this.pageForm.ghid, this.pageForm.hdid)
|
||||
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
@@ -612,44 +629,31 @@ display: -webkit-box;
|
||||
},
|
||||
doSearchGh() {
|
||||
this.tabKey = new Date().getTime()
|
||||
this.ghPageForm.pageNumber = 1
|
||||
this.openShGh({id: this.ghPageForm.hdid});
|
||||
},
|
||||
pageOrder(column) {//按字段排序
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange(val) {//页码更新操作
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange(val) {//分页大小更新操作
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
this.pageForm.pageNumber = 1
|
||||
this.openShGh({id: this.pageForm.hdid});
|
||||
},
|
||||
ghPageOrder(column) {//按字段排序
|
||||
this.ghPageForm.pageOrderName = column.prop;
|
||||
this.ghPageForm.pageOrderBy = column.order;
|
||||
this.openShGh({id: this.ghPageForm.hdid});
|
||||
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
|
||||
},
|
||||
ghPageNumberChange(val) {//页码更新操作
|
||||
this.ghPageForm.pageNumber = val;
|
||||
this.openShGh({id: this.ghPageForm.hdid});
|
||||
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
|
||||
},
|
||||
ghPageSizeChange(val) {//分页大小更新操作
|
||||
this.ghPageForm.pageSize = val;
|
||||
this.openShGh({id: this.ghPageForm.hdid});
|
||||
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tabLoading = true
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/pageData", this.ghPageForm, (data) => {
|
||||
$.post(base + "/platform/zgfw/lxy/xghsh/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.ghTableData = data.data.list;
|
||||
this.ghPageForm.totalCount = data.data.totalCount;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
@@ -662,7 +666,7 @@ display: -webkit-box;
|
||||
async created() {
|
||||
this.unions = await getUnions()
|
||||
this.lxyHd = await getNowLxyHd()
|
||||
this.ghPageForm.hdid = this.lxyHd[0].id
|
||||
this.pageForm.hdid = this.lxyHd[0].id
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
@@ -670,4 +674,4 @@ display: -webkit-box;
|
||||
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
.el-tabs__item {
|
||||
color: rgb(120, 120, 120)
|
||||
}
|
||||
|
||||
.ViewDialogClass .el-tabs__content{
|
||||
height: calc(100vh - 350px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="v-app" v-cloak>
|
||||
<el-dialog
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<el-table :data="viewData.mefp" size="medium" height="70vh">
|
||||
<el-table :data="viewData.mefp" size="medium">
|
||||
<el-table-column align="center" type="index" header-align="center"
|
||||
label="序号"></el-table-column>
|
||||
|
||||
<el-table-column label="院级工会" prop="unionname" header-align="center"
|
||||
<el-table-column label="分工会" prop="unionname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column label="名额" prop="number" header-align="center" width="200px"
|
||||
|
||||
@@ -30,28 +30,29 @@
|
||||
<template v-if="viewData.files&&viewData.files.length">
|
||||
<vi-title title="附件"></vi-title>
|
||||
<div style="text-align: left;">
|
||||
<div v-for="item in viewData.files"
|
||||
style="display: inline-block;width: 100px;margin-right:10px">
|
||||
<div class="file-down-span" @click="dd3s.download(item.filepath,item.filename)">
|
||||
<i class="el-icon-download"></i>
|
||||
</div>
|
||||
<el-image fit="cover" v-if="dd3s.isPic(item.filepath)"
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
:src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)">
|
||||
</el-image>
|
||||
<el-image v-else
|
||||
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
||||
src="***">
|
||||
<div slot="error" class="image-slot"
|
||||
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
|
||||
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical">{{item.filename}}</span>
|
||||
</div>
|
||||
</el-image>
|
||||
</div>
|
||||
<file-upload :files="viewData.files" view></file-upload>
|
||||
<!-- <div v-for="item in viewData.files"-->
|
||||
<!-- style="display: inline-block;width: 100px;margin-right:10px">-->
|
||||
<!-- <div class="file-down-span" @click="dd3s.download(item.filepath,item.filename)">-->
|
||||
<!-- <i class="el-icon-download"></i>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-image fit="cover" v-if="dd3s.isPic(item.filepath)"-->
|
||||
<!-- style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"-->
|
||||
<!-- :src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)">-->
|
||||
<!-- </el-image>-->
|
||||
<!-- <el-image v-else-->
|
||||
<!-- style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"-->
|
||||
<!-- src="***">-->
|
||||
<!-- <div slot="error" class="image-slot"-->
|
||||
<!-- style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">-->
|
||||
<!-- <span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;-->
|
||||
<!--text-overflow: ellipsis;-->
|
||||
<!--display: -webkit-box;-->
|
||||
<!-- -webkit-line-clamp: 2;-->
|
||||
<!-- -webkit-box-orient: vertical">{{item.filename}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-image>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
</el-form>
|
||||
|
||||
Reference in New Issue
Block a user