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
3250c9ae
Commit
3250c9ae
authored
May 07, 2018
by
java-李谡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改航线论证列表展示,修改手机号码归属地查询服务
parent
b3b9aa50
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
87 deletions
+85
-87
ChangeDao.xml
resources/mapper/modules/change/ChangeDao.xml
+2
-1
AirlineVerifyDao.xml
resources/mapper/modules/verify/AirlineVerifyDao.xml
+3
-4
ImportExcel.java
src/com/ejweb/core/utils/excel/ImportExcel.java
+62
-66
PhoneAreaUtil.java
src/com/ejweb/modules/call/util/PhoneAreaUtil.java
+13
-13
AirlineVerifyService.java
src/com/ejweb/modules/verify/service/AirlineVerifyService.java
+5
-3
No files found.
resources/mapper/modules/change/ChangeDao.xml
View file @
3250c9ae
...
...
@@ -77,7 +77,7 @@
LEFT JOIN foc_airline_verified s ON a.id = s.verif_id
LEFT JOIN foc_verify_change t ON a.id = t.verif_id
AND t.field_value = 'startTime'
AND t.del_flag = '
2
'
AND t.del_flag = '
0
'
WHERE a.id = #{verifId}
</select>
</mapper>
\ No newline at end of file
resources/mapper/modules/verify/AirlineVerifyDao.xml
View file @
3250c9ae
...
...
@@ -28,15 +28,14 @@
<select
id=
"getList"
resultType=
"com.ejweb.modules.verify.entity.AirlineVerifyEntity"
>
SELECT
<include
refid=
"airlineVerifyColumns"
/>
,p.
node_dat
e
,p.
end_tim
e
FROM
foc_airline_verify a
LEFT JOIN foc_aircraft_type t ON a.aircraft_type = t.id
LEFT JOIN foc_airports d ON d.airport_iata = a.depIata
LEFT JOIN foc_airports r ON r.airport_iata = a.arrIata
LEFT JOIN foc_verify_process p ON p.verif_id = a.id
WHERE p.node_name='截止反馈时间'
and a.del_flag = #{DEL_FLAG_NORMAL}
LEFT JOIN foc_airline_verified p ON p.verif_id = a.id
WHERE a.del_flag = #{DEL_FLAG_NORMAL}
<if
test=
"depIata != null and depIata != ''"
>
AND (a.id in (
...
...
src/com/ejweb/core/utils/excel/ImportExcel.java
View file @
3250c9ae
...
...
@@ -9,12 +9,16 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFCell
;
import
org.apache.poi.hssf.usermodel.HSSFDataFormat
;
import
org.apache.poi.hssf.usermodel.HSSFDateUtil
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.usermodel.Cell
;
...
...
@@ -32,7 +36,7 @@ import com.google.common.collect.Lists;
/**
* 导入Excel文件(支持“XLS”和“XLSX”格式)
*
*
* @author ThinkGem
* @version 2013-03-10
*/
...
...
@@ -57,11 +61,9 @@ public class ImportExcel {
/**
* 构造函数
*
* @param path
* 导入文件,读取第一个工作表
* @param headerNum
* 标题行号,数据行号=标题行号+1
*
* @param path 导入文件,读取第一个工作表
* @param headerNum 标题行号,数据行号=标题行号+1
* @throws InvalidFormatException
* @throws IOException
*/
...
...
@@ -71,11 +73,9 @@ public class ImportExcel {
/**
* 构造函数
*
* @param path
* 导入文件对象,读取第一个工作表
* @param headerNum
* 标题行号,数据行号=标题行号+1
*
* @param path 导入文件对象,读取第一个工作表
* @param headerNum 标题行号,数据行号=标题行号+1
* @throws InvalidFormatException
* @throws IOException
*/
...
...
@@ -85,13 +85,10 @@ public class ImportExcel {
/**
* 构造函数
*
* @param path
* 导入文件
* @param headerNum
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
*
* @param path 导入文件
* @param headerNum 标题行号,数据行号=标题行号+1
* @param sheetIndex 工作表编号
* @throws InvalidFormatException
* @throws IOException
*/
...
...
@@ -101,13 +98,10 @@ public class ImportExcel {
/**
* 构造函数
*
* @param path
* 导入文件对象
* @param headerNum
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
*
* @param path 导入文件对象
* @param headerNum 标题行号,数据行号=标题行号+1
* @param sheetIndex 工作表编号
* @throws InvalidFormatException
* @throws IOException
*/
...
...
@@ -117,13 +111,10 @@ public class ImportExcel {
/**
* 构造函数
*
* @param file
* 导入文件对象
* @param headerNum
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
*
* @param file 导入文件对象
* @param headerNum 标题行号,数据行号=标题行号+1
* @param sheetIndex 工作表编号
* @throws InvalidFormatException
* @throws IOException
*/
...
...
@@ -134,13 +125,10 @@ public class ImportExcel {
/**
* 构造函数
*
* @param path
* 导入文件对象
* @param headerNum
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
*
* @param path 导入文件对象
* @param headerNum 标题行号,数据行号=标题行号+1
* @param sheetIndex 工作表编号
* @throws InvalidFormatException
* @throws IOException
*/
...
...
@@ -165,7 +153,7 @@ public class ImportExcel {
/**
* 获取行对象
*
*
* @param rownum
* @return
*/
...
...
@@ -175,7 +163,7 @@ public class ImportExcel {
/**
* 获取数据行号
*
*
* @return
*/
public
int
getDataRowNum
()
{
...
...
@@ -184,7 +172,7 @@ public class ImportExcel {
/**
* 获取最后一个数据行号
*
*
* @return
*/
public
int
getLastDataRowNum
()
{
...
...
@@ -193,7 +181,7 @@ public class ImportExcel {
/**
* 获取最后一个列号
*
*
* @return
*/
public
int
getLastCellNum
()
{
...
...
@@ -202,11 +190,9 @@ public class ImportExcel {
/**
* 获取单元格值
*
* @param row
* 获取的行
* @param column
* 获取单元格列号
*
* @param row 获取的行
* @param column 获取单元格列号
* @return 单元格值
*/
public
Object
getCellValue
(
Row
row
,
int
column
)
{
...
...
@@ -215,16 +201,26 @@ public class ImportExcel {
Cell
cell
=
row
.
getCell
(
column
);
if
(
cell
!=
null
)
{
if
(
cell
.
getCellType
()
==
Cell
.
CELL_TYPE_NUMERIC
)
{
val
=
cell
.
getNumericCellValue
();
// 处理日期格式、时间格式
if
(
HSSFDateUtil
.
isCellDateFormatted
(
cell
))
{
SimpleDateFormat
sdf
=
null
;
if
(
cell
.
getCellStyle
().
getDataFormat
()
==
HSSFDataFormat
.
getBuiltinFormat
(
"h:mm"
))
{
sdf
=
new
SimpleDateFormat
(
"HH:mm"
);
}
Date
date
=
cell
.
getDateCellValue
();
val
=
sdf
.
format
(
date
);
}
else
{
val
=
cell
.
getNumericCellValue
();
}
}
else
if
(
cell
.
getCellType
()
==
Cell
.
CELL_TYPE_STRING
)
{
val
=
cell
.
getStringCellValue
();
}
else
if
(
cell
.
getCellType
()
==
Cell
.
CELL_TYPE_FORMULA
)
{
// val = cell.getCellFormula();
try
{
val
=
String
.
valueOf
(
cell
.
getStringCellValue
());
}
catch
(
IllegalStateException
e
)
{
val
=
String
.
valueOf
(
cell
.
getNumericCellValue
());
}
try
{
val
=
String
.
valueOf
(
cell
.
getStringCellValue
());
}
catch
(
IllegalStateException
e
)
{
val
=
String
.
valueOf
(
cell
.
getNumericCellValue
());
}
}
else
if
(
cell
.
getCellType
()
==
Cell
.
CELL_TYPE_BOOLEAN
)
{
val
=
cell
.
getBooleanCellValue
();
}
else
if
(
cell
.
getCellType
()
==
Cell
.
CELL_TYPE_ERROR
)
{
...
...
@@ -239,11 +235,9 @@ public class ImportExcel {
/**
* 获取导入数据列表
*
* @param cls
* 导入对象类型
* @param groups
* 导入分组
*
* @param cls 导入对象类型
* @param groups 导入分组
*/
public
<
E
>
List
<
E
>
getDataList
(
Class
<
E
>
cls
,
int
...
groups
)
throws
InstantiationException
,
IllegalAccessException
{
List
<
Object
[]>
annotationList
=
Lists
.
newArrayList
();
...
...
@@ -261,13 +255,13 @@ public class ImportExcel {
for
(
int
efg
:
ef
.
groups
())
{
if
(
g
==
efg
)
{
inGroup
=
true
;
annotationList
.
add
(
new
Object
[]
{
ef
,
f
});
annotationList
.
add
(
new
Object
[]
{
ef
,
f
});
break
;
}
}
}
}
else
{
annotationList
.
add
(
new
Object
[]
{
ef
,
f
});
annotationList
.
add
(
new
Object
[]
{
ef
,
f
});
}
}
}
...
...
@@ -285,13 +279,13 @@ public class ImportExcel {
for
(
int
efg
:
ef
.
groups
())
{
if
(
g
==
efg
)
{
inGroup
=
true
;
annotationList
.
add
(
new
Object
[]
{
ef
,
m
});
annotationList
.
add
(
new
Object
[]
{
ef
,
m
});
break
;
}
}
}
}
else
{
annotationList
.
add
(
new
Object
[]
{
ef
,
m
});
annotationList
.
add
(
new
Object
[]
{
ef
,
m
});
}
}
}
...
...
@@ -299,7 +293,9 @@ public class ImportExcel {
Collections
.
sort
(
annotationList
,
new
Comparator
<
Object
[]>()
{
public
int
compare
(
Object
[]
o1
,
Object
[]
o2
)
{
return
new
Integer
(((
ExcelField
)
o1
[
0
]).
sort
()).
compareTo
(
new
Integer
(((
ExcelField
)
o2
[
0
]).
sort
()));
};
}
;
});
// log.debug("Import column count:"+annotationList.size());
// Get excel data
...
...
@@ -373,7 +369,7 @@ public class ImportExcel {
if
(
"get"
.
equals
(
mthodName
.
substring
(
0
,
3
)))
{
mthodName
=
"set"
+
StringUtils
.
substringAfter
(
mthodName
,
"get"
);
}
Reflections
.
invokeMethod
(
e
,
mthodName
,
new
Class
[]
{
valType
},
new
Object
[]
{
val
});
Reflections
.
invokeMethod
(
e
,
mthodName
,
new
Class
[]
{
valType
},
new
Object
[]{
val
});
}
}
sb
.
append
(
val
+
", "
);
...
...
src/com/ejweb/modules/call/util/PhoneAreaUtil.java
View file @
3250c9ae
...
...
@@ -13,7 +13,7 @@ import com.ejweb.core.fetcher.FetchEntity;
import
com.ejweb.core.fetcher.HCFetcher
;
/**
*
*
* @team IT Team
* @author renmb
* @version 1.0
...
...
@@ -23,7 +23,7 @@ public class PhoneAreaUtil {
/**
* 360安全卫士提供的手机号归属地查询接口
*
*
* @author renmb
* @time 2016年10月30日
* @param phone
...
...
@@ -34,20 +34,20 @@ public class PhoneAreaUtil {
if
(
StringUtils
.
isBlank
(
mobile
))
return
null
;
HCFetcher
fetcher
=
HCFetcher
.
getInstance
();
FetchEntity
entity
=
fetcher
.
get
(
GConstants
.
getValue
(
"cx.shouji.360.cn"
,
"http
s
://cx.shouji.360.cn/phonearea.php"
)+
"?number="
+
mobile
);
FetchEntity
entity
=
fetcher
.
get
(
GConstants
.
getValue
(
"cx.shouji.360.cn"
,
"http://cx.shouji.360.cn/phonearea.php"
)+
"?number="
+
mobile
);
if
(
entity
!=
null
&&
entity
.
isSuccess
()){
String
txt
=
entity
.
getContent
(
"UTF-8"
);
JSONObject
object
=
JSON
.
parseObject
(
txt
);
JSONObject
data
=
object
.
getJSONObject
(
"data"
);
if
(
StringUtils
.
isNotBlank
(
data
.
getString
(
"province"
))){
PhoneAreaEntity
area
=
new
PhoneAreaEntity
();
area
.
setProvince
(
data
.
getString
(
"province"
));
area
.
setCity
(
data
.
getString
(
"city"
));
area
.
setSp
(
data
.
getString
(
"sp"
));
return
area
;
}
}
...
...
@@ -56,12 +56,12 @@ public class PhoneAreaUtil {
}
return
null
;
}
/**
* 百度号码认证平台提供
*
*
* http://haoma.baidu.com/
*
*
* @author renmb
* @time 2017年3月3日
* @param mobile
...
...
@@ -74,7 +74,7 @@ public class PhoneAreaUtil {
HCFetcher
fetcher
=
HCFetcher
.
getInstance
();
FetchEntity
entity
=
fetcher
.
get
(
GConstants
.
getValue
(
"sp0.baidu.com"
,
"https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv"
)+
"/api.php?query="
+
mobile
+
"&co=&resource_id=6004&t="
+
System
.
currentTimeMillis
()+
"&ie=utf8&oe=gbk&cb=&format=json&tn=baidu&cb=&_="
+
System
.
currentTimeMillis
());
if
(
entity
!=
null
&&
entity
.
isSuccess
()){
String
txt
=
entity
.
getContent
(
"gbk"
);
// if(GConstants.DEBUG){
//
...
...
@@ -86,12 +86,12 @@ public class PhoneAreaUtil {
if
(
data
!=
null
&&
data
.
size
()>
0
){
JSONObject
row
=
data
.
getJSONObject
(
0
);
if
(
StringUtils
.
isNotEmpty
(
row
.
getString
(
"prov"
))){
PhoneAreaEntity
area
=
new
PhoneAreaEntity
();
area
.
setProvince
(
row
.
getString
(
"prov"
));
area
.
setCity
(
row
.
getString
(
"city"
));
area
.
setSp
(
row
.
getString
(
"type"
));
return
area
;
}
}
...
...
src/com/ejweb/modules/verify/service/AirlineVerifyService.java
View file @
3250c9ae
...
...
@@ -85,6 +85,8 @@ public class AirlineVerifyService extends BaseService<AirlineVerifyDao>{
AssessmentDao
riskDao
;
@Autowired
VerifyConditionDao
verifyConditionDao
;
@Autowired
VerifyProcessDao
processDao
;
public
PageEntity
<
AirlineVerifyEntity
>
getAirlineVerifyList
(
AirlineVerifyBean
bean
)
{
PageInfo
<
AirlineVerifyEntity
>
pageInfo
=
null
;
// 必须紧贴dao的查询方法
...
...
@@ -184,9 +186,9 @@ public List<com.ejweb.modules.route.entity.AirlineVerifyEntity> getRiskAssessmen
List
<
com
.
ejweb
.
modules
.
route
.
entity
.
AirlineVerifyEntity
>
list
=
dao
.
getRiskAssessmentListForExcel
(
bean
);
return
list
;
}
public
List
<
ConnectionPlan
>
planlist
(
String
fileName
,
String
filePath
){
//读取文件
...
...
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