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
50566cf9
Commit
50566cf9
authored
Jul 21, 2020
by
liuxinben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除有关CLOB表的操作,
交接单详单下载增加交接单页
parent
29c9fbad
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
4 deletions
+79
-4
ExportExcelApi.java
src/main/java/com/yxproject/start/api/ExportExcelApi.java
+2
-1
DetailReceiptListMapper.java
...a/com/yxproject/start/mapper/DetailReceiptListMapper.java
+11
-0
DetailReceiptListService.java
...com/yxproject/start/service/DetailReceiptListService.java
+2
-0
DetailReceiptListServiceImpl.java
...ject/start/service/impl/DetailReceiptListServiceImpl.java
+13
-0
ImportXmlServiceImpl.java
...om/yxproject/start/service/impl/ImportXmlServiceImpl.java
+1
-1
LogServiceImpl.java
...java/com/yxproject/start/service/impl/LogServiceImpl.java
+1
-1
ExportExcel.java
src/main/java/com/yxproject/start/utils/ExportExcel.java
+49
-1
No files found.
src/main/java/com/yxproject/start/api/ExportExcelApi.java
View file @
50566cf9
...
...
@@ -48,11 +48,12 @@ public class ExportExcelApi {
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
jsonObject
.
get
(
"list"
));
String
isHistory
=
jsonObject
.
get
(
"isHistory"
).
toString
();
String
name
=
jsonObject
.
get
(
"name"
).
toString
();
List
<
Map
<
String
,
Object
>>
list1
=
detailReceiptListService
.
selectPoliceDataById
(
jsonArray
);
List
<
Map
<
String
,
Object
>>
mapList
=
detailReceiptListService
.
selectPostDetails
(
jsonArray
,
name
,
isHistory
);
response
.
setContentType
(
"application/x-download"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
//使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String
fout
=
ExportExcel
.
exportExcelDate
(
mapList
);
String
fout
=
ExportExcel
.
exportExcelDate
(
mapList
,
list1
);
try
{
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
getCurrentDate2String
(
"yyyy-MM-dd"
)
+
"公安网信息表"
+
".xls"
);
return
inputStream2byte
(
fout
);
...
...
src/main/java/com/yxproject/start/mapper/DetailReceiptListMapper.java
View file @
50566cf9
...
...
@@ -40,6 +40,17 @@ public interface DetailReceiptListMapper {
"where RECEIPT_LIST.id in (${str}) "
)
public
boolean
updateReceiptListEntityByCardId
(
@Param
(
"str"
)
String
str
,
@Param
(
"name"
)
String
name
);
/**
* 查询交接单
* @return
*/
@Select
(
"select QR_CODE,to_char(receipt_date,'yyyyMMddHH24') receipt_date ,\n"
+
"POLICE_CODE,FINISH_COUNT,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,CARD_TYPE_DIC.CARD_TYPE\n"
+
"from RECEIPT_LIST \n"
+
"left join PROD_DBA.DIC_UPLOAD_UNIT_T@PROD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = RECEIPT_LIST.POLICE_CODE\n"
+
"left join CARD_TYPE_DIC on RECEIPT_LIST.CARD_TYPE_ID = CARD_TYPE_DIC.CARD_TYPE_ID\n"
+
"where DOWNLOAD_DATE is null and RECEIPT_LIST.id in (${str}) order by receipt_date"
)
public
List
<
Map
<
String
,
Object
>>
selectPoliceDataById
(
@Param
(
"str"
)
String
str
);
/**
* 查询详单信息
...
...
src/main/java/com/yxproject/start/service/DetailReceiptListService.java
View file @
50566cf9
...
...
@@ -10,6 +10,8 @@ import java.util.Map;
* 2019/3/9 14:55
*/
public
interface
DetailReceiptListService
{
public
List
<
Map
<
String
,
Object
>>
selectPoliceDataById
(
List
<
Integer
>
stringList
);
public
List
<
Map
<
String
,
Object
>>
selectPostDetails
(
List
<
Integer
>
stringList
,
String
name
,
String
isHistory
);
public
List
<
DetailReceiptListEntity
>
selectDetailReceiptListEntityByCardId
(
String
cardID
);
...
...
src/main/java/com/yxproject/start/service/impl/DetailReceiptListServiceImpl.java
View file @
50566cf9
...
...
@@ -18,6 +18,19 @@ public class DetailReceiptListServiceImpl implements DetailReceiptListService {
@Autowired
private
DetailReceiptListMapper
detailReceiptListMapper
;
@Override
public
List
<
Map
<
String
,
Object
>>
selectPoliceDataById
(
List
<
Integer
>
stringList
)
{
String
str
=
""
;
for
(
int
i
=
0
;
i
<
stringList
.
size
();
i
++){
if
(
i
==
stringList
.
size
()-
1
){
str
+=
stringList
.
get
(
i
);
}
else
{
str
+=
stringList
.
get
(
i
)+
","
;
}
}
return
detailReceiptListMapper
.
selectPoliceDataById
(
str
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
selectPostDetails
(
List
<
Integer
>
stringList
,
String
name
,
String
isHistory
)
{
String
str
=
""
;
...
...
src/main/java/com/yxproject/start/service/impl/ImportXmlServiceImpl.java
View file @
50566cf9
...
...
@@ -82,7 +82,7 @@ public class ImportXmlServiceImpl implements ImportXmlService {
}
preproPersonDto
.
setTpPath
(
url
);
preproPersonMapper
.
savePreproPersonEntity
(
preproPersonDto
);
preproPersonMapper
.
savePreproPersonCLOB
(
preproPersonDto
);
//
preproPersonMapper.savePreproPersonCLOB(preproPersonDto);
}
return
true
;
}
...
...
src/main/java/com/yxproject/start/service/impl/LogServiceImpl.java
View file @
50566cf9
...
...
@@ -85,7 +85,7 @@ public class LogServiceImpl implements LogService {
File
file
=
new
File
(
preproPerson
.
getTpPath
());
file
.
delete
();
}
logMapper
.
deleteFilesDataCLOB
(
id
);
//
logMapper.deleteFilesDataCLOB(id);
logMapper
.
deleteFilesData
(
id
);
return
true
;
}
...
...
src/main/java/com/yxproject/start/utils/ExportExcel.java
View file @
50566cf9
...
...
@@ -21,7 +21,7 @@ public class ExportExcel {
* @param mapList 公安网信息
* @return
*/
public
static
String
exportExcelDate
(
List
<
Map
<
String
,
Object
>>
mapList
){
public
static
String
exportExcelDate
(
List
<
Map
<
String
,
Object
>>
mapList
,
List
<
Map
<
String
,
Object
>>
list
){
//第一步创建workbook
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
@@ -108,6 +108,54 @@ public class ExportExcel {
cell
=
row
.
createCell
(
13
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"NOTE"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"NOTE"
)+
""
);
}
HSSFSheet
sheet1
=
wb
.
createSheet
(
"公安网信息交接表"
);
sheet1
.
setColumnWidth
(
0
,
30
*
110
);
sheet1
.
setColumnWidth
(
1
,
30
*
110
);
sheet1
.
setColumnWidth
(
2
,
30
*
110
);
sheet1
.
setColumnWidth
(
3
,
30
*
110
);
sheet1
.
setColumnWidth
(
4
,
30
*
110
);
sheet1
.
setColumnWidth
(
5
,
30
*
110
);
//第三步创建行row:添加表头0行
HSSFRow
row1
=
sheet1
.
createRow
(
0
);
HSSFCellStyle
style1
=
wb
.
createCellStyle
();
//样式
style1
.
setWrapText
(
true
);
//设置自动换行
HSSFFont
font1
=
wb
.
createFont
();
font1
.
setFontHeightInPoints
((
short
)
12
);
style1
.
setFont
(
font1
);
row1
=
sheet1
.
createRow
(
0
);
//创建下标为0的单元格
row1
.
setHeightInPoints
(
Short
.
parseShort
(
"20"
));
//设置行高
HSSFCell
cell1
=
row1
.
createCell
(
0
);
//设定值
cell1
.
setCellValue
(
"封签编号"
);
cell1
=
row1
.
createCell
(
1
);
//设定值
cell1
.
setCellValue
(
"上传单位代码"
);
cell1
=
row1
.
createCell
(
2
);
//设定值
cell1
.
setCellValue
(
"上传单位名称"
);
cell1
=
row1
.
createCell
(
3
);
//设定值
cell1
.
setCellValue
(
"数量"
);
cell1
=
row1
.
createCell
(
4
);
//设定值
cell1
.
setCellValue
(
"制证类型"
);
cell1
=
row1
.
createCell
(
5
);
//设定值
cell1
.
setCellValue
(
"交接日期"
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
row1
=
sheet1
.
createRow
(
i
+
1
);
cell1
=
row1
.
createCell
(
0
);
//设定值
cell1
.
setCellValue
(
"null"
.
equals
(
list
.
get
(
i
).
get
(
"QR_CODE"
)
+
""
)
?
""
:
list
.
get
(
i
).
get
(
"QR_CODE"
)
+
""
);
cell1
=
row1
.
createCell
(
1
);
//设定值
cell1
.
setCellValue
(
"null"
.
equals
(
list
.
get
(
i
).
get
(
"POLICE_CODE"
)
+
""
)
?
""
:
list
.
get
(
i
).
get
(
"POLICE_CODE"
)
+
""
);
cell1
=
row1
.
createCell
(
2
);
//设定值
cell1
.
setCellValue
(
"null"
.
equals
(
list
.
get
(
i
).
get
(
"GAJG_MC"
)
+
""
)
?
""
:
list
.
get
(
i
).
get
(
"GAJG_MC"
)
+
""
);
cell1
=
row1
.
createCell
(
3
);
//设定值
cell1
.
setCellValue
(
"null"
.
equals
(
list
.
get
(
i
).
get
(
"FINISH_COUNT"
)
+
""
)
?
""
:
list
.
get
(
i
).
get
(
"FINISH_COUNT"
)
+
""
);
cell1
=
row1
.
createCell
(
4
);
//设定值
cell1
.
setCellValue
(
"null"
.
equals
(
list
.
get
(
i
).
get
(
"CARD_TYPE"
)
+
""
)
?
""
:
list
.
get
(
i
).
get
(
"CARD_TYPE"
)
+
""
);
cell1
=
row1
.
createCell
(
5
);
//设定值
cell1
.
setCellValue
(
"null"
.
equals
(
list
.
get
(
i
).
get
(
"RECEIPT_DATE"
)
+
""
)
?
""
:
list
.
get
(
i
).
get
(
"RECEIPT_DATE"
)
+
""
);
}
//第六步将生成excel文件保存到指定路径下
FileOutputStream
fout
=
null
;
try
{
...
...
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