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
6fce343a
Commit
6fce343a
authored
Sep 29, 2024
by
huangshunlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql拼接调整为占位符(日期类型不能直接与date_format字符串比较)
parent
9cec67a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
CurMapper.java
...e/src/main/java/com/brilliance/isc/mda/dao/CurMapper.java
+3
-0
curmapper.xml
isc-common-core/src/main/resources/mapper/curmapper.xml
+18
-0
XrtmodServiceImpl.java
...nce/isc/common/cbsmod/service/impl/XrtmodServiceImpl.java
+7
-2
No files found.
isc-common-core/src/main/java/com/brilliance/isc/mda/dao/CurMapper.java
View file @
6fce343a
...
...
@@ -55,4 +55,6 @@ public interface CurMapper {
Cur
selectByCod
(
Cur
record
);
List
<
Cur
>
getValidCurrenciesList
(
Cur
record
);
}
\ No newline at end of file
isc-common-core/src/main/resources/mapper/curmapper.xml
View file @
6fce343a
...
...
@@ -445,6 +445,24 @@
where COD = #{cod}
</select>
<select
id=
"getValidCurrenciesList"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from cur
<where>
<if
test=
"etgextkey != null and etgextkey != ''"
>
etgextkey = #{etgextkey}
</if>
<if
test=
"begdat != null "
>
and (begdat is NULL or BEGDAT
<![CDATA[ <= ]]>
#{begdat} )
</if>
<if
test=
"enddat != null"
>
and (enddat is NULL or ENDDAT
<![CDATA[ > ]]>
#{enddat} )
</if>
</where>
</select>
</mapper>
isc-common-service/src/main/java/com/brilliance/isc/common/cbsmod/service/impl/XrtmodServiceImpl.java
View file @
6fce343a
...
...
@@ -270,11 +270,16 @@ public class XrtmodServiceImpl implements XrtmodService {
private
List
<
String
>
getValidCurrenciesList
(
Date
date
)
{
Date
begDate
=
date
;
Date
endDate
=
date
;
String
argSql
=
"WHERE (BEGDAT is NULL or BEGDAT <= "
+
Utils
.
dbSqlDate
(
begDate
)
+
" ) and ( ENDDAT is NULL or ENDDAT > "
+
Utils
.
dbSqlDate
(
endDate
)
+
")"
;
/*
String argSql = "WHERE (BEGDAT is NULL or BEGDAT <= " + Utils.dbSqlDate(begDate) + " ) and ( ENDDAT is NULL or ENDDAT > " + Utils.dbSqlDate(endDate) +")";
String sql = "select cod from cur " + Utils.sdbEtyGenSql("CUR", argSql);
Map<String, Object> dyncMap = new HashMap<>();
dyncMap.put("sql", sql);
List
<
Cur
>
curList
=
curMapper
.
dyncRead
(
dyncMap
);
List<Cur> curList = curMapper.dyncRead(dyncMap);*/
Cur
queryCur
=
new
Cur
();
queryCur
.
setBegdat
(
begDate
);
queryCur
.
setEnddat
(
endDate
);
queryCur
.
setEtgextkey
(
SettleContext
.
getUserEtg
().
getExtkey
());
List
<
Cur
>
curList
=
curMapper
.
getValidCurrenciesList
(
queryCur
);
if
(
curList
!=
null
)
{
List
<
String
>
list
=
new
ArrayList
<>();
curList
.
forEach
(
cur
->
list
.
add
(
cur
.
getCod
()));
...
...
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