feat: 品牌工作室初始化提交
This commit is contained in:
@@ -41,6 +41,8 @@ public enum BpmProcessConstant {
|
||||
|
||||
ARTICLE("新闻投稿"),
|
||||
|
||||
BRAND_STUDIO("品牌工作室"),
|
||||
|
||||
BRANCH_UNION_WEIYUAN_AUTHORIZATION("分工会委员授权")
|
||||
;
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.budwk.app.zhgh.brand.controller;
|
||||
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationAuditDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationRecallDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandApplicationFlowVO;
|
||||
import com.budwk.app.zhgh.brand.service.BrandApplicationFlowService;
|
||||
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.List;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/zhgh/brand/flow")
|
||||
public class BrandApplicationFlowController {
|
||||
|
||||
@Inject
|
||||
private BrandApplicationFlowService flowService;
|
||||
|
||||
@At("/process")
|
||||
public Result process(@Param("applicationId") String applicationId) {
|
||||
List<BrandApplicationFlowVO> flowList = flowService.getFlowList(applicationId);
|
||||
return Result.success(flowList);
|
||||
}
|
||||
|
||||
@At("/audit")
|
||||
public Result audit(@Param("..") @Valid BrandApplicationAuditDTO dto) {
|
||||
flowService.audit(dto);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/recall")
|
||||
public Result recall(@Param("..") BrandApplicationRecallDTO dto) {
|
||||
flowService.recall(dto);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.budwk.app.zhgh.brand.controller;
|
||||
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.ApplicationProgressVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.ApplicationWarnVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.UnionApplyStatsVO;
|
||||
import com.budwk.app.zhgh.brand.service.BrandApplicationStatisticsService;
|
||||
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 java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/zhgh/brand/statistics")
|
||||
public class BrandApplicationStatisticsController {
|
||||
|
||||
@Inject
|
||||
private BrandApplicationStatisticsService statisticsService;
|
||||
|
||||
@At("/unionStats")
|
||||
public Result selectUnionApplyStats() {
|
||||
List<UnionApplyStatsVO> vos = statisticsService.selectUnionApplyStats();
|
||||
return Result.success(vos);
|
||||
}
|
||||
|
||||
@At("/applyProgress")
|
||||
public Result selectApplyProgressStats() {
|
||||
List<ApplicationProgressVO> vos = statisticsService.selectApplyProgressStats();
|
||||
return Result.success(vos);
|
||||
}
|
||||
|
||||
@At("/applyWarning")
|
||||
public Result selectApplyWarningStats() {
|
||||
List<ApplicationWarnVO> vos = statisticsService.selectApplyWarningStats();
|
||||
return Result.success(vos);
|
||||
}
|
||||
|
||||
@At("/applyCount")
|
||||
public Result selectApplyMapCount() {
|
||||
Map<String, Map<String, Long>> selectApplyMapCount = statisticsService.selectApplyMapCount();
|
||||
return Result.success(selectApplyMapCount);
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.budwk.app.zhgh.brand.controller;
|
||||
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.brand.convert.BrandStudioApplicationConvert;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationAuditDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationCreateDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationPageDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationUpdateDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.*;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioApplication;
|
||||
import com.budwk.app.zhgh.brand.service.BrandStudioApplicationService;
|
||||
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 javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/zhgh/brand/application")
|
||||
public class BrandStudioApplicationController {
|
||||
|
||||
@Inject
|
||||
private BrandStudioApplicationService applicationService;
|
||||
|
||||
@At("/leader")
|
||||
public Result queryLeaderHonor() {
|
||||
List<LeaderHonorGroupVO> leaderHonorVO = applicationService.queryLeaderHonor();
|
||||
return Result.success(leaderHonorVO);
|
||||
}
|
||||
|
||||
@At("/page")
|
||||
public Result page(@Valid BrandStudioApplicationPageDTO dto) {
|
||||
return Result.success(applicationService.page(dto));
|
||||
}
|
||||
|
||||
@At("/{id}")
|
||||
public Result get(@Param("id") String id) {
|
||||
BrandStudioApplicationVO applicationVO = applicationService.getDetailById(id);
|
||||
return Result.success(applicationVO);
|
||||
}
|
||||
|
||||
@At
|
||||
public Result save(@Param("..") @Valid BrandStudioApplicationCreateDTO dto) {
|
||||
applicationService.save(dto);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/submitApply")
|
||||
public Result submitApply(@Param("..") @Valid BrandApplicationAuditDTO dto) {
|
||||
applicationService.submitApply(dto);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/delete")
|
||||
public Result delete(@Param("..") NutMap request) {
|
||||
applicationService.delete((List<String>) request.get("data"));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/update")
|
||||
public Result update(@Param("..") @Valid BrandStudioApplicationUpdateDTO updateDTO) {
|
||||
applicationService.update(updateDTO);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/base")
|
||||
public Result updateBase(@Param("..") BrandStudioApplicationUpdateDTO updateDTO) {
|
||||
BrandStudioApplication entity = BrandStudioApplicationConvert.convert(updateDTO);
|
||||
applicationService.updateIgnoreNull(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/auditPage")
|
||||
public Result auditPage(@Valid BrandStudioApplicationPageDTO dto) {
|
||||
// PageResult<BrandStudioApplyFlowVO> page = applicationService.auditPage(dto);
|
||||
return Result.success(applicationService.flowAuditPage(dto));
|
||||
}
|
||||
|
||||
@At("/archive")
|
||||
public Result archive(@Param("ids") List<String> idList) {
|
||||
applicationService.archive(idList);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/honor/{id}")
|
||||
public Result honor(@Param("id") String id) {
|
||||
List<BrandStudioApplicationHonorVO> vos = applicationService.getHonorDetailById(id);
|
||||
return Result.success(vos);
|
||||
}
|
||||
|
||||
@At("/summaryPage")
|
||||
public Result summaryPage(@Valid BrandStudioApplicationPageDTO dto) {
|
||||
return Result.success(applicationService.summaryPage(dto));
|
||||
}
|
||||
|
||||
@At("/honor")
|
||||
public Result updateMemberOrHonor(@Param("..") @Valid BrandStudioApplicationUpdateDTO updateDTO) {
|
||||
applicationService.updateMemberOrHonor(updateDTO);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At("/export")
|
||||
public void export() {
|
||||
applicationService.export();
|
||||
}
|
||||
|
||||
@At("/export/docx/{id}")
|
||||
public void exportDocx(@Param("id") String id, HttpServletResponse response) {
|
||||
applicationService.exportDocx(id, response);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.budwk.app.zhgh.brand.controller;
|
||||
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/zhgh/brand")
|
||||
public class BrandStudioPageController {
|
||||
|
||||
/**
|
||||
* 品牌工作室申请列表页面
|
||||
*/
|
||||
@At("/application/index")
|
||||
@Ok("beetl:/platform/zhgh/brand/application/index.html")
|
||||
public void applicationIndex() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 品牌工作室申请填报页面
|
||||
*/
|
||||
@At("/apply/index")
|
||||
@Ok("beetl:/platform/zhgh/brand/apply/index.html")
|
||||
public void applyIndex() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 品牌工作室审批页面
|
||||
*/
|
||||
@At("/review/index")
|
||||
@Ok("beetl:/platform/zhgh/brand/review/index.html")
|
||||
public void reviewIndex() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 品牌工作室汇总页面
|
||||
*/
|
||||
@At("/summary/index")
|
||||
@Ok("beetl:/platform/zhgh/brand/summary/index.html")
|
||||
public void summaryIndex() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 品牌工作室管理页面
|
||||
*/
|
||||
@At("/office/index")
|
||||
@Ok("beetl:/platform/zhgh/brand/office/index.html")
|
||||
public void officeIndex() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.brand.convert;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.budwk.app.zhgh.brand.models.BrandApplicationFlow;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandApplicationFlowVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BrandApplicationFlowConvert {
|
||||
|
||||
public static List<BrandApplicationFlowVO> convertList(List<BrandApplicationFlow> list) {
|
||||
return BeanUtil.copyToList(list, BrandApplicationFlowVO.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.budwk.app.zhgh.brand.convert;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationCreateDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationUpdateDTO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioApplication;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandStudioApplicationVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandStudioApplicationHonorVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BrandStudioApplicationConvert {
|
||||
|
||||
public static BrandStudioApplication convert(BrandStudioApplicationCreateDTO dto) {
|
||||
BrandStudioApplication brandStudioApplication = new BrandStudioApplication();
|
||||
BeanUtil.copyProperties(dto, brandStudioApplication);
|
||||
return brandStudioApplication;
|
||||
}
|
||||
|
||||
public static BrandStudioApplication convert(BrandStudioApplicationUpdateDTO dto) {
|
||||
BrandStudioApplication brandStudioApplication = new BrandStudioApplication();
|
||||
BeanUtil.copyProperties(dto, brandStudioApplication);
|
||||
return brandStudioApplication;
|
||||
}
|
||||
|
||||
public static BrandStudioApplicationVO convert(BrandStudioApplicationHonorVO application) {
|
||||
BrandStudioApplicationVO vo = new BrandStudioApplicationVO();
|
||||
BeanUtil.copyProperties(application, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
public static BrandStudioApplicationVO convert(BrandStudioApplication application) {
|
||||
BrandStudioApplicationVO vo = new BrandStudioApplicationVO();
|
||||
BeanUtil.copyProperties(application, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
public static List<BrandStudioApplicationVO> convertList(List<BrandStudioApplication> list) {
|
||||
return BeanUtil.copyToList(list, BrandStudioApplicationVO.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.budwk.app.zhgh.brand.convert;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioHonorCreateDTO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioHonor;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandStudioApplicationHonorVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandStudioHonorVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BrandStudioHonorConvert {
|
||||
|
||||
public static List<BrandStudioApplicationHonorVO> convertList(List<BrandStudioHonor> list) {
|
||||
return BeanUtil.copyToList(list, BrandStudioApplicationHonorVO.class);
|
||||
}
|
||||
|
||||
public static List<BrandStudioHonorVO> convertListVO(List<BrandStudioHonor> honorList) {
|
||||
return BeanUtil.copyToList(honorList, BrandStudioHonorVO.class);
|
||||
}
|
||||
|
||||
public static List<BrandStudioHonor> convertListDTO(List<BrandStudioHonorCreateDTO> honorList) {
|
||||
return BeanUtil.copyToList(honorList, BrandStudioHonor.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.budwk.app.zhgh.brand.convert;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioMemberCreateDTO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioMember;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandStudioMemberVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BrandStudioMemberConvert {
|
||||
|
||||
public static List<BrandStudioMember> convertList(List<BrandStudioMemberCreateDTO> list) {
|
||||
return BeanUtil.copyToList(list, BrandStudioMember.class);
|
||||
}
|
||||
|
||||
public static List<BrandStudioMemberVO> convertListVO(List<BrandStudioMember> list) {
|
||||
return BeanUtil.copyToList(list, BrandStudioMemberVO.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品牌工作室申请审核
|
||||
*/
|
||||
@Data
|
||||
public class BrandApplicationAuditDTO {
|
||||
|
||||
/**
|
||||
* 申请 Id
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 待处理的 状态流 id
|
||||
*/
|
||||
private String flowId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 流程实例ID
|
||||
*/
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程业务ID
|
||||
*/
|
||||
private String processInstanceBusinessId;
|
||||
|
||||
/**
|
||||
* 流程任务ID
|
||||
*/
|
||||
private String processInstanceTaskId;
|
||||
|
||||
/**
|
||||
* 任务审批类型
|
||||
*/
|
||||
private String bpmTaskApprovalType;
|
||||
|
||||
/**
|
||||
* 下一个任务接收人
|
||||
*/
|
||||
private List<String> assignments;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 申请撤回
|
||||
*/
|
||||
@Data
|
||||
public class BrandApplicationFlowRecallDTO {
|
||||
|
||||
/**
|
||||
* 当前流程ID
|
||||
*/
|
||||
@NotBlank(message = "当前流程ID不能为空")
|
||||
private String curFlowId;
|
||||
|
||||
/**
|
||||
* 下个流程ID
|
||||
*/
|
||||
@NotBlank(message = "下个流程ID不能为空")
|
||||
private String nextFlowId;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 申请撤回
|
||||
*/
|
||||
@Data
|
||||
public class BrandApplicationRecallDTO {
|
||||
|
||||
/**
|
||||
* 操作流程 ID
|
||||
*/
|
||||
private String flowId;
|
||||
|
||||
/**
|
||||
* 当前申请 ID
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 流程任务ID
|
||||
*/
|
||||
private String processInstanceTaskId;
|
||||
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BrandStudioApplicationCreateDTO {
|
||||
|
||||
/**
|
||||
* 工作室名称
|
||||
*/
|
||||
@NotBlank(message = "工作室名称不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 工会ID
|
||||
*/
|
||||
@NotBlank(message = "所属工会不能为空")
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 工会名称
|
||||
*/
|
||||
@NotBlank(message = "所属工会不能为空")
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* 创建年份(格式:2025)
|
||||
*/
|
||||
@NotBlank(message = "创建年份不能为空")
|
||||
@Pattern(regexp = "^\\d{4}$", message = "创建年份格式必须为4位年份")
|
||||
private String createYear;
|
||||
|
||||
/**
|
||||
* 工作室领衔人
|
||||
*/
|
||||
@NotBlank(message = "领衔人不能为空")
|
||||
@Size(max = 20, message = "领衔人最多20个字符")
|
||||
private String leadPeople;
|
||||
|
||||
/**
|
||||
* 领衔人年龄
|
||||
*/
|
||||
@NotNull(message = "领衔人年龄不能为空")
|
||||
@Min(value = 0, message = "年龄不能小于0")
|
||||
@Max(value = 150, message = "年龄不能超过150")
|
||||
private Integer leadAge;
|
||||
|
||||
/**
|
||||
* 领衔人身份(多个用逗号分隔)
|
||||
*/
|
||||
@NotBlank(message = "领衔人身份不能为空")
|
||||
private String leadIdentity;
|
||||
|
||||
/**
|
||||
* 工作室类型
|
||||
*/
|
||||
@NotBlank(message = "工作室类型不能为空")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 所属赛道
|
||||
*/
|
||||
@NotBlank(message = "赛道不能为空")
|
||||
private String track;
|
||||
|
||||
/**
|
||||
* 工作室具体位置
|
||||
*/
|
||||
@NotBlank(message = "地址不能为空")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 成员人数
|
||||
*/
|
||||
@NotNull(message = "成员人数不能为空")
|
||||
@Min(value = 1, message = "成员人数至少1人")
|
||||
private Integer memberNum;
|
||||
|
||||
/**
|
||||
* 工作室介绍
|
||||
*/
|
||||
@NotBlank(message = "工作室介绍不能为空")
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 申请状态
|
||||
*/
|
||||
@NotNull(message = "申请状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否归档(0-否,1-是)
|
||||
*/
|
||||
private Integer archive;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 所属机构ID
|
||||
*/
|
||||
@NotBlank(message = "所属机构不能为空")
|
||||
private String deptid;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
@NotBlank(message = "所属机构不能为空")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 所属领域
|
||||
*/
|
||||
@NotBlank(message = "所属领域不能为空")
|
||||
private String domain;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉称号
|
||||
*/
|
||||
@NotBlank(message = "领衔人荣誉不能为空")
|
||||
private String leadHonor;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 工作室成员列表
|
||||
*/
|
||||
@NotEmpty(message = "至少需要1位成员")
|
||||
@Valid
|
||||
private List<BrandStudioMemberCreateDTO> brandStudioMembers;
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品牌工作室申请表
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BrandStudioApplicationPageDTO extends PageForm {
|
||||
|
||||
private Integer page = 1;
|
||||
|
||||
private Integer limit = 10;
|
||||
|
||||
/**
|
||||
* 工作室ID,主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 申请人ID,唯一
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 申请人所属工会ID
|
||||
*/
|
||||
private String unionId;
|
||||
private List<String> unionIds;
|
||||
|
||||
/**
|
||||
* 工会名称
|
||||
*/
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* 创建年份(格式如:2025)
|
||||
*/
|
||||
private String createYear;
|
||||
|
||||
/**
|
||||
* 工作室领衔人
|
||||
*/
|
||||
private String leadPeople;
|
||||
|
||||
/**
|
||||
* 领衔人年龄
|
||||
*/
|
||||
private Integer leadAge;
|
||||
|
||||
/**
|
||||
* 领衔人身份,多个身份用逗号分隔
|
||||
*/
|
||||
private String leadIdentity;
|
||||
|
||||
/**
|
||||
* 工作室类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 所属赛道
|
||||
*/
|
||||
private String track;
|
||||
|
||||
/**
|
||||
* 工作室具体位置
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 成员人数
|
||||
*/
|
||||
private Integer memberNum;
|
||||
|
||||
/**
|
||||
* 工作室介绍
|
||||
*/
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 申请进度
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 归档
|
||||
*/
|
||||
private Integer archive;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 所属机构
|
||||
*/
|
||||
private String deptid;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 所属领域
|
||||
*/
|
||||
private String domain;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉称号
|
||||
*/
|
||||
private String leadHonor;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 工作流状态
|
||||
*/
|
||||
private Integer processStatus;
|
||||
|
||||
@Override
|
||||
public Integer getPageNumber() {
|
||||
Integer pageNumber = super.getPageNumber();
|
||||
return pageNumber == null ? page : pageNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getPageSize() {
|
||||
Integer pageSize = super.getPageSize();
|
||||
return pageSize == null ? limit : pageSize;
|
||||
}
|
||||
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class BrandStudioApplicationUpdateDTO {
|
||||
|
||||
/**
|
||||
* 工作室ID,主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 创建年份(格式如:2025)
|
||||
*/
|
||||
private String createYear;
|
||||
|
||||
/**
|
||||
* 工作室领衔人
|
||||
*/
|
||||
private String leadPeople;
|
||||
|
||||
/**
|
||||
* 领衔人年龄
|
||||
*/
|
||||
private Integer leadAge;
|
||||
|
||||
/**
|
||||
* 领衔人身份,多个身份用逗号分隔
|
||||
*/
|
||||
private String leadIdentity;
|
||||
|
||||
/**
|
||||
* 工作室类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 所属赛道
|
||||
*/
|
||||
private String track;
|
||||
|
||||
/**
|
||||
* 工作室具体位置
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 成员人数
|
||||
*/
|
||||
private Integer memberNum;
|
||||
|
||||
/**
|
||||
* 工作室介绍
|
||||
*/
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 申请进度
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 归档
|
||||
*/
|
||||
private Integer archive;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 所属机构
|
||||
*/
|
||||
private String deptid;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 所属领域
|
||||
*/
|
||||
private String domain;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉称号
|
||||
*/
|
||||
private String leadHonor;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 添加的成员
|
||||
* */
|
||||
private List<BrandStudioMemberCreateDTO> brandStudioMembers;
|
||||
|
||||
private List<BrandStudioHonorCreateDTO> brandStudioHonors;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BrandStudioHonorCreateDTO {
|
||||
|
||||
/**
|
||||
* 工作室申请ID
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 荣誉称号
|
||||
*/
|
||||
private String honorName;
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
private String honorGrade;
|
||||
|
||||
/**
|
||||
* 获取年份
|
||||
*/
|
||||
private String requireYear;
|
||||
|
||||
/**
|
||||
* 荣誉类别:外部荣誉,行内荣誉
|
||||
* 通常可定义为枚举或常量:
|
||||
* 例如:1 - 外部荣誉,2 - 行内荣誉
|
||||
*/
|
||||
private Short honorCategory;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 工作室成员信息表实体类
|
||||
*/
|
||||
@Data
|
||||
public class BrandStudioMemberCreateDTO {
|
||||
|
||||
/**
|
||||
* 工作室ID(外键,关联到 BrandStudioApplication)
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 用户 ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户 工号
|
||||
*/
|
||||
private String emplid;
|
||||
|
||||
/**
|
||||
* 成员姓名
|
||||
*/
|
||||
@NotBlank(message = "成员姓名不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 成员角色(如:核心成员、技术骨干、助理等)
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 成员出生年月(建议格式:yyyy-MM 或 yyyy,实际为字符串存储)
|
||||
*/
|
||||
@NotBlank(message = "成员出生年月不能为空")
|
||||
private String birthdate;
|
||||
|
||||
/**
|
||||
* 学历(如:本科、硕士、博士等)
|
||||
*/
|
||||
@NotBlank(message = "学历不能为空")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 职称(如:高级工程师、教授、技师等)
|
||||
*/
|
||||
@NotBlank(message = "职称不能为空")
|
||||
private String professional;
|
||||
|
||||
/**
|
||||
* 所在部门
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 加入日期
|
||||
*/
|
||||
private LocalDateTime joinDate;
|
||||
|
||||
/**
|
||||
* 离开日期(可为空,表示尚未离职)
|
||||
*/
|
||||
private LocalDateTime leaveDate;
|
||||
|
||||
/**
|
||||
* 成员状态:
|
||||
* 0 - 在职,
|
||||
* 1 - 离职
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.budwk.app.zhgh.brand.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 工作室成员信息表实体类
|
||||
*/
|
||||
@Data
|
||||
public class BrandStudioMemberUpdateDTO {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室ID(外键,关联到 BrandStudioApplication)
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 用户 ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户 工号
|
||||
*/
|
||||
private String emplid;
|
||||
|
||||
/**
|
||||
* 成员姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 成员角色(如:核心成员、技术骨干、助理等)
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 成员出生年月(建议格式:yyyy-MM 或 yyyy,实际为字符串存储)
|
||||
*/
|
||||
private String birthdate;
|
||||
|
||||
/**
|
||||
* 学历(如:本科、硕士、博士等)
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 职称(如:高级工程师、教授、技师等)
|
||||
*/
|
||||
private String professional;
|
||||
|
||||
/**
|
||||
* 所在部门
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 加入日期
|
||||
*/
|
||||
private LocalDateTime joinDate;
|
||||
|
||||
/**
|
||||
* 离开日期(可为空,表示尚未离职)
|
||||
*/
|
||||
private LocalDateTime leaveDate;
|
||||
|
||||
/**
|
||||
* 成员状态:
|
||||
* 0 - 在职,
|
||||
* 1 - 离职
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.budwk.app.zhgh.brand.domain.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 荣誉申请状态
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ApplicationFlowStatusEnum
|
||||
{
|
||||
/**
|
||||
* 等待审核
|
||||
*/
|
||||
WAIT_AUDIT(0),
|
||||
/**
|
||||
* 待审核/审核中
|
||||
*/
|
||||
TO_BE_AUDIT(1),
|
||||
/**
|
||||
* 驳回
|
||||
*/
|
||||
REJECT(2),
|
||||
/**
|
||||
* 撤销
|
||||
*/
|
||||
REPEAL(3),
|
||||
/**
|
||||
* 撤回 -> 取消
|
||||
*/
|
||||
RECALL(4),
|
||||
/**
|
||||
* 通过
|
||||
*/
|
||||
PASSED(5),
|
||||
;
|
||||
|
||||
private final int value;
|
||||
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态码获取对应的枚举项
|
||||
*
|
||||
* @param value 状态码
|
||||
* @return 对应的枚举,若不存在则返回 null
|
||||
*/
|
||||
public static ApplicationFlowStatusEnum getStatusEnumByValue(int value) {
|
||||
for (ApplicationFlowStatusEnum status : values()) {
|
||||
if (status.value == value) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null; // 未找到时返回 null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.budwk.app.zhgh.brand.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 品牌工作室申请进度状态枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum BrandApplicationStatusEnums {
|
||||
|
||||
DRAFT(0, "草稿"),
|
||||
IN_REVIEW(1, "审核中/提交申请"),
|
||||
REJECT(2, "驳回"),
|
||||
REPEAL(3, "撤销"),
|
||||
RECALL(4, "撤回"),
|
||||
PASSED(5, "通过"),
|
||||
CREATING(6, "正在创建"),
|
||||
FAIL(7, "创建失败");
|
||||
|
||||
private final int code;
|
||||
private final String description;
|
||||
|
||||
BrandApplicationStatusEnums(int code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态码获取对应的枚举项
|
||||
*
|
||||
* @param code 状态码
|
||||
* @return 对应的枚举,若不存在则返回 null
|
||||
*/
|
||||
public static BrandApplicationStatusEnums getStatusByCode(int code) {
|
||||
for (BrandApplicationStatusEnums status : values()) {
|
||||
if (status.code == code) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null; // 未找到时返回 null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ApplicationProgressVO {
|
||||
|
||||
/** 申请单 ID */
|
||||
private Long applicationId;
|
||||
|
||||
/** 申请工作室名称 */
|
||||
private String applicationName;
|
||||
|
||||
/** 申请工会 ID */
|
||||
private String unionId;
|
||||
|
||||
/** 申请人直属工会名称 */
|
||||
private String unionName;
|
||||
|
||||
/** 用户ID */
|
||||
private Long userId;
|
||||
|
||||
/** 申请单状态 */
|
||||
private Integer status;
|
||||
|
||||
/** 牵头人 */
|
||||
private String leadPeople;
|
||||
|
||||
/** 申请时间 */
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 总节点数 */
|
||||
private Integer totalNodes;
|
||||
|
||||
/** 已通过的节点数 */
|
||||
private Integer passedNodes;
|
||||
|
||||
/** 进度百分比(0-100),保留两位小数 */
|
||||
private BigDecimal progressPct;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ApplicationWarnVO {
|
||||
|
||||
private String applicationId;
|
||||
|
||||
private String name;
|
||||
private String leadPeople;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private String unionId;
|
||||
|
||||
private String unionName;
|
||||
|
||||
private LocalDateTime receiveTime;
|
||||
|
||||
private BigDecimal pendingDays;
|
||||
|
||||
private Integer warnStatus;
|
||||
|
||||
private BigDecimal avgAuditDays;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 申请流程 VO
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BrandApplicationFlowVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工会ID
|
||||
*/
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 工会
|
||||
*/
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private String auditorId;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String auditor;
|
||||
|
||||
/**
|
||||
* 申请ID
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 状态(0:待审核;1:驳回;2:撤回;3:撤销;4:通过)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 审批内容(意见描述)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
private Integer sortNo;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BrandFlowUserVO {
|
||||
|
||||
/**
|
||||
* 申请人ID,唯一
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 流程 ID
|
||||
*/
|
||||
private String flowId;
|
||||
|
||||
/**
|
||||
* 流程 状态
|
||||
*/
|
||||
private Integer flowStatus;
|
||||
|
||||
/**
|
||||
* 流程 序号
|
||||
*/
|
||||
private Integer sortNo;
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 品牌工作室荣誉导出写死
|
||||
*/
|
||||
@Data
|
||||
public class BrandStudioApplicationHonorExport {
|
||||
|
||||
private Integer index;
|
||||
|
||||
/**
|
||||
* 工作室名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 创建年份(格式如:2025)
|
||||
*/
|
||||
private String createYear;
|
||||
|
||||
/**
|
||||
* 工作室领衔人
|
||||
*/
|
||||
private String leadPeople;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 荣誉称号
|
||||
*/
|
||||
private String honorName;
|
||||
|
||||
/**
|
||||
* 所属赛道
|
||||
*/
|
||||
private String track;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉称号
|
||||
*/
|
||||
private String leadHonor;
|
||||
|
||||
/**
|
||||
* 成员人数
|
||||
*/
|
||||
private Integer memberNum;
|
||||
|
||||
/**
|
||||
* 工作室具体位置
|
||||
*/
|
||||
private String address;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 品牌工作室荣誉
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BrandStudioApplicationHonorVO extends BrandStudioApplicationVO {
|
||||
|
||||
/**
|
||||
* 工作室荣誉ID,主键
|
||||
*/
|
||||
private String honorId;
|
||||
|
||||
/**
|
||||
* 荣誉称号
|
||||
*/
|
||||
private String honorName;
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
private String honorGrade;
|
||||
|
||||
/**
|
||||
* 获取年份
|
||||
*/
|
||||
private String requireYear;
|
||||
|
||||
/**
|
||||
* 荣誉类别:外部荣誉,行内荣誉
|
||||
* 通常可定义为枚举或常量:
|
||||
* 例如:1 - 外部荣誉,2 - 行内荣誉
|
||||
*/
|
||||
private Short honorCategory;
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品牌工作室
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BrandStudioApplicationVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 工会ID
|
||||
*/
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 工会名称
|
||||
*/
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* 创建年份(格式如:2025)
|
||||
*/
|
||||
private String createYear;
|
||||
|
||||
/**
|
||||
* 工作室领衔人
|
||||
*/
|
||||
private String leadPeople;
|
||||
|
||||
/**
|
||||
* 领衔人年龄
|
||||
*/
|
||||
private Integer leadAge;
|
||||
|
||||
/**
|
||||
* 领衔人身份,多个身份用逗号分隔
|
||||
*/
|
||||
private String leadIdentity;
|
||||
|
||||
/**
|
||||
* 工作室类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 所属赛道
|
||||
*/
|
||||
private String track;
|
||||
|
||||
/**
|
||||
* 工作室具体位置
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 成员人数
|
||||
*/
|
||||
private Integer memberNum;
|
||||
|
||||
/**
|
||||
* 工作室介绍
|
||||
*/
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 申请进度
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 归档
|
||||
*/
|
||||
private Integer archive;
|
||||
|
||||
/**
|
||||
* 流程 ID
|
||||
*/
|
||||
private String flowId;
|
||||
|
||||
/**
|
||||
* 流程 工会名称
|
||||
*/
|
||||
private String flowUnionName;
|
||||
|
||||
/**
|
||||
* 流程 状态
|
||||
*/
|
||||
private Integer flowStatus;
|
||||
|
||||
/**
|
||||
* 流程 序号
|
||||
*/
|
||||
private Integer flowSortNo;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 所属机构
|
||||
*/
|
||||
private String deptid;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 所属领域
|
||||
*/
|
||||
private String domain;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉称号
|
||||
*/
|
||||
private String leadHonor;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 添加的成员
|
||||
* */
|
||||
private List<BrandStudioMemberVO> brandStudioMembers;
|
||||
|
||||
/**
|
||||
* 荣誉相关信息
|
||||
* */
|
||||
private List<BrandStudioHonorVO> brandStudioHonors;
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审核返回数据
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BrandStudioApplyFlowVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 工作室名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 工会ID
|
||||
*/
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 工会名称
|
||||
*/
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* 创建年份(格式如:2025)
|
||||
*/
|
||||
private String createYear;
|
||||
|
||||
/**
|
||||
* 工作室领衔人
|
||||
*/
|
||||
private String leadPeople;
|
||||
|
||||
/**
|
||||
* 领衔人年龄
|
||||
*/
|
||||
private Integer leadAge;
|
||||
|
||||
/**
|
||||
* 领衔人身份,多个身份用逗号分隔
|
||||
*/
|
||||
private String leadIdentity;
|
||||
|
||||
/**
|
||||
* 工作室类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 所属赛道
|
||||
*/
|
||||
private String track;
|
||||
|
||||
/**
|
||||
* 工作室具体位置
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 成员人数
|
||||
*/
|
||||
private Integer memberNum;
|
||||
|
||||
/**
|
||||
* 工作室介绍
|
||||
*/
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 申请进度
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 归档
|
||||
*/
|
||||
private Integer archive;
|
||||
|
||||
/**
|
||||
* 流程 ID
|
||||
*/
|
||||
private String flowId;
|
||||
|
||||
/**
|
||||
* 流程 工会名称
|
||||
*/
|
||||
private String flowUnionName;
|
||||
|
||||
/**
|
||||
* 流程 状态
|
||||
*/
|
||||
private Integer flowStatus;
|
||||
|
||||
/**
|
||||
* 流程 序号
|
||||
*/
|
||||
private Integer flowSortNo;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 所属机构
|
||||
*/
|
||||
private String deptid;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 所属领域
|
||||
*/
|
||||
private String domain;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉称号
|
||||
*/
|
||||
private String leadHonor;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
private Integer processUserTaskStatus;
|
||||
|
||||
|
||||
private Date processTaskStartTime;
|
||||
|
||||
|
||||
private Date processTaskEndTime;
|
||||
|
||||
|
||||
private String processTaskReason;
|
||||
|
||||
|
||||
private String processTaskNode;
|
||||
|
||||
|
||||
private String processInstanceId;
|
||||
|
||||
|
||||
private String processInstanceTaskId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BrandStudioHonorVO {
|
||||
|
||||
/**
|
||||
* 工作室荣誉ID,主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室申请ID
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 荣誉称号
|
||||
*/
|
||||
private String honorName;
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
private String honorGrade;
|
||||
|
||||
/**
|
||||
* 获取年份
|
||||
*/
|
||||
private String requireYear;
|
||||
|
||||
/**
|
||||
* 荣誉类别:外部荣誉,行内荣誉
|
||||
* 通常可定义为枚举或常量:
|
||||
* 例如:1 - 外部荣誉,2 - 行内荣誉
|
||||
*/
|
||||
private Short honorCategory;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 工作室成员信息表实体类
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BrandStudioMemberVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室ID(外键,关联到 BrandStudioApplication)
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 用户 ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户 工号
|
||||
*/
|
||||
private String emplid;
|
||||
|
||||
/**
|
||||
* 成员姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 成员角色(如:核心成员、技术骨干、助理等)
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 成员出生年月(建议格式:yyyy-MM 或 yyyy,实际为字符串存储)
|
||||
*/
|
||||
private String birthdate;
|
||||
|
||||
/**
|
||||
* 学历(如:本科、硕士、博士等)
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 职称(如:高级工程师、教授、技师等)
|
||||
*/
|
||||
private String professional;
|
||||
|
||||
/**
|
||||
* 所在部门
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 加入日期
|
||||
*/
|
||||
private LocalDateTime joinDate;
|
||||
|
||||
/**
|
||||
* 离开日期(可为空,表示尚未离职)
|
||||
*/
|
||||
private LocalDateTime leaveDate;
|
||||
|
||||
/**
|
||||
* 成员状态:
|
||||
* 0 - 在职,
|
||||
* 1 - 离职
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeptInfoVO {
|
||||
|
||||
private String deptid;
|
||||
private String deptName;
|
||||
|
||||
private String topParentNextId;
|
||||
private String topParentNextName;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class LeaderHonorGroupVO {
|
||||
|
||||
private String emplid;
|
||||
private String userName;
|
||||
private Integer age;
|
||||
private List<String> honorNames;
|
||||
|
||||
public LeaderHonorGroupVO(String emplid, String userName, Integer age, List<String> honorNames) {
|
||||
this.emplid = emplid;
|
||||
this.userName = userName;
|
||||
this.age = age;
|
||||
this.honorNames = honorNames;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉
|
||||
*/
|
||||
@Data
|
||||
public class LeaderHonorVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
//@Excel(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
//@Excel(name = "年龄")
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 人员编号(工号)
|
||||
*/
|
||||
//@Excel(name = "人员编号(工号)")
|
||||
private String emplid;
|
||||
|
||||
/**
|
||||
* 机构
|
||||
*/
|
||||
//@Excel(name = "机构")
|
||||
private String deptid;
|
||||
|
||||
/**
|
||||
* 工会ID
|
||||
*/
|
||||
//@Excel(name = "工会ID")
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
//@Excel(name = "机构名称")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 年度
|
||||
*/
|
||||
//@Excel(name = "年度")
|
||||
private String year;
|
||||
|
||||
/**
|
||||
* 内外部荣誉
|
||||
*/
|
||||
//@Excel(name = "内外部荣誉")
|
||||
private String categoryName1;
|
||||
|
||||
/**
|
||||
* 内外部荣誉编号
|
||||
*/
|
||||
//@Excel(name = "内外部荣誉编号")
|
||||
private String categoryCode1;
|
||||
|
||||
/**
|
||||
* 荣誉级别名称
|
||||
*/
|
||||
//@Excel(name = "荣誉级别名称")
|
||||
private String categoryName2;
|
||||
|
||||
/**
|
||||
* 荣誉级别编号
|
||||
*/
|
||||
//@Excel(name = "荣誉级别编号")
|
||||
private String categoryCode2;
|
||||
|
||||
/**
|
||||
* 荣誉类别名称
|
||||
*/
|
||||
//@Excel(name = "荣誉类别名称")
|
||||
private String categoryName3;
|
||||
|
||||
/**
|
||||
* 荣誉类别编号
|
||||
*/
|
||||
//@Excel(name = "荣誉类别编号")
|
||||
private String categoryCode3;
|
||||
|
||||
/**
|
||||
* 荣誉名称
|
||||
*/
|
||||
//@Excel(name = "荣誉名称")
|
||||
private String honorName;
|
||||
|
||||
/**
|
||||
* 荣誉编号
|
||||
*/
|
||||
//@Excel(name = "荣誉编号")
|
||||
private String honorCode;
|
||||
|
||||
/**
|
||||
* 荣誉分类id
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/**
|
||||
* 当前荣誉分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 评选对象(机构/个人)
|
||||
*/
|
||||
//@Excel(name = "评选对象(机构/个人)")
|
||||
private String selectionType;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机构列表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class SysOrgVO {
|
||||
/**
|
||||
* 机构编号
|
||||
*/
|
||||
private String orgId;
|
||||
|
||||
/**
|
||||
* 上级编号
|
||||
*/
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 子节点
|
||||
*/
|
||||
private List<SysOrgVO> children;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 机构代码
|
||||
*/
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 负责人ID
|
||||
*/
|
||||
private String leaderId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 上级名称
|
||||
*/
|
||||
private String parentName;
|
||||
|
||||
/** 分行ID */
|
||||
//@Excel(name = "分行ID")
|
||||
private String branchId;
|
||||
|
||||
/** 机构类型 */
|
||||
//@Excel(name = "机构类型")
|
||||
private String orgType;
|
||||
|
||||
/** 描述 */
|
||||
//@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 机构状态 */
|
||||
//@Excel(name = "机构状态")
|
||||
private String status;
|
||||
|
||||
/** 党组织md5 */
|
||||
//@Excel(name = "党组织md5")
|
||||
private String orgMd5;
|
||||
|
||||
/** 自定义属性 */
|
||||
//@Excel(name = "自定义属性")
|
||||
private String countryCode;
|
||||
|
||||
/** 工会ID */
|
||||
private String unionId;
|
||||
|
||||
/** 工会ID */
|
||||
private String childUnionId;
|
||||
|
||||
/** 机构中文全称 */
|
||||
private String gcDeptLdescr;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SysUnionDeptVO {
|
||||
|
||||
/**
|
||||
* userId
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* unionId
|
||||
*/
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 工会名称
|
||||
*/
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* deptId
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 最上级工会 Id
|
||||
*/
|
||||
private String topUnionId;
|
||||
|
||||
/**
|
||||
* 最上级工会名称
|
||||
*/
|
||||
private String topUnionName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.budwk.app.zhgh.brand.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 工会-用户 工作室申请统计视图对象
|
||||
* 按 union_id + user_id 聚合,统计每个用户在其所属工会下的所有申请单的状态分布。
|
||||
* 所有比例字段单位为 %,已乘以 100 并保留 2 位小数。
|
||||
* @author chen
|
||||
* @since 2026-01-08
|
||||
*/
|
||||
@Data
|
||||
public class UnionApplyStatsVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 工会ID */
|
||||
private String unionId;
|
||||
|
||||
/** 工会名称 */
|
||||
private String unionName;
|
||||
|
||||
/** 用户姓名(来自 sys_user) */
|
||||
private String username;
|
||||
|
||||
/** 申请单总量 */
|
||||
private Integer applyCnt;
|
||||
|
||||
/** 已通过数量(status = 5) */
|
||||
private Integer passedCnt;
|
||||
|
||||
/** 通过率(%) */
|
||||
private BigDecimal passRate;
|
||||
|
||||
/** 审核中数量(status = 1) */
|
||||
private Integer reviewCnt;
|
||||
|
||||
/** 审核中占比(%) */
|
||||
private BigDecimal reviewRate;
|
||||
|
||||
/** 已驳回数量(status = 2) */
|
||||
private Integer rejectCnt;
|
||||
|
||||
/** 驳回率(%) */
|
||||
private BigDecimal rejectRate;
|
||||
|
||||
/** 已撤销数量(status = 3) */
|
||||
private Integer repealCnt;
|
||||
|
||||
/** 撤销率(%) */
|
||||
private BigDecimal repealRate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.budwk.app.zhgh.brand.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.io.Serializable;
|
||||
|
||||
/**
|
||||
* 品牌工作室申请流程表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("brand_application_flow")
|
||||
@Comment("品牌工作室申请流程表")
|
||||
public class BrandApplicationFlow extends BaseModel implements Serializable {
|
||||
|
||||
/**
|
||||
* 审批记录ID,主键
|
||||
*/
|
||||
@Name
|
||||
@Column
|
||||
@Comment("审批记录ID,主键")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工会ID
|
||||
*/
|
||||
@Column
|
||||
@Comment("工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 工会
|
||||
*/
|
||||
@Column
|
||||
@Comment("工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 256)
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
@Column
|
||||
@Comment("审核人ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String auditorId;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
@Column
|
||||
@Comment("审核人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String auditor;
|
||||
|
||||
/**
|
||||
* 申请ID
|
||||
*/
|
||||
@Column
|
||||
@Comment("申请ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 状态(0:待审核;1:驳回;2:撤回;3:撤销;4:通过)
|
||||
*/
|
||||
@Column
|
||||
@Comment("状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 审批内容(意见描述)
|
||||
*/
|
||||
@Column
|
||||
@Comment("审批内容(意见描述)")
|
||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
@Column
|
||||
@Comment("序号")
|
||||
private Integer sortNo;
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
package com.budwk.app.zhgh.brand.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.io.Serializable;
|
||||
|
||||
/**
|
||||
* 品牌工作室申请表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("brand_studio_application")
|
||||
@Comment("品牌工作室申请表")
|
||||
public class BrandStudioApplication extends BaseModel implements Serializable {
|
||||
|
||||
/**
|
||||
* 工作室ID,主键
|
||||
*/
|
||||
@Name
|
||||
@Column
|
||||
@Comment("工作室ID,主键")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室名称
|
||||
*/
|
||||
@Column
|
||||
@Comment("工作室名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 128)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 申请人ID,唯一
|
||||
*/
|
||||
@Column
|
||||
@Comment("申请人ID,唯一")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 申请人所属工会ID
|
||||
*/
|
||||
@Column
|
||||
@Comment("申请人所属工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 工会名称
|
||||
*/
|
||||
@Column
|
||||
@Comment("工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 256)
|
||||
private String unionName;
|
||||
|
||||
/**
|
||||
* 创建年份(格式如:2025)
|
||||
*/
|
||||
@Column
|
||||
@Comment("创建年份")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String createYear;
|
||||
|
||||
/**
|
||||
* 工作室领衔人
|
||||
*/
|
||||
@Column
|
||||
@Comment("工作室领衔人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String leadPeople;
|
||||
|
||||
/**
|
||||
* 领衔人年龄
|
||||
*/
|
||||
@Column
|
||||
@Comment("领衔人年龄")
|
||||
private Integer leadAge;
|
||||
|
||||
/**
|
||||
* 领衔人身份,多个身份用逗号分隔
|
||||
*/
|
||||
@Column
|
||||
@Comment("领衔人身份,多个身份用逗号分隔")
|
||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||
private String leadIdentity;
|
||||
|
||||
/**
|
||||
* 工作室类型
|
||||
*/
|
||||
@Column
|
||||
@Comment("工作室类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 128)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 所属赛道
|
||||
*/
|
||||
@Column
|
||||
@Comment("所属赛道")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 128)
|
||||
private String track;
|
||||
|
||||
/**
|
||||
* 工作室具体位置
|
||||
*/
|
||||
@Column
|
||||
@Comment("工作室具体位置")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 256)
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 成员人数
|
||||
*/
|
||||
@Column
|
||||
@Comment("成员人数")
|
||||
private Integer memberNum;
|
||||
|
||||
/**
|
||||
* 工作室介绍
|
||||
*/
|
||||
@Column
|
||||
@Comment("工作室介绍")
|
||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 申请进度
|
||||
*/
|
||||
@Column
|
||||
@Comment("申请进度")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 归档
|
||||
*/
|
||||
@Column
|
||||
@Comment("归档")
|
||||
private Integer archive;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@Column
|
||||
@Comment("创建人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 所属机构
|
||||
*/
|
||||
@Column
|
||||
@Comment("所属机构")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String deptid;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
@Column
|
||||
@Comment("机构名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 256)
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 所属领域
|
||||
*/
|
||||
@Column
|
||||
@Comment("所属领域")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 128)
|
||||
private String domain;
|
||||
|
||||
/**
|
||||
* 领衔人荣誉称号
|
||||
*/
|
||||
@Column
|
||||
@Comment("领衔人荣誉称号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String leadHonor;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.budwk.app.zhgh.brand.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.io.Serializable;
|
||||
|
||||
/**
|
||||
* 工作室荣誉信息实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("brand_studio_honor")
|
||||
@Comment("品牌工作室荣誉信息表")
|
||||
public class BrandStudioHonor extends BaseModel implements Serializable {
|
||||
|
||||
/**
|
||||
* 工作室荣誉ID,主键
|
||||
*/
|
||||
@Name
|
||||
@Column
|
||||
@Comment("工作室荣誉ID,主键")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室申请ID
|
||||
*/
|
||||
@Column
|
||||
@Comment("工作室申请ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 荣誉称号
|
||||
*/
|
||||
@Column
|
||||
@Comment("荣誉称号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 128)
|
||||
private String honorName;
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
@Column
|
||||
@Comment("级别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String honorGrade;
|
||||
|
||||
/**
|
||||
* 获取年份
|
||||
*/
|
||||
@Column
|
||||
@Comment("获取年份")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String requireYear;
|
||||
|
||||
/**
|
||||
* 荣誉类别:外部荣誉,行内荣誉
|
||||
* 通常可定义为枚举或常量:
|
||||
* 例如:1 - 外部荣誉,2 - 行内荣誉
|
||||
*/
|
||||
@Column
|
||||
@Comment("荣誉类别")
|
||||
private Short honorCategory;
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.budwk.app.zhgh.brand.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.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工作室成员信息表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("brand_studio_member")
|
||||
@Comment("品牌工作室成员信息表")
|
||||
public class BrandStudioMember extends BaseModel implements Serializable {
|
||||
|
||||
/**
|
||||
* 成员ID,主键
|
||||
*/
|
||||
@Name
|
||||
@Column
|
||||
@Comment("成员ID,主键")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 工作室ID(外键,关联到 BrandStudioApplication)
|
||||
*/
|
||||
@Column
|
||||
@Comment("工作室ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 用户 ID
|
||||
*/
|
||||
@Column
|
||||
@Comment("用户ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户 工号
|
||||
*/
|
||||
@Column
|
||||
@Comment("用户工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String emplid;
|
||||
|
||||
/**
|
||||
* 成员姓名
|
||||
*/
|
||||
@Column
|
||||
@Comment("成员姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 成员角色(如:核心成员、技术骨干、助理等)
|
||||
*/
|
||||
@Column
|
||||
@Comment("成员角色")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 成员出生年月(建议格式:yyyy-MM 或 yyyy,实际为字符串存储)
|
||||
*/
|
||||
@Column
|
||||
@Comment("成员出生年月")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String birthdate;
|
||||
|
||||
/**
|
||||
* 学历(如:本科、硕士、博士等)
|
||||
*/
|
||||
@Column
|
||||
@Comment("学历")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 64)
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 职称(如:高级工程师、教授、技师等)
|
||||
*/
|
||||
@Column
|
||||
@Comment("职称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
private String professional;
|
||||
|
||||
/**
|
||||
* 所在部门
|
||||
*/
|
||||
@Column
|
||||
@Comment("所在部门")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 加入日期
|
||||
*/
|
||||
@Column
|
||||
@Comment("加入日期")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date joinDate;
|
||||
|
||||
/**
|
||||
* 离开日期(可为空,表示尚未离职)
|
||||
*/
|
||||
@Column
|
||||
@Comment("离开日期")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date leaveDate;
|
||||
|
||||
/**
|
||||
* 成员状态:
|
||||
* 0 - 在职,
|
||||
* 1 - 离职
|
||||
*/
|
||||
@Column
|
||||
@Comment("成员状态")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.budwk.app.zhgh.brand.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationAuditDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationRecallDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.enums.BrandApplicationStatusEnums;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandApplicationFlowVO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandApplicationFlow;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BrandApplicationFlowService extends BaseService<BrandApplicationFlow> {
|
||||
|
||||
void submitAudit(String applicationId, BrandApplicationStatusEnums statusEnums, Sys_user user);
|
||||
|
||||
void audit(BrandApplicationAuditDTO dto);
|
||||
|
||||
void recall(BrandApplicationRecallDTO dto);
|
||||
|
||||
List<BrandApplicationFlowVO> getFlowList(String applicationId);
|
||||
|
||||
void deleteByApplicationIds(List<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.zhgh.brand.service;
|
||||
|
||||
import com.budwk.app.zhgh.brand.domain.vo.ApplicationProgressVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.ApplicationWarnVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.UnionApplyStatsVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface BrandApplicationStatisticsService {
|
||||
List<UnionApplyStatsVO> selectUnionApplyStats();
|
||||
|
||||
List<ApplicationProgressVO> selectApplyProgressStats();
|
||||
|
||||
List<ApplicationWarnVO> selectApplyWarningStats();
|
||||
|
||||
Map<String, Map<String, Long>> selectApplyMapCount();
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.budwk.app.zhgh.brand.service;
|
||||
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationAuditDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationCreateDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationPageDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioApplicationUpdateDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.*;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioApplication;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
public interface BrandStudioApplicationService extends BaseService<BrandStudioApplication> {
|
||||
|
||||
Pagination<BrandStudioApplicationVO> page(BrandStudioApplicationPageDTO pageDTO);
|
||||
|
||||
void save(BrandStudioApplicationCreateDTO dto);
|
||||
|
||||
void submitApply(BrandApplicationAuditDTO dto);
|
||||
|
||||
void oaAuditUpdateStatus(String id, Integer status, String reason);
|
||||
|
||||
void update(BrandStudioApplicationUpdateDTO dto);
|
||||
|
||||
void updateMemberOrHonor(BrandStudioApplicationUpdateDTO dto);
|
||||
|
||||
void delete(List<String> ids);
|
||||
|
||||
SysUnionDeptVO queryUserUnion();
|
||||
|
||||
BrandStudioApplicationVO getDetailById(String id);
|
||||
|
||||
void archive(List<String> idList);
|
||||
|
||||
/// 之前的工作流逻辑,已废弃
|
||||
Pagination<BrandStudioApplyFlowVO> auditPage(@Valid BrandStudioApplicationPageDTO pageDTO);
|
||||
|
||||
/// 新的工作流逻辑
|
||||
Pagination<BrandStudioApplyFlowVO> flowAuditPage(BrandStudioApplicationPageDTO dto);
|
||||
|
||||
List<LeaderHonorGroupVO> queryLeaderHonor();
|
||||
|
||||
Pagination<BrandStudioApplicationHonorVO> summaryPage(@Valid BrandStudioApplicationPageDTO pageDTO);
|
||||
|
||||
List<BrandStudioApplicationHonorVO> getHonorDetailById(String id);
|
||||
|
||||
void export();
|
||||
|
||||
// 导出品牌工作室申请文档
|
||||
void exportDocx(String id, HttpServletResponse response);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.budwk.app.zhgh.brand.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioHonor;
|
||||
|
||||
|
||||
public interface BrandStudioHonorService extends BaseService<BrandStudioHonor> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.budwk.app.zhgh.brand.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioMemberCreateDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioMemberUpdateDTO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioMember;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BrandStudioMemberService extends BaseService<BrandStudioMember> {
|
||||
|
||||
void save(BrandStudioMemberCreateDTO dto);
|
||||
|
||||
void update(BrandStudioMemberUpdateDTO dto);
|
||||
|
||||
void delete(List<String> ids);
|
||||
}
|
||||
+308
@@ -0,0 +1,308 @@
|
||||
package com.budwk.app.zhgh.brand.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.brand.convert.BrandApplicationFlowConvert;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationAuditDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandApplicationRecallDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.enums.ApplicationFlowStatusEnum;
|
||||
import com.budwk.app.zhgh.brand.domain.enums.BrandApplicationStatusEnums;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandApplicationFlowVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.BrandFlowUserVO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandApplicationFlow;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioApplication;
|
||||
import com.budwk.app.zhgh.brand.service.BrandApplicationFlowService;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class BrandApplicationFlowServiceImpl extends BaseServiceImpl<BrandApplicationFlow> implements BrandApplicationFlowService {
|
||||
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
|
||||
@Inject
|
||||
private CommonService commonService;
|
||||
|
||||
public BrandApplicationFlowServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
/// 提交申请/待审核:插入审核流程记录表
|
||||
@Override
|
||||
public void submitAudit(String applicationId, BrandApplicationStatusEnums statusEnums, Sys_user user) {
|
||||
if (statusEnums != BrandApplicationStatusEnums.IN_REVIEW) {
|
||||
throw new RuntimeException("提交申请失败");
|
||||
}
|
||||
// 先获取用户所在工会的关系网 secondUnion -> firstUnion -> 0
|
||||
String unionId = SecurityUtil.getUnionId();
|
||||
|
||||
// 两种方案:先删除之前撤回的审核记录/修改之前的撤回审核记录的状态
|
||||
// 0.先删除 撤回审核记录 的 applicationId 记录,如果没有也无所谓
|
||||
dao().update(BrandApplicationFlow.class, Chain.make("delFlag", true), Cnd.where("applicationId", "=", applicationId));
|
||||
|
||||
// 1.先插入当前用户,表示已经通过提交阶段
|
||||
BrandApplicationFlow brandApplicationFlow = new BrandApplicationFlow();
|
||||
brandApplicationFlow.setApplicationId(applicationId);
|
||||
brandApplicationFlow.setAuditorId(user.getId());
|
||||
brandApplicationFlow.setAuditor(user.getUsername());
|
||||
brandApplicationFlow.setSortNo(0);
|
||||
brandApplicationFlow.setStatus(ApplicationFlowStatusEnum.PASSED.getValue());
|
||||
insert(brandApplicationFlow);
|
||||
|
||||
Sys_union union = dao().fetch(Sys_union.class, unionId);
|
||||
if (union != null) {
|
||||
BrandApplicationFlow flow = new BrandApplicationFlow();
|
||||
flow.setApplicationId(applicationId);
|
||||
flow.setUnionId(union.getId());
|
||||
flow.setUnionName(union.getName());
|
||||
flow.setStatus(ApplicationFlowStatusEnum.TO_BE_AUDIT.getValue());
|
||||
flow.setSortNo(1);
|
||||
insert(flow);
|
||||
}
|
||||
}
|
||||
|
||||
/// 审核
|
||||
@Override
|
||||
public void audit(BrandApplicationAuditDTO dto) {
|
||||
String applicationId = StrUtil.blankToDefault(dto.getApplicationId(), dto.getProcessInstanceBusinessId());
|
||||
if (StrUtil.isBlank(applicationId)) {
|
||||
throw new RuntimeException("申请 Id 不能为空");
|
||||
}
|
||||
String taskId = StrUtil.blankToDefault(dto.getProcessInstanceTaskId(), dto.getFlowId());
|
||||
if (StrUtil.isBlank(taskId)) {
|
||||
throw new RuntimeException("流程任务ID不能为空");
|
||||
}
|
||||
BpmTaskApprovalTypeEnum approvalTypeEnum = getBpmTaskApprovalTypeEnum(dto);
|
||||
HashMap<String, Object> variables = new HashMap<>(BeanUtil.beanToMap(dto));
|
||||
variables.put("bpmTaskApprovalType", approvalTypeEnum.name());
|
||||
variables.put("approvalOpinion", dto.getRemark());
|
||||
bpmService.completeTask(taskId, approvalTypeEnum, variables, getAssignments(dto, approvalTypeEnum));
|
||||
|
||||
BpmProcessInstance instance = dao().fetch(BpmProcessInstance.class, Cnd.where("processInstanceBusinessId", "=", applicationId));
|
||||
if (approvalTypeEnum == BpmTaskApprovalTypeEnum.REJECT) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.REJECT.getCode()),
|
||||
Cnd.where("id", "=", applicationId));
|
||||
} else if (approvalTypeEnum == BpmTaskApprovalTypeEnum.BACK || approvalTypeEnum == BpmTaskApprovalTypeEnum.BACK_OTHER_NODE) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.IN_REVIEW.getCode()),
|
||||
Cnd.where("id", "=", applicationId));
|
||||
} else if (instance != null && BpmProcessInstanceStatusEnum.COMPLETED.name().equals(instance.getProcessInstanceStatus())) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.PASSED.getCode()),
|
||||
Cnd.where("id", "=", applicationId));
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getAssignments(BrandApplicationAuditDTO dto, BpmTaskApprovalTypeEnum approvalTypeEnum) {
|
||||
if (dto.getAssignments() != null && !dto.getAssignments().isEmpty()) {
|
||||
return dto.getAssignments();
|
||||
}
|
||||
if (approvalTypeEnum == BpmTaskApprovalTypeEnum.PASS) {
|
||||
String approvalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_ADMIN);
|
||||
if (StrUtil.isBlank(approvalLoginName)) {
|
||||
throw new RuntimeException("校工会未配置审批人,请联系管理员");
|
||||
}
|
||||
return List.of(approvalLoginName);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private BpmTaskApprovalTypeEnum getBpmTaskApprovalTypeEnum(BrandApplicationAuditDTO dto) {
|
||||
if (StrUtil.isNotBlank(dto.getBpmTaskApprovalType())) {
|
||||
return BpmTaskApprovalTypeEnum.valueOf(dto.getBpmTaskApprovalType());
|
||||
}
|
||||
if (dto.getStatus() == null) {
|
||||
throw new RuntimeException("任务审批类型错误,请传入正确的任务审批类型。");
|
||||
}
|
||||
ApplicationFlowStatusEnum statusEnum = ApplicationFlowStatusEnum.getStatusEnumByValue(dto.getStatus());
|
||||
if (statusEnum == ApplicationFlowStatusEnum.PASSED) {
|
||||
return BpmTaskApprovalTypeEnum.PASS;
|
||||
} else if (statusEnum == ApplicationFlowStatusEnum.REJECT) {
|
||||
return BpmTaskApprovalTypeEnum.REJECT;
|
||||
} else if (statusEnum == ApplicationFlowStatusEnum.RECALL) {
|
||||
return BpmTaskApprovalTypeEnum.BACK;
|
||||
}
|
||||
throw new RuntimeException("任务审批类型错误,请传入正确的任务审批类型。");
|
||||
}
|
||||
|
||||
/// 审核
|
||||
public void auditOld(BrandApplicationAuditDTO dto) {
|
||||
BrandApplicationFlow applicationFlow = dao().fetch(BrandApplicationFlow.class, Cnd.where("applicationId", "=", dto.getApplicationId())
|
||||
.and("id", "=", dto.getFlowId())
|
||||
.and("status", "=", ApplicationFlowStatusEnum.TO_BE_AUDIT.getValue())
|
||||
.and("delFlag", "=", false));
|
||||
if (applicationFlow == null) {
|
||||
throw new RuntimeException("待操作记录不存在");
|
||||
}
|
||||
Sys_user user = getCurrentUser();
|
||||
if (user == null) {
|
||||
throw new RuntimeException("用户信息过期,请重新登录");
|
||||
}
|
||||
// 先更新
|
||||
applicationFlow.setStatus(dto.getStatus());
|
||||
applicationFlow.setAuditor(user.getUsername());
|
||||
applicationFlow.setAuditorId(user.getId());
|
||||
applicationFlow.setRemark(dto.getRemark());
|
||||
updateIgnoreNull(applicationFlow);
|
||||
|
||||
List<BrandApplicationFlow> flowList = dao().query(BrandApplicationFlow.class, Cnd.where("applicationId", "=", dto.getApplicationId()).and("delFlag", "=", false));
|
||||
if (flowList == null || flowList.isEmpty()) {
|
||||
throw new RuntimeException("流程记录为空");
|
||||
}
|
||||
|
||||
long count = flowList.stream().filter(item -> Objects.equals(item.getStatus(), ApplicationFlowStatusEnum.PASSED.getValue())).count();
|
||||
ApplicationFlowStatusEnum statusEnum = ApplicationFlowStatusEnum.getStatusEnumByValue(dto.getStatus());
|
||||
//流程审批通过
|
||||
if (statusEnum == ApplicationFlowStatusEnum.PASSED)
|
||||
{
|
||||
if (count == flowList.size()) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.PASSED.getCode()),
|
||||
Cnd.where("id", "=", dto.getApplicationId()));
|
||||
} else {
|
||||
Optional<BrandApplicationFlow> first = flowList.stream().filter(item -> item.getSortNo() == (applicationFlow.getSortNo() + 1)).findFirst();
|
||||
if (first.isPresent()) {
|
||||
BrandApplicationFlow flow = first.get();
|
||||
flow.setRemark(dto.getRemark());
|
||||
flow.setStatus(ApplicationFlowStatusEnum.TO_BE_AUDIT.getValue());
|
||||
updateIgnoreNull(flow);
|
||||
}
|
||||
}
|
||||
} else if (statusEnum == ApplicationFlowStatusEnum.REPEAL) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.REPEAL.getCode()),
|
||||
Cnd.where("id", "=", dto.getApplicationId()));
|
||||
} else if (statusEnum == ApplicationFlowStatusEnum.RECALL) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.IN_REVIEW.getCode()),
|
||||
Cnd.where("id", "=", dto.getApplicationId()));
|
||||
} else if (statusEnum == ApplicationFlowStatusEnum.REJECT) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.REJECT.getCode()),
|
||||
Cnd.where("id", "=", dto.getApplicationId()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recall(BrandApplicationRecallDTO dto) {
|
||||
String taskId = StrUtil.blankToDefault(dto.getProcessInstanceTaskId(), dto.getFlowId());
|
||||
if (StrUtil.isNotBlank(taskId)) {
|
||||
bpmService.revokeTask(taskId);
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.IN_REVIEW.getCode()),
|
||||
Cnd.where("id", "=", dto.getApplicationId()));
|
||||
return;
|
||||
}
|
||||
bpmService.revokeApply(dto.getApplicationId());
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.DRAFT.getCode()),
|
||||
Cnd.where("id", "=", dto.getApplicationId()));
|
||||
}
|
||||
|
||||
public void recallOld(BrandApplicationRecallDTO dto) {
|
||||
// 撤回分为 申请人撤回 和 审核人撤回
|
||||
// 如果是申请人,需要把 表单状态改为 DRAFT
|
||||
Sys_user user = getCurrentUser();
|
||||
// 查询 申请表单 在 flow 中的 curFlowId 和 nextFlowId
|
||||
String applicationId = dto.getApplicationId();
|
||||
List<BrandFlowUserVO> brandFlowUserVOS = selectApplicationTableVOById(applicationId);
|
||||
if (user == null || brandFlowUserVOS.isEmpty()) {
|
||||
throw new RuntimeException("撤回申请失败");
|
||||
}
|
||||
List<String> flowIds = brandFlowUserVOS.stream().map(BrandFlowUserVO::getFlowId).collect(Collectors.toList());
|
||||
// 如果 申请人撤回 和 撤回发起人 为同一人,且在 申请模块撤销,就更新 申请表 为 DRAFT
|
||||
// 如果是在 申请表中 撤回 时,dto.getFlowId() 是 null
|
||||
boolean isSameUser = brandFlowUserVOS.get(0).getUserId().equals(user.getId()) && dto.getFlowId() == null;
|
||||
if (isSameUser) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.DRAFT.getCode()),
|
||||
Cnd.where("id", "=", applicationId));
|
||||
dto.setFlowId(flowIds.get(0));
|
||||
// 把所有 审批流程 状态改为 WAIT_AUDIT 0
|
||||
updateStatusByApplicationId(applicationId, 0);
|
||||
} else {
|
||||
// 如果 是由上级人员撤回 审批 记录,且是在 审批表中操作, dto.getFlowId() 是 存在的
|
||||
// 先修改 申请表 为 待审核状态
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.IN_REVIEW.getCode()),
|
||||
Cnd.where("id", "=", applicationId));
|
||||
// 再把 审批流程 中的状态改为撤回,下级状态改成待审核
|
||||
int index = flowIds.indexOf(dto.getFlowId());
|
||||
dto.setFlowId(flowIds.get(index));
|
||||
Integer sortNo = brandFlowUserVOS.get(index).getSortNo();
|
||||
// 把 高于当前 组织的 流状态 置为 0
|
||||
updateStatusByApplicationId(applicationId, sortNo);
|
||||
}
|
||||
// 把当前记录改为 TO_BE_AUDIT
|
||||
BrandApplicationFlow brandApplicationFlow = new BrandApplicationFlow();
|
||||
brandApplicationFlow.setId(dto.getFlowId());
|
||||
brandApplicationFlow.setAuditorId(user.getId());
|
||||
brandApplicationFlow.setAuditor(user.getUsername());
|
||||
brandApplicationFlow.setStatus(ApplicationFlowStatusEnum.TO_BE_AUDIT.getValue());
|
||||
brandApplicationFlow.setRemark(isSameUser ? "申请人操作撤回" : "操作撤回");
|
||||
updateIgnoreNull(brandApplicationFlow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BrandApplicationFlowVO> getFlowList(String applicationId) {
|
||||
List<BrandApplicationFlow> applicationFlows = dao().query(BrandApplicationFlow.class,
|
||||
Cnd.where("applicationId", "=", applicationId).and("delFlag", "=", false).asc("sortNo"));
|
||||
return BrandApplicationFlowConvert.convertList(applicationFlows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByApplicationIds(List<String> ids) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
dao().update(BrandApplicationFlow.class, Chain.make("delFlag", true), Cnd.where("applicationId", "in", ids));
|
||||
}
|
||||
|
||||
private void updateStatusByApplicationId(String applicationId, Integer sortNo) {
|
||||
dao().update(BrandApplicationFlow.class,
|
||||
Chain.make("status", 0).add("remark", "申请人操作撤回"),
|
||||
Cnd.where("applicationId", "=", applicationId).and("sortNo", ">", sortNo));
|
||||
}
|
||||
|
||||
private List<BrandFlowUserVO> selectApplicationTableVOById(String applicationId) {
|
||||
List<BrandApplicationFlow> flows = dao().query(BrandApplicationFlow.class,
|
||||
Cnd.where("applicationId", "=", applicationId).and("delFlag", "=", false).asc("sortNo"));
|
||||
BrandStudioApplication application = dao().fetch(BrandStudioApplication.class, applicationId);
|
||||
return flows.stream().map(flow -> {
|
||||
BrandFlowUserVO vo = BeanUtil.copyProperties(flow, BrandFlowUserVO.class);
|
||||
vo.setFlowId(flow.getId());
|
||||
vo.setSortNo(flow.getSortNo());
|
||||
vo.setUserId(application == null ? null : application.getUserId());
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private Sys_user getCurrentUser() {
|
||||
String userId = SecurityUtil.getUserId();
|
||||
if (userId == null || userId.isBlank()) {
|
||||
return null;
|
||||
}
|
||||
return dao().fetch(Sys_user.class, userId);
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
package com.budwk.app.zhgh.brand.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.ApplicationProgressVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.ApplicationWarnVO;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.UnionApplyStatsVO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioApplication;
|
||||
import com.budwk.app.zhgh.brand.service.BrandApplicationStatisticsService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class BrandApplicationStatisticsServiceImpl extends BaseServiceImpl<BrandStudioApplication> implements BrandApplicationStatisticsService {
|
||||
|
||||
public BrandApplicationStatisticsServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
// 管理员查看
|
||||
@Override
|
||||
public List<UnionApplyStatsVO> selectUnionApplyStats() {
|
||||
Sql sql = Sqls.create("""
|
||||
select unionId,
|
||||
unionName,
|
||||
createName as username,
|
||||
count(1) as applyCnt,
|
||||
sum(case when status = 5 then 1 else 0 end) as passedCnt,
|
||||
round(sum(case when status = 5 then 1 else 0 end) * 100 / count(1), 2) as passRate,
|
||||
sum(case when status = 1 then 1 else 0 end) as reviewCnt,
|
||||
round(sum(case when status = 1 then 1 else 0 end) * 100 / count(1), 2) as reviewRate,
|
||||
sum(case when status = 2 then 1 else 0 end) as rejectCnt,
|
||||
round(sum(case when status = 2 then 1 else 0 end) * 100 / count(1), 2) as rejectRate,
|
||||
sum(case when status = 3 then 1 else 0 end) as repealCnt,
|
||||
round(sum(case when status = 3 then 1 else 0 end) * 100 / count(1), 2) as repealRate
|
||||
from brand_studio_application
|
||||
where delFlag = 0
|
||||
group by unionId, unionName, createName
|
||||
order by unionName
|
||||
""");
|
||||
return listVO(sql, UnionApplyStatsVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ApplicationProgressVO> selectApplyProgressStats() {
|
||||
Sql sql = Sqls.create("""
|
||||
select bsa.id as applicationId,
|
||||
bsa.name as applicationName,
|
||||
bsa.unionId,
|
||||
bsa.unionName,
|
||||
bsa.userId,
|
||||
bsa.status,
|
||||
bsa.leadPeople,
|
||||
bsa.createdAt as createTime,
|
||||
count(baf.id) as totalNodes,
|
||||
sum(case when baf.status = 5 then 1 else 0 end) as passedNodes,
|
||||
case when count(baf.id) = 0 then 0 else round(sum(case when baf.status = 5 then 1 else 0 end) * 100 / count(baf.id), 2) end as progressPct
|
||||
from brand_studio_application bsa
|
||||
left join brand_application_flow baf on bsa.id = baf.applicationId and baf.delFlag = 0
|
||||
where bsa.delFlag = 0
|
||||
and bsa.userId = @userId
|
||||
group by bsa.id, bsa.name, bsa.unionId, bsa.unionName, bsa.userId, bsa.status, bsa.leadPeople, bsa.createdAt
|
||||
order by bsa.createdAt desc
|
||||
""");
|
||||
sql.setParam("userId", SecurityUtil.getUserId());
|
||||
return listVO(sql, ApplicationProgressVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ApplicationWarnVO> selectApplyWarningStats() {
|
||||
Sql sql = Sqls.create("""
|
||||
select bsa.id as applicationId,
|
||||
bsa.name,
|
||||
bsa.leadPeople,
|
||||
bsa.status,
|
||||
bsa.unionId,
|
||||
bsa.unionName,
|
||||
bsa.createdAt as receiveTime,
|
||||
round((unix_timestamp(now()) * 1000 - bsa.createdAt) / 86400000, 2) as pendingDays,
|
||||
case when (unix_timestamp(now()) * 1000 - bsa.createdAt) / 86400000 >= 7 then 1 else 0 end as warnStatus,
|
||||
round(avg((unix_timestamp(now()) * 1000 - bsa.createdAt) / 86400000), 2) as avgAuditDays
|
||||
from brand_studio_application bsa
|
||||
where bsa.delFlag = 0
|
||||
and bsa.status = 1
|
||||
and (bsa.unionId = @unionId or @unionId = '')
|
||||
group by bsa.id, bsa.name, bsa.leadPeople, bsa.status, bsa.unionId, bsa.unionName, bsa.createdAt
|
||||
order by pendingDays desc
|
||||
""");
|
||||
sql.setParam("unionId", SecurityUtil.getUnionId());
|
||||
return listVO(sql, ApplicationWarnVO.class);
|
||||
}
|
||||
|
||||
// 对申请单的 type,年龄等等字段分组
|
||||
public Map<String, Map<String, Long>> selectApplyMapCount() {
|
||||
String userId = SecurityUtil.getUserId();
|
||||
List<BrandStudioApplication> applications = dao().query(BrandStudioApplication.class,
|
||||
Cnd.where("userId", "=", userId).and("delFlag", "=", false));
|
||||
Map<String, Long> createYearCount = applications.stream()
|
||||
.collect(Collectors.groupingBy(BrandStudioApplication::getCreateYear, Collectors.counting()))
|
||||
.entrySet()
|
||||
.stream()
|
||||
.sorted(Map.Entry.comparingByKey(
|
||||
Comparator.comparingInt(year -> {
|
||||
try {
|
||||
return Integer.parseInt(year);
|
||||
} catch (NumberFormatException e) {
|
||||
return Integer.MAX_VALUE; // 非法年份放最后
|
||||
}
|
||||
})
|
||||
))
|
||||
.collect(Collectors.toMap(
|
||||
Map.Entry::getKey,
|
||||
Map.Entry::getValue,
|
||||
(e1, e2) -> e1,
|
||||
LinkedHashMap::new
|
||||
));
|
||||
Map<String, Long> leadPeopleCount = applications.stream()
|
||||
.collect(Collectors.groupingBy(BrandStudioApplication::getLeadPeople, Collectors.counting()));
|
||||
Map<String, Long> leadAgeCount = applications.stream()
|
||||
.collect(Collectors.groupingBy(app -> String.valueOf(app.getLeadAge()), Collectors.counting()));
|
||||
Map<String, Long> typeCount = applications.stream()
|
||||
.collect(Collectors.groupingBy(BrandStudioApplication::getType, Collectors.counting()));
|
||||
Map<String, Long> trackCount = applications.stream()
|
||||
.collect(Collectors.groupingBy(BrandStudioApplication::getTrack, Collectors.counting()));
|
||||
Map<String, Map<String, Long>> mapMap = new HashMap<>();
|
||||
mapMap.put("createYear", createYearCount);
|
||||
mapMap.put("leadPeople", leadPeopleCount);
|
||||
mapMap.put("leadAge", leadAgeCount);
|
||||
mapMap.put("type", typeCount);
|
||||
mapMap.put("track", trackCount);
|
||||
return mapMap;
|
||||
}
|
||||
}
|
||||
+446
@@ -0,0 +1,446 @@
|
||||
package com.budwk.app.zhgh.brand.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.models.Sys_unit;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.brand.convert.BrandStudioApplicationConvert;
|
||||
import com.budwk.app.zhgh.brand.convert.BrandStudioHonorConvert;
|
||||
import com.budwk.app.zhgh.brand.convert.BrandStudioMemberConvert;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.*;
|
||||
import com.budwk.app.zhgh.brand.domain.enums.BrandApplicationStatusEnums;
|
||||
import com.budwk.app.zhgh.brand.domain.vo.*;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioApplication;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioHonor;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioMember;
|
||||
import com.budwk.app.zhgh.brand.service.BrandApplicationFlowService;
|
||||
import com.budwk.app.zhgh.brand.service.BrandStudioApplicationService;
|
||||
import com.budwk.app.zhgh.brand.service.BrandStudioMemberService;
|
||||
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.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class BrandStudioApplicationServiceImpl extends BaseServiceImpl<BrandStudioApplication> implements BrandStudioApplicationService {
|
||||
|
||||
@Inject
|
||||
private BrandStudioMemberService studioMemberService;
|
||||
|
||||
@Inject
|
||||
private BrandApplicationFlowService flowService;
|
||||
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
|
||||
@Inject
|
||||
private CommonService commonService;
|
||||
|
||||
public BrandStudioApplicationServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
// 分页查询申请表
|
||||
@Override
|
||||
public Pagination<BrandStudioApplicationVO> page(BrandStudioApplicationPageDTO pageDTO) {
|
||||
String userId = SecurityUtil.getUserId();
|
||||
|
||||
Cnd cnd = Cnd.where("delFlag", "=", false);
|
||||
/// 2. 先写“普通筛选”这一整组
|
||||
if (StrUtil.isNotBlank(pageDTO.getName())) {
|
||||
cnd.and("name", "like", "%" + pageDTO.getName() + "%");
|
||||
}
|
||||
if (StrUtil.isNotBlank(userId)) {
|
||||
cnd.and("createdBy", "=", userId);
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageDTO.getCreateYear())) {
|
||||
cnd.and("createYear", "=", pageDTO.getCreateYear());
|
||||
}
|
||||
if (pageDTO.getStatus() != null) {
|
||||
cnd.and("status", "=", pageDTO.getStatus());
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageDTO.getLeadPeople())) {
|
||||
cnd.and("leadPeople", "like", "%" + pageDTO.getLeadPeople() + "%");
|
||||
}
|
||||
cnd.desc("createYear");
|
||||
cnd.desc("createdAt");
|
||||
Pagination<BrandStudioApplication> page = listPage(pageDTO.getPageNumber(), pageDTO.getPageSize(), BrandStudioApplication.class, cnd);
|
||||
List<BrandStudioApplicationVO> list = BrandStudioApplicationConvert.convertList(page.getList());
|
||||
return new Pagination<>(page.getPageNo(), page.getPageSize(), page.getTotalCount(), list);
|
||||
}
|
||||
|
||||
private Sys_user getCheckedUserDetail() {
|
||||
Sys_user user = getCurrentUser();
|
||||
if (user == null) {
|
||||
throw new RuntimeException("用户信息过期,请重新登录");
|
||||
}
|
||||
if (StrUtil.isEmpty(SecurityUtil.getUnionId())) {
|
||||
throw new RuntimeException("未关联工会");
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(BrandStudioApplicationCreateDTO dto) {
|
||||
Sys_user user = getCheckedUserDetail();
|
||||
BrandStudioApplication application = BrandStudioApplicationConvert.convert(dto);
|
||||
application.setUserId(user.getId());
|
||||
application.setDeptid(user.getUnitId());
|
||||
application.setCreateName(user.getUsername());
|
||||
Integer status = dto.getStatus();
|
||||
BrandApplicationStatusEnums statusByCode = BrandApplicationStatusEnums.getStatusByCode(status);
|
||||
if (statusByCode == null) {
|
||||
throw new RuntimeException("状态异常");
|
||||
}
|
||||
application.setStatus(statusByCode.getCode());
|
||||
insert(application);
|
||||
insertBatchBrandStudioMember(dto.getBrandStudioMembers(), application.getId());
|
||||
if (statusByCode == BrandApplicationStatusEnums.CREATING) {
|
||||
/// 提交审核的话会记录在审核流表中
|
||||
submitAudit(application, user);
|
||||
}
|
||||
}
|
||||
|
||||
/// 提交申请
|
||||
@Override
|
||||
public void submitApply(BrandApplicationAuditDTO dto) {
|
||||
String applicationId = dto.getApplicationId();
|
||||
BrandApplicationStatusEnums statusEnums = BrandApplicationStatusEnums.getStatusByCode(dto.getStatus());
|
||||
if (statusEnums == null) {
|
||||
throw new RuntimeException("提交申请失败");
|
||||
}
|
||||
Sys_user user = getCurrentUser();
|
||||
if (user == null) {
|
||||
throw new RuntimeException("用户信息过期,请重新登录");
|
||||
}
|
||||
/// 1.先更新工作室申请表的状态
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.CREATING.getCode()),
|
||||
Cnd.where("id", "=", applicationId));
|
||||
/// 2.插入待审批流程
|
||||
if (statusEnums == BrandApplicationStatusEnums.IN_REVIEW) {
|
||||
/// 提交审核的话会记录在审核流表中
|
||||
BrandStudioApplication application = fetch(applicationId);
|
||||
submitAudit(application, user);
|
||||
}
|
||||
}
|
||||
|
||||
private void submitAudit(BrandStudioApplication application, Sys_user user) {
|
||||
if (application == null) {
|
||||
throw new RuntimeException("提交申请失败");
|
||||
}
|
||||
String approvalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.BRANCH_UNION_CHAIRMAN, Cnd.where(Sys_user_role::getUnionId, "=", application.getUnionId()));
|
||||
if (StrUtil.isBlank(approvalLoginName)) {
|
||||
throw new RuntimeException("分工会未配置审批人,请联系管理员");
|
||||
}
|
||||
try {
|
||||
HashMap<String, Object> variables = new HashMap<>();
|
||||
variables.put("applicationId", application.getId());
|
||||
variables.put("status", BrandApplicationStatusEnums.IN_REVIEW.getCode());
|
||||
variables.put("userId", user.getId());
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.BRAND_STUDIO.name(), application.getName(), application.getId(), List.of(approvalLoginName), variables);
|
||||
updateApplicationStatusToFail(application.getId(), true);
|
||||
} catch (RuntimeException e) {
|
||||
updateApplicationStatusToFail(application.getId(), false);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateApplicationStatusToFail(String businessId, Boolean success) {
|
||||
if (success) {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.IN_REVIEW.getCode()),
|
||||
Cnd.where("id", "=", businessId));
|
||||
} else {
|
||||
dao().update(BrandStudioApplication.class,
|
||||
Chain.make("status", BrandApplicationStatusEnums.FAIL.getCode()),
|
||||
Cnd.where("id", "=", businessId));
|
||||
}
|
||||
}
|
||||
|
||||
private void insertBatchBrandStudioMember(List<BrandStudioMemberCreateDTO> memberCreateDTOS, String id) {
|
||||
List<BrandStudioMember> brandStudioMembers = BrandStudioMemberConvert.convertList(memberCreateDTOS);
|
||||
if (brandStudioMembers != null && !brandStudioMembers.isEmpty()) {
|
||||
brandStudioMembers.forEach(member -> member.setApplicationId(id));
|
||||
dao().insert(brandStudioMembers);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void oaAuditUpdateStatus(String id, Integer status, String reason) {
|
||||
this.update(Chain.make("status", status), Cnd.where("id", "=", id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(BrandStudioApplicationUpdateDTO dto) {
|
||||
BrandStudioApplication entity = BrandStudioApplicationConvert.convert(dto);
|
||||
updateIgnoreNull(entity);
|
||||
/// 先删除成员信息
|
||||
List<String> ids = Collections.singletonList(dto.getId());
|
||||
((BrandStudioMemberServiceImpl) studioMemberService).deleteByApplicationIds(ids);
|
||||
BrandApplicationStatusEnums statusByCode = BrandApplicationStatusEnums.getStatusByCode(dto.getStatus());
|
||||
if (statusByCode == null) {
|
||||
throw new RuntimeException("状态异常");
|
||||
}
|
||||
/// 再插入新的成员信息
|
||||
insertBatchBrandStudioMember(dto.getBrandStudioMembers(), dto.getId());
|
||||
if (statusByCode == BrandApplicationStatusEnums.CREATING) {
|
||||
/// 提交审核的话会记录在审核流表中
|
||||
submitAudit(fetch(dto.getId()), getCheckedUserDetail());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMemberOrHonor(BrandStudioApplicationUpdateDTO dto) {
|
||||
dao().update(BrandStudioApplication.class, Chain.make("memberNum", dto.getMemberNum()), Cnd.where("id", "=", dto.getId()));
|
||||
/// 先删除成员信息
|
||||
List<String> ids = Collections.singletonList(dto.getId());
|
||||
((BrandStudioMemberServiceImpl) studioMemberService).deleteByApplicationIds(ids);
|
||||
/// 再插入新的成员信息
|
||||
insertBatchBrandStudioMember(dto.getBrandStudioMembers(), dto.getId());
|
||||
/// 修改荣誉信息
|
||||
dao().update(BrandStudioHonor.class, Chain.make("delFlag", true), Cnd.where("applicationId", "in", ids));
|
||||
List<BrandStudioHonorCreateDTO> honorCreateDTOS = dto.getBrandStudioHonors();
|
||||
List<BrandStudioHonor> honors = BrandStudioHonorConvert.convertListDTO(honorCreateDTOS);
|
||||
if (honors != null && !honors.isEmpty()) {
|
||||
honors.forEach(honor -> honor.setApplicationId(dto.getId()));
|
||||
dao().insert(honors);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> ids) {
|
||||
String userId = SecurityUtil.getUserId();
|
||||
|
||||
List<String> validIds = dao().query(BrandStudioApplication.class, Cnd.where("id", "in", ids)
|
||||
.and("userId", "=", userId)
|
||||
.and("delFlag", "=", false))
|
||||
.stream().map(BrandStudioApplication::getId).collect(toList());
|
||||
|
||||
Set<String> inputSet = new HashSet<>(ids);
|
||||
Set<String> validSet = new HashSet<>(validIds);
|
||||
if (!validSet.equals(inputSet)) {
|
||||
throw new RuntimeException("存在不可操作数据,删除失败");
|
||||
}
|
||||
|
||||
dao().update(BrandStudioApplication.class, Chain.make("delFlag", true), Cnd.where("id", "in", validIds));
|
||||
((BrandStudioMemberServiceImpl) studioMemberService).deleteByApplicationIds(validIds);
|
||||
flowService.deleteByApplicationIds(validIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysUnionDeptVO queryUserUnion() {
|
||||
Sys_user user = getCurrentUser();
|
||||
if (user == null) {
|
||||
throw new RuntimeException("用户信息过期,请重新登录");
|
||||
}
|
||||
String unionId = SecurityUtil.getUnionId();
|
||||
if (StrUtil.isEmpty(unionId)) {
|
||||
throw new RuntimeException("未关联工会");
|
||||
}
|
||||
/// 获取用户所属公会和机构名
|
||||
SysUnionDeptVO sysUnionDeptVO = new SysUnionDeptVO();
|
||||
sysUnionDeptVO.setUserId(user.getId());
|
||||
sysUnionDeptVO.setUnionId(unionId);
|
||||
Sys_union union = dao().fetch(Sys_union.class, unionId);
|
||||
if (union != null) {
|
||||
sysUnionDeptVO.setUnionName(union.getName());
|
||||
sysUnionDeptVO.setTopUnionId(union.getId());
|
||||
sysUnionDeptVO.setTopUnionName(union.getName());
|
||||
}
|
||||
sysUnionDeptVO.setDeptId(user.getUnitId());
|
||||
Sys_unit unit = dao().fetch(Sys_unit.class, user.getUnitId());
|
||||
sysUnionDeptVO.setDeptName(unit == null ? null : unit.getName());
|
||||
return sysUnionDeptVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LeaderHonorGroupVO> queryLeaderHonor() {
|
||||
List<LeaderHonorVO> leaderHonorVOS = selectLeaderHonor();
|
||||
Map<String, List<LeaderHonorVO>> grouped = leaderHonorVOS.stream()
|
||||
.collect(Collectors.groupingBy(LeaderHonorVO::getEmplid));
|
||||
|
||||
return grouped.entrySet().stream()
|
||||
.map(entry -> {
|
||||
String emplid = entry.getKey();
|
||||
List<LeaderHonorVO> list = entry.getValue();
|
||||
// 假设同一 emplid 的 userName 相同,取第一个
|
||||
String userName = list.get(0).getUserName();
|
||||
Integer age = list.get(0).getAge();
|
||||
List<String> honorNames = list.stream()
|
||||
.map(LeaderHonorVO::getHonorName)
|
||||
.collect(Collectors.toList());
|
||||
return new LeaderHonorGroupVO(emplid, userName, age, honorNames);
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrandStudioApplicationVO getDetailById(String id) {
|
||||
BrandStudioApplication entity = fetch(id);
|
||||
if (entity == null || Boolean.TRUE.equals(entity.getDelFlag())) {
|
||||
throw new RuntimeException("未查询到该申请记录");
|
||||
}
|
||||
BrandStudioApplicationVO applicationVO = BrandStudioApplicationConvert.convert(entity);
|
||||
List<BrandStudioMember> brandStudioMembers = dao().query(BrandStudioMember.class, Cnd.where("applicationId", "=", id).and("delFlag", "=", false));
|
||||
if (brandStudioMembers != null && !brandStudioMembers.isEmpty()) {
|
||||
List<BrandStudioMemberVO> brandStudioMembersVO = BrandStudioMemberConvert.convertListVO(brandStudioMembers);
|
||||
applicationVO.setBrandStudioMembers(brandStudioMembersVO);
|
||||
}
|
||||
|
||||
List<BrandStudioHonor> honorList = dao().query(BrandStudioHonor.class, Cnd.where("applicationId", "=", id).and("delFlag", "=", false));
|
||||
if (honorList != null && !honorList.isEmpty()) {
|
||||
List<BrandStudioHonorVO> honorVOS = BrandStudioHonorConvert.convertListVO(honorList);
|
||||
applicationVO.setBrandStudioHonors(honorVOS);
|
||||
}
|
||||
|
||||
/// 查询当前工作流待审核 ID
|
||||
return applicationVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void archive(List<String> idList) {
|
||||
if (idList == null || idList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
dao().update(BrandStudioApplication.class, Chain.make("archive", 1), Cnd.where("id", "in", idList));
|
||||
}
|
||||
|
||||
/// 之前的工作流逻辑,已废弃
|
||||
@Override
|
||||
public Pagination<BrandStudioApplyFlowVO> auditPage(BrandStudioApplicationPageDTO pageDTO) {
|
||||
return flowAuditPage(pageDTO);
|
||||
}
|
||||
|
||||
/// 新的工作流逻辑
|
||||
@Override
|
||||
public Pagination<BrandStudioApplyFlowVO> flowAuditPage(BrandStudioApplicationPageDTO dto) {
|
||||
Sql sql = Sqls.create("""
|
||||
select bsa.*, inst.id as processInstanceId, inst.processInstanceNodeName as processTaskNode,
|
||||
task.id as flowId, task.id as processInstanceTaskId, task.taskStatus as processTaskReason,
|
||||
task.createdOn as processTaskStartTime, task.endOn as processTaskEndTime
|
||||
from brand_studio_application bsa
|
||||
inner join bpm_process_instance inst on bsa.id = inst.processInstanceBusinessId
|
||||
inner join bpm_process_task task on inst.id = task.processInstanceId and task.delFlag = 0
|
||||
inner join bpm_process_define def on inst.processDefineId = def.id and def.code = 'BRAND_STUDIO'
|
||||
where bsa.delFlag = 0
|
||||
$condition
|
||||
order by task.createdOn desc
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(dto.getName())) {
|
||||
cnd.and("bsa.name", "like", "%" + dto.getName() + "%");
|
||||
}
|
||||
if (StrUtil.isNotBlank(dto.getCreateYear())) {
|
||||
cnd.and("bsa.createYear", "=", dto.getCreateYear());
|
||||
}
|
||||
if (StrUtil.isNotBlank(dto.getLeadPeople())) {
|
||||
cnd.and("bsa.leadPeople", "like", "%" + dto.getLeadPeople() + "%");
|
||||
}
|
||||
if (dto.getProcessStatus() != null) {
|
||||
cnd.and("task.taskStatus", "=", getProcessTaskStatus(dto.getProcessStatus()));
|
||||
}
|
||||
if (dto.getStatus() != null) {
|
||||
cnd.and("bsa.status", "=", dto.getStatus());
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return listPageVO(dto, sql, BrandStudioApplyFlowVO.class);
|
||||
}
|
||||
|
||||
private String getProcessTaskStatus(Integer processStatus) {
|
||||
if (Objects.equals(processStatus, 1)) {
|
||||
return BpmProcessTaskStatusEnum.ACTIVE.name();
|
||||
}
|
||||
if (Objects.equals(processStatus, 5)) {
|
||||
return BpmProcessTaskStatusEnum.COMPLETE.name();
|
||||
}
|
||||
return String.valueOf(processStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pagination<BrandStudioApplicationHonorVO> summaryPage(BrandStudioApplicationPageDTO pageDTO) {
|
||||
Sql sql = Sqls.create("""
|
||||
select bsa.*, bsh.id as honorId, bsh.honorName, bsh.honorGrade, bsh.requireYear, bsh.honorCategory
|
||||
from brand_studio_application bsa
|
||||
left join brand_studio_honor bsh on bsa.id = bsh.applicationId and bsh.delFlag = 0
|
||||
where bsa.delFlag = 0
|
||||
$condition
|
||||
order by bsa.createYear desc, bsa.createdAt desc
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageDTO.getName())) {
|
||||
cnd.and("bsa.name", "like", "%" + pageDTO.getName() + "%");
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageDTO.getCreateYear())) {
|
||||
cnd.and("bsa.createYear", "=", pageDTO.getCreateYear());
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageDTO.getLeadPeople())) {
|
||||
cnd.and("bsa.leadPeople", "like", "%" + pageDTO.getLeadPeople() + "%");
|
||||
}
|
||||
if (pageDTO.getStatus() != null) {
|
||||
cnd.and("bsa.status", "=", pageDTO.getStatus());
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return listPageVO(pageDTO, sql, BrandStudioApplicationHonorVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BrandStudioApplicationHonorVO> getHonorDetailById(String id) {
|
||||
List<BrandStudioHonor> brandStudioHonors = dao().query(BrandStudioHonor.class, Cnd.where("applicationId", "=", id).and("delFlag", "=", false));
|
||||
return BrandStudioHonorConvert.convertList(brandStudioHonors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void export() {
|
||||
throw new RuntimeException("当前项目未配置品牌工作室台账导出模板");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportDocx(String id, HttpServletResponse response) {
|
||||
throw new RuntimeException("当前项目未配置品牌工作室申请文档模板");
|
||||
}
|
||||
|
||||
private List<LeaderHonorVO> selectLeaderHonor() {
|
||||
Sql sql = Sqls.create("""
|
||||
select su.id,
|
||||
su.loginname as emplid,
|
||||
su.username as userName,
|
||||
su.unitId as deptid,
|
||||
su.unitId,
|
||||
su.birthday,
|
||||
su.professionalTitle as honorName,
|
||||
u.unionId as unionId
|
||||
from sys_user su
|
||||
left join sys_unit u on su.unitId = u.id
|
||||
where su.delFlag = 0
|
||||
and su.disabled = 0
|
||||
""");
|
||||
return listVO(sql, LeaderHonorVO.class);
|
||||
}
|
||||
|
||||
private Sys_user getCurrentUser() {
|
||||
String userId = SecurityUtil.getUserId();
|
||||
if (userId == null || userId.isBlank()) {
|
||||
return null;
|
||||
}
|
||||
return dao().fetch(Sys_user.class, userId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.budwk.app.zhgh.brand.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioHonor;
|
||||
import com.budwk.app.zhgh.brand.service.BrandStudioHonorService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class BrandStudioHonorServiceImpl extends BaseServiceImpl<BrandStudioHonor> implements BrandStudioHonorService {
|
||||
|
||||
public BrandStudioHonorServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.budwk.app.zhgh.brand.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioMemberCreateDTO;
|
||||
import com.budwk.app.zhgh.brand.domain.dto.BrandStudioMemberUpdateDTO;
|
||||
import com.budwk.app.zhgh.brand.models.BrandStudioMember;
|
||||
import com.budwk.app.zhgh.brand.service.BrandStudioMemberService;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class BrandStudioMemberServiceImpl extends BaseServiceImpl<BrandStudioMember> implements BrandStudioMemberService {
|
||||
|
||||
public BrandStudioMemberServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(BrandStudioMemberCreateDTO dto) {
|
||||
BrandStudioMember member = BeanUtil.copyProperties(dto, BrandStudioMember.class);
|
||||
insert(member);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(BrandStudioMemberUpdateDTO dto) {
|
||||
BrandStudioMember member = BeanUtil.copyProperties(dto, BrandStudioMember.class);
|
||||
updateIgnoreNull(member);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> ids) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
dao().update(BrandStudioMember.class, Chain.make("delFlag", true), Cnd.where("id", "in", ids));
|
||||
}
|
||||
|
||||
public void deleteByApplicationIds(List<String> applicationIds) {
|
||||
if (applicationIds == null || applicationIds.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
dao().update(BrandStudioMember.class, Chain.make("delFlag", true), Cnd.where("applicationId", "in", applicationIds));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user