From 3261301074ebd64bebe0851a831249447febbba2 Mon Sep 17 00:00:00 2001 From: zhangrui Date: Thu, 16 Apr 2026 13:11:53 +0800 Subject: [PATCH] 1 --- .../HealthCheckupListController.java | 47 ++++++++++++++----- .../HealthCheckupSingleController.java | 6 ++- .../model/HealthCheckupUser.java | 13 +++++ .../service/HealthCheckupSingleService.java | 2 +- .../impl/HealthCheckupSingleServiceImpl.java | 24 ++++++---- .../template/HealthCheckupImportTemp.java | 3 ++ .../healthCheckup/listMange/index.html | 39 +++++++++++++-- .../healthCheckup/statisticsSingle/index.html | 16 ++++++- 8 files changed, 122 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupListController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupListController.java index 494f0b2c..6df90480 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupListController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupListController.java @@ -89,7 +89,7 @@ public class HealthCheckupListController { @ApiOperation("分页查询") @SaCheckPermission("healthCheckup.list.mange") public Result pageData(PageForm pageForm, String projectId, String subjectId, - String unionId, String unitId,String physicalExaminationStatus) { + String unionId, String unitId, String isEmployed, String physicalExaminationStatus) { List confirms = dao.query(HealthCheckupUnionConfirm.class, Cnd.where("projectId", "=", projectId)); HealthCheckupProject project = healthCheckupProjectService.findOne(projectId); @@ -107,9 +107,10 @@ public class HealthCheckupListController { hcus.selectTime, hcus.campus, hcus.subjectId, - hcus.bz, + hcu.bz, hcus.receiveAddress, - ca.campusName + ca.campusName, + hcu.isEmployed FROM health_checkup_user hcu LEFT JOIN health_checkup_user_selection hcus ON hcu.userId = hcus.selectUserId @@ -122,6 +123,8 @@ public class HealthCheckupListController { cnd.andEX("hcu.unionId", "=", unionId); cnd.andEX("hcu.unitId", "=", unitId); cnd.andEX("hcus.subjectId", "=", subjectId); + cnd.andEX("hcu.isEmployed", "=", isEmployed); + if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { cnd.andEX("hcu.unionId", "=", SecurityUtil.getUnionId()); @@ -193,7 +196,7 @@ public class HealthCheckupListController { @ApiOperation("体检名单管理员编辑选择记录") @SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员编辑了一条选择记录") @SaCheckPermission("healthCheckup.list.mange") - public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId, String bz) { + public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId, String isEmployed, String bz) { if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),RoleConstant.HEALTH_ADMIN.name())) { return Result.error("您没有操作此按钮的权限"); } @@ -214,6 +217,12 @@ public class HealthCheckupListController { } } + healthCheckupProjectService.dao().update( + HealthCheckupUser.class, + Chain.make("isEmployed", isEmployed), + Cnd.NEW().and("projectId", "=", projectId).and("userId", "=", userId) + ); + //查询用户有没有选择过套餐 HealthCheckupUserSelection userSelection = healthCheckupProjectService.dao().fetch(HealthCheckupUserSelection.class, Cnd.where("projectId", "=", projectId) @@ -282,9 +291,13 @@ public class HealthCheckupListController { excel.setErrInfo("重复数据", i + 1); } + if(StringUtils.isNotBlank(excel.getIsEmployed()) && !(excel.getIsEmployed().contains("是") || excel.getIsEmployed().contains("否"))){ + excel.setErrInfo("是否自聘:值只能为 \'是\' 或 \'否\'", i + 1); + } + View_user user = userList.stream().filter(s -> s.getLoginname().equals(excel.getLoginName())).findFirst().orElse(null); if (user == null) { - excel.setErrInfo("无此用户", i + 1); + excel.setErrInfo("无此用户:" + excel.getLoginName(), i + 1); continue; } String projectName = checkupProject.getName(); @@ -295,10 +308,16 @@ public class HealthCheckupListController { projectName = "校聘高知"; } if (healthCheckupUserList.stream().anyMatch(s -> s.getUserId().equals(user.getId()))) { + Chain chain = Chain.make("personType", projectName); + if(StringUtils.isNotBlank(excel.getPhone())){ + chain.add("phone", excel.getPhone()); + } + if(StringUtils.isNotBlank(excel.getIsEmployed())) { + chain.add("isEmployed", excel.getIsEmployed()); + } dao.update( - HealthCheckupUser.class, - Chain.make("phone",excel.getPhone()).add("personType",projectName), - Cnd.NEW().and(HealthCheckupUser::getUserId,"=",user.getId()) + HealthCheckupUser.class,chain, + Cnd.NEW().and(HealthCheckupUser::getUserId, "=", user.getId()) .and(HealthCheckupUser::getProjectId, "=", healthProjectId) ); } else { @@ -322,6 +341,7 @@ public class HealthCheckupListController { newHealthUser.setPhone(excel.getPhone()); newHealthUser.setMarriage(user.getMarriage()); newHealthUser.setPersonType(projectName); + newHealthUser.setIsEmployed(excel.getIsEmployed()); healthCheckupUsersToAdd.add(newHealthUser); successCount++; } @@ -351,6 +371,7 @@ public class HealthCheckupListController { entities.add(new ExcelExportEntity("工号", "loginName", 20)); entities.add(new ExcelExportEntity("姓名", "userName", 20)); entities.add(new ExcelExportEntity("手机号", "phone", 20)); + entities.add(new ExcelExportEntity("是否自聘", "isEmployed", 20)); ExportParams exportParams = new ExportParams(); Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList()); CommonDownloadUtil.download("参加人员导入模版.xlsx", workbook, response); @@ -455,9 +476,9 @@ public class HealthCheckupListController { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { return Result.error("您没有操作此按钮的权限"); } - dao.update(HealthCheckupUserSelection.class, + dao.update(HealthCheckupUser.class, Chain.make("bz", remarks), - Cnd.where("selectUserId", "=", userId) + Cnd.where("userId", "=", userId) .and("projectId", "=", projectId)); return Result.success(); } @@ -491,9 +512,10 @@ public class HealthCheckupListController { hcus.selectTime, hcus.campus, hcus.subjectId, - hcus.bz, + hcu.bz, hcus.receiveAddress, - ca.campusName + ca.campusName, + hcu.isEmployed FROM health_checkup_user hcu LEFT JOIN health_checkup_user_selection hcus ON hcu.userId = hcus.selectUserId AND hcus.projectId=@projectId @@ -559,6 +581,7 @@ public class HealthCheckupListController { add(new ExcelExportEntity("选择时间", "selectTime", 50)); add(new ExcelExportEntity("是否确认", "isAudit", 50)); add(new ExcelExportEntity("确认时间", "auditTime", 50)); + add(new ExcelExportEntity("是否自聘", "isEmployed", 50)); add(new ExcelExportEntity("备注", "bz", 50)); }}; diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupSingleController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupSingleController.java index f5110544..684da8ba 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupSingleController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupSingleController.java @@ -78,8 +78,9 @@ public class HealthCheckupSingleController { @ApiOperation("首页查询") @SaCheckPermission("healthCheckup.statisticsSingle") public Result pageData(String projectId, - String unionId) { - NutMap nutMap = healthCheckupSingleService.pageData(projectId, unionId); + String unionId, + String isEmployed) { + NutMap nutMap = healthCheckupSingleService.pageData(projectId, unionId, isEmployed); return Result.success(nutMap); } @@ -137,6 +138,7 @@ public class HealthCheckupSingleController { add(new ExcelExportEntity("部门", "unitName", 20)); add(new ExcelExportEntity("分工会", "unionName", 20)); add(new ExcelExportEntity("邮寄地址", "receiveAddress", 50)); + add(new ExcelExportEntity("是否自聘", "isEmployed", 50)); }}; List list; diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupUser.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupUser.java index 07ffa985..3442dc77 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupUser.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupUser.java @@ -110,4 +110,17 @@ public class HealthCheckupUser extends BaseModel implements Serializable { @Comment("体检报告") @ColDefine(type = ColType.TEXT) private String medicalExamination; + + @Column + @Comment("是否自聘") + @ColDefine(type = ColType.VARCHAR, width = 10) + @Default("否") + private String isEmployed; + + @Column + @Comment("备注") + @ColDefine(type = ColType.TEXT) + private String bz; + + } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupSingleService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupSingleService.java index 001316b8..201a4d70 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupSingleService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupSingleService.java @@ -15,7 +15,7 @@ public interface HealthCheckupSingleService extends BaseService userSelectList = this.getUserSelectionByProjectId(projectId); for (NutMap healthCheckup : healthCheckupList) { - List thisUnionSelectList = userSelectList.stream().filter(x -> - x.getString("unionId").equals(healthCheckup.getString("id")) && - x.getString("projectId").equals(projectId)).collect(Collectors.toList()); + List thisUnionSelectList = userSelectList.stream() + .filter(x -> + x.getString("unionId").equals(healthCheckup.getString("id")) + && x.getString("projectId").equals(projectId) + && x.getString("isEmployed").equals(isEmployed) + ) + .collect(Collectors.toList()); subjectList.forEach(o -> { //每一项选择的人数 @@ -76,6 +80,7 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl - + + + + + + @@ -167,10 +176,10 @@ layout("/layouts/platform.html"){ :close-on-click-modal="false"> - + - + + + + + + + + + + + + +