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.
141 lines
5.2 KiB
141 lines
5.2 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.IcPointVaccinesInoculationDao">
|
|
|
|
<resultMap type="com.epmet.entity.IcPointVaccinesInoculationEntity" id="icPointVaccinesInoculationMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="customerId" column="CUSTOMER_ID"/>
|
|
<result property="orgId" column="ORG_ID"/>
|
|
<result property="orgName" column="ORG_NAME"/>
|
|
<result property="pid" column="PID"/>
|
|
<result property="pids" column="PIDS"/>
|
|
<result property="name" column="NAME"/>
|
|
<result property="inoculationDate" column="INOCULATION_DATE"/>
|
|
<result property="moStartTime" column="MO_START_TIME"/>
|
|
<result property="moEndTime" column="MO_END_TIME"/>
|
|
<result property="afStartTime" column="AF_START_TIME"/>
|
|
<result property="afEndTime" column="AF_END_TIME"/>
|
|
<result property="noAvailableVaccines" column="NO_AVAILABLE_VACCINES"/>
|
|
<result property="mobile" column="MOBILE"/>
|
|
<result property="address" column="ADDRESS"/>
|
|
<result property="longitude" column="LONGITUDE"/>
|
|
<result property="latitude" column="LATITUDE"/>
|
|
<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="getAllAddressName" resultType="java.lang.String">
|
|
select
|
|
NAME
|
|
from ic_point_vaccines_inoculation
|
|
where DEL_FLAG = 0
|
|
</select>
|
|
|
|
<select id="getPhrasePage" resultType="com.epmet.dto.IcPointVaccinesInoculationDTO">
|
|
select
|
|
ID,
|
|
CUSTOMER_ID,
|
|
ORG_ID,
|
|
ORG_NAME,
|
|
PID,
|
|
PIDS,
|
|
NAME,
|
|
INOCULATION_DATE,
|
|
MO_START_TIME,
|
|
MO_END_TIME,
|
|
AF_START_TIME,
|
|
AF_END_TIME,
|
|
(case NO_AVAILABLE_VACCINES when '1' then '是' when '2' then '否' else '' end ) as NO_AVAILABLE_VACCINES,
|
|
MOBILE,
|
|
ADDRESS,
|
|
LONGITUDE,
|
|
LATITUDE,
|
|
DEL_FLAG,
|
|
REVISION,
|
|
CREATED_BY,
|
|
CREATED_TIME,
|
|
UPDATED_BY,
|
|
UPDATED_TIME
|
|
from ic_point_vaccines_inoculation
|
|
where DEL_FLAG = 0
|
|
<if test="name != null and name != ''">
|
|
and NAME like CONCAT('%' ,#{name}, '%')
|
|
</if>
|
|
<if test="mobile != null and mobile != ''">
|
|
and MOBILE like CONCAT('%', #{mobile}, '%')
|
|
</if>
|
|
order by CREATED_TIME desc
|
|
</select>
|
|
|
|
<select id="getPhrasePageByDTO" resultType="com.epmet.dto.IcPointVaccinesInoculationDTO" parameterType="com.epmet.dto.form.PointHSYMFormDTO">
|
|
select
|
|
ID,
|
|
CUSTOMER_ID,
|
|
ORG_ID,
|
|
ORG_NAME,
|
|
PID,
|
|
PIDS,
|
|
NAME,
|
|
INOCULATION_DATE,
|
|
MO_START_TIME,
|
|
MO_END_TIME,
|
|
AF_START_TIME,
|
|
AF_END_TIME,
|
|
(case NO_AVAILABLE_VACCINES when '1' then '是' when '2' then '否' else '' end ) as NO_AVAILABLE_VACCINES,
|
|
MOBILE,
|
|
ADDRESS,
|
|
LONGITUDE,
|
|
LATITUDE,
|
|
DEL_FLAG,
|
|
REVISION,
|
|
CREATED_BY,
|
|
CREATED_TIME,
|
|
UPDATED_BY,
|
|
UPDATED_TIME
|
|
from ic_point_vaccines_inoculation
|
|
where DEL_FLAG = 0
|
|
<if test="name != null and name != ''">
|
|
and NAME like CONCAT('%' ,#{name}, '%')
|
|
</if>
|
|
<if test="mobile != null and mobile != ''">
|
|
and MOBILE like CONCAT('%', #{mobile}, '%')
|
|
</if>
|
|
order by CREATED_TIME desc
|
|
</select>
|
|
|
|
<select id="getMapInfoList" parameterType="com.epmet.dto.form.MapInfoFormDTO"
|
|
resultType="com.epmet.dto.result.MapInfoResultDTO">
|
|
select
|
|
UNIX_TIMESTAMP(now()) + FLOOR( 100 + RAND() * 1000) as markerId,
|
|
NAME,
|
|
round((st_distance_sphere(point(#{longitude},#{latitude}), point(LONGITUDE, LATITUDE))) / 1000 ,1) as km,
|
|
(case when round((st_distance_sphere(point(#{longitude},#{latitude}), point(LONGITUDE, LATITUDE))) / 1000 ,1) <= 1 then '1'
|
|
when round((st_distance_sphere(point(#{longitude},#{latitude}), point(LONGITUDE, LATITUDE))) / 1000 ,1) <= 3 then '3'
|
|
when round((st_distance_sphere(point(#{longitude},#{latitude}), point(LONGITUDE, LATITUDE))) / 1000 ,1) <= 5 then '5'
|
|
else '99' end ) as kmNum,
|
|
INOCULATION_DATE as date,
|
|
CONCAT(MO_START_TIME,'-',MO_END_TIME) as moTime,
|
|
CONCAT(AF_START_TIME,'-',AF_END_TIME) as afTime,
|
|
NO_AVAILABLE_VACCINES,
|
|
MOBILE,
|
|
ADDRESS,
|
|
LONGITUDE,
|
|
LATITUDE
|
|
from ic_point_vaccines_inoculation
|
|
where DEL_FLAG = 0
|
|
<if test="name != null and name != ''">
|
|
and NAME like CONCAT('%' ,#{name}, '%')
|
|
</if>
|
|
and LONGITUDE is not null
|
|
and LATITUDE is not null
|
|
order by (st_distance_sphere(point(#{longitude},#{latitude}), point(LONGITUDE, LATITUDE)))
|
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
|