From d40a69e7d455c12e32201330a9fbe22a7b6b4b5d Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期四, 29 十二月 2022 14:44:45 +0800
Subject: [PATCH] fix: 获取部门树为启用的

---
 ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml
index 3fb21d4..bb876fa 100644
--- a/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml
@@ -3,24 +3,43 @@
 <mapper namespace="com.ycl.mapper.caseHandler.ViolationsMapper">
 
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
-    <resultMap id="BaseResultMap" type="com.ycl.entity.caseHandler.Violations">
+    <resultMap id="BaseResultMap" type="com.ycl.vo.casePool.ViolationsVO">
         <id column="id" property="id" />
         <result column="category_id" property="categoryId" />
         <result column="type_id" property="typeId" />
         <result column="grade_id" property="gradeId" />
         <result column="action_cause" property="actionCause" />
         <result column="link_shop" property="linkShop" />
-        <result column="shop_name" property="shopName" />
+        <result column="store_name" property="shopName" />
         <result column="car_number" property="carNumber" />
         <result column="description" property="description" />
         <result column="informant" property="informant" />
         <result column="informant_phone_code" property="informantPhoneCode" />
         <result column="informant_id_card" property="informantIdCard" />
     </resultMap>
-
+    <resultMap type="com.ycl.vo.casePool.ViolationsVO" id="CondMapResultMap" extends="BaseResultMap">
+        <result column="category_text" property="categoryText" />
+        <result column="type_text" property="typeText" />
+        <result column="grade_text" property="gradeText" />
+    </resultMap>
     <!-- 閫氱敤鏌ヨ缁撴灉鍒� -->
     <sql id="Base_Column_List">
         id, category_id, type_id, grade_id, action_cause, link_shop, shop_name, car_number, description, informant, informant_phone_code, informant_id_card
     </sql>
-
+    <select id="selectCondMap" parameterType="map" resultMap="CondMapResultMap">
+        SELECT
+            uv.*,
+            t4.store_name ,
+            udd.name category_text,
+            udd2.name type_text,
+            udd3.name grade_text
+        FROM
+            ums_violations uv
+                LEFT JOIN ums_data_dictionary udd on uv.category_id = udd.id
+                LEFT JOIN ums_data_dictionary udd2 on uv.type_id = udd2.id
+                LEFT JOIN ums_data_dictionary udd3 on uv.grade_id = udd3.id
+                LEFT JOIN ums_store_store_info t4 on  t4.id=uv.shop_name
+        WHERE
+            uv.`id` =  #{id}
+    </select>
 </mapper>

--
Gitblit v1.8.0