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
c4297182
Commit
c4297182
authored
Oct 27, 2017
by
Java - 段鹏举
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
航线论证数据统计剩余天数修改
parent
9c32b05c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
41 deletions
+46
-41
StatisticalService.java
src/com/ejweb/modules/airport/service/StatisticalService.java
+46
-41
No files found.
src/com/ejweb/modules/airport/service/StatisticalService.java
View file @
c4297182
/**
/**
*
*
*/
*/
package
com
.
ejweb
.
modules
.
airport
.
service
;
package
com
.
ejweb
.
modules
.
airport
.
service
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
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.airport.bean.StatisticalBean
;
import
com.ejweb.modules.airport.bean.StatisticalBean
;
...
@@ -19,67 +13,78 @@ import com.ejweb.modules.verify.dao.AirlineVerifiedDao;
...
@@ -19,67 +13,78 @@ import com.ejweb.modules.verify.dao.AirlineVerifiedDao;
import
com.ejweb.modules.verify.dao.AirlineVerifyDao
;
import
com.ejweb.modules.verify.dao.AirlineVerifyDao
;
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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
*
* @team suzhou
* @author huhy
* @author huhy
* @version 1.0
* @version 1.0
* @time 2016年9月8日
* @team suzhou
* @time 2016年9月8日
*/
*/
@Service
@Service
public
class
StatisticalService
extends
BaseService
<
StatisticalDao
>
{
public
class
StatisticalService
extends
BaseService
<
StatisticalDao
>
{
@Autowired
@Autowired
private
AirlineVerifiedDao
airlineVerifiedDao
;
private
AirlineVerifiedDao
airlineVerifiedDao
;
@Autowired
@Autowired
private
AirlineVerifyDao
verifdao
;
private
AirlineVerifyDao
verifdao
;
public
PageEntity
<
StatisticalEntity
>
getStatisticalList
(
StatisticalBean
bean
)
{
public
PageEntity
<
StatisticalEntity
>
getStatisticalList
(
StatisticalBean
bean
)
{
PageInfo
<
StatisticalEntity
>
pageInfo
=
null
;
PageInfo
<
StatisticalEntity
>
pageInfo
=
null
;
// 必须紧贴dao的查询方法
// 必须紧贴dao的查询方法
PageHelper
.
startPage
(
bean
.
getPageNo
(),
bean
.
getPageSize
());
PageHelper
.
startPage
(
bean
.
getPageNo
(),
bean
.
getPageSize
());
AirlineVerifiedAddBean
abean
=
new
AirlineVerifiedAddBean
();
AirlineVerifiedAddBean
abean
=
new
AirlineVerifiedAddBean
();
abean
.
setUserCode
(
bean
.
getUserCode
());
abean
.
setUserCode
(
bean
.
getUserCode
());
if
(
StringUtils
.
isEmpty
(
bean
.
getSort
()))
{
if
(
StringUtils
.
isEmpty
(
bean
.
getSort
()))
{
PageHelper
.
orderBy
(
"source,routeNo DESC"
);
PageHelper
.
orderBy
(
"source,routeNo DESC"
);
}
}
else
else
PageHelper
.
orderBy
(
"source,"
+
bean
.
getSort
());
PageHelper
.
orderBy
(
"source,"
+
bean
.
getSort
());
List
<
StatisticalEntity
>
lists
=
dao
.
getStatisticalList
(
bean
);
List
<
StatisticalEntity
>
lists
=
dao
.
getStatisticalList
(
bean
);
String
departId
=
airlineVerifiedDao
.
findDepartId
(
abean
);
String
departId
=
airlineVerifiedDao
.
findDepartId
(
abean
);
for
(
StatisticalEntity
e
:
lists
)
{
for
(
StatisticalEntity
e
:
lists
)
{
String
typelist
=
verifdao
.
getTypeList1
(
e
.
getVerifId
());
String
typelist
=
verifdao
.
getTypeList1
(
e
.
getVerifId
());
if
(
StringUtils
.
isNoneBlank
(
typelist
))
if
(
StringUtils
.
isNoneBlank
(
typelist
))
e
.
setTypeName
(
e
.
getTypeName
()+
":"
+
typelist
);
e
.
setTypeName
(
e
.
getTypeName
()
+
":"
+
typelist
);
e
.
setTypeList
(
verifdao
.
getTypeList
(
e
.
getVerifId
()));
e
.
setTypeList
(
verifdao
.
getTypeList
(
e
.
getVerifId
()));
if
(
departId
.
equals
(
e
.
getDepartId
()))
if
(
departId
.
equals
(
e
.
getDepartId
()))
e
.
setReStart
(
true
);
e
.
setReStart
(
true
);
else
else
e
.
setReStart
(
false
);
e
.
setReStart
(
false
);
if
(
"06"
.
equals
(
e
.
getVerifType
())||
"07"
.
equals
(
e
.
getVerifType
())
if
(
"06"
.
equals
(
e
.
getVerifType
())
||
"07"
.
equals
(
e
.
getVerifType
())
||
"08"
.
equals
(
e
.
getVerifType
()))
{
||
"08"
.
equals
(
e
.
getVerifType
()))
{
e
.
setExpiryDate
(
"长期有效"
);
e
.
setExpiryDate
(
"长期有效"
);
}
else
{
}
else
{
Integer
day
=
dao
.
getDay
(
e
);
Integer
day
=
dao
.
getDay
(
e
);
if
(
day
!=
null
){
if
(
day
!=
null
)
{
if
(
day
<=
0
)
day
=
0
;
if
(
day
>
180
)
{
// day=180-day;
day
=
180
-
day
;
Integer
cha
=
Integer
.
parseInt
(
e
.
getExpiryDate
()==
null
?
"0"
:
e
.
getExpiryDate
())
;
e
.
setExpiryDate
(
day
+
""
);
}
else
{
if
(
cha
<
day
){
if
(
day
<=
0
)
{
day
=
cha
;
day
=
0
;
}
}
day
=
180
-
day
;
// day=180-day;
e
.
setExpiryDate
(
day
+
""
);
Integer
cha
=
Integer
.
parseInt
(
e
.
getExpiryDate
()
==
null
?
"0"
:
e
.
getExpiryDate
());
}
else
if
(
StringUtils
.
isNoneBlank
(
e
.
getExpiryDate
())){
if
(
cha
<
day
)
{
day
=
Integer
.
parseInt
(
e
.
getExpiryDate
())
;
day
=
cha
;
day
=
180
-
day
;
}
e
.
setExpiryDate
(
day
+
""
);
day
=
180
-
day
;
e
.
setExpiryDate
(
day
+
""
);
}
}
else
if
(
StringUtils
.
isNoneBlank
(
e
.
getExpiryDate
()))
{
day
=
Integer
.
parseInt
(
e
.
getExpiryDate
());
day
=
180
-
day
;
e
.
setExpiryDate
(
day
+
""
);
}
}
}
}
}
}
pageInfo
=
new
PageInfo
<
StatisticalEntity
>(
lists
);
pageInfo
=
new
PageInfo
<
StatisticalEntity
>(
lists
);
...
...
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