14 changed files with 605 additions and 48 deletions
@ -0,0 +1,478 @@ |
|||||
|
//package com.kms.web.synchronous;
|
||||
|
//
|
||||
|
//import cn.hutool.core.collection.CollectionUtil;
|
||||
|
//import cn.hutool.core.util.ArrayUtil;
|
||||
|
//import cn.hutool.core.util.ObjectUtil;
|
||||
|
//import cn.hutool.http.HttpRequest;
|
||||
|
//import cn.hutool.http.HttpResponse;
|
||||
|
//import cn.hutool.http.HttpUtil;
|
||||
|
//import com.alibaba.fastjson.JSONObject;
|
||||
|
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
//import com.kms.yg.dd.domain.AttDiscBase;
|
||||
|
//import com.kms.yg.dd.service.AttDiscBaseService;
|
||||
|
//import com.kms.yg.df.domain.*;
|
||||
|
//import com.kms.yg.df.domain.dto.BsSgcDfSwtzDto;
|
||||
|
//import com.kms.yg.df.service.*;
|
||||
|
//import com.kms.yg.ly.domain.AttBasBase;
|
||||
|
//import com.kms.yg.ly.service.AttBasBaseService;
|
||||
|
//import com.kms.yg.rv.domain.AttRvBase;
|
||||
|
//import com.kms.yg.rv.service.AttRvBaseService;
|
||||
|
//import com.kms.yg.sk.domain.AttResBase;
|
||||
|
//import com.kms.yg.sk.domain.AttResRspp;
|
||||
|
//import com.kms.yg.sk.service.AttResBaseService;
|
||||
|
//import com.kms.yg.sk.service.AttResRsppService;
|
||||
|
//import com.kms.yg.sz.domain.BsSgcSzCxjl;
|
||||
|
//import com.kms.yg.sz.domain.BsSgcSzGcjg;
|
||||
|
//import com.kms.yg.sz.domain.BsSgcSzSafeJbxx;
|
||||
|
//import com.kms.yg.sz.domain.BsSgcSzSwtz;
|
||||
|
//import com.kms.yg.sz.service.BsSgcSzCxjlService;
|
||||
|
//import com.kms.yg.sz.service.BsSgcSzGcjgService;
|
||||
|
//import com.kms.yg.sz.service.BsSgcSzSafeJbxxService;
|
||||
|
//import com.kms.yg.sz.service.BsSgcSzSwtzService;
|
||||
|
//import com.kms.yg.xgxd.domain.AttDpdsBase;
|
||||
|
//import com.kms.yg.xgxd.service.AttDpdsBaseService;
|
||||
|
//import com.shuili.common.utils.password.MD5Util;
|
||||
|
//import io.swagger.models.auth.In;
|
||||
|
//import lombok.Data;
|
||||
|
////import org.apache.commons.lang.SerializationUtils;
|
||||
|
//import org.checkerframework.checker.units.qual.A;
|
||||
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
//import org.springframework.context.annotation.Configuration;
|
||||
|
//import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
//import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
//import org.springframework.stereotype.Component;
|
||||
|
//import org.springframework.stereotype.Controller;
|
||||
|
//import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
//import org.springframework.web.bind.annotation.RestController;
|
||||
|
//
|
||||
|
//import java.util.ArrayList;
|
||||
|
//import java.util.Date;
|
||||
|
//import java.util.HashMap;
|
||||
|
//import java.util.List;
|
||||
|
//import java.util.concurrent.*;
|
||||
|
//import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
//import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
//import java.util.stream.Collectors;
|
||||
|
//
|
||||
|
//@Configuration
|
||||
|
//@Component
|
||||
|
//public class YgSynchronous {
|
||||
|
//
|
||||
|
// @Autowired
|
||||
|
// AttResRsppService attResRsppService;
|
||||
|
// @Autowired
|
||||
|
// AttResBaseService attResBaseService;
|
||||
|
// @Autowired
|
||||
|
// AttRvBaseService attRvBaseService;
|
||||
|
//
|
||||
|
// @Autowired
|
||||
|
// AttDpdsBaseService attDpdsBaseService;
|
||||
|
// @Autowired
|
||||
|
// AttBasBaseService attBasBaseService;
|
||||
|
// @Autowired
|
||||
|
// AttDiscBaseService attDiscBaseService;
|
||||
|
//
|
||||
|
// @Autowired
|
||||
|
// BsSgcSzSafeJbxxService bsSgcSzSafeJbxxService;
|
||||
|
//
|
||||
|
// @Autowired
|
||||
|
// BsSgcDfSafeJbxxService bsSgcDfSafeJbxxService;
|
||||
|
//
|
||||
|
// @Autowired
|
||||
|
// BsSgcDfSwtzService bsSgcDfSwtzService;
|
||||
|
// private static final int MAX_RETRIES = 3;
|
||||
|
//
|
||||
|
//
|
||||
|
// private static String XH3CID = "3359137640337";
|
||||
|
//
|
||||
|
// private static String XH3CAPPKEY = "q7sli9ch";
|
||||
|
//
|
||||
|
// ExecutorService executorService = Executors.newFixedThreadPool(50);
|
||||
|
//
|
||||
|
// public String sendRequest(String url){
|
||||
|
// int retries = 0;
|
||||
|
// while (retries < MAX_RETRIES) {
|
||||
|
// try {
|
||||
|
// HttpRequest request = HttpRequest.get(url);
|
||||
|
// request.setConnectionTimeout(200000000);
|
||||
|
// request.setReadTimeout(500000000);
|
||||
|
// return request.execute().body();
|
||||
|
// } catch (Exception e) {
|
||||
|
// retries++;
|
||||
|
// System.out.println("请求失败,重试第 " + retries + " 次...");
|
||||
|
// }
|
||||
|
// }
|
||||
|
// System.out.println("达到最大重试次数,请求失败。");
|
||||
|
// return null;
|
||||
|
// }
|
||||
|
//
|
||||
|
// //水库特征
|
||||
|
// static final String sktz = "http://19.25.35.205:31190/ZHSL_ZY/jck/ytjgx/dws_att_res_rspp" ;
|
||||
|
// //水库基本数据
|
||||
|
// static final String sksj = "http://19.25.35.205:31190/ZHSL_ZY/jck/ygtjgx/dws_att_res_base" ;
|
||||
|
// //河流基本数据
|
||||
|
// static final String rvsj = "http://19.25.35.205:31190/ZHSL_ZY/jck/yggx/dws_att_rv_base" ;
|
||||
|
// //提段基本数据
|
||||
|
// static final String ddsj = "http://19.25.35.205:31190/ZHSL_ZY/jck/yggx/dws_att_disc_base" ;
|
||||
|
// //险工险段基本数据
|
||||
|
// static final String xgxdsj = "http://19.25.35.205:31190/ZHSL_ZY/jck/yggx/dws_att_dpds_base" ;
|
||||
|
// //流域基本数据
|
||||
|
// static final String llsj = "http://19.25.35.205:31190/ZHSL_ZY/jck/ytjgx/dws_att_bas_base" ;
|
||||
|
//
|
||||
|
// //水闸行政区划关系数据
|
||||
|
// static final String drwa="http://19.25.35.205:31190/ZHSL_ZY/dws_rel_waga_ad";
|
||||
|
// //堤防行政区划关系数据
|
||||
|
// static final String drda="http://19.25.35.205:31190/ZHSL_ZY/dws_rel_dike_ad";
|
||||
|
// //堤防水文特征数据
|
||||
|
// static final String dadt="http://19.25.35.205:31190/ZHSL_ZY/jck/ytjgx/dws_att_dike_bsfst";
|
||||
|
//
|
||||
|
//
|
||||
|
// //水闸编码***
|
||||
|
// static final String dawc = "http://19.25.35.205:31190/ZHSL_ZY/dws_att_waga_code";
|
||||
|
// //水闸基础信息
|
||||
|
// static final String dawb= "http://19.25.35.205:31190/ZHSL_ZY/jck/yggx/dws_att_waga_base";
|
||||
|
// //水闸水文特征***
|
||||
|
// static final String daws = "http://19.25.35.205:31190/ZHSL_ZY/jck/ytjgx/dws_att_waga_slhypr";
|
||||
|
// //水闸工程结构***
|
||||
|
// static final String dawsl= "http://19.25.35.205:31190/ZHSL_ZY/dws_att_waga_sligvl";
|
||||
|
// //水闸出险记录***
|
||||
|
// static final String dawst= "http://19.25.35.205:31190/ZHSL_ZY/jck/yggx/dws_att_waga_sldnnt";
|
||||
|
// //堤防基础信息
|
||||
|
// static final String dadb= "http://19.25.35.205:31190/ZHSL_ZY/jck/yggx/dws_att_dike_base";
|
||||
|
// //堤防历史决溢记录***
|
||||
|
// static final String dadd = "http://19.25.35.205:31190/ZHSL_ZY/jck/ytjgx/dws_att_dike_dkhos";
|
||||
|
// //堤防主要效益指标***
|
||||
|
// static final String daddt = "http://19.25.35.205:31190/ZHSL_ZY/jck/ytjgx/dws_att_dike_dbiabt";
|
||||
|
//
|
||||
|
// /**
|
||||
|
// * 同步
|
||||
|
// */
|
||||
|
// public void synchronous() {
|
||||
|
// int pageNum = 1;
|
||||
|
// int pageSize = 1000;
|
||||
|
// Boolean f = true;
|
||||
|
// HashMap<String, Object> hashMap = new HashMap<>();
|
||||
|
// int i = 1;
|
||||
|
// while (f) {
|
||||
|
// String s = sendRequest(ddsj + "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
// List<AttDiscBase> attResRspps = JSONObject.parseArray(data, AttDiscBase.class);
|
||||
|
// if(attResRspps.size()<pageSize){
|
||||
|
// f = false;
|
||||
|
// }
|
||||
|
// for (AttDiscBase attDiscBase : attResRspps) {
|
||||
|
// hashMap.put(attDiscBase.getDiscCode(),i++);
|
||||
|
// attDiscBase.preInsert();
|
||||
|
// attDiscBase.setId(attDiscBase.getDiscCode());
|
||||
|
// attDiscBaseService.save(attDiscBase);
|
||||
|
// }
|
||||
|
//// CopyOnWriteArrayList<AttDiscBase> attDiscBases = CollectionUtil.newCopyOnWriteArrayList(attResRspps);
|
||||
|
//// executorService.execute(new sktz(attResRspps));
|
||||
|
// pageNum++;
|
||||
|
// }
|
||||
|
// }
|
||||
|
//
|
||||
|
// @Data
|
||||
|
// class sktz implements Runnable{
|
||||
|
//
|
||||
|
// private List<AttDiscBase> list;
|
||||
|
//
|
||||
|
// public sktz(List<AttDiscBase> list){
|
||||
|
// this.list = list;
|
||||
|
// }
|
||||
|
//
|
||||
|
// @Override
|
||||
|
// public void run() {
|
||||
|
// int a = 1;
|
||||
|
// for (AttDiscBase attDiscBase : list) {
|
||||
|
// attDiscBase.preInsert();
|
||||
|
//// attResRspp.setId(attResRspp.getDiscCode());
|
||||
|
// boolean save = attDiscBaseService.save(attDiscBase);
|
||||
|
// if(save){
|
||||
|
// System.out.println(a++);
|
||||
|
// if(a>=1000){
|
||||
|
// System.out.println("批量处理完成1000条------------------------------------");
|
||||
|
// } }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
//
|
||||
|
//
|
||||
|
// @GetMapping("dadb")
|
||||
|
// @Scheduled(initialDelay = 0, fixedRate = Long.MAX_VALUE)
|
||||
|
// public void dadb(){
|
||||
|
// int pageNum=1;
|
||||
|
// int pageSize=999999;
|
||||
|
// String s=sendRequest(dadb+"?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
// String s1=sendRequest(drda+"?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
// String data=JSONObject.parseObject(s).getString("data");
|
||||
|
// String dataAcad=JSONObject.parseObject(s1).getString("data");
|
||||
|
// List<BsSgcDfSafeJbxx> bsSgcDfSafeJbxxes=JSONObject.parseArray(data, BsSgcDfSafeJbxx.class);
|
||||
|
// List<BsSgcDfSafeJbxx> bsSgcDfSafeJbxxesAcad=JSONObject.parseArray(dataAcad, BsSgcDfSafeJbxx.class);
|
||||
|
// bsSgcDfSafeJbxxesAcad.forEach(bsSgcDfSafeJbxx -> {
|
||||
|
// bsSgcDfSafeJbxx.preInsert();
|
||||
|
// bsSgcDfSafeJbxx.setId(bsSgcDfSafeJbxx.getDikeCode());
|
||||
|
// bsSgcDfSafeJbxx.setAdcd(bsSgcDfSafeJbxx.getAdcd().substring(0, Math.min(bsSgcDfSafeJbxx.getAdcd().length(), 6)));
|
||||
|
// bsSgcDfSafeJbxxService.saveOrUpdate(bsSgcDfSafeJbxx);
|
||||
|
// });
|
||||
|
// bsSgcDfSafeJbxxes.forEach(bsSgcDfSafeJbxx -> {
|
||||
|
// bsSgcDfSafeJbxx.preInsert();
|
||||
|
// bsSgcDfSafeJbxx.setStatus("6");
|
||||
|
// bsSgcDfSafeJbxx.setId(bsSgcDfSafeJbxx.getDikeCode());
|
||||
|
// bsSgcDfSafeJbxxService.saveOrUpdate(bsSgcDfSafeJbxx);
|
||||
|
// });
|
||||
|
// }
|
||||
|
//
|
||||
|
//// @GetMapping("dawb")
|
||||
|
//// @Scheduled(initialDelay = 0, fixedRate = Long.MAX_VALUE)
|
||||
|
//// public void dawb(){
|
||||
|
//// int pageNum=1;
|
||||
|
//// int pageSize=999999;
|
||||
|
//// String s=sendRequest(dawb+"?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String s1=sendRequest(drwa+"?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data=JSONObject.parseObject(s).getString("data");
|
||||
|
//// String dataAcad=JSONObject.parseObject(s1).getString("data");
|
||||
|
//// List<BsSgcSzSafeJbxx> bsSgcSzSafeJbxxes=JSONObject.parseArray(data, BsSgcSzSafeJbxx.class);
|
||||
|
//// List<BsSgcSzSafeJbxx> bsSgcSzSafeJbxxesAcad=JSONObject.parseArray(dataAcad, BsSgcSzSafeJbxx.class);
|
||||
|
////
|
||||
|
//// bsSgcSzSafeJbxxesAcad.forEach(bsSgcSzSafeJbxx-> {
|
||||
|
//// bsSgcSzSafeJbxx.preInsert();
|
||||
|
//// bsSgcSzSafeJbxx.setId(bsSgcSzSafeJbxx.getWagaCode());
|
||||
|
//// bsSgcSzSafeJbxx.setAdcd(bsSgcSzSafeJbxx.getAdcd().substring(0, Math.min(bsSgcSzSafeJbxx.getAdcd().length(), 6)));
|
||||
|
//// bsSgcSzSafeJbxxService.saveOrUpdate(bsSgcSzSafeJbxx);
|
||||
|
//// });
|
||||
|
//// bsSgcSzSafeJbxxes.forEach(bsSgcSzSafeJbxx -> {
|
||||
|
//// bsSgcSzSafeJbxx.preInsert();
|
||||
|
//// bsSgcSzSafeJbxx.setStatus("6");
|
||||
|
//// bsSgcSzSafeJbxx.setId(bsSgcSzSafeJbxx.getWagaCode());
|
||||
|
//// bsSgcSzSafeJbxxService.saveOrUpdate(bsSgcSzSafeJbxx);
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
////
|
||||
|
////
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 水库基本信息
|
||||
|
//// */
|
||||
|
//// @GetMapping("sksj")
|
||||
|
//// @Scheduled(cron = "0 0 0 * * ?")
|
||||
|
//// public void sksj(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 999999;
|
||||
|
//// String s = sendRequest(sksj + "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<AttResBase> attResRspps = JSONObject.parseArray(data, AttResBase.class);
|
||||
|
//// attResRspps.forEach(attResRspp -> {
|
||||
|
//// attResRspp.preInsert();
|
||||
|
//// attResRspp.setId(attResRspp.getResCode());
|
||||
|
//// attResBaseService.saveOrUpdate(attResRspp);
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 河流基础信息
|
||||
|
//// */
|
||||
|
//// @GetMapping("rvsj")
|
||||
|
//// @Scheduled(cron = "0 0 0 * * ?")
|
||||
|
//// public void rvsj(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 999999;
|
||||
|
//// String s = sendRequest(rvsj + "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<AttRvBase> attRvBases = JSONObject.parseArray(data, AttRvBase.class);
|
||||
|
//// attRvBases.forEach(attResRspp -> {
|
||||
|
//// attResRspp.preInsert();
|
||||
|
//// attResRspp.setId(attResRspp.getRvCode());
|
||||
|
//// attRvBaseService.saveOrUpdate(attResRspp);
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
////
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 险工险峻信息
|
||||
|
//// */
|
||||
|
//// @GetMapping("dpds")
|
||||
|
//// @Scheduled(cron = "0 0 0 * * ?")
|
||||
|
//// public void dpds(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 999999;
|
||||
|
//// String s = sendRequest(xgxdsj + "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<AttDpdsBase> attRvBases = JSONObject.parseArray(data, AttDpdsBase.class);
|
||||
|
//// attRvBases.forEach(attResRspp -> {
|
||||
|
//// attResRspp.preInsert();
|
||||
|
//// attResRspp.setId(attResRspp.getDpdsCode());
|
||||
|
//// attDpdsBaseService.saveOrUpdate(attResRspp);
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
//
|
||||
|
//
|
||||
|
// /**
|
||||
|
// * 提段基本数据
|
||||
|
// */
|
||||
|
//// @GetMapping("disc")
|
||||
|
//// @Scheduled(cron = "0 0 0 * * ?")
|
||||
|
//// public void disc(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 999999;
|
||||
|
//// String s = sendRequest(ddsj + "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<AttDiscBase> attRvBases = JSONObject.parseArray(data, AttDiscBase.class);
|
||||
|
//// attRvBases.forEach(attResRspp -> {
|
||||
|
//// attResRspp.preInsert();
|
||||
|
//// attResRspp.setId(attResRspp.getDiscCode());
|
||||
|
//// attDiscBaseService.saveOrUpdate(attResRspp);
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
//
|
||||
|
//
|
||||
|
// /**
|
||||
|
// * 流域基本数据
|
||||
|
// */
|
||||
|
//// @GetMapping("bas")
|
||||
|
//// @Scheduled(cron = "0 0 0 * * ?")
|
||||
|
//// public void bas(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 99999;
|
||||
|
//// String s = sendRequest( llsj+ "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<AttBasBase> attRvBases = JSONObject.parseArray(data, AttBasBase.class);
|
||||
|
//// attRvBases.forEach(attResRspp -> {
|
||||
|
//// attResRspp.preInsert();
|
||||
|
//// attResRspp.setId(attResRspp.getBasCode());
|
||||
|
//// attBasBaseService.saveOrUpdate(attResRspp);
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 水闸编码
|
||||
|
//// */
|
||||
|
//// @GetMapping("dawc")
|
||||
|
//// @Scheduled(cron = "0 0 0 * * ?")
|
||||
|
//// public void dawc(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 99999;
|
||||
|
//// String s = sendRequest( dawc+ "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
////
|
||||
|
//// }
|
||||
|
//
|
||||
|
//// @Autowired
|
||||
|
//// BsSgcSzSwtzService bsSgcSzSwtzService;
|
||||
|
//// @Autowired
|
||||
|
//// BsSgcSzGcjgService bsSgcSzGcjgService;
|
||||
|
//// @Autowired
|
||||
|
//// BsSgcSzCxjlService bsSgcSzCxjlService;
|
||||
|
//// @Autowired
|
||||
|
//// BsSgcDfJyjlService bsSgcDfJyjlService;
|
||||
|
//// @Autowired
|
||||
|
//// BsSgcDfGcxyService bsSgcDfGcxyService;
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 水闸水文特征
|
||||
|
//// */
|
||||
|
//// @GetMapping("水闸水文特征")
|
||||
|
//// @Scheduled(initialDelay = 0, fixedRate = Long.MAX_VALUE)
|
||||
|
//// public void daws(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 9999999;
|
||||
|
//// String s = sendRequest( daws+ "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<BsSgcSzSwtz> bsSgcSzSwtzs = JSONObject.parseArray(data, BsSgcSzSwtz.class);
|
||||
|
//// for (BsSgcSzSwtz bsSgcSzSwtz : bsSgcSzSwtzs) {
|
||||
|
//// bsSgcSzSwtz.preInsert();
|
||||
|
//// bsSgcSzSwtz.setId(bsSgcSzSwtz.getWagaCode());
|
||||
|
//// bsSgcSzSwtzService.saveOrUpdate(bsSgcSzSwtz);
|
||||
|
//// }
|
||||
|
////
|
||||
|
//// }
|
||||
|
////
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 水闸工程结构
|
||||
|
//// */
|
||||
|
//// @GetMapping("dawsl")
|
||||
|
//// @Scheduled(initialDelay = 0, fixedRate = Long.MAX_VALUE)
|
||||
|
//// public void dawsl(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 9999999;
|
||||
|
//// String s = sendRequest( dawsl+ "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<BsSgcSzGcjg> bsSgcSzGcjgs = JSONObject.parseArray(data, BsSgcSzGcjg.class);
|
||||
|
//// for (BsSgcSzGcjg bsSgcSzGcjg : bsSgcSzGcjgs) {
|
||||
|
//// bsSgcSzGcjg.preInsert();
|
||||
|
//// bsSgcSzGcjg.setId(bsSgcSzGcjg.getWagaCode());
|
||||
|
//// bsSgcSzGcjgService.saveOrUpdate(bsSgcSzGcjg);
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
////
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 水闸出险记录
|
||||
|
//// */
|
||||
|
//// @GetMapping("dawst")
|
||||
|
//// @Scheduled(initialDelay = 0, fixedRate = Long.MAX_VALUE)
|
||||
|
//// public void dawst(){
|
||||
|
//// System.out.println("执行了00000000000");
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 9999999;
|
||||
|
//// String s = sendRequest( dawst+ "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<BsSgcSzCxjl> bsSgcSzCxjls = JSONObject.parseArray(data, BsSgcSzCxjl.class);
|
||||
|
//// for (BsSgcSzCxjl bsSgcSzCxjl : bsSgcSzCxjls) {
|
||||
|
//// bsSgcSzCxjl.preInsert();
|
||||
|
//// Date fntm = bsSgcSzCxjl.getDntm();
|
||||
|
//// String u = bsSgcSzCxjl.getWagaCode()+fntm.getTime();
|
||||
|
//// String id = MD5Util.MD5Encode(u, "utf-8");
|
||||
|
//// bsSgcSzCxjl.setId(id);
|
||||
|
//// bsSgcSzCxjlService.saveOrUpdate(bsSgcSzCxjl);
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
////
|
||||
|
////
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 堤防历史决溢记录
|
||||
|
//// */
|
||||
|
//// @GetMapping("dadd")
|
||||
|
//// @Scheduled(initialDelay = 0, fixedRate = Long.MAX_VALUE)
|
||||
|
//// public void dadd(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 9999999;
|
||||
|
//// String s = sendRequest( dadd+ "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<BsSgcDfJyjl> bsSgcSzCxjls = JSONObject.parseArray(data, BsSgcDfJyjl.class);
|
||||
|
//// for (BsSgcDfJyjl bsSgcSzCxjl : bsSgcSzCxjls) {
|
||||
|
//// bsSgcSzCxjl.preInsert();
|
||||
|
//// Date brspTime = bsSgcSzCxjl.getBrspDateTime();
|
||||
|
//// String dikeCode = bsSgcSzCxjl.getDikeCode();
|
||||
|
//// String u = brspTime.getTime() + dikeCode;
|
||||
|
//// String id = MD5Util.MD5Encode(u, "utf-8");
|
||||
|
//// bsSgcSzCxjl.setId(id);
|
||||
|
//// bsSgcDfJyjlService.saveOrUpdate(bsSgcSzCxjl);
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
////
|
||||
|
////
|
||||
|
//// /**
|
||||
|
//// * 堤防历史决溢记录
|
||||
|
//// */
|
||||
|
//// @GetMapping("daddt")
|
||||
|
//// @Scheduled(initialDelay = 0, fixedRate = Long.MAX_VALUE)
|
||||
|
//// public void daddt(){
|
||||
|
//// int pageNum = 1;
|
||||
|
//// int pageSize = 9999999;
|
||||
|
//// String s = sendRequest( daddt+ "?pageNum=" + pageNum + "&pageSize=" + pageSize);
|
||||
|
//// String data = JSONObject.parseObject(s).getString("data");
|
||||
|
//// List<BsSgcDfGcxy> bsSgcDfGcxies = JSONObject.parseArray(data, BsSgcDfGcxy.class);
|
||||
|
//// bsSgcDfGcxyService.remove(new QueryWrapper<>());
|
||||
|
//// for (BsSgcDfGcxy bsSgcDfGcxy : bsSgcDfGcxies) {
|
||||
|
//// bsSgcDfGcxy.preInsert();
|
||||
|
//// bsSgcDfGcxyService.saveOrUpdate(bsSgcDfGcxy);
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//
|
||||
|
//
|
||||
|
//
|
||||
|
//}
|
Loading…
Reference in new issue