Bläddra i källkod

考核指标表

chenshudong 1 månad sedan
förälder
incheckning
08a9b33de5

+ 26 - 27
airport-system/src/main/java/com/sundot/airport/system/domain/BasePerformanceIndicator.java

@@ -25,6 +25,14 @@ public class BasePerformanceIndicator extends BaseEntity {
25 25
     /** 主键 */
26 26
     private Long id;
27 27
 
28
+    /** 所属一级分类编码 */
29
+    @Excel(name = "所属一级分类编码", type = Excel.Type.EXPORT)
30
+    private String categoryCodeOne;
31
+
32
+    /** 所属一级分类名称 */
33
+    @Excel(name = "所属一级分类名称")
34
+    private String categoryNameOne;
35
+
28 36
     /** 所属二级分类编码 */
29 37
     @Excel(name = "所属二级分类编码", type = Excel.Type.EXPORT)
30 38
     private String categoryCode;
@@ -38,7 +46,6 @@ public class BasePerformanceIndicator extends BaseEntity {
38 46
     private String code;
39 47
 
40 48
     /** 序号 */
41
-    @Excel(name = "序号")
42 49
     private String serialNumber;
43 50
 
44 51
     /** 指标名称 */
@@ -74,14 +81,6 @@ public class BasePerformanceIndicator extends BaseEntity {
74 81
             type = Excel.Type.EXPORT)
75 82
     private String rewardPunishmentType;
76 83
 
77
-    /** 所属一级分类编码 */
78
-    @Excel(name = "所属一级分类编码", type = Excel.Type.EXPORT)
79
-    private String categoryCodeOne;
80
-
81
-    /** 所属一级分类名称 */
82
-    @Excel(name = "所属一级分类名称")
83
-    private String categoryNameOne;
84
-
85 84
     public void setTenantId(String tenantId) {
86 85
         this.tenantId = tenantId;
87 86
     }
@@ -106,6 +105,22 @@ public class BasePerformanceIndicator extends BaseEntity {
106 105
         return id;
107 106
     }
108 107
 
108
+    public String getCategoryCodeOne() {
109
+        return categoryCodeOne;
110
+    }
111
+
112
+    public void setCategoryCodeOne(String categoryCodeOne) {
113
+        this.categoryCodeOne = categoryCodeOne;
114
+    }
115
+
116
+    public String getCategoryNameOne() {
117
+        return categoryNameOne;
118
+    }
119
+
120
+    public void setCategoryNameOne(String categoryNameOne) {
121
+        this.categoryNameOne = categoryNameOne;
122
+    }
123
+
109 124
     public void setCategoryCode(String categoryCode) {
110 125
         this.categoryCode = categoryCode;
111 126
     }
@@ -186,22 +201,6 @@ public class BasePerformanceIndicator extends BaseEntity {
186 201
         this.rewardPunishmentType = rewardPunishmentType;
187 202
     }
188 203
 
189
-    public String getCategoryCodeOne() {
190
-        return categoryCodeOne;
191
-    }
192
-
193
-    public void setCategoryCodeOne(String categoryCodeOne) {
194
-        this.categoryCodeOne = categoryCodeOne;
195
-    }
196
-
197
-    public String getCategoryNameOne() {
198
-        return categoryNameOne;
199
-    }
200
-
201
-    public void setCategoryNameOne(String categoryNameOne) {
202
-        this.categoryNameOne = categoryNameOne;
203
-    }
204
-
205 204
     @Override
206 205
     public String toString() {
207 206
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -213,6 +212,8 @@ public class BasePerformanceIndicator extends BaseEntity {
213 212
                 .append("updateTime", getUpdateTime())
214 213
                 .append("remark", getRemark())
215 214
                 .append("id", getId())
215
+                .append("categoryCodeOne", getCategoryCodeOne())
216
+                .append("categoryNameOne", getCategoryNameOne())
216 217
                 .append("categoryCode", getCategoryCode())
217 218
                 .append("categoryName", getCategoryName())
218 219
                 .append("code", getCode())
@@ -222,8 +223,6 @@ public class BasePerformanceIndicator extends BaseEntity {
222 223
                 .append("unit", getUnit())
223 224
                 .append("leaveType", getLeaveType())
224 225
                 .append("rewardPunishmentType", getRewardPunishmentType())
225
-                .append("categoryCodeOne", getCategoryCodeOne())
226
-                .append("categoryNameOne", getCategoryNameOne())
227 226
                 .toString();
228 227
     }
229 228
 }

+ 6 - 5
airport-system/src/main/java/com/sundot/airport/system/service/impl/BasePerformanceIndicatorServiceImpl.java

@@ -226,8 +226,9 @@ public class BasePerformanceIndicatorServiceImpl implements IBasePerformanceIndi
226 226
                     continue;
227 227
                 }
228 228
 
229
-                // 查询是否已存在(根据【所属二级分类编码+指标名称】唯一)
229
+                // 查询是否已存在(根据【所属一级分类编码+所属二级分类编码+指标名称】唯一)
230 230
                 BasePerformanceIndicator queryParam = new BasePerformanceIndicator();
231
+                queryParam.setCategoryCodeOne(data.getCategoryCodeOne());
231 232
                 queryParam.setCategoryCode(data.getCategoryCode());
232 233
                 queryParam.setName(data.getName());
233 234
                 List<BasePerformanceIndicator> existingList = basePerformanceIndicatorMapper.selectBasePerformanceIndicatorList(queryParam);
@@ -238,7 +239,7 @@ public class BasePerformanceIndicatorServiceImpl implements IBasePerformanceIndi
238 239
                     data.setCreateTime(DateUtils.getNowDate());
239 240
                     basePerformanceIndicatorMapper.insertBasePerformanceIndicator(data);
240 241
                     successNum++;
241
-                    successMsg.append("<br/>" + successNum + "、所属分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入成功");
242
+                    successMsg.append("<br/>" + successNum + "、所属一级分类名称【" + data.getCategoryNameOne() + "】、所属二级分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入成功");
242 243
                 } else if (isUpdateSupport) {
243 244
                     // 更新
244 245
                     BasePerformanceIndicator old = existingList.get(0);
@@ -246,14 +247,14 @@ public class BasePerformanceIndicatorServiceImpl implements IBasePerformanceIndi
246 247
                     data.setUpdateTime(DateUtils.getNowDate());
247 248
                     basePerformanceIndicatorMapper.updateBasePerformanceIndicator(data);
248 249
                     successNum++;
249
-                    successMsg.append("<br/>" + successNum + "、所属分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】更新成功");
250
+                    successMsg.append("<br/>" + successNum + "、所属一级分类名称【" + data.getCategoryNameOne() + "】、所属二级分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】更新成功");
250 251
                 } else {
251 252
                     failureNum++;
252
-                    failureMsg.append("<br/>" + failureNum + "、所属分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】已存在");
253
+                    failureMsg.append("<br/>" + failureNum + "、所属一级分类名称【" + data.getCategoryNameOne() + "】、所属二级分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】已存在");
253 254
                 }
254 255
             } catch (Exception e) {
255 256
                 failureNum++;
256
-                String msg = "<br/>" + failureNum + "、所属分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入失败:";
257
+                String msg = "<br/>" + failureNum + "、所属一级分类名称【" + data.getCategoryNameOne() + "】、所属二级分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入失败:";
257 258
                 failureMsg.append(msg + e.getMessage());
258 259
             }
