Sfoglia il codice sorgente

Merge branch 'shorepower' of http://47.101.207.123:3000/gh_department/ScheduleWork into shorepower

# Conflicts:
#	src/main/resources/mapper/SpStatementShipUsageMonthMapper.xml
zoro 1 anno fa
parent
commit
154726989b

+ 10 - 2
src/main/java/com/shcd/service/impl/SpStatementShipUsageMonthServiceImpl.java

@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.concurrent.CompletableFuture;
 import java.util.stream.Collectors;
 import javax.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -31,6 +32,7 @@ import org.springframework.stereotype.Service;
  * @createDate 2024-01-22 14:11:42
  */
 @Service
+@Slf4j
 public class SpStatementShipUsageMonthServiceImpl extends
     ServiceImpl<SpStatementShipUsageMonthMapper, SpStatementShipUsageMonth>
     implements SpStatementShipUsageMonthService {
@@ -71,7 +73,7 @@ public class SpStatementShipUsageMonthServiceImpl extends
       lastCycleMonth = 12;
     } else {
       lastMonth = thisMonth - 1;
-      lastYear = thisYear - 1;
+      lastYear = thisYear;
       lastCycleYear = thisYear;
       lastCycleMonth = thisMonth - 2;
     }
@@ -177,7 +179,13 @@ public class SpStatementShipUsageMonthServiceImpl extends
       SpStatementShipUsageMonthVo underLineYear = spStatementShipUsageMonthMapper.getUnderLineYearData(
           toDateBegin, toDate);
       SpStatementShipUsageMonth underLine = new SpStatementShipUsageMonth();
-      if (underLineMonth != null && underLineYear != null) {
+      if (underLineMonth != null || underLineYear != null) {
+        if (underLineMonth == null){
+          underLineMonth = new SpStatementShipUsageMonthVo();
+        }
+        if (underLineYear == null){
+          underLineYear = new SpStatementShipUsageMonthVo();
+        }
         underLine.setId(snowflakeGenerator.next().toString());
         underLine.setReportDate(toDate);
         underLine.setDataSource(20);

+ 1 - 1
src/main/resources/mapper/SpStatementInlandLowMapper.xml

@@ -109,7 +109,7 @@
       TO_DATE(#{lastReportDateStart}, 'yyyy-MM-dd HH24:mi:ss') AND T.MODIFYTIME &lt;=
       TO_DATE(#{reportDateEnd}, 'yyyy-MM-dd HH24:mi:ss')
       AND T.MODIFYTIME &gt;=
-      TO_DATE(#{reportDateStart}, 'yyyy-MM-dd HH24:mi:ss'))
+      TO_DATE(#{reportDateStart}, 'yyyy-MM-dd HH24:mi:ss') AND T.CONNTYPE != '低压(标准化)')
     </if>
     )
     GROUP BY PORT.AREA

+ 2 - 2
src/main/resources/mapper/SpStatementShipUsageMonthMapper.xml

@@ -1,7 +1,7 @@
 <?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">
+  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+  "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.shcd.mapper.SpStatementShipUsageMonthMapper">
 
     <resultMap id="BaseResultMap" type="com.shcd.entity.SpStatementShipUsageMonth">