czt
2025-06-11 283da741b2429cf5a53786e5ee1b5528b757fdf6
首页及电子货位卡页面
已重命名7个文件
已添加11个文件
已修改11个文件
1308 ■■■■ 文件已修改
igds-dzhwk-core/src/main/java/com/fzzy/igds/data/BaseParam.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/HwkDepotDto.java 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/dto/GasData.java 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/dto/GasParam.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/mapper/GasServiceMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/repository/GasRepository.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/service/GasService.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainData.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainIotData.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainLay.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainParam.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainPoint.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainRow.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/mapper/GrainServiceMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/repository/GrainRepository.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/service/GrainService.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/GranaryService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/GranaryRepository.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/resources/mapper/GasServiceMapper.xml 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/resources/mapper/GrainServiceMapper.xml 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2001.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2002.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/pom.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/manager/WebManager.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/java/com/fzzy/igds/init/SystemRunner.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/dzhwk/dzhwk.js 435 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/templates/dzhwk/dzhwk.html 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/templates/dzhwk/index.html 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/data/BaseParam.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
package com.fzzy.igds.data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
 * @author: andy.jia
 * @description:
 * @date:2019.03.21
 **/
@Data
public class BaseParam {
    private int limit = 10;// LAYUI ä¸“用,每页显示的条数。laypage将会借助 count å’Œ limit è®¡ç®—出分页数
    private int curr = 1;// LAYUI ä¸“用 èµ·å§‹é¡µã€‚一般用于刷新类型的跳页以及HASH跳页
    private int page = 1;// ç›®æ ‡é¡µé¢
    public int getPage() {
        return page;
    }
    public void setPage(int page) {
        this.page = page;
    }
    private String companyId;// ç»„织编码
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date start;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date end;
    private String depotId;// ä»“库编码
    private String deptId;// åº“区编码
    private String key;//关键字
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/HwkDepotDto.java
@@ -16,37 +16,66 @@
public class HwkDepotDto implements Serializable {
    @PropertyDef(label = "廒间名")
    private String granary;
    private String granaryName;
    @PropertyDef(label = "货位名")
    private String depot;
    private String name;
    @PropertyDef(label = "仓温")
    private Double inTemp;
    private String inTemp = "--";
    @PropertyDef(label = "仓湿")
    private Double inHumidity;
    private String inHumidity = "--";
    @PropertyDef(label = "仓外温")
    private String outTemp = "--";
    @PropertyDef(label = "仓外湿")
    private String outHumidity = "--";
    @PropertyDef(label = "高温")
    private String maxTemp = "--";
    @PropertyDef(label = "低温")
    private String minTemp = "--";
    @PropertyDef(label = "均温")
    private String aveTemp = "--";
    @PropertyDef(label = "粮温检测时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date grainDate;
    @PropertyDef(label = "氧气")
    private String perO2;
    private String perO2 = "--";
    @PropertyDef(label = "磷化氢")
    private String perPh3;
    private String perPh3 = "--";
    @PropertyDef(label = "二氧化碳")
    private String perCo2 = "--";
    @PropertyDef(label = "气体检测时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date gasDate;
    @PropertyDef(label = "仓库类型")
    private String depotType;
    private String depotTypeName;
    @PropertyDef(label = "仓库状态")
    private String depotStatus;
    private String depotStatusName;
    @PropertyDef(label = "粮食品种")
    private String foodVariety;
    private String foodVarietyName;
    @PropertyDef(label = "实际储量")
    private Double storageReal = 0.0;
    @PropertyDef(label = "粮食等级")
    private String foodLevel;
    private String foodLevelName;
    @PropertyDef(label = "粮食性质")
    private String foodType;
    private String foodTypeName;
    @PropertyDef(label = "入库时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/dto/GasData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,136 @@
package com.fzzy.igds.gas.dto;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fzzy.igds.dzhwk.domain.Depot;
import lombok.Data;
import org.apache.commons.lang3.time.DateFormatUtils;
import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
 * ç”¨äºŽå°è£…的粮情信息,每次获取粮情数据,封装为当前对象
 *
 * @author jiazx
 */
@Data
public class GasData implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @PropertyDef(label = "批次ID")
    private String batchId;
    @PropertyDef(label = "组织编码", description = "")
    private String companyId;
    @PropertyDef(label = "仓库ID", description = "仓库编号")
    private String depotId;
    @PropertyDef(label = "类型", description = "0-常规检测,1-熏蒸检测")
    private String type;
    @PropertyDef(label = "二氧化碳浓度", description = "平均二氧化碳浓度(PPM)")
    private Double perCo2 = 0.0;
    @PropertyDef(label = "氧气浓度", description = "平均氧气浓度(%)")
    private Double perO2 = 0.0;
    @PropertyDef(label = "磷化氢浓度", description = "平均磷化氢浓度(PPM)")
    private Double perPh3 = 0.0;
    @PropertyDef(label = "氮气浓度", description = "氮气浓度(%)")
    private Double perN2 = 0.0;
    @PropertyDef(label = "二氧化碳浓度-最大", description = "二氧化碳浓度(PPM)")
    private Double perCo2Max = 0.0;
    @PropertyDef(label = "氧气浓度-最大", description = "氧气浓度(%)")
    private Double perO2Max = 0.0;
    @PropertyDef(label = "磷化氢浓度-最大", description = "磷化氢浓度(PPM)")
    private Double perPh3Max = 0.0;
    @PropertyDef(label = "氮气浓度-最大")
    private Double perN2Max = 0.0;
    @PropertyDef(label = "二氧化碳浓度-最小", description = "二氧化碳浓度(PPM)")
    private Double perCo2Min = 0.0;
    @PropertyDef(label = "氧气浓度-最小", description = "氧气浓度(%)")
    private Double perO2Min = 0.0;
    @PropertyDef(label = "磷化氢浓度-最小", description = "磷化氢浓度(PPM)")
    private Double perPh3Min = 0.0;
    @PropertyDef(label = "氮气浓度-最小")
    private Double perN2Min = 0.0;
    @PropertyDef(label = "检测时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date receiveDate;
    @PropertyDef(label = "采集通道个数")
    private int checkNum = 0;
    @PropertyDef(label = "采集点信息", description = "固定为:passCode,co2,o2,ph3,n2;passCode,co2,o2,ph3,n2;")
    private String points;
    @Column(name = "CHECK_USER_", length = 30)
    @PropertyDef(label = "检测人")
    private String checkUser;
    @PropertyDef(label = "备注信息")
    private String remark;
    @PropertyDef(label = "系统时间", description = "关系字段")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date sysDate = new Date();
    @PropertyDef(label = "仓库信息", description = "关系字段")
    private Depot depotData;
    @PropertyDef(label = "检测批次", description = "关系字段")
    private String strReceiveDate;
    @PropertyDef(label = "压力信息", description = "关系字段")
    private Double pressure;
    @PropertyDef(label = "压力检测时间", description = "关系字段")
    private Date pressureDate;
    public GasData() {
        super();
    }
    public GasData(String batchId, String companyId, String depotId,
                   Date receiveDate) {
        super();
        this.batchId = batchId;
        this.companyId = companyId;
        this.depotId = depotId;
        this.perCo2Max = 0.0;
        this.perO2Max = 0.0;
        this.perPh3Max = 0.0;
        this.perCo2Min = 0.0;
        this.perO2Min = 0.0;
        this.perPh3Min = 0.0;
        this.perCo2 = 0.0;
        this.perO2 = 0.0;
        this.perPh3 = 0.0;
        this.receiveDate = receiveDate;
    }
    public String getStrReceiveDate() {
        if (this.receiveDate != null)
            return DateFormatUtils.format(receiveDate, "yyyy-MM-dd HH:mm");
        return null;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/dto/GasParam.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
package com.fzzy.igds.gas.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fzzy.igds.data.BaseParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
 * @author jiazx
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class GasParam extends BaseParam {
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkDate;// ç›‘测日期 yyyy-MM-dd
    private String batchId;// æ‰¹æ¬¡å·
    private String type;// æ£€æµ‹ç±»åž‹
    private String checkPoints;// æŒ‡å®šé‡‡é›†ç‚¹ï¼Œç”¨é€—号隔开的字符串
    private String depotIds;// å¤šä»“采集,用逗号隔开的仓库编码
    private boolean tagUpdate = true;// æ˜¯å¦æ›´æ–°é‡‡é›†ç‚¹è¯¦ç»†
    private boolean tagPressure = false;//是否查询压力信息
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/mapper/GasServiceMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
package com.fzzy.igds.gas.mapper;
import com.fzzy.igds.gas.dto.GasData;
import com.fzzy.igds.gas.dto.GasParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface GasServiceMapper {
    /**
     * åˆ†é¡µæŸ¥è¯¢æ•°æ®
     * @param param
     * @return
     */
    List<GasData> getGrainData(@Param("param")  GasParam param);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/repository/GasRepository.java
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GasRepository.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.fzzy.igds.dzhwk.service.repository;
package com.fzzy.igds.gas.repository;
import com.fzzy.igds.dzhwk.domain.Gas;
import org.springframework.data.jpa.repository.JpaRepository;
igds-dzhwk-core/src/main/java/com/fzzy/igds/gas/service/GasService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
package com.fzzy.igds.gas.service;
import com.fzzy.igds.dzhwk.constant.RedisConst;
import com.fzzy.igds.gas.dto.GasData;
import com.fzzy.igds.gas.dto.GasParam;
import com.fzzy.igds.gas.mapper.GasServiceMapper;
import com.ruoyi.common.core.redis.RedisCache;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
/**
 * @Description
 * @Author CZT
 * @Date 2024/12/09 11:05
 */
@Slf4j
@Service
public class GasService {
    @Resource
    private GasServiceMapper gasMapper;
    @Resource
    private RedisCache redisCache;
    /**
     *
     * @param companyId
     * @param depotId
     * @return
     */
    @SuppressWarnings("unchecked")
    public GasData getCacheGrainDate(String companyId, String depotId) {
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_GAS_DATA, depotId);
        GasData gasData = redisCache.getCacheObject(key);
        if (null == gasData) {
            GasParam param = new GasParam();;
            param.setCompanyId(companyId);
            param.setDepotId(depotId);
            List<GasData> list = gasMapper.getGrainData(param);
            if (list != null && !list.isEmpty()) {
                gasData = list.get(0);
                redisCache.setCacheObject(key, gasData);
            }
            return null;
        }
        return gasData;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainData.java
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainData.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.fzzy.igds.dzhwk.data;
package com.fzzy.igds.grain.dto;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainIotData.java
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainIotData.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.fzzy.igds.dzhwk.data;
package com.fzzy.igds.grain.dto;
import lombok.Data;
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainLay.java
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainLay.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.fzzy.igds.dzhwk.data;
package com.fzzy.igds.grain.dto;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainParam.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
package com.fzzy.igds.grain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fzzy.igds.data.BaseParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
 * ç²®æƒ…业务参数参数定义
 *
 * @author jiazx
 *
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class GrainParam extends BaseParam {
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkDate;// æ£€æµ‹æ—¥æœŸ yyyy-MM-dd
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM", timezone = "GMT+8")
    private Date checkMonth;// æ£€æµ‹æ—¥æœŸ
    private int checkHour;//检测时间小时,0不算
    private String batchId;// æ‰¹æ¬¡å·
    private String extBatchId;// éœ€è¦è¢«æŽ’除批次号
    private String depotIds;// ä»¥é€—号隔开的仓库编码,多个仓库编码
    private boolean tagUpdate = true;// æ˜¯å¦æ›´æ–°å±‚数据和行数据
    private String cableRule;//布线规则
    private String cableCir;//筒仓层布线规则
    private String depotType;//仓库类型
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainPoint.java
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainPoint.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.fzzy.igds.dzhwk.data;
package com.fzzy.igds.grain.dto;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/dto/GrainRow.java
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainRow.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.fzzy.igds.dzhwk.data;
package com.fzzy.igds.grain.dto;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/mapper/GrainServiceMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package com.fzzy.igds.grain.mapper;
import com.fzzy.igds.grain.dto.GrainData;
import com.fzzy.igds.grain.dto.GrainParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface GrainServiceMapper {
    /**
     * æ ¹æ®å‚数获取粮情信息
     *
     * @param param
     * @return
     */
    List<GrainData> listGrainData(@Param("param") GrainParam param);
    /**
     * æ ¹æ®å‚数获取粮情信息
     *
     * @param param
     * @return
     */
    List<GrainData> getGrainData(@Param("param") GrainParam param);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/repository/GrainRepository.java
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GrainRepository.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package com.fzzy.igds.dzhwk.service.repository;
package com.fzzy.igds.grain.repository;
import com.fzzy.igds.dzhwk.domain.Grain;
import org.springframework.data.jpa.repository.JpaRepository;
igds-dzhwk-core/src/main/java/com/fzzy/igds/grain/service/GrainService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
package com.fzzy.igds.grain.service;
import com.fzzy.igds.dzhwk.constant.RedisConst;
import com.fzzy.igds.grain.dto.GrainData;
import com.fzzy.igds.grain.dto.GrainParam;
import com.fzzy.igds.grain.mapper.GrainServiceMapper;
import com.ruoyi.common.core.redis.RedisCache;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description ç²®æƒ…模块核心接口
 * @Author CZT
 * @Date 2024/12/02 15:33
 */
@Slf4j
@Service("dzhwk.grainService")
public class GrainService {
    @Resource
    private RedisCache redisCache;
    @Resource
    private GrainServiceMapper grainServiceMapper;
    /**
     * èŽ·å–ç¼“å­˜ä¸­æœ€æ–°çš„ç²®æƒ…æ£€æµ‹æ•°æ®
     *
     * @param companyId
     * @return key=参考编码
     */
    public GrainData getCacheGrainDate(String companyId, String depotId) {
        if (null == companyId || null == depotId) {
            return null;
        }
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_GRAIN, depotId);
        GrainData grainData = redisCache.getCacheObject(key);
        if (null == grainData) {
            GrainParam param = new GrainParam();;
            param.setCompanyId(companyId);
            param.setDepotId(depotId);
            List<GrainData> list = grainServiceMapper.getGrainData(param);
            if (list != null && !list.isEmpty()) {
                grainData = list.get(0);
                redisCache.setCacheObject(key, grainData);
            }
        }
        return grainData;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/GranaryService.java
@@ -34,6 +34,14 @@
        return granaryRepository.getGranary(companyId, deptId);
    }
    public Granary getGranaryById(String ajdh) {
        if (StringUtils.isEmpty(ajdh)) {
            return null;
        }
        return granaryRepository.getGranaryById(ajdh);
    }
    public void saveOrUpdate(Granary data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/GranaryRepository.java
@@ -26,4 +26,13 @@
    @Query("from Granary where companyId =:companyId and deptId =:deptId order by ajdh")
    List<Granary> getGranary(@Param("companyId") String companyId, @Param("deptId") String deptId);
    /**
     *
     * @param ajdh
     * @return
     */
    @Query("from Granary where ajdh =:ajdh")
    Granary getGranaryById(@Param("ajdh") String ajdh);
}
igds-dzhwk-core/src/main/resources/mapper/GasServiceMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fzzy.igds.gas.mapper.GasServiceMapper">
    <!-- åŸºæœ¬è¿”回信息 -->
    <sql id="DATA_COLUMN">
        BATCH_ID_ AS batchId,
        COMPANY_ID_ AS companyId,
        DEPOT_ID_ AS depotId,
        PER_CO2_ AS perCo2,
        PER_O2_ AS perO2,
        PER_PH3_ AS perPh3,
        PER_N2_ AS perN2,
        PER_CO2_MAX_ AS perCo2Max,
        PER_O2_MAX_ AS perO2Max,
        PER_PH3_MAX_ AS perPh3Max,
        PER_N2_MAX_ AS perN2Max,
        PER_CO2_MIN_ AS perCo2Min,
        PER_O2_MIN_ AS perO2Min,
        PER_PH3_MIN_ AS perPh3Min,
        PER_N2_MIN_ AS perN2Min,
        RECEIVE_DATE_ AS receiveDate,
        POINTS_  AS points,
        CHECK_USER_  AS checkUser,
        CHECK_NUM_ as  checkNum,
        GAS_START_ as  gasStart,
        GAS_END_ as  gasEnd,
        TYPE_ as  type,
        REMARK_ AS remark
    </sql>
    <sql id="DATA_COLUMN_INFO">
        ID_ AS id,
        PASS_CODE_ AS passCode,
        PER_CO2_ AS perCo2,
        PER_O2_ AS perO2,
        PER_PH3_ AS perPh3,
        REMARK_ AS remark
    </sql>
    <select id="getGrainData" resultType="com.fzzy.igds.gas.dto.GasData" parameterType="com.fzzy.igds.gas.dto.GasParam">
        select
        <include refid="DATA_COLUMN"/>
        from
        D_GAS
        <where>
            <if test="param.companyId != null" >AND COMPANY_ID_ = #{param.companyId}</if>
            <if test="param.depotId != null">AND DEPOT_ID_ = #{param.depotId}</if>
        </where>
        ORDER BY BATCH_ID_ DESC LIMIT 1
    </select>
</mapper>
igds-dzhwk-core/src/main/resources/mapper/GrainServiceMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fzzy.igds.grain.mapper.GrainServiceMapper">
    <!-- åŸºç¡€æŸ¥è¯¢å­—段 -->
    <sql id="DATA_REPORT_COLUMN">
        g
        .
        BATCH_ID_
        AS batchId,
        g.COMPANY_ID_ AS companyId,
        g.DEPOT_ID_ AS depotId,
        g.TEMP_MIN_ AS tempMin,
        g.TEMP_MAX_ AS tempMax,
        g.TEMP_AVE_ AS tempAve,
        g.HUMIDITY_IN_ AS humidityIn,
        g.TEMP_IN_ AS tempIn,
        g.HUMIDITY_OUT_ AS humidityOut,
        g.TEMP_OUT_ AS tempOut,
        g.CABLE_ AS cable,
        g.CABLE_CIR_ AS cableCir,
        g.OIL_HEIGHT_ AS oilHeight,
        g.WEATHER_ AS weather,
        g.RECEIVE_DATE_ AS receiveDate,
        g.CHECK_USER_ AS checkUser,
        g.REMARK_ AS remark,
        g.POINTS_ AS points,
        g.PUSH_TAG_ AS pushTag,
        d.STORE_KEEPER_NAME_ AS storeKeeperName,
        d.PER_WET_ AS perWet,
        d.PER_IMPURITY_ AS perImpurity,
        d.DEPOT_TYPE_ AS depotType,
        d.STORAGE_REAL_ AS storageReal,
        d.FOOD_VARIETY_ AS foodVariety
    </sql>
    <sql id="DATA_COLUMN">
        BATCH_ID_
        AS batchId,
        COMPANY_ID_ AS companyId,
        DEPOT_ID_ AS depotId,
        TEMP_MIN_ AS tempMin,
        TEMP_MAX_ AS tempMax,
        TEMP_AVE_ AS tempAve,
        HUMIDITY_IN_ AS humidityIn,
        TEMP_IN_ AS tempIn,
        HUMIDITY_OUT_ AS humidityOut,
        TEMP_OUT_ AS tempOut,
        CABLE_ AS cable,
        CABLE_CIR_ AS cableCir,
        OIL_HEIGHT_ AS oilHeight,
        WEATHER_ AS weather,
        RECEIVE_DATE_ AS receiveDate,
        CHECK_USER_ AS checkUser,
        REMARK_ AS remark,
        POINTS_ AS points,
        PUSH_TAG_ AS pushTag
    </sql>
    <!-- æ ¹æ®æ¡ä»¶èŽ·å–ç²®æƒ…ä¿¡æ¯ -->
    <select id="listGrainData" resultType="com.fzzy.igds.grain.dto.GrainData"
            parameterType="com.fzzy.igds.grain.dto.GrainParam">
        select
        <include refid="DATA_COLUMN"/>
        from
        D_GRAIN
        <where>
            <if test="param.companyId != null">AND COMPANY_ID_ =
                #{param.companyId}
            </if>
            <if test="param.start != null">AND
                RECEIVE_DATE_ <![CDATA[ >= ]]>
                #{param.start,jdbcType=DATE}
            </if>
            <if test="param.end != null">AND
                RECEIVE_DATE_  <![CDATA[ <= ]]>
                #{param.end,jdbcType=DATE}
            </if>
            <if test="param.depotId != null">AND DEPOT_ID_ = #{param.depotId}</if>
        </where>
        ORDER BY BATCH_ID_ DESC
    </select>
    <!-- æ ¹æ®æ¡ä»¶èŽ·å–ç²®æƒ…ä¿¡æ¯ -->
    <select id="getGrainData" resultType="com.fzzy.igds.grain.dto.GrainData"
            parameterType="com.fzzy.igds.grain.dto.GrainParam">
        select
        <include refid="DATA_COLUMN"/>
        from
        D_GRAIN
        <where>
            <if test="param.companyId != null">AND COMPANY_ID_ =
                #{param.companyId}
            </if>
            <if test="param.depotId != null">AND DEPOT_ID_ = #{param.depotId}</if>
        </where>
        ORDER BY BATCH_ID_ DESC LIMIT 1
    </select>
</mapper>
igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2001.java
@@ -2,7 +2,7 @@
import com.alibaba.fastjson.JSONObject;
import com.fzzy.igds.dzhwk.domain.Grain;
import com.fzzy.igds.dzhwk.service.repository.GrainRepository;
import com.fzzy.igds.grain.repository.GrainRepository;
import com.fzzy.igds.dzhwk.v1.ApiV1Service;
import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2001;
import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto;
igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2002.java
@@ -2,7 +2,7 @@
import com.alibaba.fastjson.JSONObject;
import com.fzzy.igds.dzhwk.domain.Gas;
import com.fzzy.igds.dzhwk.service.repository.GasRepository;
import com.fzzy.igds.gas.repository.GasRepository;
import com.fzzy.igds.dzhwk.v1.ApiV1Service;
import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2002;
import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto;
igds-dzhwk-web/pom.xml
@@ -60,7 +60,6 @@
            <systemPath>${project.basedir}/src/main/resources/lib/dorado-skin-ruoyi-1.0.10.jar</systemPath>
        </dependency>
    </dependencies>
    <build>
igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java
@@ -1,5 +1,6 @@
package com.fzzy.igds.dzhwk.controller;
import com.fzzy.igds.dzhwk.data.HwkDepotDto;
import com.fzzy.igds.dzhwk.domain.Depot;
import com.fzzy.igds.dzhwk.domain.Dept;
import com.fzzy.igds.dzhwk.manager.WebManager;
@@ -43,7 +44,7 @@
        if(StringUtils.isEmpty(sid)){
            sid = "FZZY0001";
        }
        List<Depot> list = webManager.getDepotsByGid(sid);
        List<HwkDepotDto> list = webManager.getDepotsByGid(sid);
        view.put("depotList", list);
        view.put("flag", "index");
@@ -56,7 +57,16 @@
     * @return
     */
    @RequestMapping("/dzhwk")
    public String dzhwk(ModelMap view) {
    public String dzhwk(@RequestParam(value = "sid", required = false) String sid, ModelMap view) {
        //根据货位卡SN,获取对应廒间下的货位列表信息
        if(StringUtils.isEmpty(sid)){
            sid = "FZZY0001";
        }
        List<HwkDepotDto> list = webManager.getDepotsByGid(sid);
        view.put("depotList", list);
        view.put("name", list.get(0).getGranaryName());
        view.put("flag", "dzhwk");
        return prefix + "dzhwk";
    }
igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/manager/WebManager.java
@@ -4,18 +4,27 @@
import com.fzzy.igds.dzhwk.data.HwkDepotDto;
import com.fzzy.igds.dzhwk.domain.Depot;
import com.fzzy.igds.dzhwk.domain.Dept;
import com.fzzy.igds.dzhwk.domain.Granary;
import com.fzzy.igds.dzhwk.domain.HScreenSer;
import com.fzzy.igds.dzhwk.service.ScreenSerService;
import com.fzzy.igds.file.FileService;
import com.fzzy.igds.gas.dto.GasData;
import com.fzzy.igds.gas.service.GasService;
import com.fzzy.igds.grain.dto.GrainData;
import com.fzzy.igds.grain.service.GrainService;
import com.fzzy.igds.sys.CoreDeptService;
import com.fzzy.igds.sys.DepotService;
import com.ruoyi.common.config.FrameworkConfig;
import com.fzzy.igds.sys.GranaryService;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
@@ -37,7 +46,15 @@
    private ScreenSerService screenSerService;
    @Resource
    private DepotService depotService;
    @Resource
    private GranaryService granaryService;
    @Resource
    private ISysUserService userService;
    @Resource
    private GrainService grainService;
    @Resource
    private GasService gasService;
    /**
     * æ ¹æ®å•位ID获取单位信息
@@ -77,7 +94,7 @@
     * @param sid
     * @return
     */
    public List<Depot> getDepotsByGid(String sid) {
    public List<HwkDepotDto> getDepotsByGid(String sid) {
        if(StringUtils.isEmpty(sid)){
            return null;
@@ -88,11 +105,61 @@
        if(null == screenSer || StringUtils.isEmpty(screenSer.getAjdh())){
            return null;
        }
        Granary granary = granaryService.getGranaryById(screenSer.getAjdh());
        if(null == granary){
            return null;
        }
        List<Depot> list = depotService.getCacheByAjdn(screenSer.getCompanyId(), screenSer.getAjdh());
        if(null == list || list.isEmpty()){
            return null;
        }
        return list;
        List<HwkDepotDto> result = new ArrayList<>();
        HwkDepotDto hwkDepotDto;
        for (Depot depot : list) {
            hwkDepotDto = new HwkDepotDto();
            BeanUtils.copyProperties(depot, hwkDepotDto);
            hwkDepotDto.setGranaryName(granary.getAjmc());
            hwkDepotDto.setStoreKeeperName(StringUtils.isEmpty(depot.getStoreKeeperName())?"--":depot.getStoreKeeperName());
            hwkDepotDto.setFoodVarietyName(StringUtils.isEmpty(depot.getFoodVarietyName())?"--":depot.getFoodVarietyName());
            hwkDepotDto.setFoodTypeName(StringUtils.isEmpty(depot.getFoodTypeName())?"--":depot.getFoodTypeName());
            hwkDepotDto.setFoodLevelName(StringUtils.isEmpty(depot.getFoodLevelName())?"--":depot.getFoodLevelName());
            hwkDepotDto.setStorageReal(hwkDepotDto.getStorageReal()/1000);
            //查询粮情信息
            GrainData grainData = grainService.getCacheGrainDate(depot.getCompanyId(), depot.getId());
            if(null != grainData){
                hwkDepotDto.setInTemp(grainData.getTempIn() + "");
                hwkDepotDto.setInHumidity(grainData.getHumidityIn() + "");
                hwkDepotDto.setOutTemp(grainData.getTempOut() + "");
                hwkDepotDto.setOutHumidity(grainData.getHumidityOut() + "");
                hwkDepotDto.setMaxTemp(grainData.getTempMax() + "");
                hwkDepotDto.setMinTemp(grainData.getTempMin() + "");
                hwkDepotDto.setAveTemp(grainData.getTempAve() + "");
                hwkDepotDto.setGrainDate(grainData.getReceiveDate());
            }
            //查询气体信息
            GasData gasData = gasService.getCacheGrainDate(depot.getCompanyId(), depot.getId());
            if(null != gasData){
                hwkDepotDto.setPerO2(gasData.getPerO2() + "");
                hwkDepotDto.setPerPh3(gasData.getPerPh3() + "");
                hwkDepotDto.setPerCo2(gasData.getPerCo2() + "");
                hwkDepotDto.setGasDate(gasData.getReceiveDate());
            }
            //查询保管员信息
            if(StringUtils.isNotEmpty(depot.getStoreKeeper())){
                SysUser sysUser = userService.selectUserByLoginName(depot.getStoreKeeper());
                hwkDepotDto.setUserImgPath(StringUtils.isEmpty(sysUser.getAvatar())?"/img/dzhwk/imgl6.jpg":sysUser.getAvatar());
                hwkDepotDto.setStoreKeeperPhone(StringUtils.isEmpty(sysUser.getPhonenumber())?"--":sysUser.getPhonenumber());
            }
            result.add(hwkDepotDto);
        }
        return result;
    }
}
igds-dzhwk-web/src/main/java/com/fzzy/igds/init/SystemRunner.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.fzzy.igds.init;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.sys.*;
import com.ruoyi.system.domain.SysCompany;
import com.ruoyi.system.service.ISysCompanyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * é…ç½®ç³»ç»Ÿçº§åˆ«çš„项目启动初始化信息
 *
 * @author Andy
 */
@Service
@Slf4j
@Order(value = 1)
public class SystemRunner implements CommandLineRunner {
    @Resource
    private ISysCompanyService iSysCompanyService;
    @Resource
    private SysDeptService sysDeptService;
    @Resource
    private DicService dicService;
    @Resource
    private BuildingService buildingService;
    @Resource
    private DepotService depotService;
    @Resource
    private DepotConfService depotConfService;
    @Resource
    private SysConfService sysConfService;
    @Override
    public void run(String... args) throws Exception {
        //组织信息放入缓存
        iSysCompanyService.resetCompanyCache();
        List<SysCompany> list = iSysCompanyService.selectAll();
        for (SysCompany company : list) {
            flushCache(company.getCompanyId(), "系统调用");
        }
    }
    /**
     * å¹³å°ç³»ç»Ÿï¼Œæ‰‹åŠ¨åˆ·æ–°æ‰€æœ‰ç¼“å­˜
     * <p>
     * systemRunner#flushAllCache
     *
     * @param companyId
     */
    @Expose
    public void flushAllCache(String companyId) {
        flushCache(companyId, "手动调用");
    }
    /**
     * åˆ†ç»„织初始化
     *
     * @param companyId
     * @param name
     */
    public void flushCache(String companyId, String name) {
        //初始化用户部门到内存
        sysDeptService.initUserDeptMap(companyId);
        //初始化常用字典到内存
        dicService.initDicMap(companyId);
        //初始化仓房缓存
        buildingService.refreshCacheBuilding(companyId);
        //初始化仓库缓存
        depotService.flushCache(companyId);
        //参数配置
        depotConfService.flushConfCache(companyId);
        //系统配置
        sysConfService.flushCacheSysConf(companyId);
        log.info("* ");
        log.info("* ========================");
        log.info("* ");
        log.info("* ç»„织={},{}初始化缓存完成…………", companyId, name);
        log.info("* ");
        log.info("* ========================");
        log.info("* ");
    }
}
igds-dzhwk-web/src/main/resources/static/dzhwk/dzhwk.js
@@ -1,173 +1,105 @@
var linexData = ['06-01', '06-02', '06-03', '06-04', '06-05', '06-06', '06-07'];
var lineyData = [22, 23, 23, 23, 24, 25, 28];
var lineyData2 = [16.5, 17.5, 18, 16.5, 18, 19, 21];
var lineyData3 = [11, 12, 13, 10, 12, 13, 14];
$(document).ready(function () {
    function initLineEchart(id, xData, yData, yData2, yData3) {
        var echart = null
        var dom = document.getElementById(id);
        echart = echarts.init(dom);
        var option = {
            tooltip: {
                trigger: 'axis',
            },
            legend: {
                right: '0',
                top: '2%',
                itemWidth: 12,
                itemHeight: 12,
                icon: 'circle',
                textStyle: {
                    color: '#91ceff',
                    fontSize: 18,
                    paddingLeft: 5,
                }
            },
            grid: {
                top: '15%',
                left: '3%',
                right: '0',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: "category",
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,.6)",
                        width: 1
                    }
                },
                axisTick: {
                    show: false
                },
                axisLabel: {
                    show: true,
                    color: "#fff",
                    fontSize: 20,
                },
                splitLine: {
                    show: false,
                    lineStyle: {
                        color: "rgba(255,255,255,.2)",
                    }
                },
                data: xData
            },
            yAxis: [{
                name: '(°C)',
                min: 0,
                max: 40,
                interval: 10,
                nameTextStyle: {
                    color: 'rgba(145,206,255,.5)',
                    fontSize: 18,
                    padding: [0, 0, 5, -30]
                },
                type: 'value',
                axisTick: {
                    show: false
                },
                axisLine: {
                    show: false,
                },
                axisLabel: {
                    color: "#91ceff", //X轴文字颜色
                    fontSize: 18,
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        type: "dashed",
                        color: "rgba(255,255,255,.3)",
                    }
                },
            }],
            series: [{
                name: '粮高温',
                type: 'line',
                symbol: 'none',
                color: '#ffd12b',
                lineStyle: {
                    width: 3
                },
                areaStyle: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgba(255, 209, 43,0.3)'
                    },
                        {
                            offset: 1,
                            color: 'rgba(255, 209, 43,0)'
                        },
                    ]),
                },
                label: {
                    show: false,
                },
                data: yData,
            },
                {
                    name: '粮均温',
                    type: 'line',
                    symbol: 'none',
                    color: '#02afff',
                    lineStyle: {
                        width: 3
                    },
                    areaStyle: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(2, 175, 255, .3)'
                        },
                            {
                                offset: 1,
                                color: 'rgba(2, 175, 255,0)'
                            },
                        ]),
                    },
                    label: {
                        show: false,
                    },
                    data: yData2,
                },
                {
                    name: '粮低温',
                    type: 'line',
                    symbol: 'none',
                    color: '#39ff02',
                    lineStyle: {
                        width: 3
                    },
                    areaStyle: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgb(97,154,82)'
                        },
                            {
                                offset: 1,
                                color: 'rgba(2, 175, 255,0)'
                            },
                        ]),
                    },
                    label: {
                        show: false,
                    },
                    data: yData3,
                }]
        };
        if (option && typeof option === "object") {
            echart.setOption(option, true);
        }
    }
    var linexData = ['01', '02', '03', '04', '05', '06', '07'];
    var lineyData = [22, 23, 23, 23, 24, 25, 28];
    var lineyData2 = [16.5, 17.5, 18, 16.5, 18, 19, 21];
    var lineyData3 = [11, 12, 13, 10, 12, 13, 14];
    initLineEchart('lineChart1', linexData, lineyData, lineyData2, lineyData3)
    initLineEchart('lineChart2', linexData, lineyData, lineyData2, lineyData3)
    initLineEchart('lineChart3', linexData, lineyData, lineyData2, lineyData3)
    initLineEchart('lineChart4', linexData, lineyData, lineyData2, lineyData3)
    initLineEchart('lineChart5', linexData, lineyData, lineyData2, lineyData3)
    initLineEchart('lineChart6', linexData, lineyData, lineyData2, lineyData3)
    var html = "";
    if(depotList){
        $.each(depotList, function (index, item) {
            html += '<div class="swiper-slide"><div class="electron1"><div class="col-l"><div class="g-boxl1"><div class="g-titl1">货位信息</div><ul class="ul-listl5">';
            html += '<li><div class="con"><div class="tit">'+item.name+'</div><div class="info">名称</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.depotStatusName+'</div><div class="info">货位状态</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.storageReal+'<em>t</em></div><div class="info">粮食储量</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.foodVarietyName+'</div><div class="info">粮食品种</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.foodTypeName+'</div><div class="info">粮食性质</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.foodLevelName+'</div><div class="info">粮食等级</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.foodYear+'</div><div class="info">粮食年份</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.storeDate+'</div><div class="info">入仓时间</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.depotTypeName+'</div><div class="info">仓房类型</div></div></li></ul></div>';
            html += '<div class="g-boxl1 h378"><div class="g-titl1">粮情三温图</div><div class="m-chartl"><div class="chart" id="lineChart'+index+'"></div></div></div></div>';
            html += '<div class="col-c"><div class="g-boxl1"><div class="g-titl1">粮情信息</div>';
            html += '<ul class="ul-listl6"><li><div class="con" style="background-color: rgba(3,77,146,.3);"><div class="icon"><img src="/img/dzhwk/iconl18.png" alt=""></div>';
            html += '<div class="rr"><div class="itm"><div class="info" style="background-color: rgba(18,110,112,.15);"><div class="num"><em>'+item.inTemp+'</em> Â°C</div><div class="tt">仓内温度</div></div></div>';
            html += '<div class="itm"><div class="info" style="background-color: rgba(255,255,255,.05);"><div class="num"><em>'+item.outTemp+'</em> Â°C</div><div class="tt">仓外温度</div></div></div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(91,104,225,.25);"><div class="icon"><img src="/img/dzhwk/iconl19.png" alt=""></div>';
            html += '<div class="rr"><div class="itm"><div class="info" style="background-color: rgba(18,110,112,.15);"><div class="num"><em>'+item.inHumidity+'</em> %</div><div class="tt">仓内湿度</div></div></div>';
            html += '<div class="itm"><div class="info" style="background-color: rgba(255,255,255,.05);"><div class="num"><em>'+item.outHumidity+'</em> %</div><div class="tt">仓外湿度</div></div></div></div></div></li></ul>';
            html += '<ul class="ul-listl5 styl3"><li><div class="con" style="background-color: rgba(254,139,76,.2);"><div class="tit">'+item.maxTemp+'<em>°C</em></div><div class="info">粮高温</div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(31,133,78,.15);"><div class="tit">'+item.aveTemp+'<em>°C</em></div><div class="info">粮均温</div></div></li>';
            html += '<li><div class="con"><div class="tit">'+item.minTemp+'<em>°C</em></div><div class="info">粮低温</div></div></li></ul><div class="date">'+item.grainDate+'</div></div>';
            html += '<div class="g-boxl1 h378"><div class="g-titl1">质检信息</div><ul class="ul-listl5 styl2">';
            html += '<li><div class="con"><div class="tit">'+item.foodVarietyName+'</div><div class="info">粮食品种</div></div></li>';
            html += '<li><div class="con"><div class="tit">--</div><div class="info">检验人</div></div></li>';
            html += '<li><div class="con"><div class="tit">--</div><div class="info">检验日期</div></div></li>';
            html += '<li><div class="con"><div class="tit">--%</div><div class="info">水分</div></div></li>';
            html += '<li><div class="con"><div class="tit">--%</div><div class="info">杂质</div></div></li>';
            html += '<li><div class="con"><div class="tit">--%</div><div class="info">不完善类</div></div></li></ul></div></div>';
            html += '<div class="col-r"><div class="g-boxl1"><div class="g-titl1">气体信息</div><ul class="ul-listl3 styl2">';
            html += '<li><div class="con" style="background-color: rgba(3,77,146,.3);"><div class="icon"><img src="/img/dzhwk/iconl21.png" alt="">';
            html += '</div><div class="txt"><div class="num"><em>'+item.perPh3+'</em>ppm</div><div class="tt">磷化氢</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(31,133,78,.15);"><div class="icon"><img src="/img/dzhwk/iconl20.png" alt="">';
            html += '</div><div class="txt"><div class="num"><em>'+item.perO2+'</em>%</div><div class="tt">氧气</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(91,104,225,.25);"><div class="icon"><img src="/img/dzhwk/iconl28.png" alt="">';
            html += '</div><div class="txt"><div class="num"><em>'+item.perCo2+'</em>ppm</div><div class="tt">二氧化碳</div></div></div></li><div class="date">'+item.gasDate+'</div></ul></div>';
            html += '<div class="g-boxl1 h378"><div class="g-titl1">保管员</div><ul class="ul-intel styl2">';
            html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl23.png" alt=""></div>保管员</div><div class="rr">'+item.storeKeeperName+'</div></div></li>';
            html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl24.png" alt=""></div>电话</div><div class="rr">'+item.storeKeeperPhone+'</div></div></li>';
            html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl26.png" alt=""></div>部门</div><div class="rr">--</div></div></li>';
            html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl27.png" alt=""></div>最近打卡</div><div class="rr">--</div></div></li></ul>';
            html += '</div></div></div></div>';
        })
    }else{
        html += '<div class="swiper-slide"><div class="electron1"><div class="col-l"><div class="g-boxl1"><div class="g-titl1">货位信息</div><ul class="ul-listl5">';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">名称</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">货位状态</div></div></li>';
        html += '<li><div class="con"><div class="tit">--<em>t</em></div><div class="info">粮食储量</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">粮食品种</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">粮食性质</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">粮食等级</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">粮食年份</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">入仓时间</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">仓房类型</div></div></li></ul></div>';
        html += '<div class="g-boxl1 h378"><div class="g-titl1">粮情三温图</div><div class="m-chartl"><div class="chart" id="lineChart1"></div></div></div></div>';
        html += '<div class="col-c"><div class="g-boxl1"><div class="g-titl1">粮情信息</div>';
        html += '<ul class="ul-listl6"><li><div class="con" style="background-color: rgba(3,77,146,.3);"><div class="icon"><img src="/img/dzhwk/iconl18.png" alt=""></div>';
        html += '<div class="rr"><div class="itm"><div class="info" style="background-color: rgba(18,110,112,.15);"><div class="num"><em>--</em> Â°C</div><div class="tt">仓内温度</div></div></div>';
        html += '<div class="itm"><div class="info" style="background-color: rgba(255,255,255,.05);"><div class="num"><em>--</em> Â°C</div><div class="tt">仓外温度</div></div></div></div></div></li>';
        html += '<li><div class="con" style="background-color: rgba(91,104,225,.25);"><div class="icon"><img src="/img/dzhwk/iconl19.png" alt=""></div>';
        html += '<div class="rr"><div class="itm"><div class="info" style="background-color: rgba(18,110,112,.15);"><div class="num"><em>--</em> %</div><div class="tt">仓内湿度</div></div></div>';
        html += '<div class="itm"><div class="info" style="background-color: rgba(255,255,255,.05);"><div class="num"><em>--</em> %</div><div class="tt">仓外湿度</div></div></div></div></div></li></ul>';
        html += '<ul class="ul-listl5 styl3"><li><div class="con" style="background-color: rgba(254,139,76,.2);"><div class="tit">--<em>°C</em></div><div class="info">粮高温</div></div></li>';
        html += '<li><div class="con" style="background-color: rgba(31,133,78,.15);"><div class="tit">--<em>°C</em></div><div class="info">粮均温</div></div></li>';
        html += '<li><div class="con"><div class="tit">--<em>°C</em></div><div class="info">粮低温</div></div></li></ul></div>';
        html += '<div class="g-boxl1 h378"><div class="g-titl1">质检信息</div><ul class="ul-listl5 styl2">';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">粮食品种</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">检验人</div></div></li>';
        html += '<li><div class="con"><div class="tit">--</div><div class="info">检验日期</div></div></li>';
        html += '<li><div class="con"><div class="tit">--%</div><div class="info">水分</div></div></li>';
        html += '<li><div class="con"><div class="tit">--%</div><div class="info">杂质</div></div></li>';
        html += '<li><div class="con"><div class="tit">--%</div><div class="info">不完善类</div></div></li></ul></div></div>';
        html += '<div class="col-r"><div class="g-boxl1"><div class="g-titl1">气体信息</div><ul class="ul-listl3 styl2">';
        html += '<li><div class="con" style="background-color: rgba(3,77,146,.3);"><div class="icon"><img src="/img/dzhwk/iconl21.png" alt="">';
        html += '</div><div class="txt"><div class="num"><em>--</em>ppm</div><div class="tt">磷化氢</div></div></div></li>';
        html += '<li><div class="con" style="background-color: rgba(31,133,78,.15);"><div class="icon"><img src="/img/dzhwk/iconl20.png" alt="">';
        html += '</div><div class="txt"><div class="num"><em>--</em>%</div><div class="tt">氧气</div></div></div></li>';
        html += '<li><div class="con" style="background-color: rgba(91,104,225,.25);"><div class="icon"><img src="/img/dzhwk/iconl28.png" alt="">';
        html += '</div><div class="txt"><div class="num"><em>--</em>ppm</div><div class="tt">二氧化碳</div></div></div></li></ul></div>';
        html += '<div class="g-boxl1 h378"><div class="g-titl1">保管员</div><ul class="ul-intel styl2">';
        html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl23.png" alt=""></div>保管员</div><div class="rr">--</div></div></li>';
        html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl24.png" alt=""></div>电话</div><div class="rr">--</div></div></li>';
        html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl26.png" alt=""></div>部门</div><div class="rr">--</div></div></li>';
        html += '<li><div class="con df-jb"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl27.png" alt=""></div>最近打卡</div><div class="rr">--</div></div></li></ul>';
        html += '</div></div></div></div>';
        initLineEchart('lineChart1', linexData, lineyData, lineyData2, lineyData3)
    }
    $("#depotList").html(html);
    //初始化三温图
    $.each(depotList, function (index, item) {
        initLineEchart('lineChart' + index, linexData, lineyData, lineyData2, lineyData3);
    })
    var swiper = new Swiper('.m-swiperl2 .swiper', {
        slidesPerView: 1,
@@ -175,7 +107,11 @@
        //     delay: 2500,
        //     disableOnInteraction: false,
        // },
        // loop: true,
        loop: true,
        autoplay:{
            delay: 5000,
            disableOnInteraction: false
        },
        pagination: {
            el: '.g-swbtnl .swiper-pagination',
            type: 'fraction',
@@ -185,4 +121,163 @@
            prevEl: '.g-swbtnl .swiper-button-prev',
        },
    });
});
});
function initLineEchart(id, xData, yData, yData2, yData3) {
    var echart = null
    var dom = document.getElementById(id);
    echart = echarts.init(dom);
    var option = {
        tooltip: {
            trigger: 'axis',
        },
        legend: {
            right: '0',
            top: '2%',
            itemWidth: 12,
            itemHeight: 12,
            icon: 'circle',
            textStyle: {
                color: '#91ceff',
                fontSize: 18,
                paddingLeft: 5,
            }
        },
        grid: {
            top: '15%',
            left: '3%',
            right: '0',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: "category",
            axisLine: {
                show: true,
                lineStyle: {
                    color: "rgba(255,255,255,.6)",
                    width: 1
                }
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                show: true,
                color: "#fff",
                fontSize: 20,
            },
            splitLine: {
                show: false,
                lineStyle: {
                    color: "rgba(255,255,255,.2)",
                }
            },
            data: xData
        },
        yAxis: [{
            name: '(°C)',
            min: 0,
            max: 40,
            interval: 10,
            nameTextStyle: {
                color: 'rgba(145,206,255,.5)',
                fontSize: 18,
                padding: [0, 0, 5, -30]
            },
            type: 'value',
            axisTick: {
                show: false
            },
            axisLine: {
                show: false,
            },
            axisLabel: {
                color: "#91ceff", //X轴文字颜色
                fontSize: 18,
            },
            splitLine: {
                show: true,
                lineStyle: {
                    type: "dashed",
                    color: "rgba(255,255,255,.3)",
                }
            },
        }],
        series: [{
            name: '粮高温',
            type: 'line',
            symbol: 'none',
            color: '#ffd12b',
            lineStyle: {
                width: 3
            },
            areaStyle: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(255, 209, 43,0.3)'
                },
                    {
                        offset: 1,
                        color: 'rgba(255, 209, 43,0)'
                    },
                ]),
            },
            label: {
                show: false,
            },
            data: yData,
        },
            {
                name: '粮均温',
                type: 'line',
                symbol: 'none',
                color: '#02afff',
                lineStyle: {
                    width: 3
                },
                areaStyle: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgba(2, 175, 255, .3)'
                    },
                        {
                            offset: 1,
                            color: 'rgba(2, 175, 255,0)'
                        },
                    ]),
                },
                label: {
                    show: false,
                },
                data: yData2,
            },
            {
                name: '粮低温',
                type: 'line',
                symbol: 'none',
                color: '#39ff02',
                lineStyle: {
                    width: 3
                },
                areaStyle: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgb(97,154,82)'
                    },
                        {
                            offset: 1,
                            color: 'rgba(2, 175, 255,0)'
                        },
                    ]),
                },
                label: {
                    show: false,
                },
                data: yData3,
            }]
    };
    if (option && typeof option === "object") {
        echart.setOption(option, true);
    }
}
igds-dzhwk-web/src/main/resources/templates/dzhwk/dzhwk.html
@@ -11,6 +11,15 @@
    <link rel="stylesheet" th:href="@{/dzhwk/style.css}"/>
    <link rel="stylesheet" th:href="@{/dzhwk/swiper-bundle.min.css}"/>
    <style>
        .date{
            font-size: 16px;
            line-height: 1.2em;
            text-align: center;
            overflow: hidden;
            color: rgba(145, 206, 255, .5);
        }
    </style>
