Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-core
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isc-v3.1-tmp
isc-core
Commits
a1b61a54
Commit
a1b61a54
authored
Nov 05, 2024
by
huangshunlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉date_format函数
parent
293d7188
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
CbsRange.java
.../main/java/com/brilliance/isc/common/cbsmod/CbsRange.java
+16
-16
No files found.
isc-common-service/src/main/java/com/brilliance/isc/common/cbsmod/CbsRange.java
View file @
a1b61a54
...
...
@@ -43,7 +43,7 @@ public class CbsRange {
String
sql
=
""
;
sql
+=
" WHERE FEEINR = '"
+
feeinr
+
"'"
;
sql
+=
" AND FEEPRI = '"
+
feepri
+
"'"
;
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
List
<
Fec
>
fecList
=
fecMapper
.
selectFecByConditionSql
(
sql
);
if
(
fecList
!=
null
&&
fecList
.
size
()
>
0
)
{
BeanUtils
.
copyProperties
(
fecList
.
get
(
0
),
fec
);
//需要深拷贝,不然调用得到的对象指向的还是原来的地址
...
...
@@ -65,7 +65,7 @@ public class CbsRange {
sql
+=
" AND FEEPRI = '"
+
feepri
+
"'"
;
sql
+=
" AND OBJTYP = '"
+
objTyp
+
"'"
;
sql
+=
" AND OBJINR = '"
+
objInr
+
"'"
;
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
List
<
Fec
>
fecList
=
fecMapper
.
selectFecByConditionSql
(
sql
);
if
(
fecList
!=
null
&&
fecList
.
size
()
>
0
)
{
BeanUtils
.
copyProperties
(
fecList
.
get
(
0
),
fec
);
//需要深拷贝,不然调用得到的对象指向的还是原来的地址
...
...
@@ -85,7 +85,7 @@ public class CbsRange {
sql
+=
" WHERE CUR = '"
+
cur
+
"'"
;
sql
+=
" AND OBJTYP = '"
+
objTyp
+
"'"
;
sql
+=
" AND OBJINR = '"
+
objInr
+
"'"
;
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
List
<
Irs
>
irsList
=
irsMapper
.
selectIrsByConditionSql
(
sql
);
if
(
irsList
!=
null
&&
irsList
.
size
()
>
0
)
{
BeanUtils
.
copyProperties
(
irsList
.
get
(
0
),
irs
);
//需要深拷贝,不然调用得到的对象指向的还是原来的地址
...
...
@@ -108,7 +108,7 @@ public class CbsRange {
sql
+=
" AND EXTID = '"
+
extid
+
"'"
;
sql
+=
" AND OBJTYP = '"
+
objTyp
+
"'"
;
sql
+=
" AND OBJINR = '"
+
objInr
+
"'"
;
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
List
<
Cbb
>
cbbList
=
cbbMapper
.
getCbbByContiditionSql
(
sql
);
if
(
cbbList
!=
null
&&
cbbList
.
size
()
>
0
)
{
BeanUtils
.
copyProperties
(
cbbList
.
get
(
0
),
cbb
);
//需要深拷贝,不然调用得到的对象指向的还是原来的地址
...
...
@@ -124,7 +124,7 @@ public class CbsRange {
String
cur
=
xrt
.
getCur
();
String
sql
=
""
;
sql
+=
" WHERE CUR = '"
+
cur
+
"'"
;
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
sql
=
Utils
.
sdbEtyGenSql
(
"XRT"
,
sql
);
List
<
Xrt
>
xrtList
=
xrtMapper
.
getXrtByConditionSql
(
sql
);
if
(
xrtList
!=
null
&&
xrtList
.
size
()
>
0
)
{
...
...
@@ -140,7 +140,7 @@ public class CbsRange {
String
cur
=
xrt
.
getCur
();
String
sql
=
""
;
sql
+=
" WHERE CUR = '"
+
cur
+
"'"
;
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
dat
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
dat
)
+
" "
;
List
<
Zmqxrt
>
zmqxrtList
=
zmqxrtMapper
.
getZmqxrtByConditionSql
(
sql
);
if
(
zmqxrtList
!=
null
&&
zmqxrtList
.
size
()
>
0
)
{
BeanUtils
.
copyProperties
(
zmqxrtList
.
get
(
0
),
xrt
);
//需要深拷贝,不然调用得到的对象指向的还是原来的地址
...
...
@@ -170,7 +170,7 @@ public class CbsRange {
if
(
endDate
==
null
||
Dates
.
diff
(
endDate
,
maxDate
)
>
0
)
{
endDate
=
maxDate
;
}
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" "
;
Cbb
lastCbb
=
getCbbByContiditionSql
(
sql
);
if
(
lastCbb
!=
null
)
{
Date
endDate2
=
lastCbb
.
getEnddat
();
...
...
@@ -219,7 +219,7 @@ public class CbsRange {
if
(
endDate
==
null
||
Dates
.
diff
(
endDate
,
maxDate
)
>
0
)
{
endDate
=
maxDate
;
}
sql
+=
" AND
date_format(BEGDAT, '%y%m%d') <= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" AND date_format(ENDDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" "
;
sql
+=
" AND
BEGDAT <= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" AND ENDDAT
> "
+
Utils
.
dbSqlDate
(
beginDate
)
+
" "
;
Fec
lastFec
=
getFecByContiditionSql
(
sql
);
if
(
lastFec
!=
null
)
{
Date
endDate2
=
lastFec
.
getEnddat
();
...
...
@@ -265,7 +265,7 @@ public class CbsRange {
sql
+=
" AND FEEPRI = '"
+
feepri
+
"'"
;
sql
+=
" AND OBJTYP = '"
+
objTyp
+
"'"
;
sql
+=
" AND OBJINR = '"
+
objInr
+
"'"
;
sql
+=
" AND
date_format(ENDDAT, '%y%m%d')
= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
""
;
sql
+=
" AND
ENDDAT
= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
""
;
/**
* 老国结Inr为8位,新国结为16位并填了0,新国结的inr必定小于老国结的inr
* 但老国结按照逻辑,应该要比新国结小因此加了or
...
...
@@ -293,9 +293,9 @@ public class CbsRange {
sql
+=
" AND OBJTYP = '"
+
objTyp
+
"'"
;
sql
+=
" AND OBJINR = '"
+
objInr
+
"'"
;
if
(
beginDate
==
null
)
{
sql
+=
"AND
date_format(BEGDAT, '%y%m%d')
>= "
+
Utils
.
dbSqlDate
(
Utils
.
getMinDate
());
sql
+=
"AND
BEGDAT
>= "
+
Utils
.
dbSqlDate
(
Utils
.
getMinDate
());
}
else
{
sql
+=
"AND
date_format(BEGDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
beginDate
);
sql
+=
"AND
BEGDAT
> "
+
Utils
.
dbSqlDate
(
beginDate
);
}
sql
+=
" ORDER BY BEGDAT, INR"
;
return
cbbMapper
.
getCbbByContiditionSql
(
sql
);
...
...
@@ -313,9 +313,9 @@ public class CbsRange {
sql
+=
" AND OBJTYP = '"
+
objTyp
+
"'"
;
sql
+=
" AND OBJINR = '"
+
objInr
+
"'"
;
if
(
beginDate
==
null
)
{
sql
+=
"AND
date_format(BEGDAT, '%y%m%d')
>= "
+
Utils
.
dbSqlDate
(
Utils
.
getMinDate
());
sql
+=
"AND
BEGDAT
>= "
+
Utils
.
dbSqlDate
(
Utils
.
getMinDate
());
}
else
{
sql
+=
"AND
date_format(BEGDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
beginDate
);
sql
+=
"AND
BEGDAT
> "
+
Utils
.
dbSqlDate
(
beginDate
);
}
sql
+=
" ORDER BY BEGDAT, INR"
;
return
fecMapper
.
selectFecByConditionSql
(
sql
);
...
...
@@ -338,9 +338,9 @@ public class CbsRange {
sql
=
sql
+
" AND INR > '"
+
inr
+
"')"
;
sql
=
sql
+
" OR (BEGDAT IS NOT NULL))"
;
}
else
{
sql
=
sql
+
" AND ((
date_format(BEGDAT, '%y%m%d')
= "
+
Utils
.
dbSqlDate
(
beginDate
);
sql
=
sql
+
" AND ((
BEGDAT
= "
+
Utils
.
dbSqlDate
(
beginDate
);
sql
=
sql
+
" AND INR > '"
+
inr
+
"' )"
;
sql
=
sql
+
" OR (
date_format(BEGDAT, '%y%m%d')
> "
+
Utils
.
dbSqlDate
(
beginDate
)
+
"))"
;
sql
=
sql
+
" OR (
BEGDAT
> "
+
Utils
.
dbSqlDate
(
beginDate
)
+
"))"
;
}
sql
+=
" ORDER BY BEGDAT, INR"
;
return
cbbMapper
.
getCbbByContiditionSql
(
sql
);
...
...
@@ -365,7 +365,7 @@ public class CbsRange {
sql
+=
" AND EXTID = '"
+
extid
+
"'"
;
sql
+=
" AND OBJTYP = '"
+
objTyp
+
"'"
;
sql
+=
" AND OBJINR = '"
+
objInr
+
"'"
;
sql
+=
" AND
date_format(ENDDAT, '%y%m%d')
= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
""
;
sql
+=
" AND
ENDDAT
= "
+
Utils
.
dbSqlDate
(
beginDate
)
+
""
;
/**
* 老国结Inr为8位,新国结为16位并填了0,新国结的inr必定小于老国结的inr
* 但老国结按照逻辑,应该要比新国结小因此加了or
...
...
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