Merge remote-tracking branch 'origin/main'
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ApiModel("疗休养综合查询查询参数")
|
||||
@ApiModel("干部培训综合查询查询参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CadreTrainingActPageForm extends PageForm {
|
||||
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
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.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.maternityLeave.models.MaternityLeave;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceUserInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.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.Strings;
|
||||
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 java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:MutualInsuranceApplyController
|
||||
* @Date 2024/11/23 14:34
|
||||
* @注释
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/apply")
|
||||
@Api("互助保障申请")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/apply/index.html")
|
||||
@SaCheckPermission("mutualInsurance.apply")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/apply/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.apply")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission(value = {"mutualInsurance.apply", "h5.mutualInsurance.apply"}, mode = SaMode.OR)
|
||||
@SLog(tag = "生育休假-休假申请", msg = "保存休假申请")
|
||||
public Result save(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("提交申请")
|
||||
@SaCheckPermission(value = {"mutualInsurance.apply", "h5.mutualInsurance.apply"}, mode = SaMode.OR)
|
||||
public Result submit(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, mutualInsuranceUserInfo);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("SJHZBZ", mutualInsuranceUserInfo.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.apply", "h5.mutualInsurance.apply"}, mode = SaMode.OR)
|
||||
public Result submitAgain(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo, @Param("taskId") Long taskId) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result findOne(String id) {
|
||||
return Result.success(baseService.dao().fetch(MutualInsuranceUserInfo.class, id));
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("获取受助人")
|
||||
@SaCheckPermission("mutualInsurance.apply")
|
||||
public Result queryRecipients(String key){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
loginname,
|
||||
username,
|
||||
birthday,
|
||||
mobile,
|
||||
sex,
|
||||
unitName,
|
||||
unionName,
|
||||
unionId,
|
||||
unitId
|
||||
FROM
|
||||
`vw_user`
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
||||
} else {
|
||||
cnd.and("id", "=", SecurityUtil.getUserId());
|
||||
}
|
||||
}
|
||||
if (Strings.isNotBlank(key)) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("username", key);
|
||||
group.orLike("loginname", key);
|
||||
cnd.and(group);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = mutualInsuranceUserService.listPageMap(1, 10, sql);
|
||||
return Result.success().addData(pagination.getList());
|
||||
}
|
||||
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
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.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.maternityLeave.vo.MaternityLeaveCollectExcelVO;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.vo.MutualInsuranceCollectExcelVO;
|
||||
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.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
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 org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:38
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/collect")
|
||||
@Api("查询统计")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceCollectController {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/collect/index.html")
|
||||
@SaCheckPermission("mutualInsurance.collect")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/collect/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.collect")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.collect", "h5.mutualInsurance.collect"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
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,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
mutual_insurance_user_info 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();
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
cnd.desc("info.applyTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.collect", "h5.mutualInsurance.collect"}, mode = SaMode.OR)
|
||||
@SLog( tag = "删除工会报销", msg = "删除工会报销")
|
||||
public Result delete(@Param("id") String id) {
|
||||
mutualInsuranceUserService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission(value = {"maternityLeave.collect", "h5.maternityLeave.collect"}, mode = SaMode.OR)
|
||||
@ApiOperation("导出省级互助保障表")
|
||||
public void onExport(@Param(value = "projectId") String projectId,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@Param(value = "unitId") String unitId,
|
||||
@Param(value = "userName") String userName,
|
||||
@Param(value = "sex") String sex,
|
||||
HttpServletResponse response) {
|
||||
//查询审核通过的数据
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.state instanceState
|
||||
FROM
|
||||
mutual_insurance_user_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
cnd.desc("info.applyTime");
|
||||
sql.setCondition(cnd);
|
||||
List<MutualInsuranceCollectExcelVO> list = mutualInsuranceUserService.listVO(sql, MutualInsuranceCollectExcelVO.class);
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, MutualInsuranceCollectExcelVO.class, list);
|
||||
CommonDownloadUtil.download("省级互助保障申请表.xlsx", workbook, response);
|
||||
}
|
||||
}
|
||||
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
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.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
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 org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ZheJiangMutualInsuranceMineController
|
||||
* @Date 2024/11/23 14:34
|
||||
* @注释
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/mine")
|
||||
@Api("我的申请")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceMineController {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/mine/index.html")
|
||||
@SaCheckPermission("mutualInsurance.mine")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/mine/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.mine")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.mine", "h5.mutualInsurance.mine"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm, @Param(value = "year") 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,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
mutual_insurance_user_info 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();
|
||||
// 年度查询条件
|
||||
cnd.andEX("year(info.applyTime)", "=", year);
|
||||
cnd.desc("info.applyTime");
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.mine", "h5.mutualInsurance.mine"}, mode = SaMode.OR)
|
||||
@SLog( tag = "删除工会报销", msg = "删除工会报销")
|
||||
public Result delete(@Param("id") String id) {
|
||||
mutualInsuranceUserService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
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.sys.models.Sys_home_activity;
|
||||
import com.budwk.app.zhgh.dayofficework.cadreTraining.model.CadreTrainingAct;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceProjectService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:MutualInsuranceProjectController
|
||||
* @Date 2024/11/23 14:33
|
||||
* @注释
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/project")
|
||||
@Api("项目管理")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceProjectController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private MutualInsuranceProjectService mutualInsuranceProjectService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/project/index.html")
|
||||
@SaCheckPermission("mutualInsurance.project")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/project/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.project")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("事项分页")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result pageData(@Valid PageForm pageForm, Integer year) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year", "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.likeEX("projectName", pageForm.getSearchKeyword()));
|
||||
}
|
||||
Pagination pagination = mutualInsuranceProjectService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("事项保存")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result save( @Param("data")MutualInsuranceProject mutualInsuranceProject) {
|
||||
if (StrUtil.isBlank(mutualInsuranceProject.getId())) mutualInsuranceProject.setYear(DateUtil.thisYear());
|
||||
dao.insertOrUpdate(mutualInsuranceProject);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("状态切换")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result switchChange(MutualInsuranceProject mutualInsuranceProject) {
|
||||
mutualInsuranceProjectService.updateIgnoreNull(mutualInsuranceProject);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result delete(@Param("id") String id) {
|
||||
mutualInsuranceProjectService.delete(id);
|
||||
dao.clear(CadreTrainingAct.class, Cnd.where(CadreTrainingAct::getId, "=", id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询事项列表")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result listProject(Integer year){
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("`year`", "=", year == null ? DateUtil.thisYear() : year);
|
||||
cnd.and("isOpen", "=", true);
|
||||
List<MutualInsuranceProject> query = mutualInsuranceProjectService.query(cnd);
|
||||
return Result.success(query);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result findOne(String id){
|
||||
MutualInsuranceProject project = mutualInsuranceProjectService.fetch(id);
|
||||
return Result.success(project);
|
||||
}
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.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.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:35
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/schoolAudit")
|
||||
@Api("校工会审核")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceSchoolAuditController {
|
||||
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/schoolAudit/index.html")
|
||||
@SaCheckPermission("mutualInsurance.schoolAudit")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/schoolAudit/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.schoolAudit")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.schoolAudit", "h5.mutualInsurance.schoolAudit"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
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,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN mutual_insurance_user_info 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", "=", "3e4e3785-64f4-4e7c-89bc-ea54dca216cd");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.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.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:42
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/secretaryAudit")
|
||||
@Api("党委书记审核")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceSecretaryAuditController {
|
||||
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/secretaryAudit/index.html")
|
||||
@SaCheckPermission("mutualInsurance.secretaryAudit")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/secretaryAudit/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.secretaryAudit")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.secretaryAudit", "h5.mutualInsurance.secretaryAudit"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
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,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN mutual_insurance_user_info 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", "=", "8567fa6e-7207-4958-ab82-767e22d04159");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.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.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:35
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/unionAudit")
|
||||
@Api("分工会审核")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceUnionAuditController {
|
||||
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/unionAudit/index.html")
|
||||
@SaCheckPermission("mutualInsurance.unionAudit")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/unionAudit/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.unionAudit")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.unionAudit", "h5.mutualInsurance.unionAudit"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
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,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN mutual_insurance_user_info 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", "=", "7e4a33fb-cd1e-4373-9bc5-815125568471");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.model;
|
||||
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 16:09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("mutual_insurance_project")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("省级互助保障")
|
||||
public class MutualInsuranceProject extends BaseModel implements Serializable {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("项目名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
private String projectName;
|
||||
|
||||
@Column
|
||||
@Comment("开始时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date startTime;
|
||||
|
||||
@Column
|
||||
@Comment("结束时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date endTime;
|
||||
|
||||
@Column
|
||||
@Comment("详细信息")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
@Comment("是否发布")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean isOpen;
|
||||
|
||||
@Column
|
||||
@Comment("封面")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> cover;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 16:09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("mutual_insurance_user_info")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("个人信息")
|
||||
public class MutualInsuranceUserInfo extends BaseModel implements Serializable {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("项目Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String projectId;
|
||||
|
||||
@Column
|
||||
@Comment("项目名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
private String projectName;
|
||||
|
||||
@Column
|
||||
@Comment("申请模式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mode;
|
||||
|
||||
@Column
|
||||
@Comment("填写人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String proxyUserId;
|
||||
|
||||
@Column
|
||||
@Comment("填写人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String proxyUserName;
|
||||
|
||||
@Column
|
||||
@Comment("填写人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String proxyLoginName;
|
||||
|
||||
@Column
|
||||
@Comment("userid")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 4)
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("手机号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("身份证件号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@Comment("所属单位Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("所属单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("所属工会Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("所属工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("在职状态(年度在岗,不在岗,有个时间范围,在某个时间之后退休的不能参加)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String insuranceUserState;
|
||||
|
||||
@Column
|
||||
@Comment("不在岗时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private Date noDutyTime;
|
||||
|
||||
@Column
|
||||
@Comment("医保状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String medicalInsuranceState;
|
||||
|
||||
@Column
|
||||
@Comment("签字")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String sign;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date applyTime;
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
|
||||
|
||||
|
||||
public interface MutualInsuranceProjectService extends BaseService<MutualInsuranceProject> {
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceUserInfo;
|
||||
|
||||
public interface MutualInsuranceUserService extends BaseService<MutualInsuranceUserInfo> {
|
||||
|
||||
// /**
|
||||
// * 设置基础信息
|
||||
// * @param userInfo
|
||||
// */
|
||||
// void setBasicUserInfo(MutualInsuranceUserInfo userInfo);
|
||||
//
|
||||
// /**
|
||||
// * 获取查询统计sql
|
||||
// * @param pageForm
|
||||
// * @return
|
||||
// */
|
||||
// Sql getQuerySql(MutualInsuranceUserPageForm pageForm);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceProjectService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:55
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class MutualInsuranceProjectServiceImpl extends BaseServiceImpl<MutualInsuranceProject> implements MutualInsuranceProjectService {
|
||||
public MutualInsuranceProjectServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceUserInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ZheJiangMutualInsuranceUserServiceImpl
|
||||
* @Date 2024/11/23 15:33
|
||||
* @注释
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class MutualInsuranceUserServiceImpl extends BaseServiceImpl<MutualInsuranceUserInfo> implements MutualInsuranceUserService {
|
||||
public MutualInsuranceUserServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public void setBasicUserInfo(MutualInsuranceUserInfo userInfo) {
|
||||
// User user = dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||
// if (user != null) {
|
||||
// userInfo.setUnitId(user.getUnitid());
|
||||
// userInfo.setUnitName(user.getUnitname());
|
||||
// userInfo.setUnionId(user.getUnionid());
|
||||
// userInfo.setUnionName(user.getUnionname());
|
||||
// userInfo.setUserState(user.getUserState());
|
||||
// userInfo.setPersonType(user.getPersonType());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public Sql getQuerySql(MutualInsuranceUserPageForm pageForm) {
|
||||
// Sql sql = Sqls.create("""
|
||||
// SELECT
|
||||
// u.loginname,
|
||||
// u.username,
|
||||
// u.unitname AS unitName,
|
||||
// u.unionname AS unionName,
|
||||
// u.sex,
|
||||
// u.mobile,
|
||||
// info.signature
|
||||
// FROM
|
||||
// `user` u
|
||||
// LEFT JOIN zhe_jiang_mutual_insurance_user_info info ON info.loginname = u.loginname
|
||||
// $condition
|
||||
// """);
|
||||
// Cnd cnd = Cnd.NEW();
|
||||
// cnd.and("u.member", "=", MemberMode.NORMAL.getCode());
|
||||
// switch (pageForm.getApplyState()) {
|
||||
// case "all" -> {
|
||||
// }
|
||||
// case "apply" -> {
|
||||
// cnd.and("info.stateId", "=", 10030);
|
||||
// }
|
||||
// case "unApply" -> {
|
||||
// SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
// seg.or("info.stateId", "!=", 10030);
|
||||
// seg.or("info.stateId", "is", null);
|
||||
// cnd.and(seg);
|
||||
// }
|
||||
// }
|
||||
// if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
// if (ShiroUtil.hasAnyRoles("H04")) {
|
||||
// cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
// cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
||||
// } else {
|
||||
// cnd.and("u.userId", "=", ShiroUtil.getUserId());
|
||||
// }
|
||||
// } else {
|
||||
// cnd.andEX("u.unionId", "=", pageForm.getUnionId());
|
||||
// cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
||||
// }
|
||||
// if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
// SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
// seg.orLike("u.username", pageForm.getSearchKeyword());
|
||||
// seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||
// cnd.and(seg);
|
||||
// }
|
||||
// if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
// cnd.orderBy("u." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
// } else {
|
||||
// cnd.desc("info.applyTime");
|
||||
// }
|
||||
// sql.setCondition(cnd);
|
||||
// return sql;
|
||||
// }
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/25 9:54
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MutualInsuranceCollectExcelVO {
|
||||
|
||||
@Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd")
|
||||
private Date applyTime;
|
||||
|
||||
@Excel(name = "申请模式", width = 20)
|
||||
private String mode;
|
||||
|
||||
@Excel(name = "填写人工号", width = 20)
|
||||
private String proxyLoginName;
|
||||
|
||||
@Excel(name = "填写人", width = 20)
|
||||
private String proxyUserName;
|
||||
|
||||
@Excel(name = "工号", width = 20)
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名", width = 20)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "性别", width = 20)
|
||||
private String sex;
|
||||
|
||||
@Excel(name = "身份证号码", width = 20)
|
||||
private String idCard;
|
||||
|
||||
@Excel(name = "分工会", width = 20)
|
||||
private String unionName;
|
||||
|
||||
@Excel(name = "单位", width = 20)
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "事项名称", width = 20)
|
||||
private String projectName;
|
||||
|
||||
@Excel(name = "医保状态", width = 20)
|
||||
private String medicalInsuranceState;
|
||||
|
||||
@Excel(name = "在职状态", width = 20)
|
||||
private String insuranceUserState;
|
||||
|
||||
@Excel(name = "电话", width = 20)
|
||||
private String mobile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user