LIVE_YE 2 년 전
부모
커밋
2edb7603aa

+ 6 - 0
boman-api/boman-domain/src/main/java/com/boman/domain/Czrk.java

@@ -84,6 +84,12 @@ public class Czrk extends BaseEntity{
      */
     private String keyCategory;
 
+
+    /**
+     * 人员类别
+     */
+    private List<String> keyCategoryList;
+
     /**
      * 户籍号
      */

+ 9 - 0
boman-web-core/src/main/java/com/boman/web/core/service/czrk/CzrkServiceImpl.java

@@ -145,6 +145,15 @@ public class CzrkServiceImpl implements ICzrkService {
         log.info("{}于{}查询户籍人员列表,查询条件:{}"
                 , sysUser.getUserName(), DateUtils.dateTimeNow(), JSON.toJSONString(czrk));
         setAgeScope(czrk);
+
+        if(StringUtils.isNotEmpty(czrk.getKeyCategory())){
+            List<String> keyCategoryList = Arrays.asList(czrk.getKeyCategory().trim().split(","));
+
+            if(keyCategoryList!=null && keyCategoryList.size()>0){
+                czrk.setKeyCategoryList(keyCategoryList);
+            }
+        }
+
         //获取到居住地的查询条件
         String provinceId = czrk.getProvinceIdXjd();
         String cityId = czrk.getCityIdXjd();

+ 15 - 3
boman-web-core/src/main/resources/mapper/CzrkMapper.xml

@@ -80,8 +80,9 @@
         <result property="villagerGroupJz" column="villagerGroupJz"/>
         <result property="gridNameJz" column="gridNameJz"/>
 
-
         <collection property="czrkJzdzList" javaType="java.util.List" resultMap="CzrkJzdzResult"/>
+
+
     </resultMap>
 
     <resultMap type="com.boman.domain.CzrkJzdz" id="CzrkJzdzResult">
@@ -168,7 +169,14 @@
 
             <if test="isConfirm != null  and isConfirm != ''">and is_confirm = #{isConfirm}</if>
             <if test="gridId != null  and gridId != ''">and grid_id = #{gridId}</if>
-            <if test="keyCategory != null  and keyCategory != ''">and  find_in_set(#{keyCategory}, key_category)</if>
+
+            <if test="keyCategoryList != null  and keyCategoryList.size() > 0">
+                <foreach item="KeyCategory" collection="keyCategoryList">
+                and  find_in_set(#{KeyCategory}, key_category)
+                </foreach>
+            </if>
+
+
         </where>
         order by create_time DESC
     </select>
@@ -207,7 +215,11 @@
             <if test="villagerGroupIdJz != null and villagerGroupIdJz != ''">and z.villager_group_id = #{villagerGroupIdJz}</if>
             <if test="gridIdJz != null and gridIdJz != ''">and z.grid_id = #{gridIdJz}</if>
 
-            <if test="keyCategory != null  and keyCategory != ''">and  find_in_set(#{keyCategory}, key_category)</if>
+            <if test="keyCategoryList != null  and keyCategoryList.size() > 0">
+                <foreach item="KeyCategory" collection="keyCategoryList">
+                    and  find_in_set(#{KeyCategory}, key_category)
+                </foreach>
+            </if>
         </where>
         order by c.create_time DESC
     </select>