Procházet zdrojové kódy

人员认领, 返乡人员

shiqian před 3 roky
rodič
revize
a5ac0cb262

+ 239 - 0
boman-api/boman-domain/src/main/java/com/boman/domain/Fxry.java

@@ -0,0 +1,239 @@
+package com.boman.domain;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @description  返乡人员
+ * @author shiqian
+ * @date 2022年01月05日 15:50
+ **/
+public class Fxry implements Serializable {
+
+    private String id;
+
+    private String name;
+    private String sex;
+    private int age;
+    private String idCard;
+
+    /** 乡镇 */
+    private Long villageTownsId;
+    private String villageTowns;
+
+    /** 村 */
+    private Long villageId;
+    private String village;
+    /** 组 */
+    private Long groupId;
+    private String group;
+    /** 详细地址 */
+    private String detailAddr;
+
+
+    /** 身份证隐藏中间几位数字 **/
+    private String idCardHide;
+    /** 省外工作地址 **/
+    private String addrOutsideProvince;
+    /** 拟返回时间 ***/
+    private Date IntendedReturnTime;
+    private String telephone;
+    /** 备注 ***/
+    private String remark;
+    /** 是否 **/
+    private String delete;
+    private Date createTime;
+    private Date updateTime;
+    private String createBy;
+    private String updateBy;
+
+    /******************* 查询时间 ************************/
+    private Date startTime;
+    private Date endTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+
+    public Long getVillageTownsId() {
+        return villageTownsId;
+    }
+
+    public void setVillageTownsId(Long villageTownsId) {
+        this.villageTownsId = villageTownsId;
+    }
+
+    public String getVillageTowns() {
+        return villageTowns;
+    }
+
+    public void setVillageTowns(String villageTowns) {
+        this.villageTowns = villageTowns;
+    }
+
+    public Long getVillageId() {
+        return villageId;
+    }
+
+    public void setVillageId(Long villageId) {
+        this.villageId = villageId;
+    }
+
+    public String getVillage() {
+        return village;
+    }
+
+    public void setVillage(String village) {
+        this.village = village;
+    }
+
+    public Long getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Long groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getGroup() {
+        return group;
+    }
+
+    public void setGroup(String group) {
+        this.group = group;
+    }
+
+    public String getIdCardHide() {
+        return idCardHide;
+    }
+
+    public void setIdCardHide(String idCardHide) {
+        this.idCardHide = idCardHide;
+    }
+
+    public String getAddrOutsideProvince() {
+        return addrOutsideProvince;
+    }
+
+    public void setAddrOutsideProvince(String addrOutsideProvince) {
+        this.addrOutsideProvince = addrOutsideProvince;
+    }
+
+    public Date getIntendedReturnTime() {
+        return IntendedReturnTime;
+    }
+
+    public void setIntendedReturnTime(Date intendedReturnTime) {
+        IntendedReturnTime = intendedReturnTime;
+    }
+
+    public String getTelephone() {
+        return telephone;
+    }
+
+    public void setTelephone(String telephone) {
+        this.telephone = telephone;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getDelete() {
+        return delete;
+    }
+
+    public void setDelete(String delete) {
+        this.delete = delete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+}

+ 2 - 2
boman-modules/boman-file/src/main/java/com/boman/file/config/ResourcesConfig.java

@@ -17,13 +17,13 @@ public class ResourcesConfig implements WebMvcConfigurer
     /**
     /**
      * 上传文件存储在本地的根路径
      * 上传文件存储在本地的根路径
      */
      */
-    @Value("${file.path}")
+    @Value("${file.path}") // /home/boman/upload
     private String localFilePath;
     private String localFilePath;
 
 
     /**
     /**
      * 资源映射路径 前缀
      * 资源映射路径 前缀
      */
      */
-    @Value("${file.prefix}")
+    @Value("${file.prefix}") // /statics
     public String localFilePrefix;
     public String localFilePrefix;
 
 
     @Override
     @Override

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

@@ -0,0 +1,18 @@
+package com.boman.web.core.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @description  常驻人口
+ * @author shiqian
+ * @date 2022年01月05日 15:39
+ **/
+@RestController
+@RequestMapping("/core/czrk")
+public class CzrkController {
+
+
+
+
+}

+ 47 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/FxryController.java

@@ -0,0 +1,47 @@
+package com.boman.web.core.controller;
+
+import com.boman.common.core.web.controller.BaseController;
+import com.boman.domain.Fxry;
+import com.boman.domain.TableDataInfo;
+import com.boman.domain.dto.AjaxResult;
+import com.boman.web.core.service.fxry.FxryService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author shiqian
+ * @description 返乡人员
+ * @date 2022年01月05日 15:39
+ **/
+@RestController
+@RequestMapping("/core/fxry")
+public class FxryController extends BaseController {
+
+    @Resource
+    private FxryService service;
+
+    @GetMapping("/list")
+    public TableDataInfo list(Fxry fxry) {
+        List<Fxry> list = service.list(fxry);
+        return getDataTable(list);
+    }
+
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody Fxry fxry) {
+        return service.add(fxry);
+    }
+
+    @PostMapping("/edit")
+    public AjaxResult edit(@RequestBody Fxry fxry) {
+        return service.edit(fxry);
+    }
+
+    @GetMapping("/delete/{id}")
+    public AjaxResult delete(@PathVariable String id) {
+        return service.delete(id);
+    }
+
+
+}

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

@@ -0,0 +1,71 @@
+package com.boman.web.core.controller;
+
+import com.boman.common.core.web.controller.BaseController;
+import com.boman.domain.TableDataInfo;
+import com.boman.domain.VaccineInfoOperation;
+import com.boman.domain.dto.AjaxResult;
+import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @author shiqian
+ * @description 人员认领
+ * @date 2022年01月05日 14:26
+ **/
+@RestController
+@RequestMapping("/core/ryrl")
+public class RyrlController extends BaseController {
+
+
+    @Autowired
+    private IVaccineInfoService vaccineInfoService;
+
+    /**
+     * 功能描述: 认领人员list
+     *
+     * @param vaccineInfo vaccineInfo
+     * @return com.boman.domain.TableDataInfo
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(VaccineInfoOperation vaccineInfo) {
+        List<VaccineInfoOperation> list = vaccineInfoService.listByRlry(vaccineInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 功能描述: 新增
+     *
+     * @param vaccineInfo vaccineInfo
+     * @return com.boman.domain.dto.AjaxResult
+     */
+    @PostMapping("/addRlry")
+    public AjaxResult addRlry(@RequestBody VaccineInfoOperation vaccineInfo) {
+        return vaccineInfoService.addRlry(vaccineInfo);
+    }
+
+    /**
+     * 功能描述: 修改
+     *
+     * @param vaccineInfo vaccineInfo
+     * @return com.boman.domain.dto.AjaxResult
+     */
+    @PostMapping("/editRlry")
+    public AjaxResult editRlry(@RequestBody VaccineInfoOperation vaccineInfo) {
+        return vaccineInfoService.editRlry(vaccineInfo);
+    }
+
+    /**
+     * 功能描述: 根据id回显
+     *
+     * @param id id
+     * @return com.boman.domain.dto.AjaxResult
+     */
+    @GetMapping("/getById/{id}")
+    public AjaxResult getById(@PathVariable Long id) {
+        return AjaxResult.success("成功", vaccineInfoService.getById(id));
+    }
+
+}

+ 19 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/FxryMapper.java

@@ -0,0 +1,19 @@
+package com.boman.web.core.mapper;
+
+import com.boman.domain.Fxry;
+import com.boman.domain.dto.AjaxResult;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author shiqian
+ * @date 2022年01月05日 16:18
+ **/
+public interface FxryMapper{
+
+    int add(Fxry fxry);
+    int edit(Fxry fxry);
+    int delete(@Param("id") String id, @Param("updateBy") String updateBy);
+    List<Fxry> list(Fxry fxry);
+}

+ 2 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/VaccineInfoMapper.java

@@ -37,6 +37,8 @@ public interface VaccineInfoMapper
      */
      */
     public List<VaccineInfoOperation> selectVaccineInfoList(VaccineInfoOperation vaccineInfo);
     public List<VaccineInfoOperation> selectVaccineInfoList(VaccineInfoOperation vaccineInfo);
 
 
+    public List<VaccineInfoOperation> listByRlry(VaccineInfoOperation vaccineInfo);
+
 
 
     public List<VaccineInfoOperation> selectVaccineInfoListByPage(int startNum, int endNum);
     public List<VaccineInfoOperation> selectVaccineInfoListByPage(int startNum, int endNum);
 
 

+ 18 - 0
boman-web-core/src/main/java/com/boman/web/core/service/fxry/FxryService.java

@@ -0,0 +1,18 @@
+package com.boman.web.core.service.fxry;
+
+import com.boman.domain.Fxry;
+import com.boman.domain.dto.AjaxResult;
+
+import java.util.List;
+
+/**
+ * @author shiqian
+ * @date 2022年01月05日 16:18
+ **/
+public interface FxryService {
+
+    AjaxResult add(Fxry fxry);
+    AjaxResult edit(Fxry fxry);
+    AjaxResult delete(String id);
+    List<Fxry> list(Fxry fxry);
+}

+ 73 - 0
boman-web-core/src/main/java/com/boman/web/core/service/fxry/FxryServiceImpl.java

@@ -0,0 +1,73 @@
+package com.boman.web.core.service.fxry;
+
+import com.boman.common.core.utils.StringUtils;
+import com.boman.common.core.utils.sql.SqlUtil;
+import com.boman.common.core.web.page.PageDomain;
+import com.boman.common.core.web.page.TableSupport;
+import com.boman.domain.Fxry;
+import com.boman.domain.dto.AjaxResult;
+import com.boman.web.core.mapper.FxryMapper;
+import com.boman.web.core.utils.AuthUtils;
+import com.boman.web.core.utils.IdCardUtils;
+import com.boman.web.core.utils.IdUtils;
+import com.github.pagehelper.PageHelper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author shiqian
+ * @date 2022年01月05日 16:18
+ **/
+@Service
+public class FxryServiceImpl implements FxryService {
+
+    @Resource
+    private FxryMapper mapper;
+
+    @Override
+    public AjaxResult add(Fxry fxry) {
+        String idCard = fxry.getIdCard();
+        String hideIdCard = IdCardUtils.hideIdCard(idCard);
+        fxry.setIdCardHide(hideIdCard);
+        fxry.setCreateBy(AuthUtils.getLoginUser().getSysUser().getUserName());
+        fxry.setUpdateBy(AuthUtils.getLoginUser().getSysUser().getUserName());
+        fxry.setAge(IdCardUtils.getAge(idCard));
+        fxry.setId(IdUtils.getMaxId("fxry", "id").toString());
+
+        int add = mapper.add(fxry);
+        return add > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    @Override
+    public AjaxResult edit(Fxry fxry) {
+        String hideIdCard = IdCardUtils.hideIdCard(fxry.getIdCard());
+        fxry.setIdCardHide(hideIdCard);
+        fxry.setUpdateBy(AuthUtils.getLoginUser().getSysUser().getUserName());
+
+        int edit = mapper.edit(fxry);
+        return edit > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    @Override
+    public AjaxResult delete(String id) {
+        int delete = mapper.delete(id, AuthUtils.getLoginUser().getSysUser().getUserName());
+        return delete > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    @Override
+    public List<Fxry> list(Fxry fxry) {
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
+            String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+            PageHelper.startPage(pageNum, pageSize, orderBy);
+        }
+
+        List<Fxry> list = mapper.list(fxry);
+
+        return list;
+    }
+}

+ 8 - 0
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/IVaccineInfoService.java

@@ -85,4 +85,12 @@ public interface IVaccineInfoService
      * @return com.alibaba.fastjson.JSONObject
      * @return com.alibaba.fastjson.JSONObject
      */
      */
     JSONObject getByIdCard(String idCard);
     JSONObject getByIdCard(String idCard);
+
+
+    List<VaccineInfoOperation> listByRlry(VaccineInfoOperation vaccineInfo);
+
+    AjaxResult addRlry(VaccineInfoOperation vaccineInfo);
+    AjaxResult editRlry(VaccineInfoOperation vaccineInfo);
+
+    VaccineInfoOperation getById(Long id);
 }
 }

+ 59 - 0
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoServiceImpl.java

@@ -1032,4 +1032,63 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
         result.put("domicile", info.getDomicile());
         result.put("domicile", info.getDomicile());
         return result;
         return result;
     }
     }
+
+    @Override
+    public List<VaccineInfoOperation> listByRlry(VaccineInfoOperation vaccineInfoOperation) {
+        Long deptId = vaccineInfoOperation.getDeptId();
+        if (deptId == null) {
+            deptId = AuthUtils.getLoginUser().getSysUser().getDeptId();
+            //判断是否是管理员
+            List<SysRole> roles = AuthUtils.getLoginUser().getSysUser().getRoles();
+            if (isNotEmpty(roles)) {
+                for (SysRole role : roles) {
+                    String roleKey = role.getRoleKey();
+                    if ("admin".equals(roleKey) || "city".equals(roleKey)) {
+                        deptId = null;
+                        break;
+                    }
+                }
+            }
+        }
+
+        if (deptId != null){
+            List<SysDept> sysDepts = remoteDeptService.listChildrenDepts(deptId);
+            List<Long> deptIdList = new ArrayList<>();
+            if (sysDepts != null && sysDepts.size() > 0) {
+                for (SysDept sysDept : sysDepts) {
+                    Long id = sysDept.getId();
+                    deptIdList.add(id);
+                }
+            }
+            vaccineInfoOperation.setDeptIdList(deptIdList);
+        }
+
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
+        {
+            String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+            PageHelper.startPage(pageNum, pageSize, orderBy);
+        }
+
+        return vaccineInfoMapper.listByRlry(vaccineInfoOperation);
+    }
+
+    @Override
+    public AjaxResult addRlry(VaccineInfoOperation vaccineInfo) {
+        int i = vaccineInfoMapper.insertVaccineInfo(vaccineInfo);
+        return i > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    @Override
+    public AjaxResult editRlry(VaccineInfoOperation vaccineInfo) {
+        int i = vaccineInfoMapper.updateVaccineInfo(vaccineInfo);
+        return i > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+
+    @Override
+    public VaccineInfoOperation getById(Long id) {
+        return vaccineInfoMapper.selectVaccineInfoById(id);
+    }
 }
 }

+ 115 - 0
boman-web-core/src/main/java/com/boman/web/core/utils/IdCardUtils.java

@@ -0,0 +1,115 @@
+package com.boman.web.core.utils;
+
+import com.boman.common.core.utils.StringUtils;
+import com.boman.common.core.utils.obj.ObjectUtils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * @author shiqian
+ * @date 2022年01月05日 17:12
+ **/
+public class IdCardUtils {
+
+    private static SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd");
+
+    public static String hideIdCard(String idCard) {
+        if (ObjectUtils.isEmpty(idCard)) {
+            return "";
+        }
+
+        // 340104202201050105
+        String before = idCard.substring(0, 4);
+        String after = idCard.substring(13);
+        return before + "*********" + after;
+
+    }
+
+
+    public static Integer getAge(String IDCard) {
+        int age = 0;
+        Date date = new Date();
+        if (StringUtils.isNotBlank(IDCard) && isValid(IDCard)) {
+            //15位身份证号
+            if (IDCard.length() == 15) {
+                // 身份证上的年份(15位身份证为1980年前的)
+                String uyear = "19" + IDCard.substring(6, 8);
+                // 身份证上的月份
+                String uyue = IDCard.substring(8, 10);
+                // 当前年份
+                String fyear = FORMAT.format(date).substring(0, 4);
+                // 当前月份
+                String fyue = FORMAT.format(date).substring(5, 7);
+                if (Integer.parseInt(uyue) <= Integer.parseInt(fyue)) {
+                    age = Integer.parseInt(fyear) - Integer.parseInt(uyear) + 1;
+                    // 当前用户还没过生
+                } else {
+                    age = Integer.parseInt(fyear) - Integer.parseInt(uyear);
+                }
+                //18位身份证号
+            } else if (IDCard.length() == 18) {
+                // 身份证上的年份
+                String year = IDCard.substring(6).substring(0, 4);
+                // 身份证上的月份
+                String yue = IDCard.substring(10).substring(0, 2);
+                // 当前年份
+                String fyear = FORMAT.format(date).substring(0, 4);
+                // 当前月份
+                String fyue = FORMAT.format(date).substring(5, 7);
+                // 当前月份大于用户出身的月份表示已过生日
+                if (Integer.parseInt(yue) <= Integer.parseInt(fyue)) {
+                    age = Integer.parseInt(fyear) - Integer.parseInt(year) + 1;
+                    // 当前用户还没过生日
+                } else {
+                    age = Integer.parseInt(fyear) - Integer.parseInt(year);
+                }
+            }
+        }
+
+        return age;
+    }
+
+    /**
+     * 身份证验证
+     *
+     * @param id 号码内容
+     * @return 是否有效
+     */
+    public static boolean isValid(String id) {
+        boolean validResult = true;
+        //校验长度只能为15或18
+        int len = id.length();
+        if (len != 15 && len != 18) {
+            validResult = false;
+        }
+        //校验生日
+        if (!validDate(id)) {
+            validResult = false;
+        }
+
+        return validResult;
+    }
+
+    /**
+     * 校验生日
+     *
+     * @param id id
+     * @return boolean
+     */
+    private static boolean validDate(String id) {
+        try {
+            String birth = id.length() == 15 ? "19" + id.substring(6, 12) : id.substring(6, 14);
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            Date birthDate = sdf.parse(birth);
+            if (!birth.equals(sdf.format(birthDate))) {
+                return false;
+            }
+        } catch (ParseException e) {
+            return false;
+        }
+        return true;
+    }
+
+}

