Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
39e4ad73
Commit
39e4ad73
authored
Dec 15, 2023
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)修改sql
parent
99f571ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
26 deletions
+24
-26
IdxBizXnzsMapper.xml
...le-cas-api/src/main/resources/mapper/IdxBizXnzsMapper.xml
+24
-26
No files found.
amos-boot-system-cas/amos-boot-module-cas-api/src/main/resources/mapper/IdxBizXnzsMapper.xml
View file @
39e4ad73
...
...
@@ -132,18 +132,18 @@
<select
id=
"select"
resultType=
"com.yeejoin.amos.boot.module.cas.api.dto.IdxBizXnzsDto"
>
SELECT
a.c_ds as axisData,
a.
one
,
b.
two
,
c.t
hree
,
d.
four
a.
four
,
b.
one
,
c.t
wo
,
d.
three
FROM
(
SELECT
c_ds,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "
one
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "
four
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
0
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
3
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
@@ -154,10 +154,10 @@
LEFT JOIN (
SELECT
c_ds,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "
two
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "
one
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
1
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
0
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
@@ -168,10 +168,10 @@
LEFT JOIN (
SELECT
c_ds,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "t
hree
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "t
wo
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
2
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
1
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
@@ -182,10 +182,10 @@
LEFT JOIN (
SELECT
c_ds,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "
four
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "
three
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
3
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
2
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
@@ -195,23 +195,21 @@
) AS d ON d.c_ds = a.c_ds
</select>
<select
id=
"selectZwdl"
resultType=
"com.yeejoin.amos.boot.module.cas.api.dto.IdxBizXnzsDto"
>
SELECT
a.c_zwdl as axisData,
a.
one
,
b.two
,
c.three
,
d.four
a.
four
,
COALESCE(b.one, 0) AS one
,
COALESCE(c.two, 0) AS two
,
COALESCE(d.three, 0) AS three
FROM
(
SELECT
c_zwdl,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz
) * b.c_bbqz )), 2 ) AS "one
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz
) * b.c_bbqz)), 2 ) AS "four
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
0
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
3
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
@@ -222,10 +220,10 @@
LEFT JOIN (
SELECT
c_zwdl,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz
) * b.c_bbqz )), 2 ) AS "two
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz
) * b.c_bbqz )), 2 ) AS "one
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
1
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
0
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
@@ -236,10 +234,10 @@
LEFT JOIN (
SELECT
c_zwdl,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "t
hree
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz )), 2 ) AS "t
wo
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
2
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
1
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
@@ -250,10 +248,10 @@
LEFT JOIN (
SELECT
c_zwdl,
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz
)), 2 ) AS "four
"
round( SUM(((( b.c_xnzs * b.c_jdqz ) * b.c_dsqz ) * b.c_bbqz
)), 2 ) AS "three
"
FROM
idx_biz_xnzs AS b,
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
3
, 1 ) AS a
( SELECT c_jd, c_nf, c_jddm FROM idx_biz_xnzs GROUP BY c_jd, c_nf ORDER BY c_nf DESC, c_jddm DESC LIMIT
2
, 1 ) AS a
WHERE
a.c_nf = b.c_nf
AND a.c_jddm = b.c_jddm
...
...
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