体检管理需求整改

This commit is contained in:
2026-04-08 11:44:54 +08:00
parent 32ee62edd4
commit 15cdcb02a2
23 changed files with 1326 additions and 97 deletions
@@ -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;
}
@@ -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<HealthCheckupUnionConfirm> 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<HealthCheckupProjectSubjectMoney> 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<ExcelExportEntity> 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<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), HealthCheckupImportTemp.class, 0, 1);
List<HealthCheckupImportTemp> healthCheckupImportTemps = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(HealthCheckupImportTemp.class);
List<String> loginNames = healthCheckupImportTemps.stream().filter(v -> Strings.isNotBlank(v.getLoginName())).map(v -> v.getLoginName()).collect(Collectors.toList());
List<View_user> 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<HealthCheckupImportTemp> 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);
}
}
@@ -132,6 +132,7 @@ public class HealthCheckupProjectMangeController {
}
});
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
healthCheckupProjectService.update(healthCheckupProject);
}
@@ -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<ExcelExportEntity> 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<NutMap> userList = healthCheckupSingleService.receivePageData(projectId, null, "1");
return Result.success("暂未开启消息!");
if(CollectionUtil.isNotEmpty(userList)){
List<String> loginNameList = userList.stream()
.map(e -> e.getString("loginName"))
.collect(Collectors.toList());
smsService.massSendTextCard(loginNameList,
"系统显示您本年度体检医院信息尚未维护,请尽快登录小程序完成体检医院选择及个人信息确认,以免影响正常体检安排。",
"#",
Globals.AppDomain);
return Result.success("提醒成功");
} else {
return Result.success("不存在未体检人员");
}
}
}
@@ -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() {
}
}
@@ -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<HealthCheckupProjectSubject> healthCheckupProjectSubjects;
@@ -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;
}
@@ -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<HealthCheckupProject> {
@@ -20,4 +21,10 @@ public interface HealthCheckupProjectService extends BaseService<HealthCheckupPr
* @param healthCheckupProject
*/
void renewHealthCheckupUser(HealthCheckupProject healthCheckupProject);
/**
* 获取用户上年度体检医院
* @param checkupUserSelection
*/
String findLastYearHospital(HealthCheckupUserSelection checkupUserSelection);
}
@@ -1,8 +1,12 @@
package com.budwk.app.zhgh.dayofficework.healthCheckup.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.budwk.app.base.service.impl.BaseServiceImpl;
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.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.*;
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
@@ -12,6 +16,7 @@ import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.Daos;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -19,6 +24,7 @@ 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.util.stream.Collectors;
@@ -92,6 +98,14 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
dao().clear(HealthCheckupUserCompanion.class, Cnd.where("userSelectionId", "in", userSelectionIds));
manyAddOrRenewUtil.asyncExecuteFastInsert(needInsertSelectionUsers, null);
Sql updateSql = Sqls.create("""
update health_checkup_user cu
left join sys_user u on cu.userId=u.id\s
set cu.phone=u.mobile,cu.card=u.idCard,cu.marriage=u.marriage,cu.personType=u.personType
where cu.projectId=@projectId and cu.confirmStatus!='1'
""");
sql.setParam("projectId", healthCheckupProject.getId());
dao().execute(updateSql);
}
@@ -115,4 +129,26 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
return user;
}).collect(Collectors.toList());
}
/**
* 获取上年度体检医院
* @param healthCheckupUserSelection
* @return
*/
public String findLastYearHospital(HealthCheckupUserSelection healthCheckupUserSelection){
Cnd cndSelection = Cnd.NEW();
cndSelection.and("selectUserId","=",healthCheckupUserSelection.getSelectUserId());
cndSelection.where().andNotIsNull("selectTime");
cndSelection.desc("selectTime");
List<HealthCheckupUserSelection> 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;
}
}
@@ -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<HealthChecku
sql.setCondition(cnd);
//分工会参加体检人数汇总
List<NutMap> healthCheckupList = listMap(sql);
//该体检项目下的套餐
List<HealthCheckupProjectSubject> subjectList = project.getHealthCheckupProjectSubjects();
@@ -218,7 +221,6 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl<HealthChecku
u.idCard,
u.mobile,
hcps.optionName subjectName,
hcus.receiveAddress,
hcc.campusName,
hcpsm.money,
hcpsm.settlementMoney,
@@ -231,13 +233,17 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl<HealthChecku
WHERE
hcus.projectId = @projectId
AND hcus.selectUserId = u.id
) optionName
) optionName,
concat(u.address,',',u.linkMan,',',u.contactNumber) receiveAddress,
u.unionName,
u.mobile,
u.personType
FROM
`health_checkup_user_selection` hcus
LEFT JOIN `vw_user` u ON u.id = hcus.selectUserId
LEFT JOIN `health_checkup_user` hcu ON hcu.userId = hcus.selectUserId and hcu.projectId=@projectId
LEFT JOIN `health_checkup_project_subject` hcps ON hcps.id = hcus.subjectId
LEFT JOIN `health_checkup_project_subject_money` hcpsm ON hcpsm.projectId = @projectId and hcpsm.subjectId=hcps.id
LEFT JOIN `health_checkup_project_subject_money` hcpsm ON hcpsm.projectId = @projectId and hcpsm.subjectId=hcps.id and hcus.subjectMoneyId=hcpsm.id
LEFT JOIN `health_checkup_campus` hcc ON hcc.id = hcus.campus
$condition
""").setParam("projectId", projectId);
@@ -22,4 +22,7 @@ public class HealthCheckupImportTemp extends ExcelImportError {
@ExcelProperty("姓名")
private String userName;
@ExcelProperty("体检报告")
private String medicalExamination;
}