Преглед на файлове

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

wangxx преди 3 дни
родител
ревизия
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 7
 import org.springframework.beans.factory.annotation.Autowired;
8 8
 import org.springframework.web.bind.annotation.GetMapping;
9 9
 import org.springframework.web.bind.annotation.PostMapping;
10
-import org.springframework.web.bind.annotation.PutMapping;
11 10
 import org.springframework.web.bind.annotation.DeleteMapping;
12 11
 import org.springframework.web.bind.annotation.PathVariable;
13 12
 import org.springframework.web.bind.annotation.RequestBody;
@@ -18,7 +17,7 @@ import com.sundot.airport.common.core.controller.BaseController;
18 17
 import com.sundot.airport.common.core.domain.AjaxResult;
19 18
 import com.sundot.airport.common.enums.BusinessType;
20 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 21
 import com.sundot.airport.common.utils.poi.ExcelUtil;
23 22
 import com.sundot.airport.common.core.page.TableDataInfo;
24 23
 import org.springframework.web.multipart.MultipartFile;
@@ -33,7 +32,7 @@ import org.springframework.web.multipart.MultipartFile;
33 32
 @RequestMapping("/blocked/rate")
34 33
 public class BlockedRateController extends BaseController {
35 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 58
      * @param year               年份,默认当前年
59 59
      * @param quarter            季度 1-4,dateRangeQueryType=QUARTER 时有效
60 60
      * @param month              月份 1-12,dateRangeQueryType=MONTH 时有效
61
-     * @param scopeType          统计范围:STATION/BRIGADE/MANAGER/USER,不传则按登录角色自动判断
61
+     * @param scopeType          统计范围:STATION/BRIGADE/MANAGER/TEAM/USER,不传则按登录角色自动判断
62 62
      * @param scopeId            统计范围ID(deptId 或 userId)
63 63
      */
64 64
     @GetMapping("/completion-comparison")
@@ -228,6 +228,11 @@ public class DailyExamComparisonController {
228 228
         } else if ("BRIGADE".equals(scopeType) && scopeId != null) {
229 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 236
         } else {
232 237
             Long stationDeptId = ("STATION".equals(scopeType) && scopeId != null) ? scopeId : userDeptId;
233 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 4
 import java.util.Date;
5 5
 
6 6
 import com.baomidou.mybatisplus.annotation.IdType;
7
+import com.baomidou.mybatisplus.annotation.TableField;
7 8
 import com.baomidou.mybatisplus.annotation.TableId;
8 9
 import com.baomidou.mybatisplus.annotation.TableName;
9 10
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -117,6 +118,22 @@ public class BlockedRate extends BaseEntity {
117 118
     @Excel(name = "国际及中转区域平均速率")
118 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 137
     public void setTenantId(String tenantId) {
121 138
         this.tenantId = tenantId;
122 139
     }
@@ -237,6 +254,22 @@ public class BlockedRate extends BaseEntity {
237 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 273
     @Override
241 274
     public String toString() {
242 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 11
  * @author ruoyi
12 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 17
 import org.springframework.stereotype.Service;
18 18
 import com.sundot.airport.blocked.mapper.BlockedRateMapper;
19 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 21
 import org.springframework.transaction.annotation.Transactional;
22 22
 
23 23
 /**
@@ -27,7 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
27 27
  * @date 2026-04-13
28 28
  */
29 29
 @Service
30
-public class BlockedRateServiceImpl extends ServiceImpl<BlockedRateMapper, BlockedRate> implements BlockedRateService {
30
+public class BlockedRateServiceImpl extends ServiceImpl<BlockedRateMapper, BlockedRate> implements IBlockedRateService {
31 31
     @Autowired
32 32
     private BlockedRateMapper blockedRateMapper;
33 33
     @Autowired

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

@@ -71,6 +71,10 @@
71 71
             <if test="internationalTransferAvgRatePeak != null ">and international_transfer_avg_rate_peak =
72 72
                 #{internationalTransferAvgRatePeak}
73 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 78
         </where>
75 79
     </select>
76 80