|
@@ -20,17 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="phoneNum" column="phone_num" />
|
|
<result property="phoneNum" column="phone_num" />
|
|
<result property="keyIndustries" column="key_industries" />
|
|
<result property="keyIndustries" column="key_industries" />
|
|
<result property="isVaccination" column="is_vaccination" />
|
|
<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="contraindication" column="contraindication" />
|
|
<result property="suspend" column="suspend" />
|
|
<result property="suspend" column="suspend" />
|
|
<result property="death" column="death" />
|
|
<result property="death" column="death" />
|
|
<result property="lostInMissing" column="lost_in_missing" />
|
|
<result property="lostInMissing" column="lost_in_missing" />
|
|
<result property="shouldBe" column="should_be" />
|
|
<result property="shouldBe" column="should_be" />
|
|
<result property="other" column="other" />
|
|
<result property="other" column="other" />
|
|
- <result property="progress" column="progress" />
|
|
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
<result property="createBy" column="create_by" />
|
|
<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="manufacturer" column="manufacturer" />
|
|
<result property="nowIn" column="now_in" />
|
|
<result property="nowIn" column="now_in" />
|
|
<result property="url" column="url" />
|
|
<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>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectVaccineInfoVo">
|
|
<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>
|
|
</sql>
|
|
|
|
|
|
<select id="selectVaccineInfoList" parameterType="VaccineInfoOperation" resultMap="VaccineInfoResult">
|
|
<select id="selectVaccineInfoList" parameterType="VaccineInfoOperation" resultMap="VaccineInfoResult">
|
|
<include refid="selectVaccineInfoVo"/>
|
|
<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>
|
|
</where>
|
|
|
|
+ order by vi.create_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectVaccineInfoById" parameterType="Long" resultMap="VaccineInfoResult">
|
|
<select id="selectVaccineInfoById" parameterType="Long" resultMap="VaccineInfoResult">
|
|
<include refid="selectVaccineInfoVo"/>
|
|
<include refid="selectVaccineInfoVo"/>
|
|
- where id = #{id}
|
|
|
|
|
|
+ where vi.id = #{id} and vi.is_del = 'N'
|
|
</select>
|
|
</select>
|
|
<select id="selectVaccineInfoByIds" parameterType="Long" resultMap="VaccineInfoResult">
|
|
<select id="selectVaccineInfoByIds" parameterType="Long" resultMap="VaccineInfoResult">
|
|
<include refid="selectVaccineInfoVo"/>
|
|
<include refid="selectVaccineInfoVo"/>
|
|
- where id in
|
|
|
|
|
|
+ where vi.id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ and vi.is_del = 'N'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="insertVaccineInfo" parameterType="VaccineInfoOperation" useGeneratedKeys="true" keyProperty="id">
|
|
<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="remark != null">remark,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="isDel != null and isDel != ''">is_del,</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="manufacturer != null and manufacturer != ''">manufacturer,</if>
|
|
<if test="nowIn != null and nowIn != ''">now_in,</if>
|
|
<if test="nowIn != null and nowIn != ''">now_in,</if>
|
|
<if test="url != null and url != ''">url,</if>
|
|
<if test="url != null and url != ''">url,</if>
|
|
|
|
+ create_time
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="villageTowns != null">#{villageTowns},</if>
|
|
<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="remark != null">#{remark},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="isDel != null and isDel != ''">#{isDel},</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="manufacturer != null and manufacturer != ''">#{manufacturer},</if>
|
|
<if test="nowIn != null and nowIn != ''">#{nowIn},</if>
|
|
<if test="nowIn != null and nowIn != ''">#{nowIn},</if>
|
|
<if test="url != null and url != ''">#{url},</if>
|
|
<if test="url != null and url != ''">#{url},</if>
|
|
|
|
+ sysdate()
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -240,11 +252,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<delete id="deleteVaccineInfoById" parameterType="Long">
|
|
<delete id="deleteVaccineInfoById" parameterType="Long">
|
|
- delete from vaccine_info where id = #{id}
|
|
|
|
|
|
+ update vaccine_info set is_del = 'Y' where id = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteVaccineInfoByIds" parameterType="String">
|
|
<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=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
@@ -252,7 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="findHjInfo" parameterType="VaccineInfoOperation" resultMap="VaccineInfoResult">
|
|
<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>
|
|
<where>
|
|
<if test="idCard != null and idCard != '' ">zjhm = #{idCard}</if>
|
|
<if test="idCard != null and idCard != '' ">zjhm = #{idCard}</if>
|
|
</where>
|
|
</where>
|