refactor: 重构

- 拆分module-common模块,计划包含公共实体类等
- 从檀树岗迁移数据同步代码到service-datasync模块
master
李一帆 2025-11-04 16:14:38 +08:00
parent 4cd8a1dcb8
commit 284887bfcb
346 changed files with 4432 additions and 882 deletions

27
module-common/pom.xml Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.gunshi</groupId>
<artifactId>gunshi-project-hsz-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<artifactId>gunshi-project-hsz-common</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,11 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskByB;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskByBMapper extends BaseMapper<JcskByB> {
}

View File

@ -0,0 +1,12 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskByR;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskByRMapper extends BaseMapper<JcskByR> {
}

View File

@ -0,0 +1,11 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskGnssB;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskGnssBMapper extends BaseMapper<JcskGnssB> {
}

View File

@ -0,0 +1,11 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskGnssR;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskGnssRMapper extends BaseMapper<JcskGnssR> {
}

View File

@ -0,0 +1,11 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskSlB;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskSlBMapper extends BaseMapper<JcskSlB> {
}

View File

@ -0,0 +1,11 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskSlR;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskSlRMapper extends BaseMapper<JcskSlR> {
}

View File

@ -0,0 +1,11 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskSyB;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskSyBMapper extends BaseMapper<JcskSyB> {
}

View File

@ -0,0 +1,11 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.JcskSyR;
import org.apache.ibatis.annotations.Mapper;
@DS("tsg")
@Mapper
public interface JcskSyRMapper extends BaseMapper<JcskSyR> {
}

View File

@ -0,0 +1,10 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.StFlowR;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface StFlowRMapper extends BaseMapper<StFlowR> {
}

View File

@ -1,7 +1,7 @@
package com.gunshi.project.hsz.mapper; package com.gunshi.project.hsz.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.model.StStbprpBElem; import com.gunshi.project.hsz.common.model.StStbprpBElem;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**

View File

@ -0,0 +1,32 @@
package com.gunshi.project.hsz.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.StStbprpB;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* : sttp
* author: xusan
* date: 2024-07-08 15:44:08
*/
@Mapper
public interface StStbprpBMapper extends BaseMapper<StStbprpB> {
@Select("""
select * from public.st_stbprp_b b
join public.st_stbprp_b_elem e
on b.stcd = e.stcd
where e.elem='drp'
""")
List<StStbprpB> getPptnStations();
@Select("""
select * from public.st_stbprp_b b
where b.sttp='RR'
""")
List<StStbprpB> getRsvrStations();
}

View File

@ -0,0 +1,211 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.math.BigDecimal;
/**
*
* WaterDevice
* rdevice_id
* @see com.gunshi.project.hsz.datasync.entity.jcsk.WaterDevice
*/
@Data
@TableName("jcsk_by_b")
@IgnoreAutoMapperAndDao
public class JcskByB {
/**
*
*/
@TableField("id")
private Integer id;
/**
*
*/
@TableField("name")
private String name;
/**
*
*/
@TableField("code")
private String code;
/**
*
*/
@TableField("mn_no")
private String mnNo;
/**
* id
*/
@TableField("factory_id")
private Integer factoryId;
/**
* id
*/
@TableField("station_id")
private Integer stationId;
/**
*
*/
@TableField("station_name")
private String stationName;
/**
*
*/
@TableField("created_at")
private Integer createdAt;
/**
* id
*/
@TableField("created_user")
private Integer createdUser;
/**
*
*/
@TableField("updated_at")
private Integer updatedAt;
/**
* id
*/
@TableField("updated_user")
private Integer updatedUser;
/**
*
*/
@TableField("status")
private Integer status;
/**
*
*/
@TableField("lat")
private BigDecimal lat;
/**
*
*/
@TableField("lon")
private BigDecimal lon;
/**
* id
*/
@TableField("province_id")
private Long provinceId;
/**
*
*/
@TableField("province_name")
private String provinceName;
/**
* id
*/
@TableField("city_id")
private Long cityId;
/**
*
*/
@TableField("city_name")
private String cityName;
/**
*
*/
@TableField("area_name")
private String areaName;
/**
* id
*/
@TableField("area_id")
private Long areaId;
/**
*
*/
@TableField("type")
private Integer type;
/**
*
*/
@TableField("send_type")
private String sendType;
/**
*
*/
@TableField("contact")
private String contact;
/**
*
*/
@TableField("telephone")
private String telephone;
/**
*
*/
@TableField("river")
private String river;
/**
*
*/
@TableField("address")
private String address;
/**
*
*/
@TableField("model")
private String model;
/**
*
*/
@TableField("remark")
private String remark;
/**
*
*/
@TableField("communication_type")
private Integer communicationType;
/**
*
*/
@TableField("image_url")
private String imageUrl;
/**
* ip
*/
@TableField("video_ip")
private String videoIp;
/**
* id
*/
@TableField("video_id")
private String videoId;
}

View File

@ -0,0 +1,109 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.time.LocalDateTime;
/**
*
* WaterDataTermites
* nmNo = JcskByB.
* @see com.gunshi.project.hsz.datasync.entity.jcsk.WaterDataTermites
*/
@Data
@TableName("jcsk_by_r")
@IgnoreAutoMapperAndDao
public class JcskByR {
/**
*
*/
@TableField("mn_no")
private String mnNo;
/**
* ,1
*/
@TableField("status")
private Integer status;
/**
*
*/
@TableField("electricity")
private Integer electricity;
/**
*
*/
@TableField("\"order\"")
private String order;
/**
*
*/
@TableField("created_at")
private LocalDateTime createdAt;
/**
*
*/
@TableField("ob_time")
private String obTime;
/**
* 2
*/
@TableField("ob_date")
private LocalDateTime obDate;
/**
* id
*/
@TableField("id")
private Integer id;
/**
* id
*/
@TableField("station_id")
private Integer stationId;
/**
*
*/
@TableField("station_name")
private String stationName;
/**
* id
*/
@TableField("device_id")
private Integer deviceId;
/**
*
*/
@TableField("device_name")
private String deviceName;
/**
*
*/
@TableField("task_status")
private String taskStatus;
/**
* id
*/
@TableField("task_id")
private String taskId;
/**
*
*/
@TableField("receive_type")
private Short receiveType;
}

View File

@ -0,0 +1,53 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
/**
*
* AttWyCdBase
* rrscdcd
* @see com.gunshi.project.hsz.datasync.entity.jcsk.AttWyCdBase
*/
@Data
@TableName("jcsk_gnss_b")
@IgnoreAutoMapperAndDao
public class JcskGnssB {
/**
*
*/
@TableField("cd")
private String cd;
/**
*
*/
@TableField("cd_nm")
private String cdNm;
/**
*
*/
@TableField("ch")
private String ch;
/**
* (sl/wy/sy)
*/
@TableField("cd_type")
private String cdType;
/**
*
*/
@TableField("res_cd")
private String resCd;
/**
*
*/
@TableField("device_status")
private String deviceStatus;
}

View File

@ -0,0 +1,67 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
*
* AttMqttCalcData
* @see com.gunshi.project.hsz.datasync.entity.jcsk.AttMqttCalcData
*/
@Data
@TableName("jcsk_gnss_r")
@IgnoreAutoMapperAndDao
public class JcskGnssR {
/**
*
*/
@TableField("res_cd")
private String resCd;
/**
*
*/
@TableField("cd")
private String cd;
/**
* e(mm)
*/
@TableField("de")
private BigDecimal de;
/**
* n(mm)
*/
@TableField("dn")
private BigDecimal dn;
/**
* u(mm)
*/
@TableField("du")
private BigDecimal du;
/**
*
*/
@TableField("alt")
private BigDecimal alt;
/**
*
*/
@TableField("tm")
private LocalDateTime tm;
/**
*
*/
@TableField("update_tm")
private LocalDateTime updateTm;
}

View File

@ -0,0 +1,111 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
*
* DsmSpgSpqnmp
* rrscd,stcd,mpcd
* @see com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSpqnmp
*/
@Data
@TableName("jcsk_sl_b")
@IgnoreAutoMapperAndDao
public class JcskSlB {
/**
*
*/
@TableField("rscd")
private String rscd;
/**
*
*/
@TableField("hycncd")
private String hycncd;
/**
*
*/
@TableField("mpcd")
private String mpcd;
/**
* rtu
*/
@TableField("stcd")
private String stcd;
/**
*
*/
@TableField("ch")
private String ch;
/**
* m
*/
@TableField("ofax")
private BigDecimal ofax;
/**
* m
*/
@TableField("el")
private BigDecimal el;
/**
*
*/
@TableField("indt")
private LocalDate indt;
/**
*
*/
@TableField("dvcd")
private String dvcd;
/**
*
*/
@TableField("lgtd")
private BigDecimal lgtd;
/**
*
*/
@TableField("lttd")
private BigDecimal lttd;
/**
*
*/
@TableField("rm")
private String rm;
/**
*
*/
@TableField("dtuptm")
private LocalDateTime dtuptm;
/**
*
*/
@TableField("dm")
private String dm;
/**
*
*/
@TableField("is_tb")
private String isTb;
}

View File

@ -0,0 +1,63 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
*
* DsmSpgSpqnNormal
* @see com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSpqn
*/
@Data
@TableName("jcsk_sl_r")
@IgnoreAutoMapperAndDao
public class JcskSlR {
/**
*
*/
@TableField("rscd")
private String rscd;
/**
*
*/
@TableField("hycncd")
private String hycncd;
/**
*
*/
@TableField("mpcd")
private String mpcd;
/**
*
*/
@TableField("mstm")
private LocalDateTime mstm;
/**
*
*/
@TableField("tm")
private BigDecimal tm;
/**
* l/s
*/
@TableField("spqn")
private BigDecimal spqn;
/**
* l/s
*/
@TableField("stspqn")
private BigDecimal stspqn;
}

View File

