Browse Source

Merge remote-tracking branch 'origin/feature/dev' into feature/dev

wangxx 3 days ago
parent
commit
0b38309236

+ 2 - 3
airport-admin/src/main/java/com/sundot/airport/web/controller/blocked/BlockedRateController.java

@@ -7,7 +7,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
7
 import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.beans.factory.annotation.Autowired;
8
 import org.springframework.web.bind.annotation.GetMapping;
8
 import org.springframework.web.bind.annotation.GetMapping;
9
 import org.springframework.web.bind.annotation.PostMapping;
9
 import org.springframework.web.bind.annotation.PostMapping;
10
-import org.springframework.web.bind.annotation.PutMapping;
11
 import org.springframework.web.bind.annotation.DeleteMapping;
10
 import org.springframework.web.bind.annotation.DeleteMapping;
12
 import org.springframework.web.bind.annotation.PathVariable;
11
 import org.springframework.web.bind.annotation.PathVariable;
13
 import org.springframework.web.bind.annotation.RequestBody;
12
 import org.springframework.web.bind.annotation.RequestBody;
@@ -18,7 +17,7 @@ import com.sundot.airport.common.core.controller.BaseController;
18
 import com.sundot.airport.common.core.domain.AjaxResult;
17
 import com.sundot.airport.common.core.domain.AjaxResult;
19
 import com.sundot.airport.common.enums.BusinessType;
18
 import com.sundot.airport.common.enums.BusinessType;
20
 import com.sundot.airport.blocked.domain.BlockedRate;
19
 import com.sundot.airport.blocked.domain.BlockedRate;
21
-import com.sundot.airport.blocked.service.BlockedRateService;
20
+import com.sundot.airport.blocked.service.IBlockedRateService;
22
 import com.sundot.airport.common.utils.poi.ExcelUtil;
21
 import com.sundot.airport.common.utils.poi.ExcelUtil;
23
 import com.sundot.airport.common.core.page.TableDataInfo;
22
 import com.sundot.airport.common.core.page.TableDataInfo;
24
 import org.springframework.web.multipart.MultipartFile;
23
 import org.springframework.web.multipart.MultipartFile;
@@ -33,7 +32,7 @@ import org.springframework.web.multipart.MultipartFile;
33
 @RequestMapping("/blocked/rate")
32
 @RequestMapping("/blocked/rate")
