From b5a5795a5a64d9a5b78b338de74909e240fe73c3 Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期一, 30 十月 2023 19:50:13 +0800
Subject: [PATCH] 优化账面库存页面、新增安全管理页面

---
 igds-inout/src/main/java/com/ld/igds/timer/DepotBookStoreScheduled.java      |  123 +++++++
 igds-warn/src/main/java/com/ld/igds/warn/service/HSecureManagerService.java  |  104 ++++++
 igds-web/src/main/resources/templates/index/index-5303.html                  |    4 
 igds-core/src/main/java/com/ld/igds/models/DepotBookStore.java               |   16 
 igds-core/src/main/java/com/ld/igds/models/SecureManager.java                |  107 ++++++
 igds-warn/src/main/java/com/ld/igds/warn/view/SecureManagerPR.java           |   53 +++
 igds-core/src/main/java/com/ld/igds/view/service/HDepotBookStoreService.java |    6 
 igds-core/src/main/java/com/ld/igds/view/DepotBookStore.view.xml             |   80 ++--
 igds-warn/src/main/java/com/ld/igds/warn/view/SecureManager.view.xml         |  460 ++++++++++++++++++++++++++++
 9 files changed, 896 insertions(+), 57 deletions(-)

diff --git a/igds-core/src/main/java/com/ld/igds/models/DepotBookStore.java b/igds-core/src/main/java/com/ld/igds/models/DepotBookStore.java
index d6ab5d9..ff2ecaf 100644
--- a/igds-core/src/main/java/com/ld/igds/models/DepotBookStore.java
+++ b/igds-core/src/main/java/com/ld/igds/models/DepotBookStore.java
@@ -3,8 +3,6 @@
 import com.alibaba.fastjson.annotation.JSONField;
 import com.bstek.dorado.annotation.PropertyDef;
 import lombok.Data;
-import org.springframework.stereotype.Component;
-
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
@@ -16,6 +14,8 @@
  * @Author: YYC
  * @Description:璐﹂潰搴撳瓨
  * @DateTime: 2023/10/20 14:07
+ *
+ * 鎸変粨搴撹繘琛岀粺璁★紝姣忎釜鏈堜綆缁熻涓�娆�(鍥犱笂娴峰競璐﹂潰搴撳瓨鎺ュ彛涓烘寜璐т綅缁熻)
  **/
 @Data
 @Entity
@@ -34,9 +34,13 @@
     @PropertyDef(label = "缁勭粐缂栫爜")
     private String companyId;
 
-    @Column(name = "kqdm", length = 21)
+    @Column(name = "DEPT_ID_", length = 20)
     @PropertyDef(label = "搴撳尯浠g爜")
-    private String kqdm;
+    private String deptId;
+
+    @Column(name = "DEPOT_ID_", length = 30)
+    @PropertyDef(label = "浠撳簱缂栫爜")
+    private String depotId;
 
     @Column(name = "lspzdm", length = 7)
     @PropertyDef(label = "绮鍝佺浠g爜")
@@ -74,10 +78,6 @@
     @JSONField(format = "yyyy-MM-dd")
     @PropertyDef(label = "涓氬姟鏃ユ湡")
     private Date ywrq;
-
-    @Column(name = "czbz", length = 1)
-    @PropertyDef(label = "鎿嶄綔鏍囧織")
-    private String czbz;
 
     @Column(name = "zhgxsj")
     @JSONField(format = "yyyy-MM-dd HH:mm:ss")
