2 İşlemeler 55c5854bd4 ... 3f80e9f4f8

Yazar SHA1 Mesaj Tarih
  chenshudong 3f80e9f4f8 Merge remote-tracking branch 'origin/master' 1 hafta önce
  chenshudong d83026492b 配分事项表 1 hafta önce

+ 29 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/score/ScoreEventController.java

@@ -16,6 +16,8 @@ import com.sundot.airport.ledger.domain.ScoreIndicator;
16
 import com.sundot.airport.ledger.mapper.ScoreIndicatorMapper;
16
 import com.sundot.airport.ledger.mapper.ScoreIndicatorMapper;
17
 import com.sundot.airport.ledger.service.IScoreEventService;
17
 import com.sundot.airport.ledger.service.IScoreEventService;
18
 import com.sundot.airport.ledger.service.IScoreIndicatorService;
18
 import com.sundot.airport.ledger.service.IScoreIndicatorService;
19
+import com.sundot.airport.system.domain.BasePosition;
20
+import com.sundot.airport.system.service.IBasePositionService;
19
 import org.springframework.beans.factory.annotation.Autowired;
21
 import org.springframework.beans.factory.annotation.Autowired;
20
 import org.springframework.security.access.prepost.PreAuthorize;
22
 import org.springframework.security.access.prepost.PreAuthorize;
21
 import org.springframework.validation.annotation.Validated;
23
 import org.springframework.validation.annotation.Validated;
@@ -41,6 +43,9 @@ public class ScoreEventController extends BaseController {
41
     @Autowired
43
     @Autowired
42
     private IScoreIndicatorService indicatorService;
44
     private IScoreIndicatorService indicatorService;
43
 
45
 
46
+    @Autowired
47
+    private IBasePositionService basePositionService;
48
+
44
     @PreAuthorize("@ss.hasPermi('score:event:list')")
49
     @PreAuthorize("@ss.hasPermi('score:event:list')")
45
     @GetMapping("/list")
50
     @GetMapping("/list")
46
     public TableDataInfo list(ScoreEvent query) {
51
     public TableDataInfo list(ScoreEvent query) {
@@ -152,6 +157,16 @@ public class ScoreEventController extends BaseController {
152
                 entity.setLevel4Id(level4Id);
157
                 entity.setLevel4Id(level4Id);
153
             }
158
             }
154
         }
159
         }
160
+
161
+        // 通过区域查找航站楼
162
+        BasePosition terminl = findTerminlByRegionalId(entity.getRegionalId());
163
+        if (terminl != null) {
164
+            entity.setTerminlId(terminl.getId());
165
+            entity.setTerminlName(terminl.getName());
166
+        } else {
167
+            entity.setTerminlId(null);
168
+            entity.setTerminlName(null);
169
+        }
155
     }
170
     }
156
 
171
 
157
     /**
172
     /**
@@ -166,4 +181,18 @@ public class ScoreEventController extends BaseController {
166
         ScoreIndicator indicator = indicatorService.getOne(wrapper);
181
         ScoreIndicator indicator = indicatorService.getOne(wrapper);
167
         return indicator != null ? indicator.getId() : null;
182
         return indicator != null ? indicator.getId() : null;
168
     }
183
     }
184
+
185
+    /**
186
+     * 通过区域查找航站楼
187
+     */
188
+    private BasePosition findTerminlByRegionalId(Long regionalId) {
189
+        if (regionalId == null) {
190
+            return null;
191
+        }
192
+        BasePosition regional = basePositionService.selectBasePositionById(regionalId);
193
+        if (regional == null) {
194
+            return null;
195
+        }
196
+        return basePositionService.selectBasePositionById(regional.getParentId());
197
+    }
169
 }
198
 }

+ 1 - 1
airport-ledger/src/main/resources/mapper/ledger/ScoreEventMapper.xml

@@ -81,7 +81,7 @@
81
         <if test="channelName != null and channelName != ''">AND channel_name LIKE CONCAT('%', #{channelName}, '%')</if>
81
         <if test="channelName != null and channelName != ''">AND channel_name LIKE CONCAT('%', #{channelName}, '%')</if>
82
         <if test="postId != null">AND post_id = #{postId}</if>
82
         <if test="postId != null">AND post_id = #{postId}</if>
83
         <if test="postName != null and postName != ''">AND post_name LIKE CONCAT('%', #{postName}, '%')</if>
83
         <if test="postName != null and postName != ''">AND post_name LIKE CONCAT('%', #{postName}, '%')</if>
84
-        <if test="scoreType != null and scoreType != ''">AND score_type = #{scoreType}</if>
84
+        <if test="scoreType != null and scoreType != '' and scoreType != '0'">AND score_type = #{scoreType}</if>
85
         <if test="personName != null and personName != ''">AND person_name LIKE CONCAT('%', #{personName}, '%')</if>
85
         <if test="personName != null and personName != ''">AND person_name LIKE CONCAT('%', #{personName}, '%')</if>
86
         <if test="deptName != null and deptName != ''">AND dept_name LIKE CONCAT('%', #{deptName}, '%')</if>
86
         <if test="deptName != null and deptName != ''">AND dept_name LIKE CONCAT('%', #{deptName}, '%')</if>
87
         <if test="teamName != null and teamName != ''">AND team_name LIKE CONCAT('%', #{teamName}, '%')</if>
87
         <if test="teamName != null and teamName != ''">AND team_name LIKE CONCAT('%', #{teamName}, '%')</if>