From b05de4830c16765f3dd7c0ce41f3a07f100e08b6 Mon Sep 17 00:00:00 2001 From: "@jyuhsin" <729757837@qq.com> Date: Thu, 18 Sep 2025 10:01:59 +0800 Subject: [PATCH 01/10] commit --- .../manage/FamilyActivityApplyController.java | 5 +- .../FamilyActivityStatisticsServiceImpl.java | 4 +- ...inSignUpActivityStatisticsServiceImpl.java | 4 +- .../controller/LegalApplyController.java | 58 +++++- .../legal/controller/LegalListController.java | 15 +- .../controller/LegalOnlinePostController.java | 22 ++- .../LegalOnlineReplyController.java | 17 +- .../controller/PsychologyApplyController.java | 58 +++++- .../controller/PsychologyIndexController.java | 67 ------- .../controller/PsychologyListController.java | 15 +- .../PsychologyOnlinePostController.java | 22 ++- .../PsychologyOnlineReplyController.java | 17 +- .../static/assets/platform/css/h5.css | 1 + .../activity/culture/common/applyActivity.js | 18 +- .../zhgh/activity/culture/common/infoMange.js | 2 +- .../declare/apply/index.html | 38 ++-- .../declare/mine/index.html | 6 +- .../reimbursement/apply/index.html | 52 ++--- .../reimbursement/mine/index.html | 6 +- .../zhgh/activity/family/apply/signForm.js | 10 +- .../zhgh/activity/family/statistics/info.js | 2 +- .../activity/trainSingUp/statistics/info.js | 2 +- .../zhgh/club/evaluate/apply/index.html | 6 +- .../zhgh/club/evaluate/mine/index.html | 2 +- .../zhgh/club/examine/apply/index.html | 6 +- .../zhgh/club/examine/mine/index.html | 2 +- .../platform/zhgh/club/join/apply/index.html | 6 +- .../platform/zhgh/club/join/list/index.html | 2 +- .../platform/zhgh/club/join/mine/index.html | 2 +- .../zhgh/club/register/apply/index.html | 2 +- .../zhgh/club/register/mine/index.html | 4 +- .../dayofficework/article/mine/index.html | 2 +- .../dayofficework/article/write/index.html | 6 +- .../dayofficework/clothing/record/index.html | 2 +- .../enrollmentRegistration/apply/index.html | 6 +- .../applyList/index.html | 2 +- .../dayofficework/evaluation/apply/apply.js | 6 +- .../outlay/activityBudget/apply/index.html | 6 +- .../activityBudget/applyList/index.html | 4 +- .../outlay/outlayReimburse/apply/index.html | 6 +- .../outlayReimburse/applyList/index.html | 2 +- .../zhgh/dayofficework/site/apply/apply.js | 2 +- .../unionReimburse/apply/index.html | 6 +- .../unionReimburse/mine/index.html | 2 +- .../workershome/declaration/mine.html | 4 +- .../dayofficework/workershome/info/apply.html | 12 +- .../dayofficework/workershome/info/mine.html | 4 +- .../material/mine/index.html | 2 +- .../material/write/index.html | 6 +- .../meeting/mine/index.html | 2 +- .../meeting/write/index.html | 6 +- .../proposal/transact/apply/form.html | 4 +- .../proposal/transact/mine/index.html | 2 +- .../proposal/transact/write/index.html | 6 +- .../democratic/suggestionBox/mine/index.html | 2 +- .../democratic/suggestionBox/query/index.html | 2 +- .../democratic/suggestionBox/write/index.html | 6 +- .../staffbenefit/condolence/apply/index.html | 6 +- .../staffbenefit/condolence/mine/index.html | 4 +- .../difficulthelp/apply/index.html | 60 +++--- .../difficulthelp/mine/index.html | 20 +- .../difficulthelp/reading/index.html | 18 +- .../staffbenefit/dsznfmtx/apply/index.html | 7 +- .../staffbenefit/dsznfmtx/mine/index.html | 3 +- .../staffbenefit/legal/apply/basicForm.js | 2 +- .../zhgh/staffbenefit/legal/apply/index.html | 4 - .../legal/appointmentSet/index.html | 4 - .../zhgh/staffbenefit/legal/list/index.html | 4 +- .../legal/onlinePost/basicForm.js | 2 +- .../staffbenefit/legal/onlinePost/index.html | 4 +- .../staffbenefit/legal/onlinePost/info.js | 8 +- .../legal/onlineReply/basicForm.js | 2 +- .../maternityLeave/apply/index.html | 6 +- .../maternityLeave/mine/index.html | 2 +- .../psychology/apply/basicForm.js | 2 +- .../staffbenefit/psychology/apply/index.html | 4 - .../psychology/appointmentSet/index.html | 4 - .../staffbenefit/psychology/list/index.html | 4 +- .../psychology/onlinePost/basicForm.js | 2 +- .../psychology/onlinePost/index.html | 4 +- .../psychology/onlinePost/info.js | 8 +- .../psychology/onlineReply/basicForm.js | 2 +- .../staffmanage/childManage/manage/index.html | 2 +- .../staffmanage/childManage/mine/index.html | 2 +- .../staffmanage/childManage/write/index.html | 4 +- .../staffmanage/member/apply/mine/index.html | 14 +- .../member/apply/submit/index.html | 36 ++-- .../staffmanage/member/change/mine/index.html | 4 +- .../member/change/submit/index.html | 50 ++--- .../staffbenefit/condolence/mine/index.html | 2 +- .../staffbenefit/legal/apply/index.html | 105 ++++++++++ .../staffbenefit/legal/common/applyForm.js | 139 ++++++++++++++ .../staffbenefit/legal/common/applyInfo.js | 49 +++++ .../staffbenefit/legal/common/doctorInfo.js | 77 ++++++++ .../zhghh5/staffbenefit/legal/list/index.html | 98 ++++++++++ .../legal/onlinePost/applyForm.js | 87 +++++++++ .../staffbenefit/legal/onlinePost/index.html | 123 ++++++++++++ .../staffbenefit/legal/onlinePost/info.js | 73 +++++++ .../legal/onlineReply/applyForm.js | 68 +++++++ .../staffbenefit/legal/onlineReply/index.html | 96 ++++++++++ .../staffbenefit/psychology/apply/index.html | 105 ++++++++++ .../psychology/common/applyForm.js | 139 ++++++++++++++ .../psychology/common/applyInfo.js | 49 +++++ .../psychology/common/doctorInfo.js | 77 ++++++++ .../psychology/doctor/appointment.html | 31 --- .../staffbenefit/psychology/doctor/list.html | 62 ------ .../staffbenefit/psychology/index/index.html | 181 ------------------ .../staffbenefit/psychology/list/index.html | 98 ++++++++++ .../psychology/onlinePost/applyForm.js | 87 +++++++++ .../psychology/onlinePost/index.html | 123 ++++++++++++ .../psychology/onlinePost/info.js | 73 +++++++ .../psychology/onlineReply/applyForm.js | 68 +++++++ .../psychology/onlineReply/index.html | 96 ++++++++++ 113 files changed, 2305 insertions(+), 682 deletions(-) delete mode 100644 src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyIndexController.java create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/apply/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/common/applyForm.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/common/applyInfo.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/common/doctorInfo.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/list/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/onlinePost/applyForm.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/onlinePost/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/onlinePost/info.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/onlineReply/applyForm.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/legal/onlineReply/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/apply/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/common/applyForm.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/common/applyInfo.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/common/doctorInfo.js delete mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/doctor/appointment.html delete mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/doctor/list.html delete mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/index/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/list/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/onlinePost/applyForm.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/onlinePost/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/onlinePost/info.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/onlineReply/applyForm.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/psychology/onlineReply/index.html diff --git a/src/main/java/com/budwk/app/zhgh/activity/family/controller/manage/FamilyActivityApplyController.java b/src/main/java/com/budwk/app/zhgh/activity/family/controller/manage/FamilyActivityApplyController.java index 9dfdc706..31a437e5 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/family/controller/manage/FamilyActivityApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/family/controller/manage/FamilyActivityApplyController.java @@ -347,11 +347,14 @@ public class FamilyActivityApplyController { public Result doSignUp(FamilyUser familyUser) { try { lock.lock(); + FamilyActivity activity = dao.fetch(FamilyActivity.class, familyUser.getActivityId()); + if(Lang.isEmpty(familyUser.getMobileColumnsValue())) { + return Result.error(99,"请填写" + activity.getKeyWord() + "信息"); + } boolean courseByUser = familyActivityService.isSignCourseByUser(familyUser.getCourseId(), SecurityUtil.getUserId()); if(courseByUser) { return Result.error(99,"您已报过该活动"); } - FamilyActivity activity = familyActivityService.fetch(familyUser.getActivityId()); boolean validFamilyCount = familyActivityService.validFamilyCount(familyUser); if(validFamilyCount) { return Result.error(99,activity.getKeyWord() + "人数最多为" + activity.getFamilyMaxCount()); diff --git a/src/main/java/com/budwk/app/zhgh/activity/family/service/impl/FamilyActivityStatisticsServiceImpl.java b/src/main/java/com/budwk/app/zhgh/activity/family/service/impl/FamilyActivityStatisticsServiceImpl.java index 9caa05b2..303883cf 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/family/service/impl/FamilyActivityStatisticsServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/activity/family/service/impl/FamilyActivityStatisticsServiceImpl.java @@ -98,7 +98,7 @@ public class FamilyActivityStatisticsServiceImpl extends BaseServiceImpl list = pagination.getList(NutMap.class); + for (NutMap nutMap : list) { + List applyList = dao.query( + LegalApply.class, + Cnd.where(LegalApply::getDoctorUser, "=", nutMap.getString("userId")) + .and(LegalApply::getStartTime, ">=", DateUtil.now()) + .and(LegalApply::getUserId, "is", null) + ); + nutMap.put("times", applyList); + } + return Result.success(pagination); + } } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalListController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalListController.java index b4ffab68..b39c8e68 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalListController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalListController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.staffbenefit.legal.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.page.Pagination; @@ -42,15 +43,21 @@ public class LegalListController { @Inject private LegalApplyService applyService; - @At("") + @At("/") @SaCheckPermission("legal.list") @Ok("beetl:/platform/zhgh/staffbenefit/legal/list/index.html") public void index() { } + @At("/h5") + @SaCheckPermission("h5.legal.list") + @Ok("beetl:/platform/zhghh5/staffbenefit/legal/list/index.html") + public void h5Index() { + } + @At @ApiOperation("分页查询") - @SaCheckPermission("legal.list") + @SaCheckPermission(value = {"legal.list", "h5.legal.list"}, mode = SaMode.OR) public Result pageData(PageForm pageForm, @Param(value = "year") Integer year) { Sql sql = Sqls.create(""" @@ -87,9 +94,9 @@ public class LegalListController { @At @ApiOperation("删除法律援助预约") - @SaCheckPermission("legal.list") + @SaCheckPermission(value = {"legal.list", "h5.legal.list"}, mode = SaMode.OR) @SLog(tag = "法律援助系统-法律援助预约", msg = "删除法律援助预约") - public Object onDelete(String id) { + public Object delete(String id) { LegalApply apply = applyService.fetch(id); apply.setUserId(null); apply.setLoginName(null); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlinePostController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlinePostController.java index 00ae8f1a..d3630b6f 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlinePostController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlinePostController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.staffbenefit.legal.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; @@ -50,15 +51,21 @@ public class LegalOnlinePostController { @Inject private BaseService baseService; - @At("") + @At("/") @SaCheckPermission("legal.onlinePost") @Ok("beetl:/platform/zhgh/staffbenefit/legal/onlinePost/index.html") public void index() { } + @At("/h5") + @SaCheckPermission("h5.legal.onlinePost") + @Ok("beetl:/platform/zhghh5/staffbenefit/legal/onlinePost/index.html") + public void h5Index() { + } + @At @ApiOperation("分页查询") - @SaCheckPermission("legal.onlinePost") + @SaCheckPermission(value = {"legal.onlinePost", "h5.legal.onlinePost"}, mode = SaMode.OR) public Result pageData(PageForm pageForm, @Param(value = "year") Integer year, @Param(value = "isReply") Boolean isReply) { @@ -78,6 +85,7 @@ public class LegalOnlinePostController { cnd.andEX("YEAR(pop.postingTime)", "=", year); cnd.groupBy("pop.id"); cnd.having(Cnd.where("count(por.id)", isReply == null ? ">=" : isReply ? ">" : "=", 0)); + cnd.desc("pop.postingTime"); sql.setCondition(cnd); Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pagination); @@ -85,9 +93,9 @@ public class LegalOnlinePostController { @At @ApiOperation("新增/修改法律援助线上发帖") - @SaCheckPermission("legal.onlinePost") + @SaCheckPermission(value = {"legal.onlinePost", "h5.legal.onlinePost"}, mode = SaMode.OR) @SLog(tag = "法律援助系统-线上发帖", msg = "新增/修改法律援助线上发帖") - public Object onSubmit(LegalOnlinePost post) { + public Object submit(LegalOnlinePost post) { if(StrUtil.isBlank(post.getId())) { View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId())); post.setPoster(user.getId()); @@ -106,16 +114,16 @@ public class LegalOnlinePostController { @At @ApiOperation("删除法律援助线上发帖") - @SaCheckPermission("legal.onlinePost") + @SaCheckPermission(value = {"legal.onlinePost", "h5.legal.onlinePost"}, mode = SaMode.OR) @SLog(tag = "法律援助系统-线上发帖", msg = "删除法律援助线上发帖") - public Object onDelete(String id) { + public Object delete(String id) { dao.delete(LegalOnlinePost.class, id); return Result.success(); } @At @ApiOperation("查询法律援助线上发帖") - @SaCheckPermission("legal.onlinePost") + @SaCheckPermission(value = {"legal.onlinePost", "h5.legal.onlinePost"}, mode = SaMode.OR) public Result fetchOne(String id) { LegalOnlinePost onlinePost = dao.fetch(LegalOnlinePost.class, id); List replyList = dao.query( diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlineReplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlineReplyController.java index 31af6f74..efdcb299 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlineReplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/legal/controller/LegalOnlineReplyController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.staffbenefit.legal.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; @@ -48,15 +49,21 @@ public class LegalOnlineReplyController { @Inject private BaseService baseService; - @At("") + @At("/") @SaCheckPermission("legal.onlineReply") @Ok("beetl:/platform/zhgh/staffbenefit/legal/onlineReply/index.html") public void index() { } + @At("/h5") + @SaCheckPermission("h5.legal.onlineReply") + @Ok("beetl:/platform/zhghh5/staffbenefit/legal/onlineReply/index.html") + public void h5Index() { + } + @At @ApiOperation("分页查询") - @SaCheckPermission("legal.onlineReply") + @SaCheckPermission(value = {"legal.onlineReply", "h5.legal.onlineReply"}, mode = SaMode.OR) public Result pageData(PageForm pageForm, @Param(value = "year") Integer year, @Param(value = "isReply") Boolean isReply) { @@ -86,9 +93,9 @@ public class LegalOnlineReplyController { @At @ApiOperation("新增/修改法律援助线上回复") - @SaCheckPermission("legal.onlineReply") + @SaCheckPermission(value = {"legal.onlineReply", "h5.legal.onlineReply"}, mode = SaMode.OR) @SLog(tag = "法律援助系统-线上回复", msg = "新增/修改法律援助线上回复") - public Object onSubmit(LegalOnlineReply reply) { + public Object submit(LegalOnlineReply reply) { if (StrUtil.isBlank(reply.getId())) { View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId())); reply.setReplyUserId(user.getId()); @@ -107,7 +114,7 @@ public class LegalOnlineReplyController { @At @ApiOperation("查询法律援助线上回复") - @SaCheckPermission("legal.onlineReply") + @SaCheckPermission(value = {"legal.onlineReply", "h5.legal.onlineReply"}, mode = SaMode.OR) public Result fetchOne(String id) { LegalOnlinePost onlinePost = dao.fetch(LegalOnlinePost.class, id); List replyList = dao.query( diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyApplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyApplyController.java index f8fbecf0..73122dcb 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyApplyController.java @@ -1,11 +1,16 @@ package com.budwk.app.zhgh.staffbenefit.psychology.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; +import com.budwk.app.base.page.Pagination; +import com.budwk.app.base.param.PageForm; import com.budwk.app.base.result.Result; import com.budwk.app.sys.views.View_user; import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence; import com.budwk.app.zhgh.staffbenefit.psychology.model.PsychologyApply; import com.budwk.app.zhgh.staffbenefit.psychology.service.PsychologyApplyService; import io.swagger.annotations.Api; @@ -13,11 +18,17 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; 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.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.List; + /** * @ClassName PsychologyApplyController * @Author JyuHsin @@ -37,17 +48,23 @@ public class PsychologyApplyController { @Inject private PsychologyApplyService applyService; - @At("") + @At("/") @SaCheckPermission("psychology.apply") @Ok("beetl:/platform/zhgh/staffbenefit/psychology/apply/index.html") public void index() { } + @At("/h5") + @SaCheckPermission("h5.psychology.apply") + @Ok("beetl:/platform/zhghh5/staffbenefit/psychology/apply/index.html") + public void h5Index() { + } + @At @ApiOperation("新增/修改心理咨询预约") - @SaCheckPermission("psychology.apply") + @SaCheckPermission(value = {"psychology.apply", "h5.psychology.apply"}, mode = SaMode.OR) @SLog(tag = "心理咨询系统-心理咨询预约", msg = "新增/修改心理咨询预约") - public Object onSubmit(PsychologyApply apply) { + public Object submit(PsychologyApply apply) { PsychologyApply psychologyApply = applyService.fetch(apply.getId()); if(StrUtil.isNotBlank(psychologyApply.getUserId())) { return Result.error("该时段已被预约"); @@ -67,4 +84,39 @@ public class PsychologyApplyController { //TODO:这里后面要加发短信 return Result.success(); } + + @At + @ApiOperation("移动端预约查询咨询师") + @SaCheckPermission(value = {"psychology.apply", "h5.psychology.apply"}, mode = SaMode.OR) + @SLog(tag = "心理咨询系统-移动端预约查询咨询师", msg = "移动端预约查询咨询师") + public Object h5PageData(PageForm pageForm, String sex) { + Sql sql = Sqls.create(""" + SELECT + pd.* + FROM + psychology_doctor pd + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.and(Cnd.likeEX("pd.sex", sex)); + if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.or("pd.userName", "like", "%" + pageForm.getSearchKeyword() + "%"); + seg.or("pd.loginName", "like", "%" + pageForm.getSearchKeyword() + "%"); + cnd.and(seg); + } + sql.setCondition(cnd); + Pagination pagination = applyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + List list = pagination.getList(NutMap.class); + for (NutMap nutMap : list) { + List applyList = dao.query( + PsychologyApply.class, + Cnd.where(PsychologyApply::getDoctorUser, "=", nutMap.getString("userId")) + .and(PsychologyApply::getStartTime, ">=", DateUtil.now()) + .and(PsychologyApply::getUserId, "is", null) + ); + nutMap.put("times", applyList); + } + return Result.success(pagination); + } } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyIndexController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyIndexController.java deleted file mode 100644 index 80ee507d..00000000 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyIndexController.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.budwk.app.zhgh.staffbenefit.psychology.controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.budwk.app.base.page.Pagination; -import com.budwk.app.base.result.Result; -import com.budwk.app.zhgh.staffbenefit.psychology.model.PsychologyDoctor; -import com.budwk.app.zhgh.staffbenefit.psychology.service.PsychologyDoctorService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.nutz.dao.Cnd; -import org.nutz.ioc.loader.annotation.Inject; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.lang.Lang; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; - -import java.util.ArrayList; -import java.util.List; - -/** - * @Author zzr - * @name:PsychologyIndexController - * @Date 2025/9/12 10:54 - * @version 1.0 - * @注释 - */ -@Slf4j -@IocBean -@Ok("json:full") -@Api(tags = "心理咨询") -@At("/platform/psychology/index") -public class PsychologyIndexController { - - @Inject - private PsychologyDoctorService psychologyDoctorService; - - @At("") -// @SaCheckPermission("psychology.index") - @Ok("beetl:/platform/zhgh/staffbenefit/psychology/index/index.html") - public void index() { - } - - @At -// @SaCheckPermission("psychology.index") - @Ok("beetl:/platform/zhghh5/staffbenefit/psychology/index/index.html") - public void h5() { - } - - - @At - @ApiOperation("手机端咨询师列表展示") -// @SaCheckPermission("psychology.index") - public Result listConsultantByH5(){ - Pagination pagination = psychologyDoctorService.listPage(1, 4, Cnd.NEW()); - List list = pagination.getList(); - // 判断有没有咨询师,并且咨询师数量小于4的话,要顺序填充到4个,便于前端展示 - if (Lang.isNotEmpty(list) && list.size() < 4) { - List filledList = new ArrayList<>(4); - for (int i = 0; i < 4; i++) { - filledList.add(list.get(i % list.size())); - } - pagination.setList(filledList); - } - return Result.success(pagination.getList()); - } -} diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyListController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyListController.java index b05150c1..7adf826c 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyListController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyListController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.staffbenefit.psychology.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.page.Pagination; @@ -43,15 +44,21 @@ public class PsychologyListController { @Inject private PsychologyApplyService applyService; - @At("") + @At("/") @SaCheckPermission("psychology.list") @Ok("beetl:/platform/zhgh/staffbenefit/psychology/list/index.html") public void index() { } + @At("/h5") + @SaCheckPermission("h5.psychology.list") + @Ok("beetl:/platform/zhghh5/staffbenefit/psychology/list/index.html") + public void h5Index() { + } + @At @ApiOperation("分页查询") - @SaCheckPermission("psychology.list") + @SaCheckPermission(value = {"psychology.list", "h5.psychology.list"}, mode = SaMode.OR) public Result pageData(PageForm pageForm, @Param(value = "year") Integer year) { Sql sql = Sqls.create(""" @@ -88,9 +95,9 @@ public class PsychologyListController { @At @ApiOperation("删除心理咨询预约") - @SaCheckPermission("psychology.list") + @SaCheckPermission(value = {"psychology.list", "h5.psychology.list"}, mode = SaMode.OR) @SLog(tag = "心理咨询系统-心理咨询预约", msg = "删除心理咨询预约") - public Object onDelete(String id) { + public Object delete(String id) { PsychologyApply apply = applyService.fetch(id); apply.setUserId(null); apply.setLoginName(null); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlinePostController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlinePostController.java index b7b16be9..a2e43dae 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlinePostController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlinePostController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.staffbenefit.psychology.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; @@ -50,15 +51,21 @@ public class PsychologyOnlinePostController { @Inject private BaseService baseService; - @At("") + @At("/") @SaCheckPermission("psychology.onlinePost") @Ok("beetl:/platform/zhgh/staffbenefit/psychology/onlinePost/index.html") public void index() { } + @At("/h5") + @SaCheckPermission("h5.psychology.onlinePost") + @Ok("beetl:/platform/zhghh5/staffbenefit/psychology/onlinePost/index.html") + public void h5Index() { + } + @At @ApiOperation("分页查询") - @SaCheckPermission("psychology.onlinePost") + @SaCheckPermission(value = {"psychology.onlinePost", "h5.psychology.onlinePost"}, mode = SaMode.OR) public Result pageData(PageForm pageForm, @Param(value = "year") Integer year, @Param(value = "isReply") Boolean isReply) { @@ -78,6 +85,7 @@ public class PsychologyOnlinePostController { cnd.andEX("YEAR(pop.postingTime)", "=", year); cnd.groupBy("pop.id"); cnd.having(Cnd.where("count(por.id)", isReply == null ? ">=" : isReply ? ">" : "=", 0)); + cnd.desc("pop.postingTime"); sql.setCondition(cnd); Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pagination); @@ -85,9 +93,9 @@ public class PsychologyOnlinePostController { @At @ApiOperation("新增/修改心理咨询线上发帖") - @SaCheckPermission("psychology.onlinePost") + @SaCheckPermission(value = {"psychology.onlinePost", "h5.psychology.onlinePost"}, mode = SaMode.OR) @SLog(tag = "心理咨询系统-线上发帖", msg = "新增/修改心理咨询线上发帖") - public Object onSubmit(PsychologyOnlinePost post) { + public Object submit(PsychologyOnlinePost post) { if(StrUtil.isBlank(post.getId())) { View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId())); post.setPoster(user.getId()); @@ -106,16 +114,16 @@ public class PsychologyOnlinePostController { @At @ApiOperation("删除心理咨询线上发帖") - @SaCheckPermission("psychology.onlinePost") + @SaCheckPermission(value = {"psychology.onlinePost", "h5.psychology.onlinePost"}, mode = SaMode.OR) @SLog(tag = "心理咨询系统-线上发帖", msg = "删除心理咨询线上发帖") - public Object onDelete(String id) { + public Object delete(String id) { dao.delete(PsychologyOnlinePost.class, id); return Result.success(); } @At @ApiOperation("查询心理咨询线上发帖") - @SaCheckPermission("psychology.onlinePost") + @SaCheckPermission(value = {"psychology.onlinePost", "h5.psychology.onlinePost"}, mode = SaMode.OR) public Result fetchOne(String id) { PsychologyOnlinePost onlinePost = dao.fetch(PsychologyOnlinePost.class, id); List replyList = dao.query( diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlineReplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlineReplyController.java index cba53d40..c6f7d0a3 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlineReplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/psychology/controller/PsychologyOnlineReplyController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.staffbenefit.psychology.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; @@ -48,15 +49,21 @@ public class PsychologyOnlineReplyController { @Inject private BaseService baseService; - @At("") + @At("/") @SaCheckPermission("psychology.onlineReply") @Ok("beetl:/platform/zhgh/staffbenefit/psychology/onlineReply/index.html") public void index() { } + @At("/h5") + @SaCheckPermission("h5.psychology.onlineReply") + @Ok("beetl:/platform/zhghh5/staffbenefit/psychology/onlineReply/index.html") + public void h5Index() { + } + @At @ApiOperation("分页查询") - @SaCheckPermission("psychology.onlineReply") + @SaCheckPermission(value = {"psychology.onlineReply", "h5.psychology.onlineReply"}, mode = SaMode.OR) public Result pageData(PageForm pageForm, @Param(value = "year") Integer year, @Param(value = "isReply") Boolean isReply) { @@ -86,9 +93,9 @@ public class PsychologyOnlineReplyController { @At @ApiOperation("新增/修改心理咨询线上回复") - @SaCheckPermission("psychology.onlineReply") + @SaCheckPermission(value = {"psychology.onlineReply", "h5.psychology.onlineReply"}, mode = SaMode.OR) @SLog(tag = "心理咨询系统-线上回复", msg = "新增/修改心理咨询线上回复") - public Object onSubmit(PsychologyOnlineReply reply) { + public Object submit(PsychologyOnlineReply reply) { if (StrUtil.isBlank(reply.getId())) { View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId())); reply.setReplyUserId(user.getId()); @@ -107,7 +114,7 @@ public class PsychologyOnlineReplyController { @At @ApiOperation("查询心理咨询线上回复") - @SaCheckPermission("psychology.onlineReply") + @SaCheckPermission(value = {"psychology.onlineReply", "h5.psychology.onlineReply"}, mode = SaMode.OR) public Result fetchOne(String id) { PsychologyOnlinePost onlinePost = dao.fetch(PsychologyOnlinePost.class, id); List replyList = dao.query( diff --git a/src/main/resources/static/assets/platform/css/h5.css b/src/main/resources/static/assets/platform/css/h5.css index 0300e694..f129def1 100644 --- a/src/main/resources/static/assets/platform/css/h5.css +++ b/src/main/resources/static/assets/platform/css/h5.css @@ -192,6 +192,7 @@ body { /*****************************申请表单CSS********************************/ .form-container { padding-bottom: 80px; + background: #f9f9f9; } .form-container .form-group { diff --git a/src/main/resources/views/platform/zhgh/activity/culture/common/applyActivity.js b/src/main/resources/views/platform/zhgh/activity/culture/common/applyActivity.js index b855af36..dfd452fb 100644 --- a/src/main/resources/views/platform/zhgh/activity/culture/common/applyActivity.js +++ b/src/main/resources/views/platform/zhgh/activity/culture/common/applyActivity.js @@ -617,11 +617,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = { if (res.code === 0) { this.$message.success("保存成功") if (this.activity_type === 40002) { - window.location.href = "/platform/activity/culture/infoManage/union" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/union") } else if (this.activity_type === 40003) { - window.location.href = "/platform/activity/culture/infoManage/club" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/club") } else { - window.location.href = "/platform/activity/culture/infoManage/school" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/school") } } }) @@ -658,11 +658,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = { if (res.code === 0) { this.$message.success("提交成功") if (this.activity_type === 40002) { - window.location.href = "/platform/activity/culture/infoManage/union" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/union") } else if (this.activity_type === 40003) { - window.location.href = "/platform/activity/culture/infoManage/club" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/club") } else { - window.location.href = "/platform/activity/culture/infoManage/school" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/school") } } }) @@ -700,11 +700,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = { if (res.code === 0) { this.$message.success("提交成功") if (this.activity_type === 40002) { - window.location.href = "/platform/activity/culture/infoManage/union" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/union") } else if (this.activity_type === 40003) { - window.location.href = "/platform/activity/culture/infoManage/club" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/club") } else { - window.location.href = "/platform/activity/culture/infoManage/school" + commonUtil.pjaxPush("/platform/activity/culture/infoManage/school") } } }) diff --git a/src/main/resources/views/platform/zhgh/activity/culture/common/infoMange.js b/src/main/resources/views/platform/zhgh/activity/culture/common/infoMange.js index bcf510f9..a9918217 100644 --- a/src/main/resources/views/platform/zhgh/activity/culture/common/infoMange.js +++ b/src/main/resources/views/platform/zhgh/activity/culture/common/infoMange.js @@ -203,7 +203,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = { this.url = location.origin + "/platform/h5/activity/culture/applyUser" this.codeDialogVisible = true } else if (type === "export") { - location.href = "/platform/activity/info/mange/export?id=" + row.id + commonUtil.pjaxPush("/platform/activity/info/mange/export?id=" + row.id) } }, goBack() { diff --git a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/apply/index.html b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/apply/index.html index 398146b8..0ec0425f 100644 --- a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/apply/index.html +++ b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/apply/index.html @@ -5,7 +5,7 @@ layout("/layouts/platform.html"){ .el-descriptions-item__label.is-bordered-label { width: 15% !important; } - + .el-descriptions-item__label { width: 15% !important; } @@ -34,13 +34,13 @@ layout("/layouts/platform.html"){ - + - + - + @@ -74,8 +74,8 @@ layout("/layouts/platform.html"){ - - + + - + - + @@ -143,13 +143,13 @@ layout("/layouts/platform.html"){ - + - + - + @@ -167,7 +167,7 @@ layout("/layouts/platform.html"){ - + 保存 提交 @@ -219,12 +219,12 @@ layout("/layouts/platform.html"){ this.$axios.post('/platform/activityDeclare/apply/save', {data: JSON.stringify(this.formData)}).then(res => { if (res.code === 0) { this.$message.success("保存成功") - window.location.href = '/platform/activityDeclare/mine' + commonUtil.pjaxPush('/platform/activityDeclare/mine') } }) }) }, - + // 提交 onSubmit() { this.$confirm("您确定要提交吗?", "提示", { @@ -241,12 +241,12 @@ layout("/layouts/platform.html"){ }).then(res => { if (res.code === 0) { this.$message.success("提交成功") - window.location.href = '/platform/activityDeclare/mine' + commonUtil.pjaxPush('/platform/activityDeclare/mine') } }) }) }, - + onFinishTask() { this.$confirm("您确定要提交吗?", "提示", { confirmButtonText: "确定", @@ -263,12 +263,12 @@ layout("/layouts/platform.html"){ }).then(res => { if (res.code === 0) { this.$message.success("提交成功") - window.location.href = '/platform/activityDeclare/mine' + commonUtil.pjaxPush('/platform/activityDeclare/mine') } }) }) }, - + // 设置申报主体名称 setDeclareUnitName(val){ const club = this.clubList.find(v => v.id === val) @@ -291,7 +291,7 @@ layout("/layouts/platform.html"){ if (res.data.clubId) { this.setDeclareUnitName(res.data.clubId) } - + if (res.data.planStartTime && res.data.planEndTime) { this.$set(this.formData, "planDate", [res.data.planStartTime, res.data.planEndTime]) } diff --git a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/mine/index.html b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/mine/index.html index 69d45387..226b34aa 100644 --- a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/mine/index.html +++ b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/declare/mine/index.html @@ -147,7 +147,7 @@ layout("/layouts/platform.html"){ this.$downLoad('/platform/activityDeclare/mine/doExportDeclare?id=' + row.id) }, onApply() { - window.location.href = '/platform/activityDeclare/apply' + commonUtil.pjaxPush('/platform/activityDeclare/apply') }, openView(row) { this.$refs.guava.view(() => { @@ -155,8 +155,8 @@ layout("/layouts/platform.html"){ }) }, onEdit(row) { - window.location.href = '/platform/activityDeclare/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id - }, + commonUtil.pjaxPush('/platform/activityDeclare/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id) + }, onRevoke(row) { this.$confirm("您确定要撤回吗?", "提示", { confirmButtonText: "确定", diff --git a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html index 4654d533..eb46d95d 100644 --- a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html +++ b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html @@ -27,7 +27,7 @@ layout("/layouts/platform.html"){ - +