From b655d7ebdbf95fbb497cc838bff3e45e74043afa Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Tue, 23 Dec 2025 14:54:56 +0800 Subject: [PATCH] commit --- ...enceSchoolPrincipalApprovalController.java | 123 ++++++++++ .../staffbenefit/condolence/apply/index.html | 134 +++++------ .../condolence/branchUnionApproval/form.html | 46 ---- .../schoolPrincipalApproval/index.html | 218 ++++++++++++++++++ .../condolence/schoolUnionApproval/form.html | 46 ---- .../school/verification/check/index.html | 2 +- .../schoolPrincipalApproval/index.html | 190 +++++++++++++++ 7 files changed, 600 insertions(+), 159 deletions(-) create mode 100644 src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java delete mode 100644 src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/form.html create mode 100644 src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html delete mode 100644 src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/form.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolPrincipalApproval/index.html diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java new file mode 100644 index 0000000..7e7de9d --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java @@ -0,0 +1,123 @@ +package com.budwk.app.zhgh.staffbenefit.condolence.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; +import cn.hutool.core.util.StrUtil; +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.base.utils.PageUtil; +import com.budwk.app.flow.enums.ProcessTaskStateEnum; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence; +import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.lang.util.NutMap; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +import java.util.List; + +/** + * @author zhf + * @date 2025/12/23 14:13 + * @description 校工会预审 + */ +@IocBean +@At("/platform/condolence/schoolPrincipalApproval") +@Api("职工慰问校工会预审") +@Ok("json:full") +public class CondolenceSchoolPrincipalApprovalController { + + @Inject + private CondolenceService condolenceService; + + @At("/") + @Ok("beetl:/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html") + @SaCheckPermission("condolence.schoolPrincipalApproval") + public void index() {} + + @At("/h5") + @Ok("beetl:/platform/zhghh5/staffbenefit/condolence/schoolPrincipalApproval/index.html") + @SaCheckPermission("h5.condolence.schoolPrincipalApproval") + public void h5Index() {} + + @At + @ApiOperation("分页查询") + @SaCheckPermission(value = {"condolence.schoolPrincipalApproval", "h5.condolence.schoolPrincipalApproval"}, mode = SaMode.OR) + public Result pageData(PageForm pageForm, + @Param(value = "year") Integer year, + @Param(value = "type") String type, + @Param(value = "unionId") String unionId, + @Param(value = "unitId") String unitId, + @Param(value = "approval") Boolean approval) { + Sql sql = Sqls.create(""" + SELECT + info.*, + type.name as typeName, + ins.id AS instanceId, + ins.businessNo, + ins.state instanceState, + ins.variable instanceVariable, + ins.processDefineId instanceProcessDefineId, + t.id taskId, + t.taskName AS taskKey, + t.displayName taskName, + t.taskType, + t.performType taskPerformType, + t.taskState, + t.finishTime, + t.taskParentId, + t.variable taskVariable, + IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName, + IF(rt.id IS NOT NULL, 1, 0) AS canRevoke + FROM + wf_process_task t + LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId + LEFT JOIN condolence info ON info.id = ins.businessNo + LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id + LEFT JOIN condolence_type type ON info.type = type.id + LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10 + LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10 + $condition + """); + Cnd cnd = Cnd.NEW(); + if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.or(Condolence::getHelpUserName, "like", "%" + pageForm.getSearchKeyword() + "%"); + seg.or(Condolence::getHelpLoginName, "like", "%" + pageForm.getSearchKeyword() + "%"); + cnd.and(seg); + } + cnd.andEX("info.type", "=", type); + cnd.andEX("YEAR(info.createTime)", "=", year); + cnd.andEX("info.applyUnionId", "=", unionId); + cnd.andEX("info.applyUnitId", "=", unitId); + + cnd.and("t.taskName", "=", "34f7938e-47a3-4b3a-b4e0-92b7a3f47865"); +// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + + if (approval) { + cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); + } else { + cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode()); + } + + if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { + cnd.desc("info.createTime"); + } else { + cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); + } + cnd.groupBy("t.id"); + sql.setCondition(cnd); + Pagination pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pageVO); + } +} diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html index cb99962..a679010 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html @@ -16,20 +16,20 @@ layout("/layouts/platform.html"){ + style="width: 100%" + v-model="formData.helpUserId" + filterable + clearable + remote + reserve-keyword + placeholder="请输入姓名或工号查询" + :remote-method="createRemoteMethod(helpUserOptions)" + @change="helpUserChange"> + v-for="item in helpUserOptions" + :key="item.id" + :label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'" + :value="item.id"> @@ -37,33 +37,35 @@ layout("/layouts/platform.html"){ + style="width: 100%" + v-model="formData.payUserId" + filterable + clearable + remote + reserve-keyword + placeholder="请输入姓名或工号查询" + :remote-method="createRemoteMethod(payUserOptions)" + @change="payUserChange"> + v-for="item in payUserOptions" + :key="item.id" + :label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'" + :value="item.id"> - - - + + + + + @@ -92,12 +94,12 @@ layout("/layouts/platform.html"){ + clearable + style="width: 100%" + v-model="formData.occurTime" + type="date" + value-format="yyyy-MM-dd" + placeholder="请选择慰问时间"> @@ -174,11 +176,11 @@ layout("/layouts/platform.html"){ @@ -208,21 +210,21 @@ layout("/layouts/platform.html"){ taskId: GetQueryString("taskId"), formData: {}, formRules: { - helpUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - type: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - way: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - money: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - occurTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - child: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - hospital: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - hospitalHouseNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - hospitalHouseBedNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - hospitalBy: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - deadImmediateFamily: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - remark: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - files: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - // signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }] + helpUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}], + payUserId: [{required: true, message: "必填", trigger: ["change", "blur"]}], + type: [{required: true, message: "必填", trigger: ["change", "blur"]}], + way: [{required: true, message: "必填", trigger: ["change", "blur"]}], + money: [{required: true, message: "必填", trigger: ["change", "blur"]}], + occurTime: [{required: true, message: "必填", trigger: ["change", "blur"]}], + child: [{required: true, message: "必填", trigger: ["change", "blur"]}], + hospital: [{required: true, message: "必填", trigger: ["change", "blur"]}], + hospitalHouseNum: [{required: true, message: "必填", trigger: ["change", "blur"]}], + hospitalHouseBedNum: [{required: true, message: "必填", trigger: ["change", "blur"]}], + hospitalBy: [{required: true, message: "必填", trigger: ["change", "blur"]}], + deadImmediateFamily: [{required: true, message: "必填", trigger: ["change", "blur"]}], + remark: [{required: true, message: "必填", trigger: ["change", "blur"]}], + files: [{required: true, message: "必填", trigger: ["change", "blur"]}], + signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }] }, chooseType: {}, payUserOptions: [], @@ -238,7 +240,7 @@ layout("/layouts/platform.html"){ }, selectQueryUser(keyword, options) { options.length = 0 - this.$axios.post("/platform/condolence/apply/listUser", { keyword: keyword }).then((res) => { + this.$axios.post("/platform/condolence/apply/listUser", {keyword: keyword}).then((res) => { if (res.code === 0) { options.push(...res.data) } @@ -247,7 +249,7 @@ layout("/layouts/platform.html"){ helpUserChange(val) { const user = this.helpUserOptions.find(o => o.id === val) if (user) { - const { userName, loginName, unitId, unitName, unionId, unionName } = user + const {userName, loginName, unitId, unitName, unionId, unionName} = user this.$set(this.formData, "helpUserName", userName) this.$set(this.formData, "helpLoginName", loginName) this.$set(this.formData, "helpUnitId", unitId) @@ -259,7 +261,7 @@ layout("/layouts/platform.html"){ payUserChange(val) { const user = this.payUserOptions.find(o => o.id === val) if (user) { - const { userName, loginName } = user + const {userName, loginName} = user this.$set(this.formData, "payUserName", userName) this.$set(this.formData, "payLoginName", loginName) } @@ -277,7 +279,7 @@ layout("/layouts/platform.html"){ cancelButtonText: "取消", type: "warning" }).then(() => { - this.$axios.post("/platform/condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => { + this.$axios.post("/platform/condolence/apply/save", {data: JSON.stringify(this.formData)}).then(res => { if (res.code === 0) { this.$message.success(res.msg) commonUtil.pjaxPush("/platform/condolence/mine") @@ -328,7 +330,7 @@ layout("/layouts/platform.html"){ }, init() { if (this.bizId) { - this.$axios.post("/platform/condolence/mine/info", { id: this.bizId }).then((res) => { + this.$axios.post("/platform/condolence/mine/info", {id: this.bizId}).then((res) => { if (res.code === 0) { this.formData = res.data this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions) @@ -337,7 +339,7 @@ layout("/layouts/platform.html"){ } }) } else { - const { username, loginname, id, unit, union, mobile } = this.$store.state.user + const {username, loginname, id, unit, union, mobile} = this.$store.state.user this.formData = { applyUserName: username, applyLoginName: loginname, diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/form.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/form.html deleted file mode 100644 index 5113d0d..0000000 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/form.html +++ /dev/null @@ -1,46 +0,0 @@ -
- - - - - - -
- - diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html new file mode 100644 index 0000000..6283e29 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html @@ -0,0 +1,218 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 已审核 + 未审核 + + + + + + + + + + + + + + + + + +
+ + + + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/form.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/form.html deleted file mode 100644 index 5113d0d..0000000 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/form.html +++ /dev/null @@ -1,46 +0,0 @@ -
- - - - - - -
- - diff --git a/src/main/resources/views/platform/zhgh/staffmanage/member/school/verification/check/index.html b/src/main/resources/views/platform/zhgh/staffmanage/member/school/verification/check/index.html index 336945b..8d28eaf 100644 --- a/src/main/resources/views/platform/zhgh/staffmanage/member/school/verification/check/index.html +++ b/src/main/resources/views/platform/zhgh/staffmanage/member/school/verification/check/index.html @@ -154,7 +154,7 @@ layout("/layouts/platform.html"){ + +