Commit 439fe48067af07e90794d5885ba3167a72f3fb06

Authored by 廖磊
1 parent bce4952d

路单数据 报表

src/main/java/com/bsth/controller/forms/ExportController.java
@@ -186,7 +186,7 @@ public class ExportController { @@ -186,7 +186,7 @@ public class ExportController {
186 m.put("i", i); 186 m.put("i", i);
187 m.put("rQ", l.getrQ()); 187 m.put("rQ", l.getrQ());
188 m.put("gS", l.getgS()); 188 m.put("gS", l.getgS());
189 - m.put("xL", l.getxL()); 189 + m.put("xL", l.getXlmc());
190 m.put("clzbh", l.getClzbh()); 190 m.put("clzbh", l.getClzbh());
191 m.put("jsy", l.getJsy()); 191 m.put("jsy", l.getJsy());
192 m.put("jName", l.getjName()); 192 m.put("jName", l.getjName());
src/main/java/com/bsth/entity/mcy_forms/Singledata.java
@@ -7,6 +7,7 @@ public class Singledata { @@ -7,6 +7,7 @@ public class Singledata {
7 private String gS;//所属公司 7 private String gS;//所属公司
8 8
9 private String xL;//线路 9 private String xL;//线路
  10 + private String xlmc;//线路名称
10 11
11 private String clzbh;//车号 12 private String clzbh;//车号
12 13
@@ -141,6 +142,14 @@ public class Singledata { @@ -141,6 +142,14 @@ public class Singledata {
141 public void setJhjl(String jhjl) { 142 public void setJhjl(String jhjl) {
142 this.jhjl = jhjl; 143 this.jhjl = jhjl;
143 } 144 }
  145 +
  146 + public String getXlmc() {
  147 + return xlmc;
  148 + }
  149 +
  150 + public void setXlmc(String xlmc) {
  151 + this.xlmc = xlmc;
  152 + }
144 153
145 154
146 155
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -765,7 +765,8 @@ public class FormsServiceImpl implements FormsService { @@ -765,7 +765,8 @@ public class FormsServiceImpl implements FormsService {
765 765
766 sin.setEmptMileage(String.valueOf(zksgl)); 766 sin.setEmptMileage(String.valueOf(zksgl));
767 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); 767 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc)));
768 - sin.setxL(BasicData.lineCode2NameMap.get(y.getXlbm())); 768 + sin.setxL(y.getXlbm());
  769 + sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm()));
769 sin.setClzbh(clzbh); 770 sin.setClzbh(clzbh);
770 sin.setJsy(jsy); 771 sin.setJsy(jsy);
771 sin.setrQ(startDate); 772 sin.setrQ(startDate);
@@ -787,19 +788,28 @@ public class FormsServiceImpl implements FormsService { @@ -787,19 +788,28 @@ public class FormsServiceImpl implements FormsService {
787 String line=y.getXlbm(); 788 String line=y.getXlbm();
788 String clzbh=y.getNbbm(); 789 String clzbh=y.getNbbm();
789 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 790 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  791 + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>();
790 for (int j = 0; j < listReal.size(); j++) { 792 for (int j = 0; j < listReal.size(); j++) {
791 ScheduleRealInfo s=listReal.get(j); 793 ScheduleRealInfo s=listReal.get(j);
792 if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) 794 if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)
793 &&s.getXlBm().equals(line)){ 795 &&s.getXlBm().equals(line)){
794 newList.add(s); 796 newList.add(s);
  797 + Set<ChildTaskPlan> cts = s.getcTasks();
  798 + if(cts != null && cts.size() > 0){
  799 + newList_.add(s);
  800 + }else{
  801 + if(s.getZdsjActual()!=null){
  802 + newList_.add(s);
  803 + }
  804 + }
795 } 805 }
796 } 806 }
797 double jhgl=culateMileageService.culateJhgl(newList); 807 double jhgl=culateMileageService.culateJhgl(newList);
798 double jhjcc=culateMileageService.culateJhJccgl(newList); 808 double jhjcc=culateMileageService.culateJhJccgl(newList);
799 - double yygl=culateMileageService.culateSjgl(newList);  
800 - double ljgl=culateMileageService.culateLjgl(newList);  
801 - double ksgl=culateMileageService.culateKsgl(newList);  
802 - double jcgl=culateMileageService.culateJccgl(newList); 809 + double yygl=culateMileageService.culateSjgl(newList_);
  810 + double ljgl=culateMileageService.culateLjgl(newList_);
  811 + double ksgl=culateMileageService.culateKsgl(newList_);
  812 + double jcgl=culateMileageService.culateJccgl(newList_);
