Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

shiqian 3 yıl önce
ebeveyn
işleme
0b7031a135

+ 17 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/VaccineInfoController.java

@@ -3,6 +3,7 @@ package com.boman.web.core.controller;
 import java.io.IOException;
 import java.util.List;
 
+import com.boman.common.core.utils.SecurityUtils;
 import com.boman.common.core.utils.poi.ExcelUtil;
 import com.boman.common.core.web.controller.BaseController;
 import com.boman.common.core.web.page.TableDataInfo;
@@ -12,6 +13,7 @@ import com.boman.common.security.annotation.PreAuthorize;
 import com.boman.domain.dto.AjaxResult;
 import com.boman.web.core.domain.VaccineInfoOperation;
 import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
+import com.boman.web.core.service.vaccineInfo.IVaccineInfoUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -36,6 +38,9 @@ public class VaccineInfoController extends BaseController {
     @Autowired
     private IVaccineInfoService vaccineInfoService;
 
+    @Autowired
+    private IVaccineInfoUserService vaccineInfoUserService;
+
     /**
      * 查询疫苗信息列表
      */
@@ -72,6 +77,7 @@ public class VaccineInfoController extends BaseController {
     @Log(title = "疫苗信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody VaccineInfoOperation vaccineInfo) {
+        vaccineInfo.setCreateBy(SecurityUtils.getUsername());
         return toAjax(vaccineInfoService.insertVaccineInfo(vaccineInfo));
     }
 
@@ -82,6 +88,7 @@ public class VaccineInfoController extends BaseController {
     @Log(title = "疫苗信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody VaccineInfoOperation vaccineInfo) {
+        vaccineInfo.setUpdateBy(SecurityUtils.getUsername());
         return toAjax(vaccineInfoService.updateVaccineInfo(vaccineInfo));
     }
 
@@ -95,6 +102,16 @@ public class VaccineInfoController extends BaseController {
         return toAjax(vaccineInfoService.deleteVaccineInfoByIds(ids));
     }
 
+    /**
+     * 删除用户接种疫苗信息
+     */
+    @PreAuthorize(hasPermi = "@ss.hasPermi('core:user:remove')")
+    @Log(title = "用户接种疫苗信息", businessType = BusinessType.DELETE)
+    @GetMapping("/vaccineInfoUser/{ids}")
+    public AjaxResult removeVaccineInfoUser(@PathVariable Long[] ids) {
+        return toAjax(vaccineInfoUserService.deleteVaccineInfoUserByIds(ids));
+    }
+
     /**
      * 查询疫苗信息列表
      */

+ 14 - 0
boman-web-core/src/main/java/com/boman/web/core/domain/VaccineInfoOperation.java

@@ -1,6 +1,7 @@
 package com.boman.web.core.domain;
 
 import java.util.Date;
+import java.util.List;
 
 import com.boman.domain.BaseEntity;
 import com.boman.domain.annotation.Excel;
@@ -217,6 +218,19 @@ public class VaccineInfoOperation extends BaseEntity {
      */
     private String url;
 
+    /**
+     * 用户接种疫苗信息集合
+     */
+    private List<VaccineInfoUser> vaccineInfoUserList;
+
+    public List<VaccineInfoUser> getVaccineInfoUserList() {
+        return vaccineInfoUserList;
+    }
+
+    public void setVaccineInfoUserList(List<VaccineInfoUser> vaccineInfoUserList) {
+        this.vaccineInfoUserList = vaccineInfoUserList;
+    }
+
     public String getDictValue() {
         return dictValue;
     }

+ 157 - 0
boman-web-core/src/main/java/com/boman/web/core/domain/VaccineInfoUser.java

@@ -0,0 +1,157 @@
+package com.boman.web.core.domain;
+
+import com.boman.domain.BaseEntity;
+import com.boman.domain.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+
+/**
+ * @author tjf
+ * @Date: 2021/09/07/9:58
+ */
+public class VaccineInfoUser extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private Long id;
+
+    /**
+     * 身份证号码
+     */
+    @Excel(name = "身份证号码")
+    private String idCard;
+
+    /**
+     * 疫苗名称
+     */
+    @Excel(name = "疫苗名称")
+    private String vaccineName;
+
+    /**
+     * 剂次(1/2/3/加强针)
+     */
+    @Excel(name = "剂次", readConverterExp = "1=/2/3/加强针")
+    private String jici;
+
+
+    /**
+     * 接种时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "接种时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date vaccinationTime;
+
+    /**
+     * 接种地点
+     */
+    @Excel(name = "接种地点")
+    private String vaccinationPlace;
+
+    /**
+     * 进度
+     */
+    @Excel(name = "进度")
+    private String progress;
+
+    /**
+     * 状态
+     */
+    @Excel(name = "状态")
+    private String status;
+
+    /**
+     * 是否删除
+     */
+    @Excel(name = "是否删除")
+    private String isDel;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+
+    public String getVaccineName() {
+        return vaccineName;
+    }
+
+    public void setVaccineName(String vaccineName) {
+        this.vaccineName = vaccineName;
+    }
+
+    public String getJici() {
+        return jici;
+    }
+
+    public void setJici(String jici) {
+        this.jici = jici;
+    }
+
+    public Date getVaccinationTime() {
+        return vaccinationTime;
+    }
+
+    public void setVaccinationTime(Date vaccinationTime) {
+        this.vaccinationTime = vaccinationTime;
+    }
+
+    public String getVaccinationPlace() {
+        return vaccinationPlace;
+    }
+
+    public void setVaccinationPlace(String vaccinationPlace) {
+        this.vaccinationPlace = vaccinationPlace;
+    }
+
+    public String getProgress() {
+        return progress;
+    }
+
+    public void setProgress(String progress) {
+        this.progress = progress;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getIsDel() {
+        return isDel;
+    }
+
+    public void setIsDel(String isDel) {
+        this.isDel = isDel;
+    }
+
+    @Override
+    public String toString() {
+        return "VaccineInfoUser{" +
+                "id=" + id +
+                ", idCard='" + idCard + '\'' +
+                ", vaccineName='" + vaccineName + '\'' +
+                ", jici='" + jici + '\'' +
+                ", vaccinationTime=" + vaccinationTime +
+                ", vaccinationPlace='" + vaccinationPlace + '\'' +
+                ", progress='" + progress + '\'' +
+                ", status='" + status + '\'' +
+                ", isDel='" + isDel + '\'' +
+                '}';
+    }
+}

+ 54 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/VaccineInfoUserMapper.java

@@ -0,0 +1,54 @@
+package com.boman.web.core.mapper;
+
+import com.boman.web.core.domain.VaccineInfoOperation;
+import com.boman.web.core.domain.VaccineInfoUser;
+
+import java.util.List;
+
+/**
+ * @author tjf
+ * @Date: 2021/09/07/9:58
+ */
+public interface VaccineInfoUserMapper {
+
+    /**
+     * 查询疫苗信息操作
+     *
+     * @param idCard 用户身份证
+     * @return 结果
+     */
+    public List<VaccineInfoUser> selectVaccineInfoUserByIdCard(String idCard);
+
+
+    /**
+     * 新增疫苗信息操作
+     *
+     * @param vaccineInfoUser 疫苗信息操作
+     * @return 结果
+     */
+    public int insertVaccineInfoUser(VaccineInfoUser vaccineInfoUser);
+
+    /**
+     * 修改疫苗信息操作
+     *
+     * @param vaccineInfoUser 疫苗信息操作
+     * @return 结果
+     */
+    public int updateVaccineInfoUser(VaccineInfoUser vaccineInfoUser);
+
+    /**
+     * 删除疫苗信息操作
+     *
+     * @param id 疫苗信息操作ID
+     * @return 结果
+     */
+    public int deleteVaccineInfoUserById(Long id);
+
+    /**
+     * 批量删除疫苗信息操作
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteVaccineInfoUserByIds(Long[] ids);
+}

+ 15 - 0
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/IVaccineInfoUserService.java

@@ -0,0 +1,15 @@
+package com.boman.web.core.service.vaccineInfo;
+
+/**
+ * @author tjf
+ * @Date: 2021/09/07/9:56
+ */
+public interface IVaccineInfoUserService {
+    /**
+     * 批量删除用户接种疫苗信息
+     *
+     * @param ids 需要删除的用户接种疫苗信息ID
+     * @return 结果
+     */
+    public int deleteVaccineInfoUserByIds(Long[] ids);
+}

+ 26 - 1
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoServiceImpl.java

@@ -9,7 +9,9 @@ import com.boman.common.core.utils.SecurityUtils;
 import com.boman.common.core.utils.StringUtils;
 import com.boman.domain.SysDictData;
 import com.boman.web.core.domain.VaccineInfoOperation;
+import com.boman.web.core.domain.VaccineInfoUser;
 import com.boman.web.core.mapper.VaccineInfoOperationMapper;
+import com.boman.web.core.mapper.VaccineInfoUserMapper;
 import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -36,6 +38,8 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
     private VaccineInfoMapper vaccineInfoMapper;
     @Resource
     private VaccineInfoOperationMapper vaccineInfoOperationMapper;
+    @Resource
+    private VaccineInfoUserMapper vaccineInfoUserMapper;
 
     /**
      * 查询疫苗信息
@@ -78,6 +82,15 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
 //        genNowIn(vaccineInfoOperation);
         vaccineInfoOperation.setCreateTime(DateUtils.getNowDate());
         int info = vaccineInfoMapper.insertVaccineInfo(vaccineInfoOperation);
+        //提取出用户接种疫苗信息列表
+        List<VaccineInfoUser> vaccineInfoUserList = vaccineInfoOperation.getVaccineInfoUserList();
+        if (vaccineInfoUserList != null && vaccineInfoUserList.size() > 0){
+            for (VaccineInfoUser vaccineInfoUser : vaccineInfoUserList) {
+                vaccineInfoUser.setIdCard(vaccineInfoOperation.getIdCard());
+                vaccineInfoUser.setCreateBy(SecurityUtils.getUsername());
+                vaccineInfoUserMapper.insertVaccineInfoUser(vaccineInfoUser);
+            }
+        }
 
         // 疫苗信息新增操作记录
         vaccineInfoOperation.setOperationType(INSERT);
@@ -100,7 +113,19 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
         vaccineInfo.setUpdateTime(DateUtils.getNowDate());
 //        genNowIn(vaccineInfo);
         int info = vaccineInfoMapper.updateVaccineInfo(vaccineInfo);
-
+        List<VaccineInfoUser> vaccineInfoUserList = vaccineInfo.getVaccineInfoUserList();
+        if (vaccineInfoUserList != null && vaccineInfoUserList.size() > 0){
+            for (VaccineInfoUser vaccineInfoUser : vaccineInfoUserList) {
+                if (vaccineInfoUser.getId() != null){
+                    vaccineInfoUser.setUpdateBy(SecurityUtils.getUsername());
+                    vaccineInfoUserMapper.updateVaccineInfoUser(vaccineInfoUser);
+                }else {
+                    vaccineInfoUser.setIdCard(vaccineInfo.getIdCard());
+                    vaccineInfoUser.setCreateBy(SecurityUtils.getUsername());
+                    vaccineInfoUserMapper.insertVaccineInfoUser(vaccineInfoUser);
+                }
+            }
+        }
         // 疫苗信息新增操作记录
         vaccineInfo.setOperationType(EDIT);
         vaccineInfo.setCreateTime(new Date());

+ 28 - 0
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoUserServiceImpl.java

@@ -0,0 +1,28 @@
+package com.boman.web.core.service.vaccineInfo.impl;
+
+import com.boman.web.core.mapper.VaccineInfoUserMapper;
+import com.boman.web.core.service.vaccineInfo.IVaccineInfoUserService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @author tjf
+ * @Date: 2021/09/07/9:57
+ */
+@Service
+public class VaccineInfoUserServiceImpl implements IVaccineInfoUserService {
+    @Resource
+    private VaccineInfoUserMapper vaccineInfoUserMapper;
+
+    /**
+     * 批量删除用户接种疫苗信息
+     *
+     * @param ids 需要删除的用户接种疫苗信息ID
+     * @return
+     */
+    @Override
+    public int deleteVaccineInfoUserByIds(Long[] ids) {
+        return vaccineInfoUserMapper.deleteVaccineInfoUserByIds(ids);
+    }
+}

+ 64 - 52
boman-web-core/src/main/resources/mapper/VaccineInfoMapper.xml

@@ -20,17 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="phoneNum"    column="phone_num"  />
         <result property="keyIndustries"    column="key_industries" />
         <result property="isVaccination"    column="is_vaccination"  />
-        <result property="vaccineName"    column="vaccine_name"    />
-        <result property="jici"    column="jici"    />
-        <result property="vaccinationTime"    column="vaccination_time"    />
-        <result property="vaccinationPlace"    column="vaccination_place"    />
         <result property="contraindication"    column="contraindication"    />
         <result property="suspend"    column="suspend"    />
         <result property="death"    column="death"    />
         <result property="lostInMissing"    column="lost_in_missing"    />
         <result property="shouldBe"    column="should_be"    />
         <result property="other"    column="other"    />
-        <result property="progress"    column="progress"    />
         <result property="remark"    column="remark"    />
         <result property="status"    column="status"    />
         <result property="createBy"    column="create_by"    />
@@ -45,66 +40,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="manufacturer"    column="manufacturer"    />
         <result property="nowIn"    column="now_in"    />
         <result property="url"    column="url"    />
+        <collection  property="vaccineInfoUserList"   javaType="java.util.List"        resultMap="VaccineInfoUser" />
+    </resultMap>
+
+    <resultMap id="VaccineInfoUser" type="com.boman.web.core.domain.VaccineInfoUser">
+        <id     property="id"       column="id_user"        />
+        <result property="idCard"     column="id_card_user"      />
+        <result property="vaccineName"      column="vaccine_name_user"       />
+        <result property="jici"     column="jici_user"      />
+        <result property="vaccinationTime"    column="vaccination_time_user"    />
+        <result property="vaccinationPlace"    column="vaccination_place_user"    />
+        <result property="progress"    column="progress_user"    />
+        <result property="status"    column="status_user"    />
     </resultMap>
 
     <sql id="selectVaccineInfoVo">
-        select id, village_towns, village, villager_group, house_type, domicile, province, city,
-        region, user_name, gender, id_card, phone_num, key_industries, is_vaccination, vaccine_name, jici,
-        vaccination_time, vaccination_place, contraindication, suspend, death, lost_in_missing,
-        should_be, other, progress, remark, status, create_by, create_time, update_by, update_time,
-               is_del,code,birthday,work_unit,crowd_classification,manufacturer,now_in,url from vaccine_info
+        select vi.id, vi.village_towns, vi.village, vi.villager_group, vi.house_type, vi.domicile, vi.province, vi.city,
+        vi.region, vi.user_name, vi.gender, vi.id_card, vi.phone_num, vi.key_industries, vi.is_vaccination, vi.vaccine_name, vi.jici,
+        vi.vaccination_time, vi.vaccination_place, vi.contraindication, vi.suspend, vi.death, vi.lost_in_missing,
+        vi.should_be, vi.other, vi.progress, vi.remark, vi.status, vi.create_by, vi.create_time, vi.update_by, vi.update_time,
+               vi.is_del,code,vi.birthday,vi.work_unit,vi.crowd_classification,vi.manufacturer,vi.now_in,vi.url,
+               viu.id as id_user,viu.id_card as id_card_user,viu.vaccine_name as vaccine_name_user,viu.jici as jici_user,viu.vaccination_time as vaccination_time_user,
+               viu.vaccination_place as vaccination_place_user,viu.progress as progress_user,viu.status as status_user
+               from vaccine_info vi left join vaccine_info_user viu
+               on vi.id_card = viu.id_card and viu.is_del = 'N'
     </sql>
 
     <select id="selectVaccineInfoList" parameterType="VaccineInfoOperation" resultMap="VaccineInfoResult">
         <include refid="selectVaccineInfoVo"/>
-        <where>  
-            <if test="villageTowns != null  and villageTowns != ''"> and village_towns = #{villageTowns}</if>
-            <if test="village != null  and village != ''"> and village = #{village}</if>
-            <if test="villagerGroup != null  and villagerGroup != ''"> and villager_group = #{villagerGroup}</if>
-            <if test="houseType != null  and houseType != ''"> and house_type = #{houseType}</if>
-            <if test="domicile != null  and domicile != ''"> and domicile = #{domicile}</if>
-            <if test="province != null  and province != ''"> and province = #{province}</if>
-            <if test="city != null  and city != ''"> and city = #{city}</if>
-            <if test="region != null  and region != ''"> and region = #{region}</if>
-            <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
-            <if test="gender != null  and gender != ''"> and gender = #{gender}</if>
-            <if test="idCard != null  and idCard != ''"> and id_card like concat('%', #{idCard}, '%')</if>
-            <if test="phoneNum != null  and phoneNum != ''"> and phone_num = #{phoneNum}</if>
-            <if test="keyIndustries != null  and keyIndustries != ''"> and key_industries = #{keyIndustries}</if>
-            <if test="isVaccination != null  and isVaccination != ''"> and is_vaccination = #{isVaccination}</if>
-            <if test="vaccineName != null  and vaccineName != ''"> and vaccine_name like concat('%', #{vaccineName}, '%')</if>
-            <if test="jici != null  and jici != ''"> and jici = #{jici}</if>
-            <if test="vaccinationTime != null "> and vaccination_time = #{vaccinationTime}</if>
-            <if test="vaccinationPlace != null  and vaccinationPlace != ''"> and vaccination_place = #{vaccinationPlace}</if>
-            <if test="contraindication != null  and contraindication != ''"> and contraindication = #{contraindication}</if>
-            <if test="suspend != null  and suspend != ''"> and suspend = #{suspend}</if>
-            <if test="death != null  and death != ''"> and death = #{death}</if>
-            <if test="lostInMissing != null  and lostInMissing != ''"> and lost_in_missing = #{lostInMissing}</if>
-            <if test="shouldBe != null  and shouldBe != ''"> and should_be = #{shouldBe}</if>
-            <if test="other != null  and other != ''"> and other = #{other}</if>
-            <if test="progress != null  and progress != ''"> and progress = #{progress}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
-            <if test="code != null  and code != ''"> and code = #{code}</if>
-            <if test="birthday != null  and birthday != ''"> and birthday = #{birthday}</if>
-            <if test="workUnit != null  and workUnit != ''"> and work_unit = #{workUnit}</if>
-            <if test="crowdClassification != null  and crowdClassification != ''"> and crowd_classification = #{crowdClassification}</if>
-            <if test="manufacturer != null  and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
-            <if test="nowIn != null  and nowIn != ''"> and now_in = #{nowIn}</if>
-            <if test="url != null  and url != ''"> and url = #{url}</if>
+        <where>
+            vi.is_del = 'N'
+            <if test="villageTowns != null  and villageTowns != ''"> and vi.village_towns = #{villageTowns}</if>
+            <if test="village != null  and village != ''"> and vi.village = #{village}</if>
+            <if test="villagerGroup != null  and villagerGroup != ''"> and vi.villager_group = #{villagerGroup}</if>
+            <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="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="vaccineName != null  and vaccineName != ''"> and viu.vaccine_name like concat('%', #{vaccineName}, '%')</if>
+            <if test="jici != null  and jici != ''"> and viu.jici = #{jici}</if>
+            <if test="vaccinationTime != null "> and viu.vaccination_time = #{vaccinationTime}</if>
+            <if test="vaccinationPlace != null  and vaccinationPlace != ''"> and viu.vaccination_place = #{vaccinationPlace}</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="death != null  and death != ''"> and vi.death = #{death}</if>
+            <if test="lostInMissing != null  and lostInMissing != ''"> and vi.lost_in_missing = #{lostInMissing}</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="progress != null  and progress != ''"> and viu.progress = #{progress}</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>
         </where>
+        order by vi.create_time DESC
     </select>
     
     <select id="selectVaccineInfoById" parameterType="Long" resultMap="VaccineInfoResult">
         <include refid="selectVaccineInfoVo"/>
-        where id = #{id}
+        where vi.id = #{id} and vi.is_del = 'N'
     </select>
     <select id="selectVaccineInfoByIds" parameterType="Long" resultMap="VaccineInfoResult">
         <include refid="selectVaccineInfoVo"/>
-        where id in
+        where vi.id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
+        and vi.is_del = 'N'
     </select>
         
     <insert id="insertVaccineInfo" parameterType="VaccineInfoOperation" useGeneratedKeys="true" keyProperty="id">
@@ -138,7 +150,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
             <if test="status != null">status,</if>
             <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="isDel != null and isDel != ''">is_del,</if>
@@ -149,6 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="manufacturer != null and manufacturer != ''">manufacturer,</if>
             <if test="nowIn != null and nowIn != ''">now_in,</if>
             <if test="url != null and url != ''">url,</if>
+            create_time
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="villageTowns != null">#{villageTowns},</if>
@@ -179,7 +191,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">#{remark},</if>
             <if test="status != null">#{status},</if>
             <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="isDel != null and isDel != ''">#{isDel},</if>
@@ -190,6 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if>
             <if test="nowIn != null and nowIn != ''">#{nowIn},</if>
             <if test="url != null and url != ''">#{url},</if>
+            sysdate()
          </trim>
     </insert>
 
@@ -240,11 +252,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteVaccineInfoById" parameterType="Long">
-        delete from vaccine_info where id = #{id}
+        update  vaccine_info set is_del = 'Y' where id = #{id}
     </delete>
 
     <delete id="deleteVaccineInfoByIds" parameterType="String">
-        delete from vaccine_info where id in 
+        update  vaccine_info set is_del = 'Y' where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -252,7 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="findHjInfo" parameterType="VaccineInfoOperation" resultMap="VaccineInfoResult">
-        select xm as userName,xb as gender,csrq as birthday from hj
+        select xm as user_name,xb as gender,csrq as birthday from hj
         <where>
          <if test="idCard != null and idCard != '' ">zjhm = #{idCard}</if>
         </where>

+ 3 - 5
boman-web-core/src/main/resources/mapper/VaccineInfoOperationMapper.xml

@@ -139,7 +139,6 @@
             <if test="remark != null">remark,</if>
             <if test="status != null">status,</if>
             <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="isDel != null and isDel != ''">is_del,</if>
@@ -152,6 +151,7 @@
             <if test="manufacturer != null and manufacturer != ''">manufacturer,</if>
             <if test="nowIn != null and nowIn != ''">now_in,</if>
             <if test="url != null and url != ''">url,</if>
+            create_time
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="villageTowns != null">#{villageTowns},</if>
@@ -182,7 +182,6 @@
             <if test="remark != null">#{remark},</if>
             <if test="status != null">#{status},</if>
             <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="isDel != null and isDel != ''">#{isDel},</if>
@@ -195,6 +194,7 @@
             <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if>
             <if test="nowIn != null and nowIn != ''">#{nowIn},</if>
             <if test="url != null and url != ''">#{url},</if>
+            sysdate()
         </trim>
     </insert>
 
@@ -228,9 +228,6 @@
             <if test="progress != null">progress = #{progress},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="status != null">status = #{status},</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 = #{updateTime},</if>
             <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
             <if test="operationType != null">operation_type = #{operationType},</if>
@@ -242,6 +239,7 @@
             <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if>
             <if test="nowIn != null and nowIn != ''">now_in = #{nowIn},</if>
             <if test="url != null and url != ''">url = #{url},</if>
+            update_by = sysdate()
         </trim>
         where id = #{id}
     </update>

+ 86 - 0
boman-web-core/src/main/resources/mapper/VaccineInfoUserMapper.xml

@@ -0,0 +1,86 @@
+<?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.VaccineInfoUserMapper">
+
+
+    <resultMap id="VaccineInfoUser" type="com.boman.web.core.domain.VaccineInfoUser">
+        <id     property="id"       column="id"        />
+        <result property="idCard"     column="id_card"      />
+        <result property="vaccineName"      column="vaccine_name"       />
+        <result property="jici"     column="jici"      />
+        <result property="vaccinationTime"    column="vaccination_time"    />
+        <result property="vaccinationPlace"    column="vaccination_place"    />
+        <result property="progress"    column="progress"    />
+        <result property="status"    column="status"    />
+        <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"    />
+    </resultMap>
+
+    <select id="selectVaccineInfoUserByIdCard" parameterType="String">
+       select id from vaccine_info_user  where id_card = #{idCard} and is_del = 'N'
+    </select>
+    <insert id="insertVaccineInfoUser" parameterType="VaccineInfoUser" useGeneratedKeys="true" keyProperty="id">
+        insert into vaccine_info_user
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="idCard != null">id_card,</if>
+            <if test="vaccineName != null">vaccine_name,</if>
+            <if test="jici != null">jici,</if>
+            <if test="vaccinationTime != null">vaccination_time,</if>
+            <if test="vaccinationPlace != null">vaccination_place,</if>
+            <if test="progress != null">progress,</if>
+            <if test="status != null">status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="isDel != null and isDel != ''">is_del,</if>
+            create_time
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="idCard != null">#{idCard},</if>
+            <if test="vaccineName != null">#{vaccineName},</if>
+            <if test="jici != null">#{jici},</if>
+            <if test="vaccinationTime != null">#{vaccinationTime},</if>
+            <if test="vaccinationPlace != null">#{vaccinationPlace},</if>
+            <if test="progress != null">#{progress},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="isDel != null and isDel != ''">#{isDel},</if>
+            sysdate()
+        </trim>
+    </insert>
+
+    <update id="updateVaccineInfoUser" parameterType="VaccineInfoUser">
+        update vaccine_info_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="vaccineName != null">vaccine_name = #{vaccineName},</if>
+            <if test="jici != null">jici = #{jici},</if>
+            <if test="vaccinationTime != null">vaccination_time = #{vaccinationTime},</if>
+            <if test="vaccinationPlace != null">vaccination_place = #{vaccinationPlace},</if>
+            <if test="progress != null">progress = #{progress},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
+            update_time = sysdate()
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteVaccineInfoUserById" parameterType="Long">
+        update vaccine_info_user set is_del = 'Y'  where id = #{id}
+    </delete>
+
+    <delete id="deleteVaccineInfoUserByIds" parameterType="String">
+        update vaccine_info_user set is_del = 'Y' where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>