Эх сурвалжийг харах

fix 修改了小程序查询参数,跑北京东城区数据,修复了查询户主查询出删除人的情况

tjf 3 жил өмнө
parent
commit
6593935c73

+ 2 - 2
boman-modules/boman-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -63,13 +63,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		left join sys_dept d on u.dept_id = d.id
 		left join sys_dept d on u.dept_id = d.id
 		where u.del_flag = '0'
 		where u.del_flag = '0'
 		<if test="userName != null and userName != ''">
 		<if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like concat( #{userName}, '%')
 		</if>
 		</if>
 		<if test="status != null and status != ''">
 		<if test="status != null and status != ''">
 			AND u.status = #{status}
 			AND u.status = #{status}
 		</if>
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like concat(#{phonenumber}, '%')
 		</if>
 		</if>
 <!--		<if test="params.beginTime != null and params.beginTime != ''">&lt;!&ndash; 开始时间检索 &ndash;&gt;-->
 <!--		<if test="params.beginTime != null and params.beginTime != ''">&lt;!&ndash; 开始时间检索 &ndash;&gt;-->
 <!--			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')-->
 <!--			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')-->

+ 12 - 1
boman-web-core/src/main/java/com/boman/web/core/controller/CzrkController.java

@@ -178,11 +178,22 @@ public class CzrkController extends BaseController {
      * @return
      * @return
      */
      */
     @Log(title = "变更接口", businessType = BusinessType.UPDATE)
     @Log(title = "变更接口", businessType = BusinessType.UPDATE)
-    //@GetMapping("/changeCzrk")
+    @GetMapping("/changeCzrk")
     public AjaxResult changeCzrk(Czrk czrk) {
     public AjaxResult changeCzrk(Czrk czrk) {
         return czrkService.changeCzrk(czrk);
         return czrkService.changeCzrk(czrk);
     }
     }
 
 
+    /**
+     * 查询非正常人员列表(死亡,失踪)
+     */
+
+    @GetMapping("/unusualList")
+    public TableDataInfo unusualList(Czrk czrk) {
+        startPage();
+        List<Czrk> list = czrkService.unusualList(czrk);
+        return getDataTable(list);
+    }
+
     /**
     /**
      * 外部访问czrk的字段
      * 外部访问czrk的字段
      */
      */

+ 2 - 2
boman-web-core/src/main/java/com/boman/web/core/controller/RyrlController.java

@@ -76,8 +76,8 @@ public class RyrlController extends BaseController {
      * @return com.boman.domain.dto.AjaxResult
      * @return com.boman.domain.dto.AjaxResult
      */
      */
     @GetMapping("/sts")
     @GetMapping("/sts")
-    public AjaxResult stsByApplet(Long provinceId, Long cityId, Long regionId, Long townId, Long villageId, String idCard, String queryType, String houseType,String isConfirm) {
-        return AjaxResult.success("成功", czrkService.stsByApplet(provinceId, cityId, regionId, townId, villageId, idCard, queryType, houseType,isConfirm));
+    public AjaxResult stsByApplet(Long provinceId, Long cityId, Long regionId, Long townId, Long villageId, String idCard,String userName, String queryType, String houseType,String isConfirm) {
+        return AjaxResult.success("成功", czrkService.stsByApplet(provinceId, cityId, regionId, townId, villageId, idCard, userName,queryType, houseType,isConfirm));
     }
     }
 
 
     /**
     /**

+ 21 - 20
boman-web-core/src/main/java/com/boman/web/core/controller/SysRegionController.java

@@ -56,8 +56,8 @@ public class SysRegionController {
                 String href = a.attr("href");     // 11.html
                 String href = a.attr("href");     // 11.html
                 String name = a.text();           // 浙江省
                 String name = a.text();           // 浙江省
 
 
-                Long id = 31L;
-                if ("广东省".equals(name)) {
+                Long id = 1L;
+                if ("北京市".equals(name)) {
 /*                    SysRegion region = new SysRegion();
 /*                    SysRegion region = new SysRegion();
                     region.setId(id);
                     region.setId(id);
                     region.setPid(0L);
                     region.setPid(0L);
@@ -110,7 +110,7 @@ public class SysRegionController {
             String name = nametd.select("a").text();        // 衢州市
             String name = nametd.select("a").text();        // 衢州市
             System.out.println("开始爬取" + name);
             System.out.println("开始爬取" + name);
 
 
-            if ( "肇庆市".equals(name)|| "惠州市".equals(name)|| "梅州市".equals(name)) {
+        /*    if ( "安阳市".equals(name)|| "鹤壁市".equals(name)|| "新乡市".equals(name)||"焦作市".equals(name)) {*/
                 SysRegion region = new SysRegion();
                 SysRegion region = new SysRegion();
                 region.setId(Long.valueOf(code));
                 region.setId(Long.valueOf(code));
                 region.setPid(i);
                 region.setPid(i);
@@ -120,9 +120,9 @@ public class SysRegionController {
                 // 如果你有其他需求,请在循环外部设置计数器。(例如:下面的区和街道逻辑)
                 // 如果你有其他需求,请在循环外部设置计数器。(例如:下面的区和街道逻辑)
                 region.setTreeLevel(1);
                 region.setTreeLevel(1);
                 region.setSort(sort);
                 region.setSort(sort);
-                regions.add(region);
+                //regions.add(region);
                 getQu(href, code);
                 getQu(href, code);
-            }
+           /* }*/
         }
         }
     }
     }
 
 
@@ -138,7 +138,7 @@ public class SysRegionController {
         Elements countryAll = document.select(".countytr");
         Elements countryAll = document.select(".countytr");
 
 
         // 这里的sort没有从0开始增加,是因为市下的第一级为市辖区,该级下无子级,用不着采集。所以直接跳过。
         // 这里的sort没有从0开始增加,是因为市下的第一级为市辖区,该级下无子级,用不着采集。所以直接跳过。
-        long sort = -1;
+        long sort = 0;
 
 
         for (Element countrytr : countryAll) {
         for (Element countrytr : countryAll) {
             sort++;
             sort++;
@@ -146,25 +146,26 @@ public class SysRegionController {
             if (sort > 0) {
             if (sort > 0) {
                 Element codetd = countrytr.child(0);
                 Element codetd = countrytr.child(0);
                 Element nametd = countrytr.child(1);
                 Element nametd = countrytr.child(1);
-
                 String href = codetd.select("a").attr("href");  // 02/330281.html
                 String href = codetd.select("a").attr("href");  // 02/330281.html
                 String code = codetd.select("a").text();        // 330281000000
                 String code = codetd.select("a").text();        // 330281000000
                 String name = nametd.select("a").text();        // 余姚市
                 String name = nametd.select("a").text();        // 余姚市
-                System.out.println("开始爬取" + name);
+                if ("东城区".equals(name)){
+                    System.out.println("开始爬取" + name);
 
 
-                SysRegion region = new SysRegion();
-                if (StringUtils.isNotBlank(code)){
-                    region.setId(Long.valueOf(code));
-                }else {
-                    region.setId(Long.valueOf( cityCode+ "123456"+sort));
+                    SysRegion region = new SysRegion();
+                    if (StringUtils.isNotBlank(code)){
+                        region.setId(Long.valueOf(code));
+                    }else {
+                        region.setId(Long.valueOf( cityCode+ "123456"+sort));
+                    }
+                    region.setPid(Long.valueOf(cityCode));
+                    region.setName(name);
+                    region.setTreeLevel(2);
+                    region.setLeaf(1);
+                    region.setSort(sort);
+                    regions.add(region);
+                    getJiedao(href, code);
                 }
                 }
-                region.setPid(Long.valueOf(cityCode));
-                region.setName(name);
-                region.setTreeLevel(2);
-                region.setLeaf(1);
-                region.setSort(sort);
-                regions.add(region);
-                getJiedao(href, code);
             }
             }
         }
         }
     }
     }

+ 3 - 3
boman-web-core/src/main/java/com/boman/web/core/mapper/CzrkMapper.java

