Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
foc_manage
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
首航-临时账号
foc_manage
Commits
544ec217
Commit
544ec217
authored
Dec 25, 2019
by
zhangyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门
parent
c05a7d58
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
184 additions
and
107 deletions
+184
-107
userDepart.jsp
WebContent/WEB-INF/views/modules/airline/userDepart.jsp
+11
-38
verifyForm.jsp
WebContent/WEB-INF/views/modules/airline/verifyForm.jsp
+12
-1
verifyList.jsp
WebContent/WEB-INF/views/modules/airline/verifyList.jsp
+1
-0
verifyUserForm.jsp
WebContent/WEB-INF/views/modules/airline/verifyUserForm.jsp
+21
-3
departForm.jsp
WebContent/WEB-INF/views/modules/userdepart/departForm.jsp
+1
-0
VerifyDepartDao.xml
resources/mappings/modules/airline/VerifyDepartDao.xml
+19
-13
VerifyDepartAddDao.java
src/com/ejweb/modules/airline/dao/VerifyDepartAddDao.java
+5
-2
VerifyEntity.java
src/com/ejweb/modules/airline/entity/VerifyEntity.java
+21
-11
VerifyAddService.java
src/com/ejweb/modules/airline/service/VerifyAddService.java
+16
-6
VerifyService.java
src/com/ejweb/modules/airline/service/VerifyService.java
+36
-12
ConnectController.java
src/com/ejweb/modules/airline/web/ConnectController.java
+16
-14
VerifyAddController.java
src/com/ejweb/modules/airline/web/VerifyAddController.java
+20
-6
VerifyController.java
src/com/ejweb/modules/airline/web/VerifyController.java
+5
-1
No files found.
WebContent/WEB-INF/views/modules/airline/userDepart.jsp
View file @
544ec217
...
...
@@ -5,36 +5,6 @@
<script
src=
"${ctxStatic}/jquery-form/jquery-form.js"
type=
"text/javascript"
></script>
<title>
论证部门管理
</title>
<meta
name=
"decorator"
content=
"default"
/>
<script
verify=
"text/javascript"
>
function
page
(
n
,
s
)
{
if
(
n
)
$
(
"#pageNo"
).
val
(
n
);
if
(
s
)
$
(
"#pageSize"
).
val
(
s
);
$
(
"#searchForm"
).
attr
(
"action"
,
"${ctx}/airline/verifyAdd/list"
);
$
(
"#searchForm"
).
submit
();
return
false
;
}
var
options
=
{
type
:
"POST"
,
url
:
urls
,
dataType
:
'json'
};
var
url
=
"${ctx}/airline/sailingfile/upload"
;
var
urls
=
url
;
function
upload
(
id
)
{
urls
=
url
+
"?id="
+
id
;
options
=
{
type
:
"POST"
,
url
:
urls
,
dataType
:
'json'
,
success
:
function
(
data
)
{
window
.
location
.
href
=
'${ctx}/airline/verify/list?message=成功'
;
}
};
$
(
"#file"
).
click
();
}
</script>
</head>
<body>
<ul
class=
"nav nav-tabs"
>
...
...
@@ -46,6 +16,13 @@
</ul>
<sys:message
content=
"${message}"
/>
<div
class=
"clearfix"
></div>
<div
style=
"background-color: #fff;padding:15px;margin: 10px 0"
>
<shiro:hasPermission
name=
"vrf:verify:edit"
>
<input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"添加默认论证部门"
onclick=
"window.location.href='${ctx}/airline/verifyAdd/form'"
/>
</shiro:hasPermission>
</div>
<table
id=
"contentTable"
class=
"table table-striped table-bordered table-condensed"
>
<thead>
<tr>
...
...
@@ -54,7 +31,8 @@
<th>
论证部门
</th>
<shiro:hasPermission
name=
"vrf:verify:edit"
>
<th>
操作
</th>
</shiro:hasPermission></tr>
</shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${page}"
var=
"verify"
varStatus=
"vs"
>
...
...
@@ -70,19 +48,14 @@
</td>
<shiro:hasPermission
name=
"vrf:verify:view"
>
<td>
<a
href=
"${ctx}/airline/verifyAdd/form?type=${verify.valueType}&"
>
添加
</a>
<a
href=
"${ctx}/airline/verifyAdd/
form?id=${verify.valueType}&"
>
编辑
</a>
<a
href=
"${ctx}/airline/verifyAdd/form?type=${verify.valueType}&"
>
编辑
</a>
<a
href=
"${ctx}/airline/verifyAdd/
delete?valueType=${verify.valueType}&"
onclick=
"return confirmx('确认要删除吗?', this.href)"
>
删除
</a>
</td>
</shiro:hasPermission>
</tr>
</c:forEach>
</tbody>
</table>
<form
style=
"display:none"
id=
"form"
action=
"dynamicFields.action?method=uploadFile"
method=
"post"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"file"
id=
"file"
value=
""
/><br/>
<input
type=
"submit"
value=
"确认提交"
>
</form>
</body>
...
...
WebContent/WEB-INF/views/modules/airline/verifyForm.jsp
View file @
544ec217
...
...
@@ -53,7 +53,18 @@
<form:input
path=
"routeNo"
htmlEscape=
"false"
maxlength=
"50"
class=
"required"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
论证单号操作人:
</label>
<div
class=
"controls"
>
<form:input
path=
"operateUser"
htmlEscape=
"false"
maxlength=
"50"
class=
"required"
/>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
论证单号操作原因:
</label>
<div
class=
"controls"
>
<form:input
path=
"reason"
htmlEscape=
"false"
maxlength=
"500"
class=
"required"
/>
</div>
</div>
<c:choose>
<c:when
test=
"${verifyEntity.verifType eq '06' or verifyEntity.verifType eq '07' or verifyEntity.verifType eq '08'}"
>
<div
class=
"control-group"
>
...
...
WebContent/WEB-INF/views/modules/airline/verifyList.jsp
View file @
544ec217
...
...
@@ -57,6 +57,7 @@
</div>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"${ctx}/airline/verify/list"
>
航线管理列表
</a></li>
<li><a
href=
"${ctx}/airline/verifyUpdateUser"
>
论证单号修改展示列表
</a></li>
</ul>
<form:form
id=
"searchForm"
modelAttribute=
"verifyEntity"
action=
"${ctx}/airline/verify/list"
method=
"post"
class=
"breadcrumb form-search "
>
...
...
WebContent/WEB-INF/views/modules/airline/verifyUserForm.jsp
View file @
544ec217
...
...
@@ -40,20 +40,38 @@
</head>
<body>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
>
航线部门管理
</li>
<li><a
href=
"${ctx}/depart/depart/list"
>
论证部门列表
</a></li>
<shiro:hasPermission
name=
"vrf:depart:edit"
>
<li><a
href=
"${ctx}/depart/depart/form"
>
新增论证部门
</a></li>
</shiro:hasPermission>
<li
class=
"active"
><a
href=
"${ctx}/airline/verifyAdd"
>
航线管理部门列表
</a></li>
</ul>
<br/>
<form:form
id=
"inputForm"
modelAttribute=
"userDepartEntity"
action=
"${ctx}/airline/verifyAdd/add"
method=
"post"
class=
"form-horizontal"
>
<form:input
path=
"type"
htmlEscape=
"false"
value=
"${type}"
maxlength=
"50"
class=
"required"
style=
"display:none"
/
>
<
%
--
<
form:input
path=
"type"
htmlEscape=
"false"
value=
"${type}"
maxlength=
"50"
class=
"required"
style=
"display:none"
/>
--%
>
<sys:message
content=
"${message}"
/>
<div
class=
"control-group"
>
<label
class=
"control-label"
style=
"width: 120px"
>
选择论证类型
</label>
<div
class=
"controls"
style=
"width: 80%;margin-left: 140px"
>
<form:select
path=
"type"
class=
"input-large"
>
<form:option
value=
""
label=
"请选择"
/>
<form:options
items=
"${dictList}"
itemLabel=
"label"
itemValue=
"valueType"
htmlEscape=
"false"
/>
</form:select>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
style=
"width: 120px"
>
选择部门
</label>
<div
class=
"controls"
style=
"width: 80%;margin-left: 140px"
>
<c:forEach
items=
"${allList}"
var=
"depar"
varStatus=
"ds"
>
<input
type=
"checkbox"
name=
"check"
value=
"${depar.id}"
${
depar
.
check=
=true?'checked':""}
/>
${depar.departName}
</c:forEach>
</div>
</div>
<form:input
path=
"list"
htmlEscape=
"false"
maxlength=
"50"
id=
"list"
style=
"display:none"
/>
<div
class=
"form-actions"
>
<div
class=
"form-actions"
style=
"margin-top: 0;border: 0;padding: 10px 100px 20px"
>
<shiro:hasPermission
name=
"vrf:verify:edit"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"保 存"
/>
</shiro:hasPermission>
<a
href=
"${ctx}/airline/verifyAdd"
><input
id=
"btnCancel"
class=
"btn"
type=
"button"
value=
"返回"
/></a>
...
...
WebContent/WEB-INF/views/modules/userdepart/departForm.jsp
View file @
544ec217
...
...
@@ -36,6 +36,7 @@
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"${ctx}/depart/depart/list"
>
论证部门管理
</a></li>
<li
class=
"active"
><a
href=
"${ctx}/depart/depart/form?id=${startnoEntity.id}"
>
论证部门
<shiro:hasPermission
name=
"vrf:startno:edit"
>
${not empty startnoEntity.id?'修改':'添加'}
</shiro:hasPermission><shiro:lacksPermission
name=
"vrf:depart:edit"
>
查看
</shiro:lacksPermission></a></li>
<li
class=
"active"
><a
href=
"${ctx}/airline/verifyAdd"
>
航线管理部门列表
</a></li>
</ul><br/>
<form:form
id=
"inputForm"
modelAttribute=
"departEntity"
action=
"${ctx}/depart/depart/save"
method=
"post"
class=
"form-horizontal"
>
...
...
resources/mappings/modules/airline/VerifyDepartDao.xml
View file @
544ec217
...
...
@@ -21,19 +21,7 @@
<delete
id=
"deleteUserDepartType"
parameterType=
"com.ejweb.modules.depart.entity.AddDepartTypeDto"
>
DELETE from foc_user_depart_type WHERE type=#{type}
</delete>
<!-- <select id="getUserDepartAll" resultType="com.ejweb.modules.depart.entity.UserDegetUserDepartTypepartEntity">
SELECT
f.id,
fu.depart_name,
f.type
FROM `foc_user_depart_type` f
INNER JOIN foc_user_depart fu on f.depart_id = fu.id AND fu.del_flag='0'
WHERE f.del_flag = '0'
<if test="isVerif != null and isVerif !=''">
AND is_verif=#{isVerif}
</if>
</select>-->
<select
id=
"getUserDictAll"
resultType=
"com.ejweb.modules.depart.entity.UserDictEntity"
>
<select
id=
"getDictAll"
resultType=
"com.ejweb.modules.depart.entity.UserDictEntity"
>
SELECT
f.id,
f.value as valueType,
...
...
@@ -42,6 +30,20 @@
WHERE f.type = 'vrf_verify_type'
and f.del_flag = '0'
</select>
<select
id=
"getUserDictAll"
resultType=
"com.ejweb.modules.depart.entity.UserDictEntity"
>
SELECT
f.id,
f.VALUE AS valueType,
f.label
FROM
`sys_dict` f
INNER JOIN foc_user_depart_type fu ON fu.type = f.`value`
WHERE
f.type = 'vrf_verify_type'
AND f.del_flag = '0'
GROUP BY
fu.type
</select>
<select
id=
"getUserDepartType"
resultType=
"com.ejweb.modules.depart.entity.UserDepartTypeEntity"
>
SELECT
f.id,
...
...
@@ -54,4 +56,7 @@
AND f.type=#{valueType}
</if>
</select>
<update
id=
"deleteUserDepart"
>
UPDATE foc_user_depart_type SET del_flag='1' where type = #{type}
</update>
</mapper>
\ No newline at end of file
src/com/ejweb/modules/airline/dao/VerifyDepartAddDao.java
View file @
544ec217
...
...
@@ -23,10 +23,12 @@ public interface VerifyDepartAddDao{
public
List
<
UserDepartTypeEntity
>
getUserDepartType
(
@Param
(
"valueType"
)
String
valueType
);
/**
* 查询所有论证类型
* 查询
已选
所有论证类型
* @return
*/
public
List
<
UserDictEntity
>
getUserDictAll
();
public
List
<
UserDictEntity
>
getDictAll
();
/**
* 查询所有部门信息
* @return
...
...
@@ -42,6 +44,6 @@ public interface VerifyDepartAddDao{
public
Integer
deleteUserDepartType
(
@Param
(
"type"
)
String
type
);
public
List
<
UserDepartEntity
>
getUserDepartAll
(
String
isVerif
);
public
void
deleteUserDepart
(
@Param
(
"type"
)
String
type
);
}
\ No newline at end of file
src/com/ejweb/modules/airline/entity/VerifyEntity.java
View file @
544ec217
package
com
.
ejweb
.
modules
.
airline
.
entity
;
import
java.util.Date
;
import
javax.validation.constraints.NotNull
;
import
com.ejweb.core.persistence.DataEntity
;
import
com.ejweb.core.utils.excel.annotation.ExcelField
;
import
com.ejweb.core.utils.excel.fieldtype.AircraftType
;
import
com.ejweb.modules.aircraft.entity.AircraftEntity
;
import
com.ejweb.modules.contact.entity.AirportEntity
;
import
com.ejweb.modules.depart.entity.DepartEntity
;
//import com.ejweb.modules.sys.entity.Area;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
//import com.ejweb.modules.sys.entity.Area;
/**
*
* Verify Entity
...
...
@@ -38,6 +36,8 @@ public class VerifyEntity extends DataEntity<VerifyEntity> implements Cloneable{
@NotNull
(
message
=
"论证单号不能为空"
)
@ExcelField
(
title
=
"论证单号"
,
type
=
0
,
align
=
3
,
sort
=
11
)
private
String
verifNo
;
private
String
operateUser
;
private
String
reason
;
@NotNull
(
message
=
"论证类型不能为空"
)
@ExcelField
(
title
=
"论证类型"
,
type
=
0
,
align
=
2
,
sort
=
12
,
dictType
=
"vrf_verify_type"
)
private
String
verifType
;
...
...
@@ -93,15 +93,25 @@ public class VerifyEntity extends DataEntity<VerifyEntity> implements Cloneable{
private
String
depIata
;
private
String
arrIata
;
public
String
getOperateUser
()
{
return
operateUser
;
}
private
Date
sailingDate
;
private
String
process
;
public
void
setOperateUser
(
String
operateUser
)
{
this
.
operateUser
=
operateUser
;
}
public
String
getReason
()
{
return
reason
;
}
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
.
trim
();
}
private
Date
sailingDate
;
private
String
process
;
private
String
airline
;
private
SailingFileEntity
sailingfile
;
...
...
src/com/ejweb/modules/airline/service/VerifyAddService.java
View file @
544ec217
...
...
@@ -28,7 +28,7 @@ public class VerifyAddService extends CrudService<VerifyDao, VerifyEntity> {
public
List
<
UserDictDepartEntity
>
findUserDeparDictAllList
()
{
List
<
UserDictEntity
>
userDictAll
=
verifyDepartAddDao
.
getUserDictAll
();
List
<
UserDictDepartEntity
>
dictlist
=
new
ArrayList
<>();
Integer
i
=
1
;
Integer
i
=
1
;
for
(
UserDictEntity
ud
:
userDictAll
)
{
String
valueType
=
ud
.
getValueType
();
List
<
UserDepartTypeEntity
>
userDepartType
=
verifyDepartAddDao
.
getUserDepartType
(
valueType
);
...
...
@@ -48,7 +48,10 @@ public class VerifyAddService extends CrudService<VerifyDao, VerifyEntity> {
List
<
UserDepartEntity
>
allList
=
verifyDepartAddDao
.
findUserDeparList
();
// 根据类型type值查询对应的部门信息
String
type
=
userDepartEntity
.
getType
();
List
<
UserDepartTypeEntity
>
byList
=
verifyDepartAddDao
.
getUserDepartType
(
type
);
List
<
UserDepartTypeEntity
>
byList
=
null
;
if
(
type
!=
null
)
{
byList
=
verifyDepartAddDao
.
getUserDepartType
(
type
);
}
if
(
byList
!=
null
)
{
for
(
UserDepartEntity
udAll
:
allList
)
{
for
(
UserDepartTypeEntity
udBy
:
byList
)
{
...
...
@@ -60,11 +63,12 @@ public class VerifyAddService extends CrudService<VerifyDao, VerifyEntity> {
}
return
allList
;
}
public
String
addUserDepartType
(
UserDepartNoCheckVo
userDepartEntity
)
{
AddDepartTypeDto
addDepartTypeDto
=
new
AddDepartTypeDto
();
String
type
=
userDepartEntity
.
getType
();
String
list
=
userDepartEntity
.
getList
();
if
(
list
==
null
||
list
==
" "
)
{
if
(
list
==
null
||
list
==
" "
)
{
verifyDepartAddDao
.
addUserDepartType
(
addDepartTypeDto
);
return
"1"
;
}
...
...
@@ -78,7 +82,7 @@ public class VerifyAddService extends CrudService<VerifyDao, VerifyEntity> {
if
(
type
!=
null
&&
type
!=
""
)
{
List
<
UserDepartTypeEntity
>
byList
=
verifyDepartAddDao
.
getUserDepartType
(
type
);
// 不为空先删除在添加
if
(
byList
!=
null
)
{
if
(
byList
!=
null
)
{
verifyDepartAddDao
.
deleteUserDepartType
(
type
);
}
verifyDepartAddDao
.
addUserDepartType
(
addDepartTypeDto
);
...
...
@@ -86,7 +90,13 @@ public class VerifyAddService extends CrudService<VerifyDao, VerifyEntity> {
return
"1"
;
}
public
List
<
UserDepartEntity
>
getUserDepart
(
String
isVerif
)
{
return
verifyDepartAddDao
.
getUserDepartAll
(
isVerif
);
public
List
<
UserDictEntity
>
getDictAll
()
{
List
<
UserDictEntity
>
userDictAll
=
verifyDepartAddDao
.
getDictAll
();
return
userDictAll
;
}
public
String
deleteUserDepart
(
String
type
)
{
verifyDepartAddDao
.
deleteUserDepartType
(
type
);
return
""
;
}
}
src/com/ejweb/modules/airline/service/VerifyService.java
View file @
544ec217
package
com
.
ejweb
.
modules
.
airline
.
service
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.service.CrudService
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.modules.airline.dao.ConnectDao
;
import
com.ejweb.modules.airline.dao.VerifyDao
;
import
com.ejweb.modules.airline.dao.VerifyUpdateUserDao
;
import
com.ejweb.modules.airline.entity.ConnectEntity
;
import
com.ejweb.modules.airline.entity.VerifyEntity
;
import
com.ejweb.modules.airline.entity.VerifyUpdateUserEntity
;
import
com.ejweb.modules.contact.dao.UserProfileDao
;
import
com.ejweb.modules.contact.entity.UserProfileEntity
;
import
com.ejweb.modules.depart.entity.DepartEntity
;
import
com.ejweb.modules.sys.utils.UserUtils
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* Verify Service
...
...
@@ -36,6 +37,8 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
private
ConnectDao
connectDao
;
@Autowired
private
UserProfileDao
userProfileDao
;
@Autowired
private
VerifyUpdateUserDao
verifyUpdateUserDao
;
public
VerifyEntity
get
(
String
id
)
{
VerifyEntity
verifyEntity
=
verifyDao
.
get2
(
id
);
...
...
@@ -119,7 +122,24 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
}
@Transactional
(
readOnly
=
false
)
public
void
save
(
VerifyEntity
verifyEntity
)
{
public
String
saveVerify
(
VerifyEntity
verifyEntity
)
{
String
verifNo
=
verifyEntity
.
getVerifNo
();
if
(
null
!=
verifNo
&&
""
!=
verifNo
){
List
<
VerifyEntity
>
validator
=
verifyDao
.
findValidator
(
verifyEntity
);
if
(
validator
.
size
()!=
0
){
return
"1"
;
}
}
VerifyUpdateUserEntity
vue
=
new
VerifyUpdateUserEntity
();
VerifyEntity
verifyDao2
=
verifyDao
.
get2
(
verifyEntity
.
getId
());
if
(
verifyDao2
!=
null
){
vue
.
setId
(
verifyEntity
.
getId
());
vue
.
setOperateUser
(
verifyEntity
.
getOperateUser
());
vue
.
setReason
(
verifyEntity
.
getReason
());
vue
.
setOriginalId
(
verifyDao2
.
getVerifNo
());
verifyUpdateUserDao
.
addUpdateUser
(
vue
);
}
if
(
StringUtils
.
isBlank
(
verifyEntity
.
getId
()))
{
verifyEntity
.
preInsert
();
// 生成id
UserProfileEntity
user
=
new
UserProfileEntity
();
...
...
@@ -129,11 +149,13 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
DepartEntity
depart
=
new
DepartEntity
();
depart
.
setId
(
departId
);
verifyEntity
.
setDepart
(
depart
);
//校验论证单号是否重复
verifyDao
.
insert
(
verifyEntity
);
// 如果不是航线则结束
if
(
"06"
.
equals
(
verifyEntity
.
getVerifType
())
||
"07"
.
equals
(
verifyEntity
.
getVerifType
())
||
"08"
.
equals
(
verifyEntity
.
getVerifType
()))
{
return
;
return
""
;
}
ConnectEntity
connect
=
new
ConnectEntity
();
connect
.
preInsert
();
// 生成id
...
...
@@ -167,7 +189,7 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
verif
.
setAreaSt
(
verifyEntity
.
getAreaSt
());
verif
.
setFlightNo
(
verifyEntity
.
getFlightNo
());
verifyDao
.
update
(
verifyEntity
);
return
;
return
""
;
}
// 判断是否主数据
else
if
(
"1"
.
equals
(
verifyEntity
.
getConnect
().
getIsMain
()))
{
...
...
@@ -184,9 +206,11 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
connect
.
setFlightNo
(
verifyEntity
.
getFlightNo
());
connectDao
.
update
(
verifyEntity
.
getConnect
());
}
return
""
;
}
public
List
<
VerifyEntity
>
CheckValidator
(
VerifyEntity
verifyEntity
)
{
return
verifyDao
.
findValidator
(
verifyEntity
);
}
...
...
src/com/ejweb/modules/airline/web/ConnectController.java
View file @
544ec217
package
com
.
ejweb
.
modules
.
airline
.
web
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.modules.aircraft.entity.AircraftEntity
;
import
com.ejweb.modules.aircraft.service.AircraftService
;
import
com.ejweb.modules.airline.entity.VerifyEntity
;
import
com.ejweb.modules.airline.service.VerifyService
;
import
com.ejweb.modules.contact.entity.AirportEntity
;
import
com.ejweb.modules.contact.service.AirportService
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -14,14 +17,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.servlet.mvc.support.RedirectAttributes
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.modules.aircraft.entity.AircraftEntity
;
import
com.ejweb.modules.aircraft.service.AircraftService
;
import
com.ejweb.modules.airline.entity.VerifyEntity
;
import
com.ejweb.modules.airline.service.VerifyService
;
import
com.ejweb.modules.contact.entity.AirportEntity
;
import
com.ejweb.modules.contact.service.AirportService
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
...
...
@@ -72,7 +70,11 @@ public class ConnectController extends BaseController {
if
(!
beanValidator
(
model
,
verifyEntity
)){
return
form
(
verifyEntity
,
model
);
}
verifyService
.
save
(
verifyEntity
);
String
s
=
verifyService
.
saveVerify
(
verifyEntity
);
if
(
s
==
"1"
){
addMessage
(
redirectAttributes
,
"论证单号重复"
);
return
"redirect:"
+
adminPath
+
"/airline/verify/list?repage"
;
}
addMessage
(
redirectAttributes
,
"保存成功"
);
return
"redirect:"
+
adminPath
+
"/airline/verify/list?repage"
;
}
...
...
src/com/ejweb/modules/airline/web/VerifyAddController.java
View file @
544ec217
...
...
@@ -5,6 +5,7 @@ import com.ejweb.modules.airline.service.VerifyAddService;
import
com.ejweb.modules.depart.entity.UserDepartNoCheckVo
;
import
com.ejweb.modules.depart.entity.UserDepartEntity
;
import
com.ejweb.modules.depart.entity.UserDictDepartEntity
;
import
com.ejweb.modules.depart.entity.UserDictEntity
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -50,11 +51,24 @@ public class VerifyAddController extends BaseController {
if
(!
beanValidator
(
model
,
userDepartEntity
))
{
return
form
(
userDepartEntity
,
model
);
}
List
<
UserDictEntity
>
dictList
=
verifyService
.
getDictAll
();
model
.
addAttribute
(
"dictList"
,
dictList
);
model
.
addAttribute
(
"type"
,
userDepartEntity
.
getType
());
List
<
UserDepartEntity
>
allList
=
verifyService
.
findAllList
(
userDepartEntity
);
model
.
addAttribute
(
"allList"
,
allList
);
return
"modules/airline/verifyUserForm"
;
}
/* @RequiresPermissions("vrf:verify:view")
@RequestMapping(value = "formOperate")
public String formUpdate(@ModelAttribute("userDepartEntity") UserDepartEntity userDepartEntity, Model model) {
if (!beanValidator(model, userDepartEntity)) {
return form(userDepartEntity, model);
}
model.addAttribute("type", userDepartEntity.getType());
List<UserDepartEntity> allList = verifyService.findAllList(userDepartEntity);
model.addAttribute("allList",allList);
return "modules/airline/verifyUserForm";
}*/
@RequiresPermissions
(
"vrf:verify:edit"
)
@RequestMapping
(
value
=
"add"
)
...
...
@@ -67,11 +81,11 @@ public class VerifyAddController extends BaseController {
addMessage
(
redirectAttributes
,
"操作成功"
);
return
"redirect:"
+
adminPath
+
"/airline/verifyAdd/list?repage"
;
}
/*
@RequiresPermissions("vrf:verify:view")
@RequestMapping(value = "
get
")
public String
getUserDepart(String isVerif
) {
verifyService.getUserDepart(isVerif
);
return
null
;
}
*/
@RequiresPermissions
(
"vrf:verify:view"
)
@RequestMapping
(
value
=
"
delete
"
)
public
String
deleteUserDepart
(
String
valueType
,
Model
model
)
{
verifyService
.
deleteUserDepart
(
valueType
);
return
"redirect:"
+
adminPath
+
"/airline/verifyAdd/list?repage"
;
}
}
src/com/ejweb/modules/airline/web/VerifyController.java
View file @
544ec217
...
...
@@ -106,7 +106,11 @@ public class VerifyController extends BaseController {
if
(!
beanValidator
(
model
,
verifyEntity
))
{
return
form
(
verifyEntity
,
model
);
}
verifyService
.
save
(
verifyEntity
);
String
s
=
verifyService
.
saveVerify
(
verifyEntity
);
if
(
s
==
"1"
){
addMessage
(
redirectAttributes
,
"论证单号重复"
);
return
"redirect:"
+
adminPath
+
"/airline/verify/list?repage"
;
}
addMessage
(
redirectAttributes
,
"保存成功"
);
return
"redirect:"
+
adminPath
+
"/airline/verify/list?repage"
;
}
...
...
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