From 15cdcb02a2260e4d25220747885b06443861a281 Mon Sep 17 00:00:00 2001 From: zhangrui Date: Wed, 8 Apr 2026 11:44:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E6=A3=80=E7=AE=A1=E7=90=86=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/budwk/app/sys/models/Sys_union.java | 15 + .../HealthCheckupListController.java | 101 +++- .../HealthCheckupProjectMangeController.java | 1 + .../HealthCheckupSingleController.java | 29 +- .../H5HealthCheckupController.java | 71 ++- .../model/HealthCheckupProject.java | 7 +- .../model/HealthCheckupUser.java | 32 ++ .../service/HealthCheckupProjectService.java | 7 + .../impl/HealthCheckupProjectServiceImpl.java | 36 ++ .../impl/HealthCheckupSingleServiceImpl.java | 12 +- .../template/HealthCheckupImportTemp.java | 3 + .../components/plugins/sysUpload/index.vue | 1 + .../platform/sys/union/branchUnionManage.js | 15 +- .../healthCheckup/listMange/index.html | 54 +- .../healthCheckup/projectMange/index.html | 9 +- .../healthCheckup/statisticsSingle/index.html | 20 +- .../healthCheckup/list/index.html | 25 +- .../healthCheckup/listParticulars/index.html | 97 ++++ .../healthCheckup/mine/index.html | 26 +- .../physicalExaminationList/index.html | 501 ++++++++++++++++++ .../projectManageForm/index.html | 121 +++-- .../healthCheckup/userBaseMessage/index.html | 153 ++++++ src/test/java/com/budwk/app/WelfareTest.java | 87 +++ 23 files changed, 1326 insertions(+), 97 deletions(-) create mode 100644 src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/listParticulars/index.html create mode 100644 src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/physicalExaminationList/index.html create mode 100644 src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/userBaseMessage/index.html diff --git a/src/main/java/com/budwk/app/sys/models/Sys_union.java b/src/main/java/com/budwk/app/sys/models/Sys_union.java index 01e1bde8..0419f49a 100644 --- a/src/main/java/com/budwk/app/sys/models/Sys_union.java +++ b/src/main/java/com/budwk/app/sys/models/Sys_union.java @@ -40,4 +40,19 @@ public class Sys_union extends BaseModel { @Comment("校区") @ColDefine(type = ColType.VARCHAR, width = 20) private String campus; + + @Column + @Comment("联系人") + @ColDefine(type = ColType.VARCHAR, width = 64) + private String linkMan; + + @Column + @Comment("联系电话") + @ColDefine(type = ColType.VARCHAR, width = 11) + private String contactNumber; + + @Column + @Comment("地址") + @ColDefine(type = ColType.TEXT) + private String address; } 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 4f20b88b..579b6e89 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 @@ -14,6 +14,7 @@ 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.CommonDownloadUtil; +import com.budwk.app.base.utils.ConditionGroupUtil; import com.budwk.app.base.utils.easyexcel.EasyExcelUtil; import com.budwk.app.sys.views.View_user; import com.budwk.app.web.commons.auth.utils.AuthUtil; @@ -26,6 +27,7 @@ import com.budwk.app.zhgh.dayofficework.healthCheckup.template.HealthCheckupImpo import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.usermodel.Workbook; import org.nutz.aop.interceptor.ioc.TransAop; @@ -48,6 +50,7 @@ import org.nutz.mvc.upload.TempFile; import org.nutz.mvc.upload.UploadAdaptor; import javax.servlet.http.HttpServletResponse; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collections; import java.util.Date; @@ -82,10 +85,8 @@ public class HealthCheckupListController { @At @ApiOperation("分页查询") @SaCheckPermission("healthCheckup.list.mange") - public Result pageData(PageForm pageForm, - String projectId, - String unionId, - String unitId) { + public Result pageData(PageForm pageForm, String projectId, + String unionId, String unitId,String physicalExaminationStatus) { List confirms = dao.query(HealthCheckupUnionConfirm.class, Cnd.where("projectId", "=", projectId)); HealthCheckupProject project = healthCheckupProjectService.findOne(projectId); @@ -121,6 +122,11 @@ public class HealthCheckupListController { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { cnd.andEX("hcu.unionId", "=", SecurityUtil.getUnionId()); } + //体检状态 + if(StringUtils.isNotBlank(physicalExaminationStatus) && !physicalExaminationStatus.equals("2")){ + if(physicalExaminationStatus.equals("1")) cnd.where().andNotIsNull("hcus.selectTime"); + if(physicalExaminationStatus.equals("0")) cnd.where().andIsNull("hcus.selectTime"); + } if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { SqlExpressionGroup group = new SqlExpressionGroup(); @@ -184,15 +190,34 @@ public class HealthCheckupListController { @SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员编辑了一条选择记录") @SaCheckPermission("healthCheckup.list.mange") public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId, String bz) { + //查询用户符合哪个套餐 + List list = healthCheckupProjectService.dao().query(HealthCheckupProjectSubjectMoney.class, + Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", subjectId)); + BigDecimal money = BigDecimal.valueOf(0.00); + String subjectMoneyId = ""; + for (HealthCheckupProjectSubjectMoney subject : list) { + // 是否满足条件 + Cnd cnd = Cnd.where("id", "=", userId); + ConditionGroupUtil.applyConditionGroup(cnd, subject.getMatchCnd()); + int count = dao.count(View_user.class, cnd); + if (count > 0) { + money = subject.getMoney(); + subjectMoneyId = subject.getId(); + break; + } + } //查询用户有没有选择过套餐 HealthCheckupUserSelection userSelection = healthCheckupProjectService.dao().fetch(HealthCheckupUserSelection.class, - Cnd.where("projectId", "=", projectId).and("selectUserId", "=", userId)); + Cnd.where("projectId", "=", projectId) + .and("selectUserId", "=", userId)); //如果选择过套餐就修改选择的套餐id if (Lang.isNotEmpty(userSelection)) { userSelection.setSubjectId(subjectId); userSelection.setCampus(campus); userSelection.setBz(bz); + userSelection.setSubjectMoneyId(subjectMoneyId); + userSelection.setMoney(money); healthCheckupProjectService.update(userSelection); } else { //如果没有选择过套餐添加一条记录 @@ -203,6 +228,8 @@ public class HealthCheckupListController { checkupUserSelection.setCampus(campus); checkupUserSelection.setSelectTime(new Date()); checkupUserSelection.setBz(bz); + checkupUserSelection.setSubjectMoneyId(subjectMoneyId); + checkupUserSelection.setMoney(money); healthCheckupProjectService.insert(checkupUserSelection); } return Result.success(); @@ -321,8 +348,72 @@ public class HealthCheckupListController { RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { return Result.error("您没有【删除】的权限"); } else { + HealthCheckupUser fetch = dao.fetch(HealthCheckupUser.class, Cnd.where(HealthCheckupUser::getId, "=", id)); + Cnd and = Cnd.NEW().and(HealthCheckupUserSelection::getProjectId, "=", fetch.getProjectId()) + .and(HealthCheckupUserSelection::getSelectUserId, "=", fetch.getUserId()); + dao.clear(HealthCheckupUserSelection.class, and); dao.clear(HealthCheckupUser.class, Cnd.where(HealthCheckupUser::getId, "=", id)); return Result.success(); } } + + @At + @Ok("void") + @ApiOperation("下载体检报告导入模版") + @SaCheckPermission("healthCheckup.list.mange") + public void downloadTemMedicalExaminationReport(HttpServletResponse response) { + List entities = new ArrayList<>(); + entities.add(new ExcelExportEntity("工号", "loginName", 20)); + entities.add(new ExcelExportEntity("体检报告", "medicalExamination", 20)); + ExportParams exportParams = new ExportParams(); + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList()); + CommonDownloadUtil.download("体检报告导入模版.xlsx", workbook, response); + } + + @At + @ApiOperation("体检名单导入名单") + @SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员导入了体检名单") + @SaCheckPermission("healthCheckup.list.import.medicalExamination") + @Aop(TransAop.READ_COMMITTED) + @AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"}) + public Result healthImportMedicalExaminationReport(TempFile file, String healthProjectId) { + // 读取数据 + List ts = EasyExcelUtil.syncReadModel(file.getFile(), HealthCheckupImportTemp.class, 0, 1); + List healthCheckupImportTemps = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(HealthCheckupImportTemp.class); + List loginNames = healthCheckupImportTemps.stream().filter(v -> Strings.isNotBlank(v.getLoginName())).map(v -> v.getLoginName()).collect(Collectors.toList()); + + List userList = dao.query(View_user.class, Cnd.where(View_user::getLoginname, "in", loginNames)); + int successCount = 0; + for (int i = 0; i < healthCheckupImportTemps.size(); i++) { + HealthCheckupImportTemp excel = healthCheckupImportTemps.get(i); + if (StrUtil.isBlank(excel.getLoginName())) { + excel.setErrInfo("工号为空", i + 1); + continue; + } + // 不能在excel里重复 + if (healthCheckupImportTemps.stream().filter(s -> s.getLoginName().equals(excel.getLoginName())).count() > 1) { + 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); + continue; + } + + dao.update(HealthCheckupUser.class, + Chain.make("medicalExamination", excel.getMedicalExamination()), + Cnd.where("loginName", "=", excel.getLoginName())); + successCount++; + } + + // 创建结果集 + ExcelImportRes excelImportRes = new ExcelImportRes<>(); + excelImportRes.setTotalRecords(healthCheckupImportTemps.size()); + // 添加错误记录 + excelImportRes.setErrorDetails(healthCheckupImportTemps.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList())); + excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size()); + excelImportRes.setSuccessCount(successCount); + + return Result.success(excelImportRes); + } } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupProjectMangeController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupProjectMangeController.java index 47fa6bab..062b1b98 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupProjectMangeController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/controller/HealthCheckupProjectMangeController.java @@ -132,6 +132,7 @@ public class HealthCheckupProjectMangeController { } }); healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects()); + healthCheckupProjectService.update(healthCheckupProject); } 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 1c29b26e..050bfba9 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 @@ -5,15 +5,18 @@ import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DateUtil; 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.base.sms.SmsService; import com.budwk.app.base.utils.CommonDownloadUtil; import com.budwk.app.base.utils.ConditionGroupUtil; import com.budwk.app.base.utils.ManyAddOrRenewUtil; import com.budwk.app.sys.views.View_user; +import com.budwk.app.web.commons.base.Globals; import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject; import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubject; import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney; @@ -54,6 +57,8 @@ import java.util.stream.Collectors; @At("/platform/healthCheckup/statistics/single") public class HealthCheckupSingleController { + @Inject + private SmsService smsService; @Inject private HealthCheckupSingleService healthCheckupSingleService; @@ -116,18 +121,19 @@ public class HealthCheckupSingleController { boolean flag, HttpServletResponse response) { List entityList = new ArrayList<>() {{ - add(new ExcelExportEntity("职工号", "loginName", 20)); + add(new ExcelExportEntity("工号", "loginName", 20)); add(new ExcelExportEntity("姓名", "userName", 20)); add(new ExcelExportEntity("性别", "sex", 20)); -// add(new ExcelExportEntity("出生年月", "birthday", 20)); add(new ExcelExportEntity("年龄", "age", 20)); - add(new ExcelExportEntity("婚姻状况", "marriage", 20)); + add(new ExcelExportEntity("手机号码", "mobile", 20)); add(new ExcelExportEntity("身份证号", "idCard", 20)); - add(new ExcelExportEntity("部门", "unitName", 20)); -// add(new ExcelExportEntity("部门编码", "unitCode", 20)); + add(new ExcelExportEntity("用户类型", "personType", 20)); + add(new ExcelExportEntity("婚姻状况", "marriage", 20)); add(new ExcelExportEntity("医院", "subjectName", 20)); add(new ExcelExportEntity("套餐金额", "money", 20)); add(new ExcelExportEntity("结算金额", "settlementMoney", 20)); + add(new ExcelExportEntity("部门", "unitName", 20)); + add(new ExcelExportEntity("分工会", "unionName", 20)); add(new ExcelExportEntity("邮寄地址", "receiveAddress", 50)); }}; @@ -375,6 +381,17 @@ public class HealthCheckupSingleController { @SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员给未选的人发送提醒") public Result msgNotSelect(@Valid String projectId) { List userList = healthCheckupSingleService.receivePageData(projectId, null, "1"); - return Result.success("暂未开启消息!"); + if(CollectionUtil.isNotEmpty(userList)){ + List loginNameList = userList.stream() + .map(e -> e.getString("loginName")) + .collect(Collectors.toList()); + smsService.massSendTextCard(loginNameList, + "系统显示您本年度体检医院信息尚未维护,请尽快登录小程序完成体检医院选择及个人信息确认,以免影响正常体检安排。", + "#", + Globals.AppDomain); + return Result.success("提醒成功"); + } else { + return Result.success("不存在未体检人员"); + } } } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java index be0c21cd..49e3e6fc 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java @@ -4,6 +4,7 @@ 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; @@ -11,12 +12,10 @@ import com.budwk.app.base.service.BaseService; import com.budwk.app.base.utils.ConditionGroupUtil; import com.budwk.app.sys.views.View_user; import com.budwk.app.web.commons.auth.utils.SecurityUtil; -import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupCampus; -import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject; -import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney; -import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection; +import com.budwk.app.zhgh.dayofficework.healthCheckup.model.*; import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService; import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; @@ -32,6 +31,7 @@ import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Param; +import javax.validation.constraints.NotBlank; import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -113,7 +113,7 @@ public class H5HealthCheckupController { @At @SaCheckPermission(value = {"h5.healthCheckup.list", "h5.healthCheckup.mine"}, mode = SaMode.OR) - public Object mineData(PageForm pageForm, String status) { + public Object mineData(PageForm pageForm, String status, String projectId) { Sql sql = Sqls.create(""" SELECT us.*, @@ -130,6 +130,7 @@ public class H5HealthCheckupController { """); Cnd cnd = Cnd.NEW(); cnd.and("us.selectUserId", "=", SecurityUtil.getUserId()); + cnd.andEX("us.projectId", "=", projectId); // 根据 status 参数筛选进行中或已结束的项目 if ("ongoing".equals(status)) { // 进行中的项目:结束时间大于等于当前时间 @@ -236,6 +237,66 @@ public class H5HealthCheckupController { return Result.success().addData(Map.of("money", money, "subjectMoneyId", subjectMoneyId)); } + @At("/listParticulars") + @Ok("beetl:/platform/zhghh5/dayofficework/healthCheckup/listParticulars/index.html") + @SaCheckPermission("h5.healthCheckup.list") + @ApiOperation("体检项目报名详情页面") + public void listParticulars(){} + + @At("/userBaseMessage") + @Ok("beetl:/platform/zhghh5/dayofficework/healthCheckup/userBaseMessage/index.html") + @SaCheckPermission("h5.healthCheckup.list") + @ApiOperation("基础信息确认") + public void userBaseMessage(){} + + @At + @Aop(TransAop.READ_COMMITTED) + @SaCheckPermission("h5.healthCheckup.list") + @ApiOperation("获取基础信息数据") + public Result findUserBaseMessageData(HealthCheckupUser checkupUser) { + if(StringUtils.isNotBlank(checkupUser.getProjectId()) && StringUtils.isNotBlank(checkupUser.getUserId())){ + Sql sql = Sqls.create(""" + select cu.id,cu.projectId,cu.userId,cu.userName,cu.sex, + cu.loginName,cu.phone,cu.card,cu.marriage, + u.personType + from health_checkup_user cu + left join sys_user u on cu.userId=u.id + $condition + """); + Cnd cnd = Cnd.NEW().and("cu.projectId", "=", checkupUser.getProjectId()) + .and("cu.userId", "=", checkupUser.getUserId()); + sql.setCondition(cnd); + NutMap nutMap = baseService.fetchMap(sql); + return Result.success(nutMap); + } + return Result.success(); + } + + @At + @Aop(TransAop.READ_COMMITTED) + @SaCheckPermission("h5.healthCheckup.list") + @ApiOperation("基础信息提交") + public Result doSubmitUserBaseMessage(HealthCheckupUser checkupUser) { + checkupUser.setConfirmStatus("1"); + dao.updateIgnoreNull(checkupUser); + return Result.success(); + } + + + @At + @Aop(TransAop.READ_COMMITTED) + @SaCheckPermission("h5.healthCheckup.list") + @ApiOperation("上年度体检医院") + public Result findLastYearHospital(HealthCheckupUserSelection checkupUserSelection) { + return Result.success("成功",healthCheckupProjectService.findLastYearHospital(checkupUserSelection)); + } + + @At("/physicalExaminationList") + @Ok("beetl:/platform/zhghh5/dayofficework/healthCheckup/physicalExaminationList/index.html") + @SaCheckPermission("h5.healthCheckup.list") + public void physicalExaminationList() { + } + } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupProject.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupProject.java index e73b3c2d..79921d12 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupProject.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/model/HealthCheckupProject.java @@ -72,9 +72,10 @@ public class HealthCheckupProject extends BaseModel implements Serializable { @ColDefine(type = ColType.VARCHAR, width = 200) private String cover; - - - + @Column + @Comment("温馨提示") + @ColDefine(type = ColType.TEXT) + private String friendlyReminderText; @Many(field = "projectId") private List healthCheckupProjectSubjects; 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 0905efb2..07ffa985 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 @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.dayofficework.healthCheckup.model; import com.budwk.app.base.model.BaseModel; +import com.budwk.app.sys.annotation.DataCenterColumn; import lombok.Data; import lombok.EqualsAndHashCode; import org.nutz.dao.entity.annotation.*; @@ -78,4 +79,35 @@ public class HealthCheckupUser extends BaseModel implements Serializable { @ColDefine(type = ColType.VARCHAR, width = 30) private String userState; + @Column + @Comment("手机号码") + @ColDefine(type = ColType.VARCHAR, width = 11) + private String phone; + + @Column + @Comment("身份证号") + @ColDefine(type = ColType.VARCHAR, width = 18) + private String card; + + @Column + @Comment("婚姻状况") + @ColDefine(type = ColType.VARCHAR, width = 20) + @DataCenterColumn(name = "婚姻状况", key = "hyztm", dict = "USER_MARRIAGE") + private String marriage; + + @Column + @Comment("教职工类别") + @ColDefine(type = ColType.VARCHAR) + private String personType; + + @Column + @Comment("确认状态") + @ColDefine(type = ColType.CHAR) + @Default("0") + private String confirmStatus; + + @Column + @Comment("体检报告") + @ColDefine(type = ColType.TEXT) + private String medicalExamination; } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupProjectService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupProjectService.java index ddb2bb59..12f26f3b 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupProjectService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/HealthCheckupProjectService.java @@ -2,6 +2,7 @@ package com.budwk.app.zhgh.dayofficework.healthCheckup.service; import com.budwk.app.base.service.BaseService; import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject; +import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection; public interface HealthCheckupProjectService extends BaseService { @@ -20,4 +21,10 @@ public interface HealthCheckupProjectService extends BaseService checkupUserSelections = dao().query(HealthCheckupUserSelection.class, cndSelection); + if(CollectionUtil.isNotEmpty(checkupUserSelections)) { + Cnd cnd = Cnd.NEW(); + cnd.and("id","=",checkupUserSelections.get(0).getSubjectId()); + HealthCheckupProjectSubject projectSubject = dao().fetch(HealthCheckupProjectSubject.class, cnd); + if(ObjectUtil.isNotEmpty(projectSubject)) { + return projectSubject.getOptionName(); + } + } + return null; + } } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupSingleServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupSingleServiceImpl.java index acda9ef2..29d3651a 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupSingleServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupSingleServiceImpl.java @@ -2,10 +2,12 @@ package com.budwk.app.zhgh.dayofficework.healthCheckup.service.impl; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.service.impl.BaseServiceImpl; +import com.budwk.app.base.utils.StringUtil; import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject; import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubject; import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService; import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupSingleService; +import org.apache.commons.lang3.StringUtils; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; import org.nutz.dao.Sqls; @@ -47,6 +49,7 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl healthCheckupList = listMap(sql); + //该体检项目下的套餐 List subjectList = project.getHealthCheckupProjectSubjects(); @@ -218,7 +221,6 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl + + + + + + + + + @@ -188,6 +212,7 @@ layout("/layouts/platform.html"){ return { pageForm: { year: moment().format('YYYY'), + physicalExaminationStatus: '2', }, unions: [], units: [], @@ -201,7 +226,6 @@ layout("/layouts/platform.html"){ {prop: 'unitName', label: '所属单位', sortable: true}, {prop: 'optionName', label: '所选套餐'}, {prop: 'selectTime', label: '选择时间', width: "160px"}, - {prop: 'receiveAddress', label: '邮寄地址', width: "160px"}, {prop: 'isAudit', label: '是否确认'}, {prop: 'auditTime', label: '确认时间'}, {prop: 'bz', label: '备注',width: "200px"}, @@ -211,6 +235,7 @@ layout("/layouts/platform.html"){ loading: false, //导入名单 importVisible: false, + importVisibleExaminationReport: false, campusOptions: [], } @@ -319,6 +344,11 @@ layout("/layouts/platform.html"){ this.importVisible = true; }, + openImportMedicalExaminationReport() { + // importUser + + this.importVisibleExaminationReport = true; + }, successImport() { this.importLoading = false this.doSearch() @@ -339,6 +369,28 @@ layout("/layouts/platform.html"){ }) }, + async msgNotSelect() { + const confirm = await this.$confirm('是否给未体检的教职工发送提醒短信?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + if (confirm === "confirm") { + this.tableLoading = true + const resp = await $.get('/platform/healthCheckup/statistics/single/msgNotSelect', { + projectId: this.pageForm.projectId + }) + if (resp.code === 0) { + setTimeout(() => { + this.doSearch() + this.tableLoading = false + this.notifySuccess(resp.msg) + }, 2000) + } else { + this.notifyWarning(resp.msg) + } + } + }, }, async created() { this.unions = await this.$businessTool.listUnion() diff --git a/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/projectMange/index.html b/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/projectMange/index.html index 17323987..618ecb4a 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/projectMange/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/projectMange/index.html @@ -140,6 +140,11 @@ layout("/layouts/platform.html"){ + + + + + @@ -653,9 +657,10 @@ layout("/layouts/platform.html"){ formData.choiceTimeStart = formData.choiceTime[0] formData.choiceTimeEnd = formData.choiceTime[1] formData.healthCheckupProjectSubjects = JSON.stringify(this.formData.healthCheckupProjectSubjects) - formData.activityGroupName = this.activityGroupList.find(v => v.groupId === this.formData.activityGroupId).groupName + formData.activityGroupName = this.activityGroupList.find(v => v.groupId === this.formData.activityGroupId)?.groupName formData.deleteRowIds = JSON.stringify(this.deleteRowIds) formData.deleteSubjectIds = JSON.stringify(this.deleteSubjectIds) + formData.friendlyReminderText = (formData.friendlyReminderText || ''); const resp = await this.$axios.post("/platform/healthCheckup/project/mange/doAdd", formData) loading.close() if (resp.code === 0) { diff --git a/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/statisticsSingle/index.html b/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/statisticsSingle/index.html index 03a32413..c90fd72a 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/statisticsSingle/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/healthCheckup/statisticsSingle/index.html @@ -357,6 +357,10 @@ layout("/layouts/platform.html"){ }, async getHealthCheckupSubject() { this.projectSubjectOptions = [] + if(!this.pageForm.projectId){ + this.notifyError("请选择体检项目查询") + return ; + } const resp = await this.$axios.post("/platform/healthCheckup/project/mange/findOne", {id: this.pageForm.projectId}) if (resp.code === 0) { if (resp.data) { @@ -402,12 +406,16 @@ layout("/layouts/platform.html"){ if (!this.pageForm.projectId) { this.tableData = [] } - - const resp = await this.$axios.post(loc() + '/pageData', this.pageForm) - if (resp.code === 0) { - this.tableData = resp.data.tableList - } - loading.close() + if(!this.pageForm.projectId){ + this.notifyError("请选择体检项目查询") + this.tableData = [] + } else { + const resp = await this.$axios.post(loc() + '/pageData', this.pageForm) + if (resp.code === 0) { + this.tableData = resp.data.tableList + } + } + loading.close() }, pageNumberChange(val) { this.pageFormUnion.pageNumber = val; diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/list/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/list/index.html index 556eed69..b4cd6b66 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/list/index.html +++ b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/list/index.html @@ -29,6 +29,25 @@ layout("/layouts/platform_h5.html"){