Commit 439fe48067af07e90794d5885ba3167a72f3fb06
1 parent
bce4952d
路单数据 报表
Showing
4 changed files
with
46 additions
and
16 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| ... | ... | @@ -186,7 +186,7 @@ public class ExportController { |
| 186 | 186 | m.put("i", i); |
| 187 | 187 | m.put("rQ", l.getrQ()); |
| 188 | 188 | m.put("gS", l.getgS()); |
| 189 | - m.put("xL", l.getxL()); | |
| 189 | + m.put("xL", l.getXlmc()); | |
| 190 | 190 | m.put("clzbh", l.getClzbh()); |
| 191 | 191 | m.put("jsy", l.getJsy()); |
| 192 | 192 | m.put("jName", l.getjName()); | ... | ... |
src/main/java/com/bsth/entity/mcy_forms/Singledata.java
| ... | ... | @@ -7,6 +7,7 @@ public class Singledata { |
| 7 | 7 | private String gS;//所属公司 |
| 8 | 8 | |
| 9 | 9 | private String xL;//线路 |
| 10 | + private String xlmc;//线路名称 | |
| 10 | 11 | |
| 11 | 12 | private String clzbh;//车号 |
| 12 | 13 | |
| ... | ... | @@ -141,6 +142,14 @@ public class Singledata { |
| 141 | 142 | public void setJhjl(String jhjl) { |
| 142 | 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 | 765 | |
| 766 | 766 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 767 | 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 | 770 | sin.setClzbh(clzbh); |
| 770 | 771 | sin.setJsy(jsy); |
| 771 | 772 | sin.setrQ(startDate); |
| ... | ... | @@ -787,19 +788,28 @@ public class FormsServiceImpl implements FormsService { |
| 787 | 788 | String line=y.getXlbm(); |
| 788 | 789 | String clzbh=y.getNbbm(); |
| 789 | 790 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 791 | + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | |
| 790 | 792 | for (int j = 0; j < listReal.size(); j++) { |
| 791 | 793 | ScheduleRealInfo s=listReal.get(j); |
| 792 | 794 | if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) |
| 793 | 795 | &&s.getXlBm().equals(line)){ |
| 794 | 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 | 807 | double jhgl=culateMileageService.culateJhgl(newList); |
| 798 | 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 | 814 | double zyygl=Arith.add(yygl, ljgl); |
| 805 | 815 | double zksgl=Arith.add(ksgl, jcgl); |
| ... | ... | @@ -809,7 +819,8 @@ public class FormsServiceImpl implements FormsService { |
| 809 | 819 | |
| 810 | 820 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 811 | 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 | 824 | sin.setClzbh(clzbh); |
| 814 | 825 | sin.setJsy(jsy); |
| 815 | 826 | sin.setrQ(startDate); |
| ... | ... | @@ -823,10 +834,10 @@ public class FormsServiceImpl implements FormsService { |
| 823 | 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 | 841 | }else{ |
| 831 | 842 | String sql="select r.s_gh,r.s_name, " |
| 832 | 843 | + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" |
| ... | ... | @@ -862,19 +873,29 @@ public class FormsServiceImpl implements FormsService { |
| 862 | 873 | String line=sin.getxL(); |
| 863 | 874 | String clzbh=sin.getClzbh(); |
| 864 | 875 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 876 | + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | |
| 877 | + | |
| 865 | 878 | for (int j = 0; j < listReal.size(); j++) { |
| 866 | 879 | ScheduleRealInfo s=listReal.get(j); |
| 867 | 880 | if(s.getsGh().equals(jsy) && s.getClZbh().equals(clzbh) |
| 868 | 881 | &&s.getXlBm().equals(line)){ |
| 869 | 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 | 893 | double jhgl=culateMileageService.culateJhgl(newList); |
| 873 | 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 | 900 | double zyygl=Arith.add(yygl, ljgl); |
| 880 | 901 | double zksgl=Arith.add(ksgl, jcgl); | ... | ... |
src/main/resources/static/pages/mforms/singledatas/singledata.html