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
356eef46
Commit
356eef46
authored
Mar 30, 2020
by
Lenovo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调机修改
parent
391f3fe5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
223 additions
and
74 deletions
+223
-74
CondationDao.xml
resources/mapper/modules/verify/CondationDao.xml
+0
-0
VerifyFeedbackDao.xml
resources/mapper/modules/verify/VerifyFeedbackDao.xml
+13
-7
RouteVerifyService.java
src/com/ejweb/modules/route/service/RouteVerifyService.java
+21
-24
ConditionController.java
src/com/ejweb/modules/verify/api/ConditionController.java
+63
-34
ConditionUpdateBean.java
src/com/ejweb/modules/verify/bean/ConditionUpdateBean.java
+16
-0
ConditionDao.java
src/com/ejweb/modules/verify/dao/ConditionDao.java
+43
-0
VerifyFeedbackDao.java
src/com/ejweb/modules/verify/dao/VerifyFeedbackDao.java
+2
-0
ConditionDetailData.java
src/com/ejweb/modules/verify/data/ConditionDetailData.java
+9
-0
VerifyFeedbackDetailEntity.java
src/com/ejweb/modules/verify/entity/VerifyFeedbackDetailEntity.java
+9
-0
ConditionService.java
src/com/ejweb/modules/verify/service/ConditionService.java
+31
-2
VerifyFeedbackService.java
src/com/ejweb/modules/verify/service/VerifyFeedbackService.java
+16
-7
No files found.
resources/mapper/modules/verify/CondationDao.xml
View file @
356eef46
This diff is collapsed.
Click to expand it.
resources/mapper/modules/verify/VerifyFeedbackDao.xml
View file @
356eef46
...
...
@@ -130,6 +130,7 @@
WHERE
a.del_flag = #{DEL_FLAG_NORMAL}
AND (s.is_feed='1' OR s.is_feed='2') AND s.complete='0'
-- AND s.is_feed='0' AND s.complete='0'
AND s.depart_id = (SELECT depart_id FROM sys_user_profiles WHERE user_id = #{userCode})
UNION ALL
SELECT
...
...
@@ -250,6 +251,7 @@
a.del_flag = #{DEL_FLAG_NORMAL}
AND a.verif_id = #{verifId}
AND f.depart_id = #{userDepartId}
-- AND f.feedback_status='00'
group by a.verif_id,f.depart_id
</when>
<otherwise>
...
...
@@ -293,6 +295,7 @@
select v.id as conditionId,
v.`condition`,
v.is_feed as feedStatus,
v.review_type,
case WHEN v.is_feed!='0' THEN DATE_FORMAT(v.update_date, '%Y-%m-%d')
else '' end conditionDate
from foc_verify_condition v
...
...
@@ -326,14 +329,17 @@
<update
id=
"updateCondition"
>
UPDATE foc_verify_condition
SET is_feed = "2"
WHERE id IN (
SELECT DISTINCT condition_id
FROM foc_condition_feedback
WHERE verif_id = #{verifId}
AND del_flag = #{DEL_FLAG_NORMAL}
AND depart_id = #{departId}
)
WHERE id=#{conditionId}
</update>
<select
id=
"getUnfinishCount"
resultType=
"Integer"
>
select count(id)
from foc_verify_condition
where verif_id=#{verifyId}
and complete=0
and del_flag=0
</select>
<!-- 查询未反馈论证条件评估的数量 -->
<select
id=
"getFeedbackStatus"
resultType=
"Integer"
>
SELECT COUNT(*)
...
...
src/com/ejweb/modules/route/service/RouteVerifyService.java
View file @
356eef46
...
...
@@ -167,6 +167,11 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
@Transactional
(
readOnly
=
false
)
public
Boolean
updateVerifyStatus
(
VerifyStatusBean
bean
)
throws
Exception
{
DepartEntity
departEntity
=
departDao
.
getByUserCode
(
bean
.
getUserCode
());
if
(
departEntity
==
null
)
{
return
false
;
}
bean
.
setDepartId
(
departEntity
.
getId
());
final
String
verifyStatus
=
bean
.
getVerifyStatus
();
if
(
dao
.
checkDepartIdWithUserCodeAndId
(
bean
)
<=
0
)
{
...
...
@@ -273,9 +278,19 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
// 论证意见为条件可行或不可行
if
(
"02"
.
equals
(
verifyStatus
)
||
"03"
.
equals
(
verifyStatus
))
{
List
<
String
>
departConditions
=
conditionDao
.
getDepartConditions
(
bean
);
for
(
FullVerifyConditionEntity
condition
:
bean
.
getConditions
())
{
if
(!
StringUtils
.
isEmpty
(
condition
.
getId
()))
{
if
(
departConditions
.
contains
(
condition
.
getId
()))
{
departConditions
.
remove
(
condition
.
getId
());
}
}
this
.
addVerifyCondition
(
fullRouteVerifyEntity
,
verifyStatus
,
bean
.
getUserCode
(),
condition
);
}
if
(!
CollectionUtils
.
isEmpty
(
departConditions
))
{
conditionDao
.
deleteConditionById
(
departConditions
);
conditionDao
.
deleteFeedbackBatch
(
departConditions
);
}
NotifyAddBean
addbean
=
new
NotifyAddBean
();
StringBuffer
sb
=
new
StringBuffer
();
...
...
@@ -442,28 +457,6 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
}
}
private
void
insertVerifyConditionChild
(
String
id
,
String
verifyStatus
,
String
verifId
,
String
verifyConditionId
,
String
userCode
,
String
routeId
,
String
remarks
,
String
condition
)
{
FullVerifyConditionEntity
verifyConditionEntityNew
=
new
FullVerifyConditionEntity
();
verifyConditionEntityNew
.
setId
(
id
);
verifyConditionEntityNew
.
setConditionStatus
(
verifyStatus
);
verifyConditionEntityNew
.
setVerifId
(
verifId
);
verifyConditionEntityNew
.
setParentId
(
verifyConditionId
);
verifyConditionEntityNew
.
setCreateBy
(
userCode
);
verifyConditionEntityNew
.
setCreateDate
(
new
Date
());
verifyConditionEntityNew
.
setUpdateBy
(
userCode
);
verifyConditionEntityNew
.
setUpdateDate
(
new
Date
());
verifyConditionEntityNew
.
setComplete
(
"0"
);
verifyConditionEntityNew
.
setIsFeed
(
"0"
);
verifyConditionEntityNew
.
setRouteId
(
routeId
);
verifyConditionEntityNew
.
setCondition
(
condition
);
verifyConditionEntityNew
.
setDepartId
(
dao
.
getDepartId
(
userCode
));
verifyConditionEntityNew
.
setRemarks
(
remarks
);
verifyConditionDao
.
insert
(
verifyConditionEntityNew
);
}
private
void
addVerifyCondition
(
FullRouteVerifyEntity
routeVerifyEntity
,
String
verifuStatus
,
String
userCode
,
FullVerifyConditionEntity
conditionEntity
)
{
conditionEntity
.
setConditionStatus
(
verifuStatus
);
conditionEntity
.
setVerifId
(
routeVerifyEntity
.
getVerifId
());
...
...
@@ -475,12 +468,16 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
conditionEntity
.
setIsFeed
(
"0"
);
conditionEntity
.
setRouteId
(
routeVerifyEntity
.
getId
());
conditionEntity
.
setDepartId
(
dao
.
getDepartId
(
userCode
));
if
(
conditionEntity
.
getId
()
==
null
)
{
if
(
StringUtils
.
isEmpty
(
conditionEntity
.
getId
())
)
{
String
cid
=
IdWorker
.
getNextId
();
conditionEntity
.
setId
(
cid
);
verifyConditionDao
.
insert
(
conditionEntity
);
}
else
{
verifyConditionDao
.
updateByPrimaryKeySelective
(
conditionEntity
);
ConditionDetailData
data
=
conditionDao
.
findById
(
conditionEntity
.
getId
());
if
(
data
!=
null
)
{
}
conditionDao
.
updateByPrimaryKey
(
conditionEntity
);
}
}
...
...
src/com/ejweb/modules/verify/api/ConditionController.java
View file @
356eef46
/**
*
*
*/
package
com
.
ejweb
.
modules
.
verify
.
api
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ejweb.core.api.RequestBean
;
import
com.ejweb.core.api.ResponseBean
;
import
com.ejweb.core.base.PageEntity
;
...
...
@@ -30,22 +16,36 @@ import com.ejweb.modules.verify.entity.ConditionDetailEntity;
import
com.ejweb.modules.verify.entity.ConditionEntity
;
import
com.ejweb.modules.verify.service.AirlineVerifyService
;
import
com.ejweb.modules.verify.service.ConditionService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* 论证条件评估审核
* @team IT Team
* @author zhanglg
* @version 1.0
* @time
2016年9月12日
* @time 2016年9月12日
*/
@Controller
@RequestMapping
(
"/api/condition"
)
public
class
ConditionController
{
@Autowired
private
ConditionService
conditionService
;
@Autowired
AirlineVerifyService
airLineVerifyService
;
/**
* 获取论证列表
* @param requestBean
...
...
@@ -55,11 +55,13 @@ public class ConditionController {
@RequestMapping
(
"list"
)
public
ResponseBean
list
(
RequestBean
requestBean
)
{
ResponseBean
responseBean
=
new
ResponseBean
();
ConditionBean
bean
=
requestBean
.
getObjectBean
(
ConditionBean
.
class
);
ConditionBean
bean
=
requestBean
.
getObjectBean
(
ConditionBean
.
class
);
String
message
=
conditionService
.
validate
(
bean
);
if
(
message
==
null
){
// 通过参数校验
// 通过参数校验
if
(
message
==
null
)
{
PageEntity
<
ConditionEntity
>
list
=
conditionService
.
findList
(
bean
);
if
(
list
==
null
){
// 查询结果为空
// 查询结果为空
if
(
list
==
null
)
{
responseBean
.
setMessage
(
GConstants
.
EMPTY
);
responseBean
.
setStatus
(
ErrorCode
.
STATUS_CODE_2001
);
return
responseBean
;
...
...
@@ -72,14 +74,15 @@ public class ConditionController {
responseBean
.
setStatus
(
ErrorCode
.
STATUS_CODE_4001
);
return
responseBean
;
}
@ResponseBody
@RequestMapping
(
"update"
)
public
ResponseBean
update
(
RequestBean
requestBean
)
{
ResponseBean
responseBean
=
new
ResponseBean
();
ConditionUpdateBean
bean
=
requestBean
.
getObjectBean
(
ConditionUpdateBean
.
class
);
ConditionUpdateBean
bean
=
requestBean
.
getObjectBean
(
ConditionUpdateBean
.
class
);
String
message
=
conditionService
.
validate
(
bean
);
if
(
message
==
null
){
// 通过参数校验
// 通过参数校验
if
(
message
==
null
)
{
conditionService
.
updateAndAdd
(
bean
);
return
responseBean
;
}
...
...
@@ -88,16 +91,40 @@ public class ConditionController {
responseBean
.
setStatus
(
ErrorCode
.
STATUS_CODE_4001
);
return
responseBean
;
}
@ResponseBody
@RequestMapping
(
"reviewUpdate"
)
public
ResponseBean
reviewUpdate
(
RequestBean
requestBean
)
{
ResponseBean
responseBean
=
new
ResponseBean
();
ConditionUpdateBean
bean
=
requestBean
.
getObjectBean
(
ConditionUpdateBean
.
class
);
String
message
=
""
;
if
(
StringUtils
.
isEmpty
(
bean
.
getConditionId
()))
{
message
=
"conditionId不能为空"
;
}
// 通过参数校验
if
(
StringUtils
.
isEmpty
(
message
))
{
message
=
conditionService
.
updateReview
(
bean
);
if
(
StringUtils
.
isEmpty
(
message
))
{
return
responseBean
;
}
}
// 参数校验为通过
responseBean
.
setMessage
(
message
);
responseBean
.
setStatus
(
ErrorCode
.
STATUS_CODE_4001
);
return
responseBean
;
}
@ResponseBody
@RequestMapping
(
"detail"
)
public
ResponseBean
detail
(
RequestBean
requestBean
)
{
ResponseBean
responseBean
=
new
ResponseBean
();
ConditionDetailBean
bean
=
requestBean
.
getObjectBean
(
ConditionDetailBean
.
class
);
ConditionDetailBean
bean
=
requestBean
.
getObjectBean
(
ConditionDetailBean
.
class
);
String
message
=
conditionService
.
validate
(
bean
);
if
(
message
==
null
){
// 通过参数校验
// 通过参数校验
if
(
message
==
null
)
{
ConditionDetailEntity
entity
=
conditionService
.
getDetail
(
bean
);
if
(
entity
==
null
){
// 查询结果为空
// 查询结果为空
if
(
entity
==
null
)
{
responseBean
.
setMessage
(
GConstants
.
EMPTY
);
responseBean
.
setStatus
(
ErrorCode
.
STATUS_CODE_2001
);
return
responseBean
;
...
...
@@ -110,22 +137,24 @@ public class ConditionController {
responseBean
.
setStatus
(
ErrorCode
.
STATUS_CODE_4001
);
return
responseBean
;
}
@RequestMapping
(
"export"
)
public
void
export
(
RequestBean
requestBean
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ConditionBean
bean
=
requestBean
.
getObjectBean
(
ConditionBean
.
class
);
ConditionBean
bean
=
requestBean
.
getObjectBean
(
ConditionBean
.
class
);
bean
.
setPageNo
(
1
);
bean
.
setPageSize
(
10000
);
String
message
=
conditionService
.
validate
(
bean
);
if
(
message
==
null
){
// 通过参数校验
// 通过参数校验
if
(
message
==
null
)
{
PageEntity
<
ConditionEntity
>
page
=
conditionService
.
findList
(
bean
);
List
<
ConditionEntity
>
list
=
new
ArrayList
<
ConditionEntity
>();
if
(
page
!=
null
&&
page
.
getList
()!=
null
)
list
=
page
.
getList
();
if
(
list
==
null
)
{
list
=
new
ArrayList
<
ConditionEntity
>();
if
(
page
!=
null
&&
page
.
getList
()
!=
null
)
list
=
page
.
getList
();
if
(
list
==
null
)
{
list
=
new
ArrayList
<
>();
}
String
fileName
=
"论证条件评估审核"
+
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
).
format
(
new
Date
())+
".xlsx"
;
String
fileName
=
"论证条件评估审核"
+
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
).
format
(
new
Date
())
+
".xlsx"
;
try
{
new
ExportExcel
(
"论证条件评估审核"
,
ConditionEntity
.
class
).
setDataList
(
list
).
write
(
response
,
fileName
).
dispose
();
}
catch
(
IOException
e
)
{
...
...
src/com/ejweb/modules/verify/bean/ConditionUpdateBean.java
View file @
356eef46
...
...
@@ -25,6 +25,9 @@ public class ConditionUpdateBean extends GenericBean {
private
List
<
DepartIds
>
departIds
;
@NotEmpty
(
message
=
"userCode不能为空"
)
private
String
userCode
;
@NotEmpty
(
message
=
"reviewType不能为空"
)
private
String
reviewType
;
private
String
departId
;
public
String
getVerifId
()
{
return
verifId
;
...
...
@@ -67,8 +70,21 @@ public class ConditionUpdateBean extends GenericBean {
this
.
userCode
=
userCode
;
}
public
String
getReviewType
()
{
return
reviewType
;
}
public
void
setReviewType
(
String
reviewType
)
{
this
.
reviewType
=
reviewType
;
}
public
String
getDepartId
()
{
return
departId
;
}
public
void
setDepartId
(
String
departId
)
{
this
.
departId
=
departId
;
}
public
static
class
DepartIds
{
private
String
id
=
IdWorker
.
getNextId
();
...
...
src/com/ejweb/modules/verify/dao/ConditionDao.java
View file @
356eef46
...
...
@@ -4,6 +4,7 @@
package
com
.
ejweb
.
modules
.
verify
.
dao
;
import
com.ejweb.core.base.BaseDao
;
import
com.ejweb.modules.route.bean.VerifyStatusBean
;
import
com.ejweb.modules.verify.bean.ConditionBean
;
import
com.ejweb.modules.verify.bean.ConditionDetailBean
;
import
com.ejweb.modules.verify.bean.ConditionUpdateBean
;
...
...
@@ -11,6 +12,7 @@ import com.ejweb.modules.verify.bean.FeedbackAddBean;
import
com.ejweb.modules.verify.data.ConditionDetailData
;
import
com.ejweb.modules.verify.entity.ConditionDetailEntity
;
import
com.ejweb.modules.verify.entity.ConditionEntity
;
import
com.ejweb.modules.verify.entity.FullVerifyConditionEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -25,6 +27,7 @@ import java.util.Map;
*/
public
interface
ConditionDao
extends
BaseDao
{
List
<
ConditionEntity
>
findList
(
ConditionBean
bean
);
int
insertfeedback
(
FeedbackAddBean
feedbean
);
...
...
@@ -33,6 +36,16 @@ public interface ConditionDao extends BaseDao {
int
deleteFeedback
(
ConditionUpdateBean
bean
);
int
deleteFeedbackBatch
(
List
list
);
/**
* 根据conditionId更新reviewType(复核类型)
*
* @param bean
* @return
*/
int
updateReviewType
(
ConditionUpdateBean
bean
);
ConditionDetailEntity
getDetail
(
ConditionDetailBean
bean
);
List
<
ConditionDetailData
>
findByVerifyIdAndDepartId
(
@Param
(
value
=
"verifId"
)
String
verifId
,
@Param
(
value
=
"departId"
)
String
departId
);
...
...
@@ -40,4 +53,34 @@ public interface ConditionDao extends BaseDao {
List
<
ConditionEntity
>
findAllList
(
ConditionBean
bean
);
Map
<
String
,
String
>
getCondition
(
String
conditionId
);
/**
* 查询条件下所有未反馈的数量
*
* @param conditionId
* @return
*/
int
checkCompleteStatus
(
String
conditionId
);
/**
* 完成条件
*
* @param bean
* @return
*/
int
updateConditionComplete
(
ConditionUpdateBean
bean
);
/**
* 根据ID查询详情
*
* @param conditionId
* @return
*/
ConditionDetailData
findById
(
String
conditionId
);
int
updateByPrimaryKey
(
FullVerifyConditionEntity
record
);
List
<
String
>
getDepartConditions
(
VerifyStatusBean
bean
);
int
deleteConditionById
(
List
list
);
}
src/com/ejweb/modules/verify/dao/VerifyFeedbackDao.java
View file @
356eef46
...
...
@@ -39,6 +39,8 @@ public interface VerifyFeedbackDao extends BaseDao{
List
<
ConditionDetailData
>
findByVerifyIdAndDepartId
(
VerifyFeedbackDetailBean
bean
);
int
getUnfinishCount
(
String
verifyId
);
// 更新反馈信息
int
updateFeedback
(
VerifyFeedbackUpdateBean
bean
);
// 全部反馈后,更新反馈状态
...
...
src/com/ejweb/modules/verify/data/ConditionDetailData.java
View file @
356eef46
...
...
@@ -13,6 +13,7 @@ public class ConditionDetailData {
private
String
condition
;
private
String
conditionDate
;
private
int
feedStatus
;
private
String
reviewType
;
private
List
<
Map
<
String
,
String
>>
departIds
;
public
String
getConditionId
()
{
...
...
@@ -54,4 +55,12 @@ public class ConditionDetailData {
public
void
setDepartIds
(
List
<
Map
<
String
,
String
>>
departIds
)
{
this
.
departIds
=
departIds
;
}
public
String
getReviewType
()
{
return
reviewType
;
}
public
void
setReviewType
(
String
reviewType
)
{
this
.
reviewType
=
reviewType
;
}
}
src/com/ejweb/modules/verify/entity/VerifyFeedbackDetailEntity.java
View file @
356eef46
...
...
@@ -18,6 +18,7 @@ public class VerifyFeedbackDetailEntity extends BaseEntity {
private
String
verifyStatus
;
private
String
departId
;
private
String
verifNo
;
private
int
conditionComplete
;
private
List
<
ConditionDetailData
>
conditions
;
public
String
getVerifId
()
{
...
...
@@ -67,4 +68,12 @@ public class VerifyFeedbackDetailEntity extends BaseEntity {
public
void
setConditions
(
List
<
ConditionDetailData
>
conditions
)
{
this
.
conditions
=
conditions
;
}
public
int
getConditionComplete
()
{
return
conditionComplete
;
}
public
void
setConditionComplete
(
int
conditionComplete
)
{
this
.
conditionComplete
=
conditionComplete
;
}
}
src/com/ejweb/modules/verify/service/ConditionService.java
View file @
356eef46
...
...
@@ -8,6 +8,7 @@ import com.ejweb.core.base.PageEntity;
import
com.ejweb.core.util.IdWorker
;
import
com.ejweb.core.util.PlanUtil
;
import
com.ejweb.core.util.VerifyEmailHandler
;
import
com.ejweb.modules.depart.dao.DepartDao
;
import
com.ejweb.modules.notify.bean.NotifyAddBean
;
import
com.ejweb.modules.notify.dao.NotifyDao
;
import
com.ejweb.modules.verify.bean.*
;
...
...
@@ -43,6 +44,8 @@ public class ConditionService extends BaseService<ConditionDao> {
AirlineVerifyDao
verifyDao
;
@Autowired
NotifyDao
notifyDao
;
@Autowired
DepartDao
departDao
;
public
PageEntity
<
ConditionEntity
>
findList
(
ConditionBean
bean
)
{
PageInfo
<
ConditionEntity
>
pageInfo
=
null
;
...
...
@@ -53,7 +56,7 @@ public class ConditionService extends BaseService<ConditionDao> {
}
else
{
PageHelper
.
orderBy
(
bean
.
getSort
());
}
pageInfo
=
new
PageInfo
<
ConditionEntity
>(
dao
.
findList
(
bean
));
pageInfo
=
new
PageInfo
<>(
dao
.
findList
(
bean
));
// 页码大于总页数,则返回NULL
if
(
pageInfo
.
getPages
()
<
bean
.
getPageNo
())
{
return
null
;
...
...
@@ -61,7 +64,7 @@ public class ConditionService extends BaseService<ConditionDao> {
List
<
ConditionEntity
>
list
=
pageInfo
.
getList
();
// 如果没有数据则返回NULL
if
(
list
==
null
||
list
.
size
()
==
0
)
{
return
new
PageEntity
<
ConditionEntity
>();
return
new
PageEntity
<>();
}
for
(
ConditionEntity
entity
:
list
)
{
List
<
Map
<
String
,
String
>>
list1
=
verifyDao
.
getConnectList
(
entity
.
getVerifId
());
...
...
@@ -98,6 +101,8 @@ public class ConditionService extends BaseService<ConditionDao> {
dao
.
updateFeedback
(
bean
);
dao
.
deleteFeedback
(
bean
);
//更新condition是否需要复核字段0:不需要,1:需要
dao
.
updateReviewType
(
bean
);
List
<
String
>
lst
=
new
ArrayList
<
String
>();
for
(
DepartIds
departId
:
bean
.
getDepartIds
())
{
lst
.
add
(
departId
.
getDepartId
());
...
...
@@ -150,6 +155,30 @@ public class ConditionService extends BaseService<ConditionDao> {
return
0
;
}
public
String
updateReview
(
ConditionUpdateBean
conditionUpdateBean
)
{
//这个接口是复核通过接口,reviewType只可能为1;
ConditionDetailData
data
=
dao
.
findById
(
conditionUpdateBean
.
getConditionId
());
if
(
data
==
null
)
{
return
"conditionId错误,未查询到相关信息"
;
}
else
if
(!
"1"
.
equals
(
data
.
getReviewType
()))
{
return
"conditionId错误,无需复核"
;
}
conditionUpdateBean
.
setReviewType
(
"1"
);
boolean
finish
=
updateConditionComplete
(
conditionUpdateBean
);
return
finish
?
""
:
"论证条件未完成评估"
;
}
public
boolean
updateConditionComplete
(
ConditionUpdateBean
bean
)
{
//检查是否所有条件都已经评估(foc_condition_feedback所有相关条件状态)
int
count
=
dao
.
checkCompleteStatus
(
bean
.
getConditionId
());
//如果结果为空,说明所有条件已经评估,本条件完成,更改complete字段。如果condition的reviewType为0(不复核),is_feed为2;如果reviewType为1,is_feed为3
if
(
count
==
0
)
{
dao
.
updateConditionComplete
(
bean
);
return
true
;
}
return
false
;
}
public
ConditionDetailEntity
getDetail
(
ConditionDetailBean
bean
)
{
ConditionDetailEntity
conditionDetailEntity
=
dao
.
getDetail
(
bean
);
if
(
conditionDetailEntity
!=
null
)
{
...
...
src/com/ejweb/modules/verify/service/VerifyFeedbackService.java
View file @
356eef46
...
...
@@ -9,10 +9,7 @@ import com.ejweb.core.exception.RecordNotExistException;
import
com.ejweb.modules.depart.dao.DepartDao
;
import
com.ejweb.modules.depart.entity.DepartEntity
;
import
com.ejweb.modules.route.entity.FullRouteVerifyEntity
;
import
com.ejweb.modules.verify.bean.VerifyFeedbackBean
;
import
com.ejweb.modules.verify.bean.VerifyFeedbackDetailBean
;
import
com.ejweb.modules.verify.bean.VerifyFeedbackStatusBean
;
import
com.ejweb.modules.verify.bean.VerifyFeedbackUpdateBean
;
import
com.ejweb.modules.verify.bean.*
;
import
com.ejweb.modules.verify.dao.AirlineVerifyDao
;
import
com.ejweb.modules.verify.dao.ConditionDao
;
import
com.ejweb.modules.verify.dao.VerifyFeedbackDao
;
...
...
@@ -123,6 +120,11 @@ public class VerifyFeedbackService extends BaseService<VerifyFeedbackDao> {
if
(
feed
==
null
)
{
return
null
;
}
//判断是否所有条件完成
int
count
=
dao
.
getUnfinishCount
(
bean
.
getVerifId
());
if
(
count
==
0
)
{
feed
.
setConditionComplete
(
1
);
}
List
<
ConditionDetailData
>
conditions
=
dao
.
findByVerifyIdAndDepartId
(
bean
);
List
<
ConditionDetailData
>
conditionList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
conditions
))
{
...
...
@@ -151,10 +153,17 @@ public class VerifyFeedbackService extends BaseService<VerifyFeedbackDao> {
if
(
n
==
0
)
{
return
false
;
}
ConditionDetailData
data
=
conditionDao
.
findById
(
bean
.
getConditionId
());
// 所有部门都已经反馈
if
(
dao
.
getFeedbackStatus
(
bean
)
==
0
)
{
dao
.
updateCondition
(
bean
);
if
(
conditionDao
.
checkCompleteStatus
(
bean
.
getConditionId
())
==
0
)
{
if
(
"0"
.
equals
(
data
.
getReviewType
()))
{
ConditionUpdateBean
updateBean
=
new
ConditionUpdateBean
();
updateBean
.
setReviewType
(
data
.
getReviewType
());
updateBean
.
setConditionId
(
data
.
getConditionId
());
conditionDao
.
updateConditionComplete
(
updateBean
);
}
else
{
dao
.
updateCondition
(
bean
);
}
}
return
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