34
 public class BlockedRateController extends BaseController {
33
 public class BlockedRateController extends BaseController {
35
     @Autowired
34
     @Autowired
36
-    private BlockedRateService blockedRateService;
35
+    private IBlockedRateService blockedRateService;
37
 
36
 
38
     /**
37
     /**
39
      * 查询速率列表
38
      * 查询速率列表

+ 6 - 1
airport-admin/src/main/java/com/sundot/airport/web/controller/exam/DailyExamComparisonController.java

@@ -58,7 +58,7 @@ public class DailyExamComparisonController {
58
      * @param year               年份,默认当前年
58
      * @param year               年份,默认当前年
59
      * @param quarter            季度 1-4,dateRangeQueryType=QUARTER 时有效
59
      * @param quarter            季度 1-4,dateRangeQueryType=QUARTER 时有效
60
      * @param month              月份 1-12,dateRangeQueryType=MONTH 时有效
60
      * @param month              月份 1-12,dateRangeQueryType=MONTH 时有效
61
-     * @param scopeType          统计范围:STATION/BRIGADE/MANAGER/USER,不传则按登录角色自动判断
61
+     * @param scopeType          统计范围:STATION/BRIGADE/MANAGER/TEAM/USER,不传则按登录角色自动判断
62
      * @param scopeId            统计范围ID(deptId 或 userId)
62
      * @param scopeId            统计范围ID(deptId 或 userId)
63
      */
63
      */
64
     @GetMapping("/completion-comparison")
64
     @GetMapping("/completion-comparison")
@@ -228,6 +228,11 @@ public class DailyExamComparisonController {
228
         } else if ("BRIGADE".equals(scopeType) && scopeId != null) {
228
         } else if ("BRIGADE".equals(scopeType) && scopeId != null) {
229
             return buildBrigadeSeriesList(scopeId, periods, hasChain, currentIdx);
229
             return buildBrigadeSeriesList(scopeId, periods, hasChain, currentIdx);
230
 
230
 
231
+        } else if ("TEAM".equals(scopeType) && scopeId != null) {
232
+            List<Integer> counts = countByPeriods(periods, r -> countCompletedByDepartmentId(scopeId, r[0], r[1]));
233
+            return Collections.singletonList(
234
+                    buildSeriesItem(getDeptName(scopeId), scopeId, null, counts, currentIdx, hasChain));
235
+
231
         } else {
236
         } else {
232
             Long stationDeptId = ("STATION".equals(scopeType) && scopeId != null) ? scopeId : userDeptId;
237
             Long stationDeptId = ("STATION".equals(scopeType) && scopeId != null) ? scopeId : userDeptId;
233
             if (isStation || "STATION".equals(scopeType)) {
238
             if (isStation || "STATION".equals(scopeType)) {

+ 33 - 0
airport-blocked/src/main/java/com/sundot/airport/blocked/domain/BlockedRate.java

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
4
 import java.util.Date;
4
 import java.util.Date;
5
 
5
 
6
 import com.baomidou.mybatisplus.annotation.IdType;
6
 import com.baomidou.mybatisplus.annotation.IdType;
7
+import com.baomidou.mybatisplus.annotation.TableField;
7
 import com.baomidou.mybatisplus.annotation.TableId;
8
 import com.baomidou.mybatisplus.annotation.TableId;
8
 import com.baomidou.mybatisplus.annotation.TableName;
9
 import com.baomidou.mybatisplus.annotation.TableName;
9
 import com.fasterxml.jackson.annotation.JsonFormat;
10
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -117,6 +118,22 @@ public class BlockedRate extends BaseEntity {
117
     @Excel(name = "国际及中转区域平均速率")
118
     @Excel(name = "国际及中转区域平均速率")
118
     private BigDecimal internationalTransferAvgRatePeak;
119
     private BigDecimal internationalTransferAvgRatePeak;
119
 
120
 
121
+    /**
122
+     * 查询开始日期
123
+     */
124
+    @TableField(exist = false)
125
+    @JsonFormat(pattern = "yyyy-MM-dd")
126
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
127
+    private Date startDate;
128
+
129
+    /**
130
+     * 查询结束日期
131
+     */
132
+    @TableField(exist = false)
133
+    @JsonFormat(pattern = "yyyy-MM-dd")
134
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
135
+    private Date endDate;
136
+
120
     public void setTenantId(String tenantId) {
137
     public void setTenantId(String tenantId) {
121
         this.tenantId = tenantId;
138
         this.tenantId = tenantId;
122
     }
139
     }
@@ -237,6 +254,22 @@ public class BlockedRate extends BaseEntity {
237
         return internationalTransferAvgRatePeak;
254
         return internationalTransferAvgRatePeak;
238
     }
255
     }
239
 
256
 
257
+    public Date getStartDate() {
258
+        return startDate;
259
+    }
260
+
261
+    public void setStartDate(Date startDate) {
262
+        this.startDate = startDate;
263
+    }
264
+
265
+    public Date getEndDate() {
266
+        return endDate;
267
+    }
268
+
269
+    public void setEndDate(Date endDate) {
270
+        this.endDate = endDate;
271
+    }
272
+
240
     @Override
273
     @Override
241
     public String toString() {
274
     public String toString() {
242
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
275
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 1 - 1
airport-blocked/src/main/java/com/sundot/airport/blocked/service/BlockedRateService.java

@@ -11,7 +11,7 @@ import com.sundot.airport.blocked.domain.BlockedRate;
11
  * @author ruoyi
11
  * @author ruoyi
12
  * @date 2026-04-13
12
  * @date 2026-04-13
13
  */
13
  */
14
-public interface BlockedRateService extends IService<BlockedRate> {
14
+public interface IBlockedRateService extends IService<BlockedRate> {
15
     /**
15
     /**
16
      * 查询速率
16
      * 查询速率
17
      *
17
      *

+ 2 - 2
airport-blocked/src/main/java/com/sundot/airport/blocked/service/impl/BlockedRateServiceImpl.java

@@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.stereotype.Service;
17
 import org.springframework.stereotype.Service;
18
 import com.sundot.airport.blocked.mapper.BlockedRateMapper;
18
 import com.sundot.airport.blocked.mapper.BlockedRateMapper;
19
 import com.sundot.airport.blocked.domain.BlockedRate;
19
 import com.sundot.airport.blocked.domain.BlockedRate;
20
-import com.sundot.airport.blocked.service.BlockedRateService;
20
+import com.sundot.airport.blocked.service.IBlockedRateService;
21
 import org.springframework.transaction.annotation.Transactional;
21
 import org.springframework.transaction.annotation.Transactional;
22
 
22
 
23
 /**
23
 /**
@@ -27,7 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
27
  * @date 2026-04-13
27
  * @date 2026-04-13
28
  */
28
  */
29
 @Service
29
 @Service
30
-public class BlockedRateServiceImpl extends ServiceImpl<BlockedRateMapper, BlockedRate> implements BlockedRateService {
30
+public class BlockedRateServiceImpl extends ServiceImpl<BlockedRateMapper, BlockedRate> implements IBlockedRateService {
31
     @Autowired
31
     @Autowired
32
     private BlockedRateMapper blockedRateMapper;
32
     private BlockedRateMapper blockedRateMapper;
33
     @Autowired
33
     @Autowired

+ 4 - 0
airport-blocked/src/main/resources/mapper/blocked/BlockedRateMapper.xml

@@ -71,6 +71,10 @@
71
             <if test="internationalTransferAvgRatePeak != null ">and international_transfer_avg_rate_peak =
71
             <if test="internationalTransferAvgRatePeak != null ">and international_transfer_avg_rate_peak =
72
                 #{internationalTransferAvgRatePeak}
72
                 #{internationalTransferAvgRatePeak}
73
             </if>
73
             </if>
74
+            <if test="startDate != null and endDate != null">
75
+                and (stat_date >= #{startDate}
76
+                and stat_date <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
77
+            </if>
74
         </where>
78
         </where>
75
     </select>
79
     </select>
76
 
80