803 813
804 double zyygl=Arith.add(yygl, ljgl); 814 double zyygl=Arith.add(yygl, ljgl);
805 double zksgl=Arith.add(ksgl, jcgl); 815 double zksgl=Arith.add(ksgl, jcgl);
@@ -809,7 +819,8 @@ public class FormsServiceImpl implements FormsService { @@ -809,7 +819,8 @@ public class FormsServiceImpl implements FormsService {
809 819
810 sin.setEmptMileage(String.valueOf(zksgl)); 820 sin.setEmptMileage(String.valueOf(zksgl));
811 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); 821 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc)));
812 - sin.setxL(BasicData.lineCode2NameMap.get(y.getXlbm())); 822 + sin.setxL(y.getXlbm());
  823 + sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm()));
813 sin.setClzbh(clzbh); 824 sin.setClzbh(clzbh);
814 sin.setJsy(jsy); 825 sin.setJsy(jsy);
815 sin.setrQ(startDate); 826 sin.setrQ(startDate);
@@ -823,10 +834,10 @@ public class FormsServiceImpl implements FormsService { @@ -823,10 +834,10 @@ public class FormsServiceImpl implements FormsService {
823 listD.add(sin); 834 listD.add(sin);
824 } 835 }
825 836
826 - Collections.sort(listY,new SingledataByXlbm());  
827 - Collections.sort(listD,new SingledataByXlbm());  
828 - list.addAll(listY);  
829 - list.addAll(listD); 837 + Collections.sort(listY,new SingledataByXlbm());
  838 + Collections.sort(listD,new SingledataByXlbm());
  839 + list.addAll(listY);
  840 + list.addAll(listD);
830 }else{ 841 }else{
831 String sql="select r.s_gh,r.s_name, " 842 String sql="select r.s_gh,r.s_name, "
832 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" 843 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm"
@@ -862,19 +873,29 @@ public class FormsServiceImpl implements FormsService { @@ -862,19 +873,29 @@ public class FormsServiceImpl implements FormsService {
862 String line=sin.getxL(); 873 String line=sin.getxL();
863 String clzbh=sin.getClzbh(); 874 String clzbh=sin.getClzbh();
864 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 875 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  876 + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>();
  877 +
865 for (int j = 0; j < listReal.size(); j++) { 878 for (int j = 0; j < listReal.size(); j++) {
866 ScheduleRealInfo s=listReal.get(j); 879 ScheduleRealInfo s=listReal.get(j);
867 if(s.getsGh().equals(jsy) && s.getClZbh().equals(clzbh) 880 if(s.getsGh().equals(jsy) && s.getClZbh().equals(clzbh)
868 &&s.getXlBm().equals(line)){ 881 &&s.getXlBm().equals(line)){
869 newList.add(s); 882 newList.add(s);
  883 + Set<ChildTaskPlan> cts = s.getcTasks();
  884 + if(cts != null && cts.size() > 0){
  885 + newList_.add(s);
  886 + }else{
  887 + if(s.getZdsjActual()!=null){
  888 + newList_.add(s);
  889 + }
  890 + }
870 } 891 }
871 } 892 }
872 double jhgl=culateMileageService.culateJhgl(newList); 893 double jhgl=culateMileageService.culateJhgl(newList);
873 double jhjcc=culateMileageService.culateJhJccgl(newList); 894 double jhjcc=culateMileageService.culateJhJccgl(newList);
874 - double yygl=culateMileageService.culateSjgl(newList);  
875 - double ljgl=culateMileageService.culateLjgl(newList);  
876 - double ksgl=culateMileageService.culateKsgl(newList);  
877 - double jcgl=culateMileageService.culateJccgl(newList); 895 + double yygl=culateMileageService.culateSjgl(newList_);
  896 + double ljgl=culateMileageService.culateLjgl(newList_);
  897 + double ksgl=culateMileageService.culateKsgl(newList_);
  898 + double jcgl=culateMileageService.culateJccgl(newList_);
878 899
879 double zyygl=Arith.add(yygl, ljgl); 900 double zyygl=Arith.add(yygl, ljgl);
880 double zksgl=Arith.add(ksgl, jcgl); 901 double zksgl=Arith.add(ksgl, jcgl);
src/main/resources/static/pages/mforms/singledatas/singledata.html
@@ -221,7 +221,7 @@ @@ -221,7 +221,7 @@
221 <td>{{i+1}}</td> 221 <td>{{i+1}}</td>
222 <td>{{obj.rQ}}</td> 222 <td>{{obj.rQ}}</td>
223 <td>{{obj.gS}}</td> 223 <td>{{obj.gS}}</td>
224 - <td>{{obj.xL}}</td> 224 + <td>{{obj.xlmc}}</td>
225 <td>{{obj.clzbh}}</td> 225 <td>{{obj.clzbh}}</td>
226 <td>{{obj.jsy}}</td> 226 <td>{{obj.jsy}}</td>
227 <td>{{obj.jName}}</td> 227 <td>{{obj.jName}}</td>