# Conflicts:
#	src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/medical/param/MedicalPageForm.java
This commit is contained in:
2026-01-24 17:44:36 +08:00
14 changed files with 2210 additions and 998 deletions
@@ -86,6 +86,7 @@ public class ClubEvaluateApplyController {
Dict args = Dict.create(); Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode()); args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, evaluate); args.set(FlowConst.FORM_DATA, evaluate);
args.set("clubId", evaluate.getClubId());
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHPY", evaluate.getId(), SecurityUtil.getUserId(), args); ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHPY", evaluate.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务 // 自动完成第一个申请任务
@@ -106,6 +107,7 @@ public class ClubEvaluateApplyController {
Dict dict = Dict.create(); Dict dict = Dict.create();
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId); dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode()); dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
dict.set("clubId", clubEvaluate.getClubId());
flowCommonService.executeTask(dict); flowCommonService.executeTask(dict);
return Result.success(); return Result.success();
} }
@@ -38,15 +38,9 @@ import java.util.Map;
@At("/platform/club/evaluate/clubAudit") @At("/platform/club/evaluate/clubAudit")
public class ClubEvaluateClubAuditController { public class ClubEvaluateClubAuditController {
@Inject
private CommonService commonService;
@Inject @Inject
private SysClubEvaluateService sysClubEvaluateService; private SysClubEvaluateService sysClubEvaluateService;
@Inject
private BpmService bpmService;
@At("") @At("")
@Ok("beetl:/platform/zhgh/club/evaluate/clubAudit/index.html") @Ok("beetl:/platform/zhgh/club/evaluate/clubAudit/index.html")
@SaCheckPermission("club.evaluate.clubAudit") @SaCheckPermission("club.evaluate.clubAudit")
@@ -59,30 +53,4 @@ public class ClubEvaluateClubAuditController {
Pagination<ClubEvaluatePageVo> pagination = sysClubEvaluateService.clubAuditPageData(pageForm); Pagination<ClubEvaluatePageVo> pagination = sysClubEvaluateService.clubAuditPageData(pageForm);
return Result.success(pagination); return Result.success(pagination);
} }
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.evaluate.clubAudit")
@SLog(tag = "协会管理系统-协会评优", msg = "会长审核评优申请")
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
approvalParam.getBpmTaskApprovalTypeEnum();
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
List<String> assignments = new ArrayList<>();
if(approvalParam.getBpmTaskApprovalTypeEnum().equals(BpmTaskApprovalTypeEnum.PASS)){
List<String> schoolUnionApprovalLoginName = commonService.findUsersLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_CLUB_ADMIN, Cnd.NEW());
assignments.addAll(schoolUnionApprovalLoginName);
}
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, assignments);
return Result.success();
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.evaluate.clubAudit")
@SLog(tag = "协会管理系统-协会评优", msg = "会长撤回评优申请")
public Result revoke(@Valid String taskId) {
bpmService.revokeTask(taskId);
return Result.success();
}
} }
@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict; import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.annotation.SLog;
@@ -21,6 +22,7 @@ import com.budwk.app.zhgh.club.model.SysClub;
import com.budwk.app.zhgh.club.model.SysClubExamineRegister; import com.budwk.app.zhgh.club.model.SysClubExamineRegister;
import com.budwk.app.zhgh.club.service.SysClubExamineService; import com.budwk.app.zhgh.club.service.SysClubExamineService;
import com.budwk.app.zhgh.club.service.SysClubService; import com.budwk.app.zhgh.club.service.SysClubService;
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.club.model.OutlayManageClub;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd; import org.nutz.dao.Cnd;
@@ -67,14 +69,14 @@ public class ClubExamineApplyController {
@At @At
@SaCheckLogin @SaCheckLogin
public Result getCount(String id, Integer year) { public Result getCount(String id, Integer year, String clubId) {
if(StrUtil.isBlank(id)) { if(StrUtil.isBlank(clubId)) {
return Result.error("协会信息为空,请核查"); return Result.error("协会信息为空,请核查");
} }
if(year == null) { if(year == null) {
return Result.error("年份信息为空,请核查"); return Result.error("年份信息为空,请核查");
} }
List<SysClubExamineRegister> list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", id).and("year(registerDate)", "=", year)); List<SysClubExamineRegister> list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId).and("year(registerDate)", "=", year).andEX("id", "!=", id));
List<ProcessInstance> instanceList = dao.query( List<ProcessInstance> instanceList = dao.query(
ProcessInstance.class, ProcessInstance.class,
Cnd.where(ProcessInstance::getBusinessNo, "in", list.stream().map(SysClubExamineRegister::getId).toList()) Cnd.where(ProcessInstance::getBusinessNo, "in", list.stream().map(SysClubExamineRegister::getId).toList())
@@ -92,11 +94,11 @@ public class ClubExamineApplyController {
@At @At
@SaCheckLogin @SaCheckLogin
public Result getClubUserNum(String clubId) { public Result getClubUserNum(String clubId, Integer year) {
if(StrUtil.isBlank(clubId)) { if(StrUtil.isBlank(clubId)) {
return Result.error("协会信息为空,请核查"); return Result.error("协会信息为空,请核查");
} }
List<NutMap> result = sysClubExamineService.getClubUserNum(clubId); List<NutMap> result = sysClubExamineService.getClubUserNum(clubId, year);
return Result.success(result); return Result.success(result);
} }
@@ -124,15 +126,20 @@ public class ClubExamineApplyController {
@At @At
@SaCheckLogin @SaCheckLogin
public Result getXghBkMoney(@Valid String clubId) { public Result getXghBkMoney(@Valid String clubId, Integer year) {
/*jf_club club = dao().fetch(jf_club.class, Cnd.where("club_id", "=", id)); OutlayManageClub club = dao.fetch(
Double total_quota = Double.valueOf(club.getTotal_quota());*/ OutlayManageClub.class,
return Result.success(0); Cnd.where("clubId", "=", clubId)
.and("year", "=", year)
.desc("year")
);
Number number = ObjectUtil.defaultIfNull(club.getTotalQuota(), 0);
return Result.success(number.floatValue());
} }
@At @At
@SaCheckLogin @SaCheckLogin
public Result getLasYearSurplus(String clubId) { public Result getLastYearSurplus(String clubId) {
if(StrUtil.isBlank(clubId)) { if(StrUtil.isBlank(clubId)) {
return Result.error("协会信息为空,请核查"); return Result.error("协会信息为空,请核查");
} }
@@ -190,6 +197,7 @@ public class ClubExamineApplyController {
Dict args = Dict.create(); Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode()); args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, reg); args.set(FlowConst.FORM_DATA, reg);
args.set("clubId", reg.getClubId());
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHNS", reg.getId(), SecurityUtil.getUserId(), args); ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHNS", reg.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务 // 自动完成第一个申请任务
@@ -218,7 +226,18 @@ public class ClubExamineApplyController {
Dict dict = Dict.create(); Dict dict = Dict.create();
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId); dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode()); dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
dict.set("clubId", examineRegister.getClubId());
flowCommonService.executeTask(dict); flowCommonService.executeTask(dict);
return Result.success(); return Result.success();
} }
@At
@ApiOperation("获取上一年度的数据")
@SaCheckPermission("club.examine.apply")
public Result getLastData(String clubId, Integer year) {
if (year == null) {
year = DateUtil.thisYear();
}
return Result.success();
}
} }
@@ -53,30 +53,4 @@ public class ClubExamineClubAuditController {
Pagination<ClubExaminePageVo> pagination = sysClubExamineService.clubAuditPageData(pageForm); Pagination<ClubExaminePageVo> pagination = sysClubExamineService.clubAuditPageData(pageForm);
return Result.success(pagination); return Result.success(pagination);
} }
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.examine.clubAudit")
@SLog(tag = "协会管理系统-协会年审", msg = "会长审核年度考核")
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
approvalParam.getBpmTaskApprovalTypeEnum();
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
List<String> assignments = new ArrayList<>();
if(approvalParam.getBpmTaskApprovalTypeEnum().equals(BpmTaskApprovalTypeEnum.PASS)){
List<String> schoolUnionApprovalLoginName = commonService.findUsersLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_CLUB_ADMIN, Cnd.NEW());
assignments.addAll(schoolUnionApprovalLoginName);
}
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, assignments);
return Result.success();
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.examine.clubAudit")
@SLog(tag = "协会管理系统-协会年审", msg = "会长撤回年度考核")
public Result revoke(@Valid String taskId) {
bpmService.revokeTask(taskId);
return Result.success();
}
} }
@@ -13,7 +13,7 @@ import java.util.List;
public interface SysClubExamineService extends BaseService<SysClubExamineRegister> { public interface SysClubExamineService extends BaseService<SysClubExamineRegister> {
List<NutMap> getClubUserNum(@Valid String clubId); List<NutMap> getClubUserNum(@Valid String clubId, Integer year);
List<NutMap> getJgUser(@Valid String clubId); List<NutMap> getJgUser(@Valid String clubId);
@@ -83,10 +83,8 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl<SysClubEvaluate>
@Override @Override
public Pagination<ClubEvaluatePageVo> clubAuditPageData(ClubUserPageForm pageForm) { public Pagination<ClubEvaluatePageVo> clubAuditPageData(ClubUserPageForm pageForm) {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.and("nd.nodeCode","=",20); cnd.and("t.taskName", "=", "ec81591d-da91-412a-90c9-df853dcef478");
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) { cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.and("ce.userId", "=", SecurityUtil.getUserId());
}
Sql sql = generateSql(pageForm, cnd); Sql sql = generateSql(pageForm, cnd);
return listPageVO(pageForm, sql, ClubEvaluatePageVo.class); return listPageVO(pageForm, sql, ClubEvaluatePageVo.class);
} }
@@ -3,13 +3,11 @@ package com.budwk.app.zhgh.club.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.budwk.app.base.constant.BpmProcessConstant;
import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination; import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.service.impl.BaseServiceImpl; import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.base.utils.PageUtil; import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum; import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
import com.budwk.app.bpm.service.BpmService;
import com.budwk.app.flow.enums.ProcessTaskStateEnum; import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.sys.services.SysDictService; import com.budwk.app.sys.services.SysDictService;
import com.budwk.app.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.AuthUtil;
@@ -29,70 +27,154 @@ import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json; import org.nutz.json.Json;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@IocBean(args = {"refer:dao"}) @IocBean(args = {"refer:dao"})
public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineRegister> implements SysClubExamineService { public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineRegister> implements SysClubExamineService {
@Inject @Inject
private SysDictService sysDictService; private SysDictService sysDictService;
@Inject @Inject
private SysClubService sysClubService; private SysClubService sysClubService;
@Inject
private BpmService bpmService;
public SysClubExamineServiceImpl(Dao dao) { public SysClubExamineServiceImpl(Dao dao) {
super(dao); super(dao);
} }
@Override @Override
public List<NutMap> getClubUserNum(String clubId) { public List<NutMap> getClubUserNum(String clubId, Integer year) {
// List<Sys_dict> userType = sysDictService.getSubListByCode("USER_STATE"); // 定义统计的用户状态类型
// List<Sys_dict> userStateList = userType.stream() List<String> userStateList = List.of("在职", "退休");
// .filter(v -> v.getName().equals("在职") || v.getName().equals("在岗") || v.getName().equals("退休")) List<NutMap> result = new ArrayList<>();
// .toList();
// // 查询上一年度考核登记数据(用于获取年初人数)
// Sql sql = Sqls.create(""" SysClubExamineRegister examineRegister = dao().fetch(SysClubExamineRegister.class,
// SELECT Cnd.where("year", "=", year - 1).and("clubId", "=", clubId));
// cu.*,
// u.userState // 构建协会用户申请记录查询SQL(关联用户信息、流程实例)
// FROM Sql sql = Sqls.create("""
// club_user cu SELECT
// LEFT JOIN sys_user u ON cu.userId = u.id cu.*,
// where cu.clubId = @clubId year(cu.applyDate) as applyYear,
// """).setParam("clubId", clubId); u.userState,
// List<NutMap> userList = listMap(sql); u.retireDate
// List<NutMap> result = new ArrayList<>(); FROM
// userStateList.forEach(v -> { club_user_apply cu
// List<NutMap> personTypeUser = userList.stream().filter(u -> StrUtil.isNotBlank(u.getString("userState")) && u.getString("userState").equals(v.getName())).toList(); LEFT JOIN sys_user u ON cu.userId = u.id
// NutMap nutMap = new NutMap(); LEFT JOIN wf_process_instance ins ON ins.businessNo = cu.id
// nutMap.addv("userState", v.getName()); $condition
// //获取今年年初人数 """);
// int yearFirst = personTypeUser.stream().filter(u -> !u.getString("joinTime").substring(0, 4).equals(DateUtil.thisYear() + "") && StrUtil.isBlank(u.getString("changeTime"))).toList().size(); Cnd cnd = Cnd.NEW();
// nutMap.addv("yearFirstNum", yearFirst); cnd.and("cu.clubId", "=", clubId);
// cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
// //获取今年人数 cnd.groupBy("cu.clubId, cu.userId, cu.mode");
// int thisYear = personTypeUser.stream().filter(u -> u.getString("joinTime").substring(0, 4).equals(DateUtil.thisYear() + "")).toList().size(); sql.setCondition(cnd);
// nutMap.addv("yearAddNum", thisYear); List<NutMap> userList = listMap(sql);
// //获取今年比去年减少了多少个人
// int yearEditNum = personTypeUser.stream().filter(u -> StrUtil.isNotBlank(u.getString("changeTime")) && u.getString("changeTime").substring(0, 4).equals(DateUtil.thisYear() + "") && !u.getBoolean("isNormal")).toList().size(); // 遍历在职/退休状态,分别统计人员变动数据
// nutMap.addv("yearEditNum", yearEditNum); for (String userState : userStateList) {
// NutMap nutMap = new NutMap();
// //总人数 nutMap.addv("userState", userState);
// int thisYearNum = personTypeUser.stream().filter(u -> StrUtil.isBlank(u.getString("changeTime"))).toList().size();
// nutMap.addv("thisYearNum", thisYearNum); // 根据用户状态匹配对应的人员类型集合
// result.add(nutMap); List<String> personTypeList = switch (userState) {
// }); case "在职" -> List.of("在职", "在岗");
// return result; case "退休" -> List.of("退休", "退休【变号】");
return null; default -> new ArrayList<>();
};
// 过滤出符合当前人员类型的用户(非空判断避免NPE)
List<NutMap> personTypeUsers = userList.stream()
.filter(u -> StrUtil.isNotBlank(u.getString("userState"))
&& personTypeList.contains(u.getString("userState")))
.collect(Collectors.toList());
// 初始化年末人数为0
int thisYearNum = 0;
if (!Lang.isEmpty(personTypeUsers)) {
// 统计年末人数:加入协会且无退出记录的用户数量
List<String> exitUserIds = personTypeUsers.stream()
.filter(u -> u.getInt("mode") == 0)
.map(u -> u.getString("userId"))
.toList();
thisYearNum = (int) personTypeUsers.stream()
.filter(u -> u.getInt("mode") == 1)
.filter(u -> !exitUserIds.contains(u.getString("userId")))
.count();
}
// 统计今年退休人数:已入会且退休日期在本年度的用户
int retireCount = (int) personTypeUsers.stream()
.filter(u -> u.getTime("retireDate") != null
&& u.getInt("mode") == 1
&& DateUtil.year(u.getTime("retireDate")) == year)
.count();
// 封装年初人数:从上一年度登记数据中获取,无数据则为0
if (Lang.isNotEmpty(examineRegister) && Lang.isNotEmpty(examineRegister.getChangeUserNum())) {
JSONObject uState = examineRegister.getChangeUserNum().stream()
.filter(c -> c.getStr("userState").equals(userState))
.findFirst()
.orElse(null);
nutMap.addv("yearFirstNum", Lang.isEmpty(uState) ? 0 : uState.getInt("thisYearNum"));
} else {
nutMap.addv("yearFirstNum", 0);
}
// 统计年度增加相关数据
int joinThisYear = (int) personTypeUsers.stream()
.filter(u -> u.getInt("mode") == 1 && u.getInt("applyYear") == year)
.count();
int thisYearJoinAndRetire = (int) userList.stream()
.filter(u -> u.getInt("mode") == 1 && u.getInt("applyYear") == year
&& u.getTime("retireDate") != null
&& DateUtil.year(u.getTime("retireDate")) == year)
.count();
int beforeYearJoinAndRetire = (int) userList.stream()
.filter(u -> u.getInt("mode") == 1 && u.getInt("applyYear") == year
&& u.getTime("retireDate") != null
&& DateUtil.year(u.getTime("retireDate")) < year)
.count();
// 按用户状态封装年度增加人数
nutMap.addv("yearAddNum", "在职".equals(userState)
? joinThisYear + thisYearJoinAndRetire
: beforeYearJoinAndRetire + retireCount);
// 统计年度减少相关数据
int quitThisYear = (int) personTypeUsers.stream()
.filter(u -> u.getInt("mode") == 0 && u.getInt("applyYear") == year)
.count();
// 在职人员年度减少:退休人数+主动退出人数;退休人员仅统计主动退出
if ("在职".equals(userState)) {
int retireThisYear = (int) userList.stream()
.filter(u -> u.getTime("retireDate") != null
&& DateUtil.year(u.getTime("retireDate")) == year)
.count();
nutMap.addv("yearReduceNum", retireThisYear + quitThisYear);
} else {
nutMap.addv("yearReduceNum", quitThisYear);
}
// 封装年末人数
nutMap.addv("thisYearNum", thisYearNum);
result.add(nutMap);
}
return result;
} }
@Override @Override
public List<NutMap> getJgUser(String clubId) { public List<NutMap> getJgUser(String clubId) {
// 构建协会管理人员查询SQL(排除普通成员,按职务排序)
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
cl.*, cl.*,
@@ -116,9 +198,14 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
ELSE 99 ELSE 99
END END
""").setParam("clubId", clubId); """).setParam("clubId", clubId);
// 执行查询并处理角色编码转换
List<NutMap> listMap = listMap(sql); List<NutMap> listMap = listMap(sql);
for (NutMap nutMap : listMap) { for (NutMap nutMap : listMap) {
List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode")); String roleCodeStr = nutMap.getString("roleCode");
List<String> list = StrUtil.isBlank(roleCodeStr)
? new ArrayList<>()
: Json.fromJsonAsList(String.class, roleCodeStr);
String roleName = SysClubUserServiceImpl.convertRoleName(list); String roleName = SysClubUserServiceImpl.convertRoleName(list);
nutMap.put("roleName", roleName); nutMap.put("roleName", roleName);
nutMap.put("roleCode", list); nutMap.put("roleCode", list);
@@ -128,41 +215,67 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
@Override @Override
public SysClubExamineRegister doAdd(SysClubExamineRegister examineRegister, String incomeDetailed, String incomeCensus) { public SysClubExamineRegister doAdd(SysClubExamineRegister examineRegister, String incomeDetailed, String incomeCensus) {
List<SysClubExamineRegisterDetailed> detailedList = Json.fromJsonAsList(SysClubExamineRegisterDetailed.class, incomeDetailed); // JSON转换为实体列表(空值判断避免转换异常)
List<JSONObject> incomeCensusList = Json.fromJsonAsList(JSONObject.class, incomeCensus); List<SysClubExamineRegisterDetailed> detailedList = StrUtil.isNotBlank(incomeDetailed)
? Json.fromJsonAsList(SysClubExamineRegisterDetailed.class, incomeDetailed)
: new ArrayList<>();
List<JSONObject> incomeCensusList = StrUtil.isNotBlank(incomeCensus)
? Json.fromJsonAsList(JSONObject.class, incomeCensus)
: new ArrayList<>();
// 封装新增基础信息
examineRegister.setRegisterDate(DateUtil.now()); examineRegister.setRegisterDate(DateUtil.now());
examineRegister.setUserId(SecurityUtil.getUserId()); examineRegister.setUserId(SecurityUtil.getUserId());
examineRegister.setIncomeCensus(incomeCensusList); examineRegister.setIncomeCensus(incomeCensusList);
// 插入主表并批量插入明细(设置关联ID)
SysClubExamineRegister examineReg = dao().insert(examineRegister); SysClubExamineRegister examineReg = dao().insert(examineRegister);
detailedList.forEach(v -> { detailedList.forEach(v -> v.setRegisterId(examineRegister.getId()));
v.setRegisterId(examineRegister.getId()); if (!Lang.isEmpty(detailedList)) {
});
dao().insert(detailedList); dao().insert(detailedList);
}
return examineReg; return examineReg;
} }
@Override @Override
public SysClubExamineRegister doEdit(SysClubExamineRegister examineRegister, String incomeDetailed, String incomeCensus) { public SysClubExamineRegister doEdit(SysClubExamineRegister examineRegister, String incomeDetailed, String incomeCensus) {
List<SysClubExamineRegisterDetailed> detailedList = Json.fromJsonAsList(SysClubExamineRegisterDetailed.class, incomeDetailed); // JSON转换为实体列表(空值判断避免转换异常)
List<JSONObject> incomeCensusList = Json.fromJsonAsList(JSONObject.class, incomeCensus); List<SysClubExamineRegisterDetailed> detailedList = StrUtil.isNotBlank(incomeDetailed)
? Json.fromJsonAsList(SysClubExamineRegisterDetailed.class, incomeDetailed)
: new ArrayList<>();
List<JSONObject> incomeCensusList = StrUtil.isNotBlank(incomeCensus)
? Json.fromJsonAsList(JSONObject.class, incomeCensus)
: new ArrayList<>();
// 封装编辑信息,更新主表(忽略空值)
examineRegister.setRegisterDate(DateUtil.now()); examineRegister.setRegisterDate(DateUtil.now());
examineRegister.setIncomeCensus(incomeCensusList); examineRegister.setIncomeCensus(incomeCensusList);
updateIgnoreNull(examineRegister); updateIgnoreNull(examineRegister);
// 清空原有明细,插入新明细(设置关联ID)
dao().clear(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", examineRegister.getId())); dao().clear(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", examineRegister.getId()));
detailedList.forEach(v -> { detailedList.forEach(v -> v.setRegisterId(examineRegister.getId()));
v.setRegisterId(examineRegister.getId()); if (!Lang.isEmpty(detailedList)) {
});
insert(detailedList); insert(detailedList);
}
return examineRegister; return examineRegister;
} }
@Override @Override
public Pagination<ClubExaminePageVo> minePageData(ClubUserPageForm pageForm) { public Pagination<ClubExaminePageVo> minePageData(ClubUserPageForm pageForm) {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
// 非系统管理员,仅查询自己管理的协会(空集合判断避免in查询异常)
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) { if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
List<SysClub> myManageClub = sysClubService.getMyManageClub(); List<SysClub> myManageClub = sysClubService.getMyManageClub();
cnd.and("info.clubId", "in", myManageClub.stream().map(SysClub::getId).toList()); if (!Lang.isEmpty(myManageClub)) {
cnd.and("info.clubId", "in", myManageClub.stream().map(SysClub::getId).collect(Collectors.toList()));
} else {
// 无管理协会,返回空分页结果
return new Pagination<>(pageForm.getPageNumber(), pageForm.getPageSize(), 0, new ArrayList<>());
} }
}
// 构建我的考核登记分页查询SQL
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
info.*, info.*,
@@ -193,10 +306,9 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition $condition
"""); """);
cnd.andEX("YEAR(info.registerDate)", "=", pageForm.getYear()); // 构建基础分页查询条件
cnd.andEX("sc.id", "=", pageForm.getClubId()); buildPageBaseCondition(cnd, pageForm, "info");
cnd.and("info.userId", "=", SecurityUtil.getUserId()); cnd.and("info.userId", "=", SecurityUtil.getUserId());
cnd.groupBy("info.id"); cnd.groupBy("info.id");
cnd.desc("registerDate"); cnd.desc("registerDate");
sql.setCondition(cnd); sql.setCondition(cnd);
@@ -206,10 +318,8 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
@Override @Override
public Pagination<ClubExaminePageVo> clubAuditPageData(ClubUserPageForm pageForm) { public Pagination<ClubExaminePageVo> clubAuditPageData(ClubUserPageForm pageForm) {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.and("nd.nodeCode","=",20); cnd.and("t.taskName", "=", "ed4f6e9f-f0ea-4a73-ad57-bfcd8dd4d4bd");
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) { cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.and("scer.userId", "=", SecurityUtil.getUserId());
}
Sql sql = generateSql(pageForm, cnd); Sql sql = generateSql(pageForm, cnd);
return listPageVO(pageForm, sql, ClubExaminePageVo.class); return listPageVO(pageForm, sql, ClubExaminePageVo.class);
} }
@@ -234,6 +344,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
@Override @Override
public ClubExamineVo findOne(String id) { public ClubExamineVo findOne(String id) {
// 构建单条考核登记查询SQL(关联协会、联系人信息)
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
scer.*, scer.*,
@@ -245,13 +356,24 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
LEFT JOIN `vw_user` u ON u.id = sc.concatPerson LEFT JOIN `vw_user` u ON u.id = sc.concatPerson
WHERE scer.id = @id WHERE scer.id = @id
""").setParam("id", id); """).setParam("id", id);
// 查询主表数据并关联明细数据
ClubExamineVo clubExamineVo = fetchVO(sql, ClubExamineVo.class); ClubExamineVo clubExamineVo = fetchVO(sql, ClubExamineVo.class);
List<SysClubExamineRegisterDetailed> detailedList = dao().query(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", id).asc("location")); if (Lang.isNotEmpty(clubExamineVo)) {
List<SysClubExamineRegisterDetailed> detailedList = dao().query(SysClubExamineRegisterDetailed.class,
Cnd.where("registerId", "=", id).asc("location"));
clubExamineVo.setDetailedList(detailedList); clubExamineVo.setDetailedList(detailedList);
}
return clubExamineVo; return clubExamineVo;
} }
/**
* 生成审核分页通用SQL
* @param pageForm 分页查询参数
* @param cnd 自定义查询条件
* @return 构建后的Sql对象
*/
private Sql generateSql(ClubUserPageForm pageForm, Cnd cnd) { private Sql generateSql(ClubUserPageForm pageForm, Cnd cnd) {
// 构建审核通用分页查询SQL
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
info.*, info.*,
@@ -286,15 +408,17 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
LEFT JOIN `vw_user` u ON u.id = club.concatPerson LEFT JOIN `vw_user` u ON u.id = club.concatPerson
$condition $condition
"""); """);
// 构建基础分页查询条件
buildPageBaseCondition(cnd, pageForm, "info");
cnd.andEX("info.clubId", "=", pageForm.getClubId()); // 按审核状态过滤任务(已审核/待审核)
cnd.andEX("YEAR(info.registerDate)", "=", pageForm.getYear());
if (pageForm.getAudit()) { if (pageForm.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else { } else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode()); cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
} }
// 处理排序:无自定义排序则按登记日期降序
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("registerDate"); cnd.desc("registerDate");
} else { } else {
@@ -305,4 +429,19 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
sql.setCondition(cnd); sql.setCondition(cnd);
return sql; return sql;
} }
/**
* 构建分页查询基础条件(年度、协会ID)
* @param cnd 条件对象
* @param pageForm 分页参数
* @param tableAlias 表别名
*/
private void buildPageBaseCondition(Cnd cnd, ClubUserPageForm pageForm, String tableAlias) {
if (pageForm.getYear() != null) {
cnd.andEX("YEAR(" + tableAlias + ".registerDate)", "=", pageForm.getYear());
}
if (StrUtil.isNotBlank(pageForm.getClubId())) {
cnd.andEX(tableAlias + ".clubId", "=", pageForm.getClubId());
}
}
} }
@@ -0,0 +1,241 @@
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.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.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.param.MedicalPageForm;
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.service.MedicalApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.entity.Record;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
* @author : hongqiwei
* @description :医疗互助汇总
* @createDate : 2026/1/24 10:20
*/
@IocBean
@At("/platform/medicalMutualAid/medical/statistics")
@Api("医疗互助汇总")
@Ok("json:full")
@Slf4j
public class MedicalStatisticsController {
@Inject
private MedicalApplyService medicalApplyService;
@Inject
private FlowEngine flowEngine;
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/medical/statistics/index.html")
@SaCheckPermission("medicalMutualAid.medical.statistics")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("medicalMutualAid.medical.statistics")
public Result pageData(MedicalPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
info.*,
type.diseaseName,
type.isMajorDiseases,
us.username,
us.loginname,
us.unitName,
us.unionName,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask') AS startTaskId
FROM
medical_apply info
LEFT JOIN medical_disease_type type ON info.diseaseId = type.id
LEFT JOIN aid_fund_member_pay member ON member.userId = info.userId
LEFT JOIN vw_user us ON us.id = info.userId
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("us.loginname", pageForm.getSearchKeyword());
seg.orLike("us.username", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("year(info.applyTime)", "=", pageForm.getYear());
cnd.andEX("info.diseaseId", "=", pageForm.getDiseaseId());
cnd.andEX("us.unionId", "=", pageForm.getUnionId());
cnd.andEX("us.unitId", "=", pageForm.getUnitId());
cnd.andEX("member.aidFundMemberUserType", "=", pageForm.getAidFundMemberUserType());
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
} else {
cnd.desc("info.applyTime");
}
cnd.and("ins.state", "=", 20);
cnd.groupBy("info.id");
sql.setCondition(cnd);
Pagination<NutMap> pagination = medicalApplyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
List<NutMap> costList = medicalApplyService.getCostList(pagination.getList());
pagination.setList(costList);
return Result.success(pagination);
}
@At
@Ok("void")
@ApiOperation("分页查询")
@SaCheckPermission("medicalMutualAid.medical.statistics")
public void doExport(MedicalPageForm pageForm, Boolean isMajorDiseases, HttpServletResponse response) {
Sql sql = Sqls.create("""
SELECT
info.*,
type.diseaseName,
type.diseaseCode,
type.isMajorDiseases,
us.username,
us.loginname,
us.unitName,
us.unitCode,
us.unionName,
us.unionCode,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(SELECT MAX(id) FROM wf_process_task WHERE processInstanceId = ins.id AND taskName = 'startTask') AS startTaskId
FROM
medical_apply info
LEFT JOIN medical_disease_type type ON info.diseaseId = type.id
LEFT JOIN aid_fund_member_pay member ON member.userId = info.userId
LEFT JOIN vw_user us ON us.id = info.userId
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("us.loginname", pageForm.getSearchKeyword());
seg.orLike("us.username", pageForm.getSearchKeyword());
cnd.and(seg);
}
cnd.andEX("year(info.applyTime)", "=", pageForm.getYear());
cnd.andEX("info.diseaseId", "=", pageForm.getDiseaseId());
cnd.andEX("us.unionId", "=", pageForm.getUnionId());
cnd.andEX("us.unitId", "=", pageForm.getUnitId());
cnd.andEX("member.aidFundMemberUserType", "=", pageForm.getAidFundMemberUserType());
cnd.andEX("type.isMajorDiseases", "=", isMajorDiseases);
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
} else {
cnd.desc("info.applyTime");
}
cnd.and("ins.state", "=", 20);
cnd.groupBy("info.id");
sql.setCondition(cnd);
Pagination<NutMap> pagination = medicalApplyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
List<NutMap> list = medicalApplyService.getCostList(pagination.getList());
for (NutMap map : list) {
boolean isMajor = map.getBoolean("isMajorDiseases");
map.put("isMajorDiseasesDisplay", isMajor ? "" : "");
}
List<ExcelExportEntity> excelExportEntities = new ArrayList<>();
excelExportEntities.add(new ExcelExportEntity("姓名","username",20));
excelExportEntities.add(new ExcelExportEntity("工号","loginname",20));
excelExportEntities.add(new ExcelExportEntity("单位","unitName",20));
excelExportEntities.add(new ExcelExportEntity("单位编码","unitCode",20));
excelExportEntities.add(new ExcelExportEntity("工会","unionName",20));
excelExportEntities.add(new ExcelExportEntity("工会编码","unionCode",20));
excelExportEntities.add(new ExcelExportEntity("疾病名称","diseaseName",20));
excelExportEntities.add(new ExcelExportEntity("疾病编码","diseaseCode",20));
excelExportEntities.add(new ExcelExportEntity("是否重疾","isMajorDiseasesDisplay",20));
excelExportEntities.add(new ExcelExportEntity("申请时间","applyTime",20));
excelExportEntities.add(new ExcelExportEntity("申请次数","applyNum",20));
excelExportEntities.add(new ExcelExportEntity("住院医疗费总额(不含门诊)","hospitalSumMoney$",20));
excelExportEntities.add(new ExcelExportEntity("实际报销总额","reimbursementMoney$",20));
excelExportEntities.add(new ExcelExportEntity("(住院医疗)允许报销范围内个人承担部分金额","singleBearMoney$",20));
excelExportEntities.add(new ExcelExportEntity("(住院医疗)自费部分金额","personExpenseMoney$",20));
excelExportEntities.add(new ExcelExportEntity("重病门诊自费金额","outpatientServiceMoney$",20));
excelExportEntities.add(new ExcelExportEntity("非住院肾衰竭治疗、靶向药金额","bxyMoney$",20));
excelExportEntities.add(new ExcelExportEntity("合计","totalMoney",20));
excelExportEntities.add(new ExcelExportEntity("预测补助金额","forecastSubsidyMoney",20));
excelExportEntities.add(new ExcelExportEntity("补助金额","subsidyMoney",20));
excelExportEntities.add(new ExcelExportEntity("爱心基金","loveSubsidyMoney",20));
String exportYear = String.valueOf(pageForm.getYear());
if (StrUtil.isBlank(exportYear)) {
exportYear = String.valueOf(java.time.Year.now().getValue());
}
String fileName = exportYear + "年补助人员列表.xlsx";
try {
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, excelExportEntities, list);
CommonDownloadUtil.download(fileName, workbook, response);
} catch (Exception e) {
log.error("导出补助人员列表失败", e);
}
}
}
@@ -22,6 +22,7 @@ public class MedicalPageForm extends PageForm {
private Boolean approval; private Boolean approval;
private String unionId; private String unionId;
private String unitId; private String unitId;
private String aidFundMemberUserType;
private Boolean isMajorDiseases; private Boolean isMajorDiseases;
} }
@@ -31,37 +31,33 @@ layout("/layouts/platform.html"){
<el-radio-button :label="false">未审核</el-radio-button> <el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group> </el-radio-group>
</table-tool> </table-tool>
<el-table :data="tableData" :size="tableSize"> <el-table :data="tableData">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column> <el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column> <el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会编码" prop="clubCode" sortable show-overflow-tooltip></el-table-column> <el-table-column label="协会编码" prop="clubCode" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column> <el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip> <el-table-column label="成立时间" prop="foundTime" sortable show-overflow-tooltip>
<template slot-scope="{row}"> <template slot-scope="{row}">
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span> <span>{{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '无' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="年度" prop="applyTime" sortable show-overflow-tooltip> <el-table-column label="年度" prop="applyYear" sortable show-overflow-tooltip>
<template slot-scope="{row}"> <template slot-scope="{row}">
<span>{{ $moment(row.applyTime).format('YYYY') }}</span> <span>{{ $moment(row.applyTime).format('YYYY') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column> <el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column> <el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="300px"> <el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary"> <el-button v-if="row.taskState === 10" @click="onAudit(row)" size="mini" type="primary">审核</el-button>
审核 <el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回</el-button>
</el-button>
<el-button
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
@click="openRevoke(row.processInstanceTaskId)"
size="mini"
type="danger"
>
撤回
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -69,21 +65,26 @@ layout("/layouts/platform.html"){
</el-card> </el-card>
<template #public> <template #public>
<evaluate-info ref="evaluateInfoRef"></evaluate-info> <evaluate-info ref="evaluateInfoRef">
<div v-if="showApprovalForm"> <div v-if="showApprovalForm">
<div class="process-title">{{formData.processInstanceNodeName}}</div> <div class="process-title">
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px"> {{formData.taskName}}
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> </div>
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea> <el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button type="danger" @click="doApproval('BACK')">退回</el-button> <el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button> <el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button type="primary" @click="doApproval('PASS')">同意</el-button> <el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row> </el-row>
</div> </div>
</evaluate-info>
</template> </template>
</guava> </guava>
</div> </div>
@@ -93,6 +94,7 @@ layout("/layouts/platform.html"){
new Vue({ new Vue({
el: "#app", el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
dicts: ["PROCESS_INSTANCE_STATE"],
data() { data() {
return { return {
pageForm: { pageForm: {
@@ -111,42 +113,47 @@ layout("/layouts/platform.html"){
methods: { methods: {
openView(row) { openView(row) {
this.$refs.guava.public(() => { this.$refs.guava.public(() => {
this.$refs.evaluateInfoRef.onOpen(row.id) this.$refs.evaluateInfoRef.onOpen(row)
this.showApprovalForm = false this.showApprovalForm = false
}) })
}, },
openApproval(row) { onAudit(row) {
this.$refs.guava.public(() => { this.$refs.guava.public(() => {
this.$refs.evaluateInfoRef.onOpen(row.id) this.formData = {
this.formData = row.approvalParam processTaskId: row.taskId,
taskName: row.curTaskName
}
this.showApprovalForm = true this.showApprovalForm = true
this.$refs.evaluateInfoRef.onOpen(row)
}) })
}, },
doApproval(approvalType) { handleTaskAction(val) {
this.formData.bpmTaskApprovalType = approvalType this.$confirm("您确定要提交吗?", "提示", {
this.$refs.approvalFormRef.validate((valid) => { confirmButtonText: "确定",
if (valid) { cancelButtonText: "取消",
this.$axios type: "warning"
.post(loc() + "/approval", { }).then(() => {
approval: JSON.stringify(this.formData) this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
}) })
.then((res) => { }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$refs.guava.index() this.$refs.guava.index()
this.$message.success(res.msg) this.$message.success(res.msg)
this.doSearch() this.doSearch()
} }
}) })
}
}) })
}, },
openRevoke(taskId) { onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", { this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "info" type: "info"
}).then(() => { }).then(() => {
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => { this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.doSearch() this.doSearch()
File diff suppressed because it is too large Load Diff
@@ -2,9 +2,7 @@
layout("/layouts/platform.html"){ layout("/layouts/platform.html"){
#--> #-->
<style> <style>
.left-span-label {
margin: 20px 0;
}
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
@@ -18,6 +16,7 @@ layout("/layouts/platform.html"){
style="width: 100%" style="width: 100%"
v-model="pageForm.year" v-model="pageForm.year"
value-format="yyyy" value-format="yyyy"
@change="doSearch"
></el-date-picker> ></el-date-picker>
</search-item> </search-item>
<search-item label="协会名称"> <search-item label="协会名称">
@@ -35,7 +34,7 @@ layout("/layouts/platform.html"){
<el-radio-button :label="false">未审核</el-radio-button> <el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group> </el-radio-group>
</table-tool> </table-tool>
<el-table :data="tableData" :size="tableSize"> <el-table :data="tableData">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column> <el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="年度" prop="year" sortable show-overflow-tooltip></el-table-column> <el-table-column label="年度" prop="year" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column> <el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
@@ -45,21 +44,17 @@ layout("/layouts/platform.html"){
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申请时间" prop="registerDate" sortable show-overflow-tooltip></el-table-column> <el-table-column label="申请时间" prop="registerDate" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column> <el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="300px"> <el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template slot-scope="{row}"> <template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<template v-slot="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary"> <el-button v-if="row.taskState === 10" @click="onAudit(row)" size="mini" type="primary">审核</el-button>
审核 <el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回</el-button>
</el-button>
<el-button
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
@click="openRevoke(row.processInstanceTaskId)"
size="mini"
type="danger"
>
撤回
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -67,21 +62,26 @@ layout("/layouts/platform.html"){
</el-card> </el-card>
<template #public> <template #public>
<examine-info ref="examineInfoRef"></examine-info> <examine-info ref="examineInfoRef">
<div v-if="showApprovalForm"> <div v-if="showApprovalForm">
<div class="process-title">{{formData.processInstanceNodeName}}</div> <div class="process-title">
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px"> {{formData.taskName}}
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> </div>
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea> <el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button type="danger" @click="doApproval('BACK')">退回</el-button> <el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button> <el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button type="primary" @click="doApproval('PASS')">同意</el-button> <el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row> </el-row>
</div> </div>
</examine-info>
</template> </template>
</guava> </guava>
</div> </div>
@@ -109,42 +109,47 @@ layout("/layouts/platform.html"){
methods: { methods: {
openView(row) { openView(row) {
this.$refs.guava.public(() => { this.$refs.guava.public(() => {
this.$refs.examineInfoRef.onOpen(row.id) this.$refs.examineInfoRef.onOpen(row)
this.showApprovalForm = false this.showApprovalForm = false
}) })
}, },
openApproval(row) { onAudit(row) {
this.$refs.guava.public(() => { this.$refs.guava.public(() => {
this.$refs.examineInfoRef.onOpen(row.id) this.formData = {
this.formData = row.approvalParam processTaskId: row.taskId,
taskName: row.curTaskName
}
this.showApprovalForm = true this.showApprovalForm = true
this.$refs.examineInfoRef.onOpen(row)
}) })
}, },
doApproval(approvalType) { handleTaskAction(val) {
this.formData.bpmTaskApprovalType = approvalType this.$confirm("您确定要提交吗?", "提示", {
this.$refs.approvalFormRef.validate((valid) => { confirmButtonText: "确定",
if (valid) { cancelButtonText: "取消",
this.$axios type: "warning"
.post(loc() + "/approval", { }).then(() => {
approval: JSON.stringify(this.formData) this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
}) })
.then((res) => { }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$refs.guava.index() this.$refs.guava.index()
this.$message.success(res.msg) this.$message.success(res.msg)
this.doSearch() this.doSearch()
} }
}) })
}
}) })
}, },
openRevoke(taskId) { onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", { this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "info" type: "info"
}).then(() => { }).then(() => {
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => { this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.doSearch() this.doSearch()
@@ -16,15 +16,15 @@ const EXAMINE_INFO_COMPONENT = {
<file-preview :files="viewData.summaryFiles" complete_result></file-preview> <file-preview :files="viewData.summaryFiles" complete_result></file-preview>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<!-- <div class="process-title">协会成员变化情况</div>--> <div class="process-title">协会成员变化情况</div>
<!-- <el-table :data="viewData.changeUserNum" max-height="300">--> <el-table :data="viewData.changeUserNum" max-height="300">
<!-- <el-table-column label="序号" type="index" width="50"></el-table-column>--> <el-table-column label="序号" type="index" width="50"></el-table-column>
<!-- <el-table-column label="教职工类别" prop="userState"></el-table-column>--> <el-table-column label="教职工类别" prop="userState"></el-table-column>
<!-- <el-table-column label="年初人员" prop="yearFirstNum"></el-table-column>--> <el-table-column label="年初人员" prop="yearFirstNum"></el-table-column>
<!-- <el-table-column label="年度增加" prop="yearAddNum"></el-table-column>--> <el-table-column label="年度增加" prop="yearAddNum"></el-table-column>
<!-- <el-table-column label="年度减少" prop="yearEditNum"></el-table-column>--> <el-table-column label="年度减少" prop="yearReduceNum"></el-table-column>
<!-- <el-table-column label="年末人数" prop="thisYearNum"></el-table-column>--> <el-table-column label="年末人数" prop="thisYearNum"></el-table-column>
<!-- </el-table>--> </el-table>
<slot></slot> <slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart> <snaker-chart ref="snakerChartRef"></snaker-chart>
@@ -43,7 +43,7 @@ const EXAMINE_INFO_COMPONENT = {
<div class="process-title">下一年度活动计划</div> <div class="process-title">下一年度活动计划</div>
<el-table :data="viewData.plans" max-height="300"> <el-table :data="viewData.plans" max-height="300">
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="活动时间" prop="activityTime"></el-table-column> <!--<el-table-column label="活动时间" prop="activityTime"></el-table-column>-->
<el-table-column label="活动主题/赛事名称" prop="activityName" show-overflow-tooltip></el-table-column> <el-table-column label="活动主题/赛事名称" prop="activityName" show-overflow-tooltip></el-table-column>
<el-table-column label="活动/赛事主办单位" prop="activityUnit" show-overflow-tooltip></el-table-column> <el-table-column label="活动/赛事主办单位" prop="activityUnit" show-overflow-tooltip></el-table-column>
<el-table-column label="活动地点" prop="activityAddress" show-overflow-tooltip></el-table-column> <el-table-column label="活动地点" prop="activityAddress" show-overflow-tooltip></el-table-column>
@@ -56,23 +56,22 @@ const EXAMINE_INFO_COMPONENT = {
<el-table-column label="日期" prop="date"></el-table-column> <el-table-column label="日期" prop="date"></el-table-column>
<el-table-column label="项目内容" prop="content"></el-table-column> <el-table-column label="项目内容" prop="content"></el-table-column>
<el-table-column label="收入类型" prop="incomeType"></el-table-column> <el-table-column label="收入类型" prop="incomeType"></el-table-column>
<el-table-column label="金额(元)" prop="money"></el-table-column> <el-table-column label="年初余额" prop="qcMoney"></el-table-column>
<!-- <el-table-column label="年初余额" prop="qcMoney"></el-table-column>--> <el-table-column label="收入" prop="income"></el-table-column>
<!-- <el-table-column label="收入" prop="income"></el-table-column>--> <el-table-column label="支出" prop="expend"></el-table-column>
<!-- <el-table-column label="支出" prop="expend"></el-table-column>--> <el-table-column label="年度结余" prop="qmMoney"></el-table-column>
<!-- <el-table-column label="年度结余" prop="qmMoney"></el-table-column>-->
<el-table-column label="备注" prop="notes"></el-table-column> <el-table-column label="备注" prop="notes"></el-table-column>
</el-table> </el-table>
<!-- <div class="process-title">统计</div>--> <div class="process-title">统计</div>
<!-- <el-table v-if="viewData" :data="viewData.incomeCensus" max-height="300">--> <el-table v-if="viewData" :data="viewData.incomeCensus" max-height="300">
<!-- <el-table-column label="去年年度结余" prop="lasYearSurplus"></el-table-column>--> <el-table-column label="去年年度结余" prop="lastYearSurplus"></el-table-column>
<!-- <el-table-column label="会费收入" prop="income"></el-table-column>--> <el-table-column label="会费收入" prop="income"></el-table-column>
<!-- <el-table-column label="校工会拨款" prop="allocate"></el-table-column>--> <el-table-column label="校工会拨款" prop="allocate"></el-table-column>
<!-- <el-table-column label="社会赞助" prop="support"></el-table-column>--> <el-table-column label="社会赞助" prop="support"></el-table-column>
<!-- <el-table-column label="年度总支出" prop="totalExpend"></el-table-column>--> <el-table-column label="年度总支出" prop="totalExpend"></el-table-column>
<!-- <el-table-column label="年度结余" prop="surplus">--> <el-table-column label="年度结余" prop="surplus">
<!-- </el-table-column>--> </el-table-column>
<!-- </el-table>--> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="4" label="协会成员"> <el-tab-pane name="4" label="协会成员">
<div class="process-title">协会成员</div> <div class="process-title">协会成员</div>
@@ -145,7 +144,8 @@ const EXAMINE_INFO_COMPONENT = {
}, },
async getClubUserNum(clubId) { async getClubUserNum(clubId) {
const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", { const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", {
clubId: clubId clubId: clubId,
year: this.row.year
}) })
this.$set(this.viewData, "changeUserNum", resp.data) this.$set(this.viewData, "changeUserNum", resp.data)
}, },
@@ -0,0 +1,411 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="疾病种类">
<el-select clearable placeholder="请选择疾病种类"
v-model="pageForm.diseaseId" filterable>
<el-option
:key="i.id"
:label="i.diseaseName"
:value="i.id"
v-for="i in diseaseList">
</el-option>
</el-select>
</search-item>
<search-item label="会员类型">
<dict-select v-model="pageForm.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
style="width: 100%"></dict-select>
</search-item>
<search-item label="所属工会">
<el-select v-model="pageForm.unionId" clearable filterable placeholder="请选择院级工会"
@change="getUnitList()">
<el-option v-for="item in unionList" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select v-model="pageForm.unitId" clearable filterable placeholder="请选择单位">
<el-option v-for="item in unitList" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-dropdown @command="doExport">
<el-button type="primary" size="small">导出 <i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{val:true}" key="major">重疾</el-dropdown-item>
<el-dropdown-item :command="{val:false}" key="normal">普通</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%"
:summary-method="getSummaries" :show-summary="showSummary">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:width="column.width"
:fixed="column.fixed"
:sortable="column.sortable"
show-overflow-tooltip
sortable
v-for="column in tableColumns"
>
<template v-if="column.prop==='isMajorDiseases'" v-slot="{row}">
<span :class="[row.isMajorDiseases?'text-danger':'text-info']">
<i class="fa fa-circle ml5"></i>
{{row.isMajorDiseases?'是':'否'}}{{row.applyNum}}
</span>
</template>
<template v-slot="{ row }" v-else-if="column.prop === 'instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
<template v-slot="{ row }" v-else-if="column.prop === 'curTaskName'">
{{row.curTaskName?row.curTaskName:row.taskName}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)"
size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<template #edit>
<medical-info ref="medicalInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="150px" label-suffix=""
>
<el-table :data="costList" border show-summary class="cost">
<el-table-column label="序号" type="index" width="50px" fixed></el-table-column>
<el-table-column label="住院时间段" width="200">
<template v-slot="{row}">
{{row.visitStartTime}}至{{row.visitEndTime}}
</template>
</el-table-column>
<el-table-column label="住院医院" prop="visitHospital" width="250"></el-table-column>
<el-table-column label="住院医疗费总额(不含门诊)" width="180" prop="hospitalSumMoney">
<template v-slot="{row}">
<el-input-number placeholder="住院医疗费总额(不含门诊)"
:min="0"
controls-position="right" style="width: 100%"
@change="tableChangeMoney"
v-model="row.hospitalSumMoney"></el-input-number>
</template>
</el-table-column>
<el-table-column label="实际报销金额" width="180" prop="reimbursementMoney">
<template v-slot="{row}">
<el-input-number placeholder="实际报销金额"
:min="0"
controls-position="right" style="width: 100%"
@change="tableChangeMoney"
v-model="row.reimbursementMoney"></el-input-number>
</template>
</el-table-column>
<el-table-column label="(住院医疗)允许报销范围内个人承担部分金额"
width="180" prop="singleBearMoney">
<template v-slot="{row}">
<el-input-number :min="0" placeholder="个人承担部分金额"
controls-position="right" style="width: 100%"
@change="tableChangeMoney"
v-model="row.singleBearMoney"></el-input-number>
</template>
</el-table-column>
<el-table-column label="(住院医疗)自费部分金额" width="180"
prop="personExpenseMoney"></el-table-column>
<el-table-column label="重病门诊自费金额" width="180" prop="outpatientServiceMoney">
<template v-slot="{row}">
<el-input-number placeholder="门诊费"
:min="0"
:disabled="!formData.tf_isMajorDiseases"
controls-position="right" style="width: 100%"
@change="tableChangeMoney"
v-model="row.outpatientServiceMoney"></el-input-number>
</template>
</el-table-column>
<el-table-column label="非住院肾衰竭治疗、靶向药" width="180" prop="bxyMoney">
<template v-slot="{row}">
<el-input-number placeholder="靶向药"
:min="0"
:disabled="!formData.tf_isMajorDiseases"
controls-position="right" style="width: 100%"
@change="tableChangeMoney"
v-model="row.bxyMoney"></el-input-number>
</template>
</el-table-column>
</el-table>
<div class="mt10">
<el-form-item label="疾病种类" prop="tf_diseaseId"
:rules="[{required:true,message:'请选择疾病种类',trigger:['change','blur']}]">
<el-select placeholder="请选择疾病种类" style="width: 50%"
v-model="formData.tf_diseaseId" filterable @change="diseaseIdChange">
<el-option
:key="i.id"
:label="i.diseaseName"
:value="i.id"
v-for="i in diseaseList">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="预测补助金额(元)" prop="tf_forecastSubsidyMoney">
<span slot="label">
预测补助金额(元)
<el-tooltip class="item" effect="dark"
content="计算公式:((住院医疗)允许报销范围内个人承担部分金额+(住院医疗)自费部分金额+重病门诊自费金额+非住院肾衰竭治疗、靶向药金额)* 补助比例"
placement="top-start">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-input-number v-model="formData.tf_forecastSubsidyMoney"
style="width: 50%"></el-input-number>
<el-button @click="calcMoney(formData.id)" type="primary">重新计算金额</el-button>
</el-form-item>
<el-form-item label="爱心基金(元)" prop="tf_loveSubsidyMoney">
<el-input-number :max="medicalSetting.loveMoney" :min="0" style="width: 50%"
v-model="formData.tf_loveSubsidyMoney"></el-input-number>
</el-form-item>
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</div>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</medical-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include('../common/medicalInfo.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
props: {
showSummary: {
type: Boolean,
default: true
},
localPageForm: {
type: Object,
default: () => ({})
}
},
data() {
return {
tableData: [],
tableColumns: [
{prop: 'loginname', label: '工号', fixed: "left"},
{prop: 'username', label: '姓名', fixed: "left"},
{prop: 'unionName', label: '所属工会', width: "180"},
{prop: 'unitName', label: '所属单位', width: "180"},
{prop: 'diseaseName', label: '疾病种类', width: "180"},
{prop: 'isMajorDiseases', label: '重大疾病(次数)', width: "100"},
{prop: 'applyNum', label: '申请总次数'},
{prop: 'applyTime', label: '申请时间', width: "180"},
{prop: 'hospitalSumMoney$', label: '住院医疗总额(不含门诊)', width: "120"},
{prop: 'reimbursementMoney$', label: '实际报销总额', width: "120"},
{prop: 'singleBearMoney$', label: '(住院医疗)允许报销范围内个人承担部分总额', width: "120"},
{prop: 'personExpenseMoney$', label: '(住院医疗)自费部分总额', width: "120"},
{prop: 'outpatientServiceMoney$', label: '重病门诊自费金额', width: "120"},
{prop: 'bxyMoney$', label: '非住院肾衰竭治疗、靶向药金额', width: "120"},
{prop: 'totalMoney', label: '合计金额', width: "120"},
{prop: 'instanceState', label: '流程状态'},
{prop: 'subsidyMoney', label: '补助金额'},
{prop: 'loveSubsidyMoney', label: '爱心补助金额'},
],
costList: [],
unionList: [],
unitList: [],
diseaseList: [],
showApprovalForm: false,
pageForm: {
approval: false,
year: new Date().getFullYear() + "",
pageSize: 9999,
isMajorDiseases: null
},
medicalSetting: {}
}
},
components: {
"medical-info": MEDICAL_INFO
},
watch: {
"localPageForm": {
handler(val) {
this.pageForm = {...this.pageForm, ...val}
},
deep: true
},
},
methods: {
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/medicalMutualAid/medical/mine/delete", { id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
getSummaries(param) {
const {columns, data} = param
const sums = []
columns.forEach((column, index) => {
const sumColumn = ['hospitalSumMoney$', 'reimbursementMoney$', 'singleBearMoney$', 'personExpenseMoney$', 'subsidyMoney', 'loveSubsidyMoney', 'outpatientServiceMoney$', 'totalMoney']
if (sumColumn.includes(column.property)) {
const values = data.map(i => Number(i[column.property]))
if (values && values.length > 0) {
const everyColumnSum = values.reduce((a, b) => a + b)
sums[index] = isNaN(everyColumnSum) ? 0 : everyColumnSum.toFixed(2)
}
}
})
sums[0] = '合计'
return sums
},
// 修改表格里面的金额并修改数据库里的数据
tableChangeMoney() {
this.costList.forEach(cost => {
const personExpenseMoney = cost.hospitalSumMoney - cost.reimbursementMoney - cost.singleBearMoney
cost.personExpenseMoney = isNaN(personExpenseMoney) ? 0 : personExpenseMoney < 0 ? 0 : personExpenseMoney.toFixed(2)
})
console.log(this.costList)
this.$axios.post("/platform/medicalMutualAid/medical/foundationAudit/updateCost", {
data: JSON.stringify(this.costList)
}).then(res => {
if (res.code === 0) {
}
})
},
// 重新计算预测补助金额
calcMoney() {
},
diseaseIdChange(val) {
const disease = this.diseaseList.find(i => i.id === val)
this.$set(this.formData, "tf_diseaseName", disease.diseaseName)
this.$set(this.formData, "tf_isMajorDiseases", disease.isMajorDiseases)
},
onView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.medicalInfoRef.onOpen(row)
})
},
onAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
const disease = this.diseaseList.find(i => i.id === row.diseaseId)
this.formData = {
id: row.id,
tf_diseaseId: row.diseaseId,
tf_oldDiseaseId: row.diseaseId,
tf_oldDiseaseName: disease.diseaseName,
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.diseaseIdChange(row.diseaseId)
this.$refs.medicalInfoRef.onOpen(row)
})
setTimeout(() => {
this.costList = this.$refs.medicalInfoRef.viewData.costList
}, 500)
},
getDiseaseList() {
this.$axios.post("/platform/medicalMutualAid/medical/apply/getDiseaseList").then(res => {
if (res.code === 0) {
this.diseaseList = res.data;
}
})
},
async getUnitList() {
this.unitList = await this.$businessTool.listUnit(this.pageForm.unionId)
},
getMedicalSetting() {
this.$axios.post("/platform/medicalMutualAid/medical/basicSetting/getSetting").then(res => {
if (res.code === 0) {
this.medicalSetting = res.data
}
})
},
doExport(command) {
const params = {
...this.pageForm,
isMajorDiseases: command.val
};
this.$downLoad('/platform/medicalMutualAid/medical/statistics/doExport', params);
},
},
async created() {
this.pageData()
this.$emit('ready')
this.getMedicalSetting()
this.getDiseaseList()
this.unionList = await this.$businessTool.listUnion()
this.unitList = await this.$businessTool.listUnit()
}
})
</script>
<!--#
}
#-->