diff --git a/igds-core/src/main/java/com/ld/igds/models/SecureManager.java b/igds-core/src/main/java/com/ld/igds/models/SecureManager.java
new file mode 100644
index 0000000..dfa12cd
--- /dev/null
+++ b/igds-core/src/main/java/com/ld/igds/models/SecureManager.java
@@ -0,0 +1,107 @@
+package com.ld.igds.models;
+
+import com.bstek.dorado.annotation.PropertyDef;
+import lombok.Data;
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 瀹夊叏绠$悊
+ *
+ * @author czt
+ * @data 2023/10/30
+ */
+@Data
+@Entity
+@Table(name = "D_M_SECURE_MANAGER")
+public class SecureManager implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    @Column(name = "fxdbm", length = 12)
+    @PropertyDef(label = "椋庨櫓鐐圭紪鐮�", description = "8浣嶉闄╄瘑鍒棩鏈燂紙YYYYMMDD锛�+4浣嶉闄╅『搴忓彿")
+    private String fxdbm;
+
+    @Column(name = "COMPANY_ID_", length = 10)
+    @PropertyDef(label = "缁勭粐缂栫爜")
+    private String companyId;
+
+    @Column(name = "DEPT_ID_", length = 40)
+    @PropertyDef(label = "搴撳尯缂栫爜")
+    private String deptId;
+
+    @Column(name = "dd", length = 200)
+    @PropertyDef(label = "鍦扮偣")
+    private String dd;
+
+    @Column(name = "sbr", length = 50)
+    @PropertyDef(label = "璇嗗埆浜�")
+    private String sbr;
+
+    @Column(name = "hjbw", length = 200)
+    @PropertyDef(label = "鐜妭/閮ㄤ綅")
+    private String hjbw;
+
+    @Column(name = "fxxx", length = 200)
+    @PropertyDef(label = "椋庨櫓淇℃伅")
+    private String fxxx;
+
+    @Column(name = "fxlx", length = 1)
+    @PropertyDef(label = "椋庨櫓绫诲瀷")
+    private String fxlx;
+
+    @PropertyDef(label = "椋庨櫓绛夌骇")
+    @Column(name = "fxfj", length = 1)
+    private String fxfj;
+
+    @Column(name = "fxglcs", length = 200)
+    @PropertyDef(label = "椋庨櫓绠℃帶鎺柦")
+    private String fxglcs;
+
+    @Column(name = "yhxx", length = 200)
+    @PropertyDef(label = "闅愭偅淇℃伅")
+    private String yhxx;
+
+    @Column(name = "yhpcxx", length = 200)
+    @PropertyDef(label = "闅愭偅鎺掓煡淇℃伅")
+    private String yhpcxx;
+
+    @Column(name = "yhzgxx", length = 200)
+    @PropertyDef(label = "闅愭偅鏁存敼淇℃伅")
+    private String yhzgxx;
+
+    @Column(name = "yhysxx", length = 200)
+    @PropertyDef(label = "闅愭偅鏁存敼楠屾敹淇℃伅")
+    private String yhysxx;
+
+    @Column(name = "sgjbxx", length = 200)
+    @PropertyDef(label = "浜嬫晠鍩烘湰淇℃伅")
+    private String sgjbxx;
+
+    @Column(name = "zgsx", length = 200)
+    @PropertyDef(label = "鏁存敼鏃堕檺")
+    private String zgsx;
+
+    @Column(name = "zrdw", length = 200)
+    @PropertyDef(label = "璐d换鍗曚綅")
+    private String zrdw;
+
+    @Column(name = "zrr", length = 200)
+    @PropertyDef(label = "璐d换浜�")
+    private String zrr;
+
+    @Column(name = "zgysxx", length = 200)
+    @PropertyDef(label = "鏁存敼楠屾敹淇℃伅")
+    private String zgysxx;
+
+    @Column(name = "fxgzjgzrr", length = 50)
+    @PropertyDef(label = "椋庨櫓璺熻釜鐩戠璐d换浜�")
+    private String fxgzjgzrr;
+
+    @Column(name = "updateTime")
+    @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�")
+    private Date updateTime;
+
+}
diff --git a/igds-core/src/main/java/com/ld/igds/view/DepotBookStore.view.xml b/igds-core/src/main/java/com/ld/igds/view/DepotBookStore.view.xml
index 8d01c9e..a6417dc 100644
--- a/igds-core/src/main/java/com/ld/igds/view/DepotBookStore.view.xml
+++ b/igds-core/src/main/java/com/ld/igds/view/DepotBookStore.view.xml
@@ -12,13 +12,29 @@
         <Property></Property>
         <Property name="label">缁勭粐缂栫爜</Property>
       </PropertyDef>
-      <PropertyDef name="kqdm">
+      <PropertyDef name="deptId">
         <Property></Property>
-        <Property name="label">搴撳尯浠g爜</Property>
+        <Property name="label">鎵�灞炲垎搴�</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
+          <Property name="keyProperty">id</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="depotId">
+        <Property></Property>
+        <Property name="label">鎵�灞炰粨搴�</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
+          <Property name="keyProperty">id</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
+        <Property name="required">true</Property>
       </PropertyDef>
       <PropertyDef name="lspzdm">
         <Property></Property>
-        <Property name="label">绮鍝佺浠g爜</Property>
+        <Property name="label">绮鍝佺</Property>
         <Property name="required">true</Property>
         <Property name="mapping">
           <Property name="keyProperty">code</Property>
@@ -44,24 +60,25 @@
         <Property name="dataType">Double</Property>
         <Property name="label">鏈熷垵鏁伴噺</Property>
         <Property name="required">true</Property>
+        <Property name="displayFormat">#,##0 KG</Property>
       </PropertyDef>
       <PropertyDef name="bqsrsl">
         <Property name="dataType">Double</Property>
         <Property name="label">鏈湡鏀跺叆鏁伴噺</Property>
         <Property name="required">true</Property>
-        <Property name="displayFormat">#0.000KG</Property>
+        <Property name="displayFormat">#,##0 KG</Property>
       </PropertyDef>
       <PropertyDef name="bqzcsl">
         <Property name="dataType">Double</Property>
         <Property name="label">鏈湡鏀嚭鏁伴噺</Property>
         <Property name="required">true</Property>
-        <Property name="displayFormat">#0.000KG</Property>
+        <Property name="displayFormat">#,##0 KG</Property>
       </PropertyDef>
       <PropertyDef name="qmye">
         <Property name="dataType">Double</Property>
         <Property name="label">鏈熸湯鏁伴噺</Property>
         <Property name="required">true</Property>
