czt
2025-05-30 9bc5f4d58da606c6a465e152d05a1c31b0611f74
系统配置页面
已添加10个文件
已修改4个文件
2790 ■■■■■ 文件已修改
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DepotConf.java 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DeviceModbus.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GasModbus.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotConfService.java 251 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotConfRepository.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Depot.view.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotConf.view.xml 509 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotStatusConfirm.view.xml 460 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotStore.view.xml 476 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DeviceModbus.view.xml 313 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotConfPR.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/models/igds.model.xml 277 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/ruoyi/js/common.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/ruoyi/js/ry-ui.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DepotConf.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,165 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import com.fzzy.igds.dzhwk.constant.Constant;
import com.fzzy.igds.dzhwk.constant.GrainFrequence;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
/**
 * ä»“库配置 ç”¨äºŽé…ç½®ç²®æƒ…分机等配置,气体采集配置等
 */
@Data
@Entity
@Table(name = "D_DEPOT_CONF")
public class DepotConf implements Serializable {
    @Id
    @Column(name = "DEPOT_ID_", length = 50)
    @PropertyDef(label = "所属仓库")
    private String depotId;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "所属分库")
    private String deptId;
    @Column(name = "GRAIN_SER_", length = 40)
    @PropertyDef(label = "粮情分机", description = "仅仅粮情采集分机")
    private String grainSer;
    @Column(name = "TH_SER_", length = 40)
    @PropertyDef(label = "温湿度分机", description = "仓温仓湿的分机")
    private String thSer;
    @Column(name = "ES_SER_", length = 40)
    @PropertyDef(label = "能耗分机")
    private String esSer;
    @Column(name = "ES_SER_TAG_", length = 40)
    @PropertyDef(label = "多能耗分机")
    private String esSerTag;
    @Column(name = "GAS_SER_", length = 40)
    @PropertyDef(label = "气体分机")
    private String gasSer;
    @Column(name = "GAS_SER_TAG_", length = 40)
    @PropertyDef(label = "多气体分机")
    private String gasSerTag;
    @Column(name = "PEST_SER_", length = 40)
    @PropertyDef(label = "虫害分机")
    private String pestSer;
    @Column(name = "PEST_SER_TAG_", length = 40)
    @PropertyDef(label = "多虫害分机")
    private String pestSerTag;
    @Column(name = "VERB_SER_", length = 40)
    @PropertyDef(label = "通风分机")
    private String verbSer;
    @Column(name = "GRAIN_FREQ_", length = 4)
    @PropertyDef(label = "粮情保存频率", description = "默认一天多次")
    private String grainFreq = GrainFrequence.FREQ_01.getCode();
    @Column(name = "TH_CONF_", length = 5)
    @PropertyDef(label = "仓温仓湿通道")
    private String thConf = "1";
    @Column(name = "CABLE_RULE_", length = 20)
    @PropertyDef(label = "布线规则", description = "平方仓表示层行列,筒仓表示每圈的列数")
    private String cableRule;
    @Column(name = "CABLE_CIR_", length = 20)
    @PropertyDef(label = "筒仓层规则", description = "针对筒仓")
    private String cableCir;
    @Column(name = "CABLE_CONE_", length = 2)
    @PropertyDef(label = "筒仓锥形", description = "针对筒仓锥形,0=无判断,1=上锥形,2=下锥形")
    private String cableCone = Constant.CABLE_CONE_0;
    @Column(name = "CABLE_START_")
    @PropertyDef(label = "电缆开始列")
    private int cableStart;
    @Column(name = "CABLE_END_")
    @PropertyDef(label = "电缆截至列")
    private int cableEnd;
    @Column(name = "START_ORIENTATION_", length = 20)
    @PropertyDef(label = "电缆起始方位", description = "默认右边(右边、右上、左边、左上)")
    private String startOrientation = Constant.GRAIN_START_ORIENTATION_RIGHT;
    @Column(name = "START_DIRECTION_", length = 20)
    @PropertyDef(label = "电缆起始方向", description = "默认纵向(纵向、横向)")
    private String startDirection = Constant.GRAIN_START_DIRECTION_PORTRAIT;
    @Column(name = "START_POINT_", length = 20)
    @PropertyDef(label = "电缆起始点位", description = "默认顶部(顶部、底部)")
    private String startPoint = Constant.GRAIN_START_POINT_TOP;
    @Column(name = "START_CONVERT_", length = 20)
    @PropertyDef(label = "层行转换", description = "默认不转换(默认、顺时针、逆时针)")
    private String startConvert = Constant.GRAIN_CONVERT_DEFAULT;
    @Column(name = "TEMP_MAX_")
    @PropertyDef(label = "温度上限")
    private Double tempMax;
    @Column(name = "GAS_START_")
    @PropertyDef(label = "气体采集点开始")
    private int gasStart;
    @Column(name = "GAS_END_")
    @PropertyDef(label = "气体采集点截至")
    private int gasEnd;
    @Column(name = "N2_MAX_")
    @PropertyDef(label = "氮气上限")
    private Double n2Max;
    @Column(name = "CO2_MAX_")
    @PropertyDef(label = "二氧化碳上限")
    private Double co2Max;
    @Column(name = "O2_MAX_")
    @PropertyDef(label = "氧气上限")
    private Double o2Max;
    @Column(name = "PH3_MAX_")
    @PropertyDef(label = "磷化氢上限")
    private Double ph3Max;
    @Column(name = "PEST_START_")
    @PropertyDef(label = "虫害采集点开始")
    private int pestStart;
    @Column(name = "PEST_END_")
    @PropertyDef(label = "虫害采集点截至")
    private int pestEnd;
    @Column(name = "PEST_MAX_")
    @PropertyDef(label = "虫害上限")
    private Double pestMax;
    @Column(name = "IS_ONLY_TH_", length = 2)
    @PropertyDef(label = "粮情是否温湿度", description = "默认否。")
    private String isOnlyTH = Constant.YN_N;
    // ä»“库名称
    @Transient
    private String depotName;
    //仓库类型
    @Transient
    private String depotType;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DeviceModbus.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,101 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import com.fzzy.igds.dzhwk.constant.BizType;
import com.fzzy.igds.dzhwk.constant.Constant;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;
/**
 * æ ¹æ®è®¾å¤‡é…ç½®çš„Modbus-TCP参数配置
 */
@Data
@Entity
@Table(name = "D_DEVICE_MODBUS")
public class DeviceModbus implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "ID_", length = 40)
    @PropertyDef(label = "ID")
    private String id;
    @Column(name = "DEVICE_CODE_", length = 40)
    @PropertyDef(label = "设备编码")
    private String deviceCode;
    @Column(name = "BIZ_TYEP_", length = 10)
    @PropertyDef(label = "业务类型")
    private String bizType = BizType.AREATION.getCode();
    @Column(name = "OPEN_", length = 10)
    @PropertyDef(label = "开地址", description = "开地址、能耗读取地址")
    private String open = Constant.YN_N;
    @Column(name = "OPEN_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String openFun = "99";
    @Column(name = "CLOSE_", length = 10)
    @PropertyDef(label = "关地址", description = "关地址、空调温度设置地址")
    private String close = Constant.YN_N;
    @Column(name = "CLOSE_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String closeFun = "99";
    @Column(name = "STOP_", length = 10)
    @PropertyDef(label = "停地址")
    private String stop = Constant.YN_N;
    @Column(name = "STOP_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String stopFun = "99";
    @Column(name = "OPEN_END_", length = 10)
    @PropertyDef(label = "开到位地址", description = "开到位地址、运行状态地址(风机和空调)")
    private String openEnd = Constant.YN_N;
    @Column(name = "OPEN_END_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String openEndFun = "99";
    @Column(name = "CLOSE_END_", length = 10)
    @PropertyDef(label = "关到位地址")
    private String closeEnd = Constant.YN_N;
    @Column(name = "CLOSE_END_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String closeEndFun = "99";
    @Column(name = "OPEN_ERROR_", length = 10)
    @PropertyDef(label = "开故障地址")
    private String openError = Constant.YN_N;
    @Column(name = "OPEN_ERROR_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String openErrorFun = "99";
    @Column(name = "CLOSE_ERROR_", length = 10)
    @PropertyDef(label = "关故障地址")
    private String closeError = Constant.YN_N;
    @Column(name = "CLOSE_ERROR_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String closeErrorFun = "99";
    //轴流风机和轴流窗可能不在一个分机上,IP不同
    @Column(name = "SER_ID_", length = 10)
    @PropertyDef(label = "所属分机")
    private String serId;
    @Transient
    private List<GasModbus> listGas;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GasModbus.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import com.fzzy.igds.dzhwk.constant.Constant;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * é…ç½®æµ‹æ°”和测虫的MODBUS-TCP配置信息
 */
@Data
@Entity
@Table(name = "D_GAS_MODBUS")
public class GasModbus implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "ID_", length = 40)
    @PropertyDef(label = "ID")
    private String id;
    @Column(name = "DEPOT_ID_", length = 50)
    @PropertyDef(label = "所属仓库")
    private String depotId;
    @Column(name = "PASS_CODE_")
    @PropertyDef(label = "通道")
    private int passcode;
    @Column(name = "CO2_", length = 10)
    @PropertyDef(label = "二氧化碳")
    private String co2 = Constant.YN_N;
    @Column(name = "CO2_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String co2Fun = "99";
    @Column(name = "O2_", length = 10)
    @PropertyDef(label = "氧气")
    private String o2 = Constant.YN_N;
    @Column(name = "O2_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String o2Fun = "99";
    @Column(name = "PH3_", length = 10)
    @PropertyDef(label = "磷化氢")
    private String ph3= Constant.YN_N;
    @Column(name = "PH3_FUN", length = 4)
    @PropertyDef(label = "功能号")
    private String ph3Fun = "99";
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotConfService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,251 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.constant.RedisConst;
import com.fzzy.igds.dzhwk.domain.Depot;
import com.fzzy.igds.dzhwk.domain.DepotConf;
import com.fzzy.igds.sys.repository.DepotConfRepository;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/25 14:56
 */
@Slf4j
@Service("sys.depotConfService")
public class DepotConfService {
    @Resource
    private DepotConfRepository depotConfRepository;
    @Resource
    private DepotService depotService;
    @Resource
    private RedisCache redisCache;
    /**
     * jpa查询配置信息
     *
     * @param companyId
     * @param deptId
     * @return
     */
    public List<DepotConf> getConfList(String companyId, String deptId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(null);
        }
        //查询配置信息
        List<DepotConf> list = depotConfRepository.getDepotConf(companyId, deptId);
        //配置信息为空,则自动生成
        if(null == list || list.isEmpty()){
            addConfByDepot(companyId);
        }
        return depotConfRepository.getDepotConf(companyId, deptId);
    }
    /**
     * jpa更新保存配置信息
     *
     * @param conf
     */
    public void saveConf(DepotConf conf) {
        if (StringUtils.isEmpty(conf.getCompanyId())) {
            conf.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(conf.getDeptId())) {
            conf.setDeptId(ContextUtil.subDeptId(null));
        }
        depotConfRepository.save(conf);
        flushConfCache(conf.getCompanyId());
    }
    /**
     * jpa删除配置信息
     *
     * @param conf
     * @return
     */
    public void deleteDepotConf(DepotConf conf) {
        depotConfRepository.delete(conf);
        //删除配置缓存
        this.delCacheDepotConf(conf, conf.getCompanyId());
    }
    /**
     * è®¾ç½®ç¼“存信息
     *
     * @param list
     * @param companyId
     */
    public void setCacheDepotConf(List<DepotConf> list, String companyId) {
        if (null != list) {
            Depot depot;
            String key;
            for (DepotConf depotConf : list) {
                depot = depotService.getCacheDepot(companyId, depotConf.getDepotId());
                if (null != depot) {
                    depotConf.setDepotName(depot.getName());
                    depotConf.setDepotType(depot.getDepotType());
                }
                key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotConf.getDepotId());
                redisCache.setCacheObject(key, depotConf);
            }
        }
    }
    /**
     * åˆ é™¤ç¼“存信息
     *
     * @param depotConf
     * @param companyId
     */
    public void delCacheDepotConf(DepotConf depotConf, String companyId) {
        if (null == depotConf) {
            return;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotConf.getDepotId());
        redisCache.deleteObject(key);
    }
    /**
     * èŽ·å–ç¼“å­˜-根据组织编码获取配置信息集合
     *
     * @param companyId
     * @return
     */
    public List<DepotConf> getCacheDepotConfList(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF) + "*";
        Collection<String> keys = redisCache.keys(patten);
        if (null == keys || keys.isEmpty()) {
            return null;
        }
        List<DepotConf> result = new ArrayList<>();
        for (String key : keys) {
            result.add((DepotConf) redisCache.getCacheObject(key));
        }
        return result;
    }
    /**
     * èŽ·å–ç¼“å­˜-根据组织编码和粮情分机ID获取配置信息集合
     *
     * @param companyId
     * @param serId
     * @return
     */
    public List<DepotConf> getCacheDepotConfList(String companyId, String serId) {
        List<DepotConf> list = getCacheDepotConfList(companyId);
        if (null == list || list.isEmpty()) {
            return null;
        }
        return list.stream()
                .filter(item -> null != item.getGrainSer() && item.getGrainSer().equals(serId))
                .collect(Collectors.toList());
    }
    /**
     * èŽ·å–ç¼“å­˜-根据组织编码和粮情分机ID获取配置信息
     *
     * @param companyId
     * @param serId
     * @return
     */
    public DepotConf getCacheDepotConfBySerId(String companyId, String serId) {
        List<DepotConf> data = getCacheDepotConfList(companyId);
        if (null == data) {
            return null;
        }
        return data.stream().filter(item -> (serId.equals(item.getGrainSer()) || serId.equals(item.getGasSer()) || serId.equals(item.getEsSer())))
                .findAny().orElse(null);
    }
    /**
     * èŽ·å–ç¼“å­˜-根据组织编码和仓库编码获取配置信息
     *
     * @param companyId
     * @param depotId
     * @return
     */
    public DepotConf getCacheDepotConfByDepotId(String companyId, String depotId) {
        if (StringUtils.isEmpty(depotId)) {
            return null;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotId);
        DepotConf depotConf = redisCache.getCacheObject(key);
        if (null == depotConf) {
            depotConf = depotConfRepository.getDepotConfByDepotId(companyId, depotId);
            redisCache.setCacheObject(key, depotConf);
        }
        return depotConf;
    }
    /**
     * æ ¹æ®ä»“库列表,自动生成仓库配置信息
     * @param companyId
     */
    private void addConfByDepot(String companyId) {
        List<Depot> list = depotService.getCacheDepotList(companyId);
        if (null == list || list.isEmpty()) {
            return;
        }
        DepotConf conf;
        for (Depot depot : list) {
            conf = new DepotConf();
            conf.setDepotId(depot.getId());
            conf.setCompanyId(depot.getCompanyId());
            conf.setDeptId(depot.getDeptId());
            this.saveConf(conf);
        }
    }
    /**
     * åˆ·æ–°ä»“库配置缓存
     * @param companyId
     */
    public void flushConfCache(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        List<DepotConf> list = depotConfRepository.getDepotConfByCompanyId(companyId);
        this.setCacheDepotConf(list, companyId);
    }
    /**
     * æ›´æ–°ç²®æƒ…保存频率
     * @param freq
     */
    public void updateFreq(String freq) {
        depotConfRepository.updateGrainFreq(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), freq);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotConfRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.DepotConf;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/25 14:59
 */
@Service
public interface DepotConfRepository extends JpaRepository<DepotConf, String> {
    /**
     * æ ¹æ®ç»„织编码获取仓库货位信息
     *
     * @param companyId
     * @return
     */
    @Query("from DepotConf where companyId =:companyId order by depotId")
    List<DepotConf> getDepotConfByCompanyId(@Param("companyId") String companyId);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取仓库货位信息
     *
     * @param companyId
     * @param deptId
     * @return
     */
    @Query("from DepotConf where companyId =:companyId and deptId =:deptId order by depotId")
    List<DepotConf> getDepotConf(@Param("companyId") String companyId, @Param("deptId") String deptId);
    /**
     * æ ¹æ®ç»„织编码和仓库编码获取仓库货位信息
     * @param companyId
     * @param depotId
     * @return
     */
    @Query("from DepotConf where companyId =:companyId and depotId =:depotId")
    DepotConf getDepotConfByDepotId(@Param("companyId") String companyId, @Param("depotId") String depotId);
    @Transactional
    @Modifying
    @Query("update DepotConf set grainFreq=:grainFreq where companyId=:companyId and deptId =:deptId")
    int updateGrainFreq(@Param("grainFreq") String grainFreq, @Param("companyId") String companyId, @Param("deptId") String deptId);
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Depot.view.xml
@@ -131,18 +131,8 @@
 */&#xD;
query = function(){&#xD;
    view.get(&quot;#dataSetdepot&quot;).flushAsync();&#xD;
}&#xD;
//打印货位卡&#xD;
printBill = function (htmlStr) {&#xD;
    var LODOP = CLODOP;&#xD;
    LODOP.PRINT_INIT(&quot;货位卡&quot;);&#xD;
    LODOP.SET_PRINT_PAGESIZE(1, 0, 0, &quot;A4&quot;);&#xD;
    //LODOP.SET_PRINT_PAGESIZE(1, 0, '90mm', &quot;A4&quot;);&#xD;
    LODOP.ADD_PRINT_HTM(0, 0, &quot;96%&quot;, &quot;100%&quot;, htmlStr);&#xD;
    LODOP.PREVIEW();&#xD;
};</ClientEvent>
}&#xD;</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property>
    <DataSet id="dataSetdepot">
      <Property name="dataProvider">depotPR#getData</Property>
      <Property name="dataType">[dtDepot]</Property>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotConf.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,509 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model/>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">var depotList = null;&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">depotConfPR#getConfList</Property>
      <Property name="dataType">[dtDepotConf]</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="height">55</Property>
      <Property name="contentOverflow">hidden</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;#depotId&quot;).set(&quot;readOnly&quot;,false);&#xD;
view.get(&quot;#dgMain&quot;).show();</ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="exClassName">btn1</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dgMain&quot;).show();&#xD;
    view.get(&quot;#depotId&quot;).set(&quot;readOnly&quot;,true);&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}</ClientEvent>
        <Property name="caption">修改</Property>
        <Property name="exClassName">btn2</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">&#xD;
&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel2&quot;).set(&quot;parameter&quot;,select).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
        }else{&#xD;
            entity.remove();&#xD;
        }&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-trash-o</Property>
      </Button>
      <Button layoutConstraint="left">
        <Property name="caption">刷新缓存</Property>
        <Property name="exClassName">btn-flush</Property>
        <Property name="iconClass">fa fa-refresh</Property>
        <Property name="action">ajaxRefreshCache</Property>
      </Button>
    </Container>
    <DataGrid id="dataGridMain" layoutConstraint="center ">
      <ClientEvent name="onDataRowDoubleClick">var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!cur) return ;&#xD;
view.get(&quot;#depotId&quot;).set(&quot;readOnly&quot;,true);&#xD;
view.get(&quot;#dgMain&quot;).show();</ClientEvent>
      <Property name="dataSet">dsMain</Property>
      <Property name="readOnly">true</Property>
      <Property name="selectionMode">singleRow</Property>
      <RowSelectorColumn/>
      <RowNumColumn/>
      <DataColumn name="depotId">
        <Property name="property">depotId</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="grainSer">
        <Property name="property">grainSer</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn>
        <Property name="property">cableRule</Property>
        <Property name="align">center</Property>
        <Property name="name">cableRule</Property>
      </DataColumn>
      <DataColumn name="cableCir">
        <Property name="property">cableCir</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="tempMax">
        <Property name="property">tempMax</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="grainFreq">
        <Property name="property">grainFreq</Property>
      </DataColumn>
      <DataColumn name="n2Max">
        <Property name="property">n2Max</Property>
      </DataColumn>
      <DataColumn name="co2Max">
        <Property name="property">co2Max</Property>
      </DataColumn>
      <DataColumn name="o2Max">
        <Property name="property">o2Max</Property>
      </DataColumn>
      <DataColumn name="ph3Max">
        <Property name="property">ph3Max</Property>
      </DataColumn>
    </DataGrid>
    <UpdateAction id="uaMain">
      <Property name="dataResolver">depotConfPR#saveConf</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxRefreshCache">
      <Property name="service">depotConfPR#flushConfCache</Property>
      <Property name="successMessage">刷新成功!</Property>
      <Property name="confirmMessage">确定要刷新缓存么?</Property>
    </AjaxAction>
    <Dialog id="dgMain" layout="regionPadding:10">
      <ClientEvent name="onShow">//根据仓库类型不同,显示不同的配置信息</ClientEvent>
      <Property name="caption">检测配置参数</Property>
      <Property name="width">75%</Property>
      <Property name="closeable">false</Property>
      <Property name="height">600</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#uaMain&quot;).execute(function(){&#xD;
    view.get(&quot;#dgMain&quot;).hide();&#xD;
});</ClientEvent>
          <Property name="iconClass">fa fa-check</Property>
          <Property name="caption">确认更新</Property>
          <Property name="exClassName">btn1</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
view.get(&quot;#dgMain&quot;).hide();</ClientEvent>
          <Property name="caption">取消更新</Property>
          <Property name="iconClass">fa fa-share-square-o</Property>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:5">
          <Property name="caption">粮温检测配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement id="depotId">
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cableRule</Property>
                <Property name="property">cableRule</Property>
                <Property name="label">布线规则</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:平方仓:层-行-列,筒仓:第1圈根数-第2圈根数-第n圈根数</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">grainSer</Property>
                <Property name="property">grainSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cableCir</Property>
                <Property name="property">cableCir</Property>
                <Property name="label">层规则</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:只针对筒仓:第1圈层数-第2圈层数-第n圈层数</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">cableStart</Property>
                <Property name="property">cableStart</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cableEnd</Property>
                <Property name="property">cableEnd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">startConvert</Property>
                <Property name="name">startConvert</Property>
                <Property name="editable">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">cableCone</Property>
                <Property name="name">cableCone</Property>
                <Property name="editable">false</Property>
                <Property name="trigger">autoMappingDropDown1</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">tempMax</Property>
                <Property name="property">tempMax</Property>
                <Property name="label">粮温上限</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">startOrientation</Property>
                <Property name="name">startOrientation</Property>
                <Property name="editable">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">startDirection</Property>
                <Property name="name">startDirection</Property>
                <Property name="editable">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="property">startPoint</Property>
                <Property name="name">startPoint</Property>
                <Property name="editable">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">thSer</Property>
                <Property name="property">thSer</Property>
                <Property name="trigger">autoMappingDropDown2</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">thConf</Property>
                <Property name="property">thConf</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">isOnlyTH</Property>
                <Property name="property">isOnlyTH</Property>
                <Editor/>
              </AutoFormElement>
              <Label>
                <Property name="text">说明:默认粮情电缆,为温湿度设备需选择!</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">grainFreq</Property>
                <Property name="property">grainFreq</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var grainFreq = view.get(&quot;#dsMain.data:#&quot;).get(&quot;grainFreq&quot;);&#xD;
&#xD;
if(grainFreq){&#xD;
    view.get(&quot;#ajaxUpdateFreq&quot;).set(&quot;parameter&quot;,grainFreq).execute(function(){&#xD;
        view.get(&quot;#dgMain&quot;).hide();&#xD;
        view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
    });&#xD;
}else{&#xD;
    $alert(&quot;请先配置更新频率!&quot;)&#xD;
}</ClientEvent>
                <Property name="caption">频率同步</Property>
                <Property name="tip">更新所有仓库频率一致</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn2</Property>
              </Button>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">气体检测配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">gasSer</Property>
                <Property name="property">gasSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">gasStart</Property>
                <Property name="property">gasStart</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">gasEnd</Property>
                <Property name="property">gasEnd</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.GasModbus.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframModbus&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogModbus&quot;).show();</ClientEvent>
                <Property name="caption">Modbus配置</Property>
                <Property name="tip">针对Modbus协议的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn4</Property>
              </Button>
              <AutoFormElement>
                <Property name="name">gasSerTag</Property>
                <Property name="property">gasSerTag</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.GasSerConf.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframGasSerConf&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogGasSerConf&quot;).show();</ClientEvent>
                <Property name="caption">多气体分机配置</Property>
                <Property name="tip">针对多气体分机的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn2</Property>
              </Button>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:多气体分机时,所有分机需要全部配置。气体检测配置通道默认全部通道!</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">n2Max</Property>
                <Property name="property">n2Max</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">co2Max</Property>
                <Property name="property">co2Max</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">o2Max</Property>
                <Property name="property">o2Max</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">ph3Max</Property>
                <Property name="property">ph3Max</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">虫害检测配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">pestSer</Property>
                <Property name="property">pestSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">pestStart</Property>
                <Property name="property">pestStart</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">pestEnd</Property>
                <Property name="property">pestEnd</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.modbus.PestModbus.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframModbus&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogModbus&quot;).show();</ClientEvent>
                <Property name="caption">Modbus配置</Property>
                <Property name="tip">针对Modbus协议的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn4</Property>
              </Button>
              <AutoFormElement>
                <Property name="name">pestSerTag</Property>
                <Property name="property">pestSerTag</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.GasSerConf.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframGasSerConf&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogGasSerConf&quot;).show();</ClientEvent>
                <Property name="caption">多虫害分机配置</Property>
                <Property name="tip">针对多虫害分机的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn2</Property>
              </Button>
              <Label layoutConstraint="colSpan:2">
                <Property name="text">说明:多虫害分机时,所有分机需要全部配置。虫害检测配置通道默认全部通道!</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">pestMax</Property>
                <Property name="property">pestMax</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">其他配置</Property>
          <Buttons/>
          <Children>
            <AutoForm layoutConstraint="padding:5">
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*,*</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">esSer</Property>
                <Property name="property">esSer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">esSerTag</Property>
                <Property name="property">esSerTag</Property>
                <Editor/>
              </AutoFormElement>
              <Button>
                <ClientEvent name="onClick">var depotId = view.get(&quot;#dsMain.data:#&quot;).get(&quot;depotId&quot;);&#xD;
var path = &quot;com.fzzy.igds.sys.GasSerConf.d?depotId=&quot;+depotId;&#xD;
view.get(&quot;#iframGasSerConf&quot;).set(&quot;path&quot;,path);&#xD;
view.get(&quot;#dialogGasSerConf&quot;).show();</ClientEvent>
                <Property name="caption">多能耗分机配置</Property>
                <Property name="tip">针对多能耗分机的配置</Property>
                <Property name="iconClass">fa fa-refresh</Property>
                <Property name="exClassName">btn2</Property>
              </Button>
              <Label layoutConstraint="colSpan:1">
                <Property name="text">说明:多能耗分机时,所有分机需要全部配置。</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
              </Label>
              <AutoFormElement layoutConstraint="colSpan:3">
                <Property name="name">verbSer</Property>
                <Property name="property">verbSer</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxUpdateFreq">
      <Property name="confirmMessage">确定要更新所有仓库?</Property>
      <Property name="service">depotConfPR#updateFreq</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDel2">
      <Property name="successMessage">删除成功</Property>
      <Property name="service">depotConfPR#delDepotConf</Property>
      <Property name="executingMessage">正在删除</Property>
      <Property name="confirmMessage">确定要删除么?</Property>
    </AjaxAction>
    <Dialog id="dialogModbus">
      <Property name="width">80%</Property>
      <Property name="height">95%</Property>
      <Property name="caption">Modbus-TCP配置</Property>
      <Buttons/>
      <Children>
        <IFrame id="iframModbus">
          <Property name="path">com.fzzy.igds.sys.GasModbus.d</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="dialogGasSerConf">
      <Property name="width">80%</Property>
      <Property name="height">95%</Property>
      <Property name="caption">气体多分机配置</Property>
      <Buttons/>
      <Children>
        <IFrame id="iframGasSerConf">
          <Property name="path">com.fzzy.igds.sys.GasSerConf.d</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotStatusConfirm.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,460 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.DepotStatusConfirm</Property>
      <PropertyDef name="fcqrdh">
        <Property></Property>
        <Property name="label">封仓确认单号</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
        <Property name="readOnly">true</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">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
        <Property name="readOnly">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="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="fcrq">
        <Property name="dataType">Date</Property>
        <Property name="label">封仓日期</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodType">
        <Property></Property>
        <Property name="label">粮食性质</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLevel">
        <Property></Property>
        <Property name="label">粮食等级</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerFoodLevel&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocation">
        <Property></Property>
        <Property name="label">产地名称</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodYear">
        <Property></Property>
        <Property name="label">收货年度</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="country">
        <Property></Property>
        <Property name="label">国别</Property>
        <Property name="readOnly">true</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;GB_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="storeKeeperName">
        <Property></Property>
        <Property name="label">保管员</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="fcsl">
        <Property name="dataType">Double</Property>
        <Property name="label">封仓数量</Property>
        <Property name="readOnly">true</Property>
        <Property name="displayFormat">#,##0 KG</Property>
      </PropertyDef>
      <PropertyDef name="applyUser">
        <Property></Property>
        <Property name="label">申请人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="deptAuditUser">
        <Property></Property>
        <Property name="label">部门审核人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="leaderAuditUser">
        <Property></Property>
        <Property name="label">领导审核人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="remarks">
        <Property></Property>
        <Property name="label">备注信息</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">Date</Property>
        <Property name="label">数据更新时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQuery">
      <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>
      </PropertyDef>
      <PropertyDef name="start">
        <Property></Property>
        <Property name="label">开始日期</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="end">
        <Property></Property>
        <Property name="label">结束日期</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">view.get(&quot;#dsQuery&quot;).insert();&#xD;
&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider"> depotStatusConfirmPR#pageDepotStatusConfirm</Property>
      <Property name="pageSize">20</Property>
      <Property name="loadMode">lazy</Property>
      <Property name="dataType">[dtMain]</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</Property>
    </DataSet>
    <AutoForm>
      <Property name="cols">*,*,*,*,*</Property>
      <Property name="exClassName">bg-color</Property>
      <Property name="dataSet">dsQuery</Property>
      <AutoFormElement>
        <Property name="name">depotId</Property>
        <Property name="property">depotId</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">start</Property>
        <Property name="property">start</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">end</Property>
        <Property name="property">end</Property>
        <Editor/>
      </AutoFormElement>
      <Container layout="hbox regionPadding:10" layoutConstraint="colSpan:2">
        <Button>
          <ClientEvent name="onClick">var param = view.get(&quot;#dsQuery.data&quot;);&#xD;
view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param.toJSON()).flushAsync();   </ClientEvent>
          <Property name="caption">查询</Property>
          <Property name="iconClass">fa fa-search</Property>
          <Property name="exClassName">btn1</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">查看详情</Property>
          <Property name="iconClass">fa fa-pencil</Property>
          <Property name="exClassName">btn2</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}&#xD;
</ClientEvent>
          <Property name="action">actionDeviceDelete</Property>
          <Property name="iconClass">fa fa-minus</Property>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Container>
    </AutoForm>
    <DataGrid id="dgMain" layoutConstraint="center ">
      <ClientEvent name="onDataRowDoubleClick">view.get(&quot;#actionDeviceUpdate&quot;).execute();</ClientEvent>
      <Property name="dataSet">dsMain</Property>
      <Property name="readOnly">true</Property>
      <Property name="selectionMode">singleRow</Property>
      <RowSelectorColumn/>
      <RowNumColumn/>
      <DataColumn name="fcqrdh">
        <Property name="property">fcqrdh</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="depotId">
        <Property name="property">depotId</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="fcrq">
        <Property name="property">fcrq</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="foodVariety">
        <Property name="property">foodVariety</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="foodType">
        <Property name="property">foodType</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="foodLevel">
        <Property name="property">foodLevel</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="foodLocation">
        <Property name="property">foodLocation</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="foodYear">
        <Property name="property">foodYear</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="storeKeeperName">
        <Property name="property">storeKeeperName</Property>
        <Property name="align">center</Property>
      </DataColumn>
      <DataColumn name="fcsl">
        <Property name="property">fcsl</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 layoutConstraint="right">
        <Property name="dataSet">dsMain</Property>
        <Property name="itemCodes">pageSize,pages</Property>
      </DataPilot>
    </ToolBar>
    <Dialog id="dialogMain">
      <ClientEvent name="onHide">view.id(&quot;dsMain&quot;).getData().cancel();</ClientEvent>
      <Property name="caption">编辑页面</Property>
      <Property name="width">800</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dialogMain&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="action">actionCancel</Property>
          <Property name="width">90</Property>
          <Property name="iconClass">fa fa-times-circle-o</Property>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Buttons>
      <Children>
        <AutoForm>
          <Property name="dataSet">dsMain</Property>
          <Property name="cols">*,*</Property>
          <Property name="labelWidth">100</Property>
          <AutoFormElement>
            <Property name="name">fcqrdh</Property>
            <Property name="property">fcqrdh</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">companyId</Property>
            <Property name="property">companyId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">deptId</Property>
            <Property name="property">deptId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">depotId</Property>
            <Property name="property">depotId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">fcrq</Property>
            <Property name="property">fcrq</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodVariety</Property>
            <Property name="property">foodVariety</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodType</Property>
            <Property name="property">foodType</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodLevel</Property>
            <Property name="property">foodLevel</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodLocation</Property>
            <Property name="property">foodLocation</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodYear</Property>
            <Property name="property">foodYear</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">country</Property>
            <Property name="property">country</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">storeKeeperName</Property>
            <Property name="property">storeKeeperName</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">fcsl</Property>
            <Property name="property">fcsl</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">applyUser</Property>
            <Property name="property">applyUser</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">deptAuditUser</Property>
            <Property name="property">deptAuditUser</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">leaderAuditUser</Property>
            <Property name="property">leaderAuditUser</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">remarks</Property>
            <Property name="property">remarks</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">updateTime</Property>
            <Property name="property">updateTime</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxDel">
      <Property name="service">depotStatusConfirmPR#delData</Property>
      <Property name="confirmMessage">确定要删除吗?</Property>
    </AjaxAction>
    <CustomDropDown id="ddFoodOrigin">
      <Property name="minHeight">500</Property>
      <Property name="assignmentMap">foodLocation=name</Property>
      <Property name="minWidth">500</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsFoodOrigin">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">30</Property>
          <Property name="dataType">[dtArea]</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -- ç¼–码或者名称 --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
                  view.get(&quot;#dsFoodOrigin&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
                  if(data){&#xD;
                  view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
                  }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
                if(data){&#xD;
                view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
                }</ClientEvent>
          <Property name="dataSet">dsFoodOrigin</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsFoodOrigin</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DepotStore.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,476 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain" parent="dtDepotStore"/>
    <DataType name="dtQuery">
      <PropertyDef name="start">
        <Property name="dataType">Date</Property>
        <Property name="label">开始时间</Property>
      </PropertyDef>
      <PropertyDef name="end">
        <Property name="dataType">Date</Property>
        <Property name="label">结束时间</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>
      </PropertyDef>
      <PropertyDef name="depotStatus">
        <Property name="label">仓房状态</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerDepotStatus&quot;).getResult()}</Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">//默认查询查询提条件&#xD;
view.get(&quot;#dsQuery&quot;).insert({});</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="pageSize">20</Property>
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">depotStorePR#pageList</Property>
      <Property name="loadMode">lazy</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</Property>
    </DataSet>
    <AutoForm>
      <Property name="cols">*,*,*,*,*</Property>
      <Property name="dataSet">dsQuery</Property>
      <Property name="exClassName">bg-color</Property>
      <Property name="labelAlign">right</Property>
      <AutoFormElement>
        <Property name="name">depotId</Property>
        <Property name="property">depotId</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">start</Property>
        <Property name="property">start</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">end</Property>
        <Property name="property">end</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">depotStatus</Property>
        <Property name="property">depotStatus</Property>
        <Editor/>
      </AutoFormElement>
      <Container layout="regionPadding:15">
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">//查询&#xD;
var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data).flushAsync();&#xD;
</ClientEvent>
          <Property name="caption">查询</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-search</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">view.get(&quot;#dsQuery&quot;).setData({});</ClientEvent>
          <Property name="caption">重置</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </Button>
      </Container>
    </AutoForm>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="height">55</Property>
      <Property name="contentOverflow">hidden</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="caption">新增</Property>
        <Property name="exClassName">btn1</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}</ClientEvent>
        <Property name="caption">修改</Property>
        <Property name="exClassName">btn2</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(){&#xD;
            select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}&#xD;
&#xD;
</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-trash-o</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:1" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dataGridMain">
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn>
          <Property name="property">depotId</Property>
          <Property name="align">center</Property>
          <Property name="name">depotId</Property>
        </DataColumn>
        <DataColumn name="depotStatus">
          <Property name="property">depotStatus</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodType">
          <Property name="property">foodType</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodLevel">
          <Property name="property">foodLevel</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodLocation">
          <Property name="property">foodLocation</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodYear">
          <Property name="property">foodYear</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="storageReal">
          <Property name="property">storageReal</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="storageSettle">
          <Property name="property">storageSettle</Property>
        </DataColumn>
        <DataColumn name="updateDate">
          <Property name="property">updateDate</Property>
          <Property name="align">center</Property>
        </DataColumn>
      </DataGrid>
      <ToolBar layoutConstraint="bottom">
        <Fill/>
        <DataPilot layoutConstraint="right">
          <Property name="itemCodes">pageSize,pages</Property>
          <Property name="dataSet">dsMain</Property>
        </DataPilot>
      </ToolBar>
    </Container>
    <Dialog id="dialogMain">
      <Property name="caption">库存信息</Property>
      <Property name="width">800</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">btn1</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">btn3</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">120</Property>
          <Property name="height">85%</Property>
          <AutoFormElement>
            <Property name="name">depotId</Property>
            <Property name="property">depotId</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">depotStatus</Property>
            <Property name="property">depotStatus</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">storeType</Property>
            <Property name="property">storeType</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodType</Property>
            <Property name="property">foodType</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodVariety</Property>
            <Property name="property">foodVariety</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodLevel</Property>
            <Property name="property">foodLevel</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lqgsdwdm</Property>
            <Property name="property">lqgsdwdm</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">manageType</Property>
            <Property name="property">manageType</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">foodYear</Property>
            <Property name="property">foodYear</Property>
            <Property name="trigger">yearDropDown1</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=封仓/入库中/出库中,必填</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">country</Property>
            <Property name="property">country</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=封仓/入库中/出库中,必填</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">foodLocation</Property>
            <Property name="property">foodLocation</Property>
            <Property name="trigger">ddFoodOrigin</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=封仓/入库中/出库中,必填</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">storageReal</Property>
            <Property name="property">storageReal</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">必填,空仓=0,入库/出库数量之和</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">storageSettle</Property>
            <Property name="property">storageSettle</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">必填,空仓=0,入库/出库结算数量之和</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">fullDate</Property>
            <Property name="property">fullDate</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=封仓/出库中,必填</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">storeDate</Property>
            <Property name="property">storeDate</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=封仓/入库中/出库中,必填。第一车入仓时间</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">outDate</Property>
            <Property name="property">outDate</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=空仓,必填。最后一车粮食出仓时间</Property>
            <Property name="style">
              <Property name="color">red</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">grainHeight</Property>
            <Property name="property">grainHeight</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=封仓,可填</Property>
            <Property name="style">
              <Property name="color">blue</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement>
            <Property name="name">grainVolume</Property>
            <Property name="property">grainVolume</Property>
            <Editor/>
          </AutoFormElement>
          <Label>
            <Property name="text">货位状态=封仓,可填</Property>
            <Property name="style">
              <Property name="color">blue</Property>
              <Property name="font-size">12px</Property>
            </Property>
          </Label>
          <AutoFormElement layoutConstraint="colSpan:2">
            <Property name="name">remark</Property>
            <Property name="property">remark</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaAction">
      <Property name="successMessage">执行成功!</Property>
      <Property name="executingMessage">正在执行中..</Property>
      <Property name="dataResolver">depotStorePR#saveDepotStore</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDel">
      <Property name="confirmMessage">确定要删除吗?</Property>
      <Property name="service">depotStorePR#delDepotStore</Property>
    </AjaxAction>
    <YearDropDown id="yearDropDown1"/>
    <CustomDropDown id="ddFoodOrigin">
      <Property name="minHeight">500</Property>
      <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property>
      <Property name="minWidth">500</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsFoodOrigin">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="dataType">[dtArea]</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">30</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -- åç§° --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
                  view.get(&quot;#dsFoodOrigin&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
                  if(data){&#xD;
                  view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
                  }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
                if(data){&#xD;
                view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
                }</ClientEvent>
          <Property name="dataSet">dsFoodOrigin</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsFoodOrigin</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DeviceModbus.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,313 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.DeviceModbus</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">ID</Property>
      </PropertyDef>
      <PropertyDef name="deviceCode">
        <Property></Property>
        <Property name="label">设备编码</Property>
      </PropertyDef>
      <PropertyDef name="open">
        <Property></Property>
        <Property name="label">开地址</Property>
      </PropertyDef>
      <PropertyDef name="openFun">
        <Property></Property>
        <Property name="label">功能号</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceModbusPR#triggerFun&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="close">
        <Property></Property>
        <Property name="label">关地址</Property>
      </PropertyDef>
      <PropertyDef name="closeFun">
        <Property></Property>
        <Property name="label">功能号</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceModbusPR#triggerFun&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="stop">
        <Property></Property>
        <Property name="label">停地址</Property>
      </PropertyDef>
      <PropertyDef name="stopFun">
        <Property></Property>
        <Property name="label">功能号</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceModbusPR#triggerFun&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="openEnd">
        <Property></Property>
        <Property name="label">停地址</Property>
      </PropertyDef>
      <PropertyDef name="openEndFun">
        <Property></Property>
        <Property name="label">功能号</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceModbusPR#triggerFun&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="closeEnd">
        <Property></Property>
        <Property name="label">关到位地址</Property>
      </PropertyDef>
      <PropertyDef name="closeEndFun">
        <Property></Property>
        <Property name="label">功能号</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceModbusPR#triggerFun&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="openError">
        <Property></Property>
        <Property name="label">开故障地址</Property>
      </PropertyDef>
      <PropertyDef name="openErrorFun">
        <Property></Property>
        <Property name="label">功能号</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceModbusPR#triggerFun&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="closeError">
        <Property></Property>
        <Property name="label">关故障地址</Property>
      </PropertyDef>
      <PropertyDef name="closeErrorFun">
        <Property></Property>
        <Property name="label">功能号</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceModbusPR#triggerFun&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="bizType">
        <Property></Property>
        <Property name="label">业务类型</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerBizType&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="serId">
        <Property></Property>
        <Property name="label">所属分机</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deviceSerPR#getAllSerCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="loadMode">lazy</Property>
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">deviceModbusPR#listAll</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="contentOverflow">hidden</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({});</ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="exClassName">btn1</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button>
        <ClientEvent name="onClick"> view.get(&quot;#uaAction&quot;).execute();   </ClientEvent>
        <Property name="caption">保存</Property>
        <Property name="iconClass">fa fa-check</Property>
        <Property name="exClassName">btn2</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!data){&#xD;
    return;&#xD;
}&#xD;
view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
        return;&#xD;
    }else{&#xD;
        data.remove();&#xD;
    }&#xD;
});           </ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-minus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).flushAsync(); </ClientEvent>
        <Property name="caption">刷新</Property>
        <Property name="exClassName">btn4</Property>
        <Property name="iconClass">fa fa-refresh</Property>
      </Button>
      <Button layoutConstraint="left">
        <Property name="caption">刷新缓存</Property>
        <Property name="exClassName">btn1</Property>
        <Property name="iconClass">fa fa-refresh</Property>
        <Property name="action">ajaxFlushCache</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid layoutConstraint="center padding:5px">
        <Property name="dataSet">dsMain</Property>
        <RowNumColumn/>
        <DataColumn name="deviceCode">
          <Property name="property">deviceCode</Property>
        </DataColumn>
        <DataColumn name="serId">
          <Property name="property">serId</Property>
        </DataColumn>
        <DataColumn name="bizType">
          <Property name="property">bizType</Property>
        </DataColumn>
        <ColumnGroup>
          <Property name="caption">开操作</Property>
          <DataColumn name="open">
            <Property name="property">open</Property>
            <Property name="caption">地址</Property>
            <Property name="width">80</Property>
          </DataColumn>
          <DataColumn name="openFun">
            <Property name="property">openFun</Property>
            <Property name="caption">功能</Property>
            <Property name="width">100</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
          </DataColumn>
        </ColumnGroup>
        <ColumnGroup>
          <Property name="caption">关操作</Property>
          <DataColumn name="close">
            <Property name="property">close</Property>
            <Property name="caption">地址</Property>
            <Property name="width">80</Property>
          </DataColumn>
          <DataColumn name="closeFun">
            <Property name="property">closeFun</Property>
            <Property name="caption">功能</Property>
            <Property name="width">100</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
          </DataColumn>
        </ColumnGroup>
        <ColumnGroup>
          <Property name="caption">停操作</Property>
          <DataColumn name="stop">
            <Property name="property">stop</Property>
            <Property name="caption">地址</Property>
            <Property name="width">80</Property>
          </DataColumn>
          <DataColumn name="stopFun">
            <Property name="property">stopFun</Property>
            <Property name="caption">功能</Property>
            <Property name="width">100</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
          </DataColumn>
        </ColumnGroup>
        <ColumnGroup>
          <Property name="caption">开到位</Property>
          <DataColumn name="openEnd">
            <Property name="property">openEnd</Property>
            <Property name="caption">地址</Property>
            <Property name="width">80</Property>
          </DataColumn>
          <DataColumn name="openEndFun">
            <Property name="property">openEndFun</Property>
            <Property name="caption">功能</Property>
            <Property name="width">100</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
          </DataColumn>
        </ColumnGroup>
        <ColumnGroup>
          <Property name="caption">关到位</Property>
          <DataColumn name="closeEnd">
            <Property name="property">closeEnd</Property>
            <Property name="caption">地址</Property>
            <Property name="width">80</Property>
          </DataColumn>
          <DataColumn name="closeEndFun">
            <Property name="property">closeEndFun</Property>
            <Property name="caption">功能</Property>
            <Property name="width">100</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
          </DataColumn>
        </ColumnGroup>
        <ColumnGroup>
          <Property name="caption">开故障</Property>
          <DataColumn name="openError">
            <Property name="property">openError</Property>
            <Property name="caption">地址</Property>
            <Property name="width">80</Property>
          </DataColumn>
          <DataColumn name="openErrorFun">
            <Property name="property">openErrorFun</Property>
            <Property name="caption">功能</Property>
            <Property name="width">100</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
          </DataColumn>
        </ColumnGroup>
        <ColumnGroup>
          <Property name="caption">关故障</Property>
          <DataColumn name="closeError">
            <Property name="property">closeError</Property>
            <Property name="caption">地址</Property>
            <Property name="width">80</Property>
          </DataColumn>
          <DataColumn name="closeErrorFun">
            <Property name="property">closeErrorFun</Property>
            <Property name="caption">功能</Property>
            <Property name="width">100</Property>
            <Property name="trigger">autoMappingDropDown1</Property>
          </DataColumn>
        </ColumnGroup>
      </DataGrid>
    </Container>
    <UpdateAction id="uaAction">
      <Property name="dataResolver">deviceModbusPR#updateData</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">!DIRTY_TREE</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDel">
      <Property name="service">deviceModbusPR#delData</Property>
      <Property name="confirmMessage">确定要删除么?</Property>
    </AjaxAction>
    <AjaxAction id="ajaxFlushCache">
      <Property name="service">deviceModbusPR#flushCache</Property>
      <Property name="successMessage">缓存更新成功</Property>
    </AjaxAction>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotConfPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.dzhwk.domain.DepotConf;
import com.fzzy.igds.sys.DepotConfService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author jiazx
 */
@Slf4j
@Component
public class DepotConfPR {
    @Resource
    private DepotConfService depotConfService;
    /**
     * å‚数配置列表 depotConfPR#getConfList
     *
     * @return
     */
    @DataProvider
    public List<DepotConf> getConfList() {
        return depotConfService.getConfList(null,null);
    }
    /**
     * depotConfPR#saveConf å‚数配置更新,包括新增和修改
     *
     * @param conf
     */
    @DataResolver
    public void saveConf(DepotConf conf) {
        DepotConf depotConf = new DepotConf();
        BeanUtils.copyProperties(conf, depotConf);
        depotConfService.saveConf(depotConf);
    }
    /**
     * depotConfPR#delDepotConf åˆ é™¤å‚数配置
     *
     * @param conf
     */
    @Expose
    public void delDepotConf(DepotConf conf) {
        DepotConf depotConf = new DepotConf();
        BeanUtils.copyProperties(conf, depotConf);
        depotConfService.deleteDepotConf(depotConf);
    }
    /**
     * depotConfPR#flushConfCache åˆ·æ–°é…ç½®ç¼“å­˜
     */
    @Expose
    public void flushConfCache() {
        depotConfService.flushConfCache(null);
    }
    /**
     * depotConfPR#updateFreq æ›´æ–°æ‰€æœ‰ç²®åº“的粮情频率
     */
    @Expose
    public void updateFreq(String freq) {
        depotConfService.updateFreq(freq);
    }
}
igds-dzhwk-view/src/main/java/models/igds.model.xml
@@ -413,4 +413,281 @@
      <Property name="required">false</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtDepotConf">
    <Property name="creationType">com.fzzy.igds.dzhwk.domain.DepotConf</Property>
    <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>
    </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">deptId</Property>
        <Property name="valueProperty">deptName</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="companyId">
      <Property></Property>
      <Property name="label">组织编码</Property>
    </PropertyDef>
    <PropertyDef name="grainSer">
      <Property></Property>
      <Property name="label">粮情分机</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;deviceSerPR#getAllSerCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="grainFreq">
      <Property></Property>
      <Property name="label">保存频率</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;GRAIN_FREQ&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="thConf">
      <Property></Property>
      <Property name="label">温湿度通道</Property>
    </PropertyDef>
    <PropertyDef name="cableStart">
      <Property name="dataType">int</Property>
      <Property name="label">电缆开始列</Property>
    </PropertyDef>
    <PropertyDef name="cableEnd">
      <Property name="dataType">int</Property>
      <Property name="label">电缆截至列</Property>
    </PropertyDef>
    <PropertyDef name="tempMax">
      <Property name="dataType">Double</Property>
      <Property name="label">温度上限</Property>
    </PropertyDef>
    <PropertyDef name="gasStart">
      <Property name="dataType">int</Property>
      <Property name="label">采集开始点</Property>
    </PropertyDef>
    <PropertyDef name="gasEnd">
      <Property name="dataType">int</Property>
      <Property name="label">采截至集点</Property>
    </PropertyDef>
    <PropertyDef name="n2Max">
      <Property name="dataType">Double</Property>
      <Property name="label">氮气上限</Property>
    </PropertyDef>
    <PropertyDef name="co2Max">
      <Property name="dataType">Double</Property>
      <Property name="label">二氧化碳上限</Property>
    </PropertyDef>
    <PropertyDef name="o2Max">
      <Property name="dataType">Double</Property>
      <Property name="label">氧气上限</Property>
    </PropertyDef>
    <PropertyDef name="ph3Max">
      <Property name="dataType">Double</Property>
      <Property name="label">磷化氢上限</Property>
    </PropertyDef>
    <PropertyDef name="pestStart">
      <Property name="dataType">int</Property>
      <Property name="label">采集开始点</Property>
    </PropertyDef>
    <PropertyDef name="pestEnd">
      <Property name="dataType">int</Property>
      <Property name="label">采集截至点</Property>
    </PropertyDef>
    <PropertyDef name="pestMax">
      <Property name="dataType">Double</Property>
      <Property name="label">虫害上限</Property>
    </PropertyDef>
    <PropertyDef name="thSer">
      <Property></Property>
      <Property name="label">温湿度分机</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;deviceSerPR#getAllSerCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="cableRule">
      <Property></Property>
      <Property name="label">布线规则</Property>
    </PropertyDef>
    <PropertyDef name="cableCir">
      <Property></Property>
      <Property name="label">筒仓层规则</Property>
    </PropertyDef>
    <PropertyDef name="esSer">
      <Property></Property>
      <Property name="label">能耗分机</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;deviceSerPR#getAllSerCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="esSerTag">
      <Property></Property>
      <Property name="label">是否多分机</Property>
      <Property name="mapping">
        <Property name="mapValues">
          <Collection>
            <Entity>
              <Property name="code">Y</Property>
              <Property name="name">是</Property>
            </Entity>
            <Entity>
              <Property name="code">N</Property>
              <Property name="name">否</Property>
            </Entity>
          </Collection>
        </Property>
        <Property name="keyProperty">code</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="startOrientation">
      <Property></Property>
      <Property name="label">电缆起始方位</Property>
      <Property name="mapping">
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerStartOrientation&quot;).getResult()}</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="startDirection">
      <Property name="label">电缆布线方向</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerStartDirection&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="startPoint">
      <Property name="label">电缆起始点位</Property>
      <Property name="mapping">
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerStartPoint&quot;).getResult()}</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="startConvert">
      <Property name="label">层行转换</Property>
      <Property name="mapping">
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerStartConvert&quot;).getResult()}</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="depotName">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="depotType">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="cableCone">
      <Property name="label">筒仓锥形</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerCableCone&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="isOnlyTH">
      <Property></Property>
      <Property name="label">粮情类型</Property>
      <Property name="mapping">
        <Property name="mapValues">
          <Collection>
            <Entity>
              <Property name="code">Y</Property>
              <Property name="name">温湿度设备</Property>
            </Entity>
            <Entity>
              <Property name="code">N</Property>
              <Property name="name">粮情电缆</Property>
            </Entity>
          </Collection>
        </Property>
        <Property name="keyProperty">code</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="gasSer">
      <Property></Property>
      <Property name="label">气体分机</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;deviceSerPR#getAllSerCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="gasSerTag">
      <Property></Property>
      <Property name="label">是否多分机</Property>
      <Property name="mapping">
        <Property name="mapValues">
          <Collection>
            <Entity>
              <Property name="code">Y</Property>
              <Property name="name">是</Property>
            </Entity>
            <Entity>
              <Property name="code">N</Property>
              <Property name="name">否</Property>
            </Entity>
          </Collection>
        </Property>
        <Property name="keyProperty">code</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="pestSer">
      <Property></Property>
      <Property name="label">虫害分机</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;deviceSerPR#getAllSerCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="pestSerTag">
      <Property></Property>
      <Property name="label">是否多分机</Property>
      <Property name="mapping">
        <Property name="mapValues">
          <Collection>
            <Entity>
              <Property name="code">Y</Property>
              <Property name="name">是</Property>
            </Entity>
            <Entity>
              <Property name="code">N</Property>
              <Property name="name">否</Property>
            </Entity>
          </Collection>
        </Property>
        <Property name="keyProperty">code</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="verbSer">
      <Property></Property>
      <Property name="label">通风分机</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;deviceSerPR#getAllSerCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
  </DataType>
