From 0fe85a3190a98b30b4d562bae4af16323be0ef5b Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 27 May 2024 19:26:25 +0800
Subject: [PATCH] 通过E呼即办数据

---
 src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java    |  118 +++++++
 src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java                         |   18 +
 src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java                     |  387 +++++++++++++++++++++++++
 src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java |   18 +
 src/main/resources/application-prod.yml                                                     |   22 +
 src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.java               |   28 +
 src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.xml                |  181 ++++++++++++
 src/main/resources/application-test.yml                                                     |   23 +
 src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDTO.java                     |   17 +
 src/main/java/org/springblade/modules/eCallEventTwo/service/EcOrderService.java             |   65 ++++
 src/main/resources/application.yml                                                          |    3 
 src/main/java/org/springblade/common/launch/LauncherServiceImpl.java                        |    2 
 12 files changed, 874 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java b/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
index cbf415b..1652b56 100644
--- a/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
+++ b/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
@@ -36,7 +36,7 @@
 	public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
 		Properties props = System.getProperties();
 		PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
-		PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "false");
+		PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "true");
 		// 开启elk日志
 		//PropsUtil.setProperty(props, "blade.log.elk.destination", LauncherConstant.elkAddr(profile));
 	}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java b/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java
index 1acfadd..48c0011 100644
--- a/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java
@@ -29,6 +29,8 @@
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.eCallEventTwo.entity.EcOrder;
+import org.springblade.modules.eCallEventTwo.service.EcOrderService;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
@@ -36,6 +38,8 @@
 import org.springblade.modules.eCallEventTwo.wrapper.ECallEventTwoWrapper;
 import org.springblade.modules.eCallEventTwo.service.IECallEventTwoService;
 import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
 
 /**
  * 工单 控制器
@@ -50,6 +54,8 @@
 public class ECallEventTwoController extends BladeController {
 
 	private final IECallEventTwoService eCallEventTwoService;
+
+	private final EcOrderService ecOrderService;
 
 	/**
 	 * 工单 详情
@@ -125,4 +131,16 @@
 	}
 
 
+	/**
+	 * 工单 同步
+	 */
+	@PostMapping("/synchronizeData")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "逻辑删除")
+	public R synchronizeData() {
+		boolean b = ecOrderService.SynchronizeData();
+		return R.status(b);
+	}
+
+
 }
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDTO.java b/src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDTO.java
new file mode 100644
index 0000000..b3c8528
--- /dev/null
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDTO.java
@@ -0,0 +1,17 @@
+package org.springblade.modules.eCallEventTwo.dto;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import org.springblade.modules.eCallEventTwo.entity.EcOrder;
+
+/**
+ * 工单对象 ec_order
+ *
+ * @author ${context.author}
+ * @date 2024-05-27 16:26:59
+ */
+@ApiModel(value = "EcOrderDTO对象")
+@Data
+public class EcOrderDTO extends EcOrder {
+
+}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java b/src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java
new file mode 100644
index 0000000..f02f54e
--- /dev/null
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java
@@ -0,0 +1,387 @@
+package org.springblade.modules.eCallEventTwo.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 工单对象 ec_order
+ *
+ * @author ${context.author}
+ * @date 2024-05-27 16:26:59
+ */
+@ApiModel(value = "EcOrder对象", description = "工单")
+@Data
+@TableName("ec_order")
+public class EcOrder implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+
+	/**
+	 * 工单ID
+	 */
+	@ApiModelProperty(value = "主键ID", example = "")
+	@TableId(value = "order_id", type = IdType.AUTO)
+	private Long orderId;
+
+	/**
+	 * 工单号/话务单号
+	 */
+	@ApiModelProperty(value = "工单号/话务单号", example = "")
+	@TableField("order_code")
+	private String orderCode;
+
+	/**
+	 * 诉求来源(0热线 1公安110 2微信 3微博)
+	 */
+	@ApiModelProperty(value = "诉求来源(0热线 1公安110 2微信 3微博)", example = "")
+	@TableField("issue_origin")
+	private String issueOrigin;
+
+	/**
+	 * 诉求主题
+	 */
+	@ApiModelProperty(value = "诉求主题", example = "")
+	@TableField("issue_title")
+	private String issueTitle;
+
+	/**
+	 * 诉求内容
+	 */
+	@ApiModelProperty(value = "诉求内容", example = "")
+	@TableField("issue_content")
+	private String issueContent;
+
+	/**
+	 * 诉求用户类别(0个人 1企业)
+	 */
+	@ApiModelProperty(value = "诉求用户类别(0个人 1企业)", example = "")
+	@TableField("applicant_type")
+	private String applicantType;
+
+	/**
+	 * 诉求人姓名
+	 */
+	@ApiModelProperty(value = "诉求人姓名", example = "")
+	@TableField("applicant_name")
+	private String applicantName;
+
+	/**
+	 * 诉求人性别(0男 1女)
+	 */
+	@ApiModelProperty(value = "诉求人性别(0男 1女)", example = "")
+	@TableField("applicant_gender")
+	private String applicantGender;
+
+	/**
+	 * 诉求人住址
+	 */
+	@ApiModelProperty(value = "诉求人住址", example = "")
+	@TableField("applicant_homeaddr")
+	private String applicantHomeaddr;
+
+	/**
+	 * 现场联系电话
+	 */
+	@ApiModelProperty(value = "现场联系电话", example = "")
+	@TableField("applicant_phone")
+	private String applicantPhone;
+
+	/**
+	 * 网格
+	 */
+	@ApiModelProperty(value = "网格", example = "")
+	@TableField("applicant_grid")
+	private String applicantGrid;
+
+	/**
+	 * 诉求人行政区划
+	 */
+	@ApiModelProperty(value = "诉求人行政区划", example = "")
+	@TableField("applicant_district")
+	private String applicantDistrict;
+
+	/**
+	 * 事发地址
+	 */
+	@ApiModelProperty(value = "事发地址", example = "")
+	@TableField("scene_addr")
+	private String sceneAddr;
+
+	/**
+	 * 事发地址网格
+	 */
+	@ApiModelProperty(value = "事发地址网格", example = "")
+	@TableField("scene_addr_grid")
+	private String sceneAddrGrid;
+
+	/**
+	 * 事发所属行政区划
+	 */
+	@ApiModelProperty(value = "事发所属行政区划", example = "")
+	@TableField("scene_district")
+	private String sceneDistrict;
+
+	/**
+	 * 事发场所
+	 */
+	@ApiModelProperty(value = "事发场所", example = "")
+	@TableField("scene_place")
+	private String scenePlace;
+
+	/**
+	 * 事发地点-经度
+	 */
+	@ApiModelProperty(value = "事发地点-经度", example = "")
+	@TableField("scene_geo_lat")
+	private BigDecimal sceneGeoLat;
+
+	/**
+	 * 事发地点-维度
+	 */
+	@ApiModelProperty(value = "事发地点-维度", example = "")
+	@TableField("scene_geo_lng")
+	private BigDecimal sceneGeoLng;
+
+	/**
+	 * 事发地址(App校正)
+	 */
+	@ApiModelProperty(value = "事发地址(App校正)", example = "")
+	@TableField("scene_addr_cor")
+	private String sceneAddrCor;
+
+	/**
+	 * 事发地点-经度(App校正)
+	 */
+	@ApiModelProperty(value = "事发地点-经度(App校正)", example = "")
+	@TableField("scene_geo_lat_cor")
+	private BigDecimal sceneGeoLatCor;
+
+	/**
+	 * 事发地点-维度(App校正)
+	 */
+	@ApiModelProperty(value = "事发地点-维度(App校正)", example = "")
+	@TableField("scene_geo_lng_cor")
+	private BigDecimal sceneGeoLngCor;
+
+	/**
+	 * 是否保密
+	 */
+	@ApiModelProperty(value = "是否保密", example = "")
+	@TableField("is_secret")
+	private String isSecret;
+
+	/**
+	 * 是否重复
+	 */
+	@ApiModelProperty(value = "是否重复", example = "")
+	@TableField("is_repeat")
+	private String isRepeat;
+
+	/**
+	 * 诉求类别(咨询、投诉、求助、举报、建议)
+	 */
+	@ApiModelProperty(value = "诉求类别(咨询、投诉、求助、举报、建议)", example = "")
+	@TableField("issue_type")
+	private String issueType;
+
+	/**
+	 * 归口类型-多级
+	 */
+	@ApiModelProperty(value = "归口类型-多级", example = "")
+	@TableField("issue_clazz")
+	private String issueClazz;
+
+	/**
+	 * 紧急程度(一般、即办)
+	 */
+	@ApiModelProperty(value = "紧急程度(一般、即办)", example = "")
+	@TableField("issue_level")
+	private String issueLevel;
+
+	/**
+	 * 办理时限(分钟)
+	 */
+	@ApiModelProperty(value = "办理时限(分钟)", example = "")
+	@TableField("deadline")
+	private Integer deadline;
+
+	/**
+	 * 关联工单ID
+	 */
+	@ApiModelProperty(value = "关联工单ID", example = "")
+	@TableField("link_orders")
+	private String linkOrders;
+
+	/**
+	 * 关联工单号
+	 */
+	@ApiModelProperty(value = "关联工单号", example = "")
+	@TableField("link_orders_code")
+	private String linkOrdersCode;
+
+	/**
+	 * 知识引用
+	 */
+	@ApiModelProperty(value = "知识引用", example = "")
+	@TableField("wiki_ref")
+	private String wikiRef;
+
+	/**
+	 * 受理单位
+	 */
+	@ApiModelProperty(value = "受理单位", example = "")
+	@TableField("acpt_org_code")
+	private String acptOrgCode;
+
+	/**
+	 * 受理单位
+	 */
+	@ApiModelProperty(value = "受理单位", example = "")
+	@TableField("acpt_org_name")
+	private String acptOrgName;
+
+	/**
+	 * 处办方式
+	 */
+	@ApiModelProperty(value = "处办方式", example = "")
+	@TableField("handle_way")
+	private String handleWay;
+
+	/**
+	 * 外部处办方式
+	 */
+	@ApiModelProperty(value = "外部处办方式", example = "")
+	@TableField("external_handle_way")
+	private String externalHandleWay;
+
+	/**
+	 * 直接答复内容
+	 */
+	@ApiModelProperty(value = "直接答复内容", example = "")
+	@TableField("direct_feed")
+	private String directFeed;
+
+	/**
+	 * 直接答复人员
+	 */
+	@ApiModelProperty(value = "直接答复人员", example = "")
+	@TableField("direct_feed_handler")
+	private String directFeedHandler;
+
+	/**
+	 * 直接答复时间
+	 */
+	@ApiModelProperty(value = "直接答复时间", example = "")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	@TableField("direct_feed_time")
+	private Date directFeedTime;
+
+	/**
+	 * 工单附件
+	 */
+	@ApiModelProperty(value = "工单附件", example = "")
+	@TableField("images")
+	private String images;
+
+	/**
+	 * 有效工单(Y/N)
+	 */
+	@ApiModelProperty(value = "有效工单(Y/N)", example = "")
+	@TableField("flag_vaild")
+	private String flagVaild;
+
+	/**
+	 * 无效说明
+	 */
+	@ApiModelProperty(value = "无效说明", example = "")
+	@TableField("invalid_note")
+	private String invalidNote;
+
+	/**
+	 * 无效设置时间
+	 */
+	@ApiModelProperty(value = "无效设置时间", example = "")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	@TableField("invalid_time")
+	private Date invalidTime;
+
+	/**
+	 * 无效设置人员
+	 */
+	@ApiModelProperty(value = "无效设置人员", example = "")
+	@TableField("invalid_user_name")
+	private String invalidUserName;
+
+	/**
+	 * 工单状态(0受理 1处理中 2已归档)
+	 */
+	@ApiModelProperty(value = "工单状态(0受理 1处理中 2已归档)", example = "")
+	@TableField("status")
+	private String status;
+
+	/**
+	 * 交办标签(N未交办 Y已交办 R已退回)
+	 */
+	@ApiModelProperty(value = "交办标签(N未交办 Y已交办 R已退回)", example = "")
+	@TableField("tag_apply")
+	private String tagApply;
+
+	/**
+	 * 已延期(Y/N)
+	 */
+	@ApiModelProperty(value = "已延期(Y/N)", example = "")
+	@TableField("tag_delay")
+	private String tagDelay;
+
+	/**
+	 * 已反馈(Y/N)
+	 */
+	@ApiModelProperty(value = "已反馈(Y/N)", example = "")
+	@TableField("tag_doing")
+	private String tagDoing;
+
+	/**
+	 * 已答复(Y/N)
+	 */
+	@ApiModelProperty(value = "已答复(Y/N)", example = "")
+	@TableField("tag_resp")
+	private String tagResp;
+
+	/**
+	 * 已办结(Y/N)
+	 */
+	@ApiModelProperty(value = "已办结(Y/N)", example = "")
+	@TableField("tag_done")
+	private String tagDone;
+
+	/**
+	 * 已回访(Y/N)
+	 */
+	@ApiModelProperty(value = "已回访(Y/N)", example = "")
+	@TableField("tag_check")
+	private String tagCheck;
+
+	/**
+	 * 已电话回访(Y/N)
+	 */
+	@ApiModelProperty(value = "已电话回访(Y/N)", example = "")
+	@TableField("tag_chk_tel")
+	private String tagChkTel;
+
+	/**
+	 * 核实/督办(N1/N2)
+	 */
+	@ApiModelProperty(value = "核实/督办(N1/N2)", example = "")
+	@TableField("tag_redo")
+	private String tagRedo;
+}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.java b/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.java
new file mode 100644
index 0000000..4404ae4
--- /dev/null
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.java
@@ -0,0 +1,28 @@
+package org.springblade.modules.eCallEventTwo.mapper;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.modules.eCallEventTwo.dto.EcOrderDTO;
+import org.springblade.modules.eCallEventTwo.entity.EcOrder;
+
+import java.util.List;
+
+@DS("slave_1")
+public interface EcOrderMapper extends BaseMapper<EcOrder>{
+		/**
+		 * 查询工单
+		 *
+		 * @param orderId 工单ID
+		 * @return 工单
+		 */
+		public EcOrderDTO selectEcOrderById(Long orderId);
+
+		/**
+		 * 查询工单列表
+		 *
+		 * @param ecOrderDTO 工单
+		 * @return 工单集合
+		 */
+		public List<EcOrderDTO> selectEcOrderList(EcOrderDTO ecOrderDTO);
+
+}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.xml b/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.xml
new file mode 100644
index 0000000..42502b6
--- /dev/null
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.xml
@@ -0,0 +1,181 @@
+<?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="org.springblade.modules.eCallEventTwo.mapper.EcOrderMapper">
+
+    <resultMap type="org.springblade.modules.eCallEventTwo.dto.EcOrderDTO" id="EcOrderDTOResult">
+        <result property="orderId"    column="order_id"    />
+        <result property="orderCode"    column="order_code"    />
+        <result property="issueOrigin"    column="issue_origin"    />
+        <result property="issueTitle"    column="issue_title"    />
+        <result property="issueContent"    column="issue_content"    />
+        <result property="applicantType"    column="applicant_type"    />
+        <result property="applicantName"    column="applicant_name"    />
+        <result property="applicantGender"    column="applicant_gender"    />
+        <result property="applicantHomeaddr"    column="applicant_homeaddr"    />
+        <result property="applicantPhone"    column="applicant_phone"    />
+        <result property="applicantGrid"    column="applicant_grid"    />
+        <result property="applicantDistrict"    column="applicant_district"    />
+        <result property="sceneAddr"    column="scene_addr"    />
+        <result property="sceneAddrGrid"    column="scene_addr_grid"    />
+        <result property="sceneDistrict"    column="scene_district"    />
+        <result property="scenePlace"    column="scene_place"    />
+        <result property="sceneGeoLat"    column="scene_geo_lat"    />
+        <result property="sceneGeoLng"    column="scene_geo_lng"    />
+        <result property="sceneAddrCor"    column="scene_addr_cor"    />
+        <result property="sceneGeoLatCor"    column="scene_geo_lat_cor"    />
+        <result property="sceneGeoLngCor"    column="scene_geo_lng_cor"    />
+        <result property="isSecret"    column="is_secret"    />
+        <result property="isRepeat"    column="is_repeat"    />
+        <result property="issueType"    column="issue_type"    />
+        <result property="issueClazz"    column="issue_clazz"    />
+        <result property="issueLevel"    column="issue_level"    />
+        <result property="deadline"    column="deadline"    />
+        <result property="linkOrders"    column="link_orders"    />
+        <result property="linkOrdersCode"    column="link_orders_code"    />
+        <result property="wikiRef"    column="wiki_ref"    />
+        <result property="acptOrgCode"    column="acpt_org_code"    />
+        <result property="acptOrgName"    column="acpt_org_name"    />
+        <result property="handleWay"    column="handle_way"    />
+        <result property="externalHandleWay"    column="external_handle_way"    />
+        <result property="directFeed"    column="direct_feed"    />
+        <result property="directFeedHandler"    column="direct_feed_handler"    />
+        <result property="directFeedTime"    column="direct_feed_time"    />
+        <result property="images"    column="images"    />
+        <result property="flagVaild"    column="flag_vaild"    />
+        <result property="invalidNote"    column="invalid_note"    />
+        <result property="invalidTime"    column="invalid_time"    />
+        <result property="invalidUserName"    column="invalid_user_name"    />
+        <result property="status"    column="status"    />
+        <result property="tagApply"    column="tag_apply"    />
+        <result property="tagDelay"    column="tag_delay"    />
+        <result property="tagDoing"    column="tag_doing"    />
+        <result property="tagResp"    column="tag_resp"    />
+        <result property="tagDone"    column="tag_done"    />
+        <result property="tagCheck"    column="tag_check"    />
+        <result property="tagChkTel"    column="tag_chk_tel"    />
+        <result property="tagRedo"    column="tag_redo"    />
+    </resultMap>
+
+    <sql id="selectEcOrder">
+    	select
+	        order_id,
+	        order_code,
+	        issue_origin,
+	        issue_title,
+	        issue_content,
+	        applicant_type,
+	        applicant_name,
+	        applicant_gender,
+	        applicant_homeaddr,
+	        applicant_phone,
+	        applicant_grid,
+	        applicant_district,
+	        scene_addr,
+	        scene_addr_grid,
+	        scene_district,
+	        scene_place,
+	        scene_geo_lat,
+	        scene_geo_lng,
+	        scene_addr_cor,
+	        scene_geo_lat_cor,
+	        scene_geo_lng_cor,
+	        is_secret,
+	        is_repeat,
+	        issue_type,
+	        issue_clazz,
+	        issue_level,
+	        deadline,
+	        link_orders,
+	        link_orders_code,
+	        wiki_ref,
+	        acpt_org_code,
+	        acpt_org_name,
+	        handle_way,
+	        external_handle_way,
+	        direct_feed,
+	        direct_feed_handler,
+	        direct_feed_time,
+	        images,
+	        flag_vaild,
+	        invalid_note,
+	        invalid_time,
+	        invalid_user_name,
+	        status,
+	        tag_apply,
+	        tag_delay,
+	        tag_doing,
+	        tag_resp,
+	        tag_done,
+	        tag_check,
+	        tag_chk_tel,
+	        tag_redo
+		from
+        	ec_order
+    </sql>
+
+    <select id="selectEcOrderById" parameterType="long" resultMap="EcOrderDTOResult">
+		<include refid="selectEcOrder"/>
+		where
+        	order_id = #{orderId}
+    </select>
+
+    <select id="selectEcOrderList" parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderDTO" resultMap="EcOrderDTOResult">
+        <include refid="selectEcOrder"/>
+        <where>
+		<if test="orderId != null "> and order_id = #{orderId}</if>
+		<if test="orderCode != null  and orderCode != ''"> and order_code = #{orderCode}</if>
+		<if test="issueOrigin != null  and issueOrigin != ''"> and issue_origin = #{issueOrigin}</if>
+		<if test="issueTitle != null  and issueTitle != ''"> and issue_title = #{issueTitle}</if>
+		<if test="issueContent != null  and issueContent != ''"> and issue_content = #{issueContent}</if>
+		<if test="applicantType != null  and applicantType != ''"> and applicant_type = #{applicantType}</if>
+		<if test="applicantName != null  and applicantName != ''"> and applicant_name = #{applicantName}</if>
+		<if test="applicantGender != null  and applicantGender != ''"> and applicant_gender = #{applicantGender}</if>
+		<if test="applicantHomeaddr != null  and applicantHomeaddr != ''"> and applicant_homeaddr = #{applicantHomeaddr}</if>
+		<if test="applicantPhone != null  and applicantPhone != ''"> and applicant_phone = #{applicantPhone}</if>
+		<if test="applicantGrid != null  and applicantGrid != ''"> and applicant_grid = #{applicantGrid}</if>
+		<if test="applicantDistrict != null  and applicantDistrict != ''"> and applicant_district = #{applicantDistrict}</if>
+		<if test="sceneAddr != null  and sceneAddr != ''"> and scene_addr = #{sceneAddr}</if>
+		<if test="sceneAddrGrid != null  and sceneAddrGrid != ''"> and scene_addr_grid = #{sceneAddrGrid}</if>
+		<if test="sceneDistrict != null  and sceneDistrict != ''"> and scene_district = #{sceneDistrict}</if>
+		<if test="scenePlace != null  and scenePlace != ''"> and scene_place = #{scenePlace}</if>
+		<if test="sceneGeoLat != null "> and scene_geo_lat = #{sceneGeoLat}</if>
+		<if test="sceneGeoLng != null "> and scene_geo_lng = #{sceneGeoLng}</if>
+		<if test="sceneAddrCor != null  and sceneAddrCor != ''"> and scene_addr_cor = #{sceneAddrCor}</if>
+		<if test="sceneGeoLatCor != null "> and scene_geo_lat_cor = #{sceneGeoLatCor}</if>
+		<if test="sceneGeoLngCor != null "> and scene_geo_lng_cor = #{sceneGeoLngCor}</if>
+		<if test="isSecret != null  and isSecret != ''"> and is_secret = #{isSecret}</if>
+		<if test="isRepeat != null  and isRepeat != ''"> and is_repeat = #{isRepeat}</if>
+		<if test="issueType != null  and issueType != ''"> and issue_type = #{issueType}</if>
+		<if test="issueClazz != null  and issueClazz != ''"> and issue_clazz = #{issueClazz}</if>
+		<if test="issueLevel != null  and issueLevel != ''"> and issue_level = #{issueLevel}</if>
+		<if test="deadline != null "> and deadline = #{deadline}</if>
+		<if test="linkOrders != null  and linkOrders != ''"> and link_orders = #{linkOrders}</if>
+		<if test="linkOrdersCode != null  and linkOrdersCode != ''"> and link_orders_code = #{linkOrdersCode}</if>
+		<if test="wikiRef != null  and wikiRef != ''"> and wiki_ref = #{wikiRef}</if>
+		<if test="acptOrgCode != null  and acptOrgCode != ''"> and acpt_org_code = #{acptOrgCode}</if>
+		<if test="acptOrgName != null  and acptOrgName != ''"> and acpt_org_name = #{acptOrgName}</if>
+		<if test="handleWay != null  and handleWay != ''"> and handle_way = #{handleWay}</if>
+		<if test="externalHandleWay != null  and externalHandleWay != ''"> and external_handle_way = #{externalHandleWay}</if>
+		<if test="directFeed != null  and directFeed != ''"> and direct_feed = #{directFeed}</if>
+		<if test="directFeedHandler != null  and directFeedHandler != ''"> and direct_feed_handler = #{directFeedHandler}</if>
+		<if test="directFeedTime != null "> and direct_feed_time = #{directFeedTime}</if>
+		<if test="images != null  and images != ''"> and images = #{images}</if>
+		<if test="flagVaild != null  and flagVaild != ''"> and flag_vaild = #{flagVaild}</if>
+		<if test="invalidNote != null  and invalidNote != ''"> and invalid_note = #{invalidNote}</if>
+		<if test="invalidTime != null "> and invalid_time = #{invalidTime}</if>
+		<if test="invalidUserName != null  and invalidUserName != ''"> and invalid_user_name = #{invalidUserName}</if>
+		<if test="status != null  and status != ''"> and status = #{status}</if>
+		<if test="tagApply != null  and tagApply != ''"> and tag_apply = #{tagApply}</if>
+		<if test="tagDelay != null  and tagDelay != ''"> and tag_delay = #{tagDelay}</if>
+		<if test="tagDoing != null  and tagDoing != ''"> and tag_doing = #{tagDoing}</if>
+		<if test="tagResp != null  and tagResp != ''"> and tag_resp = #{tagResp}</if>
+		<if test="tagDone != null  and tagDone != ''"> and tag_done = #{tagDone}</if>
+		<if test="tagCheck != null  and tagCheck != ''"> and tag_check = #{tagCheck}</if>
+		<if test="tagChkTel != null  and tagChkTel != ''"> and tag_chk_tel = #{tagChkTel}</if>
+		<if test="tagRedo != null  and tagRedo != ''"> and tag_redo = #{tagRedo}</if>
+        </where>
+    </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/service/EcOrderService.java b/src/main/java/org/springblade/modules/eCallEventTwo/service/EcOrderService.java
new file mode 100644
index 0000000..4038062
--- /dev/null
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/service/EcOrderService.java
@@ -0,0 +1,65 @@
+package org.springblade.modules.eCallEventTwo.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.eCallEventTwo.dto.EcOrderDTO;
+import org.springblade.modules.eCallEventTwo.entity.EcOrder;
+
+import java.util.List;
+
+/**
+ * EcOrderService接口
+ *
+ * @author ${context.author}
+ * @date 2024-05-27 16:26:59
+ */
+public interface EcOrderService extends IService<EcOrder> {
+	/**
+	 * 查询工单
+	 *
+	 * @param orderId 工单ID
+	 * @return 工单
+	 */
+	public EcOrderDTO selectEcOrderById(Long orderId);
+
+	/**
+	 * 查询工单列表
+	 *
+	 * @param ecOrderDTO 工单
+	 * @return 工单集合
+	 */
+	public List<EcOrderDTO> selectEcOrderList(EcOrderDTO ecOrderDTO);
+
+	/**
+	 * 新增工单
+	 *
+	 * @param ecOrderDTO 工单
+	 * @return 结果
+	 */
+	public int insertEcOrder(EcOrderDTO ecOrderDTO);
+
+	/**
+	 * 修改工单
+	 *
+	 * @param ecOrderDTO 工单
+	 * @return 结果
+	 */
+	public int updateEcOrder(EcOrderDTO ecOrderDTO);
+
+	/**
+	 * 批量删除工单
+	 *
+	 * @param ids 需要删除的数据ID
+	 * @return 结果
+	 */
+	public int deleteEcOrderByIds(String ids);
+
+	/**
+	 * 删除工单信息
+	 *
+	 * @param orderId 工单ID
+	 * @return 结果
+	 */
+	public int deleteEcOrderById(Long orderId);
+
+	boolean SynchronizeData();
+}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java b/src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
new file mode 100644
index 0000000..c2a9d18
--- /dev/null
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
@@ -0,0 +1,118 @@
+package org.springblade.modules.eCallEventTwo.service.impl;
+
+import cn.hutool.core.convert.Convert;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.eCallEventTwo.dto.EcOrderDTO;
+import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
+import org.springblade.modules.eCallEventTwo.entity.EcOrder;
+import org.springblade.modules.eCallEventTwo.mapper.EcOrderMapper;
+import org.springblade.modules.eCallEventTwo.service.EcOrderService;
+import org.springblade.modules.eCallEventTwo.service.IECallEventTwoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * EcOrderService业务层处理
+ *
+ * @author ${context.author}
+ * @date 2024-05-27 16:26:59
+ */
+@Service
+public class EcOrderServiceImpl extends ServiceImpl<EcOrderMapper, EcOrder> implements EcOrderService {
+
+	@Autowired
+	private IECallEventTwoService ecOrderService;
+
+	/**
+	 * 查询工单
+	 *
+	 * @param orderId 工单ID
+	 * @return 工单
+	 */
+	@Override
+	public EcOrderDTO selectEcOrderById(Long orderId) {
+		return this.baseMapper.selectEcOrderById(orderId);
+	}
+
+	/**
+	 * 查询工单列表
+	 *
+	 * @param ecOrderDTO 工单
+	 * @return 工单集合
+	 */
+	@Override
+	public List<EcOrderDTO> selectEcOrderList(EcOrderDTO ecOrderDTO) {
+		return this.baseMapper.selectEcOrderList(ecOrderDTO);
+	}
+
+	/**
+	 * 新增工单
+	 *
+	 * @param ecOrderDTO 工单
+	 * @return 结果
+	 */
+	@Override
+	public int insertEcOrder(EcOrderDTO ecOrderDTO) {
+		return this.baseMapper.insert(ecOrderDTO);
+	}
+
+	/**
+	 * 修改工单
+	 *
+	 * @param ecOrderDTO 工单
+	 * @return 结果
+	 */
+	@Override
+	public int updateEcOrder(EcOrderDTO ecOrderDTO) {
+		return this.baseMapper.updateById(ecOrderDTO);
+	}
+
+	/**
+	 * 删除工单对象
+	 *
+	 * @param ids 需要删除的数据ID
+	 * @return 结果
+	 */
+	@Override
+	public int deleteEcOrderByIds(String ids) {
+		return this.removeByIds(Arrays.asList(Convert.toStrArray(ids))) ? 1 : 0;
+	}
+
+	/**
+	 * 删除工单信息
+	 *
+	 * @param orderId 工单ID
+	 * @return 结果
+	 */
+	@Override
+	public int deleteEcOrderById(Long orderId) {
+		return this.removeById(orderId) ? 1 : 0;
+	}
+
+	@Override
+	public boolean SynchronizeData() {
+		processPages(100);
+		return true;
+	}
+
+	public void processPages(int pageSize) {
+		long count = count(new QueryWrapper<>());
+		int totalPages = (int) Math.ceil((double) count / pageSize); // 计算总页数
+
+		for (int pageNum = 1; pageNum <= totalPages; pageNum++) {
+			Page<EcOrder> page = new Page<>(pageNum, pageSize);
+			IPage<EcOrder> resultPage = baseMapper.selectPage(page, new QueryWrapper<>());
+			List<EcOrder> records = resultPage.getRecords();
+			List<ECallEventTwoEntity> recordEntityList = BeanUtil.copy(records, ECallEventTwoEntity.class);
+			boolean b = ecOrderService.saveOrUpdateBatch(recordEntityList);
+			System.out.println("更新第" + pageNum + "页" + b);
+		}
+	}
+}
diff --git a/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java b/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
index edbef23..4206d72 100644
--- a/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
+++ b/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
@@ -7,6 +7,7 @@
 import com.xxl.job.core.handler.annotation.XxlJob;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springblade.modules.eCallEventTwo.service.EcOrderService;
 import org.springblade.modules.task.service.ITaskService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -33,6 +34,9 @@
 
     @Autowired
 	private ITaskService taskService;
