Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
40c56784
Commit
40c56784
authored
Jul 03, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
68a17b47
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
220 deletions
+26
-220
portal-server/src/main/java/com/zq/portal/task/StatsTimingTask.java
+1
-1
portal-server/src/main/resources/HyJoinTableStatsMapper.xml
+0
-178
portal-server/src/main/resources/mapper/HyStatsMapper.xml
+25
-41
No files found.
portal-server/src/main/java/com/zq/portal/task/StatsTimingTask.java
View file @
40c56784
...
...
@@ -26,7 +26,7 @@ public class StatsTimingTask {
private
final
YlStatsService
ylStatsService
;
private
final
AreaDao
areaDao
;
private
final
String
cron
=
"0 0 0/12 * * ?"
;
// private final String cron = "0 0
7 18
* * ?";
// private final String cron = "0 0
9
* * ?";
@Scheduled
(
cron
=
cron
)
...
...
portal-server/src/main/resources/HyJoinTableStatsMapper.xml
deleted
100644 → 0
View file @
68a17b47
<?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.zq.portal.dao.HyStatsDao"
>
<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
WHERE m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND m.AIAX0001 = #{type}
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY DATE_FORMAT(m.AIAX0048, "%Y")
ORDER BY DATE_FORMAT(m.AIAX0048, "%Y") DESC LIMIT 5
</select>
<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
WHERE m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND m.AIAX0001 = #{type}
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY DATE_FORMAT(m.AIAX0048, '%Y-%m')
ORDER BY DATE_FORMAT(m.AIAX0048, '%Y-%m') DESC LIMIT 12
</select>
<select
id=
"getMarriageStats"
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
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY
m.AIAX0001
</select>
<!--获取下级区域婚姻统计列表-->
<select
id=
"getAreaUnderMarriageStatsList"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT
LEFT ( t.YAB003, #{size} ) 'code',
m.AIAX0001 'type' ,
COUNT( 1 ) 'num'
FROM
mrcase m LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND CHAR_LENGTH (LEFT ( t.YAB003, #{size} )) = #{size}
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
<if
test=
"type != null and type != ''"
>
AND m.AIAX0001 = #{type}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT( #{subAreaCode}, '%' )
</if>
GROUP BY
LEFT ( t.YAB003, #{size} ), m.AIAX0001
</select>
<!--获取跨地婚姻统计-->
<select
id=
"getCrossMarriageStats"
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
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)
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY
m.AIAX0001
</select>
<!--获取离婚中的人数-->
<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
WHERE m.AIAX0001 = 'IB'
AND m.BIAX0075 = '1'
AND m.AIAX0072 != '1'
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.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
WHERE m.AIAX0001 = 'IA'
AND m.BIAX0075 = '1'
AND m.AIAX0072 = '1'
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
</select>
<select
id=
"getMonthDivorceCoolingData"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT
LEFT (m.AIAX0048, 10),
COUNT (1) 'num'
FROM
mrcheck m
LEFT JOIN mrcheckappend ma
ON m.BIAX0069 = ma.BIAX0069
WHERE
m.AIAX0001 = 'IB'
AND m.AIAX0072 = '1'
AND m.BIAX0015 = '6'
AND ma.COLEENDTIME
<
CURDATE()
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', m.AIAE0004 '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 businessType, manName, girlName, manIdCard, girlIdCard,
manNationality, girlNationality, manState, girlState, manDomicile,
girlDomicile, manContact, girlContact, archiveYear, registerDate, orgName, areaCode
FROM `search_data`
WHERE 1=1
<if
test=
"keyword != null and keyword != ''"
>
AND (manName = #{keyword} OR girlName = #{keyword} OR manIdCard = #{keyword} OR girlIdCard = #{keyword})
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND areaCode LIKE CONCAT(#{subAreaCode},'%')
</if>
ORDER BY registerDate DESC
</select>
</mapper>
portal-server/src/main/resources/mapper/HyStatsMapper.xml
View file @
40c56784
...
...
@@ -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
FROM mrcase m
LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND m.AIAX0001 = #{type}
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND
m
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND
t
.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
FROM mrcase m
LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND m.AIAX0001 = #{type}
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND
m
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND
t
.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
mrcase m
LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
...
...
@@ -41,7 +41,7 @@
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND
m
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND
t
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY
m.AIAX0001
...
...
@@ -50,15 +50,15 @@
<!--获取下级区域婚姻统计列表-->
<select
id=
"getAreaUnderMarriageStatsList"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT
LEFT (
m
.YAB003, #{size} ) 'code',
LEFT (
t
.YAB003, #{size} ) 'code',
m.AIAX0001 'type' ,
COUNT( 1 ) 'num'
FROM
mrcase m
mrcase m
LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND CHAR_LENGTH (LEFT (
m
.YAB003, #{size} )) = #{size}
AND CHAR_LENGTH (LEFT (
t
.YAB003, #{size} )) = #{size}
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
...
...
@@ -66,10 +66,10 @@
AND m.AIAX0001 = #{type}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND
m
.YAB003 LIKE CONCAT( #{subAreaCode}, '%' )
AND
t
.YAB003 LIKE CONCAT( #{subAreaCode}, '%' )
</if>
GROUP BY
LEFT (
m
.YAB003, #{size} ), m.AIAX0001
LEFT (
t
.YAB003, #{size} ), m.AIAX0001
</select>
<!--获取跨地婚姻统计-->
...
...
@@ -78,17 +78,17 @@
COUNT( 1 ) 'num',
m.AIAX0001 'type'
FROM
mrcase m
mrcase m
LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND LEFT(m.AIAP0013,4) != LEFT(
m
.YAB003,4)
AND LEFT(m.AIAP0014,4) != LEFT(
m
.YAB003,4)
AND LEFT(m.AIAP0013,4) != LEFT(
t
.YAB003,4)
AND LEFT(m.AIAP0014,4) != LEFT(
t
.YAB003,4)
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND
m
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND
t
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
GROUP BY
m.AIAX0001
...
...
@@ -97,7 +97,7 @@
<!--获取离婚中的人数-->
<select
id=
"getInDivorceNum"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT COUNT(1) 'num', m.AIAX0001 'type'
FROM mrcase m
FROM mrcase m
LEFT JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE m.AIAX0001 = 'IB'
AND m.BIAX0075 = '1'
AND m.AIAX0072 != '1'
...
...
@@ -105,14 +105,14 @@
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND
m
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND
t
.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
FROM mrcase m
JOIN taorg t ON m.AIAX0003 = t.ORGID
WHERE m.AIAX0001 = 'IA'
AND m.BIAX0075 = '1'
AND m.AIAX0072 = '1'
...
...
@@ -120,7 +120,7 @@
AND m.AIAX0059 = #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND
m
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
AND
t
.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
</select>
...
...
@@ -149,38 +149,22 @@
<!-- 'manDomicile', m.AIAP0028 'girlDomicile', m.AIAX0035 'manContact', m.AIAX0036 'girlContact', m.AIAX0059-->
<!-- 'archiveYear',-->
<!-- LEFT (m.AIAX0048, 10) 'registerDate', m.AIAE0004 'orgName'-->
<!-- FROM `mrcase` m-->
<!-- 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
m
.YAB003 LIKE CONCAT(#{subAreaCode},'%')-->
<!-- AND
t
.YAB003 LIKE CONCAT(#{subAreaCode},'%')-->
<!-- </if>-->
<!-- ORDER BY m.AIAX0048 DESC-->
<!-- </select>-->
<select
id=
"search"
resultType=
"java.util.Map"
>
SELECT
businessType,
manName,
girlName,
manIdCard,
girlIdCard,
manNationality,
girlNationality,
manState,
girlState,
REPLACE ( manDomicile, '广西壮族自治区/', '' ) 'manDomicile',
REPLACE ( girlDomicile, '广西壮族自治区/', '' ) 'girlDomicile',
manContact,
girlContact,
archiveYear,
registerDate,
orgName,
areaCode
FROM
`search_data`
SELECT businessType, manName, girlName, manIdCard, girlIdCard,
manNationality, girlNationality, manState, girlState, manDomicile,
girlDomicile, manContact, girlContact, archiveYear, registerDate, orgName, areaCode
FROM `search_data`
WHERE 1=1
<if
test=
"keyword != null and keyword != ''"
>
AND (manName = #{keyword} OR girlName = #{keyword} OR manIdCard = #{keyword} OR girlIdCard = #{keyword})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment