소스 검색

fix 修改变更接口,未完成

tjf 3 년 전
부모
커밋
13b29c5f51

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

@@ -213,6 +213,19 @@ public class Czrk extends BaseEntity{
      */
     @Excel(name = "状态")
     private String status;
+    /**
+     * 变更人手机号
+     */
+    private String changUser;
+    /**
+     * 变更人姓名
+     */
+    private String changNikeUser;
+    /**
+     * 变更时间
+     */
+    private Date changUserTime;
+
     /**
      * 网格id
      */

+ 10 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/CzrkController.java

@@ -171,6 +171,16 @@ public class CzrkController extends BaseController {
         return AjaxResult.success(hjInfo);
     }
 
+
+/*    *//**
+     * 功能描述: 变更接口,接收status 状态值,id_card 身份证号码
+     *//*
+    @Log(title = "变更接口", businessType = BusinessType.UPDATE)
+    @GetMapping("/changeCzrk")
+    public AjaxResult changeCzrk(Czrk czrk) {
+        return czrkService.changeCzrk(czrk);
+    }*/
+
     /**
      * 外部访问czrk的字段
      */

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

@@ -37,7 +37,7 @@ public class SysRegionController {
     private SysRegionMapper sysRegionMapper;
 
 
-    //@PostMapping("/insert")
+    @PostMapping("/insert")
     public void insertSysRegion() throws IOException {
 
         System.out.println("开始爬取");
@@ -57,15 +57,15 @@ public class SysRegionController {
                 String name = a.text();           // 浙江省
 
                 Long id = 31L;
-                if ("新疆维吾尔自治区".equals(name)) {
-                    SysRegion region = new SysRegion();
+                if ("广东省".equals(name)) {
+/*                    SysRegion region = new SysRegion();
                     region.setId(id);
                     region.setPid(0L);
                     region.setName(name);
                     region.setTreeLevel(0);
                     region.setLeaf(1);
                     region.setSort(0L);
-                    regions.add(region);
+                    regions.add(region);*/
                     System.out.println("开始爬取" + name);
                     getShi(href, id);
                     System.out.println(name + "爬取结束");
@@ -110,7 +110,7 @@ public class SysRegionController {
             String name = nametd.select("a").text();        // 衢州市
             System.out.println("开始爬取" + name);
 
-            //if ( "定西市".equals(name)|| "陇南市".equals(name)|| "临夏回族自治州".equals(name)|| "甘南藏族自治州".equals(name)) {
+            if ( "肇庆市".equals(name)|| "惠州市".equals(name)|| "梅州市".equals(name)) {
                 SysRegion region = new SysRegion();
                 region.setId(Long.valueOf(code));
                 region.setPid(i);
@@ -122,7 +122,7 @@ public class SysRegionController {
                 region.setSort(sort);
                 regions.add(region);
                 getQu(href, code);
-            //}
+            }
         }
     }
 

+ 37 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/CzrkChangeMapper.java

@@ -0,0 +1,37 @@
+package com.boman.web.core.mapper;
+
+import com.boman.domain.Czrk;
+
+
+/**
+ * 变更信息历史表
+ * @author tjf
+ * @Date: 2022/03/19/15:01
+ */
+public interface CzrkChangeMapper {
+
+
+    /**
+     * 新增变更信息历史表
+     *
+     * @param czrk 户籍信息
+     * @return 结果
+     */
+    int insertCzrkChange(Czrk czrk);
+
+    /**
+     * 修改变更信息历史表
+     *
+     * @param czrk 户籍信息
+     * @return 结果
+     */
+    int updateCzrkChange(Czrk czrk);
+
+    /**
+     * 删除变更信息历史表
+     *
+     * @param id 户籍信息id
+     * @return 结果
+     */
+    int deleteCzrkChangeById(Long id);
+}

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

@@ -36,6 +36,13 @@ public interface CzrkMapper {
      */
     List<Czrk> selectCzrkList(Czrk czrk);
 
+    /**
+     * 根据户主号查看是否有户主
+     * @param code
+     * @return
+     */
+    Czrk  selectCzrkByCode(String code);
+
     /**
      * 新增常住人口
      *
@@ -145,4 +152,18 @@ public interface CzrkMapper {
     int insertConfirmInfoUser(ConfirmInfoUser confirmInfoUser);
 
     int updateHouseholdRegister(@Param("czrk") Czrk czrk);
+
+    /**
+     * 变更
+     * @param czrk
+     * @return
+     */
+    int changeCzrk(Czrk czrk);
+
+    /**
+     * 根据身份证号码查询户籍信息
+     * @param code
+     * @return
+     */
+    Czrk selectCzrkByIdCard(String code);
 }

+ 80 - 23
boman-web-core/src/main/java/com/boman/web/core/service/czrk/CzrkServiceImpl.java

@@ -22,6 +22,7 @@ import com.boman.system.api.model.LoginUser;
 import com.boman.web.core.domain.ConfirmInfoUser;
 import com.boman.web.core.domain.GridInfo;
 import com.boman.web.core.domain.JsonRequest;
+import com.boman.web.core.mapper.CzrkChangeMapper;
 import com.boman.web.core.mapper.CzrkMapper;
 import com.boman.web.core.mapper.GridInfoMapper;
 import com.boman.web.core.service.ip.IpTimesService;
@@ -74,6 +75,8 @@ public class CzrkServiceImpl implements ICzrkService {
     @Autowired
     private CzrkMapper czrkMapper;
     @Resource
+    private CzrkChangeMapper czrkChangeMapper;
+    @Resource
     private RemoteDeptService remoteDeptService;
     @Resource
     private RedisService redisService;
@@ -123,7 +126,7 @@ public class CzrkServiceImpl implements ICzrkService {
                     }
                 }
             }
-            if (deptId != null && flag){
+            if (deptId != null && flag) {
                 //设置查询列表权限
                 List<SysDept> sysDepts = remoteDeptService.listChildrenDepts(deptId);
                 if (isNotEmpty(sysDepts)) {
@@ -135,7 +138,7 @@ public class CzrkServiceImpl implements ICzrkService {
             if (null == provinceId && null == cityId && null == regionId && null == villageTownsId && null == villageId) {
                 //固定查询潜山市
                 czrkJzdz.setRegionId(340882000000L);
-            }else {
+            } else {
                 czrkJzdz.setProvinceId(provinceId);
                 czrkJzdz.setCityId(cityId);
                 czrkJzdz.setRegionId(regionId);
@@ -146,9 +149,9 @@ public class CzrkServiceImpl implements ICzrkService {
             //先去查询居住地址在潜山的人员身份证
             startPage();
             czrks = czrkMapper.selectCzrkList(czrk);
-            if(czrks != null && czrks.size() > 0){
+            if (czrks != null && czrks.size() > 0) {
                 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());
                     crk.setNowInSelect(provinceCz + cityCz + regionCz + villageTownsCz + villageCz);
                 }
             }
@@ -238,6 +241,7 @@ public class CzrkServiceImpl implements ICzrkService {
 
                 String provinceCz = nullToEmpty(czrkJzdz.getProvince()), cityCz = nullToEmpty(czrkJzdz.getCity()), regionCz = nullToEmpty(czrkJzdz.getRegion()), villageTownsCz = nullToEmpty(czrkJzdz.getTown()), villageCz = nullToEmpty(czrkJzdz.getVillage()), nowInCz = nullToEmpty(czrkJzdz.getNowIn());
                 crk.setNowInSelect(provinceCz + cityCz + regionCz + villageTownsCz + villageCz);
+                crk.setDomicile(nowInCz);
                 break;
             }
 //            }
@@ -497,7 +501,7 @@ public class CzrkServiceImpl implements ICzrkService {
 
         //查找当前所有家庭成员(户主在第一位)
         List<Czrk> czrks = czrkMapper.listByCodeSynchronization(code);
-        if(czrks.size()==1){
+        if (czrks.size() == 1) {
             return AjaxResult.success("无家庭成员");
         }
         //修改家庭成员信息(户籍地址)
@@ -519,6 +523,33 @@ public class CzrkServiceImpl implements ICzrkService {
         return AjaxResult.success("操作成功");
     }
 
+    /**
+     * 变更接口
+     *
+     * @param czrk
+     * @return
+     */
+    @Override
+    public AjaxResult changeCzrk(Czrk czrk) {
+        //判断一下身份证号码是否存在
+        String idCard = czrk.getIdCard();
+        if (StringUtils.isBlank(idCard)) {
+            return AjaxResult.error("身份证号码不存在");
+        }
+        //如果是迁出,则放到待认领中
+        String status = czrk.getStatus();
+        if (StringUtils.isNotBlank(status) && "2".equals(status)) {
+            //
+            czrkMapper.selectCzrkByIdCard(idCard);
+
+        }
+        czrkMapper.changeCzrk(czrk);
+        //往czrk_change表中插入历史数据
+        czrkChangeMapper.insertCzrkChange(czrk);
+
+        return AjaxResult.error();
+    }
+
     @Override
     public Czrk getById(Long id) {
         if (isEmpty(id)) {
@@ -567,10 +598,19 @@ public class CzrkServiceImpl implements ICzrkService {
                 }
             }
             if (flag) {
-                return AjaxResult.error(HttpStatus.NOT_IMPLEMENTED,"当前填写的户籍地址和居住地址均不属于对应辖区");
+                return AjaxResult.error(HttpStatus.NOT_IMPLEMENTED, "当前填写的户籍地址和居住地址均不属于对应辖区");
             }
         }
 
+        //todo 看是否是户主,且有户主号需要去查看该家庭是否有户主
+        String houseType = czrk.getHouseType();
+        String code = czrk.getCode();
+        if ("是".equals(houseType) && StringUtils.isNotBlank(code)) {
+            Czrk czrk1 = czrkMapper.selectCzrkByCode(code);
+            if (czrk1 != null && StringUtils.isNotBlank(czrk1.getIdCard())) {
+                return AjaxResult.error("该户编号已存在户主,请勿重复添加户主");
+            }
+        }
         SysUser sysUser = AuthUtils.getLoginUser().getSysUser();
         String username = sysUser.getUserName();
         //用户姓名
@@ -585,13 +625,14 @@ public class CzrkServiceImpl implements ICzrkService {
             czrk.setRlTime(null);
         }
 
-        // 当前登陆人的所属最后一级的dept_id
+        // 当前登陆人的dept_id
         czrk.setDeptId(sysUser.getDeptId());
         int count = czrkMapper.countIdCard(czrk.getIdCard());
         if (count > 0) return AjaxResult.error(String.format("该人员[身份证号为: %s]已存在,请勿重复添加", czrk.getIdCard()));
 
         czrk.setCreateBy(username);
         czrk.setUpdateBy(username);
+
         count = czrkMapper.insertCzrk(czrk);
         if (count < 1) return AjaxResult.error("新增户籍信息失败");
         int sort = 0, childCount = 0;
@@ -625,7 +666,18 @@ public class CzrkServiceImpl implements ICzrkService {
                 }
             }
             if (flag) {
-                return AjaxResult.error(HttpStatus.NOT_IMPLEMENTED,"当前填写的户籍地址和居住地址均不属于对应辖区");
+                return AjaxResult.error(HttpStatus.NOT_IMPLEMENTED, "当前填写的户籍地址和居住地址均不属于对应辖区");
+            }
+        }
+
+        //todo 看是否是户主,且有户主号需要去查看该家庭是否有户主
+
+        String houseType = czrk.getHouseType();
+        String code = czrk.getCode();
+        if ("是".equals(houseType) && StringUtils.isNotBlank(code)) {
+            Czrk czrkCode = czrkMapper.selectCzrkByCode(code);
+            if (czrkCode != null && !czrkCode.getIdCard().equals(czrk.getIdCard())) {
+                return AjaxResult.error("该户编号已存在户主,请勿重复添加户主");
             }
         }
         LoginUser loginUser = tokenService.getLoginUser();
@@ -656,6 +708,8 @@ public class CzrkServiceImpl implements ICzrkService {
             czrk.setConfirmInfoUserTime(DateUtils.getNowDate());
             czrk.setConfirmInfoNikeUser(nickName);
         }
+
+
         int count = czrkMapper.updateCzrk(czrk);
         if (count <= 0) return AjaxResult.error();
         //往confirm_info_user表中差数据
@@ -845,7 +899,7 @@ public class CzrkServiceImpl implements ICzrkService {
             //setIntoRedis(packRedisKey("town:" + deptId), result);
         }
 
-        System.out.println("我最后出去了");
+        //System.out.println("我最后出去了");
         return result;
     }
 
@@ -1364,24 +1418,27 @@ public class CzrkServiceImpl implements ICzrkService {
         LoginUser loginUser = tokenService.getLoginUser();
         // 获取当前的用户名称
         String username = loginUser.getUsername();
-         String nickName = loginUser.getSysUser().getNickName();
+        String nickName = loginUser.getSysUser().getNickName();
         if (StringUtils.isBlank(username)) {
             return AjaxResult.error("未查询到确认人员名称");
         }
-        for (Long id : ids) {
-            ConfirmInfoUser confirmInfoUser = new ConfirmInfoUser();
-            confirmInfoUser.setConfirmInfoUser(username);
-            confirmInfoUser.setCzrkId(id);
-            confirmInfoUser.setConfirmInfoNikeUser(nickName);
-            czrkMapper.insertConfirmInfoUser(confirmInfoUser);
-            Czrk czrk = new Czrk();
-            czrk.setId(id);
-            czrk.setIsConfirm("Y");
-            czrk.setConfirmInfoUser(username);
-            czrk.setConfirmInfoUserTime(DateUtils.getNowDate());
-            czrkMapper.updateCzrk(czrk);
+        if (ids.length > 0) {
+            for (Long id : ids) {
+                ConfirmInfoUser confirmInfoUser = new ConfirmInfoUser();
+                confirmInfoUser.setConfirmInfoUser(username);
+                confirmInfoUser.setCzrkId(id);
+                confirmInfoUser.setConfirmInfoNikeUser(nickName);
+                czrkMapper.insertConfirmInfoUser(confirmInfoUser);
+                Czrk czrk = czrkMapper.selectCzrkById(id);
+                czrk.setIsConfirm("Y");
+                czrk.setConfirmInfoUser(username);
+                czrk.setConfirmInfoUserTime(DateUtils.getNowDate());
+                czrk.setConfirmInfoNikeUser(nickName);
+                czrkMapper.updateCzrk(czrk);
+            }
+            return AjaxResult.success();
         }
-        return AjaxResult.success();
+        return AjaxResult.error("没有获取到主键");
     }
 
 

+ 7 - 0
boman-web-core/src/main/java/com/boman/web/core/service/czrk/ICzrkService.java

@@ -105,4 +105,11 @@ public interface ICzrkService {
      * @return com.boman.domain.dto.AjaxResult
      */
     AjaxResult synchronization(String code);
+
+    /**
+     * 变更接口
+     * @param czrk
+     * @return
+     */
+    AjaxResult changeCzrk(Czrk czrk);
 }

+ 204 - 0
boman-web-core/src/main/resources/mapper/CzrkChangeMapper.xml

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.boman.web.core.mapper.CzrkChangeMapper">
+    
+    <resultMap type="com.boman.domain.Czrk" id="CzrkResult">
+        <result property="id"    column="id"    />
+        <result property="czrkJzdzId"    column="czrk_jzdz_id"    />
+        <result property="userName"    column="user_name"    />
+        <result property="gender"    column="gender"    />
+        <result property="age"    column="age"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="phoneNum"    column="phone_num"    />
+        <result property="code"    column="code"    />
+        <result property="houseType"    column="house_type"    />
+        <result property="rlr"    column="rlr"    />
+        <result property="rlrNike"    column="rlr_nike"    />
+        <result property="rlTime"    column="rl_time"    />
+        <result property="keyIndustries"    column="key_industries"    />
+        <result property="yhzgx"    column="yhzgx"    />
+        <result property="workUnit"    column="work_unit"    />
+        <result property="provinceId"    column="province_id"    />
+        <result property="province"    column="province"    />
+        <result property="cityId"    column="city_id"    />
+        <result property="city"    column="city"    />
+        <result property="regionId"    column="region_id"    />
+        <result property="isRl"    column="is_rl"    />
+        <result property="region"    column="region"    />
+        <result property="villageTownsId"    column="village_towns_id"    />
+        <result property="villageTowns"    column="village_towns"    />
+        <result property="villageId"    column="village_id"    />
+        <result property="village"    column="village"    />
+        <result property="villagerGroupId"    column="villager_group_id"    />
+        <result property="villagerGroup"    column="villager_group"    />
+        <result property="nowIn"    column="now_in"    />
+        <result property="remark"    column="remark"    />
+        <result property="gridId"    column="grid_id"    />
+        <result property="status"    column="status"    />
+        <result property="changUser"    column="chang_user"    />
+        <result property="changNikeUser"    column="chang_nike_user"    />
+        <result property="changUserTime"    column="chang_user_time"    />
+        <result property="isConfirm"    column="is_confirm"    />
+        <result property="confirmInfoUser"    column="confirm_info_user"    />
+        <result property="confirmInfoNikeUser"    column="confirm_info_nike_user"    />
+        <result property="confirmInfoUserTime"    column="confirm_info_user_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="deleteReason"    column="delete_reason"    />
+    </resultMap>
+
+
+    <sql id="selectCzrkVo">
+        select id, user_name, gender, age, birthday,dept_id, id_card, phone_num, code, house_type, rlr,rlr_nike, rl_time, yhzgx
+             , work_unit, province_id, province, city_id, city, region_id, region, village_towns_id, village_towns
+             , village_id, village, villager_group_id, villager_group, now_in, remark,grid_id, status,is_confirm,confirm_info_user,confirm_info_nike_user,confirm_info_user_time, create_by, create_time
+             , update_by, update_time, is_del, delete_reason, dept_id, is_rl, key_industries from czrk_change
+    </sql>
+
+
+    <insert id="insertCzrkChange"  useGeneratedKeys="true" keyProperty="id">
+        insert into czrk_change
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userName != null">user_name,</if>
+            <if test="gender != null">gender,</if>
+            <if test="age != null">age,</if>
+            <if test="birthday != null">birthday,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="idCard != null">id_card,</if>
+            <if test="phoneNum != null">phone_num,</if>
+            <if test="code != null">code,</if>
+            <if test="keyIndustries != null">key_Industries,</if>
+            <if test="houseType != null">house_type,</if>
+            <if test="rlr != null">rlr,</if>
+            <if test="isRl != null">is_rl,</if>
+            <if test="rlTime != null">rl_time,</if>
+            <if test="yhzgx != null">yhzgx,</if>
+            <if test="workUnit != null">work_unit,</if>
+            <if test="provinceId != null">province_id,</if>
+            <if test="province != null">province,</if>
+            <if test="cityId != null">city_id,</if>
+            <if test="city != null">city,</if>
+            <if test="regionId != null">region_id,</if>
+            <if test="region != null">region,</if>
+            <if test="villageTownsId != null">village_towns_id,</if>
+            <if test="villageTowns != null">village_towns,</if>
+            <if test="villageId != null">village_id,</if>
+            <if test="village != null">village,</if>
+            <if test="villagerGroupId != null">villager_group_id,</if>
+            <if test="villagerGroup != null">villager_group,</if>
+            <if test="nowIn != null">now_in,</if>
+            <if test="remark != null">remark,</if>
+            <if test="gridId != null">grid_id,</if>
+            <if test="status != null">status,</if>
+            <if test="isConfirm != null">is_confirm,</if>
+            <if test="confirmInfoUser != null and confirmInfoUser != ''">confirm_info_user,</if>
+            <if test="confirmInfoUserTime != null ">confirm_info_user_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="isDel != null and isDel != ''">is_del,</if>
+            <if test="deleteReason != null">delete_reason,</if>
+            create_time, update_time
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userName != null">#{userName},</if>
+            <if test="gender != null">#{gender},</if>
+            <if test="age != null">#{age},</if>
+            <if test="birthday != null">#{birthday},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="idCard != null">#{idCard},</if>
+            <if test="phoneNum != null">#{phoneNum},</if>
+            <if test="code != null">#{code},</if>
+            <if test="keyIndustries != null">#{keyIndustries},</if>
+            <if test="houseType != null">#{houseType},</if>
+            <if test="rlr != null">#{rlr},</if>
+            <if test="isRl != null">#{isRl},</if>
+            <if test="rlTime != null">#{rlTime},</if>
+            <if test="yhzgx != null">#{yhzgx},</if>
+            <if test="workUnit != null">#{workUnit},</if>
+            <if test="provinceId != null">#{provinceId},</if>
+            <if test="province != null">#{province},</if>
+            <if test="cityId != null">#{cityId},</if>
+            <if test="city != null">#{city},</if>
+            <if test="regionId != null">#{regionId},</if>
+            <if test="region != null">#{region},</if>
+            <if test="villageTownsId != null">#{villageTownsId},</if>
+            <if test="villageTowns != null">#{villageTowns},</if>
+            <if test="villageId != null">#{villageId},</if>
+            <if test="village != null">#{village},</if>
+            <if test="villagerGroupId != null">#{villagerGroupId},</if>
+            <if test="villagerGroup != null">#{villagerGroup},</if>
+            <if test="nowIn != null">#{nowIn},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="gridId != null">#{gridId},</if>
+            <if test="status != null">#{status},</if>
+            <if test="isConfirm != null">#{isConfirm},</if>
+            <if test="confirmInfoUser != null and confirmInfoUser != ''">#{confirmInfoUser},</if>
+            <if test="confirmInfoUserTime != null ">#{confirmInfoUserTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="isDel != null and isDel != ''">#{isDel},</if>
+            <if test="deleteReason != null">#{deleteReason},</if>
+            sysdate(), sysdate()
+        </trim>
+    </insert>
+
+    <update id="updateCzrkChange" >
+        update czrk_change
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="gender != null">gender = #{gender},</if>
+            <if test="age != null">age = #{age},</if>
+            <if test="birthday != null">birthday = #{birthday},</if>
+            <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="phoneNum != null">phone_num = #{phoneNum},</if>
+            <if test="code != null">code = #{code},</if>
+            <if test="keyIndustries != null">key_industries = #{keyIndustries},</if>
+            <if test="houseType != null">house_type = #{houseType},</if>
+            <if test="rlr != null">rlr = #{rlr},</if>
+            <if test="rlrNike != null">rlr_nike = #{rlrNike},</if>
+            <if test="isRl != null">is_rl = #{isRl},</if>
+            <if test="rlTime != null">rl_time = #{rlTime},</if>
+            <if test="yhzgx != null">yhzgx = #{yhzgx},</if>
+            <if test="workUnit != null">work_unit = #{workUnit},</if>
+            <if test="provinceId != ''">province_id = #{provinceId},</if>
+            <if test="province != ''">province = #{province},</if>
+            <if test="cityId != ''">city_id = #{cityId},</if>
+            <if test="city != ''">city = #{city},</if>
+            <if test="regionId != ''">region_id = #{regionId},</if>
+            <if test="region != ''">region = #{region},</if>
+            <if test="villageTownsId != ''">village_towns_id = #{villageTownsId},</if>
+            <if test="villageTowns != ''">village_towns = #{villageTowns},</if>
+            <if test="villageId != ''">village_id = #{villageId},</if>
+            <if test="village != ''">village = #{village},</if>
+            <if test="villagerGroupId != ''">villager_group_id = #{villagerGroupId},</if>
+            <if test="villagerGroup != ''">villager_group = #{villagerGroup},</if>
+            <if test="nowIn != null">now_in = #{nowIn},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="gridId != null">grid_id = #{gridId},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="isConfirm != null and isConfirm != ''">is_confirm = #{isConfirm},</if>
+            <if test="confirmInfoUser != null and confirmInfoUser != ''">confirm_info_user = #{confirmInfoUser},</if>
+            <if test="confirmInfoNikeUser != null and confirmInfoNikeUser != ''">confirm_info_nike_user = #{confirmInfoNikeUser},</if>
+            <if test="confirmInfoUserTime != null ">confirm_info_user_time = #{confirmInfoUserTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = sysdate(),</if>
+            <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
+            <if test="deleteReason != null">delete_reason = #{deleteReason},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCzrkChangeById" parameterType="Long">
+        delete from czrk_change where id = #{id}
+    </delete>
+
+</mapper>

+ 27 - 1
boman-web-core/src/main/resources/mapper/CzrkMapper.xml

@@ -39,6 +39,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remark"    column="remark"    />
         <result property="gridId"    column="grid_id"    />
         <result property="status"    column="status"    />
+        <result property="changUser"    column="chang_user"    />
+        <result property="changNikeUser"    column="chang_nike_user"    />
+        <result property="changUserTime"    column="chang_user_time"    />
         <result property="isConfirm"    column="is_confirm"    />
         <result property="confirmInfoUser"    column="confirm_info_user"    />
         <result property="confirmInfoNikeUser"    column="confirm_info_nike_user"    />
@@ -88,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="com.boman.web.core.domain.ConfirmInfoUser" id="ConfrimInforUserResult">
         <result property="confirmInfoUser"    column="confirm_info_user"    />
+        <result property="confirmInfoNikeUser"    column="confirm_info_nike_user"    />
         <result property="czrkId"    column="czrk_id"    />
     </resultMap>
     <sql id="selectCzrkVo">
@@ -106,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isRl != null and isRl != ''">and is_rl = #{isRl}</if>
 
             <if test="userName != null  and userName != ''">
-                and (user_name like concat('%', #{userName}, '%') or id_card like concat('%', #{userName}, '%'))
+                and user_name like concat('%', #{userName}, '%')
             </if>
             <if test="params.startAge != null  and params.startAge != ''">and age &gt;= #{params.startAge}</if>
             <if test="params.endAge != null  and params.endAge != ''">and age &lt;= #{params.endAge}</if>
@@ -1049,4 +1053,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by c.create_time DESC
     </select>
+
+
+
+
+    <select id="selectCzrkByCode" resultType="java.lang.Integer" resultMap="CzrkResult">
+       select id_card from czrk where is_del = 'N' and code = #{code} and house_type = '是' limit 1;
+    </select>
+
+
+    <update id="changeCzrk" parameterType="com.boman.domain.Czrk">
+                update czrk
+        set status = #{status},
+            chang_user = #{changUser},
+            chang_nike_user = #{changNikeUser},
+            chang_user_time = sysdate()
+        where is_del = 'N' and id_card = #{idCard};
+    </update>
+
+    <select id="selectCzrkByIdCard" resultType="java.lang.String" resultMap="CzrkResult">
+        <include refid="selectCzrkVo"/>
+        where is_del = 'N' and id_card = #{idCard} limit 1;
+    </select>
 </mapper>