This commit is contained in:
2026-09-04 13:35:35 +08:00
parent 9d6eeef7db
commit 22958a6bcf
7 changed files with 77 additions and 35 deletions
@@ -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")
@@ -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);
// 还要设置会员角色
@@ -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;
@@ -459,6 +459,7 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
*/
@Override
public List<NutMap> 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<WelfareProject> 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<WelfareProject> 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<WelfareProject> 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();
@@ -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)
@@ -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)
@@ -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) {