@@ -89,8 +89,8 @@ public interface CzrkMapper {
 
 
     List<Czrk> listByCodeSynchronization(String code);
     List<Czrk> listByCodeSynchronization(String code);
 
 
-    int stsByYrl(@Param("type") int type, @Param("areaId") Long areaId, @Param("idCard") String idCard, @Param("houseType") String houseType,@Param("isConfirm")String isConfirm);
-    int stsByWrl(@Param("type") int type, @Param("areaId") Long areaId, @Param("idCard") String idCard, @Param("houseType") String houseType,@Param("isConfirm")String isConfirm);
+    int stsByYrl(@Param("type") int type, @Param("areaId") Long areaId, @Param("idCard") String idCard,@Param("userName") String userName, @Param("houseType") String houseType,@Param("isConfirm")String isConfirm);
+    int stsByWrl(@Param("type") int type, @Param("areaId") Long areaId, @Param("idCard") String idCard,@Param("userName") String userName, @Param("houseType") String houseType,@Param("isConfirm")String isConfirm);
 
 
     List<Czrk> listIsRl(@Param("type") int type, @Param("areaId") Long areaId, @Param("userName") String userName);
     List<Czrk> listIsRl(@Param("type") int type, @Param("areaId") Long areaId, @Param("userName") String userName);
 
 
@@ -103,7 +103,7 @@ public interface CzrkMapper {
      * @return
      * @return
      */
      */
    Czrk findHjInfo(Czrk czrk);
    Czrk findHjInfo(Czrk czrk);
-    List<Czrk> stsByAppletCz(@Param("type") int type, @Param("areaId") Long areaId, @Param("idCard") String idCard, @Param("houseType") String houseType,@Param("isConfirm") String isConfirm);
+    List<Czrk> stsByAppletCz(@Param("type") int type, @Param("areaId") Long areaId, @Param("idCard") String idCard,@Param("userName") String userName, @Param("houseType") String houseType,@Param("isConfirm") String isConfirm);
 
 
     List<Czrk> listByCzXz(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("type") int type, @Param("areaId") Long areaId);
     List<Czrk> listByCzXz(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("type") int type, @Param("areaId") Long areaId);
     List<Czrk> listByCzJs(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("type") int type, @Param("areaId") Long areaId);
     List<Czrk> listByCzJs(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("type") int type, @Param("areaId") Long areaId);

+ 71 - 19
boman-web-core/src/main/java/com/boman/web/core/service/czrk/CzrkServiceImpl.java

@@ -44,6 +44,7 @@ import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
 import javax.validation.constraints.Size;
 import java.sql.Date;
 import java.sql.Date;
 import java.sql.Timestamp;
 import java.sql.Timestamp;
@@ -100,7 +101,6 @@ public class CzrkServiceImpl implements ICzrkService {
      */
      */
     @Override
     @Override
     public List<Czrk> listByRlry(Czrk czrk) {
     public List<Czrk> listByRlry(Czrk czrk) {
-        long startTime = System.currentTimeMillis();
         log.info("{}于{}查询常住人员列表,查询条件:{}"
         log.info("{}于{}查询常住人员列表,查询条件:{}"
                 , AuthUtils.getLoginUser().getSysUser().getUserName(), DateUtils.dateTimeNow(), JSON.toJSONString(czrk));
                 , AuthUtils.getLoginUser().getSysUser().getUserName(), DateUtils.dateTimeNow(), JSON.toJSONString(czrk));
         setAgeScope(czrk);
         setAgeScope(czrk);
@@ -150,7 +150,7 @@ public class CzrkServiceImpl implements ICzrkService {
             long startTimeSql = System.currentTimeMillis();
             long startTimeSql = System.currentTimeMillis();
             czrks = czrkMapper.selectCzrkList(czrk);
             czrks = czrkMapper.selectCzrkList(czrk);
             long endTimeSql = System.currentTimeMillis() - startTimeSql;
             long endTimeSql = System.currentTimeMillis() - startTimeSql;
-            log.info("执行常驻查询sql语句时间:" + endTimeSql+"ms");
+            log.info("执行常驻查询sql语句时间:" + endTimeSql + "ms");
             if (czrks != null && czrks.size() > 0) {
             if (czrks != null && czrks.size() > 0) {
                 for (Czrk crk : czrks) {
                 for (Czrk crk : czrks) {
                     String provinceCz = nullToEmpty(crk.getProvince()), cityCz = nullToEmpty(crk.getCity()), regionCz = nullToEmpty(crk.getRegion()), villageTownsCz = nullToEmpty(crk.getVillageTowns()), villageCz = nullToEmpty(crk.getVillage()), nowInCz = nullToEmpty(crk.getNowIn());
                     String provinceCz = nullToEmpty(crk.getProvince()), cityCz = nullToEmpty(crk.getCity()), regionCz = nullToEmpty(crk.getRegion()), villageTownsCz = nullToEmpty(crk.getVillageTowns()), villageCz = nullToEmpty(crk.getVillage()), nowInCz = nullToEmpty(crk.getNowIn());
@@ -175,7 +175,7 @@ public class CzrkServiceImpl implements ICzrkService {
             long startTimeSql = System.currentTimeMillis();
             long startTimeSql = System.currentTimeMillis();
             List<Czrk> czrks = czrkMapper.listByRlryJzdz(czrk);
             List<Czrk> czrks = czrkMapper.listByRlryJzdz(czrk);
             long endTimeSql = System.currentTimeMillis() - startTimeSql;
             long endTimeSql = System.currentTimeMillis() - startTimeSql;
-            log.info("执行查询居住地址的sql语句时间:" + endTimeSql+"ms");
+            log.info("执行查询居住地址的sql语句时间:" + endTimeSql + "ms");
             packAddr(czrks);
             packAddr(czrks);
             return czrks;
             return czrks;
 /*            List<String> idCardList = czrkJzdzService.listIdCard(czrkJzdz);
 /*            List<String> idCardList = czrkJzdzService.listIdCard(czrkJzdz);
@@ -187,7 +187,41 @@ public class CzrkServiceImpl implements ICzrkService {
         long startTimeSql = System.currentTimeMillis();
         long startTimeSql = System.currentTimeMillis();
         List<Czrk> czrks = czrkMapper.listByRlry(czrk);
         List<Czrk> czrks = czrkMapper.listByRlry(czrk);
         long endTimeSql = System.currentTimeMillis() - startTimeSql;
         long endTimeSql = System.currentTimeMillis() - startTimeSql;
-        log.info("执行查询sql语句时间:" + endTimeSql+"ms");
+        log.info("执行查询sql语句时间:" + endTimeSql + "ms");
+        packAddr(czrks);
+        return czrks;
+    }
+
+    /**
+     * 查询非正常人员列表(死亡,失踪)
+     *
+     * @param czrk
+     * @return
+     */
+    @Override
+    public List<Czrk> unusualList(Czrk czrk) {
+        setAgeScope(czrk);
+        //获取到居住地的查询条件
+        Long provinceId = czrk.getProvinceIdXjd();
+        Long cityId = czrk.getCityIdXjd();
+        Long regionId = czrk.getRegionIdXjd();
+        Long villageTownsId = czrk.getVillageTownsIdXjd();
+        Long villageId = czrk.getVillageIdXjd();
+        CzrkJzdz czrkJzdz = new CzrkJzdz();
+        czrkJzdz.setProvinceId(provinceId);
+        czrkJzdz.setCityId(cityId);
+        czrkJzdz.setRegionId(regionId);
+        czrkJzdz.setTownId(villageTownsId);
+        czrkJzdz.setVillageId(villageId);
+        czrk.setCzrkJzdz(czrkJzdz);
+        //设置查询列表权限
+        setDeptIdList(czrk);
+        startPage();
+        long startTimeSql = System.currentTimeMillis();
+        //todo 重新写个接口查询状态值 != 1的数据
+        List<Czrk> czrks = czrkMapper.listByRlryJzdz(czrk);
+        long endTimeSql = System.currentTimeMillis() - startTimeSql;
+        log.info("执行查询居住地址的sql语句时间:" + endTimeSql + "ms");
         packAddr(czrks);
         packAddr(czrks);
         return czrks;
         return czrks;
     }
     }
@@ -534,23 +568,41 @@ public class CzrkServiceImpl implements ICzrkService {
      */
      */
     @Override
     @Override
     public AjaxResult changeCzrk(Czrk czrk) {
     public AjaxResult changeCzrk(Czrk czrk) {
-        //判断一下身份证号码是否存在
-        String idCard = czrk.getIdCard();
-        if (StringUtils.isBlank(idCard)) {
-            return AjaxResult.error("身份证号码不存在");
+        //判断一下id是否存在
+        Long id = czrk.getId();
+        if (id == null) {
+            return AjaxResult.error("未获取到人员id");
         }
         }
         //如果是迁出,则放到待认领中
         //如果是迁出,则放到待认领中
         String status = czrk.getStatus();
         String status = czrk.getStatus();
         if (StringUtils.isNotBlank(status) && "2".equals(status)) {
         if (StringUtils.isNotBlank(status) && "2".equals(status)) {
-            //
-            czrkMapper.selectCzrkByIdCard(idCard);
-
+            //根据id查询出这个人信息
+            Czrk czrkQianchu = czrkMapper.selectCzrkById(id);
+            //先保存这个人的信息,当做历史记录
+            czrkChangeMapper.insertCzrkChange(czrkQianchu);
+            czrkQianchu.setIsRl("否");
+            czrkQianchu.setRlr("");
+            czrkQianchu.setRlrNike("");
+            czrkMapper.updateCzrk(czrkQianchu);
+            return AjaxResult.success();
         }
         }
-        czrkMapper.changeCzrk(czrk);
+        //接下来则放入其他状态中
         //往czrk_change表中插入历史数据
         //往czrk_change表中插入历史数据
         czrkChangeMapper.insertCzrkChange(czrk);
         czrkChangeMapper.insertCzrkChange(czrk);
-
-        return AjaxResult.error();
+        LoginUser loginUser = tokenService.getLoginUser();
+        if (loginUser != null) {
+            SysUser sysUser = loginUser.getSysUser();
+            if (sysUser != null) {
+                String userName = sysUser.getUserName();
+                czrk.setChangUser(userName);
+                czrk.setChangUserTime(DateUtils.getNowDate());
+                czrk.setChangNikeUser(sysUser.getNickName());
+                czrkMapper.changeCzrk(czrk);
+                return AjaxResult.success();
+            }
+            return AjaxResult.error("变更失败:没有获取到登录人信息");
+        }
+        return AjaxResult.error("变更失败");
     }
     }
 
 
     @Override
     @Override
@@ -584,7 +636,7 @@ public class CzrkServiceImpl implements ICzrkService {
         czrk.setCzrkJzdzList(czrkJzdzList);
         czrk.setCzrkJzdzList(czrkJzdzList);
         //todo 重新计算年龄
         //todo 重新计算年龄
         String birthday = czrk.getBirthday();
         String birthday = czrk.getBirthday();
-        if (StringUtils.isNotBlank(birthday)){
+        if (StringUtils.isNotBlank(birthday)) {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             int age = czrk.getAge();
             int age = czrk.getAge();
             try {
             try {
@@ -751,7 +803,7 @@ public class CzrkServiceImpl implements ICzrkService {
     }
     }
 
 
     @Override
     @Override
-    public JSONObject stsByApplet(Long provinceId, Long cityId, Long regionId, Long townId, Long villageId, String idCard, String queryType, String houseType, String isConfirm) {
+    public JSONObject stsByApplet(Long provinceId, Long cityId, Long regionId, Long townId, Long villageId, String idCard, String userName, String queryType, String houseType, String isConfirm) {
         Long areaId = null;
         Long areaId = null;
         int type = 0, yrl = 0, wrl = 0;
         int type = 0, yrl = 0, wrl = 0;
         if (ObjectUtils.isNotEmpty(provinceId)) {
         if (ObjectUtils.isNotEmpty(provinceId)) {
@@ -773,11 +825,11 @@ public class CzrkServiceImpl implements ICzrkService {
 
 
         if (Czrk.HJ.equals(queryType)) {
         if (Czrk.HJ.equals(queryType)) {
             // 户籍
             // 户籍
-            yrl = czrkMapper.stsByYrl(type, areaId, idCard, houseType, isConfirm);
-            wrl = czrkMapper.stsByWrl(type, areaId, idCard, houseType, isConfirm);
+            yrl = czrkMapper.stsByYrl(type, areaId, idCard, userName, houseType, isConfirm);
+            wrl = czrkMapper.stsByWrl(type, areaId, idCard, userName, houseType, isConfirm);
         } else {
         } else {
             // 常住
             // 常住
-            List<Czrk> rls = czrkMapper.stsByAppletCz(type, areaId, idCard, houseType, isConfirm);
+            List<Czrk> rls = czrkMapper.stsByAppletCz(type, areaId, idCard, userName, houseType, isConfirm);
             for (Czrk czrk : rls) {
             for (Czrk czrk : rls) {
                 if ("是".equals(czrk.getIsRl())) {
                 if ("是".equals(czrk.getIsRl())) {
                     yrl++;
                     yrl++;

+ 8 - 1
boman-web-core/src/main/java/com/boman/web/core/service/czrk/ICzrkService.java

@@ -18,6 +18,13 @@ public interface ICzrkService {
 
 
     List<Czrk> listByRlry(Czrk czrk);
     List<Czrk> listByRlry(Czrk czrk);
 
 
+    /**
+     * 查询非正常人员列表(死亡,失踪)
+     * @param czrk
+     * @return
+     */
+    List<Czrk> unusualList(Czrk czrk);
+
     List<Czrk> listByXz(Czrk czrk);
     List<Czrk> listByXz(Czrk czrk);
     List<Czrk> listByJs(Czrk czrk);
     List<Czrk> listByJs(Czrk czrk);
     /**
     /**
@@ -77,7 +84,7 @@ public interface ICzrkService {
     AjaxResult addRlry(Czrk czrk);
     AjaxResult addRlry(Czrk czrk);
     AjaxResult editRlry(Czrk czrk);
     AjaxResult editRlry(Czrk czrk);
 
 
-    JSONObject stsByApplet(Long provinceId, Long cityId, Long regionId, Long townId, Long villageId, String idCard, String queryType, String houseType, String isConfirm);
+    JSONObject stsByApplet(Long provinceId, Long cityId, Long regionId, Long townId, Long villageId, String idCard,String userName, String queryType, String houseType, String isConfirm);
     JSONObject stsByCzrk();
     JSONObject stsByCzrk();
     JSONObject stsByCzrkHomePage();
     JSONObject stsByCzrkHomePage();
 
 

+ 14 - 5
boman-web-core/src/main/resources/mapper/CzrkMapper.xml

@@ -585,7 +585,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="selectCzrkById" parameterType="Long" resultMap="CzrkResult">
     <select id="selectCzrkById" parameterType="Long" resultMap="CzrkResult">
         <include refid="selectCzrkVo"/>
         <include refid="selectCzrkVo"/>
-        where id = #{id} limit 1
+        where id = #{id}   and is_del = 'N' limit 1
     </select>
     </select>
 
 
 
 
@@ -610,7 +610,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 已认领 -->
         <!-- 已认领 -->
         and vi.is_rl = '是'
         and vi.is_rl = '是'
         <if test="idCard != null  and idCard != ''">
         <if test="idCard != null  and idCard != ''">
-            and  vi.id_card like concat(#{idCard}, '%')
+            and  vi.id_card = #{idCard}
         </if>
         </if>
         <if test="houseType != null  and houseType != ''">
         <if test="houseType != null  and houseType != ''">
             and vi.house_type = #{houseType}
             and vi.house_type = #{houseType}
@@ -618,6 +618,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="isConfirm != null  and isConfirm != ''">
         <if test="isConfirm != null  and isConfirm != ''">
             and vi.is_confirm = #{isConfirm}
             and vi.is_confirm = #{isConfirm}
         </if>
         </if>
+        <if test="userName != null  and userName != ''">
+            and  vi.user_name like concat(#{userName}, '%')
+        </if>
         <choose>
         <choose>
             <when test="type == 1">and vi.province_id = #{areaId}</when>
             <when test="type == 1">and vi.province_id = #{areaId}</when>
             <when test="type == 2">and vi.city_id = #{areaId}</when>
             <when test="type == 2">and vi.city_id = #{areaId}</when>
@@ -646,7 +649,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="getHzByCode" resultMap="CzrkResult">
     <select id="getHzByCode" resultMap="CzrkResult">
         SELECT user_name, id_card
         SELECT user_name, id_card
         from czrk
         from czrk
-        where house_type = '是' and code = #{code} limit 1;
+        where house_type = '是' and code = #{code} and is_del = 'N' limit 1;
     </select>
     </select>
 
 
     <select id="getColumnNamesByIdCard" resultType="com.alibaba.fastjson.JSONObject">
     <select id="getColumnNamesByIdCard" resultType="com.alibaba.fastjson.JSONObject">
@@ -662,7 +665,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 未认领 -->
         <!-- 未认领 -->
         and vi.is_rl = '否'
         and vi.is_rl = '否'
         <if test="idCard != null  and idCard != ''">
         <if test="idCard != null  and idCard != ''">
-            and vi.id_card like concat(#{idCard}, '%')
+            and vi.id_card = #{idCard}
         </if>
         </if>
         <if test="houseType != null  and houseType != ''">
         <if test="houseType != null  and houseType != ''">
             and vi.house_type = #{houseType}
             and vi.house_type = #{houseType}
@@ -670,6 +673,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="isConfirm != null  and isConfirm != ''">
         <if test="isConfirm != null  and isConfirm != ''">
             and vi.is_confirm = #{isConfirm}
             and vi.is_confirm = #{isConfirm}
         </if>
         </if>
+        <if test="userName != null  and userName != ''">
+            and  vi.user_name like concat(#{userName}, '%')
+        </if>
         <choose>
         <choose>
             <when test="type == 1">and vi.province_id = #{areaId}</when>
             <when test="type == 1">and vi.province_id = #{areaId}</when>
             <when test="type == 2">and vi.city_id = #{areaId}</when>
             <when test="type == 2">and vi.city_id = #{areaId}</when>
@@ -882,7 +888,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
         <where>
             czrk.is_del = 'N' and jzdz.status = 'Y'
             czrk.is_del = 'N' and jzdz.status = 'Y'
             <if test="idCard != null  and idCard != ''">
             <if test="idCard != null  and idCard != ''">
-                and czrk.id_card like concat(#{idCard}, '%')
+                and czrk.id_card  = #{idCard}
             </if>
             </if>
             <if test="houseType != null  and houseType != ''">
             <if test="houseType != null  and houseType != ''">
                 and czrk.house_type = #{houseType}
                 and czrk.house_type = #{houseType}
@@ -890,6 +896,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isConfirm != null  and isConfirm != ''">
             <if test="isConfirm != null  and isConfirm != ''">
                 and czrk.is_confirm = #{isConfirm}
                 and czrk.is_confirm = #{isConfirm}
             </if>
             </if>
+            <if test="userName != null  and userName != ''">
+                and  czrk.user_name like concat(#{userName}, '%')
+            </if>
             <choose>
             <choose>
                 <when test="type == 1">and jzdz.province_id = #{areaId}</when>
                 <when test="type == 1">and jzdz.province_id = #{areaId}</when>
                 <when test="type == 2">and jzdz.city_id = #{areaId}</when>
                 <when test="type == 2">and jzdz.city_id = #{areaId}</when>

+ 5 - 4
boman-web-core/src/main/resources/mapper/GridInfoMapper.xml

@@ -23,18 +23,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="selectGridInfoList" parameterType="GridInfo" resultMap="GridInfoResult">
     <select id="selectGridInfoList" parameterType="GridInfo" resultMap="GridInfoResult">
         <include refid="selectGridInfoVo"/>
         <include refid="selectGridInfoVo"/>
-        <where>  
-            <if test="areaName != null  and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
+        <where>
+             is_del = 'N'
+            <if test="areaName != null  and areaName != ''"> and area_name like concat(#{areaName}, '%')</if>
             <if test="sort != null  and sort != ''"> and sort = #{sort}</if>
             <if test="sort != null  and sort != ''"> and sort = #{sort}</if>
             <if test="pid != null  and pid != ''"> and pid = #{pid}</if>
             <if test="pid != null  and pid != ''"> and pid = #{pid}</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
-            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
         </where>
         </where>
+
     </select>
     </select>
     
     
     <select id="selectGridInfoById" parameterType="Long" resultMap="GridInfoResult">
     <select id="selectGridInfoById" parameterType="Long" resultMap="GridInfoResult">
         <include refid="selectGridInfoVo"/>
         <include refid="selectGridInfoVo"/>
-        where id = #{id}
+        where id = #{id} and is_del = 'N'
     </select>
     </select>
         
         
     <insert id="insertGridInfo" parameterType="GridInfo" useGeneratedKeys="true" keyProperty="id">
     <insert id="insertGridInfo" parameterType="GridInfo" useGeneratedKeys="true" keyProperty="id">