已重命名7个文件
已添加11个文件
已修改11个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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;//å
³é®å |
| | | } |
| | |
| | | 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") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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;//æ¯å¦æ¥è¯¢ååä¿¡æ¯ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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/dzhwk/service/repository/GasRepository.java ÐÞ¸Ä |
| | |
| | | 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; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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/dzhwk/data/GrainData.java ÐÞ¸Ä |
| | |
| | | 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/dzhwk/data/GrainIotData.java ÐÞ¸Ä |
| | |
| | | package com.fzzy.igds.dzhwk.data; |
| | | package com.fzzy.igds.grain.dto; |
| | | |
| | | import lombok.Data; |
| | | |
ÎļþÃû´Ó igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainLay.java ÐÞ¸Ä |
| | |
| | | package com.fzzy.igds.dzhwk.data; |
| | | package com.fzzy.igds.grain.dto; |
| | | |
| | | import com.bstek.dorado.annotation.PropertyDef; |
| | | import lombok.Data; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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/dzhwk/data/GrainPoint.java ÐÞ¸Ä |
| | |
| | | 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/dzhwk/data/GrainRow.java ÐÞ¸Ä |
| | |
| | | package com.fzzy.igds.dzhwk.data; |
| | | package com.fzzy.igds.grain.dto; |
| | | |
| | | import com.bstek.dorado.annotation.PropertyDef; |
| | | import lombok.Data; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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/dzhwk/service/repository/GrainRepository.java ÐÞ¸Ä |
| | |
| | | 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; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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()); |
| | |
| | | @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); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| | |
| | | |
| | | 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; |
| | |
| | | |
| | | 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; |
| | |
| | | <systemPath>${project.basedir}/src/main/resources/lib/dorado-skin-ruoyi-1.0.10.jar</systemPath> |
| | | </dependency> |
| | | |
| | | |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | 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; |
| | |
| | | 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"); |
| | |
| | | * @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"; |
| | | } |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | private ScreenSerService screenSerService; |
| | | @Resource |
| | | private DepotService depotService; |
| | | @Resource |
| | | private GranaryService granaryService; |
| | | @Resource |
| | | private ISysUserService userService; |
| | | @Resource |
| | | private GrainService grainService; |
| | | |
| | | @Resource |
| | | private GasService gasService; |
| | | |
| | | /** |
| | | * æ ¹æ®åä½IDè·ååä½ä¿¡æ¯ |
| | |
| | | * @param sid |
| | | * @return |
| | | */ |
| | | public List<Depot> getDepotsByGid(String sid) { |
| | | public List<HwkDepotDto> getDepotsByGid(String sid) { |
| | | |
| | | if(StringUtils.isEmpty(sid)){ |
| | | return null; |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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("* "); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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 () { |
| | | |
| | | 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, |
| | | // autoplay: { |
| | | // delay: 2500, |
| | | // disableOnInteraction: false, |
| | | // }, |
| | | loop: true, |
| | | autoplay:{ |
| | | delay: 5000, |
| | | disableOnInteraction: false |
| | | }, |
| | | pagination: { |
| | | el: '.g-swbtnl .swiper-pagination', |
| | | type: 'fraction', |
| | | }, |
| | | navigation: { |
| | | nextEl: '.g-swbtnl .swiper-button-next', |
| | | prevEl: '.g-swbtnl .swiper-button-prev', |
| | | }, |
| | | }); |
| | | }); |
| | | |
| | | function initLineEchart(id, xData, yData, yData2, yData3) { |
| | | var echart = null |
| | | var dom = document.getElementById(id); |
| | |
| | | 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 swiper = new Swiper('.m-swiperl2 .swiper', { |
| | | slidesPerView: 1, |
| | | // autoplay: { |
| | | // delay: 2500, |
| | | // disableOnInteraction: false, |
| | | // }, |
| | | // loop: true, |
| | | pagination: { |
| | | el: '.g-swbtnl .swiper-pagination', |
| | | type: 'fraction', |
| | | }, |
| | | navigation: { |
| | | nextEl: '.g-swbtnl .swiper-button-next', |
| | | prevEl: '.g-swbtnl .swiper-button-prev', |
| | | }, |
| | | }); |
| | | }); |
| | |
| | | |
| | | <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=""> |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | <script th:src="@{/dzhwk/common.js}"></script> |
| | | <script th:inline="javascript"> |
| | | var flag = [[${flag}]]; |
| | | var depotList = [[${depotList}]]; |
| | | |
| | | //çå¬æä½ |
| | | document.addEventListener('mousemove', resetTimeout); //é¼ æ ç§»å¨ |
| | |
| | | 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{ |
| | |
| | | // }, |
| | | loop: true, |
| | | autoplay:{ |
| | | delay: 3000, |
| | | delay: 5000, |
| | | disableOnInteraction: false |
| | | }, |
| | | pagination: { |