|
@@ -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);
|