Commit d1f7d430dbab6f009e8b3875b7845f8892720be5
1 parent
00864ff1
营运服务报表 车辆加注表
Showing
1 changed file
with
31 additions
and
14 deletions
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| ... | ... | @@ -33,6 +33,7 @@ import com.bsth.entity.mcy_forms.Vehicleloading; |
| 33 | 33 | import com.bsth.entity.mcy_forms.Waybillday; |
| 34 | 34 | import com.bsth.entity.oil.Dlb; |
| 35 | 35 | import com.bsth.entity.oil.Ylb; |
| 36 | +import com.bsth.entity.realcontrol.ChildTaskPlan; | |
| 36 | 37 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 37 | 38 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 38 | 39 | import com.bsth.repository.LineRepository; |
| ... | ... | @@ -1031,9 +1032,16 @@ public class FormsServiceImpl implements FormsService { |
| 1031 | 1032 | |
| 1032 | 1033 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 1033 | 1034 | for (int j = 0; j < listReal.size(); j++) { |
| 1034 | - ScheduleRealInfo s=listReal.get(j); | |
| 1035 | - if(s.getXlBm().equals(line) && !lineSet.contains(s.getXlName())){ | |
| 1036 | - newList.add(s); | |
| 1035 | + ScheduleRealInfo s = listReal.get(j); | |
| 1036 | + if (s.getXlBm().equals(line) && !lineSet.contains(s.getXlName())) { | |
| 1037 | + Set<ChildTaskPlan> cts = s.getcTasks(); | |
| 1038 | + if (cts != null && cts.size() > 0) { | |
| 1039 | + newList.add(s); | |
| 1040 | + } else { | |
| 1041 | + if (s.getZdsjActual() != null) { | |
| 1042 | + newList.add(s); | |
| 1043 | + } | |
| 1044 | + } | |
| 1037 | 1045 | } |
| 1038 | 1046 | } |
| 1039 | 1047 | |
| ... | ... | @@ -1041,12 +1049,12 @@ public class FormsServiceImpl implements FormsService { |
| 1041 | 1049 | int ljbc=culateMileageService.culateLjbc(newList,""); |
| 1042 | 1050 | double ksgl=culateMileageService.culateKsgl(newList); |
| 1043 | 1051 | double jccgl=culateMileageService.culateJccgl(newList); |
| 1044 | - | |
| 1052 | + double zksgl=Arith.add(ksgl, jccgl); | |
| 1045 | 1053 | double sjgl=culateMileageService.culateSjgl(newList); |
| 1046 | 1054 | double ljgl=culateMileageService.culateLjgl(newList); |
| 1047 | - | |
| 1055 | + double zyygl=Arith.add(sjgl, ljgl); | |
| 1048 | 1056 | o.setEmptMileage(String.valueOf(Arith.add(ksgl, jccgl))); |
| 1049 | - o.setXsgl(String.valueOf(Arith.add(sjgl, ljgl))); | |
| 1057 | + o.setXsgl(String.valueOf(Arith.add(zyygl, zksgl))); | |
| 1050 | 1058 | o.setSjbc(String.valueOf(sjbc+ljbc)); |
| 1051 | 1059 | |
| 1052 | 1060 | double jzl=0.0; |
| ... | ... | @@ -1103,24 +1111,33 @@ public class FormsServiceImpl implements FormsService { |
| 1103 | 1111 | List<ScheduleRealInfo> listReal=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date); |
| 1104 | 1112 | for (int i = 0; i < list.size(); i++) { |
| 1105 | 1113 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 1114 | + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | |
| 1106 | 1115 | Vehicleloading sin=list.get(i); |
| 1107 | 1116 | sin.setrQ(date); |
| 1108 | 1117 | String jsy=sin.getJgh(); |
| 1109 | 1118 | String clzbh=sin.getClzbh(); |
| 1110 | 1119 | for (int j = 0; j < listReal.size(); j++) { |
| 1111 | - ScheduleRealInfo s=listReal.get(j); | |
| 1112 | - if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)){ | |
| 1120 | + ScheduleRealInfo s = listReal.get(j); | |
| 1121 | + if (s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)) { | |
| 1122 | + Set<ChildTaskPlan> cts = s.getcTasks(); | |
| 1123 | + if (cts != null && cts.size() > 0) { | |
| 1124 | + newList_.add(s); | |
| 1125 | + } else { | |
| 1126 | + if (s.getZdsjActual() != null) { | |
| 1127 | + newList_.add(s); | |
| 1128 | + } | |
| 1129 | + } | |
| 1113 | 1130 | newList.add(s); |
| 1114 | 1131 | } |
| 1115 | 1132 | } |
| 1116 | 1133 | |
| 1117 | 1134 | int jhbc=culateMileageService.culateJhbc(newList, ""); |
| 1118 | - int sjbc=culateMileageService.culateSjbc(newList, ""); | |
| 1119 | - int ljbc=culateMileageService.culateLjbc(newList, ""); | |
| 1120 | - double yygl=culateMileageService.culateSjgl(newList); | |
| 1121 | - double ljgl=culateMileageService.culateLjgl(newList); | |
| 1122 | - double ksgl=culateMileageService.culateKsgl(newList); | |
| 1123 | - double jcgl=culateMileageService.culateJccgl(newList); | |
| 1135 | + int sjbc=culateMileageService.culateSjbc(newList_, ""); | |
| 1136 | + int ljbc=culateMileageService.culateLjbc(newList_, ""); | |
| 1137 | + double yygl=culateMileageService.culateSjgl(newList_); | |
| 1138 | + double ljgl=culateMileageService.culateLjgl(newList_); | |
| 1139 | + double ksgl=culateMileageService.culateKsgl(newList_); | |
| 1140 | + double jcgl=culateMileageService.culateJccgl(newList_); | |
| 1124 | 1141 | double zyygl=Arith.add(yygl, ljgl); |
| 1125 | 1142 | double zksgl=Arith.add(ksgl, jcgl); |
| 1126 | 1143 | sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); | ... | ... |