-        <Property name="displayFormat">#0.000KG</Property>
+        <Property name="displayFormat">#,##0 KG</Property>
       </PropertyDef>
       <PropertyDef name="yjbz">
         <Property name="dataType">Integer</Property>
@@ -88,30 +105,6 @@
         <Property name="dataType">Date</Property>
         <Property name="label">涓氬姟鏃ユ湡</Property>
         <Property name="required">true</Property>
-      </PropertyDef>
-      <PropertyDef name="czbz">
-        <Property></Property>
-        <Property name="label">鎿嶄綔鏍囧織</Property>
-        <Property name="mapping">
-          <Property name="keyProperty">key</Property>
-          <Property name="valueProperty">value</Property>
-          <Property name="mapValues">
-            <Collection>
-              <Entity>
-                <Property name="key">i</Property>
-                <Property name="value">鏂板鏁版嵁</Property>
-              </Entity>
-              <Entity>
-                <Property name="key">u</Property>
-                <Property name="value">淇敼鏁版嵁</Property>
-              </Entity>
-              <Entity>
-                <Property name="key">d</Property>
-                <Property name="value">鍒犻櫎鏁版嵁</Property>
-              </Entity>
-            </Collection>
-          </Property>
-        </Property>
       </PropertyDef>
       <PropertyDef name="zhgxsj">
         <Property name="dataType">DateTime</Property>
@@ -220,6 +213,10 @@
         <Property name="dataSet">dsMain</Property>
         <Property name="readOnly">true</Property>
         <RowNumColumn/>
+        <DataColumn name="depotId">
+          <Property name="property">depotId</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
         <DataColumn name="lspzdm">
           <Property name="property">lspzdm</Property>
           <Property name="align">center</Property>
@@ -250,14 +247,6 @@
         </DataColumn>
         <DataColumn name="yjbz">
           <Property name="property">yjbz</Property>
-          <Property name="align">center</Property>
-        </DataColumn>
-        <DataColumn name="ywrq">
-          <Property name="property">ywrq</Property>
-          <Property name="align">center</Property>
-        </DataColumn>
-        <DataColumn name="czbz">
-          <Property name="property">czbz</Property>
           <Property name="align">center</Property>
         </DataColumn>
         <DataColumn name="zhgxsj">
@@ -308,6 +297,16 @@
           <Property name="cols">*,*</Property>
           <Property name="labelWidth">120</Property>
           <AutoFormElement>
+            <Property name="name">depotId</Property>
+            <Property name="property">depotId</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">deptId</Property>
+            <Property name="property">deptId</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
             <Property name="name">lspzdm</Property>
             <Property name="property">lspzdm</Property>
             <Editor/>
@@ -352,11 +351,6 @@
           <AutoFormElement>
             <Property name="name">ywrq</Property>
             <Property name="property">ywrq</Property>
-            <Editor/>
-          </AutoFormElement>
-          <AutoFormElement>
-            <Property name="name">czbz</Property>
-            <Property name="property">czbz</Property>
             <Editor/>
           </AutoFormElement>
           <AutoFormElement>
