Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
# Conflicts: # src/main/resources/views/platform/zhgh/democratic/executiveCommittee/delegationOnePush/index.html # src/main/resources/views/platform/zhgh/democratic/executiveCommittee/delegationTwoPush/index.html # src/main/resources/views/platform/zhgh/democratic/executiveCommittee/executiveCommitteeMember/index.html # src/main/resources/views/platform/zhgh/democratic/executiveCommittee/preparatoryGroupPush/index.html
This commit is contained in:
@@ -45,6 +45,8 @@ RoleConstant {
|
||||
BRANCH_UNION_SHENGGHUO_WY("分工会生活委员"),
|
||||
BRANCH_UNION_TIAOJIE_WY("分工会调解委员"),
|
||||
|
||||
UNIT_PARTY_SECRETARY("单位党委书记"),
|
||||
|
||||
TEACHER_CONGRESS_DELEGATE_FORMAL("教代会正式代表"),
|
||||
TEACHER_CONGRESS_DELEGATE_ATTENDANCE("教代会列席代表"),
|
||||
TEACHER_CONGRESS_DELEGATE_SPECIALLY_INVITE("教代会特邀代表"),
|
||||
@@ -58,7 +60,6 @@ RoleConstant {
|
||||
PROPOSAL_UNIT_LEADER("提案承办单位领导"),
|
||||
PROPOSAL_UNIT_PROXY("提案承办单位代理答复人"),
|
||||
|
||||
|
||||
WORKER_CONGRESS_DELEGATE_FORMAL("工代会正式代表"),
|
||||
WORKER_CONGRESS_DELEGATE_ATTENDANCE("工代会列席代表"),
|
||||
WORKER_CONGRESS_DELEGATE_SPECIALLY_INVITE("工代会特邀代表"),
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.ClassScanner;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
@@ -21,6 +22,7 @@ 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.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -220,9 +222,16 @@ public class FlowDesignController {
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取流程设计任务参与者分页数据")
|
||||
public Result assigneePage(Integer pageNumber, Integer pageSize, String keyword, @Param("userIds") String[] userIds) {
|
||||
public Result assigneePage(Integer pageNumber, Integer pageSize, String searchKeyword, @Param("userIds") String[] userIds) {
|
||||
Sql sql = Sqls.create("select id,loginname,username,unitName from vw_user $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if(StrUtil.isNotBlank(searchKeyword)) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("username", searchKeyword);
|
||||
group.orLike("loginname", searchKeyword);
|
||||
cnd.and(group);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
// cnd.andEX("id", "in", userIds);
|
||||
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
|
||||
return Result.success(pagination);
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName FlowUnitPartySecretaryHandler
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/10/15 10:55
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
public class FlowUnitPartySecretaryHandler implements AssignmentHandler {
|
||||
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
String unitId = SecurityUtil.getUnitId();
|
||||
|
||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.UNIT_PARTY_SECRETARY);
|
||||
|
||||
List<Sys_user_role> roles = ServiceContext.find(Dao.class).query(
|
||||
Sys_user_role.class,
|
||||
Cnd.where(Sys_user_role::getRoleId, "=", role.getId())
|
||||
.and(Sys_user_role::getUnitId, "=", unitId)
|
||||
);
|
||||
|
||||
if (Lang.isEmpty(roles)) {
|
||||
throw new RuntimeException("当前登录用户所在单位未设置单位党委书记,请联系校工会进行设置。");
|
||||
}
|
||||
return roles.stream().map(Sys_user_role::getUserId).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "获取当前登录用户所在单位党委书记";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return AssignmentHandler.super.getOrder();
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,8 @@ public class SysHomeController {
|
||||
);
|
||||
List<Sys_menu> menus = sysUserService.getMenus(SecurityUtil.getUserId());
|
||||
List<String> allMenuIds = menus.stream().map(Sys_menu::getId).toList();
|
||||
List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
|
||||
//List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
|
||||
List<Sys_menu> sysMenus = list.stream().sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
|
||||
return Result.success(sysMenus);
|
||||
}
|
||||
|
||||
@@ -166,7 +167,8 @@ public class SysHomeController {
|
||||
);
|
||||
List<Sys_menu> menus = sysUserService.getMenus(SecurityUtil.getUserId());
|
||||
List<String> allMenuIds = menus.stream().map(Sys_menu::getId).toList();
|
||||
List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
|
||||
//List<Sys_menu> sysMenus = list.stream().filter(m -> allMenuIds.contains(m.getId())).sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
|
||||
List<Sys_menu> sysMenus = list.stream().sorted(Comparator.comparingInt(Sys_menu::getLocation)).toList();
|
||||
return Result.success(sysMenus);
|
||||
}
|
||||
|
||||
@@ -206,6 +208,10 @@ public class SysHomeController {
|
||||
// if (!DateUtil.isIn(today, startDate, endDate)) {
|
||||
// continue;
|
||||
// }
|
||||
// 只过滤结束的
|
||||
if (DateUtil.compare(today, endDate) > 0) {
|
||||
continue;
|
||||
}
|
||||
Integer allowUserGroupId = activity.getAllowUserGroupId();
|
||||
String allowUserSql = activity.getAllowUserSql();
|
||||
activity.setAllowUserSql(null);
|
||||
|
||||
@@ -207,4 +207,7 @@ public class View_user {
|
||||
|
||||
@Column
|
||||
private String clubIds;
|
||||
|
||||
@Column
|
||||
private Boolean aidFundMember;
|
||||
}
|
||||
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
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;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/query")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员-查询")
|
||||
public class FundMemberQueryController {
|
||||
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/query/index.html")
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public Result pageData(PageForm pageForm, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
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
|
||||
FROM
|
||||
fund_member info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
seg.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("YEAR(info.submitTime)", "=", year);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@Ok("void")
|
||||
public void exportExcel(Integer year, HttpServletResponse response) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.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.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.model.ExcelImportRes;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
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.dayofficework.fund.member.mode.FundMemberImportExcelMode;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Chain;
|
||||
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.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/batchJoin")
|
||||
@Ok("json:full")
|
||||
@Api("基金会员-批量加入")
|
||||
public class FundMemberBatchJoinController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
@Inject
|
||||
private FundMemberChangeRecordService fundMemberChangeRecordService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/batchJoin/index.html")
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
public Result pageData(PageForm pageForm, String unionId, String unitId, String userState) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
loginname,
|
||||
sex,
|
||||
userState,
|
||||
unitName,
|
||||
unionName
|
||||
FROM
|
||||
vw_user
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("aidFundMember", "!=", 1);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username", pageForm.getSearchKeyword());
|
||||
seg.orLike("loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
cnd.andEX("unitId", "=", unitId);
|
||||
cnd.andEX("userState", "=", userState);
|
||||
cnd.asc("unionName").asc("unitName").asc("id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
@ApiOperation("批量加入")
|
||||
@SLog(tag = "基金会员-批量加入", msg = "批量加入")
|
||||
public Result confirm(@Param("loginNames") String[] loginNames) {
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where("id", "in", loginNames));
|
||||
for (String loginName : loginNames) {
|
||||
fundMemberChangeRecordService.insertRecord(loginName, true, "批量加入");
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
@ApiOperation("批量导入")
|
||||
@SLog(tag = "基金会员-批量导入", msg = "批量导入")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result batchImport(@Param("file") TempFile file) {
|
||||
// 读取
|
||||
List<FundMemberImportExcelMode> importMembers = ExcelImportUtil.importExcel(file.getFile(), FundMemberImportExcelMode.class, new ImportParams());
|
||||
// 创建结果集
|
||||
ExcelImportRes<FundMemberImportExcelMode> excelImportRes = new ExcelImportRes<>();
|
||||
excelImportRes.setTotalRecords(importMembers.size());
|
||||
|
||||
for (int i = 0; i < importMembers.size(); i++) {
|
||||
FundMemberImportExcelMode member = importMembers.get(i);
|
||||
|
||||
if (StrUtil.isBlank(member.getLoginName())) {
|
||||
member.setErrInfo("工号为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
int count = dao.count(Sys_user.class, Cnd.where(Sys_user::getLoginname, "=", member.getLoginName()));
|
||||
if (count == 0) {
|
||||
member.setErrInfo("系统中查询不到该用户", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where(Sys_user::getLoginname, "=", member.getLoginName()));
|
||||
fundMemberChangeRecordService.insertRecord(member.getLoginName(), true, "批量导入");
|
||||
}
|
||||
|
||||
// 添加错误记录
|
||||
excelImportRes.setErrorDetails(importMembers.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||
excelImportRes.setSuccessCount(Math.max(importMembers.size() - excelImportRes.getFailedCount(), 0));
|
||||
return Result.success(excelImportRes);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
@Ok("void")
|
||||
public void downLoadTemplate(HttpServletResponse response) {
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
||||
CommonDownloadUtil.download("基金会员导入模板.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+6
-8
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -6,12 +6,10 @@ import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -34,7 +32,7 @@ public class FundMemberBranchUnionApprovalController {
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/branchUnionApproval/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/branchUnionApproval/index.html")
|
||||
@SaCheckPermission("fundMember.branchUnionApproval")
|
||||
public void index() {
|
||||
|
||||
@@ -65,15 +63,15 @@ public class FundMemberBranchUnionApprovalController {
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN fund_member info ON info.id = ins.businessNo
|
||||
LEFT JOIN fund_member_apply info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "fgh");
|
||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||
cnd.and("t.taskName", "in", List.of("fgh", "ltx"));
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.dao.Cnd;
|
||||
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;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/changeRecord")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员变更记录")
|
||||
public class FundMemberChangeRecordController {
|
||||
|
||||
@Inject
|
||||
private FundMemberChangeRecordService fundMemberChangeRecordService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/changeRecord/index.html")
|
||||
@SaCheckPermission("fundMember.changeRecord")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.changeRecord")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId, String unitId, String userState, Boolean isJoin) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(changeTime)", "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("loginName", pageForm.getSearchKeyword());
|
||||
seg.orLike("userName", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX(FundMemberChangeRecord::getUnionId, "=", unionId);
|
||||
cnd.andEX(FundMemberChangeRecord::getUserState, "=", userState);
|
||||
cnd.andEX(FundMemberChangeRecord::getIsJoin, "=", isJoin);
|
||||
|
||||
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc(FundMemberChangeRecord::getChangeTime);
|
||||
}
|
||||
Pagination pagination = fundMemberChangeRecordService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
@@ -10,8 +10,8 @@ import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.vo.ProcessTaskVO;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -51,7 +51,7 @@ public class FundMemberCommonController {
|
||||
@At
|
||||
@SaCheckPermission("fundMember")
|
||||
public Result info(@Valid String id) {
|
||||
FundMember fundMember = fundMemberService.fetch(id);
|
||||
FundMemberApply fundMember = fundMemberService.fetch(id);
|
||||
return Result.success(fundMember);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class FundMemberCommonController {
|
||||
@Ok("void")
|
||||
@ApiOperation("导出申请表")
|
||||
public void exportDocx(@Valid String id, HttpServletResponse response) {
|
||||
FundMember fundMember = dao.fetch(FundMember.class, id);
|
||||
FundMemberApply fundMember = dao.fetch(FundMemberApply.class, id);
|
||||
Map<String, Object> docData = BeanUtil.beanToMap(fundMember);
|
||||
|
||||
docData.put("birthday", DateUtil.format(fundMember.getBirthday(), "yyyy年MM月dd日"));
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
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;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/his")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员-历史")
|
||||
public class FundMemberHisController {
|
||||
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/his/index.html")
|
||||
@SaCheckPermission("fundMember.his")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.his")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
his.*,
|
||||
(SELECT changeTime FROM fund_member_change_record WHERE loginName = his.loginName AND isJoin = 1 ORDER BY changeTime DESC) joinTime
|
||||
FROM
|
||||
fund_member_his his
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username", pageForm.getSearchKeyword());
|
||||
seg.orLike("loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("year", "=", year);
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+6
-7
@@ -1,14 +1,13 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
@@ -39,7 +38,7 @@ public class FundMemberMineController {
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/mine/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/mine/index.html")
|
||||
@SaCheckPermission("fundMember.mine")
|
||||
public void index() {
|
||||
|
||||
@@ -68,7 +67,7 @@ public class FundMemberMineController {
|
||||
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
|
||||
fund_member info
|
||||
fund_member_apply info
|
||||
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
|
||||
@@ -87,7 +86,7 @@ public class FundMemberMineController {
|
||||
@ApiOperation("删除")
|
||||
@SLog(tag = "基金会员-我的申请", msg = "删除")
|
||||
public Result delete(@Param("id") String id) {
|
||||
dao.delete(FundMember.class, id);
|
||||
dao.delete(FundMemberApply.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
+235
@@ -0,0 +1,235 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
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.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberHis;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
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.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 javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/query")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员-查询")
|
||||
public class FundMemberQueryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
@Inject
|
||||
private FundMemberChangeRecordService fundMemberChangeRecordService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/query/index.html")
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
u.username AS userName,
|
||||
u.loginname AS loginName,
|
||||
u.sex,
|
||||
u.birthday,
|
||||
u.userState,
|
||||
u.unitName,
|
||||
u.unionName,
|
||||
(SELECT changeTime FROM fund_member_change_record WHERE loginName = u.loginName AND isJoin = 1 ORDER BY changeTime DESC) joinTime
|
||||
FROM
|
||||
vw_user u
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.aidFundMember", "=", 1);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("u.username", pageForm.getSearchKeyword());
|
||||
seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@Ok("void")
|
||||
@ApiOperation("导出登记汇总Excel")
|
||||
public void exportExcel(Integer year, String unionId, HttpServletResponse response) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("YEAR(submitTime)", "=", year);
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
cnd.andEX(FundMemberApply::getIsJoin, "=", 1);
|
||||
cnd.asc("unionId");
|
||||
List<FundMemberApply> list = fundMemberService.query(cnd);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setIndex(i + 1);
|
||||
}
|
||||
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("性别", "sex", 10));
|
||||
|
||||
ExcelExportEntity birthEntity = new ExcelExportEntity("出生年月", "birthday", 20);
|
||||
birthEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(birthEntity);
|
||||
|
||||
ExcelExportEntity joinWorkEntity = new ExcelExportEntity("入校工作时间", "joinWorkTime", 20);
|
||||
joinWorkEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(joinWorkEntity);
|
||||
|
||||
ExcelExportEntity retireEntity = new ExcelExportEntity("退休时间", "retireTime", 20);
|
||||
retireEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(retireEntity);
|
||||
|
||||
exportEntities.add(new ExcelExportEntity("身份证号码", "idCard", 20));
|
||||
exportEntities.add(new ExcelExportEntity("家庭住址", "address", 30));
|
||||
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||
|
||||
String title = Globals.AppName + "教职工医疗互助“爱心”基金入会登记表";
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setTitle(title);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
CommonDownloadUtil.download(title + ".xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@Ok("void")
|
||||
@ApiOperation("导出新会员Excel")
|
||||
public void exportNewMemberExcel(HttpServletResponse response) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
r.*
|
||||
FROM
|
||||
fund_member_change_record r
|
||||
LEFT JOIN sys_user u ON u.loginname = r.loginName
|
||||
WHERE
|
||||
r.isJoin = 1
|
||||
AND YEAR(r.changeTime) = @year
|
||||
AND u.aidFundMember = 1
|
||||
""");
|
||||
sql.setParam("year", DateUtil.thisYear());
|
||||
List<NutMap> list = fundMemberService.listMap(sql);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).put("index", i + 1);
|
||||
}
|
||||
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("性别", "sex", 10));
|
||||
|
||||
ExcelExportEntity birthEntity = new ExcelExportEntity("出生年月", "birthday", 20);
|
||||
birthEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(birthEntity);
|
||||
|
||||
ExcelExportEntity joinWorkEntity = new ExcelExportEntity("入校工作时间", "joinWorkTime", 20);
|
||||
joinWorkEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(joinWorkEntity);
|
||||
|
||||
ExcelExportEntity retireEntity = new ExcelExportEntity("退休时间", "retireTime", 20);
|
||||
retireEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(retireEntity);
|
||||
|
||||
exportEntities.add(new ExcelExportEntity("身份证号码", "idCard", 20));
|
||||
exportEntities.add(new ExcelExportEntity("家庭住址", "address", 30));
|
||||
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||
|
||||
String title = Globals.AppName + "医疗互助“爱心”基金" + DateUtil.thisYear() + "年新入会教职工";
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setTitle(title);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
CommonDownloadUtil.download(title + ".xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@ApiOperation("退出基金")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result quit(@Valid String loginName) {
|
||||
// 修改user表
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 0), Cnd.where(Sys_user::getLoginname, "=", loginName));
|
||||
// 添加变更记录
|
||||
fundMemberChangeRecordService.insertRecord(loginName, false, "台账管理-退会");
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@ApiOperation("备份")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基金会员-备份", msg = "备份")
|
||||
public Result backup(Integer year) {
|
||||
dao.clear(FundMemberHis.class, Cnd.where(FundMemberHis::getYear, "=", year));
|
||||
List<View_user> list = dao.query(View_user.class, Cnd.where(View_user::getAidFundMember, "=", 1));
|
||||
|
||||
List<FundMemberHis> fundMemberHisList = list.stream().map(user -> {
|
||||
FundMemberHis his = new FundMemberHis();
|
||||
his.setYear(year);
|
||||
his.setLoginName(user.getLoginname());
|
||||
his.setUserName(user.getUsername());
|
||||
his.setSex(user.getSex());
|
||||
his.setBirthday(user.getBirthday());
|
||||
his.setIdCard(user.getIdCard());
|
||||
his.setMobile(user.getMobile());
|
||||
his.setUnionId(user.getUnionId());
|
||||
his.setUnionName(user.getUnionName());
|
||||
his.setUserState(user.getUserState());
|
||||
return his;
|
||||
}).toList();
|
||||
|
||||
dao.insert(fundMemberHisList);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -9,7 +9,7 @@ import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -32,7 +32,7 @@ public class FundMemberSchoolUnionApprovalController {
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/schoolUnionApproval/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/schoolUnionApproval/index.html")
|
||||
@SaCheckPermission("fundMember.schoolUnionApproval")
|
||||
public void index() {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class FundMemberSchoolUnionApprovalController {
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN fund_member info ON info.id = ins.businessNo
|
||||
LEFT JOIN fund_member_apply info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
+8
-9
@@ -1,7 +1,6 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -12,8 +11,7 @@ import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
@@ -42,7 +40,7 @@ public class FundMemberWriteController {
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/write/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/write/index.html")
|
||||
@SaCheckPermission("fundMember.write")
|
||||
public void index() {
|
||||
|
||||
@@ -52,7 +50,7 @@ public class FundMemberWriteController {
|
||||
@SaCheckPermission("fundMember.write")
|
||||
@ApiOperation("保存申请")
|
||||
@SLog(tag = "建言献策-填写申请", msg = "保存申请")
|
||||
public Result save(@Param("data") FundMember fundMember) {
|
||||
public Result save(@Param("data") FundMemberApply fundMember) {
|
||||
dao.insertOrUpdate(fundMember);
|
||||
return Result.success();
|
||||
}
|
||||
@@ -63,8 +61,9 @@ public class FundMemberWriteController {
|
||||
@ApiOperation("提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基金会员-填写申请", msg = "提交申请")
|
||||
public Result submit(@Param("data") FundMember fundMember) {
|
||||
public Result submit(@Param("data") FundMemberApply fundMember) {
|
||||
fundMember.setSubmitTime(new Date());
|
||||
fundMember.setIsJoin(true);
|
||||
dao.insertOrUpdate(fundMember);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
@@ -85,7 +84,7 @@ public class FundMemberWriteController {
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基金会员-填写申请", msg = "重新提交申请")
|
||||
public Result submitAgain(@Param("data") FundMember fundMember, @Param("taskId") Long taskId) {
|
||||
public Result submitAgain(@Param("data") FundMemberApply fundMember, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(fundMember);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
@@ -99,7 +98,7 @@ public class FundMemberWriteController {
|
||||
@SaCheckPermission("fundMember.write")
|
||||
@ApiOperation("获取申请信息")
|
||||
public Result info(@Param("id") String id) {
|
||||
FundMember box = dao.fetch(FundMember.class, id);
|
||||
FundMemberApply box = dao.fetch(FundMemberApply.class, id);
|
||||
return Result.success(box);
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.interceptor;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.json.Json;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 基金会员审核通过拦截器
|
||||
*/
|
||||
public class FundMemberPassInterceptor implements FlowInterceptor {
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void intercept(Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
FundMemberApply fundMemberApply = Json.fromJson(FundMemberApply.class, execution.getArgs().getStr("f_data"));
|
||||
// 修改基金会员状态
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where(Sys_user::getLoginname, "=", fundMemberApply.getLoginName()));
|
||||
// 添加到变更记录
|
||||
FundMemberChangeRecord record = BeanUtil.copyProperties(fundMemberApply, FundMemberChangeRecord.class, "id");
|
||||
record.setId(null);
|
||||
record.setChangeOrigin("流程申请");
|
||||
record.setChangeTime(new Date());
|
||||
dao.insert(record);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.mode;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.budwk.app.base.model.ExcelImportError;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class FundMemberImportExcelMode extends ExcelImportError {
|
||||
|
||||
@Excel(name = "工号")
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
}
|
||||
+27
-8
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.models;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.models;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -9,11 +10,11 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table("fund_member")
|
||||
@Table("fund_member_apply")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("基金会员")
|
||||
public class FundMember extends BaseModel {
|
||||
public class FundMemberApply extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@@ -21,16 +22,16 @@ public class FundMember extends BaseModel {
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("工资号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
@@ -76,6 +77,21 @@ public class FundMember extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("用户状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String userState;
|
||||
|
||||
@Column
|
||||
@Comment("加入、退出")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@@ -87,4 +103,7 @@ public class FundMember extends BaseModel {
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date submitTime;
|
||||
|
||||
@Excel(name = "序号")
|
||||
private Integer index;
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table("fund_member_change_record")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("基金会员变更记录")
|
||||
public class FundMemberChangeRecord extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("出生日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date birthday;
|
||||
|
||||
@Column
|
||||
@Comment("身份证号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@Comment("参加工作时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date joinWorkTime;
|
||||
|
||||
@Column
|
||||
@Comment("退休时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date retireTime;
|
||||
|
||||
@Column
|
||||
@Comment("家庭住址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String address;
|
||||
|
||||
@Column
|
||||
@Comment("手机号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("住宅号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String homePhone;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("用户状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String userState;
|
||||
|
||||
@Column
|
||||
@Comment("加入、退出")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("1")
|
||||
private Boolean isJoin;
|
||||
|
||||
@Column
|
||||
@Comment("变更来源")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String changeOrigin;
|
||||
|
||||
@Column
|
||||
@Comment("变更时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date changeTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table("fund_member_his")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("基金会员历史台账")
|
||||
@TableIndexes(value = {
|
||||
@Index(name = "IDX_FUND_MEMBER_HIS_YEAR", fields = {"year"}, unique = false),
|
||||
@Index(name = "IDX_FUND_MEMBER_HIS_LOGIN_NAME", fields = {"loginName"}, unique = false)
|
||||
})
|
||||
public class FundMemberHis extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("出生日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date birthday;
|
||||
|
||||
@Column
|
||||
@Comment("身份证号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@Comment("参加工作时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date joinWorkTime;
|
||||
|
||||
@Column
|
||||
@Comment("退休时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date retireTime;
|
||||
|
||||
@Column
|
||||
@Comment("家庭住址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String address;
|
||||
|
||||
@Column
|
||||
@Comment("手机号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("住宅号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String homePhone;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("用户状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String userState;
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
|
||||
public interface FundMemberChangeRecordService extends BaseService<FundMemberChangeRecord> {
|
||||
|
||||
/**
|
||||
* 插入一条记录
|
||||
* @param loginName 工号
|
||||
* @param isJoin 加入\退出
|
||||
* @param changeOrigin 来源
|
||||
*/
|
||||
void insertRecord(String loginName, boolean isJoin, String changeOrigin);
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
|
||||
public interface FundMemberService extends BaseService<FundMemberApply> {
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class FundMemberChangeRecordServiceImpl extends BaseServiceImpl<FundMemberChangeRecord> implements FundMemberChangeRecordService {
|
||||
public FundMemberChangeRecordServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void insertRecord(String loginName, boolean isJoin, String changeOrigin) {
|
||||
View_user user = dao().fetch(View_user.class, Cnd.where(View_user::getLoginname, "=", loginName));
|
||||
|
||||
FundMemberChangeRecord record = new FundMemberChangeRecord();
|
||||
record.setLoginName(user.getLoginname());
|
||||
record.setUserName(user.getUsername());
|
||||
record.setSex(user.getSex());
|
||||
record.setBirthday(user.getBirthday());
|
||||
record.setIdCard(user.getIdCard());
|
||||
// record.setJoinWorkTime(user.getArrivalAtSchoolDate());
|
||||
// record.setRetireTime(user.getRetireTime());
|
||||
record.setUnionId(user.getUnionId());
|
||||
record.setUnionName(user.getUnionName());
|
||||
record.setUserState(user.getUserState());
|
||||
record.setIsJoin(isJoin);
|
||||
record.setChangeOrigin(changeOrigin);
|
||||
record.setChangeTime(new Date());
|
||||
insert(record);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.service.impl;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class FundMemberServiceImpl extends BaseServiceImpl<FundMember> implements FundMemberService {
|
||||
public class FundMemberServiceImpl extends BaseServiceImpl<FundMemberApply> implements FundMemberService {
|
||||
public FundMemberServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
|
||||
public interface FundMemberService extends BaseService<FundMember> {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundSubsidy/analysis")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员补助-分析")
|
||||
public class FundSubsidyAnalysisController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/subsidy/analysis/index.html")
|
||||
@SaCheckPermission("fundSubsidy.analysis")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.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.TemplateExportParams;
|
||||
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.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.model.ExcelImportRes;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.mode.FundSubsidyBasicExcelMode;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.mode.FundSubsidyExcelMode;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.service.FundSubsidyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
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.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundSubsidy/query")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员补助-查询")
|
||||
@Slf4j
|
||||
public class FundSubsidyQueryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FundSubsidyService fundSubsidyService;
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/subsidy/query/index.html")
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId, String unitId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX(FundSubsidy::getYear, "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("loginName", pageForm.getSearchKeyword());
|
||||
seg.orLike("userName", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX(FundSubsidy::getUnionId, "=", unionId);
|
||||
List<FundSubsidy> list = fundSubsidyService.query(cnd);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
@Ok("void")
|
||||
public void exportExcel(Integer year, HttpServletResponse response) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX(FundSubsidy::getYear, "=", year);
|
||||
List<FundSubsidy> list = fundSubsidyService.query(cnd);
|
||||
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
exportEntities.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("门诊费用", "outpatientCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("住院费用", "hospitalCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("合计", "totalCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("不予补助金额", "noSubsidyCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("门诊医保已报金额", "outpatientMedicalInsuranceReportedCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("住院医保已报金额", "hospitalMedicalInsuranceReportedCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("自费金额", "selfCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("补助金额", "subsidyCost", 20));
|
||||
|
||||
HashMap<String, Object> excelData = new HashMap<>();
|
||||
excelData.put("list", list);
|
||||
|
||||
// 合计补助金额
|
||||
list.stream().map(FundSubsidy::getSubsidyCost).reduce(BigDecimal::add).ifPresent(total -> {
|
||||
excelData.put("totalSubsidyCost", total);
|
||||
});
|
||||
|
||||
|
||||
try {
|
||||
InputStream is = sysOfficeTemplateUtil.getTemplate("fundSubsidy");
|
||||
TemplateExportParams exportParams = new TemplateExportParams(is, null);
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, excelData);
|
||||
CommonDownloadUtil.download(year + "医疗互助“爱心”基金补助申请公示表.xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("导出基金会员补助失败,{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
@ApiOperation("导入")
|
||||
@SLog(tag = "爱心补助-导入", msg = "导入")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result importExcel(@Param("file") TempFile file) {
|
||||
// 读取
|
||||
List<FundSubsidyExcelMode> importMembers = ExcelImportUtil.importExcel(file.getFile(), FundSubsidyExcelMode.class, new ImportParams());
|
||||
// 创建结果集
|
||||
ExcelImportRes<FundSubsidyExcelMode> excelImportRes = new ExcelImportRes<>();
|
||||
excelImportRes.setTotalRecords(importMembers.size());
|
||||
|
||||
for (int i = 0; i < importMembers.size(); i++) {
|
||||
FundSubsidyExcelMode subsidy = importMembers.get(i);
|
||||
|
||||
if (subsidy.getYear() == null) {
|
||||
subsidy.setErrInfo("请填写年度", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(subsidy.getLoginName())) {
|
||||
subsidy.setErrInfo("工号为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(subsidy.getUserName())) {
|
||||
subsidy.setErrInfo("姓名为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(subsidy.getUnitName())) {
|
||||
subsidy.setErrInfo("单位为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getOutpatientCost() == null) {
|
||||
subsidy.setErrInfo("门诊费用为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getHospitalCost() == null) {
|
||||
subsidy.setErrInfo("住院费用为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getTotalCost() == null) {
|
||||
subsidy.setErrInfo("合计为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getNoSubsidyCost() == null) {
|
||||
subsidy.setErrInfo("不予补助金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getOutpatientMedicalInsuranceReportedCost() == null) {
|
||||
subsidy.setErrInfo("门诊医保已报金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getHospitalMedicalInsuranceReportedCost() == null) {
|
||||
subsidy.setErrInfo("住院医保已报金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getSelfCost() == null) {
|
||||
subsidy.setErrInfo("自费金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getSubsidyCost() == null) {
|
||||
subsidy.setErrInfo("补助金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where(Sys_user::getLoginname, "=", subsidy.getLoginName()));
|
||||
if (user == null) {
|
||||
subsidy.setErrInfo("系统中查询不到该用户", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
FundSubsidy fundSubsidy = BeanUtil.copyProperties(subsidy, FundSubsidy.class);
|
||||
|
||||
fundSubsidy.setUnitId(user.getUnitId());
|
||||
fundSubsidy.setUnionId(user.getUnionId());
|
||||
fundSubsidy.setUnitName(user.getUnitName());
|
||||
fundSubsidy.setUnionName(user.getUnionName());
|
||||
dao.insert(fundSubsidy);
|
||||
}
|
||||
|
||||
// 添加错误记录
|
||||
excelImportRes.setErrorDetails(importMembers.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||
excelImportRes.setSuccessCount(Math.max(importMembers.size() - excelImportRes.getFailedCount(), 0));
|
||||
return Result.success(excelImportRes);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
@Ok("void")
|
||||
public void downloadTemplate(HttpServletResponse response) {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
List<FundSubsidyBasicExcelMode> list = new ArrayList<>();
|
||||
list.add(new FundSubsidyBasicExcelMode());
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, FundSubsidyBasicExcelMode.class, list);
|
||||
CommonDownloadUtil.download("医疗互助“爱心”基金补助导入模板.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.mode;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class FundSubsidyBasicExcelMode {
|
||||
|
||||
@Excel(name = "年度", orderNum = "1", width = 20)
|
||||
private Integer year;
|
||||
|
||||
@Excel(name = "工号", orderNum = "2", width = 20)
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名", orderNum = "3", width = 20)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "单位", orderNum = "4", width = 20)
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "门诊费用", orderNum = "5", numFormat = "0.00", width = 20)
|
||||
private BigDecimal outpatientCost;
|
||||
|
||||
@Excel(name = "住院费用", orderNum = "6", numFormat = "0.00", width = 20)
|
||||
private BigDecimal hospitalCost;
|
||||
|
||||
@Excel(name = "合计", orderNum = "7", numFormat = "0.00", width = 20)
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@Excel(name = "不予补助金额", orderNum = "8", numFormat = "0.00", width = 20)
|
||||
private BigDecimal noSubsidyCost;
|
||||
|
||||
@Excel(name = "门诊医保已报金额", orderNum = "9", numFormat = "0.00", width = 20)
|
||||
private BigDecimal outpatientMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "住院医保已报金额", orderNum = "10", numFormat = "0.00", width = 20)
|
||||
private BigDecimal hospitalMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "自费金额", orderNum = "11", numFormat = "0.00", width = 20)
|
||||
private BigDecimal selfCost;
|
||||
|
||||
@Excel(name = "补助金额", orderNum = "12", numFormat = "0.00", width = 20)
|
||||
private BigDecimal subsidyCost;
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.mode;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.budwk.app.base.model.ExcelImportError;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class FundSubsidyExcelMode extends ExcelImportError {
|
||||
|
||||
@Excel(name = "年度", orderNum = "1")
|
||||
private Integer year;
|
||||
|
||||
@Excel(name = "工号", orderNum = "2")
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名", orderNum = "3")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "单位", orderNum = "4")
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "门诊费用", orderNum = "5",numFormat = "0.00")
|
||||
private BigDecimal outpatientCost;
|
||||
|
||||
@Excel(name = "住院费用", orderNum = "6",numFormat = "0.00")
|
||||
private BigDecimal hospitalCost;
|
||||
|
||||
@Excel(name = "合计", orderNum = "7",numFormat = "0.00")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@Excel(name = "不予补助金额", orderNum = "8",numFormat = "0.00")
|
||||
private BigDecimal noSubsidyCost;
|
||||
|
||||
@Excel(name = "门诊医保已报金额", orderNum = "9",numFormat = "0.00")
|
||||
private BigDecimal outpatientMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "住院医保已报金额", orderNum = "10",numFormat = "0.00")
|
||||
private BigDecimal hospitalMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "自费金额", orderNum = "11",numFormat = "0.00")
|
||||
private BigDecimal selfCost;
|
||||
|
||||
@Excel(name = "补助金额", orderNum = "12",numFormat = "0.00")
|
||||
private BigDecimal subsidyCost;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Table("fund_subsidy")
|
||||
@Comment("基金会员补助")
|
||||
public class FundSubsidy extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("单位ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unitName;
|
||||
|
||||
@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(customType = "decimal(10,2)")
|
||||
private BigDecimal outpatientCost;
|
||||
|
||||
@Column
|
||||
@Comment("住院费用")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal hospitalCost;
|
||||
|
||||
@Column
|
||||
@Comment("门诊+住院费用")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@Column
|
||||
@Comment("不予补助金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal noSubsidyCost;
|
||||
|
||||
@Column
|
||||
@Comment("门诊医保已报金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal outpatientMedicalInsuranceReportedCost;
|
||||
|
||||
@Column
|
||||
@Comment("住院医保已报金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal hospitalMedicalInsuranceReportedCost;
|
||||
|
||||
@Column
|
||||
@Comment("自费金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal selfCost;
|
||||
|
||||
@Column
|
||||
@Comment("补助金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal subsidyCost;
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
|
||||
|
||||
public interface FundSubsidyService extends BaseService<FundSubsidy> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.service.FundSubsidyService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class FundSubsidyServiceImpl extends BaseServiceImpl<FundSubsidy> implements FundSubsidyService {
|
||||
public FundSubsidyServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -175,7 +175,7 @@ public class HealthCheckupListController {
|
||||
@ApiOperation("体检名单管理员编辑选择记录")
|
||||
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员编辑了一条选择记录")
|
||||
@SaCheckPermission("healthCheckup.list.mange")
|
||||
public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId) {
|
||||
public Result doEditHealthCheckupData(String subjectId, String campus, String projectId, String userId, String bz) {
|
||||
|
||||
//查询用户有没有选择过套餐
|
||||
HealthCheckupUserSelection userSelection = healthCheckupProjectService.dao().fetch(HealthCheckupUserSelection.class,
|
||||
@@ -184,6 +184,7 @@ public class HealthCheckupListController {
|
||||
if (Lang.isNotEmpty(userSelection)) {
|
||||
userSelection.setSubjectId(subjectId);
|
||||
userSelection.setCampus(campus);
|
||||
userSelection.setBz(bz);
|
||||
healthCheckupProjectService.update(userSelection);
|
||||
} else {
|
||||
//如果没有选择过套餐添加一条记录
|
||||
@@ -193,6 +194,7 @@ public class HealthCheckupListController {
|
||||
checkupUserSelection.setSubjectId(subjectId);
|
||||
checkupUserSelection.setCampus(campus);
|
||||
checkupUserSelection.setSelectTime(new Date());
|
||||
checkupUserSelection.setBz(bz);
|
||||
healthCheckupProjectService.insert(checkupUserSelection);
|
||||
}
|
||||
return Result.success();
|
||||
|
||||
+32
-3
@@ -19,6 +19,7 @@ import org.nutz.dao.util.Daos;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
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.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
@@ -88,7 +89,9 @@ public class HealthCheckupProjectMangeController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("healthCheckup.projectMange")
|
||||
@SLog(type = "healthCheckup", tag = "体检管理", msg = "提交体检项目")
|
||||
public Result doAdd(HealthCheckupProject healthCheckupProject, @Param(value = "deleteRowIds") String[] deleteRowIds) {
|
||||
public Result doAdd(HealthCheckupProject healthCheckupProject,
|
||||
@Param(value = "deleteRowIds") String[] deleteRowIds,
|
||||
@Param(value = "deleteSubjectIds") String[] deleteSubjectIds) {
|
||||
|
||||
|
||||
String projectId;
|
||||
@@ -96,12 +99,37 @@ public class HealthCheckupProjectMangeController {
|
||||
if (StrUtil.isBlank(healthCheckupProject.getId())) {
|
||||
healthCheckupProject.setYear(DateUtil.thisYear());
|
||||
HealthCheckupProject checkupProject = healthCheckupProjectService.insertWith(healthCheckupProject, "healthCheckupProjectSubjects");
|
||||
healthCheckupProject.getHealthCheckupProjectSubjects().forEach(v -> {
|
||||
v.getSubjectMoneys().forEach(m -> {
|
||||
m.setProjectId(checkupProject.getId());
|
||||
m.setSubjectId(v.getId());
|
||||
});
|
||||
if (Lang.isNotEmpty(v.getSubjectMoneys())) {
|
||||
healthCheckupProjectService.insert(v.getSubjectMoneys());
|
||||
}
|
||||
});
|
||||
projectId = checkupProject.getId();
|
||||
} else {
|
||||
projectId = healthCheckupProject.getId();
|
||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("id", "in", deleteRowIds));
|
||||
//如果删除了医院
|
||||
if (Lang.isNotEmpty(deleteSubjectIds)) {
|
||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("id", "in", deleteSubjectIds));
|
||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("subjectId", "in", deleteSubjectIds));
|
||||
}
|
||||
//如果删除了项目
|
||||
if (Lang.isNotEmpty(deleteRowIds)) {
|
||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("id", "in", deleteRowIds));
|
||||
}
|
||||
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
|
||||
healthCheckupProject.getHealthCheckupProjectSubjects().forEach(v -> {
|
||||
v.setProjectId(healthCheckupProject.getId());
|
||||
v.setProjectId(projectId);
|
||||
v.getSubjectMoneys().forEach(m -> {
|
||||
m.setProjectId(projectId);
|
||||
m.setSubjectId(v.getId());
|
||||
});
|
||||
if (Lang.isNotEmpty(v.getSubjectMoneys())) {
|
||||
healthCheckupProjectService.insertOrUpdate(v.getSubjectMoneys());
|
||||
}
|
||||
});
|
||||
healthCheckupProjectService.dao().insertOrUpdate(healthCheckupProject.getHealthCheckupProjectSubjects());
|
||||
healthCheckupProjectService.update(healthCheckupProject);
|
||||
@@ -136,6 +164,7 @@ public class HealthCheckupProjectMangeController {
|
||||
public Result doDelete(String id) {
|
||||
healthCheckupProjectService.delete(id);
|
||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubject.class, Cnd.where("projectId", "=", id));
|
||||
healthCheckupProjectService.dao().clear(HealthCheckupProjectSubjectMoney.class, Cnd.where("projectId", "=", id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
+96
-7
@@ -5,14 +5,18 @@ 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.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.ConditionGroupUtil;
|
||||
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubject;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupSingleService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -30,6 +34,7 @@ import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
@@ -113,14 +118,14 @@ public class HealthCheckupSingleController {
|
||||
add(new ExcelExportEntity("职工号", "loginName", 20));
|
||||
add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
add(new ExcelExportEntity("性别", "sex", 20));
|
||||
add(new ExcelExportEntity("出生年月", "birthday", 20));
|
||||
// add(new ExcelExportEntity("出生年月", "birthday", 20));
|
||||
add(new ExcelExportEntity("年龄", "age", 20));
|
||||
add(new ExcelExportEntity("婚姻状况", "marriage", 20));
|
||||
add(new ExcelExportEntity("证件号", "idCard", 20));
|
||||
add(new ExcelExportEntity("身份证号", "idCard", 20));
|
||||
add(new ExcelExportEntity("部门", "unitName", 20));
|
||||
add(new ExcelExportEntity("部门编码", "unitCode", 20));
|
||||
add(new ExcelExportEntity("自选项目", "subjectName", 20));
|
||||
add(new ExcelExportEntity("自选院区", "campusName", 50));
|
||||
// add(new ExcelExportEntity("部门编码", "unitCode", 20));
|
||||
add(new ExcelExportEntity("医院", "subjectName", 20));
|
||||
// add(new ExcelExportEntity("自选院区", "campusName", 50));
|
||||
}};
|
||||
|
||||
List<NutMap> list;
|
||||
@@ -234,7 +239,6 @@ public class HealthCheckupSingleController {
|
||||
public Result doSelectByAdmin(String projectId, String optionId, String campus) {
|
||||
Dao dao = healthCheckupSingleService.dao();
|
||||
HealthCheckupProject project = dao.fetch(HealthCheckupProject.class, projectId);
|
||||
HealthCheckupProjectSubject subject = dao.fetch(HealthCheckupProjectSubject.class, optionId);
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -271,7 +275,92 @@ public class HealthCheckupSingleController {
|
||||
selection.setSelectTime(new Date());
|
||||
return selection;
|
||||
}).collect(Collectors.toList());
|
||||
manyAddOrRenewUtil.asyncExecuteFastInsert(selections,null);
|
||||
manyAddOrRenewUtil.asyncExecuteFastInsert(selections, null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("管理员一键选择去年数据")
|
||||
@Ok("json:full")
|
||||
@SaCheckPermission("healthCheckup.statisticsSingle")
|
||||
@SLog(type = "healthCheckup", tag = "体检管理", msg = "管理员给没选的人统一选择去年的数据")
|
||||
public Result selectOptionByLastYear(String projectId) {
|
||||
|
||||
Dao dao = healthCheckupSingleService.dao();
|
||||
//获取去年项目
|
||||
HealthCheckupProject lastYearProject = dao.fetch(HealthCheckupProject.class, Cnd.where("YEAR(year)", "=", DateUtil.thisYear() - 1));
|
||||
if (lastYearProject == null) {
|
||||
return Result.error("请先创建去年的体检项目");
|
||||
}
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id
|
||||
FROM
|
||||
health_checkup_user hcu
|
||||
LEFT JOIN `vw_user` u ON u.id = hcu.userId
|
||||
$projectCnd $condition
|
||||
""");
|
||||
cnd.and("hcu.projectId", "=", projectId);
|
||||
sql.setVar("projectCnd", "AND u.id NOT IN ( SELECT selectUserId FROM `health_checkup_user_selection` WHERE projectId = '" + projectId + "' AND selectUserId IS NOT NULL )");
|
||||
cnd.groupBy("u.loginname");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> mapList = healthCheckupSingleService.listMap(sql);
|
||||
|
||||
List<String> userIds = mapList.stream().map(v -> v.getString("id")).toList();
|
||||
|
||||
//去年项目的人
|
||||
List<HealthCheckupUserSelection> lastYearSelectionList = dao.query(HealthCheckupUserSelection.class, Cnd.where(HealthCheckupUserSelection::getProjectId, "=", lastYearProject.getId())
|
||||
.and(HealthCheckupUserSelection::getSelectUserId, "in", userIds));
|
||||
|
||||
//去年项目下的医院
|
||||
List<HealthCheckupProjectSubject> lastYearSubjectList = dao.query(HealthCheckupProjectSubject.class,
|
||||
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", lastYearProject.getId()));
|
||||
|
||||
//今年项目下的医院
|
||||
List<HealthCheckupProjectSubject> thisYearSubjectList = dao.query(HealthCheckupProjectSubject.class,
|
||||
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", projectId));
|
||||
|
||||
List<HealthCheckupUserSelection> selections = new ArrayList<>();
|
||||
userIds.forEach(v -> {
|
||||
//获取去年这个人选择的记录
|
||||
HealthCheckupUserSelection userSelection = lastYearSelectionList.stream().filter(item -> item.getSelectUserId().equals(v)).findFirst().orElse(null);
|
||||
//去年这个人选择的选项是什么
|
||||
HealthCheckupProjectSubject lastYearSubject = lastYearSubjectList.stream().filter(last -> last.getId().equals(userSelection.getSubjectId())).findFirst().orElse(null);
|
||||
//今年项目下的选项
|
||||
HealthCheckupProjectSubject thisYearSubject = thisYearSubjectList.stream().filter(thisYear -> thisYear.getOptionName().equals(lastYearSubject.getOptionName())).findFirst().orElse(null);
|
||||
if (userSelection != null && thisYearSubject != null) {
|
||||
//获取今年这个选项的收费
|
||||
List<HealthCheckupProjectSubjectMoney> list = dao.query(HealthCheckupProjectSubjectMoney.class,
|
||||
Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", thisYearSubject.getId()));
|
||||
BigDecimal money = BigDecimal.valueOf(0.00);
|
||||
String subjectMoneyId = null;
|
||||
for (HealthCheckupProjectSubjectMoney subject : list) {
|
||||
//找出这个人符合哪个项目
|
||||
Cnd cndUser = Cnd.where("id", "=", v);
|
||||
ConditionGroupUtil.applyConditionGroup(cndUser, subject.getMatchCnd());
|
||||
int count = dao.count(View_user.class, cndUser);
|
||||
if (count > 0) {
|
||||
money = subject.getMoney();
|
||||
subjectMoneyId = subject.getId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
//如果有符合的就添加
|
||||
if (subjectMoneyId != null){
|
||||
HealthCheckupUserSelection selection = new HealthCheckupUserSelection();
|
||||
selection.setProjectId(projectId);
|
||||
selection.setSelectUserId(v);
|
||||
selection.setSubjectId(thisYearSubject.getId());
|
||||
selection.setSubjectMoneyId(subjectMoneyId);
|
||||
selection.setMoney(money);
|
||||
selection.setSelectTime(new Date());
|
||||
selections.add(selection);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+35
-1
@@ -8,16 +8,21 @@ import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.ConditionGroupUtil;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupCampus;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProjectSubjectMoney;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
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.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -26,9 +31,11 @@ import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.trans.Trans;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
@@ -41,6 +48,8 @@ import java.util.Date;
|
||||
@At("/platform/healthCheckup/h5")
|
||||
public class H5HealthCheckupController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@@ -84,6 +93,8 @@ public class H5HealthCheckupController {
|
||||
// 已结束的项目:结束时间小于当前时间
|
||||
cnd.and("p.choiceTimeEnd", "<", DateUtil.now());
|
||||
}
|
||||
cnd.and(new Static("(select count(*) from health_checkup_user where projectId=p.id and userId='%s')>0".formatted(SecurityUtil.getUserId())));
|
||||
|
||||
|
||||
// 只有当name参数不为空时才添加名称查询条件
|
||||
if (StrUtil.isNotBlank(name)) {
|
||||
@@ -173,6 +184,7 @@ public class H5HealthCheckupController {
|
||||
} else {
|
||||
nutMap.put("isFamily", "否");
|
||||
}
|
||||
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
return Result.success();
|
||||
@@ -191,5 +203,27 @@ public class H5HealthCheckupController {
|
||||
// }
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"h5.healthCheckup.list", "h5.healthCheckup.mine"}, mode = SaMode.OR)
|
||||
public Result getSubjectMoney(String id, String marriage) {
|
||||
List<HealthCheckupProjectSubjectMoney> list = healthCheckupProjectService.dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", id));
|
||||
BigDecimal money = BigDecimal.valueOf(0.00);
|
||||
String subjectMoneyId = null;
|
||||
for (HealthCheckupProjectSubjectMoney subject : list) {
|
||||
// 是否满足条件
|
||||
Cnd cnd = Cnd.where("id", "=", SecurityUtil.getUserId());
|
||||
ConditionGroupUtil.applyConditionGroup(cnd, subject.getMatchCnd());
|
||||
int count = dao.count(View_user.class, cnd);
|
||||
if (count > 0) {
|
||||
money = subject.getMoney();
|
||||
subjectMoneyId = subject.getId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Result.success().addData(Map.of("money", money,"subjectMoneyId",subjectMoneyId));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -7,6 +7,7 @@ import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName HealthCheckupProjectSubject
|
||||
@@ -51,4 +52,8 @@ public class HealthCheckupProjectSubject extends BaseModel implements Serializab
|
||||
@Comment("说明描述")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String description;
|
||||
|
||||
@Many(field = "subjectId")
|
||||
private List<HealthCheckupProjectSubjectMoney> subjectMoneys;
|
||||
|
||||
}
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.budwk.app.zhgh.dayofficework.healthCheckup.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import com.budwk.app.base.param.ConditionGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/10/14 17:12
|
||||
* @description 套餐金额表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("health_checkup_project_subject_money")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("体检套餐金额表")
|
||||
public class HealthCheckupProjectSubjectMoney 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 = 32)
|
||||
private String projectId;
|
||||
|
||||
@Column
|
||||
@Comment("所属项目")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String subjectId;
|
||||
|
||||
@Column
|
||||
@Comment("金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal money;
|
||||
|
||||
@Column
|
||||
@Comment("名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String subjectMoneyName;
|
||||
|
||||
@Column
|
||||
@Comment("条件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private ConditionGroup matchCnd;
|
||||
|
||||
@Column
|
||||
@Comment("选项排序")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String sort;
|
||||
}
|
||||
+5
@@ -73,4 +73,9 @@ public class HealthCheckupUser extends BaseModel implements Serializable {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("在职状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String userState;
|
||||
|
||||
}
|
||||
|
||||
+16
@@ -7,6 +7,7 @@ import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -39,6 +40,16 @@ public class HealthCheckupUserSelection extends BaseModel implements Serializabl
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String subjectId;
|
||||
|
||||
@Column
|
||||
@Comment("所属选项")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String subjectMoneyId;
|
||||
|
||||
@Column
|
||||
@Comment("金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal money;
|
||||
|
||||
@Column
|
||||
@Comment("选择用户")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@@ -54,6 +65,11 @@ public class HealthCheckupUserSelection extends BaseModel implements Serializabl
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date selectTime;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
private String bz;
|
||||
|
||||
@Many(field = "userSelectionId")
|
||||
private List<HealthCheckupUserCompanion> companionList;
|
||||
}
|
||||
|
||||
+4
-4
@@ -4,10 +4,7 @@ import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupProject;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUser;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserCompanion;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.HealthCheckupUserSelection;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.model.*;
|
||||
import com.budwk.app.zhgh.dayofficework.healthCheckup.service.HealthCheckupProjectService;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -49,6 +46,9 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
|
||||
return null;
|
||||
}
|
||||
HealthCheckupProject project = fetchLinks(fetch(id), "healthCheckupProjectSubjects", Cnd.NEW().asc("optionSort"));
|
||||
project.getHealthCheckupProjectSubjects().forEach(v -> {
|
||||
v.setSubjectMoneys(dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where("subjectId", "=", v.getId())));
|
||||
});
|
||||
return project;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ public class MeetingDelegationApproval {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("mi.address", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("info.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("mtp.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
if(year != null) {
|
||||
@@ -116,7 +116,7 @@ public class MeetingDelegationApproval {
|
||||
cnd.and("ins.createdAt", ">=", startTime);
|
||||
cnd.and("ins.createdAt", "<=", endTime);
|
||||
}
|
||||
cnd.andEX("mi.type", "=", type);
|
||||
cnd.andEX("mi.typeId", "=", type);
|
||||
|
||||
cnd.and("t.taskName", "=", "e0ef2404-7468-480a-97b6-b918e0a9232f");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
+2
-2
@@ -111,12 +111,12 @@ public class MeetingLeaveController {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("mi.address", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("info.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("mtp.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
cnd.and("ins.id", "is not", null);
|
||||
cnd.andEX("mi.type", "=", type);
|
||||
cnd.andEX("mi.typeId", "=", type);
|
||||
if(year != null) {
|
||||
long startTime = DateUtil.parse(year + "-01-01").getTime();
|
||||
long endTime = DateUtil.parse(year + "-12-31").getTime();
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "会议请假团长审核")
|
||||
@Api(tags = "会议请假校工会审核")
|
||||
@At("/platform/meeting/schoolUnionApproval")
|
||||
public class MeetingSchoolUnionApproval {
|
||||
|
||||
@@ -106,7 +106,7 @@ public class MeetingSchoolUnionApproval {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("mi.address", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("info.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("mtp.periodName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
if(year != null) {
|
||||
@@ -115,7 +115,7 @@ public class MeetingSchoolUnionApproval {
|
||||
cnd.and("ins.createdAt", ">=", startTime);
|
||||
cnd.and("ins.createdAt", "<=", endTime);
|
||||
}
|
||||
cnd.andEX("mi.type", "=", type);
|
||||
cnd.andEX("mi.typeId", "=", type);
|
||||
|
||||
cnd.and("t.taskName", "=", "e28e9ab0-5546-4d97-9939-47df088f38ab");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
+2
@@ -119,6 +119,8 @@ public class MeetingInfoServiceImpl extends BaseServiceImpl<MeetingInfo> impleme
|
||||
if (!newRelations.isEmpty()) {
|
||||
dao().insert(newRelations);
|
||||
}
|
||||
|
||||
dao().updateIgnoreNull(info);
|
||||
}
|
||||
|
||||
private MeetingTimePeriodUser buildRelation(String meetingId, String periodId, MeetingTimePeriodUser user) {
|
||||
|
||||
+7
@@ -43,6 +43,13 @@ public class ProposalCommissionerController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/democratic/proposal/transact/commissioner/index.html")
|
||||
@SaCheckPermission("proposal.commissioner")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.commissioner")
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) {
|
||||
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.contribution.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -88,7 +89,7 @@ public class ContributionTypeController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询慈善捐助专题")
|
||||
@SaCheckPermission("contribution")
|
||||
@SaCheckLogin
|
||||
public Result queryContributionType() {
|
||||
List<ContributionType> list = typeService.query(Cnd.NEW().desc(ContributionType::getTypeCode));
|
||||
return Result.success(list);
|
||||
@@ -96,7 +97,7 @@ public class ContributionTypeController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询单个慈善捐助专题")
|
||||
@SaCheckPermission("contribution")
|
||||
@SaCheckLogin
|
||||
public Result fetchOne(String id) {
|
||||
ContributionType type = typeService.fetch(id);
|
||||
List<ContributionProject> list = dao.query(ContributionProject.class, Cnd.where(ContributionProject::getContributionTypeCode, "=", type.getTypeCode()).and(ContributionProject::getIsContributionEnable, "=", true));
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.contribution.h5Controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -95,7 +96,7 @@ public class H5ContributionListController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询单个慈善捐助专题")
|
||||
@SaCheckPermission("contribution")
|
||||
@SaCheckLogin
|
||||
public Result fetchOne(String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
|
||||
Reference in New Issue
Block a user