Commit ac81e991 authored by jichao's avatar jichao

删除无用的代码

parent 737ee598
......@@ -506,19 +506,12 @@ public class OverViewServiceImpl implements OverViewService {
float total = (float) (Math.floor(((water == null ? 0f : water * 0.91f) + (elec == null ? 0f : elec * 0.785f) + (gas == null ? 0f : gas * 0.19f)) * 100) / 100);
//保存每天的实际碳排放量
EnergyEmissionReal e = new EnergyEmissionReal(null, proId, year, month, day, total);
// Example example = new Example(EnergyEmissionReal.class);
// Example.Criteria criteria = example.createCriteria();
// criteria.andEqualTo("proId", proId);
// criteria.andEqualTo("year", year);
// criteria.andEqualTo("mon", month);
// criteria.andEqualTo("day", day);
int i = energyEmissionRealRepository.insert(e);
if (i > 0) {
EnergyEmissionTotal t = energyEmissionTotalRepository.selectOne(new EnergyEmissionTotal(null, proId, null, year));
if(t != null){
EnergyEmissionPlan p = energyEmissionPlanRepository.selectOne(new EnergyEmissionPlan(null, proId, month, day, null));
Float pEmission = p == null ? 0f : p.getEmission();
System.out.println(pEmission - total + t.getEmission());
t.setEmission(pEmission - total + t.getEmission());
Example example = new Example(BusProjectAreaStat.class);
Example.Criteria criteria = example.createCriteria();
......
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