From d9d4fc0fb6b281ab71f77a506f70c69fc9331250 Mon Sep 17 00:00:00 2001 From: shenhailong <939224067@qq.com> Date: Tue, 8 Sep 2020 11:38:06 +0800 Subject: [PATCH] 代理人 添加危险品分类 用户添加功能 远程接口添加发送报文 --- src/main/java/com/agent/controller/agent/SecurityDeclarationController.java | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- src/main/webapp/META-INF/MANIFEST.MF | 0 src/main/webapp/WEB-INF/views/declaration/edit.jsp | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------- src/main/webapp/WEB-INF/views/declaration/findOne.jsp | 48 ++++++++++++++++++++++++++++++++++++++++++++---- src/main/webapp/WEB-INF/views/declaration/inlandsave.jsp | 46 ++++++++++++++++++++++++++-------------------- src/main/webapp/WEB-INF/views/declaration/list.jsp | 2 +- src/main/webapp/WEB-INF/views/declaration/save.jsp | 70 ++++++++++++++++++++++++++++++++++++++-------------------------------- 7 files changed, 225 insertions(+), 81 deletions(-) mode change 100644 => 100755 src/main/webapp/META-INF/MANIFEST.MF diff --git a/src/main/java/com/agent/controller/agent/SecurityDeclarationController.java b/src/main/java/com/agent/controller/agent/SecurityDeclarationController.java index dcf6cc8..96dae2b 100755 --- a/src/main/java/com/agent/controller/agent/SecurityDeclarationController.java +++ b/src/main/java/com/agent/controller/agent/SecurityDeclarationController.java @@ -158,7 +158,15 @@ public class SecurityDeclarationController { ResponseModel model = new ResponseModel(); //货物性质(类型) - String type = request.getParameter("dept"); + String one = request.getParameter("one"); + String two = request.getParameter("two"); + String three = request.getParameter("three"); + String four = request.getParameter("four"); + + String type = cargoType(one, two, three, four); + if ("C".equals(type)){ + type = request.getParameter("dept"); + } //航空货物托运人名称 String cargoShipperName = request.getParameter("sd_cargo_shipper_name"); @@ -304,7 +312,17 @@ public class SecurityDeclarationController { */ //货物性质(类型) - String type = request.getParameter("dept"); + + String one = request.getParameter("one"); + String two = request.getParameter("two"); + String three = request.getParameter("three"); + String four = request.getParameter("four"); + + String type = cargoType(one, two, three, four); + if ("C".equals(type)){ + type = request.getParameter("dept"); + } + //航空货物托运人名称 String cargoShipperName = request.getParameter("sd_cargo_shipper_name"); @@ -578,7 +596,18 @@ public class SecurityDeclarationController { * 安检申报 */ //货物性质(类型) - String type = request.getParameter("dept"); + //货物性质(类型) + + + String one = request.getParameter("one"); + String two = request.getParameter("two"); + String three = request.getParameter("three"); + String four = request.getParameter("four"); + + String type = cargoType(one, two, three, four); + if ("C".equals(type)){ + type = request.getParameter("dept"); + } //航空货物托运人名称 String cargoShipperName = request.getParameter("sd_cargo_shipper_name"); @@ -766,4 +795,25 @@ public class SecurityDeclarationController { return "declaration/print"; } + + public String cargoType(String one, String two, String three, String four){ + + String type = ""; + //货物性质 + if (!StringUtils.isBlank(one)){ + type = one; + } + if (!StringUtils.isBlank(two)){ + type = two; + } + if (!StringUtils.isBlank(three)){ + type = three; + } + if (!StringUtils.isBlank(four)){ + type = four; + } + + return type; + } + } diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF old mode 100644 new mode 100755 index 254272e..254272e --- a/src/main/webapp/META-INF/MANIFEST.MF +++ b/src/main/webapp/META-INF/MANIFEST.MF diff --git a/src/main/webapp/WEB-INF/views/declaration/edit.jsp b/src/main/webapp/WEB-INF/views/declaration/edit.jsp index c86dbec..af8ccec 100755 --- a/src/main/webapp/WEB-INF/views/declaration/edit.jsp +++ b/src/main/webapp/WEB-INF/views/declaration/edit.jsp @@ -60,25 +60,59 @@ </td> <td class="kv-content"> - <select id="cc" class="easyui-combobox" name="dept" style="width:200px;"> - <option value="A" <c:if test="${'A' eq type}">selected</c:if>>普通货物</option> - <option value="B" <c:if test="${'B' eq type}">selected</c:if>>特种货物</option> - <option value="C" <c:if test="${'C' eq type}">selected</c:if>>危险品</option> - <option value="D" <c:if test="${'D' eq type}">selected</c:if>>航空快件</option> - <option value="C1" <c:if test="${'C1' eq type}">selected</c:if>>爆炸物</option> - <option value="C2" <c:if test="${'C2' eq type}">selected</c:if>>压缩气体和液化气体</option> - <option value="C3" <c:if test="${'C3' eq type}">selected</c:if>>易燃液体</option> - <option value="C4" <c:if test="${'C4' eq type}">selected</c:if>>易燃固体、自燃物品、遇湿易燃物品</option> - <option value="C5" <c:if test="${'C5' eq type}">selected</c:if>>氧化物和有机过氧化物</option> - <option value="C6" <c:if test="${'C6' eq type}">selected</c:if>>毒性物质和感染性物质</option> - <option value="C7" <c:if test="${'C7' eq type}">selected</c:if>>放射性物质</option> - <option value="C8" <c:if test="${'C8' eq type}">selected</c:if>>腐蚀品</option> - <option value="C9" <c:if test="${'C9' eq type}">selected</c:if>>杂项危险品-ELI/RLI:锂离子电池(与设备放于同一包装/已安装于设备中)</option> - <option value="C10" <c:if test="${'C10' eq type}">selected</c:if>>杂项危险品-ELM/RLM:锂金属电池(与设备放于同一包装/已安装于设备中)</option> - <option value="C11" <c:if test="${'C11' eq type}">selected</c:if>>杂项危险品-RBI/EBI:锂离子电池</option> - <option value="C12" <c:if test="${'C12' eq type}">selected</c:if>>杂项危险品-RBM/EBM:锂金属电池</option> - <option value="C13" <c:if test="${'C13' eq type}">selected</c:if>>杂项危险品-其他杂项危险品</option> - </select> + <label> + <input id="one" onchange="riskType(this.value)" <c:if test="${type.contains('A')}">checked="checked"</c:if> name="one" type="radio" value="A">普通货物 + </label> + <label> + <input id="two" onchange="riskType(this.value)" <c:if test="${type.contains('B')}">checked="checked"</c:if> name="one" type="radio" value="B">特种货物 + </label> + <label> + <input id="three" onchange="riskType(this.value)" <c:if test="${type.contains('C')}">checked="checked"</c:if> name="one" type="radio" value="C">危险品 + </label> + <label> + <input id="four" onchange="riskType(this.value)" <c:if test="${type.contains('D')}">checked="checked"</c:if> name="one" type="radio" value="D">航空快件 + </label> + <c:choose> + <c:when test="${type.contains('C')}"> + <div id="cc3" style="display: block"> + <select id="cc2" class="easyui-combobox" name="dept" style="width:200px"> + <option <c:if test="${'C1' eq type}">selected</c:if> value="C1">爆炸物</option> + <option <c:if test="${'C2' eq type}">selected</c:if> value="C2">压缩气体和液化气体</option> + <option <c:if test="${'C3' eq type}">selected</c:if> value="C3">易燃液体</option> + <option <c:if test="${'C4' eq type}">selected</c:if> value="C4">易燃固体、自燃物品、遇湿易燃物品</option> + <option <c:if test="${'C5' eq type}">selected</c:if> value="C5">氧化物和有机过氧化物</option> + <option <c:if test="${'C6' eq type}">selected</c:if> value="C6">毒性物质和感染性物质</option> + <option <c:if test="${'C7' eq type}">selected</c:if> value="C7">放射性物质</option> + <option <c:if test="${'C8' eq type}">selected</c:if> value="C8">腐蚀品</option> + <option <c:if test="${'C9' eq type}">selected</c:if> value="C9">杂项危险品-ELI/RLI:锂离子电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C10' eq type}">selected</c:if> value="C10">杂项危险品-ELM/RLM:锂金属电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C11' eq type}">selected</c:if> value="C11">杂项危险品-RBI/EBI:锂离子电池</option> + <option <c:if test="${'C12' eq type}">selected</c:if> value="C12">杂项危险品-RBM/EBM:锂金属电池</option> + <option <c:if test="${'C13' eq type}">selected</c:if> value="C13">杂项危险品-其他杂项危险品</option> + </select> + </div> + </c:when> + <c:otherwise> + <div id="cc3" style="display: none"> + <select id="cc2" class="easyui-combobox" name="dept" style="width:200px"> + <option <c:if test="${'C1' eq type}">selected</c:if> value="C1">爆炸物</option> + <option <c:if test="${'C2' eq type}">selected</c:if> value="C2">压缩气体和液化气体</option> + <option <c:if test="${'C3' eq type}">selected</c:if> value="C3">易燃液体</option> + <option <c:if test="${'C4' eq type}">selected</c:if> value="C4">易燃固体、自燃物品、遇湿易燃物品</option> + <option <c:if test="${'C5' eq type}">selected</c:if> value="C5">氧化物和有机过氧化物</option> + <option <c:if test="${'C6' eq type}">selected</c:if> value="C6">毒性物质和感染性物质</option> + <option <c:if test="${'C7' eq type}">selected</c:if> value="C7">放射性物质</option> + <option <c:if test="${'C8' eq type}">selected</c:if> value="C8">腐蚀品</option> + <option <c:if test="${'C9' eq type}">selected</c:if> value="C9">杂项危险品-ELI/RLI:锂离子电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C10' eq type}">selected</c:if> value="C10">杂项危险品-ELM/RLM:锂金属电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C11' eq type}">selected</c:if> value="C11">杂项危险品-RBI/EBI:锂离子电池</option> + <option <c:if test="${'C12' eq type}">selected</c:if> value="C12">杂项危险品-RBM/EBM:锂金属电池</option> + <option <c:if test="${'C13' eq type}">selected</c:if> value="C13">杂项危险品-其他杂项危险品</option> + </select> + </div> + </c:otherwise> + </c:choose> + </td> </tr> <tr> @@ -214,9 +248,17 @@ var layer; layui.use('layer', function(){ layer = layui.layer; - }); + }); + + function riskType(value) { + if (value == "C"){ + document.getElementById("cc3").style.display='block' + }else { + document.getElementById("cc3").style.display='none' + } + } - var selectFals = true; + var selectFals = false; function submit(){ layerIndex = parent.layer.load(1, { shade: [0.6,'#000000'] //0.1透明度 diff --git a/src/main/webapp/WEB-INF/views/declaration/findOne.jsp b/src/main/webapp/WEB-INF/views/declaration/findOne.jsp index df88a7d..e2830b5 100755 --- a/src/main/webapp/WEB-INF/views/declaration/findOne.jsp +++ b/src/main/webapp/WEB-INF/views/declaration/findOne.jsp @@ -61,17 +61,57 @@ <td class="kv-content"> <label> - <input id="one" name="one" type="radio" ${fn:contains(type, 1)?"checked":""} value="1" >普通货物 + <input id="one" onchange="riskType(this.value)" <c:if test="${type.contains('A')}">checked="checked"</c:if> name="one" type="radio" value="A">普通货物 </label> <label> - <input id="two" name="one" type="radio" ${fn:contains(type, 2)?"checked":""} value="2">特种货物 + <input id="two" onchange="riskType(this.value)" <c:if test="${type.contains('B')}">checked="checked"</c:if> name="one" type="radio" value="B">特种货物 </label> <label> - <input id="three" name="one" type="radio" ${fn:contains(type, 3)?"checked":""} value="3">危险品 + <input id="three" onchange="riskType(this.value)" <c:if test="${type.contains('C')}">checked="checked"</c:if> name="one" type="radio" value="C">危险品 </label> <label> - <input id="four" name="one" type="radio" ${fn:contains(type, 4)?"checked":""} value="4">航空快件 + <input id="four" onchange="riskType(this.value)" <c:if test="${type.contains('D')}">checked="checked"</c:if> name="one" type="radio" value="D">航空快件 </label> + <c:choose> + <c:when test="${type.contains('C')}"> + <div id="cc3" style="display: block"> + <select id="cc2" class="easyui-combobox" name="dept" style="width:200px"> + <option <c:if test="${'C1' eq type}">selected</c:if> value="C1">爆炸物</option> + <option <c:if test="${'C2' eq type}">selected</c:if> value="C2">压缩气体和液化气体</option> + <option <c:if test="${'C3' eq type}">selected</c:if> value="C3">易燃液体</option> + <option <c:if test="${'C4' eq type}">selected</c:if> value="C4">易燃固体、自燃物品、遇湿易燃物品</option> + <option <c:if test="${'C5' eq type}">selected</c:if> value="C5">氧化物和有机过氧化物</option> + <option <c:if test="${'C6' eq type}">selected</c:if> value="C6">毒性物质和感染性物质</option> + <option <c:if test="${'C7' eq type}">selected</c:if> value="C7">放射性物质</option> + <option <c:if test="${'C8' eq type}">selected</c:if> value="C8">腐蚀品</option> + <option <c:if test="${'C9' eq type}">selected</c:if> value="C9">杂项危险品-ELI/RLI:锂离子电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C10' eq type}">selected</c:if> value="C10">杂项危险品-ELM/RLM:锂金属电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C11' eq type}">selected</c:if> value="C11">杂项危险品-RBI/EBI:锂离子电池</option> + <option <c:if test="${'C12' eq type}">selected</c:if> value="C12">杂项危险品-RBM/EBM:锂金属电池</option> + <option <c:if test="${'C13' eq type}">selected</c:if> value="C13">杂项危险品-其他杂项危险品</option> + </select> + </div> + </c:when> + <c:otherwise> + <div id="cc3" style="display: none"> + <select id="cc2" class="easyui-combobox" name="dept" style="width:200px"> + <option <c:if test="${'C1' eq type}">selected</c:if> value="C1">爆炸物</option> + <option <c:if test="${'C2' eq type}">selected</c:if> value="C2">压缩气体和液化气体</option> + <option <c:if test="${'C3' eq type}">selected</c:if> value="C3">易燃液体</option> + <option <c:if test="${'C4' eq type}">selected</c:if> value="C4">易燃固体、自燃物品、遇湿易燃物品</option> + <option <c:if test="${'C5' eq type}">selected</c:if> value="C5">氧化物和有机过氧化物</option> + <option <c:if test="${'C6' eq type}">selected</c:if> value="C6">毒性物质和感染性物质</option> + <option <c:if test="${'C7' eq type}">selected</c:if> value="C7">放射性物质</option> + <option <c:if test="${'C8' eq type}">selected</c:if> value="C8">腐蚀品</option> + <option <c:if test="${'C9' eq type}">selected</c:if> value="C9">杂项危险品-ELI/RLI:锂离子电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C10' eq type}">selected</c:if> value="C10">杂项危险品-ELM/RLM:锂金属电池(与设备放于同一包装/已安装于设备中)</option> + <option <c:if test="${'C11' eq type}">selected</c:if> value="C11">杂项危险品-RBI/EBI:锂离子电池</option> + <option <c:if test="${'C12' eq type}">selected</c:if> value="C12">杂项危险品-RBM/EBM:锂金属电池</option> + <option <c:if test="${'C13' eq type}">selected</c:if> value="C13">杂项危险品-其他杂项危险品</option> + </select> + </div> + </c:otherwise> + </c:choose> </td> </tr> <tr> diff --git a/src/main/webapp/WEB-INF/views/declaration/inlandsave.jsp b/src/main/webapp/WEB-INF/views/declaration/inlandsave.jsp index 28e231c..c59e048 100755 --- a/src/main/webapp/WEB-INF/views/declaration/inlandsave.jsp +++ b/src/main/webapp/WEB-INF/views/declaration/inlandsave.jsp @@ -70,23 +70,20 @@ </td> <td class="kv-content"> -<%-- <label>--%> -<%-- <input id="one" name="one" type="radio" value="1" checked>普通货物--%> -<%-- </label>--%> -<%-- <label>--%> -<%-- <input id="two" name="one" type="radio" value="2">特种货物--%> -<%-- </label>--%> -<%-- <label>--%> -<%-- <input id="three" name="one" type="radio" value="3">危险品--%> -<%-- </label>--%> -<%-- <label>--%> -<%-- <input id="four" name="one" type="radio" value="4">航空快件--%> -<%-- </label>--%> - <select id="cc" class="easyui-combobox" name="dept" style="width:200px;"> - <option value="A">普通货物</option> - <option value="B">特种货物</option> - <option value="C">危险品</option> - <option value="D">航空快件</option> + <label> + <input id="one" onchange="riskType(this.value)" name="one" type="radio" value="A" checked>普通货物 + </label> + <label> + <input id="two" onchange="riskType(this.value)" name="one" type="radio" value="B">特种货物 + </label> + <label> + <input id="three" onchange="riskType(this.value)" name="one" type="radio" value="C">危险品 + </label> + <label> + <input id="four" onchange="riskType(this.value)" name="one" type="radio" value="D">航空快件 + </label> + <div id="cc3" style="display: none"> + <select id="cc2" class="easyui-combobox" name="dept" style="width:200px"> <option value="C1">爆炸物</option> <option value="C2">压缩气体和液化气体</option> <option value="C3">易燃液体</option> @@ -101,6 +98,7 @@ <option value="C12">杂项危险品-RBM/EBM:锂金属电池</option> <option value="C13">杂项危险品-其他杂项危险品</option> </select> + </div> </td> </tr> <tr> @@ -231,13 +229,11 @@ <script src="<%=basePath%>/resource/js/tools.js?version=${version}"></script> <!--弹出层引入的JS--> <script type="text/javascript"> - var layerIndex; var layer; layui.use('layer', function(){ layer = layui.layer; }); - function viewXml(){ if($("#ids").val()==''){ layer.open({content:"<spring:message code='manifest.send.message.failed'/>"}); @@ -252,7 +248,17 @@ }) } } - var selectFals = true; + + function riskType(value) { + if (value == "C"){ + document.getElementById("cc3").style.display='block' + }else { + document.getElementById("cc3").style.display='none' + } + } + + + var selectFals = false; //发送报文并且保存 function savesend(){ var isValid = $("#form").valid(); diff --git a/src/main/webapp/WEB-INF/views/declaration/list.jsp b/src/main/webapp/WEB-INF/views/declaration/list.jsp index 7072e39..db1c487 100755 --- a/src/main/webapp/WEB-INF/views/declaration/list.jsp +++ b/src/main/webapp/WEB-INF/views/declaration/list.jsp @@ -251,7 +251,7 @@ function findOne(id) { layer.open({ type : 2, - title : '修改', + title : '查看', maxmin : true, shadeClose : false, // 点击遮罩关闭层 area : [ '80%', '65%' ], diff --git a/src/main/webapp/WEB-INF/views/declaration/save.jsp b/src/main/webapp/WEB-INF/views/declaration/save.jsp index c7b936b..8c27217 100755 --- a/src/main/webapp/WEB-INF/views/declaration/save.jsp +++ b/src/main/webapp/WEB-INF/views/declaration/save.jsp @@ -62,37 +62,35 @@ </td> <td class="kv-content"> -<%-- <label>--%> -<%-- <input id="one" name="one" type="radio" value="1" checked>普通货物--%> -<%-- </label>--%> -<%-- <label>--%> -<%-- <input id="two" name="one" type="radio" value="2">特种货物--%> -<%-- </label>--%> -<%-- <label>--%> -<%-- <input id="three" name="one" type="radio" value="3">危险品--%> -<%-- </label>--%> -<%-- <label>--%> -<%-- <input id="four" name="one" type="radio" value="4">航空快件--%> -<%-- </label>--%> - <select id="cc" class="easyui-combobox" name="dept" style="width:200px;"> - <option value="A">普通货物</option> - <option value="B">特种货物</option> - <option value="C">危险品</option> - <option value="D">航空快件</option> - <option value="C1">爆炸物</option> - <option value="C2">压缩气体和液化气体</option> - <option value="C3">易燃液体</option> - <option value="C4">易燃固体、自燃物品、遇湿易燃物品</option> - <option value="C5">氧化物和有机过氧化物</option> - <option value="C6">毒性物质和感染性物质</option> - <option value="C7">放射性物质</option> - <option value="C8">腐蚀品</option> - <option value="C9">杂项危险品-ELI/RLI:锂离子电池(与设备放于同一包装/已安装于设备中)</option> - <option value="C10">杂项危险品-ELM/RLM:锂金属电池(与设备放于同一包装/已安装于设备中)</option> - <option value="C11">杂项危险品-RBI/EBI:锂离子电池</option> - <option value="C12">杂项危险品-RBM/EBM:锂金属电池</option> - <option value="C13">杂项危险品-其他杂项危险品</option> - </select> + <label> + <input id="one" onchange="riskType(this.value)" name="one" type="radio" value="A" checked>普通货物 + </label> + <label> + <input id="two" onchange="riskType(this.value)" name="one" type="radio" value="B">特种货物 + </label> + <label> + <input id="three" onchange="riskType(this.value)" name="one" type="radio" value="C">危险品 + </label> + <label> + <input id="four" onchange="riskType(this.value)" name="one" type="radio" value="D">航空快件 + </label> + <div id="cc3" style="display: none"> + <select id="cc2" class="easyui-combobox" name="dept" style="width:200px"> + <option value="C1">爆炸物</option> + <option value="C2">压缩气体和液化气体</option> + <option value="C3">易燃液体</option> + <option value="C4">易燃固体、自燃物品、遇湿易燃物品</option> + <option value="C5">氧化物和有机过氧化物</option> + <option value="C6">毒性物质和感染性物质</option> + <option value="C7">放射性物质</option> + <option value="C8">腐蚀品</option> + <option value="C9">杂项危险品-ELI/RLI:锂离子电池(与设备放于同一包装/已安装于设备中)</option> + <option value="C10">杂项危险品-ELM/RLM:锂金属电池(与设备放于同一包装/已安装于设备中)</option> + <option value="C11">杂项危险品-RBI/EBI:锂离子电池</option> + <option value="C12">杂项危险品-RBM/EBM:锂金属电池</option> + <option value="C13">杂项危险品-其他杂项危险品</option> + </select> + </div> </td> </tr> @@ -199,7 +197,7 @@ layer = layui.layer; }); - var selectFals = true; + var selectFals = false; function submit(){ layerIndex = parent.layer.load(1, { shade: [0.6,'#000000'] //0.1透明度 @@ -247,6 +245,14 @@ }) } } + + function riskType(value) { + if (value == "C"){ + document.getElementById("cc3").style.display='block' + }else { + document.getElementById("cc3").style.display='none' + } + } //发送报文并且保存 function savesend(){ -- libgit2 0.24.0