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
81148392
Commit
81148392
authored
Mar 31, 2020
by
Lenovo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调机修改
parent
356eef46
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
321 additions
and
22 deletions
+321
-22
RouteVerifyDao.xml
resources/mapper/modules/route/RouteVerifyDao.xml
+7
-2
CondationDao.xml
resources/mapper/modules/verify/CondationDao.xml
+48
-2
RouteVerifyController.java
src/com/ejweb/modules/route/api/RouteVerifyController.java
+5
-3
VerifyUpdateBean.java
src/com/ejweb/modules/route/bean/VerifyUpdateBean.java
+72
-0
FullRouteVerifyEntity.java
src/com/ejweb/modules/route/entity/FullRouteVerifyEntity.java
+11
-1
RouteVerifyDetailEntity.java
src/com/ejweb/modules/route/entity/RouteVerifyDetailEntity.java
+9
-0
RouteVerifyService.java
src/com/ejweb/modules/route/service/RouteVerifyService.java
+113
-14
ConditionDao.java
src/com/ejweb/modules/verify/dao/ConditionDao.java
+37
-0
FullVerifyConditionEntity.java
src/com/ejweb/modules/verify/entity/FullVerifyConditionEntity.java
+19
-0
No files found.
resources/mapper/modules/route/RouteVerifyDao.xml
View file @
81148392
...
...
@@ -24,12 +24,13 @@
<result
column=
"back_status"
property=
"backStatus"
jdbcType=
"CHAR"
/>
<result
column=
"back_time"
property=
"backTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"back_remarks"
property=
"backRemarks"
jdbcType=
"VARCHAR"
/>
<result
column=
"back_by"
property=
"backBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"back_by"
property=
"backBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"summary"
property=
"summary"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, verif_id, verify_status, report, form_id, form_text, depart_id, `condition`, create_by,
create_date, update_by, update_date, remarks, del_flag, is_verify, status, start_time,back_status,
back_time,back_remarks,back_by
back_time,back_remarks,back_by
,summary
</sql>
<select
id=
"fullList"
resultMap=
"BaseResultMap"
>
...
...
@@ -88,6 +89,7 @@
s.id,
verify_status,
s.remarks,
s.summary as conditionRemarks,
s.depart_id,
s.form_text,
s.status
...
...
@@ -300,6 +302,9 @@
<if
test=
"isVerify != null"
>
is_verify = #{isVerify,jdbcType=CHAR},
</if>
<if
test=
"summary != null"
>
summary = #{summary,jdbcType=CHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
...
...
resources/mapper/modules/verify/CondationDao.xml
View file @
81148392
...
...
@@ -2,6 +2,26 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ejweb.modules.verify.dao.ConditionDao"
>
<sql
id=
"BaseColumns"
>
a.id,
a.parent_id,
a.route_id,
a.verif_id,
a.depart_id,
a.`condition`,
a.condition_status,
a.create_by,
a.create_date,
a.update_by,
a.update_date,
a.remarks,
a.complete,
a.is_feed,
a.status,
a.review_type
</sql>
<sql
id=
"CondationColumns"
>
a.id AS verifId,
...
...
@@ -262,7 +282,8 @@
update_date=#{updateDate},
remarks=#{remarks},
complete=#{complete},
is_feed=#{isFeed}
is_feed=#{isFeed},
review_type =#{reviewType}
where id=#{id}
</update>
...
...
@@ -289,9 +310,33 @@
<delete
id=
"deleteFeedbackBatch"
parameterType=
"java.util.List"
>
DELETE FROM foc_condition_feedback
WHERE condition_id
=
in
WHERE condition_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
${item}
</foreach>
</delete>
<select
id=
"findByPrimaryKey"
resultType=
"com.ejweb.modules.verify.entity.FullVerifyConditionEntity"
>
select
<include
refid=
"BaseColumns"
/>
from foc_verify_condition a
where a.id=#{conditionId}
</select>
<select
id=
"getUndoneCondition"
resultType=
"Integer"
>
select count(*) from foc_verify_condition
where route_id=#{routeId}
and (is_feed=0 or is_feed=1)
</select>
<update
id=
"updateCompleteByRouteId"
>
update foc_verify_condition
set complete=1
where route_id=#{routeId}
</update>
<select
id=
"getAllConditionIdByRouteId"
resultType=
"java.lang.String"
>
select id from foc_verify_condition
where route_id=#{routeId}
</select>
</mapper>
\ No newline at end of file
src/com/ejweb/modules/route/api/RouteVerifyController.java
View file @
81148392
...
...
@@ -165,7 +165,7 @@ public class RouteVerifyController {
public
ResponseBean
updateStatus
(
RequestBean
requestBean
)
{
ResponseBean
responseBean
=
new
ResponseBean
();
Verify
CheckBean
bean
=
requestBean
.
getObjectBean
(
VerifyCheck
Bean
.
class
);
Verify
UpdateBean
bean
=
requestBean
.
getObjectBean
(
VerifyUpdate
Bean
.
class
);
String
message
=
routeVerifyService
.
validate
(
bean
);
if
(
"00"
.
equals
(
bean
.
getVerifyStatus
()))
{
...
...
@@ -174,12 +174,14 @@ public class RouteVerifyController {
// 通过参数校验
if
(
message
==
null
)
{
try
{
routeVerifyService
.
updateCheckStatus
(
bean
);
message
=
routeVerifyService
.
updateCheckStatus1
(
bean
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
responseBean
;
if
(
StringUtils
.
isEmpty
(
message
))
{
return
responseBean
;
}
}
// 参数校验为通过
responseBean
.
setMessage
(
message
);
...
...
src/com/ejweb/modules/route/bean/VerifyUpdateBean.java
0 → 100644
View file @
81148392
package
com
.
ejweb
.
modules
.
route
.
bean
;
import
com.ejweb.core.base.GenericBean
;
import
com.ejweb.modules.verify.data.ConditionDetailData
;
import
com.ejweb.modules.verify.entity.ConditionDetailEntity
;
import
com.ejweb.modules.verify.entity.FullVerifyConditionEntity
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
java.util.List
;
/**
* @Author: lisu
* @Date: 2020/3/30 22:40
* @Description: java类作用描述
*/
public
class
VerifyUpdateBean
extends
GenericBean
{
/**
* 论证状态(01:可行:02:不可行;03:条件可行,04:条件满足)
*/
@NotEmpty
(
message
=
"verifyStatus字段不能为空"
)
private
String
verifyStatus
;
@NotEmpty
(
message
=
"userCode字段不能为空"
)
private
String
userCode
;
private
String
remark
;
private
List
<
FullVerifyConditionEntity
>
conditions
;
@NotEmpty
(
message
=
"verifId字段不能为空"
)
private
String
verifId
;
public
String
getVerifyStatus
()
{
return
verifyStatus
;
}
public
void
setVerifyStatus
(
String
verifyStatus
)
{
this
.
verifyStatus
=
verifyStatus
;
}
public
String
getUserCode
()
{
return
userCode
;
}
public
void
setUserCode
(
String
userCode
)
{
this
.
userCode
=
userCode
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
List
<
FullVerifyConditionEntity
>
getConditions
()
{
return
conditions
;
}
public
void
setConditions
(
List
<
FullVerifyConditionEntity
>
conditions
)
{
this
.
conditions
=
conditions
;
}
public
String
getVerifId
()
{
return
verifId
;
}
public
void
setVerifId
(
String
verifId
)
{
this
.
verifId
=
verifId
;
}
}
src/com/ejweb/modules/route/entity/FullRouteVerifyEntity.java
View file @
81148392
...
...
@@ -47,6 +47,8 @@ public class FullRouteVerifyEntity {
private
String
backRemarks
;
private
String
backBy
;
private
String
summary
;
public
Date
getEndTime
()
{
return
endTime
;
...
...
@@ -231,5 +233,12 @@ public class FullRouteVerifyEntity {
public
void
setBackBy
(
String
backBy
)
{
this
.
backBy
=
backBy
;
}
public
String
getSummary
()
{
return
summary
;
}
public
void
setSummary
(
String
summary
)
{
this
.
summary
=
summary
;
}
}
\ No newline at end of file
src/com/ejweb/modules/route/entity/RouteVerifyDetailEntity.java
View file @
81148392
...
...
@@ -28,6 +28,7 @@ public class RouteVerifyDetailEntity {
private
String
formText
;
private
String
remarks
;
private
String
conditionRemarks
;
//状态 0 草稿 1 发布
private
String
status
;
...
...
@@ -142,4 +143,12 @@ public class RouteVerifyDetailEntity {
public
void
setConditions
(
List
<
ConditionDetailData
>
conditions
)
{
this
.
conditions
=
conditions
;
}
public
String
getConditionRemarks
()
{
return
conditionRemarks
;
}
public
void
setConditionRemarks
(
String
conditionRemarks
)
{
this
.
conditionRemarks
=
conditionRemarks
;
}
}
src/com/ejweb/modules/route/service/RouteVerifyService.java
View file @
81148392
...
...
@@ -389,7 +389,6 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
private
List
<
FullVerifyConditionEntity
>
getFullVerifyConditionByRouteIdAndComplete
(
String
routeId
)
{
FullVerifyConditionBean
fullVerifyCondition
=
new
FullVerifyConditionBean
();
fullVerifyCondition
.
setRouteId
(
routeId
);
;
fullVerifyCondition
.
setComplete
(
"0"
);
List
<
FullVerifyConditionEntity
>
verifyConditionEntities
=
verifyConditionDao
.
fullList
(
fullVerifyCondition
);
return
verifyConditionEntities
;
...
...
@@ -458,26 +457,46 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
}
private
void
addVerifyCondition
(
FullRouteVerifyEntity
routeVerifyEntity
,
String
verifuStatus
,
String
userCode
,
FullVerifyConditionEntity
conditionEntity
)
{
conditionEntity
.
setConditionStatus
(
verifuStatus
);
conditionEntity
.
setVerifId
(
routeVerifyEntity
.
getVerifId
());
conditionEntity
.
setCreateBy
(
userCode
);
conditionEntity
.
setCreateDate
(
new
Date
());
conditionEntity
.
setUpdateBy
(
userCode
);
conditionEntity
.
setUpdateDate
(
new
Date
());
conditionEntity
.
setComplete
(
"0"
);
conditionEntity
.
setIsFeed
(
"0"
);
conditionEntity
.
setRouteId
(
routeVerifyEntity
.
getId
());
conditionEntity
.
setDepartId
(
dao
.
getDepartId
(
userCode
));
if
(
StringUtils
.
isEmpty
(
conditionEntity
.
getId
()))
{
conditionEntity
.
setConditionStatus
(
verifuStatus
);
conditionEntity
.
setVerifId
(
routeVerifyEntity
.
getVerifId
());
conditionEntity
.
setCreateBy
(
userCode
);
conditionEntity
.
setCreateDate
(
new
Date
());
conditionEntity
.
setUpdateBy
(
userCode
);
conditionEntity
.
setUpdateDate
(
new
Date
());
conditionEntity
.
setComplete
(
"0"
);
conditionEntity
.
setIsFeed
(
"0"
);
conditionEntity
.
setRouteId
(
routeVerifyEntity
.
getId
());
conditionEntity
.
setReviewType
(
"0"
);
conditionEntity
.
setDepartId
(
dao
.
getDepartId
(
userCode
));
String
cid
=
IdWorker
.
getNextId
();
conditionEntity
.
setId
(
cid
);
verifyConditionDao
.
insert
(
conditionEntity
);
}
else
{
ConditionDetailData
data
=
conditionDao
.
findById
(
conditionEntity
.
getId
());
if
(
data
!=
null
)
{
updateCondition
(
conditionEntity
,
userCode
);
}
}
/**
* 检查是否西药更新
*/
private
void
updateCondition
(
FullVerifyConditionEntity
conditionEntity
,
String
userCode
)
{
FullVerifyConditionEntity
data
=
conditionDao
.
findByPrimaryKey
(
conditionEntity
.
getId
());
if
(
data
!=
null
)
{
if
(!
data
.
getCondition
().
equals
(
conditionEntity
.
getCondition
()))
{
data
.
setCondition
(
conditionEntity
.
getCondition
());
data
.
setUpdateBy
(
userCode
);
data
.
setUpdateDate
(
new
Date
());
data
.
setComplete
(
"0"
);
data
.
setIsFeed
(
"0"
);
data
.
setReviewType
(
"0"
);
//更新论证条件,重新审核
conditionDao
.
updateByPrimaryKey
(
data
);
ConditionUpdateBean
updateBean
=
new
ConditionUpdateBean
();
updateBean
.
setConditionId
(
conditionEntity
.
getId
());
//删除历史论证条件个部门反馈
conditionDao
.
deleteFeedback
(
updateBean
);
}
conditionDao
.
updateByPrimaryKey
(
conditionEntity
);
}
}
...
...
@@ -581,6 +600,86 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
}
/**
* 条件评估更改状态
*
* @param bean
*/
public
String
updateCheckStatus1
(
VerifyUpdateBean
bean
)
{
final
String
verifyStatus
=
bean
.
getVerifyStatus
();
FullRouteVerifyEntity
fullRouteVerifyEntity
=
checkRouteVerifyExist
(
bean
.
getVerifId
(),
bean
.
getUserCode
());
if
(
fullRouteVerifyEntity
==
null
)
{
return
"verifyId错误"
;
}
//论证状态可行
String
status1
=
"01"
;
//论证状态不可行
String
status2
=
"02"
;
//论证状态条件可行
String
status3
=
"03"
;
//论证状态条件满足
String
status4
=
"04"
;
//原不可行变未可行
if
(
status1
.
equals
(
verifyStatus
))
{
//可行必须填写条件论证总结
if
(
StringUtils
.
isEmpty
(
bean
.
getRemark
()))
{
return
"remark不能为空"
;
}
fullRouteVerifyEntity
.
setVerifyStatus
(
verifyStatus
);
//填写论证条件总结
fullRouteVerifyEntity
.
setSummary
(
bean
.
getRemark
());
dao
.
updateByPrimaryKey
(
fullRouteVerifyEntity
);
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
routeVerifyBean
.
setVerifId
(
fullRouteVerifyEntity
.
getVerifId
());
// 判断是否进入论证总结阶段
this
.
insertAirlineConclusion
(
routeVerifyBean
,
bean
.
getUserCode
());
}
if
(
status3
.
equals
(
verifyStatus
))
{
if
(
status2
.
equals
(
fullRouteVerifyEntity
.
getVerifyStatus
()))
{
//更新论证状态不可行
fullRouteVerifyEntity
.
setVerifyStatus
(
verifyStatus
);
dao
.
updateByPrimaryKey
(
fullRouteVerifyEntity
);
//查询节点下所有不可行条件删除
List
<
String
>
conditionIds
=
conditionDao
.
getAllConditionIdByRouteId
(
fullRouteVerifyEntity
.
getId
());
conditionDao
.
deleteConditionById
(
conditionIds
);
//删除部门反馈
conditionDao
.
deleteFeedbackBatch
(
conditionIds
);
//新增条件
for
(
FullVerifyConditionEntity
condition
:
bean
.
getConditions
())
{
addVerifyCondition
(
fullRouteVerifyEntity
,
verifyStatus
,
bean
.
getUserCode
(),
condition
);
}
}
if
(
fullRouteVerifyEntity
.
getVerifyStatus
().
equals
(
verifyStatus
))
{
for
(
FullVerifyConditionEntity
data
:
bean
.
getConditions
())
{
updateCondition
(
data
,
bean
.
getUserCode
());
}
}
}
//条件可行变为条件满足
if
(
status4
.
equals
(
verifyStatus
))
{
//判断是否所有部门已经反馈完
int
count
=
conditionDao
.
getUndoneCondition
(
fullRouteVerifyEntity
.
getId
());
if
(
count
!=
0
)
{
return
"条件未反馈完毕"
;
}
fullRouteVerifyEntity
.
setVerifyStatus
(
verifyStatus
);
//填写论证条件总结
fullRouteVerifyEntity
.
setSummary
(
bean
.
getRemark
());
dao
.
updateByPrimaryKey
(
fullRouteVerifyEntity
);
conditionDao
.
updateCompleteByRouteId
(
fullRouteVerifyEntity
.
getId
());
// 判断是否进入论证总结阶段
RouteVerifyBean
routeVerifyBean
=
new
RouteVerifyBean
();
routeVerifyBean
.
setVerifId
(
fullRouteVerifyEntity
.
getVerifId
());
this
.
insertAirlineConclusion
(
routeVerifyBean
,
bean
.
getUserCode
());
}
return
""
;
}
public
void
sendmail
(
VerifyStatusBean
bean
)
{
List
<
String
>
mails
=
verifyDao
.
getmail
(
"6"
);
...
...
src/com/ejweb/modules/verify/dao/ConditionDao.java
View file @
81148392
...
...
@@ -36,6 +36,12 @@ public interface ConditionDao extends BaseDao {
int
deleteFeedback
(
ConditionUpdateBean
bean
);
/**
* 根据条件ID删除所有部门反馈
*
* @param list
* @return
*/
int
deleteFeedbackBatch
(
List
list
);
/**
...
...
@@ -78,9 +84,40 @@ public interface ConditionDao extends BaseDao {
*/
ConditionDetailData
findById
(
String
conditionId
);
FullVerifyConditionEntity
findByPrimaryKey
(
String
conditionId
);
int
updateByPrimaryKey
(
FullVerifyConditionEntity
record
);
List
<
String
>
getDepartConditions
(
VerifyStatusBean
bean
);
/**
* 批量删除(根据id集合)
* @param list
* @return
*/
int
deleteConditionById
(
List
list
);
/**
* 获取所有没有完成的论证条件数量
*
* @param routeId
* @return
*/
int
getUndoneCondition
(
String
routeId
);
/**
* 更新所有条件已完成
*
* @param routeId
* @return
*/
int
updateCompleteByRouteId
(
String
routeId
);
/**
* 根据routeId查询所有条件ID
*
* @param routeId
* @return
*/
List
<
String
>
getAllConditionIdByRouteId
(
String
routeId
);
}
src/com/ejweb/modules/verify/entity/FullVerifyConditionEntity.java
View file @
81148392
...
...
@@ -30,6 +30,8 @@ public class FullVerifyConditionEntity {
private
String
isFeed
;
private
String
condition
;
private
String
reviewType
;
private
String
status
;
public
String
getId
()
{
return
id
;
...
...
@@ -142,4 +144,20 @@ public class FullVerifyConditionEntity {
public
void
setCondition
(
String
condition
)
{
this
.
condition
=
condition
;
}
public
String
getReviewType
()
{
return
reviewType
;
}
public
void
setReviewType
(
String
reviewType
)
{
this
.
reviewType
=
reviewType
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
}
\ No newline at end of file
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