CZT
2023-10-30 b5a5795a5a64d9a5b78b338de74909e240fe73c3
优化账面库存页面、新增安全管理页面
已修改4个文件
已添加5个文件
953 ■■■■■ 文件已修改
igds-core/src/main/java/com/ld/igds/models/DepotBookStore.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/models/SecureManager.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/view/DepotBookStore.view.xml 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/view/service/HDepotBookStoreService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/timer/DepotBookStoreScheduled.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-warn/src/main/java/com/ld/igds/warn/service/HSecureManagerService.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-warn/src/main/java/com/ld/igds/warn/view/SecureManager.view.xml 460 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-warn/src/main/java/com/ld/igds/warn/view/SecureManagerPR.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/index/index-5303.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 = "库区代码")
    private String kqdm;
    private String deptId;
    @Column(name = "DEPOT_ID_", length = 30)
    @PropertyDef(label = "仓库编码")
    private String depotId;
    @Column(name = "lspzdm", length = 7)
    @PropertyDef(label = "粮食品种代码")
@@ -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")
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 = "责任单位")
    private String zrdw;
    @Column(name = "zrr", length = 200)
    @PropertyDef(label = "责任人")
    private String zrr;
    @Column(name = "zgysxx", length = 200)
    @PropertyDef(label = "整改验收信息")
    private String zgysxx;
    @Column(name = "fxgzjgzrr", length = 50)
    @PropertyDef(label = "风险跟踪监管责任人")
    private String fxgzjgzrr;
    @Column(name = "updateTime")
    @PropertyDef(label = "最后更新时间")
    private Date updateTime;
}
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">库区代码</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">粮食品种代码</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>
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) {
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);
//        }
    }
}
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();
        }
    }
}
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">责任单位</Property>
      </PropertyDef>
      <PropertyDef name="zrr">
        <Property></Property>
        <Property name="label">责任人</Property>
      </PropertyDef>
      <PropertyDef name="zgysxx">
        <Property></Property>
        <Property name="label">整改验收信息</Property>
      </PropertyDef>
      <PropertyDef name="fxgzjgzrr">
        <Property name="label">风险跟踪监管责任人</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>
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);
    }
}
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