Commit d1f7d430dbab6f009e8b3875b7845f8892720be5

Authored by 廖磊
1 parent 00864ff1

营运服务报表 车辆加注表

src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -33,6 +33,7 @@ import com.bsth.entity.mcy_forms.Vehicleloading; @@ -33,6 +33,7 @@ import com.bsth.entity.mcy_forms.Vehicleloading;
33 import com.bsth.entity.mcy_forms.Waybillday; 33 import com.bsth.entity.mcy_forms.Waybillday;
34 import com.bsth.entity.oil.Dlb; 34 import com.bsth.entity.oil.Dlb;
35 import com.bsth.entity.oil.Ylb; 35 import com.bsth.entity.oil.Ylb;
  36 +import com.bsth.entity.realcontrol.ChildTaskPlan;
36 import com.bsth.entity.realcontrol.ScheduleRealInfo; 37 import com.bsth.entity.realcontrol.ScheduleRealInfo;
37 import com.bsth.entity.schedule.SchedulePlanInfo; 38 import com.bsth.entity.schedule.SchedulePlanInfo;
38 import com.bsth.repository.LineRepository; 39 import com.bsth.repository.LineRepository;
@@ -1031,9 +1032,16 @@ public class FormsServiceImpl implements FormsService { @@ -1031,9 +1032,16 @@ public class FormsServiceImpl implements FormsService {
1031 1032
1032 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 1033 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
1033 for (int j = 0; j < listReal.size(); j++) { 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,12 +1049,12 @@ public class FormsServiceImpl implements FormsService {
1041 int ljbc=culateMileageService.culateLjbc(newList,""); 1049 int ljbc=culateMileageService.culateLjbc(newList,"");
1042 double ksgl=culateMileageService.culateKsgl(newList); 1050 double ksgl=culateMileageService.culateKsgl(newList);
1043 double jccgl=culateMileageService.culateJccgl(newList); 1051 double jccgl=culateMileageService.culateJccgl(newList);
1044 - 1052 + double zksgl=Arith.add(ksgl, jccgl);
1045 double sjgl=culateMileageService.culateSjgl(newList); 1053 double sjgl=culateMileageService.culateSjgl(newList);
1046 double ljgl=culateMileageService.culateLjgl(newList); 1054 double ljgl=culateMileageService.culateLjgl(newList);
1047 - 1055 + double zyygl=Arith.add(sjgl, ljgl);
1048 o.setEmptMileage(String.valueOf(Arith.add(ksgl, jccgl))); 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 o.setSjbc(String.valueOf(sjbc+ljbc)); 1058 o.setSjbc(String.valueOf(sjbc+ljbc));
1051 1059
1052 double jzl=0.0; 1060 double jzl=0.0;
@@ -1103,24 +1111,33 @@ public class FormsServiceImpl implements FormsService { @@ -1103,24 +1111,33 @@ public class FormsServiceImpl implements FormsService {
1103 List<ScheduleRealInfo> listReal=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date); 1111 List<ScheduleRealInfo> listReal=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date);
1104 for (int i = 0; i < list.size(); i++) { 1112 for (int i = 0; i < list.size(); i++) {
1105 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 1113 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  1114 + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>();
1106 Vehicleloading sin=list.get(i); 1115 Vehicleloading sin=list.get(i);
1107 sin.setrQ(date); 1116 sin.setrQ(date);
1108 String jsy=sin.getJgh(); 1117 String jsy=sin.getJgh();
1109 String clzbh=sin.getClzbh(); 1118 String clzbh=sin.getClzbh();
1110 for (int j = 0; j < listReal.size(); j++) { 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 newList.add(s); 1130 newList.add(s);
1114 } 1131 }
1115 } 1132 }
1116 1133
1117 int jhbc=culateMileageService.culateJhbc(newList, ""); 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 double zyygl=Arith.add(yygl, ljgl); 1141 double zyygl=Arith.add(yygl, ljgl);
1125 double zksgl=Arith.add(ksgl, jcgl); 1142 double zksgl=Arith.add(ksgl, jcgl);
1126 sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); 1143 sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl)));