Commit 7e11f299 by libin

Merge remote-tracking branch 'origin/master'

parents 7de97a6f 7c8a475e
...@@ -507,7 +507,11 @@ ...@@ -507,7 +507,11 @@
select count(*) select count(*)
from TB_ST_REGIONALSTASKRESULT t from TB_ST_REGIONALSTASKRESULT t
left join REGIONALTASKRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE left join REGIONALTASKRESULTDETAIL 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} and t.XXZJBH in
(select max(t.XXZJBH)
from TB_ST_REGIONALSTASKRESULT t
left join REGIONALTASKRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE 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>
...@@ -520,6 +524,18 @@ ...@@ -520,6 +524,18 @@
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="tjType!=null and tjType!='' and tjType =='1'.toString()">
group by td.zjhm
</if>
<if test="tjType!=null and tjType!='' and tjType =='2'.toString()">
group by td.sjhm
</if>
<if test="tjType!=null and tjType!='' and tjType =='3'.toString()">
group by td.OBJECT_VALUE
</if>
)
</select> </select>
<select id="findRegionalTaskResultTjList" parameterType="com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail" resultType="com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail"> <select id="findRegionalTaskResultTjList" parameterType="com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail" resultType="com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail">
...@@ -551,7 +567,11 @@ ...@@ -551,7 +567,11 @@
td.SF_GWRY as sfGwry td.SF_GWRY as sfGwry
from TB_ST_REGIONALSTASKRESULT t from TB_ST_REGIONALSTASKRESULT t
left join REGIONALTASKRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE left join REGIONALTASKRESULTDETAIL 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} and t.XXZJBH in
(select max(t.XXZJBH)
from TB_ST_REGIONALSTASKRESULT t
left join REGIONALTASKRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE 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>
...@@ -564,6 +584,16 @@ ...@@ -564,6 +584,16 @@
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="tjType!=null and tjType!='' and tjType =='1'.toString()">
group by td.zjhm
</if>
<if test="tjType!=null and tjType!='' and tjType =='2'.toString()">
group by td.sjhm
</if>
<if test="tjType!=null and tjType!='' and tjType =='3'.toString()">
group by td.OBJECT_VALUE
</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}
...@@ -602,7 +632,11 @@ ...@@ -602,7 +632,11 @@
td.SF_GWRY as sfGwry td.SF_GWRY as sfGwry
from TB_ST_TOGETHERTASKRESULT t from TB_ST_TOGETHERTASKRESULT t
left join TB_ST_TOGETHERRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE left join TB_ST_TOGETHERRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE
where t.TASK_ID = #{taskId} where t.TASK_ID = #{taskId,jdbcType=VARCHAR} and t.XXZJBH in
(select max(t.XXZJBH)
from TB_ST_TOGETHERTASKRESULT t
left join TB_ST_TOGETHERRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE 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>
...@@ -612,7 +646,13 @@ ...@@ -612,7 +646,13 @@
<if test="gwdqs!=null and gwdqs!=''"> <if test="gwdqs!=null and gwdqs!=''">
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 =='1'.toString()">
group by td.zjhm
</if>
<if test="tjType!=null and tjType!='' and tjType =='2'.toString()">
group by td.sjhm
</if>
)
order by t.COUNT desc order by t.COUNT desc
) t1 ) t1
where rownum <![CDATA[ <= ]]> #{end} where rownum <![CDATA[ <= ]]> #{end}
...@@ -625,6 +665,10 @@ ...@@ -625,6 +665,10 @@
from TB_ST_TOGETHERTASKRESULT t from TB_ST_TOGETHERTASKRESULT t
left join TB_ST_TOGETHERRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE left join TB_ST_TOGETHERRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE
where t.TASK_ID = #{taskId} where t.TASK_ID = #{taskId}
(select max(t.XXZJBH)
from TB_ST_TOGETHERTASKRESULT t
left join TB_ST_TOGETHERRESULTDETAIL td on t.OBJECT_VALUE = td.OBJECT_VALUE AND t.OBJECT_TYPE = td.OBJECT_TYPE 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>
...@@ -634,6 +678,13 @@ ...@@ -634,6 +678,13 @@
<if test="gwdqs!=null and gwdqs!=''"> <if test="gwdqs!=null and gwdqs!=''">
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 =='1'.toString()">
group by td.zjhm
</if>
<if test="tjType!=null and tjType!='' and tjType =='2'.toString()">
group by td.sjhm
</if>
)
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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