Commit 5f9db6ab855e51c63c741809177611b18d30243b
1 parent
47db2631
新增班次明细日报
Showing
7 changed files
with
491 additions
and
6 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| ... | ... | @@ -884,4 +884,42 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 884 | 884 | |
| 885 | 885 | return res; |
| 886 | 886 | } |
| 887 | + | |
| 888 | + @RequestMapping(value="/detailsDaily") | |
| 889 | + public List<Map<String,Object>> detailsDaily(@RequestParam Map<String, Object> map){ | |
| 890 | + String gsdm=""; | |
| 891 | + if(map.get("gsdm")!=null){ | |
| 892 | + gsdm=map.get("gsdm").toString(); | |
| 893 | + } | |
| 894 | + String fgsdm=""; | |
| 895 | + if(map.get("fgsdm")!=null){ | |
| 896 | + fgsdm=map.get("fgsdm").toString(); | |
| 897 | + } | |
| 898 | + String line=""; | |
| 899 | + if(map.get("line")!=null){ | |
| 900 | + line=map.get("line").toString(); | |
| 901 | + } | |
| 902 | + String date=""; | |
| 903 | + if(map.get("date")!=null){ | |
| 904 | + date=map.get("date").toString(); | |
| 905 | + } | |
| 906 | + String date2=""; | |
| 907 | + if(map.get("date2")!=null){ | |
| 908 | + date2=map.get("date2").toString(); | |
| 909 | + } | |
| 910 | + String xlName=""; | |
| 911 | + if(map.get("xlName")!=null){ | |
| 912 | + xlName=map.get("xlName").toString(); | |
| 913 | + } | |
| 914 | + String type=""; | |
| 915 | + if(map.get("type")!=null){ | |
| 916 | + type=map.get("type").toString(); | |
| 917 | + } | |
| 918 | + String sfss="0"; | |
| 919 | + if(map.get("sfss")!=null){ | |
| 920 | + sfss=map.get("sfss").toString(); | |
| 921 | + } | |
| 922 | + return scheduleRealInfoService.detailsDaily(gsdm,fgsdm,line, date,date2, xlName, type,sfss); | |
| 923 | + } | |
| 924 | + | |
| 887 | 925 | } | ... | ... |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
| ... | ... | @@ -1115,4 +1115,27 @@ public class ScheduleRealInfo implements Cloneable{ |
| 1115 | 1115 | ScheduleRealInfo cloned = (ScheduleRealInfo) super.clone(); |
| 1116 | 1116 | return cloned; |
| 1117 | 1117 | } |
| 1118 | + | |
| 1119 | + //normal:正常班次,out:出场,in:进场,region:区间,venting:放空班次,major:放大站班次,ldks:两点间空驶(算空驶里程) | |
| 1120 | + public String getBcTypeCN() { | |
| 1121 | + if(this.getBcType()==null){ | |
| 1122 | + return null; | |
| 1123 | + }else if(this.getBcType().equals("normal")){ | |
| 1124 | + return "正常班次"; | |
| 1125 | + }else if(this.getBcType().equals("out")){ | |
| 1126 | + return "出场"; | |
| 1127 | + }else if(this.getBcType().equals("in")){ | |
| 1128 | + return "进场"; | |
| 1129 | + }else if(this.getBcType().equals("region")){ | |
| 1130 | + return "区间"; | |
| 1131 | + }else if(this.getBcType().equals("venting")){ | |
| 1132 | + return "放空班次"; | |
| 1133 | + }else if(this.getBcType().equals("major")){ | |
| 1134 | + return "大站班次"; | |
| 1135 | + }else if(this.getBcType().equals("ldks")){ | |
| 1136 | + return "两点间空驶"; | |
| 1137 | + }else { | |
| 1138 | + return null; | |
| 1139 | + } | |
| 1140 | + } | |
| 1118 | 1141 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| ... | ... | @@ -212,4 +212,6 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L |
| 212 | 212 | |
| 213 | 213 | Map<String, Object> saveSch(ScheduleRealInfo sc); |
| 214 | 214 | |
| 215 | + | |
| 216 | + List<Map<String,Object>> detailsDaily(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type,String sfss); | |
| 215 | 217 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -7212,6 +7212,105 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 7212 | 7212 | } |
| 7213 | 7213 | }, 0, 10, TimeUnit.MINUTES); |
| 7214 | 7214 | } |
| 7215 | + | |
| 7216 | + @Override | |
| 7217 | + public List<Map<String, Object>> detailsDaily(String gsdm, String fgsdm, String line, String date, String date2, | |
| 7218 | + String xlName, String type,String sfss) { | |
| 7219 | + List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>(); | |
| 7220 | + List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); | |
| 7221 | + List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); | |
| 7222 | + line = line.trim(); | |
| 7223 | + if (line.equals("")) { | |
| 7224 | + //查询所有线路 | |
| 7225 | + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm); | |
| 7226 | + } else { | |
| 7227 | + //查询单条线路 | |
| 7228 | + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2); | |
| 7229 | + } | |
| 7230 | + if("1".equals(sfss)){ | |
| 7231 | + List<ScheduleRealInfo> lists2 = new ArrayList<ScheduleRealInfo>(); | |
| 7232 | + for (int i = 0; i < listAll.size(); i++) { | |
| 7233 | + ScheduleRealInfo sch = listAll.get(i); | |
| 7234 | + if (sch.isSflj()){ | |
| 7235 | + continue; | |
| 7236 | + } | |
| 7237 | + if(CulateMileageServiceImpl.isInOut(sch)){ | |
| 7238 | + continue; | |
| 7239 | + } | |
| 7240 | + Set<ChildTaskPlan> cts = sch.getcTasks(); | |
| 7241 | + if (cts != null && cts.size() > 0) {//有子任务且烂班 | |
| 7242 | + boolean flag = false; | |
| 7243 | + for(ChildTaskPlan c : cts){ | |
| 7244 | + if(c.getMileageType().equals("service") && c.isDestroy()){ | |
| 7245 | + flag=true; | |
| 7246 | + } | |
| 7247 | + } | |
| 7248 | + if(flag){ | |
| 7249 | + lists2.add(sch); | |
| 7250 | + } | |
| 7251 | + }else if(sch.getStatus() == -1 && !sch.isCcService()){//主任务烂班 | |
| 7252 | + lists2.add(sch); | |
| 7253 | + } | |
| 7254 | + } | |
| 7255 | + listAll=lists2; | |
| 7256 | + } | |
| 7257 | + List<Map<String, Object>> lMap=new ArrayList<>(); | |
| 7258 | + Map<String, Object> mx; | |
| 7259 | + List<ScheduleRealInfo> l = new ArrayList<>(); | |
| 7260 | + for (ScheduleRealInfo sch : listAll) { | |
| 7261 | + l.clear(); | |
| 7262 | + l.add(sch); | |
| 7263 | + mx=new HashMap<>(); | |
| 7264 | + mx.put("fgsName",sch.getFgsName()); | |
| 7265 | + mx.put("xlName",sch.getXlName()); | |
| 7266 | + mx.put("nbbm",sch.getClZbh()); | |
| 7267 | + mx.put("ry",sch.getjGh()+"/"+sch.getjName()); | |
| 7268 | + mx.put("bcType",sch.getBcTypeCN());//班次类型 | |
| 7269 | + mx.put("jhlc",sch.getJhlcOrig());//计划里程(计调) | |
| 7270 | + double sjyygl=culateService.culateSjgl(l);//实际营运公里 | |
| 7271 | + double ljgl = culateService.culateLjgl(lists);//临加公里 | |
| 7272 | + double jccgl = culateService.culateJccgl(l);//空驶班次公里 | |
| 7273 | + mx.put("sjlc", Arith.add(Arith.add(sjyygl,ljgl),jccgl));//实际里程 | |
| 7274 | + double lbgl = culateService.culateLbgl(l);//烂班公里 | |
| 7275 | + mx.put("sslc",lbgl);//少驶公里 | |
| 7276 | + mx.put("mark", sch.getRemarks());//备注 | |
| 7277 | + lMap.add(mx); | |
| 7278 | + } | |
| 7279 | + | |
| 7280 | + if (type != null && type.length() != 0 && type.equals("export")) { | |
| 7281 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | |
| 7282 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | |
| 7283 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | |
| 7284 | + Map<String, Object> m = new HashMap<String, Object>(); | |
| 7285 | + if(date.equals(date2)){ | |
| 7286 | + m.put("date", date); | |
| 7287 | + }else { | |
| 7288 | + m.put("date", date + "至" + date2); | |
| 7289 | + } | |
| 7290 | + | |
| 7291 | + ReportUtils ee = new ReportUtils(); | |
| 7292 | + try { | |
| 7293 | + String dateTime = ""; | |
| 7294 | + if (date.equals(date2)) { | |
| 7295 | + dateTime = sdfSimple.format(sdfMonth.parse(date)); | |
| 7296 | + } else { | |
| 7297 | + dateTime = sdfSimple.format(sdfMonth.parse(date)) | |
| 7298 | + + "-" + sdfSimple.format(sdfMonth.parse(date2)); | |
| 7299 | + } | |
| 7300 | + listI.add(lMap.iterator()); | |
| 7301 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | |
| 7302 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/detailsDaily.xls", | |
| 7303 | + path + "export/" + dateTime + "-" + xlName + "-班次明细日报.xls"); | |
| 7304 | + } catch (Exception e) { | |
| 7305 | + // TODO: handle exception | |
| 7306 | + //e.printStackTrace(); | |
| 7307 | + logger.info("", e); | |
| 7308 | + } | |
| 7309 | + } | |
| 7310 | + | |
| 7311 | + return lMap; | |
| 7312 | + } | |
| 7313 | + | |
| 7215 | 7314 | } |
| 7216 | 7315 | |
| 7217 | 7316 | class AccountMap implements Comparator<Map<String, Object>> { | ... | ... |
src/main/resources/static/pages/forms/mould/detailsDaily.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/detailsDailyCalc.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 | + | |
| 15 | + .table > tbody + tbody { | |
| 16 | + border-top: 1px solid; } | |
| 17 | + | |
| 18 | + #forms > thead > tr> td >span{ | |
| 19 | + width: 5px; | |
| 20 | + word-wrap: break-word; | |
| 21 | + letter-spacing: 20px; | |
| 22 | + } | |
| 23 | + | |
| 24 | + #forms > thead > tr> td >label{ | |
| 25 | + word-break: keep-all;white-space:nowrap; | |
| 26 | + } | |
| 27 | +</style> | |
| 28 | + | |
| 29 | +<div class="page-head"> | |
| 30 | + <div class="page-title"> | |
| 31 | + <h1>明细日报</h1> | |
| 32 | + </div> | |
| 33 | +</div> | |
| 34 | + | |
| 35 | +<!-- <div class="row"> --> | |
| 36 | + <div class="col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)"> | |
| 37 | +<!-- <div> --> | |
| 38 | + <div class="portlet-title"> | |
| 39 | + <form class="form-inline" action=""> | |
| 40 | + <div style="display: inline-block;margin-left: 29px; " id="gsdmDiv"> | |
| 41 | + <span class="item-label" style="width: 80px;">公司: </span> | |
| 42 | + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | |
| 43 | + </div> | |
| 44 | + <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> | |
| 45 | + <span class="item-label" style="width: 80px;">分公司: </span> | |
| 46 | + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | |
| 47 | + </div> | |
| 48 | + <div style="display: inline-block;margin-left: 42px;"> | |
| 49 | + <span class="item-label" style="width: 80px;">线路: </span> | |
| 50 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 51 | + </div> | |
| 52 | + <div style="display: inline-block; margin-left: 33px;"> | |
| 53 | + <span class="item-label" style="width: 80px;">是否少驶: </span> | |
| 54 | + <select class="form-control" name="sfss" id="sfss" style="width: 180px;"> | |
| 55 | + <option value="0">全部</option> | |
| 56 | + <option value="1">少驶</option> | |
| 57 | + </select> | |
| 58 | + </div> | |
| 59 | + <div style="margin-top: 3px"></div> | |
| 60 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 61 | + <span class="item-label" style="width: 80px;">开始时间: </span> | |
| 62 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | |
| 63 | + </div> | |
| 64 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 65 | + <span class="item-label" style="width: 80px;">结束时间: </span> | |
| 66 | + <input class="form-control" type="text" id="date2" style="width: 180px;"/> | |
| 67 | + </div> | |
| 68 | + <div class="form-group"> | |
| 69 | + <input class="btn btn-default" type="button" id="query" value="查询"/> | |
| 70 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 71 | + </div> | |
| 72 | + </form> | |
| 73 | + </div> | |
| 74 | + <div class="portlet-body" id="tjrbBody" style="overflow:auto;height: calc(100% - 80px)"> | |
| 75 | + <div class="table-container" style="margin-top: 10px;min-width: 906px"> | |
| 76 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 77 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 78 | + <thead> | |
| 79 | + <tr> | |
| 80 | + <th colspan="46"><label id="tjrq"></label> 线路明细日报</th> | |
| 81 | + </tr> | |
| 82 | + <tr> | |
| 83 | + <td rowspan="3"><label >分公司</label></td> | |
| 84 | + <td rowspan="3"><label >路线名</label></td> | |
| 85 | + <td rowspan="3"><label >自编号</label></td> | |
| 86 | + <td rowspan="3"><label >人员</label></td> | |
| 87 | + <td rowspan="3"><label >班次类型</label></td> | |
| 88 | + <td rowspan="2"><label>计划里程</label> | |
| 89 | + <td rowspan="2"><label>实际里程</label></td> | |
| 90 | + <td rowspan="2"><label>少驶里程</label></td> | |
| 91 | + <td rowspan="2"><label>备注</label></td> | |
| 92 | + </tr> | |
| 93 | + </thead> | |
| 94 | + <tbody class="statisticsDailyCalc2"> | |
| 95 | + | |
| 96 | + </tbody> | |
| 97 | + </table> | |
| 98 | + </div> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | + | |
| 102 | +<script> | |
| 103 | + $(function(){ | |
| 104 | + $('#export').attr('disabled', "true"); | |
| 105 | + | |
| 106 | + // 关闭左侧栏 | |
| 107 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 108 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 109 | + | |
| 110 | + var d = new Date(); | |
| 111 | + d.setTime(d.getTime() - 4*1000*60*60*24); | |
| 112 | + var year = d.getFullYear(); | |
| 113 | + var month = d.getMonth() + 1; | |
| 114 | + var day = d.getDate(); | |
| 115 | + if(month < 10) | |
| 116 | + month = "0" + month; | |
| 117 | + if(day < 10) | |
| 118 | + day = "0" + day; | |
| 119 | + var dateTime = year + "-" + month + "-" + day; | |
| 120 | + $("#date").datetimepicker({ | |
| 121 | + format : 'YYYY-MM-DD', | |
| 122 | + locale : 'zh-cn', | |
| 123 | + maxDate : dateTime | |
| 124 | + }); | |
| 125 | + $("#date2").datetimepicker({ | |
| 126 | + format : 'YYYY-MM-DD', | |
| 127 | + locale : 'zh-cn', | |
| 128 | + maxDate : dateTime | |
| 129 | + }); | |
| 130 | + $("#date").val(dateTime); | |
| 131 | + $("#date2").val(dateTime); | |
| 132 | + | |
| 133 | + | |
| 134 | + var fage=true; | |
| 135 | + var obj = []; | |
| 136 | + var xlList; | |
| 137 | + $.get('/report/lineList',function(result){ | |
| 138 | + xlList=result; | |
| 139 | + $.get('/user/companyData', function(result){ | |
| 140 | + obj = result; | |
| 141 | + var options = ''; | |
| 142 | + for(var i = 0; i < obj.length; i++){ | |
| 143 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | |
| 144 | + } | |
| 145 | + | |
| 146 | + if(obj.length ==0){ | |
| 147 | + $("#gsdmDiv").css('display','none'); | |
| 148 | + }else if(obj.length ==1){ | |
| 149 | + $("#gsdmDiv").css('display','none'); | |
| 150 | + if(obj[0].children.length == 1 || obj[0].children.length ==0){ | |
| 151 | + fage=false; | |
| 152 | + $('#fgsdmDiv').css('display','none'); | |
| 153 | + } | |
| 154 | + } | |
| 155 | + $('#gsdm').html(options); | |
| 156 | + updateCompany(); | |
| 157 | + }); | |
| 158 | + }) | |
| 159 | + $("#gsdm").on("change",updateCompany); | |
| 160 | + function updateCompany(){ | |
| 161 | + var company = $('#gsdm').val(); | |
| 162 | + var options = ''; | |
| 163 | + if(fage){ | |
| 164 | + options = '<option value="">请选择</option>'; | |
| 165 | + } | |
| 166 | + for(var i = 0; i < obj.length; i++){ | |
| 167 | + if(obj[i].companyCode == company){ | |
| 168 | + var children = obj[i].children; | |
| 169 | + for(var j = 0; j < children.length; j++){ | |
| 170 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | |
| 171 | + } | |
| 172 | + } | |
| 173 | + } | |
| 174 | + $('#fgsdm').html(options); | |
| 175 | +// initXl(); | |
| 176 | + } | |
| 177 | + | |
| 178 | + var tempData = {}; | |
| 179 | + $.get('/report/lineList',function(xlList){ | |
| 180 | + var data = []; | |
| 181 | + data.push({id: " ", text: "全部线路"}); | |
| 182 | + $.get('/user/companyData', function(result){ | |
| 183 | + for(var i = 0; i < result.length; i++){ | |
| 184 | + var companyCode = result[i].companyCode; | |
| 185 | + var children = result[i].children; | |
| 186 | + for(var j = 0; j < children.length; j++){ | |
| 187 | + var code = children[j].code; | |
| 188 | + for(var k=0;k < xlList.length;k++ ){ | |
| 189 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | |
| 190 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | |
| 191 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | |
| 192 | + } | |
| 193 | + } | |
| 194 | + } | |
| 195 | + } | |
| 196 | + initPinYinSelect2('#line',data,''); | |
| 197 | + | |
| 198 | + }); | |
| 199 | + }); | |
| 200 | + | |
| 201 | + $("#line").on("change", function(){ | |
| 202 | + if($("#line").val() == " "){ | |
| 203 | + $("#gsdm").attr("disabled", false); | |
| 204 | + $("#fgsdm").attr("disabled", false); | |
| 205 | + } else { | |
| 206 | + var temp = tempData[$("#line").val()].split(":"); | |
| 207 | + $("#gsdm").val(temp[0]); | |
| 208 | + updateCompany(); | |
| 209 | + $("#fgsdm").val(temp[1]); | |
| 210 | + $("#gsdm").attr("disabled", true); | |
| 211 | + $("#fgsdm").attr("disabled", true); | |
| 212 | + } | |
| 213 | + }); | |
| 214 | + | |
| 215 | + | |
| 216 | + var line =""; | |
| 217 | + var xlName =""; | |
| 218 | + var date = ""; | |
| 219 | + var date2 =""; | |
| 220 | + var gsdm=""; | |
| 221 | + var fgsdm=""; | |
| 222 | + var sfss=""; | |
| 223 | + $("#query").on("click",function(){ | |
| 224 | + if($("#date").val() == null || $("#date").val().trim().length == 0){ | |
| 225 | + layer.msg("请选择时间范围!"); | |
| 226 | + return; | |
| 227 | + } | |
| 228 | + if($("#date2").val() == null || $("#date2").val().trim().length == 0){ | |
| 229 | + layer.msg("请选择时间范围!"); | |
| 230 | + return; | |
| 231 | + } | |
| 232 | +// $("#tjrbBody").height($(window).height()-100); | |
| 233 | + line = $("#line").val(); | |
| 234 | + date = $("#date").val(); | |
| 235 | + date2 =$("#date2").val(); | |
| 236 | + gsdm =$("#gsdm").val(); | |
| 237 | + fgsdm=$("#fgsdm").val(); | |
| 238 | + sfss=$("#sfss").val(); | |
| 239 | + xlName = $("#select2-line-container").html(); | |
| 240 | + if(xlName == "全部线路") | |
| 241 | + xlName = $('#fgsdm option:selected').text(); | |
| 242 | + if(xlName =='请选择') | |
| 243 | + xlName = $('#gsdm option:selected').text(); | |
| 244 | + if(line=="请选择"){ | |
| 245 | + line=""; | |
| 246 | + } | |
| 247 | + if(date==null || date =="" ||date2==null || date2 ==""){ | |
| 248 | + layer.msg('请选择时间段.'); | |
| 249 | + }else{ | |
| 250 | + $("#tjrq").html(date+"至"+date2); | |
| 251 | + var params = {}; | |
| 252 | + params['gsdm'] = gsdm; | |
| 253 | + params['fgsdm'] =fgsdm ; | |
| 254 | + params['line'] = line; | |
| 255 | + params['date'] = date; | |
| 256 | + params['date2'] = date2; | |
| 257 | + params['xlName'] = xlName; | |
| 258 | + params['sfss'] = sfss; | |
| 259 | + params['type'] = "query"; | |
| 260 | + var i = layer.load(2); | |
| 261 | + $get('/realSchedule/detailsDaily',params,function(result){ | |
| 262 | + // 把数据填充到模版中 | |
| 263 | + var tbodyHtml = template('statisticsDailyCalc2',{list:result}); | |
| 264 | + // 把渲染好的模版html文本追加到表格中 | |
| 265 | + $('#forms .statisticsDailyCalc2').html(tbodyHtml); | |
| 266 | + layer.close(i); | |
| 267 | + | |
| 268 | + if(result.length == 0) | |
| 269 | + $("#export").attr('disabled',"true"); | |
| 270 | + else | |
| 271 | + $("#export").removeAttr("disabled"); | |
| 272 | + }); | |
| 273 | + } | |
| 274 | + | |
| 275 | + }); | |
| 276 | +// $("#tjrbBody").height($(window).height()-100); | |
| 277 | + $("#export").on("click",function(){ | |
| 278 | + var params = {}; | |
| 279 | + params['gsdm'] = gsdm; | |
| 280 | + params['fgsdm'] =fgsdm ; | |
| 281 | + params['line'] = line; | |
| 282 | + params['date'] = date; | |
| 283 | + params['date2'] = date2; | |
| 284 | + params['xlName'] = xlName; | |
| 285 | + params['sfss'] = sfss; | |
| 286 | + params['type'] = "export"; | |
| 287 | + var i = layer.load(2); | |
| 288 | + $get('/realSchedule/detailsDaily',params,function(result){ | |
| 289 | + var dateTime = ""; | |
| 290 | + if(date == date2){ | |
| 291 | + dateTime = moment(date).format("YYYYMMDD"); | |
| 292 | + } else { | |
| 293 | + dateTime = moment(date).format("YYYYMMDD") | |
| 294 | + +"-"+moment(date2).format("YYYYMMDD"); | |
| 295 | + } | |
| 296 | + window.open("/downloadFile/download?fileName=" | |
| 297 | + +dateTime+"-"+xlName+"-班次明细日报"); | |
| 298 | + layer.close(i); | |
| 299 | + }); | |
| 300 | + }); | |
| 301 | + | |
| 302 | + }); | |
| 303 | +</script> | |
| 304 | +<script type="text/html" id="statisticsDailyCalc2"> | |
| 305 | + {{each list as obj i}} | |
| 306 | + <tr {{if obj.zt==1}}style='color: red'{{/if}}> | |
| 307 | + <td>{{obj.fgsName}}</td> | |
| 308 | + <td>{{obj.xlName}}</td> | |
| 309 | + <td>{{obj.nbbm}}</td> | |
| 310 | + <td>{{obj.ry}}</td> | |
| 311 | + <td>{{obj.bcType}}</td> | |
| 312 | + <td>{{obj.jhlc}}</td> | |
| 313 | + <td>{{obj.sjlc}}</td> | |
| 314 | + <td>{{obj.sslc}}</td> | |
| 315 | + <td>{{obj.mark}}</td> | |
| 316 | + </tr> | |
| 317 | + {{/each}} | |
| 318 | + {{if list.length == 0}} | |
| 319 | + <tr> | |
| 320 | + <td colspan="46"><h6 class="muted">没有找到相关数据</h6></td> | |
| 321 | + </tr> | |
| 322 | + {{/if}} | |
| 323 | +</script> | |
| 0 | 324 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/baidu.js
| ... | ... | @@ -64,7 +64,7 @@ var gb_map_baidu = (function(){ |
| 64 | 64 | for(var i=0,polyline;polyline=polylines[id][i++];){ |
| 65 | 65 | if(polyline.isVisible()){ |
| 66 | 66 | if(checked) |
| 67 | - polyline.setStrokeOpacity(0.1); | |
| 67 | + polyline.setStrokeOpacity(0.3); | |
| 68 | 68 | else |
| 69 | 69 | polyline.setStrokeOpacity(0.6); |
| 70 | 70 | } |
| ... | ... | @@ -167,7 +167,7 @@ var gb_map_baidu = (function(){ |
| 167 | 167 | |
| 168 | 168 | //中心点 |
| 169 | 169 | var ts = this.gCenterPoint.split(' ') |
| 170 | - ,coord = CoordinateConverter.transformFromWGSToBaidu(CoordinateConverter.locationMake(parseFloat(ts[0]), parseFloat(ts[1]))); | |
| 170 | + ,coord = TransGPS.wgsToBD(parseFloat(ts[1]), parseFloat(ts[0])); | |
| 171 | 171 | polygon._centerPoint = new BMap.Point(coord.lng, coord.lat); |
| 172 | 172 | |
| 173 | 173 | //info window |
| ... | ... | @@ -266,7 +266,7 @@ var gb_map_baidu = (function(){ |
| 266 | 266 | return; |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - var coord = CoordinateConverter.transformFromWGSToBaidu(CoordinateConverter.locationMake(opt.lon, opt.lat)); | |
| 269 | + var coord = TransGPS.wgsToBD(opt.lat, opt.lon); | |
| 270 | 270 | var circle = new BMap.Circle(new BMap.Point(coord.lng, coord.lat), opt.radius); |
| 271 | 271 | circle.setStrokeColor(opt.color); |
| 272 | 272 | circle.setStrokeWeight(opt.weight); |
| ... | ... | @@ -282,7 +282,7 @@ var gb_map_baidu = (function(){ |
| 282 | 282 | //绘制多边形 |
| 283 | 283 | drawPolygon: function(opt){ |
| 284 | 284 | var station = opt.station |
| 285 | - ,code = station.stationRouteId; | |
| 285 | + ,code = station.stationCode; | |
| 286 | 286 | if(electronicFences[code]){ |
| 287 | 287 | electronicFences[code].show(); |
| 288 | 288 | return; |
| ... | ... | @@ -307,7 +307,7 @@ var gb_map_baidu = (function(){ |
| 307 | 307 | return; |
| 308 | 308 | var bdPoints = [],coord; |
| 309 | 309 | $.each(obj._gPoints, function () { |
| 310 | - coord = CoordinateConverter.transformFromWGSToBaidu(CoordinateConverter.locationMake(this.lng, this.lat)); | |
| 310 | + coord = TransGPS.wgsToBD(this.lat, this.lng); | |
| 311 | 311 | bdPoints.push(new BMap.Point(coord.lng, coord.lat)); |
| 312 | 312 | }); |
| 313 | 313 | |
| ... | ... | @@ -315,7 +315,7 @@ var gb_map_baidu = (function(){ |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | function transCoord(gps) { |
| 318 | - var coord = CoordinateConverter.transformFromWGSToBaidu(CoordinateConverter.locationMake(gps.lon, gps.lat)); | |
| 318 | + var coord = TransGPS.wgsToBD(gps.lat, gps.lon); | |
| 319 | 319 | gps.bd_lat = coord.lat; |
| 320 | 320 | gps.bd_lon = coord.lng; |
| 321 | 321 | } | ... | ... |