修改bug
This commit is contained in:
parent
46370fc12a
commit
0e8cfd6af1
|
|
@ -67,5 +67,7 @@ public class Markinfo implements Serializable {
|
||||||
private String heatStationId; // 热站的id
|
private String heatStationId; // 热站的id
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String heatStationName; // 热站的名称
|
private String heatStationName; // 热站的名称
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String companyName; // 热站的名称
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package org.jeecg.modules.heating.job;
|
||||||
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParser;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
|
|
@ -14,7 +16,9 @@ import org.apache.http.impl.client.HttpClientBuilder;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.jeecg.common.util.DateUtils;
|
import org.jeecg.common.util.DateUtils;
|
||||||
import org.jeecg.modules.heating.entity.Heatanalysis;
|
import org.jeecg.modules.heating.entity.Heatanalysis;
|
||||||
|
import org.jeecg.modules.heating.entity.Simconfig;
|
||||||
import org.jeecg.modules.heating.service.HeatanalysisService;
|
import org.jeecg.modules.heating.service.HeatanalysisService;
|
||||||
|
import org.jeecg.modules.heating.service.SimconfigService;
|
||||||
import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig;
|
import org.jeecg.modules.waterFlowConfig.entity.BlWaterFlowConfig;
|
||||||
import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService;
|
import org.jeecg.modules.waterFlowConfig.service.IBlWaterFlowConfigService;
|
||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
|
|
@ -46,6 +50,9 @@ public class FlowanalysisJob implements Job {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBlWaterFlowConfigService WaterFlowConfigService;
|
private IBlWaterFlowConfigService WaterFlowConfigService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SimconfigService simconfigService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
|
|
||||||
|
|
@ -57,45 +64,49 @@ public class FlowanalysisJob implements Job {
|
||||||
try{
|
try{
|
||||||
String sn = config.getSn();
|
String sn = config.getSn();
|
||||||
String json = getWebInfo(sn);
|
String json = getWebInfo(sn);
|
||||||
|
System.out.println("json:"+json);
|
||||||
|
log.info("json:"+json);
|
||||||
if(StringUtils.equals(json,"false")) continue;
|
if(StringUtils.equals(json,"false")) continue;
|
||||||
JSONObject jsonObject = new JSONObject(json);
|
JsonObject jsonObject = JsonParser.parseString(json).getAsJsonObject();
|
||||||
|
|
||||||
log.info("jsonObject:"+jsonObject);
|
log.info("jsonObject:"+jsonObject);
|
||||||
String success = jsonObject.getStr("success");
|
String success = jsonObject.get("success").getAsString();
|
||||||
if(StringUtils.equals(success,"true")){
|
if(StringUtils.equals(success,"true")){
|
||||||
// QueryWrapper<Heatanalysis> heatanalysisQueryWrapper = new QueryWrapper<>();
|
|
||||||
// heatanalysisQueryWrapper.eq("view031",sn);
|
// QueryWrapper<Simconfig> simconfigQueryWrapper = new QueryWrapper<>();
|
||||||
// heatanalysisQueryWrapper.last("limit 1");
|
// simconfigQueryWrapper.eq("source_source_id",config.getSourceSourceId());
|
||||||
// Heatanalysis heatanalysis = heatanalysisService.getOne(heatanalysisQueryWrapper);
|
//
|
||||||
|
// Simconfig simconfig = simconfigService.getOne(simconfigQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
Heatanalysis heatanalysis = new Heatanalysis();
|
Heatanalysis heatanalysis = new Heatanalysis();
|
||||||
// if(heatanalysis != null){
|
// if(heatanalysis != null){
|
||||||
// String view032_old = heatanalysis.getView032();
|
|
||||||
String data = jsonObject.getStr("data");
|
JsonObject dataObject = jsonObject.get("data").getAsJsonObject();
|
||||||
JSONObject dataObject = new JSONObject(data);
|
String view032 = dataObject.get("logat").getAsString();
|
||||||
String view032 = dataObject.getStr("logat");
|
String view033 = dataObject.get("ID").getAsString();
|
||||||
// if(StringUtils.equals(view032,view032_old)){
|
String view034 = dataObject.get("valid").getAsString();
|
||||||
// log.info("--------数据重复---------");
|
String view035 = dataObject.get("gswd").getAsString();
|
||||||
// continue;
|
String view036 = dataObject.get("hswd").getAsString();
|
||||||
// }
|
String view037 = dataObject.get("flowRate").getAsString();
|
||||||
String view033 = dataObject.getStr("ID");
|
String view037_2 = dataObject.get("ssll").getAsString();
|
||||||
String view034 = dataObject.getStr("valid");
|
String view038 = dataObject.get("pflowAccumulator").getAsString();
|
||||||
String view035 = dataObject.getStr("gswd");
|
String view038_2 = dataObject.get("zljll").getAsString();
|
||||||
String view036 = dataObject.getStr("hswd");
|
String view039 = dataObject.get("nflowAccumulator").getAsString();
|
||||||
String view037 = dataObject.getStr("flowRate");
|
String view039_2 = dataObject.get("fljll").getAsString();
|
||||||
String view037_2 = dataObject.getStr("ssll");
|
String view040 = dataObject.get("netflowAccumulator").getAsString();
|
||||||
String view038 = dataObject.getStr("pflowAccumulator");
|
String view040_2 = dataObject.get("jljll").getAsString();
|
||||||
String view038_2 = dataObject.getStr("zljll");
|
String view041 = dataObject.get("ssrl").getAsString();
|
||||||
String view039 = dataObject.getStr("nflowAccumulator");
|
String view042 = dataObject.get("zljrl").getAsString();
|
||||||
String view039_2 = dataObject.getStr("fljll");
|
String view043 = dataObject.get("fljrl").getAsString();
|
||||||
String view040 = dataObject.getStr("netflowAccumulator");
|
String view044 = dataObject.get("jljrl").getAsString();
|
||||||
String view040_2 = dataObject.getStr("jljll");
|
String view045 = dataObject.get("ltsd").getAsString();
|
||||||
String view041 = dataObject.getStr("ssrl");
|
String view046 = dataObject.get("n").getAsString();
|
||||||
String view042 = dataObject.getStr("zljrl");
|
String view047 = dataObject.get("m").getAsString();
|
||||||
String view043 = dataObject.getStr("fljrl");
|
|
||||||
String view044 = dataObject.getStr("jljrl");
|
|
||||||
String view045 = dataObject.getStr("ltsd");
|
|
||||||
String view046 = dataObject.getStr("n");
|
heatanalysis.setView031(sn);
|
||||||
String view047 = dataObject.getStr("m");
|
|
||||||
heatanalysis.setView031(sn);
|
|
||||||
heatanalysis.setView032(view032);
|
heatanalysis.setView032(view032);
|
||||||
heatanalysis.setView033(view033);
|
heatanalysis.setView033(view033);
|
||||||
heatanalysis.setView034(view034);
|
heatanalysis.setView034(view034);
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,8 @@
|
||||||
<select id="sourceList" resultType="org.jeecg.modules.heating.entity.Markinfo">
|
<select id="sourceList" resultType="org.jeecg.modules.heating.entity.Markinfo">
|
||||||
SELECT
|
SELECT
|
||||||
a.id AS heatSourceId,
|
a.id AS heatSourceId,
|
||||||
a.source_name AS heatSourceName
|
a.source_name AS heatSourceName,
|
||||||
|
a.company_name as companyName
|
||||||
FROM bl_heatsource a
|
FROM bl_heatsource a
|
||||||
WHERE a.del_flag = '0'
|
WHERE a.del_flag = '0'
|
||||||
and a.id not in (
|
and a.id not in (
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findSourceList" resultType="org.jeecg.modules.heating.entity.Simconfig">
|
<select id="findSourceList" resultType="org.jeecg.modules.heating.entity.Simconfig">
|
||||||
SELECT id as sourceId, source_name as sourceName
|
SELECT id as sourceId, source_name as sourceName,a.company_name as companyName
|
||||||
FROM bl_heatsource a
|
FROM bl_heatsource a
|
||||||
<where>
|
<where>
|
||||||
a.del_flag = '0'
|
a.del_flag = '0'
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public class BlWaterFlowConfig implements Serializable {
|
||||||
|
|
||||||
/**主键*/
|
/**主键*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private java.lang.Integer id;
|
private java.lang.String id;
|
||||||
/**sn*/
|
/**sn*/
|
||||||
@Excel(name = "sn", width = 15)
|
@Excel(name = "sn", width = 15)
|
||||||
private java.lang.String sn;
|
private java.lang.String sn;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue