chenshudong 1 месяц назад
Родитель
Сommit
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
     private Long id;
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
     @Excel(name = "所属二级分类编码", type = Excel.Type.EXPORT)
37
     @Excel(name = "所属二级分类编码", type = Excel.Type.EXPORT)
30
     private String categoryCode;
38
     private String categoryCode;
@@ -38,7 +46,6 @@ public class BasePerformanceIndicator extends BaseEntity {
38
     private String code;
46
     private String code;
39
 
47
 
40
     /** 序号 */
48
     /** 序号 */
41
-    @Excel(name = "序号")
42
     private String serialNumber;
49
     private String serialNumber;
43
 
50
 
44
     /** 指标名称 */
51
     /** 指标名称 */
@@ -74,14 +81,6 @@ public class BasePerformanceIndicator extends BaseEntity {
74
             type = Excel.Type.EXPORT)
81
             type = Excel.Type.EXPORT)
75
     private String rewardPunishmentType;
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
     public void setTenantId(String tenantId) {
84
     public void setTenantId(String tenantId) {
86
         this.tenantId = tenantId;
85
         this.tenantId = tenantId;
87
     }
86
     }
@@ -106,6 +105,22 @@ public class BasePerformanceIndicator extends BaseEntity {
106
         return id;
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
     public void setCategoryCode(String categoryCode) {
124
     public void setCategoryCode(String categoryCode) {
110
         this.categoryCode = categoryCode;
125
         this.categoryCode = categoryCode;
111
     }
126
     }
@@ -186,22 +201,6 @@ public class BasePerformanceIndicator extends BaseEntity {
186
         this.rewardPunishmentType = rewardPunishmentType;
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
     @Override
204
     @Override
206
     public String toString() {
205
     public String toString() {
207
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
206
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -213,6 +212,8 @@ public class BasePerformanceIndicator extends BaseEntity {
213
                 .append("updateTime", getUpdateTime())
212
                 .append("updateTime", getUpdateTime())
214
                 .append("remark", getRemark())
213
                 .append("remark", getRemark())
215
                 .append("id", getId())
214
                 .append("id", getId())
215
+                .append("categoryCodeOne", getCategoryCodeOne())
216
+                .append("categoryNameOne", getCategoryNameOne())
216
                 .append("categoryCode", getCategoryCode())
217
                 .append("categoryCode", getCategoryCode())
217
                 .append("categoryName", getCategoryName())
218
                 .append("categoryName", getCategoryName())
218
                 .append("code", getCode())
219
                 .append("code", getCode())
@@ -222,8 +223,6 @@ public class BasePerformanceIndicator extends BaseEntity {
222
                 .append("unit", getUnit())
223
                 .append("unit", getUnit())
223
                 .append("leaveType", getLeaveType())
224
                 .append("leaveType", getLeaveType())
224
                 .append("rewardPunishmentType", getRewardPunishmentType())
225
                 .append("rewardPunishmentType", getRewardPunishmentType())
225
-                .append("categoryCodeOne", getCategoryCodeOne())
226
-                .append("categoryNameOne", getCategoryNameOne())
227
                 .toString();
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
                     continue;
226
                     continue;
227
                 }
227
                 }
228
 
228
 
229
-                // 查询是否已存在(根据【所属二级分类编码+指标名称】唯一)
229
+                // 查询是否已存在(根据【所属一级分类编码+所属二级分类编码+指标名称】唯一)
230
                 BasePerformanceIndicator queryParam = new BasePerformanceIndicator();
230
                 BasePerformanceIndicator queryParam = new BasePerformanceIndicator();
231
+                queryParam.setCategoryCodeOne(data.getCategoryCodeOne());
231
                 queryParam.setCategoryCode(data.getCategoryCode());
232
                 queryParam.setCategoryCode(data.getCategoryCode());
232
                 queryParam.setName(data.getName());
233
                 queryParam.setName(data.getName());
233
                 List<BasePerformanceIndicator> existingList = basePerformanceIndicatorMapper.selectBasePerformanceIndicatorList(queryParam);
234
                 List<BasePerformanceIndicator> existingList = basePerformanceIndicatorMapper.selectBasePerformanceIndicatorList(queryParam);
@@ -238,7 +239,7 @@ public class BasePerformanceIndicatorServiceImpl implements IBasePerformanceIndi
238
                     data.setCreateTime(DateUtils.getNowDate());
239
                     data.setCreateTime(DateUtils.getNowDate());
239
                     basePerformanceIndicatorMapper.insertBasePerformanceIndicator(data);
240
                     basePerformanceIndicatorMapper.insertBasePerformanceIndicator(data);
240
                     successNum++;
241
                     successNum++;
241
-                    successMsg.append("<br/>" + successNum + "、所属分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入成功");
242
+                    successMsg.append("<br/>" + successNum + "、所属一级分类名称【" + data.getCategoryNameOne() + "】、所属二级分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入成功");
242
                 } else if (isUpdateSupport) {
243
                 } else if (isUpdateSupport) {
243
                     // 更新
244
                     // 更新
244
                     BasePerformanceIndicator old = existingList.get(0);
245
                     BasePerformanceIndicator old = existingList.get(0);
@@ -246,14 +247,14 @@ public class BasePerformanceIndicatorServiceImpl implements IBasePerformanceIndi
246
                     data.setUpdateTime(DateUtils.getNowDate());
247
                     data.setUpdateTime(DateUtils.getNowDate());
247
                     basePerformanceIndicatorMapper.updateBasePerformanceIndicator(data);
248
                     basePerformanceIndicatorMapper.updateBasePerformanceIndicator(data);
248
                     successNum++;
249
                     successNum++;
249
-                    successMsg.append("<br/>" + successNum + "、所属分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】更新成功");
250
+                    successMsg.append("<br/>" + successNum + "、所属一级分类名称【" + data.getCategoryNameOne() + "】、所属二级分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】更新成功");
250
                 } else {
251
                 } else {
251
                     failureNum++;
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
             } catch (Exception e) {
255
             } catch (Exception e) {
255
                 failureNum++;
256
                 failureNum++;
256
-                String msg = "<br/>" + failureNum + "、所属分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入失败:";
257
+                String msg = "<br/>" + failureNum + "、所属一级分类名称【" + data.getCategoryNameOne() + "】、所属二级分类名称【" + data.getCategoryName() + "】、指标名称【" + data.getName() + "】导入失败:";
257
                 failureMsg.append(msg + e.getMessage());
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
         <result property="updateTime" column="update_time"/>
13
         <result property="updateTime" column="update_time"/>
14
         <result property="remark" column="remark"/>
14
         <result property="remark" column="remark"/>
15
         <result property="id" column="id"/>
15
         <result property="id" column="id"/>
16
+        <result property="categoryCodeOne" column="category_code_one"/>
17
+        <result property="categoryNameOne" column="category_name_one"/>
16
         <result property="categoryCode" column="category_code"/>
18
         <result property="categoryCode" column="category_code"/>
17
         <result property="categoryName" column="category_name"/>
19
         <result property="categoryName" column="category_name"/>
18
         <result property="code" column="code"/>
20
         <result property="code" column="code"/>
@@ -22,8 +24,6 @@
22
         <result property="unit" column="unit"/>
24
         <result property="unit" column="unit"/>
23
         <result property="leaveType" column="leave_type"/>
25
         <result property="leaveType" column="leave_type"/>
24
         <result property="rewardPunishmentType" column="reward_punishment_type"/>
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
     </resultMap>
27
     </resultMap>
28
 
28
 
29
     <sql id="selectBasePerformanceIndicatorVo">
29
     <sql id="selectBasePerformanceIndicatorVo">
@@ -35,6 +35,8 @@
35
                update_time,
35
                update_time,
36
                remark,
36
                remark,
37
                id,
37
                id,
38
+               category_code_one,
39
+               category_name_one,
38
                category_code,
40
                category_code,
39
                category_name,
41
                category_name,
40
                code,
42
                code,
@@ -43,9 +45,7 @@
43
                score,
45
                score,
44
                unit,
46
                unit,
45
                leave_type,
47
                leave_type,
46
-               reward_punishment_type,
47
-               category_code_one,
48
-               category_name_one
48
+               reward_punishment_type
49
         from base_performance_indicator
49
         from base_performance_indicator
50
     </sql>
50
     </sql>
51
 
51
 
@@ -55,6 +55,11 @@
55
         <where>
55
         <where>
56
             <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
56
             <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
57
             <if test="revision != null ">and revision = #{revision}</if>
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
             <if test="categoryCode != null  and categoryCode != ''">and category_code = #{categoryCode}</if>
63
             <if test="categoryCode != null  and categoryCode != ''">and category_code = #{categoryCode}</if>
59
             <if test="categoryName != null  and categoryName != ''">and category_name like concat('%', #{categoryName},
64
             <if test="categoryName != null  and categoryName != ''">and category_name like concat('%', #{categoryName},
60
                 '%')
65
                 '%')
@@ -68,11 +73,6 @@
68
             <if test="rewardPunishmentType != null  and rewardPunishmentType != ''">and reward_punishment_type =
73
             <if test="rewardPunishmentType != null  and rewardPunishmentType != ''">and reward_punishment_type =
69
                 #{rewardPunishmentType}
74
                 #{rewardPunishmentType}
70
             </if>
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
         </where>
76
         </where>
77
         order by create_time desc
77
         order by create_time desc
78
     </select>
78
     </select>
@@ -93,6 +93,8 @@
93
             <if test="updateBy != null">update_by,</if>
93
             <if test="updateBy != null">update_by,</if>
94
             <if test="updateTime != null">update_time,</if>
94
             <if test="updateTime != null">update_time,</if>
95
             <if test="remark != null">remark,</if>
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
             <if test="categoryCode != null and categoryCode != ''">category_code,</if>
98
             <if test="categoryCode != null and categoryCode != ''">category_code,</if>
97
             <if test="categoryName != null and categoryName != ''">category_name,</if>
99
             <if test="categoryName != null and categoryName != ''">category_name,</if>
98
             <if test="code != null">code,</if>
100
             <if test="code != null">code,</if>
@@ -102,8 +104,6 @@
102
             <if test="unit != null">unit,</if>
104
             <if test="unit != null">unit,</if>
103
             <if test="leaveType != null">leave_type,</if>
105
             <if test="leaveType != null">leave_type,</if>
104
             <if test="rewardPunishmentType != null">reward_punishment_type,</if>
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
         </trim>
107
         </trim>
108
         <trim prefix="values (" suffix=")" suffixOverrides=",">
108
         <trim prefix="values (" suffix=")" suffixOverrides=",">
109
             <if test="tenantId != null">#{tenantId},</if>
109
             <if test="tenantId != null">#{tenantId},</if>
@@ -113,6 +113,8 @@
113
             <if test="updateBy != null">#{updateBy},</if>
113
             <if test="updateBy != null">#{updateBy},</if>
114
             <if test="updateTime != null">#{updateTime},</if>
114
             <if test="updateTime != null">#{updateTime},</if>
115
             <if test="remark != null">#{remark},</if>
115
             <if test="remark != null">#{remark},</if>
116
+            <if test="categoryCodeOne != null">#{categoryCodeOne},</if>
117
+            <if test="categoryNameOne != null">#{categoryNameOne},</if>
116
             <if test="categoryCode != null and categoryCode != ''">#{categoryCode},</if>
118
             <if test="categoryCode != null and categoryCode != ''">#{categoryCode},</if>
117
             <if test="categoryName != null and categoryName != ''">#{categoryName},</if>
119
             <if test="categoryName != null and categoryName != ''">#{categoryName},</if>
118
             <if test="code != null">#{code},</if>
120
             <if test="code != null">#{code},</if>
@@ -122,8 +124,6 @@
122
             <if test="unit != null">#{unit},</if>
124
             <if test="unit != null">#{unit},</if>
123
             <if test="leaveType != null">#{leaveType},</if>
125
             <if test="leaveType != null">#{leaveType},</if>
124
             <if test="rewardPunishmentType != null">#{rewardPunishmentType},</if>
126
             <if test="rewardPunishmentType != null">#{rewardPunishmentType},</if>
125
-            <if test="categoryCodeOne != null">#{categoryCodeOne},</if>
126
-            <if test="categoryNameOne != null">#{categoryNameOne},</if>
127
         </trim>
127
         </trim>
128
     </insert>
128
     </insert>
129
 
129
 
@@ -137,6 +137,8 @@
137
             <if test="updateBy != null">update_by = #{updateBy},</if>
137
             <if test="updateBy != null">update_by = #{updateBy},</if>
138
             <if test="updateTime != null">update_time = #{updateTime},</if>
138
             <if test="updateTime != null">update_time = #{updateTime},</if>
139
             <if test="remark != null">remark = #{remark},</if>
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
             <if test="categoryCode != null and categoryCode != ''">category_code = #{categoryCode},</if>
142
             <if test="categoryCode != null and categoryCode != ''">category_code = #{categoryCode},</if>
141
             <if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
143
             <if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
142
             <if test="code != null">code = #{code},</if>
144
             <if test="code != null">code = #{code},</if>
@@ -146,8 +148,6 @@
146
             <if test="unit != null">unit = #{unit},</if>
148
             <if test="unit != null">unit = #{unit},</if>
147
             <if test="leaveType != null">leave_type = #{leaveType},</if>
149
             <if test="leaveType != null">leave_type = #{leaveType},</if>
148
             <if test="rewardPunishmentType != null">reward_punishment_type = #{rewardPunishmentType},</if>
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
         </trim>
151
         </trim>
152
         where id = #{id}
152
         where id = #{id}
153
     </update>
153
     </update>