|
|
@@ -16,6 +16,8 @@ import com.sundot.airport.ledger.domain.ScoreIndicator;
|
|
16
|
16
|
import com.sundot.airport.ledger.mapper.ScoreIndicatorMapper;
|
|
17
|
17
|
import com.sundot.airport.ledger.service.IScoreEventService;
|
|
18
|
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
|
21
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
20
|
22
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
21
|
23
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -41,6 +43,9 @@ public class ScoreEventController extends BaseController {
|
|
41
|
43
|
@Autowired
|
|
42
|
44
|
private IScoreIndicatorService indicatorService;
|
|
43
|
45
|
|
|
|
46
|
+ @Autowired
|
|
|
47
|
+ private IBasePositionService basePositionService;
|
|
|
48
|
+
|
|
44
|
49
|
@PreAuthorize("@ss.hasPermi('score:event:list')")
|
|
45
|
50
|
@GetMapping("/list")
|
|
46
|
51
|
public TableDataInfo list(ScoreEvent query) {
|
|
|
@@ -152,6 +157,16 @@ public class ScoreEventController extends BaseController {
|
|
152
|
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
|
181
|
ScoreIndicator indicator = indicatorService.getOne(wrapper);
|
|
167
|
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
|
}
|