自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(64)
  • 收藏
  • 关注

原创 oracle查询结果加一列序号

trunc(DBMS_RANDOM.value(1,100))

2021-08-24 16:02:15 1938

原创 统计

<!--应用管理-应用服务流量统计--><select id="selectAppServerStatByPage" parameterType="java.util.Map" resultType="cn.piesat.operationsupport.entity.vo.AppManagerStatVo"> select * from (SELECT t2.APPLICAT appName,count(1) pv,sum(t2.SEND_TRAFFIC) sendTraf.

2021-05-26 16:03:56 109

原创 对接接口3

private String getReturnData(String url) throws IOException { URL readUrl = new URL(url); HttpURLConnection conn = (HttpURLConnection) readUrl.openConnection(); conn.setRequestMethod("GET"); conn.setReadTimeout(100000); conn.connect();.

2021-05-26 15:52:41 114

原创 类似枚举

public static final String[] rainType = new String[]{"250", "特大暴雨", "100", "大暴雨", "50", "暴雨", "25", "大雨", "10", "中雨或暴雪", "5", "小雨或大雪", "2.5", "小雨或中雪", "0.1", "小雨或小雪"};private String getLevelName(String num){ String s = ""; for(int i=0; i<rai.

2021-05-26 15:42:04 90

原创 下载模板

@GetMapping("/downloadTemplate")@ApiOperation(value = "下载模板信息(1事件,2台账,3重建)", response = Result.class)public void downloadTemplate(@ApiParam(required = true, value = "param", name = "param") @RequestParam(name = "param") String param, .

2021-05-26 15:36:21 54

原创 定时器

@Configuration@EnableSchedulingpublic class ConsTask { Logger logger = LoggerFactory.getLogger(ConsTask.class); @Resource private InterfaceService interfaceService; /** * 每天获取一次前一天的 */ @Scheduled(cron = "${cron.scheduled.

2021-05-26 15:25:52 55

原创 select中拼接字符串

<select id="getStatsByArea" resultMap="BaseResultMap"> SELECT ${areaName} areaCode, t.area_name areaName, COUNT(house_damage_id) totalNum, to_char(disaster_date,'yyyy') theYear ${typeName} FROM house_damage_ledger LEFT J.

2021-05-26 14:33:09 3790

原创 两int相除保留小数

double f1 = new BigDecimal((float)100*paramNum/totalNum).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();

2021-05-26 14:28:27 784

原创 改变表结构

alter table fxown_house add column create_time datetime not null comment '创建时间';alter table house_ledger drop disaster_type, DROP disaster_date;alter table house_ledger modify column disaster_event bigint NOT NULL COMMENT '灾害事件ID';UPDATE support_netraf.

2021-05-06 16:48:27 68

原创 字段关键字

人大金仓 `NAME`, `STATUS` insert into sr ("NAME", "STATUS" mysql `NAME`, `TYPE` insert into rd (STANDARD_NUMBER, `NAME`, `TYPE`,

2021-04-29 14:33:23 139

原创 查询多表

select LEGAL_ID as id, name as title,1 as type from rl WHERE name like '%法%'union allselect MSDS_ID as id,name as title,2 as type from rs WHERE name like '%法%'union allselect STANDARD_ID as id,name as title,3 as type from rd WHERE name like '%法%'...

2021-04-29 14:24:20 52

原创 重复列表

先加条件,再从搜索结果group bySELECT * FROM house_damage_ledgerWHERE household_head_id in(SELECT household_head_id FROM (SELECT household_head_id, area_code, to_char(disaster_date,'yyyy') as ye FROM house_damage_ledgerWHERE ye >= '2014' and ye <= '...

2021-04-26 13:17:12 94

原创 去重

DELETEFROM house_damage_ledgerWHERE (area_code, household_head_id) IN ( SELECT t.area_code, t.household_head_id FROM ( SELECT area_code, household_head_id ...

2021-04-26 10:59:09 67

原创 对接接口2

public Result getMemoryStatus(String param) throws IOException, ParseException { String url = "http://emla.svc.cluster.local/apis/v1/ecms/dashboard?metrics_filter="; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); .

2021-04-25 15:09:31 57

原创 对接接口

@Override public Result connectMethod(String param) throws IOException, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException { boolean f = false; if(f) { ..

2021-04-25 15:00:42 80

原创 日期、长整型

import java.text.SimpleDateFormat;import java.text.ParseException;import java.util.Date;class Untitled { public static void main(String[] args) throws ParseException { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"...

2021-04-22 10:36:52 213

原创 分页展示

@Overridepublic Result<PageInfo<HEvent>> selectEvent(Integer pageNo, Integer pageSize, String codeName, String startDate, String endDate, Integer dType, String eName){ long begin = System.currentTimeMillis(); pageNo = pageNo == null .

2021-04-16 13:07:03 60

原创 text改为longtext

CREATE TABLE `edata` ( `DATA_ID` bigint NOT NULL AUTO_INCREMENT COMMENT '数据ID', `EVENT_ID` bigint DEFAULT NULL COMMENT '事件ID', `SURVEY_DIRECTORY` varchar(1000) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '调查报告目录', `SURVEY_CONTENT` longtext CHAR...

2021-04-16 09:03:48 603

原创 根据多关键字查询

SELECT * FROM "PUBLIC"."house_disaster_event" WHERE "disaster_event_name" LIKE '%内蒙古%' AND "disaster_event_name" LIKE '%风暴%'

2021-04-14 17:32:34 206

原创 将单元格内容转换为字符串

public static String convertCellValueToString(Cell cell) { if (cell == null) { return null; } String returnValue = null; switch (cell.getCellType()) { //数字 case NUMERIC: Double doubleValue = cell.getNume.

2021-04-13 17:44:46 1483

原创 控制台打出sql语句

方法一:mybatis-config.xml<setting name="logImpl" value="STDOUT_LOGGING"/>方法二:application.ymllogging: config: classpath:log4j2.xml level: #sql输出 cn.piesat.jinmin.rebuild.mapper: debug

2021-04-12 11:14:26 201

原创 poi相关

@Overridepublic Result importData(MultipartFile file) { long l1 = System.currentTimeMillis(); if (!file.isEmpty()) { if (!file.getOriginalFilename().endsWith("xlsx") && !file.getOriginalFilename().endsWith("xls")) { re.

2021-04-09 16:22:32 70

原创 jasypt集成springboot加密数据库密码的配置

test明文假密码 123456真正的密码cd C:\Users\admin\.m2\repository\org\jasypt\jasypt\1.9.2java -cp jasypt-1.9.2.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="123456" password=test algorithm=PBEWithMD5AndDESjava -cp jasypt-1.9.2.jar org.jasypt.intf.c

2021-04-09 08:34:51 87

原创 `SHAPE` geometry DEFAULT NULL,根据点经纬度查找所在行政区划

<select id="selectByLevel" parameterType="string" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from base_region where ST_Contains(shape,point(${point})) =1 order by F_LEVEL asc</select>MULTIPOLYGO.

2021-04-08 08:54:00 167

原创 mysql语句中字段名不能用双引号

List<BaseArea> selectByIds(@Param("areaIds") List<String> areaIds);<select id="selectByIds" resultMap="BaseResultMap">select <include refid="Base_Column_List" /> from base_area <where> <if test="areaIds !.

2021-04-08 08:46:07 599

原创 jdbcType

@ApiModel(value="com-entity-GuaranteeMaterial")public class GuaranteeMaterial implements Serializable { @ApiModelProperty(value="ID") private Long materialId;<id column="MATERIAL_ID" jdbcType="BIGINT" property="materialId" /><i.

2021-03-31 17:06:34 67

原创 vo

@ApiModel(value="com-entity-GuaranteeRescueTeam")public class GuaranteeRescueTeam implements Serializable { @ApiModelProperty(value="类型")private Integer type;private String typeName;//getter/setter<select id="select" resultType="com.piesat..

2021-03-26 13:41:47 61

原创 application.yml

server: port: 8011 maxThreads: 150 maxSpareThreads: 75 tomcat: uri-encoding: UTF-8 basedir: /data/tomcatdata/dataspring: batch: initialize-schema: always # 默认情况下,项目启动时就会自动执行配置好的批处理操作。这里将其设为不自动执行,后面我们通过手动触发执行批处理 job: en.

2021-03-24 16:22:49 110

原创 动态转换数据文件

@Api(value = "CreateExcelController", tags = "导入数据文件", position = 1)@RequestMapping("/createexcel")@RestController@CrossOriginpublic class CreateExcelController { @Resource private ICreateExcelTableService createExcelService;@ApiOperation(v.

2021-03-24 16:16:13 73

原创 p-pom.xml

<?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 https://maven.apache.org/xsd/maven-4.0..

2021-03-24 14:39:22 101

原创 monitor-pom.xml

<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVer.

2021-03-24 14:35:37 106

原创 pom.xml

<?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/ma.

2021-03-24 14:33:22 97 1

原创 将传入的json串生成文件,文件地址作为参数传入C#后端接口生成shp文件,最后将文件打包并把压缩文件地址发给前端

import com.alibaba.fastjson.JSONObject;import com.riskMonitor.service.acs4sql.IofJsonService;import com.riskMonitor.utils.ConfigUtil;import org.springframework.stereotype.Service;import java.io.*;import java.text.SimpleDateFormat;import java.util.A.

2021-03-24 13:24:31 199

原创 预案

pom.xml<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.8</version></dependency><dependency> <groupId>org.apache.poi</groupId&.

2021-03-23 08:52:56 69

原创 ConfigUtil

public class ConfigUtil { public static String rootPath; public static String getRootPath() { return rootPath= getConfigPropertiesValue("CSV_FILE_PATH"); } public static void setRootPath(String rootPath) { ConfigUtil.root.

2021-03-19 13:58:49 155

原创 application.yml

server: port: 8887 servlet: context-path: /opspring: application: name: jm-op datasource: driver-class-name: com.kingbase8.Driver name: defaultDataSource url: jdbc:kingbase8://ip:54321/JINMIN .

2021-03-19 13:29:51 48

原创 pom.xml

<?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 https://maven.apache.org/xsd/maven-4.0..

2021-03-19 13:27:14 42

原创 封装后分页

import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.stereotype.Service;import org.springframework.transaction.annotation.Propagation;import org.springframework.transaction.annotation.Transactional;import org.springframew.

2021-03-18 11:25:10 74

原创 Mybatis generator

右击要生成代码的表名,Mybatis generator,java model包名: com.ps.iems.entityjava model source目录: E:/iems/src/main/javajava mapper包名: com.ps.iems.mapperjava mapper source目录: E:/iems/src/main/javamapper xml包名: mapperxml resour...

2021-03-11 15:41:52 71

原创 git相关

1、 安装maven(注意:必须安装JDK,可在命令提示符窗口输入java -version 命令查看 JDK 版本)1)下载Maven的安装包,http://maven.apache.org/download.cgi 点击apache-maven-3.*-bin.zip 链接下载2)下载后的文件为apache-maven-3.*-bin.zip 压缩包,将其解压到一个固定的文件夹。我的是解压到D:\softs 目录下,更新Maven时只需要下载新的Maven包,解压到此目录并修改环境变量...

2021-03-05 13:08:06 85 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除