体检管理bug调整
This commit is contained in:
@@ -99,7 +99,8 @@ RoleConstant {
|
||||
PSYCHOLOGY_DOCTOR("心理咨询师"),
|
||||
LEGAL_DOCTOR("法律顾问"),
|
||||
|
||||
|
||||
//体检管理员
|
||||
HEALTH_ADMIN("体检管理员")
|
||||
;
|
||||
/**
|
||||
* 避免和枚举类的name冲突
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -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");
|
||||
|
||||
+161
-28
@@ -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<ExcelExportEntity> 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<HealthCheckupUnionConfirm> 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<NutMap> paginationList = healthCheckupProjectService.listMap(sql);
|
||||
paginationList.forEach(v -> {
|
||||
if (StrUtil.isNotBlank(v.getString("subjectId"))) {
|
||||
List<HealthCheckupProjectSubject> 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<ExcelExportEntity> 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+14
-1
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
+40
-1
@@ -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<HealthCheckupProjectSubject> thisYearSubjectList = dao.query(HealthCheckupProjectSubject.class,
|
||||
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", projectId));
|
||||
List<HealthCheckupProjectSubjectMoney> thisYearSubjectMoneyList = dao.query(HealthCheckupProjectSubjectMoney.class,
|
||||
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", projectId));
|
||||
|
||||
List<HealthCheckupUserSelection> 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<HealthCheckupProjectSubjectMoney> 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);
|
||||
|
||||
+8
-7
@@ -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);
|
||||
|
||||
+20
-1
@@ -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<HealthCheckupProjectSubject> 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;
|
||||
}
|
||||
}
|
||||
|
||||
+25
-11
@@ -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<HealthCheck
|
||||
public String findLastYearHospital(HealthCheckupUserSelection healthCheckupUserSelection){
|
||||
Cnd cndSelection = Cnd.NEW();
|
||||
cndSelection.and("selectUserId","=",healthCheckupUserSelection.getSelectUserId());
|
||||
cndSelection.where().andNotIsNull("selectTime");
|
||||
cndSelection.desc("selectTime");
|
||||
cndSelection.and("projectId","=",healthCheckupUserSelection.getProjectId());
|
||||
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();
|
||||
if(CollectionUtil.isNotEmpty(checkupUserSelections)){
|
||||
Date selectTime = checkupUserSelections.get(0).getSelectTime();
|
||||
if(ObjectUtil.isNotEmpty(selectTime)){
|
||||
Calendar instance = Calendar.getInstance();
|
||||
instance.setTime(selectTime);
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
LocalDate start = LocalDate.of(year - 1, 1, 1);
|
||||
LocalDate end = LocalDate.of(year - 1, 12, 31);
|
||||
Cnd lastYearCndSelection = Cnd.NEW();
|
||||
lastYearCndSelection.and("selectUserId","=",healthCheckupUserSelection.getSelectUserId());
|
||||
lastYearCndSelection.and("selectTime", ">=", start.toString()).and("selectTime", "<=", end.toString());
|
||||
lastYearCndSelection.where().andNotIsNull("selectTime");
|
||||
lastYearCndSelection.desc("selectTime");
|
||||
List<HealthCheckupUserSelection> 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;
|
||||
|
||||
+5
-8
@@ -213,13 +213,13 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl<HealthChecku
|
||||
u.username AS userName,
|
||||
u.sex,
|
||||
u.birthday,
|
||||
u.personType,
|
||||
hcu.personType,
|
||||
u.unitName,
|
||||
u.unitCode,
|
||||
u.marriage,
|
||||
u.unionName,
|
||||
u.idCard,
|
||||
u.mobile,
|
||||
hcu.marriage,
|
||||
hcu.unionName,
|
||||
hcu.phone as mobile,
|
||||
hcu.card as idCard,
|
||||
hcps.optionName subjectName,
|
||||
hcc.campusName,
|
||||
hcpsm.money,
|
||||
@@ -235,9 +235,6 @@ public class HealthCheckupSingleServiceImpl extends BaseServiceImpl<HealthChecku
|
||||
AND hcus.selectUserId = u.id
|
||||
) optionName,
|
||||
concat(u.address,',',u.linkMan,',',u.contactNumber) receiveAddress,
|
||||
u.unionName,
|
||||
u.mobile,
|
||||
u.personType,
|
||||
hcp.name projectName
|
||||
FROM
|
||||
`health_checkup_user_selection` hcus
|
||||
|
||||
+3
@@ -22,6 +22,9 @@ public class HealthCheckupImportTemp extends ExcelImportError {
|
||||
@ExcelProperty("姓名")
|
||||
private String userName;
|
||||
|
||||
@ExcelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
@ExcelProperty("体检报告")
|
||||
private String medicalExamination;
|
||||
|
||||
|
||||
+63
-5
@@ -82,6 +82,9 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" size="small" @click="openImportMedicalExaminationReport"
|
||||
v-if="$auth.hasPermissionOr(['healthCheckup.list.import.medicalExamination'])">导入体检报告
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="exportData"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','BRANCH_UNION_ADMIN','BRANCH_UNION_CHAIRMAN'])">导出
|
||||
</el-button>
|
||||
<el-button :disabled="!pageForm.projectId" type="primary" size="small"
|
||||
@click="doAudit(true)">确认名单
|
||||
</el-button>
|
||||
@@ -133,11 +136,16 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="160px"
|
||||
label="操作" width="250px"
|
||||
fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openEditRemarks(row)" size="mini"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','BRANCH_UNION_ADMIN','BRANCH_UNION_CHAIRMAN'])"
|
||||
type="primary">
|
||||
编辑备注
|
||||
</el-button>
|
||||
<el-button @click="openEditHealthCheckup(row)" size="mini"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN'])"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','HEALTH_ADMIN'])"
|
||||
type="primary">
|
||||
编辑
|
||||
</el-button>
|
||||
@@ -192,6 +200,19 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog title="修改备注" :visible.sync="doEditRemarksDialog" width="50%"
|
||||
:close-on-click-modal="false">
|
||||
<el-form label-width="120px" ref="editRemarksForm" :model="doEditRemarks">
|
||||
<el-form-item label="备注" prop="bz">
|
||||
<el-input v-model="doEditRemarks.remarks" type="textarea" rows="5"
|
||||
placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="doEditRemarksDialog=false" type="primary" plain>取消</el-button>
|
||||
<el-button @click="doEditRemarksFun" type="primary" v-loading="loading">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<excel-import
|
||||
@@ -250,7 +271,12 @@ layout("/layouts/platform.html"){
|
||||
//导入名单
|
||||
importVisible: false,
|
||||
importVisibleExaminationReport: false,
|
||||
|
||||
doEditRemarksDialog: false,
|
||||
doEditRemarks: {
|
||||
userId: "",
|
||||
projectId: "",
|
||||
remarks: "",
|
||||
},
|
||||
campusOptions: [],
|
||||
}
|
||||
},
|
||||
@@ -419,6 +445,40 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
}
|
||||
},
|
||||
openEditRemarks(row){
|
||||
this.doEditRemarks.userId = row.id;
|
||||
this.doEditRemarks.projectId = this.pageForm.projectId;
|
||||
this.doEditRemarksDialog = true;
|
||||
},
|
||||
async doEditRemarksFun(){
|
||||
this.$refs['editRemarksForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEditRemarks", this.doEditRemarks)
|
||||
this.doEditRemarksDialog=false
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
async exportData(){
|
||||
const {year, searchKeyword, projectId, subjectId, unionId, unitId, physicalExaminationStatus, pageOrderName, pageOrderBy} = this.pageForm
|
||||
window.open(loc() + '/exportHealthUser?year=' + year +
|
||||
'&projectId=' + projectId +
|
||||
'&unionId=' + (unionId ? unionId : '') +
|
||||
'&searchKeyword=' + (searchKeyword ? searchKeyword : '') +
|
||||
'&subjectId=' + (subjectId ? subjectId : '') +
|
||||
'&unitId=' + (unitId ? unitId : '') +
|
||||
'&physicalExaminationStatus=' + (physicalExaminationStatus ? physicalExaminationStatus : '') +
|
||||
'&pageOrderName=' + (pageOrderName ? pageOrderName : '') +
|
||||
'&pageOrderBy=' + (pageOrderBy ? pageOrderBy : '')
|
||||
)
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
@@ -426,8 +486,6 @@ layout("/layouts/platform.html"){
|
||||
await this.yearChange()
|
||||
this.pageData()
|
||||
await this.queryCampus()
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+4
-1
@@ -236,7 +236,10 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-row>
|
||||
<span style="color: red; padding-left: 52px;">温馨提示:系统默认选择去年的体检项目,新入职教职工选用本年校医院套餐</span>
|
||||
</el-row>
|
||||
<el-row justify="end" type="flex" style="margin-top: 15px">
|
||||
<el-button @click="selectLastYearProject=false">取消</el-button>
|
||||
<el-button @click="selectOptionByLastYear" type="primary" :loading="loading">提交</el-button>
|
||||
</el-row>
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</el-card>
|
||||
<el-dialog title="费用报销须知" :visible.sync="noticeDialogVisible" v-model="noticeDialogVisible">
|
||||
<div style="max-height: 50vh; overflow-y: auto; white-space: pre-line">
|
||||
<div style="max-height: 50vh; overflow-y: auto; white-space: pre-line; ">
|
||||
{{friendlyReminderText}}
|
||||
</div>
|
||||
<div slot="footer">
|
||||
|
||||
@@ -77,7 +77,7 @@ const applyForm = {
|
||||
this.$set(this.formData, 'activityId', row.activityId)
|
||||
this.$set(this.formData, 'courseId', row.id)
|
||||
|
||||
this.dynamicColumnsData = courseType ? courseType.trainMobileSignColumnList : []
|
||||
this.dynamicColumnsData = courseType ? courseType.smartBenefitsMobileSignColumnList : []
|
||||
this.dynamicColumnsData.forEach((item) => {
|
||||
item.columnValue = this.$store.state.user[item.columnCode] || ""
|
||||
})
|
||||
|
||||
@@ -62,6 +62,12 @@ layout("/layouts/platform_h5.html"){
|
||||
<span>去报名</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="action-btn" @click="look(row)">
|
||||
<van-icon name="eye-o" />
|
||||
<span>查看</span>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
@@ -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()
|
||||
|
||||
+4
-4
@@ -19,7 +19,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="报名详情" placeholder
|
||||
fixed></van-nav-bar>
|
||||
<div style="padding: 15px 20px">
|
||||
<van-button round type="primary" size="large" color="#0db776" class="buttonClass" @click="userMessage"><van-icon name="user-o" size="27px"/> 基础信息确认</van-button>
|
||||
<van-button round type="primary" size="large" color="#0db776" class="buttonClass" @click="userMessage"><van-icon name="user-o" size="27px"/> 基础信息查询</van-button>
|
||||
<van-button round type="primary" size="large" color="#2cabdd" class="buttonClass" @click="selectPhysicalExaminationHospital"><van-icon name="records-o" size="27px"/> 选择体检医院</van-button>
|
||||
<van-button round type="primary" size="large" color="#eca807" class="buttonClass" @click="minePhysicalExaminationHospital"><van-icon name="idcard" size="27px"/> 我的体检医院</van-button>
|
||||
</div>
|
||||
@@ -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);
|
||||
|
||||
+3
-5
@@ -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() {
|
||||
|
||||
+30
-12
@@ -33,18 +33,36 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-cell title="出生年月">{{$moment(formData.birthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="单位">{{formData.unitName}}</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="本年度预约体检医院">
|
||||
<van-cell title="本年度预约体检医院">{{getSelectedOptionName}}</van-cell>
|
||||
<van-field
|
||||
input-align="right"
|
||||
readonly
|
||||
required
|
||||
label="所选医院额度"
|
||||
name="marriage"
|
||||
placeholder="请选择医院"
|
||||
v-model="formData.money"
|
||||
:rules="[{ required: true, message: '请选择医院' }]"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="本年度预约体检医院">
|
||||
<div class="van-card-body">
|
||||
<van-radio-group v-model="formData.subjectId" class="basic" disabled >
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(item,index) in project.healthCheckupProjectSubjects"
|
||||
:key="item.id"
|
||||
:title="(index + 1) + '、' +item.optionName">
|
||||
<template #label>
|
||||
<div style="display: flex; justify-content: space-between; margin-left: 8px">
|
||||
<div @click.stop="viewDesc(item)" style="color: #0e78c5; padding-left: 15px">查看说明</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-radio :name="item.id" ></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
<van-field
|
||||
input-align="right"
|
||||
readonly
|
||||
required
|
||||
label="所选医院额度"
|
||||
name="marriage"
|
||||
placeholder="请选择医院"
|
||||
v-model="formData.money"
|
||||
:rules="[{ required: true, message: '请选择医院' }]"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="上年度预约体检医院">
|
||||
<div class="van-card-body">
|
||||
<van-cell title="上年度体检医院" :value="formData.lastYearHospital" />
|
||||
|
||||
+7
-5
@@ -20,7 +20,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<van-cell title="性别">
|
||||
<template #right-icon>
|
||||
<van-radio-group v-model="formData.sex" direction="horizontal">
|
||||
<van-radio-group v-model="formData.sex" direction="horizontal" disabled >
|
||||
<van-radio name="男">男</van-radio>
|
||||
<van-radio name="女">女</van-radio>
|
||||
</van-radio-group>
|
||||
@@ -31,6 +31,7 @@ layout("/layouts/platform_h5.html"){
|
||||
input-align="right"
|
||||
label="手机号码"
|
||||
name="phone"
|
||||
readonly
|
||||
required
|
||||
v-model="formData.phone"
|
||||
:rules="[{ required: false, message: '手机号码',trigger: ['blur', 'change'] },{ pattern: /^1[3456789]\d{9}$/, message: '输入正确的手机号码'}]">
|
||||
@@ -39,6 +40,7 @@ layout("/layouts/platform_h5.html"){
|
||||
input-align="right"
|
||||
label="身份证号"
|
||||
name="card"
|
||||
readonly
|
||||
required
|
||||
placeholder="请联系输入身份证号"
|
||||
v-model="formData.card"
|
||||
@@ -47,7 +49,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-cell title="人员类型">{{formData.personType}}</van-cell>
|
||||
<van-cell title="婚姻状态">
|
||||
<template #right-icon>
|
||||
<van-radio-group v-model="formData.marriage" direction="horizontal">
|
||||
<van-radio-group v-model="formData.marriage" direction="horizontal" disabled >
|
||||
<van-radio name="已婚">已婚</van-radio>
|
||||
<van-radio name="未婚">未婚</van-radio>
|
||||
</van-radio-group>
|
||||
@@ -56,10 +58,10 @@ layout("/layouts/platform_h5.html"){
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="primary"
|
||||
class="buttonClass"
|
||||
<van-button class="buttonClass"
|
||||
@click-left="historyBack"
|
||||
block
|
||||
native-type="submit">提交&修改</van-button>
|
||||
native-type="submit">返回</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user