LAPTOP-FO2T5SIU\35838 месяцев назад: 5
Родитель
Сommit
10e60f1f2e

+ 37 - 35
pro-base/src/main/java/com/idea/buildManage/excel/MnpBuildingListener.java

@@ -26,7 +26,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
 
     private List<MnpBuilding> list = new ArrayList<>();
 
-    private List<MnpBuildingExcel> excelList =  new ArrayList<>();
+    private List<MnpBuildingExcel> excelList = new ArrayList<>();
 
     private List<MnpBuildingExcel> badList = new ArrayList<>();
 
@@ -40,8 +40,8 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
     private SysDictService sysDictService;
 
 
-    public MnpBuildingListener(MnpBuildingService buildingService,ParkFloorDiscService floorDiscService,
-                               ParkInfoService parkInfoService,SysDictService sysDictService, JSONObject jsonObject) {
+    public MnpBuildingListener(MnpBuildingService buildingService, ParkFloorDiscService floorDiscService,
+                               ParkInfoService parkInfoService, SysDictService sysDictService, JSONObject jsonObject) {
         this.buildingService = buildingService;
         this.floorDiscService = floorDiscService;
         this.parkInfoService = parkInfoService;
@@ -61,12 +61,12 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
 
         // 入驻类型字典
         List<Map<String, String>> buildStructure = sysDictService.selectDictList("BUILD_STRUCTURE");
-        if(CollectionUtils.isNotEmpty(excelList)){
+        if (CollectionUtils.isNotEmpty(excelList)) {
             MnpBuilding data;
             MnpBuildingExcel excel = null;
             Map<String, String> discNameIdMap = floorDiscService.getNameIdMap();
             Map<String, String> parkNameIdMap = parkInfoService.getNameIdMap();
-            for(int i = 0; i < excelList.size(); i++){
+            for (int i = 0; i < excelList.size(); i++) {
 
                 boolean groupNameFlag = true;
                 boolean discNameFlag = true;
@@ -105,7 +105,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     data.setDiscName(excel.getDiscName());
 
                     // 判断小区是否存在
-                    if(StringUtils.isEmpty(parkNameIdMap.get(excel.getGroupName()))){
+                    if (StringUtils.isEmpty(parkNameIdMap.get(excel.getGroupName()))) {
                         groupNameFlag = false;
                         builder.append("楼盘/小区不存在").append(",");
                         excel.setGroupName("{" + excel.getGroupName() + "}");
@@ -113,7 +113,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     data.setGroupId(parkNameIdMap.get(excel.getGroupName()));
 
                     // 判断分期是否存在
-                    if(StringUtils.isEmpty(discNameIdMap.get(excel.getDiscName()))){
+                    if (StringUtils.isEmpty(discNameIdMap.get(excel.getDiscName()))) {
                         discNameFlag = false;
                         builder.append("分期不存在").append(",");
                         excel.setDiscName("{" + excel.getDiscName() + "}");
@@ -144,7 +144,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     }
                     try {
                         data.setArea(Double.valueOf(excel.getArea()));
-                    }catch (NumberFormatException e){
+                    } catch (NumberFormatException e) {
                         areaFlag = false;
                         builder.append("总面积格式有误").append(",");
                         excel.setArea("{" + excel.getArea() + "}");
@@ -158,7 +158,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     }
                     try {
                         data.setResidentialArea(Double.valueOf(excel.getResidentialArea()));
-                    }catch (NumberFormatException e){
+                    } catch (NumberFormatException e) {
                         residentialAreaFlag = false;
                         builder.append("住宅面积格式有误").append(",");
                         excel.setResidentialArea("{" + excel.getResidentialArea() + "}");
@@ -172,7 +172,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     }
                     try {
                         data.setUnResidentialArea(Double.valueOf(excel.getUnResidentialArea()));
-                    }catch (NumberFormatException e){
+                    } catch (NumberFormatException e) {
                         unResidentialAreaFlag = false;
                         builder.append("非住宅面积格式有误").append(",");
                         excel.setUnResidentialArea("{" + excel.getUnResidentialArea() + "}");
@@ -186,32 +186,34 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     }
                     try {
                         data.setCoverAnArea(Double.valueOf(excel.getCoverAnArea()));
-                    }catch (NumberFormatException e){
+                    } catch (NumberFormatException e) {
                         coverAnAreaFlag = false;
                         builder.append("占地面积格式有误").append(",");
                         excel.setCoverAnArea("{" + excel.getCoverAnArea() + "}");
                     }
 
                     // 地下面积
-                    if (StringUtils.isEmpty(excel.getUndergroundArea())) {
-                        undergroundAreaFlag = false;
-                        builder.append("地下面积为空").append(",");
-                        excel.setUndergroundArea("{" + excel.getUndergroundArea() + "}");
-                    }
-                    try {
-                        data.setUndergroundArea(Double.valueOf(excel.getUndergroundArea()));
-                    }catch (NumberFormatException e){
-                        undergroundAreaFlag = false;
-                        builder.append("地下面积格式有误").append(",");
-                        excel.setUndergroundArea("{" + excel.getUndergroundArea() + "}");
+//                    if (StringUtils.isEmpty(excel.getUndergroundArea())) {
+//                        undergroundAreaFlag = false;
+//                        builder.append("地下面积为空").append(",");
+//                        excel.setUndergroundArea("{" + excel.getUndergroundArea() + "}");
+//                    }
+                    if (StringUtils.isNotEmpty(excel.getUndergroundArea())) {
+                        try {
+                            data.setUndergroundArea(Double.valueOf(excel.getUndergroundArea()));
+                        } catch (NumberFormatException e) {
+                            undergroundAreaFlag = false;
+                            builder.append("地下面积格式有误").append(",");
+                            excel.setUndergroundArea("{" + excel.getUndergroundArea() + "}");
+                        }
                     }
 
                     // 房号
-                    if (StringUtils.isEmpty(excel.getRoomNum())) {
-                        roomNumFlag = false;
-                        builder.append("房号为空").append(",");
-                        excel.setRoomNum("{" + excel.getRoomNum() + "}");
-                    }
+//                    if (StringUtils.isEmpty(excel.getRoomNum())) {
+//                        roomNumFlag = false;
+//                        builder.append("房号为空").append(",");
+//                        excel.setRoomNum("{" + excel.getRoomNum() + "}");
+//                    }
                     data.setRoomNum(excel.getRoomNum());
 
                     // 套数
@@ -230,7 +232,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     }
                     try {
                         data.setFloors(Integer.valueOf(excel.getFloors()));
-                    }catch (NumberFormatException e){
+                    } catch (NumberFormatException e) {
                         floorsFlag = false;
                         builder.append("总层数格式有误").append(",");
                         excel.setFloors("{" + excel.getFloors() + "}");
@@ -244,7 +246,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     }
                     try {
                         data.setOvergroundFloors(Integer.valueOf(excel.getOvergroundFloors()));
-                    }catch (NumberFormatException e){
+                    } catch (NumberFormatException e) {
                         overgroundFloorsFlag = false;
                         builder.append("地上层数格式有误").append(",");
                         excel.setOvergroundFloors("{" + excel.getOvergroundFloors() + "}");
@@ -258,7 +260,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                     }
                     try {
                         data.setUndergroundFloors(Integer.valueOf(excel.getUndergroundFloors()));
-                    }catch (NumberFormatException e){
+                    } catch (NumberFormatException e) {
                         undergroundFloorsFlag = false;
                         builder.append("地下层数格式有误").append(",");
                         excel.setUndergroundFloors("{" + excel.getUndergroundFloors() + "}");
@@ -276,7 +278,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                         }
                     }
                     // 没匹配上的情况
-                    if(StringUtils.isEmpty(data.getStructure())){
+                    if (StringUtils.isEmpty(data.getStructure())) {
                         structureFlag = false;
                         builder.append("结构格式有误").append(",");
                         excel.setStructure("{" + excel.getStructure() + "}");
@@ -310,11 +312,11 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                         data.setCreatedId(ShiroUtils.getUserId());
                         data.setCreatedAt(new Date());
                         list.add(data);
-                    }else {
+                    } else {
                         throw new RuntimeException(builder.toString());
                     }
 
-                }catch (Exception e){
+                } catch (Exception e) {
                     e.printStackTrace();
                     String message = e.getMessage();
                     excel.setReason(message);
@@ -331,13 +333,13 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
 
             excelList.clear();
             list.clear();
-        }else {
+        } else {
             throw new RuntimeException("excel无数据");
         }
 
     }
 
-    private void saveData(){
+    private void saveData() {
         if (CollectionUtils.isNotEmpty(list)) {
             buildingService.insertBatch(list);
         }

+ 3 - 2
pro-base/src/main/java/com/idea/buildManage/service/ParkRoomService.java

@@ -592,13 +592,14 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
 
                 // 查询退房
                 RefundManageExample refundManageExample = new RefundManageExample();
-                refundManageExample.createCriteria().andHouseIdEqualTo(houseId);
+                refundManageExample.createCriteria().andHouseIdEqualTo(houseId)
+                        .andCustomerManagementIdEqualTo(customerManagementId);
                 List<RefundManage> refundManages = refundManageMapper.selectByExample(refundManageExample);
                 if (CollectionUtils.isNotEmpty(refundManages)) {
 
                     Date createdAt = refundManages.get(0).getCreatedAt();
                     parkRoomNode = new ParkRoomNode();
-                    parkRoomNode.setNodeName("回购/增购");
+                    parkRoomNode.setNodeName("退房");
                     parkRoomNode.setBusinessType(ConstantNodeType.BUSINESS_TYPE_7);
                     parkRoomNode.setOrderNum(7);
                     parkRoomNode.setHandleDate(createdAt);

+ 31 - 0
pro-base/src/main/java/com/idea/oa/apply/mapper/ApplyCheckInMapper.java

@@ -0,0 +1,31 @@
+package com.idea.oa.apply.mapper;
+
+import java.util.List;
+
+import com.idea.oa.apply.model.ApplyCheckIn;
+import com.idea.oa.apply.model.ApplyCheckInExample;
+import org.apache.ibatis.annotations.Param;
+
+public interface ApplyCheckInMapper {
+    long countByExample(ApplyCheckInExample example);
+
+    int deleteByExample(ApplyCheckInExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(ApplyCheckIn record);
+
+    int insertSelective(ApplyCheckIn record);
+
+    List<ApplyCheckIn> selectByExample(ApplyCheckInExample example);
+
+    ApplyCheckIn selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") ApplyCheckIn record, @Param("example") ApplyCheckInExample example);
+
+    int updateByExample(@Param("record") ApplyCheckIn record, @Param("example") ApplyCheckInExample example);
+
+    int updateByPrimaryKeySelective(ApplyCheckIn record);
+
+    int updateByPrimaryKey(ApplyCheckIn record);
+}

+ 138 - 0
pro-base/src/main/java/com/idea/oa/apply/model/ApplyCheckIn.java

@@ -0,0 +1,138 @@
+package com.idea.oa.apply.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ApplyCheckIn implements Serializable {
+    private String id;
+
+    private String flowNum;
+
+    private String title;
+
+    private String houseName;
+
+    private String houseId;
+
+    private String fileDataIds;
+
+    private Integer status;
+
+    private String createdByDept;
+
+    private String createdBy;
+
+    private Date createdAt;
+
+    private String updatedBy;
+
+    private Date updatedAt;
+
+    private String remark;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getFlowNum() {
+        return flowNum;
+    }
+
+    public void setFlowNum(String flowNum) {
+        this.flowNum = flowNum == null ? null : flowNum.trim();
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title == null ? null : title.trim();
+    }
+
+    public String getHouseName() {
+        return houseName;
+    }
+
+    public void setHouseName(String houseName) {
+        this.houseName = houseName == null ? null : houseName.trim();
+    }
+
+    public String getHouseId() {
+        return houseId;
+    }
+
+    public void setHouseId(String houseId) {
+        this.houseId = houseId == null ? null : houseId.trim();
+    }
+
+    public String getFileDataIds() {
+        return fileDataIds;
+    }
+
+    public void setFileDataIds(String fileDataIds) {
+        this.fileDataIds = fileDataIds == null ? null : fileDataIds.trim();
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getCreatedByDept() {
+        return createdByDept;
+    }
+
+    public void setCreatedByDept(String createdByDept) {
+        this.createdByDept = createdByDept == null ? null : createdByDept.trim();
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy == null ? null : createdBy.trim();
+    }
+
+    public Date getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Date createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getUpdatedBy() {
+        return updatedBy;
+    }
+
+    public void setUpdatedBy(String updatedBy) {
+        this.updatedBy = updatedBy == null ? null : updatedBy.trim();
+    }
+
+    public Date getUpdatedAt() {
+        return updatedAt;
+    }
+
+    public void setUpdatedAt(Date updatedAt) {
+        this.updatedAt = updatedAt;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark == null ? null : remark.trim();
+    }
+}

Разница между файлами не показана из-за своего большого размера
+ 1081 - 0
pro-base/src/main/java/com/idea/oa/apply/model/ApplyCheckInExample.java


+ 94 - 16
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.ApplyPaymentSettleService;
 import com.idea.oa.apply.util.constant.ConstantFlowType;
 import com.idea.oa.apply.util.service.RunerLoadOneService;
 import com.idea.oa.flow2.model.FlowMain;
@@ -25,16 +26,22 @@ import com.idea.oa.flow2.service.FlowMainService;
 //import com.idea.oa.outsource.model.OutOrderPayExample;
 //import com.idea.oa.outsource.service.OutOrderMainService;
 //import com.idea.oa.outsource.service.OutOrderPayService;
+import com.idea.util.DateUtils;
+import com.idea.util.OAUtil;
 import com.idea.workPanel.enume.HandleTypeEnum;
 import com.idea.workPanel.mapper.ParkWaitHandleMapper;
 import com.idea.workPanel.model.ParkWaitHandle;
 import com.idea.workPanel.model.ParkWaitHandleExample;
+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.flow.model.FlowDefinition;
 import com.rockstar.flow.service.FlowDefinitionService;
 import com.rockstar.flow.service.FlowService;
+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.TableSplitResult;
 import com.rockstar.frame.model.extend.Tablepar;
@@ -42,10 +49,12 @@ import com.rockstar.shiro.util.ShiroUtils;
 import com.rockstar.util.StringUtils;
 import com.rockstar.util.UUIDUtils;
 import io.swagger.annotations.Api;
+import lombok.extern.slf4j.Slf4j;
 import org.activiti.bpmn.model.SequenceFlow;
 import org.activiti.bpmn.model.UserTask;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -55,11 +64,14 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import java.math.BigDecimal;
 import java.math.MathContext;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Created by zt
  */
+@Slf4j
 @Controller
 @RequestMapping(value = "FlowMainController")
 @Api(value = "申请流程/主表_主申请审核表")
@@ -92,8 +104,12 @@ public class FlowMainController extends BaseController {
 //    private OutOrderMainService outOrderMainService;
 //    @Autowired
 //    private OutOrderPayService outOrderPayService;
-@Autowired
-    private ParkWaitHandleMapper parkWaitHandleMapper;
+    @Autowired
+    private ParkWaitHandleService parkWaitHandleService;
+    @Value("${serverUrl}")
+    private String serverUrl;
+    @Autowired
+    private ApplyPaymentSettleService applyPaymentSettleService;
 
 
     /**
@@ -545,24 +561,86 @@ public class FlowMainController extends BaseController {
                 newflowMainPush.setGroupId(ShiroUtils.getUser().getGroupId());
                 newflowMainPush.setStatus(0);
                 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();
-            // 付款申请
-            if(flowMain.getFlowType().equals(ConstantFlowType.PAYMENT)){
-                ParkWaitHandleExample parkWaitHandleExample = new ParkWaitHandleExample();
-                parkWaitHandleExample.createCriteria().andRouteParamEqualTo(param);
-                List<ParkWaitHandle> handleList = parkWaitHandleMapper.selectByExample(parkWaitHandleExample);
-                if(CollectionUtils.isNotEmpty(handleList)){
-                    ParkWaitHandle handle = handleList.get(0);
-                    handle.setReceiveUserId(entity.getPushEntrustId());
-                    parkWaitHandleMapper.updateByPrimaryKeySelective(handle);
+
+                // TODO: 2024/12/12 修改待办receive_user
+                FlowMain flowMain = modelService.selectByPrimaryKey(flowMainPush.getFlowMainId());
+                // 进行审核操作后 就要处理待办 清除数据
+                String param = "id=" + flowMain.getId() + "&flowMainPushId=" + entity.getFlowMainPushId() + "&applyUser=" + flowMain.getApplyUser();
+                parkWaitHandleService.userHandle(HandleTypeEnum.FK, param, ShiroUtils.getUserId());
+
+                // 付款申请
+                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);
+
+
                 }
+
             }
 
+
+
         }
 
 

+ 4 - 0
pro-base/src/main/java/com/idea/util/OAUtil.java

@@ -1,10 +1,14 @@
 package com.idea.util;
 
+import cn.hutool.core.codec.Base64;
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.crypto.symmetric.AES;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpHeaders;
 
 import java.util.Date;

+ 338 - 0
pro-base/src/main/resources/mybatis/apply/ApplyCheckInMapper.xml

@@ -0,0 +1,338 @@
+<?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.ApplyCheckInMapper">
+  <resultMap id="BaseResultMap" type="com.idea.oa.apply.model.ApplyCheckIn">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="flow_num" jdbcType="VARCHAR" property="flowNum" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="house_name" jdbcType="VARCHAR" property="houseName" />
+    <result column="house_id" jdbcType="VARCHAR" property="houseId" />
+    <result column="file_data_ids" jdbcType="VARCHAR" property="fileDataIds" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="created_by_dept" jdbcType="VARCHAR" property="createdByDept" />
+    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
+    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
+    <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
+    <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, flow_num, title, house_name, house_id, file_data_ids, status, created_by_dept, 
+    created_by, created_at, updated_by, updated_at, remark
+  </sql>
+  <select id="selectByExample" parameterType="com.idea.oa.apply.model.ApplyCheckInExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from apply_check_in
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from apply_check_in
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from apply_check_in
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.idea.oa.apply.model.ApplyCheckInExample">
+    delete from apply_check_in
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
+    insert into apply_check_in (id, flow_num, title, 
+      house_name, house_id, file_data_ids, 
+      status, created_by_dept, created_by, 
+      created_at, updated_by, updated_at, 
+      remark)
+    values (#{id,jdbcType=VARCHAR}, #{flowNum,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, 
+      #{houseName,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR}, #{fileDataIds,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{createdByDept,jdbcType=VARCHAR}, #{createdBy,jdbcType=VARCHAR}, 
+      #{createdAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, 
+      #{remark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
+    insert into apply_check_in
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="flowNum != null">
+        flow_num,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="houseName != null">
+        house_name,
+      </if>
+      <if test="houseId != null">
+        house_id,
+      </if>
+      <if test="fileDataIds != null">
+        file_data_ids,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="createdByDept != null">
+        created_by_dept,
+      </if>
+      <if test="createdBy != null">
+        created_by,
+      </if>
+      <if test="createdAt != null">
+        created_at,
+      </if>
+      <if test="updatedBy != null">
+        updated_by,
+      </if>
+      <if test="updatedAt != null">
+        updated_at,
+      </if>
+      <if test="remark != null">
+        remark,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="flowNum != null">
+        #{flowNum,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="houseName != null">
+        #{houseName,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        #{houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="fileDataIds != null">
+        #{fileDataIds,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createdByDept != null">
+        #{createdByDept,jdbcType=VARCHAR},
+      </if>
+      <if test="createdBy != null">
+        #{createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedBy != null">
+        #{updatedBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updatedAt != null">
+        #{updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.idea.oa.apply.model.ApplyCheckInExample" resultType="java.lang.Long">
+    select count(*) from apply_check_in
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update apply_check_in
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.flowNum != null">
+        flow_num = #{record.flowNum,jdbcType=VARCHAR},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.houseName != null">
+        house_name = #{record.houseName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.houseId != null">
+        house_id = #{record.houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fileDataIds != null">
+        file_data_ids = #{record.fileDataIds,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        status = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.createdByDept != null">
+        created_by_dept = #{record.createdByDept,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdBy != null">
+        created_by = #{record.createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdAt != null">
+        created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updatedBy != null">
+        updated_by = #{record.updatedBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updatedAt != null">
+        updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.remark != null">
+        remark = #{record.remark,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update apply_check_in
+    set id = #{record.id,jdbcType=VARCHAR},
+      flow_num = #{record.flowNum,jdbcType=VARCHAR},
+      title = #{record.title,jdbcType=VARCHAR},
+      house_name = #{record.houseName,jdbcType=VARCHAR},
+      house_id = #{record.houseId,jdbcType=VARCHAR},
+      file_data_ids = #{record.fileDataIds,jdbcType=VARCHAR},
+      status = #{record.status,jdbcType=INTEGER},
+      created_by_dept = #{record.createdByDept,jdbcType=VARCHAR},
+      created_by = #{record.createdBy,jdbcType=VARCHAR},
+      created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      updated_by = #{record.updatedBy,jdbcType=VARCHAR},
+      updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+      remark = #{record.remark,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
+    update apply_check_in
+    <set>
+      <if test="flowNum != null">
+        flow_num = #{flowNum,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="houseName != null">
+        house_name = #{houseName,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        house_id = #{houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="fileDataIds != null">
+        file_data_ids = #{fileDataIds,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createdByDept != null">
+        created_by_dept = #{createdByDept,jdbcType=VARCHAR},
+      </if>
+      <if test="createdBy != null">
+        created_by = #{createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedBy != null">
+        updated_by = #{updatedBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updatedAt != null">
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remark != null">
+        remark = #{remark,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
+    update apply_check_in
+    set flow_num = #{flowNum,jdbcType=VARCHAR},
+      title = #{title,jdbcType=VARCHAR},
+      house_name = #{houseName,jdbcType=VARCHAR},
+      house_id = #{houseId,jdbcType=VARCHAR},
+      file_data_ids = #{fileDataIds,jdbcType=VARCHAR},
+      status = #{status,jdbcType=INTEGER},
+      created_by_dept = #{createdByDept,jdbcType=VARCHAR},
+      created_by = #{createdBy,jdbcType=VARCHAR},
+      created_at = #{createdAt,jdbcType=TIMESTAMP},
+      updated_by = #{updatedBy,jdbcType=VARCHAR},
+      updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+      remark = #{remark,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>