Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
api
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
首航-临时账号
api
Commits
808489c4
Commit
808489c4
authored
Mar 15, 2018
by
java-李谡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
航线论证excel导出
parent
0a6f66e8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
14 deletions
+23
-14
VerifyConditionDao.xml
resources/mapper/modules/verify/VerifyConditionDao.xml
+4
-1
ExportExcel.java
src/com/ejweb/core/utils/excel/ExportExcel.java
+13
-9
AirlineVerifyController.java
src/com/ejweb/modules/verify/api/AirlineVerifyController.java
+0
-0
VerifyConditionDao.java
src/com/ejweb/modules/verify/dao/VerifyConditionDao.java
+2
-0
AirlineVerifyService.java
src/com/ejweb/modules/verify/service/AirlineVerifyService.java
+4
-4
No files found.
resources/mapper/modules/verify/VerifyConditionDao.xml
View file @
808489c4
...
@@ -193,6 +193,8 @@
...
@@ -193,6 +193,8 @@
where id = #{id,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</update>
<delete
id=
"deleteConditionByVerifyId"
>
delete from foc_verify_condition where verif_id=#{verifyId}
</delete>
</mapper>
</mapper>
\ No newline at end of file
src/com/ejweb/core/utils/excel/ExportExcel.java
View file @
808489c4
...
@@ -231,15 +231,15 @@ public class ExportExcel {
...
@@ -231,15 +231,15 @@ public class ExportExcel {
* @param title 表格标题,传“空值”,表示无标题
* @param title 表格标题,传“空值”,表示无标题
* @param headerList 表头列表
* @param headerList 表头列表
*/
*/
public
void
initialize
(
String
title
,
List
<
String
>
headerList
,
int
col
num
)
{
public
void
initialize
(
String
title
,
List
<
String
>
headerList
,
int
col
umn
)
{
rownum
=
0
;
rownum
=
0
;
if
(
StringUtils
.
isNotBlank
(
title
)){
if
(
StringUtils
.
isNotBlank
(
title
)){
Row
titleRow
=
getRow
(
rownum
++);
Row
titleRow
=
getRow
(
rownum
++);
Cell
titleCell
=
titleRow
.
createCell
(
col
num
);
Cell
titleCell
=
titleRow
.
createCell
(
col
umn
);
titleCell
.
setCellStyle
(
styles
.
get
(
"title"
));
titleCell
.
setCellStyle
(
styles
.
get
(
"title"
));
titleCell
.
setCellValue
(
title
);
titleCell
.
setCellValue
(
title
);
sheet
.
addMergedRegion
(
new
CellRangeAddress
(
titleRow
.
getRowNum
(),
sheet
.
addMergedRegion
(
new
CellRangeAddress
(
titleRow
.
getRowNum
(),
titleRow
.
getRowNum
(),
col
num
,
colnum
+
headerList
.
size
()-
1
));
titleRow
.
getRowNum
(),
col
umn
,
column
+
headerList
.
size
()-
1
));
}
}
// Create header
// Create header
if
(
headerList
==
null
){
if
(
headerList
==
null
){
...
@@ -247,7 +247,7 @@ public class ExportExcel {
...
@@ -247,7 +247,7 @@ public class ExportExcel {
}
}
Row
headerRow
=
getRow
(
rownum
++);
Row
headerRow
=
getRow
(
rownum
++);
for
(
int
i
=
0
;
i
<
headerList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
headerList
.
size
();
i
++)
{
Cell
cell
=
headerRow
.
createCell
(
i
+
col
num
);
Cell
cell
=
headerRow
.
createCell
(
i
+
col
umn
);
cell
.
setCellStyle
(
styles
.
get
(
"header"
));
cell
.
setCellStyle
(
styles
.
get
(
"header"
));
String
[]
ss
=
StringUtils
.
split
(
headerList
.
get
(
i
),
"**"
,
2
);
String
[]
ss
=
StringUtils
.
split
(
headerList
.
get
(
i
),
"**"
,
2
);
if
(
ss
.
length
==
2
){
if
(
ss
.
length
==
2
){
...
@@ -262,8 +262,8 @@ public class ExportExcel {
...
@@ -262,8 +262,8 @@ public class ExportExcel {
// sheet.autoSizeColumn(i);
// sheet.autoSizeColumn(i);
}
}
for
(
int
i
=
0
;
i
<
headerList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
headerList
.
size
();
i
++)
{
int
colWidth
=
(
int
)
(
sheet
.
getColumnWidth
(
i
+
col
num
)*
1.2
);
int
colWidth
=
(
int
)
(
sheet
.
getColumnWidth
(
i
+
col
umn
)*
1.2
);
sheet
.
setColumnWidth
(
i
+
col
num
,
colWidth
<
3000
?
3000
:
colWidth
);
sheet
.
setColumnWidth
(
i
+
col
umn
,
colWidth
<
3000
?
3000
:
colWidth
);
}
}
log
.
debug
(
"Initialize success."
);
log
.
debug
(
"Initialize success."
);
}
}
...
@@ -515,7 +515,7 @@ public class ExportExcel {
...
@@ -515,7 +515,7 @@ public class ExportExcel {
/**
/**
* 输出到文件
* 输出到文件
* @param
fileN
ame 输出文件名
* @param
n
ame 输出文件名
*/
*/
public
ExportExcel
writeFile
(
String
name
)
throws
FileNotFoundException
,
IOException
{
public
ExportExcel
writeFile
(
String
name
)
throws
FileNotFoundException
,
IOException
{
FileOutputStream
os
=
new
FileOutputStream
(
name
);
FileOutputStream
os
=
new
FileOutputStream
(
name
);
...
@@ -530,8 +530,12 @@ public class ExportExcel {
...
@@ -530,8 +530,12 @@ public class ExportExcel {
wb
.
dispose
();
wb
.
dispose
();
return
this
;
return
this
;
}
}
// /**
public
List
<
Object
[]>
getAnnotationList
()
{
return
annotationList
;
}
// /**
// * 导出测试
// * 导出测试
// */
// */
// public static void main(String[] args) throws Throwable {
// public static void main(String[] args) throws Throwable {
...
...
src/com/ejweb/modules/verify/api/AirlineVerifyController.java
View file @
808489c4
This diff is collapsed.
Click to expand it.
src/com/ejweb/modules/verify/dao/VerifyConditionDao.java
View file @
808489c4
...
@@ -15,6 +15,8 @@ public interface VerifyConditionDao extends BaseDao {
...
@@ -15,6 +15,8 @@ public interface VerifyConditionDao extends BaseDao {
int
updateByPrimaryKeySelective
(
FullVerifyConditionEntity
record
);
int
updateByPrimaryKeySelective
(
FullVerifyConditionEntity
record
);
int
updateByPrimaryKey
(
FullVerifyConditionEntity
record
);
int
updateByPrimaryKey
(
FullVerifyConditionEntity
record
);
void
deleteConditionByVerifyId
(
String
verifyId
);
List
<
FullVerifyConditionEntity
>
fullList
(
FullVerifyConditionBean
bean
);
List
<
FullVerifyConditionEntity
>
fullList
(
FullVerifyConditionBean
bean
);
}
}
src/com/ejweb/modules/verify/service/AirlineVerifyService.java
View file @
808489c4
...
@@ -14,6 +14,7 @@ import java.util.Map;
...
@@ -14,6 +14,7 @@ import java.util.Map;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
com.ejweb.modules.verify.dao.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -45,10 +46,6 @@ import com.ejweb.modules.verify.bean.AirlineVerifyDetailBean;
...
@@ -45,10 +46,6 @@ import com.ejweb.modules.verify.bean.AirlineVerifyDetailBean;
import
com.ejweb.modules.verify.bean.AirlineVerifyUpdateStatusBean
;
import
com.ejweb.modules.verify.bean.AirlineVerifyUpdateStatusBean
;
import
com.ejweb.modules.verify.bean.RecordAddBean
;
import
com.ejweb.modules.verify.bean.RecordAddBean
;
import
com.ejweb.modules.verify.bean.VerifyFormBean
;
import
com.ejweb.modules.verify.bean.VerifyFormBean
;
import
com.ejweb.modules.verify.dao.AirlineConclusionDao
;
import
com.ejweb.modules.verify.dao.AirlineVerifiedDao
;
import
com.ejweb.modules.verify.dao.AirlineVerifyDao
;
import
com.ejweb.modules.verify.dao.RecordDao
;
import
com.ejweb.modules.verify.entity.AirlineVerifyDetailEntity
;
import
com.ejweb.modules.verify.entity.AirlineVerifyDetailEntity
;
import
com.ejweb.modules.verify.entity.AirlineVerifyEntity
;
import
com.ejweb.modules.verify.entity.AirlineVerifyEntity
;
import
com.ejweb.modules.verify.entity.ConnectionPlan
;
import
com.ejweb.modules.verify.entity.ConnectionPlan
;
...
@@ -86,6 +83,8 @@ public class AirlineVerifyService extends BaseService<AirlineVerifyDao>{
...
@@ -86,6 +83,8 @@ public class AirlineVerifyService extends BaseService<AirlineVerifyDao>{
AirlineVerifiedDao
verifiedDao
;
AirlineVerifiedDao
verifiedDao
;
@Autowired
@Autowired
AssessmentDao
riskDao
;
AssessmentDao
riskDao
;
@Autowired
VerifyConditionDao
verifyConditionDao
;
public
PageEntity
<
AirlineVerifyEntity
>
getAirlineVerifyList
(
AirlineVerifyBean
bean
)
{
public
PageEntity
<
AirlineVerifyEntity
>
getAirlineVerifyList
(
AirlineVerifyBean
bean
)
{
PageInfo
<
AirlineVerifyEntity
>
pageInfo
=
null
;
PageInfo
<
AirlineVerifyEntity
>
pageInfo
=
null
;
// 必须紧贴dao的查询方法
// 必须紧贴dao的查询方法
...
@@ -450,6 +449,7 @@ public List<com.ejweb.modules.route.entity.AirlineVerifyEntity> getRiskAssessmen
...
@@ -450,6 +449,7 @@ public List<com.ejweb.modules.route.entity.AirlineVerifyEntity> getRiskAssessmen
dao
.
updateByStatus
(
bean
);
dao
.
updateByStatus
(
bean
);
if
(
"00"
.
equals
(
bean
.
getVerifStatus
())){
if
(
"00"
.
equals
(
bean
.
getVerifStatus
())){
verifiedDao
.
updateStatus
(
bean
);
//将
verifiedDao
.
updateStatus
(
bean
);
//将
verifyConditionDao
.
deleteConditionByVerifyId
(
bean
.
getVerifId
());
routeDao
.
deleteRouteByVerifId
(
bean
);
//删除各部门论证
routeDao
.
deleteRouteByVerifId
(
bean
);
//删除各部门论证
}
}
// 论证终止时,将所有涉及到的系统消息置灰
// 论证终止时,将所有涉及到的系统消息置灰
...
...
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