From 22958a6bcf1ad6265da25dd504f70e3e101556e1 Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Fri, 4 Sep 2026 13:35:35 +0800 Subject: [PATCH] commit --- .../platform/sys/SysLoginController.java | 6 +- ...MemberApplySchoolUnionAuditController.java | 7 +++ .../model/template/WelfareExportEntityTc.java | 4 +- .../impl/WelfareSingleServiceImpl.java | 12 ++-- .../mobile/member/apply/submit/index.html | 62 ++++++++++++------- .../platform/member/apply/submit/index.html | 15 ++++- .../platform/welfare/list/ListMange.html | 6 +- 7 files changed, 77 insertions(+), 35 deletions(-) diff --git a/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysLoginController.java b/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysLoginController.java index d957ee2..1aa55f5 100644 --- a/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysLoginController.java +++ b/src/main/java/io/v/nutz/sys/controllers/platform/sys/SysLoginController.java @@ -80,11 +80,9 @@ public class SysLoginController { @At("") - @Ok("re") + @Ok("beetl:/platform/sys/login.html") @Filters - public String login(HttpServletRequest req, HttpSession session) { -// return ""; - return "beetl:/platform/sys/login.html"; + public void login(HttpServletRequest req, HttpSession session) { } @At("/noPermission") diff --git a/src/main/java/io/v/nutz/zhgh/staffmanage/member/controller/apply/MemberApplySchoolUnionAuditController.java b/src/main/java/io/v/nutz/zhgh/staffmanage/member/controller/apply/MemberApplySchoolUnionAuditController.java index 881428c..672efa0 100644 --- a/src/main/java/io/v/nutz/zhgh/staffmanage/member/controller/apply/MemberApplySchoolUnionAuditController.java +++ b/src/main/java/io/v/nutz/zhgh/staffmanage/member/controller/apply/MemberApplySchoolUnionAuditController.java @@ -16,6 +16,8 @@ import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.base.Globals; import io.v.nutz.web.commons.slog.annotation.SLog; import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.staffmanage.member.MemberMode; +import io.v.nutz.zhgh.staffmanage.member.WelfareMemberMode; import io.v.nutz.zhgh.staffmanage.member.handle.MemberApplyToDoHandler; import io.v.nutz.zhgh.staffmanage.member.model.MemberApplyRecord; import io.v.nutz.zhgh.staffmanage.member.param.pageForm.MemberApplyPageForm; @@ -139,7 +141,12 @@ public class MemberApplySchoolUnionAuditController { Sys_user sysUser = new Sys_user(); BeanUtil.copyProperties(record, sysUser); sysUser.setId(user.getId()); + // 入会审核通过后,直接将用户设置为正式会员和正式福利会员,避免申请期间的旧状态覆盖当前结果。 + sysUser.setMember(MemberMode.NORMAL.getCode()); + sysUser.setWelfareMember(WelfareMemberMode.NORMAL.getCode()); sysUser.setMemberJoinTime(new Date()); + // 用户已在申请期间成为福利会员时保留原加入时间,否则以本次审核通过时间作为加入时间。 + sysUser.setWelfareMemberJoinTime(new Date()); dao.updateIgnoreNull(sysUser); // 还要设置会员角色 diff --git a/src/main/java/io/v/nutz/zhgh/welfare/model/template/WelfareExportEntityTc.java b/src/main/java/io/v/nutz/zhgh/welfare/model/template/WelfareExportEntityTc.java index 6725471..958b8e3 100644 --- a/src/main/java/io/v/nutz/zhgh/welfare/model/template/WelfareExportEntityTc.java +++ b/src/main/java/io/v/nutz/zhgh/welfare/model/template/WelfareExportEntityTc.java @@ -49,8 +49,8 @@ public class WelfareExportEntityTc { // @Excel(name = "收货信息", width = 100d) private String receiveAddress; - //@Excel(name = "快递单号", width = 40d) - //private String courierNumber; + @Excel(name = "快递单号", width = 40d) + private String courierNumber; @Excel(name = "实名签字", width = 20d, type = 2 , imageType = 2, height = 12d) private byte[] qzBytes; diff --git a/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java b/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java index 419f874..ffb472b 100644 --- a/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java +++ b/src/main/java/io/v/nutz/zhgh/welfare/service/impl/WelfareSingleServiceImpl.java @@ -459,6 +459,7 @@ public class WelfareSingleServiceImpl extends ViServiceImpl impl */ @Override public List receivePageData(String projectId, String welfareUnitCode, String month) { + // 快递单号保存在独立表中,按福利项目、用户和套餐关联,避免不同套餐的运单号相互混入。 Sql sql = Sqls.create(""" SELECT u.loginname AS loginName, @@ -472,7 +473,7 @@ public class WelfareSingleServiceImpl extends ViServiceImpl impl IF(LOCATE('undefined',wpus.receiveAddress)>0,NULL,wpus.receiveAddress) as receiveAddress, wpus.userSign, GROUP_CONCAT(DISTINCT wpso.optionName ,'(',wpus.selectNum,'份)') optionName, - wpus.courierNumber, + GROUP_CONCAT(DISTINCT wcn.courierNumber) AS courierNumber, if(u.member = 1, '是', '否') as memberStatus FROM welfare_project_user_selection wpus @@ -480,6 +481,9 @@ public class WelfareSingleServiceImpl extends ViServiceImpl impl LEFT JOIN welfare_project_subject_option wpso ON wpso.id = wpus.selectOptionId LEFT JOIN view_welfare_list vwl on vwl.id = wpus.selectUserId AND wpus.welfareId=vwl.projectId LEFT JOIN welfare_list wl ON wl.userId = wpus.selectUserId AND wl.projectId = vwl.projectId + LEFT JOIN welfare_courier_number wcn ON wcn.welfareId = wpus.welfareId + AND wcn.selectUserId = wpus.selectUserId + AND wcn.selectOptionId = wpus.selectOptionId $condition $monthCnd """).setParam("welfareId", projectId); @@ -1221,11 +1225,11 @@ public class WelfareSingleServiceImpl extends ViServiceImpl impl }); ExportParams exportParams = new ExportParams(); - exportParams.setType(ExcelType.HSSF); + exportParams.setType(ExcelType.XSSF); exportParams.setSheetName(project.getName()); try { - ViTool.excelResponse(response, (project.getName() + (flag ? "已选名单" : "未选名单")) + ".xls"); - Workbook workbook = new HSSFWorkbook(); + ViTool.excelResponse(response, (project.getName() + (flag ? "已选名单" : "未选名单")) + ".xlsx"); + Workbook workbook = new XSSFWorkbook(); ExcelExportService service = new ExcelExportService(); service.createSheet(workbook, exportParams, WelfareExportEntityTc.class, welfareExportEntityTcList); ServletOutputStream outputStream = response.getOutputStream(); diff --git a/src/main/resources/views/mobile/member/apply/submit/index.html b/src/main/resources/views/mobile/member/apply/submit/index.html index 602ed68..7800fc0 100644 --- a/src/main/resources/views/mobile/member/apply/submit/index.html +++ b/src/main/resources/views/mobile/member/apply/submit/index.html @@ -256,19 +256,24 @@ layout("/mobile/platform.html"){ message: "保存后可在我的申请里面再次编辑,您确定要保存吗?", confirmButtonText: "确定", cancelButtonText: "取消" - }).then(async () => { + }).then(() => { const formData = this.formData + // 出生年月统一按年月日提交,避免浏览器 Date 字符串直接写入申请记录。 + this.$set(formData, "birthday", this.normalizeBirthday(formData.birthday)) if (this.formData.families) { formData.families = JSON.stringify(this.formData.families) } - const resp = await $.post('/platform/member/apply/submit/doSave', formData) - if (resp.code === 0) { - this.$toast.success('操作成功') - this.user.member = true - pjaxReplace('/platform/member/apply/mine/h5') - } else { - this.$toast.fail(resp.msg) - } + $.post('/platform/member/apply/submit/doSave', formData) + .then((resp) => { + if (resp.code === 0) { + this.$toast.success('操作成功') + this.user.member = true + pjaxReplace('/platform/member/apply/mine/h5') + } else { + this.$toast.fail(resp.msg) + } + }) + .always(() => {}) }) }, doSubmit(){ @@ -287,24 +292,38 @@ layout("/mobile/platform.html"){ message: "提交后将进入审核流程,无法再进行编辑,您确定要提交申请吗?", confirmButtonText: "确定", cancelButtonText: "取消" - }).then(async () => { + }).then(() => { const formData = this.formData + // 出生年月统一按年月日提交,保证审核通过后写入用户表的数据格式一致。 + this.$set(formData, "birthday", this.normalizeBirthday(formData.birthday)) if (this.formData.families) { formData.families = JSON.stringify(this.formData.families) } - const resp = await $.post('/platform/member/apply/submit/doSubmit', formData) - if (resp.code === 0) { - this.$toast.success('操作成功') - this.user.member = true - pjaxReplace('/platform/member/apply/mine/h5') - } else { - this.$toast.fail(resp.msg) - } + $.post('/platform/member/apply/submit/doSubmit', formData) + .then((resp) => { + if (resp.code === 0) { + this.$toast.success('操作成功') + this.user.member = true + pjaxReplace('/platform/member/apply/mine/h5') + } else { + this.$toast.fail(resp.msg) + } + }) + .always(() => {}) }) }, onDateConfirm(value) { - this.formData.birthday = value; - this.showDatePicker = false; + // 日期选择器返回 Date 对象,需要先转换为标准日期字符串再保存到表单。 + this.$set(this.formData, "birthday", this.normalizeBirthday(value)) + this.datePicker = false + }, + // 将日期选择器或历史数据中的出生年月转换为后端约定的 YYYY-MM-DD 字符串。 + normalizeBirthday(value) { + if (!value) { + return "" + } + const birthday = moment(value) + return birthday.isValid() ? birthday.format("YYYY-MM-DD") : "" }, async validateApply() { if (this.id) { @@ -337,6 +356,7 @@ layout("/mobile/platform.html"){ $.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => { if (res.code === 0) { this.formData = res.data + this.$set(this.formData, "birthday", this.normalizeBirthday(this.formData.birthday)) } }) } else { @@ -366,7 +386,7 @@ layout("/mobile/platform.html"){ this.$set(this.formData, "userId", id) this.$set(this.formData, "username", username) this.$set(this.formData, "loginname", loginname) - this.$set(this.formData, "birthday", birthday) + this.$set(this.formData, "birthday", this.normalizeBirthday(birthday)) this.$set(this.formData, "sex", sex) this.$set(this.formData, "idCard", idCard) this.$set(this.formData, "nation", nation) diff --git a/src/main/resources/views/platform/member/apply/submit/index.html b/src/main/resources/views/platform/member/apply/submit/index.html index 935531b..50866e9 100644 --- a/src/main/resources/views/platform/member/apply/submit/index.html +++ b/src/main/resources/views/platform/member/apply/submit/index.html @@ -292,6 +292,8 @@ layout("/layouts/platform.html"){ this.$confirm("保存后可在我的申请里面再次编辑,您确定要保存吗?", "提示", { type: "warning" }) .then(() => { const formData = this.formData + // 出生年月统一按年月日提交,避免浏览器 Date 字符串直接写入申请记录。 + this.$set(formData, "birthday", this.normalizeBirthday(formData.birthday)) if (formData.families) { formData.families = JSON.stringify(this.formData.families) } @@ -323,6 +325,8 @@ layout("/layouts/platform.html"){ this.$confirm("提交后将进入审核流程,无法再进行编辑,您确定要提交申请吗?", "提示", { type: "warning" }) .then(() => { const formData = this.formData + // 出生年月统一按年月日提交,保证审核通过后写入用户表的数据格式一致。 + this.$set(formData, "birthday", this.normalizeBirthday(formData.birthday)) if (formData.families) { formData.families = JSON.stringify(this.formData.families) } @@ -340,6 +344,14 @@ layout("/layouts/platform.html"){ } }) }, + // 将日期选择器或历史数据中的出生年月转换为后端约定的 YYYY-MM-DD 字符串。 + normalizeBirthday(value) { + if (!value) { + return "" + } + const birthday = moment(value) + return birthday.isValid() ? birthday.format("YYYY-MM-DD") : "" + }, async validateApply() { if (this.formData.id) { return @@ -363,6 +375,7 @@ layout("/layouts/platform.html"){ $.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => { if (res.code === 0) { this.formData = res.data + this.$set(this.formData, "birthday", this.normalizeBirthday(this.formData.birthday)) } }) } else { @@ -392,7 +405,7 @@ layout("/layouts/platform.html"){ this.$set(this.formData, "userId", id) this.$set(this.formData, "username", username) this.$set(this.formData, "loginname", loginname) - this.$set(this.formData, "birthday", birthday) + this.$set(this.formData, "birthday", this.normalizeBirthday(birthday)) this.$set(this.formData, "sex", sex) this.$set(this.formData, "idCard", idCard) this.$set(this.formData, "nation", nation) diff --git a/src/main/resources/views/platform/welfare/list/ListMange.html b/src/main/resources/views/platform/welfare/list/ListMange.html index ebb4bf9..15f4982 100644 --- a/src/main/resources/views/platform/welfare/list/ListMange.html +++ b/src/main/resources/views/platform/welfare/list/ListMange.html @@ -732,8 +732,8 @@ layout("/layouts/platform.html"){ } this.$refs.reimbursementForm.validate(valid => { if (valid) { - window.open(loc() + '/doExportReimbursement?projectId=' + this.pageForm.projectId + "&optionId=" + this.reimbursementFormData.optionId - + "&personType=" + this.reimbursementFormData.personType) + window.open(loc() + '/doExportReimbursement?projectId=' + this.pageForm.projectId + "&optionId=" + this.pageForm.optionId + + "&personType=" + this.pageForm.personType) this.reimbursementDialog = false } }) @@ -744,7 +744,7 @@ layout("/layouts/platform.html"){ return } - window.open(loc() + '/doExcelByOptionId?projectId=' + this.pageForm.projectId + "&optionId=" + this.reimbursementFormData.optionId) + window.open(loc() + '/doExcelByOptionId?projectId=' + this.pageForm.projectId + "&optionId=" + this.pageForm.optionId) }, //查看快递单号 viewCourierNumber(row) {