From 49977982e18f62ce104973f3a989c97ea8d14ec7 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 29 八月 2024 14:24:30 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/CloseTypeQo.java | 4 +-
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java | 85 +++++++++++++++++++++++-------------------
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml | 4 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java | 4 +-
4 files changed, 53 insertions(+), 44 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
index 0f5291c..e929674 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
@@ -637,7 +637,9 @@
SELECT COUNT(*) AS recordCount
FROM rm_open_close_valve_history
<where>
- AND cl_type = #{closeType}
+ <if test="closeType != null">
+ AND cl_type = #{closeType}
+ </if>
<if test="timeStart != null and timeStop != null">
AND cl_dt BETWEEN #{timeStart} AND #{timeStop}
</if>
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java
index d17f46c..c38df7c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/report/ReportSv.java
@@ -114,7 +114,7 @@
if(timeStart_open != null && timeStart_open != "") {
timeStart_open = timeStart_open + " 00:00:00";
} else {
- timeStart_open = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart_open = LocalDate.now() + " 00:00:00";
}
qo.setTimeStop_open(timeStart_open);
@@ -130,7 +130,7 @@
if(timeStart_close != null && timeStart_close != "") {
timeStart_close = timeStart_close + " 00:00:00";
} else {
- timeStart_close = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart_close = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart_close(timeStart_close);
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java
index 1b116c0..77e36a9 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java
@@ -329,7 +329,7 @@
Integer openType = qo.getOpenType();
String openTypeName = "";
if (openType == null){
- openTypeName = "鏈煡";
+ openTypeName = "涓嶇煡閬撴偍瑕佹煡閭g寮�闃�绫诲瀷";
}else {
switch (openType) {
case 1:
@@ -348,7 +348,7 @@
openTypeName = "寮�鍏抽榾鍗″紑闃�";
break;
default:
- openTypeName = "鏈煡";
+ openTypeName = "涓嶇煡閬撴偍瑕佹煡閭g寮�闃�绫诲瀷";
}
}
@@ -374,52 +374,59 @@
*/
String timeStart = qo.getTimeStart();
String timeStop = qo.getTimeStop();
- if(timeStart != null) {
- timeStart = timeStart + " 00:00:00";
- }else {
- timeStart = LocalDate.now() + " 00:00:00";
- }
if(timeStop != null) {
timeStop = timeStop + " 23:59:59";
+ if(timeStart != null) {
+ timeStart = timeStart + " 00:00:00";
+ }else {
+ timeStart = LocalDate.now() + " 00:00:00";
+ }
+ }else {
+ timeStart = null;
}
qo.setTimeStart(timeStart);
qo.setTimeStop(timeStop);
Integer closeType = qo.getCloseType();
String closeTypeName = "";
- switch (closeType) {
- case 2:
- closeTypeName = "鍒峰崱鍏抽榾";
- break;
- case 4:
- closeTypeName = "涓績绔欏叧闃�";
- break;
- case 5:
- closeTypeName = "娆犺垂鍏抽榾";
- break;
- case 6:
- closeTypeName = "娴侀噺璁℃晠闅滃叧闃�";
- break;
- case 7:
- closeTypeName = "绱ф�ュ叧闃�";
- break;
- case 9:
- closeTypeName = "鐢ㄦ埛杩滅▼鍏抽榾";
- break;
- case 10:
- closeTypeName = "寮�鍏抽榾鍗″叧闃�";
- break;
- case 12:
- closeTypeName = "榛戝悕鍗曞懡浠ゅ叧闃�";
- break;
- case 13:
- closeTypeName = "杩滅▼瀹氭椂鍏抽榾";
- break;
- case 14:
- closeTypeName = "杩滅▼瀹氶噺鍏抽榾";
- break;
+ if (closeType == null){
+ closeTypeName = "涓嶇煡閬撴偍瑕佹煡閭g鍏抽榾绫诲瀷";
+ }else {
+ switch (closeType) {
+ case 2:
+ closeTypeName = "鍒峰崱鍏抽榾";
+ break;
+ case 4:
+ closeTypeName = "涓績绔欏叧闃�";
+ break;
+ case 5:
+ closeTypeName = "娆犺垂鍏抽榾";
+ break;
+ case 6:
+ closeTypeName = "娴侀噺璁℃晠闅滃叧闃�";
+ break;
+ case 7:
+ closeTypeName = "绱ф�ュ叧闃�";
+ break;
+ case 9:
+ closeTypeName = "鐢ㄦ埛杩滅▼鍏抽榾";
+ break;
+ case 10:
+ closeTypeName = "寮�鍏抽榾鍗″叧闃�";
+ break;
+ case 12:
+ closeTypeName = "榛戝悕鍗曞懡浠ゅ叧闃�";
+ break;
+ case 13:
+ closeTypeName = "杩滅▼瀹氭椂鍏抽榾";
+ break;
+ case 14:
+ closeTypeName = "杩滅▼瀹氶噺鍏抽榾";
+ break;
+ default:
+ closeTypeName = "涓嶇煡閬撴偍瑕佹煡閭g鍏抽榾绫诲瀷";
+ }
}
-
// 鐢熸垚鏌ヨ鍙傛暟
Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
Integer closeTypeCount = Optional.ofNullable(rmOpenCloseValveLastMapper.getCountByCloseType(params)).orElse(0);
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/CloseTypeQo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/CloseTypeQo.java
index a5635cb..912736f 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/CloseTypeQo.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/qo/CloseTypeQo.java
@@ -19,7 +19,7 @@
/**
* 鍏抽榾绫诲瀷
*/
- @NotNull(message = "鍏抽榾绫诲瀷涓嶈兘涓虹┖")
+// @NotNull(message = "鍏抽榾绫诲瀷涓嶈兘涓虹┖")
private Integer closeType;
/**
@@ -32,6 +32,6 @@
* 缁撴潫鏃堕棿
*/
@JsonFormat(pattern = "yyyy-MM-dd")
- @NotBlank(message = "缁撴潫鏃堕棿涓嶈兘涓虹┖")
+// @NotBlank(message = "缁撴潫鏃堕棿涓嶈兘涓虹┖")
private String timeStop;
}
--
Gitblit v1.8.0