Compare commits
2 Commits
f78d261c6d
...
8fb5d1bbe3
| Author | SHA1 | Date |
|---|---|---|
|
|
8fb5d1bbe3 | 8 months ago |
|
|
5a63557a2e | 8 months ago |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="SonarLintModuleSettings">
|
||||
<option name="uniqueId" value="fd29a122-927c-479e-ae89-fc24c186996c" />
|
||||
</component>
|
||||
</module>
|
||||
@ -1,116 +1,121 @@
|
||||
package com.nmggs.query.common.utils;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileLock;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
|
||||
public class LogUtil {
|
||||
|
||||
public static String TomcatPath = System.getProperty("catalina.home");
|
||||
|
||||
private static String getFilePath() {
|
||||
|
||||
return TomcatPath ;
|
||||
}
|
||||
|
||||
public static void WriteLog_Gantry(String msg, String disStr) {
|
||||
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
String fileName = f.format(new Date()) + "_Gantry";
|
||||
WriteLog(fileName, msg, disStr);
|
||||
}
|
||||
public static void WriteLog_ETCSuccessRateQuery(String msg, String disStr) {
|
||||
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
String fileName = f.format(new Date()) + "_ETCSuccessRateQuery";
|
||||
WriteLog(fileName, msg, disStr);
|
||||
}
|
||||
public static void WriteLog_Info(String msg, String disStr) {
|
||||
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
String fileName = f.format(new Date()) + "_Info";
|
||||
WriteLog(fileName, msg, disStr);
|
||||
}
|
||||
|
||||
public static void WriteLog_Error(String msg, String disStr) {
|
||||
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
String fileName = f.format(new Date()) + "_Error";
|
||||
WriteLog(fileName, msg, disStr);
|
||||
}
|
||||
public static void WriteLog_237SplitJson(String msg, String disStr) {
|
||||
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
String fileName = f.format(new Date()) + "_237SplitJson";
|
||||
WriteLog(fileName, msg, disStr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void WriteLog(String suffix, String content, String disStr) {
|
||||
try {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
||||
String baseDir = getFilePath() + "/logs/ETCLaneMonitoringEvaluation/";
|
||||
FileUtil.fileCreat(baseDir);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String str = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss SSS")) + "-->类【" + disStr + "】:";
|
||||
sb.append(str);
|
||||
sb.append(content);
|
||||
sb.append("\r\n");
|
||||
|
||||
String logPath = baseDir;
|
||||
File logPathFile = new File(logPath);
|
||||
if (!logPathFile.isDirectory()) {
|
||||
Boolean _f = logPathFile.mkdir();
|
||||
}
|
||||
|
||||
String fileDic = format.format(new Date());
|
||||
File filedir = new File(logPath + fileDic);
|
||||
if (!filedir.isDirectory()) {
|
||||
filedir.mkdir();
|
||||
File[] fs = logPathFile.listFiles();
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
int delFlag = Integer.parseInt(now.minus(30, ChronoUnit.DAYS).format(DateTimeFormatter.ofPattern("yyyyMMdd")));
|
||||
for (File f : fs) {
|
||||
int deldir = Integer.parseInt(f.getName());
|
||||
if (deldir < delFlag) {
|
||||
if (f.isDirectory()) {
|
||||
deleteDirectory(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
String fullFilePath = logPath + fileDic + "/" + suffix + ".txt";
|
||||
|
||||
try (RandomAccessFile reader = new RandomAccessFile(new File(fullFilePath), "rw");
|
||||
FileLock lock1 = reader.getChannel().lock()) {
|
||||
|
||||
reader.seek(reader.length());
|
||||
reader.write(sb.toString().getBytes());
|
||||
|
||||
} catch (IOException e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
|
||||
} catch (Exception exception) {
|
||||
System.out.println(exception.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void deleteDirectory(File file) {
|
||||
if (file.isFile()) {// 表示该文件不是文件夹
|
||||
file.delete();
|
||||
} else {
|
||||
// 首先得到当前的路径
|
||||
String[] childFilePaths = file.list();
|
||||
for (String childFilePath : childFilePaths) {
|
||||
File childFile = new File(file.getAbsolutePath() + "/" + childFilePath);
|
||||
deleteDirectory(childFile);
|
||||
}
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
//package com.nmggs.query.common.utils;
|
||||
//
|
||||
//
|
||||
//import java.io.File;
|
||||
//import java.io.IOException;
|
||||
//import java.io.RandomAccessFile;
|
||||
//import java.nio.channels.FileLock;
|
||||
//import java.text.SimpleDateFormat;
|
||||
//import java.time.LocalDateTime;
|
||||
//import java.time.format.DateTimeFormatter;
|
||||
//import java.time.temporal.ChronoUnit;
|
||||
//import java.util.Date;
|
||||
//
|
||||
//public class LogUtil {
|
||||
//
|
||||
// public static String TomcatPath = System.getProperty("catalina.home");
|
||||
//
|
||||
// private static String getFilePath() {
|
||||
//
|
||||
// return TomcatPath ;
|
||||
// }
|
||||
//
|
||||
// public static void WriteLog_Gantry(String msg, String disStr) {
|
||||
// SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
// String fileName = f.format(new Date()) + "_Gantry";
|
||||
// WriteLog(fileName, msg, disStr);
|
||||
// }
|
||||
// public static void WriteLog_ETCSuccessRateQuery(String msg, String disStr) {
|
||||
// SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
// String fileName = f.format(new Date()) + "_ETCSuccessRateQuery";
|
||||
// WriteLog(fileName, msg, disStr);
|
||||
// }
|
||||
// public static void WriteLog_SFZXNPJQuery(String msg, String disStr) {
|
||||
// SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
// String fileName = f.format(new Date()) + "_SFZXNPJQuery";
|
||||
// WriteLog(fileName, msg, disStr);
|
||||
// }
|
||||
// public static void WriteLog_Info(String msg, String disStr) {
|
||||
// SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
// String fileName = f.format(new Date()) + "_Info";
|
||||
// WriteLog(fileName, msg, disStr);
|
||||
// }
|
||||
//
|
||||
// public static void WriteLog_Error(String msg, String disStr) {
|
||||
// SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
// String fileName = f.format(new Date()) + "_Error";
|
||||
// WriteLog(fileName, msg, disStr);
|
||||
// }
|
||||
// public static void WriteLog_237SplitJson(String msg, String disStr) {
|
||||
// SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd-HH");
|
||||
// String fileName = f.format(new Date()) + "_237SplitJson";
|
||||
// WriteLog(fileName, msg, disStr);
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// private static void WriteLog(String suffix, String content, String disStr) {
|
||||
// try {
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
||||
// String baseDir = getFilePath() + "/logs/ETCLaneMonitoringEvaluation/";
|
||||
// FileUtil.fileCreat(baseDir);
|
||||
// StringBuffer sb = new StringBuffer();
|
||||
// String str = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss SSS")) + "-->类【" + disStr + "】:";
|
||||
// sb.append(str);
|
||||
// sb.append(content);
|
||||
// sb.append("\r\n");
|
||||
//
|
||||
// String logPath = baseDir;
|
||||
// File logPathFile = new File(logPath);
|
||||
// if (!logPathFile.isDirectory()) {
|
||||
// Boolean _f = logPathFile.mkdir();
|
||||
// }
|
||||
//
|
||||
// String fileDic = format.format(new Date());
|
||||
// File filedir = new File(logPath + fileDic);
|
||||
// if (!filedir.isDirectory()) {
|
||||
// filedir.mkdir();
|
||||
// File[] fs = logPathFile.listFiles();
|
||||
// LocalDateTime now = LocalDateTime.now();
|
||||
// int delFlag = Integer.parseInt(now.minus(30, ChronoUnit.DAYS).format(DateTimeFormatter.ofPattern("yyyyMMdd")));
|
||||
// for (File f : fs) {
|
||||
// int deldir = Integer.parseInt(f.getName());
|
||||
// if (deldir < delFlag) {
|
||||
// if (f.isDirectory()) {
|
||||
// deleteDirectory(f);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// String fullFilePath = logPath + fileDic + "/" + suffix + ".txt";
|
||||
//
|
||||
// try (RandomAccessFile reader = new RandomAccessFile(new File(fullFilePath), "rw");
|
||||
// FileLock lock1 = reader.getChannel().lock()) {
|
||||
//
|
||||
// reader.seek(reader.length());
|
||||
// reader.write(sb.toString().getBytes());
|
||||
//
|
||||
// } catch (IOException e) {
|
||||
// System.out.println(e.getMessage());
|
||||
// }
|
||||
//
|
||||
// } catch (Exception exception) {
|
||||
// System.out.println(exception.getMessage());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// private static void deleteDirectory(File file) {
|
||||
// if (file.isFile()) {// 表示该文件不是文件夹
|
||||
// file.delete();
|
||||
// } else {
|
||||
// // 首先得到当前的路径
|
||||
// String[] childFilePaths = file.list();
|
||||
// for (String childFilePath : childFilePaths) {
|
||||
// File childFile = new File(file.getAbsolutePath() + "/" + childFilePath);
|
||||
// deleteDirectory(childFile);
|
||||
// }
|
||||
// file.delete();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
package com.nmggs.query.common.utils;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月07日 14:37
|
||||
* @description:
|
||||
*/
|
||||
public class StringUtils {
|
||||
public static void main(String[] args) {
|
||||
long flag = 2252350106386944L;
|
||||
System.out.println(GetFlagValue(flag));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 转换flag的值
|
||||
*
|
||||
* @param flag flag值
|
||||
* @return java.lang.String
|
||||
* @author shuguang
|
||||
* @date 2025-03-11 10:19
|
||||
*/
|
||||
public static String GetFlagValue(long flag) {
|
||||
String flagValue = "";
|
||||
if (flag == 0) {
|
||||
flagValue = "0";
|
||||
} else if (flag == 1) {
|
||||
flagValue = "1";
|
||||
} else {
|
||||
String binaryString = Long.toBinaryString(flag);
|
||||
int postion = 1;
|
||||
for (int i = binaryString.length() - 1; i >= 0; i--, postion++) {
|
||||
if (binaryString.charAt(i) == '1') {
|
||||
flagValue += postion + ",";
|
||||
}
|
||||
}
|
||||
flagValue = flagValue.substring(0, flagValue.length() - 1);
|
||||
}
|
||||
|
||||
return flagValue;
|
||||
|
||||
}
|
||||
|
||||
private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.00");
|
||||
|
||||
|
||||
/**
|
||||
* 计算结果保留两位小数
|
||||
*/
|
||||
public static String formattedResult(double num1, double num2) {
|
||||
if (num2 == 0) {
|
||||
throw new IllegalArgumentException("除数不能为0");
|
||||
}
|
||||
double result = (double) num1 / num2;
|
||||
return DECIMAL_FORMAT.format(result);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.nmggs.query.controller;
|
||||
|
||||
import com.nmggs.query.entity.Res;
|
||||
import com.nmggs.query.entity.xnpj.NameTable;
|
||||
import com.nmggs.query.entity.xnpj.SubCompany;
|
||||
import com.nmggs.query.service.BasicService;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2023年10月12日 14:29
|
||||
* @description: 基础信息查询
|
||||
*/
|
||||
@RestController
|
||||
public class BasicController {
|
||||
@Resource
|
||||
private BasicService basicService;
|
||||
|
||||
@PostMapping("/sysQuery/selectSubcomno")
|
||||
public Res selectSubcomno() {
|
||||
List<SubCompany> list = basicService.selectSubcomno();
|
||||
return Res.success(list);
|
||||
}
|
||||
@PostMapping("/sysQuery/selectStanos")
|
||||
public Res selectStanos(@RequestBody Map<String,Object> map) {
|
||||
List<NameTable> list = basicService.selectStanos(map);
|
||||
return Res.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.nmggs.query.controller;
|
||||
|
||||
import com.nmggs.query.entity.Res;
|
||||
import com.nmggs.query.entity.xnpj.CardInfo;
|
||||
import com.nmggs.query.entity.xnpj.SubCompany;
|
||||
import com.nmggs.query.service.XnpjService;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月06日 16:35
|
||||
* @description:
|
||||
*/
|
||||
@RestController
|
||||
public class XnpjController {
|
||||
@Resource
|
||||
private XnpjService xnpjService;
|
||||
|
||||
@PostMapping("/queryMiddleBottomInfo")
|
||||
public Res queryMiddleBottomInfo(@RequestBody Map<String,Object> map) {
|
||||
List<Map<String,Object>> list = xnpjService.queryMiddleBottomInfo(map);
|
||||
return Res.success(list);
|
||||
}
|
||||
@PostMapping("/queryMiddleTopInfo")
|
||||
public Res queryMiddleTopInfo(@RequestBody Map<String,Object> map) {
|
||||
List<Map<String,Object>> list = xnpjService.queryMiddleTopInfo(map);
|
||||
return Res.success(list);
|
||||
}
|
||||
@PostMapping("/queryRightBottomInfo")
|
||||
public Res queryRightBottomInfo(@RequestBody Map<String,Object> map) {
|
||||
List<Map<String,Object>> list = xnpjService.queryRightBottomInfo(map);
|
||||
return Res.success(list);
|
||||
}
|
||||
@PostMapping("/queryLeftBottomInfo")
|
||||
public Res queryLeftBottomInfo(@RequestBody Map<String,Object> map) {
|
||||
List<Map<String,Object>> list = xnpjService.queryLeftBottomInfo(map);
|
||||
return Res.success(list);
|
||||
}
|
||||
@PostMapping("/queryRightTopInfo")
|
||||
public Res queryRightTopInfo(@RequestBody Map<String,Object> map) {
|
||||
List<Map<String,Object>> list = xnpjService.queryRightTopInfo(map);
|
||||
return Res.success(list);
|
||||
}
|
||||
@PostMapping("/queryLeftTopInfo")
|
||||
public Res queryLeftTopInfo(@RequestBody Map<String,Object> map) {
|
||||
List<Map<String,Object>> list = xnpjService.queryLeftTopInfo(map);
|
||||
return Res.success(list);
|
||||
}
|
||||
@PostMapping("/queryCardInfo")
|
||||
public Res queryCardInfo(@RequestBody Map<String,Object> map) {
|
||||
CardInfo info = xnpjService.queryCardInfo(map);
|
||||
return Res.success(info);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月06日 16:40
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class CardInfo {
|
||||
/**
|
||||
* 出口通行压力指数
|
||||
*/
|
||||
private String outpressure;
|
||||
/**
|
||||
* 入口通行压力指数
|
||||
*/
|
||||
private String inpressure;
|
||||
/**
|
||||
* 入口车道通行效率
|
||||
*/
|
||||
private String intrafficefficiency;
|
||||
/**
|
||||
* 出口车道通行效率
|
||||
*/
|
||||
private String outtrafficefficiency;
|
||||
/**
|
||||
* 入口车道特情占比
|
||||
*/
|
||||
private String inspecial;
|
||||
/**
|
||||
* 出口车道特情占比
|
||||
*/
|
||||
private String outspecial;
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 11:46
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@TableName("SFZ_XNPJ_CONFIG_TIME")
|
||||
public class ConfigTime {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId("ID")
|
||||
private Integer id;
|
||||
/**
|
||||
* 人工车车道平均过车时间,单位秒--入口
|
||||
*/
|
||||
@TableField("INRGAVERAGETIME")
|
||||
private Integer inrgaveragetime;
|
||||
/**
|
||||
* 机器人平均过车时间,单位秒--入口
|
||||
*/
|
||||
@TableField("INQRAVERAGETIME")
|
||||
private Integer injqraveragetime;
|
||||
/**
|
||||
* ETC平均过程时间,单位秒--入口
|
||||
*/
|
||||
@TableField("INETCAVERAGETIME")
|
||||
private Integer inetcaveragetime;
|
||||
/**
|
||||
* 人工车车道平均过车时间,单位秒--出口
|
||||
*/
|
||||
@TableField("OUTRGAVERAGETIME")
|
||||
private Integer outrgaveragetime;
|
||||
/**
|
||||
* 机器人平均过车时间,单位秒--出口
|
||||
*/
|
||||
@TableField("OUTJQRAVERAGETIME")
|
||||
private Integer outjqraveragetime;
|
||||
/**
|
||||
* ETC平均过程时间,单位秒--出口
|
||||
*/
|
||||
@TableField("OUTETCAVERAGETIME")
|
||||
private Integer outetcaveragetime;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月11日 10:37
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@TableName("FLAG_TEXT")
|
||||
public class FlagText {
|
||||
@TableField("VALUE")
|
||||
private Integer value;
|
||||
@TableField("TEXT")
|
||||
private String text;
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 11:51
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@TableName("SFZ_XNPJ_IN_SUM_DAY")
|
||||
public class InSumDay {
|
||||
@TableField("CLASSDATE")
|
||||
private Date classdate;
|
||||
@TableField("STANO")
|
||||
private Integer stano;
|
||||
@TableField("FLAG")
|
||||
private Long flag;
|
||||
@TableField("PORTNO")
|
||||
private Integer portno;
|
||||
@TableField("CARCOUNT")
|
||||
private Long carcount;
|
||||
@TableField("OPRTIMELEN")
|
||||
private Long oprtimelen;
|
||||
@TableField("TYPE")
|
||||
private Integer type;
|
||||
@TableField("KIND")
|
||||
private Integer kind;
|
||||
@TableField("CARDTP")
|
||||
private Integer cardtp;
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 11:51
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@TableName("SFZ_XNPJ_IN_SUM_HOUR")
|
||||
public class InSumHour {
|
||||
@TableField("CLASSDATE")
|
||||
private Date classdate;
|
||||
@TableField("STANO")
|
||||
private Integer stano;
|
||||
@TableField("FLAG")
|
||||
private Long flag;
|
||||
@TableField("PORTNO")
|
||||
private Integer portno;
|
||||
@TableField("DT")
|
||||
private Date dt;
|
||||
@TableField("CARCOUNT")
|
||||
private Long carcount;
|
||||
@TableField("OPRTIMELEN")
|
||||
private Long oprtimelen;
|
||||
@TableField("TYPE")
|
||||
private Integer type;
|
||||
@TableField("KIND")
|
||||
private Integer kind;
|
||||
@TableField("CARDTP")
|
||||
private Integer cardtp;
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2023年08月11日 14:15
|
||||
* @description:
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("NAME_TABLE")
|
||||
public class NameTable implements Serializable {
|
||||
private Date begdate;
|
||||
|
||||
private Integer areano;
|
||||
|
||||
private Integer roadno;
|
||||
|
||||
private Integer stano;
|
||||
|
||||
private String roadname;
|
||||
|
||||
private String staname;
|
||||
private Integer statype;
|
||||
private String stationhex;
|
||||
private String gbstationid;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 11:51
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@TableName("SFZ_XNPJ_OUT_SUM_DAY")
|
||||
public class OutSumDay {
|
||||
@TableField("CLASSDATE")
|
||||
private Date classdate;
|
||||
@TableField("STANO")
|
||||
private Integer stano;
|
||||
@TableField("FLAG")
|
||||
private Long flag;
|
||||
@TableField("PORTNO")
|
||||
private Integer portno;
|
||||
@TableField("CARCOUNT")
|
||||
private Long carcount;
|
||||
@TableField("OPRTIMELEN")
|
||||
private Long oprtimelen;
|
||||
@TableField("TYPE")
|
||||
private Integer type;
|
||||
@TableField("KIND")
|
||||
private Integer kind;
|
||||
@TableField("CARDTP")
|
||||
private Integer cardtp;
|
||||
@TableField("INCASH")
|
||||
private Long incash;
|
||||
@TableField("CASH")
|
||||
private Long cash;
|
||||
@TableField("PAYCASH")
|
||||
private Long paycash;
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 11:51
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@TableName("SFZ_XNPJ_OUT_SUM_HOUR")
|
||||
public class OutSumHour {
|
||||
@TableField("CLASSDATE")
|
||||
private Date classdate;
|
||||
@TableField("STANO")
|
||||
private Integer stano;
|
||||
@TableField("FLAG")
|
||||
private Long flag;
|
||||
@TableField("PORTNO")
|
||||
private Integer portno;
|
||||
@TableField("DT")
|
||||
private Date dt;
|
||||
@TableField("CARCOUNT")
|
||||
private Long carcount;
|
||||
@TableField("OPRTIMELEN")
|
||||
private Long oprtimelen;
|
||||
@TableField("TYPE")
|
||||
private Integer type;
|
||||
@TableField("KIND")
|
||||
private Integer kind;
|
||||
@TableField("CARDTP")
|
||||
private Integer cardtp;
|
||||
@TableField("INCASH")
|
||||
private Long incash;
|
||||
@TableField("CASH")
|
||||
private Long cash;
|
||||
@TableField("PAYCASH")
|
||||
private Long paycash;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2023年08月29日 14:29
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
@TableName("SUBCOMPANY_TABLE")
|
||||
public class SubCompany {
|
||||
@TableField("SUBCOMNO")
|
||||
private Integer subcomno;
|
||||
@TableField("SUBCOMNAME")
|
||||
private String subcomname;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.nmggs.query.entity.xnpj;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月07日 10:59
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class SumQueryInfo {
|
||||
private Integer stano;
|
||||
private Long sumcarcount;
|
||||
private Long sumoprtimelen;
|
||||
private Integer gbtype;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.ConfigTime;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 14:20
|
||||
* @description:
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigTimeMapper extends BaseMapper<ConfigTime> {
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.FlagText;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月11日 10:39
|
||||
* @description:
|
||||
*/
|
||||
@Mapper
|
||||
public interface FlagTextMapper extends BaseMapper<FlagText> {
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.InSumDay;
|
||||
import com.nmggs.query.entity.xnpj.SumQueryInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 14:23
|
||||
* @description:
|
||||
*/
|
||||
@Mapper
|
||||
public interface InSumDayMapper extends BaseMapper<InSumDay> {
|
||||
List<SumQueryInfo> selectInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
int selectInspecialcount(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectLeftTopInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectLeftBottomInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectMiddleTopInfoList(int stano, String startDateStr, String endDateStr);
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.InSumDayMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectInspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
</select>
|
||||
<select id="selectLeftTopInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectLeftBottomInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleTopInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,27 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.InSumHour;
|
||||
import com.nmggs.query.entity.xnpj.SumQueryInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 14:22
|
||||
* @description:
|
||||
*/
|
||||
@Mapper
|
||||
public interface InSumHourMapper extends BaseMapper<InSumHour> {
|
||||
List<SumQueryInfo> selectInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
int selectInspecialcount(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectLeftTopInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectLeftBottomInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectMiddleTopInfoList(int stano, String startDateStr, String endDateStr);
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.InSumHourMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectInspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
</select>
|
||||
<select id="selectLeftTopInfoList" resultType="java.util.Map">
|
||||
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectLeftBottomInfoList" resultType="java.util.Map">
|
||||
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
AND FLAG>1
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleTopInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
AND FLAG>1
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,10 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.NameTable;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface NameTableMapper extends BaseMapper<NameTable> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.NameTableMapper">
|
||||
<resultMap id="BaseResultMap" type="com.nmggs.query.entity.xnpj.NameTable">
|
||||
<result column="BEGDATE" jdbcType="TIMESTAMP" property="begdate"/>
|
||||
<result column="AREANO" jdbcType="DECIMAL" property="areano"/>
|
||||
<result column="ROADNO" jdbcType="DECIMAL" property="roadno"/>
|
||||
<result column="STANO" jdbcType="DECIMAL" property="stano"/>
|
||||
<result column="ROADNAME" jdbcType="VARCHAR" property="roadname"/>
|
||||
<result column="STANAME" jdbcType="VARCHAR" property="staname"/>
|
||||
<result column="STATYPE" jdbcType="DECIMAL" property="statype"/>
|
||||
<result column="STATIONHEX" jdbcType="VARCHAR" property="stationhex"/>
|
||||
<result column="GBSTATIONID" jdbcType="VARCHAR" property="gbstationid"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,27 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.OutSumDay;
|
||||
import com.nmggs.query.entity.xnpj.SumQueryInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 14:26
|
||||
* @description:
|
||||
*/
|
||||
@Mapper
|
||||
public interface OutSumDayMapper extends BaseMapper<OutSumDay> {
|
||||
List<SumQueryInfo> selectInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
int selectOutspecialcount(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectRightTopInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectRightBottomInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectMiddleBottomInfoList(int stano, String startDateStr, String endDateStr);
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.OutSumDayMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectOutspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
</select>
|
||||
<select id="selectRightTopInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectRightBottomInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleBottomInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,27 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.OutSumHour;
|
||||
import com.nmggs.query.entity.xnpj.SumQueryInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月05日 14:23
|
||||
* @description:
|
||||
*/
|
||||
@Mapper
|
||||
public interface OutSumHourMapper extends BaseMapper<OutSumHour> {
|
||||
List<SumQueryInfo> selectInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
int selectOutspecialcount(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectRightTopInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectRightBottomInfoList(int stano, String startDateStr, String endDateStr);
|
||||
|
||||
List<Map<String, Object>> selectMiddleBottomInfoList(int stano, String startDateStr, String endDateStr);
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.OutSumHourMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectOutspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
</select>
|
||||
<select id="selectRightTopInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectRightBottomInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleBottomInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
AND FLAG>1
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,15 @@
|
||||
package com.nmggs.query.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nmggs.query.entity.xnpj.SubCompany;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2023年08月29日 14:32
|
||||
* @description:
|
||||
*/
|
||||
@Mapper
|
||||
public interface SubCompanyMapper extends BaseMapper<SubCompany> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.SubCompanyMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,35 @@
|
||||
package com.nmggs.query.service;
|
||||
|
||||
|
||||
import com.nmggs.query.entity.xnpj.NameTable;
|
||||
import com.nmggs.query.entity.xnpj.SubCompany;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2023年10月12日 14:30
|
||||
* @description:
|
||||
*/
|
||||
public interface BasicService {
|
||||
/**
|
||||
* 查询分公司信息
|
||||
*
|
||||
* @return java.util.List<com.nm.gsgl.entity.SubCompany>
|
||||
* @author shuguang
|
||||
* @date 2023-10-12 14:33
|
||||
*/
|
||||
List<SubCompany> selectSubcomno();
|
||||
|
||||
/**
|
||||
* 根据分公司编码查询所属站信息
|
||||
*
|
||||
* @param map 分公司编码
|
||||
* @return java.util.List<com.nm.gsgl.entity.NameTable>
|
||||
* @author shuguang
|
||||
* @date 2023-10-12 14:46
|
||||
*/
|
||||
List<NameTable> selectStanos(Map<String, Object> map);
|
||||
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.nmggs.query.service;
|
||||
|
||||
import com.nmggs.query.entity.xnpj.CardInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2025年03月06日 16:36
|
||||
* @description:
|
||||
*/
|
||||
public interface XnpjService {
|
||||
/**
|
||||
* 根据查询条件查询卡片显示的结果
|
||||
*
|
||||
* @param map 查询条件
|
||||
* @return com.nmggs.query.entity.xnpj.CardInfo
|
||||
* @author shuguang
|
||||
* @date 2025-03-06 16:47
|
||||
*/
|
||||
CardInfo queryCardInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 根据查询条件查询左上显示的结果
|
||||
*
|
||||
* @param map 查询参数
|
||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||
* @author shuguang
|
||||
* @date 2025-03-10 10:34
|
||||
*/
|
||||
List<Map<String, Object>> queryLeftTopInfo(Map<String, Object> map);
|
||||
/**
|
||||
* 根据查询条件查询右上显示的结果
|
||||
*
|
||||
* @param map 查询参数
|
||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||
* @author shuguang
|
||||
* @date 2025-03-10 14:34
|
||||
*/
|
||||
List<Map<String, Object>> queryRightTopInfo(Map<String, Object> map);
|
||||
/**
|
||||
* 根据查询条件查询左下显示的结果
|
||||
*
|
||||
* @param map 查询参数
|
||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||
* @author shuguang
|
||||
* @date 2025-03-10 14:34
|
||||
*/
|
||||
List<Map<String, Object>> queryLeftBottomInfo(Map<String, Object> map);
|
||||
/**
|
||||
* 根据查询条件查询右下显示的结果
|
||||
*
|
||||
* @param map 查询参数
|
||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||
* @author shuguang
|
||||
* @date 2025-03-10 14:34
|
||||
*/
|
||||
List<Map<String, Object>> queryRightBottomInfo(Map<String, Object> map);
|
||||
/**
|
||||
* 根据查询条件查询中上显示的结果
|
||||
*
|
||||
* @param map 查询参数
|
||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||
* @author shuguang
|
||||
* @date 2025-03-10 14:34
|
||||
*/
|
||||
List<Map<String, Object>> queryMiddleTopInfo(Map<String, Object> map);
|
||||
/**
|
||||
* 根据查询条件查询中下显示的结果
|
||||
*
|
||||
* @param map 查询参数
|
||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||
* @author shuguang
|
||||
* @date 2025-03-10 14:34
|
||||
*/
|
||||
List<Map<String, Object>> queryMiddleBottomInfo(Map<String, Object> map);
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package com.nmggs.query.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nmggs.query.common.utils.UuidUtil;
|
||||
import com.nmggs.query.entity.xnpj.NameTable;
|
||||
import com.nmggs.query.entity.xnpj.SubCompany;
|
||||
import com.nmggs.query.mapper.NameTableMapper;
|
||||
import com.nmggs.query.mapper.SubCompanyMapper;
|
||||
import com.nmggs.query.service.BasicService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2023年10月12日 14:30
|
||||
* @description:
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BasicServiceImpl implements BasicService {
|
||||
@Resource
|
||||
private SubCompanyMapper subCompanyMapper;
|
||||
@Resource
|
||||
private NameTableMapper nameTableMapper;
|
||||
/**
|
||||
* 查询分公司信息
|
||||
*
|
||||
* @return java.util.List<com.nm.gsgl.entity.SubCompany>
|
||||
* @author shuguang
|
||||
* @date 2023-10-12 14:33
|
||||
*/
|
||||
@Override
|
||||
public List<SubCompany> selectSubcomno() {
|
||||
QueryWrapper<SubCompany> wrapper = new QueryWrapper<>();
|
||||
wrapper
|
||||
.orderByAsc("SUBCOMNO");
|
||||
return subCompanyMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分公司编码查询所属站信息
|
||||
*
|
||||
* @param map 分公司编码
|
||||
* @return java.util.List<com.nm.gsgl.entity.NameTable>
|
||||
* @author shuguang
|
||||
* @date 2023-10-12 14:46
|
||||
*/
|
||||
@Override
|
||||
public List<NameTable> selectStanos(Map<String, Object> map) {
|
||||
QueryWrapper<NameTable> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("STATYPE", 1)
|
||||
.orderByAsc("STANO");
|
||||
if(ObjectUtils.isNotEmpty( map.get("SUBCOMNO"))){
|
||||
wrapper.eq("SUBCOMNO",map.get("SUBCOMNO"));
|
||||
}
|
||||
|
||||
return nameTableMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,74 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.InSumDayMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectInspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
</select>
|
||||
<select id="selectLeftTopInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectLeftBottomInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleTopInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_IN_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
Binary file not shown.
@ -0,0 +1,76 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.InSumHourMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectInspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
</select>
|
||||
<select id="selectLeftTopInfoList" resultType="java.util.Map">
|
||||
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectLeftBottomInfoList" resultType="java.util.Map">
|
||||
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
AND FLAG>1
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleTopInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_IN_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
AND FLAG>1
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
Binary file not shown.
@ -0,0 +1,18 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.NameTableMapper">
|
||||
<resultMap id="BaseResultMap" type="com.nmggs.query.entity.xnpj.NameTable">
|
||||
<result column="BEGDATE" jdbcType="TIMESTAMP" property="begdate"/>
|
||||
<result column="AREANO" jdbcType="DECIMAL" property="areano"/>
|
||||
<result column="ROADNO" jdbcType="DECIMAL" property="roadno"/>
|
||||
<result column="STANO" jdbcType="DECIMAL" property="stano"/>
|
||||
<result column="ROADNAME" jdbcType="VARCHAR" property="roadname"/>
|
||||
<result column="STANAME" jdbcType="VARCHAR" property="staname"/>
|
||||
<result column="STATYPE" jdbcType="DECIMAL" property="statype"/>
|
||||
<result column="STATIONHEX" jdbcType="VARCHAR" property="stationhex"/>
|
||||
<result column="GBSTATIONID" jdbcType="VARCHAR" property="gbstationid"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Binary file not shown.
@ -0,0 +1,74 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.OutSumDayMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectOutspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
</select>
|
||||
<select id="selectRightTopInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectRightBottomInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleBottomInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_OUT_SUM_DAY
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and CLASSDATE >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd')
|
||||
AND CLASSDATE <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
Binary file not shown.
@ -0,0 +1,74 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.OutSumHourMapper">
|
||||
|
||||
|
||||
<select id="selectInfoList" resultType="com.nmggs.query.entity.xnpj.SumQueryInfo">
|
||||
SELECT m.STANO, m.GBTYPE, sum(SUMCARCOUNT) as SUMCARCOUNT, sum(SUMOPRTIMELEN) as SUMOPRTIMELEN
|
||||
FROM (SELECT t.*, s.GBTYPE
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) m
|
||||
GROUP BY m.STANO, m.GBTYPE
|
||||
</select>
|
||||
<select id="selectOutspecialcount" resultType="java.lang.Integer">
|
||||
SELECT COALESCE(SUM(CARCOUNT), 0) AS total_carcount
|
||||
FROM SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE FLAG > 1
|
||||
AND STANO = #{stano}
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
</select>
|
||||
<select id="selectRightTopInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY PORTNO ASC
|
||||
</select>
|
||||
<select id="selectRightBottomInfoList" resultType="java.util.Map">
|
||||
SELECT a.* , p.* FROM (SELECT t.*, s.GBTYPE,n.STANAME
|
||||
FROM (
|
||||
(SELECT STANO, PORTNO, sum(CARCOUNT) as SUMCARCOUNT, sum(OPRTIMELEN) as SUMOPRTIMELEN
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
and FLAG>1
|
||||
and DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, PORTNO) t
|
||||
LEFT JOIN NAME_TABLE n on n.STANO = t.STANO
|
||||
LEFT JOIN SETUP_TABLE s on s.STANO = t.STANO and s.PORTNO = t.PORTNO
|
||||
|
||||
)) a
|
||||
LEFT JOIN PORTTYPEGB_TEXT p on p.VALUE = a.GBTYPE
|
||||
ORDER BY SUMCARCOUNT desc
|
||||
</select>
|
||||
<select id="selectMiddleBottomInfoList" resultType="java.util.Map">
|
||||
SELECT STANO, FLAG, sum(CARCOUNT) as SUMCARCOUNT
|
||||
from SFZ_XNPJ_OUT_SUM_HOUR
|
||||
WHERE stano = #{stano}
|
||||
AND FLAG>1
|
||||
AND DT >= TO_DATE(#{startDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
AND DT <= TO_DATE(#{endDateStr}, 'yyyy-MM-dd HH24:MI:SS')
|
||||
GROUP BY STANO, FLAG
|
||||
</select>
|
||||
</mapper>
|
||||
Binary file not shown.
@ -0,0 +1,9 @@
|
||||
<?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">
|
||||
<mapper namespace="com.nmggs.query.mapper.SubCompanyMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue