Browse Source

后台控制远程开关机功能

李天标 5 years ago
parent
commit
8c8e2eb324

+ 12 - 0
app-backend-web/src/main/webapp/WEB-INF/template/admin/adminAgency/add.ftl

@@ -50,6 +50,9 @@ $().ready(function() {
             },
             },
 			ifForeign:{
 			ifForeign:{
 				required: true
 				required: true
+			},
+			open:{
+				required: true
 			}
 			}
             // areaId:{
             // areaId:{
             //     required: true
             //     required: true
@@ -126,6 +129,15 @@ $().ready(function() {
 			</tr>
 			</tr>
 			<tr>
 			<tr>
 				<th>
 				<th>
+					<span class="requiredField">*</span>是否开启远程开关机:
+				</th>
+				<td>
+					<label><input name="open" type="radio" value="0" />是 </label>
+					<label><input name="open" type="radio" value="1" checked/>否 </label>
+				</td>
+			</tr>
+			<tr>
+				<th>
 					邮箱:
 					邮箱:
 				</th>
 				</th>
 				<td>
 				<td>

+ 12 - 0
app-backend-web/src/main/webapp/WEB-INF/template/admin/adminAgency/addMerchant.ftl

@@ -52,6 +52,9 @@
                     ifForeign:{
                     ifForeign:{
                         required: true
                         required: true
                     },
                     },
+                    open:{
+                        required: true
+                    }
                     // areaId: {
                     // areaId: {
                     //     required: true
                     //     required: true
                     // }
                     // }
@@ -128,6 +131,15 @@
         </tr>
         </tr>
         <tr>
         <tr>
             <th>
             <th>
+                <span class="requiredField">*</span>是否开启远程开关机:
+            </th>
+            <td>
+                <label><input name="open" type="radio" value="0" />是 </label>
+                <label><input name="open" type="radio" value="1" checked/>否 </label>
+            </td>
+        </tr>
+        <tr>
+            <th>
                 邮箱:
                 邮箱:
             </th>
             </th>
             <td>
             <td>

+ 39 - 1
app-backend-web/src/main/webapp/WEB-INF/template/admin/adminAgency/edit.ftl

@@ -127,10 +127,48 @@ $().ready(function() {
                 <th>
                 <th>
                     <span class="requiredField">*</span>是否国内:
                     <span class="requiredField">*</span>是否国内:
                 </th>
                 </th>
+                [#if admin.ifForeign==0]
                 <td>
                 <td>
-                    <label><input name="ifForeign" type="radio" value="0" />是 </label>
+                    <label><input name="ifForeign" type="radio" value="0" checked/>是 </label>
                     <label><input name="ifForeign" type="radio" value="1" />否 </label>
                     <label><input name="ifForeign" type="radio" value="1" />否 </label>
                 </td>
                 </td>
+                [/#if]
+                [#if admin.ifForeign==1]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" />是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" checked/>否 </label>
+                    </td>
+                [/#if]
+                [#if admin.ifForeign==null||admin.ifForeign==""]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" />是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+            </tr>
+
+            <tr>
+                <th>
+                   是否开放远程开关机:
+                </th>
+                [#if admin.open!=0&&admin.open!=1]
+                <td>
+                    <label><input name="open" type="radio" value="0" />是 </label>
+                    <label><input name="open" type="radio" value="1" />否 </label>
+                </td>
+                [/#if]
+                [#if admin.open==0]
+                    <td>
+                        <label><input name="open" type="radio" value="0" checked/>是 </label>
+                        <label><input name="open" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+                [#if admin.open==1]
+                    <td>
+                        <label><input name="open" type="radio" value="0" />是 </label>
+                        <label><input name="open" type="radio" value="1" checked/>否 </label>
+                    </td>
+                [/#if]
             </tr>
             </tr>
             <tr>
             <tr>
                 <th>
                 <th>

+ 12 - 0
app-backend-web/src/main/webapp/WEB-INF/template/admin/adminMerchant/addPersonage.ftl

@@ -52,6 +52,9 @@
                     ifForeign:{
                     ifForeign:{
                         required: true
                         required: true
                     },
                     },
+                    open:{
+                        required: true
+                    }
                     // areaId: {
                     // areaId: {
                     //     required: true
                     //     required: true
                     // }
                     // }
@@ -128,6 +131,15 @@
         </tr>
         </tr>
         <tr>
         <tr>
             <th>
             <th>
+                <span class="requiredField">*</span>是否开启远程开关机:
+            </th>
+            <td>
+                <label><input name="open" type="radio" value="0" />是 </label>
+                <label><input name="open" type="radio" value="1" checked/>否 </label>
+            </td>
+        </tr>
+        <tr>
+            <th>
                 邮箱:
                 邮箱:
             </th>
             </th>
             <td>
             <td>

+ 42 - 4
app-backend-web/src/main/webapp/WEB-INF/template/admin/adminMerchant/edit.ftl

@@ -123,10 +123,48 @@ $().ready(function() {
                 <th>
                 <th>
                     <span class="requiredField">*</span>是否国内:
                     <span class="requiredField">*</span>是否国内:
                 </th>
                 </th>
-                <td>
-                    <label><input name="ifForeign" type="radio" value="0" />是 </label>
-                    <label><input name="ifForeign" type="radio" value="1" />否 </label>
-                </td>
+                [#if admin.ifForeign==0]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" checked/>是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+                [#if admin.ifForeign==1]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" />是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" checked/>否 </label>
+                    </td>
+                [/#if]
+                [#if admin.ifForeign==null||admin.ifForeign==""]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" />是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+            </tr>
+
+            <tr>
+                <th>
+                    是否开放远程开关机:
+                </th>
+                [#if admin.open!=0&&admin.open!=1]
+                    <td>
+                        <label><input name="open" type="radio" value="0" />是 </label>
+                        <label><input name="open" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+                [#if admin.open==0]
+                    <td>
+                        <label><input name="open" type="radio" value="0" checked/>是 </label>
+                        <label><input name="open" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+                [#if admin.open==1]
+                    <td>
+                        <label><input name="open" type="radio" value="0" />是 </label>
+                        <label><input name="open" type="radio" value="1" checked/>否 </label>
+                    </td>
+                [/#if]
             </tr>
             </tr>
 			<tr>
 			<tr>
 				<th>
 				<th>

+ 42 - 4
app-backend-web/src/main/webapp/WEB-INF/template/admin/adminPersonage/edit.ftl

@@ -120,10 +120,48 @@ $().ready(function() {
                 <th>
                 <th>
                     <span class="requiredField">*</span>是否国内:
                     <span class="requiredField">*</span>是否国内:
                 </th>
                 </th>
-                <td>
-                    <label><input name="ifForeign" type="radio" value="0" />是 </label>
-                    <label><input name="ifForeign" type="radio" value="1" />否 </label>
-                </td>
+                [#if admin.ifForeign==0]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" checked/>是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+                [#if admin.ifForeign==1]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" />是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" checked/>否 </label>
+                    </td>
+                [/#if]
+                [#if admin.ifForeign==null||admin.ifForeign==""]
+                    <td>
+                        <label><input name="ifForeign" type="radio" value="0" />是 </label>
+                        <label><input name="ifForeign" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+            </tr>
+
+            <tr>
+                <th>
+                    是否开放远程开关机:
+                </th>
+                [#if admin.open!=0&&admin.open!=1]
+                    <td>
+                        <label><input name="open" type="radio" value="0" />是 </label>
+                        <label><input name="open" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+                [#if admin.open==0]
+                    <td>
+                        <label><input name="open" type="radio" value="0" checked/>是 </label>
+                        <label><input name="open" type="radio" value="1" />否 </label>
+                    </td>
+                [/#if]
+                [#if admin.open==1]
+                    <td>
+                        <label><input name="open" type="radio" value="0" />是 </label>
+                        <label><input name="open" type="radio" value="1" checked/>否 </label>
+                    </td>
+                [/#if]
             </tr>
             </tr>
 			<tr>
 			<tr>
 				<th>
 				<th>

+ 2 - 2
app-backend-web/src/main/webapp/WEB-INF/template/admin/equipment/list.ftl

@@ -160,7 +160,7 @@
             <th>
             <th>
                 <a href="javascript:">锁机控制</a>
                 <a href="javascript:">锁机控制</a>
             </th>
             </th>
-            [#if admin.id<137]
+            [#if admin.open==0]
             <th>
             <th>
                 <a href="javascript:">设备控制</a>
                 <a href="javascript:">设备控制</a>
             </th>
             </th>
@@ -234,7 +234,7 @@
                             <p>状态:<span class="green">正常</span></p>
                             <p>状态:<span class="green">正常</span></p>
                         [/#if]
                         [/#if]
                     </td>
                     </td>
-                     [#if admin.id<137]
+                     [#if admin.open==0]
                     <td>
                     <td>
                         <a class="status" href="#" data-id="${equipment.id}" data-url="opera.htm" data-status="1"><span
                         <a class="status" href="#" data-id="${equipment.id}" data-url="opera.htm" data-status="1"><span
                                 class="green">远程开机</span></a>
                                 class="green">远程开机</span></a>

+ 13 - 0
app-entity/src/main/java/com/hboxs/entity/Admin.java

@@ -98,6 +98,19 @@ public class Admin extends BaseEntity {
     private String ifForeign;
     private String ifForeign;
 
 
     /**
     /**
+     * 是否开启远程开关机
+     */
+    private String open;
+
+    public String getOpen() {
+        return open;
+    }
+
+    public void setOpen(String open) {
+        this.open = open;
+    }
+
+    /**
      * 上级
      * 上级
      */
      */
     private Long parentId;
     private Long parentId;