@ -0,0 +1,135 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
*
* DsmSpgSpprmp
* rrscd,stcd,mpcd
* @see com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSpprmp
*/
@Data
@TableName("jcsk_sy_b")
@IgnoreAutoMapperAndDao
public class JcskSyB {
/**
*
*/
@TableField("rscd")
private String rscd;
/**
* rtu
*/
@TableField("stcd")
private String stcd;
/**
*
*/
@TableField("hycncd")
private String hycncd;
/**
*
*/
@TableField("mpcd")
private String mpcd;
/**
*
*/
@TableField("ch")
private String ch;
/**
* m
*/
@TableField("ofax")
private BigDecimal ofax;
/**
* m
*/
@TableField("el")
private BigDecimal el;
/**
*
*/
@TableField("msps")
private String msps;
/**
* m
*/
@TableField("pmbtel")
private BigDecimal pmbtel;
/**
* m
*/
@TableField("pmtpel")
private BigDecimal pmtpel;
/**
*
*/
@TableField("dsel")
private BigDecimal dsel;
/**
*
*/
@TableField("indt")
private LocalDate indt;
/**
*
*/
@TableField("dvcd")
private String dvcd;
/**
*
*/
@TableField("lgtd")
private BigDecimal lgtd;
/**
*
*/
@TableField("lttd")
private BigDecimal lttd;
/**
*
*/
@TableField("rm")
private String rm;
/**
*
*/
@TableField("dtuptm")
private LocalDateTime dtuptm;
/**
*
*/
@TableField("dm")
private String dm;
/**
*
*/
@TableField("is_tb")
private String isTb;
}

View File

@ -0,0 +1,67 @@
package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
*
* DsmSpgSpprNormal
* @see com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSppr
*/
@Data
@TableName("jcsk_sy_r")
@IgnoreAutoMapperAndDao
public class JcskSyR {
/**
*
*/
@TableField("rscd")
private String rscd;
/**
* rtu
*/
@TableField("stcd")
private String stcd;
/**
*
*/
@TableField("hycncd")
private String hycncd;
/**
*
*/
@TableField("mpcd")
private String mpcd;
/**
*
*/
@TableField("mstm")
private LocalDateTime mstm;
/**
*
*/
@TableField("tm")
private BigDecimal tm;
/**
* m
*/
@TableField("spprwl")
private BigDecimal spprwl;
/**
*
*/
@TableField("update_tm")
private LocalDateTime updateTm;
}

View File

