福利名单添加功能:
1、人员名单:添加问题反馈、按工会确认、按工会取消确认、勾选确认、勾选取消确认;及添加按钮权限控制:导入名单、添加人员、备注、删除 2、确认统计 3、事项反馈
This commit is contained in:
+52
@@ -0,0 +1,52 @@
|
|||||||
|
package com.budwk.app.zhgh.welfare.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.welfare.service.WelfareListService;
|
||||||
|
import com.budwk.app.zhgh.welfare.service.WelfareProjectService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/welfare/personconfirm")
|
||||||
|
@Api("职工福利确认统计")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class WelfareConfirmStatisticsController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private WelfareListService welfareListService;
|
||||||
|
@Inject
|
||||||
|
private WelfareProjectService welfareProjectService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/welfare/personconfirm/index.html")
|
||||||
|
@SaCheckPermission("welfare.personconfirm")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("工会确认情况分页统计")
|
||||||
|
@SaCheckPermission("welfare.personconfirm")
|
||||||
|
public Result pageData(PageForm pageForm, Integer year, String projectId, String unionId) {
|
||||||
|
return Result.success(welfareListService.confirmStatistics(
|
||||||
|
pageForm.getPageNumber(),
|
||||||
|
pageForm.getPageSize(),
|
||||||
|
year,
|
||||||
|
projectId,
|
||||||
|
unionId
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("按年度查询福利项目")
|
||||||
|
@SaCheckPermission("welfare.personconfirm")
|
||||||
|
public Result listProject(Integer year) {
|
||||||
|
return Result.success(welfareProjectService.getWelfareList(year == null ? DateUtil.thisYear() : year));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.budwk.app.zhgh.welfare.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
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.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.welfare.service.WelfareFeedbackService;
|
||||||
|
import com.budwk.app.zhgh.welfare.service.WelfareListService;
|
||||||
|
import com.budwk.app.zhgh.welfare.service.WelfareProjectService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/welfare/feedback")
|
||||||
|
@Api("职工福利事项反馈")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class WelfareFeedbackController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private WelfareFeedbackService welfareFeedbackService;
|
||||||
|
@Inject
|
||||||
|
private WelfareProjectService welfareProjectService;
|
||||||
|
@Inject
|
||||||
|
private WelfareListService welfareListService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/welfare/feedbackQuery/index.html")
|
||||||
|
@SaCheckPermission("welfare.feedback")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("反馈列表分页")
|
||||||
|
@SaCheckPermission("welfare.feedback")
|
||||||
|
public Result pageData(PageForm pageForm, String year, String projectId, String unionId) {
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_WELFARE_ADMIN.name()) && StrUtil.isBlank(unionId)) {
|
||||||
|
unionId = SecurityUtil.getUnionId();
|
||||||
|
}
|
||||||
|
return Result.success(welfareFeedbackService.listFeedbackPage(
|
||||||
|
pageForm.getPageNumber(),
|
||||||
|
pageForm.getPageSize(),
|
||||||
|
year,
|
||||||
|
projectId,
|
||||||
|
unionId
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("批量删除反馈")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(tag = "职工福利事项反馈", msg = "批量删除反馈")
|
||||||
|
@SaCheckPermission("welfare.feedback")
|
||||||
|
public Result deleteFeedbackBatch(String ids) {
|
||||||
|
String[] idArray = welfareListService.parseIds(ids);
|
||||||
|
NutMap result = welfareFeedbackService.deleteFeedbackBatch(idArray);
|
||||||
|
if (result.getInt("code") == 0) {
|
||||||
|
return Result.success(result.getString("msg"));
|
||||||
|
}
|
||||||
|
return Result.error(result.getString("msg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("按年度查询福利项目")
|
||||||
|
@SaCheckPermission("welfare.feedback")
|
||||||
|
public Result listProject(Integer year) {
|
||||||
|
return Result.success(welfareProjectService.getWelfareList(year == null ? DateUtil.thisYear() : year));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,8 +4,10 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
|||||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
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.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.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
@@ -15,12 +17,14 @@ import com.budwk.app.base.result.Result;
|
|||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.base.utils.easyexcel.EasyExcelUtil;
|
import com.budwk.app.base.utils.easyexcel.EasyExcelUtil;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.welfare.mode.WelfareUserImportExcel;
|
import com.budwk.app.zhgh.welfare.mode.WelfareUserImportExcel;
|
||||||
import com.budwk.app.zhgh.welfare.mode.WelfareUserTemp;
|
import com.budwk.app.zhgh.welfare.mode.WelfareUserTemp;
|
||||||
import com.budwk.app.zhgh.welfare.model.WelfareList;
|
import com.budwk.app.zhgh.welfare.model.WelfareList;
|
||||||
import com.budwk.app.zhgh.welfare.model.WelfareUserSelection;
|
import com.budwk.app.zhgh.welfare.model.WelfareUserSelection;
|
||||||
import com.budwk.app.zhgh.welfare.param.WelfareFilterUserPageForm;
|
import com.budwk.app.zhgh.welfare.param.WelfareFilterUserPageForm;
|
||||||
import com.budwk.app.zhgh.welfare.param.WelfareListPageForm;
|
import com.budwk.app.zhgh.welfare.param.WelfareListPageForm;
|
||||||
|
import com.budwk.app.zhgh.welfare.service.WelfareFeedbackService;
|
||||||
import com.budwk.app.zhgh.welfare.service.WelfareListService;
|
import com.budwk.app.zhgh.welfare.service.WelfareListService;
|
||||||
import com.budwk.app.zhgh.welfare.service.WelfareProjectService;
|
import com.budwk.app.zhgh.welfare.service.WelfareProjectService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -61,6 +65,8 @@ public class WelfareListController {
|
|||||||
private WelfareListService welfareListService;
|
private WelfareListService welfareListService;
|
||||||
@Inject
|
@Inject
|
||||||
private WelfareProjectService welfareProjectService;
|
private WelfareProjectService welfareProjectService;
|
||||||
|
@Inject
|
||||||
|
private WelfareFeedbackService welfareFeedbackService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/welfare/welfareUser/index.html")
|
@Ok("beetl:/platform/zhgh/welfare/welfareUser/index.html")
|
||||||
@@ -70,7 +76,6 @@ public class WelfareListController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("welfare.list.mange")
|
@SaCheckPermission("welfare.list.mange")
|
||||||
@Ok("json:{dateFormat:'yyyy-MM-dd'}")
|
|
||||||
public Result pageData(@Valid @Param("pageForm") WelfareListPageForm pageForm) {
|
public Result pageData(@Valid @Param("pageForm") WelfareListPageForm pageForm) {
|
||||||
if (StrUtil.isBlank(pageForm.getProjectId())) {
|
if (StrUtil.isBlank(pageForm.getProjectId())) {
|
||||||
return Result.success(new Pagination<>(1, 10, 0, Collections.emptyList()));
|
return Result.success(new Pagination<>(1, 10, 0, Collections.emptyList()));
|
||||||
@@ -83,7 +88,7 @@ public class WelfareListController {
|
|||||||
@At
|
@At
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@ApiOperation("查询福利会员")
|
@ApiOperation("查询福利会员")
|
||||||
@SaCheckPermission("welfare.list.mange")
|
@SaCheckPermission(value = {"welfare.list.mange","welfare.list.mange.delete"}, mode = SaMode.AND)
|
||||||
@SLog(tag = "福利名单管理", msg = "管理员删除某个福利会员")
|
@SLog(tag = "福利名单管理", msg = "管理员删除某个福利会员")
|
||||||
public Result delete(String projectId, String userId, String id) {
|
public Result delete(String projectId, String userId, String id) {
|
||||||
welfareListService.delete(id);
|
welfareListService.delete(id);
|
||||||
@@ -100,7 +105,7 @@ public class WelfareListController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("welfare.list.mange")
|
@SaCheckPermission(value = {"welfare.list.mange","welfare.list.mange.addData"}, mode = SaMode.AND)
|
||||||
@ApiOperation("添加用户到福利名单")
|
@ApiOperation("添加用户到福利名单")
|
||||||
public Result addWelfareUser(@Valid @Param("pageForm") WelfareFilterUserPageForm pageForm) {
|
public Result addWelfareUser(@Valid @Param("pageForm") WelfareFilterUserPageForm pageForm) {
|
||||||
welfareListService.addWelfareUser(pageForm);
|
welfareListService.addWelfareUser(pageForm);
|
||||||
@@ -116,7 +121,7 @@ public class WelfareListController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("welfare.list.mange")
|
@SaCheckPermission(value = {"welfare.list.mange","welfare.list.mange.updateRemark"}, mode = SaMode.AND)
|
||||||
@ApiOperation("编辑备注")
|
@ApiOperation("编辑备注")
|
||||||
public Result updateRemark(@Param("remark") String remark, @Param("id") @Valid String id) {
|
public Result updateRemark(@Param("remark") String remark, @Param("id") @Valid String id) {
|
||||||
welfareListService.update(Chain.make("remark", remark), Cnd.where("id", "=", id));
|
welfareListService.update(Chain.make("remark", remark), Cnd.where("id", "=", id));
|
||||||
@@ -132,10 +137,82 @@ public class WelfareListController {
|
|||||||
entities.add(new ExcelExportEntity("工号", "loginname", 20));
|
entities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
entities.add(new ExcelExportEntity("姓名", "username", 20));
|
entities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
||||||
CommonDownloadUtil.download("福利名单模版.xlsx", workbook, response);
|
CommonDownloadUtil.download("福利名单模版.xlsx", workbook, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("welfare.list.mange")
|
||||||
|
@SLog(tag = "职工福利名单", msg = "按工会确认或取消确认福利名单")
|
||||||
|
public Result doAuditUser(String projectId, String unionId, Boolean flag) {
|
||||||
|
if (StrUtil.isBlank(projectId)) {
|
||||||
|
return Result.error("请选择福利项目");
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(unionId)) {
|
||||||
|
unionId = SecurityUtil.getUnionId();
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(unionId)) {
|
||||||
|
return Result.error("请选择分工会");
|
||||||
|
}
|
||||||
|
NutMap result = welfareListService.auditByProjectAndUnion(projectId, unionId, flag);
|
||||||
|
if (result.getInt("code") == 0) {
|
||||||
|
return Result.success(result.getString("msg"));
|
||||||
|
}
|
||||||
|
return Result.error(result.getString("msg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("welfare.list.mange")
|
||||||
|
@SLog(tag = "职工福利名单", msg = "按勾选人员确认或取消确认福利名单")
|
||||||
|
public Result doAuditSelected(String ids, Boolean flag) {
|
||||||
|
String[] idArray = welfareListService.parseIds(ids);
|
||||||
|
if (idArray.length == 0) {
|
||||||
|
return Result.error("请选择需要操作的人员");
|
||||||
|
}
|
||||||
|
welfareListService.auditSelected(idArray, flag);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("welfare.list.mange")
|
||||||
|
public Result feedbackList(String year, String projectId, String unionId) {
|
||||||
|
if (StrUtil.isBlank(unionId)) {
|
||||||
|
unionId = SecurityUtil.getUnionId();
|
||||||
|
}
|
||||||
|
if (StrUtil.hasBlank(year, projectId, unionId)) {
|
||||||
|
return Result.error("请选择年度、福利项目、分工会后再查看反馈");
|
||||||
|
}
|
||||||
|
return Result.success(welfareFeedbackService.listFeedback(year, projectId, unionId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("welfare.list.mange")
|
||||||
|
public Result saveFeedback(String year, String projectId, String unionId, String feedbackInfo) {
|
||||||
|
if (StrUtil.isBlank(unionId)) {
|
||||||
|
unionId = SecurityUtil.getUnionId();
|
||||||
|
}
|
||||||
|
NutMap result = welfareFeedbackService.saveFeedback(year, projectId, unionId, feedbackInfo);
|
||||||
|
if (result.getInt("code") == 0) {
|
||||||
|
return Result.success(result.getString("msg"));
|
||||||
|
}
|
||||||
|
return Result.error(result.getString("msg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("welfare.list.mange")
|
||||||
|
public Result deleteFeedback(String id) {
|
||||||
|
NutMap result = welfareFeedbackService.deleteFeedback(id);
|
||||||
|
if (result.getInt("code") == 0) {
|
||||||
|
return Result.success(result.getString("msg"));
|
||||||
|
}
|
||||||
|
return Result.error(result.getString("msg"));
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("welfare.list.mange")
|
@SaCheckPermission("welfare.list.mange")
|
||||||
@@ -192,7 +269,7 @@ public class WelfareListController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("welfare.list.mange")
|
@SaCheckPermission(value = {"welfare.list.mange","welfare.list.mange.delete"}, mode = SaMode.AND)
|
||||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
@SLog(tag = "福利名单管理", msg = "导入福利名单")
|
@SLog(tag = "福利名单管理", msg = "导入福利名单")
|
||||||
public Result importByExcel(@Param("file") TempFile tempFile, @Param("projectId") String projectId) {
|
public Result importByExcel(@Param("file") TempFile tempFile, @Param("projectId") String projectId) {
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.budwk.app.zhgh.welfare.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.ColDefine;
|
||||||
|
import org.nutz.dao.entity.annotation.ColType;
|
||||||
|
import org.nutz.dao.entity.annotation.Column;
|
||||||
|
import org.nutz.dao.entity.annotation.Comment;
|
||||||
|
import org.nutz.dao.entity.annotation.Name;
|
||||||
|
import org.nutz.dao.entity.annotation.Table;
|
||||||
|
import org.nutz.dao.entity.annotation.TableMeta;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("welfare_feedback")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("职工福利反馈")
|
||||||
|
public class WelfareFeedback extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("年度")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 4)
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("福利项目id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("福利项目名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("工会名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("反馈内容")
|
||||||
|
@ColDefine(type = ColType.TEXT)
|
||||||
|
private String feedbackInfo;
|
||||||
|
}
|
||||||
@@ -7,6 +7,8 @@ import lombok.experimental.Accessors;
|
|||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 福利名单
|
* 福利名单
|
||||||
*
|
*
|
||||||
@@ -96,4 +98,19 @@ public class WelfareList extends BaseModel{
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("确认状态")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean isAudit;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("确认时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
private Date auditTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("确认人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String auditUser;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,4 +55,7 @@ public class WelfareListPageForm extends PageForm {
|
|||||||
@ApiModelProperty("在职状态")
|
@ApiModelProperty("在职状态")
|
||||||
private String[] userStates;
|
private String[] userStates;
|
||||||
|
|
||||||
|
@ApiModelProperty("确认状态")
|
||||||
|
private String isAudit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.budwk.app.zhgh.welfare.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.welfare.model.WelfareFeedback;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface WelfareFeedbackService extends BaseService<WelfareFeedback> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query feedback records for the roster feedback dialog.
|
||||||
|
*/
|
||||||
|
List<NutMap> listFeedback(String year, String projectId, String unionId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save one feedback item and snapshot project/union names for later query pages.
|
||||||
|
*/
|
||||||
|
NutMap saveFeedback(String year, String projectId, String unionId, String feedbackInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete one feedback item from the roster feedback dialog.
|
||||||
|
*/
|
||||||
|
NutMap deleteFeedback(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete selected feedback rows from the feedback query page.
|
||||||
|
*/
|
||||||
|
NutMap deleteFeedbackBatch(String[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query feedback records for the standalone feedback query page.
|
||||||
|
*/
|
||||||
|
Pagination<NutMap> listFeedbackPage(Integer pageNumber, Integer pageSize, String year, String projectId, String unionId);
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import com.budwk.app.base.service.BaseService;
|
|||||||
import com.budwk.app.zhgh.welfare.model.WelfareList;
|
import com.budwk.app.zhgh.welfare.model.WelfareList;
|
||||||
import com.budwk.app.zhgh.welfare.param.WelfareFilterUserPageForm;
|
import com.budwk.app.zhgh.welfare.param.WelfareFilterUserPageForm;
|
||||||
import com.budwk.app.zhgh.welfare.param.WelfareListPageForm;
|
import com.budwk.app.zhgh.welfare.param.WelfareListPageForm;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.upload.TempFile;
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -52,4 +53,25 @@ public interface WelfareListService extends BaseService<WelfareList> {
|
|||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
void exportXlsx(WelfareListPageForm pageForm, HttpServletResponse response);
|
void exportXlsx(WelfareListPageForm pageForm, HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirm or cancel all welfare roster rows in one project and union.
|
||||||
|
*/
|
||||||
|
NutMap auditByProjectAndUnion(String projectId, String unionId, Boolean flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirm or cancel selected welfare roster rows by list ids.
|
||||||
|
*/
|
||||||
|
void auditSelected(String[] ids, Boolean flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Summarize welfare roster confirmation progress by union.
|
||||||
|
*/
|
||||||
|
Pagination<NutMap> confirmStatistics(Integer pageNumber, Integer pageSize, Integer year,
|
||||||
|
String projectId, String unionId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse comma-separated or JSON-array id values posted by list pages.
|
||||||
|
*/
|
||||||
|
String[] parseIds(String ids);
|
||||||
}
|
}
|
||||||
|
|||||||
+123
@@ -0,0 +1,123 @@
|
|||||||
|
package com.budwk.app.zhgh.welfare.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.sys.models.Sys_union;
|
||||||
|
import com.budwk.app.zhgh.welfare.model.WelfareFeedback;
|
||||||
|
import com.budwk.app.zhgh.welfare.model.WelfareProject;
|
||||||
|
import com.budwk.app.zhgh.welfare.service.WelfareFeedbackService;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class WelfareFeedbackServiceImpl extends BaseServiceImpl<WelfareFeedback> implements WelfareFeedbackService {
|
||||||
|
|
||||||
|
public WelfareFeedbackServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<NutMap> listFeedback(String year, String projectId, String unionId) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("year", "=", year)
|
||||||
|
.and("projectId", "=", projectId)
|
||||||
|
.and("unionId", "=", unionId)
|
||||||
|
.desc("createdAt");
|
||||||
|
List<WelfareFeedback> feedbackList = query(cnd);
|
||||||
|
List<NutMap> result = new ArrayList<>();
|
||||||
|
for (WelfareFeedback feedback : feedbackList) {
|
||||||
|
result.add(NutMap.NEW()
|
||||||
|
.addv("id", feedback.getId())
|
||||||
|
.addv("year", feedback.getYear())
|
||||||
|
.addv("projectName", feedback.getProjectName())
|
||||||
|
.addv("unionName", feedback.getUnionName())
|
||||||
|
.addv("feedbackInfo", feedback.getFeedbackInfo())
|
||||||
|
.addv("createdBy", feedback.getCreatedBy())
|
||||||
|
.addv("createdAt", feedback.getCreatedAt()));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NutMap saveFeedback(String year, String projectId, String unionId, String feedbackInfo) {
|
||||||
|
if (StrUtil.hasBlank(year, projectId, unionId)) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "请选择年度、福利项目、分工会后再录入反馈");
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(feedbackInfo)) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "请输入反馈信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
WelfareProject project = dao().fetch(WelfareProject.class, projectId);
|
||||||
|
if (project == null) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "当前福利项目不存在,请重新选择");
|
||||||
|
}
|
||||||
|
Sys_union union = dao().fetch(Sys_union.class, unionId);
|
||||||
|
if (union == null) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "当前分工会不存在,请重新选择");
|
||||||
|
}
|
||||||
|
|
||||||
|
WelfareFeedback feedback = new WelfareFeedback();
|
||||||
|
feedback.setYear(year);
|
||||||
|
feedback.setProjectId(projectId);
|
||||||
|
feedback.setProjectName(project.getName());
|
||||||
|
feedback.setUnionId(unionId);
|
||||||
|
feedback.setUnionName(union.getName());
|
||||||
|
feedback.setFeedbackInfo(feedbackInfo);
|
||||||
|
insert(feedback);
|
||||||
|
return NutMap.NEW().addv("code", 0).addv("msg", "保存成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NutMap deleteFeedback(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "反馈ID不能为空");
|
||||||
|
}
|
||||||
|
WelfareFeedback feedback = fetch(id);
|
||||||
|
if (feedback == null) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "反馈记录不存在");
|
||||||
|
}
|
||||||
|
delete(id);
|
||||||
|
return NutMap.NEW().addv("code", 0).addv("msg", "删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NutMap deleteFeedbackBatch(String[] ids) {
|
||||||
|
if (ids == null || ids.length == 0) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "请选择需要删除的反馈");
|
||||||
|
}
|
||||||
|
clear(Cnd.where("id", "in", ids));
|
||||||
|
return NutMap.NEW().addv("code", 0).addv("msg", "批量删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination<NutMap> listFeedbackPage(Integer pageNumber, Integer pageSize, String year, String projectId, String unionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
feedback.id,
|
||||||
|
feedback.year,
|
||||||
|
feedback.projectName,
|
||||||
|
feedback.unionName,
|
||||||
|
feedback.feedbackInfo,
|
||||||
|
feedback.createdAt,
|
||||||
|
user.username AS createdByName
|
||||||
|
FROM welfare_feedback feedback
|
||||||
|
LEFT JOIN sys_user user ON user.id = feedback.createdBy
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("feedback.year", "=", year);
|
||||||
|
cnd.andEX("feedback.projectId", "=", projectId);
|
||||||
|
cnd.andEX("feedback.unionId", "=", unionId);
|
||||||
|
cnd.desc("feedback.createdAt");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageNumber, pageSize, sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,8 +7,10 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
|
|||||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
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;
|
||||||
@@ -389,7 +391,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
|||||||
t2.loginname,
|
t2.loginname,
|
||||||
t2.username,
|
t2.username,
|
||||||
t2.sex,
|
t2.sex,
|
||||||
t2.birthday
|
DATE_FORMAT(t2.birthday,'%Y-%m-%d') birthday
|
||||||
FROM
|
FROM
|
||||||
`welfare_list` t1
|
`welfare_list` t1
|
||||||
LEFT JOIN `vw_user` t2 ON t2.id = t1.userId
|
LEFT JOIN `vw_user` t2 ON t2.id = t1.userId
|
||||||
@@ -416,6 +418,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
|||||||
cnd.andEX("t1.personType", "in", pageForm.getPersonTypes());
|
cnd.andEX("t1.personType", "in", pageForm.getPersonTypes());
|
||||||
cnd.andEX("t1.preparedBy", "in", pageForm.getPreparedBys());
|
cnd.andEX("t1.preparedBy", "in", pageForm.getPreparedBys());
|
||||||
cnd.andEX("t1.userState", "in", pageForm.getUserStates());
|
cnd.andEX("t1.userState", "in", pageForm.getUserStates());
|
||||||
|
appendAuditFilter(cnd, pageForm.getIsAudit(), "t1");
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.asc("t1.welfareUnionName");
|
cnd.asc("t1.welfareUnionName");
|
||||||
cnd.asc("t1.welfareUnitName");
|
cnd.asc("t1.welfareUnitName");
|
||||||
@@ -587,6 +590,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
|||||||
cnd.andEX("t1.personType", "in", pageForm.getPersonTypes());
|
cnd.andEX("t1.personType", "in", pageForm.getPersonTypes());
|
||||||
cnd.andEX("t1.preparedBy", "in", pageForm.getPreparedBys());
|
cnd.andEX("t1.preparedBy", "in", pageForm.getPreparedBys());
|
||||||
cnd.andEX("t1.userState", "in", pageForm.getUserStates());
|
cnd.andEX("t1.userState", "in", pageForm.getUserStates());
|
||||||
|
appendAuditFilter(cnd, pageForm.getIsAudit(), "t1");
|
||||||
|
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.asc("t1.welfareUnionName");
|
cnd.asc("t1.welfareUnionName");
|
||||||
@@ -609,6 +613,14 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
|||||||
entities.add(new ExcelExportEntity("所属工会", "welfareUnionName", 20));
|
entities.add(new ExcelExportEntity("所属工会", "welfareUnionName", 20));
|
||||||
entities.add(new ExcelExportEntity("所属单位", "welfareUnitName", 20));
|
entities.add(new ExcelExportEntity("所属单位", "welfareUnitName", 20));
|
||||||
entities.add(new ExcelExportEntity("备注", "remark", 20));
|
entities.add(new ExcelExportEntity("备注", "remark", 20));
|
||||||
|
entities.add(new ExcelExportEntity("确认状态", "isAuditText", 20));
|
||||||
|
entities.add(new ExcelExportEntity("确认时间", "auditTimeText", 25));
|
||||||
|
|
||||||
|
for (NutMap row : list) {
|
||||||
|
row.put("isAuditText", Boolean.TRUE.equals(row.getBoolean("isAudit")) ? "已确认" : "未确认");
|
||||||
|
Object auditTime = row.get("auditTime");
|
||||||
|
row.put("auditTimeText", auditTime instanceof Date ? DateUtil.format((Date) auditTime, "yyyy-MM-dd HH:mm:ss") : "");
|
||||||
|
}
|
||||||
|
|
||||||
// 设置导出参数
|
// 设置导出参数
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
@@ -620,4 +632,102 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
|||||||
log.error("导出Excel失败", e);
|
log.error("导出Excel失败", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NutMap auditByProjectAndUnion(String projectId, String unionId, Boolean flag) {
|
||||||
|
Cnd cnd = Cnd.NEW()
|
||||||
|
.and("projectId", "=", projectId)
|
||||||
|
.and("welfareUnionId", "=", unionId);
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_WELFARE_ADMIN.name())) {
|
||||||
|
cnd.and("welfareUnionId", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
// The page treats union confirmation as a bulk operation, so empty data must be reported explicitly.
|
||||||
|
if (count(cnd) == 0) {
|
||||||
|
return NutMap.NEW().addv("code", 1).addv("msg", "确认失败,暂无数据");
|
||||||
|
}
|
||||||
|
updateAuditState(cnd, flag);
|
||||||
|
return NutMap.NEW().addv("code", 0).addv("msg", "操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void auditSelected(String[] ids, Boolean flag) {
|
||||||
|
if (ids == null || ids.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Cnd cnd = Cnd.where("id", "in", ids);
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_WELFARE_ADMIN.name())) {
|
||||||
|
cnd.and("welfareUnionId", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
updateAuditState(cnd, flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination<NutMap> confirmStatistics(Integer pageNumber, Integer pageSize, Integer year, String projectId, String unionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
su.id AS unionId,
|
||||||
|
su.name AS unionName,
|
||||||
|
COUNT(CASE WHEN project.id IS NOT NULL THEN info.id END) AS totalCount,
|
||||||
|
SUM(CASE WHEN project.id IS NOT NULL AND info.isAudit = 1 THEN 1 ELSE 0 END) AS confirmedCount,
|
||||||
|
SUM(CASE WHEN project.id IS NOT NULL AND info.id IS NOT NULL AND (info.isAudit IS NULL OR info.isAudit <> 1) THEN 1 ELSE 0 END) AS unconfirmedCount,
|
||||||
|
CASE
|
||||||
|
WHEN COUNT(CASE WHEN project.id IS NOT NULL THEN info.id END) > 0
|
||||||
|
AND COUNT(CASE WHEN project.id IS NOT NULL THEN info.id END) = SUM(CASE WHEN project.id IS NOT NULL AND info.isAudit = 1 THEN 1 ELSE 0 END) THEN '已完成'
|
||||||
|
ELSE '未完成'
|
||||||
|
END AS completeStatus
|
||||||
|
FROM sys_union su
|
||||||
|
LEFT JOIN welfare_list info ON info.welfareUnionId = su.id
|
||||||
|
AND info.projectId = @projectId
|
||||||
|
AND info.delFlag = 0
|
||||||
|
LEFT JOIN welfare_project project ON project.id = info.projectId
|
||||||
|
AND project.delFlag = 0
|
||||||
|
AND project.year = @year
|
||||||
|
$condition
|
||||||
|
""").setParam("projectId", projectId).setParam("year", year);
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("su.id", "=", unionId);
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_WELFARE_ADMIN.name())) {
|
||||||
|
cnd.and("su.id", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
cnd.groupBy("su.id,su.name");
|
||||||
|
cnd.asc("completeStatus");
|
||||||
|
cnd.asc("su.unionCode");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageNumber, pageSize, sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] parseIds(String ids) {
|
||||||
|
if (StrUtil.isBlank(ids)) {
|
||||||
|
return new String[0];
|
||||||
|
}
|
||||||
|
String value = ids.trim();
|
||||||
|
if (value.startsWith("[")) {
|
||||||
|
return JSONUtil.parseArray(value).toList(String.class).toArray(new String[0]);
|
||||||
|
}
|
||||||
|
return value.split(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void appendAuditFilter(Cnd cnd, String isAudit, String alias) {
|
||||||
|
if (StrUtil.isBlank(isAudit)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ("1".equals(isAudit)) {
|
||||||
|
cnd.and(alias + ".isAudit", "=", true);
|
||||||
|
} else if ("0".equals(isAudit)) {
|
||||||
|
cnd.and(Cnd.exps(alias + ".isAudit", "=", false).or(alias + ".isAudit", "is", null));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateAuditState(Cnd cnd, Boolean flag) {
|
||||||
|
Chain chain = Chain.make("isAudit", Boolean.TRUE.equals(flag));
|
||||||
|
if (Boolean.TRUE.equals(flag)) {
|
||||||
|
chain.add("auditTime", new Date());
|
||||||
|
chain.add("auditUser", SecurityUtil.getUserId());
|
||||||
|
} else {
|
||||||
|
chain.add("auditTime", null);
|
||||||
|
chain.add("auditUser", null);
|
||||||
|
}
|
||||||
|
dao().update(WelfareList.class, chain, cnd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,179 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
<div id="app" class="platform" v-cloak>
|
||||||
|
<guava ref="guava" padding="0 5%">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker v-model="pageForm.year"
|
||||||
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="yearChange"></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="福利项目">
|
||||||
|
<el-select v-model="pageForm.projectId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择福利项目"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="doSearch">
|
||||||
|
<el-option v-for="item in projectOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="分工会" v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN', 'SCHOOL_UNION_WELFARE_ADMIN'])">
|
||||||
|
<el-select v-model="pageForm.unionId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择分工会"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="doSearch">
|
||||||
|
<el-option v-for="item in unions"
|
||||||
|
: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 type="danger"
|
||||||
|
size="small"
|
||||||
|
:disabled="selectedFeedbackIds.length === 0"
|
||||||
|
@click="deleteFeedbackBatch">批量删除</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
row-key="id"
|
||||||
|
:size="tableSize"
|
||||||
|
v-loading="tableLoading"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
ref="table"
|
||||||
|
class="vi-table">
|
||||||
|
<el-table-column type="selection" width="55" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column type="index" :index="indexMethod" label="序号" width="80px" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column prop="year" label="年度" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column prop="projectName" label="福利项目" min-width="180px" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="unionName" label="分工会" min-width="160px" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="feedbackInfo" label="反馈信息" min-width="240px" align="center" header-align="center" show-overflow-tooltip>
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<div v-html="row.feedbackInfo" style="white-space: pre-line !important;"></div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createdByName" label="创建人" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column prop="createdAt" label="创建时间" width="180px" align="center" header-align="center">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
{{ row.createdAt ? $moment(row.createdAt).format("YYYY-MM-DD HH:mm:ss") : "" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY")
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
selectedFeedbackIds: [],
|
||||||
|
unions: [],
|
||||||
|
projectOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelectionChange(rows) {
|
||||||
|
this.selectedFeedbackIds = rows.map(function (item) {
|
||||||
|
return item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
yearChange() {
|
||||||
|
return $.get("/platform/welfare/feedback/listProject", {year: this.pageForm.year}).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.projectOptions = resp.data || []
|
||||||
|
if (this.projectOptions.length > 0) {
|
||||||
|
const currentProjectId = this.pageForm.projectId
|
||||||
|
if (!currentProjectId || !this.projectOptions.some(function (item) {
|
||||||
|
return item.id === currentProjectId
|
||||||
|
})) {
|
||||||
|
this.pageForm.projectId = this.projectOptions[0].id
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.pageForm.projectId = ""
|
||||||
|
}
|
||||||
|
this.doSearch()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.tableLoading = true
|
||||||
|
return $.post("/platform/welfare/feedback/pageData", this.pageForm).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.tableData = resp.data.list || []
|
||||||
|
this.selectedFeedbackIds = []
|
||||||
|
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
}).always(() => {
|
||||||
|
this.tableLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doSearch() {
|
||||||
|
this.pageForm.pageNumber = 1
|
||||||
|
return this.pageData()
|
||||||
|
},
|
||||||
|
deleteFeedbackBatch() {
|
||||||
|
if (this.selectedFeedbackIds.length === 0) {
|
||||||
|
this.notifyWarning("请选择需要删除的反馈")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm("确认批量删除选中的反馈吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
$.post("/platform/welfare/feedback/deleteFeedbackBatch", {
|
||||||
|
ids: this.selectedFeedbackIds.join(",")
|
||||||
|
}).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
this.pageData()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$businessTool.listUnion().then((res) => {
|
||||||
|
this.unions = res
|
||||||
|
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
|
||||||
|
this.pageForm.unionId = this.unions[0].id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.yearChange()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
<div id="app" class="platform" v-cloak>
|
||||||
|
<guava ref="guava" padding="0 5%">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker v-model="pageForm.year"
|
||||||
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="yearChange"></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="福利项目">
|
||||||
|
<el-select v-model="pageForm.projectId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择福利项目"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="doSearch">
|
||||||
|
<el-option v-for="item in projectOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会">
|
||||||
|
<el-select v-model="pageForm.unionId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择所属工会"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="doSearch">
|
||||||
|
<el-option v-for="item in unions"
|
||||||
|
: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"
|
||||||
|
row-key="unionId"
|
||||||
|
style="width: 100%"
|
||||||
|
v-loading="tableLoading"
|
||||||
|
ref="table"
|
||||||
|
class="vi-table">
|
||||||
|
<el-table-column type="index" :index="indexMethod" label="序号" width="80px" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column prop="unionName" label="工会名称" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="totalCount" label="总人数" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column prop="confirmedCount" label="已确认人数" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column prop="unconfirmedCount" label="未确认人数" align="center" header-align="center"></el-table-column>
|
||||||
|
<el-table-column prop="completeStatus" label="确认完成状态" align="center" header-align="center"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
year: moment().format("YYYY")
|
||||||
|
},
|
||||||
|
unions: [],
|
||||||
|
projectOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
yearChange() {
|
||||||
|
return $.get("/platform/welfare/personconfirm/listProject", {year: this.pageForm.year}).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.projectOptions = resp.data || []
|
||||||
|
if (this.projectOptions.length > 0) {
|
||||||
|
this.$set(this.pageForm, "projectId", this.projectOptions[0].id)
|
||||||
|
} else {
|
||||||
|
this.$set(this.pageForm, "projectId", "")
|
||||||
|
}
|
||||||
|
this.doSearch()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
if (!this.pageForm.year || !this.pageForm.projectId) {
|
||||||
|
this.tableData = []
|
||||||
|
this.pageForm.totalCount = 0
|
||||||
|
return Promise.resolve()
|
||||||
|
}
|
||||||
|
this.tableLoading = true
|
||||||
|
return $.post("/platform/welfare/personconfirm/pageData", this.pageForm).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.tableData = resp.data.list || []
|
||||||
|
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
}).always(() => {
|
||||||
|
this.tableLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doSearch() {
|
||||||
|
this.pageForm.pageNumber = 1
|
||||||
|
return this.pageData()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$businessTool.listUnion().then((res) => {
|
||||||
|
this.unions = res
|
||||||
|
if (!this.pageForm.unionId && this.unions && this.unions.length === 1) {
|
||||||
|
this.pageForm.unionId = this.unions[0].id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.yearChange()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -120,6 +120,13 @@ layout("/layouts/platform.html"){
|
|||||||
></dict-select>
|
></dict-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
|
||||||
|
<search-item label="确认状态">
|
||||||
|
<el-select clearable placeholder="请选择确认状态" style="width: 100%" v-model="pageForm.isAudit">
|
||||||
|
<el-option label="已确认" value="1"></el-option>
|
||||||
|
<el-option label="未确认" value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
|
||||||
<!-- <search-item label="所选福利:">-->
|
<!-- <search-item label="所选福利:">-->
|
||||||
<!-- <el-select clearable placeholder="请选择所选福利" style="width: 100%" v-model="pageForm.optionId">-->
|
<!-- <el-select clearable placeholder="请选择所选福利" style="width: 100%" v-model="pageForm.optionId">-->
|
||||||
<!-- <el-option :key="item.id" :label="item.optionName" :value="item.id" v-for="item in pageFormProject"></el-option>-->
|
<!-- <el-option :key="item.id" :label="item.optionName" :value="item.id" v-for="item in pageFormProject"></el-option>-->
|
||||||
@@ -133,29 +140,39 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button :disabled="!pageForm.projectId" @click="openExport" icon="el-icon-download" size="small" type="primary">
|
<el-button :disabled="!pageForm.projectId" @click="openExport" icon="el-icon-download" size="small" type="primary">
|
||||||
导出名单
|
导出名单
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button :disabled="!pageForm.projectId" @click="openImport" icon="el-icon-document-add" size="small" type="primary">
|
<el-button :disabled="!pageForm.projectId"
|
||||||
|
v-if="$auth.hasPermission('welfare.list.mange.addData')"
|
||||||
|
@click="openImport" icon="el-icon-document-add" size="small" type="primary">
|
||||||
导入名单
|
导入名单
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="!pageForm.projectId"
|
:disabled="!pageForm.projectId"
|
||||||
@click="$refs.addUserRef.onOpen(pageForm.projectId)"
|
@click="$refs.addUserRef.onOpen(pageForm.projectId)"
|
||||||
|
v-if="$auth.hasPermission('welfare.list.mange.addData')"
|
||||||
icon="el-icon-document-add"
|
icon="el-icon-document-add"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
添加人员
|
添加人员
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="primary" size="small" :disabled="!pageForm.projectId" @click="openFeedback">问题反馈</el-button>
|
||||||
|
<el-button type="primary" size="small" :disabled="!pageForm.projectId" @click="doAuditByUnion(true)">按工会确认</el-button>
|
||||||
|
<el-button type="danger" size="small" :disabled="!pageForm.projectId" @click="doAuditByUnion(false)">按工会取消确认</el-button>
|
||||||
|
<el-button type="primary" size="small" :disabled="selectedIds.length === 0" @click="doAuditSelected(true)">勾选确认</el-button>
|
||||||
|
<el-button type="danger" size="small" :disabled="selectedIds.length === 0" @click="doAuditSelected(false)">勾选取消确认</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:size="tableSize"
|
:size="tableSize"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
@sort-change="pageOrder"
|
@sort-change="pageOrder"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
>
|
>
|
||||||
|
<el-table-column align="center" header-align="center" type="selection" width="55"></el-table-column>
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -178,11 +195,18 @@ layout("/layouts/platform.html"){
|
|||||||
<el-image :src="row.userSign" fit="cover" style="height: 60px" v-if="row.userSign"></el-image>
|
<el-image :src="row.userSign" fit="cover" style="height: 60px" v-if="row.userSign"></el-image>
|
||||||
<el-tag type="warning" v-else>暂无</el-tag>
|
<el-tag type="warning" v-else>暂无</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
<template scope="{row}" v-else-if="column.prop=='isAudit'">
|
||||||
|
<el-tag type="success" v-if="row.isAudit">已确认</el-tag>
|
||||||
|
<el-tag type="info" v-else>未确认</el-tag>
|
||||||
|
</template>
|
||||||
|
<template scope="{row}" v-else-if="column.prop=='auditTime'">
|
||||||
|
{{ row.auditTime ? $moment(row.auditTime).format("YYYY-MM-DD HH:mm:ss") : "" }}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="200px">
|
<el-table-column align="center" fixed="right" v-if="$auth.hasPermissionOr(['welfare.list.mange.updateRemark','welfare.list.mange.delete'])" header-align="center" label="操作" width="200px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button @click="$refs.updateRemarkRef.onOpen(row)" size="mini" type="primary">备注</el-button>
|
<el-button @click="$refs.updateRemarkRef.onOpen(row)" v-if="$auth.hasPermission('welfare.list.mange.updateRemark')" size="mini" type="primary">备注</el-button>
|
||||||
<el-button @click="doDelete(row)" size="mini" type="danger">删除</el-button>
|
<el-button @click="doDelete(row)" v-if="$auth.hasPermission('welfare.list.mange.delete')" size="mini" type="danger">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -210,6 +234,26 @@ layout("/layouts/platform.html"){
|
|||||||
<!--人员备注-->
|
<!--人员备注-->
|
||||||
<update-remark ref="updateRemarkRef" @refresh="doSearch"></update-remark>
|
<update-remark ref="updateRemarkRef" @refresh="doSearch"></update-remark>
|
||||||
|
|
||||||
|
<el-dialog :close-on-click-modal="false" :visible.sync="feedbackDialog" title="问题反馈" width="60%">
|
||||||
|
<el-form :model="feedbackForm" label-width="100px">
|
||||||
|
<el-form-item label="反馈信息">
|
||||||
|
<el-input placeholder="请输入反馈信息" type="textarea" v-model="feedbackForm.feedbackInfo"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row class="mb10" justify="end" type="flex">
|
||||||
|
<el-button plain type="primary" @click="feedbackDialog = false">取消</el-button>
|
||||||
|
<el-button type="primary" v-loading="feedbackLoading" @click="saveFeedback">保存</el-button>
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="feedbackList" border>
|
||||||
|
<el-table-column align="center" label="问题反馈" prop="feedbackInfo" show-overflow-tooltip="false"></el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="100px">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-button size="mini" type="danger" @click="deleteFeedback(row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!--导入福利名单-->
|
<!--导入福利名单-->
|
||||||
<excel-import
|
<excel-import
|
||||||
ref="excelImportRef"
|
ref="excelImportRef"
|
||||||
@@ -269,7 +313,9 @@ layout("/layouts/platform.html"){
|
|||||||
{ prop: "userState", label: "在职状态", sortable: true },
|
{ prop: "userState", label: "在职状态", sortable: true },
|
||||||
{ prop: "welfareUnionName", label: "所属工会", sortable: true },
|
{ prop: "welfareUnionName", label: "所属工会", sortable: true },
|
||||||
{ prop: "welfareUnitName", label: "所属单位", sortable: true },
|
{ prop: "welfareUnitName", label: "所属单位", sortable: true },
|
||||||
{ prop: "remark", label: "备注", sortable: true }
|
{ prop: "isAudit", label: "确认状态", sortable: true },
|
||||||
|
{ prop: "auditTime", label: "确认时间", sortable: true },
|
||||||
|
{ prop: "remark", label: "备注", sortable: true },
|
||||||
],
|
],
|
||||||
|
|
||||||
importData: { fileList: [], isfg: 1 },
|
importData: { fileList: [], isfg: 1 },
|
||||||
@@ -278,10 +324,25 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
welfareListUserDrawer: false,
|
welfareListUserDrawer: false,
|
||||||
|
|
||||||
showImportDialog: false
|
showImportDialog: false,
|
||||||
|
selectedIds: [],
|
||||||
|
feedbackDialog: false,
|
||||||
|
feedbackLoading: false,
|
||||||
|
feedbackList: [],
|
||||||
|
feedbackForm: {
|
||||||
|
year: "",
|
||||||
|
projectId: "",
|
||||||
|
unionId: "",
|
||||||
|
feedbackInfo: ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSelectionChange(rows) {
|
||||||
|
this.selectedIds = rows.map(function (item) {
|
||||||
|
return item.id
|
||||||
|
})
|
||||||
|
},
|
||||||
// 导出名单
|
// 导出名单
|
||||||
openExport() {
|
openExport() {
|
||||||
this.$downLoad("/platform/welfare/list/mange/exportXlsx", {
|
this.$downLoad("/platform/welfare/list/mange/exportXlsx", {
|
||||||
@@ -307,16 +368,139 @@ layout("/layouts/platform.html"){
|
|||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(async () => {
|
}).then(() => {
|
||||||
const resp = await this.$axios.post("/platform/welfare/list/mange/delete", { id: row.id })
|
this.$axios.post("/platform/welfare/list/mange/delete", { id: row.id }).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
} else {
|
||||||
|
this.$message.error(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
validateFeedbackCondition() {
|
||||||
|
if (!this.pageForm.year || !this.pageForm.projectId) {
|
||||||
|
this.notifyWarning("请先选择年度、福利项目")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"]) && !this.pageForm.unionId) {
|
||||||
|
this.notifyWarning("请选择分工会")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
openFeedback() {
|
||||||
|
if (!this.validateFeedbackCondition()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.feedbackForm.year = this.pageForm.year
|
||||||
|
this.feedbackForm.projectId = this.pageForm.projectId
|
||||||
|
this.feedbackForm.unionId = this.pageForm.unionId
|
||||||
|
this.feedbackForm.feedbackInfo = ""
|
||||||
|
this.queryFeedbackList().then(() => {
|
||||||
|
this.feedbackDialog = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryFeedbackList() {
|
||||||
|
return this.$axios.post("/platform/welfare/list/mange/feedbackList", {
|
||||||
|
year: this.pageForm.year,
|
||||||
|
projectId: this.pageForm.projectId,
|
||||||
|
unionId: this.pageForm.unionId
|
||||||
|
}).then((resp) => {
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.feedbackList = resp.data || []
|
||||||
this.doSearch()
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(resp.msg)
|
this.notifyError(resp.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
saveFeedback() {
|
||||||
|
if (!this.validateFeedbackCondition()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.feedbackForm.feedbackInfo) {
|
||||||
|
this.notifyWarning("请输入反馈信息")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.feedbackLoading = true
|
||||||
|
this.$axios.post("/platform/welfare/list/mange/saveFeedback", this.feedbackForm).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
this.feedbackForm.feedbackInfo = ""
|
||||||
|
this.queryFeedbackList()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.feedbackLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deleteFeedback(row) {
|
||||||
|
this.$confirm("确认删除这条反馈吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/welfare/list/mange/deleteFeedback", { id: row.id }).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
this.queryFeedbackList()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doAuditByUnion(flag) {
|
||||||
|
if (!this.pageForm.projectId) {
|
||||||
|
this.notifyWarning("请先选择福利项目")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"]) && !this.pageForm.unionId) {
|
||||||
|
this.notifyWarning("请选择需要确认的分工会")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const msg = flag ? "确定按当前福利项目和分工会确认名单吗?" : "确定按当前福利项目和分工会取消确认吗?"
|
||||||
|
this.$confirm(msg, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/welfare/list/mange/doAuditUser", {
|
||||||
|
projectId: this.pageForm.projectId,
|
||||||
|
unionId: this.pageForm.unionId,
|
||||||
|
flag: flag
|
||||||
|
}).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doAuditSelected(flag) {
|
||||||
|
const msg = flag ? "确定确认勾选人员吗?" : "确定取消确认勾选人员吗?"
|
||||||
|
this.$confirm(msg, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/welfare/list/mange/doAuditSelected", {
|
||||||
|
ids: this.selectedIds.join(","),
|
||||||
|
flag: flag
|
||||||
|
}).then((resp) => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.notifySuccess(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
} else {
|
||||||
|
this.notifyError(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
getWelfareList() {
|
getWelfareList() {
|
||||||
this.$axios.post("/platform/welfare/project/mange/getWelfareList", { year: this.pageForm.year }).then((res) => {
|
this.$axios.post("/platform/welfare/project/mange/getWelfareList", { year: this.pageForm.year }).then((res) => {
|
||||||
this.projectSelectOptions = res.data
|
this.projectSelectOptions = res.data
|
||||||
@@ -336,6 +520,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.tableData = res.data.list
|
this.tableData = res.data.list
|
||||||
|
this.selectedIds = []
|
||||||
this.pageForm.totalCount = res.data.totalCount
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user