commit
This commit is contained in:
@@ -418,4 +418,9 @@ public class Sys_user extends BaseModel implements Serializable {
|
|||||||
@Comment("基金会员加入时间")
|
@Comment("基金会员加入时间")
|
||||||
@ColDefine(type = ColType.DATETIME)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private Date aidFundMemberJoinTime;
|
private Date aidFundMemberJoinTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("基金会员退出时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private Date aidFundMemberQuitTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,4 +210,16 @@ public class View_user {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
private Boolean aidFundMember;
|
private Boolean aidFundMember;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
private String aidFundMemberUserType;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
private String aidFundDeductTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
private Date aidFundMemberJoinTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
private Date aidFundMemberQuitTime;
|
||||||
}
|
}
|
||||||
|
|||||||
+210
@@ -0,0 +1,210 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||||
|
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.ObjectUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
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.sys.models.Sys_user;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberPay;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberPayService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.template.AidFundPayTemp;
|
||||||
|
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.Chain;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.AdaptBy;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.mvc.upload.UploadAdaptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2026/1/20 14:54
|
||||||
|
* @description 缴费记录
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/medicalMutualAid/aidFund/payRecord")
|
||||||
|
@Api("基金会员缴费记录")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
public class AIdFundPayRecordController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AidFundMemberPayService aidFundMemberPayService;
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/payRecord/index.html")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||||
|
public Result pageData(AidFundPageForm pageForm) {
|
||||||
|
Sql sql = aidFundMemberPayService.getSql(pageForm);
|
||||||
|
Pagination pagination = aidFundMemberPayService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("基金会员设置已缴费未缴费")
|
||||||
|
@SLog(tag = "基金会员-基金会员台账", msg = "设置已缴费未缴费")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||||
|
public Result onPayed(String id, Boolean isPayed) {
|
||||||
|
if (ObjectUtil.isEmpty(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
aidFundMemberPayService.update(Chain.make("isPayed", isPayed), Cnd.where("id", "=", id));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("清空基金会员缴费名单")
|
||||||
|
@SLog(tag = "基金会员-基金会员台账", msg = "清空基金会员缴费名单")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||||
|
public Result clearPayRecord(Integer year) {
|
||||||
|
if (ObjectUtil.isEmpty(year)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
aidFundMemberPayService.clear(Cnd.where(AidFundMemberPay::getYear, "=", year));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@ApiOperation("导出缴费名单")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||||
|
public void exportPayRecord(AidFundPageForm pageForm, HttpServletResponse response) {
|
||||||
|
|
||||||
|
Sql sql = aidFundMemberPayService.getSql(pageForm);
|
||||||
|
List<NutMap> listMap = aidFundMemberPayService.listMap(sql);
|
||||||
|
listMap.forEach(map -> {
|
||||||
|
map.put("payedText", map.getBoolean("isPayed") ? "已缴费" : "未缴费");
|
||||||
|
});
|
||||||
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
entityList.add(new ExcelExportEntity("年度", "year", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("性别", "sex", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("基金会员类型", "aidFundMemberUserType", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("缴费金额", "money", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("是否缴费", "payedText", 20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, listMap);
|
||||||
|
CommonDownloadUtil.download(pageForm.getYear() + "会员缴费名单.xlsx", workbook, response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@ApiOperation("下载导入模版")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||||
|
public void downloadImportTemp(HttpServletResponse response) {
|
||||||
|
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
|
exportEntities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, new ArrayList<>());
|
||||||
|
CommonDownloadUtil.download("会员缴费导入模版.xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("导入缴费信息")
|
||||||
|
@SaCheckPermission("member.payment.summary")
|
||||||
|
@SLog(tag = "导入缴费信息", msg = "导入缴费信息")
|
||||||
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
|
public Result doImport(TempFile file, Integer year) {
|
||||||
|
try {
|
||||||
|
if (ObjectUtil.isEmpty(year)){
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
List<AidFundPayTemp> payTempList = ExcelImportUtil.importExcel(file.getFile(), AidFundPayTemp.class, new ImportParams());
|
||||||
|
List<AidFundPayTemp> errorInfos = new ArrayList<>();
|
||||||
|
List<String> needInsertList = new ArrayList<>();
|
||||||
|
List<String> loginNames = payTempList.stream().map(AidFundPayTemp::getLoginname).toList();
|
||||||
|
|
||||||
|
List<Sys_user> sysUserList = aidFundMemberPayService.dao().query(Sys_user.class, Cnd.where(Sys_user::getLoginname, "in", loginNames));
|
||||||
|
List<String> userIds = sysUserList.stream().map(Sys_user::getId).toList();
|
||||||
|
|
||||||
|
List<AidFundMemberPay> payList = aidFundMemberPayService.query(Cnd.where(AidFundMemberPay::getUserId, "in", userIds).and(AidFundMemberPay::getYear, "=", year));
|
||||||
|
|
||||||
|
for (AidFundPayTemp payTemp : payTempList) {
|
||||||
|
String loginname = payTemp.getLoginname().trim();
|
||||||
|
Sys_user sysUser = sysUserList.stream().filter(v -> v.getLoginname().equals(loginname)).findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(sysUser)) {
|
||||||
|
payTemp.setResult("工号不存在");
|
||||||
|
errorInfos.add(payTemp);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
AidFundMemberPay aidFundMemberPay = payList.stream().filter(v -> v.getUserId().equals(sysUser.getId())).findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(aidFundMemberPay)) {
|
||||||
|
payTemp.setResult("未在导入年度找到该用户");
|
||||||
|
errorInfos.add(payTemp);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
needInsertList.add(sysUser.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
if (Lang.isNotEmpty(needInsertList)) {
|
||||||
|
i = aidFundMemberPayService.update(Chain.make("isPayed", true), Cnd.where("userId", "in", needInsertList));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Lang.isNotEmpty(errorInfos)) {
|
||||||
|
NutMap nutMap = NutMap.NEW();
|
||||||
|
nutMap.setv("totalCount", payTempList.size());
|
||||||
|
nutMap.setv("successCount", i);
|
||||||
|
nutMap.setv("errorCount", errorInfos.size());
|
||||||
|
nutMap.setv("errorList", errorInfos.stream().map(v -> {
|
||||||
|
return NutMap.NEW().addv("工号", v.getLoginname()).addv("姓名", v.getUsername()).addv("错误原因", v.getResult());
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
return Result.success(nutMap);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.error();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
|
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.PageUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberChangeRecordService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
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.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2026/1/19 17:55
|
||||||
|
* @description 基金会员变更记录
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/medicalMutualAid/aidFund/changeRecord")
|
||||||
|
@Api("基金会员变更记录")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
public class AidFundChangeRecordController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AidFundMemberChangeRecordService changeRecordService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/changeRecord/index.html")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.changeRecord")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.changeRecord")
|
||||||
|
public Result pageData(AidFundPageForm pageForm) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
us.sex,
|
||||||
|
us.username,
|
||||||
|
us.loginname,
|
||||||
|
us.arrivalAtSchoolDate,
|
||||||
|
us.mobile,
|
||||||
|
us.unitName,
|
||||||
|
us.unionName,
|
||||||
|
us.aidFundMemberUserType,
|
||||||
|
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' AND taskState in (10,20)) AS startTaskId
|
||||||
|
FROM
|
||||||
|
`aid_fund_member_change_record` info
|
||||||
|
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();
|
||||||
|
cnd.andEX("us.aidFundMemberUserType", "=", pageForm.getAidFundMemberUserType());
|
||||||
|
cnd.andEX("us.unitid", "=", pageForm.getUnitId());
|
||||||
|
cnd.andEX("us.unionid", "=", pageForm.getUnionId());
|
||||||
|
cnd.andEX("info.changeType", "=", pageForm.getChangeType());
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear());
|
||||||
|
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
group.or("ins.state","=",20);
|
||||||
|
group.or("ins.state","is",null);
|
||||||
|
cnd.and(group);
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("us.unitCode");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
cnd.groupBy("info.id");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
|
||||||
|
Pagination pagination = changeRecordService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.sys.models.Sys_union;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberChangeRecordService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
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 java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2026/1/21 09:21
|
||||||
|
* @description 变更统计
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/medicalMutualAid/aidFund/changeRecordStatistics")
|
||||||
|
@Api("基金会员会员变更统计")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
public class AidFundChangeRecordStatisticsController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AidFundMemberChangeRecordService changeRecordService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/changeRecordStatistics/index.html")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.changeRecordStatistics")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.changeRecordStatistics")
|
||||||
|
public Result pageData(AidFundPageForm pageForm){
|
||||||
|
List<Sys_union> unionList = changeRecordService.dao().query(Sys_union.class, Cnd.NEW());
|
||||||
|
|
||||||
|
List<NutMap> maps = new ArrayList<>();
|
||||||
|
|
||||||
|
unionList.forEach(union->{
|
||||||
|
NutMap map = new NutMap();
|
||||||
|
map.put("unionName", union.getName());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
-7
@@ -2,8 +2,6 @@ package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.controller;
|
|||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.lang.Dict;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
@@ -11,10 +9,6 @@ import com.budwk.app.base.param.PageForm;
|
|||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.utils.PageUtil;
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
import com.budwk.app.flow.service.FlowCommonService;
|
|
||||||
import com.budwk.app.sys.models.Sys_home_activity;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|
||||||
import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
|
|
||||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberChangeRecordService;
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberChangeRecordService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -27,7 +21,6 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
|
|||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
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.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.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 com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberHistoryService;
|
||||||
|
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.sql.Sql;
|
||||||
|
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 zhf
|
||||||
|
* @date 2026/1/20 18:04
|
||||||
|
* @description 会员历史台账
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/medicalMutualAid/aidFund/historyRecord")
|
||||||
|
@Api("基金会员历史台账")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
public class AidFundHistoryRecordController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AidFundMemberHistoryService aidFundMemberHistoryService;
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/historyRecord/index.html")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.historyRecord")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.historyRecord")
|
||||||
|
public Result pageData(AidFundPageForm pageForm) {
|
||||||
|
Sql sql = aidFundMemberHistoryService.getSql(pageForm);
|
||||||
|
Pagination pagination = aidFundMemberHistoryService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@ApiOperation("导出缴费名单")
|
||||||
|
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||||
|
public void exportHistoryRecord(AidFundPageForm pageForm, HttpServletResponse response) {
|
||||||
|
|
||||||
|
Sql sql = aidFundMemberHistoryService.getSql(pageForm);
|
||||||
|
List<NutMap> listMap = aidFundMemberHistoryService.listMap(sql);
|
||||||
|
listMap.forEach(map -> {
|
||||||
|
map.put("aidFundMemberJoinTime", DateUtil.format(map.getTime("aidFundMemberJoinTime"), "yyyy-MM-dd"));
|
||||||
|
});
|
||||||
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
entityList.add(new ExcelExportEntity("年度", "year", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("性别", "sex", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("基金会员类型", "aidFundMemberUserType", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("加入时间", "aidFundMemberJoinTime", 20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, listMap);
|
||||||
|
CommonDownloadUtil.download(pageForm.getYear() + "会员历史名单.xlsx", workbook, response);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+149
-4
@@ -1,34 +1,54 @@
|
|||||||
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.controller;
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.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.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
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.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
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.base.utils.PageUtil;
|
||||||
import com.budwk.app.sys.models.Sys_user;
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.sys.services.SysUserService;
|
import com.budwk.app.sys.services.SysUserService;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.mode.AidFundMemberMode;
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.mode.AidFundMemberMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberChangeRecord;
|
||||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberChangeRecordService;
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhf
|
* @author zhf
|
||||||
* @date 2026/1/17 16:52
|
* @date 2026/1/17 16:52
|
||||||
@@ -47,7 +67,7 @@ public class AidFundManageController {
|
|||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AidFundMemberChangeRecordService changeRecordService;
|
private AidFundMemberService aidFundMemberService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/manage/index.html")
|
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/manage/index.html")
|
||||||
@@ -59,9 +79,20 @@ public class AidFundManageController {
|
|||||||
@ApiOperation("分页查询")
|
@ApiOperation("分页查询")
|
||||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||||
public Result pageData(AidFundPageForm pageForm) {
|
public Result pageData(AidFundPageForm pageForm) {
|
||||||
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
select * from vw_user $condition
|
SELECT
|
||||||
|
id,
|
||||||
|
loginname,
|
||||||
|
username,
|
||||||
|
sex,
|
||||||
|
arrivalAtSchoolDate,
|
||||||
|
unitName,
|
||||||
|
unionName,
|
||||||
|
aidFundMemberUserType,
|
||||||
|
aidFundMemberJoinTime
|
||||||
|
FROM
|
||||||
|
vw_user
|
||||||
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) {
|
||||||
@@ -71,6 +102,10 @@ public class AidFundManageController {
|
|||||||
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
|
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pageForm.getNotPayedCurrentYear()) {
|
||||||
|
cnd.and("id", "in", Sqls.create("SELECT userid FROM `aid_fund_member_pay` where `year` = YEAR(CURDATE()) and isPayed = 0"));
|
||||||
|
}
|
||||||
cnd.andEX(Sys_user::getAidFundMemberUserType, "=", pageForm.getAidFundMemberUserType());
|
cnd.andEX(Sys_user::getAidFundMemberUserType, "=", pageForm.getAidFundMemberUserType());
|
||||||
cnd.andEX(View_user::getUnionId, "=", pageForm.getUnionId());
|
cnd.andEX(View_user::getUnionId, "=", pageForm.getUnionId());
|
||||||
cnd.andEX(View_user::getUnitId, "=", pageForm.getUnitId());
|
cnd.andEX(View_user::getUnitId, "=", pageForm.getUnitId());
|
||||||
@@ -94,4 +129,114 @@ public class AidFundManageController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||||
|
@Ok("void")
|
||||||
|
@ApiOperation("导出本年新进会员")
|
||||||
|
public void exportNewMember(HttpServletResponse response) {
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
`vw_user`
|
||||||
|
WHERE
|
||||||
|
aidFundMember = 1
|
||||||
|
AND YEAR(aidFundMemberJoinTime) = YEAR(NOW())
|
||||||
|
ORDER BY
|
||||||
|
aidFundMemberJoinTime DESC
|
||||||
|
""");
|
||||||
|
List<NutMap> listMap = userService.listMap(sql);
|
||||||
|
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||||
|
entityList.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("性别", "sex", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("会员类型", "aidFundMemberUserType", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("工会", "unionName", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("加入时间", "aidFundMemberJoinTime", 20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, listMap);
|
||||||
|
CommonDownloadUtil.download(DateUtil.thisYear()+"年度新加入会员名单.xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||||
|
@ApiOperation("生成缴费名单")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(tag = "基金会员-基金会员台账", msg = "生成缴费名单")
|
||||||
|
public Result createPayList(Integer year) {
|
||||||
|
aidFundMemberService.createPayList(year);
|
||||||
|
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||||
|
@SLog(tag = "基金会员-基金会员台账", msg = "备份基金会员")
|
||||||
|
@ApiOperation("备份基金会员")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result backupMember(Integer year) {
|
||||||
|
aidFundMemberService.backupMember(year);
|
||||||
|
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||||
|
@SLog(tag = "基金会员-基金会员台账", msg = "批量设置退会")
|
||||||
|
@ApiOperation("批量设置退会")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result batchExit(@Param("ids") String[] ids) {
|
||||||
|
if (ObjectUtil.isEmpty(ids)) {
|
||||||
|
return Result.error("请选择要退会的人员");
|
||||||
|
}
|
||||||
|
List<AidFundMemberChangeRecord> recordArrayList = new ArrayList<>();
|
||||||
|
for (String id : ids) {
|
||||||
|
AidFundMemberChangeRecord record = new AidFundMemberChangeRecord()
|
||||||
|
.setUserId(id)
|
||||||
|
.setApplyTime(new Date())
|
||||||
|
.setChangeType("AIDFUND_MEMBER_CHANGE_TYPE_SEVEN");
|
||||||
|
recordArrayList.add(record);
|
||||||
|
}
|
||||||
|
userService.update(Chain.make("aidFundMember", AidFundMemberMode.NONE.getCode())
|
||||||
|
.add("aidFundMemberQuitTime", new Date()), Cnd.where("id", "in", ids));
|
||||||
|
userService.insert(recordArrayList);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||||
|
@SLog(tag = "基金会员-基金会员台账", msg = "修改基金会员类型")
|
||||||
|
@ApiOperation("修改基金会员类型")
|
||||||
|
public Result doEditAidFundMemberUserType(String userId, String aidFundMemberUserType) {
|
||||||
|
userService.update(Chain.make("aidFundMemberUserType", aidFundMemberUserType), Cnd.where("id", "=", userId));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||||
|
@SLog(tag = "基金会员-基金会员台账", msg = "更改基金会员状态")
|
||||||
|
@ApiOperation("更改基金会员状态")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result doEditChangeType(String userId, String changeType) {
|
||||||
|
|
||||||
|
AidFundMemberChangeRecord record = new AidFundMemberChangeRecord()
|
||||||
|
.setUserId(userId)
|
||||||
|
.setApplyTime(new Date())
|
||||||
|
.setChangeType(changeType);
|
||||||
|
aidFundMemberService.insert(record);
|
||||||
|
userService.update(Chain.make("aidFundMember", AidFundMemberMode.NONE.getCode())
|
||||||
|
.add("aidFundMemberQuitTime", new Date()), Cnd.where("id", "=", userId));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+91
@@ -0,0 +1,91 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医疗互助历史基金会员
|
||||||
|
*
|
||||||
|
* @author 1V
|
||||||
|
* @date 2021/04/20
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("aid_fund_member_history")
|
||||||
|
@Comment("历史基金会员")
|
||||||
|
public class AidFundMemberHistory extends BaseModel {
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Name
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("年份")
|
||||||
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("用户id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工号")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 120)
|
||||||
|
private String loginname;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("性别")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 4)
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("基金会员人员类型")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String aidFundMemberUserType;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("人员类型")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String personType;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("在职状态")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
private String userState;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所在单位ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所在单位")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 120)
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所在工会ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("所在工会")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 120)
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
}
|
||||||
+10
-1
@@ -15,4 +15,13 @@ public class AidFundPageForm extends PageForm {
|
|||||||
private String aidFundMemberUserType;
|
private String aidFundMemberUserType;
|
||||||
private String unionId;
|
private String unionId;
|
||||||
private String unitId;
|
private String unitId;
|
||||||
}
|
//是否当年未缴费
|
||||||
|
private Boolean notPayedCurrentYear;
|
||||||
|
|
||||||
|
//基金会员变更类型
|
||||||
|
private String changeType;
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
//是否扣款null全部、1已缴费、0未缴费
|
||||||
|
private Integer isPayed;
|
||||||
|
}
|
||||||
|
|||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberHistory;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|
||||||
|
public interface AidFundMemberHistoryService extends BaseService<AidFundMemberHistory> {
|
||||||
|
|
||||||
|
Sql getSql(AidFundPageForm pageForm);
|
||||||
|
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberPay;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|
||||||
|
public interface AidFundMemberPayService extends BaseService<AidFundMemberPay> {
|
||||||
|
|
||||||
|
|
||||||
|
Sql getSql(AidFundPageForm pageForm);
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
|
|
||||||
|
public interface AidFundMemberService extends BaseService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成缴费列表
|
||||||
|
* @param year
|
||||||
|
*/
|
||||||
|
void createPayList(Integer year);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备份会员
|
||||||
|
* @param year
|
||||||
|
*/
|
||||||
|
void backupMember(Integer year);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缴费金额
|
||||||
|
* @param user
|
||||||
|
* @param year
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Double getPayMoney(Sys_user user, Integer year);
|
||||||
|
}
|
||||||
+14
-14
@@ -50,12 +50,12 @@ public class AidFundMemberChangeRecordServiceImpl extends BaseServiceImpl<AidFun
|
|||||||
//如果是通过
|
//如果是通过
|
||||||
if (ObjectUtil.equals(args.getStr("changeType"), "AIDFUND_MEMBER_CHANGE_TYPE_ONE")) {
|
if (ObjectUtil.equals(args.getStr("changeType"), "AIDFUND_MEMBER_CHANGE_TYPE_ONE")) {
|
||||||
//如果是加入基金
|
//如果是加入基金
|
||||||
dao().update(Sys_user.class, Chain.make("arrivalAtSchoolDate", args.getStr("arrivalAtSchoolDate"))
|
dao().update(Sys_user.class, Chain.make("arrivalAtSchoolDate", args.getStr("arrivalAtSchoolDate")).add("aidFundMemberJoinTime", new Date())
|
||||||
.add("aidFundMember", AidFundMemberMode.NORMAL.getCode()),
|
.add("aidFundMember", AidFundMemberMode.NORMAL.getCode()),
|
||||||
Cnd.where(Sys_user::getId, "=", changeRecord.getUserId()));
|
Cnd.where(Sys_user::getId, "=", changeRecord.getUserId()));
|
||||||
} else {
|
} else {
|
||||||
//如果是加入基金
|
dao().update(Sys_user.class, Chain.make("aidFundMember", AidFundMemberMode.NONE.getCode())
|
||||||
dao().update(Sys_user.class, Chain.make("aidFundMember", AidFundMemberMode.NONE.getCode()),
|
.add("aidFundMemberQuitTime", new Date()),
|
||||||
Cnd.where(Sys_user::getId, "=", changeRecord.getUserId()));
|
Cnd.where(Sys_user::getId, "=", changeRecord.getUserId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,11 +63,11 @@ public class AidFundMemberChangeRecordServiceImpl extends BaseServiceImpl<AidFun
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getPayMoney(String arrivalAtSchoolDate,String userId) {
|
public int getPayMoney(String arrivalAtSchoolDate, String userId) {
|
||||||
if (StrUtil.isBlank(userId)){
|
if (StrUtil.isBlank(userId)) {
|
||||||
userId=SecurityUtil.getUserId();
|
userId = SecurityUtil.getUserId();
|
||||||
}
|
}
|
||||||
int money=0;
|
int money = 0;
|
||||||
int schoolYear = DateUtil.year(DateUtil.parse(arrivalAtSchoolDate));
|
int schoolYear = DateUtil.year(DateUtil.parse(arrivalAtSchoolDate));
|
||||||
int applyYear = DateUtil.thisYear();
|
int applyYear = DateUtil.thisYear();
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ public class AidFundMemberChangeRecordServiceImpl extends BaseServiceImpl<AidFun
|
|||||||
userIds.add(userId);
|
userIds.add(userId);
|
||||||
Sys_user user = dao().fetch(Sys_user.class, userId);
|
Sys_user user = dao().fetch(Sys_user.class, userId);
|
||||||
if (StrUtil.isNotBlank(user.getOldLoginName())) {
|
if (StrUtil.isNotBlank(user.getOldLoginName())) {
|
||||||
Sys_user oldUser = dao().fetch(Sys_user.class,Cnd.where(Sys_user::getLoginname, "=", user.getOldLoginName()));
|
Sys_user oldUser = dao().fetch(Sys_user.class, Cnd.where(Sys_user::getLoginname, "=", user.getOldLoginName()));
|
||||||
if (null != oldUser) {
|
if (null != oldUser) {
|
||||||
userIds.add(oldUser.getId());
|
userIds.add(oldUser.getId());
|
||||||
}
|
}
|
||||||
@@ -83,13 +83,13 @@ public class AidFundMemberChangeRecordServiceImpl extends BaseServiceImpl<AidFun
|
|||||||
List<AidFundMemberPay> historyPays = dao().query(AidFundMemberPay.class, Cnd.where(AidFundMemberPay::getUserId, "in", userIds));
|
List<AidFundMemberPay> historyPays = dao().query(AidFundMemberPay.class, Cnd.where(AidFundMemberPay::getUserId, "in", userIds));
|
||||||
if (CollectionUtil.isEmpty(historyPays)) {
|
if (CollectionUtil.isEmpty(historyPays)) {
|
||||||
if (applyYear == schoolYear) {
|
if (applyYear == schoolYear) {
|
||||||
money=180;
|
money = 180;
|
||||||
} else if (schoolYear < 2015) {
|
} else if (schoolYear < 2015) {
|
||||||
money=(applyYear - 2015 + 1) * (180 + 18) + 180;
|
money = (applyYear - 2015 + 1) * (180 + 18) + 180;
|
||||||
} else {
|
} else {
|
||||||
//往年需要补的钱
|
//往年需要补的钱
|
||||||
int oldMoney = (applyYear - schoolYear) * (180 + 18);
|
int oldMoney = (applyYear - schoolYear) * (180 + 18);
|
||||||
money=oldMoney + 180;
|
money = oldMoney + 180;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//往年需要补的钱 拿到最近一年的缴费记录
|
//往年需要补的钱 拿到最近一年的缴费记录
|
||||||
@@ -97,7 +97,7 @@ public class AidFundMemberChangeRecordServiceImpl extends BaseServiceImpl<AidFun
|
|||||||
Integer maxPayYear = maxYearPayRecord.getYear();
|
Integer maxPayYear = maxYearPayRecord.getYear();
|
||||||
|
|
||||||
int oldMoney = (applyYear - maxPayYear) * (180 + 18);
|
int oldMoney = (applyYear - maxPayYear) * (180 + 18);
|
||||||
money=oldMoney + 180;
|
money = oldMoney + 180;
|
||||||
}
|
}
|
||||||
|
|
||||||
return money;
|
return money;
|
||||||
@@ -105,8 +105,8 @@ public class AidFundMemberChangeRecordServiceImpl extends BaseServiceImpl<AidFun
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AidFundMemberPay> getUserPayRecordList(String userId) {
|
public List<AidFundMemberPay> getUserPayRecordList(String userId) {
|
||||||
if (StrUtil.isBlank(userId)){
|
if (StrUtil.isBlank(userId)) {
|
||||||
userId=SecurityUtil.getUserId();
|
userId = SecurityUtil.getUserId();
|
||||||
}
|
}
|
||||||
Sys_user user = dao().fetch(Sys_user.class, Cnd.where(Sys_user::getId, "=", userId));
|
Sys_user user = dao().fetch(Sys_user.class, Cnd.where(Sys_user::getId, "=", userId));
|
||||||
if (StrUtil.isNotBlank(user.getOldLoginName())) {
|
if (StrUtil.isNotBlank(user.getOldLoginName())) {
|
||||||
|
|||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberHistory;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberHistoryService;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2026/1/20 18:07
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class AidFundMemberHistoryServiceImpl extends BaseServiceImpl<AidFundMemberHistory> implements AidFundMemberHistoryService {
|
||||||
|
public AidFundMemberHistoryServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sql getSql(AidFundPageForm pageForm) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
hi.*,
|
||||||
|
us.aidFundMemberJoinTime
|
||||||
|
FROM
|
||||||
|
`aid_fund_member_history` hi
|
||||||
|
LEFT JOIN sys_user us ON us.id = hi.userId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
group.orLike("hi.loginname", pageForm.getSearchKeyword());
|
||||||
|
group.orLike("hi.username", pageForm.getSearchKeyword());
|
||||||
|
cnd.and(group);
|
||||||
|
}
|
||||||
|
cnd.andEX("hi.aidFundMemberUserType", "=", pageForm.getAidFundMemberUserType());
|
||||||
|
cnd.andEX("hi.unitId", "=", pageForm.getUnitId());
|
||||||
|
cnd.andEX("hi.unionId", "=", pageForm.getUnionId());
|
||||||
|
cnd.andEX("hi.year", "=", pageForm.getYear());
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("hi.unitName");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sql;
|
||||||
|
}
|
||||||
|
}
|
||||||
+91
@@ -0,0 +1,91 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberPay;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberPayService;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2026/1/20 15:04
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class AidFundMemberPayServiceImpl extends BaseServiceImpl<AidFundMemberPay> implements AidFundMemberPayService {
|
||||||
|
public AidFundMemberPayServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sql getSql(AidFundPageForm pageForm) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
pay.isPayed,
|
||||||
|
pay.money,
|
||||||
|
pay.year,
|
||||||
|
pay.aidFundMemberUserType,
|
||||||
|
pay.id,
|
||||||
|
pay.userId,
|
||||||
|
us.username,
|
||||||
|
us.loginname,
|
||||||
|
us.sex,
|
||||||
|
us.unitName,
|
||||||
|
us.unionName
|
||||||
|
FROM
|
||||||
|
`aid_fund_member_pay` pay
|
||||||
|
LEFT JOIN vw_user us ON us.id = pay.userId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
group.orLike("us.loginname", pageForm.getSearchKeyword());
|
||||||
|
group.orLike("us.username", pageForm.getSearchKeyword());
|
||||||
|
cnd.and(group);
|
||||||
|
}
|
||||||
|
cnd.andEX("pay.aidFundMemberUserType", "=", pageForm.getAidFundMemberUserType());
|
||||||
|
cnd.andEX("us.unitid", "=", pageForm.getUnitId());
|
||||||
|
cnd.andEX("us.unionid", "=", pageForm.getUnionId());
|
||||||
|
cnd.andEX("pay.year", "=", pageForm.getYear());
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) {
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
if (AuthUtil.hasRole(RoleConstant.RETIREMENT_WORKPLACE.name())) {
|
||||||
|
// 离退休人员
|
||||||
|
group.or("pay.aidFundMemberUserType", "=", "离退休人员");
|
||||||
|
}
|
||||||
|
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||||
|
//分工会主席
|
||||||
|
group.or("us.unionid", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.RETIREMENT_WORKPLACE.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||||
|
// 非管理员
|
||||||
|
cnd.andEX("pay.userId", "=", SecurityUtil.getUserId());
|
||||||
|
}
|
||||||
|
cnd.and(group);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(pageForm.getIsPayed())){
|
||||||
|
cnd.and("pay.isPayed", "=", pageForm.getIsPayed());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.desc("us.unitCode");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sql;
|
||||||
|
}
|
||||||
|
}
|
||||||
+121
@@ -0,0 +1,121 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
|
import com.budwk.app.sys.views.View_user;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.mode.AidFundMemberMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberHistory;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberPay;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberService;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2026/1/19 14:49
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class AidFundMemberServiceImpl extends BaseServiceImpl implements AidFundMemberService {
|
||||||
|
public AidFundMemberServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createPayList(Integer year) {
|
||||||
|
if (year > DateUtil.thisYear()) {
|
||||||
|
//如果传过来的年大于本年,代表今年生成明年的数据
|
||||||
|
year = Calendar.getInstance().get(Calendar.YEAR) + 1;
|
||||||
|
} else {
|
||||||
|
//否者就是生成本年的
|
||||||
|
}
|
||||||
|
|
||||||
|
dao().clear(AidFundMemberPay.class, Cnd.where(AidFundMemberPay::getYear, "=", year));
|
||||||
|
|
||||||
|
List<Sys_user> aidFundMembers = dao().query(Sys_user.class, Cnd.where("aidFundMember", "=", AidFundMemberMode.NORMAL.getCode()));
|
||||||
|
List<AidFundMemberPay> pays = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Sys_user member : aidFundMembers) {
|
||||||
|
AidFundMemberPay pay = new AidFundMemberPay()
|
||||||
|
.setUserId(member.getId())
|
||||||
|
.setMoney(getPayMoney(member, year - 1))
|
||||||
|
.setYear(year)
|
||||||
|
.setIsPayed(false)
|
||||||
|
.setPersonType(member.getPersonType())
|
||||||
|
.setAidFundMemberUserType(member.getAidFundMemberUserType())
|
||||||
|
.setUserState(member.getUserState());
|
||||||
|
pays.add(pay);
|
||||||
|
}
|
||||||
|
|
||||||
|
dao().insert(pays);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void backupMember(Integer year) {
|
||||||
|
dao().clear(AidFundMemberHistory.class, Cnd.where(AidFundMemberHistory::getYear, "=", year));
|
||||||
|
List<AidFundMemberHistory> historyMemberArrayList = new ArrayList<>();
|
||||||
|
List<View_user> sysUserList = dao().query(View_user.class, Cnd.where(View_user::getAidFundMember, "=", AidFundMemberMode.NORMAL.getCode()));
|
||||||
|
sysUserList.forEach(user -> {
|
||||||
|
AidFundMemberHistory aidFundHistoryMember = new AidFundMemberHistory();
|
||||||
|
aidFundHistoryMember.setYear(year);
|
||||||
|
aidFundHistoryMember.setUserId(user.getId());
|
||||||
|
aidFundHistoryMember.setLoginname(user.getLoginname());
|
||||||
|
aidFundHistoryMember.setUsername(user.getUsername());
|
||||||
|
aidFundHistoryMember.setSex(user.getSex());
|
||||||
|
aidFundHistoryMember.setAidFundMemberUserType(user.getAidFundMemberUserType());
|
||||||
|
aidFundHistoryMember.setPersonType(user.getPersonType());
|
||||||
|
aidFundHistoryMember.setUserState(user.getUserState());
|
||||||
|
aidFundHistoryMember.setUnitId(user.getUnitId());
|
||||||
|
aidFundHistoryMember.setUnitName(user.getUnitName());
|
||||||
|
aidFundHistoryMember.setUnionId(user.getUnionId());
|
||||||
|
aidFundHistoryMember.setUnionName(user.getUnionName());
|
||||||
|
historyMemberArrayList.add(aidFundHistoryMember);
|
||||||
|
});
|
||||||
|
insert(historyMemberArrayList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Double getPayMoney(Sys_user user, Integer year) {
|
||||||
|
Double money = 180.0;
|
||||||
|
int critical = 2015;
|
||||||
|
|
||||||
|
Date joinTime = ObjectUtil.defaultIfNull(user.getAidFundMemberJoinTime(), DateUtil.date());
|
||||||
|
int joinYear = DateUtil.year(joinTime);
|
||||||
|
|
||||||
|
if (joinYear < year) {
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
|
||||||
|
//退出过的话从退出的那年开始算
|
||||||
|
Date quitTime = user.getAidFundMemberQuitTime();
|
||||||
|
if (quitTime != null) {
|
||||||
|
int quitYear = DateUtil.year(quitTime);
|
||||||
|
return (year + 1 - quitYear) * money + (year - quitYear) * money * 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
String schoolTime = user.getArrivalAtSchoolDate();
|
||||||
|
if (Strings.isBlank(schoolTime)) {
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
|
||||||
|
//TMD存的字符串
|
||||||
|
//入校年份
|
||||||
|
int schoolYear = Integer.parseInt(schoolTime.substring(0, 4));
|
||||||
|
int beforeYear = Math.max(schoolYear, critical);
|
||||||
|
if (schoolYear < 2015) {
|
||||||
|
return (year + 1 - beforeYear + 1) * money + (year - beforeYear + 1) * money * 0.1;
|
||||||
|
}
|
||||||
|
return (year + 1 - beforeYear) * money + (year - beforeYear) * money * 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.template;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhf
|
||||||
|
* @date 2026/1/20 17:39
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AidFundPayTemp {
|
||||||
|
|
||||||
|
@Excel(name = "工号")
|
||||||
|
private String loginname;
|
||||||
|
@Excel(name = "姓名")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
String result;
|
||||||
|
}
|
||||||
@@ -1,25 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding: 20px 50px">
|
<div style="padding: 20px 50px">
|
||||||
<el-timeline>
|
<el-timeline>
|
||||||
<el-timeline-item timestamp="下载模板" placement="top">
|
<el-timeline-item timestamp="下载模板" placement="top">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-button size="medium" style="width: 200px" @click="$downLoad(temp_url)" icon="el-icon-download">下载模板</el-button>
|
<el-button size="medium" style="width: 200px" @click="$downLoad(temp_url)" icon="el-icon-download">下载模板
|
||||||
</el-card>
|
</el-button>
|
||||||
</el-timeline-item>
|
</el-card>
|
||||||
<el-timeline-item timestamp="上传文件" placement="top">
|
</el-timeline-item>
|
||||||
<el-card>
|
<el-timeline-item timestamp="上传文件" placement="top">
|
||||||
<el-form>
|
<el-card>
|
||||||
<el-form-item label="请选择更新模式" v-if="is_show_radio">
|
<el-form>
|
||||||
<el-radio-group v-model="importData.isFlag">
|
<el-form-item label="请选择更新模式" v-if="is_show_radio">
|
||||||
<el-radio-button label="true">清空更新</el-radio-button>
|
<el-radio-group v-model="importData.isFlag">
|
||||||
<el-radio-button label="false">追加</el-radio-button>
|
<el-radio-button label="true">清空更新</el-radio-button>
|
||||||
</el-radio-group>
|
<el-radio-button label="false">追加</el-radio-button>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-upload
|
<el-upload
|
||||||
name="file"
|
name="file"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:on-remove="
|
:on-remove="
|
||||||
(file, fileList) => {
|
(file, fileList) => {
|
||||||
importData.fileList = fileHandleRemove(file, fileList)
|
importData.fileList = fileHandleRemove(file, fileList)
|
||||||
importResult = {
|
importResult = {
|
||||||
@@ -30,186 +31,190 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:on-change="
|
:on-change="
|
||||||
(file, fileList) => {
|
(file, fileList) => {
|
||||||
importData.fileList = fileHandleChange(file, fileList, { type: ['xls', 'xlsx'] })
|
importData.fileList = fileHandleChange(file, fileList, { type: ['xls', 'xlsx'] })
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
action
|
action
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:file-list="importData.fileList"
|
:file-list="importData.fileList"
|
||||||
>
|
>
|
||||||
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件</el-button>
|
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件</el-button>
|
||||||
<div class="el-upload__tip" slot="tip" style="color: #f56c6c">只能上传 xls/xlsx 文件</div>
|
<div class="el-upload__tip" slot="tip" style="color: #f56c6c">只能上传 xls/xlsx 文件</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
<el-timeline-item placement="top" timestamp="导入结果">
|
<el-timeline-item placement="top" timestamp="导入结果">
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<p>总记录数:{{ errorInfoData.totalCount }}</p>
|
<p>总记录数:{{ errorInfoData.totalCount }}</p>
|
||||||
<p>
|
<p>
|
||||||
成功数:
|
成功数:
|
||||||
<span class="text-success">{{ errorInfoData.successCount }}</span>
|
<span class="text-success">{{ errorInfoData.successCount }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
错误数:
|
错误数:
|
||||||
<span class="text-danger">{{ errorInfoData.errorCount }}</span>
|
<span class="text-danger">{{ errorInfoData.errorCount }}</span>
|
||||||
</p>
|
</p>
|
||||||
<el-link @click="exportErrors" type="primary" v-if="errorInfoData.errorCount > 0">下载错误记录</el-link>
|
<el-link @click="exportErrors" type="primary" v-if="errorInfoData.errorCount > 0">下载错误记录</el-link>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<!-- <el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>-->
|
<!-- <el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>-->
|
||||||
<el-button type="primary" @click="doImport">确 定</el-button>
|
<el-button type="primary" @click="doImport">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
props: {
|
props: {
|
||||||
temp_url: { type: String },
|
temp_url: {type: String},
|
||||||
post_url: { type: String },
|
post_url: {type: String},
|
||||||
business_id: { type: String },
|
business_id: {type: String},
|
||||||
is_show_radio: { type: Boolean, default: false }
|
is_show_radio: {type: Boolean, default: false}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const s = document.createElement("script")
|
const s = document.createElement("script")
|
||||||
s.type = "text/javascript"
|
s.type = "text/javascript"
|
||||||
s.src = "/assets/platform/plugins/xlsx/xlsx.full.min.js"
|
s.src = "/assets/platform/plugins/xlsx/xlsx.full.min.js"
|
||||||
document.body.appendChild(s)
|
document.body.appendChild(s)
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
importData: {
|
importData: {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
isFlag: false
|
isFlag: false
|
||||||
},
|
},
|
||||||
errorInfoData: {
|
errorInfoData: {
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
successCount: 0,
|
successCount: 0,
|
||||||
errorCount: 0,
|
errorCount: 0,
|
||||||
errorList: 0
|
errorList: 0
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
resetImportData() {
|
|
||||||
this.importData = {
|
|
||||||
fileList: [],
|
|
||||||
isFlag: false
|
|
||||||
}
|
|
||||||
this.errorInfoData = {
|
|
||||||
totalCount: 0,
|
|
||||||
successCount: 0,
|
|
||||||
errorCount: 0,
|
|
||||||
errorList: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doImport() {
|
|
||||||
if (this.importData.fileList.length === 0) {
|
|
||||||
this.$message.error({
|
|
||||||
title: "错误",
|
|
||||||
message: "请选择文件!"
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const data = new FormData()
|
|
||||||
data.append("isFlag", this.importData.isFlag)
|
|
||||||
data.append("businessId", this.business_id)
|
|
||||||
this.importData.fileList.forEach((val) => {
|
|
||||||
data.append("file", val.raw, val.raw.name)
|
|
||||||
})
|
|
||||||
const loading = this.$loading({
|
|
||||||
lock: true,
|
|
||||||
text: "正在导入中,请稍后...",
|
|
||||||
spinner: "el-icon-loading",
|
|
||||||
background: "rgba(0, 0, 0, 0.7)"
|
|
||||||
})
|
|
||||||
this.$axios.post(this.post_url, data).then((res) => {
|
|
||||||
loading.close()
|
|
||||||
if (res.code === 0) {
|
|
||||||
if (res.data) {
|
|
||||||
this.$message.warning("导入失败")
|
|
||||||
this.errorInfoData = res.data
|
|
||||||
this.$emit("flush")
|
|
||||||
} else {
|
|
||||||
this.$message.success("导入成功")
|
|
||||||
this.$emit("flush")
|
|
||||||
this.resetImportData()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$message.warning("导入失败")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
exportErrors() {
|
|
||||||
const data = this.errorInfoData.errorList
|
|
||||||
|
|
||||||
// 创建工作簿
|
|
||||||
const workbook = XLSX.utils.book_new()
|
|
||||||
|
|
||||||
// 创建工作表
|
|
||||||
const worksheet = XLSX.utils.json_to_sheet(data)
|
|
||||||
|
|
||||||
// 将工作表添加到工作簿
|
|
||||||
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
|
|
||||||
|
|
||||||
// 将工作簿转换为二进制对象
|
|
||||||
const excelBuffer = XLSX.write(workbook, { bookType: "xlsx", type: "array" })
|
|
||||||
|
|
||||||
// 将二进制对象转换为Blob对象
|
|
||||||
const blob = new Blob([excelBuffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" })
|
|
||||||
|
|
||||||
// 创建下载链接并设置相关属性
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
|
||||||
const link = document.createElement("a")
|
|
||||||
link.href = url
|
|
||||||
link.download = "错误记录.xlsx"
|
|
||||||
|
|
||||||
// 模拟点击下载链接
|
|
||||||
document.body.appendChild(link)
|
|
||||||
link.click()
|
|
||||||
// 清理下载链接
|
|
||||||
document.body.removeChild(link)
|
|
||||||
window.URL.revokeObjectURL(url)
|
|
||||||
},
|
|
||||||
fileHandleRemove(file, fileList) {
|
|
||||||
return fileList
|
|
||||||
},
|
|
||||||
fileHandleChange(file, fileList, { type, size }) {
|
|
||||||
const removeFile = () => {
|
|
||||||
fileList.splice(fileList.findIndex((v) => v === file))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!file.size) {
|
|
||||||
this.$message.warning("您选择的是空文件!")
|
|
||||||
removeFile()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type && type.length && !type.includes(file.name.split(".").pop().toLowerCase())) {
|
|
||||||
this.$message.warning(`文件只能是 ${type.map((v) => v.toUpperCase()).join("/")} 格式!`)
|
|
||||||
removeFile()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (size && !file.size < size) {
|
|
||||||
this.$message.warning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
|
|
||||||
removeFile()
|
|
||||||
}
|
|
||||||
|
|
||||||
return fileList
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetImportData() {
|
||||||
|
this.importData = {
|
||||||
|
fileList: [],
|
||||||
|
isFlag: false
|
||||||
|
}
|
||||||
|
this.errorInfoData = {
|
||||||
|
totalCount: 0,
|
||||||
|
successCount: 0,
|
||||||
|
errorCount: 0,
|
||||||
|
errorList: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doImport() {
|
||||||
|
if (this.importData.fileList.length === 0) {
|
||||||
|
this.$message.error({
|
||||||
|
title: "错误",
|
||||||
|
message: "请选择文件!"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const data = new FormData()
|
||||||
|
for (const key in this.importData) {
|
||||||
|
if (this.importData.hasOwnProperty(key) && key !== 'fileList') {
|
||||||
|
data.append(key, this.importData[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.append("businessId", this.business_id)
|
||||||
|
this.importData.fileList.forEach((val) => {
|
||||||
|
data.append("file", val.raw, val.raw.name)
|
||||||
|
})
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: "正在导入中,请稍后...",
|
||||||
|
spinner: "el-icon-loading",
|
||||||
|
background: "rgba(0, 0, 0, 0.7)"
|
||||||
|
})
|
||||||
|
this.$axios.post(this.post_url, data).then((res) => {
|
||||||
|
loading.close()
|
||||||
|
if (res.code === 0) {
|
||||||
|
if (res.data) {
|
||||||
|
this.$message.warning("导入失败")
|
||||||
|
this.errorInfoData = res.data
|
||||||
|
this.$emit("flush")
|
||||||
|
} else {
|
||||||
|
this.$message.success("导入成功")
|
||||||
|
this.$emit("flush")
|
||||||
|
this.resetImportData()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning("导入失败")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
exportErrors() {
|
||||||
|
const data = this.errorInfoData.errorList
|
||||||
|
|
||||||
|
// 创建工作簿
|
||||||
|
const workbook = XLSX.utils.book_new()
|
||||||
|
|
||||||
|
// 创建工作表
|
||||||
|
const worksheet = XLSX.utils.json_to_sheet(data)
|
||||||
|
|
||||||
|
// 将工作表添加到工作簿
|
||||||
|
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
|
||||||
|
|
||||||
|
// 将工作簿转换为二进制对象
|
||||||
|
const excelBuffer = XLSX.write(workbook, {bookType: "xlsx", type: "array"})
|
||||||
|
|
||||||
|
// 将二进制对象转换为Blob对象
|
||||||
|
const blob = new Blob([excelBuffer], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})
|
||||||
|
|
||||||
|
// 创建下载链接并设置相关属性
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement("a")
|
||||||
|
link.href = url
|
||||||
|
link.download = "错误记录.xlsx"
|
||||||
|
|
||||||
|
// 模拟点击下载链接
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
// 清理下载链接
|
||||||
|
document.body.removeChild(link)
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
},
|
||||||
|
fileHandleRemove(file, fileList) {
|
||||||
|
return fileList
|
||||||
|
},
|
||||||
|
fileHandleChange(file, fileList, {type, size}) {
|
||||||
|
const removeFile = () => {
|
||||||
|
fileList.splice(fileList.findIndex((v) => v === file))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file.size) {
|
||||||
|
this.$message.warning("您选择的是空文件!")
|
||||||
|
removeFile()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type && type.length && !type.includes(file.name.split(".").pop().toLowerCase())) {
|
||||||
|
this.$message.warning(`文件只能是 ${type.map((v) => v.toUpperCase()).join("/")} 格式!`)
|
||||||
|
removeFile()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size && !file.size < size) {
|
||||||
|
this.$message.warning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
|
||||||
|
removeFile()
|
||||||
|
}
|
||||||
|
|
||||||
|
return fileList
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.el-card__body {
|
.el-card__body {
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+157
@@ -0,0 +1,157 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择年度"
|
||||||
|
type="year"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
@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="会员类型">
|
||||||
|
<dict-select v-model="pageForm.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
|
||||||
|
style="width: 100%"></dict-select>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
|
<search-item label="变更类型">
|
||||||
|
<dict-select v-model="pageForm.changeType" code="AIDFUND_MEMBER_CHANGE_TYPE"
|
||||||
|
style="width: 100%"></dict-select>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||||
|
style="width: 100%" @change="unionChange">
|
||||||
|
<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" placeholder="请选择所属单位" filterable clearable
|
||||||
|
style="width: 100%">
|
||||||
|
<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" class="mt10">
|
||||||
|
<table-tool label="基金会员">
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||||
|
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||||
|
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||||
|
type="index" width="60px"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
:width="column.width"
|
||||||
|
header-align="center"
|
||||||
|
min-width="100px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{row}" v-if="column.prop=='changeType'">
|
||||||
|
<dict-tag :options="dict.type.AIDFUND_MEMBER_CHANGE_TYPE"
|
||||||
|
:value="row.changeType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{row}" v-else-if="column.prop=='applyTime'">
|
||||||
|
<template v-if="row.applyTime">
|
||||||
|
{{$moment(row.applyTime).format('YYYY-MM-DD')}}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="200">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<info ref="infoRef"></info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script nonce="${cspNonce!}">
|
||||||
|
<!--#include("../common/applyInfo.js"){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
store,
|
||||||
|
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
unitId: '',
|
||||||
|
unionId: '',
|
||||||
|
year: this.$moment().format("YYYY"),
|
||||||
|
},
|
||||||
|
tableColumns: [
|
||||||
|
{prop: "loginname", label: "工号"},
|
||||||
|
{prop: "username", label: "姓名"},
|
||||||
|
{prop: "sex", label: "性别"},
|
||||||
|
{prop: "arrivalAtSchoolDate", label: "入校时间"},
|
||||||
|
{prop: "unitName", label: "所属单位"},
|
||||||
|
{prop: "unionName", label: "所属工会"},
|
||||||
|
{prop: "aidFundMemberUserType", label: "基金会员类型"},
|
||||||
|
{prop: "changeType", label: "变更类型"},
|
||||||
|
{prop: "applyTime", label: "变更时间"},
|
||||||
|
],
|
||||||
|
unionList: [],
|
||||||
|
unitList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
'info': APPLY_INFO,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async unionChange(val) {
|
||||||
|
this.pageForm.unitId = null
|
||||||
|
this.unitList = await this.$businessTool.listUnit(val)
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionList = await this.$businessTool.listUnion()
|
||||||
|
this.unitList = await this.$businessTool.listUnit()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+92
@@ -0,0 +1,92 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择年度"
|
||||||
|
type="year"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
@change="doSearch"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||||
|
style="width: 100%" @change="unionChange">
|
||||||
|
<el-option v-for="item in unionList" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt10">
|
||||||
|
<table-tool label="会员分析">
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||||
|
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||||
|
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||||
|
type="index" width="60px"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
:width="column.width"
|
||||||
|
header-align="center"
|
||||||
|
min-width="100px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script nonce="${cspNonce!}">
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
unionId: '',
|
||||||
|
year: this.$moment().format("YYYY"),
|
||||||
|
},
|
||||||
|
unionList: [],
|
||||||
|
tableColumns: [
|
||||||
|
{prop: "unionName", label: "分工会"},
|
||||||
|
{prop: "YEAR_BEGIN", label: "年初数量"},
|
||||||
|
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_EIGTH", label: "会员退休(不变号)"},
|
||||||
|
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_ONE", label: "新增会员"},
|
||||||
|
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_FOUR", label: "自愿退出"},
|
||||||
|
{prop: "AIDFUND_MEMBER_CHANGE_TYPE_FIVE", label: "会员去世"},
|
||||||
|
{prop: "currentAidFundMember", label: "当前数量"},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionList = await this.$businessTool.listUnion()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+144
@@ -0,0 +1,144 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择年度"
|
||||||
|
type="year"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
:clearable="false"
|
||||||
|
@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="会员类型">
|
||||||
|
<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" placeholder="请选择所属工会" filterable clearable
|
||||||
|
style="width: 100%" @change="unionChange">
|
||||||
|
<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" placeholder="请选择所属单位" filterable clearable
|
||||||
|
style="width: 100%">
|
||||||
|
<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" class="mt10">
|
||||||
|
<table-tool label="基金会员">
|
||||||
|
<el-button @click="exportHistoryRecord"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-download"
|
||||||
|
type="primary">导出名单
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||||
|
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||||
|
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||||
|
type="index" width="60px"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
:width="column.width"
|
||||||
|
header-align="center"
|
||||||
|
min-width="100px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{row}" v-if="column.prop=='aidFundMemberUserType'">
|
||||||
|
<dict-tag :options="dict.type.AIDFUND_MEMBER_USER_TYPE"
|
||||||
|
:value="row.aidFundMemberUserType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{row}" v-else-if="column.prop=='aidFundMemberJoinTime'">
|
||||||
|
<template v-if="row.aidFundMemberJoinTime">
|
||||||
|
{{$moment(row.aidFundMemberJoinTime).format("YYYY-MM-DD")}}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script nonce="${cspNonce!}">
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
store,
|
||||||
|
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
unitId: '',
|
||||||
|
unionId: '',
|
||||||
|
year: this.$moment().format("YYYY"),
|
||||||
|
isPayed: null
|
||||||
|
},
|
||||||
|
tableColumns: [
|
||||||
|
{prop: "year", label: "年度"},
|
||||||
|
{prop: "loginname", label: "工号"},
|
||||||
|
{prop: "username", label: "姓名"},
|
||||||
|
{prop: "sex", label: "性别"},
|
||||||
|
{prop: "aidFundMemberUserType", label: "基金会员类型"},
|
||||||
|
{prop: "unitName", label: "所属单位"},
|
||||||
|
{prop: "unionName", label: "所属工会"},
|
||||||
|
{prop: "aidFundMemberJoinTime", label: "加入时间"},
|
||||||
|
],
|
||||||
|
unionList: [],
|
||||||
|
unitList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
exportHistoryRecord(){
|
||||||
|
this.$downLoad('/platform/medicalMutualAid/aidFund/historyRecord/exportHistoryRecord', this.pageForm)
|
||||||
|
},
|
||||||
|
async unionChange(val) {
|
||||||
|
this.pageForm.unitId = null
|
||||||
|
this.unitList = await this.$businessTool.listUnit(val)
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionList = await this.$businessTool.listUnion()
|
||||||
|
this.unitList = await this.$businessTool.listUnit()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
|
|
||||||
+293
-57
@@ -17,22 +17,87 @@ layout("/layouts/platform.html"){
|
|||||||
style="width: 100%"></dict-select>
|
style="width: 100%"></dict-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||||
|
style="width: 100%" @change="unionChange">
|
||||||
|
<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" placeholder="请选择所属单位" filterable clearable
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option v-for="item in unitList" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
|
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool label="基金会员">
|
<table-tool label="基金会员">
|
||||||
|
<el-tag :effect="pageForm.notPayedCurrentYear?'dark':'plain'"
|
||||||
|
@click="pageForm.notPayedCurrentYear=!pageForm.notPayedCurrentYear;doSearch();"
|
||||||
|
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')" class="mr10">
|
||||||
|
当年未缴费【基金会员】名单
|
||||||
|
</el-tag>
|
||||||
|
|
||||||
|
<el-button @click="batchExit" size="small"
|
||||||
|
type="danger" v-if="pageForm.notPayedCurrentYear"
|
||||||
|
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')">
|
||||||
|
批量设置为退会
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button @click="exportNewMember" icon="el-icon-download" size="small" type="primary"
|
||||||
|
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.exportNewMember')" class="mr10">
|
||||||
|
导出{{new
|
||||||
|
Date().getFullYear()}}年新会员名单
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown @command="dropdownCommand"
|
||||||
|
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')" class="mr10">
|
||||||
|
<el-button size="small" type="primary">
|
||||||
|
备份会员名单<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item :command="{action:backupMember,value:year}"
|
||||||
|
v-for="year in yearOptions"
|
||||||
|
:key="year">
|
||||||
|
{{year}}年
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
<el-dropdown @command="dropdownCommand"
|
||||||
|
v-if="$auth.hasPermission('medicalMutualAid.aidFund.manage.createPayList')">
|
||||||
|
<el-button size="small" type="primary"
|
||||||
|
>
|
||||||
|
生成缴费名单<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item :command="{action:createPayList,value:year}"
|
||||||
|
v-for="year in payYearOptions"
|
||||||
|
:key="year">
|
||||||
|
{{year}}年
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||||
ref="table" row-key="id" style="width: 100%">
|
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||||
type="index" width="60px"></el-table-column>
|
type="index" width="60px"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
@@ -40,18 +105,23 @@ layout("/layouts/platform.html"){
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<template scope="{row}" v-if="column.prop=='aidFundMemberUserType'">
|
<template v-slot="{row}" v-if="column.prop=='aidFundMemberUserType'">
|
||||||
<dict-tag :options="dict.type.AIDFUND_MEMBER_USER_TYPE"
|
<dict-tag :options="dict.type.AIDFUND_MEMBER_USER_TYPE"
|
||||||
:value="row.aidFundMemberUserType"></dict-tag>
|
:value="row.aidFundMemberUserType"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot="{row}" v-if="column.prop=='aidFundMemberJoinTime'">
|
||||||
|
<template v-if="row.aidFundMemberJoinTime">
|
||||||
|
{{$moment(row.aidFundMemberJoinTime).format('YYYY-MM-DD')}}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" fixed="right" width="200">
|
<el-table-column label="操作" fixed="right" width="300">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
<el-button @click="onEditMemberType(row)" size="mini" type="primary">修改基金会员类型
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回
|
<el-button @click="onEditChangeType(row)" size="mini" type="primary">变更
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -64,13 +134,76 @@ layout("/layouts/platform.html"){
|
|||||||
</info>
|
</info>
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="aidFundMemberUserTypeVisible"
|
||||||
|
title="修改基金会员"
|
||||||
|
width="40%">
|
||||||
|
|
||||||
|
<el-form :model="formData" :rules="formRules" label-width="120px"
|
||||||
|
ref="form">
|
||||||
|
<el-form-item label="工号" prop="loginname">
|
||||||
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="formData.loginname">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓名" prop="username">
|
||||||
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="formData.username">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="基金会员类型" prop="aidFundMemberUserType">
|
||||||
|
<dict-select v-model="formData.aidFundMemberUserType" clearable code="AIDFUND_MEMBER_USER_TYPE"
|
||||||
|
placeholder="请选择基金会员类型"
|
||||||
|
style="width: 100%"></dict-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span class="dialog-footer" slot="footer">
|
||||||
|
<el-button @click="aidFundMemberUserTypeVisible = false">取 消</el-button>
|
||||||
|
<el-button @click="doEditAidFundMemberUserType" type="primary">提 交</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="changeTypeVisible"
|
||||||
|
title="会员变更"
|
||||||
|
width="40%">
|
||||||
|
<el-form :model="formData" :rules="formRules" label-width="100px"
|
||||||
|
ref="form">
|
||||||
|
<el-form-item label="工号" prop="loginname">
|
||||||
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="formData.loginname">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓名" prop="username">
|
||||||
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="formData.username">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="变更类型" prop="changeType">
|
||||||
|
<dict-select v-model="formData.changeType" clearable code="AIDFUND_MEMBER_CHANGE_TYPE"
|
||||||
|
placeholder="请选择变更类型"
|
||||||
|
style="width: 100%"></dict-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span class="dialog-footer" slot="footer">
|
||||||
|
<el-button @click="changeTypeVisible = false">取 消</el-button>
|
||||||
|
<el-button @click="doEditChangeType" type="primary">提 交</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script nonce="${cspNonce!}">
|
<script nonce="${cspNonce!}">
|
||||||
|
|
||||||
<!--#include("../common/aidFundInfo.js"){}#-->
|
<!--#include("../common/aidFundInfo.js"){}#-->
|
||||||
|
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
@@ -79,12 +212,13 @@ layout("/layouts/platform.html"){
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageForm: {
|
pageForm: {
|
||||||
year: this.$moment().format("YYYY"),
|
unitId: '',
|
||||||
approval: false
|
unionId: '',
|
||||||
|
notPayedCurrentYear: false
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: "loginName", label: "工号"},
|
{prop: "loginname", label: "工号"},
|
||||||
{prop: "userName", label: "姓名"},
|
{prop: "username", label: "姓名"},
|
||||||
{prop: "sex", label: "性别"},
|
{prop: "sex", label: "性别"},
|
||||||
{prop: "arrivalAtSchoolDate", label: "入校时间"},
|
{prop: "arrivalAtSchoolDate", label: "入校时间"},
|
||||||
{prop: "unitName", label: "所属单位"},
|
{prop: "unitName", label: "所属单位"},
|
||||||
@@ -92,67 +226,169 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: "aidFundMemberUserType", label: "基金会员类型"},
|
{prop: "aidFundMemberUserType", label: "基金会员类型"},
|
||||||
{prop: "aidFundMemberJoinTime", label: "加入时间"},
|
{prop: "aidFundMemberJoinTime", label: "加入时间"},
|
||||||
],
|
],
|
||||||
showApprovalForm: false
|
showApprovalForm: false,
|
||||||
|
unionList: [],
|
||||||
|
unitList: [],
|
||||||
|
payYearOptions: [],
|
||||||
|
yearOptions: [],
|
||||||
|
|
||||||
|
aidFundMemberUserTypeVisible: false,
|
||||||
|
changeTypeVisible: false,
|
||||||
|
|
||||||
|
formRules: {
|
||||||
|
aidFundMemberUserType: [
|
||||||
|
{required: true, message: '请选择基金会员类型', trigger: 'change'}
|
||||||
|
],
|
||||||
|
changeType: [
|
||||||
|
{required: true, message: '请选择变更类型', trigger: 'change'}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'info': AID_FUND_INFO,
|
'info': AID_FUND_INFO,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onEditChangeType(row) {
|
||||||
|
this.formData = clone(row)
|
||||||
|
this.changeTypeVisible = true
|
||||||
|
},
|
||||||
|
doEditChangeType() {
|
||||||
|
this.$confirm('确定要变更【' + this.formData.username + '】吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post(loc() + "/doEditChangeType", {
|
||||||
|
userId: this.formData.id,
|
||||||
|
changeType: this.formData.changeType
|
||||||
|
}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
this.changeTypeVisible = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doEditAidFundMemberUserType() {
|
||||||
|
this.$confirm('确定要修改【' + this.formData.username + '】的基金会员类型吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post(loc() + "/doEditAidFundMemberUserType", {
|
||||||
|
userId: this.formData.id,
|
||||||
|
aidFundMemberUserType: this.formData.aidFundMemberUserType
|
||||||
|
}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
this.aidFundMemberUserTypeVisible = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEditMemberType(row) {
|
||||||
|
this.formData = clone(row)
|
||||||
|
this.aidFundMemberUserTypeVisible = true
|
||||||
|
},
|
||||||
|
batchExit() {
|
||||||
|
const selection = this.$refs.table.selection
|
||||||
|
if (selection.length === 0) {
|
||||||
|
this.$message.warning('请勾选需要设置为退会的人员')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const ids = selection.map(v => v.id)
|
||||||
|
this.$confirm('请核实勾选人员的退会原因,您确定要将勾选的人员设置为未缴费吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post(loc() + "/batchExit", {ids: JSON.stringify(ids)}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
backupMember(year) {
|
||||||
|
this.$confirm('您确定要备份' + year + '年的数据吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.tableLoading = true
|
||||||
|
this.$axios.post(loc() + "/backupMember", {year}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.tableLoading = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
createPayList(year) {
|
||||||
|
let msg = "请确认是否生成缴费名单?"
|
||||||
|
if (year === new Date().getFullYear()) {
|
||||||
|
msg = "您生成的" + year + "年度的缴费名单,将有可能覆盖已缴费人员的信息!请确认是否生成?"
|
||||||
|
}
|
||||||
|
this.$confirm(msg, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.tableLoading = true;
|
||||||
|
this.$axios.post(loc() + "/createPayList", {year}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.tableLoading = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
exportNewMember() {
|
||||||
|
this.$downLoad(loc() + "/exportNewMember")
|
||||||
|
},
|
||||||
|
getYearOptions() {
|
||||||
|
let year = new Date().getFullYear();
|
||||||
|
let arr = []
|
||||||
|
for (let i = year; i >= year - 3; i--) {
|
||||||
|
arr.push(i)
|
||||||
|
}
|
||||||
|
this.yearOptions = arr
|
||||||
|
},
|
||||||
|
getPayYearOptions() {
|
||||||
|
let year = new Date().getFullYear() + 1;
|
||||||
|
let arr = []
|
||||||
|
for (let i = year; i >= year - 1; i--) {
|
||||||
|
arr.push(i)
|
||||||
|
}
|
||||||
|
this.payYearOptions = arr
|
||||||
|
},
|
||||||
onView(row) {
|
onView(row) {
|
||||||
this.$refs.guava.edit(() => {
|
this.$refs.guava.edit(() => {
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
this.$refs.infoRef.onOpen(row)
|
this.$refs.infoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openAudit(row) {
|
async unionChange(val) {
|
||||||
this.$refs.guava.edit(() => {
|
this.pageForm.unitId = null
|
||||||
this.showApprovalForm = true
|
this.unitList = await this.$businessTool.listUnit(val)
|
||||||
this.formData = {
|
this.doSearch()
|
||||||
processTaskId: row.taskId,
|
|
||||||
taskName: row.curTaskName
|
|
||||||
}
|
|
||||||
this.$refs.infoRef.onOpen(row)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
|
||||||
data: JSON.stringify({
|
|
||||||
...this.formData,
|
|
||||||
submitType: val
|
|
||||||
})
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$refs.guava.index()
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.doSearch()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onRevoke(row) {
|
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.pageData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
async created() {
|
||||||
|
this.getPayYearOptions()
|
||||||
|
this.getYearOptions()
|
||||||
this.pageData()
|
this.pageData()
|
||||||
|
this.unionList = await this.$businessTool.listUnion()
|
||||||
|
this.unitList = await this.$businessTool.listUnit()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+240
@@ -0,0 +1,240 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择年度"
|
||||||
|
type="year"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
:clearable="false"
|
||||||
|
@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="会员类型">
|
||||||
|
<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" placeholder="请选择所属工会" filterable clearable
|
||||||
|
style="width: 100%" @change="unionChange">
|
||||||
|
<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" placeholder="请选择所属单位" filterable clearable
|
||||||
|
style="width: 100%">
|
||||||
|
<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" class="mt10">
|
||||||
|
<table-tool label="基金会员">
|
||||||
|
<el-radio-group @change="doSearch" size="small"
|
||||||
|
v-model="pageForm.isPayed">
|
||||||
|
<el-radio-button :label="null">全部</el-radio-button>
|
||||||
|
<el-radio-button :label="1">已缴费</el-radio-button>
|
||||||
|
<el-radio-button :label="0">未缴费</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
|
<el-button @click="openImport"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
type="primary">导入缴费记录
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button @click="exportPayRecord"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-download"
|
||||||
|
type="primary">导出名单
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button :disabled="tableData.length==0" :loading="tableLoading" @click="clearPayRecord"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="small"
|
||||||
|
type="danger">清空{{pageForm.year}}年缴费名单
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
|
||||||
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||||
|
ref="table" row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||||
|
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||||
|
type="index" width="60px"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
:width="column.width"
|
||||||
|
header-align="center"
|
||||||
|
min-width="100px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{row}" v-if="column.prop=='aidFundMemberUserType'">
|
||||||
|
<dict-tag :options="dict.type.AIDFUND_MEMBER_USER_TYPE"
|
||||||
|
:value="row.aidFundMemberUserType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{row}" v-else-if="column.prop=='isPayed'">
|
||||||
|
<template>
|
||||||
|
<el-tag type="success" v-if="row.isPayed">已缴费</el-tag>
|
||||||
|
<el-tag type="info" v-else>未缴费</el-tag>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="200">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="onPayed(row,1)" size="mini" type="primary" v-if="!row.isPayed">设置为已缴费
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="onPayed(row,0)" size="mini" type="danger" v-if="row.isPayed">设置为未缴费
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<file-import
|
||||||
|
ref="viewImport"
|
||||||
|
temp_url="/platform/medicalMutualAid/aidFund/payRecord/downloadImportTemp"
|
||||||
|
post_url="/platform/medicalMutualAid/aidFund/payRecord/doImport"
|
||||||
|
@flush="pageData"
|
||||||
|
></file-import>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script nonce="${cspNonce!}">
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
store,
|
||||||
|
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
unitId: '',
|
||||||
|
unionId: '',
|
||||||
|
year: this.$moment().format("YYYY"),
|
||||||
|
isPayed: null
|
||||||
|
},
|
||||||
|
tableColumns: [
|
||||||
|
{prop: "year", label: "年度"},
|
||||||
|
{prop: "loginname", label: "工号"},
|
||||||
|
{prop: "username", label: "姓名"},
|
||||||
|
{prop: "sex", label: "性别"},
|
||||||
|
{prop: "aidFundMemberUserType", label: "基金会员类型"},
|
||||||
|
{prop: "unitName", label: "所属单位"},
|
||||||
|
{prop: "unionName", label: "所属工会"},
|
||||||
|
{prop: "money", label: "缴费金额"},
|
||||||
|
{prop: "isPayed", label: "是否缴费"},
|
||||||
|
],
|
||||||
|
unionList: [],
|
||||||
|
unitList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue"),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openImport() {
|
||||||
|
this.$refs.guava.edit()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.viewImport.resetImportData()
|
||||||
|
this.$refs.viewImport.importData.year = this.pageForm.year
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
exportPayRecord() {
|
||||||
|
this.$downLoad('/platform/medicalMutualAid/aidFund/payRecord/exportPayRecord', this.pageForm)
|
||||||
|
},
|
||||||
|
clearPayRecord() {
|
||||||
|
if (this.pageForm.year < (new Date().getFullYear()).toString()) {
|
||||||
|
this.notifyWarning("历史数据不能删除!")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm("确定将【" + this.pageForm.year + "】年基金会员的缴费名单清空吗?", '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.tableLoading = true
|
||||||
|
this.$axios.post(loc() + "/clearPayRecord", {
|
||||||
|
year: this.pageForm.year
|
||||||
|
}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.tableLoading = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onPayed(row, isPayed) {
|
||||||
|
this.$confirm("确定将【" + row.username + "】设置为" + (isPayed ? "已缴费" : "未缴费") + "吗?", '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.tableLoading = true
|
||||||
|
this.$axios.post(loc() + "/onPayed", {id: row.id, isPayed: isPayed}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.tableLoading = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async unionChange(val) {
|
||||||
|
this.pageForm.unitId = null
|
||||||
|
this.unitList = await this.$businessTool.listUnit(val)
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unionList = await this.$businessTool.listUnion()
|
||||||
|
this.unitList = await this.$businessTool.listUnit()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
|
|
||||||
Reference in New Issue
Block a user