@ -0,0 +1,67 @@
package com.gunshi.project.hsz.common.model;
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 com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-16
*/
@Data
@TableName("st_flow_r")
@IgnoreAutoMapperAndDao
public class StFlowR {
/**
* id
*/
@TableId(value = "id", type = IdType.NONE)
private Integer id;
/**
*
*/
@TableField("stcd")
private String stcd;
/**
*
*/
@TableField("tm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime tm;
/**
* m³/s
*/
@TableField("inq")
private BigDecimal inq;
/**
* m³/s
*/
@TableField("q")
private BigDecimal q;
/**
* m³/s
*/
@TableField("otq")
private BigDecimal otq;
/**
*
*/
@TableField("crtime")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime crtime;
}

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.model; package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
@ -6,9 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import com.gunshi.project.hsz.common.validate.markers.Update;
import com.gunshi.core.dateformat.DateFormatString; import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
@ -25,6 +26,7 @@ import java.util.Date;
@Schema(description="sttp 以水利标准来") @Schema(description="sttp 以水利标准来")
@Data @Data
@TableName("public.st_stbprp_b") @TableName("public.st_stbprp_b")
@IgnoreAutoMapperAndDao
public class StStbprpB implements Serializable { public class StStbprpB implements Serializable {

View File

@ -1,10 +1,11 @@
package com.gunshi.project.hsz.model; package com.gunshi.project.hsz.common.model;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.db.annotation.IgnoreAutoMapperAndDao;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
@ -20,6 +21,7 @@ import java.io.Serializable;
@Schema(description="测站监测值类型") @Schema(description="测站监测值类型")
@Data @Data
@TableName("public.st_stbprp_b_elem") @TableName("public.st_stbprp_b_elem")
@IgnoreAutoMapperAndDao
public class StStbprpBElem implements Serializable { public class StStbprpBElem implements Serializable {

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.validate.markers; package com.gunshi.project.hsz.common.validate.markers;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.validate.markers; package com.gunshi.project.hsz.common.validate.markers;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.validate.markers; package com.gunshi.project.hsz.common.validate.markers;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.validate.markers; package com.gunshi.project.hsz.common.validate.markers;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.validate.markers; package com.gunshi.project.hsz.common.validate.markers;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.gunshi.project.hsz.validate.markers; package com.gunshi.project.hsz.common.validate.markers;
/** /**
* *

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gunshi.project.hsz.mapper.StStbprpBElemMapper"> <mapper namespace="com.gunshi.project.hsz.common.mapper.StStbprpBElemMapper">
</mapper> </mapper>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gunshi.project.hsz.mapper.StStbprpBMapper"> <mapper namespace="com.gunshi.project.hsz.common.mapper.StStbprpBMapper">
</mapper> </mapper>

View File

@ -20,6 +20,9 @@
黑石咀水库系统 - 父级POM 黑石咀水库系统 - 父级POM
</description> </description>
<modules>
<module>../module-common</module>
</modules>
<properties> <properties>
<java.version>21</java.version> <java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source> <maven.compiler.source>21</maven.compiler.source>
@ -44,6 +47,12 @@
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency>
<groupId>com.gunshi</groupId>
<artifactId>gunshi-project-hsz-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- Gunshi 项目依赖 --> <!-- Gunshi 项目依赖 -->
<dependency> <dependency>
<groupId>com.gunshi</groupId> <groupId>com.gunshi</groupId>
@ -131,6 +140,11 @@
</dependency> </dependency>
<!-- MyBatis Plus --> <!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId> <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
@ -266,15 +280,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.gunshi.project.hsz.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
@ -285,6 +290,12 @@
<id>nexus</id> <id>nexus</id>
<name>Nexus public</name> <name>Nexus public</name>
<url>http://local.gunshiiot.com:8081/repository/maven-public/</url> <url>http://local.gunshiiot.com:8081/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository> </repository>
</repositories> </repositories>

15
pom.xml
View File

@ -17,9 +17,13 @@
黑石咀水库系统 黑石咀水库系统
</description> </description>
<!-- 属性继承自parent项目 --> <!-- 属性继承自parent项目 -->
<!-- 依赖版本管理继承自parent项目 --> <!-- 依赖版本管理继承自parent项目 -->
<dependencies> <dependencies>
<dependency>
<groupId>com.gunshi</groupId>
<artifactId>gunshi-project-hsz-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>com.gunshi</groupId> <groupId>com.gunshi</groupId>
<artifactId>gunshi-db</artifactId> <artifactId>gunshi-db</artifactId>
@ -145,6 +149,15 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.gunshi.project.hsz.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

45
service-datasync/pom.xml Normal file
View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.gunshi</groupId>
<artifactId>gunshi-project-hsz-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<artifactId>gunshi-project-hsz-datasync</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<dameng.version>8.1.2.114</dameng.version>
</properties>
<dependencies>
<dependency>
<groupId>com.gunshi</groupId>
<artifactId>gunshi-project-hsz-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>${dameng.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,26 @@
package com.gunshi.project.hsz.datasync;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
*
*/
@SpringBootApplication
@EnableScheduling
@MapperScan({
"com.gunshi.project.tsg.datasync.mapper",
"com.gunshi.project.tsg.datasync.mapper.jcsk",
"com.gunshi.project.tsg.datasync.rsvrWaterLevel",
"com.gunshi.project.tsg.datasync.rainfall",
"com.gunshi.project.tsg.datasync.gate",
"com.gunshi.project.tsg.datasync.riverWaterLevel",
})
public class Main {
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}

View File

@ -0,0 +1,174 @@
package com.gunshi.project.hsz.datasync.config;
import com.gunshi.project.hsz.datasync.service.impl.SyncByRService;
import com.gunshi.project.hsz.datasync.service.impl.SyncGnssRService;
import com.gunshi.project.hsz.datasync.service.impl.SyncSlRService;
import com.gunshi.project.hsz.datasync.service.impl.SyncSyRService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import java.util.concurrent.Executor;
@Configuration
@EnableScheduling
@Slf4j
public class SyncTaskScheduler implements ApplicationRunner {
@Autowired
private SyncByRService syncByRService;
@Autowired
private SyncGnssRService syncGnssRService;
@Autowired
private SyncSlRService syncSlRService;
@Autowired
private SyncSyRService syncSyRService;
private boolean isApplicationReady = false;
// 任务执行状态标志,确保每个任务串行执行
private volatile boolean isSyncByRRunning = false;
private volatile boolean isSyncGnssRRunning = false;
private volatile boolean isSyncSlRRunning = false;
private volatile boolean isSyncSyRRunning = false;
/**
* 线
*/
public Executor taskScheduler() {
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
scheduler.setPoolSize(4); // 4个线程每个服务一个
scheduler.setThreadNamePrefix("SyncTask-");
scheduler.initialize();
return scheduler;
}
/**
*
*/
@Override
public void run(ApplicationArguments args) {
isApplicationReady = true;
log.info("应用初始化完成,定时任务将在下次调度时开始执行");
}
/**
* - 5
*
*/
@Scheduled(cron = "0 */5 * * * ?")
public void scheduleSyncByR() {
if (!isApplicationReady) {
return;
}
// 检查任务是否正在运行,如果是则跳过本次执行
if (isSyncByRRunning) {
log.info("白蚁数据同步任务正在执行中,跳过本次调度");
return;
}
try {
isSyncByRRunning = true; // 标记任务开始执行
log.info("开始执行白蚁数据同步任务");
syncByRService.syncData();
log.info("白蚁数据同步任务执行完成");
} catch (Exception e) {
log.error("白蚁数据同步任务执行异常", e);
} finally {
isSyncByRRunning = false; // 无论成功失败,都标记任务执行完毕
}
}
/**
* - 15
*
*/
@Scheduled(cron = "0 */15 * * * ?")
public void scheduleSyncGnssR() {
if (!isApplicationReady) {
return;
}
// 检查任务是否正在运行,如果是则跳过本次执行
if (isSyncGnssRRunning) {
log.info("位移数据同步任务正在执行中,跳过本次调度");
return;
}
try {
isSyncGnssRRunning = true; // 标记任务开始执行
log.info("开始执行位移数据同步任务");
syncGnssRService.syncData();
log.info("位移数据同步任务执行完成");
} catch (Exception e) {
log.error("位移数据同步任务执行异常", e);
} finally {
isSyncGnssRRunning = false; // 无论成功失败,都标记任务执行完毕
}
}
/**
* - 15
*
*/
@Scheduled(cron = "0 */15 * * * ?")
public void scheduleSyncSlR() {
if (!isApplicationReady) {
return;
}
// 检查任务是否正在运行,如果是则跳过本次执行
if (isSyncSlRRunning) {
log.info("渗流量数据同步任务正在执行中,跳过本次调度");
return;
}
try {
isSyncSlRRunning = true; // 标记任务开始执行
log.info("开始执行渗流量数据同步任务");
syncSlRService.syncData();
log.info("渗流量数据同步任务执行完成");
} catch (Exception e) {
log.error("渗流量数据同步任务执行异常", e);
} finally {
isSyncSlRRunning = false; // 无论成功失败,都标记任务执行完毕
}
}
/**
* - 15
*
*/
@Scheduled(cron = "0 */15 * * * ?")
public void scheduleSyncSyR() {
if (!isApplicationReady) {
return;
}
// 检查任务是否正在运行,如果是则跳过本次执行
if (isSyncSyRRunning) {
log.info("渗压数据同步任务正在执行中,跳过本次调度");
return;
}
try {
isSyncSyRRunning = true; // 标记任务开始执行
log.info("开始执行渗压数据同步任务");
syncSyRService.syncData();
log.info("渗压数据同步任务执行完成");
} catch (Exception e) {
log.error("渗压数据同步任务执行异常", e);
} finally {
isSyncSyRRunning = false; // 无论成功失败,都标记任务执行完毕
}
}
}

View File

@ -0,0 +1,55 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskGnssR;
import lombok.Data;
import java.math.BigDecimal;
/**
* ()
* SJZT_MD.att_mqtt_calc_data_normal
* jcsk_gnss_r
* @see AttWyCdBase
* @see JcskGnssR
*/
@Data
@TableName("SJZT_MD.\"att_mqtt_calc_data\"")
public class AttMqttCalcData {
/**
*
*/
@TableField("\"station_code\"")
private String stationCode;
/**
* e(mm)
*/
@TableField("\"de\"")
private BigDecimal de;
/**
* n(mm)
*/
@TableField("\"dn\"")
private BigDecimal dn;
/**
* u(mm)
*/
@TableField("\"du\"")
private BigDecimal du;
/**
*
*/
@TableField("\"alt\"")
private BigDecimal alt;
/**
*
*/
@TableField("\"calc_time\"")
private Long calcTime;
}

View File

@ -0,0 +1,53 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskGnssB;
import lombok.Data;
/**
* ()
* SJZT_MD.att_wy_cd_base
* jcsk_gnss_b
* @see JcskGnssB
* @see AttMqttCalcData
*/
@Data
@TableName("SJZT_MD.\"att_wy_cd_base\"")
public class AttWyCdBase {
/**
*
*/
@TableField("\"cd\"")
private String cd;
/**
*
*/
@TableField("\"cd_nm\"")
private String cdNm;
/**
*
*/
@TableField("\"ch\"")
private String ch;
/**
* (sl/wy/sy)
*/
@TableField("\"cd_type\"")
private String cdType;
/**
*
*/
@TableField("\"res_cd\"")
private String resCd;
/**
*
*/
@TableField("\"device_status\"")
private String deviceStatus;
}

View File

@ -0,0 +1,63 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskSyR;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* ()
* SJZT_ODS.dsm_spg_sppr_normal
* jcsk_sy_r
* @see DsmSpgSpprmp
* @see JcskSyR
*/
@Data
@TableName("SJZT_ODS.\"dsm_spg_sppr\"")
public class DsmSpgSppr {
/**
*
*/
@TableField("\"rscd\"")
private String rscd;
/**
* rtu
*/
@TableField("\"stcd\"")
private String stcd;
/**
*
*/
@TableField("\"hycncd\"")
private String hycncd;
/**
*
*/
@TableField("\"mpcd\"")
private String mpcd;
/**
*
*/
@TableField("\"mstm\"")
private LocalDateTime mstm;
/**
*
*/
@TableField("\"tm\"")
private BigDecimal tm;
/**
* m
*/
@TableField("\"spprwl\"")
private BigDecimal spprwl;
}

View File

@ -0,0 +1,135 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskSyB;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* ()
* SJZT_ODS.dsm_spg_spprmp
* jcsk_sy_b
* @see JcskSyB
* @see DsmSpgSppr
*/
@Data
@TableName("SJZT_ODS.\"dsm_spg_spprmp\"")
public class DsmSpgSpprmp {
/**
*
*/
@TableField("\"rscd\"")
private String rscd;
/**
* rtu
*/
@TableField("\"stcd\"")
private String stcd;
/**
*
*/
@TableField("\"hycncd\"")
private String hycncd;
/**
*
*/
@TableField("\"mpcd\"")
private String mpcd;
/**
*
*/
@TableField("\"ch\"")
private String ch;
/**
* m
*/
@TableField("\"ofax\"")
private BigDecimal ofax;
/**
* m
*/
@TableField("\"el\"")
private BigDecimal el;
/**
*
*/
@TableField("\"msps\"")
private String msps;
/**
* m
*/
@TableField("\"pmbtel\"")
private BigDecimal pmbtel;
/**
* m
*/
@TableField("\"pmtpel\"")
private BigDecimal pmtpel;
/**
*
*/
@TableField("\"dsel\"")
private BigDecimal dsel;
/**
*
*/
@TableField("\"indt\"")
private LocalDate indt;
/**
*
*/
@TableField("\"dvcd\"")
private String dvcd;
/**
*
*/
@TableField("\"lgtd\"")
private BigDecimal lgtd;
/**
*
*/
@TableField("\"lttd\"")
private BigDecimal lttd;
/**
*
*/
@TableField("\"rm\"")
private String rm;
/**
*
*/
@TableField("\"dtuptm\"")
private LocalDateTime dtuptm;
/**
*
*/
@TableField("\"dm\"")
private String dm;
/**
*
*/
@TableField("\"is_tb\"")
private String isTb;
}

View File

@ -0,0 +1,64 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskSlR;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* ()
* SJZT_ODS.dsm_spg_spqn_normal
* jcsk_sl_r
* @see DsmSpgSpqnmp
* @see JcskSlR
*/
@Data
@TableName("SJZT_ODS.\"dsm_spg_spqn\"")
public class DsmSpgSpqn {
/**
*
*/
@TableField("\"rscd\"")
private String rscd;
/**
*
*/
@TableField("\"hycncd\"")
private String hycncd;
/**
*
*/
@TableField("\"mpcd\"")
private String mpcd;
/**
*
*/
@TableField("\"mstm\"")
private LocalDateTime mstm;
/**
*
*/
@TableField("\"tm\"")
private BigDecimal tm;
/**
* l/s
*/
@TableField("\"spqn\"")
private BigDecimal spqn;
/**
* l/s
*/
@TableField("\"stspqn\"")
private BigDecimal stspqn;
}

View File

@ -0,0 +1,111 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskSlB;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* ()
* SJZT_ODS.dsm_spg_spqnmp
* jcsk_sl_b
* @see DsmSpgSpqn
* @see JcskSlB
*/
@Data
@TableName("SJZT_ODS.\"dsm_spg_spqnmp\"")
public class DsmSpgSpqnmp {
/**
*
*/
@TableField("\"rscd\"")
private String rscd;
/**
*
*/
@TableField("\"hycncd\"")
private String hycncd;
/**
*
*/
@TableField("\"mpcd\"")
private String mpcd;
/**
* rtu
*/
@TableField("\"stcd\"")
private String stcd;
/**
*
*/
@TableField("\"ch\"")
private String ch;
/**
* m
*/
@TableField("\"ofax\"")
private BigDecimal ofax;
/**
* m
*/
@TableField("\"el\"")
private BigDecimal el;
/**
*
*/
@TableField("\"indt\"")
private LocalDate indt;
/**
*
*/
@TableField("\"dvcd\"")
private String dvcd;
/**
*
*/
@TableField("\"lgtd\"")
private BigDecimal lgtd;
/**
*
*/
@TableField("\"lttd\"")
private BigDecimal lttd;
/**
*
*/
@TableField("\"rm\"")
private String rm;
/**
*
*/
@TableField("\"dtuptm\"")
private LocalDateTime dtuptm;
/**
*
*/
@TableField("\"dm\"")
private String dm;
/**
*
*/
@TableField("\"is_tb\"")
private String isTb;
}

View File

@ -0,0 +1,57 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
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 lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-16
*/
@Data
@TableName("SJZT_ODS.\"st_flow_r\"")
public class JcskStFlowR {
/**
* id
*/
@TableId(value = "\"id\"", type = IdType.NONE)
private Integer id;
/**
*
*/
@TableField("\"stcd\"")
private String stcd;
/**
*
*/
@TableField("\"tm\"")
private LocalDateTime tm;
/**
* m³/s
*/
@TableField("\"inq\"")
private BigDecimal inq;
/**
* m³/s
*/
@TableField("\"q\"")
private BigDecimal q;
/**
* m³/s
*/
@TableField("\"otq\"")
private BigDecimal otq;
}

View File

@ -0,0 +1,110 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskByR;
import lombok.Data;
import java.time.LocalDateTime;
/**
* ()
* SJZT_ODS.water_data_termites
* jcsk_by_r
* @see WaterDevice
* @see JcskByR
*/
@Data
@TableName("SJZT_ODS.\"water_data_termites\"")
public class WaterDataTermites {
/**
*
*/
@TableField("\"mn_no\"")
private String mnNo;
/**
* ,1
*/
@TableField("\"status\"")
private Integer status;
/**
*
*/
@TableField("\"electricity\"")
private Integer electricity;
/**
*
*/
@TableField("\"order\"")
private String order;
/**
*
*/
@TableField("\"created_at\"")
private LocalDateTime createdAt;
/**
*
*/
@TableField("\"ob_time\"")
private String obTime;
/**
* 2
*/
@TableField("\"ob_date\"")
private LocalDateTime obDate;
/**
* id
*/
@TableId("\"id\"")
private Integer id;
/**
* id
*/
@TableField("\"station_id\"")
private Integer stationId;
/**
*
*/
@TableField("\"station_name\"")
private String stationName;
/**
* id
*/
@TableField("\"device_id\"")
private Integer deviceId;
/**
*
*/
@TableField("\"device_name\"")
private String deviceName;
/**
*
*/
@TableField("\"task_status\"")
private String taskStatus;
/**
* id
*/
@TableField("\"task_id\"")
private String taskId;
/**
*
*/
@TableField("\"receive_type\"")
private Short receiveType;
}

View File

@ -0,0 +1,211 @@
package com.gunshi.project.hsz.datasync.entity.jcsk;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gunshi.project.hsz.common.model.JcskByB;
import lombok.Data;
import java.math.BigDecimal;
/**
* ()
* SJZT_ODS.water_device
* jcsk_by_b
* @see JcskByB
* @see WaterDataTermites
*/
@Data
@TableName("SJZT_ODS.\"water_device\"")
public class WaterDevice {
/**
*
*/
@TableField("\"id\"")
private Integer id;
/**
*
*/
@TableField("\"name\"")
private String name;
/**
*
*/
@TableField("\"code\"")
private String code;
/**
*
*/
@TableField("\"mn_no\"")
private String mnNo;
/**
* id
*/
@TableField("\"factory_id\"")
private Integer factoryId;
/**
* id
*/
@TableField("\"station_id\"")
private Integer stationId;
/**
*
*/
@TableField("\"station_name\"")
private String stationName;
/**
*
*/
@TableField("\"created_at\"")
private Integer createdAt;
/**
* id
*/
@TableField("\"created_user\"")
private Integer createdUser;
/**
*
*/
@TableField("\"updated_at\"")
private Integer updatedAt;
/**
* id
*/
@TableField("\"updated_user\"")
private Integer updatedUser;
/**
*
*/
@TableField("\"status\"")
private Integer status;
/**
*
*/
@TableField("\"lat\"")
private BigDecimal lat;
/**
*
*/
@TableField("\"lon\"")
private BigDecimal lon;
/**
* id
*/
@TableField("\"province_id\"")
private Long provinceId;
/**
*
*/
@TableField("\"province_name\"")
private String provinceName;
/**
* id
*/
@TableField("\"city_id\"")
private Long cityId;
/**
*
*/
@TableField("\"city_name\"")
private String cityName;
/**
*
*/
@TableField("\"area_name\"")
private String areaName;
/**
* id
*/
@TableField("\"area_id\"")
private Long areaId;
/**
*
*/
@TableField("\"type\"")
private Integer type;
/**
*
*/
@TableField("\"send_type\"")
private String sendType;
/**
*
*/
@TableField("\"contact\"")
private String contact;
/**
*
*/
@TableField("\"telephone\"")
private String telephone;
/**
*
*/
@TableField("\"river\"")
private String river;
/**
*
*/
@TableField("\"address\"")
private String address;
/**
*
*/
@TableField("\"model\"")
private String model;
/**
*
*/
@TableField("\"remark\"")
private String remark;
/**
*
*/
@TableField("\"communication_type\"")
private Integer communicationType;
/**
*
*/
@TableField("\"image_url\"")
private String imageUrl;
/**
* ip
*/
@TableField("\"video_ip\"")
private String videoIp;
/**
* id
*/
@TableField("\"video_id\"")
private String videoId;
}

View File

@ -0,0 +1,33 @@
package com.gunshi.project.hsz.datasync.gate;
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 lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-20
*/
@Data
@TableName("st_gate_r")
public class GateOpeningHeight {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@TableField(value="stcd")
private String stcd;
@TableField(value="gtop")
private BigDecimal gtop;
@TableField(value="tm")
private LocalDateTime tm;
@TableField(value="recv_tm")
private LocalDateTime recvTm;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.gate;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("tsg")
@Mapper
public interface GateOpeningHeightMapper extends BaseMapper<GateOpeningHeight> {
}

View File

@ -0,0 +1,62 @@
package com.gunshi.project.hsz.datasync.gate;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-20
*/
@Service
public class GateOpeningHeightService {
@Autowired
private GateOpeningHeightMapper targetMapper;
@Scheduled(cron = "0 */5 * * * ?")
public int syncData() {
LocalDateTime tm = LocalDateTime.now();
//抹去分和秒
tm = tm.withMinute(0).withSecond(0).withNano(0);
GateOpeningHeight target = new GateOpeningHeight();
BigDecimal height;
GateOpeningHeight exist;
target.setStcd("30111");
target.setTm(tm);
height = BigDecimal.valueOf(Math.random() * 10).setScale(0, RoundingMode.HALF_UP);
target.setGtop(height);
target.setRecvTm(tm);
exist = targetMapper.selectOne(
new LambdaQueryWrapper<GateOpeningHeight>()
.eq(GateOpeningHeight::getStcd, target.getStcd())
.eq(GateOpeningHeight::getTm, target.getTm())
);
if (exist == null) {
targetMapper.insert(target);
}
target.setStcd("30222");
target.setTm(tm);
height = BigDecimal.valueOf(Math.random() * 10).setScale(0, RoundingMode.HALF_UP);
target.setGtop(height);
target.setRecvTm(tm);
exist = targetMapper.selectOne(
new LambdaQueryWrapper<GateOpeningHeight>()
.eq(GateOpeningHeight::getStcd, target.getStcd())
.eq(GateOpeningHeight::getTm, target.getTm())
);
if (exist == null) {
targetMapper.insert(target);
}
return 0;
}
}

View File

@ -0,0 +1,15 @@
package com.gunshi.project.hsz.datasync.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.common.model.StFlowR;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-16
*/
@DS("tsg")
@Mapper
public interface StFlowRMapper extends BaseMapper<StFlowR> {
}

View File

@ -0,0 +1,27 @@
package com.gunshi.project.hsz.datasync.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.gunshi.project.hsz.common.model.StStbprpBElem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author lyf
* @since 2025-10-16
*/
@DS("tsg")
@Mapper
public interface StbprpElemMapper {
@Select("""
<script>
select b.stcd, e.elem from st_stbprp_b b
left join st_stbprp_b_elem e on b.stcd=e.stcd
where elem = #{elem}
</script>
""")
List<StStbprpBElem> selectByElem(@Param("elem") String elem);
}

View File

@ -0,0 +1,17 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.AttMqttCalcData;
import org.apache.ibatis.annotations.Mapper;
/**
* AttMqttCalcDataNormalMapper
*/
@DS("jcsk")
@Mapper
public interface AttMqttCalcDataNormalMapper extends BaseMapper<AttMqttCalcData> {
// 可以在这里添加自定义的SQL方法
}

View File

@ -0,0 +1,17 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.AttWyCdBase;
import org.apache.ibatis.annotations.Mapper;
/**
* AttWyCdBaseMapper
*/
@DS("jcsk")
@Mapper
public interface AttWyCdBaseMapper extends BaseMapper<AttWyCdBase> {
// 可以在这里添加自定义的SQL方法
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSppr;
import org.apache.ibatis.annotations.Mapper;
/**
* DsmSpgSpprNormalMapper
*/
@DS("jcsk")
@Mapper
public interface DsmSpgSpprMapper extends BaseMapper<DsmSpgSppr> {
}

View File

@ -0,0 +1,17 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSpprmp;
import org.apache.ibatis.annotations.Mapper;
/**
* DsmSpgSpprmpMapper
*/
@DS("jcsk")
@Mapper
public interface DsmSpgSpprmpMapper extends BaseMapper<DsmSpgSpprmp> {
// 可以在这里添加自定义的SQL方法
}

View File

@ -0,0 +1,17 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSpqn;
import org.apache.ibatis.annotations.Mapper;
/**
* DsmSpgSpqnNormalMapper
*/
@DS("jcsk")
@Mapper
public interface DsmSpgSpqnMapper extends BaseMapper<DsmSpgSpqn> {
// 可以在这里添加自定义的SQL方法
}

View File

@ -0,0 +1,17 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSpqnmp;
import org.apache.ibatis.annotations.Mapper;
/**
* DsmSpgSpqnmpMapper
*/
@DS("jcsk")
@Mapper
public interface DsmSpgSpqnmpMapper extends BaseMapper<DsmSpgSpqnmp> {
// 可以在这里添加自定义的SQL方法
}

View File

@ -0,0 +1,15 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.JcskStFlowR;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-16
*/
@DS("jcsk")
@Mapper
public interface JcskStFlowRMapper extends BaseMapper<JcskStFlowR> {
}

View File

@ -0,0 +1,15 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.WaterDataTermites;
import org.apache.ibatis.annotations.Mapper;
/**
* WaterDataTermitesMapper
*/
@DS("jcsk")
@Mapper
public interface WaterDataTermitesMapper extends BaseMapper<WaterDataTermites> {
}

View File

@ -0,0 +1,17 @@
package com.gunshi.project.hsz.datasync.mapper.jcsk;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gunshi.project.hsz.datasync.entity.jcsk.WaterDevice;
import org.apache.ibatis.annotations.Mapper;
/**
* WaterDeviceMapper
*/
@DS("jcsk")
@Mapper
public interface WaterDeviceMapper extends BaseMapper<WaterDevice> {
// 可以在这里添加自定义的SQL方法
}

View File

@ -0,0 +1,47 @@
package com.gunshi.project.hsz.datasync.rainfall;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-20
*/
@Data
@TableName("st_pptn_r")
public class Rainfall {
/**
*
*/
@TableField("stcd")
private String stcd;
/**
*
*/
@TableField("drp")
private BigDecimal drp;
/**
*
*/
@TableField("tm")
private LocalDateTime tm;
/**
*
*/
@TableField("intv")
private BigDecimal intv;
/**
*
*/
@TableField("wth")
private String wth;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.rainfall;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("tsg")
@Mapper
public interface RainfallMapper extends BaseMapper<Rainfall> {
}

View File

@ -0,0 +1,13 @@
package com.gunshi.project.hsz.datasync.rainfall;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* @author lyf
* @since 2025-10-20
*/
@Data
@TableName("st_pptn_r_real")
public class RainfallReal {
}

View File

@ -0,0 +1,16 @@
package com.gunshi.project.hsz.datasync.rainfall;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("tsg")
@Mapper
public interface RainfallRealMapper extends BaseMapper<RainfallReal> {
int updateReal(@Param("stcd") String stcd);
}

View File

@ -0,0 +1,113 @@
package com.gunshi.project.hsz.datasync.rainfall;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.StStbprpBElem;
import com.gunshi.project.hsz.datasync.mapper.StbprpElemMapper;
import com.gunshi.project.hsz.datasync.rainfall.datasource.JcskStPptnR;
import com.gunshi.project.hsz.datasync.rainfall.datasource.JcskStPptnRMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author lyf
* @since 2025-10-20
*/
@Service
public class RainfallService implements SyncTableRService<JcskStPptnR, Rainfall> {
@Autowired
private JcskStPptnRMapper sourceMapper;
@Autowired
private RainfallRealMapper targetRealMapper;
@Autowired
private RainfallMapper targetMapper;
@Autowired
private StbprpElemMapper stbprpMapper;
@Scheduled(cron = "0 */5 * * * ?")
@Override
public int syncData() {
// 获取所有降雨要素的站点
List<StStbprpBElem> stbprps = stbprpMapper.selectByElem("drp");
int cnt = 0;
for (StStbprpBElem StStbprpBElem : stbprps) {
Rainfall targetParams = new Rainfall();
targetParams.setStcd(StStbprpBElem.getStcd());
Rainfall latestTarget = getLatestTargetEntity(targetParams);
List<JcskStPptnR> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
return cnt;
}
@NonNull
@Override
public Rainfall getLatestTargetEntity(Rainfall targetParams) {
String stcd = targetParams.getStcd();
Rainfall target = targetMapper.selectOne(
new LambdaQueryWrapper<Rainfall>()
.eq(Rainfall::getStcd, stcd)
.orderByDesc(Rainfall::getTm)
.last("limit 1")
);
if (target == null) {
target = new Rainfall();
target.setStcd(stcd);
target.setTm(LocalDateTime.of(2025, 10, 20, 15, 0, 0));
}
return target;
}
@Override
public List<JcskStPptnR> getSourceEntityListByLatestTargetEntity(@NonNull Rainfall targetEntity) {
String stcd = targetEntity.getStcd();
LocalDateTime tm = targetEntity.getTm();
return sourceMapper.selectList(
new LambdaQueryWrapper<JcskStPptnR>()
.gt(JcskStPptnR::getTm, tm)
.eq(JcskStPptnR::getStcd, stcd)
);
}
@Override
public int saveToTarget(List<JcskStPptnR> sourceEntityList) {
int count = 0;
for (JcskStPptnR sourceEntity : sourceEntityList) {
String stcd = sourceEntity.getStcd();
LocalDateTime tm = sourceEntity.getTm();
Rainfall existingTarget = targetMapper.selectOne(
new LambdaQueryWrapper<Rainfall>()
.eq(Rainfall::getStcd, stcd)
.eq(Rainfall::getTm, tm)
);
if (existingTarget == null) {
Rainfall targetEntity = new Rainfall();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetMapper.insert(targetEntity);
}
count++;
}
if (!sourceEntityList.isEmpty()) {
JcskStPptnR sourceEntity = sourceEntityList.getFirst();
String stcd = sourceEntity.getStcd();
targetRealMapper.updateReal(stcd);
}
return count;
}
}

View File

@ -0,0 +1,46 @@
package com.gunshi.project.hsz.datasync.rainfall.datasource;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-20
*/
@Data
@TableName("SJZT_MD.\"st_pptn_r\"")
public class JcskStPptnR {
/**
*
*/
@TableField("\"stcd\"")
private String stcd;
/**
*
*/
@TableField("\"drp\"")
private BigDecimal drp;
/**
*
*/
@TableField("\"tm\"")
private LocalDateTime tm;
/**
*
*/
@TableField("\"intv\"")
private BigDecimal intv;
/**
*
*/
@TableField("\"wth\"")
private String wth;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.rainfall.datasource;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("jcsk")
@Mapper
public interface JcskStPptnRMapper extends BaseMapper<JcskStPptnR> {
}

View File

@ -0,0 +1,40 @@
package com.gunshi.project.hsz.datasync.riverWaterLevel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-30
*/
@Data
@TableName("st_river_r")
public class RiverWaterLevel {
/**
*
*/
@TableField("stcd")
private String stcd;
/**
*
*/
@TableField("tm")
private LocalDateTime tm;
/**
*
*/
@TableField("z")
private BigDecimal z;
/**
*
*/
@TableField("wptn")
private String wptn;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.riverWaterLevel;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("tsg")
@Mapper
public interface RiverWaterLevelMapper extends BaseMapper<RiverWaterLevel> {
}

View File

@ -0,0 +1,49 @@
package com.gunshi.project.hsz.datasync.riverWaterLevel;
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 lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@TableName("st_river_r_real")
public class RiverWaterLevelReal {
/**
* stcd
*/
@TableId(value = "stcd", type = IdType.AUTO)
private String stcd;
/**
* tm
*/
@TableField(value = "tm")
private LocalDateTime tm;
/**
* z
*/
@TableField(value = "")
private BigDecimal z;
/**
* rwptn
*/
@TableField(value = "wptn")
private String wptn;
/**
* chtm
*/
@TableField(value = "chtm")
private LocalDateTime chtm;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.riverWaterLevel;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("tsg")
@Mapper
public interface RiverWaterLevelRealMapper extends BaseMapper<RiverWaterLevelReal> {
}

View File

@ -0,0 +1,126 @@
package com.gunshi.project.hsz.datasync.riverWaterLevel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.StStbprpBElem;
import com.gunshi.project.hsz.datasync.mapper.StbprpElemMapper;
import com.gunshi.project.hsz.datasync.rsvrWaterLevel.datasource.JcskStRsvrR;
import com.gunshi.project.hsz.datasync.rsvrWaterLevel.datasource.JcskStRsvrRMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author lyf
* @since 2025-10-20
*
*/
@Service
public class RiverWaterLevelService implements SyncTableRService<JcskStRsvrR, RiverWaterLevel> {
@Autowired
private JcskStRsvrRMapper sourceMapper;
@Autowired
private RiverWaterLevelRealMapper targetRealMapper;
@Autowired
private RiverWaterLevelMapper targetMapper;
@Autowired
private StbprpElemMapper stbprpMapper;
@Scheduled(cron = "0 */5 * * * ?")
@Override
public int syncData() {
// 获取所有水库水位要素的站点
List<StStbprpBElem> stbprps = stbprpMapper.selectByElem("z");
int cnt = 0;
for (StStbprpBElem StStbprpBElem : stbprps) {
RiverWaterLevel targetParams = new RiverWaterLevel();
targetParams.setStcd(StStbprpBElem.getStcd());
RiverWaterLevel latestTarget = getLatestTargetEntity(targetParams);
List<JcskStRsvrR> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
return cnt;
}
@NonNull
@Override
public RiverWaterLevel getLatestTargetEntity(RiverWaterLevel targetParams) {
String stcd = targetParams.getStcd();
RiverWaterLevel target = targetMapper.selectOne(
new LambdaQueryWrapper<RiverWaterLevel>()
.eq(RiverWaterLevel::getStcd, stcd)
.orderByDesc(RiverWaterLevel::getTm)
.last("limit 1")
);
if (target == null) {
target = new RiverWaterLevel();
target.setStcd(stcd);
target.setTm(LocalDateTime.of(2025, 10, 20, 15, 0, 0));
}
return target;
}
@Override
public List<JcskStRsvrR> getSourceEntityListByLatestTargetEntity(@NonNull RiverWaterLevel targetEntity) {
String stcd = targetEntity.getStcd();
LocalDateTime tm = targetEntity.getTm();
return sourceMapper.selectList(
new LambdaQueryWrapper<JcskStRsvrR>()
.gt(JcskStRsvrR::getTm, tm)
.eq(JcskStRsvrR::getStcd, stcd)
);
}
@Override
public int saveToTarget(List<JcskStRsvrR> sourceEntityList) {
int count = 0;
for (JcskStRsvrR sourceEntity : sourceEntityList) {
String stcd = sourceEntity.getStcd();
LocalDateTime tm = sourceEntity.getTm();
RiverWaterLevel existingTarget = targetMapper.selectOne(
new LambdaQueryWrapper<RiverWaterLevel>()
.eq(RiverWaterLevel::getStcd, stcd)
.eq(RiverWaterLevel::getTm, tm)
);
if (existingTarget == null) {
RiverWaterLevel targetEntity = new RiverWaterLevel();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetEntity.setZ(sourceEntity.getRz());
targetEntity.setWptn(sourceEntity.getRwptn());
targetMapper.insert(targetEntity);
}
count++;
}
if (!sourceEntityList.isEmpty()) {
sourceEntityList.sort((o1, o2) -> o2.getTm().compareTo(o1.getTm()));
JcskStRsvrR sourceEntity = sourceEntityList.getFirst();
String stcd = sourceEntity.getStcd();
RiverWaterLevelReal real = targetRealMapper.selectById(stcd);
if (real == null) {
real = new RiverWaterLevelReal();
}
real.setTm(sourceEntity.getTm());
real.setStcd(stcd);
real.setZ(sourceEntity.getRz());
real.setWptn(sourceEntity.getRwptn());
real.setChtm(LocalDateTime.now());
targetRealMapper.insertOrUpdate(real);
}
return count;
}
}

View File

@ -0,0 +1,65 @@
package com.gunshi.project.hsz.datasync.rsvrWaterLevel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-20
*/
@Data
@TableName("st_rsvr_r")
public class RsvrWaterLevel {
/**
*
*/
@TableField("stcd")
private String stcd;
/**
*
*/
@TableField("tm")
private LocalDateTime tm;
/**
*
*/
@TableField("rz")
private BigDecimal rz;
/**
*
*/
@TableField("inq")
private BigDecimal inq;
/**
*
*/
@TableField("w")
private BigDecimal w;
/**
*
*/
@TableField("blrz")
private BigDecimal blrz;
/**
*
*/
@TableField("otq")
private BigDecimal otq;
/**
*
*/
@TableField("rwptn")
private String rwptn;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.rsvrWaterLevel;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("tsg")
@Mapper
public interface RsvrWaterLevelMapper extends BaseMapper<RsvrWaterLevel> {
}

View File

@ -0,0 +1,49 @@
package com.gunshi.project.hsz.datasync.rsvrWaterLevel;
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 lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@TableName("st_rsvr_r_real")
public class RsvrWaterLevelReal {
/**
* stcd
*/
@TableId(value = "stcd", type = IdType.AUTO)
private String stcd;
/**
* tm
*/
@TableField(value = "tm")
private LocalDateTime tm;
/**
* rz
*/
@TableField(value = "rz")
private BigDecimal rz;
/**
* rwptn
*/
@TableField(value = "rwptn")
private String rwptn;
/**
* chtm
*/
@TableField(value = "chtm")
private LocalDateTime chtm;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.rsvrWaterLevel;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("tsg")
@Mapper
public interface RsvrWaterLevelRealMapper extends BaseMapper<RsvrWaterLevelReal> {
}

View File

@ -0,0 +1,123 @@
package com.gunshi.project.hsz.datasync.rsvrWaterLevel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.StStbprpBElem;
import com.gunshi.project.hsz.datasync.mapper.StbprpElemMapper;
import com.gunshi.project.hsz.datasync.rsvrWaterLevel.datasource.JcskStRsvrR;
import com.gunshi.project.hsz.datasync.rsvrWaterLevel.datasource.JcskStRsvrRMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author lyf
* @since 2025-10-20
*/
@Service
public class RsvrWaterLevelService implements SyncTableRService<JcskStRsvrR, RsvrWaterLevel> {
@Autowired
private JcskStRsvrRMapper sourceMapper;
@Autowired
private RsvrWaterLevelRealMapper targetRealMapper;
@Autowired
private RsvrWaterLevelMapper targetMapper;
@Autowired
private StbprpElemMapper stbprpMapper;
@Scheduled(cron = "0 */5 * * * ?")
@Override
public int syncData() {
// 获取所有水库水位要素的站点
List<StStbprpBElem> stbprps = stbprpMapper.selectByElem("rz");
int cnt = 0;
for (StStbprpBElem StStbprpBElem : stbprps) {
RsvrWaterLevel targetParams = new RsvrWaterLevel();
targetParams.setStcd(StStbprpBElem.getStcd());
RsvrWaterLevel latestTarget = getLatestTargetEntity(targetParams);
List<JcskStRsvrR> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
return cnt;
}
@NonNull
@Override
public RsvrWaterLevel getLatestTargetEntity(RsvrWaterLevel targetParams) {
String stcd = targetParams.getStcd();
RsvrWaterLevel target = targetMapper.selectOne(
new LambdaQueryWrapper<RsvrWaterLevel>()
.eq(RsvrWaterLevel::getStcd, stcd)
.orderByDesc(RsvrWaterLevel::getTm)
.last("limit 1")
);
if (target == null) {
target = new RsvrWaterLevel();
target.setStcd(stcd);
target.setTm(LocalDateTime.of(2025,10,20,15,0,0));
}
return target;
}
@Override
public List<JcskStRsvrR> getSourceEntityListByLatestTargetEntity(@NonNull RsvrWaterLevel targetEntity) {
String stcd = targetEntity.getStcd();
LocalDateTime tm = targetEntity.getTm();
return sourceMapper.selectList(
new LambdaQueryWrapper<JcskStRsvrR>()
.gt(JcskStRsvrR::getTm, tm)
.eq(JcskStRsvrR::getStcd, stcd)
);
}
@Override
public int saveToTarget(List<JcskStRsvrR> sourceEntityList) {
int count = 0;
for (JcskStRsvrR sourceEntity : sourceEntityList) {
String stcd = sourceEntity.getStcd();
LocalDateTime tm = sourceEntity.getTm();
RsvrWaterLevel existingTarget = targetMapper.selectOne(
new LambdaQueryWrapper<RsvrWaterLevel>()
.eq(RsvrWaterLevel::getStcd, stcd)
.eq(RsvrWaterLevel::getTm, tm)
);
if (existingTarget == null) {
RsvrWaterLevel targetEntity = new RsvrWaterLevel();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetMapper.insert(targetEntity);
}
count++;
}
if (!sourceEntityList.isEmpty()) {
sourceEntityList.sort((o1, o2) -> o2.getTm().compareTo(o1.getTm()));
JcskStRsvrR sourceEntity = sourceEntityList.getFirst();
String stcd = sourceEntity.getStcd();
RsvrWaterLevelReal real = targetRealMapper.selectById(stcd);
if (real == null) {
real = new RsvrWaterLevelReal();
}
real.setTm(sourceEntity.getTm());
real.setStcd(stcd);
real.setRz(sourceEntity.getRz());
real.setRwptn(sourceEntity.getRwptn());
real.setChtm(LocalDateTime.now());
targetRealMapper.insertOrUpdate(real);
}
return count;
}
}

View File

@ -0,0 +1,84 @@
package com.gunshi.project.hsz.datasync.rsvrWaterLevel.datasource;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author lyf
* @since 2025-10-20
*/
@Data
@TableName("SJZT_MD.\"st_rsvr_r\"")
public class JcskStRsvrR {
/**
*
*/
@TableId("\"stcd\"")
private String stcd;
/**
*
*/
@TableField("\"tm\"")
private LocalDateTime tm;
/**
*
*/
@TableField("\"rz\"")
private BigDecimal rz;
/**
*
*/
@TableField("\"inq\"")
private BigDecimal inq;
/**
*
*/
@TableField("\"w\"")
private BigDecimal w;
/**
*
*/
@TableField("\"blrz\"")
private BigDecimal blrz;
/**
*
*/
@TableField("\"otq\"")
private BigDecimal otq;
/**
*
*/
@TableField("\"rwchrcd\"")
private String rwchrcd;
/**
*
*/
@TableField("\"rwptn\"")
private String rwptn;
/**
*
*/
@TableField("\"inqdr\"")
private BigDecimal inqdr;
/**
*
*/
@TableField("\"msqmt\"")
private String msqmt;
}

View File

@ -0,0 +1,14 @@
package com.gunshi.project.hsz.datasync.rsvrWaterLevel.datasource;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lyf
* @since 2025-10-20
*/
@DS("jcsk")
@Mapper
public interface JcskStRsvrRMapper extends BaseMapper<JcskStRsvrR> {
}

View File

@ -0,0 +1,30 @@
package com.gunshi.project.hsz.datasync.service;
import org.springframework.lang.NonNull;
import java.time.LocalDateTime;
import java.util.List;
/**
*
*/
public interface SyncTableRService<SourceEntity, TargetEntity> {
int syncData();
@NonNull
TargetEntity getLatestTargetEntity(TargetEntity targetParams);
List<SourceEntity> getSourceEntityListByLatestTargetEntity(@NonNull TargetEntity targetEntity);
int saveToTarget(List<SourceEntity> sourceEntityList);
default LocalDateTime calculateEtm(LocalDateTime stm) {
LocalDateTime etm = LocalDateTime.now();
if (etm.isAfter(stm.plusDays(30))) {
etm = stm.plusDays(30);
}
return etm;
}
}

View File

@ -0,0 +1,104 @@
package com.gunshi.project.hsz.datasync.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.JcskByB;
import com.gunshi.project.hsz.common.model.JcskByR;
import com.gunshi.project.hsz.datasync.entity.jcsk.WaterDataTermites;
import com.gunshi.project.hsz.common.mapper.JcskByBMapper;
import com.gunshi.project.hsz.common.mapper.JcskByRMapper;
import com.gunshi.project.hsz.datasync.mapper.jcsk.WaterDataTermitesMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
@Service
public class SyncByRService implements SyncTableRService<WaterDataTermites, JcskByR> {
@Autowired
private WaterDataTermitesMapper sourceMapper;
@Autowired
private JcskByBMapper targetBMapper;
@Autowired
private JcskByRMapper targetMapper;
@Override
public int syncData() {
List<JcskByB> targetBList = targetBMapper.selectList(null);
int cnt = 0;
for (JcskByB targetB : targetBList) {
JcskByR targetParams = new JcskByR();
targetParams.setDeviceId(targetB.getId());
JcskByR latestTarget = getLatestTargetEntity(targetParams);
List<WaterDataTermites> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
return cnt;
}
@NonNull
@Override
public JcskByR getLatestTargetEntity(JcskByR targetParams) {
Integer deviceId = targetParams.getDeviceId();
JcskByR target = targetMapper.selectOne(
new LambdaQueryWrapper<JcskByR>()
.eq(JcskByR::getDeviceId, deviceId)
.orderByDesc(JcskByR::getObDate)
.last("limit 1")
);
if (target == null) {
target = new JcskByR();
target.setDeviceId(deviceId);
//数据源最早的数据时间
target.setObDate(LocalDateTime.of(2025, 8, 22, 10, 15, 0));
}
return target;
}
@Override
public List<WaterDataTermites> getSourceEntityListByLatestTargetEntity(@NonNull JcskByR targetEntity) {
Integer deviceId = targetEntity.getDeviceId();
LocalDateTime stm = targetEntity.getObDate();
LocalDateTime etm = calculateEtm(stm);
return sourceMapper.selectList(
new LambdaQueryWrapper<WaterDataTermites>()
.gt(WaterDataTermites::getObDate, stm)
.le(WaterDataTermites::getObDate, etm)
.eq(WaterDataTermites::getDeviceId, deviceId)
.ne(WaterDataTermites::getOrder, "000000")
);
}
@Override
public int saveToTarget(List<WaterDataTermites> sourceEntityList) {
int count = 0;
for (WaterDataTermites sourceEntity : sourceEntityList) {
Integer deviceId = sourceEntity.getId();
LocalDateTime tm = sourceEntity.getObDate();
LambdaQueryWrapper<JcskByR> queryWrapper = new LambdaQueryWrapper<JcskByR>()
.eq(JcskByR::getDeviceId, deviceId)
.eq(JcskByR::getObDate, tm)
.last("limit 1");
JcskByR existingTarget = targetMapper.selectOne(queryWrapper);
if (existingTarget == null) {
JcskByR targetEntity = new JcskByR();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetMapper.insert(targetEntity);
}
count++;
}
return count;
}
}

View File

@ -0,0 +1,107 @@
package com.gunshi.project.hsz.datasync.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.StFlowR;
import com.gunshi.project.hsz.common.model.StStbprpBElem;
import com.gunshi.project.hsz.datasync.entity.jcsk.JcskStFlowR;
import com.gunshi.project.hsz.datasync.mapper.StFlowRMapper;
import com.gunshi.project.hsz.datasync.mapper.StbprpElemMapper;
import com.gunshi.project.hsz.datasync.mapper.jcsk.JcskStFlowRMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author lyf
* @since 2025-10-16
*/
@Slf4j
@Service
public class SyncFlowRService implements SyncTableRService<JcskStFlowR, StFlowR> {
@Autowired
private JcskStFlowRMapper jcskStFlowRMapper;
@Autowired
private StFlowRMapper stFlowRMapper;
@Autowired
private StbprpElemMapper stbprpMapper;
@Scheduled(cron = "0 */15 * * * ?")
@Override
public int syncData() {
log.info("开始同步流量数据");
// 获取所有流量要素的站点
List<StStbprpBElem> stbprps = stbprpMapper.selectByElem("flow");
int cnt = 0;
for (StStbprpBElem StStbprpBElem : stbprps) {
StFlowR targetParams = new StFlowR();
targetParams.setStcd(StStbprpBElem.getStcd());
StFlowR latestTarget = getLatestTargetEntity(targetParams);
List<JcskStFlowR> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
log.info("完成同步流量数据 {} {}", stbprps, cnt);
return cnt;
}
@NonNull
@Override
public StFlowR getLatestTargetEntity(StFlowR targetParams) {
String stcd = targetParams.getStcd();
StFlowR target = stFlowRMapper.selectOne(
new LambdaQueryWrapper<StFlowR>()
.eq(StFlowR::getStcd, stcd)
.orderByDesc(StFlowR::getId)
.last("limit 1")
);
if (target == null) {
target = new StFlowR();
target.setStcd(stcd);
//流量有主键自增id所以不用时间比较
target.setId(0);
}
return target;
}
@Override
public List<JcskStFlowR> getSourceEntityListByLatestTargetEntity(@NonNull StFlowR targetEntity) {
String stcd = targetEntity.getStcd();
Integer id = targetEntity.getId();
return jcskStFlowRMapper.selectList(
new LambdaQueryWrapper<JcskStFlowR>()
.gt(JcskStFlowR::getId, id)
.eq(JcskStFlowR::getStcd, stcd)
);
}
@Override
public int saveToTarget(List<JcskStFlowR> sourceEntityList) {
int count = 0;
for (JcskStFlowR sourceEntity : sourceEntityList) {
Integer id = sourceEntity.getId();
StFlowR existingTarget = stFlowRMapper.selectById(id);
if (existingTarget == null) {
StFlowR targetEntity = new StFlowR();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetEntity.setCrtime(LocalDateTime.now());
stFlowRMapper.insert(targetEntity);
}
count++;
}
return count;
}
}

View File

@ -0,0 +1,129 @@
package com.gunshi.project.hsz.datasync.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.JcskGnssB;
import com.gunshi.project.hsz.common.model.JcskGnssR;
import com.gunshi.project.hsz.datasync.entity.jcsk.AttMqttCalcData;
import com.gunshi.project.hsz.common.mapper.JcskGnssBMapper;
import com.gunshi.project.hsz.common.mapper.JcskGnssRMapper;
import com.gunshi.project.hsz.datasync.mapper.jcsk.AttMqttCalcDataNormalMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.List;
/**
* @author lyf
* @since 2025-08-22
*/
@Service
@Slf4j
public class SyncGnssRService implements SyncTableRService<AttMqttCalcData, JcskGnssR> {
@Autowired
private AttMqttCalcDataNormalMapper sourceMapper;
@Autowired
private JcskGnssBMapper targetBMapper;
@Autowired
private JcskGnssRMapper targetMapper;
@Override
public int syncData() {
List<JcskGnssB> targetBList = targetBMapper.selectList(null);
int cnt = 0;
for (JcskGnssB targetB : targetBList) {
JcskGnssR targetParams = new JcskGnssR();
targetParams.setResCd(targetB.getResCd());
targetParams.setCd(targetB.getCd());
JcskGnssR latestTarget = getLatestTargetEntity(targetParams);
List<AttMqttCalcData> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
return cnt;
}
@NonNull
@Override
public JcskGnssR getLatestTargetEntity(JcskGnssR targetParams) {
String resCd = targetParams.getResCd();
String cd = targetParams.getCd();
JcskGnssR target = targetMapper.selectOne(
new LambdaQueryWrapper<JcskGnssR>()
.eq(JcskGnssR::getResCd, resCd)
.eq(JcskGnssR::getCd, cd)
.orderByDesc(JcskGnssR::getTm)
.last("limit 1")
);
if (target == null) {
target = new JcskGnssR();
target.setResCd(resCd);
target.setCd(cd);
//数据源最早的数据时间
target.setTm(LocalDateTime.of(2025, 9, 15, 18, 30, 0));
}
return target;
}
@Override
public List<AttMqttCalcData> getSourceEntityListByLatestTargetEntity(@NonNull JcskGnssR targetEntity) {
String resCd = targetEntity.getResCd();
String cd = targetEntity.getCd();
LocalDateTime stm = targetEntity.getTm();
LocalDateTime etm = calculateEtm(stm);
Long stmMillis = stm.toInstant(ZoneOffset.of("+8")).toEpochMilli();
Long etmMillis = etm.toInstant(ZoneOffset.of("+8")).toEpochMilli();
// log.info("开始同步 位移 {} {} {} {}", resCd, cd, stm, etm);
return sourceMapper.selectList(
new LambdaQueryWrapper<AttMqttCalcData>()
.eq(AttMqttCalcData::getStationCode, resCd+cd)
.gt(AttMqttCalcData::getCalcTime, stmMillis)
.le(AttMqttCalcData::getCalcTime, etmMillis)
);
}
@Override
public int saveToTarget(List<AttMqttCalcData> sourceEntityList) {
int count = 0;
for (AttMqttCalcData sourceEntity : sourceEntityList) {
LocalDateTime tm = LocalDateTime.ofInstant(
Instant.ofEpochMilli(sourceEntity.getCalcTime()), ZoneOffset.of("+8")
);
String stationCode = sourceEntity.getStationCode();
String resCd = stationCode.substring(0, 11);
String cd = stationCode.substring(11);
LambdaQueryWrapper<JcskGnssR> queryWrapper = new LambdaQueryWrapper<JcskGnssR>()
.eq(JcskGnssR::getResCd, resCd)
.eq(JcskGnssR::getCd, cd)
.eq(JcskGnssR::getTm, tm)
.last("limit 1");
JcskGnssR existingTarget = targetMapper.selectOne(queryWrapper);
if (existingTarget == null) {
JcskGnssR targetEntity = new JcskGnssR();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetEntity.setResCd(resCd);
targetEntity.setCd(cd);
targetEntity.setTm(tm);
targetEntity.setUpdateTm(LocalDateTime.now());
targetMapper.insert(targetEntity);
}
count++;
}
return count;
}
}

View File

@ -0,0 +1,116 @@
package com.gunshi.project.hsz.datasync.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.JcskSlB;
import com.gunshi.project.hsz.common.model.JcskSlR;
import com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSpqn;
import com.gunshi.project.hsz.common.mapper.JcskSlBMapper;
import com.gunshi.project.hsz.common.mapper.JcskSlRMapper;
import com.gunshi.project.hsz.datasync.mapper.jcsk.DsmSpgSpqnMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author lyf
* @since 2025-08-22
*/
@Service
@Slf4j
public class SyncSlRService implements SyncTableRService<DsmSpgSpqn, JcskSlR> {
@Autowired
private DsmSpgSpqnMapper sourceMapper;
@Autowired
private JcskSlBMapper targetBMapper;
@Autowired
private JcskSlRMapper targetMapper;
@Override
public int syncData() {
List<JcskSlB> targetBList = targetBMapper.selectList(null);
int cnt = 0;
for (JcskSlB targetB : targetBList) {
JcskSlR targetParams = new JcskSlR();
targetParams.setRscd(targetB.getRscd());
targetParams.setMpcd(targetB.getMpcd());
JcskSlR latestTarget = getLatestTargetEntity(targetParams);
List<DsmSpgSpqn> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
return cnt;
}
@NonNull
@Override
public JcskSlR getLatestTargetEntity(JcskSlR targetParams) {
String resCd = targetParams.getRscd();
String mpcd = targetParams.getMpcd();
JcskSlR target = targetMapper.selectOne(
new LambdaQueryWrapper<JcskSlR>()
.eq(JcskSlR::getRscd, resCd)
.eq(JcskSlR::getMpcd, mpcd)
.orderByDesc(JcskSlR::getMstm)
.last("limit 1")
);
if (target == null) {
target = new JcskSlR();
target.setRscd(resCd);
target.setMpcd(mpcd);
//数据源最早的数据时间
target.setMstm(LocalDateTime.of(2025, 8, 1, 0, 0, 0));
}
return target;
}
@Override
public List<DsmSpgSpqn> getSourceEntityListByLatestTargetEntity(@NonNull JcskSlR targetEntity) {
String rscd = targetEntity.getRscd();
String mpcd = targetEntity.getMpcd();
LocalDateTime stm = targetEntity.getMstm();
LocalDateTime etm = calculateEtm(stm);
// 修复数据类型不匹配问题使用mstm(LocalDateTime)字段进行时间比较而不是tm(BigDecimal)字段
return sourceMapper.selectList(
new LambdaQueryWrapper<DsmSpgSpqn>()
.eq(DsmSpgSpqn::getRscd, rscd)
.eq(DsmSpgSpqn::getMpcd, mpcd)
.gt(DsmSpgSpqn::getMstm, stm)
.le(DsmSpgSpqn::getMstm, etm)
);
}
@Override
public int saveToTarget(List<DsmSpgSpqn> sourceEntityList) {
int count = 0;
for (DsmSpgSpqn sourceEntity : sourceEntityList) {
LambdaQueryWrapper<JcskSlR> queryWrapper = new LambdaQueryWrapper<JcskSlR>()
.eq(JcskSlR::getRscd, sourceEntity.getRscd())
.eq(JcskSlR::getMpcd, sourceEntity.getMpcd())
.eq(JcskSlR::getMstm, sourceEntity.getMstm())
.last("limit 1");
JcskSlR existingTarget = targetMapper.selectOne(queryWrapper);
if (existingTarget == null) {
JcskSlR targetEntity = new JcskSlR();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetMapper.insert(targetEntity);
}
count++;
}
return count;
}
}

View File

@ -0,0 +1,119 @@
package com.gunshi.project.hsz.datasync.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gunshi.project.hsz.common.model.JcskSyB;
import com.gunshi.project.hsz.common.model.JcskSyR;
import com.gunshi.project.hsz.datasync.entity.jcsk.DsmSpgSppr;
import com.gunshi.project.hsz.common.mapper.JcskSyBMapper;
import com.gunshi.project.hsz.common.mapper.JcskSyRMapper;
import com.gunshi.project.hsz.datasync.mapper.jcsk.DsmSpgSpprMapper;
import com.gunshi.project.hsz.datasync.service.SyncTableRService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
@Service
@Slf4j
public class SyncSyRService implements SyncTableRService<DsmSpgSppr, JcskSyR> {
@Autowired
private DsmSpgSpprMapper sourceMapper;
@Autowired
private JcskSyBMapper targetBMapper;
@Autowired
private JcskSyRMapper targetMapper;
@Override
public int syncData() {
List<JcskSyB> targetBList = targetBMapper.selectList(null);
int cnt = 0;
for (JcskSyB targetB : targetBList) {
JcskSyR targetParams = new JcskSyR();
targetParams.setRscd(targetB.getRscd());
targetParams.setStcd(targetB.getStcd());
targetParams.setMpcd(targetB.getMpcd());
JcskSyR latestTarget = getLatestTargetEntity(targetParams);
List<DsmSpgSppr> sourceEntityList = getSourceEntityListByLatestTargetEntity(latestTarget);
cnt += saveToTarget(sourceEntityList);
}
return cnt;
}
@NonNull
@Override
public JcskSyR getLatestTargetEntity(JcskSyR targetParams) {
String resCd = targetParams.getRscd();
String mpcd = targetParams.getMpcd();
String stcd = targetParams.getStcd();
JcskSyR target = targetMapper.selectOne(
new LambdaQueryWrapper<JcskSyR>()
.eq(JcskSyR::getRscd, resCd)
.eq(JcskSyR::getMpcd, mpcd)
.eq(JcskSyR::getStcd, stcd)
.orderByDesc(JcskSyR::getMstm)
.last("limit 1")
);
if (target == null) {
target = new JcskSyR();
target.setRscd(resCd);
target.setMpcd(mpcd);
target.setStcd(stcd);
target.setMstm(LocalDateTime.of(2025, 9, 1, 16, 30, 0));
}
return target;
}
@Override
public List<DsmSpgSppr> getSourceEntityListByLatestTargetEntity(@NonNull JcskSyR targetEntity) {
String rscd = targetEntity.getRscd();
String mpcd = targetEntity.getMpcd();
String stcd = targetEntity.getStcd();
LocalDateTime stm = targetEntity.getMstm();
LocalDateTime etm = calculateEtm(stm);
return sourceMapper.selectList(
new LambdaQueryWrapper<DsmSpgSppr>()
.eq(DsmSpgSppr::getRscd, rscd)
.eq(DsmSpgSppr::getMpcd, mpcd)
.eq(DsmSpgSppr::getStcd, stcd)
.gt(DsmSpgSppr::getMstm, stm)
.le(DsmSpgSppr::getMstm, etm)
);
}
@Override
public int saveToTarget(List<DsmSpgSppr> sourceEntityList) {
LocalDateTime now = LocalDateTime.now();
int count = 0;
for (DsmSpgSppr sourceEntity : sourceEntityList) {
LambdaQueryWrapper<JcskSyR> queryWrapper = new LambdaQueryWrapper<JcskSyR>()
.eq(JcskSyR::getRscd, sourceEntity.getRscd())
.eq(JcskSyR::getMpcd, sourceEntity.getMpcd())
.eq(JcskSyR::getStcd, sourceEntity.getStcd())
.eq(JcskSyR::getMstm, sourceEntity.getMstm())
.last("limit 1");
JcskSyR existingTarget = targetMapper.selectOne(queryWrapper);
if (existingTarget == null) {
JcskSyR targetEntity = new JcskSyR();
BeanUtils.copyProperties(sourceEntity, targetEntity);
targetEntity.setUpdateTm(now);
targetMapper.insert(targetEntity);
count++;
}
}
return count;
}
}

View File

@ -1,19 +1,13 @@
package com.gunshi.project.hsz.controller; package com.gunshi.project.hsz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.AlarmSetPageSo; import com.gunshi.project.hsz.entity.so.AlarmSetPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo;
import com.gunshi.project.hsz.model.AlarmSet; import com.gunshi.project.hsz.model.AlarmSet;
import com.gunshi.project.hsz.model.ForecastProject;
import com.gunshi.project.hsz.model.ForecastResults;
import com.gunshi.project.hsz.model.OsmoticFlowR;
import com.gunshi.project.hsz.service.AlarmSetService; import com.gunshi.project.hsz.service.AlarmSetService;
import com.gunshi.project.hsz.timetask.AlarmTask; import com.gunshi.project.hsz.timetask.AlarmTask;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
@ -22,7 +16,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.List; import java.util.List;
@Tag(name = "告警设置") @Tag(name = "告警设置")

View File

@ -3,8 +3,8 @@ package com.gunshi.project.hsz.controller;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.model.AssessCategory; import com.gunshi.project.hsz.model.AssessCategory;
import com.gunshi.project.hsz.service.AssessCategoryService; import com.gunshi.project.hsz.service.AssessCategoryService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -6,8 +6,8 @@ import com.gunshi.project.hsz.entity.dto.InspectItemDto;
import com.gunshi.project.hsz.entity.so.AttCctvBasePage; import com.gunshi.project.hsz.entity.so.AttCctvBasePage;
import com.gunshi.project.hsz.model.AssessIndicator; import com.gunshi.project.hsz.model.AssessIndicator;
import com.gunshi.project.hsz.service.AssessIndicatorService; import com.gunshi.project.hsz.service.AssessIndicatorService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -7,8 +7,8 @@ import com.gunshi.project.hsz.entity.so.AssessTaskPageSo;
import com.gunshi.project.hsz.entity.vo.AssessResultVo; import com.gunshi.project.hsz.entity.vo.AssessResultVo;
import com.gunshi.project.hsz.model.AssessTask; import com.gunshi.project.hsz.model.AssessTask;
import com.gunshi.project.hsz.service.AssessTaskService; import com.gunshi.project.hsz.service.AssessTaskService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -7,8 +7,8 @@ import com.gunshi.project.hsz.entity.so.AttCctvBasePage;
import com.gunshi.project.hsz.model.AssessIndicator; import com.gunshi.project.hsz.model.AssessIndicator;
import com.gunshi.project.hsz.model.AssessTemplate; import com.gunshi.project.hsz.model.AssessTemplate;
import com.gunshi.project.hsz.service.AssessTemplateService; import com.gunshi.project.hsz.service.AssessTemplateService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -14,8 +14,8 @@ import com.gunshi.project.hsz.model.CctvBMenu;
import com.gunshi.project.hsz.service.AttCctvBaseService; import com.gunshi.project.hsz.service.AttCctvBaseService;
import com.gunshi.project.hsz.service.CctvBMenuService; import com.gunshi.project.hsz.service.CctvBMenuService;
import com.gunshi.project.hsz.util.OkHttpUtil; import com.gunshi.project.hsz.util.OkHttpUtil;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -11,8 +11,8 @@ import com.gunshi.project.hsz.model.AttDamBase;
import com.gunshi.project.hsz.service.AttDamBaseService; import com.gunshi.project.hsz.service.AttDamBaseService;
import com.gunshi.project.hsz.service.AttResBaseService; import com.gunshi.project.hsz.service.AttResBaseService;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -11,8 +11,8 @@ import com.gunshi.project.hsz.entity.vo.ProfilePressTreeVo;
import com.gunshi.project.hsz.model.AttDamProfile; import com.gunshi.project.hsz.model.AttDamProfile;
import com.gunshi.project.hsz.service.AttDamProfileService; import com.gunshi.project.hsz.service.AttDamProfileService;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -4,8 +4,8 @@ import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.vo.GateMonitorDataVo; import com.gunshi.project.hsz.entity.vo.GateMonitorDataVo;
import com.gunshi.project.hsz.model.AttGateB; import com.gunshi.project.hsz.model.AttGateB;
import com.gunshi.project.hsz.service.AttGateBService; import com.gunshi.project.hsz.service.AttGateBService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -10,8 +10,8 @@ import com.gunshi.project.hsz.entity.so.GeneralDataPage;
import com.gunshi.project.hsz.model.AttGateValve; import com.gunshi.project.hsz.model.AttGateValve;
import com.gunshi.project.hsz.service.AttGateValveService; import com.gunshi.project.hsz.service.AttGateValveService;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -10,8 +10,8 @@ import com.gunshi.project.hsz.entity.so.GeneralDataPage;
import com.gunshi.project.hsz.model.AttMeaWeir; import com.gunshi.project.hsz.model.AttMeaWeir;
import com.gunshi.project.hsz.service.AttMeaWeirService; import com.gunshi.project.hsz.service.AttMeaWeirService;
import com.gunshi.project.hsz.service.StAddvcdDService; import com.gunshi.project.hsz.service.StAddvcdDService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -5,8 +5,8 @@ import com.gunshi.project.hsz.model.AttResBase;
import com.gunshi.project.hsz.model.FileAssociations; import com.gunshi.project.hsz.model.FileAssociations;
import com.gunshi.project.hsz.service.AttResBaseService; import com.gunshi.project.hsz.service.AttResBaseService;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -5,7 +5,7 @@ import com.gunshi.project.hsz.model.AttResBuilding;
import com.gunshi.project.hsz.model.FileAssociations; import com.gunshi.project.hsz.model.FileAssociations;
import com.gunshi.project.hsz.service.AttResBuildingService; import com.gunshi.project.hsz.service.AttResBuildingService;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;

View File

@ -9,8 +9,8 @@ import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.GeneralDataPage; import com.gunshi.project.hsz.entity.so.GeneralDataPage;
import com.gunshi.project.hsz.model.AttSpillwayBase; import com.gunshi.project.hsz.model.AttSpillwayBase;
import com.gunshi.project.hsz.service.AttSpillwayBaseService; import com.gunshi.project.hsz.service.AttSpillwayBaseService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.model.AttWaterItem; import com.gunshi.project.hsz.model.AttWaterItem;
import com.gunshi.project.hsz.service.AttWaterItemService; import com.gunshi.project.hsz.service.AttWaterItemService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

View File

@ -3,8 +3,8 @@ package com.gunshi.project.hsz.controller;
import com.gunshi.core.result.R; import com.gunshi.core.result.R;
import com.gunshi.project.hsz.model.BroadcastStation; import com.gunshi.project.hsz.model.BroadcastStation;
import com.gunshi.project.hsz.service.BroadcastStationService; import com.gunshi.project.hsz.service.BroadcastStationService;
import com.gunshi.project.hsz.validate.markers.Insert; import com.gunshi.project.hsz.common.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; import com.gunshi.project.hsz.common.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;

Some files were not shown because too many files have changed in this diff Show More