Commit e39e6b43 authored by tangwei's avatar tangwei

判断不存在

parent 78bbf8cf
......@@ -45,6 +45,7 @@ public class HYGFJPDayPowerImpl implements AscriptionService {
for (HYGFJPDayPower dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getTationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -52,6 +53,7 @@ public class HYGFJPDayPowerImpl implements AscriptionService {
hygfjpDayPowerMapper.insert(dayPower);
}
}
}
......
......@@ -63,6 +63,7 @@ public class HYGFJPInverterWarnImpl implements AscriptionService {
for (HYGFJPInverterWarn dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -70,6 +71,7 @@ public class HYGFJPInverterWarnImpl implements AscriptionService {
hygfjpInverterWarnMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -62,6 +62,7 @@ public class HYGFJPStationPowerHistoryImpl implements AscriptionService {
for (HYGFJPStationPowerHistory dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -69,6 +70,7 @@ public class HYGFJPStationPowerHistoryImpl implements AscriptionService {
hygfjpStationPowerHistoryMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -61,6 +61,7 @@ public class TdHYGFInverterDayGenerateImpl implements AscriptionService {
for (TdHYGFInverterDayGenerate dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -68,6 +69,7 @@ public class TdHYGFInverterDayGenerateImpl implements AscriptionService {
tdHYGFInverterDayGenerateMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -52,6 +52,7 @@ public class TdHYGFInverterMonthGenerateImpl implements AscriptionService {
for (TdHYGFInverterMonthGenerate dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -59,6 +60,7 @@ public class TdHYGFInverterMonthGenerateImpl implements AscriptionService {
tdHYGFInverterMonthGenerateMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -51,6 +51,7 @@ public class TdHYGFInverterTotalGenerateImpl implements AscriptionService {
for (TdHYGFInverterTotalGenerate dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -58,6 +59,7 @@ public class TdHYGFInverterTotalGenerateImpl implements AscriptionService {
tdHYGFInverterTotalGenerateMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -51,6 +51,7 @@ public class TdHYGFInverterYearGenerateImpl implements AscriptionService {
for (TdHYGFInverterYearGenerate dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -58,6 +59,7 @@ public class TdHYGFInverterYearGenerateImpl implements AscriptionService {
tdHYGFInverterYearGenerateMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -52,6 +52,7 @@ public class TdHYGFStationDayGenerateImpl implements AscriptionService {
for (TdHYGFStationDayGenerate dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null){
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -59,6 +60,7 @@ public class TdHYGFStationDayGenerateImpl implements AscriptionService {
tdHYGFStationDayGenerateMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -51,6 +51,7 @@ public class TdHYGFStationMonthGenerateImpl implements AscriptionService {
for (TdHYGFStationMonthGenerate dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null){
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -58,6 +59,7 @@ public class TdHYGFStationMonthGenerateImpl implements AscriptionService {
tdHYGFStationMonthGenerateMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -51,6 +51,7 @@ public class TdHYGFStationYearGenerateImpl implements AscriptionService {
for (TdHYGFStationYearGenerate dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
dayPower.setStationName(jpStation.getName());
......@@ -58,6 +59,7 @@ public class TdHYGFStationYearGenerateImpl implements AscriptionService {
tdHYGFStationYearGenerateMapper.insert(dayPower);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment