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
ded89915
Commit
ded89915
authored
Feb 05, 2018
by
java-李谡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化(去除无效引用、注释掉的代码),更改航线论证模板,添加测试账号
parent
d3a23d6f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
85 additions
and
205 deletions
+85
-205
jdbc.properties
resources/jdbc.properties
+1
-1
EmailStackTraceHandler.java
src/com/ejweb/core/util/EmailStackTraceHandler.java
+7
-13
CallController.java
src/com/ejweb/modules/call/api/CallController.java
+2
-2
CallService.java
src/com/ejweb/modules/call/service/CallService.java
+53
-75
FlightService.java
src/com/ejweb/modules/flight/service/FlightService.java
+3
-3
FlightPlanService.java
src/com/ejweb/modules/flightPlan/service/FlightPlanService.java
+4
-11
SailingCommandService.java
src/com/ejweb/modules/sailing/service/SailingCommandService.java
+4
-4
FlightDynamicsService.java
src/com/ejweb/modules/statistics/service/FlightDynamicsService.java
+10
-95
UserController.java
src/com/ejweb/modules/user/api/UserController.java
+1
-1
No files found.
resources/jdbc.properties
View file @
ded89915
...
@@ -3,7 +3,7 @@ db.table.prefix=foc_
...
@@ -3,7 +3,7 @@ db.table.prefix=foc_
jdbc.type
=
mysql
jdbc.type
=
mysql
jdbc.driver.class
=
com.mysql.jdbc.Driver
jdbc.driver.class
=
com.mysql.jdbc.Driver
jdbc.url
=
jdbc:mysql://1
23.56.146.7
:3306/jd_foc?useUnicode=true&characterEncoding=utf-8&useSSL=true
jdbc.url
=
jdbc:mysql://1
06.75.97.50
:3306/jd_foc?useUnicode=true&characterEncoding=utf-8&useSSL=true
jdbc.username
=
focuser
jdbc.username
=
focuser
jdbc.password
=
FOC@2016
jdbc.password
=
FOC@2016
...
...
src/com/ejweb/core/util/EmailStackTraceHandler.java
View file @
ded89915
package
com
.
ejweb
.
core
.
util
;
package
com
.
ejweb
.
core
.
util
;
import
java.io.BufferedInputStream
;
import
com.ejweb.core.conf.GConstants
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.mail.DefaultAuthenticator
;
import
org.apache.commons.mail.DefaultAuthenticator
;
import
org.apache.commons.mail.Email
;
import
org.apache.commons.mail.Email
;
...
@@ -27,7 +17,11 @@ import org.xml.sax.EntityResolver;
...
@@ -27,7 +17,11 @@ import org.xml.sax.EntityResolver;
import
org.xml.sax.InputSource
;
import
org.xml.sax.InputSource
;
import
org.xml.sax.SAXException
;
import
org.xml.sax.SAXException
;
import
com.ejweb.core.conf.GConstants
;
import
java.io.*
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
EmailStackTraceHandler
{
public
class
EmailStackTraceHandler
{
private
final
static
Logger
LOG
=
Logger
.
getLogger
(
EmailStackTraceHandler
.
class
);
private
final
static
Logger
LOG
=
Logger
.
getLogger
(
EmailStackTraceHandler
.
class
);
...
@@ -202,7 +196,7 @@ public class EmailStackTraceHandler {
...
@@ -202,7 +196,7 @@ public class EmailStackTraceHandler {
email
.
addCc
(
cemail
);
email
.
addCc
(
cemail
);
}
}
}
}
email
.
addTo
(
emailEntry
.
getTo
());
email
.
addTo
(
emailEntry
.
getTo
()
==
null
?
""
:
emailEntry
.
getTo
()
);
email
.
send
();
email
.
send
();
}
catch
(
EmailException
e
)
{
}
catch
(
EmailException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
src/com/ejweb/modules/call/api/CallController.java
View file @
ded89915
...
@@ -440,7 +440,7 @@ public class CallController {
...
@@ -440,7 +440,7 @@ public class CallController {
callList
.
add
(
call
);
callList
.
add
(
call
);
}
}
Map
<
String
,
String
>
map
=
callService
.
findPhneByHuaweiNum
(
huweiNumList
);
// 通过华为短号查询座机号
Map
<
String
,
String
>
map
=
callService
.
findPh
o
neByHuaweiNum
(
huweiNumList
);
// 通过华为短号查询座机号
for
(
CallListEntity
record:
callList
){
for
(
CallListEntity
record:
callList
){
if
(
map
!=
null
){
if
(
map
!=
null
){
if
(
StringUtils
.
isNotEmpty
(
map
.
get
(
record
.
getPhone
()))){
if
(
StringUtils
.
isNotEmpty
(
map
.
get
(
record
.
getPhone
()))){
...
@@ -546,7 +546,7 @@ public class CallController {
...
@@ -546,7 +546,7 @@ public class CallController {
call
.
setDownloadUrl
(
this
.
formatedDownloadUrl
(
record
.
getDownloadUrl
()));
call
.
setDownloadUrl
(
this
.
formatedDownloadUrl
(
record
.
getDownloadUrl
()));
callList
.
add
(
call
);
callList
.
add
(
call
);
}
}
Map
<
String
,
String
>
map
=
callService
.
findPhneByHuaweiNum
(
huweiNumList
);
// 通过华为短号查询座机号
Map
<
String
,
String
>
map
=
callService
.
findPh
o
neByHuaweiNum
(
huweiNumList
);
// 通过华为短号查询座机号
for
(
CallListEntity
record:
callList
){
for
(
CallListEntity
record:
callList
){
if
(
map
!=
null
&&
if
(
map
!=
null
&&
StringUtils
.
isNotEmpty
(
map
.
get
(
record
.
getPhone
()))){
StringUtils
.
isNotEmpty
(
map
.
get
(
record
.
getPhone
()))){
...
...
src/com/ejweb/modules/call/service/CallService.java
View file @
ded89915
...
@@ -49,8 +49,6 @@ public class CallService extends BaseService<CallDao> {
...
@@ -49,8 +49,6 @@ public class CallService extends BaseService<CallDao> {
*/
*/
public
PageEntity
<
CallRecordListEntity
>
getCallRecordList
(
CallRecordListBean
bean
){
public
PageEntity
<
CallRecordListEntity
>
getCallRecordList
(
CallRecordListBean
bean
){
// return dao.getCallRecordList(bean);
PageInfo
<
CallRecordListEntity
>
pageInfo
=
null
;
PageInfo
<
CallRecordListEntity
>
pageInfo
=
null
;
Date
current
=
new
Date
();
Date
current
=
new
Date
();
Date
startTime
=
DateUtils
.
addDays
(
current
,
-
3
);
Date
startTime
=
DateUtils
.
addDays
(
current
,
-
3
);
...
@@ -70,14 +68,6 @@ public class CallService extends BaseService<CallDao> {
...
@@ -70,14 +68,6 @@ public class CallService extends BaseService<CallDao> {
}
}
//过滤重复记录
//过滤重复记录
List
<
CallRecordListEntity
>
templist
=
new
ArrayList
<
CallRecordListEntity
>();
List
<
CallRecordListEntity
>
templist
=
new
ArrayList
<
CallRecordListEntity
>();
// for (CallRecordListEntity callRecordListEntity : list) {
// if ("FAILD".equals(callRecordListEntity.getEndStatus())) {
// List<CallRecordListEntity> entity = dao.get(callRecordListEntity);
// if(entity.size()>0 && "SUCCESS".equals(entity.get(0).getEndStatus())){
// templist.add(callRecordListEntity);
// }
// }
// }
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
CallRecordListEntity
callRecordListEntity
=
list
.
get
(
i
);
CallRecordListEntity
callRecordListEntity
=
list
.
get
(
i
);
if
(
i
>
0
&&
"FAILD"
.
equals
(
callRecordListEntity
.
getEndStatus
()))
{
if
(
i
>
0
&&
"FAILD"
.
equals
(
callRecordListEntity
.
getEndStatus
()))
{
...
@@ -106,8 +96,6 @@ public class CallService extends BaseService<CallDao> {
...
@@ -106,8 +96,6 @@ public class CallService extends BaseService<CallDao> {
}
}
public
PageEntity
<
CallRecordListEntity
>
getCallSoundList
(
CallRecordListBean
bean
){
public
PageEntity
<
CallRecordListEntity
>
getCallSoundList
(
CallRecordListBean
bean
){
// return dao.getCallRecordList(bean);
PageInfo
<
CallRecordListEntity
>
pageInfo
=
null
;
PageInfo
<
CallRecordListEntity
>
pageInfo
=
null
;
Date
current
=
new
Date
();
Date
current
=
new
Date
();
Date
startTime
=
DateUtils
.
addDays
(
current
,
-
6
);
Date
startTime
=
DateUtils
.
addDays
(
current
,
-
6
);
...
@@ -148,15 +136,11 @@ public class CallService extends BaseService<CallDao> {
...
@@ -148,15 +136,11 @@ public class CallService extends BaseService<CallDao> {
*/
*/
public
List
<
CallPhoneInfoListEntity
>
findUserByCallPhone
(
CallFindPhoneInfoBean
bean
,
boolean
isOnlySearch
){
public
List
<
CallPhoneInfoListEntity
>
findUserByCallPhone
(
CallFindPhoneInfoBean
bean
,
boolean
isOnlySearch
){
// CallFindPhoneInfoBean bean = new CallFindPhoneInfoBean();
// bean.setPhoneNumer(phoneNumer);
bean
.
setMobileNubmer0
(
"0"
+
bean
.
getPhoneNumer
());
bean
.
setMobileNubmer0
(
"0"
+
bean
.
getPhoneNumer
());
bean
.
setMobileNubmer00
(
"00"
+
bean
.
getPhoneNumer
());
bean
.
setMobileNubmer00
(
"00"
+
bean
.
getPhoneNumer
());
List
<
CallPhoneInfoListEntity
>
callList
=
dao
.
findUserByCallRecord
(
bean
);
List
<
CallPhoneInfoListEntity
>
callList
=
dao
.
findUserByCallRecord
(
bean
);
// List<CallPhoneInfoListEntity> seatList = dao.findSeatListByCallPhone(bean);
if
(
callList
==
null
||
callList
.
size
()
==
0
){
// 没有匹配到席位信息
if
(
callList
==
null
||
callList
.
size
()
==
0
){
// 没有匹配到席位信息
// List<CallPhoneInfoListEntity> callList = dao.findUserByCallRecord(bean);
List
<
CallPhoneInfoListEntity
>
seatList
=
dao
.
findSeatListByCallPhone
(
bean
);
List
<
CallPhoneInfoListEntity
>
seatList
=
dao
.
findSeatListByCallPhone
(
bean
);
if
(
seatList
==
null
||
seatList
.
size
()
==
0
){
// 没有匹配到通话记录信息
if
(
seatList
==
null
||
seatList
.
size
()
==
0
){
// 没有匹配到通话记录信息
...
@@ -191,55 +175,55 @@ public class CallService extends BaseService<CallDao> {
...
@@ -191,55 +175,55 @@ public class CallService extends BaseService<CallDao> {
* @param bean
* @param bean
* @param fromUser
* @param fromUser
*/
*/
public
void
addCallRecordByCalled
(
CallFindPhoneInfoBean
bean
,
CallPhoneInfoListEntity
fromUser
){
//
public void addCallRecordByCalled(CallFindPhoneInfoBean bean, CallPhoneInfoListEntity fromUser){
if
(
"RECORD"
.
equals
(
fromUser
.
getFromType
())){
// 记录是从通话记录里面获取的
//
if("RECORD".equals(fromUser.getFromType())){// 记录是从通话记录里面获取的
//
return
;
//
return ;
}
//
}
CallPhoneInfoListEntity
calledUser
=
dao
.
findUserInfoByNumOrId
(
bean
);
// 被拨打方用户信息
//
CallPhoneInfoListEntity calledUser = dao.findUserInfoByNumOrId(bean);// 被拨打方用户信息
if
(
calledUser
==
null
){
//
if(calledUser == null){
//
return
;
//
return ;
}
//
}
CallRecordEntity
record
=
new
CallRecordEntity
();
//
CallRecordEntity record = new CallRecordEntity();
record
.
setCallType
(
"USER"
);
//
record.setCallType("USER");
record
.
setEndStatus
(
"CALLING"
);
//
record.setEndStatus("CALLING");
record
.
setId
(
IdWorker
.
getNextId
());
//
record.setId(IdWorker.getNextId());
record
.
setChannelType
(
"APP"
);
//
record.setChannelType("APP");
record
.
setStartTime
(
new
Date
());
//
record.setStartTime(new Date());
record
.
setAppCode
(
bean
.
getAppCode
());
//
record.setAppCode(bean.getAppCode());
record
.
setPlatform
(
bean
.
getPlatform
());
//
record.setPlatform(bean.getPlatform());
record
.
setVersionName
(
bean
.
getVersionName
());
//
record.setVersionName(bean.getVersionName());
record
.
setUserCount
(
1
);
//
record.setUserCount(1);
if
(
StringUtils
.
isEmpty
(
fromUser
.
getUserId
())){
//
if(StringUtils.isEmpty(fromUser.getUserId())){
record
.
setCreateBy
(
""
);
//
record.setCreateBy("");
record
.
setCreateName
(
bean
.
getPhoneNumer
());
//
record.setCreateName(bean.getPhoneNumer());
record
.
setCreatePhone
(
bean
.
getPhoneNumer
());
//
record.setCreatePhone(bean.getPhoneNumer());
record
.
setCreateShowPhone
(
bean
.
getPhoneNumer
());
//
record.setCreateShowPhone(bean.getPhoneNumer());
record
.
setPhoneType
(
Util
.
getPhoneType
(
bean
.
getPhoneNumer
()));
//
record.setPhoneType(Util.getPhoneType(bean.getPhoneNumer()));
}
else
{
//
} else{
//
record
.
setCreateBy
(
fromUser
.
getUserId
());
//
record.setCreateBy(fromUser.getUserId());
record
.
setCreateName
(
fromUser
.
getName
());
//
record.setCreateName(fromUser.getName());
record
.
setCreatePhone
(
fromUser
.
getHuaweiNum
());
//
record.setCreatePhone(fromUser.getHuaweiNum());
record
.
setCreateShowPhone
(
bean
.
getPhoneNumer
());
//
record.setCreateShowPhone(bean.getPhoneNumer());
record
.
setPhoneType
(
Util
.
getPhoneType
(
fromUser
.
getHuaweiNum
()));
//
record.setPhoneType(Util.getPhoneType(fromUser.getHuaweiNum()));
}
//
}
this
.
createCallRecord
(
record
);
// 添加主记录
//
this.createCallRecord(record);// 添加主记录
//
CallPhoneBean
calledPhone
=
new
CallPhoneBean
();
//
CallPhoneBean calledPhone = new CallPhoneBean();
calledPhone
.
setId
(
IdWorker
.
getNextId
());
//
calledPhone.setId(IdWorker.getNextId());
calledPhone
.
setPhoneType
(
Util
.
getPhoneType
(
bean
.
getPhoneNumer
()));
//
calledPhone.setPhoneType(Util.getPhoneType(bean.getPhoneNumer()));
calledPhone
.
setRecordId
(
record
.
getId
());
//
calledPhone.setRecordId(record.getId());
calledPhone
.
setTitle
(
bean
.
getPhoneNumer
());
//
calledPhone.setTitle(bean.getPhoneNumer());
calledPhone
.
setFlow
(
"CALLED"
);
//
calledPhone.setFlow("CALLED");
calledPhone
.
setUsername
(
calledUser
.
getName
());
//
calledPhone.setUsername(calledUser.getName());
calledPhone
.
setUserId
(
calledUser
.
getUserId
());
//
calledPhone.setUserId(calledUser.getUserId());
//
List
<
CallPhoneBean
>
phoneList
=
new
ArrayList
<
CallPhoneBean
>(
1
);
//
List<CallPhoneBean> phoneList = new ArrayList<CallPhoneBean>(1);
phoneList
.
add
(
calledPhone
);
//
phoneList.add(calledPhone);
this
.
addCallPhoneList
(
phoneList
);
// 添加电话列表
//
this.addCallPhoneList(phoneList);// 添加电话列表
}
//
}
/**
/**
* 综合查询手机号的归属地信息
* 综合查询手机号的归属地信息
*
*
...
@@ -370,7 +354,7 @@ public class CallService extends BaseService<CallDao> {
...
@@ -370,7 +354,7 @@ public class CallService extends BaseService<CallDao> {
return
count
!=
null
&&
count
>
0
;
return
count
!=
null
&&
count
>
0
;
}
}
public
Map
<
String
,
String
>
findPhneByHuaweiNum
(
List
<
String
>
huweiNumList
){
public
Map
<
String
,
String
>
findPh
o
neByHuaweiNum
(
List
<
String
>
huweiNumList
){
HuaweiNumListEntity
entity
=
new
HuaweiNumListEntity
();
HuaweiNumListEntity
entity
=
new
HuaweiNumListEntity
();
entity
.
setHuweiNumList
(
huweiNumList
);
entity
.
setHuweiNumList
(
huweiNumList
);
...
@@ -387,21 +371,15 @@ public class CallService extends BaseService<CallDao> {
...
@@ -387,21 +371,15 @@ public class CallService extends BaseService<CallDao> {
}
}
return
map
;
return
map
;
}
}
public
String
GetPhoneById
(
String
id
){
//
public String GetPhoneById(String id){
return
dao
.
GetPhoneById
(
id
);
//
return dao. GetPhoneById( id);
}
//
}
public
List
<
MemberEntity
>
getMemberList
(
String
id
)
{
public
List
<
MemberEntity
>
getMemberList
(
String
id
)
{
return
dao
.
getMemberList
(
id
);
return
dao
.
getMemberList
(
id
);
}
}
// public static void main(String[] args){
// Date current = new Date();
// Date startTime = DateUtils.addDays(current, -6);
// System.out.println(DateFormatUtils.format(startTime, "yyyy-MM-dd 00:00:00"));
// System.out.println(DateFormatUtils.format(current, "yyyy-MM-dd 23:59:59"));
// }
public
String
getNameByPhone
(
String
createPhone
)
{
public
String
getNameByPhone
(
String
createPhone
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
...
...
src/com/ejweb/modules/flight/service/FlightService.java
View file @
ded89915
...
@@ -576,7 +576,7 @@ public class FlightService extends BaseService<FlightDao> {
...
@@ -576,7 +576,7 @@ public class FlightService extends BaseService<FlightDao> {
* @param bean
* @param bean
* @return
* @return
*/
*/
public
List
<
SignUserListEntity
>
getOdsUser
(
SignFlightListBean
bean
)
{
//
public List<SignUserListEntity> getOdsUser(SignFlightListBean bean) {
return
dao
.
getOdsUser
(
bean
);
//
return dao.getOdsUser(bean);
}
//
}
}
}
src/com/ejweb/modules/flightPlan/service/FlightPlanService.java
View file @
ded89915
...
@@ -169,18 +169,11 @@ public class FlightPlanService extends BaseService<FlightPlanDao> {
...
@@ -169,18 +169,11 @@ public class FlightPlanService extends BaseService<FlightPlanDao> {
}
}
});
});
}
}
// return dao.findFlightPlanList(bean);
return
planList
;
return
planList
;
}
}
public
List
<
AssignmentFlightListEntity
>
findAssignmentFlightList
(
FlightPlanListBean
bean
){
// public List<AssignmentFlightListEntity> findAssignmentFlightList(FlightPlanListBean bean){
//
return
dao
.
findAssignmentFlightList
(
bean
);
// return dao.findAssignmentFlightList(bean);
}
// public static void main(String[] args){
//
// Date date = Util.utc2Local("2016-12-29 13:15 ".trim().replaceAll(" +", " "));
// SimpleDateFormat utcFormater = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// System.out.println(utcFormater.format(date));
// }
// }
}
}
src/com/ejweb/modules/sailing/service/SailingCommandService.java
View file @
ded89915
...
@@ -333,15 +333,15 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin
...
@@ -333,15 +333,15 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin
sb
.
append
(
"</td></tr>"
);
sb
.
append
(
"</td></tr>"
);
break
;
break
;
}
}
sb
.
append
(
"<tr><td colspan=\"8\" style=\"text-align:center;background-color:#e5e5e5;\">运行控制部组织协调
单元
意见</td></tr>"
);
sb
.
append
(
"<tr><td colspan=\"8\" style=\"text-align:center;background-color:#e5e5e5;\">运行控制部组织协调
中心
意见</td></tr>"
);
sb
.
append
(
"<tr><td colspan=\"8\" ><p style=\"text-align:center\">北京首都航空有限公司拟于"
);
sb
.
append
(
"<tr><td colspan=\"8\" ><p style=\"text-align:center\">北京首都航空有限公司拟于"
);
sb
.
append
(
map
.
get
(
"startTime"
));
sb
.
append
(
map
.
get
(
"startTime"
));
sb
.
append
(
"采用"
).
append
(
map
.
get
(
"aircraftLabel"
)).
append
(
"机型执行<b>"
).
append
(
map
.
get
(
"depName"
));
sb
.
append
(
"采用"
).
append
(
map
.
get
(
"aircraftLabel"
)).
append
(
"机型执行<b>"
).
append
(
map
.
get
(
"depName"
));
sb
.
append
(
"</b>"
).
append
(
vertype
).
append
(
"任务,请各部门按照《航线工作检查单》完成相关工作,如有问题请及时反馈至首都航空运行控制部组织协调
单元
。</p>"
);
sb
.
append
(
"</b>"
).
append
(
vertype
).
append
(
"任务,请各部门按照《航线工作检查单》完成相关工作,如有问题请及时反馈至首都航空运行控制部组织协调
中心
。</p>"
);
sb
.
append
(
"<p style=\"text-align:right\">运行控制部组织协调
单元
</p><p style=\"text-align:right\">电话:010-69615154</p></td></tr>"
);
sb
.
append
(
"<p style=\"text-align:right\">运行控制部组织协调
中心
</p><p style=\"text-align:right\">电话:010-69615154</p></td></tr>"
);
sb
.
append
(
"<tr style=\"text-align:center;background-color:#e5e5e5;\"><td colspan=\"3\">编写</td><td colspan=\"2\">审核</td><td colspan=\"3\">批准</td></tr>"
);
sb
.
append
(
"<tr style=\"text-align:center;background-color:#e5e5e5;\"><td colspan=\"3\">编写</td><td colspan=\"2\">审核</td><td colspan=\"3\">批准</td></tr>"
);
sb
.
append
(
"<tr style=\"text-align:center;\"><td colspan=\"3\">组织协调单元</td><td colspan=\"2\"><textarea style=\"width:100%\" rows=\"1\">万宇</textarea><td colspan=\"3\"><textarea style=\"width:100%\" rows=\"1\">梁广义</textarea></td></tr>"
);
sb
.
append
(
"<tr style=\"text-align:center;\"><td colspan=\"3\">组织协调单元</td><td colspan=\"2\"><textarea style=\"width:100%\" rows=\"1\">万宇</textarea><td colspan=\"3\"><textarea style=\"width:100%\" rows=\"1\">梁广义</textarea></td></tr>"
);
sb
.
append
(
"<tr style=\"text-align:center;\"><td colspan=\"2\">公司主管领导</td><td colspan=\"6\"><textarea style=\"width:100%\" rows=\"1\">
瞿涛
</textarea></td></tr>"
);
sb
.
append
(
"<tr style=\"text-align:center;\"><td colspan=\"2\">公司主管领导</td><td colspan=\"6\"><textarea style=\"width:100%\" rows=\"1\">
陈浩
</textarea></td></tr>"
);
sb
.
append
(
"<tr><td>类别</td><td>要求执行</td><td colspan=\"2\">要求修改程序</td><td colspan=\"3\">要求提供反馈</td><td>其他</td></tr>"
);
sb
.
append
(
"<tr><td>类别</td><td>要求执行</td><td colspan=\"2\">要求修改程序</td><td colspan=\"3\">要求提供反馈</td><td>其他</td></tr>"
);
sb
.
append
(
"<tr><td>本指令发至</td><td colspan=\"7\">公司各部门。</td></tr>"
);
sb
.
append
(
"<tr><td>本指令发至</td><td colspan=\"7\">公司各部门。</td></tr>"
);
sb
.
append
(
"<tr><td>抄送至</td><td colspan=\"7\">公司分管领导。</td></tr>"
);
sb
.
append
(
"<tr><td>抄送至</td><td colspan=\"7\">公司分管领导。</td></tr>"
);
...
...
src/com/ejweb/modules/statistics/service/FlightDynamicsService.java
View file @
ded89915
package
com
.
ejweb
.
modules
.
statistics
.
service
;
package
com
.
ejweb
.
modules
.
statistics
.
service
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.GregorianCalendar
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.ejweb.core.base.BaseService
;
import
com.ejweb.core.base.BaseService
;
import
com.ejweb.core.base.PageEntity
;
import
com.ejweb.core.base.PageEntity
;
import
com.ejweb.modules.statistics.bean.FlightDelayTotalBean
;
import
com.ejweb.modules.statistics.bean.FlightDelayTotalBean
;
...
@@ -29,6 +13,14 @@ import com.ejweb.modules.statistics.entity.FlightDynamicsTotalEntity;
...
@@ -29,6 +13,14 @@ import com.ejweb.modules.statistics.entity.FlightDynamicsTotalEntity;
import
com.ejweb.modules.statistics.entity.FlightTotalEntity
;
import
com.ejweb.modules.statistics.entity.FlightTotalEntity
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.util.*
;
@Service
@Service
@Transactional
(
readOnly
=
true
)
@Transactional
(
readOnly
=
true
)
...
@@ -98,12 +90,8 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -98,12 +90,8 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
}
}
}
}
// long userTime=0;----
// if (dailyDynamicsEntities != null && dailyDynamicsEntities.size() > 0 && dynamicsEntities != null && dynamicsEntities.size() > 0) {
if
(
dynamicsEntities
!=
null
&&
dynamicsEntities
.
size
()
>
0
)
{
if
(
dynamicsEntities
!=
null
&&
dynamicsEntities
.
size
()
>
0
)
{
//计划航班数
//计划航班数
// int planFlightNum = 0;
FlightDelayTotalBean
flightDelayTotalBean
=
new
FlightDelayTotalBean
();
FlightDelayTotalBean
flightDelayTotalBean
=
new
FlightDelayTotalBean
();
flightDelayTotalBean
.
setFltDate
(
bean
.
getFltDate
());
flightDelayTotalBean
.
setFltDate
(
bean
.
getFltDate
());
...
@@ -115,11 +103,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -115,11 +103,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
//取消航班数
//取消航班数
int
cancelFlightNum
=
0
;
int
cancelFlightNum
=
0
;
// DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//飞机日利用率分子
/*long useTime = 0;
//用于计算飞机个数
List<String> airCarriers = new ArrayList<String>();*/
/******************* 上面6个重要数据 *******************/
/******************* 上面6个重要数据 *******************/
// begin:
// begin:
...
@@ -135,11 +118,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -135,11 +118,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
ignoreCancelCal
=
true
;
ignoreCancelCal
=
true
;
break
;
break
;
}
}
// if(!"CNL".equals(dailyEntityTmp.getStatus()) && "CNL".equals(entityTmp.getStatus())) {
// cancelFlightNum++;
// ignoreCancelCal = true;
// break;
// }
}
}
}
}
}
}
...
@@ -173,12 +151,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -173,12 +151,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
case
"DEP"
:
case
"DEP"
:
totalEntity
.
setFlightOperating
(
totalEntity
.
getFlightOperating
()
+
1
);
totalEntity
.
setFlightOperating
(
totalEntity
.
getFlightOperating
()
+
1
);
break
;
break
;
/*case "RAR":
totalEntity.setFlightReadyLand(totalEntity.getFlightReadyLand() + 1);
break;*/
/*case "CNL":
totalEntity.setFlightCanceled(totalEntity.getFlightCanceled() + 1);
break;*/
default
:
default
:
break
;
break
;
}
}
...
@@ -189,19 +161,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -189,19 +161,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
}
}
}
}
//计算飞机日利用率分子
//计算飞机日利用率分子
/* try {
useTime += (dateFormat.parse(entityTmp.getAtaChn()).getTime() - dateFormat.parse(entityTmp.getAtdChn()).getTime());
} catch (ParseException e) {
e.printStackTrace();
}*/
//计算飞机个数
// for (String airCarrierNo : airCarriers) {
// if (airCarrierNo.equals(entityTmp.getAcLongNo())) {
// continue begin;
// }
// }
// airCarriers.add(entityTmp.getAcLongNo());
//
/**
/**
* //for(当日凌晨5-次日凌晨5点所有航段数据循环){
* //for(当日凌晨5-次日凌晨5点所有航段数据循环){
// if( ataChn【IN】不为空 &&(当日凌晨5点<(ataChn【IN】-atdChn【OUT】)/2 < 次日凌晨5点)){
// if( ataChn【IN】不为空 &&(当日凌晨5点<(ataChn【IN】-atdChn【OUT】)/2 < 次日凌晨5点)){
...
@@ -212,27 +171,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -212,27 +171,6 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
// 本段时间++
// 本段时间++
// }
// }
*/
*/
/* Calendar currentDate = new GregorianCalendar();
currentDate.set(Calendar.HOUR_OF_DAY, 5);
currentDate.set(Calendar.MINUTE, 0);
currentDate.set(Calendar.SECOND, 0);
Calendar nextDate = new GregorianCalendar();
nextDate.add(Calendar.DATE, 1);
nextDate.set(Calendar.HOUR_OF_DAY, 5);
nextDate.set(Calendar.MINUTE, 0);
nextDate.set(Calendar.SECOND, 0);
try{
if(entityTmp.getAtaChn()!=null&&entityTmp.getAtdChn()!=null &&(dateFormat.parse(dateFormat.format(currentDate.getTime())).getTime()<(dateFormat.parse(entityTmp.getAtaChn()).getTime() - dateFormat.parse(entityTmp.getAtdChn()).getTime())/2&& (dateFormat.parse(entityTmp.getAtaChn()).getTime() - dateFormat.parse(entityTmp.getAtdChn()).getTime())/2 < dateFormat.parse(dateFormat.format(nextDate.getTime())).getTime())){
userTime=dateFormat.parse(entityTmp.getAtaChn()).getTime() - dateFormat.parse(entityTmp.getAtdChn()).getTime();
}else if( (entityTmp.getAtaChn()==null||entityTmp.getAtdChn()==null) &&(dateFormat.parse(dateFormat.format(currentDate.getTime())).getTime()<(dateFormat.parse(entityTmp.getStaChn()).getTime() - dateFormat.parse(entityTmp.getStdChn()).getTime())/2&& (dateFormat.parse(entityTmp.getStaChn()).getTime() - dateFormat.parse(entityTmp.getStdChn()).getTime())/2 < dateFormat.parse(dateFormat.format(nextDate.getTime())).getTime())){
userTime=dateFormat.parse(entityTmp.getStaChn()).getTime() - dateFormat.parse(entityTmp.getStdChn()).getTime();
}
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
userTime++;*/
//修改公式
}
}
FlightDynamicsDetailBean
dbean
=
new
FlightDynamicsDetailBean
();
FlightDynamicsDetailBean
dbean
=
new
FlightDynamicsDetailBean
();
dbean
.
setFltDate
(
bean
.
getFltDate
());
dbean
.
setFltDate
(
bean
.
getFltDate
());
...
@@ -240,23 +178,12 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -240,23 +178,12 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
totalEntity
.
setFlightCanceled
(
list
==
null
?
0
:
list
.
size
());
totalEntity
.
setFlightCanceled
(
list
==
null
?
0
:
list
.
size
());
//totalEntity.setFlightCanceled(cancelFlightNum);
//计划航班总数
// totalEntity.setFlightTotal(totalEntity.getFlightFinished() + totalEntity.getFlightNotStart() + totalEntity.getFlightOperating() + totalEntity.getFlightReadyLand() + totalEntity.getFlightCanceled());
//计算航班正常率
//计算航班正常率
if
(
flightTotalCal
!=
0
)
{
if
(
flightTotalCal
!=
0
)
{
// 日利用率 =本段时间/ 飞机架数
//原公式=[计划航班数-(延误航班数+临时取消航班数+备降航班数+改航直飞)]/计划航班数
// double flightNormal = (double) (flightTotalCal - cancelCal - readyLandCal - delayCal) / flightTotalCal;
// totalEntity.setFlightNormal(flightNormal);
totalEntity
.
setFlightNormal
((
double
)
(
flightTotalCal
-
cancelCal
-
readyLandCal
-
delayCal
)
/
flightTotalCal
);
totalEntity
.
setFlightNormal
((
double
)
(
flightTotalCal
-
cancelCal
-
readyLandCal
-
delayCal
)
/
flightTotalCal
);
}
}
// if (airCarriers.size() > 0) {
// totalEntity.setPlaneDailyUsage((double)(useTime / (1000 * 60 * 60)) / airCarriers.size());
// }
}
else
{
}
else
{
LOG
.
debug
(
"没有数据"
);
LOG
.
debug
(
"没有数据"
);
...
@@ -269,22 +196,10 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
...
@@ -269,22 +196,10 @@ public class FlightDynamicsService extends BaseService<FlightDynamicsDao> {
totalEntity
.
setPlanFlightTotal
(
flightTotal
);
totalEntity
.
setPlanFlightTotal
(
flightTotal
);
// 飞机个数先默认72
//按场站 totalEntity.setPlaneDailyUsage((double)((1.0*useTime) / (1000 * 60 * 60)) / flightTotal);
totalEntity
.
setPlaneDailyUsage
(
dao
.
getPlaneDailyUsage
(
bean
.
getFltDate
(),
flightTotal
));
totalEntity
.
setPlaneDailyUsage
(
dao
.
getPlaneDailyUsage
(
bean
.
getFltDate
(),
flightTotal
));
// totalEntity.setPlaneDailyUsage(userTime/flightTotal);//改公式
return
totalEntity
;
return
totalEntity
;
}
}
public
static
void
main
(
String
[]
args
)
{
Calendar
currentDate
=
new
GregorianCalendar
();
System
.
out
.
println
((
Date
)
currentDate
.
getTime
().
clone
());
currentDate
.
add
(
Calendar
.
DATE
,
1
);
currentDate
.
set
(
Calendar
.
HOUR_OF_DAY
,
5
);
currentDate
.
set
(
Calendar
.
MINUTE
,
0
);
currentDate
.
set
(
Calendar
.
SECOND
,
0
);
currentDate
.
getTime
();
System
.
out
.
println
((
Date
)
currentDate
.
getTime
().
clone
());
}
/**
/**
* 修改某一天的飞机总量
* 修改某一天的飞机总量
*
*
...
...
src/com/ejweb/modules/user/api/UserController.java
View file @
ded89915
...
@@ -163,7 +163,7 @@ public class UserController {
...
@@ -163,7 +163,7 @@ public class UserController {
}
}
boolean
passwordError
=
false
;
boolean
passwordError
=
false
;
//只开放几个测试账号密码验证走数据库,其他的通过首航接口去验证
//只开放几个测试账号密码验证走数据库,其他的通过首航接口去验证
if
((
loginBean
.
getLoginName
().
equals
(
"
dongb"
)
||
loginBean
.
getLoginName
().
equals
(
"tianyz"
)
||
loginBean
.
getLoginName
().
equals
(
"wangzl"
)
||
loginBean
.
getLoginName
().
equals
(
"wtfk1
"
))){
if
((
loginBean
.
getLoginName
().
equals
(
"
hwss1"
)
||
loginBean
.
getLoginName
().
equals
(
"hwss2"
)
||
loginBean
.
getLoginName
().
equals
(
"tianyz"
)
||
loginBean
.
getLoginName
().
equals
(
"wangzl"
)
||
loginBean
.
getLoginName
().
equals
(
"wtfk1"
)
||
loginBean
.
getLoginName
().
equals
(
"test001"
)
||
loginBean
.
getLoginName
().
equals
(
"test002
"
))){
if
(!
Util
.
validatePassword
(
loginBean
.
getPassword
(),
userEntity
.
getPassword
())){
if
(!
Util
.
validatePassword
(
loginBean
.
getPassword
(),
userEntity
.
getPassword
())){
passwordError
=
true
;
passwordError
=
true
;
}
}
...
...
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