Commit 54399d31 by libin

Merge remote-tracking branch 'origin/master'

parents 81706cf8 da7449fa
...@@ -421,6 +421,8 @@ ...@@ -421,6 +421,8 @@
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="zjhm!= null and zjhm!= ''">and td.zjhm = #{zjhm} </if>
<if test="sjhm!= null and sjhm!= ''">and td.sjhm = #{sjhm} </if>
<if test="objectValue!= null and objectValue!= ''">and t.OBJECT_VALUE LIKE '%'|| #{objectValue} || '%'</if> <if test="objectValue!= null and objectValue!= ''">and t.OBJECT_VALUE LIKE '%'|| #{objectValue} || '%'</if>
<if test="csrqStart!=null and csrqStart!=''"> and to_date(td.BIRTHDAY,'yyyy-MM-dd') <![CDATA[>=]]> to_date(#{csrqStart},'yyyy-MM-dd') </if> <if test="csrqStart!=null and csrqStart!=''"> and to_date(td.BIRTHDAY,'yyyy-MM-dd') <![CDATA[>=]]> to_date(#{csrqStart},'yyyy-MM-dd') </if>
<if test="csrqEnd!=null and csrqEnd!=''"> and to_date(td.BIRTHDAY,'yyyy-MM-dd') <![CDATA[<=]]> to_date(#{csrqEnd},'yyyy-MM-dd') </if> <if test="csrqEnd!=null and csrqEnd!=''"> and to_date(td.BIRTHDAY,'yyyy-MM-dd') <![CDATA[<=]]> to_date(#{csrqEnd},'yyyy-MM-dd') </if>
...@@ -479,12 +481,17 @@ ...@@ -479,12 +481,17 @@
select count(*) select count(*)
from TB_ST_SPATIOTEMPORALRESULT t from TB_ST_SPATIOTEMPORALRESULT t
left join SBT_RESULT_DETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE left join SBT_RESULT_DETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE
where t.TASK_ID = #{taskId,jdbcType=VARCHAR} and t.XXZJBH in
(select max(t.XXZJBH)
from TB_ST_SPATIOTEMPORALRESULT t
left join SBT_RESULT_DETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE
where t.TASK_ID = #{taskId,jdbcType=VARCHAR} where t.TASK_ID = #{taskId,jdbcType=VARCHAR}
<if test="sfFzxyr!=null and sfFzxyr!=''"> and td.SF_FZXYR =#{sfFzxyr,jdbcType=VARCHAR} </if> <if test="sfFzxyr!=null and sfFzxyr!=''">and td.SF_FZXYR =#{sfFzxyr,jdbcType=VARCHAR}</if>
<if test="sfGwry!=null and sfGwry!=''"> and td.SF_GWRY =#{sfGwry,jdbcType=VARCHAR} </if> <if test="sfGwry!=null and sfGwry!=''"> and td.SF_GWRY =#{sfGwry,jdbcType=VARCHAR} </if>
<if test="sfGwryFzxyr!=null and sfGwryFzxyr!=''"> and (td.SF_GWRY =1 or td.SF_FZXYR=1) </if> <if test="sfGwryFzxyr!=null and sfGwryFzxyr!=''"> and (td.SF_GWRY =1 or td.SF_FZXYR=1) </if>
<if test="tjType!=null and tjType!='' and tjType =='1'.toString()"> and td.zjhm is not null</if> <if test="tjType!=null and tjType!='' and tjType =='1'.toString()"> and td.zjhm is not null</if>
<if test="hmlx!=null and hmlx!='' and hmlx =='1'.toString()"> <if test="hmlx!=null and hmlx!='' and hmlx =='1'.toString()">
and td.name is not null
and td.zjhm in ( and td.zjhm in (
SELECT td.ZJHM AS zjhm SELECT td.ZJHM AS zjhm
FROM TB_ST_SPATIOTEMPORALRESULT t FROM TB_ST_SPATIOTEMPORALRESULT t
...@@ -513,6 +520,13 @@ ...@@ -513,6 +520,13 @@
and substr(td.sjhm,1,7) in(select phone from TB_ST_PHONENO where pc in (${gwdqs})) and substr(td.sjhm,1,7) in(select phone from TB_ST_PHONENO where pc in (${gwdqs}))
</if> </if>
<if test="tjType!=null and tjType!='' and tjType =='3'.toString()"> and td.OBJECT_TYPE in('6424','6422','6425','6423','6426') </if> <if test="tjType!=null and tjType!='' and tjType =='3'.toString()"> and td.OBJECT_TYPE in('6424','6422','6425','6423','6426') </if>
<if test="hmlx!=null and hmlx!='' and hmlx =='1'.toString()">
group by td.zjhm
</if>
<if test="hmlx!=null and hmlx!='' and hmlx =='2'.toString()">
group by td.sjhm
</if>
)
</select> </select>
<select id="findSkhsTaskResultTjList" parameterType="com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail" resultType="com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail"> <select id="findSkhsTaskResultTjList" parameterType="com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail" resultType="com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail">
...@@ -544,12 +558,17 @@ ...@@ -544,12 +558,17 @@
td.SF_GWRY as sfGwry td.SF_GWRY as sfGwry
from TB_ST_SPATIOTEMPORALRESULT t from TB_ST_SPATIOTEMPORALRESULT t
left join SBT_RESULT_DETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE left join SBT_RESULT_DETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE
where t.TASK_ID = #{taskId,jdbcType=VARCHAR} and t.XXZJBH in
(select max(t.XXZJBH)
from TB_ST_SPATIOTEMPORALRESULT t
left join SBT_RESULT_DETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE
where t.TASK_ID = #{taskId,jdbcType=VARCHAR} where t.TASK_ID = #{taskId,jdbcType=VARCHAR}
<if test="sfFzxyr!=null and sfFzxyr!=''"> and td.SF_FZXYR =#{sfFzxyr,jdbcType=VARCHAR} </if> <if test="sfFzxyr!=null and sfFzxyr!=''">and td.SF_FZXYR = #{sfFzxyr,jdbcType=VARCHAR}</if>
<if test="sfGwry!=null and sfGwry!=''"> and td.SF_GWRY =#{sfGwry,jdbcType=VARCHAR} </if> <if test="sfGwry!=null and sfGwry!=''"> and td.SF_GWRY =#{sfGwry,jdbcType=VARCHAR} </if>
<if test="sfGwryFzxyr!=null and sfGwryFzxyr!=''"> and (td.SF_GWRY =1 or td.SF_FZXYR=1) </if> <if test="sfGwryFzxyr!=null and sfGwryFzxyr!=''"> and (td.SF_GWRY =1 or td.SF_FZXYR=1) </if>
<if test="tjType!=null and tjType!='' and tjType =='1'.toString()"> and td.zjhm is not null</if> <if test="tjType!=null and tjType!='' and tjType =='1'.toString()"> and td.zjhm is not null</if>
<if test="hmlx!=null and hmlx!='' and hmlx =='1'.toString()"> <if test="hmlx!=null and hmlx!='' and hmlx =='1'.toString()">
and td.name is not null
and td.zjhm in ( and td.zjhm in (
SELECT td.ZJHM AS zjhm SELECT td.ZJHM AS zjhm
FROM TB_ST_SPATIOTEMPORALRESULT t FROM TB_ST_SPATIOTEMPORALRESULT t
...@@ -578,6 +597,13 @@ ...@@ -578,6 +597,13 @@
and substr(td.sjhm,1,7) in(select phone from TB_ST_PHONENO where pc in (${gwdqs})) and substr(td.sjhm,1,7) in(select phone from TB_ST_PHONENO where pc in (${gwdqs}))
</if> </if>
<if test="tjType!=null and tjType!='' and tjType =='3'.toString()"> and td.OBJECT_TYPE in('6424','6422','6425','6423','6426') </if> <if test="tjType!=null and tjType!='' and tjType =='3'.toString()"> and td.OBJECT_TYPE in('6424','6422','6425','6423','6426') </if>
<if test="hmlx!=null and hmlx!='' and hmlx =='1'.toString()">
group by td.zjhm
</if>
<if test="hmlx!=null and hmlx!='' and hmlx =='2'.toString()">
group by td.sjhm
</if>
)
order by td.name desc nulls last,td.xxzjbh,t.DJSJ desc order by td.name desc nulls last,td.xxzjbh,t.DJSJ desc
) t1 ) t1
where rownum <![CDATA[ <= ]]> #{end} where rownum <![CDATA[ <= ]]> #{end}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment