Commit b20ee5e738930dce2528cfb319447b8d41614c0f
1 parent
26d3239b
审计报表修改
Showing
6 changed files
with
356 additions
and
25 deletions
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| ... | ... | @@ -1452,20 +1452,17 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1452 | 1452 | String type="1"; |
| 1453 | 1453 | if(gsbm.equals("26")){ |
| 1454 | 1454 | Date date=new Date(); |
| 1455 | - Calendar aCalendar = Calendar.getInstance(); | |
| 1456 | - aCalendar.setTime(date); | |
| 1457 | - int day1 = aCalendar.get(Calendar.DAY_OF_YEAR); | |
| 1458 | 1455 | try { |
| 1459 | - aCalendar.setTime(sdf.parse(rq)); | |
| 1456 | + long day2=date.getTime(); | |
| 1457 | + long day1=sdf.parse(rq).getTime(); | |
| 1458 | + long days = (day2 - day1) / (24*3600*1000); | |
| 1459 | + if(days>3){ | |
| 1460 | + type="2"; | |
| 1461 | + } | |
| 1460 | 1462 | } catch (ParseException e) { |
| 1461 | 1463 | // TODO Auto-generated catch block |
| 1462 | 1464 | e.printStackTrace(); |
| 1463 | 1465 | } |
| 1464 | - int day2 = aCalendar.get(Calendar.DAY_OF_YEAR); | |
| 1465 | - int days=day1-day2; | |
| 1466 | - if(days>3){ | |
| 1467 | - type="2"; | |
| 1468 | - } | |
| 1469 | 1466 | } |
| 1470 | 1467 | return type; |
| 1471 | 1468 | } | ... | ... |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| ... | ... | @@ -1248,6 +1248,21 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 1248 | 1248 | } |
| 1249 | 1249 | } |
| 1250 | 1250 | } |
| 1251 | + | |
| 1252 | + if(!isInOut(t)){ | |
| 1253 | + Set<ChildTaskPlan> childTaskPlans = t.getcTasks(); | |
| 1254 | + if(!childTaskPlans.isEmpty()){ | |
| 1255 | + Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | |
| 1256 | + while (it.hasNext()) { | |
| 1257 | + ChildTaskPlan childTaskPlan = it.next(); | |
| 1258 | + if(childTaskPlan.getType2().equals("1")&&childTaskPlan.getMileageType().equals("empty")){ | |
| 1259 | + if (!childTaskPlan.isDestroy()) { | |
| 1260 | + kfks=Arith.add(kfks,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); | |
| 1261 | + } | |
| 1262 | + } | |
| 1263 | + } | |
| 1264 | + } | |
| 1265 | + } | |
| 1251 | 1266 | } |
| 1252 | 1267 | } |
| 1253 | 1268 | return kfks; | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -2776,7 +2776,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2776 | 2776 | double zrwjcclc=culateService.culateZrwJccLc(list, "故障"); |
| 2777 | 2777 | double zrwjcclc1=culateService.culateZrwJccLc(list, "肇事"); |
| 2778 | 2778 | double zrwjcclc2=culateService.culateZrwJccLc(list, "纠纷"); |
| 2779 | - double zrwjcclcqt=culateService.culateZrwJccLc(list, "其他"); | |
| 2779 | + double zrwjcclcqt=Arith.add(culateService.culateZrwJccLc(list, "其他"),culateService.culateZrwJccLc(list, "")); | |
| 2780 | 2780 | map.put("jhwjcclc_z", Arith.add(jhwjcclc,zrwjcclcqt)); |
| 2781 | 2781 | map.put("zrwjcclc", zrwjcclc); |
| 2782 | 2782 | map.put("zrwjcclc1", zrwjcclc1); |
| ... | ... | @@ -2868,7 +2868,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2868 | 2868 | List<Map<String, Object>> listGroupBy =null; |
| 2869 | 2869 | String sql=""; |
| 2870 | 2870 | if(zt.equals("zbh")){ |
| 2871 | - sql+="select r.xl_bm,r.schedule_date_str,r.cl_zbh" | |
| 2871 | + sql+="select r.xl_bm,r.cl_zbh" | |
| 2872 | 2872 | + " from bsth_c_s_sp_info_real r where" |
| 2873 | 2873 | + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'"; |
| 2874 | 2874 | if(line.equals("")){ |
| ... | ... | @@ -2877,19 +2877,18 @@ public class ReportServiceImpl implements ReportService{ |
| 2877 | 2877 | }else{ |
| 2878 | 2878 | sql += " and r.xl_bm = '"+line+"'"; |
| 2879 | 2879 | } |
| 2880 | - sql += " group by r.xl_bm,r.cl_zbh,r.schedule_date_str"; | |
| 2880 | + sql += " group by r.xl_bm,r.cl_zbh"; | |
| 2881 | 2881 | listGroupBy=jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { |
| 2882 | 2882 | @Override |
| 2883 | 2883 | public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 2884 | 2884 | Map<String, Object> map=new HashMap<String,Object>(); |
| 2885 | 2885 | map.put("line",arg0.getString("xl_bm")); |
| 2886 | - map.put("date", arg0.getString("schedule_date_str")); | |
| 2887 | 2886 | map.put("nbbm", arg0.getString("cl_zbh")); |
| 2888 | 2887 | return map; |
| 2889 | 2888 | } |
| 2890 | 2889 | }); |
| 2891 | 2890 | }else{ |
| 2892 | - sql+="select r.xl_bm,r.schedule_date_str,r.cl_zbh,r.j_gh,r.s_gh" | |
| 2891 | + sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh" | |
| 2893 | 2892 | + " from bsth_c_s_sp_info_real r where" |
| 2894 | 2893 | + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'"; |
| 2895 | 2894 | if(line.equals("")){ |
| ... | ... | @@ -2898,13 +2897,12 @@ public class ReportServiceImpl implements ReportService{ |
| 2898 | 2897 | }else{ |
| 2899 | 2898 | sql += " and r.xl_bm = '"+line+"'"; |
| 2900 | 2899 | } |
| 2901 | - sql += " group by r.xl_bm,r.cl_zbh,r.schedule_date_str,r.j_gh,r.s_gh"; | |
| 2900 | + sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh"; | |
| 2902 | 2901 | listGroupBy=jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { |
| 2903 | 2902 | @Override |
| 2904 | 2903 | public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 2905 | 2904 | Map<String, Object> map=new HashMap<String,Object>(); |
| 2906 | 2905 | map.put("line",arg0.getString("xl_bm")); |
| 2907 | - map.put("date", arg0.getString("schedule_date_str")); | |
| 2908 | 2906 | map.put("nbbm", arg0.getString("cl_zbh")); |
| 2909 | 2907 | map.put("jGh", arg0.getString("j_gh")); |
| 2910 | 2908 | map.put("sGh", arg0.getString("s_gh")); |
| ... | ... | @@ -2919,7 +2917,6 @@ public class ReportServiceImpl implements ReportService{ |
| 2919 | 2917 | for (int i = 0; i < listGroupBy.size(); i++) { |
| 2920 | 2918 | Map<String, Object> m=listGroupBy.get(i); |
| 2921 | 2919 | String xl_bm=m.get("line")==null?"":m.get("line").toString(); |
| 2922 | - String dateStr=m.get("date")==null?"":m.get("date").toString(); | |
| 2923 | 2920 | String nbbm =m.get("nbbm")==null?"":m.get("nbbm").toString(); |
| 2924 | 2921 | String jGh= m.get("jGh")==null?"":m.get("jGh").toString(); |
| 2925 | 2922 | String sGh= m.get("sGh")==null?"":m.get("sGh").toString(); |
| ... | ... | @@ -2927,12 +2924,12 @@ public class ReportServiceImpl implements ReportService{ |
| 2927 | 2924 | for (int j = 0; j < list.size(); j++) { |
| 2928 | 2925 | ScheduleRealInfo s=list.get(j); |
| 2929 | 2926 | if(zt.equals("zbh")){ |
| 2930 | - if(xl_bm.equals(s.getXlBm()) && nbbm.equals(s.getClZbh())){ | |
| 2927 | + if(xl_bm.equals(s.getXlBm()) | |
| 2928 | + && nbbm.equals(s.getClZbh())){ | |
| 2931 | 2929 | lists.add(s); |
| 2932 | 2930 | } |
| 2933 | 2931 | }else{ |
| 2934 | 2932 | if(xl_bm.equals(s.getXlBm()) && nbbm.equals(s.getClZbh()) |
| 2935 | - && dateStr.equals(s.getScheduleDateStr()) | |
| 2936 | 2933 | && jGh.equals(s.getjGh()) && sGh.equals(s.getsGh())){ |
| 2937 | 2934 | lists.add(s); |
| 2938 | 2935 | } |
| ... | ... | @@ -2985,8 +2982,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2985 | 2982 | for (int j = 0; j < ylbList.size(); j++) { |
| 2986 | 2983 | Ylb y=ylbList.get(j); |
| 2987 | 2984 | if(nbbm.equals(y.getNbbm()) && xl_bm.equals(y.getXlbm()) |
| 2988 | - &&dateStr.equals(sdf.format(y.getRq())) | |
| 2989 | - &&jGh.equals(y.getName())){ | |
| 2985 | + &&jGh.equals(y.getJsy())){ | |
| 2990 | 2986 | yhl=Arith.add(yhl, y.getYh()); |
| 2991 | 2987 | jzl=Arith.add(jzl, y.getJzl()); |
| 2992 | 2988 | hyl=Arith.add(hyl, y.getYh()); |
| ... | ... | @@ -2998,8 +2994,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2998 | 2994 | for (int j = 0; j < dlbList.size(); j++) { |
| 2999 | 2995 | Dlb d=dlbList.get(j); |
| 3000 | 2996 | if(nbbm.equals(d.getNbbm())&&xl_bm.equals(d.getXlbm()) |
| 3001 | - &&dateStr.equals(sdf.format(d.getRq())) | |
| 3002 | - &&jGh.equals(d.getName())){ | |
| 2997 | + &&jGh.equals(d.getJsy())){ | |
| 3003 | 2998 | dhl=Arith.add(dhl, d.getHd()); |
| 3004 | 2999 | cdl=Arith.add(cdl, d.getCdl()); |
| 3005 | 3000 | zlc=Arith.add(zlc, d.getZlc()); |
| ... | ... | @@ -3088,7 +3083,9 @@ public class ReportServiceImpl implements ReportService{ |
| 3088 | 3083 | public Ylb mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 3089 | 3084 | Ylb y = new Ylb(); |
| 3090 | 3085 | y.setRq(arg0.getDate("rq")); |
| 3086 | + y.setJsy(arg0.getString("jsy")); | |
| 3091 | 3087 | y.setXlbm(arg0.getString("xlbm")); |
| 3088 | + y.setZlc(arg0.getDouble("zlc")); | |
| 3092 | 3089 | y.setNbbm(arg0.getString("nbbm")); |
| 3093 | 3090 | y.setJzl(arg0.getDouble("jzl")); |
| 3094 | 3091 | y.setYh(arg0.getDouble("yh")); |
| ... | ... | @@ -3106,7 +3103,9 @@ public class ReportServiceImpl implements ReportService{ |
| 3106 | 3103 | Dlb y = new Dlb(); |
| 3107 | 3104 | y.setRq(arg0.getDate("rq")); |
| 3108 | 3105 | y.setXlbm(arg0.getString("xlbm")); |
| 3106 | + y.setJsy(arg0.getString("jsy")); | |
| 3109 | 3107 | y.setNbbm(arg0.getString("nbbm")); |
| 3108 | + y.setZlc(arg0.getDouble("zlc")); | |
| 3110 | 3109 | y.setCdl(arg0.getDouble("cdl")); |
| 3111 | 3110 | y.setHd(arg0.getDouble("hd")); |
| 3112 | 3111 | y.setSh(arg0.getDouble("sh")); | ... | ... |
src/main/resources/static/pages/mforms/singledatas/singledata2.html
0 → 100644
| 1 | +<style type="text/css"> | |
| 2 | + .table-bordered { | |
| 3 | + border: 1px solid; } | |
| 4 | + .table-bordered > thead > tr > th, | |
| 5 | + .table-bordered > thead > tr > td, | |
| 6 | + .table-bordered > tbody > tr > th, | |
| 7 | + .table-bordered > tbody > tr > td, | |
| 8 | + .table-bordered > tfoot > tr > th, | |
| 9 | + .table-bordered > tfoot > tr > td { | |
| 10 | + border: 1px solid; } | |
| 11 | + .table-bordered > thead > tr > th, | |
| 12 | + .table-bordered > thead > tr > td { | |
| 13 | + border-bottom-width: 2px; | |
| 14 | + text-align: center; } | |
| 15 | + | |
| 16 | + .table > tbody + tbody { | |
| 17 | + border-top: 1px solid; } | |
| 18 | +</style> | |
| 19 | + | |
| 20 | +<div class="page-head"> | |
| 21 | + <div class="page-title"> | |
| 22 | + <h1>路单数据</h1> | |
| 23 | + </div> | |
| 24 | +</div> | |
| 25 | + | |
| 26 | +<div class="row"> | |
| 27 | + <div class="col-md-12"> | |
| 28 | + <div class="portlet light porttlet-fit bordered"> | |
| 29 | + <div class="portlet-title"> | |
| 30 | + <form class="form-inline" action=""> | |
| 31 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_sing"> | |
| 32 | + <span class="item-label" style="width: 80px;">公司: </span> | |
| 33 | + <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select> | |
| 34 | + </div> | |
| 35 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_sing"> | |
| 36 | + <span class="item-label" style="width: 80px;">分公司: </span> | |
| 37 | + <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select> | |
| 38 | + </div> | |
| 39 | + <div style="display: inline-block;"> | |
| 40 | + <span class="item-label" style="width: 80px;"> 线路: </span> | |
| 41 | + <select class="form-control" name="line" id="line" style="width: 140px;"></select> | |
| 42 | + </div> | |
| 43 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 44 | + <span class="item-label" style="width: 140px;">时间: </span> | |
| 45 | + <input class="form-control" type="text" id="startDate" style="width: 140px;"/> | |
| 46 | + </div> | |
| 47 | + | |
| 48 | + <div style="display: inline-block;margin-left: 15px"> | |
| 49 | + <span class="item-label" style="width: 150px;">统计: </span> | |
| 50 | + <select class="form-control" name="tjtype" id="tjtype" style="width: 140px;"> | |
| 51 | + <option value="jsy">驾驶员</option> | |
| 52 | + <option value="spy">售票员</option> | |
| 53 | + </select> | |
| 54 | + | |
| 55 | + </div> | |
| 56 | + <div class="form-group"> | |
| 57 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | |
| 58 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 59 | + </div> | |
| 60 | + </form> | |
| 61 | + </div> | |
| 62 | + <div class="portlet-body"> | |
| 63 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | |
| 64 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 65 | + <thead> | |
| 66 | + <tr> | |
| 67 | + <th>序号</th> | |
| 68 | + <th>日期</th> | |
| 69 | + <th>所属公司</th> | |
| 70 | + <th>线路</th> | |
| 71 | + <th>车号</th> | |
| 72 | + <th>司机职号</th> | |
| 73 | + <th>司机姓名</th> | |
| 74 | + <th>售票员职号</th> | |
| 75 | + <th>售票员姓名</th> | |
| 76 | + <th>行驶里程(包括空放)</th> | |
| 77 | + <th>空驶里程</th> | |
| 78 | + <th>耗油量</th> | |
| 79 | + <th>加注量</th> | |
| 80 | + <th>非营业用油</th> | |
| 81 | + <th>计划公里</th> | |
| 82 | + </tr> | |
| 83 | + </thead> | |
| 84 | + <tbody id="sinTboday"> | |
| 85 | + | |
| 86 | + </tbody> | |
| 87 | + <tr> | |
| 88 | + <td colspan="9">小计</td> | |
| 89 | + <td><span id="total_zgl"> </span></td> | |
| 90 | + <td><span id="total_ks"> </span></td> | |
| 91 | + <td><span id="total_yh"> </span></td> | |
| 92 | + <td><span id="total_jzl"> </span></td> | |
| 93 | + <td><span id="total_fyy"> </span></td> | |
| 94 | + <td><span id="total_jh"> </span></td> | |
| 95 | + </tr> | |
| 96 | + </table> | |
| 97 | + </div> | |
| 98 | + </div> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | +</div> | |
| 102 | + | |
| 103 | +<script> | |
| 104 | + $(function(){ | |
| 105 | + // 关闭左侧栏 | |
| 106 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 107 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 108 | + | |
| 109 | + $("#startDate,#endDate").datetimepicker({ | |
| 110 | + format : 'YYYY-MM-DD', | |
| 111 | + locale : 'zh-cn' | |
| 112 | + }); | |
| 113 | + | |
| 114 | + var fage=false; | |
| 115 | + var xlList; | |
| 116 | + var obj = []; | |
| 117 | + | |
| 118 | + $.get('/report/lineList',function(result){ | |
| 119 | + xlList=result; | |
| 120 | + $.get('/user/companyData', function(result){ | |
| 121 | + obj = result; | |
| 122 | + var options = ''; | |
| 123 | + for(var i = 0; i < obj.length; i++){ | |
| 124 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | |
| 125 | + } | |
| 126 | + | |
| 127 | + if(obj.length ==0){ | |
| 128 | + $("#gsdmDiv_sing").css('display','none'); | |
| 129 | + }else if(obj.length ==1){ | |
| 130 | + $("#gsdmDiv_sing").css('display','none'); | |
| 131 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | |
| 132 | + $('#fgsdmDiv_sing').css('display','none'); | |
| 133 | + } | |
| 134 | + $('#gsdmSing').html(options); | |
| 135 | + updateCompany(); | |
| 136 | + }); | |
| 137 | + }) | |
| 138 | + $("#gsdmSing").on("change",updateCompany); | |
| 139 | + function updateCompany(){ | |
| 140 | + var company = $('#gsdmSing').val(); | |
| 141 | + var options = ''; | |
| 142 | + for(var i = 0; i < obj.length; i++){ | |
| 143 | + if(obj[i].companyCode == company){ | |
| 144 | + var children = obj[i].children; | |
| 145 | + for(var j = 0; j < children.length; j++){ | |
| 146 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | |
| 147 | + } | |
| 148 | + } | |
| 149 | + } | |
| 150 | + $('#fgsdmSing').html(options); | |
| 151 | + } | |
| 152 | + | |
| 153 | + var tempData = {}; | |
| 154 | + $.get('/report/lineList',function(xlList){ | |
| 155 | + var data = []; | |
| 156 | + data.push({id: " ", text: "全部线路"}); | |
| 157 | + $.get('/user/companyData', function(result){ | |
| 158 | + for(var i = 0; i < result.length; i++){ | |
| 159 | + var companyCode = result[i].companyCode; | |
| 160 | + var children = result[i].children; | |
| 161 | + for(var j = 0; j < children.length; j++){ | |
| 162 | + var code = children[j].code; | |
| 163 | + for(var k=0;k < xlList.length;k++ ){ | |
| 164 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | |
| 165 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | |
| 166 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | |
| 167 | + } | |
| 168 | + } | |
| 169 | + } | |
| 170 | + } | |
| 171 | + initPinYinSelect2('#line',data,''); | |
| 172 | + | |
| 173 | + }); | |
| 174 | + }); | |
| 175 | + | |
| 176 | + $("#line").on("change", function(){ | |
| 177 | + if($("#line").val() == " "){ | |
| 178 | + $("#gsdmSing").attr("disabled", false); | |
| 179 | + $("#fgsdmSing").attr("disabled", false); | |
| 180 | + } else { | |
| 181 | + var temp = tempData[$("#line").val()].split(":"); | |
| 182 | + $("#gsdmSing").val(temp[0]); | |
| 183 | + updateCompany(); | |
| 184 | + $("#fgsdmSing").val(temp[1]); | |
| 185 | + $("#gsdmSing").attr("disabled", true); | |
| 186 | + $("#fgsdmSing").attr("disabled", true); | |
| 187 | + } | |
| 188 | + }); | |
| 189 | + | |
| 190 | + | |
| 191 | + $("#query").on("click",function(){ | |
| 192 | + if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){ | |
| 193 | + layer.msg("请选择时间!"); | |
| 194 | + return; | |
| 195 | + } | |
| 196 | + var line = $("#line").val(); | |
| 197 | + var startDate = $("#startDate").val(); | |
| 198 | + var lpName = $("#lpName").val(); | |
| 199 | + var gsdmSing = $("#gsdmSing").val(); | |
| 200 | + var fgsdmSing = $("#fgsdmSing").val(); | |
| 201 | + var tjtype=$("#tjtype").val(); | |
| 202 | + var params = {}; | |
| 203 | + var i = layer.load(2); | |
| 204 | +// if(tjtype=='jsy'){ | |
| 205 | + $get("/mcy_forms/singledatatj",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | |
| 206 | + layer.close(i); | |
| 207 | + var singledata = template('singledata',{list:result}); | |
| 208 | + // 把渲染好的模版html文本追加到表格中 | |
| 209 | + $('#sinTboday').html(singledata); | |
| 210 | + var total_zgl = 0,total_ks = 0,total_jh = 0; | |
| 211 | + var total_yh = 0,total_jzl=0,total_fyy=0; | |
| 212 | + | |
| 213 | + $.each(result, function(i, obj) { | |
| 214 | + total_zgl +=Number(obj.jhlc*10000); | |
| 215 | + total_ks +=Number(obj.emptMileage*10000); | |
| 216 | + total_yh += Number(obj.hyl*10000); | |
| 217 | + total_jzl +=Number(obj.jzl*10000) | |
| 218 | + total_fyy +=Number(obj.unyyyl*10000) | |
| 219 | + total_jh += Number(obj.jhjl*10000); | |
| 220 | + | |
| 221 | + }); | |
| 222 | + $("#total_zgl").text((total_zgl/10000).toFixed(3)); | |
| 223 | + $("#total_ks").text((total_ks/10000).toFixed(3)); | |
| 224 | + $("#total_yh").text((total_yh/10000).toFixed(2)); | |
| 225 | + $("#total_jzl").text((total_jzl/10000).toFixed(2)); | |
| 226 | + $("#total_fyy").text((total_fyy/10000).toFixed(2)); | |
| 227 | + $("#total_jh").text((total_jh/10000).toFixed(3)); | |
| 228 | + | |
| 229 | + }); | |
| 230 | +// }else{ | |
| 231 | +// $get("/mcy_forms/singledata",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | |
| 232 | +// layer.close(i); | |
| 233 | +// var date=new Array(); //存放文本框数组 | |
| 234 | +// $.each(result, function (i, obj) { | |
| 235 | +// if(obj.sgh !='' && obj.sgh!=null){ | |
| 236 | +// date.push(obj); | |
| 237 | +// } | |
| 238 | +// }); | |
| 239 | +// var singledata = template('singledata2',{result}); | |
| 240 | +// // 把渲染好的模版html文本追加到表格中 | |
| 241 | +// $('#forms tbody').html(singledata); | |
| 242 | + | |
| 243 | +// }); | |
| 244 | +// } | |
| 245 | + | |
| 246 | + }); | |
| 247 | + | |
| 248 | + $("#export").on("click",function(){ | |
| 249 | + var line = $("#line").val(); | |
| 250 | + var startDate = $("#startDate").val(); | |
| 251 | + var endDate = $("#endDate").val(); | |
| 252 | + var lpName = $("#lpName").val(); | |
| 253 | + var gsdmSing = $("#gsdmSing").val(); | |
| 254 | + var fgsdmSing = $("#fgsdmSing").val(); | |
| 255 | + var tjtype=$("#tjtype").val(); | |
| 256 | +// if(tjtype=='jsy'){ | |
| 257 | + $get('/mcy_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){ | |
| 258 | + window.open("/downloadFile/download?fileName=路单数据"+moment(startDate).format("YYYYMMDD")); | |
| 259 | + }); | |
| 260 | +// }else{ | |
| 261 | +// $get('/mcy_export/singledataExport',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){ | |
| 262 | +// window.open("/downloadFile/download?fileName=路单数据"+moment(startDate).format("YYYYMMDD")); | |
| 263 | +// }); | |
| 264 | +// } | |
| 265 | + | |
| 266 | + }); | |
| 267 | + }); | |
| 268 | +</script> | |
| 269 | +<script type="text/html" id="singledata"> | |
| 270 | + {{each list as obj i}} | |
| 271 | + <tr> | |
| 272 | + <td>{{i+1}}</td> | |
| 273 | + <td>{{obj.rQ}}</td> | |
| 274 | + <td>{{obj.gS}}</td> | |
| 275 | + <td>{{obj.xlmc}}</td> | |
| 276 | + <td>{{obj.clzbh}}</td> | |
| 277 | + <td>{{obj.jsy}}</td> | |
| 278 | + <td>{{obj.jName}}</td> | |
| 279 | + <td>{{obj.sgh}}</td> | |
| 280 | + <td>{{obj.sName}}</td> | |
| 281 | + <td>{{obj.jhlc}}</td> | |
| 282 | + <td>{{obj.emptMileage}}</td> | |
| 283 | + <td>{{obj.hyl}}</td> | |
| 284 | + <td>{{obj.jzl}}</td> | |
| 285 | + <td>{{obj.unyyyl}}</td> | |
| 286 | + <td>{{obj.jhjl}}</td> | |
| 287 | + </tr> | |
| 288 | + {{/each}} | |
| 289 | + {{if list.length == 0}} | |
| 290 | + <tr> | |
| 291 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | |
| 292 | + </tr> | |
| 293 | + {{/if}} | |
| 294 | +</script> | |
| 295 | +<script type="text/html" id="singledata2"> | |
| 296 | + {{each list as obj i}} | |
| 297 | + <tr> | |
| 298 | + <td>{{i+1}}</td> | |
| 299 | + <td>{{obj.rQ}}</td> | |
| 300 | + <td>{{obj.gS}}</td> | |
| 301 | + <td>{{obj.xlmc}}</td> | |
| 302 | + <td>{{obj.clzbh}}</td> | |
| 303 | + <td></td> | |
| 304 | + <td></td> | |
| 305 | + <td>{{obj.sgh}}</td> | |
| 306 | + <td>{{obj.sName}}</td> | |
| 307 | + <td>{{obj.jhlc}}</td> | |
| 308 | + <td>{{obj.emptMileage}}</td> | |
| 309 | + <td></td> | |
| 310 | + <td></td> | |
| 311 | + <td></td> | |
| 312 | + <td>{{obj.jhjl}}</td> | |
| 313 | + </tr> | |
| 314 | + {{/each}} | |
| 315 | + {{if list.length == 0}} | |
| 316 | + <tr> | |
| 317 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | |
| 318 | + </tr> | |
| 319 | + {{/if}} | |
| 320 | +</script> | ... | ... |
src/main/resources/static/pages/report/countMileage/countLine/company/countLineMileage.html
src/main/resources/static/pages/report/countMileage/countLine/countLineMileage.html