From 64f25697896d0c88794305b57a3cd43b6fc29cb8 Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Wed, 31 Jul 2024 08:46:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 158 ++++++----- .../controller/activitybx/AccountingCon.java | 53 ++-- .../activitybx/ApplyController.java | 9 + .../activitybx/ReimbursementCon.java | 92 ++---- .../activitybx/ReimbursementViewCon.java | 140 ++++++++- .../java/io/v/nutz/jf/model/ActivityBx.java | 31 ++ .../v/nutz/jf/service/ActivityBxService.java | 5 +- .../service/impl/ActivityBxServiceImpl.java | 78 ++++- src/main/resources/docTemplate/funds2.docx | Bin 0 -> 13881 bytes .../components/activityBx/ActivityBxInfo.vue | 200 +++++++------ .../views/platform/jf/Funds/apply.html | 81 +++--- .../platform/jf/activitybx/accounting.html | 266 ++++++++++-------- .../platform/jf/activitybx/reimbursement.html | 94 +++++-- .../jf/activitybx/reimbursementview.html | 168 ++++++----- 14 files changed, 871 insertions(+), 504 deletions(-) create mode 100644 src/main/resources/docTemplate/funds2.docx diff --git a/pom.xml b/pom.xml index 60ccc40..2359588 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 1.6.2 3.8.1 4.0.0 - 1.11.2 + 1.12.1 2.5.1 4.1.2 4.0.11 @@ -45,13 +45,11 @@ asm-util 7.3.1 - asm asm-all 2.1 - org.openjdk.nashorn nashorn-core @@ -73,47 +71,47 @@ 0.3.17 - javax.mail - mail - 1.4.7 - - - org.apache.poi - poi - ${poi.version} - - - org.apache.poi - poi-ooxml - ${poi.version} - - - org.apache.poi - ooxml-schemas - 1.3 - - - xmlbeans - org.apache.xmlbeans - - + org.jetbrains.kotlin + kotlin-stdlib + 1.4.32 com.artofsolving jodconverter 2.2.2 - - - jurt - org.openoffice - - javax.annotation javax.annotation-api 1.3.2 + + org.codehaus.xfire + xfire-all + 1.2.6 + + + spring + org.springframework + + + xfire-spring + org.codehaus.xfire + + + xercesImpl + xerces + + + stax-api + stax + + + xfire-xmlbeans + org.codehaus.xfire + + + cn.hutool hutool-all @@ -170,13 +168,6 @@ thumbnailator 0.4.8 - - - - - - - io.v vi-nutz @@ -202,6 +193,18 @@ juh org.openoffice + + poi + org.apache.poi + + + poi-ooxml + org.apache.poi + + + poi-ooxml-schemas + org.apache.poi + ridl org.openoffice @@ -214,22 +217,6 @@ unoil org.openoffice - - xmlbeans - org.apache.xmlbeans - - - commons-io - commons-io - - - spring-aop - org.springframework - - - org.apache.poi - ooxml-schemas - @@ -251,11 +238,21 @@ com.squareup.okhttp3 okhttp 4.8.0 + + + kotlin-stdlib + org.jetbrains.kotlin + + + kotlin-stdlib-common + org.jetbrains.kotlin + + org.apache.httpcomponents httpclient - 4.5.13 + 4.3.5 commons-codec @@ -277,10 +274,6 @@ commons-logging commons-logging - - commons-beanutils - commons-beanutils - @@ -293,6 +286,10 @@ commons-logging commons-logging + + okhttp + com.squareup.okhttp + okio com.squareup.okio @@ -322,7 +319,7 @@ - + org.jsoup jsoup @@ -362,7 +359,32 @@ - + + org.apache.poi + poi + ${poi.version} + + + org.apache.poi + poi-ooxml + ${poi.version} + + + org.apache.poi + poi-ooxml-schemas + ${poi.version} + + + org.apache.poi + ooxml-schemas + 1.3 + + + xmlbeans + org.apache.xmlbeans + + + org.nutz nutzboot-starter-test-junit4 @@ -401,11 +423,11 @@ ${easy-captcha.version} - - commons-validator - commons-validator - 1.7 - + + + + + diff --git a/src/main/java/io/v/nutz/jf/controller/activitybx/AccountingCon.java b/src/main/java/io/v/nutz/jf/controller/activitybx/AccountingCon.java index 433fb66..c7b8158 100644 --- a/src/main/java/io/v/nutz/jf/controller/activitybx/AccountingCon.java +++ b/src/main/java/io/v/nutz/jf/controller/activitybx/AccountingCon.java @@ -3,6 +3,7 @@ package io.v.nutz.jf.controller.activitybx; import io.v.nutz.annontation.ViReturn; import io.v.nutz.base.utils.DateUtil; import io.v.nutz.base.utils.Vi; +import io.v.nutz.common.models.Goods; import io.v.nutz.jf.model.ActivityBx; import io.v.nutz.jf.service.ActivityBxService; import io.v.nutz.sys.models.Sys_signature; @@ -14,10 +15,14 @@ import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.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 java.util.List; + /** * @author zhf * @date 2020/11/14 14:55 @@ -49,29 +54,33 @@ public class AccountingCon { @At @ViReturn public Object pageData(Integer year, Integer isAudit, String unitId, String unionId, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) { - Sql sql = Sqls.create("\t\n" + - "SELECT\n" + - "\tact.*,\n" + - "\tu.loginname bxr_loginname,\n" + - "\tu.unionname bxr_unionname,\n" + - "\tu.unioncode,\n" + - "\ts.state_name,\n" + - "\ts.state_color \n" + - "FROM\n" + - "\t`activity_bx` act\n" + - "\tLEFT JOIN `user` u ON act.user_id = u.id\n" + - "\tLEFT JOIN state s ON act.state_id = s.state_id $condition"); + Sql sql = Sqls.create(""" + SELECT + bx.*, + bxr.loginname bxr_loginname, + bxr.unionname bxr_unionname, + bxr.unioncode, + state.state_name, + state.state_color, + abs.`name` absName + FROM + activity_bx bx + LEFT JOIN `user` bxr ON bx.user_id = bxr.id + LEFT JOIN state state ON state.state_id = bx.state_id + LEFT JOIN activity_basic_settings abs ON abs.`code` = bx.projectTypeCode + $condition + """); Cnd cnd = Cnd.NEW(); if (isAudit == 1) { - cnd.and("act.state_id", ">=", 1020); + cnd.and("bx.state_id", ">=", 1020); } else { - cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1020); + cnd.and("bx.state_id", isAudit == 2 ? ">" : "=", 1020); } - Vi.cndPlus(cnd, "act.year", "=", year); + Vi.cndPlus(cnd, "bx.year", "=", year); if (Vi.isNotBlank(searchName, searchKeyword)) { cnd.where().andLike(searchName, searchKeyword); } @@ -79,18 +88,20 @@ public class AccountingCon { if (Vi.isNotBlank(pageOrderName, pageOrderBy)) { cnd.orderBy(pageOrderName, pageOrderBy); } else { - cnd.asc("act.state_id").desc("act.apply_time"); + cnd.asc("bx.state_id").desc("bx.apply_time"); } Vi.cndPlus(cnd, "u.unitid", "=", unitId); Vi.cndPlus(cnd, "u.unionid", "=", unionId); sql.setCondition(cnd); - return activityBxService.listPage(pageNumber, pageSize, sql); + return activityBxService.listPageMap(pageNumber, pageSize, sql); } @At @ViReturn - public Object doReview(String id, String idea, String sign, Boolean flag) { + public Object doReview(String id, String idea, String sign, Boolean flag, String goods) { + List goodsList = Json.fromJsonAsList(Goods.class, goods); ActivityBx aid = activityBxService.fetch(id); + aid.setGoods(goodsList); aid.setState_id(flag ? "1030" : "1025"); aid.setAccounting_name(ShiroUtil.getPrincipalProperty("id").toString()); aid.setAccounting_time(DateUtil.getDate()); @@ -102,5 +113,11 @@ public class AccountingCon { return null; } + @At + @ViReturn + public Object getGoods(String id) { + return activityBxService.dao().query(Goods.class, Cnd.where("reid", "=", id)); + } + } diff --git a/src/main/java/io/v/nutz/jf/controller/activitybx/ApplyController.java b/src/main/java/io/v/nutz/jf/controller/activitybx/ApplyController.java index 0c66a6a..5e12fb9 100644 --- a/src/main/java/io/v/nutz/jf/controller/activitybx/ApplyController.java +++ b/src/main/java/io/v/nutz/jf/controller/activitybx/ApplyController.java @@ -65,4 +65,13 @@ public class ApplyController { return null; } + @At + @ViReturn + public Object doEdit(@Param("activityBx") ActivityBx activityBx) { + activityBx.setApply_time(DateUtil.getDate()); + activityBx.setState_id("1020"); + activityBxService.doEdit(activityBx); + return null; + } + } diff --git a/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementCon.java b/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementCon.java index 202f3df..1f6c6e7 100644 --- a/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementCon.java +++ b/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementCon.java @@ -1,25 +1,24 @@ package io.v.nutz.jf.controller.activitybx; -import cn.wizzer.framework.base.service.BaseService; import com.deepoove.poi.XWPFTemplate; import com.deepoove.poi.config.Configure; import com.deepoove.poi.data.PictureRenderData; import com.deepoove.poi.policy.HackLoopTableRenderPolicy; import io.v.nutz.annontation.ViReturn; -import io.v.nutz.base.utils.DateUtil; +import io.v.nutz.base.service.BaseService; import io.v.nutz.base.utils.Html2Text; -import io.v.nutz.base.utils.Roles; import io.v.nutz.base.utils.Vi; import io.v.nutz.jf.model.ActivityBx; import io.v.nutz.jf.model.ActivityFile; import io.v.nutz.jf.service.ActivityBxService; import io.v.nutz.jf.service.ActivityFileService; -import io.v.nutz.sys.models.Sys_signature; +import io.v.nutz.sys.models.Sys_file; import io.v.nutz.sys.services.SysSignatureService; import io.v.nutz.util.MoneyUtil; import io.v.nutz.web.commons.utils.ShiroUtil; 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.entity.Record; @@ -28,16 +27,17 @@ 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.json.Json; +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 javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.util.Base64; -import java.util.Calendar; import java.util.LinkedHashMap; import java.util.List; import java.util.stream.Collectors; @@ -73,29 +73,6 @@ public class ReimbursementCon { public void index() { } - @At - @ViReturn - public Object doAdd(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign) { - activityBx.setYear(Calendar.getInstance().get(Calendar.YEAR)); - if (ShiroUtil.hasAnyRoles(new String[]{"xghhdwy", "A06"}) && activityBx.getActivity_type().equals(2)) { - activityBx.setState_id("1020"); - activityBx.setActivity_type(2); - } else if (ShiroUtil.hasAnyRoles(new String[]{"H02"}) && activityBx.getActivity_type().equals(3)) { - activityBx.setState_id("1000"); - activityBx.setActivity_type(3); - } else { - activityBx.setState_id("1010"); - activityBx.setActivity_type(1); - } - activityBx.setApply_time(DateUtil.getDate()); - activityBx.setUser_id(ShiroUtil.getPrincipalProperty("id").toString()); - if (Strings.isNotBlank(sign)) { - activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId()); - } - activityBxService.doAdd(activityBx); - return null; - } - /** * 多功能查询 * @@ -148,7 +125,7 @@ public class ReimbursementCon { Vi.cndPlus(cnd, "bxr.unitid", "=", unitId); Vi.cndPlus(cnd, "bxr.unionid", "=", unionId); sql.setCondition(cnd); - return activityBxService.listPage(pageNumber, pageSize, sql); + return activityBxService.listPageMap(pageNumber, pageSize, sql); } @At @@ -157,7 +134,7 @@ public class ReimbursementCon { return queryOne(id); } - private Record queryOne(String id) { + private NutMap queryOne(String id) { Sql sql = Sqls.create("SELECT\n" + "\tact.*,\n" + "\t`user`.loginname,\n" + @@ -196,49 +173,28 @@ public class ReimbursementCon { "\tLEFT JOIN sys_signature us_s ON us_s.id = act.user_signature \n" + "WHERE\n" + "\tact.id = @id").setParam("id", id); - Record record = activityBxService.list(sql).get(0); - record.set("Goods", baseService.dao().query("Goods", Cnd.where("reid", "=", id))); + List listMap = baseService.listMap(sql); + NutMap map = null; + if (Lang.isNotEmpty(listMap)) { + map = listMap.get(0); + map.setv("goods", baseService.dao().query("Goods", Cnd.where("reid", "=", id))); - if (record.size() == 0) { - return null; + String activity_id = map.getString("activity_id"); + if (Strings.isNotBlank(activity_id)) { + List files = activityFileService.query(Cnd.where("activity_id", "=", activity_id).desc("time")); + LinkedHashMap> collect = files.stream().collect(Collectors.groupingBy(ActivityFile::getTime, LinkedHashMap::new, Collectors.toList())); + + map.setv("activity_files", collect); + } } - - - String activity_id = record.getString("activity_id"); - if (Strings.isNotBlank(activity_id)) { - List files = activityFileService.query(Cnd.where("activity_id", "=", activity_id).desc("time")); - LinkedHashMap> collect = files.stream().collect(Collectors.groupingBy(ActivityFile::getTime, LinkedHashMap::new, Collectors.toList())); - - record.set("activity_files", collect); - } - - return record; + return map; } @At @ViReturn - public Object doEdit(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign, String[] delNotesList) { - - if (delNotesList != null && delNotesList.length > 0) { - for (String s : delNotesList) { - if (Strings.isNotBlank(s)) { - baseService.clear("goods", Cnd.where("id", "=", s)); - } - } - } - if (!activityBx.getGoods().isEmpty()) { - activityBx.getGoods().forEach(goods -> { - if (Strings.isBlank(goods.getId())) { - goods.setReid(activityBx.getId()); - baseService.insert(goods); - } - }); - } - if (Strings.isNotBlank(sign)) { - activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId()); - } - - activityBxService.doEdit(activityBx); + public Object doEdit(String files, String id) { + List fileList = Json.fromJsonAsList(Sys_file.class, files); + activityBxService.update(Chain.make("resultsFiles", fileList).add("state_id", 1060), Cnd.where("id", "=", id)); return null; } diff --git a/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementViewCon.java b/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementViewCon.java index 7ccae38..76ee86f 100644 --- a/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementViewCon.java +++ b/src/main/java/io/v/nutz/jf/controller/activitybx/ReimbursementViewCon.java @@ -3,13 +3,22 @@ package io.v.nutz.jf.controller.activitybx; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.entity.ExportParams; +import com.deepoove.poi.XWPFTemplate; +import com.deepoove.poi.config.Configure; +import com.deepoove.poi.policy.HackLoopTableRenderPolicy; import io.v.nutz.annontation.ViReturn; import io.v.nutz.base.utils.Vi; +import io.v.nutz.jf.model.ActivityBx; import io.v.nutz.jf.service.ActivityBxService; +import io.v.nutz.sys.models.Sys_file; import io.v.nutz.sys.services.SysUnionService; +import io.v.nutz.web.commons.base.Globals; +import io.v.nutz.web.commons.utils.FileUtil; import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.ddr.poi.html.HtmlRenderPolicy; +import org.nutz.boot.starter.ftp.FtpService; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; import org.nutz.dao.entity.Record; @@ -17,12 +26,17 @@ import org.nutz.dao.sql.Sql; import org.nutz.dao.util.cri.SqlExpressionGroup; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.Lang; +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 javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import java.io.*; +import java.net.URLEncoder; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; /** @@ -45,6 +59,10 @@ public class ReimbursementViewCon { private SysUnionService sysUnionService; + @Inject + private FtpService ftpService; + + @At("") @Ok("beetl:/platform/jf/activitybx/reimbursementview.html") @RequiresPermissions("sys.jf.activity_bx.reimbursementview") @@ -55,19 +73,22 @@ public class ReimbursementViewCon { @At @ViReturn public Object pageData(Integer year, String searchName, String unitId, String unionId, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) { - Sql sql = Sqls.create("SELECT\n" + - "\tact.*,\n" + - "\tu.loginname,\n" + - "\tun.unionname,\n" + - "\tun.unioncode,\n" + - "\ts.state_name,\n" + - "\ts.state_color \n" + - "FROM\n" + - "\t`activity_bx` act\n" + - "\tLEFT JOIN `user` u ON act.user_id = u.id\n" + - "\tLEFT JOIN sys_unit su ON su.id = u.unitid\n" + - "\tLEFT JOIN sys_union un ON su.unionid = un.id\n" + - "\tLEFT JOIN state s ON act.state_id = s.state_id $condition"); + Sql sql = Sqls.create(""" + SELECT + act.*, + bxr.loginname bxr_loginname, + bxr.unionname bxr_unionname, + bxr.unioncode, + state.state_name, + state.state_color, + abs.`name` absName + FROM + activity_bx act + LEFT JOIN `user` bxr ON act.user_id = bxr.id + LEFT JOIN state state ON state.state_id = act.state_id + LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode + $condition + """); Cnd cnd = Cnd.NEW(); if (!ShiroUtil.hasAnyRoles("sysadmin,wyh02")) { SqlExpressionGroup group2 = new SqlExpressionGroup(); @@ -93,9 +114,98 @@ public class ReimbursementViewCon { cnd.asc("act.state_id").desc("act.apply_time"); } sql.setCondition(cnd); - return activityBxService.listPage(pageNumber, pageSize, sql); + return activityBxService.listPageMap(pageNumber, pageSize, sql); } + @At + @Ok("void") + public void doExport(String id, HttpServletResponse response) throws Exception { + NutMap nutMap = activityBxService.queryOne(id); + + nutMap.setv("apply_time", nutMap.getString("apply_time").substring(0, 10)); + List goods = nutMap.getAsList("goods", NutMap.class); + + for (int i = 0; i < goods.size(); i++) { + goods.get(i).put("ranking", i + 1); + } + if (nutMap.get("a_s") != null) { + nutMap.setv("a_sign", Vi.getImg(nutMap.getString("a_s"))); + nutMap.setv("accounting_time", nutMap.getString("apply_time")); + } + + HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); + HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy(); + htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true); + + Configure config = Configure.newBuilder().bind("goods", policy) + .bind("n.activity_content", htmlRenderPolicy) + .bind("n.activity_arrange", htmlRenderPolicy).build(); + HashMap map = new HashMap<>(); + map.put("goods", goods); + map.put("n", nutMap); + map.put("schoolName", Globals.schoolName); + String fileName = Globals.schoolName + "活动申报登记表"; + + response.addHeader("Content-Type", "application/octet-stream"); + response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx"); + InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/funds2.docx"); + XWPFTemplate.compile(inputStream, config).render(map, response.getOutputStream()); + inputStream.close(); + } + + + @At + @Ok("void") + public void downloadResults(Integer year, HttpServletResponse response) throws IOException { + + List activityBxList = activityBxService.query(Cnd.where("year", "=", year)); + try { + + response.reset(); + response.setContentType("application/x-msdownload;charset=utf-8"); + + /** + * 创建临时文件夹 + */ + String tmpPath = "tmp/" + R.UU32(); + File tmpDir = new File(tmpPath + "/" + year + "活动申报"); + tmpDir.mkdirs(); + for (ActivityBx map : activityBxList) { + if (Lang.isNotEmpty(map)) { + for (Sys_file file : map.getResultsFiles()) { + String fileName = map.getFundsUnitName() + "活动名称:【" + map.getActivity_name() + "】——" + file.getFilename(); + + if (Lang.isNotEmpty(file)) { + FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + fileName); + ftpService.download(file.getFilepath(), outputStream); + outputStream.close(); + } + + } + } + + } + String aimsDir = "zipTmp/" + R.UU32(); + String aimsName = year + "活动申报.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(); + } + + } /** * 下载名单 diff --git a/src/main/java/io/v/nutz/jf/model/ActivityBx.java b/src/main/java/io/v/nutz/jf/model/ActivityBx.java index 6f6d15b..2525659 100644 --- a/src/main/java/io/v/nutz/jf/model/ActivityBx.java +++ b/src/main/java/io/v/nutz/jf/model/ActivityBx.java @@ -36,6 +36,12 @@ public class ActivityBx { @ColDefine(type = ColType.VARCHAR, width = 200) private String mobile; + + @Column + @Comment("申报(承办)单位") + @ColDefine(type = ColType.VARCHAR, width = 200) + private String fundsUnitName; + @Column @Comment("申请时间") @ColDefine(type = ColType.VARCHAR, width = 30) @@ -76,6 +82,21 @@ public class ActivityBx { @ColDefine(type = ColType.VARCHAR, width = 50) private String activity_name; + @Column + @Comment("活动计划结束时间") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String startPlannedDate; + + @Column + @Comment("活动计划结束时间") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String endPlannedDate; + + @Column + @Comment("活动项目类型") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String projectTypeCode; + @Column @Comment("活动id (未必有)") @ColDefine(type = ColType.VARCHAR, width = 32) @@ -106,6 +127,11 @@ public class ActivityBx { @ColDefine(type = ColType.FLOAT, width = 10, precision = 2) private Double activity_money; + @Column + @Comment("申报金额") + @ColDefine(type = ColType.FLOAT, width = 10, precision = 2) + private Double funds_money; + @Column @Comment("报销卡号") @ColDefine(type = ColType.VARCHAR, width = 50) @@ -271,6 +297,11 @@ public class ActivityBx { @ColDefine(type = ColType.MYSQL_JSON) private List files; + @Column + @Comment("成果附件") + @ColDefine(type = ColType.MYSQL_JSON) + private List resultsFiles; + @Column @Comment("附件数量") @ColDefine(type = ColType.VARCHAR, width = 100) diff --git a/src/main/java/io/v/nutz/jf/service/ActivityBxService.java b/src/main/java/io/v/nutz/jf/service/ActivityBxService.java index 4d8af8e..2b0adff 100644 --- a/src/main/java/io/v/nutz/jf/service/ActivityBxService.java +++ b/src/main/java/io/v/nutz/jf/service/ActivityBxService.java @@ -1,7 +1,8 @@ package io.v.nutz.jf.service; -import cn.wizzer.framework.base.service.BaseService; +import io.v.nutz.base.service.BaseService; import io.v.nutz.jf.model.ActivityBx; +import org.nutz.lang.util.NutMap; /** * @author zhf @@ -12,4 +13,6 @@ public interface ActivityBxService extends BaseService { void doAdd(ActivityBx activityBx); void doEdit(ActivityBx activityBx); + + NutMap queryOne(String id); } diff --git a/src/main/java/io/v/nutz/jf/service/impl/ActivityBxServiceImpl.java b/src/main/java/io/v/nutz/jf/service/impl/ActivityBxServiceImpl.java index bf1668e..371f825 100644 --- a/src/main/java/io/v/nutz/jf/service/impl/ActivityBxServiceImpl.java +++ b/src/main/java/io/v/nutz/jf/service/impl/ActivityBxServiceImpl.java @@ -1,13 +1,25 @@ package io.v.nutz.jf.service.impl; -import cn.wizzer.framework.base.service.BaseServiceImpl; +import io.v.nutz.base.service.impl.BaseServiceImpl; import io.v.nutz.jf.model.ActivityBx; +import io.v.nutz.jf.model.ActivityFile; import io.v.nutz.jf.service.ActivityBxService; +import io.v.nutz.jf.service.ActivityFileService; import org.nutz.aop.interceptor.ioc.TransAop; +import org.nutz.dao.Cnd; import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; import org.nutz.ioc.aop.Aop; +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 java.util.LinkedHashMap; +import java.util.List; +import java.util.stream.Collectors; /** * @author zhf @@ -20,6 +32,8 @@ public class ActivityBxServiceImpl extends BaseServiceImpl implement super(dao); } + @Inject + private ActivityFileService activityFileService; @Override @Aop(TransAop.READ_COMMITTED) @@ -32,4 +46,66 @@ public class ActivityBxServiceImpl extends BaseServiceImpl implement public void doEdit(ActivityBx activityBx) { updateWith(activityBx, "goods"); } + + @Override + public NutMap queryOne(String id) { + + Sql sql = Sqls.create(""" + SELECT + act.*, + `user`.loginname, + s.state_name, + s.state_color, + d_c.username dc_username, + d_c.loginname dc_loginname, + a.username a_username, + a.loginname a_loginname, + c_t.username ct_username, + c_t.loginname ct_loginname, + u_c.username uc_username, + u_c.loginname uc_loginname, + ucc_c.username ucc_username, + ucc_c.loginname ucc_loginname, + dc_s.`data` dc_s, + a_s.`data` a_s, + ct_s.`data` ct_s, + uc_s.`data` uc_s, + ucc_s.`data` ucc_s, + us_s.`data` us_s + FROM + activity_bx act + LEFT JOIN sys_user `user` ON act.user_id = `user`.id + LEFT JOIN state s ON act.state_id = s.state_id + LEFT JOIN sys_user d_c ON d_c.id = act.division_chairman_name + LEFT JOIN sys_user a ON a.id = act.accounting_name + LEFT JOIN sys_user c_t ON c_t.id = act.confirm_trade_name + LEFT JOIN sys_user u_c ON u_c.id = act.union_cashier_name + LEFT JOIN sys_user ucc_c ON ucc_c.id = act.union_chairman_name + LEFT JOIN sys_signature dc_s ON dc_s.id = act.division_chairman + LEFT JOIN sys_signature a_s ON a_s.id = act.accounting + LEFT JOIN sys_signature ct_s ON ct_s.id = act.confirm_trade + LEFT JOIN sys_signature uc_s ON uc_s.id = act.union_cashier + LEFT JOIN sys_signature ucc_s ON ucc_s.id = act.union_chairman + LEFT JOIN sys_signature us_s ON us_s.id = act.user_signature + WHERE + act.id = @id + """).setParam("id", id); + NutMap record = listMap(sql).get(0); + record.setv("goods", dao().query("goods", Cnd.where("reid", "=", id))); + + if (record.size() == 0) { + return null; + } + + + String activity_id = record.getString("activity_id"); + if (Strings.isNotBlank(activity_id)) { + List files = activityFileService.query(Cnd.where("activity_id", "=", activity_id).desc("time")); + LinkedHashMap> collect = files.stream().collect(Collectors.groupingBy(ActivityFile::getTime, LinkedHashMap::new, Collectors.toList())); + + record.setv("activity_files", collect); + } + + return record; + } } diff --git a/src/main/resources/docTemplate/funds2.docx b/src/main/resources/docTemplate/funds2.docx new file mode 100644 index 0000000000000000000000000000000000000000..a774d144ee922b8b208716c4aca5049ca398483f GIT binary patch literal 13881 zcma)j19WA}wsvfD$F^;wW83beqmFHK(6MdX>DV22%#LkafBKwz?>VRc``&mp#@=g> z+Vd-XbJbk6X3eP}4GIPW^s9W4+Z6nD{da+W|6yWltYB~Z*?~dfT@3BL0_qR3izO2% zCtx6;NDv?(q`!+9e*R4FYHgLFG-9*Nh}4ETC;-(ml5axO7{CUqZXxFds74_G_1DrA zC5t6YA$)zR+*EO{YCjn@fUHAo_91x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XS<%|IFln-0=U6&OtN?g}rwgi{I(QeZT$@*6^p`-#sk< z;`hg=UPicqvw-%1NiVyp2qy6iy@Blc7(U-UN}pt79BG`9WqGir289-B`e6B&RFTlm+GZa5?P+$9?27G?*y{B}oth zV)we7?He$Kw3rMaf4ZMn6C=eVqx`9!?@(5g|IqUg_$H-jsR`n;!wYD3R5JGME>f3+ z+cWgkvZo7^*bx(yf=Xzyngzap=-Mc$uE?|vtJ6}Qi( z4!VED0LPEm^e`fc-6cFC#x$uK?dO(KgM{-Z(!o9gSF!+?c@MED+&{^I7y_e7DRRW1 zEZ^a-Y2bfN95;iNF!yH=>)a28YePu5m{w|&*SqwHA)?Z!!r_fK0;d%3Ju2%qK?i2h zJE=iq$-O5eJH+A)5(`;(%SRZZ+MH)iP&|-l19w|KT9L%#^(#tGg=50y6{^@xtlcB? z(Muz(rmX#b(-*7?gPzBxg`74VROL+h5Ug-M?2Irj(}y#MbV-EJa5XI{Q`rmJsvLN&cP^^Go>8{wV$q`&WX@@1y-aTjMYE@cZ5TpHBas zyYV~x_k@GL;NtJww7=m0Nk91CCjBe4{?GDj(ivd?3AFz;;s36bUq - - {{ viewData.activity_time }} + + {{ viewData.mobile }} + + + + + + {{ + viewData.activity_type === 40002 ? "分工会活动" : viewData.activity_type === 40003 ? + "协会(社团)活动" : + "校工会活动" + }} + + + + + + {{ viewData.activity_name }} + + + + + + {{ viewData.absName }}({{ viewData.projectTypeCode }}) + + + + + + {{ viewData.fundsUnitName }} + + + + + + {{ viewData.startPlannedDate }}-{{ viewData.endPlannedDate }} + + + + + + {{ viewData.venue }} @@ -31,28 +71,22 @@ - - {{ viewData.activity_money }} - - - - - - {{ viewData.activity_card_number }} + + {{ viewData.funds_money }} - - {{ viewData.venue }} - - - - - +
+ + + +
+
+
@@ -66,84 +100,74 @@ - - - - + + - - - - + + 暂无 - - - - - 暂无 - - - + - + + --> @@ -196,7 +220,10 @@ -
{{ viewData.accounting_idea ? viewData.accounting_idea : '暂无' }}
+
{{ + viewData.accounting_idea ? viewData.accounting_idea : '暂无' + }} +
-
{{ viewData.confirm_trade_idea ? viewData.confirm_trade_idea : '暂无' }}
+
+ {{ viewData.confirm_trade_idea ? viewData.confirm_trade_idea : '暂无' }} +
-
{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}
+
+ {{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }} +
-
{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}
+
+ {{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }} +
\ No newline at end of file + diff --git a/src/main/resources/views/platform/jf/Funds/apply.html b/src/main/resources/views/platform/jf/Funds/apply.html index f08810d..e3c815e 100644 --- a/src/main/resources/views/platform/jf/Funds/apply.html +++ b/src/main/resources/views/platform/jf/Funds/apply.html @@ -90,12 +90,12 @@ layout("/layouts/platform.html"){ - - - - - + - + + v-model="formData.venue"> @@ -321,7 +321,7 @@ layout("/layouts/platform.html"){ projectTypeCode: [{required: true, message: '必填', trigger: ['blur', 'change']}], activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}], plannedDate: [{required: true, message: '必填', trigger: ['blur', 'change']}], - address: [{required: true, message: '必填', trigger: ['blur', 'change']}], + venue: [{required: true, message: '必填', trigger: ['blur', 'change']}], activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}], mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}], } @@ -424,7 +424,7 @@ layout("/layouts/platform.html"){ spinner: 'el-icon-loading', background: COVER_LAYER_COLOR }); - const formData = JSON.parse(JSON.stringify(this.formData)) + const formData = clone(this.formData) const {plannedDate} = formData if (plannedDate && plannedDate.length) { formData.startPlannedDate = formData.plannedDate[0] @@ -432,19 +432,18 @@ layout("/layouts/platform.html"){ formData.startTime = formData.plannedDate[0] formData.endTime = formData.plannedDate[1] formData.plannedDate = undefined - } - const resp = await $.post("/platform/jf/activity_bx/apply/doAdd", { - activityBx: JSON.stringify(formData), - sign: this.formData.sign + const url = "/platform/jf/activity_bx/apply" + const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), { + activityBx: JSON.stringify(formData) }) - closeLoadingFunc(loading, resp, async () => { - location.reload(); - }, (data, msg) => { - this.$message.error(msg); - }) - // 添加成功 跳转到申请记录页面 - //window.location.href = '/platform/jf/activity_bx/reimbursement' + loading.close() + if (resp.code === 0) { + sublime.jumpPagePjax("/platform/jf/activity_bx/reimbursement") + } else { + this.$message.error(resp.msg); + } + } }) }, @@ -462,34 +461,40 @@ layout("/layouts/platform.html"){ apply_time: moment().format('YYYY-MM-DD'), activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}' } - this.activityType = await getActivityTwoLevelType("40000") - this.projectType = await getActivityTwoLevelType("50000") - if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') { - this.$set(this.formData, "activity_type", "40002") - this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}') - } else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') { - this.$set(this.formData, "activity_type", "40003") - } else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') { - this.$set(this.formData, "activity_type", "40001") - this.$set(this.formData, "fundsUnitName", '校工会') - } - if (this.formData.activity_type) { - await this.getProjectCodeChange() - } + }, - findOne(id){ + async findOne(id) { + const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id}) + if (resp.code === 0) { + resp.data.activity_type = resp.data.activity_type + "" + resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate] + this.formData = resp.data + } } }, async created() { + this.activityType = await getActivityTwoLevelType("40000") + this.projectType = await getActivityTwoLevelType("50000") const id = GetQueryString("id") - if (id){ + if (id) { this.findOne(id) - }else{ + } else { this.init() } + if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') { + this.$set(this.formData, "activity_type", "40002") + this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}') + } else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') { + this.$set(this.formData, "activity_type", "40003") + } else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') { + this.$set(this.formData, "activity_type", "40001") + this.$set(this.formData, "fundsUnitName", '校工会') + } + + } }) diff --git a/src/main/resources/views/platform/jf/activitybx/accounting.html b/src/main/resources/views/platform/jf/activitybx/accounting.html index d460820..df05415 100644 --- a/src/main/resources/views/platform/jf/activitybx/accounting.html +++ b/src/main/resources/views/platform/jf/activitybx/accounting.html @@ -9,25 +9,28 @@ layout("/layouts/platform.html"){