Commit 86fc9d7f by java-李谡

Merge branch 'develop' into 'master'

Develop

See merge request java-jdair-foc/foc-manage-2.0!1
parents 20c328dc 012cd898
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
<script src="${ctxStatic}/jquery-form/jquery-form.js" type="text/javascript"></script>
<title>论证部门管理</title>
<meta name="decorator" content="default"/>
</head>
<body>
<ul class="nav nav-tabs">
<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>
<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>
<th>编号</th>
<th>论证类型</th>
<th>论证部门</th>
<shiro:hasPermission name="vrf:verify:edit">
<th>操作</th>
</shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${page}" var="verify" varStatus="vs">
<tr>
<td>${verify.sort}</td>
<td>${verify.label}</td>
<%-- <td>${verify.valueType}</td>--%>
<td>
<c:forEach items="${verify.dList}" var="depar" varStatus="ds">
${depar.departName}
</c:forEach>
</td>
</td>
<shiro:hasPermission name="vrf:verify:view">
<td>
<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>
</body>
</html>
\ No newline at end of file
...@@ -35,8 +35,10 @@ ...@@ -35,8 +35,10 @@
<li class="active"><a href="${ctx}/airline/verify/list">航线编辑</a></li> <li class="active"><a href="${ctx}/airline/verify/list">航线编辑</a></li>
</ul><br/> </ul><br/>
<form:form id="inputForm" modelAttribute="verifyEntity" action="${ctx}${verifyEntity.verifType == '06' or verifyEntity.verifType == '07' or verifyEntity.verifType == '08' ?'/airline/verify/save':'/airline/connect/save' }" method="post" class="form-horizontal"> <form:form id="inputForm" modelAttribute="verifyEntity"
action="${ctx}${verifyEntity.verifType == '06' or verifyEntity.verifType == '07' or verifyEntity.verifType == '08' or verifyEntity.verifType == '09'?'/airline/verify/save':'/airline/connect/save' }"
method="post" class="form-horizontal">
<form:hidden path="id"/> <form:hidden path="id"/>
<sys:message content="${message}"/> <sys:message content="${message}"/>
<div class="control-group"> <div class="control-group">
...@@ -45,13 +47,24 @@ ...@@ -45,13 +47,24 @@
<form:input path="verifNo" htmlEscape="false" maxlength="50" class="required"/> <form:input path="verifNo" htmlEscape="false" maxlength="50" class="required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">开航指令单号:</label> <label class="control-label">开航指令单号:</label>
<div class="controls"> <div class="controls">
<form:input path="routeNo" htmlEscape="false" maxlength="50" class="required"/> <form:input path="routeNo" htmlEscape="false" maxlength="50" />
</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>
</div> </div>
<c:choose> <c:choose>
<c:when test="${verifyEntity.verifType eq '06' or verifyEntity.verifType eq '07' or verifyEntity.verifType eq '08'}"> <c:when test="${verifyEntity.verifType eq '06' or verifyEntity.verifType eq '07' or verifyEntity.verifType eq '08'}">
<div class="control-group"> <div class="control-group">
...@@ -68,7 +81,7 @@ ...@@ -68,7 +81,7 @@
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<div class="control-group"> <div class="control-group">
<label class="control-label">飞机号:</label> <label class="control-label">航班号:</label>
<div class="controls"> <div class="controls">
<form:input path="flightNo" htmlEscape="false" maxlength="50" /> <form:input path="flightNo" htmlEscape="false" maxlength="50" />
</div> </div>
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
</div> </div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="${ctx}/airline/verify/list">航线管理列表</a></li> <li class="active"><a href="${ctx}/airline/verify/list">航线管理列表</a></li>
<li><a href="${ctx}/airline/verifyUpdateUser">论证单号修改展示列表</a></li>
</ul> </ul>
<form:form id="searchForm" modelAttribute="verifyEntity" action="${ctx}/airline/verify/list" method="post" <form:form id="searchForm" modelAttribute="verifyEntity" action="${ctx}/airline/verify/list" method="post"
class="breadcrumb form-search "> class="breadcrumb form-search ">
...@@ -102,7 +103,7 @@ ...@@ -102,7 +103,7 @@
<table id="contentTable" class="table table-striped table-bordered table-condensed"> <table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
<th>编号</th><th>开航指令单号</th><th>论证单号</th><th>论证类型</th><th>机型</th><th>航线</th><th>剩余有效期(天)</th><th>航线状态</th> <th>编号</th><th>论证单号</th><th>开航指令单号</th><th>论证类型</th><th>机型</th><th>航线</th><th>剩余有效期(天)</th><th>航线状态</th>
<th>发布时间</th> <th>发布时间</th>
<shiro:hasPermission name="vrf:verify:edit"> <shiro:hasPermission name="vrf:verify:edit">
<th>操作</th> <th>操作</th>
...@@ -113,8 +114,8 @@ ...@@ -113,8 +114,8 @@
<tr> <tr>
<%--这里的序号与对应的数据不是绑定的--%> <%--这里的序号与对应的数据不是绑定的--%>
<td>${page.pageSize*(page.pageNo-1)+vs.index+1}</td> <td>${page.pageSize*(page.pageNo-1)+vs.index+1}</td>
<td>${verify.routeNo}</td>
<td>${verify.verifNo}</td> <td>${verify.verifNo}</td>
<td>${verify.routeNo}</td>
<td>${fns:getDictLabel(verify.verifType, 'vrf_verify_type', '')}</td> <td>${fns:getDictLabel(verify.verifType, 'vrf_verify_type', '')}</td>
<td>${verify.aircraft.typeName}</td> <td>${verify.aircraft.typeName}</td>
...@@ -128,7 +129,8 @@ ...@@ -128,7 +129,8 @@
<td> <td>
<c:choose> <c:choose>
<c:when test="${verify.verifType eq '06' or verify.verifType eq '07' or verify.verifType eq '08'}"><a href="${ctx}/airline/verify/form?id=${verify.id}&pageNo=${page.pageNo}&pageSize=${page.pageSize}">编辑</a></c:when> <c:when test="${verify.verifType eq '06' or verify.verifType eq '07' or verify.verifType eq '08' or verify.verifType eq '09'}"><a
href="${ctx}/airline/verify/form?id=${verify.id}&pageNo=${page.pageNo}&pageSize=${page.pageSize}">编辑</a></c:when>
<c:otherwise> <a href="${ctx}/airline/connect/form?id=${verify.id}&pageNo=${page.pageNo}&pageSize=${page.pageSize}">编辑</a></c:otherwise> <c:otherwise> <a href="${ctx}/airline/connect/form?id=${verify.id}&pageNo=${page.pageNo}&pageSize=${page.pageSize}">编辑</a></c:otherwise>
</c:choose> </c:choose>
<a href="${ctx}/airline/verify/delete?id=${verify.id}&pageNo=${page.pageNo}&pageSize=${page.pageSize}" onclick="return confirmx('确认要删除吗?', this.href)">删除</a> <a href="${ctx}/airline/verify/delete?id=${verify.id}&pageNo=${page.pageNo}&pageSize=${page.pageSize}" onclick="return confirmx('确认要删除吗?', this.href)">删除</a>
......
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
<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/verifyUpdateUser/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/verifyUpdateUser/list?message=成功';
}
};
$("#file").click();
}
$(document).ready(function(){
top.$.jBox.tip.mess=0;
$('#file').on('change', function(){
$('#form').ajaxForm(options).submit();
});
$("#btnImport").click(function(){
$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true},
bottomText:"导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!"});
});
});
</script>
</head>
<body>
<div id="importBox" class="hide">
<form id="importForm" action="${ctx}/airline/verify/import" method="post" enctype="multipart/form-data"
class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入,请稍等...');"><br/>
<input id="uploadFile" name="file" type="file" style="width:330px"/><br/><br/>
<input id="btnImportSubmit" class="btn btn-primary" type="submit" value=" 导 入 "/>
<a href="${ctx}/airline/verify/import/template">下载模板</a>
</form>
</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="verifyUpdateUserEntity" action="${ctx}/airline/verifyUpdateUser/list" method="post"
class="breadcrumb form-search ">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
<ul class="ul-form">
<li><label>论证单号:</label>
<form:input path="verifNo" htmlEscape="false" maxlength="100" class="input-small"/>
</li>
<li><label>修改人:</label>
<form:input path="operateUser" htmlEscape="false" maxlength="100" class="input-small"/>
</li>
<li><label>论证类型:</label> <form:select path="verifType" class="input-small">
<form:option value="" label="请选择" />
<form:options items="${fns:getDictList('vrf_verify_type')}"
itemLabel="label" itemValue="value" htmlEscape="false" />
</form:select>
</li>
<li class="btns">&nbsp;&nbsp;
<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
</li>
<li class="clearfix"></li>
</ul>
</form:form>
<sys:message content="${message}"/>
<div class="clearfix"></div>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>编号</th><th>论证单号</th><th>论证类型</th><th>机型</th><th>航线</th><th>修改人</th><th>修改时间</th><th>修改原因</th><th>原始单号</th>
<%-- <shiro:hasPermission name="vrf:verify:edit">
<th>操作</th>
</shiro:hasPermission></tr>--%>
</thead>
<tbody>
<c:forEach items="${page.list}" var="verify" varStatus="vs">
<tr>
<%--这里的序号与对应的数据不是绑定的--%>
<td>${page.pageSize*(page.pageNo-1)+vs.index+1}</td>
<td>${verify.verifNo}</td>
<td>${fns:getDictLabel(verify.verifType, 'vrf_verify_type', '')}</td>
<td>${verify.aircraft.typeName}</td>
<td>${verify.airline}
</td>
<td>${verify.operateUser}</td>
<td><fmt:formatDate value="${verify.operateTime}" type="both"/></td>
<td>${verify.reason}</td>
<td>${verify.originalId}</td>
<shiro:hasPermission name="vrf:verify:edit">
</shiro:hasPermission>
</tr>
</c:forEach>
</tbody>
</table>
<div class="pagination">${page}</div>
<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>
</html>
\ No newline at end of file
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
<title>航线编辑</title>
<meta name="decorator" content="default"/>
<script type="text/javascript">
$(document).ready(function () {
$("#verifNo").focus();
$("#inputForm").validate({
rules: {},
messages: {},
submitHandler: function (form) {
var checkArr = document.getElementsByName('check');
console.log(checkArr);
var str ='';
for (var i = 0; i < checkArr.length; i++) {
if (checkArr[i].checked){
str = str+checkArr[i].value.toString()+' '
}
}
console.log(str);
console.log(typeof(str));
$('#list').val(str);
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function (error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
});
</script>
</head>
<body>
<ul class="nav nav-tabs">
<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"/>--%>
<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" 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="保 存"/>&nbsp;</shiro:hasPermission>
<a href="${ctx}/airline/verifyAdd"><input id="btnCancel" class="btn" type="button" value="返回"/></a>
</div>
</form:form>
</body>
</html>
\ No newline at end of file
...@@ -10,20 +10,22 @@ ...@@ -10,20 +10,22 @@
$("#inputForm").validate({ $("#inputForm").validate({
rules: { rules: {
airportIata: {remote: "${ctx}/contact/airport/checkAirportIata?oldAirportIata=" + "${airportEntity.airportIata}" /*encodeURIComponent('${airportEntity.airportIata}')*/}, airportIata: {remote: "${ctx}/contact/airport/checkAirportIata?oldAirportIata=" + "${airportEntity.airportIata}" /*encodeURIComponent('${airportEntity.airportIata}')*/},
liftoffTime: {min:0}, <%--airportName: {remote: "${ctx}/contact/airport/checkAirportName?id="+"${airportEntity.id}"},--%>
landingTime: {min:0} liftoffTime: {min: 0},
landingTime: {min: 0}
}, },
messages: { messages: {
airportIata: {remote: "该三字码已存在"}, airportIata: {remote: "该三字码已存在或被删除,如删除需要恢复使用,请联系管理员处理"},
// airportName: {remote: "该机场存在正在使用的三字码,请先屏蔽使用中的三字码后再添加"},
liftoffTime: {min: "不能为负"}, liftoffTime: {min: "不能为负"},
landingTime: {min: "不能为负"} landingTime: {min: "不能为负"}
}, },
submitHandler: function(form){ submitHandler: function (form) {
loading('正在提交,请稍等...'); loading('正在提交,请稍等...');
form.submit(); form.submit();
}, },
errorContainer: "#messageBox", errorContainer: "#messageBox",
errorPlacement: function(error, element) { errorPlacement: function (error, element) {
$("#messageBox").text("输入有误,请先更正。"); $("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent()); error.appendTo(element.parent().parent());
......
...@@ -5,6 +5,23 @@ ...@@ -5,6 +5,23 @@
<title>三字码管理</title> <title>三字码管理</title>
<meta name="decorator" content="default"/> <meta name="decorator" content="default"/>
<script type="text/javascript"> <script type="text/javascript">
$(function () {
console.log(22222);
var cpLock = true;
$('#testInput').off().on({
compositionstart: function () {//中文输入开始
cpLock = false;
},
compositionend: function () {//中文输入结束
this.value = (this.value.replace(/[^A-Za-z]/g, '')).toUpperCase();
cpLock = true;
},
input: function () {//input框中的值发生变化
if (cpLock)
this.value = (this.value.replace(/[^A-Za-z]/g, '')).toUpperCase();
}
})
});
function page(n, s) { function page(n, s) {
if (n) $("#pageNo").val(n); if (n) $("#pageNo").val(n);
if (s) $("#pageSize").val(s); if (s) $("#pageSize").val(s);
...@@ -76,7 +93,10 @@ ...@@ -76,7 +93,10 @@
</li> </li>
<li> <li>
<label>三字码:</label> <label>三字码:</label>
<form:input path="airportIata" htmlEscape="false" maxlength="50" class="input-medium" onkeyup="this.value=(this.value.toUpperCase()).replace(/[^a-zA-Z]/g,'')" /> <%-- <form:input path="airportIata" htmlEscape="false" maxlength="50" class="input-medium" onkeyup="this.value=(this.value.toUpperCase()).replace(/[^a-zA-Z]/g,'')" />--%>
<form:input path="airportIata" htmlEscape="false" maxlength="50" class="input-medium" id="testInput"/>
<%-- onchange="this.value=this.value.toUpperCase()" style='text-transform: uppercase'--%>
<%-- onkeyup="this.value=this.value.replace(/[^a-zA-Z]/g,'')"/>--%>
</li> </li>
<li> <li>
<label>所属城市:</label> <label>所属城市:</label>
......
...@@ -90,7 +90,9 @@ ...@@ -90,7 +90,9 @@
<!-- <!--
<td>${record.result == 'FAILD' ? '通话失败' : '通话成功'}</td> <td>${record.result == 'FAILD' ? '通话失败' : '通话成功'}</td>
--> -->
<td><c:if test="${empty record.downloadUrl}">通话失败</c:if><c:if test="${not empty record.downloadUrl}">通话成功</c:if></td> <td><c:if test="${empty record.downloadUrl and record.result ne 'FAILD'}">通话失败</c:if>
<c:if test="${empty record.downloadUrl and record.result ne 'UNLISTEN'}">未接听</c:if>
<c:if test="${not empty record.downloadUrl}">通话成功</c:if></td>
<td><c:if test="${not empty record.downloadUrl}"><a href="${record.downloadUrl}">下载</a></c:if></td> <td><c:if test="${not empty record.downloadUrl}"><a href="${record.downloadUrl}">下载</a></c:if></td>
</tr> </tr>
</c:forEach> </c:forEach>
......
<%@ page contentType="text/html;charset=UTF-8" %> <%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%> <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html> <html>
<head> <head>
<title>角色管理</title> <title>角色管理</title>
<meta name="decorator" content="default"/> <meta name="decorator" content="default"/>
<%@include file="/WEB-INF/views/include/treeview.jsp" %> <%@include file="/WEB-INF/views/include/treeview.jsp" %>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function () {
// $("#name").focus(); // $("#name").focus();
$("#inputForm").validate({ $("#inputForm").validate({
rules: { rules: {
name: {remote: "${ctx}/sys/role/checkName?oldName=" + encodeURIComponent("${role.name}")}, name: {remote: "${ctx}/sys/role/checkName?oldName=" + encodeURIComponent("${role.name}")},
enname: {remote: "${ctx}/sys/role/checkEnname?oldEnname=" + encodeURIComponent("${role.enname}")} enname: {remote: "${ctx}/sys/role/checkEnname?oldEnName=" + encodeURIComponent("${role.enname}")}
}, },
messages: { messages: {
name: {remote: "角色名已存在"}, name: {remote: "角色名已存在"},
enname: {remote: "英文名已存在"} enname: {remote: "英文名已存在"}
}, },
submitHandler: function(form){ submitHandler: function (form) {
var ids = [], nodes = tree.getCheckedNodes(true); var ids = [], nodes = tree.getCheckedNodes(true);
for(var i=0; i<nodes.length; i++) { for (var i = 0; i < nodes.length; i++) {
ids.push(nodes[i].id); ids.push(nodes[i].id);
} }
$("#menuIds").val(ids); $("#menuIds").val(ids);
var ids2 = [], nodes2 = tree2.getCheckedNodes(true); var ids2 = [], nodes2 = tree2.getCheckedNodes(true);
for(var i=0; i<nodes2.length; i++) { for (var i = 0; i < nodes2.length; i++) {
ids2.push(nodes2[i].id); ids2.push(nodes2[i].id);
} }
$("#officeIds").val(ids2); $("#officeIds").val(ids2);
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
form.submit(); form.submit();
}, },
errorContainer: "#messageBox", errorContainer: "#messageBox",
errorPlacement: function(error, element) { errorPlacement: function (error, element) {
$("#messageBox").text("输入有误,请先更正。"); $("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){ if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
error.appendTo(element.parent().parent()); error.appendTo(element.parent().parent());
} else { } else {
error.insertAfter(element); error.insertAfter(element);
...@@ -42,161 +42,188 @@ ...@@ -42,161 +42,188 @@
} }
}); });
var setting = {check:{enable:true,nocheckInherit:true},view:{selectedMulti:false}, var setting = {
data:{simpleData:{enable:true}},callback:{beforeClick:function(id, node){ check: {enable: true, nocheckInherit: true}, view: {selectedMulti: false},
data: {simpleData: {enable: true}}, callback: {
beforeClick: function (id, node) {
tree.checkNode(node, !node.checked, true, true); tree.checkNode(node, !node.checked, true, true);
return false; return false;
}}}; }
}
};
// 用户-菜单 // 用户-菜单
var zNodes=[ var zNodes = [
<c:forEach items="${menuList}" var="menu">{id:"${menu.id}", pId:"${not empty menu.parent.id?menu.parent.id:0}", name:"${not empty menu.parent.id?menu.name:'权限列表'}"}, <c:forEach items="${menuList}" var="menu">{
</c:forEach>]; id: "${menu.id}",
pId: "${not empty menu.parent.id?menu.parent.id:0}",
name: "${not empty menu.parent.id?menu.name:'权限列表'}"
},
</c:forEach>];
// 初始化树结构 // 初始化树结构
var tree = $.fn.zTree.init($("#menuTree"), setting, zNodes); var tree = $.fn.zTree.init($("#menuTree"), setting, zNodes);
// 不选择父节点 // 不选择父节点
tree.setting.check.chkboxType = { "Y" : "ps", "N" : "s" }; tree.setting.check.chkboxType = {"Y": "ps", "N": "s"};
// 默认选择节点 // 默认选择节点
var ids = "${role.menuIds}".split(","); var ids = "${role.menuIds}".split(",");
for(var i=0; i<ids.length; i++) { for (var i = 0; i < ids.length; i++) {
var node = tree.getNodeByParam("id", ids[i]); var node = tree.getNodeByParam("id", ids[i]);
try{tree.checkNode(node, true, false);}catch(e){} try {
tree.checkNode(node, true, false);
} catch (e) {
}
} }
// 默认展开全部节点 // 默认展开全部节点
tree.expandAll(true); tree.expandAll(true);
// 用户-机构 // 用户-机构
var zNodes2=[ var zNodes2 = [
<c:forEach items="${officeList}" var="office">{id:"${office.id}", pId:"${not empty office.parent?office.parent.id:0}", name:"${office.name}"}, <c:forEach items="${officeList}" var="office">{
</c:forEach>]; id: "${office.id}",
pId: "${not empty office.parent?office.parent.id:0}",
name: "${office.name}"
},
</c:forEach>];
// 初始化树结构 // 初始化树结构
var tree2 = $.fn.zTree.init($("#officeTree"), setting, zNodes2); var tree2 = $.fn.zTree.init($("#officeTree"), setting, zNodes2);
// 不选择父节点 // 不选择父节点
tree2.setting.check.chkboxType = { "Y" : "ps", "N" : "s" }; tree2.setting.check.chkboxType = {"Y": "ps", "N": "s"};
// 默认选择节点 // 默认选择节点
var ids2 = "${role.officeIds}".split(","); var ids2 = "${role.officeIds}".split(",");
for(var i=0; i<ids2.length; i++) { for (var i = 0; i < ids2.length; i++) {
var node = tree2.getNodeByParam("id", ids2[i]); var node = tree2.getNodeByParam("id", ids2[i]);
try{tree2.checkNode(node, true, false);}catch(e){} try {
tree2.checkNode(node, true, false);
} catch (e) {
}
} }
// 默认展开全部节点 // 默认展开全部节点
tree2.expandAll(true); tree2.expandAll(true);
// 刷新(显示/隐藏)机构 // 刷新(显示/隐藏)机构
refreshOfficeTree(); refreshOfficeTree();
$("#dataScope").change(function(){ $("#dataScope").change(function () {
refreshOfficeTree(); refreshOfficeTree();
}); });
}); });
function refreshOfficeTree(){
if($("#dataScope").val()==9){ function refreshOfficeTree() {
if ($("#dataScope").val() == 9) {
$("#officeTree").show(); $("#officeTree").show();
}else{ } else {
$("#officeTree").hide(); $("#officeTree").hide();
} }
} }
</script> </script>
</head> </head>
<body> <body>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li><a href="${ctx}/sys/role/">角色列表</a></li> <li><a href="${ctx}/sys/role/">角色列表</a></li>
<li class="active"><a href="${ctx}/sys/role/form?id=${role.id}">角色<shiro:hasPermission name="sys:role:edit">${not empty role.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:role:edit">查看</shiro:lacksPermission></a></li> <li class="active"><a href="${ctx}/sys/role/form?id=${role.id}">角色<shiro:hasPermission
</ul><br/> name="sys:role:edit">${not empty role.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission
<form:form id="inputForm" modelAttribute="role" action="${ctx}/sys/role/save" method="post" class="form-horizontal"> name="sys:role:edit">查看</shiro:lacksPermission></a></li>
<form:hidden path="id"/> </ul>
<sys:message content="${message}"/> <br/>
<div class="control-group"> <form:form id="inputForm" modelAttribute="role" action="${ctx}/sys/role/save" method="post" class="form-horizontal">
<label class="control-label">归属机构:</label> <form:hidden path="id"/>
<div class="controls"> <sys:message content="${message}"/>
<sys:treeselect id="office" name="office.id" value="${role.office.id}" labelName="office.name" labelValue="${role.office.name}" <div class="control-group">
title="机构" url="/sys/office/treeData" /> <label class="control-label">归属机构:</label>
</div> <div class="controls">
<sys:treeselect id="office" name="office.id" value="${role.office.id}" labelName="office.name"
labelValue="${role.office.name}"
title="机构" url="/sys/office/treeData"/>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">角色名称:</label> <div class="control-group">
<div class="controls"> <label class="control-label">角色名称:</label>
<input id="oldName" name="oldName" type="hidden" value="${role.name}"> <div class="controls">
<form:input path="name" htmlEscape="false" maxlength="50" class="required"/> <input id="oldName" name="oldName" type="hidden" value="${role.name}">
<span class="help-inline"><font color="red">*</font> </span> <form:input path="name" htmlEscape="false" maxlength="50" class="required"/>
</div> <span class="help-inline"><font color="red">*</font> </span>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">英文名称:</label> <div class="control-group">
<div class="controls"> <label class="control-label">英文名称:</label>
<input id="oldEnname" name="oldEnname" type="hidden" value="${role.enname}"> <div class="controls">
<form:input path="enname" htmlEscape="false" maxlength="50" class="required"/> <input id="oldEnname" name="oldEnname" type="hidden" value="${role.enname}">
<span class="help-inline"><font color="red">*</font> 工作流用户组标识</span> <form:input path="enname" htmlEscape="false" maxlength="50" class="required"/>
</div> <span class="help-inline"><font color="red">*</font> 工作流用户组标识</span>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">角色类型:</label> <div class="control-group">
<div class="controls"> <label class="control-label">角色类型:</label>
<div class="controls">
<form:select path="roleKind" class="input-large required" >
<form:option value="" label="请选择" /> <form:select path="roleKind" class="input-large required">
<form:option value="" label="请选择"/>
<form:options items="${fns:getDictList('role_kind')}" <form:options items="${fns:getDictList('role_kind')}"
itemLabel="label" itemValue="value" htmlEscape="false" /> itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select> </form:select>
<%-- <%--
<form:input path="roleType" htmlEscape="false" maxlength="50" class="required"/> <form:input path="roleType" htmlEscape="false" maxlength="50" class="required"/>
<span class="help-inline" title="activiti有3种预定义的组类型:security-role、assignment、user 如果使用Activiti Explorer,需要security-role才能看到manage页签,需要assignment才能claim任务"> <span class="help-inline" title="activiti有3种预定义的组类型:security-role、assignment、user 如果使用Activiti Explorer,需要security-role才能看到manage页签,需要assignment才能claim任务">
工作流组用户组类型(security-role:管理员、assignment:可进行任务分配、user:普通用户)</span> --%> 工作流组用户组类型(security-role:管理员、assignment:可进行任务分配、user:普通用户)</span> --%>
<%-- <form:select path="roleType" class="input-medium"> <%-- <form:select path="roleType" class="input-medium">
<form:option value="assignment">任务分配</form:option> <form:option value="assignment">任务分配</form:option>
<form:option value="security-role">管理角色</form:option> <form:option value="security-role">管理角色</form:option>
<form:option value="user">普通角色</form:option> <form:option value="user">普通角色</form:option>
</form:select> </form:select>
<span class="help-inline" title="activiti有3种预定义的组类型:security-role、assignment、user 如果使用Activiti Explorer,需要security-role才能看到manage页签,需要assignment才能claim任务"> <span class="help-inline" title="activiti有3种预定义的组类型:security-role、assignment、user 如果使用Activiti Explorer,需要security-role才能看到manage页签,需要assignment才能claim任务">
工作流组用户组类型(任务分配:assignment、管理角色:security-role、普通角色:user)</span> --%> 工作流组用户组类型(任务分配:assignment、管理角色:security-role、普通角色:user)</span> --%>
</div>
</div>
<div class="control-group">
<label class="control-label">是否系统数据:</label>
<div class="controls">
<form:select path="sysData">
<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
<span class="help-inline">“是”代表此数据只有超级管理员能进行修改,“否”则表示拥有角色修改人员的权限都能进行修改</span>
</div>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">是否可用</label> <div class="control-group">
<div class="controls"> <label class="control-label">是否系统数据:</label>
<form:select path="useable"> <div class="controls">
<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/> <form:select path="sysData">
</form:select> <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value"
<span class="help-inline">“是”代表此数据可用,“否”则表示此数据不可用</span> htmlEscape="false"/>
</div> </form:select>
<span class="help-inline">“是”代表此数据只有超级管理员能进行修改,“否”则表示拥有角色修改人员的权限都能进行修改</span>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">数据范围:</label> <div class="control-group">
<div class="controls"> <label class="control-label">是否可用</label>
<form:select path="dataScope" class="input-medium"> <div class="controls">
<form:options items="${fns:getDictList('sys_data_scope')}" itemLabel="label" itemValue="value" htmlEscape="false"/> <form:select path="useable">
</form:select> <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value"
<span class="help-inline">特殊情况下,设置为“按明细设置”,可进行跨机构授权</span> htmlEscape="false"/>
</div> </form:select>
<span class="help-inline">“是”代表此数据可用,“否”则表示此数据不可用</span>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">角色授权:</label> <div class="control-group">
<div class="controls"> <label class="control-label">数据范围:</label>
<div id="menuTree" class="ztree" style="margin-top:3px;float:left;"></div> <div class="controls">
<form:hidden path="menuIds"/> <form:select path="dataScope" class="input-medium">
<div id="officeTree" class="ztree" style="margin-left:100px;margin-top:3px;float:left;"></div> <form:options items="${fns:getDictList('sys_data_scope')}" itemLabel="label" itemValue="value"
<form:hidden path="officeIds"/> htmlEscape="false"/>
</div> </form:select>
<span class="help-inline">特殊情况下,设置为“按明细设置”,可进行跨机构授权</span>
</div> </div>
<div class="control-group"> </div>
<label class="control-label">备注:</label> <div class="control-group">
<div class="controls"> <label class="control-label">角色授权:</label>
<form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="200" class="input-xlarge"/> <div class="controls">
</div> <div id="menuTree" class="ztree" style="margin-top:3px;float:left;"></div>
<form:hidden path="menuIds"/>
<div id="officeTree" class="ztree" style="margin-left:100px;margin-top:3px;float:left;"></div>
<form:hidden path="officeIds"/>
</div> </div>
<div class="form-actions"> </div>
<c:if test="${(role.sysData eq fns:getDictValue('是', 'yes_no', '1') && fns:getUser().admin)||!(role.sysData eq fns:getDictValue('是', 'yes_no', '1'))}"> <div class="control-group">
<shiro:hasPermission name="sys:role:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission> <label class="control-label">备注:</label>
</c:if> <div class="controls">
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/> <form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="200" class="input-xlarge"/>
</div> </div>
</form:form> </div>
<div class="form-actions">
<c:if test="${(role.sysData eq fns:getDictValue('是', 'yes_no', '1') && fns:getUser().admin)||!(role.sysData eq fns:getDictValue('是', 'yes_no', '1'))}">
<shiro:hasPermission name="sys:role:edit"><input id="btnSubmit" class="btn btn-primary" type="submit"
value="保 存"/>&nbsp;</shiro:hasPermission>
</c:if>
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
</div>
</form:form>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li><a href="${ctx}/depart/depart/list">论证部门管理</a></li> <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}/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/> </ul><br/>
<form:form id="inputForm" modelAttribute="departEntity" action="${ctx}/depart/depart/save" method="post" class="form-horizontal"> <form:form id="inputForm" modelAttribute="departEntity" action="${ctx}/depart/depart/save" method="post" class="form-horizontal">
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<shiro:hasPermission name="vrf:depart:edit"> <shiro:hasPermission name="vrf:depart:edit">
<li><a href="${ctx}/depart/depart/form">新增论证部门</a></li> <li><a href="${ctx}/depart/depart/form">新增论证部门</a></li>
</shiro:hasPermission> </shiro:hasPermission>
<li><a href="${ctx}/airline/verifyAdd">航线管理部门列表</a></li>
</ul> </ul>
<form:form id="searchForm" modelAttribute="departEntity" action="${ctx}/depart/depart/list" method="post" <form:form id="searchForm" modelAttribute="departEntity" action="${ctx}/depart/depart/list" method="post"
class="breadcrumb form-search "> class="breadcrumb form-search ">
......
<?xml version="1.0" encoding="UTF-8"?>
<project name="manage" default="deploy" basedir=".">
<property environment="env" />
<property name="webapp.name" value="manage" />
<property name="catalina.home" value="/data/apache-tomcat-8.5.42" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="WebContent.dir" value="${basedir}/WebContent" />
<property name="src.dir" value="${basedir}/src" />
<property name="resources.dir" value="${basedir}/resources" />
<property name="lib.dir" value="${WebContent.dir}/WEB-INF/lib" />
<property name="build.dir" value="${basedir}/build" />
<!-- 使用eclipse jdt进行编译,而不使用JDK编译 -->
<!-- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" /> -->
<!-- 初始化classpath -->
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<!-- 添加tomcat类路径 -->
<fileset dir="${catalina.home}/lib">
<include name="*.jar" />
</fileset>
</path>
<pathconvert pathsep="${line.separator}| |-- "
property="echo.path.compile"
refid="project.classpath">
</pathconvert>
<!-- show classpath jars -->
<target name="print_classpath">
<echo message="|-- compile classpath"/>
<echo message="| |"/>
<echo message="| |-- ${echo.path.compile}"/>
</target>
<!-- 删除之前的目录结构 -->
<target name="clear" description="清理旧文件">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete file="${catalina.home}/webapps/${webapp.name}.war" />
<delete dir="${catalina.home}/webapps/${webapp.name}" />
</target>
<!-- 创建目录结构 -->
<target name="init" depends="clear" description="创建初始化目录结构">
<mkdir dir="${build.dir}/classes" />
<mkdir dir="${dist.dir}" />
</target>
<!-- 编译java -->
<target name="compile" depends="init" description="编译java文件">
<echo message="begin compile..." />
<javac srcdir="${src.dir}" destdir="${build.dir}/classes"
includeantruntime="false" nowarn="on"
source="1.8" target="1.8" deprecation="true" debug="true"
encoding="UTF-8" classpathref="project.classpath"
>
<compilerarg line="-Xlint:unchecked" />
<!-- <classpath refid="project.classpath" /> -->
</javac>
<copy todir="${build.dir}/classes">
<fileset dir="${src.dir}">
<include name="**/*.xml" />
<include name="**/*.properties" />
<include name="**/*.sql" />
</fileset>
<fileset dir="${resources.dir}">
<include name="**/*.xml" />
<include name="**/*.properties" />
<include name="**/*.sql" />
</fileset>
</copy>
<echo message="end compile..." />
</target>
<!-- 打成war包, 名称默认为 项目名 -->
<target name="war" depends="compile" description="将工程打成war包">
<echo message="begin war..." />
<war destfile="${dist.dir}/${webapp.name}.war" basedir="${WebContent.dir}"
webxml="${WebContent.dir}/WEB-INF/web.xml">
<lib dir="${lib.dir}" />
<classes dir="${build.dir}/classes" />
<fileset dir="${WebContent.dir}">
<include name="***.*" />
</fileset>
</war>
<echo message="end war..." />
</target>
<!-- copy war包 tomcat的deploy目录 -->
<target name="deploy" depends="war" description="部署项目">
<echo message="begin deploy..." />
<copy file="${dist.dir}/${webapp.name}.war" todir="${catalina.home}/webapps" />
<echo message="end deploy..." />
</target>
</project>
\ No newline at end of file
...@@ -95,7 +95,7 @@ female.user.default.avatar=/images/user/avatar/female_avatar.png ...@@ -95,7 +95,7 @@ female.user.default.avatar=/images/user/avatar/female_avatar.png
# \u7537\u751F\u5934\u50CF # \u7537\u751F\u5934\u50CF
male.user.default.avatar=/images/user/avatar/male_avatar.png male.user.default.avatar=/images/user/avatar/male_avatar.png
foc.api.url=http://123.56.146.7/ foc.api.url=http://localhost:8080/
foc.sound.records.url=http://218.241.234.135:8080/ab/jsonData/cdrDataPage foc.sound.records.url=http://218.241.234.135:8080/ab/jsonData/cdrDataPage
......
#MySQL Database Config(The All Config Is Must) #MySQL Database Config(The All Config Is Must)
db.table.prefix=foc_ db.table.prefix=foc_
jdbc.type=mysql jdbc.type=mysql
jdbc.driver.class=com.mysql.jdbc.Driver jdbc.driver.class=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://106.75.97.50:3306/jd_foc?useUnicode=true&characterEncoding=utf-8 jdbc.url=jdbc:mysql://106.75.105.96:5508/jd_foc?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
jdbc.username=focuser jdbc.username=sms_develop
jdbc.password=FOC@2016 jdbc.password=Develop2018!@#
#\u521d\u59cb\u5316\u8fde\u63a5
#\u521d\u59cb\u5316\u8fde\u63a5
jdbc.initialSize=0 jdbc.initialSize=0
#\u8fde\u63a5\u6c60\u7684\u6700\u5927\u6d3b\u52a8\u4e2a\u6570 #\u8fde\u63a5\u6c60\u7684\u6700\u5927\u6d3b\u52a8\u4e2a\u6570
jdbc.maxActive=20 jdbc.maxActive=20
......
# Output pattern : date [thread] priority category - message FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 # Output pattern : date [thread] priority category - message FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7
log4j.rootLogger=DEBUG, Console, RollingFile log4j.rootLogger=Console, RollingFile
#Console #Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender log4j.appender.Console=org.apache.log4j.ConsoleAppender
...@@ -26,7 +26,7 @@ log4j.appender.RollingFile.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n ...@@ -26,7 +26,7 @@ log4j.appender.RollingFile.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
#Project defalult level #Project defalult level
#log4j.logger.org.activiti.engine.impl.persistence=DEBUG #log4j.logger.org.activiti.engine.impl.persistence=DEBUG
#log4j.logger.org.apache.shiro=DEBUG #log4j.logger.org.apache.shiro=DEBUG
log4j.loggercom.ejweb=DEBUG log4j.loggercom.ejweb=Console
log4j.loggercom.ejweb.core.security.shiro=WARN log4j.loggercom.ejweb.core.security.shiro=WARN
log4j.loggercom.ejweb.core.utils.JedisUtils=WARN log4j.loggercom.ejweb.core.utils.JedisUtils=WARN
log4j.loggercom.ejweb.modules.sys.web.LoginController=WARN log4j.loggercom.ejweb.modules.sys.web.LoginController=WARN
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ejweb.modules.airline.dao.VerifyDao"> <mapper namespace="com.ejweb.modules.airline.dao.VerifyDao">
<sql id="verifylist"> <sql id="verifylist">
a.id, a.id,
a.apply_no, a.apply_no,
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
t.verif_id AS "connect.verifId", t.verif_id AS "connect.verifId",
t.Is_main AS "connect.IsMain" t.Is_main AS "connect.IsMain"
</sql> </sql>
<sql id="verifyColumn"> <sql id="verifyColumn">
a.id , a.id ,
a.apply_no, a.apply_no,
a.verif_no, a.verif_no,
...@@ -56,15 +56,15 @@ ...@@ -56,15 +56,15 @@
LEFT JOIN foc_sailing_file s ON s.verif_id=a.id LEFT JOIN foc_sailing_file s ON s.verif_id=a.id
LEFT JOIN foc_airports u ON u.airport_iata = a.depIata LEFT JOIN foc_airports u ON u.airport_iata = a.depIata
</sql> </sql>
<select id="get" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="get" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT SELECT
<include refid="verifylist"/> <include refid="verifylist"/>
FROM foc_airline_verify a FROM foc_airline_verify a
<include refid="verifyJoins"/> <include refid="verifyJoins"/>
WHERE a.id = #{id} WHERE a.id = #{id}
</select> </select>
<select id="get2" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="get2" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT SELECT
a.id, a.id,
a.apply_no, a.apply_no,
...@@ -92,10 +92,10 @@ ...@@ -92,10 +92,10 @@
LEFT JOIN foc_airports u ON u.airport_iata = a.depIata LEFT JOIN foc_airports u ON u.airport_iata = a.depIata
WHERE a.id = #{id} WHERE a.id = #{id}
</select> </select>
<select id="getVerify" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="getVerify" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT SELECT
<include refid="verifyColumn"/> <include refid="verifyColumn"/>
FROM foc_airline_verify a FROM foc_airline_verify a
LEFT JOIN foc_airports p ON p.airport_iata = a.depIata LEFT JOIN foc_airports p ON p.airport_iata = a.depIata
LEFT JOIN foc_airports r ON r.airport_iata = a.arrIata LEFT JOIN foc_airports r ON r.airport_iata = a.arrIata
...@@ -103,15 +103,15 @@ ...@@ -103,15 +103,15 @@
</select> </select>
<select id="getConnect" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="getConnect" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT SELECT
<include refid="verifylist"/> <include refid="verifylist"/>
FROM foc_airline_verify a FROM foc_airline_verify a
<include refid="verifyJoins"/> <include refid="verifyJoins"/>
WHERE t.id = #{connect.id} WHERE t.id = #{connect.id}
</select> </select>
<select id="getverifyByVerifNo" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="getverifyByVerifNo" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT SELECT
<include refid="verifylist"/> <include refid="verifylist"/>
FROM foc_airline_verify a FROM foc_airline_verify a
<include refid="verifyJoins"/> <include refid="verifyJoins"/>
WHERE a.verif_no = #{verifNo} WHERE a.verif_no = #{verifNo}
...@@ -119,27 +119,34 @@ ...@@ -119,27 +119,34 @@
<select id="findValidator" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="findValidator" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT a.verif_no SELECT a.verif_no
FROM foc_airline_verify a FROM foc_airline_verify a
where a.del_flag = #{DEL_FLAG_NORMAL} where a.del_flag = #{DEL_FLAG_NORMAL}
<if test="verifNo!= null and verifNo!=''"> <if test="verifNo!= null and verifNo!=''">
AND a.verif_no=#{verifNo} AND a.verif_no=#{verifNo}
</if> </if>
<if test="routeNo!= null and routeNo!=''"> <if test="routeNo!= null and routeNo!=''">
AND a.route_no=#{routeNo} AND a.route_no=#{routeNo}
</if> </if>
</select>
<select id="findverifNo" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT a.verif_no
FROM foc_airline_verify a
where a.del_flag = #{DEL_FLAG_NORMAL}
<if test="verifNo!= null and verifNo!=''">
AND a.verif_no=#{verifNo}
</if>
</select> </select>
<select id="findAllList" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="findAllList" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT a.verif_no as verifNo, SELECT a.verif_no as verifNo,
a.id as verifId, a.id as verifId,
a.source, a.source,
CASE WHEN a.verif_type='01' OR a.verif_type='02' CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05' OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05'
THEN b.id THEN b.id
ELSE a.id END id, ELSE a.id END id,
CASE WHEN a.verif_type='01' OR a.verif_type='02' CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05' OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05'
THEN b.flight_no THEN b.flight_no
ELSE a.flight_no ELSE a.flight_no
END flightNo, END flightNo,
a.route_no AS routeNo, a.route_no AS routeNo,
...@@ -148,59 +155,60 @@ ...@@ -148,59 +155,60 @@
b.arrIata, b.arrIata,
DATE_FORMAT(cc.update_date, '%Y-%m-%d') AS startTime, DATE_FORMAT(cc.update_date, '%Y-%m-%d') AS startTime,
CASE WHEN a.verif_type='01' OR a.verif_type='02' CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05' OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05' OR a.verif_type='09'
THEN p.city_name THEN p.city_name
ELSE tt.airport_name ELSE tt.airport_name
END depIataName, END depIataName,
CASE WHEN a.verif_type='01' OR a.verif_type='02' CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR (a.verif_type='05' AND a.roundtrip_type!='01') OR a.verif_type='03' OR a.verif_type='04' OR (a.verif_type='05' AND a.roundtrip_type!='01') OR a.verif_type='09'
THEN CONCAT(p.city_name,b.depIata,'=',r.city_name,b.arrIata) THEN CONCAT(p.city_name,b.depIata,'=',r.city_name,b.arrIata)
WHEN a.verif_type='05' AND a.roundtrip_type='01' WHEN a.verif_type='05' AND a.roundtrip_type='01'
THEN CONCAT(p.city_name,b.depIata,'-',r.city_name,b.arrIata) THEN CONCAT(p.city_name,b.depIata,'-',r.city_name,b.arrIata)
ELSE CONCAT(tt.airport_name,a.depIata) ELSE CONCAT(tt.airport_name,a.depIata)
END airline, END airline,
a.verif_type as verifType, a.verif_type as verifType,
r.city_name AS arrIataName, r.city_name AS arrIataName,
a.verifued_count AS verifuedCount, a.verifued_count AS verifuedCount,
a.depart_id as departId, a.depart_id as departId,
d.file_path as filePath, d.file_path as filePath,
c.type_name AS "aircraft.typeName", c.type_name AS "aircraft.typeName",
a.state a.state
from foc_airline_verify a from foc_airline_verify a
left JOIN foc_airline_connect b on a.id = b.verif_id AND b.Is_main!='0' left JOIN foc_airline_connect b on a.id = b.verif_id AND b.Is_main!='0'
LEFT JOIN foc_aircraft_type c on a.aircraft_type = c.id LEFT JOIN foc_aircraft_type c on a.aircraft_type = c.id
LEFT JOIN foc_sailing_file d on a.id = d.verif_id LEFT JOIN foc_sailing_file d on a.id = d.verif_id
LEFT JOIN foc_airports p ON p.airport_iata = b.depIata LEFT JOIN foc_airports p ON p.airport_iata = b.depIata
LEFT JOIN foc_sailing_command cc ON a.id = cc.verif_id LEFT JOIN foc_sailing_command cc ON a.id = cc.verif_id
LEFT JOIN foc_airports r ON r.airport_iata = b.arrIata LEFT JOIN foc_airports r ON r.airport_iata = b.arrIata
LEFT JOIN foc_airports tt ON tt.airport_iata = a.depIata LEFT JOIN foc_airports tt ON tt.airport_iata = a.depIata
where a.del_flag = #{DEL_FLAG_NORMAL} where a.del_flag = #{DEL_FLAG_NORMAL}
<if test="verifNo!= null and verifNo!=''"> <if test="verifNo!= null and verifNo!=''">
AND a.verif_no LIKE CONCAT('%', #{verifNo}, '%') AND a.verif_no LIKE CONCAT('%', #{verifNo}, '%')
</if> </if>
<if test="verifType!= null and verifType!=''"> <if test="verifType!= null and verifType!=''">
AND a.verif_type=#{verifType} AND a.verif_type=#{verifType}
</if> </if>
AND a.verif_status='02'
<if test="areaSt!= null and areaSt.airportIata!=''"> <if test="areaSt!= null and areaSt.airportIata!=''">
<!-- AND b.depIata=#{areaSt.airportIata} --> <!-- AND b.depIata=#{areaSt.airportIata} -->
AND (b.verif_id in ( AND (b.verif_id in (
SELECT id FROM foc_airline_verify where depIata = #{areaSt.airportIata} ) SELECT id FROM foc_airline_verify where depIata = #{areaSt.airportIata} )
OR a.id IN OR a.id IN
(SELECT verif_id FROM foc_airline_connect WHERE depIata = #{areaSt.airportIata} AND is_main != '0') (SELECT verif_id FROM foc_airline_connect WHERE depIata = #{areaSt.airportIata} AND is_main != '0')
) )
</if> </if>
<if test="areaAr!= null and areaAr.airportIata!=''"> <if test="areaAr!= null and areaAr.airportIata!=''">
<!-- AND b.arrIata=#{areaAr.airportIata} --> <!-- AND b.arrIata=#{areaAr.airportIata} -->
AND (b.verif_id in AND (b.verif_id in
( SELECT id FROM foc_airline_verify where arrIata = #{areaAr.airportIata} ) OR a.id IN ( SELECT id FROM foc_airline_verify where arrIata = #{areaAr.airportIata} ) OR a.id IN
(SELECT verif_id FROM foc_airline_connect WHERE arrIata = #{areaAr.airportIata} AND is_main != '0') (SELECT verif_id FROM foc_airline_connect WHERE arrIata = #{areaAr.airportIata} AND is_main != '0')
) )
</if> </if>
ORDER BY a.route_no DESC AND a.verif_status != '03'
AND a.source = '0'
ORDER BY a.verif_no DESC
</select> </select>
<select id="getDay" resultType="Integer"> <select id="getDay" resultType="Integer">
SELECT SELECT
...@@ -217,41 +225,41 @@ ...@@ -217,41 +225,41 @@
ORDER BY ata_chn DESC ORDER BY ata_chn DESC
LIMIT 1 LIMIT 1
</select> </select>
<select id="findAllList1" resultType="com.ejweb.modules.airline.entity.VerifyEntity"> <select id="findAllList1" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT id, SELECT id,
apply_no, apply_no,
route_no, route_no,
verif_no, verif_no,
verif_type, verif_type,
airline, airline,
a.status, a.status,
depName AS "areaSt.cityName", depName AS "areaSt.cityName",
arrName AS "areaAr.cityName", arrName AS "areaAr.cityName",
a.depIata AS "areaSt.airportIata", a.depIata AS "areaSt.airportIata",
a.arrIata AS "areaAr.airportIata", a.arrIata AS "areaAr.airportIata",
expiryDate, expiryDate,
startTime, startTime,
typeName AS "aircraft.typeName" typeName AS "aircraft.typeName"
FROM view_verify a FROM view_verify a
where 1=1 where 1=1
<if test="verifNo!= null and verifNo!=''"> <if test="verifNo!= null and verifNo!=''">
AND a.verif_no LIKE CONCAT('%', #{verifNo}, '%') AND a.verif_no LIKE CONCAT('%', #{verifNo}, '%')
</if> </if>
<if test="verifType!= null and verifType!=''"> <if test="verifType!= null and verifType!=''">
AND a.verif_type=#{verifType} AND a.verif_type=#{verifType}
</if> </if>
<if test="areaSt!= null and areaSt.airportIata!=''"> <if test="areaSt!= null and areaSt.airportIata!=''">
AND a.depIata=#{areaSt.airportIata} AND a.depIata=#{areaSt.airportIata}
</if> </if>
<if test="areaAr!= null and areaAr.airportIata!=''"> <if test="areaAr!= null and areaAr.airportIata!=''">
AND a.arrIata=#{areaAr.airportIata} AND a.arrIata=#{areaAr.airportIata}
</if> </if>
ORDER BY a.route_no DESC ORDER BY a.route_no DESC
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO foc_airline_verify( INSERT INTO foc_airline_verify(
id, id,
verif_no, verif_no,
...@@ -293,7 +301,7 @@ ...@@ -293,7 +301,7 @@
) )
</insert> </insert>
<update id="update"> <update id="update">
UPDATE foc_airline_verify SET UPDATE foc_airline_verify SET
verif_no = #{verifNo}, verif_no = #{verifNo},
...@@ -308,7 +316,7 @@ ...@@ -308,7 +316,7 @@
route_type = #{routeType} route_type = #{routeType}
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<update id="delete"> <update id="delete">
UPDATE foc_airline_verify SET UPDATE foc_airline_verify SET
del_flag = #{DEL_FLAG_DELETE} del_flag = #{DEL_FLAG_DELETE}
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ejweb.modules.airline.dao.VerifyDepartAddDao" >
<select id="findUserDeparList" resultType="com.ejweb.modules.depart.entity.UserDepartEntity">
SELECT
a.id,
a.is_verif,
a.is_risk,
a.depart_name
FROM foc_user_depart a
WHERE a.del_flag = '0'
</select>
<insert id="addUserDepartType" parameterType="com.ejweb.modules.depart.entity.AddDepartTypeDto">
insert into foc_user_depart_type(depart_id,type)
values
<foreach collection="dto.departIds" item="emp" separator=",">
(#{emp},#{dto.type})
</foreach>
</insert>
<delete id="deleteUserDepartType" parameterType="com.ejweb.modules.depart.entity.AddDepartTypeDto">
DELETE from foc_user_depart_type WHERE type=#{type}
</delete>
<select id="getDictAll" resultType="com.ejweb.modules.depart.entity.UserDictEntity">
SELECT
f.id,
f.value as valueType,
f.label
FROM `sys_dict` f
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,
fu.depart_name,
f.depart_id
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="valueType != null and valueType !=''">
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
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ejweb.modules.airline.dao.VerifyUpdateUserDao">
<sql id="verifylist">
a.id,
a.apply_no,
a.verif_no,
a.verif_type,
a.roundtrip_type,
a.priority,
a.source,
a.aircraft_type,
case when verif_type='01' or verif_type='02' or verif_type='03' or verif_type='04' or verif_type='05'
then t.flight_no
else a.flight_no end flightNo,
a.route_no,
a.expiry_date,
t.depIata AS "areaSt.airportIata",
t.arrIata AS "areaAr.airportIata",
case when verif_type='01' or verif_type='02' or verif_type='03' or verif_type='04' or verif_type='05'
then p.city_name
else
u.airport_name end "areaSt.cityName",
r.city_name AS "areaAr.cityName",
a.aircraft_type AS "aircraft.id",
q.type_name AS "aircraft.typeName",
a.id AS "sailingfile.verifId",
s.id AS "sailingfile.id",
t.id AS "connect.id",
t.verif_id AS "connect.verifId",
t.Is_main AS "connect.IsMain"
</sql>
<sql id="verifyColumn">
a.id ,
a.apply_no,
a.verif_no,
a.verif_type,
a.roundtrip_type,
a.priority,
a.aircraft_type,
a.flight_no,
a.source,
a.route_no,
a.expiry_date,
a.depIata AS "areaSt.airportIata",
a.arrIata AS "areaAr.airportIata"
</sql>
<sql id="verifyJoins">
LEFT JOIN foc_airline_connect t ON t.verif_id=a.id
LEFT JOIN foc_airports p ON p.airport_iata = t.depIata
LEFT JOIN foc_airports r ON r.airport_iata = t.arrIata
LEFT JOIN foc_aircraft_type q ON q.id = a.aircraft_type
LEFT JOIN foc_sailing_file s ON s.verif_id=a.id
LEFT JOIN foc_airports u ON u.airport_iata = a.depIata
</sql>
<select id="get" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT
<include refid="verifylist"/>
FROM foc_airline_verify a
<include refid="verifyJoins"/>
WHERE a.id = #{id}
</select>
<select id="get2" resultType="com.ejweb.modules.airline.entity.VerifyEntity">
SELECT
a.id,
a.apply_no,
a.verif_no,
a.verif_type,
a.roundtrip_type,
a.priority,
a.aircraft_type,
a.flight_no AS flightNo,
a.route_no,
a.source,
a.expiry_date,
a.depIata AS "areaSt.airportIata",
a.arrIata AS "areaAr.airportIata",
u.airport_name AS "areaSt.cityName",
a.aircraft_type AS "aircraft.id",
q.type_name AS "aircraft.typeName",
a.id AS "sailingfile.verifId",
s.id AS "sailingfile.id"
FROM foc_airline_verify a
LEFT JOIN foc_airports p ON p.airport_iata = a.depIata
LEFT JOIN foc_airports r ON r.airport_iata = a.arrIata
LEFT JOIN foc_aircraft_type q ON q.id = a.aircraft_type
LEFT JOIN foc_sailing_file s ON s.verif_id=a.id
LEFT JOIN foc_airports u ON u.airport_iata = a.depIata
WHERE a.id = #{id}
</select>
<select id="findAllList" resultType="com.ejweb.modules.airline.entity.VerifyUpdateUserEntity">
SELECT a.verif_no as verifNo,
a.id as verifId,
a.source,
CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05'
THEN b.id
ELSE a.id END id,
CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05'
THEN b.flight_no
ELSE a.flight_no
END flightNo,
a.route_no AS routeNo,
a.aircraft_type,
fu.update_user as operateUser,
fu.update_time as operateTime,
fu.original_id,
fu.reason,
b.depIata,
b.arrIata,
DATE_FORMAT(cc.update_date, '%Y-%m-%d') AS startTime,
CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05' OR a.verif_type='09'
THEN p.city_name
ELSE tt.airport_name
END depIataName,
CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR (a.verif_type='05' AND a.roundtrip_type!='01') OR a.verif_type='09'
THEN CONCAT(p.city_name,b.depIata,'=',r.city_name,b.arrIata)
WHEN a.verif_type='05' AND a.roundtrip_type='01'
THEN CONCAT(p.city_name,b.depIata,'-',r.city_name,b.arrIata)
ELSE CONCAT(tt.airport_name,a.depIata)
END airline,
a.verif_type as verifType,
r.city_name AS arrIataName,
a.verifued_count AS verifuedCount,
a.depart_id as departId,
d.file_path as filePath,
c.type_name AS "aircraft.typeName",
a.state
from foc_airline_verify a
left JOIN foc_airline_connect b on a.id = b.verif_id AND b.Is_main!='0'
LEFT JOIN foc_aircraft_type c on a.aircraft_type = c.id
LEFT JOIN foc_sailing_file d on a.id = d.verif_id
LEFT JOIN foc_airports p ON p.airport_iata = b.depIata
LEFT JOIN foc_sailing_command cc ON a.id = cc.verif_id
LEFT JOIN foc_airports r ON r.airport_iata = b.arrIata
LEFT JOIN foc_airports tt ON tt.airport_iata = a.depIata
INNER JOIN foc_airline_verify_update fu on a.id = fu.verify_id AND fu.del_flag=0
where a.del_flag = 0
<if test="verifNo!= null and verifNo!=''">
AND a.verif_no LIKE CONCAT('%', #{verifNo}, '%')
</if>
<if test="verifType!= null and verifType!=''">
AND a.verif_type=#{verifType}
</if>
<if test="operateUser!= null and operateUser!=''">
AND fu.update_user LIKE CONCAT('%',#{operateUser}, '%')
</if>
AND (a.verif_status='02' or a.verif_status='00')
<if test="areaSt!= null and areaSt.airportIata!=''">
AND (b.verif_id in (
SELECT id FROM foc_airline_verify where depIata = #{areaSt.airportIata} )
OR a.id IN
(SELECT verif_id FROM foc_airline_connect WHERE depIata = #{areaSt.airportIata} AND is_main != '0')
)
</if>
<if test="areaAr!= null and areaAr.airportIata!=''">
<!-- AND b.arrIata=#{areaAr.airportIata} -->
AND (b.verif_id in
( SELECT id FROM foc_airline_verify where arrIata = #{areaAr.airportIata} ) OR a.id IN
(SELECT verif_id FROM foc_airline_connect WHERE arrIata = #{areaAr.airportIata} AND is_main != '0')
)
</if>
order by fu.update_time DESC
/* ORDER BY a.route_no DESC*/
</select>
<select id="getDay" resultType="Integer">
SELECT
TIMESTAMPDIFF(
DAY,
ata_chn,
CURRENT_TIMESTAMP
)
FROM
foc_flight_dynamics
where dep_stn=#{depIata} and arr_stn=#{arrIata}
and ac_long_no in (SELECT flight_no FROM foc_ac_type s LEFT JOIN foc_airline_verify2type t ON s.type_id=t.type_id
where verif_id=#{verifId})
ORDER BY ata_chn DESC
LIMIT 1
</select>
<insert id="addUpdateUser">
INSERT INTO foc_airline_verify_update(
verify_id,
update_user,
reason,
original_id
) VALUES (
#{vue.id},
#{vue.operateUser},
#{vue.reason},
#{vue.originalId}
)
</insert>
</mapper>
\ No newline at end of file
...@@ -35,9 +35,15 @@ ...@@ -35,9 +35,15 @@
SELECT SELECT
<include refid="airportColumns"/> <include refid="airportColumns"/>
FROM foc_airports a FROM foc_airports a
WHERE a.airport_iata = #{airportIata} AND a.status != #{STATUS_DELETE} WHERE a.airport_iata = #{airportIata}
</select> </select>
<select id="getAirportByAirportName" resultType="integer">
SELECT
count(1)
FROM foc_airports a
WHERE a.airport_name = #{airportName} AND a.status = #{STATUS_SHOW}
</select>
<!-- 分页查询机场信息 --> <!-- 分页查询机场信息 -->
<select id="findList" resultType="com.ejweb.modules.contact.entity.AirportEntity"> <select id="findList" resultType="com.ejweb.modules.contact.entity.AirportEntity">
SELECT SELECT
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 --> <!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 -->
<setting name="jdbcTypeForNull" value="NULL"/> <setting name="jdbcTypeForNull" value="NULL"/>
<setting name="logImpl" value="STDOUT_LOGGING" /> <!-- <setting name="logImpl" value="STDOUT_LOGGING" />-->
</settings> </settings>
......
...@@ -154,6 +154,6 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo ...@@ -154,6 +154,6 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo
// } // }
// System.out.println(DES3Utils.encrypt("jdbc:mysql://10.70.78.27:3306/foc?useUnicode=true&characterEncoding=utf-8", CONF_DESC_KEY)); // System.out.println(DES3Utils.encrypt("jdbc:mysql://10.70.78.27:3306/foc?useUnicode=true&characterEncoding=utf-8", CONF_DESC_KEY));
System.out.println(DES3Utils.decrypt("7aaee3bf1b522eee9c5cade1a71670f3aed546d27bf021874da7580fa9df6021c87eaddeb9b9a6eb200842455cb776b4347eb35b6c4fb07af249a322047538d40a3047091eb83489e3f02dd6c57c44d6", CONF_DESC_KEY)); System.out.println(DES3Utils.decrypt("31a63fac8317458d81c034906825749f7c58c30a773c6927", CONF_DESC_KEY));
} }
} }
package com.ejweb.modules.airline.dao; package com.ejweb.modules.airline.dao;
import java.util.List;
import com.ejweb.core.persistence.CrudDao; import com.ejweb.core.persistence.CrudDao;
import com.ejweb.modules.airline.entity.VerifyEntity; import com.ejweb.modules.airline.entity.VerifyEntity;
import java.util.List;
public interface VerifyDao extends CrudDao<VerifyEntity>{ public interface VerifyDao extends CrudDao<VerifyEntity>{
public VerifyEntity getverifyByVerifNo(VerifyEntity verifyEntity); public VerifyEntity getverifyByVerifNo(VerifyEntity verifyEntity);
public List<VerifyEntity> findValidator(VerifyEntity verifyEntity); public List<VerifyEntity> findValidator(VerifyEntity verifyEntity);
public List<VerifyEntity> findverifNo(VerifyEntity verifyEntity);
public VerifyEntity getConnect(VerifyEntity verifyEntity); public VerifyEntity getConnect(VerifyEntity verifyEntity);
public VerifyEntity getVerify(String id); public VerifyEntity getVerify(String id);
public VerifyEntity get2(String id); public VerifyEntity get2(String id);
......
package com.ejweb.modules.airline.dao;
import com.ejweb.modules.depart.entity.AddDepartTypeDto;
import com.ejweb.modules.depart.entity.UserDepartEntity;
import com.ejweb.modules.depart.entity.UserDepartTypeEntity;
import com.ejweb.modules.depart.entity.UserDictEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* 论证部门Dao
* @author zhanglg
* @version 2016-08-24
*/
public interface VerifyDepartAddDao{
/**
*根据论证类type型查询 包含多少部门
* @param valueType
* @return
*/
public List<UserDepartTypeEntity> getUserDepartType(@Param("valueType")String valueType);
/**
* 查询已选所有论证类型
* @return
*/
public List<UserDictEntity> getUserDictAll();
public List<UserDictEntity> getDictAll();
/**
* 查询所有部门信息
* @return
*/
public List<UserDepartEntity> findUserDeparList();
/**
* 添加部门和类型关联信息
* @param addDepartTypeDto
* @return
*/
public Integer addUserDepartType(@Param("dto") AddDepartTypeDto addDepartTypeDto);
public Integer deleteUserDepartType(@Param("type") String type);
public void deleteUserDepart(@Param("type") String type);
}
\ No newline at end of file
package com.ejweb.modules.airline.dao;
import com.ejweb.core.persistence.CrudDao;
import com.ejweb.modules.airline.entity.VerifyEntity;
import com.ejweb.modules.airline.entity.VerifyUpdateUserEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface VerifyUpdateUserDao extends CrudDao<VerifyUpdateUserEntity>{
public List<VerifyUpdateUserEntity> findAllList(VerifyUpdateUserEntity verifyUpdateUserEntity);
public VerifyEntity get2(String id);
public Integer getDay(VerifyUpdateUserEntity verifyUpdateUserEntity);
public Integer addUpdateUser(@Param(value = "vue") VerifyUpdateUserEntity verifyUpdateUserEntity);
}
package com.ejweb.modules.airline.entity; 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.persistence.DataEntity;
import com.ejweb.core.utils.excel.annotation.ExcelField; import com.ejweb.core.utils.excel.annotation.ExcelField;
import com.ejweb.core.utils.excel.fieldtype.AircraftType; import com.ejweb.core.utils.excel.fieldtype.AircraftType;
import com.ejweb.modules.aircraft.entity.AircraftEntity; import com.ejweb.modules.aircraft.entity.AircraftEntity;
import com.ejweb.modules.contact.entity.AirportEntity; import com.ejweb.modules.contact.entity.AirportEntity;
import com.ejweb.modules.depart.entity.DepartEntity; import com.ejweb.modules.depart.entity.DepartEntity;
//import com.ejweb.modules.sys.entity.Area;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import java.util.Date;
//import com.ejweb.modules.sys.entity.Area;
/** /**
* *
* Verify Entity * Verify Entity
...@@ -38,8 +36,10 @@ public class VerifyEntity extends DataEntity<VerifyEntity> implements Cloneable{ ...@@ -38,8 +36,10 @@ public class VerifyEntity extends DataEntity<VerifyEntity> implements Cloneable{
@NotNull(message="论证单号不能为空") @NotNull(message="论证单号不能为空")
@ExcelField(title="论证单号", type=0, align=3, sort=11) @ExcelField(title="论证单号", type=0, align=3, sort=11)
private String verifNo; private String verifNo;
private String operateUser;
private String reason;
@NotNull(message="论证类型不能为空") @NotNull(message="论证类型不能为空")
@ExcelField(title="论证类型", type=0, align=2, sort=12, dictType="vrf_verify_type") @ExcelField(title="论证类型", type=0, align=2, sort=12, dictType="vrf_verify_type")
private String verifType; private String verifType;
@NotNull(message="机型不能为空") @NotNull(message="机型不能为空")
@ExcelField(title="机型", type=0, align=3, sort=13, fieldType=AircraftType.class) @ExcelField(title="机型", type=0, align=3, sort=13, fieldType=AircraftType.class)
...@@ -92,16 +92,26 @@ public class VerifyEntity extends DataEntity<VerifyEntity> implements Cloneable{ ...@@ -92,16 +92,26 @@ public class VerifyEntity extends DataEntity<VerifyEntity> implements Cloneable{
private String depIata; private String depIata;
private String arrIata; private String arrIata;
private Date sailingDate; public String getOperateUser() {
return operateUser;
}
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 String airline;
private SailingFileEntity sailingfile; private SailingFileEntity sailingfile;
......
package com.ejweb.modules.airline.entity;
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.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import java.util.Date;
//import com.ejweb.modules.sys.entity.Area;
/**
*
* Verify Entity
* @team IT Team
* @author zhanglg
* @version 1.0
* @time 2016年8月30日
*/
public class VerifyUpdateUserEntity extends DataEntity<VerifyUpdateUserEntity> implements Cloneable{
private static final long serialVersionUID = 1L;
private String id;
private String verifId;
private String source;
private String applyNo;
@NotNull(message="开航指令号不能为空")
@ExcelField(title="开航指令号", type=0, align=3, sort=10)
private String routeNo;
@NotNull(message="论证单号不能为空")
@ExcelField(title="论证单号", type=0, align=3, sort=11)
private String verifNo;
@NotNull(message="论证类型不能为空")
@ExcelField(title="论证类型", type=0, align=2, sort=12, dictType="vrf_verify_type")
private String verifType;
@NotNull(message="机型不能为空")
@ExcelField(title="机型", type=0, align=3, sort=13, fieldType=AircraftType.class)
private AircraftEntity aircraft;
private AirportEntity areaSt;
//中转城市
private AirportEntity areaTr;
private AirportEntity areaAr;
@ExcelField(title="剩余天数", type=0, align=2, sort=16)
private String expiryDate;
@ExcelField(title="航线状态", type=0, align=2, sort=17)
private String status;
private String formType;
private String roundtripType;
private String priority;
private DepartEntity depart;
private String flightNo;
private String reason;
private String originalId;
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getOriginalId() {
return originalId;
}
public void setOriginalId(String originalId) {
this.originalId = originalId;
}
private String flightType;
private String routeType;
@JsonFormat(pattern = "yyyy-MM-dd")
@ExcelField(title="发布时间", type=0, align=2, sort=18)
private Date startTime;
private Date endTime;
private String lineType;
private String competitor;
private String industry;
private String applyReason;
private String cargoDemand;
private String otherReason;
private String verifStatus;
private String routeConnection;
private String depIata;
private String arrIata;
private Date sailingDate;
private String process;
private String operateUser;
private Date operateTime;
public String getOperateUser() {
return operateUser;
}
public void setOperateUser(String operateUser) {
this.operateUser = operateUser;
}
public Date getOperateTime() {
return operateTime;
}
public void setOperateTime(Date operateTime) {
this.operateTime = operateTime;
}
private String airline;
private SailingFileEntity sailingfile;
private ConnectEntity connect;
@ExcelField(title="航线", type=0, align=12, sort=14)
public String getAirline() {
return airline;
}
public void setAirline(String airline) {
this.airline = airline;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getApplyNo() {
return applyNo;
}
public void setApplyNo(String applyNo) {
this.applyNo = applyNo == null ? null : applyNo.trim();
}
public String getVerifNo() {
return verifNo;
}
public void setVerifNo(String verifNo) {
this.verifNo = verifNo == null ? null : verifNo.trim();
}
public String getRouteNo() {
return routeNo;
}
public void setRouteNo(String routeNo) {
this.routeNo = routeNo;
}
public String getVerifType() {
return verifType;
}
public void setVerifType(String verifType) {
this.verifType = verifType == null ? null : verifType.trim();
}
public String getFormType() {
return formType;
}
public String getVerifId() {
return verifId;
}
public void setVerifId(String verifId) {
this.verifId = verifId;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public void setFormType(String formType) {
this.formType = formType == null ? null : formType.trim();
}
public String getRoundtripType() {
return roundtripType;
}
public void setRoundtripType(String roundtripType) {
this.roundtripType = roundtripType == null ? null : roundtripType.trim();
}
public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority == null ? null : priority.trim();
}
public String getFlightNo() {
return flightNo;
}
public void setFlightNo(String flightNo) {
this.flightNo = flightNo == null ? null : flightNo.trim();
}
public String getFlightType() {
return flightType;
}
public void setFlightType(String flightType) {
this.flightType = flightType == null ? null : flightType.trim();
}
public String getRouteType() {
return routeType;
}
public void setRouteType(String routeType) {
this.routeType = routeType == null ? null : routeType.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getLineType() {
return lineType;
}
public void setLineType(String lineType) {
this.lineType = lineType == null ? null : lineType.trim();
}
public String getCompetitor() {
return competitor;
}
public void setCompetitor(String competitor) {
this.competitor = competitor == null ? null : competitor.trim();
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry == null ? null : industry.trim();
}
public String getApplyReason() {
return applyReason;
}
public void setApplyReason(String applyReason) {
this.applyReason = applyReason == null ? null : applyReason.trim();
}
public String getCargoDemand() {
return cargoDemand;
}
public void setCargoDemand(String cargoDemand) {
this.cargoDemand = cargoDemand == null ? null : cargoDemand.trim();
}
public String getOtherReason() {
return otherReason;
}
public void setOtherReason(String otherReason) {
this.otherReason = otherReason == null ? null : otherReason.trim();
}
public String getVerifStatus() {
return verifStatus;
}
public void setVerifStatus(String verifStatus) {
this.verifStatus = verifStatus == null ? null : verifStatus.trim();
}
public String getRouteConnection() {
return routeConnection;
}
public void setRouteConnection(String routeConnection) {
this.routeConnection = routeConnection == null ? null : routeConnection.trim();
}
public Date getSailingDate() {
return sailingDate;
}
public void setSailingDate(Date sailingDate) {
this.sailingDate = sailingDate;
}
public String getProcess() {
return process;
}
public void setProcess(String process) {
this.process = process == null ? null : process.trim();
}
public DepartEntity getDepart() {
return depart;
}
public void setDepart(DepartEntity depart) {
this.depart = depart;
}
public AircraftEntity getAircraft() {
return aircraft;
}
public void setAircraft(AircraftEntity aircraft) {
this.aircraft = aircraft;
}
public AirportEntity getAreaSt() {
return areaSt;
}
public void setAreaSt(AirportEntity areaSt) {
this.areaSt = areaSt;
}
public AirportEntity getAreaTr() {
return areaTr;
}
public void setAreaTr(AirportEntity areaTr) {
this.areaTr = areaTr;
}
public AirportEntity getAreaAr() {
return areaAr;
}
public void setAreaAr(AirportEntity areaAr) {
this.areaAr = areaAr;
}
public SailingFileEntity getSailingfile() {
return sailingfile;
}
public void setSailingfile(SailingFileEntity sailingfile) {
this.sailingfile = sailingfile;
}
public Object clone() throws CloneNotSupportedException {
VerifyUpdateUserEntity verify = (VerifyUpdateUserEntity) super.clone();
return verify;
}
public ConnectEntity getConnect() {
return connect;
}
public void setConnect(ConnectEntity connect) {
this.connect = connect;
}
public String getExpiryDate() {
return expiryDate;
}
public void setExpiryDate(String expiryDate) {
this.expiryDate = expiryDate;
}
public String getDepIata() {
return depIata;
}
public void setDepIata(String depIata) {
this.depIata = depIata;
}
public String getArrIata() {
return arrIata;
}
public void setArrIata(String arrIata) {
this.arrIata = arrIata;
}
}
\ No newline at end of file
package com.ejweb.modules.airline.service;
import com.ejweb.core.service.CrudService;
import com.ejweb.modules.airline.dao.VerifyDao;
import com.ejweb.modules.airline.dao.VerifyDepartAddDao;
import com.ejweb.modules.airline.entity.VerifyEntity;
import com.ejweb.modules.depart.entity.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
* Verify Service
*
* @author zhanglg
* @version 2016-8-23
*/
@Service
@Transactional(readOnly = true)
public class VerifyAddService extends CrudService<VerifyDao, VerifyEntity> {
@Autowired
private VerifyDepartAddDao verifyDepartAddDao;
//查询所有的类型对应的部门
public List<UserDictDepartEntity> findUserDeparDictAllList() {
List<UserDictEntity> userDictAll = verifyDepartAddDao.getUserDictAll();
List<UserDictDepartEntity> dictlist = new ArrayList<>();
Integer i = 1;
for (UserDictEntity ud : userDictAll) {
String valueType = ud.getValueType();
List<UserDepartTypeEntity> userDepartType = verifyDepartAddDao.getUserDepartType(valueType);
UserDictDepartEntity userDictEntity = new UserDictDepartEntity();
userDictEntity.setSort(i);
userDictEntity.setLabel(ud.getLabel());
userDictEntity.setValueType(ud.getValueType());
userDictEntity.setdList(userDepartType);
dictlist.add(userDictEntity);
i++;
}
return dictlist;
}
public List<UserDepartEntity> findAllList(UserDepartEntity userDepartEntity) {
//查询所有的部门
List<UserDepartEntity> allList = verifyDepartAddDao.findUserDeparList();
// 根据类型type值查询对应的部门信息
String type = userDepartEntity.getType();
List<UserDepartTypeEntity> byList = null;
if (type != null) {
byList = verifyDepartAddDao.getUserDepartType(type);
}
if (byList != null) {
for (UserDepartEntity udAll : allList) {
for (UserDepartTypeEntity udBy : byList) {
if (udAll.getId() == udBy.getDepartId() || udAll.getId().equals(udBy.getDepartId())) {
udAll.setCheck(true);
}
}
}
}
return allList;
}
public String addUserDepartType(UserDepartNoCheckVo userDepartEntity) {
AddDepartTypeDto addDepartTypeDto = new AddDepartTypeDto();
String type = userDepartEntity.getType();
String list = userDepartEntity.getList();
/* if (list == null || list == " ") {
verifyDepartAddDao.addUserDepartType(addDepartTypeDto);
return "1";
}*/
String[] split = list.split(" ");
List<String> departIdList = new ArrayList<>();
for (String sp : split) {
departIdList.add(sp);
}
addDepartTypeDto.setType(type);
addDepartTypeDto.setDepartIds(departIdList);
if (type != null && type != "") {
List<UserDepartTypeEntity> byList = verifyDepartAddDao.getUserDepartType(type);
// 不为空先删除在添加
if (byList != null) {
verifyDepartAddDao.deleteUserDepartType(type);
}
verifyDepartAddDao.addUserDepartType(addDepartTypeDto);
}
return "1";
}
public List<UserDictEntity> getDictAll() {
List<UserDictEntity> userDictAll = verifyDepartAddDao.getDictAll();
return userDictAll;
}
public String deleteUserDepart(String type) {
verifyDepartAddDao.deleteUserDepartType(type);
return "";
}
}
package com.ejweb.modules.airline.service; 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.persistence.Page;
import com.ejweb.core.service.CrudService; import com.ejweb.core.service.CrudService;
import com.ejweb.core.utils.StringUtils; import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.airline.dao.ConnectDao; import com.ejweb.modules.airline.dao.ConnectDao;
import com.ejweb.modules.airline.dao.VerifyDao; 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.ConnectEntity;
import com.ejweb.modules.airline.entity.VerifyEntity; 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.dao.UserProfileDao;
import com.ejweb.modules.contact.entity.UserProfileEntity; import com.ejweb.modules.contact.entity.UserProfileEntity;
import com.ejweb.modules.depart.entity.DepartEntity; import com.ejweb.modules.depart.entity.DepartEntity;
import com.ejweb.modules.sys.utils.UserUtils; import com.ejweb.modules.sys.utils.UserUtils;
import com.github.pagehelper.PageHelper; 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 * Verify Service
...@@ -36,6 +37,8 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> { ...@@ -36,6 +37,8 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
private ConnectDao connectDao; private ConnectDao connectDao;
@Autowired @Autowired
private UserProfileDao userProfileDao; private UserProfileDao userProfileDao;
@Autowired
private VerifyUpdateUserDao verifyUpdateUserDao;
public VerifyEntity get(String id) { public VerifyEntity get(String id) {
VerifyEntity verifyEntity = verifyDao.get2(id); VerifyEntity verifyEntity = verifyDao.get2(id);
...@@ -119,7 +122,24 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> { ...@@ -119,7 +122,24 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
} }
@Transactional(readOnly = false) @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.findverifNo(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())) { if (StringUtils.isBlank(verifyEntity.getId())) {
verifyEntity.preInsert(); // 生成id verifyEntity.preInsert(); // 生成id
UserProfileEntity user = new UserProfileEntity(); UserProfileEntity user = new UserProfileEntity();
...@@ -129,11 +149,13 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> { ...@@ -129,11 +149,13 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
DepartEntity depart = new DepartEntity(); DepartEntity depart = new DepartEntity();
depart.setId(departId); depart.setId(departId);
verifyEntity.setDepart(depart); verifyEntity.setDepart(depart);
//校验论证单号是否重复
verifyDao.insert(verifyEntity); verifyDao.insert(verifyEntity);
// 如果不是航线则结束 // 如果不是航线则结束
if ("06".equals(verifyEntity.getVerifType()) || "07".equals(verifyEntity.getVerifType()) if ("06".equals(verifyEntity.getVerifType()) || "07".equals(verifyEntity.getVerifType())
|| "08".equals(verifyEntity.getVerifType())) { || "08".equals(verifyEntity.getVerifType())) {
return; return"";
} }
ConnectEntity connect = new ConnectEntity(); ConnectEntity connect = new ConnectEntity();
connect.preInsert(); // 生成id connect.preInsert(); // 生成id
...@@ -163,11 +185,11 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> { ...@@ -163,11 +185,11 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
verif.setExpiryDate(verifyEntity.getExpiryDate()); verif.setExpiryDate(verifyEntity.getExpiryDate());
verif.setAircraft(verifyEntity.getAircraft()); verif.setAircraft(verifyEntity.getAircraft());
if ("06".equals(verifyEntity.getVerifType()) || "07".equals(verifyEntity.getVerifType()) if ("06".equals(verifyEntity.getVerifType()) || "07".equals(verifyEntity.getVerifType())
|| "08".equals(verifyEntity.getVerifType())) { || "08".equals(verifyEntity.getVerifType()) || "09".equals(verifyEntity.getVerifType())) {
verif.setAreaSt(verifyEntity.getAreaSt()); verif.setAreaSt(verifyEntity.getAreaSt());
verif.setFlightNo(verifyEntity.getFlightNo()); verif.setFlightNo(verifyEntity.getFlightNo());
verifyDao.update(verifyEntity); verifyDao.update(verifyEntity);
return; return"";
} }
// 判断是否主数据 // 判断是否主数据
else if ("1".equals(verifyEntity.getConnect().getIsMain())) { else if ("1".equals(verifyEntity.getConnect().getIsMain())) {
...@@ -184,9 +206,11 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> { ...@@ -184,9 +206,11 @@ public class VerifyService extends CrudService<VerifyDao, VerifyEntity> {
connect.setFlightNo(verifyEntity.getFlightNo()); connect.setFlightNo(verifyEntity.getFlightNo());
connectDao.update(verifyEntity.getConnect()); connectDao.update(verifyEntity.getConnect());
} }
return"";
} }
public List<VerifyEntity> CheckValidator(VerifyEntity verifyEntity) { public List<VerifyEntity> CheckValidator(VerifyEntity verifyEntity) {
return verifyDao.findValidator(verifyEntity); return verifyDao.findValidator(verifyEntity);
} }
......
package com.ejweb.modules.airline.service;
import com.ejweb.core.persistence.Page;
import com.ejweb.core.service.CrudService;
import com.ejweb.modules.airline.dao.VerifyUpdateUserDao;
import com.ejweb.modules.airline.entity.VerifyUpdateUserEntity;
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;
/**
* Verify Service
*
* @author zhanglg
* @version 2016-8-23
*/
@Service
@Transactional(readOnly = true)
public class VerifyUpdateUserService extends CrudService<VerifyUpdateUserDao, VerifyUpdateUserEntity> {
@Autowired
private VerifyUpdateUserDao verifyDao;
/* @Autowired
private ConnectDao connectDao;
@Autowired
private UserProfileDao userProfileDao;*/
/* public VerifyEntity get(String id) {
VerifyEntity verifyEntity = verifyDao.get2(id);
return verifyEntity;
}*/
public Page<VerifyUpdateUserEntity> findList(Page<VerifyUpdateUserEntity> page, VerifyUpdateUserEntity verifyEntity) {
verifyEntity.setPage(page);
PageHelper.startPage(page.getPageNo(), page.getPageSize());
List<VerifyUpdateUserEntity> list = verifyDao.findAllList(verifyEntity);
for (VerifyUpdateUserEntity entity : list) {
if ("06".equals(entity.getVerifType()) || "07".equals(entity.getVerifType())
|| "08".equals(entity.getVerifType())) {
entity.setExpiryDate("长期有效");
} else {
Integer day = verifyDao.getDay(entity);
if (day != null) {
if (day <= 0) day = 0;
day = 90 - day;
if (day < 0) {
entity.setExpiryDate("0");
entity.setStatus("失效");
} else {
entity.setExpiryDate(day + "");
entity.setStatus("有效");
}
}
}
}
page.setList(list);
return page;
}
/* public boolean isNumeric(String str) {
Pattern pattern = Pattern.compile("[0-9]*");
Matcher isNum = pattern.matcher(str);
if (!isNum.matches()) {
return false;
}
return true;
}*/
}
package com.ejweb.modules.airline.web; package com.ejweb.modules.airline.web;
import java.util.List; import com.ejweb.core.base.BaseController;
import com.ejweb.core.utils.StringUtils;
import javax.servlet.http.HttpServletRequest; import com.ejweb.modules.aircraft.entity.AircraftEntity;
import javax.servlet.http.HttpServletResponse; 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.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
...@@ -14,14 +17,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -14,14 +17,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.ejweb.core.base.BaseController; import javax.servlet.http.HttpServletRequest;
import com.ejweb.core.utils.StringUtils; import javax.servlet.http.HttpServletResponse;
import com.ejweb.modules.aircraft.entity.AircraftEntity; import java.util.List;
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;
...@@ -72,7 +70,11 @@ public class ConnectController extends BaseController { ...@@ -72,7 +70,11 @@ public class ConnectController extends BaseController {
if (!beanValidator(model, verifyEntity)){ if (!beanValidator(model, verifyEntity)){
return form(verifyEntity, model); 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, "保存成功"); addMessage(redirectAttributes, "保存成功");
return "redirect:" + adminPath + "/airline/verify/list?repage"; return "redirect:" + adminPath + "/airline/verify/list?repage";
} }
......
package com.ejweb.modules.airline.web;
import com.ejweb.core.base.BaseController;
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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.List;
/**
* Verify Controller
*
* @author zhanglg
* @version 1.0
* @team IT Team
* @time 2016年8月30日
*/
@Controller
@RequestMapping(value = "${adminPath}/airline/verifyAdd")
public class VerifyAddController extends BaseController {
private final Logger LOG = LoggerFactory.getLogger(VerifyAddController.class);
@Autowired
private VerifyAddService verifyService;
@RequiresPermissions("vrf:verify:view")
@RequestMapping(value = {"list", ""})
public String list( Model model) {
List<UserDictDepartEntity> dictlist = verifyService.findUserDeparDictAllList();
model.addAttribute("page", dictlist);
return "modules/airline/userDepart";
}
@RequiresPermissions("vrf:verify:view")
@RequestMapping(value = "form")
public String form(@ModelAttribute("userDepartEntity") UserDepartEntity userDepartEntity, Model model) {
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")
public String addUserDepartType(UserDepartNoCheckVo userDepartNoCheckVo, Model model, RedirectAttributes redirectAttributes) {
UserDepartEntity userDepartEntity =new UserDepartEntity();
if (!beanValidator(model, userDepartNoCheckVo)) {
return form(userDepartEntity, model);
}
String type = userDepartNoCheckVo.getType();
String list = userDepartNoCheckVo.getList();
if (type == null|| type.equals("")) {
addMessage(redirectAttributes, "未选择类型");
return "redirect:" + adminPath + "/airline/verifyAdd/list?repage";
}else if(list == null || list.equals("")){
addMessage(redirectAttributes, "未选择部门");
return "redirect:" + adminPath + "/airline/verifyAdd/list?repage";
}
String s = verifyService.addUserDepartType(userDepartNoCheckVo);
addMessage(redirectAttributes, "操作成功");
return "redirect:" + adminPath + "/airline/verifyAdd/list?repage";
}
@RequiresPermissions("vrf:verify:view")
@RequestMapping(value = "delete")
public String deleteUserDepart(String valueType,Model model) {
verifyService.deleteUserDepart(valueType);
return "redirect:" + adminPath + "/airline/verifyAdd/list?repage";
}
}
package com.ejweb.modules.airline.web; package com.ejweb.modules.airline.web;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.ejweb.core.base.BaseController; import com.ejweb.core.base.BaseController;
import com.ejweb.core.persistence.Page; import com.ejweb.core.persistence.Page;
import com.ejweb.core.utils.DateUtils; import com.ejweb.core.utils.DateUtils;
...@@ -30,10 +11,25 @@ import com.ejweb.modules.aircraft.entity.AircraftEntity; ...@@ -30,10 +11,25 @@ import com.ejweb.modules.aircraft.entity.AircraftEntity;
import com.ejweb.modules.aircraft.service.AircraftService; import com.ejweb.modules.aircraft.service.AircraftService;
import com.ejweb.modules.airline.entity.ConnectEntity; import com.ejweb.modules.airline.entity.ConnectEntity;
import com.ejweb.modules.airline.entity.VerifyEntity; import com.ejweb.modules.airline.entity.VerifyEntity;
import com.ejweb.modules.airline.entity.VerifyError;
import com.ejweb.modules.airline.service.VerifyService; import com.ejweb.modules.airline.service.VerifyService;
import com.ejweb.modules.contact.entity.AirportEntity; import com.ejweb.modules.contact.entity.AirportEntity;
import com.ejweb.modules.contact.service.AirportService; import com.ejweb.modules.contact.service.AirportService;
import com.ejweb.modules.airline.entity.VerifyError; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import java.util.ArrayList;
import java.util.List;
/** /**
...@@ -48,6 +44,7 @@ import com.ejweb.modules.airline.entity.VerifyError; ...@@ -48,6 +44,7 @@ import com.ejweb.modules.airline.entity.VerifyError;
@Controller @Controller
@RequestMapping(value = "${adminPath}/airline/verify") @RequestMapping(value = "${adminPath}/airline/verify")
public class VerifyController extends BaseController { public class VerifyController extends BaseController {
private final Logger LOG = LoggerFactory.getLogger(VerifyController.class);
@Autowired @Autowired
private VerifyService verifyService; private VerifyService verifyService;
...@@ -58,11 +55,17 @@ public class VerifyController extends BaseController { ...@@ -58,11 +55,17 @@ public class VerifyController extends BaseController {
@ModelAttribute @ModelAttribute
public VerifyEntity get(@RequestParam(required = false) String id) { public VerifyEntity get(@RequestParam(required = false) String id) {
LOG.info("论证单ID:" + id);
VerifyEntity verifyEntity = null;
if (StringUtils.isNotBlank(id)) { if (StringUtils.isNotBlank(id)) {
return verifyService.get(id); verifyEntity = verifyService.get(id);
} else { LOG.info(verifyEntity.getVerifNo());
return new VerifyEntity(); }
if (verifyEntity == null) {
LOG.info("未获取到相关论证数据");
verifyEntity = new VerifyEntity();
} }
return verifyEntity;
} }
@RequiresPermissions("vrf:verify:view") @RequiresPermissions("vrf:verify:view")
...@@ -103,7 +106,11 @@ public class VerifyController extends BaseController { ...@@ -103,7 +106,11 @@ public class VerifyController extends BaseController {
if (!beanValidator(model, verifyEntity)) { if (!beanValidator(model, verifyEntity)) {
return form(verifyEntity, model); 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, "保存成功"); addMessage(redirectAttributes, "保存成功");
return "redirect:" + adminPath + "/airline/verify/list?repage"; return "redirect:" + adminPath + "/airline/verify/list?repage";
} }
......
package com.ejweb.modules.airline.web;
import com.ejweb.core.base.BaseController;
import com.ejweb.core.persistence.Page;
import com.ejweb.modules.aircraft.service.AircraftService;
import com.ejweb.modules.airline.entity.VerifyEntity;
import com.ejweb.modules.airline.entity.VerifyError;
import com.ejweb.modules.airline.entity.VerifyUpdateUserEntity;
import com.ejweb.modules.airline.service.VerifyUpdateUserService;
import com.ejweb.modules.contact.entity.AirportEntity;
import com.ejweb.modules.contact.service.AirportService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Verify Controller
*
* @author zhanglg
* @version 1.0
* @team IT Team
* @time 2016年8月30日
*/
@Controller
@RequestMapping(value = "${adminPath}/airline/verifyUpdateUser")
public class VerifyUpdateUserController extends BaseController {
private final Logger LOG = LoggerFactory.getLogger(VerifyUpdateUserController.class);
@Autowired
private VerifyUpdateUserService verifyService;
@Autowired
private AircraftService aircraftService;
@Autowired
private AirportService airportService;
/* @ModelAttribute
public VerifyEntity get(@RequestParam(required = false) String id) {
LOG.info("论证单ID:" + id);
VerifyEntity verifyEntity = null;
if (StringUtils.isNotBlank(id)) {
verifyEntity = verifyService.get(id);
LOG.info(verifyEntity.getVerifNo());
}
if (verifyEntity == null) {
LOG.info("未获取到相关论证数据");
verifyEntity = new VerifyEntity();
}
return verifyEntity;
}*/
@RequiresPermissions("vrf:verify:view")
@RequestMapping(value = {"list", ""})
public String list(VerifyUpdateUserEntity verifyUpdateUserEntity, HttpServletRequest request, HttpServletResponse response,
Model model, String message) {
if (message != null) {
model.addAttribute("message", message);
}
verifyUpdateUserEntity.setVerifStatus("02");
Page<VerifyUpdateUserEntity> page = verifyService.findList(new Page<VerifyUpdateUserEntity>(request, response), verifyUpdateUserEntity);
model.addAttribute("page", page);
List<AirportEntity> airportData = airportService.findAllList(new AirportEntity());
model.addAttribute("airportList", airportData);
return "modules/airline/verifyUpdateUserList";
}
@RequiresPermissions("vrf:verify:view")
@RequestMapping(value = "error")
public String error(VerifyEntity verifyEntity, Model model, List<VerifyError> list) {
model.addAttribute("list", list);
return "modules/airline/verifyError";
}
}
...@@ -9,6 +9,7 @@ import com.ejweb.modules.contact.entity.AirportEntity; ...@@ -9,6 +9,7 @@ import com.ejweb.modules.contact.entity.AirportEntity;
/** /**
* 三字码 * 三字码
* Airport DAO接口 * Airport DAO接口
*
* @author yuxg * @author yuxg
* @version 2016-08-19 * @version 2016-08-19
*/ */
...@@ -16,6 +17,8 @@ import com.ejweb.modules.contact.entity.AirportEntity; ...@@ -16,6 +17,8 @@ import com.ejweb.modules.contact.entity.AirportEntity;
public interface AirportDao extends CrudDao<AirportEntity> { public interface AirportDao extends CrudDao<AirportEntity> {
AirportEntity getAirportByAirportIata(AirportEntity airportEntity); AirportEntity getAirportByAirportIata(AirportEntity airportEntity);
Integer getAirportByAirportName(AirportEntity airportEntity);
List<AirportEntity> findAllAirport(AirportEntity entity); List<AirportEntity> findAllAirport(AirportEntity entity);
} }
package com.ejweb.modules.contact.service; package com.ejweb.modules.contact.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ejweb.core.service.CrudService; import com.ejweb.core.service.CrudService;
import com.ejweb.core.utils.SpringContextHolder; import com.ejweb.core.utils.SpringContextHolder;
import com.ejweb.modules.contact.dao.AirportDao; import com.ejweb.modules.contact.dao.AirportDao;
import com.ejweb.modules.contact.entity.AirportEntity; import com.ejweb.modules.contact.entity.AirportEntity;
import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* 三字码 Airport Service * 三字码 Airport Service
...@@ -37,6 +35,13 @@ public class AirportService extends CrudService<AirportDao, AirportEntity> { ...@@ -37,6 +35,13 @@ public class AirportService extends CrudService<AirportDao, AirportEntity> {
return airportDao.getAirportByAirportIata(airportEntity); return airportDao.getAirportByAirportIata(airportEntity);
} }
public Integer getAirportByAirportName(String airportName) {
AirportEntity airportEntity = new AirportEntity();
airportEntity.setAirportName(airportName);
Integer count = airportDao.getAirportByAirportName(airportEntity);
return count;
}
// 保存或更新 // 保存或更新
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void save1(AirportEntity entity) { public void save1(AirportEntity entity) {
...@@ -108,5 +113,5 @@ public class AirportService extends CrudService<AirportDao, AirportEntity> { ...@@ -108,5 +113,5 @@ public class AirportService extends CrudService<AirportDao, AirportEntity> {
public List<AirportEntity> getAllAirportsData(AirportEntity entity){ public List<AirportEntity> getAllAirportsData(AirportEntity entity){
return dao.findAllAirport(entity); return dao.findAllAirport(entity);
} }
} }
package com.ejweb.modules.contact.web; package com.ejweb.modules.contact.web;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.ejweb.core.base.BaseController; import com.ejweb.core.base.BaseController;
import com.ejweb.core.persistence.Page; import com.ejweb.core.persistence.Page;
import com.ejweb.core.utils.DateUtils; import com.ejweb.core.utils.DateUtils;
...@@ -33,10 +12,25 @@ import com.ejweb.modules.contact.entity.AirportEntity; ...@@ -33,10 +12,25 @@ import com.ejweb.modules.contact.entity.AirportEntity;
import com.ejweb.modules.contact.service.AirportService; import com.ejweb.modules.contact.service.AirportService;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/** /**
* 通讯录模块下的三字码 Airport Controller * 通讯录模块下的三字码 Airport Controller
* *
* @author yuxg * @author yuxg
* @version 2016-8-19 * @version 2016-8-19
*/ */
...@@ -56,9 +50,9 @@ public class AirportController extends BaseController { ...@@ -56,9 +50,9 @@ public class AirportController extends BaseController {
} }
} }
@RequestMapping(value = { "airportList", "" }) @RequestMapping(value = {"airportList", ""})
public String airportList(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response, public String airportList(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response,
Model model) { Model model) {
String arilist = request.getParameter("airportsList"); String arilist = request.getParameter("airportsList");
String airportsId = airportEntity.getAirportsId(); String airportsId = airportEntity.getAirportsId();
String airportsName = airportEntity.getAirportsName(); String airportsName = airportEntity.getAirportsName();
...@@ -76,11 +70,11 @@ public class AirportController extends BaseController { ...@@ -76,11 +70,11 @@ public class AirportController extends BaseController {
arr.add(arilist); arr.add(arilist);
} }
} }
if(StringUtils.isEmpty(airportsName)){ if (StringUtils.isEmpty(airportsName)) {
airportsName = ""; airportsName = "";
for(int i=0;i<arr.size();i++){ for (int i = 0; i < arr.size(); i++) {
AirportEntity entity = airportService.get(arr.get(i)); AirportEntity entity = airportService.get(arr.get(i));
airportsName += entity.getAirportName()+"-"; airportsName += entity.getAirportName() + "-";
} }
} }
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity); Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity);
...@@ -100,16 +94,16 @@ public class AirportController extends BaseController { ...@@ -100,16 +94,16 @@ public class AirportController extends BaseController {
} }
if (StringUtils.isNotEmpty(airportsId)) { if (StringUtils.isNotEmpty(airportsId)) {
model.addAttribute("airportsId", airportsId); model.addAttribute("airportsId", airportsId);
model.addAttribute("airportsName", airportsName.substring(0, airportsName.length()-1)); model.addAttribute("airportsName", airportsName.substring(0, airportsName.length() - 1));
} }
model.addAttribute("page", page); model.addAttribute("page", page);
return "modules/contact/airportSelect"; return "modules/contact/airportSelect";
} }
@RequiresPermissions("im:airport:view") @RequiresPermissions("im:airport:view")
@RequestMapping(value = { "list", "" }) @RequestMapping(value = {"list", ""})
public String list(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response, public String list(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response,
Model model) { Model model) {
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity); Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity);
model.addAttribute("page", page); model.addAttribute("page", page);
return "modules/contact/airportList"; return "modules/contact/airportList";
...@@ -124,7 +118,7 @@ public class AirportController extends BaseController { ...@@ -124,7 +118,7 @@ public class AirportController extends BaseController {
@RequiresPermissions("im:airport:edit") @RequiresPermissions("im:airport:edit")
@RequestMapping(value = "save") @RequestMapping(value = "save")
public String save(AirportEntity airportEntity, HttpServletRequest request, Model model, public String save(AirportEntity airportEntity, HttpServletRequest request, Model model,
RedirectAttributes redirectAttributes) { RedirectAttributes redirectAttributes) {
if (!beanValidator(model, airportEntity)) { if (!beanValidator(model, airportEntity)) {
return form(airportEntity, model); return form(airportEntity, model);
} }
...@@ -143,7 +137,7 @@ public class AirportController extends BaseController { ...@@ -143,7 +137,7 @@ public class AirportController extends BaseController {
/** /**
* 验证是否已存在该三字码名称 * 验证是否已存在该三字码名称
* *
* @param oldAirportIata * @param oldAirportIata
* @param airportIata * @param airportIata
* @return * @return
...@@ -159,6 +153,25 @@ public class AirportController extends BaseController { ...@@ -159,6 +153,25 @@ public class AirportController extends BaseController {
return "false"; // 存在 return "false"; // 存在
} }
/**
* 验证机场是否有正在使用三字码
*
* @param airportName
* @return
*/
@ResponseBody
@RequestMapping("checkAirportName")
public String checkAirportName(String airportName, String id) {
if (StringUtils.isEmpty(airportName) || StringUtils.isNotEmpty(id)) {
return "true";
}
Integer count = airportService.getAirportByAirportName(airportName);
if (count == 0) {
return "true";
}
return "false";
}
@ResponseBody @ResponseBody
@RequestMapping("airportData") @RequestMapping("airportData")
public List<Map<String, Object>> airportData(AirportEntity airportEntity) { public List<Map<String, Object>> airportData(AirportEntity airportEntity) {
...@@ -178,7 +191,7 @@ public class AirportController extends BaseController { ...@@ -178,7 +191,7 @@ public class AirportController extends BaseController {
/** /**
* 批量导入三字码 * 批量导入三字码
* *
* @param file * @param file
* @param redirectAttributes * @param redirectAttributes
* @return * @return
...@@ -227,7 +240,7 @@ public class AirportController extends BaseController { ...@@ -227,7 +240,7 @@ public class AirportController extends BaseController {
/** /**
* 导出三字码数据 * 导出三字码数据
* *
* @param airportEntity * @param airportEntity
* @param redirectAttributes * @param redirectAttributes
* @return * @return
...@@ -235,10 +248,12 @@ public class AirportController extends BaseController { ...@@ -235,10 +248,12 @@ public class AirportController extends BaseController {
@RequiresPermissions("im:airport:edit") @RequiresPermissions("im:airport:edit")
@RequestMapping(value = "batchExport", method = RequestMethod.POST) @RequestMapping(value = "batchExport", method = RequestMethod.POST)
public String exportFile(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response, public String exportFile(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response,
RedirectAttributes redirectAttributes) { RedirectAttributes redirectAttributes) {
try { try {
String fileName = "三字码数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; String fileName = "三字码数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response, -1), // Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response, -1),
// airportEntity);
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(1, 1000000000),
airportEntity); airportEntity);
new ExportExcel("三字码数据", AirportEntity.class).setDataList(page.getList()).write(response, fileName) new ExportExcel("三字码数据", AirportEntity.class).setDataList(page.getList()).write(response, fileName)
.dispose(); .dispose();
...@@ -251,7 +266,7 @@ public class AirportController extends BaseController { ...@@ -251,7 +266,7 @@ public class AirportController extends BaseController {
/** /**
* 下载导入三字码数据模板 * 下载导入三字码数据模板
* *
* @param response * @param response
* @param redirectAttributes * @param redirectAttributes
* @return * @return
......
...@@ -203,14 +203,15 @@ public class UserProfileController extends BaseController { ...@@ -203,14 +203,15 @@ public class UserProfileController extends BaseController {
} }
userProfileEntity = userProfileEntity2; userProfileEntity = userProfileEntity2;
} }
userProfileService.save(userProfileEntity,1); userProfileService.save(userProfileEntity, 1);
String message = "保存成功"; String message = "保存成功";
//用户类型不为空,旧华为状态(更新前)不为空,更新后状态为绑定
if (StringUtils.isNotBlank(userProfileEntity.getUserType()) && !(oldHuaweiStatus == null && userProfileEntity.getHuaweiStatus() == 0) && !(oldHuaweiStatus != null && oldHuaweiStatus == 0 && userProfileEntity.getHuaweiStatus() == 0) if (StringUtils.isNotBlank(userProfileEntity.getUserType()) && !(oldHuaweiStatus == null && userProfileEntity.getHuaweiStatus() == 0) && !(oldHuaweiStatus != null && oldHuaweiStatus == 0 && userProfileEntity.getHuaweiStatus() == 0)
&& (userProfileEntity.getUserType().equals("2") || userProfileEntity.getUserType().equals("4"))) { && (userProfileEntity.getUserType().equals("2") || userProfileEntity.getUserType().equals("4"))) {
StringBuilder url = new StringBuilder(GConstants.getValue("foc.api.url", "")).append("api/huaweiUC/"); StringBuilder url = new StringBuilder(GConstants.getValue("foc.api.url", "")).append("api/huaweiUC/");
Map<String, String> params = new HashMap<String, String>(); Map<String, String> params = new HashMap<String, String>();
params.put("content", "{\"lang\":\"CN\",\"platform\":\"pc\",\"ignoreMaxSipNum\":\"true\",\"deviceToken\":\"deviceToken\",\"appkey\":\"gdfshgfhdgdf\",\"appCode\":\"1001\",\"language\":\"zh_CN\",\"versionName\":\"1.0\",\"userCode\":\"" + (StringUtils.isBlank(userProfileEntity.getCreateBy().getId()) ? "123" : userProfileEntity.getCreateBy().getId()) + "\",\"appPhone\":0,\"" + (userProfileEntity.getHuaweiStatus() == 0 ? "userDelIds" : "userIds") + "\":['" + userProfileEntity.getId() + "']}"); params.put("content", "{\"lang\":\"CN\",\"platform\":\"pc\",\"ignoreMaxSipNum\":\"true\",\"deviceToken\":\"deviceToken\",\"appkey\":\"gdfshgfhdgdf\",\"appCode\":\"1001\",\"language\":\"zh_CN\",\"versionName\":\"1.0\",\"userCode\":\"" + (StringUtils.isBlank(userProfileEntity.getCreateBy().getId()) ? "123" : userProfileEntity.getCreateBy().getId()) + "\",\"appPhone\":0,\"" + (userProfileEntity.getHuaweiStatus() == 0 ? "userDelIds" : "userIds") + "\":['" + userProfileEntity.getId() + "']}");
String sign = GlobalUtil.getParamsSignStr(GConstants.SIGN_PRIVATE_KEY, params.get("content")); String sign = GlobalUtil.getParamsSignStr(GConstants.SIGN_PRIVATE_KEY, params.get("content"));
params.put("sign", sign); params.put("sign", sign);
if (userProfileEntity.getHuaweiStatus() == 0) { if (userProfileEntity.getHuaweiStatus() == 0) {
......
...@@ -4,13 +4,13 @@ import com.ejweb.core.persistence.CrudDao; ...@@ -4,13 +4,13 @@ import com.ejweb.core.persistence.CrudDao;
import com.ejweb.modules.depart.entity.DepartEntity; import com.ejweb.modules.depart.entity.DepartEntity;
/** /**
* *
* 论证部门Dao * 论证部门Dao
* @author zhanglg * @author zhanglg
* @version 2016-08-24 * @version 2016-08-24
*/ */
public interface DepartDao extends CrudDao<DepartEntity>{ public interface DepartDao extends CrudDao<DepartEntity>{
public DepartEntity getdepartByName(DepartEntity departEntity); public DepartEntity getdepartByName(DepartEntity departEntity);
} }
\ No newline at end of file
package com.ejweb.modules.depart.entity;
import com.ejweb.core.persistence.DataEntity;
import java.util.List;
/**
*
* 论证部门Entity
* @author zy
* @version 2019-12-19
*/
public class AddDepartTypeDto extends DataEntity<AddDepartTypeDto> {
private static final long serialVersionUID = 1L;
private String type;
private List<String> departIds;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<String> getDepartIds() {
return departIds;
}
public void setDepartIds(List<String> departIds) {
this.departIds = departIds;
}
}
\ No newline at end of file
package com.ejweb.modules.depart.entity;
import com.ejweb.core.persistence.DataEntity;
/**
*
* 论证部门Entity
* @author zy
* @version 2019-12-19
*/
public class UserDepartEntity extends DataEntity<UserDepartEntity> {
private static final long serialVersionUID = 1L;
private String id;
private String departName;
private String type;
private String list;
private Boolean check=false;
public Boolean getCheck() {
return check;
}
public void setCheck(Boolean check) {
this.check = check;
}
public String getList() {
return list;
}
public void setList(String list) {
this.list = list;
}
public String getDepartName() {
return departName;
}
public void setDepartName(String departName) {
this.departName = departName;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
package com.ejweb.modules.depart.entity;
import com.ejweb.core.persistence.DataEntity;
/**
*
* 论证部门Entity
* @author zy
* @version 2019-12-19
*/
public class UserDepartNoCheckVo extends DataEntity<UserDepartNoCheckVo> {
private static final long serialVersionUID = 1L;
private String id;
private String departName;
private String type;
private String list;
public String getList() {
return list;
}
public void setList(String list) {
this.list = list;
}
public String getDepartName() {
return departName;
}
public void setDepartName(String departName) {
this.departName = departName;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
package com.ejweb.modules.depart.entity;
import com.ejweb.core.persistence.DataEntity;
/**
*
* 论证部门Entity
* @author zy
* @version 2019-12-19
*/
public class UserDepartTypeEntity extends DataEntity<UserDepartTypeEntity> {
private static final long serialVersionUID = 1L;
private String id;
private String departName;
private String type;
private String departId;
public String getDepartId() {
return departId;
}
public void setDepartId(String departId) {
this.departId = departId;
}
public String getDepartName() {
return departName;
}
public void setDepartName(String departName) {
this.departName = departName;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
package com.ejweb.modules.depart.entity;
import com.ejweb.core.persistence.DataEntity;
import java.util.List;
/**
*
* 论证部门和论证类型Entity
* @author zy
* @version 2019-12-19
*/
public class UserDictDepartEntity extends DataEntity<UserDictDepartEntity> {
private static final long serialVersionUID = 1L;
private String id;
private String label;
private String valueType;
private Integer sort;
private List<UserDepartTypeEntity> dList;
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getValueType() {
return valueType;
}
public void setValueType(String valueType) {
this.valueType = valueType;
}
public List<UserDepartTypeEntity> getdList() {
return dList;
}
public void setdList(List<UserDepartTypeEntity> dList) {
this.dList = dList;
}
}
\ No newline at end of file
package com.ejweb.modules.depart.entity;
import com.ejweb.core.persistence.DataEntity;
/**
*
* 论证部门Entity
* @author zy
* @version 2019-12-19
*/
public class UserDictEntity extends DataEntity<UserDictEntity> {
private static final long serialVersionUID = 1L;
private String id;
private String label;
private String valueType;
public static long getSerialVersionUID() {
return serialVersionUID;
}
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getValueType() {
return valueType;
}
public void setValueType(String valueType) {
this.valueType = valueType;
}
}
\ No newline at end of file
...@@ -3,18 +3,6 @@ ...@@ -3,18 +3,6 @@
*/ */
package com.ejweb.modules.sys.service; package com.ejweb.modules.sys.service;
import java.net.URLEncoder;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.apache.log4j.Logger;
import org.apache.shiro.session.Session;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ejweb.core.conf.GConstants; import com.ejweb.core.conf.GConstants;
...@@ -25,11 +13,7 @@ import com.ejweb.core.security.Digests; ...@@ -25,11 +13,7 @@ import com.ejweb.core.security.Digests;
import com.ejweb.core.security.shiro.session.SessionDAO; import com.ejweb.core.security.shiro.session.SessionDAO;
import com.ejweb.core.service.BaseService; import com.ejweb.core.service.BaseService;
import com.ejweb.core.service.ServiceException; import com.ejweb.core.service.ServiceException;
import com.ejweb.core.utils.Util; import com.ejweb.core.utils.*;
import com.ejweb.core.utils.CacheUtils;
import com.ejweb.core.utils.Encodes;
import com.ejweb.core.utils.IdWorker;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.core.web.Servlets; import com.ejweb.core.web.Servlets;
import com.ejweb.modules.sys.dao.MenuDao; import com.ejweb.modules.sys.dao.MenuDao;
import com.ejweb.modules.sys.dao.RoleDao; import com.ejweb.modules.sys.dao.RoleDao;
...@@ -43,6 +27,15 @@ import com.ejweb.modules.sys.utils.UserUtils; ...@@ -43,6 +27,15 @@ import com.ejweb.modules.sys.utils.UserUtils;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.hnatourism.b2b.util.DESPlus; import com.hnatourism.b2b.util.DESPlus;
import com.jdair.util.http.client.HTTPClientUtil; import com.jdair.util.http.client.HTTPClientUtil;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.net.URLEncoder;
import java.util.Date;
import java.util.List;
/** /**
* 系统管理,安全相关实体的管理类,包括用户、角色、菜单. * 系统管理,安全相关实体的管理类,包括用户、角色、菜单.
...@@ -446,63 +439,74 @@ public class SystemService extends BaseService implements InitializingBean { ...@@ -446,63 +439,74 @@ public class SystemService extends BaseService implements InitializingBean {
@Transactional(readOnly = false) @Transactional(readOnly = false)
public boolean validateServerPassword(String loginName, String password) { public boolean validateServerPassword(String loginName, String password) {
long startTime = System.nanoTime();// 开始计时时间 long startTime = System.nanoTime();
try { try {
if(GConstants.getBoolean("use.new.login.api", false)){// 使用新的登录地址,默认使用旧地址 // 使用新的登录地址,默认使用旧地址
if (GConstants.getBoolean("use.new.login.api", false)) {
boolean isSuccess = HTTPClientUtil.callLogin(loginName, password);// 进行秘密校验 // 进行秘密校验
long endTime = System.nanoTime();// 结束计时时间 boolean isSuccess = HTTPClientUtil.callLogin(loginName, password);
long duration = endTime - startTime; long endTime = System.nanoTime();
LOG.debug("[UserService login][validateServerPassword]["+isSuccess+"]总共用时:" + Util.getDurationTime(duration)); long duration = endTime - startTime;
return isSuccess; LOG.info("[UserService login][validateServerPassword][" + isSuccess + "]总共用时:" + Util.getDurationTime(duration));
} return isSuccess;
StringBuilder buf = new StringBuilder(GConstants.getValue("hn.api.base.url", "https://dsp.jdair.net")); }
buf.append("/flightinterface/uss/json/hnauser/hnauserLoginWithInfo.json?"); StringBuilder buf = new StringBuilder(GConstants.getValue("hn.api.base.url", "https://dsp.jdair.net"));
buf.append(GConstants.getValue("hn.api.base.param", "ai.cc=7&ai.cp=10.68.26.52")); buf.append("/flightinterface/uss/json/hnauser/hnauserLoginWithInfo.json?");
buf.append("&loginId="); buf.append(GConstants.getValue("hn.api.base.param", "ai.cc=7&ai.cp=10.68.26.52"));
buf.append(URLEncoder.encode(loginName, "UTF-8")); //用户名密码使用DESPlus中的加密方法加密后,再urlencode
buf.append("&password="); com.jdair.util.security.DESPlus plus = new com.jdair.util.security.DESPlus();
buf.append(password); String loginNamePlus = plus.encrypt(loginName);
String passwordPlus = plus.encrypt(password);
LOG.debug("[UserService login][validateServerPassword][URL]:" + buf.toString()); LOG.info("账号encrypt后;" + loginNamePlus);
LOG.info("密码encrypt后;" + passwordPlus);
HCFetcher fetcher = HCFetcher.getInstance(); LOG.info("[UserService login][validateServerPassword][URL]:" + buf.toString());
FetchEntity entity = fetcher.get(buf.toString());
if (entity == null) {// 再次重新尝试获取内容 buf.append("&loginIdSecure=");
buf.append(URLEncoder.encode(loginNamePlus, "UTF-8"));
entity = fetcher.get(buf.toString()); buf.append("&passwordSecure=");
} buf.append(URLEncoder.encode(passwordPlus, "UTF-8"));
if (entity != null) { LOG.info("密码encode后;" + URLEncoder.encode(password, "UTF-8"));
String text = entity.getContent("UTF-8"); LOG.info("[UserService login][validateServerPassword][URL]:" + buf.toString());
LOG.debug("[UserService validateServerPassword][result]:" + text);
JSONObject response = JSON.parseObject(text); HCFetcher fetcher = HCFetcher.getInstance();
if (response.get("result") == null) { FetchEntity entity = fetcher.get(buf.toString());
long endTime = System.nanoTime(); // 再次重新尝试获取内容
long duration = endTime - startTime; if (entity == null) {
LOG.debug("[UserService login][validateServerPassword][FAILD]总共用时:" + Util.getDurationTime(duration));
return false; entity = fetcher.get(buf.toString());
} }
JSONObject result = response.getJSONObject("result"); if (entity != null) {
if ("1000".equals(result.getString("resultCode"))) { // 远程服务器登陆成功,更改数据库密码 String text = entity.getContent("UTF-8");
LOG.info("[UserService validateServerPassword][result]:" + text);
JSONObject response = JSON.parseObject(text);
if (response.get("result") == null) {
long endTime = System.nanoTime();
long duration = endTime - startTime;
LOG.info("[UserService login][validateServerPassword][FAILD]总共用时:" + Util.getDurationTime(duration));
return false;
}
JSONObject result = response.getJSONObject("result");
// 远程服务器登陆成功,更改数据库密码
if ("1000".equals(result.getString("resultCode"))) {
long endTime = System.nanoTime();
long duration = endTime - startTime;
LOG.info("[UserService login][validateServerPassword][SUCCESS]总共用时:" + Util.getDurationTime(duration));
return true;
}
}
} catch (Exception e) {
long endTime = System.nanoTime(); e.printStackTrace();
long duration = endTime - startTime; } finally {
LOG.debug("[UserService login][validateServerPassword][SUCCESS]总共用时:" + Util.getDurationTime(duration)); // if (fetcher != null) {fetcher.shutdown();}
return true; }
} long endTime = System.nanoTime();
} long duration = endTime - startTime;
} catch (Exception e) { LOG.info("[UserService validateServerPassword][FAILD]总共用时:" + Util.getDurationTime(duration));
return false;
e.printStackTrace();
} finally {
// if (fetcher != null) {fetcher.shutdown();}
}
long endTime = System.nanoTime();
long duration = endTime - startTime;
LOG.debug("[UserService validateServerPassword][FAILD]总共用时:" + Util.getDurationTime(duration));
return false;
} }
/** /**
* 获取Key加载信息 * 获取Key加载信息
......
...@@ -264,16 +264,16 @@ public class RoleController extends BaseController { ...@@ -264,16 +264,16 @@ public class RoleController extends BaseController {
* 验证角色英文名是否有效 * 验证角色英文名是否有效
* *
* @param oldEnName * @param oldEnName
* @param enName * @param enname
* @return * @return
*/ */
@RequiresPermissions("user") @RequiresPermissions("user")
@ResponseBody @ResponseBody
@RequestMapping(value = "checkEnname") @RequestMapping(value = "checkEnname")
public String checkEnName(String oldEnName, String enName) { public String checkEnName(String oldEnName, String enname) {
if (enName != null && enName.equals(oldEnName)) { if (enname != null && enname.equals(oldEnName)) {
return "true"; return "true";
} else if (enName != null && systemService.getRoleByEnname(enName) == null) { } else if (enname != null && systemService.getRoleByEnname(enname) == null) {
return "true"; return "true";
} }
return "false"; return "false";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment