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
65296059
Commit
65296059
authored
Mar 12, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
6b27b843
237eef92
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
11 deletions
+62
-11
ExportExcelApi.java
src/main/java/com/yxproject/start/api/ExportExcelApi.java
+28
-3
ExportXMLApi.java
src/main/java/com/yxproject/start/api/ExportXMLApi.java
+1
-8
DetailReceiptListMapper.java
...a/com/yxproject/start/mapper/DetailReceiptListMapper.java
+17
-0
DetailReceiptListService.java
...com/yxproject/start/service/DetailReceiptListService.java
+4
-0
DetailReceiptListServiceImpl.java
...ject/start/service/impl/DetailReceiptListServiceImpl.java
+12
-0
No files found.
src/main/java/com/yxproject/start/api/ExportExcelApi.java
View file @
65296059
...
@@ -8,17 +8,42 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -8,17 +8,42 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
"exportExcel"
)
@RequestMapping
(
"exportExcel"
)
public
class
ExportExcelApi
{
public
class
ExportExcelApi
{
@Autowired
private
ReceiptService
receiptService
;
@Autowired
@Autowired
private
DetailReceiptListService
detailReceiptListService
;
private
DetailReceiptListService
detailReceiptListService
;
public
Byte
[]
exportExcel
(){
/**
* 导出公安网数据
*/
@RequestMapping
(
"printExcelData"
)
public
Byte
[]
printExcelData
(
String
date
){
List
<
Map
<
String
,
Object
>>
mapList
=
detailReceiptListService
.
selectPostDetails
(
replaceDate
(
date
));
return
null
;
return
null
;
}
}
/**
* 查询公安网数据
*/
@RequestMapping
(
"selectExcelData"
)
public
List
<
Map
<
String
,
Object
>>
selectExcelData
(
String
date
){
List
<
Map
<
String
,
Object
>>
mapList
=
detailReceiptListService
.
selectPostDetails
(
replaceDate
(
date
));
return
mapList
;
}
/**
* 去除字符串中中线
*
* @param str
* @return
*/
private
String
replaceDate
(
String
str
)
{
return
str
.
replace
(
"-"
,
""
);
}
...
...
src/main/java/com/yxproject/start/api/ExportXMLApi.java
View file @
65296059
...
@@ -152,12 +152,6 @@ public class ExportXMLApi {
...
@@ -152,12 +152,6 @@ public class ExportXMLApi {
}
}
return
null
;
return
null
;
}
}
...
@@ -167,7 +161,7 @@ public class ExportXMLApi {
...
@@ -167,7 +161,7 @@ public class ExportXMLApi {
*
*
* @throws IOException 可能出现文件写入不成功
* @throws IOException 可能出现文件写入不成功
*/
*/
p
ublic
String
createToMakePackageXML
(
List
<
PreproPersonEntity
>
preproPersonEntities
,
FilesEntity
filesEntity
,
String
url
)
throws
IOException
{
p
rivate
String
createToMakePackageXML
(
List
<
PreproPersonEntity
>
preproPersonEntities
,
FilesEntity
filesEntity
,
String
url
)
throws
IOException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormat2
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
SimpleDateFormat
simpleDateFormat2
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
Document
document
=
DocumentHelper
.
createDocument
();
Document
document
=
DocumentHelper
.
createDocument
();
...
@@ -251,7 +245,6 @@ public class ExportXMLApi {
...
@@ -251,7 +245,6 @@ public class ExportXMLApi {
}
}
preproPersonService
.
updatePreproPerson_NewFileName
(
preproPersonEntities
);
preproPersonService
.
updatePreproPerson_NewFileName
(
preproPersonEntities
);
String
files_seq
=
newFilesEntity
.
getId
()+
""
;
String
files_seq
=
newFilesEntity
.
getId
()+
""
;
FileOutputStream
fout
=
null
;
try
{
try
{
FileOutputStream
fos
=
new
FileOutputStream
(
"D:\\XML\\"
+
simpleDateFormat
.
format
(
new
Date
())+
"-"
+
files_seq
+
".xml"
);
FileOutputStream
fos
=
new
FileOutputStream
(
"D:\\XML\\"
+
simpleDateFormat
.
format
(
new
Date
())+
"-"
+
files_seq
+
".xml"
);
OutputStreamWriter
osw
=
new
OutputStreamWriter
(
fos
,
"UTF-8"
);
OutputStreamWriter
osw
=
new
OutputStreamWriter
(
fos
,
"UTF-8"
);
...
...
src/main/java/com/yxproject/start/mapper/DetailReceiptListMapper.java
View file @
65296059
package
com
.
yxproject
.
start
.
mapper
;
package
com
.
yxproject
.
start
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @auther zhangyusheng
* @auther zhangyusheng
...
@@ -8,4 +12,17 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -8,4 +12,17 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
DetailReceiptListMapper
{
public
interface
DetailReceiptListMapper
{
/**
* 查询导出制证数据
* @param date
* @return
*/
@Select
(
"select DETAIL_RECEIPT_LIST.id,DETAIL_RECEIPT_LIST.ACCEPT_NO,DETAIL_RECEIPT_LIST.NAME,DETAIL_RECEIPT_LIST.UPLOAD_NO,\n"
+
"DETAIL_RECEIPT_LIST.sex,DETAIL_RECEIPT_LIST.CARD_ID,DETAIL_RECEIPT_LIST.POLICE_CODE,\n"
+
"to_char(RECEIPT_LIST.CHECK_DATE,'yyyyMMdd'),RECEIPT_LIST.CHECK_NAME,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.OLD_CARD_TYPE_ID,PERSON_POST.WAYBILL_NUMBER\n"
+
"from DETAIL_RECEIPT_LIST left join RECEIPT_LIST on DETAIL_RECEIPT_LIST.RECEIPT_ID = RECEIPT_LIST.ID\n"
+
"left join PERSON_POST on PERSON_POST.FIRST_WHITE = DETAIL_RECEIPT_LIST.UPLOAD_NO\n"
+
"where to_char(RECEIPT_LIST.CHECK_DATE,'yyyyMMdd') =#{date}"
)
public
List
<
Map
<
String
,
Object
>>
selectPostDetails
(
String
date
);
}
}
src/main/java/com/yxproject/start/service/DetailReceiptListService.java
View file @
65296059
package
com
.
yxproject
.
start
.
service
;
package
com
.
yxproject
.
start
.
service
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @auther zhangyusheng
* @auther zhangyusheng
* 2019/3/9 14:55
* 2019/3/9 14:55
*/
*/
public
interface
DetailReceiptListService
{
public
interface
DetailReceiptListService
{
public
List
<
Map
<
String
,
Object
>>
selectPostDetails
(
String
date
);
}
}
src/main/java/com/yxproject/start/service/impl/DetailReceiptListServiceImpl.java
View file @
65296059
package
com
.
yxproject
.
start
.
service
.
impl
;
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.mapper.DetailReceiptListMapper
;
import
com.yxproject.start.service.DetailReceiptListService
;
import
com.yxproject.start.service.DetailReceiptListService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @auther zhangyusheng
* @auther zhangyusheng
* 2019/3/9 14:55
* 2019/3/9 14:55
*/
*/
@Service
@Service
public
class
DetailReceiptListServiceImpl
implements
DetailReceiptListService
{
public
class
DetailReceiptListServiceImpl
implements
DetailReceiptListService
{
@Autowired
private
DetailReceiptListMapper
detailReceiptListMapper
;
@Override
public
List
<
Map
<
String
,
Object
>>
selectPostDetails
(
String
date
)
{
return
detailReceiptListMapper
.
selectPostDetails
(
date
);
}
}
}
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