Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
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
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
a2d3e0ae
Commit
a2d3e0ae
authored
Mar 12, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
信息管理2.6
parent
e86ddf00
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
7 deletions
+56
-7
InfoManagementApi.java
src/main/java/com/yxproject/start/api/InfoManagementApi.java
+13
-2
InfoManagementMapper.java
...java/com/yxproject/start/mapper/InfoManagementMapper.java
+30
-2
InfoManagementService.java
...va/com/yxproject/start/service/InfoManagementService.java
+5
-1
InfoManagementServiceImpl.java
...project/start/service/impl/InfoManagementServiceImpl.java
+8
-2
No files found.
src/main/java/com/yxproject/start/api/InfoManagementApi.java
View file @
a2d3e0ae
...
@@ -5,6 +5,7 @@ import com.yxproject.start.service.InfoManagementService;
...
@@ -5,6 +5,7 @@ import com.yxproject.start.service.InfoManagementService;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
...
@@ -15,11 +16,21 @@ public class InfoManagementApi {
...
@@ -15,11 +16,21 @@ public class InfoManagementApi {
@Autowired
@Autowired
private
InfoManagementService
infoManagementService
;
private
InfoManagementService
infoManagementService
;
@RequestMapping
(
"selectInfoManagement"
)
@RequestMapping
(
"selectInfoManagement"
)
public
List
<
NewFilesEntity
>
selectInfoManagement
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
){
public
List
<
NewFilesEntity
>
selectInfoManagement
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@RequestParam
(
"currPage"
)
String
currPage
,
@RequestParam
(
"pageSize"
)
String
pageSize
){
List
<
NewFilesEntity
>
resultList
=
infoManagementService
.
selectInfoManagement
(
beginFileName
,
endFileName
,
gajgMc
,
replaceDate
(
beginDate
),
replaceDate
(
endDate
));
List
<
NewFilesEntity
>
resultList
=
infoManagementService
.
selectInfoManagement
(
beginFileName
,
endFileName
,
gajgMc
,
replaceDate
(
beginDate
),
replaceDate
(
endDate
)
,
Long
.
valueOf
(
currPage
),
Long
.
valueOf
(
pageSize
)
);
return
resultList
;
return
resultList
;
}
}
@RequestMapping
(
"selectCount"
)
public
long
selectCount
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
){
long
count
=
infoManagementService
.
count
(
beginFileName
,
endFileName
,
gajgMc
,
beginDate
,
endDate
);
return
count
;
}
/**
/**
* 去除字符串中中线
* 去除字符串中中线
* @param str
* @param str
...
...
src/main/java/com/yxproject/start/mapper/InfoManagementMapper.java
View file @
a2d3e0ae
...
@@ -11,8 +11,31 @@ import java.util.Map;
...
@@ -11,8 +11,31 @@ import java.util.Map;
public
interface
InfoManagementMapper
{
public
interface
InfoManagementMapper
{
@Select
(
"SELECT * FROM "
+
" ( "
+
" SELECT A.*, ROWNUM RN "
+
"<script> "
+
"FROM (select * from new_files \n"
+
"where 1=1\n"
+
"<if test='beginFileName != \"\" '>"
+
"and (NEW_FILE_NAME between(#{beginFileName})and (#{endFileName}))\n"
+
"</if>"
+
"<if test='gajgMc != \"\" '>"
+
"and DWMC=#{gajgMc}\n"
+
"</if>"
+
"<if test='beginDate != \"\" '>"
+
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate}))"
+
"</if>"
+
") "
+
"A"
+
")"
+
"WHERE RN BETWEEN #{end} AND #{begin}"
+
"</script>"
)
public
List
<
NewFilesEntity
>
selectInfoManagement
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"begin"
)
long
begin
,
@Param
(
"end"
)
long
end
);
@Select
(
"<script> "
+
@Select
(
"<script> "
+
"
select * from new_files
\n"
+
"
SELECT COUNT(*) FROM NEW_FILES
\n"
+
"where 1=1\n"
+
"where 1=1\n"
+
"<if test='beginFileName != \"\" '>"
+
"<if test='beginFileName != \"\" '>"
+
"and (NEW_FILE_NAME between(#{beginFileName})and (#{endFileName}))\n"
+
"and (NEW_FILE_NAME between(#{beginFileName})and (#{endFileName}))\n"
+
...
@@ -24,5 +47,10 @@ public interface InfoManagementMapper {
...
@@ -24,5 +47,10 @@ public interface InfoManagementMapper {
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate}))"
+
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate}))"
+
"</if>"
+
"</if>"
+
"</script>"
)
"</script>"
)
public
List
<
NewFilesEntity
>
selectInfoManagement
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
);
public
long
count
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
);
}
}
src/main/java/com/yxproject/start/service/InfoManagementService.java
View file @
a2d3e0ae
...
@@ -6,5 +6,9 @@ import org.apache.ibatis.annotations.Param;
...
@@ -6,5 +6,9 @@ import org.apache.ibatis.annotations.Param;
import
java.util.List
;
import
java.util.List
;
public
interface
InfoManagementService
{
public
interface
InfoManagementService
{
public
List
<
NewFilesEntity
>
selectInfoManagement
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
);
public
List
<
NewFilesEntity
>
selectInfoManagement
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"begin"
)
long
begin
,
@Param
(
"end"
)
long
end
);
public
long
count
(
@Param
(
"beginFileName"
)
String
beginFileName
,
@Param
(
"endFileName"
)
String
endFileName
,
@Param
(
"gajgMc"
)
String
gajgMc
,
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
);
}
}
src/main/java/com/yxproject/start/service/impl/InfoManagementServiceImpl.java
View file @
a2d3e0ae
...
@@ -15,10 +15,16 @@ public class InfoManagementServiceImpl implements InfoManagementService {
...
@@ -15,10 +15,16 @@ public class InfoManagementServiceImpl implements InfoManagementService {
@Override
@Override
public
List
<
NewFilesEntity
>
selectInfoManagement
(
String
beginFileName
,
String
endFileName
,
String
gajgMc
,
String
beginDate
,
String
endDate
)
{
public
List
<
NewFilesEntity
>
selectInfoManagement
(
String
beginFileName
,
String
endFileName
,
String
gajgMc
,
String
beginDate
,
String
endDate
,
long
currPage
,
long
pageSize
)
{
List
<
NewFilesEntity
>
newFilesEntities
=
infoManagementMapper
.
selectInfoManagement
(
beginFileName
,
endFileName
,
gajgMc
,
beginDate
,
endDate
);
List
<
NewFilesEntity
>
newFilesEntities
=
infoManagementMapper
.
selectInfoManagement
(
beginFileName
,
endFileName
,
gajgMc
,
beginDate
,
endDate
,
currPage
*
pageSize
,(
currPage
-
1
)
*
pageSize
+
1
);
return
newFilesEntities
;
return
newFilesEntities
;
}
}
@Override
public
long
count
(
String
beginFileName
,
String
endFileName
,
String
gajgMc
,
String
beginDate
,
String
endDate
)
{
long
count
=
infoManagementMapper
.
count
(
beginFileName
,
endFileName
,
gajgMc
,
beginDate
,
endDate
);
return
count
;
}
}
}
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