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
76595e10
Commit
76595e10
authored
May 16, 2019
by
java-李谡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门论证添加备注节点
parent
76f9e681
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
257 additions
and
384 deletions
+257
-384
ShortMessageService.java
src/com/ejweb/modules/message/service/ShortMessageService.java
+2
-1
RouteVerifyService.java
src/com/ejweb/modules/route/service/RouteVerifyService.java
+255
-383
No files found.
src/com/ejweb/modules/message/service/ShortMessageService.java
View file @
76595e10
...
@@ -64,7 +64,8 @@ public class ShortMessageService extends BaseService<ShortMessageDao> {
...
@@ -64,7 +64,8 @@ public class ShortMessageService extends BaseService<ShortMessageDao> {
}
}
builder
.
append
(
phones
[
i
].
replaceAll
(
"^0+"
,
""
));
builder
.
append
(
phones
[
i
].
replaceAll
(
"^0+"
,
""
));
}
}
phone
=
builder
.
toString
();
//电话号码去除空格,否则导致发送失败
phone
=
builder
.
toString
().
trim
();
if
(
StringUtils
.
isEmpty
(
phone
))
{
if
(
StringUtils
.
isEmpty
(
phone
))
{
return
false
;
return
false
;
}
}
...
...
src/com/ejweb/modules/route/service/RouteVerifyService.java
View file @
76595e10
package
com
.
ejweb
.
modules
.
route
.
service
;
package
com
.
ejweb
.
modules
.
route
.
service
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
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.core.exception.IlleagalRecordException
;
import
com.ejweb.core.exception.IlleagalRecordException
;
...
@@ -23,49 +11,40 @@ import com.ejweb.modules.depart.dao.DepartDao;
...
@@ -23,49 +11,40 @@ import com.ejweb.modules.depart.dao.DepartDao;
import
com.ejweb.modules.depart.entity.DepartEntity
;
import
com.ejweb.modules.depart.entity.DepartEntity
;
import
com.ejweb.modules.notify.bean.NotifyAddBean
;
import
com.ejweb.modules.notify.bean.NotifyAddBean
;
import
com.ejweb.modules.notify.dao.NotifyDao
;
import
com.ejweb.modules.notify.dao.NotifyDao
;
import
com.ejweb.modules.route.bean.RouteFileBean
;
import
com.ejweb.modules.route.bean.*
;
import
com.ejweb.modules.route.bean.RouteVerifyBean
;
import
com.ejweb.modules.route.bean.RouteVerifyDetailBean
;
import
com.ejweb.modules.route.bean.VerifyCheckBean
;
import
com.ejweb.modules.route.bean.VerifyStatusBean
;
import
com.ejweb.modules.route.dao.RouteVerifyDao
;
import
com.ejweb.modules.route.dao.RouteVerifyDao
;
import
com.ejweb.modules.route.entity.FullRouteVerifyEntity
;
import
com.ejweb.modules.route.entity.FullRouteVerifyEntity
;
import
com.ejweb.modules.route.entity.RouteVerifyEntity
;
import
com.ejweb.modules.route.entity.RouteVerifyEntity
;
import
com.ejweb.modules.user.dao.UserDao
;
import
com.ejweb.modules.user.dao.UserDao
;
import
com.ejweb.modules.user.entity.User
;
import
com.ejweb.modules.user.entity.User
;
import
com.ejweb.modules.user.entity.UserEntity
;
import
com.ejweb.modules.user.entity.UserEntity
;
import
com.ejweb.modules.verify.bean.AirlineVerifiedAddBean
;
import
com.ejweb.modules.verify.bean.*
;
import
com.ejweb.modules.verify.bean.AirlineVerifyDetailBean
;
import
com.ejweb.modules.verify.dao.*
;
import
com.ejweb.modules.verify.bean.FullAirlineConclusionBean
;
import
com.ejweb.modules.verify.bean.FullVerifyConditionBean
;
import
com.ejweb.modules.verify.bean.FullVerifyFormBean
;
import
com.ejweb.modules.verify.bean.RecordAddBean
;
import
com.ejweb.modules.verify.bean.VerifyFeedbackDetailBean
;
import
com.ejweb.modules.verify.bean.VerifyProcessAddBean
;
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.dao.VerifyConditionDao
;
import
com.ejweb.modules.verify.dao.VerifyFeedbackDao
;
import
com.ejweb.modules.verify.dao.VerifyFormDao
;
import
com.ejweb.modules.verify.dao.VerifyProcessDao
;
import
com.ejweb.modules.verify.entity.AirlineVerifyEntity
;
import
com.ejweb.modules.verify.entity.AirlineVerifyEntity
;
import
com.ejweb.modules.verify.entity.FullVerifyConditionEntity
;
import
com.ejweb.modules.verify.entity.FullVerifyConditionEntity
;
import
com.ejweb.modules.verify.entity.FullVerifyFormEntity
;
import
com.ejweb.modules.verify.entity.FullVerifyFormEntity
;
import
com.ejweb.modules.verify.entity.RouteverifyEntity
;
import
com.ejweb.modules.verify.entity.RouteverifyEntity
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
freemarker.template.TemplateException
;
import
freemarker.template.TemplateException
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Service
@Transactional
(
readOnly
=
true
)
@Transactional
(
readOnly
=
true
)
public
class
RouteVerifyService
extends
BaseService
<
RouteVerifyDao
>
{
public
class
RouteVerifyService
extends
BaseService
<
RouteVerifyDao
>
{
@Autowired
@Autowired
private
UserDao
userdao
;
private
UserDao
userdao
;
@Autowired
@Autowired
VerifyConditionDao
verifyConditionDao
;
VerifyConditionDao
verifyConditionDao
;
...
@@ -99,12 +78,14 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -99,12 +78,14 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
PageHelper
.
startPage
(
bean
.
getPageNo
(),
bean
.
getPageSize
());
PageHelper
.
startPage
(
bean
.
getPageNo
(),
bean
.
getPageSize
());
pageInfo
=
new
PageInfo
<
RouteVerifyEntity
>(
dao
.
findlist
(
bean
));
pageInfo
=
new
PageInfo
<
RouteVerifyEntity
>(
dao
.
findlist
(
bean
));
if
(
pageInfo
.
getPages
()
<
bean
.
getPageNo
())
{
// 页码大于总页数,则返回NULL
// 页码大于总页数,则返回NULL
if
(
pageInfo
.
getPages
()
<
bean
.
getPageNo
())
{
return
null
;
return
null
;
}
}
List
<
RouteVerifyEntity
>
list
=
pageInfo
.
getList
();
List
<
RouteVerifyEntity
>
list
=
pageInfo
.
getList
();
if
(
list
==
null
||
list
.
size
()
==
0
)
{
// 如果没有数据则返回NULL
// 如果没有数据则返回NULL
if
(
list
==
null
||
list
.
size
()
==
0
)
{
return
null
;
return
null
;
}
}
for
(
RouteVerifyEntity
entity
:
list
)
{
for
(
RouteVerifyEntity
entity
:
list
)
{
...
@@ -122,43 +103,42 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -122,43 +103,42 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
public
RouteVerifyEntity
detail
(
RouteVerifyDetailBean
bean
)
{
public
RouteVerifyEntity
detail
(
RouteVerifyDetailBean
bean
)
{
RouteVerifyEntity
entity
=
dao
.
detail
(
bean
);
RouteVerifyEntity
entity
=
dao
.
detail
(
bean
);
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
entity
.
setDepName
(
map
.
get
(
"depName"
));
entity
.
setDepName
(
map
.
get
(
"depName"
));
entity
.
setVerifType
(
map
.
get
(
"verifType"
));
entity
.
setVerifType
(
map
.
get
(
"verifType"
));
entity
.
setRouteFile
(
dao
.
getRouteFileList
(
entity
));
entity
.
setRouteFile
(
dao
.
getRouteFileList
(
entity
));
entity
.
setHistory
(
verifyDao
.
getHistoryList
(
entity
.
getId
()));
entity
.
setHistory
(
verifyDao
.
getHistoryList
(
entity
.
getId
()));
if
(
StringUtils
.
isNoneBlank
(
entity
.
getConditionId
())){
if
(
StringUtils
.
isNoneBlank
(
entity
.
getConditionId
()))
{
VerifyFeedbackDetailBean
bean1
=
new
VerifyFeedbackDetailBean
();
VerifyFeedbackDetailBean
bean1
=
new
VerifyFeedbackDetailBean
();
bean1
.
setConditionId
(
entity
.
getConditionId
());
bean1
.
setConditionId
(
entity
.
getConditionId
());
entity
.
setDepartIds
(
feeddao
.
getDetailList
(
bean1
));
entity
.
setDepartIds
(
feeddao
.
getDetailList
(
bean1
));
}
}
if
(
StringUtils
.
isBlank
(
entity
.
getFormText
())){
if
(
StringUtils
.
isBlank
(
entity
.
getFormText
()))
{
AirlineVerifyEntity
airlineVerifyEntity
=
airlineVerifyDao
AirlineVerifyEntity
airlineVerifyEntity
=
airlineVerifyDao
.
selectByPrimaryKey
(
bean
.
getVerifId
());
.
selectByPrimaryKey
(
bean
.
getVerifId
());
FullVerifyFormBean
fullVerifyFormBean
=
new
FullVerifyFormBean
();
FullVerifyFormBean
fullVerifyFormBean
=
new
FullVerifyFormBean
();
fullVerifyFormBean
.
setCreateBy
(
bean
.
getUserCode
());
fullVerifyFormBean
.
setCreateBy
(
bean
.
getUserCode
());
fullVerifyFormBean
.
setDepartId
(
bean
.
getDepartId
());
fullVerifyFormBean
.
setDepartId
(
bean
.
getDepartId
());
fullVerifyFormBean
.
setVerifType
(
airlineVerifyEntity
.
getVerifType
());
fullVerifyFormBean
.
setVerifType
(
airlineVerifyEntity
.
getVerifType
());
fullVerifyFormBean
.
setFormType
(
"01"
);
fullVerifyFormBean
.
setFormType
(
"01"
);
List
<
FullVerifyFormEntity
>
fullVerifyFormEntities
=
verifyFormDao
.
fullList
(
fullVerifyFormBean
);
List
<
FullVerifyFormEntity
>
fullVerifyFormEntities
=
verifyFormDao
.
fullList
(
fullVerifyFormBean
);
if
(
fullVerifyFormEntities
!=
null
)
{
if
(
fullVerifyFormEntities
!=
null
)
{
if
(
fullVerifyFormEntities
.
size
()
==
1
)
{
if
(
fullVerifyFormEntities
.
size
()
==
1
)
{
FullVerifyFormEntity
fullVerifyFormEntity
=
fullVerifyFormEntities
.
get
(
0
);
FullVerifyFormEntity
fullVerifyFormEntity
=
fullVerifyFormEntities
.
get
(
0
);
entity
.
setFormText
(
fullVerifyFormEntity
.
getFormText
());
entity
.
setFormText
(
fullVerifyFormEntity
.
getFormText
());
}
else
if
(
fullVerifyFormEntities
.
size
()
>
1
){
}
else
if
(
fullVerifyFormEntities
.
size
()
>
1
)
{
FullVerifyFormEntity
fullVerifyFormEntity
=
fullVerifyFormEntities
.
get
(
0
);
FullVerifyFormEntity
fullVerifyFormEntity
=
fullVerifyFormEntities
.
get
(
0
);
entity
.
setFormText
(
fullVerifyFormEntity
.
getFormText
());
entity
.
setFormText
(
fullVerifyFormEntity
.
getFormText
());
//throw new IlleagalRecordException("非法的记录" + FullVerifyFormEntity.class);
}
}
}
}
}
}
return
entity
;
return
entity
;
}
}
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
...
@@ -166,66 +146,58 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -166,66 +146,58 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
final
String
verifyStatus
=
bean
.
getVerifyStatus
();
final
String
verifyStatus
=
bean
.
getVerifyStatus
();
if
(
dao
.
checkDepartIdWithUserCodeAndId
(
bean
)
<=
0
)
if
(
dao
.
checkDepartIdWithUserCodeAndId
(
bean
)
<=
0
)
{
return
false
;
return
false
;
}
FullRouteVerifyEntity
fullRouteVerifyEntity
=
checkRouteVerifyExist
(
bean
.
getVerifId
(),
bean
.
getUserCode
());
FullRouteVerifyEntity
fullRouteVerifyEntity
=
checkRouteVerifyExist
(
bean
.
getVerifId
(),
bean
.
getUserCode
());
if
(
"0"
.
equals
(
bean
.
getStatus
())&&
"1"
.
equals
(
fullRouteVerifyEntity
.
getStatus
()))
{
if
(
"0"
.
equals
(
bean
.
getStatus
())
&&
"1"
.
equals
(
fullRouteVerifyEntity
.
getStatus
()))
{
return
false
;
return
false
;
}
}
//判断备注是否修改,如果有修改,则添加操作履历
boolean
remarkModify
=
bean
.
getRemarks
()
!=
null
&&
!
bean
.
getRemarks
().
equals
(
fullRouteVerifyEntity
.
getRemarks
());
//记录初始反馈时间
//记录初始反馈时间
if
(
fullRouteVerifyEntity
.
getStartTime
()
==
null
)
{
if
(
fullRouteVerifyEntity
.
getStartTime
()
==
null
)
{
fullRouteVerifyEntity
.
setStartTime
(
new
Date
());
fullRouteVerifyEntity
.
setStartTime
(
new
Date
());
// 完成初始反馈通知置灰
// 完成初始反馈通知置灰
NotifyAddBean
addbean
=
new
NotifyAddBean
();
NotifyAddBean
addbean
=
new
NotifyAddBean
();
addbean
.
setVerifId
(
bean
.
getVerifId
());
addbean
.
setVerifId
(
bean
.
getVerifId
());
addbean
.
setType
(
"1"
);
addbean
.
setType
(
"1"
);
addbean
.
setUserCode
(
bean
.
getUserCode
());
addbean
.
setUserCode
(
bean
.
getUserCode
());
notifyDao
.
NotifyComplete
(
addbean
);
notifyDao
.
NotifyComplete
(
addbean
);
}
else
{
}
else
{
// 增加自定义表单修改操作履历
// 增加自定义表单修改操作履历
if
(
fullRouteVerifyEntity
.
getFormText
()!=
null
&!
fullRouteVerifyEntity
.
getFormText
().
equals
(
bean
.
getFormText
())){
boolean
formTextModify
=
fullRouteVerifyEntity
.
getFormText
()
!=
null
&&
!
bean
.
getFormText
().
equals
(
fullRouteVerifyEntity
.
getFormText
());
if
(
formTextModify
||
remarkModify
)
{
RecordAddBean
addbean
=
new
RecordAddBean
();
RecordAddBean
addbean
=
new
RecordAddBean
();
addbean
.
setId
(
IdWorker
.
getNextId
());
addbean
.
setId
(
IdWorker
.
getNextId
());
addbean
.
setUserCode
(
bean
.
getUserCode
());
addbean
.
setUserCode
(
bean
.
getUserCode
());
addbean
.
setRecordType
(
"03"
);
addbean
.
setRecordType
(
"03"
);
addbean
.
setVerifId
(
bean
.
getVerifId
());
addbean
.
setVerifId
(
bean
.
getVerifId
());
//判断备注是否修改,如果有修改,操作履历添加备注内容
if
(
remarkModify
)
{
addbean
.
setRemarks
(
bean
.
getRemarks
());
}
recordDao
.
insert
(
addbean
);
recordDao
.
insert
(
addbean
);
}
}
}
}
/* // 生成论证文件
if (bean.getFormText() != null && !"".equals(bean.getFormText())) {
UploadFileBean uploadFileBean = Html2File.convertHtml2Word(bean.getFormText());
RouteFileBean routeFileBean = new RouteFileBean();
routeFileBean.setId(IdWorker.getNextId());
routeFileBean.setFileName("论证报告单.doc");
routeFileBean.setExtesion(uploadFileBean.getExtesion());
routeFileBean.setMd5(uploadFileBean.getMd5());
routeFileBean.setFilePath(uploadFileBean.getPath());
routeFileBean.setFileSize(String.valueOf(uploadFileBean.getSize()));
routeFileBean.setRouteId(fullRouteVerifyEntity.getId());
routeFileBean.setCreateBy(bean.getUserCode());
dao.deleteRouteFile(routeFileBean);
dao.insertRouteFile(routeFileBean);
}*/
//结束上一循环
//结束上一循环
List
<
FullVerifyConditionEntity
>
verifyConditionEntities
=
this
List
<
FullVerifyConditionEntity
>
verifyConditionEntities
=
this
.
getFullVerifyConditionByRouteIdAndComplete
(
fullRouteVerifyEntity
.
getId
());
.
getFullVerifyConditionByRouteIdAndComplete
(
fullRouteVerifyEntity
.
getId
());
if
(
verifyConditionEntities
!=
null
)
{
if
(
verifyConditionEntities
!=
null
)
{
for
(
FullVerifyConditionEntity
verifyConditionEntity
:
verifyConditionEntities
)
{
for
(
FullVerifyConditionEntity
verifyConditionEntity
:
verifyConditionEntities
)
{
verifyConditionEntity
=
verifyConditionEntities
.
get
(
0
);
verifyConditionEntity
=
verifyConditionEntities
.
get
(
0
);
verifyConditionEntity
.
setConditionStatus
(
verifyStatus
);
verifyConditionEntity
.
setConditionStatus
(
verifyStatus
);
verifyConditionEntity
.
setComplete
(
"1"
);
verifyConditionEntity
.
setComplete
(
"1"
);
// 完成审核通知置灰
// 完成审核通知置灰
NotifyAddBean
addbean
=
new
NotifyAddBean
();
NotifyAddBean
addbean
=
new
NotifyAddBean
();
addbean
.
setVerifId
(
verifyConditionEntity
.
getId
());
addbean
.
setVerifId
(
verifyConditionEntity
.
getId
());
addbean
.
setType
(
"7"
);
addbean
.
setType
(
"7"
);
notifyDao
.
NotifyComplete
(
addbean
);
notifyDao
.
NotifyComplete
(
addbean
);
verifyConditionDao
.
updateByPrimaryKeySelective
(
verifyConditionEntity
);
verifyConditionDao
.
updateByPrimaryKeySelective
(
verifyConditionEntity
);
}
}
}
}
// 如果已提交过论证意见,则记录修改
// 如果已提交过论证意见,则记录修改
if
(
fullRouteVerifyEntity
.
getVerifyStatus
()
!=
"00"
&&
!
fullRouteVerifyEntity
.
getVerifyStatus
().
equals
(
bean
.
getVerifyStatus
()))
{
if
(
fullRouteVerifyEntity
.
getVerifyStatus
()
!=
"00"
&&
!
fullRouteVerifyEntity
.
getVerifyStatus
().
equals
(
bean
.
getVerifyStatus
()))
{
RecordAddBean
addbean
=
new
RecordAddBean
();
RecordAddBean
addbean
=
new
RecordAddBean
();
addbean
.
setId
(
IdWorker
.
getNextId
());
addbean
.
setId
(
IdWorker
.
getNextId
());
addbean
.
setUserCode
(
bean
.
getUserCode
());
addbean
.
setUserCode
(
bean
.
getUserCode
());
...
@@ -233,66 +205,41 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -233,66 +205,41 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
addbean
.
setStatusTo
(
bean
.
getVerifyStatus
());
addbean
.
setStatusTo
(
bean
.
getVerifyStatus
());
addbean
.
setRecordType
(
"02"
);
addbean
.
setRecordType
(
"02"
);
addbean
.
setVerifId
(
bean
.
getVerifId
());
addbean
.
setVerifId
(
bean
.
getVerifId
());
//判断备注是否修改,如果有修改,操作履历添加备注内容
if
(
remarkModify
)
{
addbean
.
setRemarks
(
bean
.
getRemarks
());
}
recordDao
.
insert
(
addbean
);
recordDao
.
insert
(
addbean
);
}
}
// 判断是否保存为草稿
if
(
"1"
.
equals
(
bean
.
getStatus
()))
{
if
(
"0"
.
equals
(
bean
.
getStatus
()))
{
// 如果已经提交,不能变成草稿
/* if ("1".equals(fullRouteVerifyEntity.getStatus()))
if (!"02".equals(fullRouteVerifyEntity.getVerifyStatus())
|| !"03".equals(fullRouteVerifyEntity.getVerifyStatus()))
throw new Exception("提交数据不能修改为草稿");*/
/* // 首次提交论证意见时,记录初次反馈时间
if (verifyStatus == null || "04".equals(verifyStatus) || "".equals(verifyStatus)) {
if (fullRouteVerifyEntity.getStartTime() == null) {
fullRouteVerifyEntity.setStartTime(new Date());
}
}*/
// 提交时
}
else
if
(
"1"
.
equals
(
bean
.
getStatus
()))
{
fullRouteVerifyEntity
.
setEndTime
(
new
Date
());
fullRouteVerifyEntity
.
setEndTime
(
new
Date
());
// 完成截止反馈通知置灰
// 完成截止反馈通知置灰
NotifyAddBean
addbean1
=
new
NotifyAddBean
();
NotifyAddBean
addbean1
=
new
NotifyAddBean
();
addbean1
.
setVerifId
(
bean
.
getVerifId
());
addbean1
.
setVerifId
(
bean
.
getVerifId
());
addbean1
.
setType
(
"2"
);
addbean1
.
setType
(
"2"
);
addbean1
.
setUserCode
(
bean
.
getUserCode
());
addbean1
.
setUserCode
(
bean
.
getUserCode
());
notifyDao
.
NotifyComplete
(
addbean1
);
notifyDao
.
NotifyComplete
(
addbean1
);
// 完成截止反馈通知置灰
// 完成截止反馈通知置灰
NotifyAddBean
addbean2
=
new
NotifyAddBean
();
NotifyAddBean
addbean2
=
new
NotifyAddBean
();
addbean2
.
setVerifId
(
bean
.
getVerifId
());
addbean2
.
setVerifId
(
bean
.
getVerifId
());
addbean2
.
setType
(
"4"
);
addbean2
.
setType
(
"4"
);
addbean2
.
setUserCode
(
bean
.
getUserCode
());
addbean2
.
setUserCode
(
bean
.
getUserCode
());
notifyDao
.
NotifyComplete
(
addbean2
);
notifyDao
.
NotifyComplete
(
addbean2
);
// 论证意见为条件可行或不可行
// 论证意见为条件可行或不可行
if
(
"02"
.
equals
(
verifyStatus
)
||
"03"
.
equals
(
verifyStatus
))
{
if
(
"02"
.
equals
(
verifyStatus
)
||
"03"
.
equals
(
verifyStatus
))
{
/* List<FullVerifyConditionEntity> verifyConditionEntities = this
String
cid
=
IdWorker
.
getNextId
();
.getFullVerifyConditionByRouteIdAndComplete(fullRouteVerifyEntity.getId());
this
.
insertVerifyConditionChild
(
cid
,
verifyStatus
,
fullRouteVerifyEntity
.
getVerifId
(),
null
,
FullVerifyConditionEntity verifyConditionEntity = null;
bean
.
getUserCode
(),
fullRouteVerifyEntity
.
getId
(),
null
);
if (this.verifyConditionEntityExist(verifyConditionEntities)) {
verifyConditionEntity = verifyConditionEntities.get(0);
verifyConditionEntity.setComplete("1");
verifyConditionDao.updateByPrimaryKeySelective(verifyConditionEntity);
this.insertVerifyConditionChild(verifyStatus, fullRouteVerifyEntity.getVerifId(),
verifyConditionEntity.getId(), bean.getUserCode(), fullRouteVerifyEntity.getId());
} else {*/
String
cid
=
IdWorker
.
getNextId
();
this
.
insertVerifyConditionChild
(
cid
,
verifyStatus
,
fullRouteVerifyEntity
.
getVerifId
(),
null
,
bean
.
getUserCode
(),
fullRouteVerifyEntity
.
getId
(),
null
);
// }
NotifyAddBean
addbean
=
new
NotifyAddBean
();
NotifyAddBean
addbean
=
new
NotifyAddBean
();
StringBuffer
sb
=
new
StringBuffer
();
StringBuffer
sb
=
new
StringBuffer
();
// 给运控部发通知,进行条件审核
// AirlineVerifyDetailBean verifybean = new AirlineVerifyDetailBean();
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
sb
.
append
(
"论证单号为"
).
append
(
map
.
get
(
"verifNo"
))
sb
.
append
(
"论证单号为"
).
append
(
map
.
get
(
"verifNo"
))
.
append
(
map
.
get
(
"verifType"
)).
append
(
map
.
get
(
"depName"
)).
append
(
"的航线产生一条论证条件,请尽快审核。"
);
.
append
(
map
.
get
(
"verifType"
)).
append
(
map
.
get
(
"depName"
)).
append
(
"的航线产生一条论证条件,请尽快审核。"
);
StringBuffer
url
=
new
StringBuffer
();
StringBuffer
url
=
new
StringBuffer
();
url
.
append
(
"<<<a href='argument-condition-estimate-check-details.htm?verifId="
).
append
(
bean
.
getVerifId
());
url
.
append
(
"<<<a href='argument-condition-estimate-check-details.htm?verifId="
).
append
(
bean
.
getVerifId
());
url
.
append
(
"&verifNo="
).
append
(
map
.
get
(
"verifNo"
));
url
.
append
(
"&verifNo="
).
append
(
map
.
get
(
"verifNo"
));
url
.
append
(
"&cid="
).
append
(
cid
);
url
.
append
(
"&cid="
).
append
(
cid
);
...
@@ -310,66 +257,30 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -310,66 +257,30 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
addbean
.
setVerifId
(
cid
);
addbean
.
setVerifId
(
cid
);
addbean
.
setConId
(
bean
.
getVerifId
());
addbean
.
setConId
(
bean
.
getVerifId
());
notifyDao
.
saveNotify
(
addbean
);
notifyDao
.
saveNotify
(
addbean
);
// 论证意见为可行或条件满足
}
else
if
(
"01"
.
equals
(
verifyStatus
)||
"04"
.
equals
(
verifyStatus
))
{
/* List<FullVerifyConditionEntity> verifyConditionEntities = this
.getFullVerifyConditionByRouteIdAndComplete(fullRouteVerifyEntity.getId());
FullVerifyConditionEntity verifyConditionEntity = null;
// 判断是否已经全部提交论证意见
if (this.verifyConditionEntityExist(verifyConditionEntities)) {
// 结束论证评估循环
verifyConditionEntity = verifyConditionEntities.get(0);
verifyConditionEntity.setConditionStatus(verifyStatus);
verifyConditionEntity.setComplete("1");
verifyConditionDao.updateByPrimaryKeySelective(verifyConditionEntity);
}*/
/*
* RouteVerifyBean routeVerifyBean = new RouteVerifyBean();
* routeVerifyBean.setVerifId(fullRouteVerifyEntity.getVerifId()
* ); // 判断是否进入论证总结阶段
* this.insertAirlineConclusion(routeVerifyBean,
* bean.getUserCode());
*/
// 最终不可行,结束论证
}
else
if
(
"05"
.
equals
(
verifyStatus
))
{
/* List<FullVerifyConditionEntity> verifyConditionEntities = this
.getFullVerifyConditionByRouteIdAndComplete(fullRouteVerifyEntity.getId());
if (this.verifyConditionEntityExist(verifyConditionEntities)) {
FullVerifyConditionEntity verifyConditionEntity = verifyConditionEntities.get(0);
verifyConditionEntity.setConditionStatus(verifyStatus);
verifyConditionDao.updateByPrimaryKeySelective(verifyConditionEntity);
}*/
}
}
}
}
List
<
Map
<
String
,
String
>>
list
=
bean
.
getRouteFile
();
List
<
Map
<
String
,
String
>>
list
=
bean
.
getRouteFile
();
if
(
list
!=
null
)
{
if
(
list
!=
null
)
{
RouteFileBean
routeFileBean1
=
new
RouteFileBean
();
RouteFileBean
routeFileBean1
=
new
RouteFileBean
();
routeFileBean1
.
setRouteId
(
fullRouteVerifyEntity
.
getId
());
routeFileBean1
.
setRouteId
(
fullRouteVerifyEntity
.
getId
());
dao
.
deleteRouteFile
(
routeFileBean1
);
dao
.
deleteRouteFile
(
routeFileBean1
);
for
(
Map
<
String
,
String
>
m
:
list
)
{
for
(
Map
<
String
,
String
>
m
:
list
)
{
RouteFileBean
routeFileBean
=
new
RouteFileBean
();
RouteFileBean
routeFileBean
=
new
RouteFileBean
();
routeFileBean
.
setId
(
IdWorker
.
getNextId
());
routeFileBean
.
setId
(
IdWorker
.
getNextId
());
routeFileBean
.
setFileName
(
m
.
get
(
"fileName"
));
routeFileBean
.
setFileName
(
m
.
get
(
"fileName"
));
routeFileBean
.
setFilePath
(
m
.
get
(
"filePath"
));
routeFileBean
.
setFilePath
(
m
.
get
(
"filePath"
));
routeFileBean
.
setFileSize
(
String
.
valueOf
(
m
.
get
(
"fileSize"
))
);
routeFileBean
.
setFileSize
(
String
.
valueOf
(
m
.
get
(
"fileSize"
)));
routeFileBean
.
setRouteId
(
fullRouteVerifyEntity
.
getId
());
routeFileBean
.
setRouteId
(
fullRouteVerifyEntity
.
getId
());
routeFileBean
.
setCreateBy
(
bean
.
getUserCode
());
routeFileBean
.
setCreateBy
(
bean
.
getUserCode
());
// dao.deleteRouteFile(routeFileBean);
dao
.
insertRouteFile
(
routeFileBean
);
dao
.
insertRouteFile
(
routeFileBean
);
}
}
}
}
updateRouteVerify
(
fullRouteVerifyEntity
,
bean
);
updateRouteVerify
(
fullRouteVerifyEntity
,
bean
);
if
(
"01"
.
equals
(
verifyStatus
)
||
"04"
.
equals
(
verifyStatus
))
{
if
(
"01"
.
equals
(
verifyStatus
)
||
"04"
.
equals
(
verifyStatus
))
{
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
routeVerifyBean
.
setVerifId
(
fullRouteVerifyEntity
.
getVerifId
());
routeVerifyBean
.
setVerifId
(
fullRouteVerifyEntity
.
getVerifId
());
// 判断是否进入论证总结阶段
// 判断是否进入论证总结阶段
...
@@ -377,25 +288,31 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -377,25 +288,31 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
}
}
return
true
;
return
true
;
}
}
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
public
void
updateReport
(
VerifyStatusBean
bean
)
throws
Exception
{
public
void
updateReport
(
VerifyStatusBean
bean
)
throws
Exception
{
dao
.
updateRouteVerifyReport
(
bean
);
dao
.
updateRouteVerifyReport
(
bean
);
}
}
private
FullRouteVerifyEntity
checkRouteVerifyExist
(
String
verifId
,
String
userCode
)
{
private
FullRouteVerifyEntity
checkRouteVerifyExist
(
String
verifId
,
String
userCode
)
{
if
(
StringUtils
.
isBlank
(
verifId
))
if
(
StringUtils
.
isBlank
(
verifId
))
{
throw
new
IllegalArgumentException
(
"verifId 不能为空"
);
throw
new
IllegalArgumentException
(
"verifId 不能为空"
);
if
(
StringUtils
.
isBlank
(
userCode
))
}
if
(
StringUtils
.
isBlank
(
userCode
))
{
throw
new
IllegalArgumentException
(
"userCode 不能为空"
);
throw
new
IllegalArgumentException
(
"userCode 不能为空"
);
}
VerifyStatusBean
bean
=
new
VerifyStatusBean
();
VerifyStatusBean
bean
=
new
VerifyStatusBean
();
bean
.
setVerifId
(
verifId
);
bean
.
setVerifId
(
verifId
);
bean
.
setUserCode
(
userCode
);
bean
.
setUserCode
(
userCode
);
List
<
FullRouteVerifyEntity
>
fullRouteVerifyEntities
=
dao
.
findByVerifIdUserCode
(
bean
);
List
<
FullRouteVerifyEntity
>
fullRouteVerifyEntities
=
dao
.
findByVerifIdUserCode
(
bean
);
if
(
fullRouteVerifyEntities
.
size
()
==
0
)
if
(
fullRouteVerifyEntities
.
size
()
==
0
)
{
throw
new
RecordNotExistException
(
"FullRouteVerifyEntity 记录不存在"
);
throw
new
RecordNotExistException
(
"FullRouteVerifyEntity 记录不存在"
);
if
(
fullRouteVerifyEntities
.
size
()
>
1
)
}
if
(
fullRouteVerifyEntities
.
size
()
>
1
)
{
throw
new
IlleagalRecordException
(
"FullRouteVerifyEntity 非法的记录"
);
throw
new
IlleagalRecordException
(
"FullRouteVerifyEntity 非法的记录"
);
}
return
fullRouteVerifyEntities
.
get
(
0
);
return
fullRouteVerifyEntities
.
get
(
0
);
}
}
...
@@ -439,7 +356,6 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -439,7 +356,6 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
// 记录论证节点
// 记录论证节点
VerifyProcessAddBean
bean1
=
new
VerifyProcessAddBean
();
VerifyProcessAddBean
bean1
=
new
VerifyProcessAddBean
();
bean1
.
setId
(
IdWorker
.
getNextId
());
bean1
.
setId
(
IdWorker
.
getNextId
());
// bean1.setUserCode(routeVerifyBean.getUserCode());
bean1
.
setProcessValue
(
"route_verify"
);
bean1
.
setProcessValue
(
"route_verify"
);
bean1
.
setVerifId
(
bean
.
getId
());
bean1
.
setVerifId
(
bean
.
getId
());
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
@@ -456,13 +372,13 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -456,13 +372,13 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
NotifyAddBean
addbean
=
new
NotifyAddBean
();
NotifyAddBean
addbean
=
new
NotifyAddBean
();
StringBuffer
sb
=
new
StringBuffer
();
StringBuffer
sb
=
new
StringBuffer
();
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
sb
.
append
(
"论证单号为"
).
append
(
map
.
get
(
"verifNo"
))
sb
.
append
(
"论证单号为"
).
append
(
map
.
get
(
"verifNo"
))
.
append
(
map
.
get
(
"verifType"
)).
append
(
map
.
get
(
"depName"
))
.
append
(
map
.
get
(
"verifType"
)).
append
(
map
.
get
(
"depName"
))
.
append
(
"的航线进入到论证总结阶段,请尽快审核。"
);
.
append
(
"的航线进入到论证总结阶段,请尽快审核。"
);
StringBuffer
url
=
new
StringBuffer
();
StringBuffer
url
=
new
StringBuffer
();
url
.
append
(
"<<<a href='wait-argument-sum-details.htm?verifId="
).
append
(
bean
.
getVerifId
());
url
.
append
(
"<<<a href='wait-argument-sum-details.htm?verifId="
).
append
(
bean
.
getVerifId
());
url
.
append
(
"&verifNo="
).
append
(
map
.
get
(
"verifNo"
));
url
.
append
(
"&verifNo="
).
append
(
map
.
get
(
"verifNo"
));
url
.
append
(
"'>点击查看</a>"
);
url
.
append
(
"'>点击查看</a>"
);
...
@@ -479,25 +395,15 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -479,25 +395,15 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
addbean
.
setVerifId
(
bean
.
getVerifId
());
addbean
.
setVerifId
(
bean
.
getVerifId
());
addbean
.
setConId
(
bean
.
getVerifId
());
addbean
.
setConId
(
bean
.
getVerifId
());
notifyDao
.
saveNotify
(
addbean
);
notifyDao
.
saveNotify
(
addbean
);
}
}
}
}
// private boolean checkVerifyStatus(List<FullRouteVerifyEntity>
// fullRouteVerifyEntities, final String verifyStatus) {
private
void
insertVerifyConditionChild
(
String
id
,
String
verifyStatus
,
String
verifId
,
String
verifyConditionId
,
//
String
userCode
,
String
routeId
,
String
remarks
)
{
// for(FullRouteVerifyEntity fullRouteVerifyEntity :
// fullRouteVerifyEntities){
// if(!verifyStatus.equals(fullRouteVerifyEntity.getVerifyStatus()))
// return false;
// }
// return true;
// }
private
void
insertVerifyConditionChild
(
String
id
,
String
verifyStatus
,
String
verifId
,
String
verifyConditionId
,
String
userCode
,
String
routeId
,
String
remarks
)
{
FullVerifyConditionEntity
verifyConditionEntityNew
=
new
FullVerifyConditionEntity
();
FullVerifyConditionEntity
verifyConditionEntityNew
=
new
FullVerifyConditionEntity
();
verifyConditionEntityNew
.
setId
(
id
);
verifyConditionEntityNew
.
setId
(
id
);
verifyConditionEntityNew
.
setConditionStatus
(
verifyStatus
);
verifyConditionEntityNew
.
setConditionStatus
(
verifyStatus
);
verifyConditionEntityNew
.
setVerifId
(
verifId
);
verifyConditionEntityNew
.
setVerifId
(
verifId
);
...
@@ -514,22 +420,13 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -514,22 +420,13 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
verifyConditionDao
.
insert
(
verifyConditionEntityNew
);
verifyConditionDao
.
insert
(
verifyConditionEntityNew
);
}
}
/* private boolean verifyConditionEntityExist(List<FullVerifyConditionEntity> verifyConditionEntities) {
if (verifyConditionEntities != null) {
if (verifyConditionEntities.size() == 0)
return false;
else if (verifyConditionEntities.size() != 1)
throw new IlleagalRecordException("非法的记录" + FullVerifyConditionEntity.class);
return true;
}
return false;
}*/
/**
/**
* 条件评估提出部门修改可行性意见
* 条件评估提出部门修改可行性意见
* @author zhanglg
*
* @time 2016年10月6日
* @param bean
* @param bean
* @author zhanglg
* @time 2016年10月6日
*/
*/
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
public
void
updateCheckStatus
(
VerifyCheckBean
bean
)
{
public
void
updateCheckStatus
(
VerifyCheckBean
bean
)
{
...
@@ -537,146 +434,118 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -537,146 +434,118 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
FullRouteVerifyEntity
fullRouteVerifyEntity
=
checkRouteVerifyExist
(
bean
.
getVerifId
(),
bean
.
getUserCode
());
FullRouteVerifyEntity
fullRouteVerifyEntity
=
checkRouteVerifyExist
(
bean
.
getVerifId
(),
bean
.
getUserCode
());
// 修改截至反馈时间
// 修改截至反馈时间
fullRouteVerifyEntity
.
setEndTime
(
new
Date
());
fullRouteVerifyEntity
.
setEndTime
(
new
Date
());
// 记录修改
// 记录修改
RecordAddBean
addbean
=
new
RecordAddBean
();
RecordAddBean
addbean
=
new
RecordAddBean
();
addbean
.
setId
(
IdWorker
.
getNextId
());
addbean
.
setId
(
IdWorker
.
getNextId
());
addbean
.
setUserCode
(
bean
.
getUserCode
());
addbean
.
setUserCode
(
bean
.
getUserCode
());
addbean
.
setStatusFrom
(
fullRouteVerifyEntity
.
getVerifyStatus
());
addbean
.
setStatusFrom
(
fullRouteVerifyEntity
.
getVerifyStatus
());
addbean
.
setStatusTo
(
bean
.
getVerifyStatus
());
addbean
.
setStatusTo
(
bean
.
getVerifyStatus
());
addbean
.
setRecordType
(
"02"
);
addbean
.
setRecordType
(
"02"
);
addbean
.
setVerifId
(
bean
.
getVerifId
());
addbean
.
setVerifId
(
bean
.
getVerifId
());
recordDao
.
insert
(
addbean
);
recordDao
.
insert
(
addbean
);
//结束上一循环
List
<
FullVerifyConditionEntity
>
verifyConditionEntities
=
this
.
getFullVerifyConditionByRouteIdAndComplete
(
fullRouteVerifyEntity
.
getId
());
if
(
verifyConditionEntities
!=
null
){
for
(
FullVerifyConditionEntity
verifyConditionEntity
:
verifyConditionEntities
){
verifyConditionEntity
=
verifyConditionEntities
.
get
(
0
);
verifyConditionEntity
.
setConditionStatus
(
verifyStatus
);
verifyConditionEntity
.
setComplete
(
"1"
);
// 条件可行或满足
if
(
"01"
.
equals
(
verifyStatus
)||
"04"
.
equals
(
verifyStatus
))
{
verifyConditionEntity
.
setRemarks
(
bean
.
getCondition
());
}
// 完成审核通知置灰
NotifyAddBean
addbean1
=
new
NotifyAddBean
();
addbean1
.
setVerifId
(
verifyConditionEntity
.
getId
());
addbean1
.
setType
(
"7"
);
notifyDao
.
NotifyComplete
(
addbean1
);
verifyConditionDao
.
updateByPrimaryKeySelective
(
verifyConditionEntity
);
}
}
// 条件可行或满足
/* if ("01".equals(verifyStatus)||"04".equals(verifyStatus)) {
List<FullVerifyConditionEntity> verifyConditionEntities = this
.getFullVerifyConditionByRouteIdAndComplete(fullRouteVerifyEntity.getId());
FullVerifyConditionEntity verifyConditionEntity = null;
// 判断是否已经全部提交论证意见
if (this.verifyConditionEntityExist(verifyConditionEntities)) {
// 结束论证评估循环
verifyConditionEntity = verifyConditionEntities.get(0);
verifyConditionEntity.setConditionStatus(verifyStatus);
verifyConditionEntity.setComplete("1");
verifyConditionDao.updateByPrimaryKeySelective(verifyConditionEntity);
//结束上一循环
List
<
FullVerifyConditionEntity
>
verifyConditionEntities
=
this
.
getFullVerifyConditionByRouteIdAndComplete
(
fullRouteVerifyEntity
.
getId
());
if
(
verifyConditionEntities
!=
null
)
{
for
(
FullVerifyConditionEntity
verifyConditionEntity
:
verifyConditionEntities
)
{
verifyConditionEntity
=
verifyConditionEntities
.
get
(
0
);
verifyConditionEntity
.
setConditionStatus
(
verifyStatus
);
verifyConditionEntity
.
setComplete
(
"1"
);
// 条件可行或满足
if
(
"01"
.
equals
(
verifyStatus
)
||
"04"
.
equals
(
verifyStatus
))
{
verifyConditionEntity
.
setRemarks
(
bean
.
getCondition
());
}
}
}*/
// 完成审核通知置灰
// 论证意见为条件可行或不可行
if
(
"02"
.
equals
(
verifyStatus
)
||
"03"
.
equals
(
verifyStatus
))
{
/* List<FullVerifyConditionEntity> verifyConditionEntities = this
.getFullVerifyConditionByRouteIdAndComplete(fullRouteVerifyEntity.getId());
FullVerifyConditionEntity verifyConditionEntity = null;
// 结束上一论证循环,开始新的论证循环
if (this.verifyConditionEntityExist(verifyConditionEntities)) {
verifyConditionEntity = verifyConditionEntities.get(0);
verifyConditionEntity.setComplete("1");
verifyConditionDao.updateByPrimaryKeySelective(verifyConditionEntity);
this.insertVerifyConditionChild(verifyStatus, fullRouteVerifyEntity.getVerifId(),
verifyConditionEntity.getId(), bean.getUserCode(), fullRouteVerifyEntity.getId());
} else {*/
String
cid
=
IdWorker
.
getNextId
();
this
.
insertVerifyConditionChild
(
cid
,
verifyStatus
,
fullRouteVerifyEntity
.
getVerifId
(),
null
,
bean
.
getUserCode
(),
fullRouteVerifyEntity
.
getId
(),
null
);
// }
// 给运控部发通知,进行条件审核
NotifyAddBean
addbean1
=
new
NotifyAddBean
();
NotifyAddBean
addbean1
=
new
NotifyAddBean
();
StringBuffer
sb
=
new
StringBuffer
();
addbean1
.
setVerifId
(
verifyConditionEntity
.
getId
());
AirlineVerifyDetailBean
verifybean
=
new
AirlineVerifyDetailBean
();
addbean1
.
setType
(
"7"
);
verifybean
.
setVerifId
(
bean
.
getVerifId
());
notifyDao
.
NotifyComplete
(
addbean1
);
// AirlineVerifyDetailEntity VerifyDetailEntity = verifyDao.get(verifybean);
verifyConditionDao
.
updateByPrimaryKeySelective
(
verifyConditionEntity
);
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
sb
.
append
(
"论证单号为"
).
append
(
map
.
get
(
"verifNo"
))
.
append
(
map
.
get
(
"verifType"
)).
append
(
map
.
get
(
"depName"
)).
append
(
"的航线产生一条论证条件,请尽快审核。"
);
StringBuffer
url
=
new
StringBuffer
();
url
.
append
(
"<<<a href='argument-condition-estimate-check-details.htm?verifId="
).
append
(
bean
.
getVerifId
());
url
.
append
(
"&verifNo="
).
append
(
map
.
get
(
"verifNo"
));
url
.
append
(
"&cid="
).
append
(
cid
);
url
.
append
(
"'>点击查看</a>"
);
addbean1
.
setUrl
(
url
.
toString
());
addbean1
.
setType
(
"6"
);
addbean1
.
setContent
(
sb
.
toString
());
addbean1
.
setTitle
(
"条件审核提醒"
);
addbean1
.
setCreateBy
(
bean
.
getUserCode
());
addbean1
.
setUpdateBy
(
bean
.
getUserCode
());
addbean1
.
setCreateDate
(
new
Date
());
addbean1
.
setUpdateDate
(
new
Date
());
addbean1
.
setId
(
IdWorker
.
getNextId
());
addbean1
.
setDepartId
(
"e4q231wdfdfkukjqe53457dgfdhdfhd"
);
addbean1
.
setVerifId
(
cid
);
addbean1
.
setConId
(
bean
.
getVerifId
());
notifyDao
.
saveNotify
(
addbean1
);
}
}
}
// 更新论证意见
// 论证意见为条件可行或不可行
fullRouteVerifyEntity
.
setVerifyStatus
(
bean
.
getVerifyStatus
());
if
(
"02"
.
equals
(
verifyStatus
)
||
"03"
.
equals
(
verifyStatus
))
{
if
(!
"01"
.
equals
(
verifyStatus
)&&!
"04"
.
equals
(
verifyStatus
))
{
String
cid
=
IdWorker
.
getNextId
();
this
.
insertVerifyConditionChild
(
cid
,
verifyStatus
,
fullRouteVerifyEntity
.
getVerifId
(),
null
,
bean
.
getUserCode
(),
fullRouteVerifyEntity
.
getId
(),
null
);
// 给运控部发通知,进行条件审核
NotifyAddBean
addbean1
=
new
NotifyAddBean
();
StringBuffer
sb
=
new
StringBuffer
();
AirlineVerifyDetailBean
verifybean
=
new
AirlineVerifyDetailBean
();
verifybean
.
setVerifId
(
bean
.
getVerifId
());
// AirlineVerifyDetailEntity VerifyDetailEntity = verifyDao.get(verifybean);
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
sb
.
append
(
"论证单号为"
).
append
(
map
.
get
(
"verifNo"
))
.
append
(
map
.
get
(
"verifType"
)).
append
(
map
.
get
(
"depName"
)).
append
(
"的航线产生一条论证条件,请尽快审核。"
);
StringBuffer
url
=
new
StringBuffer
();
url
.
append
(
"<<<a href='argument-condition-estimate-check-details.htm?verifId="
).
append
(
bean
.
getVerifId
());
url
.
append
(
"&verifNo="
).
append
(
map
.
get
(
"verifNo"
));
url
.
append
(
"&cid="
).
append
(
cid
);
url
.
append
(
"'>点击查看</a>"
);
addbean1
.
setUrl
(
url
.
toString
());
addbean1
.
setType
(
"6"
);
addbean1
.
setContent
(
sb
.
toString
());
addbean1
.
setTitle
(
"条件审核提醒"
);
addbean1
.
setCreateBy
(
bean
.
getUserCode
());
addbean1
.
setUpdateBy
(
bean
.
getUserCode
());
addbean1
.
setCreateDate
(
new
Date
());
addbean1
.
setUpdateDate
(
new
Date
());
addbean1
.
setId
(
IdWorker
.
getNextId
());
addbean1
.
setDepartId
(
"e4q231wdfdfkukjqe53457dgfdhdfhd"
);
addbean1
.
setVerifId
(
cid
);
addbean1
.
setConId
(
bean
.
getVerifId
());
notifyDao
.
saveNotify
(
addbean1
);
}
// 更新论证意见
fullRouteVerifyEntity
.
setVerifyStatus
(
bean
.
getVerifyStatus
());
if
(!
"01"
.
equals
(
verifyStatus
)
&&
!
"04"
.
equals
(
verifyStatus
))
{
fullRouteVerifyEntity
.
setCondition
(
bean
.
getCondition
());
fullRouteVerifyEntity
.
setCondition
(
bean
.
getCondition
());
}
}
fullRouteVerifyEntity
.
setUpdateDate
(
new
Date
());
fullRouteVerifyEntity
.
setUpdateDate
(
new
Date
());
fullRouteVerifyEntity
.
setUpdateBy
(
bean
.
getUserCode
());
fullRouteVerifyEntity
.
setUpdateBy
(
bean
.
getUserCode
());
dao
.
updateByPrimaryKeySelective
(
fullRouteVerifyEntity
);
dao
.
updateByPrimaryKeySelective
(
fullRouteVerifyEntity
);
if
(
"01"
.
equals
(
verifyStatus
)||
"04"
.
equals
(
verifyStatus
))
{
if
(
"01"
.
equals
(
verifyStatus
)
||
"04"
.
equals
(
verifyStatus
))
{
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
routeVerifyBean
.
setVerifId
(
fullRouteVerifyEntity
.
getVerifId
());
routeVerifyBean
.
setVerifId
(
fullRouteVerifyEntity
.
getVerifId
());
// 判断是否进入论证总结阶段
// 判断是否进入论证总结阶段
this
.
insertAirlineConclusion
(
routeVerifyBean
,
bean
.
getUserCode
());
this
.
insertAirlineConclusion
(
routeVerifyBean
,
bean
.
getUserCode
());
}
}
}
}
public
void
sendmail
(
VerifyStatusBean
bean
)
{
public
void
sendmail
(
VerifyStatusBean
bean
)
{
List
<
String
>
mails
=
verifyDao
.
getmail
(
"6"
);
List
<
String
>
mails
=
verifyDao
.
getmail
(
"6"
);
if
(
mails
==
null
||
mails
.
size
()==
0
)
return
;
if
(
mails
==
null
||
mails
.
size
()
==
0
)
{
return
;
}
String
templateName
=
"template_6.ftl"
;
String
templateName
=
"template_6.ftl"
;
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
Map
<
String
,
String
>
map
=
verifyDao
.
getDetail
(
bean
.
getVerifId
());
map
.
put
(
"url"
,
"https://ifos.jdair.net/im/login"
);
map
.
put
(
"url"
,
"https://ifos.jdair.net/im/login"
);
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depName"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depName"
),
map
.
get
(
"arrName"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
map
.
put
(
"depIata"
,
PlanUtil
.
GetLine
(
map
.
get
(
"depIata"
),
map
.
get
(
"arrIata"
),
map
.
get
(
"roundtripType"
),
map
.
get
(
"vertype"
)));
try
{
try
{
String
flight
=
PlanUtil
.
flightContent
(
map
);
String
flight
=
PlanUtil
.
flightContent
(
map
);
String
line
=
PlanUtil
.
lineContent
(
map
);
String
line
=
PlanUtil
.
lineContent
(
map
);
map
.
put
(
"line"
,
line
);
map
.
put
(
"line"
,
line
);
if
(
"02"
.
equals
(
bean
.
getVerifyStatus
()))
{
if
(
"02"
.
equals
(
bean
.
getVerifyStatus
()))
{
map
.
put
(
"feedback"
,
"不可行"
);
map
.
put
(
"feedback"
,
"不可行"
);
}
else
if
(
"03"
.
equals
(
bean
.
getVerifyStatus
()))
{
}
else
if
(
"03"
.
equals
(
bean
.
getVerifyStatus
()))
{
map
.
put
(
"feedback"
,
"条件可行"
);
map
.
put
(
"feedback"
,
"条件可行"
);
}
else
{
}
else
{
return
;
return
;
}
}
map
.
put
(
"condition"
,
bean
.
getCondition
());
map
.
put
(
"condition"
,
bean
.
getCondition
());
DepartEntity
entity
=
departDao
.
getByUserCode
(
bean
.
getUserCode
());
DepartEntity
entity
=
departDao
.
getByUserCode
(
bean
.
getUserCode
());
map
.
put
(
"backName"
,
entity
.
getDepartName
());
map
.
put
(
"backName"
,
entity
.
getDepartName
());
String
title
=
"首都航空关于"
+
flight
;
String
title
=
"首都航空关于"
+
flight
;
VerifyEmailHandler
.
getInstance
().
sendEmail
(
title
+
"的论证条件流转的提示(智能首航论证系统提示)"
,
com
.
ejweb
.
core
.
util
.
TemplateFactory
.
generateHtmlFromFtl
(
templateName
,
map
),
mails
,
null
);
VerifyEmailHandler
.
getInstance
().
sendEmail
(
title
+
"的论证条件流转的提示(智能首航论证系统提示)"
,
com
.
ejweb
.
core
.
util
.
TemplateFactory
.
generateHtmlFromFtl
(
templateName
,
map
),
mails
,
null
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
// TODO Auto-generated catch block
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -684,53 +553,56 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
...
@@ -684,53 +553,56 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
// TODO Auto-generated catch block
// TODO Auto-generated catch block
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
public
void
updateDeport
(
AirlineVerifiedAddBean
bean
)
{
public
void
updateDeport
(
AirlineVerifiedAddBean
bean
)
{
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
AirlineVerifyEntity
airlineVerifyEntity
=
new
AirlineVerifyEntity
();
AirlineVerifyEntity
airlineVerifyEntity
=
new
AirlineVerifyEntity
();
routeVerifyBean
.
setVerifId
(
bean
.
getVerifId
());
routeVerifyBean
.
setVerifId
(
bean
.
getVerifId
());
List
<
RouteVerifyEntity
>
list
=
dao
.
findlist
(
routeVerifyBean
);
//查询之前的部门
//查询之前的部门
List
<
AirlineVerifiedAddBean
.
Deport
>
verifyDeparts
=
bean
.
getVerifyDepartIds
();
List
<
RouteVerifyEntity
>
list
=
dao
.
findlist
(
routeVerifyBean
);
AirlineVerifyDetailBean
airlineVerifyDetailBean
=
new
AirlineVerifyDetailBean
();
List
<
AirlineVerifiedAddBean
.
Deport
>
verifyDeparts
=
bean
.
getVerifyDepartIds
();
AirlineVerifyDetailBean
airlineVerifyDetailBean
=
new
AirlineVerifyDetailBean
();
airlineVerifyDetailBean
.
setUserCode
(
bean
.
getVerifId
());
airlineVerifyDetailBean
.
setUserCode
(
bean
.
getVerifId
());
airlineVerifyEntity
=
airlineVerifyDao
.
getEntityByVerify
(
airlineVerifyDetailBean
);
airlineVerifyEntity
=
airlineVerifyDao
.
getEntityByVerify
(
airlineVerifyDetailBean
);
RouteverifyEntity
routeverifyEntity
=
new
RouteverifyEntity
();
RouteverifyEntity
routeverifyEntity
=
new
RouteverifyEntity
();
UserEntity
entity
=
new
UserEntity
();
UserEntity
entity
=
new
UserEntity
();
entity
.
setUsercode
(
bean
.
getUserCode
());
entity
.
setUsercode
(
bean
.
getUserCode
());
User
user
=
userdao
.
getUserByUserCode
(
entity
);
User
user
=
userdao
.
getUserByUserCode
(
entity
);
if
(
airlineVerifyEntity
!=
null
)
{
if
(
airlineVerifyEntity
!=
null
)
{
//如果isExist为1说明部门已经存在,不需要添加,如果为-1说明已经删除,需要删除
int
isExist
=
0
;
//如果isExist为1说明部门已经存在,不需要添加,如果为-1说明已经删除,需要删除
int
isExist
=
0
;
for
(
int
i
=
0
;
i
<
verifyDeparts
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
verifyDeparts
.
size
();
i
++)
{
isExist
=
0
;
isExist
=
0
;
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++)
{
if
(
verifyDeparts
.
get
(
i
).
getDepartId
().
equals
(
list
.
get
(
j
).
getDepartId
())){
//已经存在的部门
//已经存在的部门
isExist
=
1
;
if
(
verifyDeparts
.
get
(
i
).
getDepartId
().
equals
(
list
.
get
(
j
).
getDepartId
()))
{
list
.
remove
(
j
);
isExist
=
1
;
break
;
list
.
remove
(
j
);
}
break
;
}
}
if
(
isExist
==
0
){
//如果是新加的部门,就执行新增
}
//如果是新加的部门,就执行新增
routeverifyEntity
.
setDeportId
(
verifyDeparts
.
get
(
i
).
getDepartId
());
if
(
isExist
==
0
)
{
routeverifyEntity
.
setVerifStatus
(
"00"
);
routeverifyEntity
.
setId
(
IdWorker
.
getNextId
());
routeverifyEntity
.
setDeportId
(
verifyDeparts
.
get
(
i
).
getDepartId
());
routeverifyEntity
.
setVerifyId
(
bean
.
getVerifId
());
routeverifyEntity
.
setVerifStatus
(
"00"
);
routeverifyEntity
.
setCreateDate
(
new
Date
());
routeverifyEntity
.
setId
(
IdWorker
.
getNextId
());
routeverifyEntity
.
setUpdateDate
(
new
Date
());
routeverifyEntity
.
setVerifyId
(
bean
.
getVerifId
());
routeverifyEntity
.
setCreateBy
(
user
.
getName
());
routeverifyEntity
.
setCreateDate
(
new
Date
());
routeverifyEntity
.
setUpdateBy
(
user
.
getName
());
routeverifyEntity
.
setUpdateDate
(
new
Date
());
airlineVerifiedDao
.
insertRouteverify
(
routeverifyEntity
);
routeverifyEntity
.
setCreateBy
(
user
.
getName
());
}
routeverifyEntity
.
setUpdateBy
(
user
.
getName
());
airlineVerifiedDao
.
insertRouteverify
(
routeverifyEntity
);
}
}
}
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++)
{
routeverifyEntity
.
setVerifyId
(
bean
.
getVerifId
());
routeverifyEntity
.
setVerifyId
(
bean
.
getVerifId
());
routeverifyEntity
.
setDeportId
(
list
.
get
(
j
).
getDepartId
());
routeverifyEntity
.
setDeportId
(
list
.
get
(
j
).
getDepartId
());
dao
.
deleteRouteverify
(
routeverifyEntity
);
dao
.
deleteRouteverify
(
routeverifyEntity
);
}
}
}
}
}
}
}
}
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