From 567da06823f05f084d1972ac261641977ca40e56 Mon Sep 17 00:00:00 2001 From: Paidax Date: Mon, 10 Feb 2025 08:58:39 +0800 Subject: [PATCH] =?UTF-8?q?bug=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/sys/SysHomeController.java | 21 +- .../platform/sys/SysUnionMangeCon.java | 9 +- .../ActivityUnionApplyUserController.java | 15 +- .../union/ActivityUnionManageController.java | 9 +- .../controller/DifficultyApplyController.java | 22 - .../difficulty/model/DifficultyApply.java | 67 -- .../Funds/FundsApplyController.java | 8 +- .../activitybx/ReimbursementCon.java | 19 +- .../activitybx/ReimbursementViewCon.java | 19 +- .../ActivityReimbursementApplyController.java | 4 +- .../java/io/v/nutz/zhgh/member/UserMode.java | 6 +- .../controller/MemberAgendaController.java | 6 +- .../controller/MemberCommonController.java | 28 +- .../controller/MemberSelfAgentController.java | 2 +- .../apply/MemberApplyAuditController.java | 10 +- .../apply/MemberApplyController.java | 8 +- .../MemberChangeApplyAuditController.java | 12 +- .../change/MemberChangeApplyController.java | 4 +- .../change/MemberChangeManageController.java | 54 +- .../change/MemberChangeRecordsController.java | 8 +- .../check/MemberCheckPersonalController.java | 6 +- .../check/MemberCheckSchoolController.java | 4 +- .../check/MemberCheckTaskController.java | 5 +- .../check/MemberCheckUnionController.java | 41 +- .../info/MemberBatchMakeController.java | 20 +- .../info/MemberDataManageController.java | 21 +- .../info/MemberGroupInfoController.java | 14 +- .../controller/info/MemberMakeController.java | 12 +- .../inquire/MemberAnalysisController.java | 2 +- .../inquire/MemberHistoyController.java | 6 +- .../MemberInquireIntegrateController.java | 76 +- .../inquire/MemberStatisticsController.java | 2 +- .../inquire/MemberUserTypeController.java | 2 +- .../member/handle/MemberApplyAuditHandle.java | 60 +- .../member/handle/MemberApplyToDoHandler.java | 5 - .../handle/MemberChangeAuditHandle.java | 19 +- .../member/handle/MemberChangeHandle.java | 145 ++- .../handle/MemberChangeToDoHandler.java | 77 +- .../zhgh/member/model/MemberApplyRecord.java | 5 - .../zhgh/member/model/MemberChangeRecord.java | 24 +- .../zhgh/member/model/MemberCheckTask.java | 5 + .../member/service/MemberHistoryService.java | 2 +- .../impl/MemberCheckPersonalServiceImpl.java | 2 +- .../impl/MemberHistoryServiceImpl.java | 4 +- .../service/impl/MemberServiceImpl.java | 2 +- .../v/nutz/zhgh/member/utils/MemberUtils.java | 10 +- .../UnionActivityRegisterController.java | 13 +- .../condolence/CondolenceAgentController.java | 4 +- .../condolence/CondolenceFrCon.java | 7 + .../condolence/CondolenceReadCon.java | 4 +- .../condolence/CondolenceUcrCon.java | 7 + .../condolence/CondolenceVcrCon.java | 60 +- .../difficult/DifficultAgentController.java | 126 --- .../DifficultBranchUnionAuditController.java | 153 +++ .../difficult/DifficultCommonController.java | 33 + .../difficult/DifficultReadingController.java | 474 ++++++++ ...ficultSchoolUnionFinalAuditController.java | 151 +++ ...cultSchoolUnionInitialAuditController.java | 224 ++++ ...ly.java => DifficultyApplyController.java} | 171 ++- .../difficult/DifficultyApplyList.java | 93 -- .../DifficultyApplyListController.java | 112 ++ .../difficult/ReadingController.java | 442 -------- .../difficult/SchoolManagerController.java | 95 -- .../difficult/SchoolStandingController.java | 78 -- .../difficult/SchoolViceChairmanCon.java | 77 -- .../difficult/TwoOrganizationController.java | 95 -- .../difficult/UnionChairmanController.java | 120 -- .../controller/difficult/ZgfwKnbfSjdrCon.java | 407 ------- .../difficult/DifficultToDoHandler.java | 80 +- .../zhgh/zgfw/model/difficult/Zgfw_knbf.java | 258 ++--- .../components/condolence/mobile/common.vue | 331 +++--- .../components/member/MemChangeApply.vue | 698 ++++++------ .../components/member/MemChangeRecords.vue | 264 ++--- .../static/components/member/MemberCnd.vue | 91 +- .../static/components/member/MemberInfo.vue | 6 +- .../static/components/mobile/cahd/info.vue | 318 +++--- .../club/mobileClubUserApplyInfo.vue | 2 +- .../mobile/common/TrainDynamicForm.vue | 2 + .../components/mobile/difficulty/info.vue | 2 +- .../components/mobile/mobile/cahd/info.vue | 189 ---- .../components/mobile/mobile/common/MCard.vue | 50 - .../mobile/mobile/common/MLoading.vue | 89 -- .../mobile/mobile/common/MTableLoading.vue | 140 --- .../mobile/mobile/common/TrainDynamicForm.vue | 186 --- .../mobile/mobile/difficulty/info.vue | 158 --- .../mobile/member/MobileMemberChangeInfo.vue | 214 ---- .../mobile/mobile/member/MobileMemberInfo.vue | 208 ---- .../components/mobile/mobile/wmhd/info.vue | 247 ---- .../components/plugins/UserDataScope.vue | 595 +++++----- .../static/components/sign/mobileSign.vue | 24 +- .../resources/static/components/sign/sign.vue | 2 +- ...hangeHistory.vue => userChangeHistory.vue} | 0 .../views/mobile/club/clubAudit.html | 9 +- .../resources/views/mobile/club/inClub.html | 19 +- .../views/mobile/condolence/apply.html | 391 +++---- .../views/mobile/condolence/apply_info.html | 30 +- .../views/mobile/condolence/apply_list.html | 93 +- .../views/mobile/condolence/audit_list.html | 64 +- .../condolence/branchunionaudit/index.html | 369 ++++++ .../views/mobile/condolence/fr_Audit.html | 85 +- .../views/mobile/condolence/school_Audit.html | 118 +- .../condolence/schoolchairmanaudit/index.html | 382 +++++++ .../condolence/schoolunionaudit/index.html | 421 +++++++ .../views/mobile/condolence/union_Audit.html | 83 +- .../views/mobile/difficulty/apply.html | 546 +++++---- .../views/mobile/difficulty/apply/index.html | 494 ++++++++ .../views/mobile/difficulty/apply_info.html | 16 +- .../views/mobile/difficulty/apply_list.html | 45 +- .../views/mobile/difficulty/audit_list.html | 56 +- .../difficulty/branchunionaudit/index.html | 356 ++++++ .../views/mobile/difficulty/common/info.js | 161 +++ .../views/mobile/difficulty/mine/index.html | 293 +++++ .../views/mobile/difficulty/school_Audit.html | 62 +- .../schoolunionfinalaudit/index.html | 369 ++++++ .../schoolunioninitialaudit/index.html | 369 ++++++ .../views/mobile/difficulty/union_Audit.html | 73 +- .../activity/union/applyActivity.html | 705 ++++++------ .../activity/union/layoutApplyUser.html | 331 +++--- .../union/layoutStatisticsActivity.html | 165 ++- .../views/platform/data/user/UpdateUser.html | 459 ++++---- .../views/platform/jf/Funds/apply.html | 24 +- .../views/platform/jf/activitybx/apply.html | 8 +- .../views/platform/jf/activitybx/cashier.html | 2 +- .../views/platform/jf/activitybx/confirm.html | 2 +- .../platform/jf/reimbursement/apply.html | 85 +- .../platform/jf/reimbursement/board.html | 6 +- .../views/platform/jf/reimbursement/mine.html | 2 +- .../platform/jf/reimbursement/statistics.html | 2 +- .../platform/member/apply/audit/Layout.html | 289 ++--- .../views/platform/member/apply/index.html | 136 +-- .../views/platform/member/change/Apply.html | 10 +- .../views/platform/member/change/Manage.html | 1007 ++++++----------- .../views/platform/member/change/Records.html | 403 +++---- .../platform/member/change/audit/Layout.html | 342 +++--- .../views/platform/member/check/school.html | 2 +- .../views/platform/member/check/union.html | 521 +++++---- .../views/platform/member/info/BatchMake.html | 65 +- .../views/platform/member/info/GroupInfo.html | 162 +-- .../views/platform/member/info/Make.html | 148 ++- .../platform/member/info/PersonInfo.html | 2 +- .../platform/member/info/dataManage.html | 434 ++++--- .../platform/member/inquire/Analysis.html | 2 +- .../platform/member/inquire/DataBoard.html | 38 +- .../platform/member/inquire/History.html | 104 +- .../platform/member/inquire/Integrate.html | 798 +++++++------ .../platform/member/inquire/Statistics.html | 2 +- .../platform/member/inquire/usertype.html | 11 +- .../views/platform/sys/home/appModule.js | 12 +- .../resources/views/platform/sys/home/todo.js | 40 +- .../platform/welfare/member/Adjustment.html | 847 +++++++------- .../platform/welfare/member/check/school.html | 436 +++---- .../platform/welfare/member/check/union.html | 670 +++++------ .../views/platform/zgfw/condolence/apply.html | 1 - .../views/platform/zgfw/difficulty/apply.html | 454 ++++++-- .../platform/zgfw/difficulty/apply2.html | 153 +++ .../platform/zgfw/difficulty/applylist.html | 127 +-- ...ionchairman.html => branchUnionAudit.html} | 188 +-- .../platform/zgfw/difficulty/common/info.js | 136 +++ .../platform/zgfw/difficulty/reading.html | 81 +- ...zation.html => schoolUnionFinalAudit.html} | 208 ++-- ...ager.html => schoolUnionInitialAudit.html} | 220 ++-- .../zgfw/difficulty/schoolstanding.html | 288 ----- .../views/platform/zgfw/difficulty/sjdr.html | 743 ------------ 163 files changed, 12110 insertions(+), 11667 deletions(-) delete mode 100644 src/main/java/io/v/nutz/zhgh/difficulty/controller/DifficultyApplyController.java delete mode 100644 src/main/java/io/v/nutz/zhgh/difficulty/model/DifficultyApply.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultAgentController.java create mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultBranchUnionAuditController.java create mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultCommonController.java create mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultReadingController.java create mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionFinalAuditController.java create mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionInitialAuditController.java rename src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/{DifficultyApply.java => DifficultyApplyController.java} (50%) delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyList.java create mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyListController.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ReadingController.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolManagerController.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolStandingController.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolViceChairmanCon.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/TwoOrganizationController.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/UnionChairmanController.java delete mode 100644 src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ZgfwKnbfSjdrCon.java rename src/main/resources/static/components/mobile/{mobile => }/club/mobileClubUserApplyInfo.vue (99%) delete mode 100644 src/main/resources/static/components/mobile/mobile/cahd/info.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/common/MCard.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/common/MLoading.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/common/MTableLoading.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/common/TrainDynamicForm.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/difficulty/info.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/member/MobileMemberChangeInfo.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/member/MobileMemberInfo.vue delete mode 100644 src/main/resources/static/components/mobile/mobile/wmhd/info.vue rename src/main/resources/static/components/userChangeHistory/{UserChangeHistory.vue => userChangeHistory.vue} (100%) create mode 100644 src/main/resources/views/mobile/condolence/branchunionaudit/index.html create mode 100644 src/main/resources/views/mobile/condolence/schoolchairmanaudit/index.html create mode 100644 src/main/resources/views/mobile/condolence/schoolunionaudit/index.html create mode 100644 src/main/resources/views/mobile/difficulty/apply/index.html create mode 100644 src/main/resources/views/mobile/difficulty/branchunionaudit/index.html create mode 100644 src/main/resources/views/mobile/difficulty/common/info.js create mode 100644 src/main/resources/views/mobile/difficulty/mine/index.html create mode 100644 src/main/resources/views/mobile/difficulty/schoolunionfinalaudit/index.html create mode 100644 src/main/resources/views/mobile/difficulty/schoolunioninitialaudit/index.html create mode 100644 src/main/resources/views/platform/zgfw/difficulty/apply2.html rename src/main/resources/views/platform/zgfw/difficulty/{unionchairman.html => branchUnionAudit.html} (59%) create mode 100644 src/main/resources/views/platform/zgfw/difficulty/common/info.js rename src/main/resources/views/platform/zgfw/difficulty/{twoOrganization.html => schoolUnionFinalAudit.html} (56%) rename src/main/resources/views/platform/zgfw/difficulty/{schoolmanager.html => schoolUnionInitialAudit.html} (55%) delete mode 100644 src/main/resources/views/platform/zgfw/difficulty/schoolstanding.html delete mode 100644 src/main/resources/views/platform/zgfw/difficulty/sjdr.html diff --git a/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysHomeController.java b/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysHomeController.java index b336eb3..09aef20 100644 --- a/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysHomeController.java +++ b/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysHomeController.java @@ -1,6 +1,6 @@ package io.v.nutz.sys.controllers.platform.sys; -import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; import io.v.nutz.base.enums.Env; @@ -15,7 +15,6 @@ import io.v.nutz.zhgh.activity.models.ActivityUserScope; import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; -import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; @@ -38,6 +37,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import java.io.IOException; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -210,12 +210,19 @@ public class SysHomeController { @RequiresAuthentication public Result listHomeActivity() { FieldFilter fieldFilter = FieldFilter.locked(Sys_home_activity.class, "classPath"); - List list = Daos.ext(dao, fieldFilter).query(Sys_home_activity.class, Cnd.where("enable", "=", 1).desc("top")); + List list = Daos.ext(dao,fieldFilter) .query(Sys_home_activity.class, Cnd.where("enable", "=", 1).desc("top")); String userId = ShiroUtil.getUserId(); - List allowActivityList = new ArrayList<>(); - + // 今天的时间 + Date today = DateUtil.date(); for (Sys_home_activity activity : list) { + // 该活动的时间范围 + Date startDate = activity.getStartDate(); + Date endDate = activity.getEndDate(); + // 判断当前时间是否在活动范围内,不在就过滤掉 + if (!DateUtil.isIn(today, startDate, endDate)) { + continue; + } Integer allowUserGroupId = activity.getAllowUserGroupId(); String allowUserSql = activity.getAllowUserSql(); activity.setAllowUserSql(null); @@ -232,10 +239,10 @@ public class SysHomeController { } } - if (StrUtil.isNotBlank(allowUserSql)) { + if (StrUtil.isNotBlank(allowUserSql)){ Sql sql = Sqls.create(allowUserSql).setParam("userId", userId); NutMap nutMap = (NutMap) Daos.query(dao, sql.toString(), Sqls.callback.map()); - if (Lang.isNotEmpty(nutMap)) { + if (Lang.isNotEmpty(nutMap) && StrUtil.isNotBlank(nutMap.getString("userId"))) { allowActivityList.add(activity); } } diff --git a/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysUnionMangeCon.java b/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysUnionMangeCon.java index 9272d7f..234198b 100644 --- a/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysUnionMangeCon.java +++ b/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysUnionMangeCon.java @@ -7,10 +7,10 @@ import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.page.Pagination; -import io.v.nutz.base.utils.PageUtil; -import io.v.nutz.base.utils.Roles; import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.ViService; +import io.v.nutz.base.utils.PageUtil; +import io.v.nutz.base.utils.Roles; import io.v.nutz.sys.models.*; import io.v.nutz.sys.services.*; import io.v.nutz.web.commons.controller.ViCommonCon; @@ -102,7 +102,10 @@ public class SysUnionMangeCon { } sysUserRoleService.insert(role); } else if (type == 2) { - Cnd cnd = Cnd.where("roleId", "=", roleId).and("userId", "=", userId); + Cnd cnd = Cnd.where("roleId", "=", roleId); + if (Strings.isNotBlank(userId)) { + cnd.and("userId", "=", userId); + } // if (Strings.isNotBlank(unionid)) { // cnd.and("unionid", "=", unionid); // } diff --git a/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionApplyUserController.java b/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionApplyUserController.java index 0518447..0959a70 100644 --- a/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionApplyUserController.java +++ b/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionApplyUserController.java @@ -9,6 +9,7 @@ import io.v.nutz.base.service.BaseService; import io.v.nutz.base.service.SimpleService; import io.v.nutz.base.utils.Vi; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.activity.models.ActivityTissue; import io.v.nutz.zhgh.activity.models.ActivityTissuePerson; import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -94,7 +95,7 @@ public class ActivityUnionApplyUserController { cnd.andEx("tissue.type", "=", type); cnd.andEx("tissue.state", "=", 3); cnd.andEx("tissue.projectTypeCode", "!=", 50004); - cnd.andEx("tissue.signUpMethod", "in", List.of(1, 2)); + cnd.andEx("tissue.signUpMethod", "in", List.of(1, 2, 3)); if (Strings.isNotBlank(name)) { cnd.where().andLike("tissue.name", name); @@ -172,18 +173,20 @@ public class ActivityUnionApplyUserController { @ViReturn @RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR) public Object getReportedUser(String tissueId) { + ActivityTissue tissue = baseService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", tissueId)); Sql sql = Sqls.create(""" SELECT atp.userId FROM activity_tissue_person atp LEFT JOIN `user` u ON atp.userId = u.id - WHERE - atp.tissueId = @tissueId - AND u.unionid = @unionId + $condition """); - sql.setParam("tissueId", tissueId); - sql.setParam("unionId", Vi.getUnionId()); + Cnd cnd = Cnd.NEW(); + cnd.and("atp.tissueId", "=", tissueId); + if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) { + cnd.and("u.unionid", "=", Vi.getUnionId()); + } List list = baseService.listMap(sql); List userIds = list.stream().map(v -> v.getString("userId")).collect(Collectors.toList()); return userIds; diff --git a/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java b/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java index 185d1ba..42f779d 100644 --- a/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java +++ b/src/main/java/io/v/nutz/zhgh/activity/controller/union/ActivityUnionManageController.java @@ -3,6 +3,7 @@ package io.v.nutz.zhgh.activity.controller.union; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.hutool.core.util.StrUtil; import com.deepoove.poi.XWPFTemplate; import com.deepoove.poi.config.Configure; import com.deepoove.poi.policy.HackLoopTableRenderPolicy; @@ -125,7 +126,7 @@ public class ActivityUnionManageController { """); if (!ShiroUtil.hasRole("sysadmin")) { if (activity_type == 40002) { - cnd.and("unionId", "=", vi.getUnionId()); + cnd.and("unionId", "=", Vi.getUnionId()); } else if (activity_type == 40003) { cnd.and("id", "in", " SELECT userid FROM sys_club_user WHERE clubid = '%s' ".formatted(vi.getClubId())); } @@ -153,7 +154,9 @@ public class ActivityUnionManageController { @Aop(TransAop.READ_COMMITTED) @RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR) public Object doAdd(@Param(value = "tissue") ActivityTissue tissue) { - tissue.setUserId(ShiroUtil.getUserId()); + if (StrUtil.isBlank(tissue.getUserId())) { + tissue.setUserId(ShiroUtil.getUserId()); + } tissue.setApplyTime(DateUtil.getDate()); if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) { tissue.setState(1); @@ -166,8 +169,6 @@ public class ActivityUnionManageController { tissue.setClubId(vi.getClubId()); } - - tissue.getGoods().forEach(v -> { v.setActivityCode(tissue.getActivityCode()); v.setReid(tissue.getId()); diff --git a/src/main/java/io/v/nutz/zhgh/difficulty/controller/DifficultyApplyController.java b/src/main/java/io/v/nutz/zhgh/difficulty/controller/DifficultyApplyController.java deleted file mode 100644 index 815f125..0000000 --- a/src/main/java/io/v/nutz/zhgh/difficulty/controller/DifficultyApplyController.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.v.nutz.zhgh.difficulty.controller; - -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.zhgh.difficulty.model.DifficultyApply; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; - -@IocBean -@At("/platform/difficulty/apply") -@Ok("json:full") -public class DifficultyApplyController { - - - @At - @ViReturn - public Object doApply(DifficultyApply difficultyApply){ - - return null; - } - -} diff --git a/src/main/java/io/v/nutz/zhgh/difficulty/model/DifficultyApply.java b/src/main/java/io/v/nutz/zhgh/difficulty/model/DifficultyApply.java deleted file mode 100644 index ce1862e..0000000 --- a/src/main/java/io/v/nutz/zhgh/difficulty/model/DifficultyApply.java +++ /dev/null @@ -1,67 +0,0 @@ -package io.v.nutz.zhgh.difficulty.model; - -import io.v.nutz.sys.models.Sys_file; -import lombok.Data; -import org.nutz.dao.entity.annotation.*; -import org.nutz.dao.interceptor.annotation.PrevInsert; - -import java.util.List; - -/** - * 困难补助 - */ - -@Table("difficulty_apply") -@Data -public class DifficultyApply { - - private static final long serialVersionUID = 1L; - - @Column - @Name - @ColDefine(type = ColType.VARCHAR, width = 32) - @PrevInsert(uu32 = true) - private String id; - - @Column - @ColDefine(type = ColType.VARCHAR, width = 32) - @Comment("申请人") - private String applyUser; - - @Column - @ColDefine(type = ColType.INT) - @Comment("申请模式") - private String applyMode; - - @Column - @ColDefine(type = ColType.VARCHAR, width = 32) - @Comment("受补助人") - private String difficultyUser; - - @Column - @ColDefine(type = ColType.VARCHAR, width = 100) - @Comment("申请事由") - private String remark; - - @Column - @ColDefine(type = ColType.MYSQL_JSON) - @Comment("附件") - private List files; - - @Column - @Comment("状态id") - @ColDefine(type = ColType.INT, width = 8) - private Integer stateId; - - @Column - @Comment("院级工会主席审核记录") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String unionAuditId; - - @Column - @Comment("校工会审核记录") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String schoolAuditId; - - -} diff --git a/src/main/java/io/v/nutz/zhgh/jf/controller/Funds/FundsApplyController.java b/src/main/java/io/v/nutz/zhgh/jf/controller/Funds/FundsApplyController.java index 0e10985..d12729d 100644 --- a/src/main/java/io/v/nutz/zhgh/jf/controller/Funds/FundsApplyController.java +++ b/src/main/java/io/v/nutz/zhgh/jf/controller/Funds/FundsApplyController.java @@ -106,7 +106,7 @@ public class FundsApplyController { @At @ViReturn @RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply"},logical = Logical.OR) - public Object getCardNumberByPayeeId(String payeeId){ + public Object getCardNumberByPayeeId(String username){ Sql sql = Sqls.create(""" SELECT JT.bankName, @@ -116,15 +116,15 @@ public class FundsApplyController { JSON_TABLE( budgets, '$[*]' COLUMNS( - payeeId VARCHAR(255) PATH '$.payeeId', + username VARCHAR(255) PATH '$.username', bankName VARCHAR(255) PATH '$.bankName', bankCardNum VARCHAR(255) PATH '$.bankCardNum' ) ) AS JT WHERE - JT.payeeId = @payeeId + JT.username = @username ORDER BY bx.apply_time DESC LIMIT 1 - """).setParam("payeeId", payeeId); + """).setParam("username", username); sql.setCallback(Sqls.callback.map()); dao.execute(sql); return sql.getResult(); diff --git a/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementCon.java b/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementCon.java index 99efffb..efe1663 100644 --- a/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementCon.java +++ b/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementCon.java @@ -8,6 +8,7 @@ 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.data.PictureType; import com.deepoove.poi.policy.HackLoopTableRenderPolicy; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.model.Goods; @@ -24,6 +25,7 @@ import io.v.nutz.zhgh.jf.service.ActivityBxService; import io.v.nutz.zhgh.jf.service.ActivityFileService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.aop.interceptor.ioc.TransAop; +import org.nutz.boot.starter.ftp.FtpService; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; @@ -38,6 +40,7 @@ import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Param; import javax.servlet.http.HttpServletResponse; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -69,6 +72,9 @@ public class ReimbursementCon { @Inject private BaseService baseService; + @Inject + private FtpService ftpService; + @At("") @Ok("beetl:/platform/jf/activitybx/reimbursement.html") @@ -315,9 +321,16 @@ public class ReimbursementCon { } private PictureRenderData getImage(String base64) throws IOException { - String s = base64.split(",")[1]; - byte[] bytes = Base64.getDecoder().decode(s); - return new PictureRenderData(70, 30, ".png", bytes); + if (base64.startsWith("data")) { + String s = base64.split(",")[1]; + byte[] bytes = Base64.getDecoder().decode(s); + return new PictureRenderData(70, 30, ".png", bytes); + } else { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(base64, os); + os.close(); + return new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()); + } } diff --git a/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementViewCon.java b/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementViewCon.java index ed27822..736af14 100644 --- a/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementViewCon.java +++ b/src/main/java/io/v/nutz/zhgh/jf/controller/activitybx/ReimbursementViewCon.java @@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil; import com.deepoove.poi.XWPFTemplate; import com.deepoove.poi.config.Configure; import com.deepoove.poi.data.PictureRenderData; +import com.deepoove.poi.data.PictureType; import com.deepoove.poi.policy.HackLoopTableRenderPolicy; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.utils.Html2Text; @@ -15,6 +16,7 @@ import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.jf.model.ActivityBx; import io.v.nutz.zhgh.jf.service.ActivityBxService; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.boot.starter.ftp.FtpService; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; @@ -28,6 +30,7 @@ import org.nutz.mvc.annotation.Param; import javax.servlet.http.HttpServletResponse; import java.io.BufferedOutputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; @@ -50,9 +53,10 @@ public class ReimbursementViewCon { @Inject private Vi vi; - @Inject private ActivityBxService activityBxService; + @Inject + private FtpService ftpService; private SysUnionService sysUnionService; @@ -127,9 +131,16 @@ public class ReimbursementViewCon { } private PictureRenderData getImage(String base64) throws IOException { - String s = base64.split(",")[1]; - byte[] bytes = Base64.getDecoder().decode(s); - return new PictureRenderData(100, 30, ".png", bytes); + if (base64.startsWith("data:")) { + String s = base64.split(",")[1]; + byte[] bytes = Base64.getDecoder().decode(s); + return new PictureRenderData(70, 30, ".png", bytes); + } else { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(base64, os); + os.close(); + return new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()); + } } @At diff --git a/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementApplyController.java b/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementApplyController.java index a96b897..4537d0a 100644 --- a/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementApplyController.java +++ b/src/main/java/io/v/nutz/zhgh/jf/controller/reimbursement/ActivityReimbursementApplyController.java @@ -83,7 +83,9 @@ public class ActivityReimbursementApplyController { List budgets = activityBx.getBudgets(); double sum = budgets.stream().mapToDouble(ActivityBx.Budget::getActualPrice).sum(); activityBx.setActivity_money(sum); - activityBx.setReimbursement_apply_time(DateUtil.today()); + if (activityBx.getReimbursement_apply_time() == null){ + activityBx.setReimbursement_apply_time(DateUtil.today()); + } if (StrUtil.isNotBlank(activityBx.getId()) && count > 0) { activityBx.setFiles(null); diff --git a/src/main/java/io/v/nutz/zhgh/member/UserMode.java b/src/main/java/io/v/nutz/zhgh/member/UserMode.java index 8f6568c..918c977 100644 --- a/src/main/java/io/v/nutz/zhgh/member/UserMode.java +++ b/src/main/java/io/v/nutz/zhgh/member/UserMode.java @@ -1,12 +1,12 @@ package io.v.nutz.zhgh.member; import io.v.nutz.base.utils.Roles; -import io.v.nutz.zhgh.member.constant.MemberOrigin; -import io.v.nutz.zhgh.member.constant.MemberStatus; +import io.v.nutz.base.utils.ViResource; import io.v.nutz.sys.models.Sys_user; import io.v.nutz.sys.models.Sys_user_role; import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.base.utils.ViResource; +import io.v.nutz.zhgh.member.constant.MemberOrigin; +import io.v.nutz.zhgh.member.constant.MemberStatus; import org.apache.shiro.crypto.hash.Sha256Hash; import org.apache.shiro.util.ByteSource; import org.nutz.dao.Chain; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/MemberAgendaController.java b/src/main/java/io/v/nutz/zhgh/member/controller/MemberAgendaController.java index d39217e..341b1fe 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/MemberAgendaController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/MemberAgendaController.java @@ -2,13 +2,13 @@ package io.v.nutz.zhgh.member.controller; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.utils.Vi; +import io.v.nutz.sys.models.Sys_menu; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.member.constant.MemberApplyState; import io.v.nutz.zhgh.member.constant.MemberChangeApplyState; import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.sys.models.Sys_menu; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/MemberCommonController.java b/src/main/java/io/v/nutz/zhgh/member/controller/MemberCommonController.java index 3862421..8b2fb16 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/MemberCommonController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/MemberCommonController.java @@ -3,17 +3,16 @@ package io.v.nutz.zhgh.member.controller; import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.service.ViService; import io.v.nutz.sys.models.Sys_unit; -import io.v.nutz.zhgh.data.constant.UserChangeType; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.sys.services.SysUserService; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.model.UserHistory; import io.v.nutz.zhgh.member.UserMode; import io.v.nutz.zhgh.member.model.MemberApplyRecord; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.base.service.ViService; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; @@ -205,7 +204,7 @@ public class MemberCommonController { UserHistory userHistory = dao.fetch(UserHistory.class, hisId); Map unitMap = dao.query(Sys_unit.class, null).stream().collect(Collectors.toMap(v -> v.getId(), v -> v.getName())); NutMap sysUserMap = (NutMap) Daos.query(dao, Sqls.create("select * from sys_user where loginname=@loginname").setParam("loginname", userHistory.getLoginname()).toString(), Sqls.callback.map()); - NutMap userHisMap = org.nutz.lang.Lang.obj2nutmap(userHistory); + NutMap userHisMap = Lang.obj2nutmap(userHistory); if (StrUtil.isNotBlank(userHistory.getMemberChangeRecordId())) { //从变更来的 特殊 需要审核 @@ -221,8 +220,8 @@ public class MemberCommonController { ); } - String userState = StrUtil.blankToDefault(changeRecord.getUserState(), ""); - if (!userState.equals(sysUserMap.getString("userState", ""))) { + String userState = StrUtil.blankToDefault(changeRecord.getChangeUserState(), ""); + if (StrUtil.isNotBlank(userState) && !userState.equals(sysUserMap.getString("userState", ""))) { compareData.add(NutMap.NEW() .addv("columnName", "在职状态") .addv("newValue", userState) @@ -230,6 +229,15 @@ public class MemberCommonController { ); } + String personType = StrUtil.blankToDefault(changeRecord.getChangePersonType(), ""); + if (StrUtil.isNotBlank(personType) && !personType.equals(sysUserMap.getString("personType", ""))) { + compareData.add(NutMap.NEW() + .addv("columnName", "人员类型") + .addv("newValue", personType) + .addv("oldValue", sysUserMap.getString("personType")) + ); + } + //在职,退休,离职可能会发生会员和福利会员的变化 if(changeRecord.getUpdateMember()!=null && changeRecord.getUpdateMember()){ //说明要改变会员状态 @@ -240,7 +248,7 @@ public class MemberCommonController { ); } - if(changeRecord.getUpdateWelfare()!=null && changeRecord.getUpdateWelfare()){ + if(changeRecord.getUpdateWelfareMember()!=null && changeRecord.getUpdateWelfareMember()){ //说明要改变福利会员状态 compareData.add(NutMap.NEW() .addv("columnName", "福利会员资格") @@ -267,7 +275,7 @@ public class MemberCommonController { COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sys_user' - AND TABLE_SCHEMA = 'union_cpu' + AND TABLE_SCHEMA = 'zhgh_hrbnu' """); List userTableColumnInfos = sysUserService.listMap(userColumnSql); diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/MemberSelfAgentController.java b/src/main/java/io/v/nutz/zhgh/member/controller/MemberSelfAgentController.java index 965d23a..a0da3b4 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/MemberSelfAgentController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/MemberSelfAgentController.java @@ -3,10 +3,10 @@ package io.v.nutz.zhgh.member.controller; import cn.hutool.core.date.DateUtil; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.service.BaseService; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.model.MemberCheckSelfTask; import io.v.nutz.zhgh.member.model.MemberCheckTask; -import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.nutz.dao.Cnd; import org.nutz.ioc.loader.annotation.Inject; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyAuditController.java b/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyAuditController.java index 5e30d73..40158c5 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyAuditController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyAuditController.java @@ -1,16 +1,16 @@ package io.v.nutz.zhgh.member.controller.apply; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.lang.Enum; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.zhgh.member.constant.MemberApplyState; -import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle; -import io.v.nutz.zhgh.member.model.MemberApplyRecord; +import io.v.nutz.base.lang.Enum; import io.v.nutz.base.model.Audit; import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.ViService; +import io.v.nutz.base.utils.Vi; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.member.constant.MemberApplyState; +import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle; +import io.v.nutz.zhgh.member.model.MemberApplyRecord; import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Sqls; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyController.java b/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyController.java index 927ce9d..a87da70 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/apply/MemberApplyController.java @@ -5,21 +5,21 @@ import cn.hutool.core.util.StrUtil; import com.deepoove.poi.XWPFTemplate; import com.deepoove.poi.config.Configure; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.service.ViService; import io.v.nutz.base.utils.OfficeTemplateUtil; import io.v.nutz.base.utils.Roles; import io.v.nutz.base.utils.Vi; import io.v.nutz.base.utils.ViTool; import io.v.nutz.sys.models.Sys_signature; +import io.v.nutz.sys.models.Sys_user; import io.v.nutz.sys.services.SysSignatureService; +import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.base.Globals; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.member.constant.MemberApplyState; import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle; import io.v.nutz.zhgh.member.model.MemberApplyRecord; import io.v.nutz.zhgh.member.model.MemberCheckSelfTask; -import io.v.nutz.base.service.ViService; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.ddr.poi.html.HtmlRenderPolicy; import org.nutz.dao.Chain; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyAuditController.java b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyAuditController.java index f323bc2..95d375b 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyAuditController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyAuditController.java @@ -1,18 +1,18 @@ package io.v.nutz.zhgh.member.controller.change; import cn.hutool.core.util.StrUtil; -import io.v.nutz.base.lang.Enum; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; +import io.v.nutz.base.lang.Enum; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.ViService; +import io.v.nutz.base.utils.Vi; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.member.constant.MemberChangeApplyState; import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle; import io.v.nutz.zhgh.member.model.MemberChangeRecord; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.ViService; -import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Sqls; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyController.java b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyController.java index 9583a49..3861424 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeApplyController.java @@ -1,16 +1,16 @@ package io.v.nutz.zhgh.member.controller.change; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.service.ViService; 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.zhgh.member.constant.MemberChangeApplyState; import io.v.nutz.zhgh.member.constant.MemberChangeOrigin; import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.base.service.ViService; -import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeManageController.java b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeManageController.java index 6641dd4..0445575 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeManageController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeManageController.java @@ -10,13 +10,20 @@ import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; import com.google.common.base.Joiner; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.dao.CndPlus; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.base.service.ViService; 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.base.dao.CndPlus; import io.v.nutz.base.utils.ViTool; import io.v.nutz.sys.models.*; +import io.v.nutz.sys.services.SysUnitService; +import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.slog.annotation.SLog; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.member.MemberMode; import io.v.nutz.zhgh.member.UserMode; @@ -27,13 +34,6 @@ import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; import io.v.nutz.zhgh.member.template.MemberTemp; import io.v.nutz.zhgh.member.utils.MemberUtils; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.base.service.ViService; -import io.v.nutz.sys.services.SysUnitService; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.web.commons.utils.ShiroUtil; import lombok.extern.slf4j.Slf4j; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -109,10 +109,12 @@ public class MemberChangeManageController { @Param(value = "sex", required = false) String sex, @Param(value = "personType", required = false) String personType, @Param(value = "userState", required = false) String userState, + @Param(value = "preparedBy", required = false) String preparedBy, @Param(value = "changeDate", required = false) String changeDate, @Param(value = "changeType", required = false) String changeType, @Param(value = "changeTypes", required = false) Integer[] changeTypes, @Param(value = "changed", required = false) Integer changed, + @Param(value = "myUnionGroupUser", required = false) Integer myUnionGroupUser, @Param(value = "isMember", required = false) Integer isMember) { Sql sql = Sqls.create(""" SELECT @@ -154,9 +156,16 @@ public class MemberChangeManageController { cnd.and("u.unionId", "=", Vi.getUnionId()); } else if (ShiroUtil.hasRole("ghxzzz")) { SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); - seg.or("u.unionGroupId", "is", null); - cnd.and(seg); + if (myUnionGroupUser == null) { + seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); + seg.or("u.unionGroupId", "is", null); + cnd.and(seg); + } else if (myUnionGroupUser == 1) { + cnd.and("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); + } else { + seg.or("u.unionGroupId", "is", null); + cnd.and(seg); + } cnd.and("u.unionid", "=", Vi.getUnionId()); } @@ -169,6 +178,7 @@ public class MemberChangeManageController { cnd.andEX("u.sex", "=", sex); cnd.andEX("u.personType", "=", personType); cnd.andEX("u.userState", "=", userState); + cnd.andEX("u.preparedBy", "=", preparedBy); if (StrUtil.isNotBlank(changeDateBefore) && StrUtil.isNotBlank(changeDateEnd)) { cnd.and(new Static(String.format("Date(his.changeTime) >= '%s' and Date(his.changeTime) <= '%s'", changeDateBefore, changeDateEnd))); @@ -176,9 +186,10 @@ public class MemberChangeManageController { if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) { cnd.orderBy((List.of("changeTime", "changeType", "changeTypes").contains(pageForm.getPageOrderName()) ? "his." : "u.") + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); + } else { + cnd.desc("his.changeTime"); } - if (Lang.isNotEmpty(changeTypes)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (Integer type : changeTypes) { @@ -249,7 +260,7 @@ public class MemberChangeManageController { } else if (ShiroUtil.hasRole("ghxzzz")) { cnd.and("u.unionId", "=", Vi.getUnionId()); SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("u.unionGroupId", "is", null); cnd.and(seg); } @@ -301,7 +312,11 @@ public class MemberChangeManageController { memberChangeRecord = MemberChangeAuditHandle.CREATE.next(memberChangeRecord, null); MemberChangeAuditHandle.SCHOOL.next(memberChangeRecord, audit); } else { - memberChangeRecord.setApplyOrigin(MemberChangeOrigin.UNION.getCode()); + if (ShiroUtil.hasAnyRoles("gh01, H04")) { + memberChangeRecord.setApplyOrigin(MemberChangeOrigin.UNION.getCode()); + } else if (ShiroUtil.hasRole("ghxzzz")){ + memberChangeRecord.setApplyOrigin(MemberChangeOrigin.UNION_GROUP.getCode()); + } memberChangeRecord = MemberChangeAuditHandle.CREATE.next(memberChangeRecord, null); MemberChangeAuditHandle.UNION.next(memberChangeRecord, audit); } @@ -363,7 +378,7 @@ public class MemberChangeManageController { @Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord, @Param(value = "isAppendWelfareMember", required = false) Boolean isAppendWelfareMember) { int yyyy = Calendar.getInstance().get(Calendar.YEAR); - Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus); + Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, null, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus); Sql sql = Sqls.create(""" SELECT u.* from $table LEFT JOIN sys_user_role sur ON sur.userid = u.id @@ -510,7 +525,7 @@ public class MemberChangeManageController { User user = memberService.dao().fetch(User.class, Cnd.where("id", "=", userId)); MemberChangeRecord changeRecord = new MemberChangeRecord(); changeRecord.setType(UserChangeType.NEW.getCode()); - changeRecord.setApplyOrigin(io.v.nutz.web.commons.utils.ShiroUtil.hasRole("H04") ? MemberChangeOrigin.UNION.getCode() : MemberChangeOrigin.UNION_GROUP.getCode()); + changeRecord.setApplyOrigin(ShiroUtil.hasRole("H04") ? MemberChangeOrigin.UNION.getCode() : MemberChangeOrigin.UNION_GROUP.getCode()); changeRecord.setStateId(MemberChangeApplyState.SCHOOL_UNION); changeRecord.setUpdateWelfareMember(true); changeRecord.setUserId(userId); @@ -536,6 +551,9 @@ public class MemberChangeManageController { public Object units() { Cnd cnd = Cnd.NEW(); cnd.and("unitlevel", "=", 2); + if (!ShiroUtil.hasAnyRoles("sysadmin,SchoolUnionAdmin")) { + cnd.and("id", "!=", "DZJF000"); + } return sysUnitService.dao().query("unit_union", cnd); } @@ -635,7 +653,7 @@ public class MemberChangeManageController { //判断是否在系统中 Sys_user user = userMap.get(v.getLoginname()); Sys_user_role userRole = new Sys_user_role(); - if (org.nutz.lang.Lang.isNotEmpty(user)) { + if (Lang.isNotEmpty(user)) { user.setUnitid(unitId); user.setSex(v.getSex()); user.setMobile(v.getMobile()); @@ -683,7 +701,7 @@ public class MemberChangeManageController { sysUnitService.dao().updateIgnoreNull(needUpdateUser); //如果有错误数据就返回给前端 - if (org.nutz.lang.Lang.isNotEmpty(errorInfos)) { + if (Lang.isNotEmpty(errorInfos)) { NutMap nutMap = NutMap.NEW(); nutMap.setv("totalCount", memberImportList.size()); nutMap.setv("successCount", doCleanRoleUsers.size()); diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeRecordsController.java b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeRecordsController.java index 204745a..6d263cf 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeRecordsController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/change/MemberChangeRecordsController.java @@ -2,14 +2,14 @@ package io.v.nutz.zhgh.member.controller.change; import cn.wizzer.framework.page.Pagination; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.zhgh.member.model.MemberChangeRecord; -import io.v.nutz.zhgh.member.service.MemberService; import io.v.nutz.base.model.Audit; import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.ViService; +import io.v.nutz.base.utils.Vi; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.member.model.MemberChangeRecord; +import io.v.nutz.zhgh.member.service.MemberService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; import org.nutz.dao.util.cri.SqlExpressionGroup; @@ -80,7 +80,7 @@ public class MemberChangeRecordsController { } else if (ShiroUtil.hasRole("ghxzzz")) { cnd.and("u.unionId", "=", Vi.getUnionId()); SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("u.unionGroupId", "is", null); cnd.and(seg); } diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckPersonalController.java b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckPersonalController.java index 4f96a3a..156bad3 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckPersonalController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckPersonalController.java @@ -4,11 +4,11 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; -import io.v.nutz.zhgh.member.service.MemberCheckPersonalService; import io.v.nutz.base.query.PageForm; -import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.base.utils.Vi; import io.v.nutz.base.utils.ViTool; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.member.service.MemberCheckPersonalService; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckSchoolController.java b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckSchoolController.java index 5eb92f9..f65da09 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckSchoolController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckSchoolController.java @@ -1,13 +1,12 @@ package io.v.nutz.zhgh.member.controller.check; import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.SimpleService; import io.v.nutz.base.utils.Roles; import io.v.nutz.zhgh.member.constant.MemberChangeApplyState; import io.v.nutz.zhgh.member.model.MemberChangeRecord; -import io.v.nutz.base.query.PageForm; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; @@ -15,7 +14,6 @@ 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.util.NutMap; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckTaskController.java b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckTaskController.java index c209fa9..b207204 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckTaskController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckTaskController.java @@ -2,16 +2,15 @@ package io.v.nutz.zhgh.member.controller.check; import cn.hutool.core.lang.Assert; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.SimpleService; import io.v.nutz.sys.models.Sys_union; +import io.v.nutz.sys.models.Sys_user; import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.model.MemberCheckSelfTask; import io.v.nutz.zhgh.member.model.MemberCheckTask; import io.v.nutz.zhgh.member.model.MemberCheckUnionTask; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.sys.models.SysUnionGroup; -import io.v.nutz.sys.models.Sys_user; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckUnionController.java b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckUnionController.java index 25901c6..c46e366 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckUnionController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/check/MemberCheckUnionController.java @@ -4,9 +4,12 @@ import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; import com.google.common.base.Joiner; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.SimpleService; import io.v.nutz.base.utils.Vi; import io.v.nutz.sys.models.Sys_config; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.member.constant.MemberChangeApplyState; import io.v.nutz.zhgh.member.constant.MemberChangeOrigin; @@ -14,9 +17,6 @@ import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.model.MemberCheckUnionTask; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -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; @@ -67,11 +67,11 @@ public class MemberCheckUnionController { @Param(value = "taskId", required = false) String taskId, @Param(value = "unionId", required = false) String unionId, @Param(value = "unitId", required = false) String unitId, - @Param(value = "sex", required = false) String sex, @Param(value = "changed", required = false) Integer changed, @Param(value = "isMember", required = false) Integer isMember, @Param(value = "unionGroupId", required = false) String unionGroupId, @Param(value = "threeUnitId", required = false) String threeUnitId, + @Param(value = "preparedBy", required = false) String preparedBy, @Param(value = "userStates", required = false) String[] userStates, @Param(value = "personTypes", required = false) String[] personTypes, @Param(value = "changeTypes", required = false) Integer[] changeTypes, @@ -86,6 +86,7 @@ public class MemberCheckUnionController { u.birthday, u.personType, u.userState, + u.preparedBy, u.unionname, u.unitname, u.threeUnitName, @@ -114,18 +115,18 @@ public class MemberCheckUnionController { cnd.and("u.unionId", "=", Vi.getUnionId()); } else if (ShiroUtil.hasRole("ghxzzz")) { SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("u.unionGroupId", "is", null); cnd.and(seg); cnd.and("u.unionid", "=", Vi.getUnionId()); } } - cnd.andEX("u.sex", "=", sex); cnd.andEX("u.unionid", "=", unionId); cnd.andEX("u.unitid", "=", unitId); cnd.andEX("u.unionGroupId", "=", unionGroupId); cnd.andEX("u.threeUnitId", "=", threeUnitId); + cnd.andEX("u.preparedBy", "=", preparedBy); cnd.and(Cnd.likeEX("u." + pageForm.getSearchName(), pageForm.getSearchKeyword())); cnd.andEX("u.member", "=", isMember); @@ -143,7 +144,7 @@ public class MemberCheckUnionController { cnd.desc("changeTime"); } - if (org.nutz.lang.Lang.isNotEmpty(changeTypes)) { + if (Lang.isNotEmpty(changeTypes)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (Integer type : changeTypes) { seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type))); @@ -151,7 +152,7 @@ public class MemberCheckUnionController { cnd.and(seg); } - if (org.nutz.lang.Lang.isNotEmpty(userStates)) { + if (Lang.isNotEmpty(userStates)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (String state : userStates) { seg.orEquals("u.userState", state); @@ -159,7 +160,7 @@ public class MemberCheckUnionController { cnd.and(seg); } - if (org.nutz.lang.Lang.isNotEmpty(personTypes)) { + if (Lang.isNotEmpty(personTypes)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (String personType : personTypes) { seg.orEquals("u.personType", personType); @@ -167,7 +168,7 @@ public class MemberCheckUnionController { cnd.and(seg); } - if (org.nutz.lang.Lang.isNotEmpty(changeOrigins)) { + if (Lang.isNotEmpty(changeOrigins)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (Integer c : changeOrigins) { seg.orEquals("u.changeOrigin", c); @@ -218,7 +219,7 @@ public class MemberCheckUnionController { } else if (ShiroUtil.hasRole("ghxzzz")) { cnd.and("u.unionId", "=", Vi.getUnionId()); SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("u.unionGroupId", "is", null); cnd.and(seg); } @@ -230,7 +231,7 @@ public class MemberCheckUnionController { cnd.andEX("u.unitid", "=", unitId); cnd.andEX("u.member", "=", isMember); - if (org.nutz.lang.Lang.isNotEmpty(changeTypes)) { + if (Lang.isNotEmpty(changeTypes)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (Integer type : changeTypes) { seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type))); @@ -238,7 +239,7 @@ public class MemberCheckUnionController { cnd.and(seg); } - if (org.nutz.lang.Lang.isNotEmpty(userStates)) { + if (Lang.isNotEmpty(userStates)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (String state : userStates) { seg.orEquals("u.userState", state); @@ -246,7 +247,7 @@ public class MemberCheckUnionController { cnd.and(seg); } - if (org.nutz.lang.Lang.isNotEmpty(personTypes)) { + if (Lang.isNotEmpty(personTypes)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (String personType : personTypes) { seg.orEquals("u.personType", personType); @@ -254,7 +255,7 @@ public class MemberCheckUnionController { cnd.and(seg); } - if (org.nutz.lang.Lang.isNotEmpty(changeOrigins)) { + if (Lang.isNotEmpty(changeOrigins)) { SqlExpressionGroup seg = new SqlExpressionGroup(); for (Integer c : changeOrigins) { seg.orEquals("u.changeOrigin", c); @@ -309,11 +310,11 @@ public class MemberCheckUnionController { dao.execute(userSql); String userState = StrUtil.blankToDefault(userSql.getString(), ""); - if (memberChangeRecord.getType() == UserChangeType.ON_DUTY.getCode()) { - if (userState.equals(UserChangeType.ON_DUTY.getDescription())) { - return Result.error("该用户当前的状态已经是" + UserChangeType.ON_DUTY.getDescription() + ",您无需变更!"); - } - } +// if (memberChangeRecord.getType() == UserChangeType.ON_DUTY.getCode()) { +// if (userState.equals(UserChangeType.ON_DUTY.getDescription())) { +// return Result.error("该用户当前的状态已经是" + UserChangeType.ON_DUTY.getDescription() + ",您无需变更!"); +// } +// } if (memberChangeRecord.getType() == UserChangeType.RESIGN.getCode()) { if (userState.equals(UserChangeType.RESIGN.getDescription())) { return Result.error("该用户当前的状态已经是" + UserChangeType.RESIGN.getDescription() + ",您无需变更!"); diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberBatchMakeController.java b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberBatchMakeController.java index 3c49bc9..a1ba028 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberBatchMakeController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberBatchMakeController.java @@ -4,8 +4,15 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.AsyncService; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.base.utils.Vi; +import io.v.nutz.base.utils.ViTool; +import io.v.nutz.sys.services.SysUserService; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.member.MemberMode; import io.v.nutz.zhgh.member.UserMode; @@ -15,13 +22,6 @@ import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.constant.MemberOrigin; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.base.service.AsyncService; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.base.utils.ViTool; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; @@ -123,7 +123,7 @@ public class MemberBatchMakeController { } else if (ShiroUtil.hasRole("ghxzzz")) { cnd.and("unionId", "=", Vi.getUnionId()); SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("unionGroupId", "is", null); cnd.and(seg); } @@ -217,7 +217,7 @@ public class MemberBatchMakeController { } else if (ShiroUtil.hasRole("ghxzzz")) { cnd.and("unionId", "=", Vi.getUnionId()); SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("unionGroupId", "is", null); cnd.and(seg); } diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberDataManageController.java b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberDataManageController.java index c2e0dbd..cf2103d 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberDataManageController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberDataManageController.java @@ -2,8 +2,12 @@ package io.v.nutz.zhgh.member.controller.info; import cn.hutool.core.util.StrUtil; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; import io.v.nutz.base.utils.PageUtil; import io.v.nutz.base.utils.Vi; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.member.MemberMode; import io.v.nutz.zhgh.member.UserMode; @@ -14,10 +18,6 @@ import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.zhgh.member.constant.MemberOrigin; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Chain; @@ -71,7 +71,8 @@ public class MemberDataManageController { @Param(value = "startLoginNames", required = false) String startLoginNames, @Param(value = "endLoginNames", required = false) String endLoginNames, @Param(value = "personTypes", required = false) String[] personTypes, - @Param(value = "userStates", required = false) String[] userStates + @Param(value = "userStates", required = false) String[] userStates, + @Param(value = "preparedBys", required = false) String[] preparedBys ) { Sql sql = Sqls.create(""" SELECT @@ -83,6 +84,7 @@ public class MemberDataManageController { welfareMember, personType, userState, + preparedBy, unioncode, unionname, unionid, @@ -123,6 +125,7 @@ public class MemberDataManageController { cnd.andEX("campusName", "=", campus); cnd.andEX("personType", "in", personTypes); cnd.andEX("userState", "in", userStates); + cnd.andEX("preparedBy", "in", preparedBys); if (StrUtil.isNotBlank(startLoginNames)) { String[] loginNames = startLoginNames.split(","); @@ -146,7 +149,7 @@ public class MemberDataManageController { if (ShiroUtil.hasRole("H04")) { cnd.and("unionid", "=", Vi.getUnionId()); } else { - cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds()); } } @@ -249,7 +252,7 @@ public class MemberDataManageController { if (ShiroUtil.hasRole("H04")) { cnd.and("unionid", "=", Vi.getUnionId()); } else { - cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds()); } } @@ -315,6 +318,7 @@ public class MemberDataManageController { @Param(value = "endLoginNames", required = false) String endLoginNames, @Param(value = "confirm", required = false) Boolean confirm, @Param(value = "personTypes", required = false) String[] personTypes, + @Param(value = "preparedBys", required = false) String[] preparedBys, @Param(value = "userStates", required = false) String[] userStates) { @@ -343,6 +347,7 @@ public class MemberDataManageController { cnd.andEX("campusName", "=", campus); cnd.andEX("personType", "in", personTypes); cnd.andEX("userState", "in", userStates); + cnd.andEX("preparedBy", "in", preparedBys); if (StrUtil.isNotBlank(startLoginNames)) { String[] loginNames = startLoginNames.split(","); @@ -366,7 +371,7 @@ public class MemberDataManageController { if (ShiroUtil.hasRole("H04")) { cnd.and("unionid", "=", Vi.getUnionId()); } else { - cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds()); } } diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberGroupInfoController.java b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberGroupInfoController.java index 9786a6a..427a041 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberGroupInfoController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberGroupInfoController.java @@ -5,20 +5,20 @@ import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.hutool.core.util.StrUtil; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.dao.CndPlus; +import io.v.nutz.base.query.PageForm; import io.v.nutz.base.result.Result; import io.v.nutz.base.service.AsyncService; import io.v.nutz.base.utils.Vi; -import io.v.nutz.base.dao.CndPlus; +import io.v.nutz.base.utils.ViTool; +import io.v.nutz.sys.services.SysRoleService; +import io.v.nutz.sys.services.SysUserService; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.member.MemberMode; import io.v.nutz.zhgh.member.UserMode; import io.v.nutz.zhgh.member.model.MemberHistory; import io.v.nutz.zhgh.member.service.MemberHistoryService; import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.sys.services.SysRoleService; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.base.utils.ViTool; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; @@ -159,7 +159,7 @@ public class MemberGroupInfoController { } else if (ShiroUtil.hasRole("ghxzzz")) { cnd.and("unionId", "=", Vi.getUnionId()); SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("unionGroupId", "is", null); cnd.and(seg); } diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberMakeController.java b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberMakeController.java index 84f26d9..bba61f8 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberMakeController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/info/MemberMakeController.java @@ -1,8 +1,12 @@ package io.v.nutz.zhgh.member.controller.info; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.utils.Vi; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.sys.services.SysUserService; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.data.model.UserHistory; import io.v.nutz.zhgh.data.service.HistoryUserService; @@ -10,10 +14,6 @@ import io.v.nutz.zhgh.member.UserMode; import io.v.nutz.zhgh.member.constant.*; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.sys.services.SysUserService; -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; @@ -132,7 +132,7 @@ public class MemberMakeController { if (ShiroUtil.hasRole("H04")) { cnd.and("unionid", "=", Vi.getUnionId()); } else { - cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds()); } } diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberAnalysisController.java b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberAnalysisController.java index ab59c42..beae080 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberAnalysisController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberAnalysisController.java @@ -6,8 +6,8 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.utils.Vi; import io.v.nutz.base.utils.ViTool; -import io.v.nutz.zhgh.member.service.MemberService; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.member.service.MemberService; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberHistoyController.java b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberHistoyController.java index e3abade..3d1d47f 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberHistoyController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberHistoyController.java @@ -2,12 +2,12 @@ package io.v.nutz.zhgh.member.controller.inquire; import cn.hutool.core.util.StrUtil; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.zhgh.data.model.UserHistory; import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.ViService; +import io.v.nutz.base.utils.Vi; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.data.model.UserHistory; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; @@ -69,7 +69,7 @@ public class MemberHistoyController { } else if (ShiroUtil.hasRole("ghxzzz")) { cnd.and("u.unionId", "=", Vi.getUnionId()); SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds()); + seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); seg.or("u.unionGroupId", "is", null); cnd.and(seg); } diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberInquireIntegrateController.java b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberInquireIntegrateController.java index 6d3551f..235b768 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberInquireIntegrateController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberInquireIntegrateController.java @@ -6,16 +6,16 @@ import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.hutool.core.util.StrUtil; import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.zhgh.member.constant.MemberStatus; -import io.v.nutz.zhgh.member.service.MemberService; -import io.v.nutz.zhgh.member.utils.MemberUtils; import io.v.nutz.base.query.PageForm; import io.v.nutz.base.service.ViService; +import io.v.nutz.base.utils.Vi; import io.v.nutz.sys.models.Sys_user; import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.member.constant.MemberStatus; +import io.v.nutz.zhgh.member.service.MemberService; +import io.v.nutz.zhgh.member.utils.MemberUtils; import lombok.Data; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -80,6 +80,7 @@ public class MemberInquireIntegrateController { @Param(value = "unionGroupId", required = false) String[] unionGroupId, @Param(value = "personTypes", required = false) String[] personTypes, @Param(value = "userStates", required = false) String[] userStates, + @Param(value = "preparedBys", required = false) String[] preparedBys, @Param(value = "memberStatus", required = false) String[] memberStatus, @Param(value = "campus", required = false) String campus, @Param(value = "memberType", required = false) String memberType, @@ -92,7 +93,7 @@ public class MemberInquireIntegrateController { @Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord) { int yyyy = Calendar.getInstance().get(Calendar.YEAR); - Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus); + Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, preparedBys, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus); Sql sql = Sqls.create(""" SELECT u.* from $table @@ -143,7 +144,12 @@ public class MemberInquireIntegrateController { } if (!ShiroUtil.hasAnyRoles("sysadmin,A06,H03")) { - cnd.and("unionid", "=", Vi.getUnionId()); + if (ShiroUtil.hasAnyRoles("H04,gh01")) { + cnd.and("u.unionId", "=", Vi.getUnionId()); + } else if (ShiroUtil.hasRole("ghxzzz")) { + cnd.and("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds()); +// cnd.and("u.unionid", "=", Vi.getUnionId()); + } } if (StrUtil.isBlank(pageForm.getPageOrderName()) && StrUtil.isBlank(pageForm.getPageOrderBy())) { @@ -241,7 +247,7 @@ public class MemberInquireIntegrateController { private String endDate; @Excel(name = "参加工作日期", width = 20d) - private String schoolTime; + private String workDate; @Excel(name = "录用职位", width = 20d) private String position; @@ -443,6 +449,7 @@ public class MemberInquireIntegrateController { @Param(value = "unionGroupId", required = false) String[] unionGroupId, @Param(value = "personTypes", required = false) String[] personTypes, @Param(value = "userStates", required = false) String[] userStates, + @Param(value = "preparedBys", required = false) String[] preparedBys, @Param(value = "memberStatus", required = false) String[] memberStatus, @Param(value = "campus", required = false) String campus, @Param(value = "memberType", required = false) String memberType, @@ -455,62 +462,9 @@ public class MemberInquireIntegrateController { @Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord, String props) { try { -// int yyyy = Calendar.getInstance().get(Calendar.YEAR); -// CndPlus cnd = CndPlus.create(); -// Sql sql = Sqls.create(""" -// SELECT -// *, -// unitname, -// unionname, -// unitcode, -// unioncode -// FROM -// $table -// $condition -// """); -// -// if (year == yyyy) { -// sql.setVar("table", "user"); -// } else { -// sql.setVar("table", "member_his"); -// cnd.andEX("year", "=", year); -// } -// -// cnd.and("member", "=", 1); -// if (ShiroUtil.hasAnyRoles("sysadmin,A06,H03")) { -// cnd.andEX("unionid", "=", unionId); -// } else { -// cnd.andEX("unionid", "=", Vi.getUnionId()); -// } -// cnd.andEX("unitid", "=", unitId); -// if (memberStatus != null) { -// if (Json.fromJsonAsArray(Integer.class, memberStatus).length > 0) { -// cnd.andEX("memberStatus", "in", Json.fromJsonAsArray(Integer.class, memberStatus)); -// } else { -// List status = new ArrayList<>(); -// status.add(MemberStatus.NORMAL.getCode()); -// status.add(MemberStatus.TURN_IN.getCode()); -// status.add(MemberStatus.RESTORE.getCode()); -// SqlExpressionGroup group = new SqlExpressionGroup(); -// group.and("memberStatus", "in", status); -// group.or("memberStatus", "IS", null); -// cnd.and(group); -// } -// } -// -// if (personTypes != null && Json.fromJsonAsArray(String.class, personTypes).length > 0) { -// cnd.andEX("personType", "in", Json.fromJsonAsArray(String.class, personTypes)); -// } -// if (userStates != null && Json.fromJsonAsArray(String.class, userStates).length > 0) { -// cnd.andEX("userState", "in", Json.fromJsonAsArray(String.class, userStates)); -// } -// cnd.asc("unitcode"); -// cnd.asc("unioncode"); -// cnd.asc("memberJoinTime"); -// sql.setCondition(cnd); int yyyy = Calendar.getInstance().get(Calendar.YEAR); - Cnd cnd = MemberUtils.getCnd(null, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus); + Cnd cnd = MemberUtils.getCnd(null, startDate, endDate, unionId, unitId, personTypes, userStates, preparedBys, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus); Sql sql = Sqls.create(""" SELECT u.* from $table diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberStatisticsController.java b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberStatisticsController.java index 24150d3..26a17a0 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberStatisticsController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberStatisticsController.java @@ -4,8 +4,8 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.hutool.core.util.StrUtil; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.dao.CndPlus; +import io.v.nutz.base.utils.Vi; import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.utils.ShiroUtil; import org.apache.commons.lang.StringUtils; diff --git a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberUserTypeController.java b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberUserTypeController.java index e191d28..92fb71c 100644 --- a/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberUserTypeController.java +++ b/src/main/java/io/v/nutz/zhgh/member/controller/inquire/MemberUserTypeController.java @@ -5,10 +5,10 @@ import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.utils.Vi; -import io.v.nutz.zhgh.member.service.MemberService; import io.v.nutz.sys.models.Sys_dict; import io.v.nutz.sys.services.SysDictService; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.member.service.MemberService; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Sqls; diff --git a/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyAuditHandle.java b/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyAuditHandle.java index 6b3596f..aa7f350 100644 --- a/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyAuditHandle.java +++ b/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyAuditHandle.java @@ -1,9 +1,16 @@ package io.v.nutz.zhgh.member.handle; import cn.hutool.core.util.StrUtil; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.base.service.ViService; +import io.v.nutz.base.service.impl.ViServiceImpl; import io.v.nutz.base.utils.MsgApi; import io.v.nutz.base.utils.Roles; import io.v.nutz.base.utils.Vi; +import io.v.nutz.base.utils.ViResource; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.data.model.UserHistory; @@ -12,13 +19,6 @@ import io.v.nutz.zhgh.member.constant.MemberApplyState; import io.v.nutz.zhgh.member.constant.MemberChangeOrigin; import io.v.nutz.zhgh.member.constant.MemberOrigin; import io.v.nutz.zhgh.member.model.MemberApplyRecord; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.base.service.ViService; -import io.v.nutz.base.service.impl.ViServiceImpl; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.base.utils.ViResource; import lombok.Getter; import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Chain; @@ -106,29 +106,29 @@ public enum MemberApplyAuditHandle { MemberApplyToDoHandler.COMPLETE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "基层工会通过" : "基层工会拒绝")); - if (audit.getAuditPass()) { - - Sql sql = Sqls.create(""" - SELECT - su.loginname - FROM - sys_user_role sur - LEFT JOIN sys_user su ON su.id = sur.userId - WHERE - sur.roleId = @roleId - """).setParam("roleId", Roles.H03); - - List mapList = sysUserService.listMap(sql); - - MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record,NutMap.NEW().addv("schoolLeader",mapList)); - -/* mapList.forEach(v -> { -// sendMsg.pushWeChatMsg("会员系统", user.getUsername() + "提交了会员申请待您审核,请前往智慧工会进行审核!", v.getString("loginname")); - });*/ - } else { -// sendMsg.pushWeChatMsg("会员系统", "院级工会拒绝了您的会员申请", user.getLoginname()); - MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName","基层工会拒绝")); - } +// if (audit.getAuditPass()) { +// +// Sql sql = Sqls.create(""" +// SELECT +// su.loginname +// FROM +// sys_user_role sur +// LEFT JOIN sys_user su ON su.id = sur.userId +// WHERE +// sur.roleId = @roleId +// """).setParam("roleId", Roles.H03); +// +// List mapList = sysUserService.listMap(sql); +// +// MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record,NutMap.NEW().addv("schoolLeader",mapList)); +// +///* mapList.forEach(v -> { +//// sendMsg.pushWeChatMsg("会员系统", user.getUsername() + "提交了会员申请待您审核,请前往智慧工会进行审核!", v.getString("loginname")); +// });*/ +// } else { +//// sendMsg.pushWeChatMsg("会员系统", "院级工会拒绝了您的会员申请", user.getLoginname()); +// MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName","基层工会拒绝")); +// } return record; diff --git a/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyToDoHandler.java b/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyToDoHandler.java index 2d1ff27..a27ee68 100644 --- a/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyToDoHandler.java +++ b/src/main/java/io/v/nutz/zhgh/member/handle/MemberApplyToDoHandler.java @@ -1,23 +1,18 @@ package io.v.nutz.zhgh.member.handle; -import io.v.nutz.base.utils.Roles; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.utils.ViResource; import io.v.nutz.sys.models.User; import io.v.nutz.sys.services.SysLocalProcessService; import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl; import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.member.model.MemberApplyRecord; -import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl; -import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; import lombok.Getter; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; -import org.nutz.dao.util.Daos; import org.nutz.lang.util.NutMap; import java.util.List; diff --git a/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeAuditHandle.java b/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeAuditHandle.java index 0d7850f..ac69570 100644 --- a/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeAuditHandle.java +++ b/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeAuditHandle.java @@ -1,21 +1,21 @@ package io.v.nutz.zhgh.member.handle; import cn.hutool.core.date.DateUtil; -import io.v.nutz.base.lang.Enum; import cn.hutool.core.util.StrUtil; +import io.v.nutz.base.lang.Enum; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.base.service.ViService; +import io.v.nutz.base.service.impl.ViServiceImpl; import io.v.nutz.base.utils.Vi; +import io.v.nutz.base.utils.ViResource; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.data.model.UserHistory; import io.v.nutz.zhgh.member.constant.MemberChangeApplyState; import io.v.nutz.zhgh.member.constant.MemberChangeOrigin; import io.v.nutz.zhgh.member.model.MemberChangeRecord; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.base.service.ViService; -import io.v.nutz.base.service.impl.ViServiceImpl; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.base.utils.ViResource; import lombok.Getter; import org.nutz.dao.Cnd; import org.nutz.lang.util.NutMap; @@ -118,7 +118,8 @@ public enum MemberChangeAuditHandle { if (record.getStateId() == MemberChangeApplyState.SUCCESS) { - if (auditService.dao().count(UserHistory.class, Cnd.where("memberChangeRecordId", "=", record.getId())) == 0) { + int count = auditService.dao().count(UserHistory.class, Cnd.where("memberChangeRecordId", "=", record.getId())); + if (count == 0) { UserHistory history = new UserHistory(); Sys_user user = recordViService.dao().fetch(Sys_user.class, record.getUserId()); BeanUtils.copyProperties(user, history); diff --git a/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeHandle.java b/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeHandle.java index 66df750..7e830e5 100644 --- a/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeHandle.java +++ b/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeHandle.java @@ -1,25 +1,26 @@ package io.v.nutz.zhgh.member.handle; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.date.DateUtil; +import io.v.nutz.base.service.ViService; +import io.v.nutz.base.service.impl.ViServiceImpl; +import io.v.nutz.base.utils.ViResource; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.sys.services.SysRoleService; +import io.v.nutz.sys.services.SysUserService; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.data.model.UserHistory; +import io.v.nutz.zhgh.member.MemberMode; import io.v.nutz.zhgh.member.UserMode; import io.v.nutz.zhgh.member.WelfareMemberMode; import io.v.nutz.zhgh.member.constant.MemberStatus; import io.v.nutz.zhgh.member.model.MemberChangeRecord; -import io.v.nutz.base.service.ViService; -import io.v.nutz.base.service.impl.ViServiceImpl; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.sys.services.SysRoleService; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.base.utils.ViResource; import lombok.Getter; import org.nutz.dao.Chain; import org.nutz.dao.Cnd; import org.nutz.lang.Strings; -import org.springframework.beans.BeanUtils; -import java.util.Date; +import java.util.List; /** * 会员变更Handle @@ -37,7 +38,7 @@ public enum MemberChangeHandle { UNIT_CHANGE(UserChangeType.UNIT_CHANGE.getCode()) { @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.UNIT_CHANGE); + archive(record, UserChangeType.UNIT_CHANGE); sysUserService.update(Chain.make("unitid", record.getCurrentUnitId()) .add("unionid", record.getCurrentUnionId()) .add("threeUnitId", record.getCurrentThreeUnitId()), Cnd.where("id", "=", record.getUserId())); @@ -48,14 +49,11 @@ public enum MemberChangeHandle { NEW(UserChangeType.NEW.getCode()) { @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.NEW); - if (null != record.getInsertMember() && record.getInsertMember()){ - UserMode.addMemberRole(record.getUserId()); + archive(record, UserChangeType.NEW); + if (null != record.getUpdateMember() && record.getUpdateMember()){ sysUserService.update(Chain.make("schoolTime", DateUtil.today()),Cnd.where("id","=",record.getUserId())); } - if (null != record.getUpdateWelfareMember() && record.getUpdateWelfareMember()) { - sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()).add("schoolTime", DateUtil.today()), Cnd.where("id", "=", record.getUserId())); - } + updateMemberAndWelfareMember(record); sysUserService.clearCache(); sysRoleService.clearCache(); } @@ -63,105 +61,102 @@ public enum MemberChangeHandle { RESIGN(UserChangeType.RESIGN.getCode()) { @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.RESIGN); + archive(record, UserChangeType.RESIGN); UserMode.removeMemberRole(record.getUserId()); - updateWelfareMember(record); - updateMemberStatus(MemberStatus.TURN_OUT, record.getUserId()); + updateMemberAndWelfareMember(record); +// updateMemberStatus(MemberStatus.TURN_OUT, record.getUserId()); updateUserStateAndPersonType(record); } }, DIE(UserChangeType.DIE.getCode()) { @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.DIE); + archive(record, UserChangeType.DIE); UserMode.removeMemberRole(record.getUserId()); - updateWelfareMember(record); - updateMemberStatus(MemberStatus.WITHDRAWAL, record.getUserId()); + updateMemberAndWelfareMember(record); updateUserStateAndPersonType(record); } }, RETIREMENT(UserChangeType.RETIREMENT.getCode()) { @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.RETIREMENT); + archive(record, UserChangeType.RETIREMENT); UserMode.removeMemberRole(record.getUserId()); - updateWelfareMember(record); - updateMemberStatus(MemberStatus.KEEP, record.getUserId()); + updateMemberAndWelfareMember(record); updateUserStateAndPersonType(record); } }, -// EXPELLED(UserChangeType.EXPELLED.getCode()) { -// @Override -// public void change(MemberChangeRecord record) { -// archive(record.getUserId(), UserChangeType.EXPELLED); -// UserMode.removeMemberRole(record.getUserId()); -// updateWelfareMember(record); -// updateMemberStatus(MemberStatus.EXPELLED, record.getUserId()); -// updateUserStateAndPersonType(record); -// } -// }, + /*EXPELLED(UserChangeType.EXPELLED.getCode()) { + @Override + public void change(MemberChangeRecord record) { + archive(record, UserChangeType.EXPELLED); + UserMode.removeMemberRole(record.getUserId()); + updateWelfareMember(record); + updateUserStateAndPersonType(record); + } + },*/ RESTORE(UserChangeType.RESTORE.getCode()) { @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.RESTORE); + archive(record, UserChangeType.RESTORE); UserMode.addMemberRole(record.getUserId()); - updateMemberStatus(MemberStatus.RESTORE, record.getUserId()); - if (record.getUpdateWelfareMember()) { - sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()), Cnd.where("id", "=", record.getUserId())); - } + updateMemberAndWelfareMember(record); } }, WITHDRAWAL(UserChangeType.WITHDRAWAL.getCode()) { @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.WITHDRAWAL); + archive(record, UserChangeType.WITHDRAWAL); UserMode.removeMemberRole(record.getUserId()); - updateWelfareMember(record); - updateMemberStatus(MemberStatus.WITHDRAWAL, record.getUserId()); + updateMemberAndWelfareMember(record); updateUserStateAndPersonType(record); } }, CARD_CHANGE(UserChangeType.CARD_CHANGE.getCode()){ @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.CARD_CHANGE); - if (Strings.isNotBlank(record.getIdCard())) { - sysUserService.update(Chain.make("idcard", record.getIdCard()), Cnd.where("id", "=", record.getUserId())); + archive(record, UserChangeType.CARD_CHANGE); + if (Strings.isNotBlank(record.getChangeIdCard())) { + sysUserService.update(Chain.make("idcard", record.getChangeIdCard()), Cnd.where("id", "=", record.getUserId())); } } }, MOBILE_CHANGE(UserChangeType.MOBILE_CHANGE.getCode()){ @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.MOBILE_CHANGE); - if (Strings.isNotBlank(record.getMobile())) { - sysUserService.update(Chain.make("mobile", record.getMobile()), Cnd.where("id", "=", record.getUserId())); + archive(record, UserChangeType.MOBILE_CHANGE); + if (Strings.isNotBlank(record.getChangeMobile())) { + sysUserService.update(Chain.make("mobile", record.getChangeMobile()), Cnd.where("id", "=", record.getUserId())); } } - }, - EDUCATION_CHANGE(UserChangeType.EDUCATION_CHANGE.getCode()){ + }; + /*EDUCATION_CHANGE(UserChangeType.EDUCATION_CHANGE.getCode()){ @Override public void change(MemberChangeRecord record) { - archive(record.getUserId(), UserChangeType.EDUCATION_CHANGE); + archive(record, UserChangeType.EDUCATION_CHANGE); if (Strings.isNotBlank(record.getEducation())) { sysUserService.update(Chain.make("education", record.getEducation()), Cnd.where("id", "=", record.getUserId())); } } - }; + };*/ /** * 存档 * - * @param userId + * @param record * @param changeType */ - private static void archive(String userId, UserChangeType changeType) { -// Sys_user user = sysUserService.fetch(userId); -// UserHistory history = new UserHistory(); -// BeanUtils.copyProperties(user,history); -// history.setChangeTime(new Date()); -// history.setChangeType(changeType.getCode()); -// sysUserService.insert(history); + private static void archive(MemberChangeRecord record, UserChangeType changeType) { + int count = sysUserService.dao().count(UserHistory.class, Cnd.where("memberChangeRecordId", "=", record.getId())); + if (count == 0) { + Sys_user user = sysUserService.fetch(record.getUserId()); + UserHistory history = new UserHistory(); + BeanUtil.copyProperties(user, history); + history.setChangeTime(DateUtil.date()); + history.setChangeType(changeType.getCode()); + history.setChangeTypes(List.of(changeType.getCode())); + sysUserService.insert(history); + } } @@ -170,14 +165,17 @@ public enum MemberChangeHandle { * * @param record 变更记录 */ - public static void updateWelfareMember(MemberChangeRecord record) { - //record.getUpdateWelfareMember() (true:增加福利会员 false:取消福利会员);针对入会(恢复) - if (null != record.getUpdateWelfareMember() && record.getUpdateWelfareMember()) { - sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()), Cnd.where("id", "=", record.getUserId())); + public static void updateMemberAndWelfareMember(MemberChangeRecord record) { + if (null != record.getUpdateWelfareMember()) { + sysUserService.update(Chain.make("welfareMember", record.getUpdateWelfareMember() ? WelfareMemberMode.NORMAL.getCode() : WelfareMemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId())); } - //record.getUpdateWelfare() (true:取消 false:不取消);针对(退休、离职、退会、去世) - if (null != record.getUpdateWelfare() && record.getUpdateWelfare()){ - sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId())); + if (null != record.getUpdateMember()){ + sysUserService.update(Chain.make("member", record.getUpdateMember() ? MemberMode.NORMAL.getCode() : MemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId())); + } + if (null != record.getUpdateMember() && record.getUpdateMember()) { + UserMode.addMemberRole(record.getUserId()); + } else { + UserMode.removeMemberRole(record.getUserId()); } } @@ -198,13 +196,12 @@ public enum MemberChangeHandle { * @param record 变更记录 */ public static void updateUserStateAndPersonType(MemberChangeRecord record){ - Chain chain = null; - if (Strings.isNotBlank(record.getUserState()) && Strings.isNotBlank(record.getPersonType())){ - chain = Chain.make("userState",record.getUserState()).add("personType",record.getPersonType()); - } else if (Strings.isNotBlank(record.getUserState()) && Strings.isBlank(record.getPersonType())){ - chain = Chain.make("userState",record.getUserState()); - } else if (Strings.isBlank(record.getUserState()) && Strings.isNotBlank(record.getPersonType())){ - chain = Chain.make("personType",record.getPersonType()); + Chain chain = Chain.make("eCard",null); + if (Strings.isNotBlank(record.getChangeUserState())) { + chain.add("userState", record.getChangeUserState()); + } + if (Strings.isNotBlank(record.getChangePersonType())) { + chain.add("personType", record.getChangePersonType()); } sysUserService.update(chain,Cnd.where("id","=",record.getUserId())); } diff --git a/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeToDoHandler.java b/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeToDoHandler.java index 8e79787..c6c9e17 100644 --- a/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeToDoHandler.java +++ b/src/main/java/io/v/nutz/zhgh/member/handle/MemberChangeToDoHandler.java @@ -7,7 +7,6 @@ import io.v.nutz.sys.models.User; import io.v.nutz.sys.services.SysLocalProcessService; import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl; import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.member.model.MemberApplyRecord; import io.v.nutz.zhgh.member.model.MemberChangeRecord; import io.v.nutz.zhgh.member.service.MemberService; import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl; @@ -107,19 +106,19 @@ public enum MemberChangeToDoHandler { CREATE_UNION_TASK() { @Override public void exec(MemberChangeRecord record, NutMap extra) { - List unionLeader = Vi.getUnionLeader(record.getUserId()); +// List unionLeader = Vi.getUnionLeader(record.getUserId()); - localProcessService.createTask( - "member_change_record@" + record.getId(), - "member_change_record_union_audit", - "基层工会审核", - ShiroUtil.getUserId(), - unionLeader, - "/platform/member/change/audit/union", - "/platform/member/change/audit/union", - "/platform/member/change/audit/union", - "/platform/member/change/audit/union" - ); +// localProcessService.createTask( +// "member_change_record@" + record.getId(), +// "member_change_record_union_audit", +// "基层工会审核", +// ShiroUtil.getUserId(), +// unionLeader, +// "/platform/member/change/audit/union", +// "/platform/member/change/audit/union", +// "/platform/member/change/audit/union", +// "/platform/member/change/audit/union" +// ); localProcessService.updateProcessNodeName("member_change_record@" + record.getId(), "基层工会审核"); @@ -150,32 +149,32 @@ public enum MemberChangeToDoHandler { CREATE_SCHOOL_TASK() { @Override public void exec(MemberChangeRecord record, NutMap extra) { - Sql sql = Sqls.create(""" - SELECT - u.loginname - FROM - sys_user_role sur - LEFT JOIN sys_user u ON u.id = sur.userid - WHERE - sur.roleId = @roleId - GROUP BY - sur.userId - """).setParam("roleId", Roles.H03); - List list = (List) Daos.query(dao, sql.toString(), Sqls.callback.maps()); - List schoolLeader = list.stream().map(v -> v.getString("loginname")).collect(Collectors.toList()); - localProcessService.createTask( - "member_change_record@" + record.getId(), - "member_change_record_school_audit", - "校工会审核", - ShiroUtil.getUserId(), - schoolLeader, - "/platform/member/change/audit/school", - "/platform/member/change/audit/school", - "/platform/member/change/audit/school", - "/platform/member/change/audit/school" - ); - - localProcessService.updateProcessNodeName("member_change_record@" + record.getId(), "校工会审核"); +// Sql sql = Sqls.create(""" +// SELECT +// u.loginname +// FROM +// sys_user_role sur +// LEFT JOIN sys_user u ON u.id = sur.userid +// WHERE +// sur.roleId = @roleId +// GROUP BY +// sur.userId +// """).setParam("roleId", Roles.H03); +// List list = (List) Daos.query(dao, sql.toString(), Sqls.callback.maps()); +// List schoolLeader = list.stream().map(v -> v.getString("loginname")).collect(Collectors.toList()); +// localProcessService.createTask( +// "member_change_record@" + record.getId(), +// "member_change_record_school_audit", +// "校工会审核", +// ShiroUtil.getUserId(), +// schoolLeader, +// "/platform/member/change/audit/school", +// "/platform/member/change/audit/school", +// "/platform/member/change/audit/school", +// "/platform/member/change/audit/school" +// ); +// +// localProcessService.updateProcessNodeName("member_change_record@" + record.getId(), "校工会审核"); } }, diff --git a/src/main/java/io/v/nutz/zhgh/member/model/MemberApplyRecord.java b/src/main/java/io/v/nutz/zhgh/member/model/MemberApplyRecord.java index 70ad925..06f22b3 100644 --- a/src/main/java/io/v/nutz/zhgh/member/model/MemberApplyRecord.java +++ b/src/main/java/io/v/nutz/zhgh/member/model/MemberApplyRecord.java @@ -64,11 +64,6 @@ public class MemberApplyRecord { @ColDefine(type = ColType.VARCHAR, width = 32) public String schoolAuditId; - @Column - @Comment("个人签字Id") - @ColDefine(type = ColType.VARCHAR, width = 32) - public String signId; - @One(field = "unionAuditId") public Audit unionAudit; diff --git a/src/main/java/io/v/nutz/zhgh/member/model/MemberChangeRecord.java b/src/main/java/io/v/nutz/zhgh/member/model/MemberChangeRecord.java index a2ffd92..1b64495 100644 --- a/src/main/java/io/v/nutz/zhgh/member/model/MemberChangeRecord.java +++ b/src/main/java/io/v/nutz/zhgh/member/model/MemberChangeRecord.java @@ -1,11 +1,11 @@ package io.v.nutz.zhgh.member.model; -import io.v.nutz.zhgh.member.constant.MemberChangeOrigin; -import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import io.v.nutz.base.model.Audit; import io.v.nutz.base.model.AuditState; import io.v.nutz.sys.models.Sys_union; import io.v.nutz.sys.models.Sys_unit; +import io.v.nutz.zhgh.member.constant.MemberChangeOrigin; +import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode; import lombok.Data; import lombok.experimental.Accessors; import org.nutz.dao.entity.annotation.*; @@ -124,40 +124,30 @@ public class MemberChangeRecord { @ColDefine(type = ColType.BOOLEAN) private Boolean updateMember; - @Column - @Comment("福利会员身份(true:取消 false:不取消);针对(退休、离职、退会、去世)") - @ColDefine(type = ColType.BOOLEAN) - private Boolean updateWelfare; - - @Column - @Comment("是否增加会员身份(true:增加 false:不增加)") - @ColDefine(type = ColType.BOOLEAN) - private Boolean insertMember; - @Column @Comment("身份证号异动") @ColDefine(type = ColType.VARCHAR, width = 30) - private String idCard; + private String changeIdCard; @Column @Comment("手机号异动") @ColDefine(type = ColType.VARCHAR, width = 30) - private String mobile; + private String changeMobile; @Column @Comment("学历异动") @ColDefine(type = ColType.VARCHAR, width = 30) - private String education; + private String changeEducation; @Column @Comment("在职状态") @ColDefine(type = ColType.VARCHAR, width = 10) - private String userState; + private String changeUserState; @Column @Comment("人员类别") @ColDefine(type = ColType.VARCHAR, width = 10) - private String personType; + private String changePersonType; @Column @Comment("任务id") diff --git a/src/main/java/io/v/nutz/zhgh/member/model/MemberCheckTask.java b/src/main/java/io/v/nutz/zhgh/member/model/MemberCheckTask.java index 11d2f3b..6678b61 100644 --- a/src/main/java/io/v/nutz/zhgh/member/model/MemberCheckTask.java +++ b/src/main/java/io/v/nutz/zhgh/member/model/MemberCheckTask.java @@ -67,4 +67,9 @@ public class MemberCheckTask extends BaseModel { @Comment("创建模式1.小组核对2.个人核对") @ColDefine(type = ColType.INT) private Integer createTaskMode; + + @Column + @Comment("核对模式(字典)") + @ColDefine(type = ColType.INT) + private Integer welfareCheckFilterMode; } diff --git a/src/main/java/io/v/nutz/zhgh/member/service/MemberHistoryService.java b/src/main/java/io/v/nutz/zhgh/member/service/MemberHistoryService.java index 845acca..a46e202 100644 --- a/src/main/java/io/v/nutz/zhgh/member/service/MemberHistoryService.java +++ b/src/main/java/io/v/nutz/zhgh/member/service/MemberHistoryService.java @@ -1,7 +1,7 @@ package io.v.nutz.zhgh.member.service; -import io.v.nutz.zhgh.member.model.MemberHistory; import io.v.nutz.base.service.ViService; +import io.v.nutz.zhgh.member.model.MemberHistory; /** * Todo diff --git a/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberCheckPersonalServiceImpl.java b/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberCheckPersonalServiceImpl.java index 209efae..4e8db7b 100644 --- a/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberCheckPersonalServiceImpl.java +++ b/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberCheckPersonalServiceImpl.java @@ -1,7 +1,7 @@ package io.v.nutz.zhgh.member.service.impl; -import io.v.nutz.zhgh.member.service.MemberCheckPersonalService; import io.v.nutz.base.service.impl.ViServiceImpl; +import io.v.nutz.zhgh.member.service.MemberCheckPersonalService; import org.nutz.dao.Dao; import org.nutz.ioc.loader.annotation.IocBean; diff --git a/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberHistoryServiceImpl.java b/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberHistoryServiceImpl.java index 4c37127..94efeb1 100644 --- a/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberHistoryServiceImpl.java +++ b/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberHistoryServiceImpl.java @@ -1,11 +1,11 @@ package io.v.nutz.zhgh.member.service.impl; import io.v.nutz.base.service.AsyncService; -import io.v.nutz.zhgh.member.model.MemberHistory; -import io.v.nutz.zhgh.member.service.MemberHistoryService; import io.v.nutz.base.service.impl.ViServiceImpl; import io.v.nutz.sys.services.SysRoleService; import io.v.nutz.sys.services.SysUserService; +import io.v.nutz.zhgh.member.model.MemberHistory; +import io.v.nutz.zhgh.member.service.MemberHistoryService; import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Dao; import org.nutz.dao.Sqls; diff --git a/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberServiceImpl.java b/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberServiceImpl.java index 2d55cf7..b2f3f08 100644 --- a/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberServiceImpl.java +++ b/src/main/java/io/v/nutz/zhgh/member/service/impl/MemberServiceImpl.java @@ -3,9 +3,9 @@ package io.v.nutz.zhgh.member.service.impl; import cn.wizzer.framework.page.Pagination; import io.v.nutz.base.dao.CndPlus; import io.v.nutz.base.query.PageForm; -import io.v.nutz.zhgh.member.service.MemberService; import io.v.nutz.base.service.impl.ViServiceImpl; import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.zhgh.member.service.MemberService; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; import org.nutz.dao.Sqls; diff --git a/src/main/java/io/v/nutz/zhgh/member/utils/MemberUtils.java b/src/main/java/io/v/nutz/zhgh/member/utils/MemberUtils.java index 1dcfb7d..f58e771 100644 --- a/src/main/java/io/v/nutz/zhgh/member/utils/MemberUtils.java +++ b/src/main/java/io/v/nutz/zhgh/member/utils/MemberUtils.java @@ -1,12 +1,12 @@ package io.v.nutz.zhgh.member.utils; import cn.hutool.core.util.StrUtil; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.sys.models.Sys_user; import io.v.nutz.zhgh.activity.models.ActivityUserCnd; import io.v.nutz.zhgh.data.constant.UserChangeType; import io.v.nutz.zhgh.member.MemberMode; import io.v.nutz.zhgh.member.constant.MemberStatus; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.sys.models.Sys_user; import org.apache.commons.lang.ArrayUtils; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; @@ -39,10 +39,6 @@ public class MemberUtils { member = MemberMode.NONE.getCode(); memberStatus = MemberStatus.TURN_OUT.getCode(); } - if (type == UserChangeType.DIE.getCode()) { - member = MemberMode.NONE.getCode(); - memberStatus = MemberStatus.WITHDRAWAL.getCode(); - } if (type == UserChangeType.RETIREMENT.getCode()) { member = MemberMode.NONE.getCode(); memberStatus = MemberStatus.KEEP.getCode(); @@ -71,6 +67,7 @@ public class MemberUtils { String[] unitId, String[] personTypes, String[] userStates, + String[] preparedBys, String[] memberTypes, String[] sexTypes, String[] age, @@ -168,6 +165,7 @@ public class MemberUtils { cnd.andEX("u.campus", EQ_OR_NEQ_OP, campus); cnd.andEX("u.personType", IN_OR_NIN_OP, personTypes); cnd.andEX("u.userState", IN_OR_NIN_OP, userStates); + cnd.andEX("u.preparedBy", IN_OR_NIN_OP, preparedBys); cnd.andEX("u.sex", IN_OR_NIN_OP, sexTypes); cnd.andEX("sur.jdhid", EQ_OR_NEQ_OP, teacherMeetingId); cnd.andEX("sur.roleid", IN_OR_NIN_OP, roleIds); diff --git a/src/main/java/io/v/nutz/zhgh/mobile/activity/unionActivity/UnionActivityRegisterController.java b/src/main/java/io/v/nutz/zhgh/mobile/activity/unionActivity/UnionActivityRegisterController.java index 7ed1fc9..48226a4 100644 --- a/src/main/java/io/v/nutz/zhgh/mobile/activity/unionActivity/UnionActivityRegisterController.java +++ b/src/main/java/io/v/nutz/zhgh/mobile/activity/unionActivity/UnionActivityRegisterController.java @@ -20,6 +20,7 @@ import org.nutz.dao.FieldFilter; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; import org.nutz.dao.util.Daos; +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; @@ -300,8 +301,6 @@ public class UnionActivityRegisterController { @ViReturn @RequiresAuthentication public Object searchNoRegisterUser(String searchKey, String activityId) { - - ActivityTissue tissue = simpleService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", activityId)); Sql sql = Sqls.create(""" @@ -317,10 +316,16 @@ public class UnionActivityRegisterController { """); String unionId = Vi.getUnionId(); Cnd cnd = Cnd.NEW(); - if (tissue.getSignUpMethod() != 3) { + if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) { cnd.andEX("unionId", "=", unionId); } - cnd.and(Cnd.exps(Cnd.likeEX("username", searchKey.trim())).or(Cnd.likeEX("loginname", searchKey.trim()))); + if (StrUtil.isNotBlank(searchKey)){ + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.or("username", "LIKE", "%" + searchKey + "%"); + seg.or("loginname", "LIKE", "%" + searchKey + "%"); + cnd.and(seg); + } +// cnd.and(Cnd.exps(Cnd.likeEX("username", searchKey.trim())).or(Cnd.likeEX("loginname", searchKey.trim()))); if (tissue.getGroupId() != null) { cnd.and(new Static(""" id IN ( SELECT userid FROM activity_user_scope WHERE groupId IN ( SELECT groupId FROM activity_tissue WHERE id = '%s' AND groupId IS NOT NULL ) ) diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceAgentController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceAgentController.java index 012108b..903d2d4 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceAgentController.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceAgentController.java @@ -53,7 +53,7 @@ public class CondolenceAgentController { List result = new ArrayList<>(); - result.add(new NutMap().setv("title", title).setv("url", UCR).setv("iconClass", vi.getIconByPath(UCR)).setv("label", "待分工会审核").setv("number", getUcrCount())); + result.add(new NutMap().setv("title", title).setv("url", UCR).setv("iconClass", vi.getIconByPath(UCR)).setv("label", "待院级工会审核").setv("number", getUcrCount())); result.add(new NutMap().setv("title", title).setv("url", FR).setv("iconClass", vi.getIconByPath(FR)).setv("label", "待二级党组织审核").setv("number", getFrCount())); result.add(new NutMap().setv("title", title).setv("url", VCR).setv("iconClass", vi.getIconByPath(VCR)).setv("label", "待校工会审核").setv("number", getVcrCount())); result.add(new NutMap().setv("title", title).setv("url", ECR).setv("iconClass", vi.getIconByPath(ECR)).setv("label", "待工会常务副主席审核").setv("number", getEcrCount())); @@ -75,7 +75,7 @@ public class CondolenceAgentController { """); cnd.and("con.state_id", "=", 2000); if (!ShiroUtil.hasAnyRoles("sysadmin")) { - cnd.and("us.unionid", "=", vi.getUnionId()); + cnd.and("us.unionid", "=", Vi.getUnionId()); } sql.setCondition(cnd); return condolenceService.count(sql); diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceFrCon.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceFrCon.java index 5aedfee..bfc7b04 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceFrCon.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceFrCon.java @@ -29,6 +29,7 @@ import org.nutz.mvc.annotation.Param; * @DateTime: 2020/11/20 11:49 * @Description: 会计审核 */ +// 江南大学,校工会审核 @At("/platform/fw/condolence/fr") @IocBean @RequiresAuthentication @@ -44,6 +45,11 @@ public class CondolenceFrCon { public void index() { } + @At("/h5") + @Ok("beetl:/mobile/condolence/schoolunionaudit/index.html") + @RequiresPermissions("fw.condolence.fr") + public void h5() { + } @At @ViReturn @@ -66,6 +72,7 @@ public class CondolenceFrCon { be.username be_username, be.loginname be_loginname, sqr.username sqr_username, + sqr.loginname sqr_loginname, be.unitname be_unitname, be.unionname be_unionname, state.state_name, diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceReadCon.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceReadCon.java index eced31b..5bcedf1 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceReadCon.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceReadCon.java @@ -16,8 +16,8 @@ import io.v.nutz.base.utils.ViTool; import io.v.nutz.sys.models.Sys_signature; import io.v.nutz.web.commons.base.Globals; import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.model.condolence.CondolenceType; import io.v.nutz.zhgh.zgfw.model.condolence.Condolence; +import io.v.nutz.zhgh.zgfw.model.condolence.CondolenceType; import io.v.nutz.zhgh.zgfw.service.CondolenceService; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.authz.annotation.RequiresAuthentication; @@ -111,7 +111,7 @@ public class CondolenceReadCon { if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh02")) { SqlExpressionGroup group2 = new SqlExpressionGroup(); if (ShiroUtil.hasAnyRoles("gh01,H04")) { - group2.or("be.unionid", "=", vi.getUnionId()); + group2.or("be.unionid", "=", Vi.getUnionId()); /*group2.or("con.state_id", ">=", 2000);*/ } /* if (ShiroUtil.hasAnyRoles("SchoolUnionAccountant")) { diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceUcrCon.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceUcrCon.java index 75c137f..6d58648 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceUcrCon.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceUcrCon.java @@ -53,6 +53,12 @@ public class CondolenceUcrCon { public void index() { } + @At("/h5") + @Ok("beetl:/mobile/condolence/branchunionaudit/index.html") + @RequiresPermissions("fw.condolence.ucr") + public void h5() { + } + @At @ViReturn @RequiresPermissions("fw.condolence.ucr") @@ -74,6 +80,7 @@ public class CondolenceUcrCon { be.username be_username, be.loginname be_loginname, sqr.username sqr_username, + sqr.loginname sqr_loginname, be.unitname be_unitname, be.unionname be_unionname, state.state_name, diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceVcrCon.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceVcrCon.java index 32988b7..014a813 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceVcrCon.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/condolence/CondolenceVcrCon.java @@ -5,9 +5,12 @@ import io.v.nutz.base.model.Review; import io.v.nutz.base.service.ReviewService; import io.v.nutz.base.utils.DateUtil; import io.v.nutz.base.utils.Vi; +import io.v.nutz.sys.models.Sys_user; +import io.v.nutz.sys.services.SysMsgService; import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.zgfw.handler.condolence.CondolenceToDoHandler; import io.v.nutz.zhgh.zgfw.model.condolence.Condolence; +import io.v.nutz.zhgh.zgfw.model.condolence.CondolenceType; import io.v.nutz.zhgh.zgfw.service.CondolenceService; import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -22,12 +25,15 @@ import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Param; +import java.util.List; + /** * @Author: 1V * @DateTime: 2020/11/20 11:49 * @Description: 校工会审核 */ -@At({"/platform/fw/condolence/vcr","/platform/fw/condolence/vcr/school"}) +// 江南大学,校工会主席审核 +@At({"/platform/fw/condolence/vcr", "/platform/fw/condolence/vcr/school"}) @IocBean @RequiresAuthentication @Ok("json") @@ -36,27 +42,36 @@ public class CondolenceVcrCon { @Inject private Vi vi; + @Inject + private SysMsgService sysMsgService; + @At("") @Ok("beetl:/platform/zgfw/condolence/vcr.html") @RequiresPermissions("fw.condolence.vcr") public void index() { } + @At("/h5") + @Ok("beetl:/mobile/condolence/schoolchairmanaudit/index.html") + @RequiresPermissions("fw.condolence.vcr") + public void h5() { + } + @At @ViReturn @RequiresPermissions("fw.condolence.vcr") - public Object pageData(@Param(value = "year",required = false) String year, - @Param(value = "unitId",required = false) String unitId, - @Param(value = "unionId",required = false) String unionId, - @Param(value = "isAudit",required = false) Boolean isAudit, - @Param(value = "type",required = false) String type, - @Param(value = "way",required = false) String way, - @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) { + public Object pageData(@Param(value = "year", required = false) String year, + @Param(value = "unitId", required = false) String unitId, + @Param(value = "unionId", required = false) String unionId, + @Param(value = "isAudit", required = false) Boolean isAudit, + @Param(value = "type", required = false) String type, + @Param(value = "way", required = false) String way, + @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 con.*, @@ -64,6 +79,7 @@ public class CondolenceVcrCon { be.username be_username, be.loginname be_loginname, sqr.username sqr_username, + sqr.loginname sqr_loginname, be.unitname be_unitname, be.unionname be_unionname, state.state_name, @@ -130,12 +146,26 @@ public class CondolenceVcrCon { } condolenceService.updateIgnoreNull(condolence); CondolenceToDoHandler.COMPLETE_SCHOOL_TASK.exec(condolence, review.getOpinion()); - if (pass == 1){ + if (pass == 1) { CondolenceToDoHandler.COMPLETE_PROCESS.exec(condolence, review.getOpinion()); - } else if (pass == 2){ + } else if (pass == 2) { CondolenceToDoHandler.CREATE_BACK_SCHOOL_TASK.exec(condolence, review.getOpinion()); } - CondolenceToDoHandler.COMPLETE_PROCESS.exec(condolence,null); + CondolenceToDoHandler.COMPLETE_PROCESS.exec(condolence, null); + + if (condolence.getState_id().equals("2040") || condolence.getState_id().equals("2050")) { + List unionLeaders = condolenceService.getUnionLeader(condolence.getManager()); + Sys_user beUser = condolenceService.dao().fetch(Sys_user.class, condolence.getBe_user()); + CondolenceType condolenceType = condolenceService.dao().fetch(CondolenceType.class, condolence.getType()); + + String note = """ +

您的申报已审批通过,请参照以下提示跟进:

1.慰问事项为生病住院、去世、直系亲属去世,慰问金线上申报审批完成后,不需要再提交纸质材料。

2.慰问事项为结婚和生育的,审核通过后请将报销材料尽快提交至校工会(行政楼A426办公室)周学军老师处。注意:报销发票上须有分工会主席和经办人的签字;购买慰问品须有公务卡支付记录,如未使用公务卡,请提交支付记录和公务卡结算审批表(所在单位审核签字)。

3.各类慰问金每月结算一次。当月审核通过且报销材料提交齐全的,校工会将于次月第一周统一办理慰问金(慰问品报销)上卡,材料不齐全的推迟上卡。

+ """; + for (String unionLeader : unionLeaders) { + sysMsgService.sendMsg(unionLeader,"【职工慰问】-" + beUser.getUsername(),note,ShiroUtil.getUserId()); + } + } + return null; } diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultAgentController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultAgentController.java deleted file mode 100644 index 277f27c..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultAgentController.java +++ /dev/null @@ -1,126 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.utils.Vi; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.nutz.dao.Cnd; -import org.nutz.dao.Sqls; -import org.nutz.dao.sql.Sql; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.lang.util.NutMap; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author zhf - * @date 2021/3/22 9:41 - * @description 困难帮扶代办事项 - */ - -@IocBean -@Ok("json:full") -@At("/platform/difficult/agent") -public class DifficultAgentController { - - - @Inject - private Vi vi; - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - private static final String UNIONCHAIRMAN = "/platform/fw/difficulty/unionchairman"; - private static final String SCHOOLMANAGER = "/platform/fw/difficulty/schoolmanager"; - private static final String SCHOOLVICECHAIRMAN = "/platform/fw/difficulty/schoolvicechairman"; - private static final String SCHOOLSTANDING = "/platform/fw/difficulty/schoolstanding"; - - - @At - @ViReturn - public Object getAgenda() { - final String title = "【困难帮扶】"; - - List result = new ArrayList<>(); - - if (ShiroUtil.hasAnyRoles("sysadmin")) { - result.add(new NutMap().setv("title", title).setv("url", UNIONCHAIRMAN).setv("iconClass", vi.getIconByPath(UNIONCHAIRMAN)).setv("label", "待分工会审核").setv("number", getUnionChairmanCount())); - result.add(new NutMap().setv("title", title).setv("url", SCHOOLMANAGER).setv("iconClass", vi.getIconByPath(SCHOOLMANAGER)).setv("label", "待校工会审核").setv("number", getSchoolManagerCount())); - //暂时没用到 - result.add(new NutMap().setv("title", title).setv("url", SCHOOLVICECHAIRMAN).setv("iconClass", vi.getIconByPath(SCHOOLVICECHAIRMAN)).setv("label", "待校工会副主席审核").setv("number", getSchoolviceChairmanCount())); - //暂时没用到 - result.add(new NutMap().setv("title", title).setv("url", SCHOOLSTANDING).setv("iconClass", vi.getIconByPath(SCHOOLSTANDING)).setv("label", "待校工会常务副主席审核").setv("number", getSchoolStandingCount())); - } else { - if (ShiroUtil.hasAnyRoles("H04,gh01")) { - result.add(new NutMap().setv("title", title).setv("url", UNIONCHAIRMAN).setv("iconClass", vi.getIconByPath(UNIONCHAIRMAN)).setv("label", "待分工会审核").setv("number", getUnionChairmanCount())); - } - if (ShiroUtil.hasAnyRoles("A06,wyh02")) { - result.add(new NutMap().setv("title", title).setv("url", SCHOOLMANAGER).setv("iconClass", vi.getIconByPath(SCHOOLMANAGER)).setv("label", "待校工会审核").setv("number", getSchoolManagerCount())); - - }//暂时没用到 - if (ShiroUtil.hasRole("wyh01")) { - result.add(new NutMap().setv("title", title).setv("url", SCHOOLVICECHAIRMAN).setv("iconClass", vi.getIconByPath(SCHOOLVICECHAIRMAN)).setv("label", "待校工会副主席审核").setv("number", getSchoolviceChairmanCount())); - - }//暂时没用到 - if (ShiroUtil.hasRole("wyh02")) { - result.add(new NutMap().setv("title", title).setv("url", SCHOOLSTANDING).setv("iconClass", vi.getIconByPath(SCHOOLSTANDING)).setv("label", "待校工会常务副主席审核").setv("number", getSchoolStandingCount())); - - } - } - - return result; - } - - - /** - * 待工会主席审核 - * - * @return - */ - private Integer getUnionChairmanCount() { - Cnd cnd = Cnd.NEW(); - Sql sql = Sqls.create(""" - SELECT COUNT(1) FROM zgfw_knbf bf LEFT JOIN `user` us ON bf.sqr=us.id $condition - """); - - cnd.and("bf.zt", "=", 100); - if (!ShiroUtil.hasAnyRoles("sysadmin")) { - cnd.and("us.unionid", "=", vi.getUnionId()); - } - sql.setCondition(cnd); - return zgfwKnbfService.count(sql); - } - - /** - * 待校工会审核 - * - * @return - */ - private Integer getSchoolManagerCount() { - return zgfwKnbfService.count(Cnd.where("zt", "=", 200)); - } - - /** - * 待校工会副主席审核 - * - * @return - */ - private Integer getSchoolviceChairmanCount() { - return zgfwKnbfService.count(Cnd.where("zt", "=", 300)); - } - - /** - * 待校工会常务副主席审核 - * - * @return - */ - private Integer getSchoolStandingCount() { - return zgfwKnbfService.count(Cnd.where("zt", "=", 400)); - } - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultBranchUnionAuditController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultBranchUnionAuditController.java new file mode 100644 index 0000000..c5e4c27 --- /dev/null +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultBranchUnionAuditController.java @@ -0,0 +1,153 @@ +package io.v.nutz.zhgh.zgfw.controller.difficult; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import cn.wizzer.framework.base.Result; +import cn.wizzer.framework.page.Pagination; +import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.base.utils.Vi; +import io.v.nutz.sys.services.SysLocalProcessService; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler; +import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; +import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.aop.interceptor.ioc.TransAop; +import org.nutz.dao.Chain; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.dao.util.cri.SqlExpressionGroup; +import org.nutz.ioc.aop.Aop; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +import java.util.Date; +import java.util.Map; + +@At("/platform/difficulty/branchUnionAudit") +@Ok("json:full") +@IocBean +public class DifficultBranchUnionAuditController { + + @Inject + private ZgfwKnbfService zgfwKnbfService; + @Inject + private AuditService auditService; + @Inject + private Vi vi; + @Inject + private Dao dao; + @Inject + private SysLocalProcessService sysLocalProcessService; + + @At("") + @Ok("beetl:/platform/zgfw/difficulty/branchUnionAudit.html") + @RequiresPermissions("difficulty.branchUnionAudit") + public void index() { + } + + @At("/h5") + @Ok("beetl:/mobile/difficulty/branchunionaudit/index.html") + @RequiresPermissions("difficulty.branchUnionAudit") + public void h5() { + } + + @At + @ViReturn + @RequiresPermissions("difficulty.branchUnionAudit") + public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit, + @Param(value = "year", required = false) Integer year, + @Param(value = "unitId", required = false) String unitId, + @Param(value = "unionId", required = false) String unionId, PageForm page) { + Cnd cnd = Cnd.NEW(); + Sql sql = Sqls.create(""" + SELECT + info.*, + s.state_name + FROM + `zgfw_knbf` info + LEFT JOIN state s ON s.state_id = info.stateId + $condition + """); + + cnd.and("info.stateId", isAudit ? ">" : "=", 3000); + + if (!ShiroUtil.hasAnyRoles("sysadmin")) { + cnd.and("info.unionId", "=", Vi.getUnionId()); + } + cnd.andEX("YEAR(info.applyTime)", "=", year); + cnd.andEX("info.unitId", "=", unitId); + cnd.andEX("info.unionId", "=", unionId); + + if (StrUtil.isNotBlank(page.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.orLike("info.userName", page.getSearchKeyword()); + seg.orLike("info.loginName", page.getSearchKeyword()); + cnd.and(seg); + } + + sql.setCondition(cnd); + Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql); + return Result.success(pagination); + } + + + @At + @ViReturn + @RequiresPermissions("difficulty.branchUnionAudit") + @Aop(TransAop.READ_COMMITTED) + public Result doEdit(String id) { + dao.update(Zgfw_knbf.class, Chain.make("stateId", 3000) + .add("branchUnionAuditId", null), + Cnd.where("id", "=", id)); + //待办撤回 + sysLocalProcessService.revokeTask("zgfw_knbf@" + id, "分工会审核"); + return Result.success(); + } + + + @At + @ViReturn + @RequiresPermissions("difficulty.branchUnionAudit") + @Aop(TransAop.READ_COMMITTED) + public Object doReview(String id, Integer pass, double money, Audit audit) { + audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); + audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); + audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); + audit.setAuditTime(new Date()); + audit.setExt(JSONUtil.parseObj(Map.of("money", money))); + audit = dao.insert(audit); + + Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); + if (pass == 1) { + //不通过 + zgfw_knbf.setStateId(3010); + } else if (pass == 2) { + //退回 + zgfw_knbf.setStateId(3020); + } else { + //通过 + zgfw_knbf.setStateId(3030); + } + zgfw_knbf.setBranchUnionAuditId(audit.getId()); + zgfwKnbfService.updateIgnoreNull(zgfw_knbf); + + if (pass == 2) { + DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf); + } else if (pass == 3) { + DifficultToDoHandler.CREATE_FINANCE_TASK.exec(zgfw_knbf); + } + DifficultToDoHandler.COMPLETE_UNION_TASK.exec(zgfw_knbf); + return null; + } + + +} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultCommonController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultCommonController.java new file mode 100644 index 0000000..24cb7e0 --- /dev/null +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultCommonController.java @@ -0,0 +1,33 @@ +package io.v.nutz.zhgh.zgfw.controller.difficult; + +import cn.wizzer.framework.base.Result; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.dao.Dao; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; + +@IocBean +@At("/platform/difficulty/common") +@Ok("json:full") +public class DifficultCommonController { + + @Inject + private Dao dao; + + @At + @RequiresPermissions("difficulty") + public Result findOne(String id) { + Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id); + dao.fetchLinks(knbf, null); + if(!ShiroUtil.hasRole("sysadmin")){ + boolean isSelf = knbf.getUserId().equals(ShiroUtil.getUserId()); + knbf.setSelf(isSelf); + } + return Result.success(knbf); + } + +} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultReadingController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultReadingController.java new file mode 100644 index 0000000..8f0bb11 --- /dev/null +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultReadingController.java @@ -0,0 +1,474 @@ +package io.v.nutz.zhgh.zgfw.controller.difficult; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.wizzer.framework.base.Result; +import cn.wizzer.framework.page.Pagination; +import com.deepoove.poi.XWPFTemplate; +import com.deepoove.poi.config.Configure; +import com.deepoove.poi.data.PictureRenderData; +import com.deepoove.poi.data.PictureType; +import com.deepoove.poi.policy.HackLoopTableRenderPolicy; +import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.BaseService; +import io.v.nutz.base.utils.OfficeTemplateUtil; +import io.v.nutz.base.utils.Vi; +import io.v.nutz.base.utils.ViTool; +import io.v.nutz.sys.models.Sys_signature; +import io.v.nutz.sys.services.SysUnionService; +import io.v.nutz.sys.services.SysUserService; +import io.v.nutz.web.commons.base.Globals; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; +import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService; +import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.boot.starter.ftp.FtpService; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.entity.Record; +import org.nutz.dao.sql.Sql; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.Strings; +import org.nutz.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.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.*; + +@IocBean +@Ok("json") +@At("/platform/difficulty/reading") +public class DifficultReadingController { + + @Inject + private Dao dao; + @Inject + private ZgfwKnbfService zgfwKnbfService; + @Inject + private FtpService ftpService; + @Inject + private SysUserService sysUserService; + @Inject + private SysUnionService sysUnionService; + @Inject + private BaseService baseService; + @Inject + private Vi vi; + @Inject + private OfficeTemplateUtil officeTemplateUtil; + + @At("") + @Ok("beetl:/platform/zgfw/difficulty/reading.html") + @RequiresPermissions("difficulty.reading") + public void index() { + } + + + @At() + @ViReturn + @RequiresPermissions("difficulty.reading") + public Object pageData(@Param(value = "dateRange", required = false) String[] dateRange, + @Param(value = "year", required = false) Integer year, + @Param(value = "unitId", required = false) String unitId, + @Param(value = "unionId", required = false) String unionId, + PageForm page) { + Cnd cnd = Cnd.NEW(); + Sql sql = Sqls.create(""" + SELECT + info.*, + s.state_name + FROM + `zgfw_knbf` info + LEFT JOIN state s ON s.state_id = info.stateId + $condition + """); + if (!ShiroUtil.hasAnyRoles("sysadmin")) { + cnd.and("info.unionId", "=", Vi.getUnionId()); + } +// cnd.andEX("YEAR(info.applyTime)", "=", year); + cnd.andEX("info.unitId", "=", unitId); + cnd.andEX("info.unionId", "=", unionId); + + if (StrUtil.isAllNotBlank(page.getSearchName(), page.getSearchKeyword())) { + cnd.and(Cnd.likeEX(page.getSearchName(), page.getSearchKeyword())); + } + + if (dateRange != null && dateRange.length == 2) { + cnd.and("info.applyTime", ">=", dateRange[0]); + cnd.and("info.applyTime", "<=", dateRange[1]); + } + + sql.setCondition(cnd); + Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql); + return Result.success(pagination); + } + + @At + @ViReturn + @RequiresPermissions("difficulty.reading") + public Object findOne(String id) { + return zgfwKnbfService.findOne(id); + } + + + /** + * 导出报销表 + * + * @param id + * @param response + * @throws Exception + */ + @At + @Ok("void") + @ViReturn + @RequiresPermissions("difficulty.reading") + public void doExport(@Param("id") String id, HttpServletResponse response) throws Exception { + Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id); + dao.fetchLinks(knbf, null); + Map renderData = BeanUtil.beanToMap(knbf); + renderData.put("knbf", "☑"); + + renderData.put("applyDateTime", DateUtil.format(knbf.getApplyTime(), "yyyy年MM月dd日")); + if (ObjectUtil.isNotNull(knbf.getSignature())) { + String sign = knbf.getSignature(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(sign, os); + os.close(); + renderData.put("applySign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray())); + } + if (ObjectUtil.isNotNull(knbf.getBranchUnionAudit())) { + String sign = knbf.getBranchUnionAudit().getAuditSign(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(sign, os); + os.close(); + renderData.put("branchUnionAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray())); + } + + if (ObjectUtil.isNotNull(knbf.getSchoolUnionInitialAudit())) { + String sign = knbf.getSchoolUnionInitialAudit().getAuditSign(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(sign, os); + os.close(); + renderData.put("schoolUnionInitialAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray())); + } + + if (ObjectUtil.isNotNull(knbf.getSchoolUnionFinalAudit())) { + String sign = knbf.getSchoolUnionFinalAudit().getAuditSign(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(sign, os); + os.close(); + renderData.put("schoolUnionFinalAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray())); + } + renderData.put("subsidy_amount_big", Convert.digitToChinese(knbf.getSchoolUnionFinalAudit().getExt().getDouble("money"))); + renderData.put("money", knbf.getSchoolUnionFinalAudit().getExt().getDouble("money")); + + + Configure config = Configure.newBuilder().build(); + String suffix = "领取通知单"; + response.addHeader("Content-Type", "application/octet-stream"); + response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx"); + XWPFTemplate.compile(officeTemplateUtil.getPath("knbf_pay"), config).render(renderData).writeAndClose(response.getOutputStream()); + } + + + /** + * 导出备案表 + * + * @param id + * @param response + * @throws Exception + */ + + + @At + @Ok("void") + @RequiresPermissions("difficulty.reading") + public void export(@Param("id") String id, HttpServletResponse response) throws Exception { + String suffix = "江南大学工会会员困难补助申请表"; + response.addHeader("Content-Type", "application/octet-stream"); + response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx"); + ServletOutputStream outputStream = response.getOutputStream(); + + Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id); + dao.fetchLinks(knbf, null); + + Map renderData = BeanUtil.beanToMap(knbf); + renderData.put("birthday", DateUtil.format(knbf.getBirthday(), "yyyy-MM-dd")); + renderData.put("applyDateTime", DateUtil.format(knbf.getApplyTime(), "yyyy年MM月dd日")); + + + if (ObjectUtil.isNotNull(knbf.getBranchUnionAudit())) { + String sign = knbf.getBranchUnionAudit().getAuditSign(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(sign, os); + os.close(); + renderData.put("branchUnionAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray())); + } + + if (ObjectUtil.isNotNull(knbf.getSchoolUnionInitialAudit())) { + String sign = knbf.getSchoolUnionInitialAudit().getAuditSign(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(sign, os); + os.close(); + renderData.put("schoolUnionInitialAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray())); + } + + if (ObjectUtil.isNotNull(knbf.getSchoolUnionFinalAudit())) { + String sign = knbf.getSchoolUnionFinalAudit().getAuditSign(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ftpService.download(sign, os); + os.close(); + renderData.put("schoolUnionFinalAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray())); + } + + + HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); + Configure config = Configure.builder().bind("familyList", policy).build(); + + String officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_apply"); + XWPFTemplate.compile(officeTemplateUtilPath, config).render(renderData, outputStream); + outputStream.close(); + } + + @Inject + private ZgfwKnbfJtcyService zgfwKnbfJtcyService; + + private void Export(String id, OutputStream outputStream) throws Exception { + + Record record = zgfwKnbfService.findOne(id); + List recordList = zgfwKnbfJtcyService.list(Sqls.create("select * from zgfw_knbf_jtcy where sqid = @id").setParam("id", id)); + + HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); + Configure config = Configure.newBuilder().bind("familyList", policy).build(); + + if (!recordList.isEmpty()) { + record.set("familyList", recordList); + } + + /* if (record.getInt("sq_bzlx") == 1) { + record.set("bzlx_name", "日常补助慰问"); + } else if (record.getInt("sq_bzlx") == 2) { + record.set("bzlx_name", "“元旦、春节”困难补助慰问"); + }*/ + + //分工会 + Object app = record.get("app"); + if (app != null) { + Sys_signature signature = (Sys_signature) app; + if (Strings.isNotBlank(signature.getData())) { + record.set("appimg", ((Sys_signature) app).getData() != null ? getImg(((Sys_signature) app).getData()) : null); + } + } + + //分工会 + Object upa = record.get("upa"); + if (upa != null) { + Audit audit = (Audit) upa; + record.set("upaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); + record.set("upaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null); + record.set("upaOpinion", audit.getAuditOpinion()); + } + + //二级党委组织 + Object tda = record.get("tda"); + if (tda != null) { + Audit audit = (Audit) tda; + record.set("tdaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); + record.set("tdaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null); + record.set("tdaOpinion", audit.getAuditOpinion()); + } + + //校工会主席 + Object sma = record.get("sma"); + if (sma != null) { + Audit audit = (Audit) sma; + record.set("smaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); + record.set("smaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null); + record.set("smaOpinion", audit.getAuditOpinion()); + } + + if (Strings.isNotBlank(record.getString("xghbzje"))) { + record.set("subsidy_amount_big", Convert.digitToChinese(record.getDouble("xghbzje"))); + } + record.set("schoolName", Globals.schoolName); + + InputStream inputStream; + String officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_apply"); + /* if (record.getString("sq_knlx").equals("1")) { + officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_sick"); + } else if (record.getString("sq_knlx").equals("3")) { + officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_die"); + } else { + officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_summary"); + }*/ + assert officeTemplateUtilPath != null; + XWPFTemplate.compile(officeTemplateUtilPath, config).render(record, outputStream); + + } + + + /** + * 下载备案表和附件 + * + * @param id + * @param response + * @throws Exception + */ + + @At + @ViReturn + @RequiresPermissions("difficulty.reading") + public void downloadAnnex(@Param("id") String id, HttpServletResponse response) throws Exception { +// response.reset(); +// response.setContentType("application/x-msdownload;charset=utf-8"); +// +// String fileName = ""; +// +// Zgfw_knbf zgfwKnbf = zgfwKnbfService.fetch(id); +// Sys_user user = sysUserService.fetchLinks(sysUserService.fetch(zgfwKnbf.getBbzrusername()), "unit"); +// if (user.getUnit() != null && Strings.isNotBlank(user.getUnit().getUnionid())) { +// Sys_union union = sysUnionService.fetch(user.getUnit().getUnionid()); +// fileName += union.getUnionname() + "-"; +// } +// fileName += user.getUsername(); +// +// List files = zgfwKnbf.getFiles(); +// +// /** +// * 创建临时文件夹 +// */ +// String tmpPath = "tmp/" + R.UU32(); +// File tmpDir = new File(tmpPath + "/" + fileName); +// tmpDir.mkdirs(); +// +// if (files != null) { +// for (Sys_file file : files) { +// FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + file.getFilename()); +// ftpService.download(file.getFilepath(), outputStream); +// outputStream.close(); +// } +// } +// +// FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + "职工慰问报销审批单.docx"); +// Export(id, outputStream); +// outputStream.close(); +// +// String aimsDir = "zipTmp/" + R.UU32(); +// String aimsName = fileName + ".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); +// IOUtils.copy(inputStream, response.getOutputStream()); +// inputStream.close(); +// aimsFile.delete(); +// +// FileUtil.deleteDir(new File(tmpPath)); +// FileUtil.deleteDir(new File(aimsDir)); + } + + + @At + @Ok("void") + @RequiresPermissions("difficulty.reading") + public void doExcel(@Param(value = "year", required = false) Integer year, + @Param(value = "dateRange", required = false) String[] dateRange, + @Param(value = "unionId", required = false) String unionId, + @Param(value = "unitId", required = false) String unitId, HttpServletResponse response) throws IOException { + Sql sql = Sqls.create(""" + SELECT + info.userName, + info.loginName, + info.unitName, + info.unionName, + info.applyTime, + info.mobile, + info.subsidyStandards, + s.state_name, + branchUnionAudit.auditOpinion AS branchUnionAuditOpinion, + schoolUnionInitialAudit.auditOpinion AS schoolUnionInitialAuditOpinion, + schoolUnionFinalAudit.auditOpinion AS schoolUnionFinalAuditOpinion, + JSON_EXTRACT( branchUnionAudit.ext, '$.money' ) AS branchUnionAuditMoney, + JSON_EXTRACT( schoolUnionInitialAudit.ext, '$.money' ) AS schoolUnionInitialAuditMoney, + JSON_EXTRACT( schoolUnionFinalAudit.ext, '$.money' ) AS schoolUnionFinalAuditMoney + FROM + zgfw_knbf info + LEFT JOIN state s ON s.state_id = info.stateId + LEFT JOIN audit branchUnionAudit ON branchUnionAudit.id = info.branchUnionAuditId + LEFT JOIN audit schoolUnionInitialAudit ON schoolUnionInitialAudit.id = info.schoolUnionInitialAuditId + LEFT JOIN audit schoolUnionFinalAudit ON schoolUnionFinalAudit.id = info.schoolUnionFinalAuditId + $condition + """); + + Map map = new HashMap<>(); + + Cnd cnd = Cnd.where("info.stateId", "=", 3090); + if (dateRange != null && dateRange.length == 2) { + cnd.and("info.applyTime", ">=", dateRange[0]); + cnd.and("info.applyTime", "<=", dateRange[1]); + } + cnd.andEX("info.unionId", "=", unionId); + cnd.andEX("info.unitId", "=", unitId); + cnd.asc("info.applyTime"); + sql.setCondition(cnd); + List list = sysUserService.listMap(sql); + + ViTool.excelResponse(response, "困难补助汇总表.xlsx"); + + List entities = new ArrayList<>(); + entities.add(new ExcelExportEntity("工号", "loginName", 20)); + entities.add(new ExcelExportEntity("姓名", "userName", 20)); + entities.add(new ExcelExportEntity("单位", "unitName", 20)); + entities.add(new ExcelExportEntity("部门", "unionName", 20)); + entities.add(new ExcelExportEntity("申请时间", "applyTime", 20)); + entities.add(new ExcelExportEntity("联系电话", "mobile", 20)); + entities.add(new ExcelExportEntity("类别", "subsidyStandards", 20)); + entities.add(new ExcelExportEntity("分工会审核意见", "branchUnionAuditOpinion", 20)); + entities.add(new ExcelExportEntity("分工会审核金额", "branchUnionAuditMoney", 20)); + entities.add(new ExcelExportEntity("校工会初审意见", "schoolUnionInitialAuditOpinion", 20)); + entities.add(new ExcelExportEntity("校工会初审金额", "schoolUnionInitialAuditMoney", 20)); + entities.add(new ExcelExportEntity("工会常委会审核意见", "schoolUnionFinalAuditOpinion", 20)); + entities.add(new ExcelExportEntity("工会常委会审核金额", "schoolUnionFinalAuditMoney", 20)); + + + ExportParams exportParams = new ExportParams(); + exportParams.setType(ExcelType.XSSF); + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list); + workbook.write(response.getOutputStream()); + response.getOutputStream().close(); + workbook.close(); + } + + + private PictureRenderData getImg(String base64) throws IOException { + String s = base64.split(",")[1]; + byte[] bytes = Base64.getDecoder().decode(s); + return new PictureRenderData(70, 30, ".png", bytes); + } + + +} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionFinalAuditController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionFinalAuditController.java new file mode 100644 index 0000000..ebca274 --- /dev/null +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionFinalAuditController.java @@ -0,0 +1,151 @@ +package io.v.nutz.zhgh.zgfw.controller.difficult; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import cn.wizzer.framework.base.Result; +import cn.wizzer.framework.page.Pagination; +import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.base.utils.Vi; +import io.v.nutz.sys.services.SysLocalProcessService; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler; +import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; +import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.aop.interceptor.ioc.TransAop; +import org.nutz.dao.Chain; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.dao.util.cri.SqlExpressionGroup; +import org.nutz.ioc.aop.Aop; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +import java.util.Date; +import java.util.Map; + +@At("/platform/difficulty/schoolUnionFinalAudit") +@Ok("json:full") +@IocBean +public class DifficultSchoolUnionFinalAuditController { + + + @Inject + private ZgfwKnbfService zgfwKnbfService; + @Inject + private AuditService auditService; + @Inject + private Dao dao; + @Inject + private SysLocalProcessService sysLocalProcessService; + + + @At("") + @Ok("beetl:/platform/zgfw/difficulty/schoolUnionFinalAudit.html") + @RequiresPermissions("difficulty.schoolUnionFinalAudit") + public void index() { + } + + @At("/h5") + @Ok("beetl:/mobile/difficulty/schoolunionfinalaudit/index.html") + @RequiresPermissions("difficulty.schoolUnionFinalAudit") + public void h5() { + } + + @At + @ViReturn + @RequiresPermissions("difficulty.schoolUnionFinalAudit") + public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit, + @Param(value = "year", required = false) Integer year, + @Param(value = "unitId", required = false) String unitId, + @Param(value = "unionId", required = false) String unionId, PageForm page) { + Cnd cnd = Cnd.NEW(); + Sql sql = Sqls.create(""" + SELECT + info.*, + s.state_name + FROM + `zgfw_knbf` info + LEFT JOIN state s ON s.state_id = info.stateId + $condition + """); + + cnd.and("info.stateId", isAudit ? ">" : "=", 3060); + + if (!ShiroUtil.hasAnyRoles("sysadmin")) { + cnd.and("info.unionId", "=", Vi.getUnionId()); + } + cnd.andEX("YEAR(info.applyTime)", "=", year); + cnd.andEX("info.unitId", "=", unitId); + cnd.andEX("info.unionId", "=", unionId); + + if (StrUtil.isNotBlank(page.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.orLike("info.userName", page.getSearchKeyword()); + seg.orLike("info.loginName", page.getSearchKeyword()); + cnd.and(seg); + } + + sql.setCondition(cnd); + Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql); + return Result.success(pagination); + } + + @At + @ViReturn + @RequiresPermissions("difficulty.schoolUnionFinalAudit") + @Aop(TransAop.READ_COMMITTED) + public Object doReview(String id, Integer pass, Audit audit, double money) { + audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); + audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); + audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); + audit.setAuditTime(new Date()); + audit.setExt(JSONUtil.parseObj(Map.of("money", money))); + audit = dao.insert(audit); + + Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); + if (pass == 1) { + //不通过 + zgfw_knbf.setStateId(3070); + } else if (pass == 2) { + //退回 + zgfw_knbf.setStateId(3080); + } else { + //通过 + zgfw_knbf.setStateId(3090); + } + zgfw_knbf.setSchoolUnionFinalAuditId(audit.getId()); + zgfwKnbfService.updateIgnoreNull(zgfw_knbf); + + if (pass == 1){ + DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf); + } else if (pass == 2){ + DifficultToDoHandler.COMPLETE_PROCESS.exec(zgfw_knbf); + } + DifficultToDoHandler.COMPLETE_SCHOOL_TASK.exec(zgfw_knbf); + return null; + } + + @At + @ViReturn + @RequiresPermissions("difficulty.schoolUnionFinalAudit") + @Aop(TransAop.READ_COMMITTED) + public Result doEdit(String id) { + dao.update(Zgfw_knbf.class, Chain.make("stateId", 3060) + .add("schoolUnionFinalAuditId", null) + , Cnd.where("id", "=", id)); + //待办撤回 + sysLocalProcessService.revokeTask("zgfw_knbf@" + id,"工会常委会审核"); + return Result.success(); + } + + +} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionInitialAuditController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionInitialAuditController.java new file mode 100644 index 0000000..e318ba4 --- /dev/null +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultSchoolUnionInitialAuditController.java @@ -0,0 +1,224 @@ +package io.v.nutz.zhgh.zgfw.controller.difficult; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import cn.wizzer.framework.base.Result; +import cn.wizzer.framework.page.Pagination; +import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.model.Audit; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.base.utils.Vi; +import io.v.nutz.base.utils.ViTool; +import io.v.nutz.sys.services.SysLocalProcessService; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler; +import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; +import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.aop.interceptor.ioc.TransAop; +import org.nutz.dao.Chain; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.dao.util.cri.SqlExpressionGroup; +import org.nutz.ioc.aop.Aop; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.util.NutMap; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +@At("/platform/difficulty/schoolUnionInitialAudit") +@Ok("json:full") +@IocBean +public class DifficultSchoolUnionInitialAuditController { + + @Inject + private ZgfwKnbfService zgfwKnbfService; + @Inject + private AuditService auditService; + @Inject + private Vi vi; + @Inject + private Dao dao; + @Inject + private SysLocalProcessService sysLocalProcessService; + + @At("") + @Ok("beetl:/platform/zgfw/difficulty/schoolUnionInitialAudit.html") + @RequiresPermissions("difficulty.schoolUnionInitialAudit") + public void index() { + } + + @At("/h5") + @Ok("beetl:/mobile/difficulty/schoolunioninitialaudit/index.html") + @RequiresPermissions("difficulty.schoolUnionInitialAudit") + public void h5() { + } + + + @At + @ViReturn + @RequiresPermissions("difficulty.schoolUnionInitialAudit") + public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit, + @Param(value = "year", required = false) Integer year, + @Param(value = "unitId", required = false) String unitId, + @Param(value = "unionId", required = false) String unionId, PageForm page) { + Cnd cnd = Cnd.NEW(); + Sql sql = Sqls.create(""" + SELECT + info.*, + s.state_name + FROM + `zgfw_knbf` info + LEFT JOIN state s ON s.state_id = info.stateId + $condition + """); + + cnd.and("info.stateId", isAudit ? ">" : "=", 3030); + + if (!ShiroUtil.hasAnyRoles("sysadmin")) { + cnd.and("info.unionId", "=", Vi.getUnionId()); + } + cnd.andEX("YEAR(info.applyTime)", "=", year); + cnd.andEX("info.unitId", "=", unitId); + cnd.andEX("info.unionId", "=", unionId); + + if (StrUtil.isNotBlank(page.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.orLike("info.userName", page.getSearchKeyword()); + seg.orLike("info.loginName", page.getSearchKeyword()); + cnd.and(seg); + } + + sql.setCondition(cnd); + Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql); + return Result.success(pagination); + } + + @At + @ViReturn + @RequiresPermissions("difficulty.schoolUnionInitialAudit") + @Aop(TransAop.READ_COMMITTED) + public Object doReview(String id, Integer pass, Audit audit, double money) { + audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); + audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); + audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); + audit.setAuditTime(new Date()); + audit.setExt(JSONUtil.parseObj(Map.of("money", money))); + audit = dao.insert(audit); + + Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); + if (pass == 1) { + //不通过 + zgfw_knbf.setStateId(3040); + } else if (pass == 2) { + //退回 + zgfw_knbf.setStateId(3050); + } else { + //通过 + zgfw_knbf.setStateId(3060); + } + zgfw_knbf.setSchoolUnionInitialAuditId(audit.getId()); + zgfwKnbfService.updateIgnoreNull(zgfw_knbf); + + if (pass == 2) { + DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf); + } else if (pass == 3) { + DifficultToDoHandler.CREATE_SCHOOL_TASK.exec(zgfw_knbf); + } + DifficultToDoHandler.COMPLETE_FINANCE_TASK.exec(zgfw_knbf); + return null; + } + + @At + @ViReturn + @RequiresPermissions("difficulty.schoolUnionInitialAudit") + @Aop(TransAop.READ_COMMITTED) + public Result doEdit(String id) { + dao.update(Zgfw_knbf.class, Chain.make("stateId", 3030) + .add("schoolUnionInitialAuditId", null) + , Cnd.where("id", "=", id)); + //待办撤回 + sysLocalProcessService.revokeTask("zgfw_knbf@" + id, "校工会初审"); + return Result.success(); + } + + + @At + @Ok("void") + @RequiresPermissions("difficulty.schoolUnionInitialAudit") + public void exportExcel(@Param(value = "year", required = false) Integer year, + @Param(value = "unionId", required = false) String unionId, + @Param(value = "unitId", required = false) String unitId, + HttpServletResponse response) throws IOException { + Sql sql = Sqls.create(""" + SELECT + info.userName, + info.loginName, + info.unitName, + info.unionName, + info.applyTime, + info.mobile, + info.subsidyStandards, + s.state_name, + branchUnionAudit.auditOpinion AS branchUnionAuditOpinion, + schoolUnionInitialAudit.auditOpinion AS schoolUnionInitialAuditOpinion, + schoolUnionFinalAudit.auditOpinion AS schoolUnionFinalAuditOpinion, + JSON_EXTRACT( branchUnionAudit.ext, '$.money' ) AS branchUnionAuditMoney, + JSON_EXTRACT( schoolUnionInitialAudit.ext, '$.money' ) AS schoolUnionInitialAuditMoney + FROM + zgfw_knbf info + LEFT JOIN state s ON s.state_id = info.stateId + LEFT JOIN audit branchUnionAudit ON branchUnionAudit.id = info.branchUnionAuditId + LEFT JOIN audit schoolUnionInitialAudit ON schoolUnionInitialAudit.id = info.schoolUnionInitialAuditId + LEFT JOIN audit schoolUnionFinalAudit ON schoolUnionFinalAudit.id = info.schoolUnionFinalAuditId + $condition + """); + + Map map = new HashMap<>(); + + Cnd cnd = Cnd.where("info.stateId", ">=", 3060); + cnd.andEX("YEAR(info.applyTime)","=",year); + cnd.andEX("info.unionId", "=", unionId); + cnd.andEX("info.unitId", "=", unitId); + cnd.asc("info.applyTime"); + sql.setCondition(cnd); + List list = auditService.listMap(sql); + + ViTool.excelResponse(response, "困难补助审定汇总表.xlsx"); + + List entities = new ArrayList<>(); + entities.add(new ExcelExportEntity("工号", "loginName", 20)); + entities.add(new ExcelExportEntity("姓名", "userName", 20)); + entities.add(new ExcelExportEntity("单位", "unitName", 20)); + entities.add(new ExcelExportEntity("部门", "unionName", 20)); + entities.add(new ExcelExportEntity("申请时间", "applyTime", 20)); + entities.add(new ExcelExportEntity("联系电话", "mobile", 20)); + entities.add(new ExcelExportEntity("类别", "subsidyStandards", 20)); + entities.add(new ExcelExportEntity("分工会审核意见", "branchUnionAuditOpinion", 20)); + entities.add(new ExcelExportEntity("分工会审核金额", "branchUnionAuditMoney", 20)); + entities.add(new ExcelExportEntity("校工会初审意见", "schoolUnionInitialAuditOpinion", 20)); + entities.add(new ExcelExportEntity("校工会初审金额", "schoolUnionInitialAuditMoney", 20)); + + ExportParams exportParams = new ExportParams(); + exportParams.setType(ExcelType.XSSF); + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list); + workbook.write(response.getOutputStream()); + response.getOutputStream().close(); + workbook.close(); + } + +} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApply.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyController.java similarity index 50% rename from src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApply.java rename to src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyController.java index c9dce7b..525adf7 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApply.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyController.java @@ -3,9 +3,7 @@ package io.v.nutz.zhgh.zgfw.controller.difficult; import cn.wizzer.framework.base.Result; import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.service.AuditService; -import io.v.nutz.base.utils.DateUtil; import io.v.nutz.base.utils.Vi; -import io.v.nutz.sys.models.Sys_signature; import io.v.nutz.sys.services.SysSignatureService; import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.utils.ShiroUtil; @@ -16,6 +14,7 @@ import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; import org.apache.shiro.authz.annotation.RequiresPermissions; 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.dao.util.cri.SqlExpressionGroup; @@ -25,7 +24,9 @@ import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.lang.Strings; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; +import java.util.Date; import java.util.List; /** @@ -35,34 +36,72 @@ import java.util.List; */ @IocBean @Ok("json") -@At("/platform/fw/difficulty/apply") -public class DifficultyApply { +@At("/platform/difficulty/apply") +public class DifficultyApplyController { + @Inject + private Dao dao; @Inject private SysUserService sysUserService; - @Inject private ZgfwKnbfService zgfwKnbfService; @Inject private ZgfwKnbfJtcyService zgfwKnbfJtcyService; - - @Inject private AuditService auditService; - @Inject private SysSignatureService sysSignatureService; - @Inject private Vi vi; - @At("") @Ok("beetl:/platform/zgfw/difficulty/apply.html") @RequiresPermissions("difficulty.apply") public void index() { } + @At("/h5") + @Ok("beetl:/mobile/difficulty/apply/index.html") + @RequiresPermissions("difficulty.apply") + public void h5() { + } + + @At + @ViReturn + @RequiresPermissions("difficulty.apply") + @Aop(TransAop.READ_COMMITTED) + public Object doAdd(@Param("data") Zgfw_knbf knbf) { + knbf.setApplyTime(new Date()); + knbf.setStateId(3000); + dao.insert(knbf); + DifficultToDoHandler.START_PROCESS.exec(knbf); + DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf); + return Result.success(); + } + + + @At + @ViReturn + @RequiresPermissions("difficulty.apply") + @Aop(TransAop.READ_COMMITTED) + public Object doEdit(@Param("data") Zgfw_knbf knbf) { + knbf.setStateId(3000); + zgfwKnbfService.updateIgnoreNull(knbf); + DifficultToDoHandler.START_PROCESS.exec(knbf); + DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf); + if (List.of(3020, 3050, 3080).contains(knbf.getStateId())) { + DifficultToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(knbf); + } + + return Result.success(); + } + + @At + @RequiresPermissions("difficulty.apply") + public Result findOne(String id) { + Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id); + return Result.success(knbf); + } @At @ViReturn @@ -71,106 +110,34 @@ public class DifficultyApply { Cnd cnd = Cnd.NEW(); Sql sql = Sqls.create(""" SELECT - su.id, - su.username,su.birthday, - su.loginname,su.mobile,su.sex, - un.`name` unit_name, - uni.unionname + id, + username, + birthday, + loginname, + mobile, + sex, + unitname, + unionname, + unionid, + unitid FROM - sys_user su - LEFT JOIN sys_unit un ON un.id = su.unitid - LEFT JOIN sys_union uni ON uni.id = un.unionid $condition + `user` $condition """); - cnd.and("uni.id", "=", vi.getUnionId()); + if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) { + cnd.and("unionid", "=", Vi.getUnionId()); + if (!ShiroUtil.hasAnyRoles("gh01")){ + cnd.and("id", "=", ShiroUtil.getUserId()); + } + } + if (Strings.isNotBlank(key)) { SqlExpressionGroup group = new SqlExpressionGroup(); - group.orLike("su.username", key); - group.orLike("su.loginname", key); + group.orLike("username", key); + group.orLike("loginname", key); cnd.and(group); } sql.setCondition(cnd); return sysUserService.listPage(1, 10, sql).getList(); } - - @At - @ViReturn - @RequiresPermissions("difficulty.apply") - @Aop(TransAop.READ_COMMITTED) - public Object doAdd(Zgfw_knbf knbf, Boolean flag) { - if (Strings.isNotBlank(knbf.getApplicantsign())) { - knbf.setApplicantsign(sysSignatureService.insert(new Sys_signature(knbf.getApplicantsign())).getId()); - } - if (knbf.getApply_mode().equals("1")) { - knbf.setBbzrusername(ShiroUtil.getPrincipalProperty("id").toString()); - } - knbf.setZt(flag ? 100 : 98); - knbf.setSqr(ShiroUtil.getPrincipalProperty("id").toString()); - knbf.setSqsj(DateUtil.getDate()); -// zgfwKnbfService.insert(knbf); - zgfwKnbfService.insertWith(knbf, "jtcys"); - - DifficultToDoHandler.START_PROCESS.exec(knbf); - DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf); - return Result.success(); - - } - - - @At - @ViReturn - @RequiresPermissions("difficulty.apply") - @Aop(TransAop.READ_COMMITTED) - public Object doEdit(Zgfw_knbf knbf, Boolean flag) { - if (Strings.isNotBlank(knbf.getApplicantsign())) { - knbf.setApplicantsign(sysSignatureService.insert(new Sys_signature(knbf.getApplicantsign())).getId()); - } - if (knbf.getApply_mode().equals("1")) { - knbf.setBbzrusername(ShiroUtil.getPrincipalProperty("id").toString()); - } - knbf.setZt(flag ? 100 : 98); - zgfwKnbfService.updateIgnoreNull(knbf); - zgfwKnbfJtcyService.clear(Cnd.where("sqid", "=", knbf.getId())); - zgfwKnbfService.insertLinks(knbf, "jtcys"); - DifficultToDoHandler.START_PROCESS.exec(knbf); - DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf); - if (List.of(150,156,250,350,450).contains(knbf.getZt())){ - DifficultToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(knbf); - } -// zgfwKnbfService.updateWith(knbf, "jtcys"); - return Result.success(); - } - - /** - * 获取部分信息 - * - * @return - */ - @At - @ViReturn - @RequiresPermissions("difficulty.apply") - public Object getUserData() { - Sql sql = Sqls.create(""" - SELECT - u.id, - u.loginname, - u.username, - u.idcard, - u.nation, - u.political, - u.birthday, - u.sex, - u.jobTitle, - u.position, - u.bank_number AS yhkh, - un.`name` unitname - FROM - sys_user u - LEFT JOIN sys_unit un ON u.unitid = un.id - WHERE u.id = @id - """).setParam("id", ShiroUtil.getPrincipalProperty("id").toString()); - return Result.success().addData(sysUserService.list(sql).get(0)); - } - - } diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyList.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyList.java deleted file mode 100644 index fba2cc4..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyList.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import cn.wizzer.framework.base.Result; -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.sys.services.SysUnionService; -import io.v.nutz.sys.services.SysUserService; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.nutz.boot.starter.ftp.FtpService; -import org.nutz.dao.Cnd; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; -import org.nutz.mvc.annotation.Param; - -/** - * @author zhf - * @date 2021/1/28 9:26 - * @description 困难帮扶申请列表 - */ -@IocBean -@Ok("json") -@At("/platform/fw/difficulty/applylist") -public class DifficultyApplyList { - - @Inject - private FtpService ftpService; - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - @Inject - private ZgfwKnbfJtcyService zgfwKnbfJtcyService; - - @Inject - private AuditService auditService; - - @Inject - private SysUserService sysUserService; - - @Inject - private SysUnionService sysUnionService; - - - @At("") - @Ok("beetl:/platform/zgfw/difficulty/applylist.html") - @RequiresPermissions("difficulty.applylist") - public void index() { - } - - - @At() - @ViReturn - @RequiresPermissions("difficulty.applylist") - public Object pageData(@Param(value = "year",required = false) Integer year, - @Param(value = "unitId",required = false) String unitId, - @Param(value = "unionId",required = false) String unionId, PageForm page) { - CndPlus cnd = CndPlus.create(); - if (!ShiroUtil.hasAnyRoles("sysadmin")) { - cnd.and(Cnd.exps("sq.sqr", "=", ShiroUtil.getPlatformUid()).or("sq.bbzrusername", "=", ShiroUtil.getPlatformUid())); - } - return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId); - } - - - @At - @ViReturn - @RequiresPermissions("difficulty.applylist") - public Object findOne(String id) { - return zgfwKnbfService.findOne(id); - } - - - @At - @ViReturn - @RequiresPermissions("difficulty.applylist") - public Object doDelete(String id) { - zgfwKnbfJtcyService.clear(Cnd.where("sqid", "=", id)); - zgfwKnbfService.delete(id); - return Result.success(); - - } - - - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyListController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyListController.java new file mode 100644 index 0000000..b72e9a5 --- /dev/null +++ b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/DifficultyApplyListController.java @@ -0,0 +1,112 @@ +package io.v.nutz.zhgh.zgfw.controller.difficult; + +import cn.hutool.core.util.StrUtil; +import cn.wizzer.framework.base.Result; +import cn.wizzer.framework.page.Pagination; +import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.service.AuditService; +import io.v.nutz.sys.services.SysLocalProcessService; +import io.v.nutz.sys.services.SysUnionService; +import io.v.nutz.sys.services.SysUserService; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService; +import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.boot.starter.ftp.FtpService; +import org.nutz.dao.Cnd; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.dao.util.cri.SqlExpressionGroup; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +@IocBean +@Ok("json") +@At("/platform/difficulty/applylist") +public class DifficultyApplyListController { + + @Inject + private FtpService ftpService; + @Inject + private ZgfwKnbfService zgfwKnbfService; + @Inject + private ZgfwKnbfJtcyService zgfwKnbfJtcyService; + @Inject + private AuditService auditService; + @Inject + private SysUserService sysUserService; + @Inject + private SysUnionService sysUnionService; + @Inject + private SysLocalProcessService localProcessService; + + @At("") + @Ok("beetl:/platform/zgfw/difficulty/applylist.html") + @RequiresPermissions("difficulty.applylist") + public void index() { + } + + @At("/h5") + @Ok("beetl:/mobile/difficulty/mine/index.html") + @RequiresPermissions("difficulty.applylist") + public void h5() { + } + + + @At + @RequiresPermissions("difficulty.applylist") + public Result pageData(@Param(value = "year", required = false) Integer year, + @Param(value = "unitId", required = false) String unitId, + @Param(value = "unionId", required = false) String unionId, PageForm page) { + Cnd cnd = Cnd.NEW(); + Sql sql = Sqls.create(""" + SELECT + info.*, + s.state_name + FROM + `zgfw_knbf` info + LEFT JOIN state s ON s.state_id = info.stateId + $condition + """); + if (!ShiroUtil.hasAnyRoles("sysadmin")) { + cnd.and("info.proxyUserId", "=", ShiroUtil.getUserId()); + } + cnd.andEX("YEAR(info.applyTime)", "=", year); + cnd.andEX("info.unitId", "=", unitId); + cnd.andEX("info.unionId", "=", unionId); + if (StrUtil.isNotBlank(page.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.orLike("info.userName", page.getSearchKeyword()); + seg.orLike("info.loginName", page.getSearchKeyword()); + cnd.and(seg); + } + sql.setCondition(cnd); + Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql); + return Result.success(pagination); + } + + @At + @ViReturn + @RequiresPermissions("difficulty.applylist") + public Object findOne(String id) { + return zgfwKnbfService.findOne(id); + } + + + @At + @ViReturn + @RequiresPermissions("difficulty.applylist") + public Object doDelete(String id) { + zgfwKnbfJtcyService.clear(Cnd.where("sqid", "=", id)); + zgfwKnbfService.delete(id); + localProcessService.deleteProcessInstance("zgfw_knbf@" + id); + return Result.success(); + + } + + +} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ReadingController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ReadingController.java deleted file mode 100644 index b2b946d..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ReadingController.java +++ /dev/null @@ -1,442 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import cn.hutool.core.convert.Convert; -import cn.hutool.core.date.DateUtil; -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.base.annontation.ViReturn; -import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.BaseService; -import io.v.nutz.base.utils.OfficeTemplateUtil; -import io.v.nutz.base.utils.Vi; -import io.v.nutz.sys.models.Sys_file; -import io.v.nutz.sys.models.Sys_signature; -import io.v.nutz.sys.models.Sys_union; -import io.v.nutz.sys.models.Sys_user; -import io.v.nutz.sys.services.SysUnionService; -import io.v.nutz.sys.services.SysUserService; -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 io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.commons.io.IOUtils; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.nutz.boot.starter.ftp.FtpService; -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.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -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 javax.servlet.http.HttpServletResponse; -import java.io.*; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.Base64; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * @author zhf - * @date 2021/2/2 13:45 - * @description 困难帮扶阅览 - */ -@IocBean -@Ok("json") -@At("/platform/fw/difficulty/reading") -public class ReadingController { - - - @Inject - private ZgfwKnbfService zgfwKnbfService; - @Inject - private FtpService ftpService; - - - @Inject - private SysUserService sysUserService; - - @Inject - private SysUnionService sysUnionService; - - @Inject - private BaseService baseService; - - @Inject - private Vi vi; - - @Inject - private OfficeTemplateUtil officeTemplateUtil; - - @At("") - @Ok("beetl:/platform/zgfw/difficulty/reading.html") - @RequiresPermissions("difficulty.reading") - public void index() { - } - - - @At() - @ViReturn - @RequiresPermissions("difficulty.reading") - public Object pageData(@Param(value = "dateRange", required = false) String[] dateRange, - @Param(value = "year", required = false) Integer year, - @Param(value = "unitId", required = false) String unitId, - @Param(value = "unionId", required = false) String unionId, PageForm page) { - CndPlus cnd = CndPlus.create(); - if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh03,wyh02")) { - SqlExpressionGroup group2 = new SqlExpressionGroup(); - if (ShiroUtil.hasAnyRoles("gh01,H04")) { - group2.or("sqr.unionid", "=", vi.getUnionId()); - } - if (ShiroUtil.hasRole("H01")) { - group2.or("sq.sqr", "=", ShiroUtil.getPrincipalProperty("id").toString()); - group2.or("sq.bbzrusername", "=", ShiroUtil.getPrincipalProperty("id").toString()); - } - cnd.and(group2); - } - if (dateRange != null && dateRange.length == 2) { - cnd.and("sq.sqsj", ">=", dateRange[0]); - cnd.and("sq.sqsj", "<=", dateRange[1]); - } - return zgfwKnbfService.pageData(cnd, page, year, unitId, unionId); - } - - @At - @ViReturn - @RequiresPermissions("difficulty.reading") - public Object findOne(String id) { - return zgfwKnbfService.findOne(id); - } - - - /** - * 导出报销表 - * - * @param id - * @param response - * @throws Exception - */ - @At - @Ok("void") - @ViReturn - @RequiresPermissions("difficulty.reading") - public void doExport(@Param("id") String id, HttpServletResponse response) throws Exception { - - Record record = zgfwKnbfService.findOne(id); - record.put("knbf", "☑"); - Object app = record.get("app"); - if (app != null) { - Sys_signature signature = (Sys_signature) app; - if (Strings.isNotBlank(signature.getData())) { - record.set("appimg", ((Sys_signature) app).getData() != null ? getImg(((Sys_signature) app).getData()) : null); - } - } - Object upa = record.get("upa"); - if (upa != null) { - Audit audit = (Audit) upa; - record.set("upaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); - } - - Object sua = record.get("sua"); - if (sua != null) { - Audit audit = (Audit) sua; - record.set("suaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); - } - record.set("subsidy_amount_big", Convert.digitToChinese(record.getDouble("xghbzje"))); - - /*int price = record.getInt("xghbzje"); - int money_int = price; - int money_decimal = money_int - price; - record.set("one", money_int >= 1000000 ? (money_int / 1000000) % 10 : null); - record.set("two", money_int >= 100000 ? (money_int / 100000) % 10 : null); - record.set("three", money_int >= 10000 ? (money_int / 10000) % 10 : null); - record.set("four", money_int >= 1000 ? (money_int / 1000) % 10 : null); - record.set("five", money_int >= 100 ? (money_int / 100) % 10 : null); - record.set("six", money_int >= 10 ? (money_int / 10) % 10 : null); - record.set("seven", money_int >= 10 ? money_int % 10 : null); - record.set("eight", (int) (money_decimal * 10)); - record.set("nine", (int) (money_decimal % 0.1 * 100));*/ - - - /* if (record.getInt("sq_bzlx") == 1) { - record.set("bzlx_name", "日常补助慰问"); - } else if (record.getInt("sq_bzlx") == 2) { - record.set("bzlx_name", "“元旦、春节”困难补助慰问"); - }*/ - - Configure config = Configure.newBuilder().build(); - String suffix = "领取通知单"; - //InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/difficulty/knbf_reimbursement.docx"); - response.addHeader("Content-Type", "application/octet-stream"); - response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx"); - XWPFTemplate.compile(officeTemplateUtil.getPath("knbf_pay"), config).render(record).writeAndClose(response.getOutputStream()); - } - - - /** - * 导出备案表 - * - * @param id - * @param response - * @throws Exception - */ - - - @At - @RequiresPermissions("difficulty.reading") - public void export(@Param("id") String id, HttpServletResponse response) throws Exception { - -// Record record = zgfwKnbfService.findOne(id); - String suffix = "江南大学工会会员困难补助申请表"; - - /* if (record.getString("sq_knlx").equals("1")) { - suffix = Globals.schoolName + "工会审批表"; - } else if (record.getString("sq_knlx").equals("3")) { - suffix = Globals.schoolName + "工会审批表"; - } else { - suffix = Globals.schoolName + "工会审批表"; - }*/ - - - response.addHeader("Content-Type", "application/octet-stream"); - response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx"); - Export(id, response.getOutputStream()); - - } - - @Inject - private ZgfwKnbfJtcyService zgfwKnbfJtcyService; - - private void Export(String id, OutputStream outputStream) throws Exception { - - Record record = zgfwKnbfService.findOne(id); - List recordList = zgfwKnbfJtcyService.list(Sqls.create("select * from zgfw_knbf_jtcy where sqid = @id").setParam("id", id)); - - HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); - Configure config = Configure.newBuilder().bind("familyList", policy).build(); - - if (!recordList.isEmpty()) { - record.set("familyList", recordList); - } - - /* if (record.getInt("sq_bzlx") == 1) { - record.set("bzlx_name", "日常补助慰问"); - } else if (record.getInt("sq_bzlx") == 2) { - record.set("bzlx_name", "“元旦、春节”困难补助慰问"); - }*/ - - //分工会 - Object app = record.get("app"); - if (app != null) { - Sys_signature signature = (Sys_signature) app; - if (Strings.isNotBlank(signature.getData())) { - record.set("appimg", ((Sys_signature) app).getData() != null ? getImg(((Sys_signature) app).getData()) : null); - } - } - - //分工会 - Object upa = record.get("upa"); - if (upa != null) { - Audit audit = (Audit) upa; - record.set("upaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); - record.set("upaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null); - record.set("upaOpinion", audit.getAuditOpinion()); - } - - //二级党委组织 - Object tda = record.get("tda"); - if (tda != null) { - Audit audit = (Audit) tda; - record.set("tdaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); - record.set("tdaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null); - record.set("tdaOpinion", audit.getAuditOpinion()); - } - - //校工会主席 - Object sma = record.get("sma"); - if (sma != null) { - Audit audit = (Audit) sma; - record.set("smaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null); - record.set("smaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null); - record.set("smaOpinion", audit.getAuditOpinion()); - } - - if (Strings.isNotBlank(record.getString("xghbzje"))) { - record.set("subsidy_amount_big", Convert.digitToChinese(record.getDouble("xghbzje"))); - } - record.set("schoolName", Globals.schoolName); - - InputStream inputStream; - String officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_apply"); - /* if (record.getString("sq_knlx").equals("1")) { - officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_sick"); - } else if (record.getString("sq_knlx").equals("3")) { - officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_die"); - } else { - officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_summary"); - }*/ - assert officeTemplateUtilPath != null; - XWPFTemplate.compile(officeTemplateUtilPath, config).render(record, outputStream); - - } - - - /** - * 下载备案表和附件 - * - * @param id - * @param response - * @throws Exception - */ - - @At - @ViReturn - @RequiresPermissions("difficulty.reading") - public void downloadAnnex(@Param("id") String id, HttpServletResponse response) throws Exception { - response.reset(); - response.setContentType("application/x-msdownload;charset=utf-8"); - - String fileName = ""; - - Zgfw_knbf zgfwKnbf = zgfwKnbfService.fetch(id); - Sys_user user = sysUserService.fetchLinks(sysUserService.fetch(zgfwKnbf.getBbzrusername()), "unit"); - if (user.getUnit() != null && Strings.isNotBlank(user.getUnit().getUnionid())) { - Sys_union union = sysUnionService.fetch(user.getUnit().getUnionid()); - fileName += union.getUnionname() + "-"; - } - fileName += user.getUsername(); - - List files = zgfwKnbf.getFiles(); - - /** - * 创建临时文件夹 - */ - String tmpPath = "tmp/" + R.UU32(); - File tmpDir = new File(tmpPath + "/" + fileName); - tmpDir.mkdirs(); - - if (files != null) { - for (Sys_file file : files) { - FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + file.getFilename()); - ftpService.download(file.getFilepath(), outputStream); - outputStream.close(); - } - } - - FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + "职工慰问报销审批单.docx"); - Export(id, outputStream); - outputStream.close(); - - String aimsDir = "zipTmp/" + R.UU32(); - String aimsName = fileName + ".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); - IOUtils.copy(inputStream, response.getOutputStream()); - inputStream.close(); - aimsFile.delete(); - - FileUtil.deleteDir(new File(tmpPath)); - FileUtil.deleteDir(new File(aimsDir)); - } - - - @At - @ViReturn - @Ok("void") - @RequiresPermissions("difficulty.reading") - public void doExcel(@Param(value = "year", required = false) Integer year, - @Param(value = "dateRange", required = false) String[] dateRange, - @Param(value = "unionId", required = false) String unionId, - @Param(value = "unitId", required = false) String unitId, HttpServletResponse response) throws IOException { - Sql sql = Sqls.create(""" - SELECT - su.username, - su.loginname, - su.unitname, - su.unionname, - su.sex, - su.jobTitle, - bf.zc, - bf.zw, - bf.zyzkyybz, - bf.xghbzje, - bf.yhkh, - bf.lxfs, - bf.apply_reason - FROM - zgfw_knbf bf - LEFT JOIN `user` su ON su.id = bf.bbzrusername $condition - """); - - Map map = new HashMap<>(); - - Cnd cnd = Cnd.where("bf.zt", "=", 500); - if (dateRange != null && dateRange.length == 2) { - cnd.and("bf.sqsj", ">=", dateRange[0]); - cnd.and("bf.sqsj", "<=", dateRange[1]); - } - if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh03,wyh02")) { - if (ShiroUtil.hasAnyRoles("gh01,H04")) { - cnd.andEX("su.unionid", "=", vi.getUnionId()); - map.put("union", "院级工会主席"); - - } - map.put("union", "校工会"); - } - cnd.andEX("su.unionid", "=", unionId); - cnd.andEX("su.unitid", "=", unitId); - cnd.asc("su.unionname"); - cnd.asc("su.unitname"); - cnd.asc("bf.sqsj"); - - sql.setCondition(cnd); - - List nutMap = sysUserService.listMap(sql); - AtomicInteger listIndex = new AtomicInteger(1); - nutMap.forEach(v -> { - v.put("index", listIndex.get()); - listIndex.getAndIncrement(); - }); - map.put("exportDate", io.v.nutz.base.utils.DateUtil.getDate()); - map.put("knbf", nutMap); - - - HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); - Configure config = Configure.newBuilder().bind("knbf", policy).build(); - response.addHeader("Content-Type", "application/octet-stream"); - response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(("院级工会教职工困难补助申报汇总表").getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1) + "\".docx"); - XWPFTemplate.compile(officeTemplateUtil.getPath("knbf_summary"), config).render(map).writeAndClose(response.getOutputStream()); - - } - - - private PictureRenderData getImg(String base64) throws IOException { - String s = base64.split(",")[1]; - byte[] bytes = Base64.getDecoder().decode(s); - return new PictureRenderData(70, 30, ".png", bytes); - } - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolManagerController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolManagerController.java deleted file mode 100644 index 81176aa..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolManagerController.java +++ /dev/null @@ -1,95 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler; -import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.nutz.aop.interceptor.ioc.TransAop; -import org.nutz.ioc.aop.Aop; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; -import org.nutz.mvc.annotation.Param; - -import java.util.Date; - -/** - * @author zhf - * @date 2021/1/30 8:42 - * @description 校工会主席 - */ -@At("/platform/fw/difficulty/schoolmanager") -@Ok("json:full") -@IocBean -public class SchoolManagerController { - - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - @Inject - private AuditService auditService; - - - @At("") - @Ok("beetl:/platform/zgfw/difficulty/schoolmanager.html") - @RequiresPermissions("fw.difficulty.schoolmanager") - public void index() { - } - - @At - @ViReturn - @RequiresPermissions("fw.difficulty.schoolmanager") - public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit, - @Param(value = "year", required = false) Integer year, - @Param(value = "unitId", required = false) String unitId, - @Param(value = "unionId", required = false) String unionId, PageForm page) { - CndPlus cnd = CndPlus.create(); - cnd.and("sq.zt", isAudit ? ">" : "=", 200); - return zgfwKnbfService.pageData(cnd, page, year, unitId, unionId); - } - - @At - @ViReturn - @RequiresPermissions("fw.difficulty.schoolmanager") - @Aop(TransAop.READ_COMMITTED) - public Object doReview(String id, Integer pass, Audit audit, @Param(value = "xghbzje", required = false) String xghbzje) { - audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); - audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); - audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); - audit.setAuditTime(new Date()); - audit = auditService.insert(audit); - Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); - zgfw_knbf.setSchool_manager_audit(audit.getId()); -// zgfw_knbf.setXghbzje(xghbzje); - if (pass == 1) { - //不通过 - zgfw_knbf.setZt(250); - } - if (pass == 2) { - //通过 - zgfw_knbf.setZt(500); - } - if (pass == 3) { - zgfw_knbf.setZt(252); - } - zgfwKnbfService.updateIgnoreNull(zgfw_knbf); - - if (pass == 1){ - DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf); - } else if (pass == 2){ - DifficultToDoHandler.COMPLETE_PROCESS.exec(zgfw_knbf); - } - DifficultToDoHandler.COMPLETE_SCHOOL_TASK.exec(zgfw_knbf); - return null; - } - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolStandingController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolStandingController.java deleted file mode 100644 index 55dc9a3..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolStandingController.java +++ /dev/null @@ -1,78 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; -import org.nutz.mvc.annotation.Param; - -import java.util.Date; - -/** - * @author zhf - * @date 2021/1/30 8:49 - * @description 校工会常务副主席审核 - */ -@At("/platform/fw/difficulty/schoolstanding") -@Ok("json:full") -@IocBean -public class SchoolStandingController { - - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - @Inject - private AuditService auditService; - - - @At("") - @Ok("beetl:/platform/fw/difficulty/schoolstanding.html") - @RequiresPermissions("fw.difficulty.schoolstanding") - public void index() { - } - - - @At() - @ViReturn - @RequiresPermissions("fw.difficulty.schoolstanding") - public Object pageData(@Param(value = "isAudit",required = false) Boolean isAudit, - @Param(value = "year",required = false) Integer year, - @Param(value = "unitId",required = false) String unitId, - @Param(value = "unionId",required = false) String unionId, PageForm page) { - CndPlus cnd = CndPlus.create(); - cnd.and("sq.zt", isAudit ? ">" : "=", 400); - return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId); - } - - - @At - @ViReturn - @RequiresPermissions("fw.difficulty.schoolstanding") - public Object doReview(String id, boolean pass, Audit audit, String jb, String xghbzje) { - audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); - audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); - audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); - audit.setAuditTime(new Date()); - audit = auditService.insert(audit); - Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); - zgfw_knbf.setSchool_standing_audit(audit.getId()); - zgfw_knbf.setJb(jb); - zgfw_knbf.setXghbzje(xghbzje); - zgfw_knbf.setZt(pass ? 500 : 450); - zgfwKnbfService.updateIgnoreNull(zgfw_knbf); - return null; - } - - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolViceChairmanCon.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolViceChairmanCon.java deleted file mode 100644 index baea84a..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/SchoolViceChairmanCon.java +++ /dev/null @@ -1,77 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; -import org.nutz.mvc.annotation.Param; - -import java.util.Date; - -/** - * @author zhf - * @date 2021/1/30 8:47 - * @description 校工会财务审核 - */ -@At("/platform/fw/difficulty/schoolvicechairman") -@Ok("json:full") -@IocBean -public class SchoolViceChairmanCon { - - - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - @Inject - private AuditService auditService; - - - @At("") - @Ok("beetl:/platform/fw/difficulty/schoolvicechairman.html") - @RequiresPermissions("fw.difficulty.schoolvicechairman") - public void index() { - } - - - @At() - @ViReturn - @RequiresPermissions("fw.difficulty.schoolvicechairman") - public Object pageData(@Param(value = "isAudit",required = false) Boolean isAudit, - @Param(value = "year",required = false) Integer year, - @Param(value = "unitId",required = false) String unitId, - @Param(value = "unionId",required = false) String unionId, PageForm page) { - CndPlus cnd = CndPlus.create(); - cnd.and("sq.zt", isAudit ? ">" : "=", 300); - return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId); - } - - - @At - @ViReturn - @RequiresPermissions("fw.difficulty.schoolvicechairman") - public Object doReview(String id, boolean pass, Audit audit) { - audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); - audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); - audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); - audit.setAuditTime(new Date()); - audit = auditService.insert(audit); - Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); - zgfw_knbf.setSchool_vice_chairman_audit(audit.getId()); - zgfw_knbf.setZt(pass ? 500 : 350); - zgfwKnbfService.updateIgnoreNull(zgfw_knbf); - return null; - } - - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/TwoOrganizationController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/TwoOrganizationController.java deleted file mode 100644 index 71f56b1..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/TwoOrganizationController.java +++ /dev/null @@ -1,95 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.base.utils.Vi; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler; -import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.nutz.aop.interceptor.ioc.TransAop; -import org.nutz.ioc.aop.Aop; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; -import org.nutz.mvc.annotation.Param; - -import java.util.Date; - -/** - * 二级党组织审核 - */ - -@At("/platform/fw/difficulty/twoOrganization") -@Ok("json:full") -@IocBean -public class TwoOrganizationController { - - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - @Inject - private AuditService auditService; - - @Inject - private Vi vi; - - @At("") - @Ok("beetl:/platform/zgfw/difficulty/twoOrganization.html") - @RequiresPermissions("fw.difficulty.twoOrganization") - public void index() { - } - - @At() - @ViReturn - @RequiresPermissions("fw.difficulty.twoOrganization") - public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit, - @Param(value = "year", required = false) Integer year, - @Param(value = "unitId", required = false) String unitId, - @Param(value = "unionId", required = false) String unionId, PageForm page) { - CndPlus cnd = CndPlus.create(); - cnd.and("sq.zt", isAudit ? ">" : "=", 155); - return zgfwKnbfService.pageData(cnd, page, year, unitId, unionId); - } - - @At - @ViReturn - @RequiresPermissions("fw.difficulty.twoOrganization") - @Aop(TransAop.READ_COMMITTED) - public Object doReview(String id, Integer pass, Audit audit, @Param(value = "xghbzje", required = false) String xghbzje) { - audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); - audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); - audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); - audit.setAuditTime(new Date()); - audit = auditService.insert(audit); - Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); - if (pass == 1) { - //不通过 - zgfw_knbf.setZt(156); - } else if (pass == 2) { - //通过 - zgfw_knbf.setZt(200); - } else { - zgfw_knbf.setZt(157); - } - zgfw_knbf.setXghbzje(xghbzje); - zgfw_knbf.setTwo_dzz_audit(audit.getId()); - zgfwKnbfService.updateIgnoreNull(zgfw_knbf); - - if (pass == 1){ - DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf); - }else if (pass == 2){ - DifficultToDoHandler.CREATE_SCHOOL_TASK.exec(zgfw_knbf); - } - DifficultToDoHandler.COMPLETE_FINANCE_TASK.exec(zgfw_knbf); - return null; - } - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/UnionChairmanController.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/UnionChairmanController.java deleted file mode 100644 index 8cd2482..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/UnionChairmanController.java +++ /dev/null @@ -1,120 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - -import io.v.nutz.base.annontation.ViReturn; -import io.v.nutz.base.dao.CndPlus; -import io.v.nutz.base.model.Audit; -import io.v.nutz.base.query.PageForm; -import io.v.nutz.base.service.AuditService; -import io.v.nutz.base.utils.Vi; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler; -import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.nutz.aop.interceptor.ioc.TransAop; -import org.nutz.dao.Chain; -import org.nutz.dao.Cnd; -import org.nutz.ioc.aop.Aop; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; -import org.nutz.mvc.annotation.Param; - -import java.util.Date; - -/** - * @author zhf - * @date 2021/1/30 8:34 - * @description 工会主席审核 - */ -@At("/platform/fw/difficulty/unionchairman") -@Ok("json:full") -@IocBean -public class UnionChairmanController { - - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - @Inject - private AuditService auditService; - - @Inject - private Vi vi; - - @At("") - @Ok("beetl:/platform/zgfw/difficulty/unionchairman.html") - @RequiresPermissions("fw.difficulty.unionchairman") - public void index() { - } - - @At() - @ViReturn - @RequiresPermissions("fw.difficulty.unionchairman") - public Object pageData(@Param(value = "isAudit",required = false) Boolean isAudit, - @Param(value = "year",required = false) Integer year, - @Param(value = "unitId",required = false) String unitId, - @Param(value = "unionId",required = false) String unionId, PageForm page) { - CndPlus cnd = CndPlus.create(); - if (!ShiroUtil.hasAnyRoles("sysadmin")){ - cnd.and("un.id", "=", vi.getUnionId()); - } - cnd.and("sq.zt", isAudit ? ">" : "=", 100); - return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId); - } - - - @At - @ViReturn - @RequiresPermissions("fw.difficulty.unionchairman") - public Object doEdit(String id) { - Zgfw_knbf knbf = zgfwKnbfService.fetch(id); - int zt = 0; - //审核通过,撤回为待校工会审核 - if(knbf.getZt().equals(500)){ - zt=200; - } else if (knbf.getZt().equals(200)){//待校工会审核,撤回为待二级党组织审核 - zt=155; - }else if (knbf.getZt().equals(155)){//待二级党组织审核,撤回为待分工会审核 - zt=100; - } - zgfwKnbfService.update(Chain.make("zt", zt), Cnd.where("id", "=", id)); - return null; - } - - - @At - @ViReturn - @RequiresPermissions("fw.difficulty.unionchairman") - @Aop(TransAop.READ_COMMITTED) - public Object doReview(String id, Integer pass, Audit audit) { - audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString()); - audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString()); - audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString()); - audit.setAuditTime(new Date()); - audit = auditService.insert(audit); - Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id); - if (pass == 1) { - //不通过 - zgfw_knbf.setZt(150); - } else if (pass == 2) { - zgfw_knbf.setZt(152); - } else { - //通过 - zgfw_knbf.setZt(155); - } - zgfw_knbf.setUnion_president_audit(audit.getId()); - zgfwKnbfService.updateIgnoreNull(zgfw_knbf); - - if (pass == 1){ - DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf); - }else if (pass == 3){ - DifficultToDoHandler.CREATE_FINANCE_TASK.exec(zgfw_knbf); - } - DifficultToDoHandler.COMPLETE_UNION_TASK.exec(zgfw_knbf); - return null; - } - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ZgfwKnbfSjdrCon.java b/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ZgfwKnbfSjdrCon.java deleted file mode 100644 index 2bffd89..0000000 --- a/src/main/java/io/v/nutz/zhgh/zgfw/controller/difficult/ZgfwKnbfSjdrCon.java +++ /dev/null @@ -1,407 +0,0 @@ -package io.v.nutz.zhgh.zgfw.controller.difficult; - - -import cn.wizzer.framework.base.Result; -import io.v.nutz.base.utils.DateUtil; -import io.v.nutz.web.commons.utils.ShiroUtil; -import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService; -import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService; -import org.apache.poi.hssf.usermodel.HSSFCell; -import org.apache.poi.hssf.usermodel.HSSFRow; -import org.apache.poi.hssf.usermodel.HSSFSheet; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.ss.usermodel.CellType; -import org.apache.poi.xssf.usermodel.XSSFCell; -import org.apache.poi.xssf.usermodel.XSSFRow; -import org.apache.poi.xssf.usermodel.XSSFSheet; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -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.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.AdaptBy; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; -import org.nutz.mvc.annotation.Param; -import org.nutz.mvc.upload.TempFile; -import org.nutz.mvc.upload.UploadAdaptor; - -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.List; - -/** - * @Author: V - * @Date: 2020/5/26 9:59 - * @Description: 数据导入 - */ -@IocBean -@Ok("json") -@At("/platform/knbf/sjdr") -public class ZgfwKnbfSjdrCon extends ZgfwUtil { - - - @Inject - private ZgfwKnbfService zgfwKnbfService; - - @Inject - private ZgfwKnbfJtcyService zgfwKnbfJtcyService; - - @At("") - @Ok("re") - @RequiresPermissions("zgfw.knbf.sjdr") - public String index() { - return "beetl:/platform/fw/difficulty/sjdr.html"; - } - - - @At - @RequiresPermissions("zgfw.knbf.sjdr") - public Object queryUser(String query) { - try { - Sql sql = Sqls.create("SELECT u.*,un.`name` unitname from sys_user u left join sys_unit un on u.unitid = un.id $condition"); - Cnd cnd = Cnd.NEW(); - - if (!ShiroUtil.hasAnyRoles("sysadmin", "A06")) { - SqlExpressionGroup group = new SqlExpressionGroup(); - if (ShiroUtil.hasRole("H04")) { - //院级工会 - group.or("unit.unionid", "in", getFghIdStr()); - } - cnd.and(group); - } - - SqlExpressionGroup g2 = new SqlExpressionGroup(); - g2.orLike("username", query); - g2.orLike("loginname", query); - - cnd.and(g2); - cnd.asc("u.unitid"); - sql.setCondition(cnd); - - return Result.success().addData(sysUserService.listPage(1, 50, sql)); - } catch (Exception e) { - return Result.error(); - } - } - - @At - @RequiresPermissions("zgfw.knbf.sjdr") - public Object doAdd(Zgfw_knbf zgfw_knbf) { - try { - zgfw_knbf.setZyzkyy("[]"); - zgfw_knbf.setJtfc("[]"); - zgfw_knbf.setJtcc("[]"); - zgfw_knbf.setZt(600); - zgfwKnbfService.insert(zgfw_knbf); - return Result.success(); - } catch (Exception e) { - return Result.error(); - } - } - - /** - * 下载摸板 - * - * @param response - * @throws IOException - */ - @At - @RequiresPermissions("zgfw.knbf.sjdr") - public void downLoadTemp(HttpServletResponse response) throws IOException { - File file = null; - InputStream fin = null; - ServletOutputStream out = null; - try { - file = new File("src/main/resources/templates/knbfls.xlsx"); - fin = new FileInputStream(file); - // 设置浏览器以下载的方式处理该文件名 - String fileName = "困难帮扶历史数据" + ".xlsx"; - response.setHeader("Content-Disposition", "attachment;filename=" - .concat(String.valueOf(URLEncoder.encode(fileName, "UTF-8")))); - - out = response.getOutputStream(); - byte[] buffer = new byte[512]; // 缓冲区 - int bytesToRead = -1; - // 通过循环将读入的Word文件的内容输出到浏览器中 - while ((bytesToRead = fin.read(buffer)) != -1) { - out.write(buffer, 0, bytesToRead); - } - out.flush(); - } finally { - if (fin != null) fin.close(); - if (out != null) out.close(); - } - } - - @At - @Ok("json") - @AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"}) - @RequiresPermissions("zgfw.knbf.sjdr") - public Object getRow(@Param("file") TempFile tempFile,@Param(value = "year",required = false) String year) { - try { - if (tempFile == null) { - return Result.error("文件为空!"); - } - - List result = new ArrayList<>(); - - InputStream fileInputStream = tempFile.getInputStream(); - String suffixName = tempFile.getSubmittedFileName().substring(tempFile.getSubmittedFileName().lastIndexOf(".")).toLowerCase(); - - if (suffixName.equals(".xls")) { - HSSFWorkbook hssfWorkbook = new HSSFWorkbook(fileInputStream); - //2.获取要解析的表格(第一个表格) - HSSFSheet sheet = hssfWorkbook.getSheetAt(0); - //获得最后一行的行号 - int lastRowNum = sheet.getLastRowNum(); - for (int i = 1; i <= lastRowNum; i++) {//遍历每一行 - //3.获得要解析的行 - HSSFRow row = sheet.getRow(i); - - String unitname = null; - String loginname = null; - String username = null; - String sex = null; - String jtzz = null; - String lxfs = null; - String zyzkyybz = null; - Integer jtrs = null; - Integer brnzsr = null; - Integer jtnzsr = null; - String jb = null; - - //4.获得每个单元格中的内容(String) - - HSSFCell cell1 = row.getCell(1); - HSSFCell cell2 = row.getCell(2); - HSSFCell cell3 = row.getCell(3); - HSSFCell cell4 = row.getCell(4); - HSSFCell cell5 = row.getCell(5); - HSSFCell cell6 = row.getCell(6); - HSSFCell cell7 = row.getCell(7); - HSSFCell cell8 = row.getCell(8); - HSSFCell cell9 = row.getCell(9); - HSSFCell cell10 = row.getCell(10); - HSSFCell cell11 = row.getCell(11); - - if (cell1 != null) { - cell1.setCellType(CellType.STRING); - unitname = cell1.getStringCellValue(); - } - if (cell2 != null) { - cell2.setCellType(CellType.STRING); - loginname = cell2.getStringCellValue(); - } - if (cell3 != null) { - cell3.setCellType(CellType.STRING); - username = cell3.getStringCellValue(); - } - if (cell4 != null) { - cell4.setCellType(CellType.STRING); - sex = cell4.getStringCellValue(); - } - if (cell5 != null) { - cell5.setCellType(CellType.STRING); - jtzz = cell5.getStringCellValue(); - } - if (cell6 != null) { - cell6.setCellType(CellType.STRING); - lxfs = cell6.getStringCellValue(); - } - if (cell7 != null) { - cell7.setCellType(CellType.STRING); - zyzkyybz = cell7.getStringCellValue(); - } - if (cell8 != null) { - cell8.setCellType(CellType.STRING); - jtrs = Strings.isBlank(cell8.getStringCellValue()) ? null : Integer.parseInt(cell8.getStringCellValue()); - } - if (cell9 != null) { - cell9.setCellType(CellType.STRING); - brnzsr = Strings.isBlank(cell9.getStringCellValue()) ? null : Integer.parseInt(cell9.getStringCellValue()); - } - if (cell10 != null) { - cell10.setCellType(CellType.STRING); - jtnzsr = Strings.isBlank(cell10.getStringCellValue()) ? null : Integer.parseInt(cell10.getStringCellValue()); - } - if (cell11 != null) { - cell11.setCellType(CellType.STRING); - jb = cell11.getStringCellValue(); - } - - Sql sql = Sqls.create("SELECT u.*,un.`name` unitname from sys_user u left join sys_unit un on u.unitid = un.id WHERE u.loginname = @loginname LIMIT 1").setParam("loginname", loginname); - List list = sysUserService.list(sql); - if (list.size() > 0) { - Record record = list.get(0); - - NutMap map = new NutMap(); - map.setv("sqr", record == null ? "" : record.getString("id")); - map.setv("unitname", record == null ? "" : record.getString("unitname")); - map.setv("loginname", loginname == null ? "" : loginname); - map.setv("username", record == null ? "" : record.getString("username")); - map.setv("sex", sex == null ? "" : sex); - map.setv("jtzz", jtzz == null ? "" : jtzz); - map.setv("lxfs", lxfs == null ? "" : lxfs); - map.setv("zyzkyybz", zyzkyybz == null ? "" : zyzkyybz); - map.setv("jtrs", jtrs); - map.setv("brnzsr", brnzsr); - map.setv("jtnzsr", jtnzsr); - map.setv("jb", jb == null ? "" : jb); - - result.add(map); - } - - - } - } else if (suffixName.equals(".xlsx")) { - XSSFWorkbook xssfWorkbook = new XSSFWorkbook(fileInputStream); - //2.获取要解析的表格(第一个表格) - XSSFSheet sheet = xssfWorkbook.getSheetAt(0); - - //获得最后一行的行号 - int lastRowNum = sheet.getLastRowNum(); - for (int i = 1; i <= lastRowNum; i++) {//遍历每一行 - //3.获得要解析的行 - XSSFRow row = sheet.getRow(i); - - String unitname = null; - String loginname = null; - String username = null; - String sex = null; - String jtzz = null; - String lxfs = null; - String zyzkyybz = null; - Integer jtrs = null; - Integer brnzsr = null; - Integer jtnzsr = null; - String jb = null; - //4.获得每个单元格中的内容(String) - - XSSFCell cell1 = row.getCell(1); - XSSFCell cell2 = row.getCell(2); - XSSFCell cell3 = row.getCell(3); - XSSFCell cell4 = row.getCell(4); - XSSFCell cell5 = row.getCell(5); - XSSFCell cell6 = row.getCell(6); - XSSFCell cell7 = row.getCell(7); - XSSFCell cell8 = row.getCell(8); - XSSFCell cell9 = row.getCell(9); - XSSFCell cell10 = row.getCell(10); - XSSFCell cell11 = row.getCell(11); - - if (cell1 != null) { - cell1.setCellType(CellType.STRING); - unitname = cell1.getStringCellValue(); - } - if (cell2 != null) { - cell2.setCellType(CellType.STRING); - loginname = cell2.getStringCellValue(); - } - if (cell3 != null) { - cell3.setCellType(CellType.STRING); - username = cell3.getStringCellValue(); - } - if (cell4 != null) { - cell4.setCellType(CellType.STRING); - sex = cell4.getStringCellValue(); - } - if (cell5 != null) { - cell5.setCellType(CellType.STRING); - jtzz = cell5.getStringCellValue(); - } - if (cell6 != null) { - cell6.setCellType(CellType.STRING); - lxfs = cell6.getStringCellValue(); - } - if (cell7 != null) { - cell7.setCellType(CellType.STRING); - zyzkyybz = cell7.getStringCellValue(); - } - if (cell8 != null) { - cell8.setCellType(CellType.STRING); - jtrs = Strings.isBlank(cell8.getStringCellValue()) ? null : Integer.parseInt(cell8.getStringCellValue()); - } - if (cell9 != null) { - cell9.setCellType(CellType.STRING); - brnzsr = Strings.isBlank(cell9.getStringCellValue()) ? null : Integer.parseInt(cell9.getStringCellValue()); - } - if (cell10 != null) { - cell10.setCellType(CellType.STRING); - jtnzsr = Strings.isBlank(cell10.getStringCellValue()) ? null : Integer.parseInt(cell10.getStringCellValue()); - } - if (cell11 != null) { - cell11.setCellType(CellType.STRING); - jb = cell11.getStringCellValue(); - } - - Sql sql = Sqls.create("SELECT u.*,un.`name` unitname from sys_user u left join sys_unit un on u.unitid = un.id WHERE u.loginname = @loginname LIMIT 1").setParam("loginname", loginname); - List list = sysUserService.list(sql); - if (list.size() > 0) { - Record record = list.get(0); - - NutMap map = new NutMap(); - map.setv("sqr", record == null ? "" : record.getString("id")); - map.setv("unitname", record == null ? "" : record.getString("unitname")); - map.setv("loginname", loginname == null ? "" : loginname); - map.setv("username", record == null ? "" : record.getString("username")); - map.setv("sex", sex == null ? "" : sex); - map.setv("jtzz", jtzz == null ? "" : jtzz); - map.setv("lxfs", lxfs == null ? "" : lxfs); - map.setv("zyzkyybz", zyzkyybz == null ? "" : zyzkyybz); - map.setv("jtrs", jtrs); - map.setv("brnzsr", brnzsr); - map.setv("jtnzsr", jtnzsr); - map.setv("jb", jb == null ? "" : jb); - result.add(map); - } - } - } else { - return Result.error("文件类型不对!必须为excel表格!"); - } - - return Result.success().addData(result); - } catch (Exception e) { - e.printStackTrace(); - return Result.error(); - } - } - - - @At - @Ok("json") - @RequiresPermissions("zgfw.knbf.sjdr") - public Object write(Zgfw_knbf[] zgfw_knbfs, String sqsj) { - try { - if (Strings.isBlank(sqsj)) { - throw new RuntimeException(); - } - for (Zgfw_knbf zgfw_knbf : zgfw_knbfs) { - zgfw_knbf.setZyzkyy("[]"); - zgfw_knbf.setJtfc("[]"); - zgfw_knbf.setJtcc("[]"); - zgfw_knbf.setZt(600); - zgfw_knbf.setSqsj(DateUtil.getDate()); - zgfwKnbfService.insert(zgfw_knbf); - } - return Result.success(); - } catch (Exception e) { - return Result.error(); - } - } - - -} diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/handler/difficult/DifficultToDoHandler.java b/src/main/java/io/v/nutz/zhgh/zgfw/handler/difficult/DifficultToDoHandler.java index 656ce7b..eed835e 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/handler/difficult/DifficultToDoHandler.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/handler/difficult/DifficultToDoHandler.java @@ -1,6 +1,5 @@ package io.v.nutz.zhgh.zgfw.handler.difficult; -import io.v.nutz.base.utils.Vi; import io.v.nutz.base.utils.ViResource; import io.v.nutz.sys.services.SysLocalProcessService; import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl; @@ -24,7 +23,7 @@ public enum DifficultToDoHandler { START_PROCESS(){ @Override public void exec(Zgfw_knbf knbf) { - Sql sql = Sqls.fetchString(Sqls.create("select username from sys_user where id = @id").setParam("id", knbf.getSqr()).toString()); + Sql sql = Sqls.fetchString(Sqls.create("select username from sys_user where id = @id").setParam("id", knbf.getUserId()).toString()); dao.execute(sql); String username = sql.getString(); @@ -32,9 +31,9 @@ public enum DifficultToDoHandler { "【困难帮扶】" + username, "zgfw_knbf@" + knbf.getId(), "", - knbf.getSqr(), - "/platform/fw/difficulty/applylist", - "/platform/fw/difficulty/applylist" + knbf.getUserId(), + "/platform/difficulty/applylist", + "/platform/difficulty/applylist" ); } }, @@ -45,7 +44,7 @@ public enum DifficultToDoHandler { CREATE_APPLY_RE_MODIFY_TASK(){ @Override public void exec(Zgfw_knbf knbf) { - Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", knbf.getSqr()).toString()); + Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", knbf.getUserId()).toString()); dao.execute(sql); String loginname = sql.getString(); @@ -55,10 +54,10 @@ public enum DifficultToDoHandler { "退回重新修改", ShiroUtil.getUserId(), List.of(loginname), - "/platform/fw/difficulty/applylist", - "/platform/fw/difficulty/applylist", - "/platform/fw/difficulty/applylist", - "/platform/fw/difficulty/applylist" + "/platform/difficulty/applylist", + "/platform/difficulty/applylist", + "/platform/difficulty/applylist", + "/platform/difficulty/applylist" ); } }, @@ -85,17 +84,17 @@ public enum DifficultToDoHandler { CREATE_UNION_TASK(){ @Override public void exec(Zgfw_knbf knbf) { - List unionLeader = zgfwKnbfService.getUnionLeader(knbf.getSqr()); + List unionLeader = zgfwKnbfService.getUnionLeader(knbf.getUserId()); localProcessService.createTask( "zgfw_knbf@" + knbf.getId(), - "union_president_audit", + "branchUnionAudit", "分工会审核", ShiroUtil.getUserId(), unionLeader, - "/platform/fw/difficulty/unionchairman", - "/platform/fw/difficulty/unionchairman", - "/platform/fw/difficulty/unionchairman", - "/platform/fw/difficulty/unionchairman" + "/platform/difficulty/branchUnionAudit", + "/platform/difficulty/branchUnionAudit", + "/platform/difficulty/branchUnionAudit", + "/platform/difficulty/branchUnionAudit" ); localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "分工会审核"); } @@ -108,7 +107,7 @@ public enum DifficultToDoHandler { @Override public void exec(Zgfw_knbf knbf) { localProcessService.completeTask( - "union_president_audit", + "branchUnionAudit", "zgfw_knbf@" + knbf.getId(), ShiroUtil.getUserId(), "" @@ -117,36 +116,36 @@ public enum DifficultToDoHandler { }, /** - * 创建财务任务 + * 创建校工会初审任务 */ CREATE_FINANCE_TASK(){ @Override public void exec(Zgfw_knbf knbf) { - List schoolUnionAccountant = Vi.getSchoolUnionAccountant(); + List list = zgfwKnbfService.getSchoolUnionDifficultyAdmin(); localProcessService.createTask( "zgfw_knbf@" + knbf.getId(), - "two_dzz_audit", - "财务审核", + "schoolUnionInitialAudit", + "校工会初审", ShiroUtil.getUserId(), - schoolUnionAccountant, - "/platform/fw/difficulty/twoOrganization", - "/platform/fw/difficulty/twoOrganization", - "/platform/fw/difficulty/twoOrganization", - "/platform/fw/difficulty/twoOrganization" + list, + "/platform/difficulty/schoolUnionInitialAudit", + "/platform/difficulty/schoolUnionInitialAudit", + "/platform/difficulty/schoolUnionInitialAudit", + "/platform/difficulty/schoolUnionInitialAudit" ); - localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "财务审核"); + localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "校工会初审"); } }, /** - * 财务完成 + * 校工会初审任务完成 */ COMPLETE_FINANCE_TASK(){ @Override public void exec(Zgfw_knbf knbf) { localProcessService.completeTask( - "two_dzz_audit", + "schoolUnionInitialAudit", "zgfw_knbf@" + knbf.getId(), ShiroUtil.getUserId(), "" @@ -163,14 +162,14 @@ public enum DifficultToDoHandler { List list = zgfwKnbfService.getSchoolUnionDifficultyAdmin(); localProcessService.createTask( "zgfw_knbf@" + knbf.getId(), - "school_standing_audit", - "校工会审核", + "schoolUnionFinalAudit", + "工会常委会审核", ShiroUtil.getUserId(), list, - "/platform/fw/difficulty/schoolmanager", - "/platform/fw/difficulty/schoolmanager", - "/platform/fw/difficulty/schoolmanager", - "/platform/fw/difficulty/schoolmanager" + "/platform/difficulty/schoolUnionFinalAudit", + "/platform/difficulty/schoolUnionFinalAudit", + "/platform/difficulty/schoolUnionFinalAudit", + "/platform/difficulty/schoolUnionFinalAudit" ); localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "校工会审核"); @@ -184,7 +183,7 @@ public enum DifficultToDoHandler { @Override public void exec(Zgfw_knbf knbf) { localProcessService.completeTask( - "school_standing_audit", + "schoolUnionFinalAudit", "zgfw_knbf@" + knbf.getId(), ShiroUtil.getUserId(), "" @@ -200,10 +199,15 @@ public enum DifficultToDoHandler { public void exec(Zgfw_knbf knbf) { localProcessService.completeProcess("zgfw_knbf@" + knbf.getId()); } + }, + + DELETE_PROCESS(){ + @Override + public void exec(Zgfw_knbf knbf) { + localProcessService.deleteProcessInstance("zgfw_knbf@" + knbf.getId()); + } }; - - public abstract void exec(Zgfw_knbf knbf); public Dao dao = ViResource.dao; public ZgfwKnbfService zgfwKnbfService = ViResource.ioc.get(ZgfwKnbfServiceImpl.class); diff --git a/src/main/java/io/v/nutz/zhgh/zgfw/model/difficult/Zgfw_knbf.java b/src/main/java/io/v/nutz/zhgh/zgfw/model/difficult/Zgfw_knbf.java index 2063992..63fb9f9 100644 --- a/src/main/java/io/v/nutz/zhgh/zgfw/model/difficult/Zgfw_knbf.java +++ b/src/main/java/io/v/nutz/zhgh/zgfw/model/difficult/Zgfw_knbf.java @@ -1,6 +1,8 @@ package io.v.nutz.zhgh.zgfw.model.difficult; +import cn.hutool.json.JSONObject; +import io.v.nutz.base.model.Audit; import io.v.nutz.sys.models.Sys_file; import lombok.Data; import org.nutz.dao.DB; @@ -8,6 +10,7 @@ import org.nutz.dao.entity.annotation.*; import org.nutz.integration.json4excel.annotation.J4EIgnore; import java.io.Serializable; +import java.util.Date; import java.util.List; /** @@ -30,43 +33,43 @@ public class Zgfw_knbf implements Serializable { @Column @Comment("申请时间") - @ColDefine(type = ColType.VARCHAR, width = 20) - private String sqsj; + @ColDefine(type = ColType.DATETIME) + private Date applyTime; @Column @Comment("申请模式") @ColDefine(type = ColType.VARCHAR, width = 20) - private String apply_mode; + private String mode; + + @Column + @Comment("填写人id") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String proxyUserId; + + @Column + @Comment("填写人姓名") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String proxyUserName; + + @Column + @Comment("填写人工号") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String proxyLoginName; @Column @Comment("申请人id") @ColDefine(type = ColType.VARCHAR, width = 32) - private String sqr; + private String userId; @Column - @Comment("受补助人id") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String bbzrusername; + @Comment("申请人姓名") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String userName; @Column - @Comment("身份证") - @ColDefine(type = ColType.VARCHAR, width = 20) - private String idcard; - - @Column - @Comment("民族") - @ColDefine(type = ColType.VARCHAR, width = 10) - private String mz; - - @Column - @Comment("政治面貌") - @ColDefine(type = ColType.VARCHAR, width = 10) - private String zzmm; - - @Column - @Comment("生日") - @ColDefine(type = ColType.VARCHAR, width = 20) - private String birthday; + @Comment("申请人工号") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String loginName; @Column @Comment("性别") @@ -74,196 +77,94 @@ public class Zgfw_knbf implements Serializable { private String sex; @Column - @Comment("职称") - @ColDefine(type = ColType.VARCHAR, width = 50) - private String zc; + @Comment("单位") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String unitId; @Column - @Comment("职务") - @ColDefine(type = ColType.VARCHAR, width = 50) - private String zw; + @Comment("单位名称") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String unitName; @Column - @Comment("人事编制") - @ColDefine(type = ColType.VARCHAR, width = 50) - private String rsbz; + @Comment("分工会id") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String unionId; @Column - @Comment("参加工作时间") - @ColDefine(type = ColType.VARCHAR, width = 50) - private String cjgzsj; + @Comment("工会名称") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String unionName; @Column - @Comment("医保状况") - @ColDefine(type = ColType.VARCHAR, width = 50) - private String ybzk; + @Comment("月收入") + @ColDefine(type = ColType.VARCHAR, width = 10) + private String monthlyIncome; @Column - @Comment("联系方式") - @ColDefine(type = ColType.VARCHAR, width = 100) - private String lxfs; + @Comment("出生日期") + @ColDefine(type = ColType.DATE) + private Date birthday; @Column - @Comment("本人年总收入") - @ColDefine(type = ColType.INT) - private Integer brnzsr; - - @Column - @Comment("家庭年总收入") - @ColDefine(type = ColType.INT) - private Integer jtnzsr; - - @Column - @Comment("家庭人数") - @ColDefine(type = ColType.INT) - private Integer jtrs; - - @Column - @Comment("现住房类型") - @ColDefine(type = ColType.VARCHAR, width = 50) - private String xzflx; - - @Column - @Comment("建筑面积 m*m") - @ColDefine(type = ColType.INT) - private Integer jzmj; - - @Column - @Comment("家庭房产 (json)") - @ColDefine(type = ColType.TEXT) - private String jtfc; + @Comment("联系电话") + @ColDefine(type = ColType.VARCHAR, width = 20) + private String mobile; @Column @Comment("家庭住址") @ColDefine(type = ColType.VARCHAR, width = 200) - private String jtzz; + private String homeAddress; @Column - @Comment("婚姻状态") - @ColDefine(type = ColType.VARCHAR, width = 20) - private String hyzt; - - @Column - @Comment("家庭车产 (json)") - @ColDefine(type = ColType.TEXT) - private String jtcc; - - @Column - @Comment("所在医院") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String hospital; - - @Column - @Comment("住院时间") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String hospitalized_time; - - - @Column - @Comment("银行名称") - @ColDefine(type = ColType.VARCHAR, width = 100) - private String yhmc; - - @Column - @Comment("银行卡号") - @ColDefine(type = ColType.VARCHAR, width = 30) - private String yhkh; - - @Column - @Comment("科室班组") - @ColDefine(type = ColType.VARCHAR, width = 30) - private String sq_ksbz; - - @Column - @Comment("主要致困原因(json 多选)") - @ColDefine(type = ColType.VARCHAR, width = 100) - private String zyzkyy; - - @Column - @Comment("主要致困原因备注") + @Comment("补助标准") @ColDefine(type = ColType.VARCHAR, width = 500) - private String zyzkyybz; + private String subsidyStandards; + + @Column + @Comment("家庭成员") + @ColDefine(type = ColType.MYSQL_JSON) + private List familyList; @Column @Comment("申请理由") @ColDefine(type = ColType.VARCHAR, width = 500) - private String apply_reason; + private String reason; @Column - @Comment("补助类型") - @ColDefine(type = ColType.VARCHAR, width = 4) - private String sq_bzlx; - - @Column - @Comment("困难类型") - @ColDefine(type = ColType.VARCHAR, width = 4) - private String sq_knlx; - + @Comment("备注") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String remarks; @Column @Comment("附件") - @ColDefine(type = ColType.VARCHAR, width = 500) + @ColDefine(type = ColType.MYSQL_JSON) private List files; - @Many(field = "sqid") - private List jtcys; + @Column + @Comment("申请人签字") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String signature; @Column - @Comment("申请人签字 对应id") + @Comment("分工会审核记录id") @ColDefine(type = ColType.VARCHAR, width = 32) - private String applicantsign; + private String branchUnionAuditId; @Column - @Comment("工会主席审核记录 id") + @Comment("校工会初审审核记录id") @ColDefine(type = ColType.VARCHAR, width = 32) - private String union_president_audit; - + private String schoolUnionInitialAuditId; @Column - @Comment("校工会经办人审核记录 id") + @Comment("工会常委会审核记录id") @ColDefine(type = ColType.VARCHAR, width = 32) - private String school_manager_audit; + private String schoolUnionFinalAuditId; @Column - @Comment("校工会副主席审核记录 id") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String school_vice_chairman_audit; - - @Column - @Comment("校工会审核记录id") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String school_union_audit; - - @Column - @Comment("二级党组织审核记录id") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String two_dzz_audit; - - - @Column - @Comment("校工会常务副主席审核记录id") - @ColDefine(type = ColType.VARCHAR, width = 32) - private String school_standing_audit; - - @Column - @Comment("级别") - @ColDefine(type = ColType.VARCHAR, width = 10) - private String jb; - - @Column - @Comment("补助金额") - @ColDefine(type = ColType.VARCHAR, width = 10) - private String xghbzje; - - @Column - @Comment("上级工会补助金额") - @ColDefine(type = ColType.VARCHAR, width = 20) - private String sjghbzje; - - @Column - @Comment("状态(100 待工会主席审核 150 工会主席不通过 200 校工会经办人审核 250 校工会经办人不通过 300 待校工会副主席审核 350 校工会副主席不通过 400 校工会常务副主席审核 450 校工会常务副主席不通过 500待校工会审核 550校工会主席不通过 600 通过)") + @Comment("状态") @ColDefine(type = ColType.INT, width = 4) - private Integer zt; + private Integer stateId; @Column @Comment("单据号") @@ -272,4 +173,15 @@ public class Zgfw_knbf implements Serializable { }) private Integer document_no; + + @One(field = "branchUnionAuditId") + private Audit branchUnionAudit; + + @One(field = "schoolUnionInitialAuditId") + private Audit schoolUnionInitialAudit; + + @One(field = "schoolUnionFinalAuditId") + private Audit schoolUnionFinalAudit; + + private boolean isSelf; } diff --git a/src/main/resources/static/components/condolence/mobile/common.vue b/src/main/resources/static/components/condolence/mobile/common.vue index 6367123..3637b16 100644 --- a/src/main/resources/static/components/condolence/mobile/common.vue +++ b/src/main/resources/static/components/condolence/mobile/common.vue @@ -1,192 +1,191 @@ - - - - - - - - - diff --git a/src/main/resources/static/components/mobile/mobile/difficulty/info.vue b/src/main/resources/static/components/mobile/mobile/difficulty/info.vue deleted file mode 100644 index 1351a35..0000000 --- a/src/main/resources/static/components/mobile/mobile/difficulty/info.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/main/resources/static/components/mobile/mobile/member/MobileMemberChangeInfo.vue b/src/main/resources/static/components/mobile/mobile/member/MobileMemberChangeInfo.vue deleted file mode 100644 index 3acde73..0000000 --- a/src/main/resources/static/components/mobile/mobile/member/MobileMemberChangeInfo.vue +++ /dev/null @@ -1,214 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/main/resources/static/components/mobile/mobile/member/MobileMemberInfo.vue b/src/main/resources/static/components/mobile/mobile/member/MobileMemberInfo.vue deleted file mode 100644 index 8f558de..0000000 --- a/src/main/resources/static/components/mobile/mobile/member/MobileMemberInfo.vue +++ /dev/null @@ -1,208 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/main/resources/static/components/mobile/mobile/wmhd/info.vue b/src/main/resources/static/components/mobile/mobile/wmhd/info.vue deleted file mode 100644 index 5ee4101..0000000 --- a/src/main/resources/static/components/mobile/mobile/wmhd/info.vue +++ /dev/null @@ -1,247 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/main/resources/static/components/plugins/UserDataScope.vue b/src/main/resources/static/components/plugins/UserDataScope.vue index 8146cca..cdb8898 100644 --- a/src/main/resources/static/components/plugins/UserDataScope.vue +++ b/src/main/resources/static/components/plugins/UserDataScope.vue @@ -1,311 +1,322 @@ diff --git a/src/main/resources/static/components/sign/mobileSign.vue b/src/main/resources/static/components/sign/mobileSign.vue index fad4cc9..113ab8a 100644 --- a/src/main/resources/static/components/sign/mobileSign.vue +++ b/src/main/resources/static/components/sign/mobileSign.vue @@ -4,11 +4,14 @@
打开签字版
- -
-
- 清空重签 - 确定 + +
+
+ 清空重签 + 确定
@@ -54,6 +57,8 @@ module.exports = { openSignDrawingBoard() { this.signDrawingBoardShow = true this.$nextTick(() => { + // 删除之前的canvas + $("#canvas").empty() $("#canvas").jSignature({ width: "100%", height: "100%", @@ -99,8 +104,15 @@ module.exports = { if (this.is_value_base64) { this.imageUrl = value } else { - this.imageUrl = "/signature/getSignData?path=" + value + const prefix = "data:image/png;base64," + if (!value.startsWith(prefix)) { + this.imageUrl = "/signature/getSignData?path=" + value + } else { + this.imageUrl = null + value = null + } } + this.$emit("input", value) }, checkNull() { return $("#canvas").jSignature("getData", "native").length === 0 diff --git a/src/main/resources/static/components/sign/sign.vue b/src/main/resources/static/components/sign/sign.vue index 9c77c5a..6a7801a 100644 --- a/src/main/resources/static/components/sign/sign.vue +++ b/src/main/resources/static/components/sign/sign.vue @@ -85,7 +85,7 @@ module.exports = { const ts = new Date().getTime() + (Math.floor(Math.random() * (1000 - 1 + 1)) + 1).toString() console.log(ts) // this.postAddress = location.protocol + '//' + location.host + '/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64 - this.postAddress = "http://10.10.10.15/signature?prefix=" + this.prefix + "&id=" + ts + "&is_value_base64=" + this.is_value_base64 + this.postAddress = "http://localhost/signature?prefix=" + this.prefix + "&id=" + ts + "&is_value_base64=" + this.is_value_base64 this.showQrCode = true diff --git a/src/main/resources/static/components/userChangeHistory/UserChangeHistory.vue b/src/main/resources/static/components/userChangeHistory/userChangeHistory.vue similarity index 100% rename from src/main/resources/static/components/userChangeHistory/UserChangeHistory.vue rename to src/main/resources/static/components/userChangeHistory/userChangeHistory.vue diff --git a/src/main/resources/views/mobile/club/clubAudit.html b/src/main/resources/views/mobile/club/clubAudit.html index b7997ed..34f0b71 100644 --- a/src/main/resources/views/mobile/club/clubAudit.html +++ b/src/main/resources/views/mobile/club/clubAudit.html @@ -161,7 +161,14 @@ layout("/mobile/platform.html"){ 查看 - + 审核 diff --git a/src/main/resources/views/mobile/club/inClub.html b/src/main/resources/views/mobile/club/inClub.html index e75c22a..8cfead7 100644 --- a/src/main/resources/views/mobile/club/inClub.html +++ b/src/main/resources/views/mobile/club/inClub.html @@ -505,10 +505,21 @@ layout("/mobile/platform.html"){ } str += "请确认是否申请加入【" + row.name + "】?" vant.Dialog.confirm({ title: "提示", message: str }) - .then(() => { + .then(async () => { this.formData.clubid = row.id - this.formData.photo = this.formData.photo[0].filepath - $.post( + if (this.formData.photo && this.formData.photo.length > 0) { + this.formData.photo = this.formData.photo[0].filepath + } + // this.formData.photo = this.formData.photo[0].filepath + const resp = await $.post("/platform/sys/club/sq/submit", this.formData) + if (resp.code === 0) { + vant.Toast(resp.msg) + this.doSearch() + this.infoShow = false + } else { + vant.Toast(resp.msg) + } + /*$.post( "/platform/sys/club/sq/submit", this.formData, (data) => { @@ -521,7 +532,7 @@ layout("/mobile/platform.html"){ } }, "json" - ) + )*/ }) .catch(() => {}) }, diff --git a/src/main/resources/views/mobile/condolence/apply.html b/src/main/resources/views/mobile/condolence/apply.html index abab8d2..ce36c8b 100644 --- a/src/main/resources/views/mobile/condolence/apply.html +++ b/src/main/resources/views/mobile/condolence/apply.html @@ -3,208 +3,149 @@ layout("/mobile/platform.html"){ #-->
- + - - - - + + + + + - - - - + + + + + - + + - + + - + - + + - + - + - + + - + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - + @@ -212,7 +153,8 @@ layout("/mobile/platform.html"){ - + @@ -220,8 +162,8 @@ layout("/mobile/platform.html"){ -
- 上传附件说明:{{ uploadFileDesc }} +
+ 上传附件说明:{{ uploadFileDesc }}
@@ -237,21 +179,26 @@ layout("/mobile/platform.html"){
- 提 交 + + 提 交 +
- 慰问申请 - 慰问记录 + 慰问申请 + + 慰问记录 +
+
- +
- +
- - 撤        回 + 撤        回
@@ -18,7 +21,7 @@ layout("/mobile/platform.html"){ diff --git a/src/main/resources/views/mobile/condolence/apply_list.html b/src/main/resources/views/mobile/condolence/apply_list.html index 5f41b7f..7bdfeaf 100644 --- a/src/main/resources/views/mobile/condolence/apply_list.html +++ b/src/main/resources/views/mobile/condolence/apply_list.html @@ -3,10 +3,8 @@ layout("/mobile/platform.html"){ #-->
- +
@@ -30,11 +29,14 @@ layout("/mobile/platform.html"){
- +
- {{o.be_username}} + + {{o.be_username}} + {{o.apply_time}} {{o.type_name}} @@ -47,61 +49,69 @@ layout("/mobile/platform.html"){
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
- + +
- 慰问申请 - 慰问记录 + 慰问申请 + + 慰问记录 +
+ diff --git a/src/main/resources/views/mobile/condolence/branchunionaudit/index.html b/src/main/resources/views/mobile/condolence/branchunionaudit/index.html new file mode 100644 index 0000000..364963d --- /dev/null +++ b/src/main/resources/views/mobile/condolence/branchunionaudit/index.html @@ -0,0 +1,369 @@ + + +
+ + + + + + + + + +
+ +
+
+
+
+
+ | + {{item.sqr_username + '(' + item.sqr_loginname + ')'}} +
+
+
+ +
+ + + 慰问对象: + {{item.be_username}} + + 对象工号: + + {{item.be_loginname}} + + + + + 所属工会: + + {{item.be_unionname}} + + + 工作单位: + {{item.be_unitname}} + + + + 慰问类型: + {{item.type_name}} + + +
+ + + +
+
+ 当前状态: + {{item.state_name}} +
+
+ 查看 + + 审核 + + +
+
+
+
+
+ +
+ + + + + +
+ +
+
{{ '分工会审核' }}
+ + + + + + + + + +
+ 拒绝 + 退回 + 通过 +
+
+
+
+
+ + + diff --git a/src/main/resources/views/mobile/condolence/fr_Audit.html b/src/main/resources/views/mobile/condolence/fr_Audit.html index f4f9f10..6254790 100644 --- a/src/main/resources/views/mobile/condolence/fr_Audit.html +++ b/src/main/resources/views/mobile/condolence/fr_Audit.html @@ -3,34 +3,37 @@ layout("/mobile/platform.html"){ #-->
- + + - + + - 拒 绝 + 拒 绝 + - 返回修改 + 返回修改 + - 通 过 + 通 过 + + + +
+ + diff --git a/src/main/resources/views/mobile/condolence/school_Audit.html b/src/main/resources/views/mobile/condolence/school_Audit.html index 2ec2374..5835702 100644 --- a/src/main/resources/views/mobile/condolence/school_Audit.html +++ b/src/main/resources/views/mobile/condolence/school_Audit.html @@ -3,53 +3,54 @@ layout("/mobile/platform.html"){ #-->
- + + - + + - 拒 绝 + 拒 绝 + - 返回修改 + 返回修改 + - 通 过 + 通 过 + + + +
+ + diff --git a/src/main/resources/views/mobile/condolence/schoolchairmanaudit/index.html b/src/main/resources/views/mobile/condolence/schoolchairmanaudit/index.html new file mode 100644 index 0000000..fd8adbc --- /dev/null +++ b/src/main/resources/views/mobile/condolence/schoolchairmanaudit/index.html @@ -0,0 +1,382 @@ + + +
+ + + + + + + + + + +
+ +
+
+
+
+
+ | + {{item.sqr_username + '(' + item.sqr_loginname + ')'}} +
+
+
+ +
+ + + 慰问对象: + {{item.be_username}} + + 对象工号: + + {{item.be_loginname}} + + + + + 所属工会: + + {{item.be_unionname}} + + + 工作单位: + {{item.be_unitname}} + + + + 慰问类型: + {{item.type_name}} + + +
+ + + +
+
+ 当前状态: + {{item.state_name}} +
+
+ 查看 + + 审核 + + +
+
+
+
+
+ +
+ + + + + +
+ +
+
{{ '校工会主席' }}
+ + + + + + + + + +
+ 拒绝 + 退回 + 通过 +
+
+
+
+
+ + + diff --git a/src/main/resources/views/mobile/condolence/schoolunionaudit/index.html b/src/main/resources/views/mobile/condolence/schoolunionaudit/index.html new file mode 100644 index 0000000..1868d4d --- /dev/null +++ b/src/main/resources/views/mobile/condolence/schoolunionaudit/index.html @@ -0,0 +1,421 @@ + + +
+ + + + + + + + + + +
+ +
+
+
+
+
+ | + {{item.sqr_username + '(' + item.sqr_loginname + ')'}} +
+
+
+ +
+ + + 慰问对象: + {{item.be_username}} + + 对象工号: + + {{item.be_loginname}} + + + + + 所属工会: + + {{item.be_unionname}} + + + 工作单位: + {{item.be_unitname}} + + + + 慰问类型: + {{item.type_name}} + + +
+ + + +
+
+ 当前状态: + {{item.state_name}} +
+
+ 查看 + + 审核 + + +
+
+
+
+
+ +
+ + + + + +
+ +
+
{{ '校工会审核' }}
+ + + + + + + + + + + + + + + + +
+ 拒绝 + 退回 + 通过 +
+
+
+
+
+ + + diff --git a/src/main/resources/views/mobile/condolence/union_Audit.html b/src/main/resources/views/mobile/condolence/union_Audit.html index 2da9013..42bea98 100644 --- a/src/main/resources/views/mobile/condolence/union_Audit.html +++ b/src/main/resources/views/mobile/condolence/union_Audit.html @@ -3,33 +3,37 @@ layout("/mobile/platform.html"){ #-->
- + + - + - 拒 绝 + 拒 绝 + - 返回修改 + 返回修改 + - 通 过 + 通 过 + + + +
+ + diff --git a/src/main/resources/views/mobile/difficulty/apply.html b/src/main/resources/views/mobile/difficulty/apply.html index e960e25..c91a4a2 100644 --- a/src/main/resources/views/mobile/difficulty/apply.html +++ b/src/main/resources/views/mobile/difficulty/apply.html @@ -2,296 +2,364 @@ layout("/mobile/platform.html"){ #--> + +
- - + + + - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - + v-model="formData.unionName" + label="所在分工会" + placeholder="所在分工会" + readonly + :rules="[{ required: true, message: '所在分工会' }]" + clearable + required + > + + + + + + + + + + + + + - - - + + + + + + + + + - - - - -
- 提 交 -
+ + 提交 +
-
- - 困难补助申请 - 困难补助记录 - -
+ + + + + + + + +
- + diff --git a/src/main/resources/views/mobile/difficulty/apply_info.html b/src/main/resources/views/mobile/difficulty/apply_info.html index c01de28..76a9bfd 100644 --- a/src/main/resources/views/mobile/difficulty/apply_info.html +++ b/src/main/resources/views/mobile/difficulty/apply_info.html @@ -1,10 +1,12 @@ - +
- +
@@ -13,7 +15,7 @@ layout("/mobile/platform.html"){ +#--> \ No newline at end of file diff --git a/src/main/resources/views/mobile/difficulty/apply_list.html b/src/main/resources/views/mobile/difficulty/apply_list.html index c81ccbb..33ca1b2 100644 --- a/src/main/resources/views/mobile/difficulty/apply_list.html +++ b/src/main/resources/views/mobile/difficulty/apply_list.html @@ -3,10 +3,10 @@ layout("/mobile/platform.html"){ #-->
- +
@@ -29,11 +30,14 @@ layout("/mobile/platform.html"){
- +
- {{o.sbzrname}}({{o.sbzrloginname}}) + + {{o.sbzrname}}({{o.sbzrloginname}}) + {{o.sqsj}} {{o.unitname}} @@ -46,30 +50,34 @@ layout("/mobile/platform.html"){
- + +
+#--> \ No newline at end of file diff --git a/src/main/resources/views/mobile/difficulty/audit_list.html b/src/main/resources/views/mobile/difficulty/audit_list.html index af52def..929f397 100644 --- a/src/main/resources/views/mobile/difficulty/audit_list.html +++ b/src/main/resources/views/mobile/difficulty/audit_list.html @@ -3,24 +3,36 @@ layout("/mobile/platform.html"){ #-->
+ - +
- - - - + + + + +
- +
- {{o.sbzrname}}({{o.sbzrloginname}}) + + {{o.sbzrname}}({{o.sbzrloginname}}) + {{o.sqrname}} {{o.sqrunionname}} @@ -34,13 +46,18 @@ layout("/mobile/platform.html"){
- + + + +
+ +#--> \ No newline at end of file diff --git a/src/main/resources/views/mobile/difficulty/branchunionaudit/index.html b/src/main/resources/views/mobile/difficulty/branchunionaudit/index.html new file mode 100644 index 0000000..0b5f24e --- /dev/null +++ b/src/main/resources/views/mobile/difficulty/branchunionaudit/index.html @@ -0,0 +1,356 @@ + + +
+ + + + + + + + + + +
+ +
+
+
+
+
+ | + {{item.userName + '(' + item.loginName + ')'}} +
+
+
+ +
+ + 性       别:{{item.sex}} + 联系方式:{{item.mobile}} + + + 所属工会:{{item.unionName}} + 工作单位:{{item.unitName}} + + + 款       项:{{item.subsidyStandards}} + +
+ + + +
+
+ 当前状态: + {{item.state_name}} +
+
+ 查看 + + 审核 + + 撤回 + +
+
+
+
+
+ +
+ + + + + +
+ +
+
{{ '分工会审核' }}
+ + + + + + + + + + +
+ 拒绝 + 返回修改 + 通过 +
+
+
+
+
+ + diff --git a/src/main/resources/views/mobile/difficulty/common/info.js b/src/main/resources/views/mobile/difficulty/common/info.js new file mode 100644 index 0000000..0d7b907 --- /dev/null +++ b/src/main/resources/views/mobile/difficulty/common/info.js @@ -0,0 +1,161 @@ +const info = { + template: /*language=HTML*/ + ` +
+ + + {{ viewData.userName }} + {{ viewData.loginName }} + {{ viewData.sex }} + {{ viewData.unitName }} + {{ viewData.unionName }} + {{ viewData.monthlyIncome }} + {{ viewData.birthday }} + {{ viewData.mobile }} + {{ viewData.homeAddress }} + {{ viewData.subsidyStandards }} + {{ viewData.reason }} + {{ viewData.remarks }} + + + + + + + + + + + + + + + + + + + + +
序号姓名年龄(岁)关系月收入(元)
{{ index + 1 }}{{ item.name }}{{ item.age }}{{ item.relation }}{{ item.monthlyIncome }}
+
+ + + 暂无 + + + + 暂无 + +
+ + +
+
+ 分工会审核信息 +
+
+ {{ viewData.branchUnionAudit.username }} + {{ viewData.branchUnionAudit.auditTime }} + {{ viewData.branchUnionAudit.ext?.money }}元 + {{ viewData.branchUnionAudit.auditOpinion }} + + + 暂无 + +
+ + +
+
+ 校工会初审信息 +
+
+ {{ viewData.schoolUnionInitialAudit.username }} + {{ viewData.schoolUnionInitialAudit.auditTime }} + {{ viewData.schoolUnionInitialAudit.ext?.money }}元 + {{ viewData.schoolUnionInitialAudit.auditOpinion }} + + + 暂无 + +
+ + +
+
+ 批准部门意见 +
+
+ {{ viewData.schoolUnionFinalAudit.username }} + {{ viewData.schoolUnionFinalAudit.auditTime }} + {{ viewData.schoolUnionInitialAudit.ext?.money }}元 + {{ viewData.schoolUnionFinalAudit.auditOpinion }} + + + 暂无 + +
+
+ `, + data() { + return { + activeName: 'info', + viewData: {} + } + }, + methods: { + CREATE_PREVIEW_URL, + onOpen(id, activeName = '1') { + this.activeName = activeName + $.get('/platform/difficulty/common/findOne', {id}).then(res => { + if (res.code === 0) { + try { + res.data.familyList = JSON.parse(res.data.familyList) + res.data.files = JSON.parse(res.data.files) + } catch (e) { + } + this.viewData = res.data + console.log(this.viewData) + } + }) + } + }, + style: /*language=CSS*/ + ` + .column-cell { + flex-direction: column; + } + .family-table { + width: 100%; + max-width: 100%; + border-collapse: collapse; + table-layout: auto; + text-align: center; + font-family: 'Arial', sans-serif; + margin: 20px 0; + } + .table-header { + background-color: #1867b0; + color: white; + font-weight: bold; + text-transform: uppercase; + } + .table-row { + background-color: #f9f9f9; + transition: background-color 0.3s; + } + .table-row:hover { + background-color: #f1f1f1; + } + .table-cell { + padding: 10px 20px; + border: 1px solid #ddd; + text-align: center; + } + ` +} diff --git a/src/main/resources/views/mobile/difficulty/mine/index.html b/src/main/resources/views/mobile/difficulty/mine/index.html new file mode 100644 index 0000000..9b8ff5b --- /dev/null +++ b/src/main/resources/views/mobile/difficulty/mine/index.html @@ -0,0 +1,293 @@ + + +
+ + + + + + + + + + +
+ +
+
+
+
+
+ | + {{item.userName + '(' + item.loginName + ')'}} +
+
+
+ +
+ + 性       别:{{item.sex}} + 联系方式:{{item.mobile}} + + + 所属工会:{{item.unionName}} + 工作单位:{{item.unitName}} + + + 款       项:{{item.subsidyStandards}} + +
+ + + +
+
+ 当前状态: + {{item.state_name}} +
+
+ 查看 + + 编辑 +
+
+
+
+
+ +
+ + + + + +
+ +
+
+
+ + diff --git a/src/main/resources/views/mobile/difficulty/school_Audit.html b/src/main/resources/views/mobile/difficulty/school_Audit.html index b501e39..c9cd5f0 100644 --- a/src/main/resources/views/mobile/difficulty/school_Audit.html +++ b/src/main/resources/views/mobile/difficulty/school_Audit.html @@ -3,20 +3,35 @@ layout("/mobile/platform.html"){ #-->
- + + + +
+ + diff --git a/src/main/resources/views/mobile/difficulty/schoolunionfinalaudit/index.html b/src/main/resources/views/mobile/difficulty/schoolunionfinalaudit/index.html new file mode 100644 index 0000000..359139b --- /dev/null +++ b/src/main/resources/views/mobile/difficulty/schoolunionfinalaudit/index.html @@ -0,0 +1,369 @@ + + +
+ + + + + + + + + + + +
+ +
+
+
+
+
+ | + {{item.userName + '(' + item.loginName + ')'}} +
+
+
+ +
+ + 性       别:{{item.sex}} + 联系方式:{{item.mobile}} + + + 所属工会:{{item.unionName}} + 工作单位:{{item.unitName}} + + + 款       项:{{item.subsidyStandards}} + +
+ + + +
+
+ 当前状态: + {{item.state_name}} +
+
+ 查看 + + 审核 + + 撤回 + +
+
+
+
+
+ +
+ + + + + + +
+
{{ '工会常委会审核审核' }}
+ + + + + + + + + + +
+ 拒绝 + 返回修改 + 通过 +
+
+
+
+ + diff --git a/src/main/resources/views/mobile/difficulty/schoolunioninitialaudit/index.html b/src/main/resources/views/mobile/difficulty/schoolunioninitialaudit/index.html new file mode 100644 index 0000000..b78526a --- /dev/null +++ b/src/main/resources/views/mobile/difficulty/schoolunioninitialaudit/index.html @@ -0,0 +1,369 @@ + + +
+ + + + + + + + + + + +
+ +
+
+
+
+
+ | + {{item.userName + '(' + item.loginName + ')'}} +
+
+
+ +
+ + 性       别:{{item.sex}} + 联系方式:{{item.mobile}} + + + 所属工会:{{item.unionName}} + 工作单位:{{item.unitName}} + + + 款       项:{{item.subsidyStandards}} + +
+ + + +
+
+ 当前状态: + {{item.state_name}} +
+
+ 查看 + + 审核 + + 撤回 + +
+
+
+
+
+ +
+ + + + + + +
+
{{ '校工会初审' }}
+ + + + + + + + + + +
+ 拒绝 + 返回修改 + 通过 +
+
+
+
+ + diff --git a/src/main/resources/views/mobile/difficulty/union_Audit.html b/src/main/resources/views/mobile/difficulty/union_Audit.html index 34cd51d..3faad7b 100644 --- a/src/main/resources/views/mobile/difficulty/union_Audit.html +++ b/src/main/resources/views/mobile/difficulty/union_Audit.html @@ -3,26 +3,34 @@ layout("/mobile/platform.html"){ #-->
- + + - + - 拒 绝 + 拒 绝 + - 返回修改 + 返回修改 + - 通 过 + 通 过 + + + +
+ + diff --git a/src/main/resources/views/platform/activity/union/applyActivity.html b/src/main/resources/views/platform/activity/union/applyActivity.html index 7a708b7..dd5c223 100644 --- a/src/main/resources/views/platform/activity/union/applyActivity.html +++ b/src/main/resources/views/platform/activity/union/applyActivity.html @@ -8,7 +8,7 @@ } .avatar-uploader .el-upload:hover { - border-color: #409EFF; + border-color: #409eff; } .avatar-uploader-icon { @@ -37,9 +37,8 @@
- - + + @@ -47,30 +46,24 @@ - + - + - + - + :key="item.id" + :label="item.name+' ('+item.code+')'" + :value="item.code" + v-for="item in projectType" + > @@ -86,92 +79,96 @@ - + - + - + :key="item.userId" + :label="item.userName+'-'+item.loginName+'-'+item.unitName" + :value="item.userId" + v-for="item in userList" + > - + - + - + @change="plannedDateChange" + end-placeholder="结束日期" + range-separator="-" + start-placeholder="开始日期" + style="width: 100%" + type="daterange" + v-model="formData.plannedDate" + value-format="yyyy-MM-dd" + > - + end-placeholder="结束日期" + range-separator="-" + start-placeholder="开始日期" + style="width: 100%" + type="daterange" + v-model="formData.time" + value-format="yyyy-MM-dd" + > + :rules="[{required:[1,2].includes(formData.signUpMethod),message:'请选择报名日期',trigger:['change','blur']}]" + label="报名日期" + prop="applyTime2" + > - + end-placeholder="结束时间" + range-separator="-" + start-placeholder="开始时间" + style="width: 100%" + type="datetimerange" + v-model="formData.applyTime2" + value-format="yyyy-MM-dd HH:mm" + > - + @@ -179,29 +176,28 @@
- - + +
- 设置 - + 设置
- - - - - + - + 个人报名 组队报名 @@ -226,126 +219,135 @@ - + - - 总人数限制 - - 分工会人数限制 - + 总人数限制 + 分工会人数限制 不限制 - + - - + - - + - + - + - + - + - - + + -
- ({{index+1}}). {{item}} +
+ ({{index+1}}). + {{item}}
- - - + + + -
+
限制总人数:{{summaryCount}}人
- -
+
- - - + - + :rows="7" + placeholder="请输入活动考核内容" + type="textarea" + v-model="formData.activityExamineContent" + > - - + - - -
+
购置物品及价格
- - + +
- - - - - - + + + - + - + - + - 附件 - + 附件 - - + - + - - + - - - - + + + :label="column.label" + :prop="column.prop" + :sortable="column.sortable" + align="center" + header-align="center" + v-for="column in userColumns" + > - - - + - - + :disabled="!formData.time || Date.now() < Date.parse(formData.time[1])" + :rows="5" + placeholder="请输入活动内容" + type="textarea" + v-model="formData.activitySummary" + > - + class="mb20" + show-icon + style="margin-left: 130px" + title="活动结束后可输入活动总结" + type="info" + v-if="!formData.time || Date.now() < Date.parse(formData.time[1])" + > -
+
确 定
- - - + - + :disabled="item.disabled" + :key="item.userId" + :label="item.userName+'-'+item.loginName+'-'+item.unitName" + :value="item.userId" + v-for="item in userList" + > @@ -629,12 +604,7 @@ - - +
- diff --git a/src/main/resources/views/platform/activity/union/layoutApplyUser.html b/src/main/resources/views/platform/activity/union/layoutApplyUser.html index 381e056..d14bd0c 100644 --- a/src/main/resources/views/platform/activity/union/layoutApplyUser.html +++ b/src/main/resources/views/platform/activity/union/layoutApplyUser.html @@ -3,69 +3,66 @@ -
diff --git a/src/main/resources/views/platform/data/user/UpdateUser.html b/src/main/resources/views/platform/data/user/UpdateUser.html index 0486e8f..e944a62 100644 --- a/src/main/resources/views/platform/data/user/UpdateUser.html +++ b/src/main/resources/views/platform/data/user/UpdateUser.html @@ -30,18 +30,13 @@ layout("/layouts/platform.html"){
- - + - - 时间:{{item.pullTime}}rows: {{item.num}} + + 时间:{{item.pullTime}} + rows: {{item.num}} @@ -246,19 +247,25 @@ layout("/layouts/platform.html"){ - + - + v-for="column in partGroupInfos" + :key="column.groupId" + :label="column.groupName" + :value="column.groupId" + > - - 设置部分更新人员 + + + 设置部分更新人员 + @@ -266,42 +273,32 @@ layout("/layouts/platform.html"){ 过滤字段: - - + + - + v-for="column in columnInfos" + :key="column.COLUMN_NAME" + :label="column.COLUMN_COMMENT" + :value="column.COLUMN_NAME" + > - 该条件为更新时忽略某字段,如无需忽略请勿填充该条件 + 该条件为更新时忽略某字段,如无需忽略请勿填充该条件 - 取 消 确 定 - + - - -
- 返回 - + +
+ 返回
@@ -316,25 +313,23 @@ layout("/layouts/platform.html"){ -
-
diff --git a/src/main/resources/views/platform/member/change/audit/Layout.html b/src/main/resources/views/platform/member/change/audit/Layout.html index 2feca32..d50354d 100644 --- a/src/main/resources/views/platform/member/change/audit/Layout.html +++ b/src/main/resources/views/platform/member/change/audit/Layout.html @@ -15,7 +15,8 @@
- @@ -25,113 +26,89 @@
-
申请时间:
+
在职状态:
- - + +
+
+ +
+
人员类型:
+
+
变更类型:
- +
- +
- 搜索 + 搜索 +
- - - + -