diff --git a/src/main/java/com/budwk/app/base/constant/RoleConstant.java b/src/main/java/com/budwk/app/base/constant/RoleConstant.java index a7d0a250..7318a097 100644 --- a/src/main/java/com/budwk/app/base/constant/RoleConstant.java +++ b/src/main/java/com/budwk/app/base/constant/RoleConstant.java @@ -99,7 +99,8 @@ RoleConstant { PSYCHOLOGY_DOCTOR("心理咨询师"), LEGAL_DOCTOR("法律顾问"), - + //体检管理员 + HEALTH_ADMIN("体检管理员") ; /** * 避免和枚举类的name冲突 diff --git a/src/main/java/com/budwk/app/sys/controller/SysUnionController.java b/src/main/java/com/budwk/app/sys/controller/SysUnionController.java index ef076aeb..f013d718 100644 --- a/src/main/java/com/budwk/app/sys/controller/SysUnionController.java +++ b/src/main/java/com/budwk/app/sys/controller/SysUnionController.java @@ -459,7 +459,7 @@ public class SysUnionController { public Result listUnion(@Valid String unionId, @Valid String keyWord) { Sql sql = Sqls.create("select id,loginname,username,unitName,unionName,sex from vw_user $condition"); Cnd cnd = Cnd.NEW(); - cnd.and(View_user::getUnionId, "=", unionId); + cnd.andEX(View_user::getUnionId, "=", unionId); SqlExpressionGroup seg = new SqlExpressionGroup(); seg.orLike(View_user::getLoginname, keyWord, true); seg.orLike(View_user::getUsername, keyWord, true); diff --git a/src/main/java/com/budwk/app/sys/models/Sys_config.java b/src/main/java/com/budwk/app/sys/models/Sys_config.java index c92ac9ab..f9699f0e 100644 --- a/src/main/java/com/budwk/app/sys/models/Sys_config.java +++ b/src/main/java/com/budwk/app/sys/models/Sys_config.java @@ -26,7 +26,7 @@ public class Sys_config extends BaseModel implements Serializable { private String configValue; @Column - @ColDefine(type = ColType.VARCHAR, width = 255) + @ColDefine(type = ColType.TEXT) private String note; } diff --git a/src/main/java/com/budwk/app/zhgh/activity/smartbenefits/controller/manage/SmartBenefitsManageController.java b/src/main/java/com/budwk/app/zhgh/activity/smartbenefits/controller/manage/SmartBenefitsManageController.java index d85998d2..17903e97 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/smartbenefits/controller/manage/SmartBenefitsManageController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/smartbenefits/controller/manage/SmartBenefitsManageController.java @@ -102,7 +102,7 @@ public class SmartBenefitsManageController { @At @ApiOperation("查询单个活动") - @SaCheckPermission("smartBenefits") + @SaCheckPermission("smartbenefits.manage") public Result findOne(@Param("id") @NotNull String id) { NutMap dataMap = smartBenefitsActivityManageService.findOne(id, null, ""); String activityStartTime = dataMap.getString("activityStartTime"); 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 3f3a6dd2..00603cf5 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 @@ -2,9 +2,11 @@ package com.budwk.app.zhgh.dayofficework.healthCheckup.controller; import cn.afterturn.easypoi.excel.ExcelExportUtil; 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.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.budwk.app.base.annotation.SLog; @@ -51,6 +53,7 @@ import org.nutz.mvc.upload.UploadAdaptor; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Date; @@ -191,7 +194,7 @@ 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) { - if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) { + if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),RoleConstant.HEALTH_ADMIN.name())) { return Result.error("您没有操作此按钮的权限"); } //查询用户符合哪个套餐 @@ -284,35 +287,37 @@ public class HealthCheckupListController { excel.setErrInfo("无此用户", i + 1); continue; } - if (healthCheckupUserList.stream().anyMatch(s -> s.getUserId().equals(user.getId()))) { - excel.setErrInfo("该用户已加入体检名单", i + 1); - continue; + dao.update( + HealthCheckupUser.class, + Chain.make("phone",excel.getPhone()), + Cnd.NEW().and(HealthCheckupUser::getUserId,"=",user.getId()) + .and(HealthCheckupUser::getProjectId, "=", healthProjectId) + ); + } else { + ActivityUserScope s = new ActivityUserScope(); + s.setGroupId(userScope.getGroupId()); + s.setGroupName(userScope.getGroupName()); + s.setUserId(user.getId()); + s.setCreator(SecurityUtil.getUserId()); + userScopeList.add(s); + + HealthCheckupUser newHealthUser = new HealthCheckupUser(); + newHealthUser.setProjectId(healthProjectId); + newHealthUser.setUserId(user.getId()); + newHealthUser.setUserName(user.getUsername()); + newHealthUser.setSex(user.getSex()); + newHealthUser.setLoginName(user.getLoginname()); + newHealthUser.setUnionName(user.getUnionName()); + newHealthUser.setUnionId(user.getUnionId()); + newHealthUser.setUnitName(user.getUnitName()); + newHealthUser.setCard(user.getIdCard()); + newHealthUser.setPhone(excel.getPhone()); + newHealthUser.setMarriage(user.getMarriage()); + newHealthUser.setPersonType(user.getPersonType()); + healthCheckupUsersToAdd.add(newHealthUser); + successCount++; } - - ActivityUserScope s = new ActivityUserScope(); - s.setGroupId(userScope.getGroupId()); - s.setGroupName(userScope.getGroupName()); - s.setUserId(user.getId()); - s.setCreator(SecurityUtil.getUserId()); - userScopeList.add(s); - - HealthCheckupUser newHealthUser = new HealthCheckupUser(); - newHealthUser.setProjectId(healthProjectId); - newHealthUser.setUserId(user.getId()); - newHealthUser.setUserName(user.getUsername()); - newHealthUser.setSex(user.getSex()); - newHealthUser.setLoginName(user.getLoginname()); - newHealthUser.setUnionName(user.getUnionName()); - newHealthUser.setUnionId(user.getUnionId()); - newHealthUser.setUnitName(user.getUnitName()); - newHealthUser.setCard(user.getIdCard()); - newHealthUser.setPhone(user.getMobile()); - newHealthUser.setMarriage(user.getMarriage()); - newHealthUser.setPersonType(user.getPersonType()); - healthCheckupUsersToAdd.add(newHealthUser); - - successCount++; } @@ -338,6 +343,7 @@ public class HealthCheckupListController { List entities = new ArrayList<>(); entities.add(new ExcelExportEntity("工号", "loginName", 20)); entities.add(new ExcelExportEntity("姓名", "userName", 20)); + entities.add(new ExcelExportEntity("手机号", "phone", 20)); ExportParams exportParams = new ExportParams(); Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList()); CommonDownloadUtil.download("参加人员导入模版.xlsx", workbook, response); @@ -433,4 +439,131 @@ public class HealthCheckupListController { Cnd.NEW().and("projectId","=",projectId)) ); } + + @At + @ApiOperation("体检名单编辑备注") + @SLog(type = "healthCheckup", tag = "体检管理", msg = "编辑备注") + @SaCheckPermission("healthCheckup.list.mange") + public Result doEditRemarks(String userId, String projectId,String remarks) { + if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { + return Result.error("您没有操作此按钮的权限"); + } + dao.update(HealthCheckupUserSelection.class, + Chain.make("bz", remarks), + Cnd.where("selectUserId", "=", userId) + .and("projectId", "=", projectId)); + return Result.success(); + } + + @At + @Ok("void") + @ApiOperation("导出") + @SaCheckPermission("healthCheckup.list.mange") + public void exportHealthUser(String projectId, + String unionId, + String searchKeyword, + String subjectId, + String unitId, + String physicalExaminationStatus, + String pageOrderName, + String pageOrderBy, + HttpServletResponse response) { + List confirms = dao.query(HealthCheckupUnionConfirm.class, Cnd.where("projectId", "=", projectId)); + HealthCheckupProject project = healthCheckupProjectService.findOne(projectId); + Cnd cnd = Cnd.NEW(); + Sql sql = Sqls.create(""" + SELECT + hcu.id AS headId, + hcu.userId AS id, + hcu.loginName, + hcu.userName, + hcu.sex, + hcu.unionId, + hcu.unionName, + hcu.unitName, + hcus.selectTime, + hcus.campus, + hcus.subjectId, + hcus.bz, + hcus.receiveAddress, + ca.campusName + FROM health_checkup_user hcu + LEFT JOIN health_checkup_user_selection hcus ON hcu.userId = hcus.selectUserId + AND hcus.projectId=@projectId + LEFT JOIN health_checkup_campus ca on ca.id=hcus.campus + $condition + """).setParam("projectId", projectId); + sql.setCondition(cnd); + cnd.andEX("hcu.projectId", "=", projectId); + cnd.andEX("hcu.unionId", "=", unionId); + cnd.andEX("hcu.unitId", "=", unitId); + cnd.andEX("hcus.subjectId", "=", subjectId); + + 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(searchKeyword)) { + SqlExpressionGroup group = new SqlExpressionGroup(); + group.orLike("hcu.userName", searchKeyword); + group.orLike("hcu.loginName", searchKeyword); + cnd.and(group); + } + cnd.groupBy("hcu.userId"); + if (StrUtil.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderBy)) { + cnd.orderBy(pageOrderName, "ascending".equalsIgnoreCase(pageOrderBy) ? "ASC" : "DESC"); + } else { + cnd.desc("hcus.selectTime").asc("hcu.unitId"); + } + sql.setCondition(cnd); + + List paginationList = healthCheckupProjectService.listMap(sql); + paginationList.forEach(v -> { + if (StrUtil.isNotBlank(v.getString("subjectId"))) { + List subjects = project.getHealthCheckupProjectSubjects(); + HealthCheckupProjectSubject subject = subjects.stream().filter(s -> s.getId().equals(v.getString("subjectId"))).findFirst().orElse(null); + v.setv("optionName", subject.getOptionName()); + } + + if (StrUtil.isNotBlank(v.getString("unionId"))) { + HealthCheckupUnionConfirm confirm = confirms.stream().filter(o -> o.getUnionId().equals(v.getString("unionId"))).findFirst().orElse(null); + v.setv("isAudit", confirm != null && confirm.getIsAudit() ? "已确认" : "未确认"); + v.setv("auditTime", confirm != null && ObjectUtil.isNotEmpty(confirm.getAuditTime() ) + ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(confirm.getAuditTime()) : ""); + } + }); + for (int i = 0; i < paginationList.size(); i++) { + paginationList.get(i).put("index", i + 1); + } + + List entityList = new ArrayList<>() {{ + add(new ExcelExportEntity("序号", "index", 20)); + add(new ExcelExportEntity("工号", "loginName", 20)); + add(new ExcelExportEntity("姓名", "userName", 20)); + add(new ExcelExportEntity("性别", "sex", 20)); + add(new ExcelExportEntity("所属工会", "unionName", 20)); + add(new ExcelExportEntity("所属单位", "unitName", 20)); + add(new ExcelExportEntity("所选套餐", "optionName", 20)); + add(new ExcelExportEntity("选择时间", "selectTime", 50)); + add(new ExcelExportEntity("是否确认", "isAudit", 50)); + add(new ExcelExportEntity("确认时间", "auditTime", 50)); + add(new ExcelExportEntity("备注", "bz", 50)); + }}; + + try { + ExportParams exportParams = new ExportParams(); + exportParams.setType(ExcelType.XSSF); + exportParams.setTitle("体检名单数据导出"); + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, paginationList); + CommonDownloadUtil.download("体检名单数据导出.xlsx", workbook, response); + } catch (Exception e) { + e.printStackTrace(); + } + } + } 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 16b432dd..b8c18170 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 @@ -2,11 +2,14 @@ package com.budwk.app.zhgh.dayofficework.healthCheckup.controller; import cn.dev33.satoken.annotation.SaCheckPermission; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.param.PageForm; import com.budwk.app.base.result.Result; +import com.budwk.app.sys.models.Sys_home_activity; import com.budwk.app.sys.models.Sys_union; +import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService; import com.budwk.app.zhgh.dayofficework.healthCheckup.model.*; import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService; import io.swagger.annotations.Api; @@ -43,6 +46,8 @@ public class HealthCheckupProjectMangeController { @Inject private HealthCheckupProjectService healthCheckupProjectService; + @Inject + private ActivityCultureService activityCultureService; @At("") @@ -85,7 +90,7 @@ public class HealthCheckupProjectMangeController { } @At - @ApiOperation("体检名单确认") + @ApiOperation("体检项目确认") @Aop(TransAop.READ_COMMITTED) @SaCheckPermission("healthCheckup.projectMange") @SLog(type = "healthCheckup", tag = "体检管理", msg = "提交体检项目") @@ -147,6 +152,13 @@ public class HealthCheckupProjectMangeController { confirmList.add(c); }); healthCheckupProjectService.dao().insert(confirmList); + + Sys_home_activity sysHomeActivity = activityCultureService.dao().fetch(Sys_home_activity.class, Cnd.where("id", "=", healthCheckupProject.getId())); + if(ObjectUtil.isNotEmpty(sysHomeActivity)){ + activityCultureService.dao().clear(Sys_home_activity.class, Cnd.where(Sys_home_activity::getId, "=", sysHomeActivity.getId())); + } + + activityCultureService.insertOrUpdate(healthCheckupProject.covertToSysHomeActivity()); return Result.success(); } @@ -166,6 +178,7 @@ public class HealthCheckupProjectMangeController { healthCheckupProjectService.delete(id); healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("projectId", "=", id)); healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("projectId", "=", id)); + activityCultureService.dao().clear(Sys_home_activity.class, Cnd.where(Sys_home_activity::getId, "=", id)); return Result.success(); } 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 a7301d4e..f5110544 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 @@ -297,7 +297,7 @@ public class HealthCheckupSingleController { @At - @ApiOperation("管理员一键选择去年数据") + @ApiOperation("按上年补齐未选人员") @Ok("json:full") @SaCheckPermission("healthCheckup.statisticsSingle") @SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员给没选的人统一选择去年的数据") @@ -339,6 +339,8 @@ public class HealthCheckupSingleController { //今年项目下的医院 List thisYearSubjectList = dao.query(HealthCheckupProjectSubject.class, Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", projectId)); + List thisYearSubjectMoneyList = dao.query(HealthCheckupProjectSubjectMoney.class, + Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", projectId)); List selections = new ArrayList<>(); userIds.forEach(v -> { @@ -378,6 +380,43 @@ public class HealthCheckupSingleController { selections.add(selection); } } + } else { + //若去年未体检,则去本年校医院体检 + HealthCheckupProjectSubject thisYearProjectSubject = thisYearSubjectList.stream() + .filter(e -> e.getOptionName().contains("校医院")) + .findFirst() + .orElse(null); + if(ObjectUtil.isNotEmpty(thisYearProjectSubject)) { + List healthCheckupProjectSubjectMonies = thisYearSubjectMoneyList.stream() + .filter(e -> e.getSubjectId().equals(thisYearProjectSubject.getId())) + .collect(Collectors.toList()); + if(CollectionUtil.isNotEmpty(healthCheckupProjectSubjectMonies)){ + BigDecimal money = BigDecimal.valueOf(0.00); + String subjectMoneyId = null; + for (HealthCheckupProjectSubjectMoney subject : healthCheckupProjectSubjectMonies) { + //找出这个人符合哪个项目 + Cnd cndUser = Cnd.where("id", "=", v); + ConditionGroupUtil.applyConditionGroup(cndUser, subject.getMatchCnd()); + int count = dao.count(View_user.class, cndUser); + if (count > 0) { + money = subject.getMoney(); + subjectMoneyId = subject.getId(); + break; + } + } + //如果有符合的就添加 + if (subjectMoneyId != null) { + HealthCheckupUserSelection selection = new HealthCheckupUserSelection(); + selection.setProjectId(projectId); + selection.setSelectUserId(v); + selection.setSubjectId(thisYearProjectSubject.getId()); + selection.setSubjectMoneyId(subjectMoneyId); + selection.setMoney(money); + selection.setSelectTime(new Date()); + selections.add(selection); + } + } + } } }); dao.insert(selections); 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 49e3e6fc..99a66f28 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 @@ -131,14 +131,15 @@ public class H5HealthCheckupController { Cnd cnd = Cnd.NEW(); cnd.and("us.selectUserId", "=", SecurityUtil.getUserId()); cnd.andEX("us.projectId", "=", projectId); + cnd.orderBy("us.selectTime","desc"); // 根据 status 参数筛选进行中或已结束的项目 - if ("ongoing".equals(status)) { - // 进行中的项目:结束时间大于等于当前时间 - cnd.and("p.choiceTimeEnd", ">=", DateUtil.now()); - } else if ("finished".equals(status)) { - // 已结束的项目:结束时间小于当前时间 - cnd.and("p.choiceTimeEnd", "<", DateUtil.now()); - } +// if ("ongoing".equals(status)) { +// // 进行中的项目:结束时间大于等于当前时间 +// cnd.and("p.choiceTimeEnd", ">=", DateUtil.now()); +// } else if ("finished".equals(status)) { +// // 已结束的项目:结束时间小于当前时间 +// cnd.and("p.choiceTimeEnd", "<", DateUtil.now()); +// } sql.setCondition(cnd); Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pagination); 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 79921d12..91a8f7e8 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 @@ -2,10 +2,13 @@ package com.budwk.app.zhgh.dayofficework.healthCheckup.model; import cn.hutool.json.JSONObject; import com.budwk.app.base.model.BaseModel; +import com.budwk.app.sys.models.Sys_home_activity; +import com.budwk.app.sys.services.SysHomeConvert; import lombok.Data; import lombok.EqualsAndHashCode; import org.nutz.dao.entity.annotation.*; import org.nutz.dao.interceptor.annotation.PrevInsert; +import org.nutz.lang.Lang; import java.io.Serializable; import java.util.Date; @@ -22,7 +25,7 @@ import java.util.List; @Table("health_checkup_project") @TableMeta("{'mysql-charset':'utf8mb4'}") @Comment("体检项目表") -public class HealthCheckupProject extends BaseModel implements Serializable { +public class HealthCheckupProject extends BaseModel implements Serializable, SysHomeConvert { @Column @Name @@ -80,4 +83,20 @@ public class HealthCheckupProject extends BaseModel implements Serializable { @Many(field = "projectId") private List healthCheckupProjectSubjects; + @Override + public Sys_home_activity covertToSysHomeActivity() { + Sys_home_activity sysHomeActivity = new Sys_home_activity(); + sysHomeActivity.setId(this.getId()); + sysHomeActivity.setName(this.getName()); + sysHomeActivity.setCover(this.getCover()); + sysHomeActivity.setH5Url("/platform/healthCheckup/h5/list?id=" + this.getId()); + if (Lang.isNotEmpty(this.getChoiceTimeStart())) { + sysHomeActivity.setStartDate(this.getChoiceTimeStart()); + sysHomeActivity.setEndDate(this.getChoiceTimeEnd()); + } + sysHomeActivity.setEnable(true); + sysHomeActivity.setAllowUserSql("select userId from health_checkup_user where projectId = '" + this.getId() + "' and userId = @userId"); + sysHomeActivity.setClassPath(this.getClass().getPackageName() + this.getClass().getName()); + return sysHomeActivity; + } } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java index fd38175c..b2438cb0 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java @@ -24,9 +24,8 @@ import org.nutz.lang.Strings; import org.nutz.lang.random.R; import org.nutz.lang.util.NutMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; +import java.time.LocalDate; +import java.util.*; import java.util.stream.Collectors; /** @@ -138,15 +137,30 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl=", start.toString()).and("selectTime", "<=", end.toString()); + lastYearCndSelection.where().andNotIsNull("selectTime"); + lastYearCndSelection.desc("selectTime"); + List lastYearSelections = dao().query(HealthCheckupUserSelection.class, lastYearCndSelection); + if(CollectionUtil.isNotEmpty(lastYearSelections)) { + Cnd cnd = Cnd.NEW(); + cnd.and("id","=",lastYearSelections.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 c0e85038..aace78a0 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 @@ -213,13 +213,13 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl导入体检报告 + 导出 + 确认名单 @@ -133,11 +136,16 @@ layout("/layouts/platform.html"){ + @@ -132,6 +138,9 @@ layout("/layouts/platform_h5.html"){ // 初始化状态 this.$set(this.pageForm, "status", "ongoing") }, + look(row) { + this.$pjaxReplace("/platform/healthCheckup/h5/physicalExaminationList?projectId=" + row.id) + } }, created() { this.initData() diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/listParticulars/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/listParticulars/index.html index 6b652908..e5af4195 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/listParticulars/index.html +++ b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/listParticulars/index.html @@ -19,7 +19,7 @@ layout("/layouts/platform_h5.html"){
- 基础信息确认 + 基础信息查询 选择体检医院 我的体检医院
@@ -88,13 +88,13 @@ layout("/layouts/platform_h5.html"){ let friendlyReminderStatus = sessionStorage.getItem("friendlyReminderStatus"); if (friendlyReminderStatus == "0" ) { this.show = true; - this.confirmButtonText = '已悉知(' + this.count + ')' + this.confirmButtonText = '已知悉(' + this.count + ')' let timer = setInterval(() => { this.count--; - this.confirmButtonText = '已悉知(' + this.count + ')' + this.confirmButtonText = '已知悉(' + this.count + ')' if (this.count <= 0) { this.confirmDisabled = false; - this.confirmButtonText = '已悉知'; + this.confirmButtonText = '已知悉'; clearInterval(timer); } }, 1000); diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/mine/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/mine/index.html index b9b0a971..224aab78 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/mine/index.html +++ b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/mine/index.html @@ -44,7 +44,6 @@ layout("/layouts/platform_h5.html"){ pageSize: 10, totalCount: 0, year: "", - status: "ongoing", // 默认为进行中 name: "", // 添加搜索名称字段 projectId: "" }, @@ -99,12 +98,11 @@ layout("/layouts/platform_h5.html"){ this.yearList.unshift({value: i, text: i + "年"}) } this.$set(this.pageForm, "year", this.yearList[0].value) - // 初始化状态 - this.$set(this.pageForm, "status", "ongoing") + this.pageForm.projectId = GetQueryString("projectId"); }, - look() { - this.$pjaxReplace("/platform/healthCheckup/h5/physicalExaminationList?projectId=" + this.pageForm.projectId) + look(row) { + this.$pjaxReplace("/platform/healthCheckup/h5/physicalExaminationList?projectId=" + row.projectId) } }, created() { diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/physicalExaminationList/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/physicalExaminationList/index.html index 10621a36..5ab058e2 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/physicalExaminationList/index.html +++ b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/physicalExaminationList/index.html @@ -33,18 +33,36 @@ layout("/layouts/platform_h5.html"){ {{$moment(formData.birthday).format('YYYY-MM-DD')}} {{formData.unitName}} - - {{getSelectedOptionName}} - - + +
+ + + + + + + + +
+ +
diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/userBaseMessage/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/userBaseMessage/index.html index 43851ad2..e5b9c675 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/userBaseMessage/index.html +++ b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/userBaseMessage/index.html @@ -20,7 +20,7 @@ layout("/layouts/platform_h5.html"){