You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
189 lines
7.0 KiB
189 lines
7.0 KiB
<?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.epmet.dao.IcVaccinePrarmeterDao">
|
|
|
|
<resultMap type="com.epmet.entity.IcVaccinePrarmeterEntity" id="icVaccinePrarmeterMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="customerId" column="CUSTOMER_ID"/>
|
|
<result property="gridId" column="GRID_ID"/>
|
|
<result property="gridName" column="GRID_NAME"/>
|
|
<result property="agencyId" column="AGENCY_ID"/>
|
|
<result property="pids" column="PIDS"/>
|
|
<result property="villageId" column="VILLAGE_ID"/>
|
|
<result property="villageName" column="VILLAGE_NAME"/>
|
|
<result property="buildId" column="BUILD_ID"/>
|
|
<result property="buildName" column="BUILD_NAME"/>
|
|
<result property="unitId" column="UNIT_ID"/>
|
|
<result property="unitName" column="UNIT_NAME"/>
|
|
<result property="homeId" column="HOME_ID"/>
|
|
<result property="homeName" column="HOME_NAME"/>
|
|
<result property="householdType" column="HOUSEHOLD_TYPE"/>
|
|
<result property="name" column="NAME"/>
|
|
<result property="mobile" column="MOBILE"/>
|
|
<result property="idCard" column="ID_CARD"/>
|
|
<result property="isVaccination" column="IS_VACCINATION"/>
|
|
<result property="firstVacTime" column="FIRST_VAC_TIME"/>
|
|
<result property="firstVacSite" column="FIRST_VAC_SITE"/>
|
|
<result property="secondVacTime" column="SECOND_VAC_TIME"/>
|
|
<result property="secondVacSite" column="SECOND_VAC_SITE"/>
|
|
<result property="thirdVacTime" column="THIRD_VAC_TIME"/>
|
|
<result property="thirdVacSite" column="THIRD_VAC_SITE"/>
|
|
<result property="reason" column="REASON"/>
|
|
<result property="note" column="NOTE"/>
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
<result property="revision" column="REVISION"/>
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
</resultMap>
|
|
|
|
<select id="vaccineExport" resultType="com.epmet.dto.IcVaccinePrarmeterDTO" parameterType="com.epmet.dto.form.VaccinePrarmeterListFormDTO">
|
|
select
|
|
ID,
|
|
CUSTOMER_ID,
|
|
GRID_ID,
|
|
GRID_NAME,
|
|
AGENCY_ID,
|
|
PIDS,
|
|
VILLAGE_ID,
|
|
VILLAGE_NAME,
|
|
BUILD_ID,
|
|
BUILD_NAME,
|
|
UNIT_ID,
|
|
UNIT_NAME,
|
|
HOME_ID,
|
|
HOME_NAME,
|
|
HOUSEHOLD_TYPE,
|
|
NAME,
|
|
MOBILE,
|
|
ID_CARD,
|
|
IS_VACCINATION,
|
|
FIRST_VAC_TIME,
|
|
FIRST_VAC_SITE,
|
|
SECOND_VAC_TIME,
|
|
SECOND_VAC_SITE,
|
|
THIRD_VAC_TIME,
|
|
THIRD_VAC_SITE,
|
|
REASON,
|
|
NOTE,
|
|
DEL_FLAG,
|
|
REVISION,
|
|
CREATED_BY,
|
|
CREATED_TIME,
|
|
UPDATED_BY,
|
|
UPDATED_TIME,
|
|
CHECK_STATE,
|
|
CHECK_REASON
|
|
from ic_vaccine_prarmeter
|
|
where DEL_FLAG = 0
|
|
and CUSTOMER_ID = #{customerId}
|
|
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%'))
|
|
<if test="name != null and name != ''">
|
|
and NAME like CONCAT('%' ,#{name}, '%')
|
|
</if>
|
|
<if test="mobile != null and mobile != ''">
|
|
and MOBILE like CONCAT('%', #{mobile}, '%')
|
|
</if>
|
|
<if test="idCard != null and idCard != ''">
|
|
and ID_CARD like CONCAT('%', #{idCard}, '%')
|
|
</if>
|
|
<if test="isVaccination != null and isVaccination != ''">
|
|
and IS_VACCINATION = #{isVaccination}
|
|
</if>
|
|
<if test="gridId != null and gridId != ''">
|
|
and GRID_ID = #{gridId}
|
|
</if>
|
|
<if test="villageId != null and villageId != ''">
|
|
and VILLAGE_ID = #{villageId}
|
|
</if>
|
|
<if test="buildId != null and buildId != ''">
|
|
and BUILD_ID = #{buildId}
|
|
</if>
|
|
<if test="unitId != null and unitId != ''">
|
|
and UNIT_ID = #{unitId}
|
|
</if>
|
|
<if test="homeId != null and homeId != ''">
|
|
and HOME_ID = #{homeId}
|
|
</if>
|
|
order by CREATED_TIME desc
|
|
</select>
|
|
|
|
<select id="getPhrasePage" resultType="com.epmet.dto.IcVaccinePrarmeterDTO">
|
|
select
|
|
ID,
|
|
CUSTOMER_ID,
|
|
GRID_ID,
|
|
GRID_NAME,
|
|
AGENCY_ID,
|
|
PIDS,
|
|
VILLAGE_ID,
|
|
VILLAGE_NAME,
|
|
BUILD_ID,
|
|
BUILD_NAME,
|
|
UNIT_ID,
|
|
UNIT_NAME,
|
|
HOME_ID,
|
|
HOME_NAME,
|
|
HOUSEHOLD_TYPE,
|
|
(case HOUSEHOLD_TYPE when '0' then '户籍' when '1' then '外来' else '' end) as householdTypeName,
|
|
NAME,
|
|
CONCAT(LEFT(MOBILE,3),'****',RIGHT(MOBILE ,4)) as MOBILE,
|
|
CONCAT(LEFT(ID_CARD,6),'********',RIGHT(ID_CARD ,4)) as ID_CARD,
|
|
IS_VACCINATION,
|
|
(case IS_VACCINATION when '0' then '否' when '1' then '是' else '' end) as isVaccinationName,
|
|
FIRST_VAC_TIME,
|
|
FIRST_VAC_SITE,
|
|
SECOND_VAC_TIME,
|
|
SECOND_VAC_SITE,
|
|
THIRD_VAC_TIME,
|
|
THIRD_VAC_SITE,
|
|
REASON,
|
|
NOTE,
|
|
DEL_FLAG,
|
|
REVISION,
|
|
CREATED_BY,
|
|
CREATED_TIME,
|
|
UPDATED_BY,
|
|
UPDATED_TIME,
|
|
CHECK_STATE,
|
|
(case CHECK_STATE when '0' then '待审核' when '1' then '审核不通过' when '2' then '审核通过' else '' end) as checkStateName,
|
|
CHECK_REASON
|
|
from ic_vaccine_prarmeter
|
|
where DEL_FLAG = 0
|
|
and CUSTOMER_ID = #{customerId}
|
|
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%'))
|
|
<if test="name != null and name != ''">
|
|
and NAME like CONCAT('%' ,#{name}, '%')
|
|
</if>
|
|
<if test="mobile != null and mobile != ''">
|
|
and MOBILE like CONCAT('%', #{mobile}, '%')
|
|
</if>
|
|
<if test="idCard != null and idCard != ''">
|
|
and ID_CARD like CONCAT('%', #{idCard}, '%')
|
|
</if>
|
|
<if test="isVaccination != null and isVaccination != ''">
|
|
and IS_VACCINATION = #{isVaccination}
|
|
</if>
|
|
<if test="gridId != null and gridId != ''">
|
|
and GRID_ID = #{gridId}
|
|
</if>
|
|
<if test="villageId != null and villageId != ''">
|
|
and VILLAGE_ID = #{villageId}
|
|
</if>
|
|
<if test="buildId != null and buildId != ''">
|
|
and BUILD_ID = #{buildId}
|
|
</if>
|
|
<if test="unitId != null and unitId != ''">
|
|
and UNIT_ID = #{unitId}
|
|
</if>
|
|
<if test="homeId != null and homeId != ''">
|
|
and HOME_ID = #{homeId}
|
|
</if>
|
|
|
|
order by CREATED_TIME desc
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
|