wuww
2025-05-14 d6a4e2730aeff24b8e28eee486926b945bf671d6
修改数据库表名、调整降雨文件、连通模拟过程。
已修改8个文件
124 ■■■■■ 文件已修改
data/init.sql 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/nsl/domain/po/Region.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/nsl/domain/po/Simu.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/nsl/domain/vo/ConfigVo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/nsl/service/ResolveService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-prod.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/RegionMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/SimuMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/init.sql
@@ -4,9 +4,12 @@
create extension if not exists "uuid-ossp";
create schema if not exists nsl;
alter table nsl.simu rename to tbl_yj_tr_simulate;
alter table nsl.region rename to tbl_yj_tr_region;
---------------------------------------------- 1.推演模拟
-- drop table if exists nsl.simu;
create table nsl.simu (
-- drop table if exists nsl.tbl_yj_tr_simulate;
create table nsl.tbl_yj_tr_simulate (
      id serial primary key,
      name varchar(200),
      service_name varchar(200),
@@ -24,50 +27,50 @@
    geom geometry(MultiPolygon, 4490)
);
-- drop index nsl.idx_nsl_simu_geom;
create index idx_nsl_simu_geom on nsl.simu using GIST (geom);
create index idx_nsl_simu_geom on nsl.tbl_yj_tr_simulate using GIST (geom);
comment on table nsl.simu is '推演模拟表';
comment on column nsl.simu.id is '主键ID';
comment on column nsl.simu.name is '名称';
comment on column nsl.simu.service_name is '服务名称';
comment on column nsl.simu.type is '类别:1-预测模拟,2-实时模拟,3-历史模拟';
comment on column nsl.simu.area_type is '区域类别:0-自定义,1-行政区划,2-重点区域,3-重点沟';
comment on column nsl.simu.area_name is '区域名称';
comment on column nsl.simu.data is '数据(JSON)';
comment on column nsl.simu.status is '状态:0-创建仿真,1-预处理,2-分析中,10-完成,20-出错';
comment on column nsl.simu.result is '结果(JSON)';
comment on column nsl.simu.create_time is '创建时间';
comment on column nsl.simu.create_user is '创建人';
comment on column nsl.simu.update_time is '更新时间';
comment on column nsl.simu.update_user is '更新人';
comment on column nsl.simu.bak is '备注';
comment on column nsl.simu.geom is '空间位置';
comment on table nsl.tbl_yj_tr_simulate is '推演模拟表';
comment on column nsl.tbl_yj_tr_simulate.id is '主键ID';
comment on column nsl.tbl_yj_tr_simulate.name is '名称';
comment on column nsl.tbl_yj_tr_simulate.service_name is '服务名称';
comment on column nsl.tbl_yj_tr_simulate.type is '类别:1-预测模拟,2-实时模拟,3-历史模拟';
comment on column nsl.tbl_yj_tr_simulate.area_type is '区域类别:0-自定义,1-行政区划,2-重点区域,3-重点沟';
comment on column nsl.tbl_yj_tr_simulate.area_name is '区域名称';
comment on column nsl.tbl_yj_tr_simulate.data is '数据(JSON)';
comment on column nsl.tbl_yj_tr_simulate.status is '状态:0-创建仿真,1-预处理,2-分析中,10-完成,20-出错';
comment on column nsl.tbl_yj_tr_simulate.result is '结果(JSON)';
comment on column nsl.tbl_yj_tr_simulate.create_time is '创建时间';
comment on column nsl.tbl_yj_tr_simulate.create_user is '创建人';
comment on column nsl.tbl_yj_tr_simulate.update_time is '更新时间';
comment on column nsl.tbl_yj_tr_simulate.update_user is '更新人';
comment on column nsl.tbl_yj_tr_simulate.bak is '备注';
comment on column nsl.tbl_yj_tr_simulate.geom is '空间位置';
-- insert into nsl.simu (name, service_name, type, area_type, area_name, status, geom) values ('预测模拟-0416', '20250416100000', 1, 1, '大兴区', 0, ST_GeomFromText('MULTIPOLYGON(((116.666748 39.639859,116.659403 39.626287,116.665956 39.654698,116.666748 39.639859)))'));
select id,name,service_name,type,area_type,area_name,status,result,create_time,update_time,bak,data,st_astext(geom) from nsl.simu where id > 0 order by id desc;
-- update nsl.simu set status=0,area_name='房山区',result=null,data = '{"startTime":"2025-05-01 11:10:54","type":3,"total":50,"duration":6,"intensity":70,"history":"XX年50mm降雨"}' where id = 17;
-- update nsl.simu set status=0,area_name='房山区',result=null,data = '{"startTime":"2025-05-06 14:31:58","type":3,"total":1025,"duration":14,"intensity":78.5,"rainfalls":[{"time":"2023-07-29 22:00:00","intensity":2,"total":2},{"time":"2023-07-29 23:00:00","intensity":2,"total":4},{"time":"2023-07-30 00:00:00","intensity":3.5,"total":7.5},{"time":"2023-07-30 01:00:00","intensity":2.5,"total":10},{"time":"2023-07-30 02:00:00","intensity":2,"total":244.5},{"time":"2023-07-30 03:00:00","intensity":3.5,"total":339.5},{"time":"2023-07-30 04:00:00","intensity":6,"total":345.5},{"time":"2023-07-30 05:00:00","intensity":10.5,"total":356},{"time":"2023-07-30 06:00:00","intensity":4.5,"total":360.5},{"time":"2023-07-30 07:00:00","intensity":5.5,"total":366},{"time":"2023-07-30 08:00:00","intensity":13,"total":379},{"time":"2023-07-30 09:00:00","intensity":17,"total":396},{"time":"2023-07-30 10:00:00","intensity":15.5,"total":25.5},{"time":"2023-07-30 11:00:00","intensity":17.5,"total":43},{"time":"2023-07-30 12:00:00","intensity":16,"total":59},{"time":"2023-07-30 13:00:00","intensity":18.5,"total":77.5},{"time":"2023-07-30 14:00:00","intensity":13,"total":90.5},{"time":"2023-07-30 15:00:00","intensity":23.5,"total":114},{"time":"2023-07-30 16:00:00","intensity":28.5,"total":142.5},{"time":"2023-07-30 17:00:00","intensity":24.5,"total":167},{"time":"2023-07-30 18:00:00","intensity":43,"total":210},{"time":"2023-07-30 19:00:00","intensity":32.5,"total":242.5},{"time":"2023-07-30 20:00:00","intensity":49.5,"total":294},{"time":"2023-07-30 21:00:00","intensity":18.5,"total":312.5},{"time":"2023-07-30 22:00:00","intensity":8,"total":320.5},{"time":"2023-07-30 23:00:00","intensity":15.5,"total":336},{"time":"2023-07-31 00:00:00","intensity":12.5,"total":408.5},{"time":"2023-07-31 01:00:00","intensity":15,"total":423.5},{"time":"2023-07-31 02:00:00","intensity":4,"total":537},{"time":"2023-07-31 03:00:00","intensity":12,"total":647},{"time":"2023-07-31 04:00:00","intensity":5,"total":652},{"time":"2023-07-31 05:00:00","intensity":36.5,"total":688.5},{"time":"2023-07-31 06:00:00","intensity":18,"total":706.5},{"time":"2023-07-31 07:00:00","intensity":26,"total":732.5},{"time":"2023-07-31 08:00:00","intensity":38,"total":770.5},{"time":"2023-07-31 09:00:00","intensity":39.5,"total":810},{"time":"2023-07-31 10:00:00","intensity":38,"total":461.5},{"time":"2023-07-31 11:00:00","intensity":27,"total":488.5},{"time":"2023-07-31 12:00:00","intensity":5.5,"total":494},{"time":"2023-07-31 13:00:00","intensity":2.5,"total":496.5},{"time":"2023-07-31 14:00:00","intensity":4,"total":500.5},{"time":"2023-07-31 15:00:00","intensity":8,"total":508.5},{"time":"2023-07-31 16:00:00","intensity":8.5,"total":517},{"time":"2023-07-31 17:00:00","intensity":0.5,"total":517.5},{"time":"2023-07-31 18:00:00","intensity":10,"total":527.5},{"time":"2023-07-31 19:00:00","intensity":5.5,"total":533},{"time":"2023-07-31 20:00:00","intensity":20.5,"total":557.5},{"time":"2023-07-31 21:00:00","intensity":25,"total":582.5},{"time":"2023-07-31 22:00:00","intensity":25.5,"total":608},{"time":"2023-07-31 23:00:00","intensity":27,"total":635},{"time":"2023-08-01 00:00:00","intensity":78.5,"total":888.5},{"time":"2023-08-01 01:00:00","intensity":32.5,"total":921},{"time":"2023-08-01 02:00:00","intensity":9.5,"total":956.5},{"time":"2023-08-01 03:00:00","intensity":6.5,"total":981.5},{"time":"2023-08-01 04:00:00","intensity":22.5,"total":1004},{"time":"2023-08-01 05:00:00","intensity":1,"total":1005},{"time":"2023-08-01 06:00:00","intensity":0,"total":1005},{"time":"2023-08-01 07:00:00","intensity":8,"total":1013},{"time":"2023-08-01 08:00:00","intensity":6,"total":1019},{"time":"2023-08-01 09:00:00","intensity":5.5,"total":1024.5},{"time":"2023-08-01 10:00:00","intensity":3,"total":924},{"time":"2023-08-01 11:00:00","intensity":5.5,"total":929.5},{"time":"2023-08-01 12:00:00","intensity":8.5,"total":938},{"time":"2023-08-01 13:00:00","intensity":8,"total":946},{"time":"2023-08-01 14:00:00","intensity":0.5,"total":946.5},{"time":"2023-08-01 16:00:00","intensity":0,"total":946.5},{"time":"2023-08-01 18:00:00","intensity":0.5,"total":947},{"time":"2023-08-01 20:00:00","intensity":17,"total":973.5},{"time":"2023-08-01 21:00:00","intensity":1,"total":974.5},{"time":"2023-08-01 22:00:00","intensity":0.5,"total":975},{"time":"2023-08-02 00:00:00","intensity":0,"total":1024.5},{"time":"2023-08-02 02:00:00","intensity":0,"total":1025},{"time":"2023-08-02 03:00:00","intensity":0.5,"total":1025.5},{"time":"2023-08-02 04:00:00","intensity":0,"total":1025.5},{"time":"2023-08-02 06:00:00","intensity":0,"total":1025.5},{"time":"2023-08-02 08:00:00","intensity":0,"total":1025.5},{"time":"2023-08-02 12:00:00","intensity":0,"total":1024.5},{"time":"2023-08-02 14:00:00","intensity":0,"total":1024.5},{"time":"2023-08-02 15:00:00","intensity":0.5,"total":1025},{"time":"2023-08-02 18:00:00","intensity":0,"total":1025},{"time":"2023-08-02 20:00:00","intensity":0,"total":1025},{"time":"2023-08-02 22:00:00","intensity":0,"total":1025}]}' where id = 17;
select id,name,service_name,type,area_type,area_name,status,result,create_time,update_time,bak,data,st_astext(geom) from nsl.tbl_yj_tr_simulate where id > 0 order by id desc;
-- update nsl.tbl_yj_tr_simulate set status=0,area_name='房山区',result=null,data = '{"startTime":"2025-05-01 11:10:54","type":3,"total":150,"duration":6,"intensity":60,"history":"XX年50mm降雨"}' where id = 17;
-- update nsl.tbl_yj_tr_simulate set status=0,area_name='房山区',result=null,data = '{"startTime":"2025-05-06 14:31:58","type":3,"total":1000,"duration":6,"intensity":78.5,"rainfalls":[{"time":"2023-07-29 22:00:00","intensity":2,"total":2},{"time":"2023-07-29 23:00:00","intensity":2,"total":4},{"time":"2023-07-30 00:00:00","intensity":3.5,"total":7.5},{"time":"2023-07-30 01:00:00","intensity":2.5,"total":10},{"time":"2023-07-30 02:00:00","intensity":2,"total":244.5},{"time":"2023-07-30 03:00:00","intensity":3.5,"total":339.5},{"time":"2023-07-30 04:00:00","intensity":6,"total":345.5},{"time":"2023-07-30 05:00:00","intensity":10.5,"total":356},{"time":"2023-07-30 06:00:00","intensity":4.5,"total":360.5},{"time":"2023-07-30 07:00:00","intensity":5.5,"total":366},{"time":"2023-07-30 08:00:00","intensity":13,"total":379},{"time":"2023-07-30 09:00:00","intensity":17,"total":396},{"time":"2023-07-30 10:00:00","intensity":15.5,"total":25.5},{"time":"2023-07-30 11:00:00","intensity":17.5,"total":43},{"time":"2023-07-30 12:00:00","intensity":16,"total":59},{"time":"2023-07-30 13:00:00","intensity":18.5,"total":77.5},{"time":"2023-07-30 14:00:00","intensity":13,"total":90.5},{"time":"2023-07-30 15:00:00","intensity":23.5,"total":114},{"time":"2023-07-30 16:00:00","intensity":28.5,"total":142.5},{"time":"2023-07-30 17:00:00","intensity":24.5,"total":167},{"time":"2023-07-30 18:00:00","intensity":43,"total":210},{"time":"2023-07-30 19:00:00","intensity":32.5,"total":242.5},{"time":"2023-07-30 20:00:00","intensity":49.5,"total":294},{"time":"2023-07-30 21:00:00","intensity":18.5,"total":312.5},{"time":"2023-07-30 22:00:00","intensity":8,"total":320.5},{"time":"2023-07-30 23:00:00","intensity":15.5,"total":336},{"time":"2023-07-31 00:00:00","intensity":12.5,"total":408.5},{"time":"2023-07-31 01:00:00","intensity":15,"total":423.5},{"time":"2023-07-31 02:00:00","intensity":4,"total":537},{"time":"2023-07-31 03:00:00","intensity":12,"total":647},{"time":"2023-07-31 04:00:00","intensity":5,"total":652},{"time":"2023-07-31 05:00:00","intensity":36.5,"total":688.5},{"time":"2023-07-31 06:00:00","intensity":18,"total":706.5},{"time":"2023-07-31 07:00:00","intensity":26,"total":732.5},{"time":"2023-07-31 08:00:00","intensity":38,"total":770.5},{"time":"2023-07-31 09:00:00","intensity":39.5,"total":810},{"time":"2023-07-31 10:00:00","intensity":38,"total":461.5},{"time":"2023-07-31 11:00:00","intensity":27,"total":488.5},{"time":"2023-07-31 12:00:00","intensity":5.5,"total":494},{"time":"2023-07-31 13:00:00","intensity":2.5,"total":496.5},{"time":"2023-07-31 14:00:00","intensity":4,"total":500.5},{"time":"2023-07-31 15:00:00","intensity":8,"total":508.5},{"time":"2023-07-31 16:00:00","intensity":8.5,"total":517},{"time":"2023-07-31 17:00:00","intensity":0.5,"total":517.5},{"time":"2023-07-31 18:00:00","intensity":10,"total":527.5},{"time":"2023-07-31 19:00:00","intensity":5.5,"total":533},{"time":"2023-07-31 20:00:00","intensity":20.5,"total":557.5},{"time":"2023-07-31 21:00:00","intensity":25,"total":582.5},{"time":"2023-07-31 22:00:00","intensity":25.5,"total":608},{"time":"2023-07-31 23:00:00","intensity":27,"total":635},{"time":"2023-08-01 00:00:00","intensity":78.5,"total":888.5},{"time":"2023-08-01 01:00:00","intensity":32.5,"total":921},{"time":"2023-08-01 02:00:00","intensity":9.5,"total":956.5},{"time":"2023-08-01 03:00:00","intensity":6.5,"total":981.5},{"time":"2023-08-01 04:00:00","intensity":22.5,"total":1004},{"time":"2023-08-01 05:00:00","intensity":1,"total":1005},{"time":"2023-08-01 06:00:00","intensity":0,"total":1005},{"time":"2023-08-01 07:00:00","intensity":8,"total":1013},{"time":"2023-08-01 08:00:00","intensity":6,"total":1019},{"time":"2023-08-01 09:00:00","intensity":5.5,"total":1024.5},{"time":"2023-08-01 10:00:00","intensity":3,"total":924},{"time":"2023-08-01 11:00:00","intensity":5.5,"total":929.5},{"time":"2023-08-01 12:00:00","intensity":8.5,"total":938},{"time":"2023-08-01 13:00:00","intensity":8,"total":946},{"time":"2023-08-01 14:00:00","intensity":0.5,"total":946.5},{"time":"2023-08-01 16:00:00","intensity":0,"total":946.5},{"time":"2023-08-01 18:00:00","intensity":0.5,"total":947},{"time":"2023-08-01 20:00:00","intensity":17,"total":973.5},{"time":"2023-08-01 21:00:00","intensity":1,"total":974.5},{"time":"2023-08-01 22:00:00","intensity":0.5,"total":975},{"time":"2023-08-02 00:00:00","intensity":0,"total":1024.5},{"time":"2023-08-02 02:00:00","intensity":0,"total":1025},{"time":"2023-08-02 03:00:00","intensity":0.5,"total":1025.5},{"time":"2023-08-02 04:00:00","intensity":0,"total":1025.5},{"time":"2023-08-02 06:00:00","intensity":0,"total":1025.5},{"time":"2023-08-02 08:00:00","intensity":0,"total":1025.5},{"time":"2023-08-02 12:00:00","intensity":0,"total":1024.5},{"time":"2023-08-02 14:00:00","intensity":0,"total":1024.5},{"time":"2023-08-02 15:00:00","intensity":0.5,"total":1025},{"time":"2023-08-02 18:00:00","intensity":0,"total":1025},{"time":"2023-08-02 20:00:00","intensity":0,"total":1025},{"time":"2023-08-02 22:00:00","intensity":0,"total":1025}]}' where id = 17;
---------------------------------------------- 2.推演区域
-- drop table if exists nsl.region;
create table nsl.region (
-- drop table if exists nsl.tbl_yj_tr_region;
create table nsl.tbl_yj_tr_region (
      id serial primary key,
      name varchar(200),
    type smallint default 1,
    geom geometry(MultiPolygon, 4490)
);
-- drop index nsl.idx_nsl_region_geom;
create index idx_nsl_region_geom on nsl.region using GIST (geom);
create index idx_nsl_region_geom on nsl.tbl_yj_tr_region using GIST (geom);
comment on table nsl.region is '推演区域表';
comment on column nsl.region.id is '主键ID';
comment on column nsl.region.name is '名称';
comment on column nsl.region.type is '类别:1-行政区划,2-重点区域,3-重点沟';
comment on column nsl.region.geom is '空间位置';
comment on table nsl.tbl_yj_tr_region is '推演区域表';
comment on column nsl.tbl_yj_tr_region.id is '主键ID';
comment on column nsl.tbl_yj_tr_region.name is '名称';
comment on column nsl.tbl_yj_tr_region.type is '类别:1-行政区划,2-重点区域,3-重点沟';
comment on column nsl.tbl_yj_tr_region.geom is '空间位置';
-- insert into nsl.region (name, type, geom) values ('大兴', 1, ST_GeomFromText('MULTIPOLYGON(((116.666748 39.639859,116.659403 39.626287,116.665956 39.654698,116.666748 39.639859)))'));
select id, name, type, st_astext(geom) from nsl.region order by type, id;
select id, name, type, st_astext(geom) from nsl.tbl_yj_tr_region order by type, id;
---------------------------------------------- 3.雨量计 *
-- drop table if exists nsl.udometer;
create table nsl.udometer (
@@ -89,9 +92,38 @@
---------------------------------------------- 将 MULTIPOLYGON 转换为 POLYGON
select st_astext(ST_GeometryN(geom, generate_series(1, ST_NumGeometries(geom)))) as geom from nsl.region limit 1;
---------------------------------------------- 雪花主键
create sequence nsl.seq_tab_id
   start with 0   -- 序列值开始值
   increment by 1 -- 步长
   minvalue 0     -- 最小值
   no maxvalue    -- 为了保证 序列有序, 如果设定了最大值,则要打开cycle
   cache 100;
create or replace function nsl.fn_generate_snow_id(input_machine_id integer)
   returns bigint as $$
declare
   -- our_epoch bigint := 1672502400000; --2023-1-1 00:00:00 的时间戳 , 修改基准时间为2023-01-01. 这样就可以使用到 2023 +69 = 2092年。
   seq_id bigint := 0;
   machine_id int := 0;
   now_millis bigint := 0;
   result bigint := 0;
begin
   seq_id := nextval('nsl.seq_tab_id') % 4096; -- 序列号值大于4096,需要循环
   machine_id := input_machine_id % 1024 ;
   -- select floor(extract(epoch from clock_timestamp()) * 1000) into now_millis;
   -- result := result | ((now_millis - our_epoch) << 22) ; -- 调整基准时间的实现
   select floor(extract(epoch from clock_timestamp()) * 1000) into now_millis;
   result := result | (now_millis  << 22) ;
   result := result | (machine_id << 10) ;
   result := result | (seq_id & 4095);
   return result;
end;
$$ language plpgsql;
select nsl.fn_generate_snow_id(32);
----------------------------------------------
src/main/java/com/se/nsl/domain/po/Region.java
@@ -8,7 +8,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@TableName("nsl.region")
@TableName("nsl.tbl_yj_tr_region")
@SuppressWarnings("ALL")
@ApiModel(value = "推演区域", description = "推演区域")
public class Region {
src/main/java/com/se/nsl/domain/po/Simu.java
@@ -11,7 +11,7 @@
import java.sql.Timestamp;
@TableName("nsl.simu")
@TableName("nsl.tbl_yj_tr_simulate")
@SuppressWarnings("ALL")
@ApiModel(value = "推演模拟", description = "推演模拟")
public class Simu {
src/main/java/com/se/nsl/domain/vo/ConfigVo.java
@@ -50,9 +50,9 @@
    public ConfigVo(String terrain, String landuse, String station, String raingage, String saveName, int duration, int frames) {
        this();
        this.terrain.set(0, terrain.replace("\\", "/")); // 地形高程数据
        //this.terrain.set(0, terrain.replace("\\", "/")); // 地形高程数据
        //this.landuse.set(0, landuse.replace("\\", "/")); // 土地利用类型
        this.station.set(0, station.replace("\\", "/")); // 雨量站索引
        //this.station.set(0, station.replace("\\", "/")); // 雨量站索引
        this.raingage = raingage.replace("\\", "/");
        this.duration = duration;
src/main/java/com/se/nsl/service/ResolveService.java
@@ -188,6 +188,7 @@
        }
        //list.add(prefix + YYYYMDHM.format(rainfalls.get(c).getTime()) + getMinVal(rainfalls.get(c).getIntensity() / unit, DIGIT));
        list.add(String.format("%s%s%f", prefix, YYYYMDHM.format(rainfalls.get(c).getTime()), getMinVal(rainfalls.get(c).getIntensity() / unit, DIGIT)));
        list.add(0, "1 " + (list.size() - 1));
        Files.write(Paths.get(rainfallFile), list, StandardCharsets.UTF_8);
    }
@@ -235,7 +236,7 @@
        String configFile = config.getInPath() + File.separator + data.getInPath() + File.separator + data.getInPath() + ".json";
        ComHelper.writeJson(configFile, JSON.toJSONString(vo));
        String cmd = String.format("%s %s", config.getUwSolverBat(), configFile);
        String cmd = String.format("%s \"%s\"", config.getUwSolverBat(), configFile);
        return callBat2(cmd);
    }
@@ -323,8 +324,8 @@
    }
    private void createNsl(SimuData data) throws Exception {
        String inPath = config.getInPath() + File.separator + data.getInPath() + File.separator + "depth";
        procTifs(inPath, inPath, data.getStartTime());
        /*String inPath = config.getInPath() + File.separator + data.getInPath() + File.separator + "depth";
        procTifs(inPath, inPath, data.getStartTime());*/
        testService.test(data);
    }
@@ -422,6 +423,7 @@
            cal.add(Calendar.MINUTE, 1);
        }
        list.add(0, "1 " + (list.size() - 1));
        Files.write(Paths.get(dat), list, StandardCharsets.UTF_8);
    }