259 260
         }

+ 16 - 16
airport-system/src/main/resources/mapper/system/BasePerformanceIndicatorMapper.xml

@@ -13,6 +13,8 @@
13 13
         <result property="updateTime" column="update_time"/>
14 14
         <result property="remark" column="remark"/>
15 15
         <result property="id" column="id"/>
16
+        <result property="categoryCodeOne" column="category_code_one"/>
17
+        <result property="categoryNameOne" column="category_name_one"/>
16 18
         <result property="categoryCode" column="category_code"/>
17 19
         <result property="categoryName" column="category_name"/>
18 20
         <result property="code" column="code"/>
@@ -22,8 +24,6 @@
22 24
         <result property="unit" column="unit"/>
23 25
         <result property="leaveType" column="leave_type"/>
24 26
         <result property="rewardPunishmentType" column="reward_punishment_type"/>
25
-        <result property="categoryCodeOne" column="category_code_one"/>
26
-        <result property="categoryNameOne" column="category_name_one"/>
27 27
     </resultMap>
28 28
 
29 29
     <sql id="selectBasePerformanceIndicatorVo">
@@ -35,6 +35,8 @@
35 35
                update_time,
36 36
                remark,
37 37
                id,
38
+               category_code_one,
39
+               category_name_one,
38 40
                category_code,
39 41
                category_name,
40 42
                code,
@@ -43,9 +45,7 @@
43 45
                score,
44 46
                unit,
45 47
                leave_type,
46
-               reward_punishment_type,
47
-               category_code_one,
48
-               category_name_one
48
+               reward_punishment_type
49 49
         from base_performance_indicator
50 50
     </sql>
51 51
 
@@ -55,6 +55,11 @@
55 55
         <where>
56 56
             <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
57 57
             <if test="revision != null ">and revision = #{revision}</if>
58
+            <if test="categoryCodeOne != null  and categoryCodeOne != ''">and category_code_one = #{categoryCodeOne}
59
+            </if>
60
+            <if test="categoryNameOne != null  and categoryNameOne != ''">and category_name_one like
61
+                concat('%', #{categoryNameOne}, '%')
62
+            </if>
58 63
             <if test="categoryCode != null  and categoryCode != ''">and category_code = #{categoryCode}</if>
59 64
             <if test="categoryName != null  and categoryName != ''">and category_name like concat('%', #{categoryName},
60 65
                 '%')
@@ -68,11 +73,6 @@
68 73
             <if test="rewardPunishmentType != null  and rewardPunishmentType != ''">and reward_punishment_type =
69 74
                 #{rewardPunishmentType}
70 75
             </if>
71
-            <if test="categoryCodeOne != null  and categoryCodeOne != ''">and category_code_one = #{categoryCodeOne}
72
-            </if>
73
-            <if test="categoryNameOne != null  and categoryNameOne != ''">and category_name_one like
74
-                concat('%', #{categoryNameOne}, '%')
75
-            </if>
76 76
         </where>
77 77
         order by create_time desc
78 78
     </select>
@@ -93,6 +93,8 @@
93 93
             <if test="updateBy != null">update_by,</if>
94 94
             <if test="updateTime != null">update_time,</if>
95 95
             <if test="remark != null">remark,</if>
96
+            <if test="categoryCodeOne != null">category_code_one,</if>
97
+            <if test="categoryNameOne != null">category_name_one,</if>
96 98
             <if test="categoryCode != null and categoryCode != ''">category_code,</if>
97 99
             <if test="categoryName != null and categoryName != ''">category_name,</if>
98 100
             <if test="code != null">code,</if>
@@ -102,8 +104,6 @@
102 104
             <if test="unit != null">unit,</if>
103 105
             <if test="leaveType != null">leave_type,</if>
104 106
             <if test="rewardPunishmentType != null">reward_punishment_type,</if>
105
-            <if test="categoryCodeOne != null">category_code_one,</if>
106
-            <if test="categoryNameOne != null">category_name_one,</if>
107 107
         </trim>
108 108
         <trim prefix="values (" suffix=")" suffixOverrides=",">
109 109
             <if test="tenantId != null">#{tenantId},</if>
@@ -113,6 +113,8 @@
113 113
             <if test="updateBy != null">#{updateBy},</if>
114 114
             <if test="updateTime != null">#{updateTime},</if>
115 115
             <if test="remark != null">#{remark},</if>
116
+            <if test="categoryCodeOne != null">#{categoryCodeOne},</if>
117
+            <if test="categoryNameOne != null">#{categoryNameOne},</if>
116 118
             <if test="categoryCode != null and categoryCode != ''">#{categoryCode},</if>
117 119
             <if test="categoryName != null and categoryName != ''">#{categoryName},</if>
118 120
             <if test="code != null">#{code},</if>
@@ -122,8 +124,6 @@
122 124
             <if test="unit != null">#{unit},</if>
123 125
             <if test="leaveType != null">#{leaveType},</if>
124 126
             <if test="rewardPunishmentType != null">#{rewardPunishmentType},</if>
125
-            <if test="categoryCodeOne != null">#{categoryCodeOne},</if>
126
-            <if test="categoryNameOne != null">#{categoryNameOne},</if>
127 127
         </trim>
128 128
     </insert>
129 129
 
@@ -137,6 +137,8 @@
137 137
             <if test="updateBy != null">update_by = #{updateBy},</if>
138 138
             <if test="updateTime != null">update_time = #{updateTime},</if>
139 139
             <if test="remark != null">remark = #{remark},</if>
140
+            <if test="categoryCodeOne != null">category_code_one = #{categoryCodeOne},</if>
141
+            <if test="categoryNameOne != null">category_name_one = #{categoryNameOne},</if>
140 142
             <if test="categoryCode != null and categoryCode != ''">category_code = #{categoryCode},</if>
141 143
             <if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
142 144
             <if test="code != null">code = #{code},</if>
@@ -146,8 +148,6 @@
146 148
             <if test="unit != null">unit = #{unit},</if>
147 149
             <if test="leaveType != null">leave_type = #{leaveType},</if>
148 150
             <if test="rewardPunishmentType != null">reward_punishment_type = #{rewardPunishmentType},</if>
149
-            <if test="categoryCodeOne != null">category_code_one = #{categoryCodeOne},</if>
150
-            <if test="categoryNameOne != null">category_name_one = #{categoryNameOne},</if>
151 151
         </trim>
152 152
         where id = #{id}
153 153
     </update>