+
+	@Autowired
+	private EcOrderService ecOrderService;
 
     /**
      * 三色定时任务
@@ -75,4 +79,18 @@
 		XxlJobHelper.log("结束自动创建任务...");
 	}
 
+
+	/**
+	 * 创建校园安全发送短信定时任务
+	 */
+	@XxlJob("ehjbJobHandler")
+	public void ehjbJobHandler (){
+		XxlJobHelper.log("开始执行任务...E呼即办定时任务");
+		// 创建居住证发送短信定时任务
+		boolean result = ecOrderService.SynchronizeData();
+		XxlJobHelper.log("任务响应结果..." + result);
+		// 创建居住证发送短信定时任务
+		XxlJobHelper.log("E呼即办定时任务-结束自动创建任务...");
+	}
+
 }
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index 468a79d..5e6d29f 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -13,10 +13,26 @@
     #cluster:
     #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
     #  commandTimeout: 5000
+#  datasource:
+#    url: jdbc:mysql://172.16.50.240:3306/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+#    username: root
+#    password: 1qaz@WSX3edc
   datasource:
-    url: jdbc:mysql://172.16.50.240:3306/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
-    username: root
-    password: 1qaz@WSX3edc
+    #使用阿里的Druid
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      datasource:
+        master:
+          url: jdbc:mysql://172.16.50.240:3306/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+          username: root
+          password: 1qaz@WSX3edc
+        slave_1:
+          url: jdbc:mysql://172.16.50.60:3306/odsehjb?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+          username: jczz
+          password: jczz!20@24#
 
 #第三方登陆
 social:
diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
index 9623573..a249842 100644
--- a/src/main/resources/application-test.yml
+++ b/src/main/resources/application-test.yml
@@ -13,10 +13,27 @@
     #cluster:
     #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
     #  commandTimeout: 5000
+#  datasource:
+#    url: jdbc:mysql://127.0.0.1:3306/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+#    username: root
+#    password: root
   datasource:
-    url: jdbc:mysql://172.16.50.240:3306/jczz_test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
-    username: root
-    password: 1qaz@WSX3edc
+    #使用阿里的Druid
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      datasource:
+        master:
+          url: jdbc:mysql://127.0.0.1:3306/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+          username: root
+          password: root
+        slave_1:
+          url: jdbc:mysql://127.0.0.1:3306/jczz_test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+          username: root
+          password: root
+
 
 #第三方登陆
 social:
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 8de1b14..9cb808d 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -16,7 +16,7 @@
   profiles:
     active: test
   datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
+#    driver-class-name: com.mysql.cj.jdbc.Driver
     #driver-class-name: org.postgresql.Driver
     #driver-class-name: oracle.jdbc.OracleDriver
     #driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
@@ -252,6 +252,7 @@
       - /blade-policeAlarmRecords/policeAlarmRecords/save
       - /blade-smsSend/smsSend/send
       - /blade-system/user/register-user
+      - /blade-eCallEventTwo/eCallEventTwo/synchronizeData
 #      - /blade-householdLabel/**
 #      - /blade-system/**
 #      - /blade-doorplateAddress/doorplateAddress/**

--
Gitblit v1.9.3