瀏覽代碼

Merge remote-tracking branch 'origin/master'

sunpanhu 4 周之前
父節點
當前提交
569ff72fc2

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

@@ -130,7 +130,7 @@ public class ScoreEventController extends BaseController {
130 130
      */
131 131
     private void resolveIndicatorIds(ScoreEvent entity) {
132 132
         // 通过二级指标名称查找ID
133
-        if (entity.getLevel2Name() != null && !entity.getLevel2Name().trim().isEmpty()) {
133
+        if (entity.getLevel2Name() != null && !entity.getLevel2Name().trim().isEmpty() && entity.getLevel2Id() == null) {
134 134
             Long level2Id = findIndicatorIdByName(entity.getLevel2Name().trim());
135 135
             if (level2Id != null) {
136 136
                 entity.setLevel2Id(level2Id);
@@ -138,7 +138,7 @@ public class ScoreEventController extends BaseController {
138 138
         }
139 139
         
140 140
         // 通过三级指标名称查找ID
141
-        if (entity.getLevel3Name() != null && !entity.getLevel3Name().trim().isEmpty()) {
141
+        if (entity.getLevel3Name() != null && !entity.getLevel3Name().trim().isEmpty() && entity.getLevel3Id() == null) {
142 142
             Long level3Id = findIndicatorIdByName(entity.getLevel3Name().trim());
143 143
             if (level3Id != null) {
144 144
                 entity.setLevel3Id(level3Id);
@@ -146,7 +146,7 @@ public class ScoreEventController extends BaseController {
146 146
         }
147 147
         
148 148
         // 通过四级指标名称查找ID
149
-        if (entity.getLevel4Name() != null && !entity.getLevel4Name().trim().isEmpty()) {
149
+        if (entity.getLevel4Name() != null && !entity.getLevel4Name().trim().isEmpty() && entity.getLevel4Id() == null) {
150 150
             Long level4Id = findIndicatorIdByName(entity.getLevel4Name().trim());
151 151
             if (level4Id != null) {
152 152
                 entity.setLevel4Id(level4Id);

+ 2 - 1
airport-ledger/src/main/java/com/sundot/airport/ledger/mapper/ScoreIndicatorMapper.java

@@ -2,10 +2,11 @@ package com.sundot.airport.ledger.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.sundot.airport.ledger.domain.ScoreIndicator;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 import java.util.List;
7 8
 
8 9
 public interface ScoreIndicatorMapper extends BaseMapper<ScoreIndicator> {
9 10
     List<ScoreIndicator> selectList(ScoreIndicator query);
10
-    List<ScoreIndicator> selectByDimensionId(Long dimensionId);
11
+    List<ScoreIndicator> selectByDimensionId(@Param("dimensionId") Long dimensionId);
11 12
 }