diff --git a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java index bdbd3ef3..bfa220f5 100644 --- a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java +++ b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java @@ -262,21 +262,13 @@ public class PwrGnrSimService { for (PwrGnrSimRoofResponse m : moduleGroupList) { if (data.getRoofSurfaceId().equals(m.getRoofSurfaceId())) { dSpecification += m.getTotSpecification(); - if (j == 0) { - if(pwrGnrSimReq.getModule1().equals(m.getItemId())){ - dModuleInput1[i] = Integer.parseInt(m.getAmount()); - }else if(pwrGnrSimReq.getModule2().equals(m.getItemId())){ - dModuleInput2[i] = Integer.parseInt(m.getAmount()); - }else if(pwrGnrSimReq.getModule3().equals(m.getItemId())){ - dModuleInput3[i] = Integer.parseInt(m.getAmount()); - } - - } else if (j == 1) { - dModuleInput2[i] = Integer.parseInt(m.getAmount()); - } else { - dModuleInput3[i] = Integer.parseInt(m.getAmount()); - } - j++; + if (m.getItemId().equals(pwrGnrSimReq.getModule1())) { + dModuleInput1[i] = Integer.parseInt(m.getAmount()); + } else if (m.getItemId().equals(pwrGnrSimReq.getModule2())) { + dModuleInput2[i] = Integer.parseInt(m.getAmount()); + } else if (m.getItemId().equals(pwrGnrSimReq.getModule3())) { + dModuleInput3[i] = Integer.parseInt(m.getAmount()); + } } } i++;