+ 73 - 0
boman-web-core/src/main/resources/mapper/FxryMapper.xml

@@ -0,0 +1,73 @@
+<?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.FxryMapper">
+
+
+    <insert id="add">
+        INSERT INTO fxry(`id`, `name`, `sex`, `age`, `id_card`, `village_towns_id`, `village_towns`, `village_id`,
+                         `village`, `group_id`, `group`, `detail_addr`, `id_card_hide`, `addr_outside_province`,
+                         `intended_return_time`, `telephone`, `remark`, `delete`,
+                        `create_time`, `create_by`, `update_time`, `update_by`)
+        VALUES (#{id}, #{name}, #{sex}, #{age}, #{idCard}, #{villageTownsId}, #{villageTowns}, #{villageId},
+            #{village}, #{groupId}, #{group}, #{detailAddr}, #{idCardHide}, #{addrOutsideProvince},
+            #{IntendedReturnTime}, #{telephone}, #{remark}, #{delete},
+                SYSDATE(), #{createBy}, SYSDATE(), #{updateBy});
+    </insert>
+
+    <update id="edit">
+        UPDATE fxry
+            <set>
+                <if test="name != null and name != ''">name = #{name},</if>
+                <if test="sex != null and sex != ''">sex = #{sex},</if>
+                <if test="age != null and age != ''">age = #{age},</if>
+                <if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
+                <if test="villageTownsId != null and villageTownsId != ''">village_towns_id = #{villageTownsId},</if>
+                <if test="villageTowns != null and villageTowns != ''">village_towns = #{villageTowns},</if>
+                <if test="villageId != null and villageId != ''">village_id = #{villageId},</if>
+                <if test="village != null and village != ''">village = #{village},</if>
+                <if test="village != null and village != ''">village = #{village},</if>
+                <if test="groupId != null and groupId != ''">group_id = #{groupId},</if>
+                <if test="group != null and group != ''">`group` = #{group},</if>
+                <if test="detailAddr != null and detailAddr != ''">detail_addr = #{detailAddr},</if>
+                <if test="idCardHide != null and idCardHide != ''">id_card_hide = #{idCardHide},</if>
+                <if test="addrOutsideProvince != null and addrOutsideProvince != ''">addr_outside_province = #{addrOutsideProvince},</if>
+                <if test="IntendedReturnTime != null and IntendedReturnTime != ''">intended_return_time = #{IntendedReturnTime},</if>
+                <if test="IntendedReturnTime != null and IntendedReturnTime != ''">intended_return_time = #{IntendedReturnTime},</if>
+                <if test="telephone != null and telephone != ''">telephone = #{telephone},</if>
+                <if test="remark != null and remark != ''">remark = #{remark},</if>
+                <if test="delete != null and delete != ''">`delete` = #{delete},</if>
+                <if test="updateTime != null and updateTime != ''">update_time = SYSDATE()</if>
+                <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            </set>
+        WHERE `id` = #{id};
+    </update>
+
+    <update id="delete">
+        UPDATE fxry
+        SET `delete`  = '是',
+            update_time = SYSDATE(),
+            update_by = #{updateBy}
+        WHERE `id` = #{id};
+    </update>
+
+    <select id="list" resultType="com.boman.domain.Fxry">
+        select id,
+               `name`,
+               sex,
+               age,
+               village_towns,
+               village,
+               id_card_hide,
+               addr_outside_province,
+               intended_return_time,
+               telephone
+        from fxry
+        where 1 = 1
+        <if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
+        <if test="sex != null and sex != ''">and `sex` like concat('%', #{sex}, '%')</if>
+        <if test="idCard != null and idCard != ''">and `id_card` like concat('%', #{idCard}, '%')</if>
+        <if test="telephone != null and telephone != ''">and telephone = #{telephone}</if>
+    </select>
+</mapper>

+ 62 - 0
boman-web-core/src/main/resources/mapper/VaccineInfoMapper.xml

@@ -132,6 +132,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by vi.create_time DESC ,vi.vaccination_time DESC
         order by vi.create_time DESC ,vi.vaccination_time DESC
     </select>
     </select>
 
 
+    <select id="listByRlry" resultMap="VaccineInfoResult">
+        select vi.id, vi.user_name, vi.phone_num, vi.id_card, vi.gender
+        from vaccine_info vi
+        <where>
+            vi.is_del = 'N' and
+            (vi.village_towns is null or vi.village_towns = ''
+            <!-- or vi.village is null or vi.village = ''
+            or vi.villager_group is null or vi.villager_group = ''-->)
+
+
+            <if test="houseType != null  and houseType != ''">and vi.house_type = #{houseType}</if>
+            <if test="domicile != null  and domicile != ''">and vi.domicile = #{domicile}</if>
+            <if test="province != null  and province != ''">and vi.province = #{province}</if>
+            <if test="city != null  and city != ''">and vi.city = #{city}</if>
+            <if test="jici != null  and jici != ''">and vi.jici &lt;= #{jici}</if>
+            <if test="vaccineName != null  and vaccineName != ''">and vi.vaccine_name like concat('%', #{vaccineName},
+                '%')
+            </if>
+            <if test="vaccinationTime != null ">and DATE_FORMAT(vi.vaccination_time,'%Y-%m-%d') =
+                DATE_FORMAT(#{vaccinationTime},'%Y-%m-%d')
+            </if>
+            <if test="region != null  and region != ''">and vi.region = #{region}</if>
+            <if test="userName != null  and userName != ''">and vi.user_name like concat('%', #{userName}, '%')</if>
+            <if test="gender != null  and gender != ''">and vi.gender = #{gender}</if>
+            <if test="idCard != null  and idCard != ''">and vi.id_card like concat('%', #{idCard}, '%')</if>
+            <if test="phoneNum != null  and phoneNum != ''">and vi.phone_num = #{phoneNum}</if>
+            <if test="keyIndustries != null  and keyIndustries != ''">and vi.key_industries = #{keyIndustries}</if>
+            <if test="isVaccination != null  and isVaccination != ''">and vi.is_vaccination = #{isVaccination}</if>
+            <if test="params.startAge != null  and params.startAge != ''">and vi.age &gt;= #{params.startAge}</if>
+            <if test="params.endAge != null  and params.endAge != ''">and vi.age &lt;= #{params.endAge}</if>
+            <if test="contraindication != null  and contraindication != ''">and vi.contraindication =
+                #{contraindication}
+            </if>
+            <if test="suspend != null  and suspend != ''">and vi.suspend = #{suspend}</if>
+            <if test="shouldBe != null  and shouldBe != ''">and vi.should_be = #{shouldBe}</if>
+            <if test="other != null  and other != ''">and vi.other = #{other}</if>
+            <if test="status != null  and status != ''">and vi.status = #{status}</if>
+            <if test="code != null  and code != ''">and vi.code = #{code}</if>
+            <if test="birthday != null  and birthday != ''">and vi.birthday = #{birthday}</if>
+            <if test="workUnit != null  and workUnit != ''">and vi.work_unit = #{workUnit}</if>
+            <if test="crowdClassification != null  and crowdClassification != ''">and vi.crowd_classification =
+                #{crowdClassification}
+            </if>
+            <if test="manufacturer != null  and manufacturer != ''">and vi.manufacturer = #{manufacturer}</if>
+            <if test="nowIn != null  and nowIn != ''">and vi.now_in = #{nowIn}</if>
+            <if test="shouldSlow != null  and shouldSlow != ''">and vi.should_slow = #{shouldSlow}</if>
+            <if test="idCardS != null  and idCardS.size() > 0">
+                and vi.id_card in
+                <foreach item="idCard" collection="idCardS" open="(" separator="," close=")">
+                    #{idCard}
+                </foreach>
+            </if>
+            <if test="deptIdList != null  and deptIdList.size() > 0">
+                and vi.dept_id in
+                <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
+                    #{deptId}
+                </foreach>
+            </if>
+        </where>
+        order by vi.create_time DESC ,vi.vaccination_time DESC
+    </select>
+
     <select id="selectVaccineInfoListByPage" parameterType="Integer" resultMap="VaccineInfoResult">
     <select id="selectVaccineInfoListByPage" parameterType="Integer" resultMap="VaccineInfoResult">
         select * from vaccine_info limit   #{startNum}, #{endNum}
         select * from vaccine_info limit   #{startNum}, #{endNum}
     </select>
     </select>