统计 <!--应用管理-应用服务流量统计--><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.
对接接口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();.
类似枚举 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.
下载模板 @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, .
定时器 @Configuration@EnableSchedulingpublic class ConsTask { Logger logger = LoggerFactory.getLogger(ConsTask.class); @Resource private InterfaceService interfaceService; /** * 每天获取一次前一天的 */ @Scheduled(cron = "${cron.scheduled.
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.
两int相除保留小数 double f1 = new BigDecimal((float)100*paramNum/totalNum).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
改变表结构 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.
字段关键字 人大金仓 `NAME`, `STATUS` insert into sr ("NAME", "STATUS" mysql `NAME`, `TYPE` insert into rd (STANDARD_NUMBER, `NAME`, `TYPE`,
查询多表 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 '%法%'...
重复列表 先加条件,再从搜索结果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 <= '...
去重 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 ...
对接接口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"); .
对接接口 @Override public Result connectMethod(String param) throws IOException, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException { boolean f = false; if(f) { ..
日期、长整型 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"...
分页展示 @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 .
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...
根据多关键字查询 SELECT * FROM "PUBLIC"."house_disaster_event" WHERE "disaster_event_name" LIKE '%内蒙古%' AND "disaster_event_name" LIKE '%风暴%'
将单元格内容转换为字符串 public static String convertCellValueToString(Cell cell) { if (cell == null) { return null; } String returnValue = null; switch (cell.getCellType()) { //数字 case NUMERIC: Double doubleValue = cell.getNume.