Browse Source

值际对标代码提交

xieshengjie 1 year ago
parent
commit
dd8793229e

+ 2 - 2
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/init/CacheContext.java

@@ -410,7 +410,7 @@ public class CacheContext implements CommandLineRunner {
             wtmap.put(wt.getId(), wt);
             //标杆风机初始化
             wtstandardmap.put(wt.getId(), wt.getId());
-            /*String wtString = redisService.get(wt.getId());
+            String wtString = redisService.get(wt.getId());
             Map<String, ProBasicEquipmentPoint> stringWindturbinetestingpointnewMap = JSONObject.parseObject(wtString, new TypeReference<Map<String, ProBasicEquipmentPoint>>() {
             });
             wtpAimap.put(wt.getId(), stringWindturbinetestingpointnewMap);
@@ -468,7 +468,7 @@ public class CacheContext implements CommandLineRunner {
                 Map<String, ProBasicOrganizeTree> map = new HashMap<>();
                 map.put(wt.getId(), wt);
                 cmwtmap.put(wt.getOrgType().contains("ZGS"), map);
-            }*/
+            }
         });
 
 

+ 1 - 1
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/mapper/auto/ProEconBenchmarkingBetweenMapper.java

@@ -18,7 +18,7 @@ import java.util.List;
  */
 public interface ProEconBenchmarkingBetweenMapper extends BaseMapper<ProEconBenchmarkingBetween> {
 
-    @Select("select duty_name dutyName,sum(theoretical_generatity) theoreticalGeneratity,sum(generatity) generatity,sum(fault_loss) faultLoss,sum(main_loss) mainLoss,sum(performance_loss) performanceLoss,sum(rationing_loss) rationingLoss,sum(involves_loss) involvesLoss from pro_econ_benchmarking_between where theday>=#{begin} and theday <=#{end} group by duty_name ")
+    @Select("select duty_name,theday,sum(theoretical_generatity) theoreticalGeneratity,sum(generatity) generatity,sum(fault_loss) faultLoss,sum(main_loss) mainLoss,sum(performance_loss) performanceLoss,sum(rationing_loss) rationingLoss,sum(involves_loss) involvesLoss from pro_econ_benchmarking_between where theday>=#{begin} and theday <=#{end} group by duty_name,theday ")
     public List<ProEconBenchmarkingBetween> findByBeginAndEnd(@Param(value = "begin") Date begin, @Param(value = "end")Date end);
 
 }

+ 4 - 2
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/model/auto/ProEconBenchmarkingBetween.java

@@ -1,11 +1,12 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.util.Date;
-
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.Date;
+
 /**
  * <p>
  * 
@@ -15,6 +16,7 @@ import lombok.EqualsAndHashCode;
  * @since 2023-02-03
  */
 @Data
+@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
 @EqualsAndHashCode(callSuper = true)
 public class ProEconBenchmarkingBetween extends Model {
 

+ 4 - 3
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/model/auto/ProEconDutySchedule.java

@@ -1,12 +1,12 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.time.LocalDate;
-import java.util.Date;
-
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.Date;
+
 /**
  * <p>
  * 
@@ -16,6 +16,7 @@ import lombok.EqualsAndHashCode;
  * @since 2023-02-03
  */
 @Data
+@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
 @EqualsAndHashCode(callSuper = true)
 public class ProEconDutySchedule extends Model {
 

+ 5 - 5
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/util/realtimesource/EdosUtil.java

@@ -519,11 +519,11 @@ public class EdosUtil implements IEdosUtil {
 
             try {
                 String url ="";
-                if (point.getTypeId().equals("G")){
+//                if (point.getTypeId().equals("G")){
                     url = baseURL2 + "/history/snap?null=0";
-                }else {
+//                }else {
                     url = baseURL + "/history/snap?null=0";
-                }
+//                }
                 //tagName 或thingType,thingId,uniformCode可以确定一个标签点
                 if (tagName.isPresent())
                     url = url + "&tagName=" + tagName.get();
@@ -561,9 +561,9 @@ public class EdosUtil implements IEdosUtil {
                             // 则代表该时间节点快照有效,否则为0
 
                             String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime() ;
-                            if (point.getTypeId().equals("G")){
+//                            if (point.getTypeId().equals("G")){
                                 rawUrl = baseURL2 + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime() ;
-                            }
+//                            }
 
                             ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
                             JSONObject jsonObjectSection = sectionResp.getBody();