</Model>
igds-dzhwk-web/src/main/resources/static/ruoyi/js/common.js
@@ -255,9 +255,14 @@
}
/** åˆ›å»ºé€‰é¡¹å¡ */
function createMenuItem(dataUrl, menuName, isRefresh) {
    var panelUrl = window.frameElement.getAttribute('data-id'),
    dataIndex = $.common.random(1, 100),
function createMenuItem(dataUrl, menuName, isRefresh, panelId) {
    var panelUrl = null;
    if(panelId){
        panelUrl = panelId;
    }else {
        panelUrl = window.frameElement.getAttribute('data-id');
    }
    var dataIndex = $.common.random(1, 100),
    flag = true;
    if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
    var topWindow = $(window.parent.document);
igds-dzhwk-web/src/main/resources/static/ruoyi/js/ry-ui.js
@@ -393,6 +393,22 @@
                    });
                });
            },
            // Dorado页面导出数据:url-跳转路径,name-数据名称,param-查询参数
            exportExcelDorado: function(url, name, param) {
                $.modal.confirm("确定导出当前页面" + name + "吗?", function() {
                    $.modal.loading("正在导出数据,请稍候...");
                    $.post(url, param, function(result) {
                        if (result.code == web_status.SUCCESS) {
                            window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
                        } else if (result.code == web_status.WARNING) {
                            $.modal.alertWarning(result.msg)
                        } else {
                            $.modal.alertError(result.msg);
                        }
                        $.modal.closeLoading();
                    });
                });
            },
            // ä¸‹è½½æ¨¡æ¿
            importTemplate: function() {
                $.get(activeWindow().table.options.importTemplateUrl, function(result) {
@@ -980,8 +996,8 @@
                top.layer.full(index);
            },
            // é€‰å¡é¡µæ–¹å¼æ‰“å¼€
            openTab: function (title, url, isRefresh) {
                createMenuItem(url, title, isRefresh);
            openTab: function (title, url, isRefresh, panelId) {
                createMenuItem(url, title, isRefresh, panelId);
            },
            // é€‰å¡é¡µåŒä¸€é¡µç­¾æ‰“å¼€
            parentTab: function (title, url) {
@@ -1735,11 +1751,11 @@
            },
            // èŽ·å–obj对象长度
            getLength: function(obj) {
                var count = 0;  
                var count = 0;
                for (var i in obj) {
                    if (obj.hasOwnProperty(i)) {
                        count++;
                    }  
                    }
                }
                return count;
            },