jzh 1 سال پیش
والد
کامیت
2e8b752ca2

+ 21 - 0
zjugis-business/src/main/java/com/zjugis/business/converter/resignApply/ResignApplyConvert.java

@@ -0,0 +1,21 @@
+package com.zjugis.business.converter.resignApply;
+
+import com.zjugis.business.flow.resign.controller.vo.ResignPageReqVO;
+import com.zjugis.business.flow.resign.entity.ResignDO;
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageReqVO;
+import com.zjugis.business.flow.resignApply.entity.ResignApplyDO;
+import com.zjugis.framework.common.pojo.PageResult;
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+
+@Mapper
+public interface ResignApplyConvert {
+    ResignApplyConvert INSTANCE = Mappers.getMapper(ResignApplyConvert.class);
+
+
+    PageResult<ResignApplyPageReqVO> convertPage(PageResult<ResignApplyDO> page);
+
+    ResignApplyPageReqVO convert(ResignApplyDO selectById);
+
+    ResignApplyDO convert01(ResignApplyPageReqVO vo);
+}

+ 2 - 0
zjugis-business/src/main/java/com/zjugis/business/enums/ErrorCodeConstants.java

@@ -28,6 +28,8 @@ public interface ErrorCodeConstants {
     ErrorCode INTERVIEW_NOT_EXISTS = new ErrorCode(3-001-004-005, "面试记录不存在");
 
     ErrorCode RESIGN_DETAIL_NOT_EXISTS = new ErrorCode(3-001-004-006, "工作交接人不能为空");
+
+    ErrorCode RESIGN_APPLY_NOT_EXISTS = new ErrorCode(3-001-004-007, "离职申请记录不存在");
     ErrorCode ID_CARD_EXIST = new ErrorCode(3-001-005-001, "身份证号已经存在");
     ErrorCode MOBILE_EXIST = new ErrorCode(3-001-005-003, "手机号已经存在");
     ErrorCode SUPPLIER_NOT_EXISTS = new ErrorCode(3-001-003-000, "供应商入库申请记录不存在");

+ 119 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/controller/ResignApplyController.java

@@ -0,0 +1,119 @@
+package com.zjugis.business.flow.resignApply.controller;
+
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageReqVO;
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageVO;
+import com.zjugis.business.flow.resignApply.service.ResignApplyService;
+import com.zjugis.framework.common.pojo.CommonResult;
+import com.zjugis.framework.common.pojo.PageResult;
+import com.zjugis.framework.workflow.model.BaseController;
+import com.zjugis.framework.workflow.workflow.WorkFlow;
+import com.zjugis.framework.workflow.workflow.WorkFlowMobile;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.util.Map;
+
+/**
+ * 工作流-离职申请
+ *
+ * @author jzh
+ * @since 2024/3/5 10:49
+ */
+@Tag(name = "工作流程 - 离职申请")
+@RestController
+@RequestMapping("/resignApply")
+@Validated
+public class ResignApplyController extends BaseController {
+
+    @Resource
+    private ResignApplyService resignApplyService;
+
+    /**
+     * 离职申请需求表单生成
+     */
+    @WorkFlow(isReceiveMaterial = true, isReceiveOpinion = true)
+    @ResponseBody
+    @GetMapping("/index")
+    @Operation(summary = "离职申请表单生成")
+    public String index(String activityTemplateId, String flowInstanceId, String userId) throws Exception {
+        Map<String, Object> map = resignApplyService.getFormParams(flowInstanceId);
+        return resultPage(map);
+    }
+
+    /**
+     * 离职申请表单生成 vue
+     */
+    @GetMapping("/mobileAdd")
+    public CommonResult<ResignApplyPageReqVO> mobileAdd(String activityTemplateId, String flowInstanceId, String userId){
+        return CommonResult.success(resignApplyService.flowAdd(flowInstanceId, userId));
+    }
+
+    /**
+     * 离职申请需求表单生成
+     */
+    @WorkFlowMobile(isReceiveMaterial = true, isReceiveOpinion = true)
+    @ResponseBody
+    @GetMapping("/mobileIndex")
+    @Operation(summary = "离职申请表单生成")
+    public String mobileIndex(String activityTemplateId, String flowInstanceId, String userId) throws Exception {
+        Map<String, Object> map = resignApplyService.getFormParams(flowInstanceId);
+        return resultPage(map);
+    }
+
+    /**
+     * 离职申请申请列表查询
+     */
+    @GetMapping("/page")
+    @Operation(summary = "离职申请分页列表")
+    public CommonResult<PageResult<ResignApplyPageReqVO>> getPage(@Valid ResignApplyPageVO pageReqVO) {
+        return CommonResult.success(resignApplyService.getPage(pageReqVO));
+    }
+
+    /**
+     * 离职申请详情查询
+     */
+    @GetMapping("/detail")
+    @Operation(summary = "离职申请详情")
+    public CommonResult<ResignApplyPageReqVO> detail(@Valid @NotNull(message = "id不能为空") String id) {
+        return CommonResult.success(resignApplyService.detail(id));
+    }
+
+    /**
+     * 创建离职申请
+     */
+    @PostMapping("/create")
+    @Operation(summary = "创建离职申请")
+    public String create(@Valid @RequestBody ResignApplyPageReqVO recruitVO) {
+        return success(resignApplyService.create(recruitVO));
+    }
+
+    /**
+     * 更新离职申请
+     */
+    @PostMapping("/update")
+    @Operation(summary = "更新离职申请")
+    public String update(@Valid @RequestBody ResignApplyPageReqVO updateReqVO) {
+        resignApplyService.update(updateReqVO);
+        return success(true);
+    }
+
+    /**
+     * 删除离职申请
+     */
+    @DeleteMapping("/delete")
+    @Operation(summary = "删除离职申请")
+    @Parameter(name = "id", description = "编号", required = true)
+    public String delete(@RequestParam("id") String id) {
+        resignApplyService.delete(id);
+        return success(true);
+    }
+
+
+
+}

+ 190 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/controller/vo/ResignApplyPageReqVO.java

@@ -0,0 +1,190 @@
+package com.zjugis.business.flow.resignApply.controller.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.zjugis.business.flow.resign.entity.ResignDetailDO;
+import com.zjugis.framework.common.pojo.PageParam;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @author jzh
+ * @since 2024/2/27 9:06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ResignApplyPageReqVO extends PageParam {
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 流程实例ID
+     */
+    private String instanceId;
+
+    /**
+     * 流程状态
+     */
+    private Integer flowStatus;
+
+    /**
+     * 流程完成时间
+     */
+    private LocalDateTime flowFinishtime;
+
+    /**
+     * 部门ID
+     */
+    private String deptId;
+
+    /**
+     * 部门名称
+     */
+    private String deptName;
+
+    /**
+     * 用户ID
+     */
+    private String userId;
+
+
+    /**
+     * 员工姓名
+     */
+    private String nickname;
+
+    /**
+     * 担任职务
+     */
+    private String drzw;
+
+    /**
+     * 合同期限
+     */
+    private Integer htqx;
+    /**
+     * 合同到期时间
+     */
+    private LocalDateTime htdqs;
+
+    /**
+     * 入公司时间
+     */
+    private LocalDateTime rgssj;
+
+    /**
+     * 最后上班日期
+     */
+    private LocalDateTime zhsbrq;
+
+    /**
+     * 离职生效日期
+     */
+    private LocalDateTime lzsxrq;
+
+    /**
+     * 员工工号
+     */
+    private String loginName;
+
+    /**
+     * 离职原因
+     */
+    private String lzyy;
+
+    /**
+     * 对公司建议
+     */
+    private String dgsjy;
+    /**
+     * 员工所在地
+     */
+    private String lzygszd;
+
+
+    //========================离职员工交接清单==================================
+
+    /**
+     * 日志填报
+     */
+    private String rztb;
+    /**
+     * 成果交接确认
+     */
+    private String cgjjqr;
+
+
+    /**
+     * 手提电脑、台式机处理方式
+     */
+    private String clfscb1;
+    /**
+     * 移动硬盘、U盘处理方式
+     */
+    private String clfscb2;
+    /**
+     * 公司邮箱、OA账号、钉钉账号处理方式
+     */
+    private String clfscb3;
+    /**
+     * 其他处理方式
+     */
+    private String clfscb4;
+    /**
+     * OA系统更新 处理方式
+     */
+    private String clfscb5;
+    /**
+     * 数据中心 处理方式
+     */
+    private String clfscb6;
+    /**
+     * 社保 处理方式
+     */
+    private Integer clfscb7;//月底
+    private Integer clfscb8;//月初
+
+    /**
+     * 公积金 处理方式
+     */
+    private String clfscb9;//月底
+    private String clfscb10;//月初
+    /**
+     * 人事档案 处理方式
+     */
+    private String clfscb11;
+    /**
+     * 职称证书 处理方式
+     */
+    private String clfscb12;
+
+    /**
+     * 培训、职称费用结算 处理方式
+     */
+    private String clfscb14;
+    private BigDecimal clfscb15;//培训费用
+    private BigDecimal clfscb16;//职称费用
+    /**
+     * 当月考勤表 处理方式
+     */
+    private BigDecimal clfscb17;//本月出勤考勤
+    private BigDecimal clfscb18;//本月餐补考勤
+
+    /**
+     * 财务借款及款项结算 处理方式
+     */
+    private BigDecimal clfscb19;//未发放当月工资
+    private BigDecimal clfscb20;//借款金额
+    private BigDecimal clfscb21;//已结清
+
+
+    List<ResignDetailDO> unfinishedList; //未完成工作交接
+    List<ResignDetailDO> finishedList; //已完成工作交接
+}

+ 25 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/controller/vo/ResignApplyPageVO.java

@@ -0,0 +1,25 @@
+package com.zjugis.business.flow.resignApply.controller.vo;
+
+import com.zjugis.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @author jzh
+ * @since 2024/2/4 9:16
+ */
+@Data
+public class ResignApplyPageVO extends PageParam {
+    @Schema(description = "员工姓名")
+    private String nickname;
+
+    @Schema(description = "员工工号")
+    private String loginName;
+
+    @Schema(description = "部门ID")
+    private String deptId;
+
+    @Schema(description = "流程状态")
+    private Integer status;
+
+}

+ 31 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/dao/ResignApplyDAO.java

@@ -0,0 +1,31 @@
+package com.zjugis.business.flow.resignApply.dao;
+
+import com.zjugis.business.flow.resign.controller.vo.ResignPageVO;
+import com.zjugis.business.flow.resign.entity.ResignDO;
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageVO;
+import com.zjugis.business.flow.resignApply.entity.ResignApplyDO;
+import com.zjugis.framework.common.pojo.PageResult;
+import com.zjugis.framework.mybatis.core.mapper.BaseMapperX;
+import com.zjugis.framework.mybatis.core.query.LambdaQueryWrapperX;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author jzh
+ * @since 2024/2/2 9:19
+ */
+@Mapper
+public interface ResignApplyDAO extends BaseMapperX<ResignApplyDO> {
+    default ResignApplyDO findByInstanceId(String flowInstanceId) {
+        return selectOne(new LambdaQueryWrapperX<ResignApplyDO>().eqIfPresent(ResignApplyDO::getInstanceId, flowInstanceId));
+    }
+
+    default PageResult<ResignApplyDO> getPage(ResignApplyPageVO pageReqVO) {
+        return selectPage(pageReqVO, new LambdaQueryWrapperX<ResignApplyDO>()
+                .likeIfPresent(ResignApplyDO::getNickname, pageReqVO.getNickname())
+                .eqIfPresent(ResignApplyDO::getLoginName, pageReqVO.getLoginName())
+                .eqIfPresent(ResignApplyDO::getDeptId, pageReqVO.getDeptId())
+                .eqIfPresent(ResignApplyDO::getFlowStatus, pageReqVO.getStatus())
+                .orderByDesc(ResignApplyDO::getLatestModifyTime)
+        );
+    }
+}

+ 111 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/entity/ResignApplyDO.java

@@ -0,0 +1,111 @@
+package com.zjugis.business.flow.resignApply.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.zjugis.business.mybatis.entity.BaseEntity;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * @author jzh
+ * @since 2024/3/5 10:51
+ */
+
+@Data
+@TableName(value = "WF_RESIGN_APPLY")
+public class ResignApplyDO extends BaseEntity {
+
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 流程实例ID
+     */
+    private String instanceId;
+
+    /**
+     * 流程状态
+     */
+    private Integer flowStatus;
+
+    /**
+     * 流程完成时间
+     */
+    private LocalDateTime flowFinishtime;
+
+    /**
+     * 部门ID
+     */
+    private String deptId;
+
+    /**
+     * 部门名称
+     */
+    private String deptName;
+
+    /**
+     * 用户ID
+     */
+    private String userId;
+
+
+    /**
+     * 员工姓名
+     */
+    private String nickname;
+
+    /**
+     * 担任职务
+     */
+    private String drzw;
+
+    /**
+     * 合同期限
+     */
+    private Integer htqx;
+
+    /**
+     * 入公司时间
+     */
+    private LocalDateTime rgssj;
+
+    /**
+     * 最后上班日期
+     */
+    private LocalDateTime zhsbrq;
+
+    /**
+     * 离职生效日期
+     */
+    private LocalDateTime lzsxrq;
+
+    /**
+     * 员工工号
+     */
+    private String loginName;
+
+    /**
+     * 离职原因
+     */
+    private String lzyy;
+    /**
+     * 对公司建议
+     */
+    private String dgsjy;
+    /**
+     * 合同到期时间
+     */
+    private LocalDateTime htdqs;
+
+    /**
+     * 员工所在地
+     */
+    private String lzygszd;
+
+}

+ 402 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/event/ResignApplyEvent.java

@@ -0,0 +1,402 @@
+package com.zjugis.business.flow.resignApply.event;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.zjugis.business.constants.StaffStateConstants;
+import com.zjugis.business.flow.resign.dao.ResignDAO;
+import com.zjugis.business.flow.resign.entity.ResignDO;
+import com.zjugis.business.flow.resign.entity.ResignDetailDO;
+import com.zjugis.business.flow.resign.service.ResignDetailService;
+import com.zjugis.business.flow.resign.service.ResignService;
+import com.zjugis.framework.common.pojo.CommonResult;
+import com.zjugis.framework.common.util.date.LocalDateTimeUtils;
+import com.zjugis.framework.workflow.exception.BusinessException;
+import com.zjugis.framework.workflow.model.BaseController;
+import com.zjugis.framework.workflow.rpc.remote.WorkflowClient;
+import com.zjugis.framework.workflow.spring.resovler.ParamModel;
+import com.zjugis.module.adm.api.staff.StaffApi;
+import com.zjugis.module.adm.api.staff.dto.StaffStateDTO;
+import com.zjugis.module.system.api.dept.DeptApi;
+import com.zjugis.module.system.api.dept.DeptLeaderApi;
+import com.zjugis.module.system.api.user.AdminUserApi;
+import com.zjugis.module.system.api.user.dto.AdminUserRespDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.util.*;
+
+import static com.zjugis.business.constants.FlowStatusConstants.*;
+import static com.zjugis.framework.common.util.collection.CollectionUtils.convertSet;
+
+/**
+ * @author jzh
+ * @since 2024/2/26 13:28
+ */
+@Slf4j
+@RestController
+@RequestMapping("/resignApply-event")
+public class ResignApplyEvent extends BaseController {
+
+    @Value("${resign.data.softDeptIds}")
+    private String softDeptIds;
+
+    @Value("${resign.data.planDeptIds}")
+    private String planDeptIds;
+
+    @Value("${resign.data.softPostIds}")
+    private String softPostIds;
+
+    @Value("${resign.data.planDeptIds}")
+    private String planPostIds;
+
+    @Value("${resign.data.checkDeptIds}")
+    private String checkDeptIds;
+
+
+    @Resource
+    private ResignDAO resignDAO;
+    @Resource
+    private ResignDetailService resignDetailService;
+    @Resource
+    private ResignService resignService;
+    @Resource
+    private StaffApi staffApi;
+    @Autowired
+    WorkflowClient workflowClient;
+
+    @Autowired
+    DeptApi deptApi;
+
+    @Autowired
+    AdminUserApi adminUserApi;
+    @Resource
+    private DeptLeaderApi deptLeaderApi;
+
+    /**
+     * 设置流程描述
+     *
+     * @param flowInstance     流程实例
+     * @param activityInstance 活动实例
+     * @return true/false
+     */
+    @PostMapping("/setFlowDesc")
+    public String setFlowDesc(@ParamModel Map flowInstance, @ParamModel Map activityInstance) {
+        try {
+            if (!Objects.isNull(activityInstance) && activityInstance.containsKey("flowInstanceId")) {
+                String flowInstanceId = activityInstance.get("flowInstanceId").toString();
+                ResignDO entity = resignService.findByInstanceId(flowInstanceId);
+                String applyTime = LocalDateTimeUtils.format(entity.getCreateTime(), null);
+                String flowDesc = StringUtils.join(Arrays.asList(entity.getNickname(), applyTime, entity.getDeptName()), "/");
+                entity.setFlowStatus(FLOW_PROCESS);
+                resignDAO.updateById(entity);
+                workflowClient.saveFlowDescribe(flowInstanceId, flowDesc);
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 流程归档事件
+     *
+     * @param flowInstance                  流程实例
+     * @param triggerFinishActivityInstance 触发归档的结束活动实例
+     * @return
+     */
+    @Transactional
+    @PostMapping("/flowArchingEvent")
+    public String flowArchingEvent(@ParamModel Map flowInstance, @ParamModel Map triggerFinishActivityInstance) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                ResignDO entity = resignDAO.findByInstanceId(flowInstanceId);
+                entity.setFlowStatus(FLOW_FINISHED);
+                entity.setFlowFinishtime(LocalDateTime.now());
+                resignDAO.updateById(entity);
+
+                //数据归档 更新员工状态并员工账号
+                StaffStateDTO dto = new StaffStateDTO();
+                dto.setUserId(entity.getUserId());
+                dto.setState(StaffStateConstants.RESIGN);
+                CommonResult<String> res = staffApi.updateStaffState(dto);
+                res.getCheckedData();
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 作废事件
+     *
+     * @param flowInstance     流程实例
+     * @param activityInstance 申请作废所在活动实例
+     * @param nullyApplyUserId 作废申请人ID
+     * @return
+     */
+    @PostMapping("/nullyEvent")
+    public String nullyEvent(@ParamModel Map flowInstance, @ParamModel Map activityInstance, String nullyApplyUserId) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                ResignDO entity = resignDAO.findByInstanceId(flowInstanceId);
+                entity.setFlowStatus(FLOW_NULLY);
+                entity.setIsvalid(0);
+                resignDAO.updateById(entity);
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 作废恢复事件
+     *
+     * @param flowInstance      流程实例
+     * @param activityInstance  申请作废所在活动实例
+     * @param nullyApplyUserId  作废申请人ID
+     * @param nullyRecoverserId 作废恢复人ID
+     * @return
+     */
+    @PostMapping("/nullyRecoverEvent")
+    public String nullyRecoverEvent(@ParamModel Map flowInstance, @ParamModel Map activityInstance, String nullyApplyUserId, String nullyRecoverserId) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                ResignDO entity = resignDAO.findByInstanceId(flowInstanceId);
+                entity.setFlowStatus(FLOW_PROCESS);
+                entity.setIsvalid(1);
+                resignDAO.updateById(entity);
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 彻底作废事件
+     *
+     * @param flowInstance        流程实例
+     * @param activityInstance    申请作废所在活动实例
+     * @param nullyApplyUserId    作废申请人ID
+     * @param nullyCompleteUserId 彻底作废人ID
+     * @return
+     */
+    @PostMapping("/nullyCompleteEvent")
+    public String nullyCompleteEvent(@ParamModel Map flowInstance, @ParamModel Map activityInstance, String nullyApplyUserId, String nullyCompleteUserId) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                ResignDO entity = resignService.findByInstanceId(flowInstanceId);
+                resignService.delete(entity.getId());
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+
+    /**
+     * 工作接收人
+     *
+     * @param flowInstanceId
+     * @return
+     */
+    @PostMapping("/workReceiver")
+    public String unfinishedReceiver(String flowInstanceId) {
+        try {
+            if (StringUtils.isNotBlank(flowInstanceId)) {
+                ResignDO entity = resignService.findByInstanceId(flowInstanceId);
+                List<Map<String, String>> userMaps = new ArrayList<>();
+                List<ResignDetailDO> detailDOS = resignDetailService.getListByResignId(entity.getId());
+                if (CollectionUtil.isNotEmpty(detailDOS)) {
+                    Set<String> ids = convertSet(detailDOS, ResignDetailDO::getReceiver);
+
+
+                    ids.forEach(v -> {
+                        HashMap<String, String> map = new HashMap<>();
+                        if (v != null) {
+                            map.put("id", v);
+                            userMaps.add(map);
+                        }
+                    });
+
+
+                    return ok(userMaps);
+                } else {
+                    throw new BusinessException("执行事件出错,请联系管理员!");
+                }
+
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+
+    /**
+     * 数据中心接收人
+     */
+    @PostMapping("/dataReceiver")
+    public String dataReceiver(String flowInstanceId) {
+        try {
+            if (StringUtils.isNotBlank(flowInstanceId)) {
+                ResignDO entity = resignService.findByInstanceId(flowInstanceId);
+                List<Map<String, String>> userMaps = new ArrayList<>();
+                String deptId = deptApi.getSecondDeptByDeptId(entity.getDeptId()).getCheckedData().getId();
+                if (deptId != null) {
+                    List<AdminUserRespDTO> users = adminUserApi.getUserListByPostIds(dataLocationCheck(deptId)).getCheckedData();
+                    if (CollectionUtil.isNotEmpty(users)) {
+                        Set<String> ids = convertSet(users, AdminUserRespDTO::getId);
+
+                        ids.forEach(v -> {
+                            HashMap<String, String> map = new HashMap<>();
+                            if (v != null) {
+                                map.put("id", v);
+                                userMaps.add(map);
+                            }
+                        });
+
+
+                        return ok(userMaps);
+                    } else {
+                        throw new BusinessException("执行事件出错,请联系管理员!");
+                    }
+                }
+                throw new BusinessException("执行事件出错,请联系管理员!");
+
+
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+
+    /**
+     * 判断是否存在
+     */
+    @PostMapping("/location/{type}")
+    public String existLocation(@ParamModel Map flowInstance, @PathVariable String type) {
+        try {
+            String flowInstanceId = flowInstance.get("id").toString();
+
+            ResignDO entity = resignService.findByInstanceId(flowInstanceId);
+
+            if (type.equals(entity.getLzygszd())) {
+                return "true";
+            } else {
+                return "false";
+            }
+
+
+        } catch (Exception ex) {
+            return error(ex.getMessage(), ErrorCode.DEFAULT);
+        }
+    }
+
+
+    /**
+     * 判断部门是软件板块还是规划板块
+     * 1空间信息/规划/江苏分公司  2其他
+     */
+    @PostMapping("/department/{type}")
+    public String department(@ParamModel Map flowInstance, @PathVariable String type) {
+        try {
+            String flowInstanceId = flowInstance.get("id").toString();
+
+
+            ResignDO entity = resignService.findByInstanceId(flowInstanceId);
+            String deptId = deptApi.getSecondDeptByDeptId(entity.getDeptId()).getCheckedData().getId();
+
+            switch (type) {
+                case "1":
+                    if (deptCheck(deptId)) {
+                        return "true";
+                    } else {
+                        return "false";
+                    }
+                case "2":
+                    if (!deptCheck(deptId)) {
+                        return "true";
+                    } else {
+                        return "false";
+                    }
+
+                default:
+                    return "false";
+            }
+
+
+        } catch (Exception ex) {
+            return error(ex.getMessage(), ErrorCode.DEFAULT);
+        }
+    }
+
+    private boolean deptCheck(String deptId) {
+        return checkDeptIds.contains(deptId);
+    }
+
+    private List<Long> dataLocationCheck(String deptId) {
+        List<Long> postIds = new ArrayList<>();
+        if (softDeptIds.contains(deptId)) {
+            postIds.addAll(convertStringListToLongList(Arrays.asList(softPostIds.split(","))));
+        } else if (planDeptIds.contains(deptId)) {
+            postIds.addAll(convertStringListToLongList(Arrays.asList(planPostIds.split(","))));
+        } else {
+            throw new BusinessException("部门不存在,请联系管理员");
+        }
+
+        return postIds;
+    }
+
+
+    public static List<Long> convertStringListToLongList(List<String> stringList) {
+        List<Long> longList = new ArrayList<>();
+        for (String item : stringList) {
+            try {
+                Long.parseLong(item);
+                longList.add(Long.valueOf(item));
+            } catch (NumberFormatException e) {
+                throw new BusinessException("格式转换失败,请联系管理员");
+            }
+        }
+        return longList;
+    }
+
+
+}

+ 29 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/service/ResignApplyService.java

@@ -0,0 +1,29 @@
+package com.zjugis.business.flow.resignApply.service;
+
+import com.zjugis.business.flow.resign.controller.vo.ResignPageReqVO;
+import com.zjugis.business.flow.resign.controller.vo.ResignPageVO;
+import com.zjugis.business.flow.resign.entity.ResignDO;
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageReqVO;
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageVO;
+import com.zjugis.business.flow.resignApply.entity.ResignApplyDO;
+import com.zjugis.framework.common.pojo.PageResult;
+
+import java.util.Map;
+
+public interface ResignApplyService {
+    Map<String, Object> getFormParams(String flowInstanceId);
+
+    PageResult<ResignApplyPageReqVO> getPage(ResignApplyPageVO pageReqVO);
+
+    ResignApplyPageReqVO detail(String id);
+
+    String create(ResignApplyPageReqVO recruitVO);
+
+    void update(ResignApplyPageReqVO updateReqVO);
+
+    void delete(String id);
+
+    ResignApplyDO findByInstanceId(String flowInstanceId);
+
+    ResignApplyPageReqVO flowAdd(String flowInstanceId, String userId);
+}

+ 164 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resignApply/service/impl/ResignApplyApplyServiceImpl.java

@@ -0,0 +1,164 @@
+package com.zjugis.business.flow.resignApply.service.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.zjugis.business.constants.DictConstants;
+import com.zjugis.business.constants.FlowStatusConstants;
+import com.zjugis.business.converter.common.SelectConvert;
+import com.zjugis.business.converter.resignApply.ResignApplyConvert;
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageReqVO;
+import com.zjugis.business.flow.resignApply.controller.vo.ResignApplyPageVO;
+import com.zjugis.business.flow.resignApply.dao.ResignApplyDAO;
+import com.zjugis.business.flow.resignApply.entity.ResignApplyDO;
+import com.zjugis.business.flow.resignApply.service.ResignApplyService;
+import com.zjugis.framework.common.pojo.CommonResult;
+import com.zjugis.framework.common.pojo.PageResult;
+import com.zjugis.framework.security.core.util.SecurityFrameworkUtils;
+import com.zjugis.framework.workflow.model.IFlowInstance;
+import com.zjugis.framework.workflow.rpc.remote.WorkflowClient;
+import com.zjugis.module.adm.api.staff.StaffApi;
+import com.zjugis.module.adm.api.staff.dto.StaffDeptPostDTO;
+import com.zjugis.module.system.api.dict.DictDataApi;
+import com.zjugis.module.system.api.dict.dto.DictDataRespDTO;
+import com.zjugis.module.system.api.user.AdminUserApi;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.util.*;
+
+import static com.zjugis.business.enums.ErrorCodeConstants.RESIGN_APPLY_NOT_EXISTS;
+import static com.zjugis.framework.common.exception.util.ServiceExceptionUtil.exception;
+
+/**
+ * @author jzh
+ * @since 2024/3/5 10:50
+ */
+@Service
+public class ResignApplyApplyServiceImpl implements ResignApplyService {
+    @Resource
+    private DictDataApi dictDataApi;
+    @Resource
+    private WorkflowClient workflowClient;
+    @Resource
+    private AdminUserApi adminUserApi;
+    @Resource
+    private ResignApplyDAO resignApplyDAO;
+    @Resource
+    private StaffApi staffApi;
+
+
+    @Override
+    public Map<String, Object> getFormParams(String flowInstanceId) {
+        String userId = SecurityFrameworkUtils.getLoginUserId();
+        CommonResult<IFlowInstance> flowResult = workflowClient.flowInstance(flowInstanceId);
+        if (flowResult.isSuccess()) {
+            ResignApplyDO entity = resignApplyDAO.findByInstanceId(flowInstanceId);
+            if (Objects.isNull(entity)) {
+                entity = new ResignApplyDO();
+                entity.setInstanceId(flowInstanceId);
+                entity.setUserId(userId);
+                entity.setCreateTime(LocalDateTime.now());
+                entity.setFlowStatus(FlowStatusConstants.FLOW_NOT_START);
+                CommonResult<StaffDeptPostDTO> result = staffApi.getUser(userId);
+                StaffDeptPostDTO dto = result.getCheckedData();
+                entity.setDeptId(dto.getDeptId());
+                entity.setDeptName(dto.getDeptName());
+                entity.setUserId(dto.getUserId());
+                entity.setNickname(dto.getNickname());
+                entity.setRgssj(dto.getRgssj());
+                entity.setHtdqs(dto.getHtdqs());
+                entity.setDrzw(dto.getPostName());
+                resignApplyDAO.insert(entity);
+            }
+            return createMap(flowInstanceId, entity, userId);
+        }
+        return createModelMap();
+    }
+
+    @Override
+    public PageResult<ResignApplyPageReqVO> getPage(ResignApplyPageVO pageReqVO) {
+        PageResult<ResignApplyDO> page = resignApplyDAO.getPage(pageReqVO);
+        return ResignApplyConvert.INSTANCE.convertPage(page);
+    }
+
+    @Override
+    public ResignApplyPageReqVO detail(String id) {
+        return ResignApplyConvert.INSTANCE.convert(resignApplyDAO.selectById(id));
+    }
+
+    @Override
+    public String create(ResignApplyPageReqVO vo) {
+        ResignApplyDO resignDO = ResignApplyConvert.INSTANCE.convert01(vo);
+        resignApplyDAO.insert(resignDO);
+        return resignDO.getId();
+    }
+
+    @Transactional
+    @Override
+    public void update(ResignApplyPageReqVO vo) {
+        validateExists(vo.getId());
+        ResignApplyDO resignDO = ResignApplyConvert.INSTANCE.convert01(vo);
+        resignApplyDAO.updateById(resignDO);
+    }
+
+    @Transactional
+    @Override
+    public void delete(String id) {
+        validateExists(id);
+        resignApplyDAO.deleteById(id);
+    }
+
+    @Override
+    public ResignApplyDO findByInstanceId(String flowInstanceId) {
+        return resignApplyDAO.findByInstanceId(flowInstanceId);
+    }
+
+    @Override
+    public ResignApplyPageReqVO flowAdd(String flowInstanceId, String userId) {
+        ResignApplyDO entity = resignApplyDAO.findByInstanceId(flowInstanceId);
+        return ResignApplyConvert.INSTANCE.convert(entity);
+    }
+
+
+    private Map<String, Object> createMap(String flowInstanceId, ResignApplyDO entity, String userId) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("formEntity", entity);
+        //查字典
+        List<DictDataRespDTO>resData = dictDataApi.getDictDataListByTypes(getTypeList()).getCheckedData();
+        Map<String, List<DictDataRespDTO>> map1 = new HashMap<>();
+        resData.forEach(v -> {
+            if (map1.get(v.getDictType()) != null) {
+                List<DictDataRespDTO> dtos = map1.get(v.getDictType());
+                dtos.add(v);
+                map1.put(v.getDictType(), dtos);
+            } else {
+                List<DictDataRespDTO> dtos = new ArrayList<>();
+                dtos.add(v);
+                map1.put(v.getDictType(), dtos);
+            }
+        });
+        map1.forEach((k, v) -> map.put(k, JSON.toJSONString(SelectConvert.INSTANCE.convertList(v))));
+        return map;
+    }
+
+    private Map<String, Object> createModelMap() {
+        Map<String, Object> map = new HashMap<>();
+        map.put("formEntity", new HashMap<>());
+        return map;
+    }
+
+    private List<String> getTypeList() {
+        List<String> res = new ArrayList<>();
+        res.add(DictConstants.post_type);
+        res.add(DictConstants.location_type);
+        return res;
+    }
+
+
+    private void validateExists(String id) {
+        if (resignApplyDAO.selectById(id) == null) {
+            throw exception(RESIGN_APPLY_NOT_EXISTS);
+        }
+    }
+}

+ 368 - 0
zjugis-business/src/main/resources/templates/ResignApply/index.ftl

@@ -0,0 +1,368 @@
+<@w.workFlow javascripts=['/Resign/js/index.js','/flow/js/formCommon.js', '/OwCommon/OwCommon.js','/timeSelector/TimeSelector.js','/js/moment.js']
+styles=[ '/flow/css/formCommon.css', '/OwCommon/OwCommon.css','/timeSelector/TimeSelector.css' ]>
+
+    <div class="z-position form-boss ow-tabs" name="createReqVO">
+        <ul class="ow-tab-nav oa_tabBox">
+            <li z-tabindex="0" class="ow-tab-item on" data-name="lzsq">离职申请</li>
+            <#if WORKFLOW.OPINION! !="">
+                <li z-tabindex="2" class="ow-tab-item" data-name="yj">审批意见</li>
+            </#if>
+        </ul>
+
+        <div class="ow-tab-scroll z-tab-content">
+            <div class="ow-tab-content" name="lzsq" style="padding-bottom: 40px;">
+                <div class="z-form-row" style="display: none;">
+                    <input type="text" value="${formEntity.instanceId!}" name="createReqVO$instanceId">
+                    <input type="text" value="${formEntity.id!}" name="createReqVO$id">
+                </div>
+                <div class="form-title" style="margin-top: 0;">
+                    <div class="form-icon">
+                        <img src="/imgs/titleIcon.png" alt="">
+                        <span>离职申请</span>
+                    </div>
+                    <div class="form-btn">
+                    </div>
+                </div>
+                <div class="jbxx-box jbxx-box-flex">
+                    <table class="jbxx-table-info">
+
+                        <tr>
+
+                            <td class="th">
+                                <div class="form-label">姓名:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="z-comp-input z-readonly" name="nickname">
+                                        <input type="text" name="createReqVO$nickname"
+                                               value="${formEntity.nickname!}">
+                                        <input type="hidden" name="createReqVO$userId" value="${formEntity.userId!}">
+                                    </div>
+                                </div>
+                            </td>
+
+                            <td class="th">
+                                <div class="form-label">部门:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="z-comp-input z-readonly" name="createReqVO$deptName">
+                                        <input type="text" value="${formEntity.deptName!}">
+                                        <input type="hidden" name="createReqVO$deptId" value="${formEntity.deptId!}">
+                                    </div>
+                                </div>
+                            </td>
+
+
+                            <td class="th">
+                                <div class="form-label ">岗位:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-select z-readonly" name="createReqVO$drzw"
+                                             data='${post_type!}' value="${formEntity.drzw!}">
+                                            <div class="z-inputselect-bar">
+                                                <span></span><i></i>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+
+
+                        </tr>
+
+
+                        <tr>
+
+                            <td class="th">
+                                <div class="form-label">入职时间:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-date z-readonly" name="createReqVO$rgssj">
+                                            <input type="text" value="${(formEntity.rgssj?date)!}">
+                                        </div>
+                                    </div>
+                                </div>
+
+                            </td>
+
+                            <td class="th">
+                                <div class="form-label">合同期限:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-date z-readonly" name="createReqVO$htdqs">
+                                            <input type="text" value="${(formEntity.htdqs?date)!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+
+                            <td class="th">
+                                <div class="form-label ">员工所在地:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-select" name="createReqVO$lzygszd"
+                                             data='${location_type!}' value="${formEntity.lzygszd!}">
+                                            <div class="z-inputselect-bar">
+                                                <span></span><i></i>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+
+
+                        </tr>
+
+                        <tr>
+
+                            <td class="th">
+                                <div class="form-label">最后上班日期:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-date" name="createReqVO$zhsbrq">
+                                            <input type="text" value="${(formEntity.zhsbrq?date)!}">
+                                        </div>
+                                    </div>
+                                </div>
+
+                            </td>
+
+                            <td class="th">
+                                <div class="form-label">离职生效日期:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-date" name="createReqVO$lzsxrq">
+                                            <input type="text" value="${(formEntity.lzsxrq?date)!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+
+
+
+
+                            <td class="th">
+                            </td>
+                            <td>
+                            </td>
+                        </tr>
+
+                    </table>
+                </div>
+
+
+                <div class="form-title" style="margin-top: 0;">
+                    <div class="form-icon">
+                        <img src="/imgs/titleIcon.png" alt="">
+                        <span>离职原因</span>
+                    </div>
+                    <div class="form-btn">
+                    </div>
+                </div>
+                <div class="jbxx-box jbxx-box-flex">
+                    <table class="jbxx-table-info">
+                        <tr>
+                            <td class="th">
+                                <div class="form-label">请进行勾选:</div>
+                            </td>
+
+
+                            <td class="z-checkbox-column">
+                                <div class="z-comp-checkbox" name="createReqVO$v1">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",1,")>checked</#if>"
+                                         value="1"><i></i>个人原因
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v2">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",2,")>checked</#if>"
+                                         value="2"><i></i>晋升机会
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v3">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",3,")>checked</#if>"
+                                         value="3"><i></i>换个行业发展
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v4">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",4,")>checked</#if>"
+                                         value="4"><i></i>薪资偏低
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v5">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",5,")>checked</#if>"
+                                         value="5"><i></i>福利不佳
+                                    </div>
+                                </div>
+                            </td>
+
+
+                            <td class="z-checkbox-column">
+
+
+                                <div class="z-comp-checkbox" name="createReqVO$v6">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",6,")>checked</#if>"
+                                         value="6"><i></i>劳动合同到期
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v7">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",7,")>checked</#if>"
+                                         value="7"><i></i>无归属感
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v8">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",8,")>checked</#if>"
+                                         value="8"><i></i>健康因素
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v9">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",9,")>checked</#if>"
+                                         value="9"><i></i>文化理念不同
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v10">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",10,")>checked</#if>"
+                                         value="10"><i></i>求学深造
+                                    </div>
+                                </div>
+                            </td>
+
+                            <td class="z-checkbox-column">
+
+
+                                <div class="z-comp-checkbox" name="createReqVO$v11">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",11,")>checked</#if>"
+                                         value="11"><i></i>家庭因素
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v12">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",12,")>checked</#if>"
+                                         value="12"><i></i>领导风格不适
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v13">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",13,")>checked</#if>"
+                                         value="13"><i></i>工作环境
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v14">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",14,")>checked</#if>"
+                                         value="14"><i></i>人际关系
+                                    </div>
+                                </div>
+                                <div class="z-comp-checkbox" name="createReqVO$v15">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",15,")>checked</#if>"
+                                         value="15"><i></i>遭受不公平待遇
+                                    </div>
+                                </div>
+                            </td>
+
+
+                            <td class="z-checkbox-column">
+
+                                <div class="z-comp-checkbox" name="createReqVO$v16">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",16,")>checked</#if>"
+                                         value="16"><i></i>不能胜任本质工作
+                                    </div>
+                                </div>
+
+                                <div class="z-comp-checkbox" name="createReqVO$v17">
+                                    <div class="z-checkbox-item <#if (formEntity.lzyy!)? contains(",17,")>checked</#if>"
+                                         value="17"><i></i>严重违反公司规章制度
+                                    </div>
+                                </div>
+                            </td>
+
+                        </tr>
+                    </table>
+                </div>
+
+                <div class="form-title" style="margin-top: 0;">
+                    <div class="form-icon">
+                        <img src="/imgs/titleIcon.png" alt="">
+                        <span>对公司的建议</span>
+                    </div>
+                    <div class="form-btn">
+                    </div>
+                </div>
+                <div class="jbxx-box jbxx-box-flex">
+                    <table class="jbxx-table-info">
+
+                        <tr>
+                            <td colspan="3">
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-textarea" name="createReqVO$dgsjy">
+                                            <textarea>${formEntity.dgsjy!}</textarea>
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+
+
+                    </table>
+                </div>
+            </div>
+
+            <#if WORKFLOW.OPINION! !="">
+                <div class="ow-tab-content" name="yj">
+                    <div class="form-title">
+                        <div class="form-icon">
+                            <img src="/imgs/titleIcon.png" alt="">
+                            <span>审批意见</span>
+                        </div>
+                        <div class="form-btn">
+                        </div>
+                    </div>
+                    <div class="qjsjxx-box">
+                        <div class="z-form-wrap" name="opinionsDiv">
+                            <div class="z-form-row"> ${WORKFLOW.OPINION!} </div>
+                        </div>
+                    </div>
+                </div>
+            </#if>
+        </div>
+    </div>
+
+    <script language="javascript">
+        ;
+        (function () {
+        })();
+    </script>
+    <style type="text/css">
+
+
+        .zdr-table-info td {
+            border: 1px solid #000; /* 添加底部边框 */
+            font-size: 14px; /* 设置字体大小为12像素 */
+        }
+
+
+        .z-checkbox-column {
+            display: flex;
+            flex-direction: column;
+            align-items: flex-start;
+            justify-content: flex-start;
+        }
+
+        .z-comp-checkbox {
+            margin-bottom: 20px; /* 每个复选框之间的间距 */
+            width: 100%; /* 确保复选框占据整个容器的宽度 */
+        }
+
+
+    </style>
+</@w.workFlow>

+ 86 - 0
zjugis-business/src/main/resources/templates/ResignApply/js/index.js

@@ -0,0 +1,86 @@
+(function () {
+
+    window.onload = function (ex) {
+        bindEvents();
+    }
+
+
+    //注册业务保存事件
+    function bindEvents() {
+        z.workflow.saveBtn.addListener("onSaveClick", saveForm);
+    }
+
+
+    /*
+  * all 工作流js传递到业务的参数 success执行的方法
+  * istransfer 工作流js传递到业务的参数 是否转件
+  * */
+    function saveForm(all, istransfer) {
+        var postData = z.ui.form.getFormFields($("[name=createReqVO]"));
+        if (postData === false) {
+            all({success: false});
+            return;
+        }
+
+        //将string类型的时间转换成时间戳
+        for (let key of Object.keys(postData)) {
+            let mealName = postData[key];
+            if (key.startsWith("createReqVO")) {
+                mealName.rgssj = Date.parse(mealName.rgssj + "");
+                mealName.htdqs = Date.parse(mealName.htdqs + "");
+                mealName.zhsbrq = Date.parse(mealName.zhsbrq + "");
+                mealName.lzsxrq = Date.parse(mealName.lzsxrq + "");
+                mealName.lzyy = appendLZYYResult();
+                postData.createReqVO = mealName;
+            }
+
+        }
+
+
+        z.ui.ajax({
+            type: "post",
+            url: "/resignApply/update",
+            data: JSON.stringify(postData.createReqVO),
+            contentType: "application/json",
+            success: function (res) {
+                if (res && res.code === 200) {
+                    all({success: true});
+                } else {
+                    all({success: false});
+                    z.ui.alertWarning(res.msg);
+                }
+            },
+
+            error: function () {
+                all({success: false});
+            }
+        })
+    }
+
+    /**
+     * 离职原因结果拼接
+     * @returns {string}
+     */
+    function appendLZYYResult() {
+        var results = ","; // 初始化结果字符串
+
+        // 遍历每个复选框
+        for (var i = 1; i <= 17; i++) {
+            var checkboxName = "createReqVO$v" + i; // 构造复选框名称
+
+            // 使用 jQuery 选择器获取复选框元素
+            var checkbox = $('[name="' + checkboxName + '"] .z-checkbox-item');
+
+            // 检查复选框是否选中
+            if (checkbox.hasClass("checked")) {
+                // 如果选中,将复选框的值拼接到结果字符串中
+                results += checkbox.attr("value") + ",";
+            }
+        }
+
+        return results; // 返回拼接后的结果
+    }
+
+
+}());
+