</head>
<body class="">
@@ -32,7 +41,7 @@
                <div class="m-electronl">
                    <div class="m-swiperl2">
                        <div class="swiper">
                            <div class="swiper-wrapper">
                            <div class="swiper-wrapper" id="depotList">
                                <div class="swiper-slide">
                                    <div class="electron1">
                                        <div class="col-l">
@@ -1693,7 +1702,7 @@
                        </div>
                    </div>
                    <div class="electron2 g-boxl1">
                        <div class="tit">货位名称<em id="depotName">P01-01</em></div>
                        <div class="tit">仓廒<em id="depotName" th:text="${name}">P01-01</em></div>
                        <div class="g-swbtnl">
                            <div class="swiper-button-prev"></div>
                            <div class="swiper-pagination"></div>
@@ -1780,6 +1789,7 @@
<script th:src="@{/dzhwk/common.js}"></script>
<script th:inline="javascript">
    var flag = [[${flag}]];
    var depotList = [[${depotList}]];
    //监听操作
    document.addEventListener('mousemove', resetTimeout);  //鼠标移动
igds-dzhwk-web/src/main/resources/templates/dzhwk/index.html
@@ -1126,20 +1126,20 @@
    var html = "";
    if(depotList){
        $.each(depotList, function (index, item) {
            html += '<div class="swiper-slide"><div class="top"><div class="tit">货位名称 <em>'+item.name+'</em></div><div class="store">仓廒--</div></div><ul class="ul-listl3">';
            html += '<li><div class="con" style="background-color: rgba(3,77,146,.3);"><div class="icon"><img src="/img/dzhwk/iconl18.png" alt=""></div><div class="txt"><div class="num"><em>--</em>°C</div><div class="tt">仓温</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(91,104,225,.25);"><div class="icon"><img src="/img/dzhwk/iconl19.png" alt=""></div><div class="txt"><div class="num"><em>--</em>%</div><div class="tt">仓湿</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(31,133,78,.15);"><div class="icon"><img src="/img/dzhwk/iconl20.png" alt=""></div><div class="txt"><div class="num"><em>--</em>%</div><div class="tt">氧气</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(2,175,255,.15);"><div class="icon"><img src="/img/dzhwk/iconl21.png" alt=""></div><div class="txt"><div class="num"><em>--</em>ppm</div><div class="tt">磷化氢</div></div></div></li></ul>';
            html += '<div class="swiper-slide"><div class="top"><div class="tit">货位名称 <em>'+item.name+'</em></div><div class="store">仓廒'+item.granaryName+'</div></div><ul class="ul-listl3">';
            html += '<li><div class="con" style="background-color: rgba(3,77,146,.3);"><div class="icon"><img src="/img/dzhwk/iconl18.png" alt=""></div><div class="txt"><div class="num"><em>'+item.inTemp+'</em>°C</div><div class="tt">仓温</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(91,104,225,.25);"><div class="icon"><img src="/img/dzhwk/iconl19.png" alt=""></div><div class="txt"><div class="num"><em>'+item.inHumidity+'</em>%</div><div class="tt">仓湿</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(31,133,78,.15);"><div class="icon"><img src="/img/dzhwk/iconl20.png" alt=""></div><div class="txt"><div class="num"><em>'+item.perO2+'</em>%</div><div class="tt">氧气</div></div></div></li>';
            html += '<li><div class="con" style="background-color: rgba(2,175,255,.15);"><div class="icon"><img src="/img/dzhwk/iconl21.png" alt=""></div><div class="txt"><div class="num"><em>'+item.perPh3+'</em>ppm</div><div class="tt">磷化氢</div></div></div></li></ul>';
            html += '<div class="m-infol"><div class="item"><div class="box" style="background-color: rgba(79,158,254,.23);"><ul class="ul-listl4">';
            html += '<li><div class="con"><div class="ll">货位名称</div><div class="rr">'+item.name+'</div></div></li><li><div class="con"><div class="ll">仓房类型</div><div class="rr">--</div></div></li>';
            html += '<li><div class="con"><div class="ll">货位名称</div><div class="rr">'+item.name+'</div></div></li><li><div class="con"><div class="ll">仓房类型</div><div class="rr">'+item.depotTypeName+'</div></div></li>';
            html += '<li><div class="con"><div class="ll">货位状态</div><div class="rr"><div class="btn g-statel"><div class="icon"><img src="/img/dzhwk/iconl22.png" alt=""></div>'+item.depotStatusName+'</div></div></div> </li>';
            html += '<li><div class="con"><div class="ll">粮食储量</div><div class="rr">'+item.storageReal+'吨</div></div></li><li><div class="con"><div class="ll">粮食品种</div><div class="rr">'+item.foodVarietyName+'</div></div></li>';
            html += '<li><div class="con"><div class="ll">粮食等级</div><div class="rr">'+item.foodLevelName+'</div></div></li><li><div class="con"><div class="ll">仓储性质</div><div class="rr">'+item.foodTypeName+'</div> </div></li>';
            html += '<li><div class="con"><div class="ll">入仓时间</div><div class="rr">'+item.storeDate+'</div></div></li><li><div class="con"><div class="ll">粮食年份</div><div class="rr">'+item.foodYear+'</div></div></li></ul>';
            html += '</div></div><div class="item"><div class="box" style="background-color: rgba(3,129,255,.23);"><div class="bgpic" style="background-image: url(/img/dzhwk/imgl5.jpg);"></div><div class="pic"><img src="/img/dzhwk/imgl6.jpg" alt=""></div>';
            html += '</div></div><div class="item"><div class="box" style="background-color: rgba(3,129,255,.23);"><div class="bgpic" style="background-image: url(/img/dzhwk/imgl5.jpg);"></div><div class="pic"><img src="'+item.userImgPath+'" alt=""></div>';
            html += '<ul class="ul-intel"><li><div class="con"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl23.png" alt=""></div>保管员</div><div class="rr">'+item.storeKeeperName+'</div></div></li>';
            html += '<li><div class="con"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl24.png" alt=""></div>电话</div><div class="rr">--</div></div></li></ul></div></div></div></div>';
            html += '<li><div class="con"><div class="ll"><div class="ico"><img src="/img/dzhwk/iconl24.png" alt=""></div>电话</div><div class="rr">'+item.storeKeeperPhone+'</div></div></li></ul></div></div></div></div>';
        })
    }else{
@@ -1168,7 +1168,7 @@
        // },
        loop: true,
        autoplay:{
            delay: 3000,
            delay: 5000,
            disableOnInteraction: false
        },
        pagination: {