src/main/resources/application-prod.yml
@@ -150,7 +150,7 @@
  rainfallTitle: Station Longitude Latitude Year Month Day Hour Minute Intensity
  rainfallSite: beijing
  epsg: 4548
  saveFrames: 12
  saveFrames: 6
  # 土地利用:1-Cropland,2-Forest,3-Shrub,4-Grassland,5-Water,6-Snow/Ice,7-Barren,8-Impervious,9-Wetland
  landuse: 2
  #sizes: 64,128,256,512,1024,2048,4096
src/main/resources/mapper/RegionMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.se.nsl.mapper.RegionMapper">
    <insert id="inserts" parameterType="com.se.nsl.domain.po.Region">
        insert into nsl.region(name, type, geom) values
        insert into nsl.tbl_yj_tr_region (name, type, geom) values
        <foreach collection="list" item="item" index="index" separator=",">
        (
            #{item.name},
@@ -21,7 +21,7 @@
    <update id="updates" parameterType="com.se.nsl.domain.po.Region">
        <foreach collection="list" item="item" separator=";">
            update nsl.region
            update nsl.tbl_yj_tr_region
            set name = #{item.name},
                type = #{item.type},
                <choose>
src/main/resources/mapper/SimuMapper.xml
@@ -6,7 +6,7 @@
            select currval('nsl.simu_id_seq'::regclass) as id
        </selectKey>
        insert into nsl.simu (
        insert into nsl.tbl_yj_tr_simulate (
            name, service_name, type, area_type, data, status, result, create_time, create_user, bak, geom)
        values (
            #{name},
@@ -31,7 +31,7 @@
    </insert>
    <insert id="inserts" parameterType="com.se.nsl.domain.po.Simu">
        insert into nsl.simu (
        insert into nsl.tbl_yj_tr_simulate (
            name, service_name, type, area_type, data, status, result, create_time, create_user, bak, geom)
        values
        <foreach collection="list" item="item" separator=",">
@@ -60,7 +60,7 @@
    <update id="updates" parameterType="com.se.nsl.domain.po.Simu">
        <foreach collection="list" item="item" separator=";">
            update nsl.simu
            update nsl.tbl_yj_tr_simulate
            set name=#{item.name},
                service_name=#{item.serviceName},
                type=#{item.type},