소스 검색

导出权限控制

LIVE_YE 3 년 전
부모
커밋
931eae4803
1개의 변경된 파일28개의 추가작업 그리고 10개의 파일을 삭제
  1. 28 10
      boman-web-core/src/main/resources/mapper/CzrkMapper.xml

+ 28 - 10
boman-web-core/src/main/resources/mapper/CzrkMapper.xml

@@ -1122,14 +1122,34 @@
         where region_id = #{regionId} and is_del = 'N';
     </select>
     <select id="getAllCzrk" resultMap="CzrkResult">
-        select  c.user_name,c.age, STUFF(c.id_card,7,8,'********') as id_card,  c.province, c.city, c.region,
-        c.village_towns, c.village, c.villager_group,replace(c.now_in,'/','') as now_in,c.key_industries,
-        c.user_name, c.gender,c.phone_num, c.code, c.house_type, c.yhzgx,
-        cj.province as provinceXjd,cj.city as cityXjd,
-        cj.region as regionXjd,cj.town as villageTownsXjd,
-        cj.village as villageXjd,replace(cj.now_in,'/','') as nowXjd
-        from czrk c left join czrk_jzdz cj on c.id =cj.czrk_id
+        select
+        ANY_VALUE(c.user_name) as user_name,
+        ANY_VALUE(c.age) as age,
+        ANY_VALUE(STUFF (c.id_card, 7, 8, '********')) AS id_card,
+        ANY_VALUE(c.province) as province,
+        ANY_VALUE(c.city) as city,
+        ANY_VALUE(c.region) as region,
+        ANY_VALUE(c.village_towns) as village_towns,
+        ANY_VALUE(c.village) as village,
+        ANY_VALUE(c.villager_group) as villager_group,
+        ANY_VALUE(REPLACE (c.now_in, '/', '')) AS now_in,
+        ANY_VALUE(c.key_industries) as key_industries,
+        ANY_VALUE(c.gender) as gender,
+        ANY_VALUE(c.phone_num) as phone_num,
+        ANY_VALUE(c.CODE) as CODE,
+        ANY_VALUE(c.house_type) as house_type,
+        ANY_VALUE(c.yhzgx) as yhzgx,
+        ANY_VALUE(cj.province) AS provinceXjd,
+        ANY_VALUE(cj.city) AS cityXjd,
+        ANY_VALUE(cj.region) AS regionXjd,
+        ANY_VALUE(cj.town) AS villageTownsXjd,
+        ANY_VALUE(cj.village) AS villageXjd,
+        ANY_VALUE(REPLACE (cj.now_in, '/', '')) AS nowXjd
+        from czrk c
+        left join czrk_jzdz cj on c.id =cj.czrk_id
         <where>
+            c.is_del = 'N'
+            and c.status = '1'
             <!-- 已认领 -->
             <if test="isRl != null and isRl != ''">and c.is_rl = #{isRl}</if>
 
@@ -1161,9 +1181,7 @@
             <!--    <if test="villagerGroupId != null  and villagerGroupId != ''"> and villager_group_id = #{villagerGroupId}</if>
                 <if test="villagerGroup != null  and villagerGroup != ''"> and villager_group = #{villagerGroup}</if>-->
             <if test="nowIn != null  and nowIn != ''">and c.now_in = #{nowIn}</if>
-            <if test="status != null  and status != ''">and c.status = #{status}</if>
             <if test="isConfirm != null  and isConfirm != ''">and c.is_confirm = #{isConfirm}</if>
-            <if test="isDel != null  and isDel != ''">and c.is_del = #{isDel}</if>
             <if test="deleteReason != null  and deleteReason != ''">and c.delete_reason = #{deleteReason}</if>
             <if test="gridId != null  and gridId != ''">and c.grid_id = #{gridId}</if>
             <if test="deptIdList != null and deptIdList.size() > 0">
@@ -1184,7 +1202,7 @@
             <if test="villageTownsIdXjd != null">and cj.town_id = #{villageTownsIdXjd}</if>
             <if test="villageIdXjd != null">and cj.village_id = #{villageIdXjd}</if>
         </where>
-        order by c.create_time DESC
+        GROUP BY c.id_card
     </select>