体检名单添加“所选套餐”查询

体检统计导出“用户类型”控制导出值
This commit is contained in:
2026-04-08 16:48:48 +08:00
parent 728fc9bcd1
commit f1c3258ee4
5 changed files with 54 additions and 6 deletions
@@ -85,7 +85,7 @@ public class HealthCheckupListController {
@At
@ApiOperation("分页查询")
@SaCheckPermission("healthCheckup.list.mange")
public Result pageData(PageForm pageForm, String projectId,
public Result pageData(PageForm pageForm, String projectId, String subjectId,
String unionId, String unitId,String physicalExaminationStatus) {
List<HealthCheckupUnionConfirm> confirms = dao.query(HealthCheckupUnionConfirm.class, Cnd.where("projectId", "=", projectId));
@@ -118,6 +118,7 @@ public class HealthCheckupListController {
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());
@@ -416,4 +417,14 @@ public class HealthCheckupListController {
return Result.success(excelImportRes);
}
@At
@ApiOperation("套餐选择器查询")
@SaCheckPermission("healthCheckup.list.mange")
public Result listSubjects(String projectId){
return Result.success(
dao.query(HealthCheckupProjectSubject.class,
Cnd.NEW().and("projectId","=",projectId))
);
}
}
@@ -156,6 +156,11 @@ public class HealthCheckupSingleController {
substring = Integer.parseInt(v.getString("idCard").substring(6, 10));
}
v.put("age", thisYear - substring);
if(v.getString("personType").contains("在职教职工")){
v.put("personType", "在职教职工");
} else if(v.getString("personType").contains("校聘高知")){
v.put("personType", "校聘高知保健对象");
}
});
List<NutMap> list2 = list.stream().filter(v -> Strings.isNotBlank(v.getString("unionName"))).collect(Collectors.toList());
@@ -102,9 +102,9 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
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'
where cu.projectId=@projectId2 and cu.confirmStatus!='1'
""");
sql.setParam("projectId", healthCheckupProject.getId());
updateSql.setParam("projectId2", healthCheckupProject.getId());
dao().execute(updateSql);
}
@@ -28,9 +28,17 @@ layout("/layouts/platform.html"){
v-for="item in projectOptions"></el-option>
</el-select>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="所选套餐">
<el-select placeholder="请选择套餐" v-model="pageForm.subjectId"
style="width: 100%;"
clearable
filterable>
<el-option v-for="item in subjects"
:label="item.optionName"
:value="item.id"
:key="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
<el-select placeholder="请选择所属工会" v-model="pageForm.unionId"
style="width: 100%;"
@@ -54,6 +62,9 @@ layout("/layouts/platform.html"){
:key="item.id"></el-option>
</el-select>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
</search>
</el-card>
@@ -215,6 +226,7 @@ layout("/layouts/platform.html"){
physicalExaminationStatus: '2',
},
unions: [],
subjects: [],
units: [],
projectOptions: [],
projectSubjectOptions: [],
@@ -322,6 +334,9 @@ layout("/layouts/platform.html"){
} else {
this.notifyError(resp.msg)
}
this.$set(this.pageForm, "subjectId", "")
await this.listSubjects();
this.doSearch();
},
async queryCampus() {
const resp = await $.get("/platform/healthCheckup/campus/queryCampus")
@@ -339,6 +354,17 @@ layout("/layouts/platform.html"){
this.units = await this.$businessTool.listUnit()
}
},
async listSubjects() {
const resp = await $.get(loc() + "/listSubjects", {
projectId: this.pageForm.projectId,
unionId: this.pageForm.unionId
})
if (resp.code === 0) {
this.subjects = resp.data
} else {
this.notifyError(resp.msg)
}
},
openImport() {
// importUser
@@ -19,6 +19,7 @@ import cn.hutool.json.JSONUtil;
import com.budwk.app.sys.models.*;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubject;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUser;
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
import com.budwk.app.zhgh.welfare.model.WelfareList;
import com.budwk.app.zhgh.welfare.model.WelfareProjectSubjectOption;
@@ -82,7 +83,12 @@ public class WelfareTest {
List<HealthCheckupProjectSubjectMoney> healthCheckupProjectSubjectMoneyList = dao.query(HealthCheckupProjectSubjectMoney.class,
Cnd.where(HealthCheckupProjectSubjectMoney::getProjectId, "=", "ccdc49e3d63b4a8cb89c0af0687bb1bf"));
List<HealthCheckupUser> query = dao.query(HealthCheckupUser.class, Cnd.NEW());
List<PhysicalExamination> physicalExaminationList = ExcelImportUtil.importExcel(new File("C:\\Users\\mayn\\Desktop\\1.xlsx"), PhysicalExamination.class, new ImportParams());
physicalExaminationList = physicalExaminationList.stream()
.filter(e->query.stream().noneMatch(v->e.getLoginName().equals(v.getLoginName())))
.collect(Collectors.toList());
List<HealthCheckupUserSelection> userSelectionList = physicalExaminationList.stream().map(e -> {
NutMap nutMap = nutMaps.stream().filter(v -> e.getLoginName().equals(v.getString("loginname"))).findFirst().orElse(null);
HealthCheckupUserSelection userSelection = new HealthCheckupUserSelection();