LAPTOP-FO2T5SIU\35838 5 mesi fa
parent
commit
2f67ffb528

+ 286 - 0
pro-base/src/main/java/com/idea/oa/apply/controller/ApplyCheckInController.java

@@ -0,0 +1,286 @@
+package com.idea.oa.apply.controller;
+
+import com.idea.oa.apply.model.inout.AddConfirmResult;
+import com.idea.oa.apply.model.inout.ApplyCheckInDto;
+import com.idea.oa.apply.model.inout.ApplyPaymentSettleIn;
+import com.idea.oa.apply.service.ApplyCheckInService;
+import com.idea.oa.apply.util.constant.ConstantFlowType;
+import com.idea.oa.flow2.model.FlowMain;
+import com.idea.oa.flow2.model.FlowMainPush;
+import com.idea.oa.flow2.model.in.FlowMainCcVo;
+import com.idea.oa.flow2.service.FlowMainCcService;
+import com.idea.oa.flow2.service.FlowMainPushService;
+import com.idea.oa.flow2.service.FlowMainService;
+import com.idea.workPanel.enume.HandleTypeEnum;
+import com.idea.workPanel.service.ParkWaitHandleService;
+import com.rockstar.common.base.BaseController;
+import com.rockstar.common.domain.AjaxResult;
+import com.rockstar.flow.exception.FlowException;
+import com.rockstar.frame.service.FrameUserService;
+import com.rockstar.shiro.util.ShiroUtils;
+import com.rockstar.util.UUIDUtils;
+import io.swagger.annotations.Api;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by zt on 2023
+ */
+@Slf4j
+@Controller
+@RequestMapping(value = "/ApplyCheckInController")
+@Api(value = "分表_入驻申请")
+public class ApplyCheckInController extends BaseController {
+
+    //主表
+    @Autowired
+    private ApplyCheckInService modelService;
+
+    @Autowired
+    private FlowMainCcService flowMainCcService;
+    @Autowired
+    private FlowMainPushService flowMainPushService;
+    @Autowired
+    private FlowMainService flowMainService;
+    @Autowired
+    private FrameUserService frameUserService;
+    @Autowired
+    private ParkWaitHandleService parkWaitHandleService;
+
+
+
+    /**
+     * 付款记录编号 : 付款领用单20240401-002
+     *
+     * @return
+     */
+    @PostMapping(value = "getMaxNum", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public String getMaxNum() {
+
+        return modelService.getMaxNum();
+    }
+
+    /**
+     * 添加审核结果
+     * 根据不同的状态值confirmResult判断是 1:审核通过,转下一步;2:退回发起人;3:退回上节点;4:结束流程;
+     *
+     * @param addConfirmResult
+     * @return
+     */
+    @PostMapping(value = "AddConfirmResult", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    @Transactional
+    public AjaxResult AddConfirmResult(AddConfirmResult addConfirmResult) throws FlowException {
+        System.out.println("AddConfirmResult");
+        System.out.println(addConfirmResult);
+        if (addConfirmResult.getConfirmResult() == null) {
+            return result(-1);
+        }
+        FlowMainPush flowMainPush = flowMainPushService.selectByPrimaryKey(addConfirmResult.getFlowMainPushId());
+
+
+        String isOkString = null;
+        {//进行审核判断
+
+            //添加判断条件
+            HashMap<String, Object> feeMoneyTotalMap = null;//new HashMap<>();
+
+            isOkString = flowMainService.doConfirmResult(addConfirmResult, ConstantFlowType.CHECK_IN_DEPLOYMENTID, ConstantFlowType.PAYMENT, flowMainPush, feeMoneyTotalMap);
+            if (!"ok_end".equals(isOkString) && !"ok_noEnd".equals(isOkString)) {
+                return AjaxResult.error(isOkString);
+            }
+        }
+
+        String waitUrl = modelService.getWaitUrl();
+        FlowMain flowMain = flowMainService.selectByPrimaryKey(flowMainPush.getFlowMainId());
+        String flowId = flowMain.getId();
+        // 进行审核操作后 就要处理待办 清除数据
+        String param = "id=" + flowId + "&flowMainPushId=" + flowMainPush.getId() + "&applyUser=" + flowMain.getApplyUser();
+        parkWaitHandleService.userHandle(HandleTypeEnum.FK, param, ShiroUtils.getUserId());
+
+        Boolean isEnd = false;//是否结束
+        Boolean isAgree = false;//是否同意
+        if (addConfirmResult.getConfirmResult().equals("4")) {//结束流程
+            isEnd = true;
+            isAgree = false;
+        } else if (addConfirmResult.getConfirmResult().equals("1")) {//1:审核通过,转下一步
+            if ("ok_end".equals(isOkString)) {
+                isEnd = true;
+                isAgree = true;
+            } else {
+                modelService.pushOaAndHandle(flowMainPush, flowMain, waitUrl);
+            }
+        } else if (addConfirmResult.getConfirmResult().equals("2")) { // 退回发起人
+            modelService.pushOaAndHandle(flowMainPush, flowMain, waitUrl);
+        } else if (addConfirmResult.getConfirmResult().equals("3")) { // 退回上一节点
+            modelService.pushOaAndHandle(flowMainPush, flowMain, waitUrl);
+        }
+        //添加业务信息(将请假信息中的修改掉,剩余年假,剩余调休,冻结年假,冻结调休都修改掉)
+        if (isEnd) {
+
+        }
+
+        return result(1);
+    }
+
+
+    /**
+     * 发起入驻申请流程
+     *
+     * @param record
+     * @return
+     */
+    @PostMapping(value = "addApplyCheckIn", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    @Transactional
+    public AjaxResult addApplyCheckIn(ApplyCheckInDto record, String deptId, String tagerUserId) throws FlowException {
+        if (false) {
+            return AjaxResult.error("这是一个错误测试信息");
+        }
+        return myaddApplyPayment(record, null, deptId,  tagerUserId);
+    }
+
+    /**
+     * 申请人重新发起申请
+     *
+     * @param record
+     * @return
+     */
+    @PostMapping(value = "addApplyCheckInAgain", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    @Transactional
+    public AjaxResult addApplyCheckInAgain(ApplyCheckInDto record,String deptId, String tagerUserId) throws FlowException {
+
+        if (StringUtils.isEmpty(record.getFlowMainId())) {
+            return AjaxResult.error("没有传入flowMainId的值");
+        }
+        System.out.println(record);
+        {//修改重新发起前的表状态
+            FlowMain flowMain1 = new FlowMain();
+            flowMain1.setId(record.getFlowMainId());
+            flowMain1.setReturnStatus(1);//0/null无状态,1已撤回并且已重新发起
+            flowMain1.setUpdatedAt(new Date());
+            flowMain1.setUpdatedBy(ShiroUtils.getUser().getId());
+            flowMainService.updateByPrimaryKeySelective(flowMain1);
+        }
+        return myaddApplyPayment(record, "重新发起申请[" + record.getFlowMainId() + "],", deptId,  tagerUserId);
+    }
+
+    /**
+     * 发起入驻申请流程
+     *
+     * @param record
+     * @return
+     */
+    public AjaxResult myaddApplyPayment(ApplyCheckInDto record, String addSystemRemark,String deptId, String tagerUserId) throws FlowException {
+
+
+        String id = UUIDUtils.middleUUID();
+        {
+            record.setUpdatedAt(new Date());
+            record.setCreatedAt(record.getUpdatedAt());
+            record.setCreatedBy(ShiroUtils.getUser().getId());
+            record.setUpdatedBy(record.getCreatedBy());
+            record.setCreatedByDept(ShiroUtils.getUser().getDepartment());
+            record.setFlowNum(UUIDUtils.middleUUID());
+            record.setStatus(0);
+            record.setId(id);
+            modelService.insertWithoutId(record);
+        }
+
+        HashMap<String, Object> feeMoneyTotalMap = null;//new HashMap<>();
+        String applyTheme = "" + ShiroUtils.getUser().getTruename() + "的入驻申请单";
+        AjaxResult ajaxResult = flowMainService.doFlowMain(applyTheme, record.getId(), addSystemRemark, record.getCcList(),
+                ConstantFlowType.CHECK_IN_PROCESSDEFINE, ConstantFlowType.CHECK_IN_DEPLOYMENTID, feeMoneyTotalMap,
+                ConstantFlowType.CHECK_IN_NAME, ConstantFlowType.CHECK_IN, ShiroUtils.getUser(), deptId, tagerUserId);
+
+        modelService.startOaAndHandle(record.getId(), applyTheme);
+        if (ajaxResult.get("code").equals(1688)) {
+            return AjaxResult.success();
+        } else {
+
+            return ajaxResult;
+        }
+
+    }
+
+
+    /**
+     * 根据推送表的FlowMainPushId获取信息
+     *
+     * @param flowMainPushId
+     * @return
+     */
+    @PostMapping(value = "getInfoByFlowMainPushId", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public ApplyCheckInDto getInfoByFlowMainPushId(String flowMainPushId) {
+        ApplyCheckInDto myApplyCheckIn = modelService.getInfoByFlowMainPushId(flowMainPushId);
+        if (myApplyCheckIn != null) {
+            {//获取抄送人
+
+                List<FlowMainCcVo> flowMainCcList = flowMainCcService.selectVoByFlowMainId(myApplyCheckIn.getFlowMainId());
+
+                myApplyCheckIn.setFlowMainCcList(flowMainCcList);
+
+            }
+
+        }
+        return myApplyCheckIn;
+    }
+
+
+    /**
+     * 根据主表的FlowMainId获取信息
+     *
+     * @param flowMainId
+     * @return
+     */
+    @PostMapping(value = "getInfoByFlowMainId", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public ApplyCheckInDto getInfoByFlowMainId(String flowMainId) {
+        ApplyCheckInDto myApplyCheckIn = modelService.getInfoByFlowMainId(flowMainId);
+        if (myApplyCheckIn != null) {
+            {//获取抄送人
+
+                List<FlowMainCcVo> flowMainCcList = flowMainCcService.selectVoByFlowMainId(myApplyCheckIn.getFlowMainId());
+
+                myApplyCheckIn.setFlowMainCcList(flowMainCcList);
+
+            }
+
+
+        }
+        return myApplyCheckIn;
+    }
+
+    /**
+     * 根据用户id获取用户姓名和部门名称,岗位信息
+     *
+     * @param userId
+     * @return
+     */
+    @PostMapping(value = "getUserInfoByUserId", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Map<String, Object> getUserInfoByUserId(String userId) {
+        if (StringUtils.isEmpty(userId)) {
+            userId = ShiroUtils.getUser().getId();
+        }
+        return modelService.getUserInfoByUserId(userId);
+    }
+
+
+
+}
+

+ 25 - 0
pro-base/src/main/java/com/idea/oa/apply/mapper/ApplyCheckInExtendMapper.java

@@ -0,0 +1,25 @@
+package com.idea.oa.apply.mapper;
+
+import com.idea.oa.apply.model.ApplyCheckIn;
+import com.idea.oa.apply.model.ApplyCheckInExample;
+import com.idea.oa.apply.model.inout.ApplyCheckInDto;
+import com.idea.oa.apply.model.inout.ApplyPaymentSettleIn;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ApplyCheckInExtendMapper {
+
+    ApplyCheckInDto getInfoByFlowMainPushId(String flowMainPushId);
+
+    ApplyCheckInDto getInfoByFlowMainId(String flowMainId);
+
+//    @Select("SELECT frame_user.posts,frame_post.post_name as postName,frame_user.id,frame_user.truename,frame_user.department,sys_dept.dept_name as deptName  FROM frame_user LEFT JOIN sys_dept ON sys_dept.id=frame_user.department LEFT JOIN frame_post ON frame_post.id=frame_user.posts WHERE frame_user.id=#{userId}")
+    Map<String, Object> getUserInfoByUserId(@Param("userId")  String userId);
+
+    String selectMaxNum();
+
+
+}

+ 29 - 0
pro-base/src/main/java/com/idea/oa/apply/model/inout/ApplyCheckInDto.java

@@ -0,0 +1,29 @@
+package com.idea.oa.apply.model.inout;
+
+import com.idea.oa.apply.model.ApplyCheckIn;
+import com.idea.oa.flow2.model.in.FlowMainCcVo;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ApplyCheckInDto extends ApplyCheckIn {
+
+    private String createdByString;
+
+
+
+    // 抄送人列表格式例如:,张三,李四, 传入的
+    private String ccList;
+
+    private List<FlowMainCcVo> flowMainCcList;
+
+    // 推送表id
+    private String flowMainPushId;
+
+    // 原来的流程id
+    private String flowMainId;
+
+
+
+}

+ 405 - 0
pro-base/src/main/java/com/idea/oa/apply/service/ApplyCheckInService.java

@@ -0,0 +1,405 @@
+package com.idea.oa.apply.service;
+
+import cn.hutool.core.codec.Base64;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.crypto.symmetric.AES;
+import com.idea.oa.apply.mapper.ApplyCheckInExtendMapper;
+import com.idea.oa.apply.mapper.ApplyCheckInMapper;
+import com.idea.oa.apply.model.ApplyCheckIn;
+import com.idea.oa.apply.model.ApplyCheckInExample;
+import com.idea.oa.apply.model.inout.ApplyCheckInDto;
+import com.idea.oa.apply.util.constant.ConstantFlowType;
+import com.idea.oa.apply.util.constant.RedisToUse;
+import com.idea.oa.flow2.model.FlowMain;
+import com.idea.oa.flow2.model.FlowMainExample;
+import com.idea.oa.flow2.model.FlowMainPush;
+import com.idea.oa.flow2.model.FlowMainPushExample;
+import com.idea.oa.flow2.service.FlowMainPushService;
+import com.idea.oa.flow2.service.FlowMainService;
+import com.idea.util.DateUtils;
+import com.idea.util.OAUtil;
+import com.idea.workPanel.enume.HandleTypeEnum;
+import com.idea.workPanel.service.ParkWaitHandleService;
+import com.rockstar.common.base.BaseService;
+import com.rockstar.frame.model.FramePermission;
+import com.rockstar.frame.model.FramePermissionExample;
+import com.rockstar.frame.model.FrameUser;
+import com.rockstar.frame.service.FramePermissionService;
+import com.rockstar.frame.service.FrameUserService;
+import com.rockstar.shiro.util.ShiroUtils;
+import com.rockstar.util.StringUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Service
+public class ApplyCheckInService implements BaseService<ApplyCheckIn, ApplyCheckInExample> {
+
+    @Autowired
+    private ApplyCheckInMapper modelMapper;
+    @Autowired
+    private ApplyCheckInExtendMapper applyCheckInExtendMapper;
+    @Autowired
+    private FlowMainPushService flowMainPushService;
+    @Autowired
+    private FlowMainService flowMainService;
+    @Autowired
+    private ParkWaitHandleService parkWaitHandleService;
+    @Autowired
+    private FramePermissionService framePermissionService;
+    @Autowired
+    private FrameUserService frameUserService;
+    @Value("${serverUrl}")
+    private String serverUrl;
+    @Value("${ssoKey}")
+    private String ssoKey;
+
+
+
+    @Override
+    public int deleteByPrimaryKey(String s) {
+        return modelMapper.deleteByPrimaryKey(s);
+    }
+
+    @Override
+    public int insertSelective(ApplyCheckIn applyCheckIn) {
+        applyCheckIn.setId(IdUtil.simpleUUID());
+        return modelMapper.insertSelective(applyCheckIn);
+    }
+
+    public int insertWithoutId(ApplyCheckIn applyCheckIn) {
+        return modelMapper.insertSelective(applyCheckIn);
+    }
+
+    @Override
+    public ApplyCheckIn selectByPrimaryKey(String s) {
+        return modelMapper.selectByPrimaryKey(s);
+    }
+
+    @Override
+    public int updateByPrimaryKeySelective(ApplyCheckIn applyCheckIn) {
+        return modelMapper.updateByPrimaryKeySelective(applyCheckIn);
+    }
+
+    @Override
+    public int updateByExampleSelective(ApplyCheckIn applyCheckIn, ApplyCheckInExample applyCheckInExample) {
+        return modelMapper.updateByExampleSelective(applyCheckIn, applyCheckInExample);
+    }
+
+    @Override
+    public int updateByExample(ApplyCheckIn applyCheckIn, ApplyCheckInExample applyCheckInExample) {
+        return modelMapper.updateByExample(applyCheckIn, applyCheckInExample);
+    }
+
+    @Override
+    public List<ApplyCheckIn> selectByExample(ApplyCheckInExample applyCheckInExample) {
+        return modelMapper.selectByExample(applyCheckInExample);
+    }
+
+    @Override
+    public long countByExample(ApplyCheckInExample applyCheckInExample) {
+        return modelMapper.countByExample(applyCheckInExample);
+    }
+
+    @Override
+    public int deleteByExample(ApplyCheckInExample applyCheckInExample) {
+        return modelMapper.deleteByExample(applyCheckInExample);
+    }
+
+
+    public ApplyCheckInDto getInfoByFlowMainId(String flowMainId) {
+        return applyCheckInExtendMapper.getInfoByFlowMainId(flowMainId);
+    }
+
+    public ApplyCheckInDto getInfoByFlowMainPushId(String flowMainPushId) {
+        return applyCheckInExtendMapper.getInfoByFlowMainPushId(flowMainPushId);
+    }
+
+
+    public Map<String, Object> getUserInfoByUserId(String userId) {
+        Map<String, Object> userInfoByUserId = applyCheckInExtendMapper.getUserInfoByUserId(userId);
+        return userInfoByUserId;
+    }
+
+
+
+    /**
+     * 付款记录编号 : 付款领用单20240401-002
+     *
+     * @return
+     */
+    public String getMaxNum() {
+
+        // RZ202412110001
+
+        String flowNum = "";
+        String maxNum = applyCheckInExtendMapper.selectMaxNum();
+        if(StringUtils.isNotEmpty(maxNum)){
+            maxNum = "0001";
+        }else {
+            maxNum.substring(10);
+        }
+        String yyyyMMdd = DateUtils.parseDateToStr("yyyyMMdd", new Date());
+        flowNum = "RZ" + yyyyMMdd + maxNum;
+
+        return flowNum;
+    }
+
+    /**
+     * 发起流程 推送泛微和工作台待办
+     * @param id
+     * @param applyTheme
+     */
+    public void startOaAndHandle(String id,String applyTheme) {
+
+        try {
+
+            String flowId = "";
+            String nodeName = "";
+
+            FlowMainExample flowMainExample = new FlowMainExample();
+            flowMainExample.createCriteria().andFormIdEqualTo(id).andFlowTypeEqualTo(ConstantFlowType.CHECK_IN);
+            List<FlowMain> flowMains = flowMainService.selectByExample(flowMainExample);
+            if (CollectionUtils.isNotEmpty(flowMains)) {
+                FlowMain flowMain = flowMains.get(0);
+                flowId = flowMain.getId();
+
+                FlowMainPushExample flowMainPushExample = new FlowMainPushExample();
+                flowMainPushExample.createCriteria().andFlowMainIdEqualTo(flowId).andStatusEqualTo(0);
+                List<FlowMainPush> flowMainPushes = flowMainPushService.selectByExample(flowMainPushExample);
+                if (CollectionUtils.isNotEmpty(flowMainPushes)) {
+                    FlowMainPush flowMainPush = flowMainPushes.get(0);
+                    nodeName = flowMainPush.getNodeName();
+
+                    // 给本系统下一个节点的人推送待办
+                    /**
+                     * 添加待办
+                     * @param title 显示标题
+                     * @param typeEnum 处理类型枚举
+                     * @param srcUserType 来源用户类型 0管理,1企业
+                     * @param srcUserId 来源用户id
+                     * @param srcUserName 来源用户名称
+                     * @param receiveUserId 接收用户id or 0=全部  or 角色id
+                     * @param routeParam 跳转携带参数,例: id=***&type=**
+                     */
+
+                    String waitUrl = "";
+                    // 查询待办页面的 菜单id
+                    FramePermissionExample framePermissionExample = new FramePermissionExample();
+                    framePermissionExample.createCriteria().andNameEqualTo("流程审批");
+                    List<FramePermission> framePermissions = framePermissionService.selectByExample(framePermissionExample);
+                    if (CollectionUtils.isNotEmpty(framePermissions)) {
+                        String menuIndex = framePermissions.get(0).getId();
+                        FramePermissionExample permissionExample = new FramePermissionExample();
+                        permissionExample.createCriteria().andNameEqualTo("入驻审批流程");
+                        List<FramePermission> permissions = framePermissionService.selectByExample(framePermissionExample);
+                        if (CollectionUtils.isNotEmpty(permissions)) {
+                            String subMenu = permissions.get(0).getId();
+                            waitUrl = "/backstage?menuIndex=" + menuIndex + "&subMenu=" + subMenu;
+                        }
+
+                    }
+
+                    String title = applyTheme;
+                    HandleTypeEnum typeEnum = HandleTypeEnum.RZ;
+                    Integer srcUserType = 0;//来源用户类型 0管理,1企业
+                    String srcUserId = ShiroUtils.getUserId();
+                    String srcUserName = ShiroUtils.getUser().getTruename();
+                    String receiveUserId = flowMainPush.getPushUser();
+                    String routeParam = "id=" + flowId + "&flowMainPushId=" + flowMainPush.getId() + "&applyUser=" + flowMain.getApplyUser();
+                    HandleTypeEnum.RZ.setUrl(waitUrl);
+                    parkWaitHandleService.addHandle(title, typeEnum, srcUserType, srcUserId, srcUserName, receiveUserId, routeParam);
+
+                    // TODO: 2024/11/21   和泛OA对接 推送待办
+                    FrameUser receiveUser = frameUserService.selectByPrimaryKey(receiveUserId);
+                    String username = encryptUsername(receiveUser.getUsername());
+                    String syscode = "AJ";
+                    String requestname = applyTheme;
+                    String workflowname = ConstantFlowType.CHECK_IN_NAME;
+                    String pcurl = serverUrl + "&loginid=" + username;
+                    String appurl = "";
+                    String isremark = "0";
+                    String viewtype = "0";
+                    // TODO: 2024/11/15 创建者和接收者需求oa协商
+                    String creator = "ceshi";
+                    String receiver = "ceshi";
+                    String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
+                    String receivets = System.currentTimeMillis() + "";
+                    Map map = new HashMap<String, Object>();
+                    map.put("syscode", syscode);
+                    map.put("flowid", flowId);
+                    map.put("requestname", requestname);
+                    map.put("workflowname", workflowname);
+                    map.put("nodeName", nodeName);
+                    map.put("pcurl", pcurl);
+                    map.put("appurl", appurl);
+                    map.put("creator", creator);
+                    map.put("createdatetime", date);
+                    map.put("receiver", receiver);
+                    map.put("receivedatetime", date);
+                    map.put("isremark", isremark);
+                    map.put("viewtype", viewtype);
+                    map.put("receivets", receivets);
+
+                    log.info("泛微推送详情:{}", map);
+                    String result = OAUtil.receiveRequestInfoByJson(map);
+                    log.info("泛微推送结果:{}", result);
+
+                }
+
+            }
+
+        } catch (Exception e) {
+            log.error("推送异常", e);
+        }
+    }
+
+
+    /**
+     * 推送泛微和工作台待办
+     *
+     * @param flowMainPush
+     * @param flowMain
+     * @param waitUrl
+     */
+    public void pushOaAndHandle(FlowMainPush flowMainPush, FlowMain flowMain, String waitUrl) {
+
+        try {
+            String flowId = flowMain.getId();
+            FlowMainPushExample flowMainPushExample = new FlowMainPushExample();
+            flowMainPushExample.createCriteria().andFlowMainIdEqualTo(flowId).andStatusEqualTo(0);
+            List<FlowMainPush> flowMainPushes = flowMainPushService.selectByExample(flowMainPushExample);
+            if (CollectionUtils.isNotEmpty(flowMainPushes)) {
+                FlowMainPush push = flowMainPushes.get(0);
+
+                // 给本系统下一个节点的人推送待办
+                /**
+                 * 添加待办
+                 * @param title 显示标题
+                 * @param typeEnum 处理类型枚举
+                 * @param srcUserType 来源用户类型 0管理,1企业
+                 * @param srcUserId 来源用户id
+                 * @param srcUserName 来源用户名称
+                 * @param receiveUserId 接收用户id or 0=全部  or 角色id
+                 * @param routeParam 跳转携带参数,例: id=***&type=**
+                 */
+                String title = flowMain.getApplyTheme();
+                HandleTypeEnum typeEnum = HandleTypeEnum.RZ;
+                Integer srcUserType = 0;//来源用户类型 0管理,1企业
+                String srcUserId = ShiroUtils.getUserId();
+                String srcUserName = ShiroUtils.getUser().getTruename();
+                String receiveUserId = push.getPushUser();
+                String routeParam = "id=" + flowId + "&flowMainPushId=" + push.getId() + "&applyUser=" + flowMain.getApplyUser();
+                HandleTypeEnum.RZ.setUrl(waitUrl);
+                parkWaitHandleService.addHandle(title, typeEnum, srcUserType, srcUserId, srcUserName, receiveUserId, routeParam);
+
+                // TODO: 2024/11/21 和泛微对接 推送信息
+                FrameUser receiveUser = frameUserService.selectByPrimaryKey(receiveUserId);
+                String username = encryptUsername(receiveUser.getUsername());
+                String syscode = "AJ";
+                String requestname = flowMain.getApplyTheme();
+                String workflowname = ConstantFlowType.CHECK_IN_NAME;
+                String nodeName = flowMainPush.getNodeName();
+                String pcurl = serverUrl + "&loginid=" + username;
+                String appurl = "";
+                String isremark = "0";
+                String viewtype = "0";
+                // TODO: 2024/11/15 创建者和接收者需求oa协商
+                String creator = "ceshi";
+                String receiver = "ceshi";
+                String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
+                String receivets = System.currentTimeMillis() + "";
+
+                Map map = new HashMap<String, Object>();
+                map.put("syscode", syscode);
+                map.put("flowid", flowId);
+                map.put("requestname", requestname);
+                map.put("workflowname", workflowname);
+                map.put("nodeName", nodeName);
+                map.put("pcurl", pcurl);
+                map.put("appurl", appurl);
+                map.put("creator", creator);
+                map.put("createdatetime", date);
+                map.put("receiver", receiver);
+                map.put("receivedatetime", date);
+                map.put("isremark", isremark);
+                map.put("viewtype", viewtype);
+                map.put("receivets", receivets);
+
+                log.info("泛微推送详情:{}", map);
+                String result = OAUtil.receiveRequestInfoByJson(map);
+                log.info("泛微推送结果:{}", result);
+
+            }
+        } catch (Exception e) {
+            log.error("推送异常", e);
+        }
+
+    }
+
+
+    /**
+     * 获取待办页面的url
+     *
+     * @return
+     */
+    public String getWaitUrl() {
+
+        String waitUrl = "";
+        // 查询待办页面的 菜单id
+        FramePermissionExample framePermissionExample = new FramePermissionExample();
+        framePermissionExample.createCriteria().andNameEqualTo("流程审批");
+        List<FramePermission> framePermissions = framePermissionService.selectByExample(framePermissionExample);
+        if (CollectionUtils.isNotEmpty(framePermissions)) {
+            String menuIndex = framePermissions.get(0).getId();
+            FramePermissionExample permissionExample = new FramePermissionExample();
+            permissionExample.createCriteria().andNameEqualTo("付款审批流程");
+            List<FramePermission> permissions = framePermissionService.selectByExample(framePermissionExample);
+            if (CollectionUtils.isNotEmpty(permissions)) {
+                String subMenu = permissions.get(0).getId();
+                waitUrl = "/backstage?menuIndex=" + menuIndex + "&subMenu=" + subMenu;
+            }
+
+        }
+        return waitUrl;
+    }
+
+
+    /**
+     * 加密用户名
+     *
+     * @param username
+     * @return
+     */
+    public String encryptUsername(String username) {
+
+        byte[] key = Base64.decode(ssoKey);
+        // 构建
+        AES aes = SecureUtil.aes(key);
+        return aes.encryptHex(username);
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}

+ 23 - 1
pro-base/src/main/java/com/idea/oa/apply/util/constant/ConstantFlowType.java

@@ -78,7 +78,7 @@ public class ConstantFlowType {
 
 
     //===============================================================================
-    // 新项目的付款申请
+    // 入驻申请
     public final static String PAYMENT = "payment";
     public final static String PAYMENT_NAME = "付款申请";
     public final static String PAYMENT_PROCESSDEFINE = "applyPayment";//自己瞎写的  todo 要对应resources/processes目录下的对应bpmn文件 process id="xxx"
@@ -98,4 +98,26 @@ public class ConstantFlowType {
 
 
 
+    //===============================================================================
+    // 新项目的付款申请
+    public final static String CHECK_IN = "checkIn";
+    public final static String CHECK_IN_NAME = "入驻申请";
+    public final static String CHECK_IN_PROCESSDEFINE = "applyCheckIn";//自己瞎写的  todo 要对应resources/processes目录下的对应bpmn文件 process id="xxx"
+    public static String CHECK_IN_DEPLOYMENTID = "20005";//自己瞎写的
+    //流程顺序
+    public static String[]CHECK_IN_FLOWSTEPS = {"curr_user", "dept_head_1_0_1", "flow_cwld_1_0_1", "flow_fgld_1_0_1", "flow_sjfgld_1_0_1", "flow_zyld_1_0_1"};
+
+
+    public static String[] onlyFlow_CHECK_IN_FLOWSTEPS = {"curr_user", "dept_head_1_0_1", "flow_cwld_1_0_1", "flow_fgld_1_0_1", "flow_sjfgld_1_0_1", "flow_zyld_1_0_1"};
+
+    //本主流程的全部流程(出纳等财务必须要有的流程节点就不放在里面,该关键字只是跳跃审核用的)
+    public final static String[] onlyFlow_CHECK_IN_FLOWSTEPS_ALL = {"curr_user", "dept_superior_1_0_1", "dept_head_1_0_1", "flow_fgld_1_0_1", "flow_sjfgld_1_0_1", "flow_zyld_1_0_2"};
+
+
+    // 不同流程会有不同的角色判断,所以做特定处理
+    public final static String[] CHECK_IN_ROLES = {"cwld","fgld", "sjfgld", "zyld"};//领导查看(不带主类型)==> 结项评审委员会 分管领导 上级分管领导审核 项目评审委员会 主要领导审核 集团总经理审核
+
+
+
+
 }

+ 10 - 67
pro-base/src/main/java/com/idea/oa/flow2/controller/FlowMainController.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
 import com.idea.oa.activiti.service.ProActiService;
 import com.idea.oa.apply.model.*;
 
+import com.idea.oa.apply.service.ApplyCheckInService;
 import com.idea.oa.apply.service.ApplyPaymentSettleService;
 import com.idea.oa.apply.util.constant.ConstantFlowType;
 import com.idea.oa.apply.util.service.RunerLoadOneService;
@@ -106,8 +107,8 @@ public class FlowMainController extends BaseController {
 //    private OutOrderPayService outOrderPayService;
     @Autowired
     private ParkWaitHandleService parkWaitHandleService;
-    @Value("${serverUrl}")
-    private String serverUrl;
+    @Autowired
+    private ApplyCheckInService applyCheckInService;
     @Autowired
     private ApplyPaymentSettleService applyPaymentSettleService;
 
@@ -563,7 +564,6 @@ public class FlowMainController extends BaseController {
                 flowMainPushService.insert(newflowMainPush);
 
 
-                // TODO: 2024/12/12 修改待办receive_user
                 FlowMain flowMain = modelService.selectByPrimaryKey(flowMainPush.getFlowMainId());
                 // 进行审核操作后 就要处理待办 清除数据
                 String param = "id=" + flowMain.getId() + "&flowMainPushId=" + entity.getFlowMainPushId() + "&applyUser=" + flowMain.getApplyUser();
@@ -571,70 +571,13 @@ public class FlowMainController extends BaseController {
 
                 // 付款申请
                 if(flowMain.getFlowType().equals(ConstantFlowType.PAYMENT)){
-
-                    String waitUrl = "";
-                    // 查询待办页面的 菜单id
-                    FramePermissionExample framePermissionExample = new FramePermissionExample();
-                    framePermissionExample.createCriteria().andNameEqualTo("流程审批");
-                    List<FramePermission> framePermissions = framePermissionService.selectByExample(framePermissionExample);
-                    if (CollectionUtils.isNotEmpty(framePermissions)) {
-                        String menuIndex = framePermissions.get(0).getId();
-                        FramePermissionExample permissionExample = new FramePermissionExample();
-                        permissionExample.createCriteria().andNameEqualTo("付款审批流程");
-                        List<FramePermission> permissions = framePermissionService.selectByExample(framePermissionExample);
-                        if (CollectionUtils.isNotEmpty(permissions)) {
-                            String subMenu = permissions.get(0).getId();
-                            waitUrl = "/backstage?menuIndex=" + menuIndex + "&subMenu=" + subMenu;
-                        }
-
-                    }
-                    // 给本系统下一个节点的人推送待办
-                    String title = flowMain.getApplyTheme();
-                    HandleTypeEnum typeEnum = HandleTypeEnum.FK;
-                    Integer srcUserType = 0;//来源用户类型 0管理,1企业
-                    String srcUserId = ShiroUtils.getUserId();
-                    String srcUserName = ShiroUtils.getUser().getTruename();
-                    String receiveUserId = entity.getPushEntrustId();
-                    String routeParam = "id=" + flowMain.getId() + "&flowMainPushId=" + newflowMainPush.getId() + "&applyUser=" + flowMain.getApplyUser();
-                    HandleTypeEnum.FK.setUrl(waitUrl);
-                    parkWaitHandleService.addHandle(title, typeEnum, srcUserType, srcUserId, srcUserName, receiveUserId, routeParam);
-
-                    // TODO: 2024/11/21   和泛OA对接 推送待办
-                    FrameUser receiveUser = frameUserService.selectByPrimaryKey(receiveUserId);
-                    String username = applyPaymentSettleService.encryptUsername(receiveUser.getUsername());
-                    String syscode = "AJ";
-                    String requestname = flowMain.getApplyTheme();
-                    String workflowname = ConstantFlowType.PAYMENT_NAME;
-                    String pcurl = serverUrl + "&loginid=" + username;
-                    String appurl = "";
-                    String isremark = "0";
-                    String viewtype = "0";
-                    // TODO: 2024/11/15 创建者和接收者需求oa协商
-                    String creator = "ceshi";
-                    String receiver = "ceshi";
-                    String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
-                    String receivets = System.currentTimeMillis() + "";
-                    Map map = new HashMap<String, Object>();
-                    map.put("syscode", syscode);
-                    map.put("flowid", flowMain.getId());
-                    map.put("requestname", requestname);
-                    map.put("workflowname", workflowname);
-                    map.put("nodeName", newflowMainPush.getNodeName());
-                    map.put("pcurl", pcurl);
-                    map.put("appurl", appurl);
-                    map.put("creator", creator);
-                    map.put("createdatetime", date);
-                    map.put("receiver", receiver);
-                    map.put("receivedatetime", date);
-                    map.put("isremark", isremark);
-                    map.put("viewtype", viewtype);
-                    map.put("receivets", receivets);
-
-                    log.info("泛微推送详情:{}", map);
-                    String result = OAUtil.receiveRequestInfoByJson(map);
-                    log.info("泛微推送结果:{}", result);
-
-
+                    String waitUrl = parkWaitHandleService.getUrl("流程审批", "付款流程审批");
+                    applyPaymentSettleService.pushOaAndHandle(newflowMainPush,flowMain,waitUrl);
+                }
+                // 入驻申请
+                if(flowMain.getFlowType().equals(ConstantFlowType.CHECK_IN)){
+                    String waitUrl = parkWaitHandleService.getUrl("流程审批", "入驻流程审批");
+                    applyCheckInService.pushOaAndHandle(newflowMainPush,flowMain,waitUrl);
                 }
 
             }

+ 7 - 0
pro-base/src/main/java/com/idea/oa/flow2/service/FlowMainService.java

@@ -1510,6 +1510,8 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
 
             } else if (flowMain.getFlowType().equals(ConstantFlowType.PAYMENT)) {
                 flowStep = ConstantFlowType.PAYMENT_FLOWSTEPS;
+            }else if (flowMain.getFlowType().equals(ConstantFlowType.CHECK_IN)) {
+                flowStep = ConstantFlowType.CHECK_IN_FLOWSTEPS;
             }
         }
         return flowStep;
@@ -1528,7 +1530,10 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
 //                flowStep = ConstantFlowType.onlyFlow_OFF_WORK_FLOWSTEPS_noenough2;
             } else if (flowMain.getFlowType().equals(ConstantFlowType.PAYMENT)) {
                 flowStep = ConstantFlowType.onlyFlow_PAYMENT_FLOWSTEPS;
+            } else if (flowMain.getFlowType().equals(ConstantFlowType.CHECK_IN)) {
+                flowStep = ConstantFlowType.onlyFlow_CHECK_IN_FLOWSTEPS;
             }
+
         }
         return flowStep;
     }
@@ -1546,6 +1551,8 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
                 flowStep = ConstantFlowType.onlyFlow_OFF_WORK_FLOWSTEPS_ALL;
             }else if (flowType.equals(ConstantFlowType.PAYMENT)) {
                 flowStep = ConstantFlowType.onlyFlow_PAYMENT_FLOWSTEPS_ALL;
+            }else if (flowType.equals(ConstantFlowType.CHECK_IN)) {
+                flowStep = ConstantFlowType.onlyFlow_CHECK_IN_FLOWSTEPS;
             }
         }
         return flowStep;

+ 5 - 0
pro-base/src/main/java/com/idea/transactionRecordManage/service/TransactionRecordService.java

@@ -40,10 +40,12 @@ import com.rockstar.system.service.SysDictService;
 import com.rockstar.util.MD5Util;
 import com.rockstar.util.SnowflakeIdWorker;
 import com.rockstar.util.StringUtils;
+import lombok.Synchronized;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -225,6 +227,7 @@ public class TransactionRecordService {
      * @param collectionDateTo
      * @return
      */
+    @Synchronized
     public int collectionRecordSubmit(String collectionDateFrom, String collectionDateTo) {
 
         List<PayLog> payLogs = modelMapper.listByDate(collectionDateFrom, collectionDateTo);
@@ -356,6 +359,7 @@ public class TransactionRecordService {
      * @param collectionDateTo
      * @return
      */
+    @Synchronized
     public int refundRecordSubmit(String collectionDateFrom, String collectionDateTo) {
 
         // 开票列表
@@ -492,6 +496,7 @@ public class TransactionRecordService {
      * @param collectionDateTo
      * @return
      */
+    @Synchronized
     public int convertRecordSubmit(String collectionDateFrom, String collectionDateTo) {
 
         // 客户列表

+ 1 - 0
pro-base/src/main/java/com/idea/workPanel/enume/HandleTypeEnum.java

@@ -3,6 +3,7 @@ package com.idea.workPanel.enume;
 public enum HandleTypeEnum {
     // PC
     FK("付款流程", 1, "/workflow/myProcess"),
+    RZ("入驻流程", 1, "/workflow/myProcess"),
     ;
 
     public String name;

+ 28 - 0
pro-base/src/main/java/com/idea/workPanel/service/ParkWaitHandleService.java

@@ -13,14 +13,18 @@ import com.idea.workPanel.model.ParkWaitHandleOn;
 import com.idea.workPanel.model.ParkWaitHandleOnExample;
 import com.rockstar.common.base.BaseService;
 import com.rockstar.common.support.Convert;
+import com.rockstar.frame.model.FramePermission;
+import com.rockstar.frame.model.FramePermissionExample;
 import com.rockstar.frame.model.FrameUser;
 import com.rockstar.frame.model.extend.DateTrans;
 import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.frame.service.FramePermissionService;
 import com.rockstar.frame.service.FrameUserService;
 import com.rockstar.shiro.util.ShiroUtils;
 import com.rockstar.util.SnowflakeIdWorker;
 import com.rockstar.util.StringUtils;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -39,6 +43,8 @@ public class ParkWaitHandleService implements BaseService<ParkWaitHandle, ParkWa
     private ParkWaitHandleMapper modelMapper;
     @Autowired
     private ParkWaitHandleOnMapper modelOnMapper;
+    @Autowired
+    private FramePermissionService framePermissionService;
 
     @Override
     public int deleteByPrimaryKey(String ids) {
@@ -274,4 +280,26 @@ public class ParkWaitHandleService implements BaseService<ParkWaitHandle, ParkWa
 
     }
 
+    public String getUrl(String parentName, String childName){
+        String waitUrl = "";
+        // 查询待办页面的 菜单id
+        FramePermissionExample framePermissionExample = new FramePermissionExample();
+        framePermissionExample.createCriteria().andNameEqualTo(parentName);
+        List<FramePermission> framePermissions = framePermissionService.selectByExample(framePermissionExample);
+        if (CollectionUtils.isNotEmpty(framePermissions)) {
+            String menuIndex = framePermissions.get(0).getId();
+            FramePermissionExample permissionExample = new FramePermissionExample();
+            permissionExample.createCriteria().andNameEqualTo(childName);
+            List<FramePermission> permissions = framePermissionService.selectByExample(framePermissionExample);
+            if (CollectionUtils.isNotEmpty(permissions)) {
+                String subMenu = permissions.get(0).getId();
+                waitUrl = "/backstage?menuIndex=" + menuIndex + "&subMenu=" + subMenu;
+            }
+
+        }
+        return waitUrl;
+    }
+
+
+
 }

+ 54 - 0
pro-base/src/main/resources/mybatis/apply/ApplyCheckInExtendMapper.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.idea.oa.apply.mapper.ApplyCheckInExtendMapper">
+
+
+    <select id="getInfoByFlowMainPushId" resultType="com.idea.oa.apply.model.inout.ApplyCheckInDto">
+        SELECT
+            flow_main_push.id AS flowMainPushId,
+            frame_user.truename AS createdByString,
+            flow_main_push.flow_main_id AS flowMainId,
+            apply_check_in.*
+        FROM
+            flow_main_push
+                LEFT JOIN apply_check_in ON apply_check_in.id = flow_main_push.form_id
+                LEFT JOIN frame_user ON frame_user.id = apply_check_in.created_by
+        WHERE
+            flow_main_push.id = #{flowMainPushId}
+    </select>
+
+
+    <select id="getInfoByFlowMainId" resultType="com.idea.oa.apply.model.inout.ApplyCheckInDto">
+        SELECT
+            flow_main.id AS flowMainId,
+            frame_user.truename AS createdByString,
+            apply_check_in.*
+        FROM
+            flow_main
+                LEFT JOIN apply_check_in ON apply_check_in.id = flow_main.form_id
+                LEFT JOIN frame_user ON frame_user.id = apply_check_in.created_by
+        WHERE
+            flow_main.id = #{flowMainId}
+    </select>
+
+    <select id="getUserInfoByUserId" resultType="java.util.Map">
+        SELECT
+            frame_user.posts,
+            frame_post.post_name AS postName,
+            frame_user.id,
+            frame_user.truename,
+            frame_user.department,
+            sys_dept.dept_name AS deptName
+        FROM
+            frame_user
+                LEFT JOIN sys_dept ON sys_dept.id = frame_user.department
+                LEFT JOIN frame_post ON frame_post.id = frame_user.posts
+        WHERE
+            frame_user.id = #{userId}
+    </select>
+
+    <select id="selectMaxNum" resultType="java.lang.String">
+        SELECT MAX(flow_num) AS maxnum FROM apply_check_in
+    </select>
+
+</mapper>

+ 245 - 0
pro-main/src/main/resources/processes/applyCheckIn.bpmn

@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="m1610247356111" name="" targetNamespace="http://www.activiti.org/test">
+  <process id="applyCheckIn" name="入驻申请" processType="None" isClosed="false" isExecutable="true">
+    <startEvent id="_2" name="发起申请" />
+    <endEvent id="_26" name="结束" />
+    <userTask id="_34" name="经办人" activiti:candidateGroups="curr_user">
+      <incoming>Flow_1u7oj37</incoming>
+    </userTask>
+    <sequenceFlow id="_35" sourceRef="_2" targetRef="_34" />
+    <userTask id="_3" name="部门负责人" activiti:assignee="${userId}" activiti:candidateGroups="dept_head_1_0_1">
+      <incoming>Flow_0tf77t6</incoming>
+      <outgoing>Flow_1u7oj37</outgoing>
+    </userTask>
+    <sequenceFlow id="_4" name="申请" sourceRef="_34" targetRef="_3">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='yes'}</conditionExpression>
+    </sequenceFlow>
+    <userTask id="_5" name="财务负责人" activiti:assignee="${userId}" activiti:candidateGroups="flow_cwld_1_0_1">
+      <incoming>Flow_0sq564u</incoming>
+      <outgoing>Flow_0tf77t6</outgoing>
+    </userTask>
+    <userTask id="_6" name="分管领导" activiti:assignee="${userId}" activiti:candidateGroups="flow_fgld_1_0_1">
+      <incoming>Flow_1yk6pxs</incoming>
+      <outgoing>Flow_0sq564u</outgoing>
+    </userTask>
+    <userTask id="_7" name="总经理" activiti:assignee="${userId}" activiti:candidateGroups="flow_sjfgld_1_0_1">
+      <incoming>Flow_0huyir4</incoming>
+      <outgoing>Flow_1yk6pxs</outgoing>
+    </userTask>
+    <userTask id="_9" name="董事长" activiti:assignee="${userId}" activiti:candidateGroups="flow_zyld_1_0_1">
+      <outgoing>Flow_0huyir4</outgoing>
+    </userTask>
+    <sequenceFlow id="_8" name="同意" sourceRef="_3" targetRef="_5">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='yes'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_10" name="同意" sourceRef="_5" targetRef="_6">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='yes'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_11" name="同意" sourceRef="_6" targetRef="_7">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='yes'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_12" name="同意" sourceRef="_7" targetRef="_9">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='yes'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_13" name="同意" sourceRef="_9" targetRef="_26">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='yes'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_14" name="不同意" sourceRef="_3" targetRef="_34">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='no'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_15" name="不同意" sourceRef="_5" targetRef="_34">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='no'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_16" name="不同意" sourceRef="_6" targetRef="_34">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='no'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_17" name="不同意" sourceRef="_7" targetRef="_34">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='no'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="_19" name="不同意" sourceRef="_9" targetRef="_34">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='no'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="Flow_0tf77t6" sourceRef="_5" targetRef="_3">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='back'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="Flow_0sq564u" sourceRef="_6" targetRef="_5">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='back'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="Flow_1yk6pxs" sourceRef="_7" targetRef="_6">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='back'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="Flow_0huyir4" sourceRef="_9" targetRef="_7">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='back'}</conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="Flow_1u7oj37" sourceRef="_3" targetRef="_34">
+      <conditionExpression xsi:type="tFormalExpression">${agree=='back'}</conditionExpression>
+    </sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="Diagram-_1" name="New Diagram" documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0">
+    <bpmndi:BPMNPlane bpmnElement="applyPayment">
+      <bpmndi:BPMNShape id="Shape-_2" bpmnElement="_2">
+        <omgdc:Bounds x="45" y="115" width="32" height="32" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="32" height="32" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Shape-_26" bpmnElement="_26">
+        <omgdc:Bounds x="1180" y="510" width="32" height="32" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="32" height="32" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Shape-_34" bpmnElement="_34">
+        <omgdc:Bounds x="135" y="245" width="85" height="55" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="85" height="55" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Shape-_3" bpmnElement="_3">
+        <omgdc:Bounds x="330" y="245" width="85" height="55" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="85" height="55" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Shape-_5" bpmnElement="_5">
+        <omgdc:Bounds x="520" y="245" width="95" height="55" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="95" height="55" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Shape-_6" bpmnElement="_6">
+        <omgdc:Bounds x="730" y="245" width="100" height="55" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="100" height="55" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Shape-_7" bpmnElement="_7">
+        <omgdc:Bounds x="930" y="245" width="110" height="55" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="110" height="55" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="Shape-_9" bpmnElement="_9">
+        <omgdc:Bounds x="1140" y="245" width="110" height="55" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="110" height="55" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge__35" bpmnElement="_35" sourceElement="_2" targetElement="_34">
+        <omgdi:waypoint x="63" y="146.87450786638755" />
+        <omgdi:waypoint x="63" y="219" />
+        <omgdi:waypoint x="135" y="272.5" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__4" bpmnElement="_4" sourceElement="_34" targetElement="_3">
+        <omgdi:waypoint x="220" y="272.5" />
+        <omgdi:waypoint x="330" y="272.5" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__8" bpmnElement="_8" sourceElement="_3" targetElement="_5">
+        <omgdi:waypoint x="415" y="272.5" />
+        <omgdi:waypoint x="520" y="272.5" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__10" bpmnElement="_10" sourceElement="_5" targetElement="_6">
+        <omgdi:waypoint x="615" y="272.5" />
+        <omgdi:waypoint x="730" y="272.5" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__11" bpmnElement="_11" sourceElement="_6" targetElement="_7">
+        <omgdi:waypoint x="830" y="272.5" />
+        <omgdi:waypoint x="930" y="272.5" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__12" bpmnElement="_12" sourceElement="_7" targetElement="_9">
+        <omgdi:waypoint x="1040" y="272.5" />
+        <omgdi:waypoint x="1140" y="272.5" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="-11" y="0" width="23" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__13" bpmnElement="_13" sourceElement="_9" targetElement="_26">
+        <omgdi:waypoint x="1196" y="300" />
+        <omgdi:waypoint x="1196" y="510" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__14" bpmnElement="_14" sourceElement="_3" targetElement="_34">
+        <omgdi:waypoint x="372.5" y="245" />
+        <omgdi:waypoint x="285" y="225" />
+        <omgdi:waypoint x="177.5" y="245" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__15" bpmnElement="_15" sourceElement="_5" targetElement="_34">
+        <omgdi:waypoint x="567.5" y="245" />
+        <omgdi:waypoint x="375" y="195" />
+        <omgdi:waypoint x="177.5" y="245" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__16" bpmnElement="_16" sourceElement="_6" targetElement="_34">
+        <omgdi:waypoint x="780" y="245" />
+        <omgdi:waypoint x="475" y="165" />
+        <omgdi:waypoint x="177.5" y="245" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__17" bpmnElement="_17" sourceElement="_7" targetElement="_34">
+        <omgdi:waypoint x="985" y="245" />
+        <omgdi:waypoint x="600" y="135" />
+        <omgdi:waypoint x="177.5" y="245" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge__19" bpmnElement="_19" sourceElement="_9" targetElement="_34">
+        <omgdi:waypoint x="1195" y="245" />
+        <omgdi:waypoint x="675" y="105" />
+        <omgdi:waypoint x="177.5" y="245" />
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds x="0" y="0" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0tf77t6_di" bpmnElement="Flow_0tf77t6">
+        <omgdi:waypoint x="521" y="295" />
+        <omgdi:waypoint x="468" y="320" />
+        <omgdi:waypoint x="413" y="295" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0sq564u_di" bpmnElement="Flow_0sq564u">
+        <omgdi:waypoint x="731" y="294" />
+        <omgdi:waypoint x="673" y="320" />
+        <omgdi:waypoint x="613" y="295" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1yk6pxs_di" bpmnElement="Flow_1yk6pxs">
+        <omgdi:waypoint x="931" y="292" />
+        <omgdi:waypoint x="880" y="310" />
+        <omgdi:waypoint x="824" y="299" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_0huyir4_di" bpmnElement="Flow_0huyir4">
+        <omgdi:waypoint x="1143" y="296" />
+        <omgdi:waypoint x="1090" y="320" />
+        <omgdi:waypoint x="1020" y="300" />
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="Flow_1u7oj37_di" bpmnElement="Flow_1u7oj37">
+        <omgdi:waypoint x="331" y="293" />
+        <omgdi:waypoint x="275" y="320" />
+        <omgdi:waypoint x="217" y="297" />
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>