Commit e1c3f40f by 袁伟铭

修改

parent d4efbdc6
......@@ -4,12 +4,12 @@
<select id="getFivesYearMarriageLine" resultType="com.zq.portal.vo.StatsVo">
SELECT COUNT(1) 'num', m.AIAX0001 'type', DATE_FORMAT( m.AIAX0048, "%Y" ) 'year'
FROM mrcase m LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
FROM mrcase m
WHERE m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND m.AIAX0001 = #{type}
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND m.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY DATE_FORMAT(m.AIAX0048, "%Y")
ORDER BY DATE_FORMAT(m.AIAX0048, "%Y") DESC LIMIT 5
......@@ -17,12 +17,12 @@
<select id="getMonthMarriageLine" resultType="com.zq.portal.vo.StatsVo">
SELECT COUNT(1) 'num', m.AIAX0001 'type', DATE_FORMAT( m.AIAX0048, "%Y-%m" ) 'month'
FROM mrcase m LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
FROM mrcase m
WHERE m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND m.AIAX0001 = #{type}
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND m.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY DATE_FORMAT(m.AIAX0048, '%Y-%m')
ORDER BY DATE_FORMAT(m.AIAX0048, '%Y-%m') DESC LIMIT 12
......@@ -33,7 +33,7 @@
COUNT( 1 ) 'num',
m.AIAX0001 'type'
FROM
mrcase m LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
mrcase m
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
......@@ -41,7 +41,7 @@
AND m.AIAX0059 = #{year}
</if>
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND m.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY
m.AIAX0001
......@@ -53,17 +53,17 @@
COUNT( 1 ) 'num',
m.AIAX0001 'type'
FROM
mrcase m LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
mrcase m
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND LEFT(m.AIAP0013,4) != LEFT(t.YAB003,4)
AND LEFT(m.AIAP0014,4) != LEFT(t.YAB003,4)
AND LEFT(m.AIAP0013,4) != LEFT(m.YAB003,4)
AND LEFT(m.AIAP0014,4) != LEFT(m.YAB003,4)
<if test="year != null">
AND m.AIAX0059 = #{year}
</if>
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND m.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY
m.AIAX0001
......@@ -72,7 +72,7 @@
<!--获取离婚中的人数-->
<select id="getInDivorceNum" resultType="com.zq.portal.vo.StatsVo">
SELECT COUNT(1) 'num', m.AIAX0001 'type'
FROM mrcase m LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
FROM mrcase m
WHERE m.AIAX0001 = 'IB'
AND m.BIAX0075 = '1'
AND m.AIAX0072 != '1'
......@@ -80,14 +80,14 @@
AND m.AIAX0059 = #{year}
</if>
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND m.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
</select>
<!--获取结婚人数-->
<select id="getMarryNum" resultType="com.zq.portal.vo.StatsVo">
SELECT COUNT(1) 'num', m.AIAX0001 'type'
FROM mrcase m JOIN taorg t ON m.AIAX0003 = t.ORGID
FROM mrcase m
WHERE m.AIAX0001 = 'IA'
AND m.BIAX0075 = '1'
AND m.AIAX0072 = '1'
......@@ -95,7 +95,7 @@
AND m.AIAX0059 = #{year}
</if>
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND m.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
</select>
......@@ -116,24 +116,24 @@
GROUP BY LEFT (m.AIAX0048, 10)
</select>
<!-- <select id="search" resultType="java.util.Map">-->
<!-- SELECT m.AIAX0001 'businessType', m.AIAP0005 'manName', m.AIAP0006 'girlName', m.AIAP0013 'manIdCard', m.AIAP0014-->
<!-- 'girlIdCard',-->
<!-- m.AIAP0015 'manNationality', m.AIAP0016 'girlNationality', m.AIAP0023 'manState', m.AIAP0024 'girlState',-->
<!-- m.AIAP0027-->
<!-- 'manDomicile', m.AIAP0028 'girlDomicile', m.AIAX0035 'manContact', m.AIAX0036 'girlContact', m.AIAX0059-->
<!-- 'archiveYear',-->
<!-- LEFT (m.AIAX0048, 10) 'registerDate', t.ORGNAME 'orgName'-->
<!-- FROM `mrcase` m LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID-->
<!-- WHERE 1=1-->
<!-- <if test="keyword != null and keyword != ''">-->
<!-- AND (m.AIAP0005 = #{keyword} OR AIAP0006 = #{keyword} OR AIAP0013 = #{keyword} OR AIAP0014 = #{keyword})-->
<!-- </if>-->
<!-- <if test="subAreaCode != null and subAreaCode != ''">-->
<!-- AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')-->
<!-- </if>-->
<!-- ORDER BY m.AIAX0048 DESC-->
<!-- </select>-->
<!-- <select id="search" resultType="java.util.Map">-->
<!-- SELECT m.AIAX0001 'businessType', m.AIAP0005 'manName', m.AIAP0006 'girlName', m.AIAP0013 'manIdCard', m.AIAP0014-->
<!-- 'girlIdCard',-->
<!-- m.AIAP0015 'manNationality', m.AIAP0016 'girlNationality', m.AIAP0023 'manState', m.AIAP0024 'girlState',-->
<!-- m.AIAP0027-->
<!-- 'manDomicile', m.AIAP0028 'girlDomicile', m.AIAX0035 'manContact', m.AIAX0036 'girlContact', m.AIAX0059-->
<!-- 'archiveYear',-->
<!-- LEFT (m.AIAX0048, 10) 'registerDate', m.AIAE0004 'orgName'-->
<!-- FROM `mrcase` m-->
<!-- WHERE 1=1-->
<!-- <if test="keyword != null and keyword != ''">-->
<!-- AND (m.AIAP0005 = #{keyword} OR AIAP0006 = #{keyword} OR AIAP0013 = #{keyword} OR AIAP0014 = #{keyword})-->
<!-- </if>-->
<!-- <if test="subAreaCode != null and subAreaCode != ''">-->
<!-- AND m.YAB003 LIKE CONCAT(#{subAreaCode},'%')-->
<!-- </if>-->
<!-- ORDER BY m.AIAX0048 DESC-->
<!-- </select>-->
<select id="search" resultType="java.util.Map">
SELECT businessType, manName, girlName, manIdCard, girlIdCard,
......
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