作者 kgy

项目部署

@@ -1932,13 +1932,11 @@ public class ProjectServiceImpl implements ProjectService { @@ -1932,13 +1932,11 @@ public class ProjectServiceImpl implements ProjectService {
1932 @Override 1932 @Override
1933 public Map<String, Object> no2_1Save(String synthesize_no_2_1_new, Double electricityAh) { 1933 public Map<String, Object> no2_1Save(String synthesize_no_2_1_new, Double electricityAh) {
1934 String id = ""; 1934 String id = "";
1935 - log.warn("建筑信息 集合 -------------------------- --------------------------------{}", synthesize_no_2_1_new.toString());  
1936 List<Synthesize_no_2_1New> synthesize_no_2_1s = JSON.parseArray(synthesize_no_2_1_new, Synthesize_no_2_1New.class); 1935 List<Synthesize_no_2_1New> synthesize_no_2_1s = JSON.parseArray(synthesize_no_2_1_new, Synthesize_no_2_1New.class);
1937 if (org.apache.commons.lang3.StringUtils.isNotEmpty(synthesize_no_2_1s.get(0).getPid()) && !synthesize_no_2_1s.isEmpty()) { 1936 if (org.apache.commons.lang3.StringUtils.isNotEmpty(synthesize_no_2_1s.get(0).getPid()) && !synthesize_no_2_1s.isEmpty()) {
1938 -  
1939 synthesize_no_2_1Service.remove(new QueryWrapper<Synthesize_no_2_1>().lambda().eq(Synthesize_no_2_1::getPid, synthesize_no_2_1s.get(0).getPid())); 1937 synthesize_no_2_1Service.remove(new QueryWrapper<Synthesize_no_2_1>().lambda().eq(Synthesize_no_2_1::getPid, synthesize_no_2_1s.get(0).getPid()));
1940 - calculateLoadService.remove(new QueryWrapper<CalculateLoad>().lambda().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid()));  
1941 - CalculateLoad serviceOne = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid())); 1938 + //calculateLoadService.remove(new QueryWrapper<CalculateLoad>().lambda().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid()));
  1939 + //CalculateLoad serviceOne = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid()));
1942 for (Synthesize_no_2_1New synthesize_no_2_1 : synthesize_no_2_1s) { 1940 for (Synthesize_no_2_1New synthesize_no_2_1 : synthesize_no_2_1s) {
1943 Synthesize_no_2_1 synthesizeNo21 = new Synthesize_no_2_1(); 1941 Synthesize_no_2_1 synthesizeNo21 = new Synthesize_no_2_1();
1944 BeanUtils.copyProperties(synthesize_no_2_1, synthesizeNo21); 1942 BeanUtils.copyProperties(synthesize_no_2_1, synthesizeNo21);
@@ -2029,13 +2027,19 @@ public class ProjectServiceImpl implements ProjectService { @@ -2029,13 +2027,19 @@ public class ProjectServiceImpl implements ProjectService {
2029 2027
2030 } 2028 }
2031 //CalculateLoad serviceOne = calculateLoadService.getById(synthesizeNo21.getId()); 2029 //CalculateLoad serviceOne = calculateLoadService.getById(synthesizeNo21.getId());
  2030 + CalculateLoad serviceOne = calculateLoadService.getById(synthesizeNo21.getId());
2032 if (!StringUtils.isEmpty(serviceOne)) { 2031 if (!StringUtils.isEmpty(serviceOne)) {
2033 - calculateLoad.setId(serviceOne.getId());  
2034 - calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand)));  
2035 - calculateLoad.setNo2(Double.valueOf(df.format(annualTotalHeatRequirement)));  
2036 - calculateLoad.setNo3(Double.valueOf(df.format(annualTotalCoolingDemand)));  
2037 - calculateLoad.setNo4(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));  
2038 - calculateLoad.setAid(synthesizeNo21.getBuildingTypeId()); 2032 + serviceOne.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand)));
  2033 + serviceOne.setNo2(Double.valueOf(df.format(annualTotalHeatRequirement)));
  2034 + serviceOne.setNo3(Double.valueOf(df.format(annualTotalCoolingDemand)));
  2035 + serviceOne.setNo4(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));
  2036 + serviceOne.setCid(synthesizeNo21.getPid());
  2037 + serviceOne.setAid(synthesizeNo21.getBuildingTypeId());
  2038 + serviceOne.setNo11(serviceOne.getNo11());
  2039 + serviceOne.setNo22(serviceOne.getNo22());
  2040 + serviceOne.setNo33(serviceOne.getNo33());
  2041 + serviceOne.setNo44(serviceOne.getNo44());
  2042 + calculateLoadService.updateById(serviceOne);
2039 } else { 2043 } else {
2040 calculateLoad.setId(synthesizeNo21.getId()); 2044 calculateLoad.setId(synthesizeNo21.getId());
2041 calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand))); 2045 calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand)));
@@ -2048,8 +2052,8 @@ public class ProjectServiceImpl implements ProjectService { @@ -2048,8 +2052,8 @@ public class ProjectServiceImpl implements ProjectService {
2048 calculateLoad.setNo44(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement))); 2052 calculateLoad.setNo44(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));
2049 calculateLoad.setCid(synthesizeNo21.getPid()); 2053 calculateLoad.setCid(synthesizeNo21.getPid());
2050 calculateLoad.setAid(synthesizeNo21.getBuildingTypeId()); 2054 calculateLoad.setAid(synthesizeNo21.getBuildingTypeId());
  2055 + calculateLoadService.saveOrUpdate(calculateLoad);
2051 } 2056 }
2052 - calculateLoadService.saveOrUpdate(calculateLoad);  
2053 } 2057 }
2054 2058
2055 } 2059 }