diff --git a/igds-core/src/main/java/com/ld/igds/view/service/HDepotBookStoreService.java b/igds-core/src/main/java/com/ld/igds/view/service/HDepotBookStoreService.java
index fa847cf..dd0350f 100644
--- a/igds-core/src/main/java/com/ld/igds/view/service/HDepotBookStoreService.java
+++ b/igds-core/src/main/java/com/ld/igds/view/service/HDepotBookStoreService.java
@@ -24,7 +24,7 @@
 
     public void listBookStore(Page<DepotBookStore> page, Map<String, Object> param) throws Exception {
         StringBuffer hql = new StringBuffer();
-        hql.append(" from " + DepotBookStore.class.getName() + " where companyId =:companyId and kqdm =:deptId ");
+        hql.append(" from " + DepotBookStore.class.getName() + " where companyId =:companyId and deptId =:deptId ");
         Map<String, Object> args = new HashMap<>();
         args.put("companyId", ContextUtil.getCompanyId());
         args.put("deptId", ContextUtil.subDeptId(null));
@@ -44,12 +44,10 @@
         try {
             if (null == data.getId()) {
                 data.setId(ContextUtil.getUUID());
-                data.setKqdm(ContextUtil.subDeptId(null));
+                data.setDeptId(ContextUtil.subDeptId(null));
                 data.setCompanyId(ContextUtil.getCompanyId());
-                data.setCzbz("i");
                 session.save(data);
             } else {
-                data.setCzbz("u");
                 session.update(data);
             }
         } catch (Exception e) {
diff --git a/igds-inout/src/main/java/com/ld/igds/timer/DepotBookStoreScheduled.java b/igds-inout/src/main/java/com/ld/igds/timer/DepotBookStoreScheduled.java
new file mode 100644
index 0000000..7889cae
--- /dev/null
+++ b/igds-inout/src/main/java/com/ld/igds/timer/DepotBookStoreScheduled.java
@@ -0,0 +1,123 @@
+package com.ld.igds.timer;
+
+import com.bstek.bdf2.core.model.DefaultCompany;
+import com.ld.igds.common.CoreCommonService;
+import com.ld.igds.constant.Constant;
+import com.ld.igds.constant.DepotStatus;
+import com.ld.igds.inout.InoutConstant;
+import com.ld.igds.inout.dto.InoutData;
+import com.ld.igds.inout.dto.InoutParam;
+import com.ld.igds.inout.service.InoutService;
+import com.ld.igds.models.DepotStore;
+import com.ld.igds.models.InoutLossOver;
+import com.ld.igds.models.InoutRecord;
+import com.ld.igds.util.ContextUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.time.DateUtils;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * @Desc: 璐﹂潰搴撳瓨 - 姣忔湀搴曡嚜鍔ㄧ粺璁℃瘡涓粨搴撶殑璐﹂潰搴撳瓨
+ * @author: czt
+ * @update-time: 2023/10/30
+ */
+@Slf4j
+@Component(DepotBookStoreScheduled.BEAN_ID)
+public class DepotBookStoreScheduled {
+
+    public static final String BEAN_ID = "inout.depotBookStoreScheduled";
+
+    @Resource
+    private InoutService inoutService;
+
+    @Resource
+    private CoreCommonService commonService;
+
+    /**
+     * 姣忔湀鏈�鍚庝竴澶�22鐐�25鍒嗘墽琛�
+     */
+    @Scheduled(cron = "0 25 22 28-31 * ?")
+    public void scheduled() {
+
+        final Calendar c = Calendar.getInstance();
+        //濡傛灉鏄渶鍚庝竴澶� 鍒欐墽琛屽畾鏃朵换鍔�
+        if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)) {
+
+            List<DefaultCompany> listCompany = commonService.getCompanyList();
+            if (null == listCompany){
+                return;
+            }
+
+            for (DefaultCompany company : listCompany) {
+                //TODO 缁熻姣忎釜浠撳簱璐﹂潰搴撳瓨
+
+            }
+        }
+    }
+
+    /**
+     * 缁熻璐﹂潰搴撳瓨
+     * @param companyId
+     * @param listLossOver
+     * @param param
+     */
+    private void sumDepotBookStore(String companyId, List<InoutLossOver> listLossOver, InoutParam param) {
+
+//        if (null == listLossOver || listLossOver.isEmpty()) {
+//            log.info("-----------绯荤粺鑷姩鍚屾搴撳瓨锛岃繎鏈熸棤鎹熺泭璁板綍锛屽彇娑堝悓姝ヤ粨搴撳簱瀛樷�︹�}", companyId);
+//            return;
+//        }
+//
+//        // 鑾峰彇鏈夊嚭鍏ュ簱璁板綍鐨勪粨搴�
+//        Map<String, InoutLossOver> map = new HashMap<>();
+//        String key;
+//        DepotStore lastStore;
+//        double sumRecordWeight = 0.0;
+//        for (InoutLossOver data : listLossOver) {
+//            key = data.getDepotId() + "_" + data.getType();
+//            if (null != map.get(key)) {
+//                continue;
+//            }
+//
+//            map.put(key, data);
+//
+//            // 鏍规嵁鏈�鍚庝竴杞﹁繘琛屾眹鎬荤粺璁★紝寮�濮嬫椂闂存槸浠撳簱搴撳瓨鏈�鍚庝竴涓椂闂存埅姝㈠埌褰撳墠
+//            lastStore = commonService.getLastDepotStore(data.getDepotId());
+//            if (null == lastStore) {
+//                log.error("--------搴撳瓨瀹氭椂浠诲姟-----娌℃湁鑾峰彇鍒颁粨搴撴渶鍚庡簱瀛樹俊鎭紝鍙栨秷鑷姩缁熻锛岃鏍稿涓氬姟閫昏緫--浠撳簱-{}",
+//                        data.getDepotId());
+//                continue;
+//            }
+//
+//            param.setDeptId(data.getDeptId());
+//            param.setDepotId(data.getDepotId());
+//            param.setCompanyId(data.getCompanyId());
+//            param.setType(data.getType());
+//
+//            //鑾峰彇鍑哄叆搴撶殑閲嶉噺淇℃伅
+//            sumRecordWeight = inoutService.sumLossOverWeight(param);
+//
+//            //鏂板涓�鏉″簱瀛樿褰�
+//            lastStore.setRemark("绯荤粺瀹氭椂鐢熸垚璁板綍");
+//            lastStore.setId(ContextUtil.getUUID());
+//            lastStore.setUpdateUser("绯荤粺绠$悊鍛�");
+//            lastStore.setUpdateDate(new Date());
+//            lastStore.setCreateDate(new Date());
+//            if(Constant.LOSS_OVER_LOSS.equals(data.getType())){
+//                lastStore.setStorageReal(lastStore.getStorageReal() + sumRecordWeight);
+//
+//            }
+//            if(Constant.LOSS_OVER_OVER.equals(data.getType())){
+//                lastStore.setStorageReal(lastStore.getStorageReal() - sumRecordWeight);
+//            }
+//
+//            lastStore.setStorageSettle(lastStore.getStorageReal());
+//            commonService.addDepotStore(lastStore, true);
+//        }
+    }
+
+}
\ No newline at end of file
diff --git a/igds-warn/src/main/java/com/ld/igds/warn/service/HSecureManagerService.java b/igds-warn/src/main/java/com/ld/igds/warn/service/HSecureManagerService.java
new file mode 100644
index 0000000..ee42edc
--- /dev/null
+++ b/igds-warn/src/main/java/com/ld/igds/warn/service/HSecureManagerService.java
@@ -0,0 +1,104 @@
+package com.ld.igds.warn.service;
+
+import com.bstek.bdf2.core.orm.hibernate.HibernateDao;
+import com.bstek.dorado.data.provider.Page;
+import com.ld.igds.models.SecureManager;
+import com.ld.igds.util.ContextUtil;
+import com.ld.igds.util.DateUtil;
+import org.apache.commons.lang3.time.DateFormatUtils;
+import org.hibernate.Session;
+import org.springframework.stereotype.Component;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author czt
+ * @date 2023/10/30
+ **/
+@Component
+public class HSecureManagerService extends HibernateDao {
+
+
+    public void listData(Page<SecureManager> page, Map<String, Object> param) throws Exception {
+        StringBuffer hql = new StringBuffer();
+        hql.append(" from " + SecureManager.class.getName() + " where companyId =:companyId and deptId =:deptId ");
+        Map<String, Object> args = new HashMap<>();
+        args.put("companyId", ContextUtil.getCompanyId());
+        args.put("deptId", ContextUtil.subDeptId(null));
+
+        String count = "select count(*) " + hql.toString();
+        hql.append(" order by updateTime desc");
+        this.pagingQuery(page, hql.toString(), count, args);
+
+    }
+
+    public void saveData(SecureManager data) {
+        data.setUpdateTime(new Date());
+        data.setDeptId(ContextUtil.subDeptId(null));
+        data.setCompanyId(ContextUtil.getCompanyId());
+        Session session = this.getSessionFactory().openSession();
+        try {
+            if (null == data.getFxdbm()) {
+                data.setFxdbm(DateFormatUtils.format(new Date(), "yyyyMMdd") + getIndex(data.getCompanyId()));
+
+                session.save(data);
+            } else {
+                session.update(data);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            session.flush();
+            session.close();
+        }
+    }
+
+    public String getIndex(String companyId) {
+        List<SecureManager> list = getDataByTime(companyId);
+        int index = 10001;
+        if (list != null && list.size() > 0) {
+            String id = list.get(0).getFxdbm().substring(8);
+            int temp = Integer.valueOf(id) + 1;
+            index += temp;
+        }
+
+        return String.valueOf(index).substring(1);
+    }
+
+    private List<SecureManager> getDataByTime(String companyId) {
+        String hql = " from " + SecureManager.class.getName()
+                + " where companyId =:companyId ";
+
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
+
+        hql += " and updateTime >:startTime";
+        args.put("startTime", DateUtil.getCurZero(new Date()));
+
+
+        hql += " and updateTime <:endTime";
+        args.put("endTime", DateUtil.getNextZero(new Date()));
+
+
+        hql += " order by id desc";
+
+        return this.query(hql, args);
+    }
+
+    public void delData(SecureManager data) {
+        Session session = this.getSessionFactory().openSession();
+        try {
+            if (null != data.getFxdbm()) {
+                session.delete(data);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            session.flush();
+            session.close();
+        }
+    }
+
+}
diff --git a/igds-warn/src/main/java/com/ld/igds/warn/view/SecureManager.view.xml b/igds-warn/src/main/java/com/ld/igds/warn/view/SecureManager.view.xml
new file mode 100644
index 0000000..5c33d99
--- /dev/null
+++ b/igds-warn/src/main/java/com/ld/igds/warn/view/SecureManager.view.xml
@@ -0,0 +1,460 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ViewConfig>
+  <Arguments/>
+  <Context/>
+  <Model>
+    <DataType name="dtMain">
+      <Property name="creationType">com.ld.igds.models.SecureManager</Property>
+      <PropertyDef name="fxdbm">
+        <Property></Property>
+        <Property name="label">椋庨櫓鐐圭紪鐮�</Property>
+        <Property name="readOnly">true</Property>
+      </PropertyDef>
+      <PropertyDef name="companyId">
+        <Property></Property>
+        <Property name="label">缁勭粐缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="deptId">
+        <Property></Property>
+        <Property name="label">鎵�灞炲垎搴�</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
+          <Property name="keyProperty">id</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="dd">
+        <Property></Property>
+        <Property name="label">鍦扮偣</Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="sbr">
+        <Property></Property>
+        <Property name="label">璇嗗埆浜�</Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="hjbw">
+        <Property></Property>
+        <Property name="label">鐜妭/閮ㄤ綅</Property>
+      </PropertyDef>
+      <PropertyDef name="fxxx">
+        <Property></Property>
+        <Property name="label">椋庨櫓淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="fxlx">
+        <Property name="label">椋庨櫓绫诲瀷</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">key</Property>
+          <Property name="valueProperty">value</Property>
+          <Property name="mapValues">
+            <Collection>
+              <Entity>
+                <Property name="key">1</Property>
+                <Property name="value">1-鍩虹璁炬柦</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">2</Property>
+                <Property name="value">2-缃戠粶瀹夊叏</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">3</Property>
+                <Property name="value">3-娑堥槻瀹夊叏</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">4</Property>
+                <Property name="value">4-鐢ㄧ數瀹夊叏</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">5</Property>
+                <Property name="value">5-浣滀笟瀹夊叏</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">6</Property>
+                <Property name="value">6-鐢ㄨ嵂椋庨櫓</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">7</Property>
+                <Property name="value">7-绠$悊椋庨櫓</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">8</Property>
+                <Property name="value">8-鍏朵粬椋庨櫓</Property>
+              </Entity>
+            </Collection>
+          </Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="fxfj">
+        <Property name="label">椋庨櫓绛夌骇</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">key</Property>
+          <Property name="valueProperty">value</Property>
+          <Property name="mapValues">
+            <Collection>
+              <Entity>
+                <Property name="key">1</Property>
+                <Property name="value">1-浣庨闄�</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">2</Property>
+                <Property name="value">2-涓�鑸闄�</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">3</Property>
+                <Property name="value">3-杈冨ぇ椋庨櫓</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">4</Property>
+                <Property name="value">4-閲嶅ぇ椋庨櫓</Property>
+              </Entity>
+            </Collection>
+          </Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="fxglcs">
+        <Property></Property>
+        <Property name="label">椋庨櫓绠℃帶鎺柦</Property>
+      </PropertyDef>
+      <PropertyDef name="yhxx">
+        <Property></Property>
+        <Property name="label">闅愭偅淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="yhpcxx">
+        <Property></Property>
+        <Property name="label">闅愭偅鎺掓煡淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="yhzgxx">
+        <Property></Property>
+        <Property name="label">闅愭偅鏁存敼淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="yhysxx">
+        <Property></Property>
+        <Property name="label">闅愭偅鏁存敼楠屾敹淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="sgjbxx">
+        <Property></Property>
+        <Property name="label">浜嬫晠鍩烘湰淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="zgsx">
+        <Property></Property>
+        <Property name="label">鏁存敼鏃堕檺</Property>
+      </PropertyDef>
+      <PropertyDef name="zrdw">
+        <Property></Property>
+        <Property name="label">璐d换鍗曚綅</Property>
+      </PropertyDef>
+      <PropertyDef name="zrr">
+        <Property></Property>
+        <Property name="label">璐d换浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="zgysxx">
+        <Property></Property>
+        <Property name="label">鏁存敼楠屾敹淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="fxgzjgzrr">
+        <Property name="label">椋庨櫓璺熻釜鐩戠璐d换浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="updateTime">
+        <Property name="dataType">DateTime</Property>
+        <Property name="label">鏈�鍚庢洿鏂版椂闂�</Property>
+      </PropertyDef>
+    </DataType>
+    <DataType name="dtParam">
+      <PropertyDef name="sbr">
+        <Property name="label">璇嗗埆浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="dd">
+        <Property name="label">鍦扮偣</Property>
+      </PropertyDef>
+    </DataType>
+  </Model>
+  <View layout="padding:5;regionPadding:5">
+    <Property name="packages">font-awesome,css-common</Property>
+    <DataSet id="dsMain">
+      <Property name="dataType">[dtMain]</Property>
+      <Property name="dataProvider">secureManagerPR#pageList</Property>
+      <Property name="pageSize">15</Property>
+    </DataSet>
+    <DataSet id="dsParam">
+      <ClientEvent name="onReady">self.insert({})&#xD;
+</ClientEvent>
+      <Property name="dataType">[dtParam]</Property>
+    </DataSet>
+    <Container layout="regionPadding:10" layoutConstraint="top">
+      <Property name="exClassName">bg-color</Property>
+      <Property name="height">55</Property>
+      <Label layoutConstraint="left">
+        <Property name="text">鑿滃崟鏍忥細</Property>
+      </Label>
+      <Button layoutConstraint="left">
+        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert();&#xD;
+view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
+        <Property name="exClassName">btn-normal</Property>
+        <Property name="iconClass">fa fa-plus</Property>
+        <Property name="caption">鏂板</Property>
+      </Button>
+      <Button layoutConstraint="left">
+        <ClientEvent name="onClick">var dialog= view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(dialog){&#xD;
+	view.get(&quot;#dialogMain&quot;).show();&#xD;
+}else{&#xD;
+	$alert(&quot;璇烽�変腑闇�瑕佷慨鏀圭殑鏁版嵁&quot;)&#xD;
+}</ClientEvent>
+        <Property name="caption">缂栬緫</Property>
+        <Property name="exClassName">btn-warm</Property>
+        <Property name="iconClass">fa fa-pencil</Property>
+      </Button>
+      <Button>
+        <ClientEvent name="onClick">var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(!cur) return;&#xD;
+view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,cur).execute(function(result){&#xD;
+	if(result){&#xD;
+		$alert(result);&#xD;
+		return;&#xD;
+	}else{&#xD;
+		cur.remove();&#xD;
+	}&#xD;
+});</ClientEvent>
+        <Property name="exClassName">btn-warn</Property>
+        <Property name="iconClass">fa fa-pencil</Property>
+        <Property name="caption">鍒犻櫎</Property>
+      </Button>
+    </Container>
+    <Container>
+      <AutoForm>
+        <Property name="dataSet">dsParam</Property>
+        <Property name="cols">*,*,*,*</Property>
+        <AutoFormElement>
+          <Property name="name">sbr</Property>
+          <Property name="property">sbr</Property>
+          <Editor/>
+        </AutoFormElement>
+        <AutoFormElement>
+          <Property name="name">dd</Property>
+          <Property name="property">dd</Property>
+          <Editor/>
+        </AutoFormElement>
+        <Container layout="regionPadding:10">
+          <Button layoutConstraint="left">
+            <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data:#&quot;);&#xD;
+view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param).flushAsync();</ClientEvent>
+            <Property name="caption">鏌ヨ</Property>
+            <Property name="exClassName">btn-normal</Property>
+            <Property name="iconClass">fa fa-search</Property>
+          </Button>
+          <Button layoutConstraint="left">
+            <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).insert({})</ClientEvent>
+            <Property name="caption">閲嶇疆</Property>
+            <Property name="iconClass">fa fa-refresh</Property>
+            <Property name="exClassName">btn-default</Property>
+          </Button>
+        </Container>
+      </AutoForm>
+      <DataGrid id="dgMain">
+        <ClientEvent name="onDataRowDoubleClick">view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="readOnly">true</Property>
+        <RowNumColumn/>
+        <DataColumn name="fxdbm">
+          <Property name="property">fxdbm</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
+        <DataColumn name="sbr">
+          <Property name="property">sbr</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
+        <DataColumn name="dd">
+          <Property name="property">dd</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
+        <DataColumn name="hjbw">
+          <Property name="property">hjbw</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
+        <DataColumn name="fxxx">
+          <Property name="property">fxxx</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
+        <DataColumn name="fxlx">
+          <Property name="property">fxlx</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
+        <DataColumn name="updateTime">
+          <Property name="property">updateTime</Property>
+          <Property name="align">center</Property>
+        </DataColumn>
+      </DataGrid>
+      <ToolBar layoutConstraint="bottom">
+        <Fill/>
+        <DataPilot>
+          <Property name="dataSet">dsMain</Property>
+          <Property name="itemCodes">pageSize,pages</Property>
+        </DataPilot>
+      </ToolBar>
+    </Container>
+    <Dialog id="dialogMain">
+      <Property name="caption">鍩烘湰淇℃伅</Property>
+      <Property name="width">80%</Property>
+      <Property name="closeable">false</Property>
+      <Buttons>
+        <Button>
+          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+view.get(&quot;#uaAction&quot;).execute(function(result){&#xD;
+	if(result){&#xD;
+		$alert(result);&#xD;
+	}else{&#xD;
+		self.get(&quot;parent&quot;).hide();&#xD;
+	}&#xD;
+});</ClientEvent>
+          <Property name="caption">淇濆瓨</Property>
+          <Property name="iconClass">fa fa-check</Property>
+          <Property name="exClassName">btn-normal</Property>
+        </Button>
+        <Button>
+          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
+self.get(&quot;parent&quot;).hide();</ClientEvent>
+          <Property name="caption">鍙栨秷</Property>
+          <Property name="iconClass">fa fa-times</Property>
+          <Property name="exClassName">btn-warn</Property>
+        </Button>
+      </Buttons>
+      <Children>
+        <AutoForm>
+          <Property name="dataSet">dsMain</Property>
+          <Property name="readOnly">false</Property>
+          <Property name="labelSeparator"> : </Property>
+          <Property name="labelAlign">right</Property>
+          <Property name="cols">*,*</Property>
+          <Property name="labelWidth">160</Property>
+          <AutoFormElement>
+            <Property name="name">fxdbm</Property>
+            <Property name="property">fxdbm</Property>
+            <Editor>
+              <TextEditor>
+                <Property name="blankText">--绯荤粺鑷姩鐢熸垚--</Property>
+              </TextEditor>
+            </Editor>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">deptId</Property>
+            <Property name="property">deptId</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">dd</Property>
+            <Property name="property">dd</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">sbr</Property>
+            <Property name="property">sbr</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">hjbw</Property>
+            <Property name="property">hjbw</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">fxxx</Property>
+            <Property name="property">fxxx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">fxlx</Property>
+            <Property name="property">fxlx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">fxfj</Property>
+            <Property name="property">fxfj</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">fxglcs</Property>
+            <Property name="property">fxglcs</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">yhxx</Property>
+            <Property name="property">yhxx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">yhpcxx</Property>
+            <Property name="property">yhpcxx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">yhzgxx</Property>
+            <Property name="property">yhzgxx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">yhysxx</Property>
+            <Property name="property">yhysxx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">sgjbxx</Property>
+            <Property name="property">sgjbxx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">zgsx</Property>
+            <Property name="property">zgsx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">zrdw</Property>
+            <Property name="property">zrdw</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">zrr</Property>
+            <Property name="property">zrr</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">zgysxx</Property>
+            <Property name="property">zgysxx</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">fxgzjgzrr</Property>
+            <Property name="property">fxgzjgzrr</Property>
+            <Editor/>
+          </AutoFormElement>
+          <AutoFormElement>
+            <Property name="name">updateTime</Property>
+            <Property name="property">updateTime</Property>
+            <Editor/>
+          </AutoFormElement>
+        </AutoForm>
+      </Children>
+      <Tools/>
+    </Dialog>
+    <UpdateAction id="uaAction">
+      <Property name="successMessage">鎵ц鎴愬姛!</Property>
+      <Property name="dataResolver">secureManagerPR#saveData</Property>
+      <UpdateItem>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="dataPath">[#current]</Property>
+      </UpdateItem>
+    </UpdateAction>
+    <AjaxAction id="ajaxDel">
+      <Property name="confirmMessage">纭畾瑕佸垹闄ゅ悧锛�</Property>
+      <Property name="service">secureManagerPR#delData</Property>
+    </AjaxAction>
+    <MonthDropDown id="monthDropDown1">
+      <ClientEvent name="onClose">var date = arg.selectedValue+1;&#xD;
+if(date&lt;10){&#xD;
+	arg.selectedValue=&quot;0&quot;+date&#xD;
+}else if(date>=10){&#xD;
+	arg.selectedValue=date&#xD;
+}&#xD;
+</ClientEvent>
+    </MonthDropDown>
+  </View>
+</ViewConfig>
diff --git a/igds-warn/src/main/java/com/ld/igds/warn/view/SecureManagerPR.java b/igds-warn/src/main/java/com/ld/igds/warn/view/SecureManagerPR.java
new file mode 100644
index 0000000..88889d4
--- /dev/null
+++ b/igds-warn/src/main/java/com/ld/igds/warn/view/SecureManagerPR.java
@@ -0,0 +1,53 @@
+package com.ld.igds.warn.view;
+
+import com.bstek.dorado.annotation.DataProvider;
+import com.bstek.dorado.annotation.DataResolver;
+import com.bstek.dorado.annotation.Expose;
+import com.bstek.dorado.data.provider.Page;
+import com.ld.igds.models.SecureManager;
+import com.ld.igds.warn.service.HSecureManagerService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import java.util.Map;
+
+/**
+ * @Author: czt
+ **/
+@Component
+public class SecureManagerPR {
+    @Autowired
+    private HSecureManagerService secureManagerService;
+
+    /**
+     * secureManagerPR#pageList
+     *
+     * @param page
+     * @param param
+     * @throws Exception
+     */
+    @DataProvider
+    public void pageList(Page<SecureManager> page, Map<String, Object> param) throws Exception {
+        secureManagerService.listData(page, param);
+    }
+
+    /**
+     * secureManagerPR#saveData
+     *
+     * @param data
+     */
+    @DataResolver
+    public void saveData(SecureManager data) {
+        secureManagerService.saveData(data);
+    }
+
+    /**
+     * secureManagerPR#delData
+     *
+     * @param data
+     */
+    @Expose
+    public void delData(SecureManager data) {
+        secureManagerService.delData(data);
+    }
+
+}
diff --git a/igds-web/src/main/resources/templates/index/index-5303.html b/igds-web/src/main/resources/templates/index/index-5303.html
index 9607dd1..31b9ac7 100644
--- a/igds-web/src/main/resources/templates/index/index-5303.html
+++ b/igds-web/src/main/resources/templates/index/index-5303.html
@@ -112,9 +112,9 @@
 						<P>鏅鸿兘姘旇皟</P>
 				</a>
 				</span> <span class="i-menu-item i-menu4 i-navBg4"> <a
-				href="javascript:;" onclick="openByTag('hlxz')"> <i><img
+				href="javascript:;" onclick="openByTag('warn')"> <i><img
                 th:src="@{/static/images/i-icon-hlzx.png}"/></i>
-						<P>鐜祦鐔忚捀</P>
+						<P>鏅鸿兘棰勮</P>
 				</a>
 				</span> <span class="i-menu-item i-menu5 i-navBg5">
 				<a href="javascript:;" onclick="openQuantity()"> <i><img

--
Gitblit v1.9.3