Commit fc1c0faf61f86967a73e38e054af94dfbeeb5a85
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
91 changed files
with
3775 additions
and
1787 deletions
src/main/java/com/bsth/common/Constants.java
| @@ -32,4 +32,5 @@ public class Constants { | @@ -32,4 +32,5 @@ public class Constants { | ||
| 32 | public static final String UPSTREAM_URL = "/control/upstream"; | 32 | public static final String UPSTREAM_URL = "/control/upstream"; |
| 33 | 33 | ||
| 34 | public static final String SESSION_USERNAME = "sessionUserName"; | 34 | public static final String SESSION_USERNAME = "sessionUserName"; |
| 35 | + public static final String COMPANY_AUTHORITYS = "cmyAuths"; | ||
| 35 | } | 36 | } |
src/main/java/com/bsth/controller/BaseController2.java
| @@ -5,10 +5,13 @@ import com.bsth.common.ResponseCode; | @@ -5,10 +5,13 @@ import com.bsth.common.ResponseCode; | ||
| 5 | import com.bsth.service.BaseService; | 5 | import com.bsth.service.BaseService; |
| 6 | import com.bsth.service.schedule.utils.DataImportExportService; | 6 | import com.bsth.service.schedule.utils.DataImportExportService; |
| 7 | import com.google.common.base.Splitter; | 7 | import com.google.common.base.Splitter; |
| 8 | +import jxl.Sheet; | ||
| 9 | +import jxl.Workbook; | ||
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | import org.springframework.data.domain.Page; | 11 | import org.springframework.data.domain.Page; |
| 10 | import org.springframework.data.domain.PageRequest; | 12 | import org.springframework.data.domain.PageRequest; |
| 11 | import org.springframework.data.domain.Sort; | 13 | import org.springframework.data.domain.Sort; |
| 14 | +import org.springframework.util.CollectionUtils; | ||
| 12 | import org.springframework.web.bind.annotation.*; | 15 | import org.springframework.web.bind.annotation.*; |
| 13 | import org.springframework.web.multipart.MultipartFile; | 16 | import org.springframework.web.multipart.MultipartFile; |
| 14 | 17 | ||
| @@ -164,11 +167,24 @@ public class BaseController2<T, ID extends Serializable> { | @@ -164,11 +167,24 @@ public class BaseController2<T, ID extends Serializable> { | ||
| 164 | */ | 167 | */ |
| 165 | @RequestMapping(value = "/dataExport", method = RequestMethod.GET) | 168 | @RequestMapping(value = "/dataExport", method = RequestMethod.GET) |
| 166 | public void dataExport(HttpServletResponse response) throws Exception { | 169 | public void dataExport(HttpServletResponse response) throws Exception { |
| 170 | + dataExport(response, null); | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + @RequestMapping(value = "/dataExportExt", method = RequestMethod.GET) | ||
| 174 | + public void dataExport(HttpServletResponse response, @RequestParam Map<String, Object> param) throws Exception { | ||
| 167 | // 1、使用ktr转换获取输出文件 | 175 | // 1、使用ktr转换获取输出文件 |
| 168 | File ktrfile = new File(this.getClass().getResource(getDataExportKtrClasspath()).toURI()); | 176 | File ktrfile = new File(this.getClass().getResource(getDataExportKtrClasspath()).toURI()); |
| 169 | - File outputfile = dataImportExportService.fileDataOutput( | ||
| 170 | - getDataExportFilename(), | ||
| 171 | - ktrfile); | 177 | + File outputfile = null; |
| 178 | + if (!CollectionUtils.isEmpty(param)) { | ||
| 179 | + outputfile = dataImportExportService.fileDataOutput( | ||
| 180 | + getDataExportFilename(), | ||
| 181 | + ktrfile, | ||
| 182 | + param); | ||
| 183 | + } else { | ||
| 184 | + outputfile = dataImportExportService.fileDataOutput( | ||
| 185 | + getDataExportFilename(), | ||
| 186 | + ktrfile); | ||
| 187 | + } | ||
| 172 | 188 | ||
| 173 | System.out.println(outputfile.getName()); | 189 | System.out.println(outputfile.getName()); |
| 174 | String filePath = outputfile.getAbsolutePath(); | 190 | String filePath = outputfile.getAbsolutePath(); |
| @@ -225,4 +241,52 @@ public class BaseController2<T, ID extends Serializable> { | @@ -225,4 +241,52 @@ public class BaseController2<T, ID extends Serializable> { | ||
| 225 | throw new RuntimeException("必须override,并指定ktr classpath"); | 241 | throw new RuntimeException("必须override,并指定ktr classpath"); |
| 226 | } | 242 | } |
| 227 | 243 | ||
| 244 | + | ||
| 245 | + public static class ExcelFileOutput { | ||
| 246 | + private String fileName; | ||
| 247 | + private List<Map<String, Object>> sheetnames = new ArrayList<>(); | ||
| 248 | + | ||
| 249 | + public String getFileName() { | ||
| 250 | + return fileName; | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + public void setFileName(String fileName) { | ||
| 254 | + this.fileName = fileName; | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + public List<Map<String, Object>> getSheetnames() { | ||
| 258 | + return sheetnames; | ||
| 259 | + } | ||
| 260 | + | ||
| 261 | + public void setSheetnames(List<Map<String, Object>> sheetnames) { | ||
| 262 | + this.sheetnames = sheetnames; | ||
| 263 | + } | ||
| 264 | + } | ||
| 265 | + | ||
| 266 | + /** | ||
| 267 | + * 上传Excel文件,返回文件全路径名,工作区名称列表。 | ||
| 268 | + * @param file | ||
| 269 | + * @return | ||
| 270 | + * @throws Exception | ||
| 271 | + */ | ||
| 272 | + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | ||
| 273 | + public ExcelFileOutput fileUpload(MultipartFile file) throws Exception { | ||
| 274 | + // 返回对象 | ||
| 275 | + ExcelFileOutput rs = new ExcelFileOutput(); | ||
| 276 | + | ||
| 277 | + // 上传文件 | ||
| 278 | + File file1 = dataImportExportService.uploadFile(file); | ||
| 279 | + // 获取文件的sheet | ||
| 280 | + Workbook book = Workbook.getWorkbook(file1); | ||
| 281 | + for (Sheet sheet : book.getSheets()) { | ||
| 282 | + String sheetname = sheet.getName(); | ||
| 283 | + Map<String, Object> s = new HashMap<>(); | ||
| 284 | + s.put("name", sheetname); | ||
| 285 | + rs.getSheetnames().add(s); | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + rs.setFileName(file1.getAbsolutePath()); | ||
| 289 | + return rs; | ||
| 290 | + } | ||
| 291 | + | ||
| 228 | } | 292 | } |
src/main/java/com/bsth/controller/CarsController.java
| 1 | package com.bsth.controller; | 1 | package com.bsth.controller; |
| 2 | 2 | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 3 | import com.bsth.entity.Cars; | 4 | import com.bsth.entity.Cars; |
| 5 | +import com.bsth.service.schedule.utils.DataImportExportService; | ||
| 4 | import com.bsth.service.schedule.utils.DataToolsProperties; | 6 | import com.bsth.service.schedule.utils.DataToolsProperties; |
| 5 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | import org.springframework.boot.context.properties.EnableConfigurationProperties; | 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 7 | -import org.springframework.web.bind.annotation.*; | 9 | +import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | +import org.springframework.web.bind.annotation.RestController; | ||
| 8 | 13 | ||
| 14 | +import java.io.File; | ||
| 15 | +import java.util.HashMap; | ||
| 9 | import java.util.Map; | 16 | import java.util.Map; |
| 10 | 17 | ||
| 11 | /** | 18 | /** |
| @@ -14,24 +21,12 @@ import java.util.Map; | @@ -14,24 +21,12 @@ import java.util.Map; | ||
| 14 | @RestController | 21 | @RestController |
| 15 | @RequestMapping("cars") | 22 | @RequestMapping("cars") |
| 16 | @EnableConfigurationProperties(DataToolsProperties.class) | 23 | @EnableConfigurationProperties(DataToolsProperties.class) |
| 17 | -public class CarsController extends BaseController<Cars, Integer> { | 24 | +public class CarsController extends BaseController2<Cars, Integer> { |
| 18 | 25 | ||
| 19 | @Autowired | 26 | @Autowired |
| 20 | private DataToolsProperties dataToolsProperties; | 27 | private DataToolsProperties dataToolsProperties; |
| 21 | - | ||
| 22 | - /** | ||
| 23 | - * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | ||
| 24 | - * @Title: save | ||
| 25 | - * @Description: TODO(持久化对象) | ||
| 26 | - * @param @param t | ||
| 27 | - * @param @return 设定文件 | ||
| 28 | - * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 29 | - * @throws | ||
| 30 | - */ | ||
| 31 | - @RequestMapping(method = RequestMethod.POST) | ||
| 32 | - public Map<String, Object> save(@RequestBody Cars t){ | ||
| 33 | - return baseService.save(t); | ||
| 34 | - } | 28 | + @Autowired |
| 29 | + private DataImportExportService dataImportExportService; | ||
| 35 | 30 | ||
| 36 | /** | 31 | /** |
| 37 | * 验证。 | 32 | * 验证。 |
| @@ -44,6 +39,48 @@ public class CarsController extends BaseController<Cars, Integer> { | @@ -44,6 +39,48 @@ public class CarsController extends BaseController<Cars, Integer> { | ||
| 44 | return baseService.validateEquale(map); | 39 | return baseService.validateEquale(map); |
| 45 | } | 40 | } |
| 46 | 41 | ||
| 42 | + // uploadFile post | ||
| 43 | + | ||
| 44 | + // 验证excel sheet | ||
| 45 | + @RequestMapping(value = "/validate/sheet", method = RequestMethod.GET) | ||
| 46 | + public Map<String, Object> validateSheet() throws Exception { | ||
| 47 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 48 | + | ||
| 49 | + // TODO: | ||
| 50 | + | ||
| 51 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 52 | + return rtn; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + @RequestMapping(value = "/importfile", method = RequestMethod.POST) | ||
| 56 | + public Map<String, Object> importData( | ||
| 57 | + @RequestParam Map<String, Object> form) | ||
| 58 | + throws Exception { | ||
| 59 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 60 | + | ||
| 61 | + // TODO: | ||
| 62 | + String filename = (String) form.get("filename"); | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + try { | ||
| 66 | + // 获取ktr转换文件绝对路径 | ||
| 67 | + File ktrfile = new File(this.getClass().getResource(getDataImportKtrClasspath()).toURI()); | ||
| 68 | + System.out.println(ktrfile.getAbsolutePath()); | ||
| 69 | + // 导入数据 | ||
| 70 | + dataImportExportService.fileDataImport(new File(filename), ktrfile); | ||
| 71 | + | ||
| 72 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 73 | + rtn.put("msg", "导入成功"); | ||
| 74 | + } catch (Exception exp) { | ||
| 75 | + exp.printStackTrace(); | ||
| 76 | + rtn.put("status", ResponseCode.ERROR); | ||
| 77 | + rtn.put("msg", exp.getLocalizedMessage()); | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + return rtn; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + | ||
| 47 | @Override | 84 | @Override |
| 48 | protected String getDataImportKtrClasspath() { | 85 | protected String getDataImportKtrClasspath() { |
| 49 | return dataToolsProperties.getCarsDatainputktr(); | 86 | return dataToolsProperties.getCarsDatainputktr(); |
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 13 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | 15 | ||
| 16 | +import com.bsth.entity.mcy_forms.Changetochange; | ||
| 16 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 17 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 17 | import com.bsth.entity.mcy_forms.Operationservice; | 18 | import com.bsth.entity.mcy_forms.Operationservice; |
| 18 | import com.bsth.entity.mcy_forms.Shifday; | 19 | import com.bsth.entity.mcy_forms.Shifday; |
| @@ -274,7 +275,48 @@ public class ExportController { | @@ -274,7 +275,48 @@ public class ExportController { | ||
| 274 | return resList; | 275 | return resList; |
| 275 | } | 276 | } |
| 276 | 277 | ||
| 277 | - | 278 | + |
| 279 | + //换人换车情况日统计 | ||
| 280 | + @RequestMapping(value = "/changetochangeExport",method = RequestMethod.POST) | ||
| 281 | + public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map){ | ||
| 282 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 283 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 284 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 285 | + ReportUtils ee = new ReportUtils(); | ||
| 286 | + List<Changetochange> changetochange = formsService.changetochange(map); | ||
| 287 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 288 | + for(Changetochange l : changetochange){ | ||
| 289 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 290 | + m.put("rq",l.getRq()); | ||
| 291 | + m.put("gs",l.getGs()); | ||
| 292 | + m.put("fgs",l.getFgs()); | ||
| 293 | + m.put("xl",l.getXl()); | ||
| 294 | + m.put("lp",l.getLp()); | ||
| 295 | + m.put("fssj",l.getFssj()); | ||
| 296 | + m.put("xgsj",l.getXgsj()); | ||
| 297 | + m.put("pcch",l.getPcch()); | ||
| 298 | + m.put("pcry",l.getPcry()); | ||
| 299 | + m.put("jhch",l.getJhch()); | ||
| 300 | + m.put("jhgh",l.getJhgh()); | ||
| 301 | + m.put("sjch",l.getSjch()); | ||
| 302 | + m.put("sjgh",l.getSjgh()); | ||
| 303 | + m.put("yy",l.getYy()); | ||
| 304 | + m.put("xgr",l.getXgr()); | ||
| 305 | + resList.add(m); | ||
| 306 | + } | ||
| 307 | + | ||
| 308 | + try { | ||
| 309 | + listI.add(resList.iterator()); | ||
| 310 | + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 311 | + ee.excelReplace(listI, new Object[] { map }, path+"mould\\changetochange.xls", | ||
| 312 | + path+"export\\换人换车情况日统计" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 313 | + } catch (Exception e) { | ||
| 314 | + e.printStackTrace(); | ||
| 315 | + } | ||
| 316 | + return resList; | ||
| 317 | + } | ||
| 318 | + | ||
| 319 | + | ||
| 278 | 320 | ||
| 279 | 321 | ||
| 280 | 322 |
src/main/java/com/bsth/controller/oil/YlbController.java
| @@ -49,8 +49,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ | @@ -49,8 +49,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ | ||
| 49 | */ | 49 | */ |
| 50 | @RequestMapping(value = "/obtain",method = RequestMethod.GET) | 50 | @RequestMapping(value = "/obtain",method = RequestMethod.GET) |
| 51 | public Map<String, Object> obtain(@RequestParam Map<String, Object> map){ | 51 | public Map<String, Object> obtain(@RequestParam Map<String, Object> map){ |
| 52 | - String rq=map.get("rq").toString(); | ||
| 53 | - Map<String, Object> list=yblService.obtain(rq); | 52 | + Map<String, Object> list=yblService.obtain(map); |
| 54 | System.out.println(); | 53 | System.out.println(); |
| 55 | return list; | 54 | return list; |
| 56 | } | 55 | } |
src/main/java/com/bsth/controller/realcontrol/RealMapController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | ||
| 2 | + | ||
| 3 | +import com.bsth.service.realcontrol.RealMapService; | ||
| 4 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 5 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 7 | +import org.springframework.web.bind.annotation.RestController; | ||
| 8 | + | ||
| 9 | +import java.util.Map; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 线调 地图监控相关 | ||
| 13 | + * Created by panzhao on 2016/11/23. | ||
| 14 | + */ | ||
| 15 | +@RestController | ||
| 16 | +@RequestMapping("realMap") | ||
| 17 | +public class RealMapController { | ||
| 18 | + | ||
| 19 | + @Autowired | ||
| 20 | + RealMapService realMapService; | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 根据线路获取站点路由及空间数据 | ||
| 24 | + */ | ||
| 25 | + @RequestMapping(value = "/stationSpatialData") | ||
| 26 | + public Map<String, Object> stationSpatialData(@RequestParam String idx){ | ||
| 27 | + return realMapService.stationSpatialData(idx); | ||
| 28 | + } | ||
| 29 | +} |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| 1 | package com.bsth.controller.realcontrol; | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | ||
| 3 | -import java.io.UnsupportedEncodingException; | ||
| 4 | -import java.net.URLDecoder; | ||
| 5 | -import java.util.*; | ||
| 6 | - | ||
| 7 | -import org.apache.commons.lang3.StringEscapeUtils; | ||
| 8 | -import org.drools.core.runtime.help.impl.XStreamJSon.JSonAbortWorkItemConverter; | ||
| 9 | -import org.joda.time.format.DateTimeFormat; | ||
| 10 | -import org.joda.time.format.DateTimeFormatter; | ||
| 11 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 12 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 13 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 14 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 15 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 16 | -import org.springframework.web.bind.annotation.RestController; | ||
| 17 | - | ||
| 18 | -import com.alibaba.fastjson.JSON; | ||
| 19 | import com.alibaba.fastjson.JSONArray; | 3 | import com.alibaba.fastjson.JSONArray; |
| 20 | import com.bsth.controller.BaseController; | 4 | import com.bsth.controller.BaseController; |
| 21 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; | 5 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; |
| @@ -23,9 +7,14 @@ import com.bsth.controller.realcontrol.dto.DfsjChange; | @@ -23,9 +7,14 @@ import com.bsth.controller.realcontrol.dto.DfsjChange; | ||
| 23 | import com.bsth.data.BasicData; | 7 | import com.bsth.data.BasicData; |
| 24 | import com.bsth.data.schedule.DayOfSchedule; | 8 | import com.bsth.data.schedule.DayOfSchedule; |
| 25 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 26 | -import com.bsth.security.util.SecurityUtils; | ||
| 27 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 10 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 28 | -import com.google.common.base.Splitter; | 11 | +import org.apache.commons.lang3.StringEscapeUtils; |
| 12 | +import org.joda.time.format.DateTimeFormat; | ||
| 13 | +import org.joda.time.format.DateTimeFormatter; | ||
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | +import org.springframework.web.bind.annotation.*; | ||
| 16 | + | ||
| 17 | +import java.util.*; | ||
| 29 | 18 | ||
| 30 | @RestController | 19 | @RestController |
| 31 | @RequestMapping("/realSchedule") | 20 | @RequestMapping("/realSchedule") |
src/main/java/com/bsth/controller/realcontrol/dto/StationSpatialData.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol.dto; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * Created by panzhao on 2016/11/23. | ||
| 5 | + */ | ||
| 6 | +public class StationSpatialData { | ||
| 7 | + | ||
| 8 | + private String lineCode; | ||
| 9 | + | ||
| 10 | + private String stationName; | ||
| 11 | + | ||
| 12 | + private String stationCode; | ||
| 13 | + | ||
| 14 | + private String stationMark; | ||
| 15 | + | ||
| 16 | + private int directions; | ||
| 17 | + | ||
| 18 | + private Float distances; | ||
| 19 | + | ||
| 20 | + private Float toTime; | ||
| 21 | + | ||
| 22 | + private Integer versions; | ||
| 23 | + | ||
| 24 | + private Float gLonx; | ||
| 25 | + | ||
| 26 | + private Float gLaty; | ||
| 27 | + | ||
| 28 | + private Float radius; | ||
| 29 | + | ||
| 30 | + private String shapesType; | ||
| 31 | + | ||
| 32 | + private String gPolygonGrid; | ||
| 33 | + | ||
| 34 | + private Integer stationRouteCode; | ||
| 35 | + | ||
| 36 | + public String getLineCode() { | ||
| 37 | + return lineCode; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public void setLineCode(String lineCode) { | ||
| 41 | + this.lineCode = lineCode; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public String getStationName() { | ||
| 45 | + return stationName; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public void setStationName(String stationName) { | ||
| 49 | + this.stationName = stationName; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public String getStationCode() { | ||
| 53 | + return stationCode; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public void setStationCode(String stationCode) { | ||
| 57 | + this.stationCode = stationCode; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public String getStationMark() { | ||
| 61 | + return stationMark; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public void setStationMark(String stationMark) { | ||
| 65 | + this.stationMark = stationMark; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public int getDirections() { | ||
| 69 | + return directions; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public void setDirections(int directions) { | ||
| 73 | + this.directions = directions; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public Float getDistances() { | ||
| 77 | + return distances; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public void setDistances(Float distances) { | ||
| 81 | + this.distances = distances; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public Float getToTime() { | ||
| 85 | + return toTime; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public void setToTime(Float toTime) { | ||
| 89 | + this.toTime = toTime; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public Integer getVersions() { | ||
| 93 | + return versions; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public void setVersions(Integer versions) { | ||
| 97 | + this.versions = versions; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public Float getgLonx() { | ||
| 101 | + return gLonx; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public void setgLonx(Float gLonx) { | ||
| 105 | + this.gLonx = gLonx; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public Float getgLaty() { | ||
| 109 | + return gLaty; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public void setgLaty(Float gLaty) { | ||
| 113 | + this.gLaty = gLaty; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public Float getRadius() { | ||
| 117 | + return radius; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public void setRadius(Float radius) { | ||
| 121 | + this.radius = radius; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public String getShapesType() { | ||
| 125 | + return shapesType; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public void setShapesType(String shapesType) { | ||
| 129 | + this.shapesType = shapesType; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public String getgPolygonGrid() { | ||
| 133 | + return gPolygonGrid; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public void setgPolygonGrid(String gPolygonGrid) { | ||
| 137 | + this.gPolygonGrid = gPolygonGrid; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public Integer getStationRouteCode() { | ||
| 141 | + return stationRouteCode; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public void setStationRouteCode(Integer stationRouteCode) { | ||
| 145 | + this.stationRouteCode = stationRouteCode; | ||
| 146 | + } | ||
| 147 | +} |
src/main/java/com/bsth/controller/schedule/TTInfoDetailController.java
| 1 | package com.bsth.controller.schedule; | 1 | package com.bsth.controller.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.common.ResponseCode; | 3 | import com.bsth.common.ResponseCode; |
| 4 | -import com.bsth.controller.BaseController; | 4 | +import com.bsth.controller.BaseController2; |
| 5 | import com.bsth.entity.CarPark; | 5 | import com.bsth.entity.CarPark; |
| 6 | import com.bsth.entity.LineInformation; | 6 | import com.bsth.entity.LineInformation; |
| 7 | import com.bsth.entity.StationRoute; | 7 | import com.bsth.entity.StationRoute; |
| @@ -38,7 +38,7 @@ import java.util.regex.Pattern; | @@ -38,7 +38,7 @@ import java.util.regex.Pattern; | ||
| 38 | */ | 38 | */ |
| 39 | @RestController | 39 | @RestController |
| 40 | @RequestMapping("tidc") | 40 | @RequestMapping("tidc") |
| 41 | -public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | 41 | +public class TTInfoDetailController extends BaseController2<TTInfoDetail, Long> { |
| 42 | @Autowired | 42 | @Autowired |
| 43 | private TTInfoDetailService ttInfoDetailService; | 43 | private TTInfoDetailService ttInfoDetailService; |
| 44 | @Autowired | 44 | @Autowired |
| @@ -56,53 +56,13 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | @@ -56,53 +56,13 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | ||
| 56 | @Autowired | 56 | @Autowired |
| 57 | private DataToolsProperties dataToolsProperties; | 57 | private DataToolsProperties dataToolsProperties; |
| 58 | 58 | ||
| 59 | - | ||
| 60 | - public static class ExcelFileOutput { | ||
| 61 | - private String fileName; | ||
| 62 | - private List<Map<String, Object>> sheetnames = new ArrayList<>(); | ||
| 63 | - | ||
| 64 | - public String getFileName() { | ||
| 65 | - return fileName; | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - public void setFileName(String fileName) { | ||
| 69 | - this.fileName = fileName; | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - public List<Map<String, Object>> getSheetnames() { | ||
| 73 | - return sheetnames; | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | - public void setSheetnames(List<Map<String, Object>> sheetnames) { | ||
| 77 | - this.sheetnames = sheetnames; | ||
| 78 | - } | ||
| 79 | - } | ||
| 80 | - | ||
| 81 | /** | 59 | /** |
| 82 | * 1、上传Excel文件,返回文件全路径名,工作区名称列表。 | 60 | * 1、上传Excel文件,返回文件全路径名,工作区名称列表。 |
| 83 | * @param file | 61 | * @param file |
| 84 | * @return | 62 | * @return |
| 85 | * @throws Exception | 63 | * @throws Exception |
| 86 | */ | 64 | */ |
| 87 | - @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | ||
| 88 | - public ExcelFileOutput fileUpload(MultipartFile file) throws Exception { | ||
| 89 | - // 返回对象 | ||
| 90 | - ExcelFileOutput rs = new ExcelFileOutput(); | ||
| 91 | - | ||
| 92 | - // 上传文件 | ||
| 93 | - File file1 = dataImportExportService.uploadFile(file); | ||
| 94 | - // 获取文件的sheet | ||
| 95 | - Workbook book = Workbook.getWorkbook(file1); | ||
| 96 | - for (Sheet sheet : book.getSheets()) { | ||
| 97 | - String sheetname = sheet.getName(); | ||
| 98 | - Map<String, Object> s = new HashMap<>(); | ||
| 99 | - s.put("name", sheetname); | ||
| 100 | - rs.getSheetnames().add(s); | ||
| 101 | - } | ||
| 102 | 65 | ||
| 103 | - rs.setFileName(file1.getAbsolutePath()); | ||
| 104 | - return rs; | ||
| 105 | - } | ||
| 106 | 66 | ||
| 107 | /** | 67 | /** |
| 108 | * 2、验证sheet(以后放到规则引擎里去做)。 | 68 | * 2、验证sheet(以后放到规则引擎里去做)。 |
| @@ -441,21 +401,6 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | @@ -441,21 +401,6 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | ||
| 441 | return ttInfoDetailService.getEditInfo(xlid, ttid); | 401 | return ttInfoDetailService.getEditInfo(xlid, ttid); |
| 442 | } | 402 | } |
| 443 | 403 | ||
| 444 | - /** | ||
| 445 | - * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | ||
| 446 | - * @Title: save | ||
| 447 | - * @Description: TODO(持久化对象) | ||
| 448 | - * @param @param t | ||
| 449 | - * @param @return 设定文件 | ||
| 450 | - * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 451 | - * @throws | ||
| 452 | - */ | ||
| 453 | - @RequestMapping(method = RequestMethod.POST) | ||
| 454 | - public Map<String, Object> save(@RequestBody TTInfoDetail t){ | ||
| 455 | - | ||
| 456 | - return baseService.save(t); | ||
| 457 | - } | ||
| 458 | - | ||
| 459 | @Override | 404 | @Override |
| 460 | public TTInfoDetail findById(@PathVariable("id") Long aLong) { | 405 | public TTInfoDetail findById(@PathVariable("id") Long aLong) { |
| 461 | return ttInfoDetailRepository.findOneExtend(aLong); | 406 | return ttInfoDetailRepository.findOneExtend(aLong); |
src/main/java/com/bsth/controller/sys/CompanyAuthorityController.java
0 → 100644
| 1 | +package com.bsth.controller.sys; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSONArray; | ||
| 4 | +import com.bsth.controller.BaseController; | ||
| 5 | +import com.bsth.entity.sys.CompanyAuthority; | ||
| 6 | +import com.bsth.service.sys.CompanyAuthorityService; | ||
| 7 | +import org.apache.commons.lang3.StringEscapeUtils; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 11 | +import org.springframework.web.bind.annotation.RestController; | ||
| 12 | + | ||
| 13 | +import java.util.List; | ||
| 14 | +import java.util.Map; | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * Created by panzhao on 2016/11/22. | ||
| 18 | + */ | ||
| 19 | +@RestController | ||
| 20 | +@RequestMapping("companyAuthority") | ||
| 21 | +public class CompanyAuthorityController extends BaseController<CompanyAuthority, Integer>{ | ||
| 22 | + | ||
| 23 | + @Autowired | ||
| 24 | + CompanyAuthorityService companyAuthorityService; | ||
| 25 | + | ||
| 26 | + @RequestMapping(value = "save") | ||
| 27 | + public Map<String, Object> save(@RequestParam Integer roleId, @RequestParam String authJsonStr){ | ||
| 28 | + authJsonStr = StringEscapeUtils.unescapeHtml4(authJsonStr); | ||
| 29 | + System.out.println(authJsonStr); | ||
| 30 | + List<CompanyAuthority> list = JSONArray.parseArray(authJsonStr, CompanyAuthority.class); | ||
| 31 | + return companyAuthorityService.save(roleId, list); | ||
| 32 | + } | ||
| 33 | +} |
src/main/java/com/bsth/controller/sys/UserController.java
| 1 | package com.bsth.controller.sys; | 1 | package com.bsth.controller.sys; |
| 2 | 2 | ||
| 3 | -import java.util.HashMap; | ||
| 4 | -import java.util.Map; | ||
| 5 | - | ||
| 6 | -import javax.servlet.http.HttpServletRequest; | ||
| 7 | -import javax.servlet.http.HttpSession; | ||
| 8 | - | 3 | +import com.bsth.common.Constants; |
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.controller.BaseController; | ||
| 6 | +import com.bsth.controller.sys.dto.CompanyData; | ||
| 7 | +import com.bsth.controller.sys.util.RSAUtils; | ||
| 8 | +import com.bsth.entity.sys.CompanyAuthority; | ||
| 9 | +import com.bsth.entity.sys.SysUser; | ||
| 10 | +import com.bsth.security.util.SecurityUtils; | ||
| 11 | +import com.bsth.service.sys.CompanyAuthorityService; | ||
| 12 | +import com.bsth.service.sys.SysUserService; | ||
| 13 | +import com.google.common.collect.ArrayListMultimap; | ||
| 9 | import org.apache.commons.lang3.StringUtils; | 14 | import org.apache.commons.lang3.StringUtils; |
| 10 | import org.slf4j.Logger; | 15 | import org.slf4j.Logger; |
| 11 | import org.slf4j.LoggerFactory; | 16 | import org.slf4j.LoggerFactory; |
| @@ -18,13 +23,9 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -18,13 +23,9 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 18 | import org.springframework.web.bind.annotation.RequestParam; | 23 | import org.springframework.web.bind.annotation.RequestParam; |
| 19 | import org.springframework.web.bind.annotation.RestController; | 24 | import org.springframework.web.bind.annotation.RestController; |
| 20 | 25 | ||
| 21 | -import com.bsth.common.Constants; | ||
| 22 | -import com.bsth.common.ResponseCode; | ||
| 23 | -import com.bsth.controller.BaseController; | ||
| 24 | -import com.bsth.controller.sys.util.RSAUtils; | ||
| 25 | -import com.bsth.entity.sys.SysUser; | ||
| 26 | -import com.bsth.security.util.SecurityUtils; | ||
| 27 | -import com.bsth.service.sys.SysUserService; | 26 | +import javax.servlet.http.HttpServletRequest; |
| 27 | +import javax.servlet.http.HttpSession; | ||
| 28 | +import java.util.*; | ||
| 28 | 29 | ||
| 29 | @RestController | 30 | @RestController |
| 30 | @RequestMapping("user") | 31 | @RequestMapping("user") |
| @@ -34,6 +35,9 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -34,6 +35,9 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 34 | 35 | ||
| 35 | @Autowired | 36 | @Autowired |
| 36 | SysUserService sysUserService; | 37 | SysUserService sysUserService; |
| 38 | + | ||
| 39 | + @Autowired | ||
| 40 | + CompanyAuthorityService companyAuthorityService; | ||
| 37 | 41 | ||
| 38 | @RequestMapping(value = "/login/jCryptionKey") | 42 | @RequestMapping(value = "/login/jCryptionKey") |
| 39 | public Map<String, Object> jCryptionKey(HttpServletRequest request){ | 43 | public Map<String, Object> jCryptionKey(HttpServletRequest request){ |
| @@ -97,7 +101,11 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -97,7 +101,11 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 97 | SecurityUtils.login(user, request); | 101 | SecurityUtils.login(user, request); |
| 98 | //session里写入用户名,webSocket连接时标识身份用 | 102 | //session里写入用户名,webSocket连接时标识身份用 |
| 99 | session.setAttribute(Constants.SESSION_USERNAME, user.getUserName()); | 103 | session.setAttribute(Constants.SESSION_USERNAME, user.getUserName()); |
| 100 | - | 104 | + |
| 105 | + //获取公司权限数据 | ||
| 106 | + List<CompanyAuthority> cmyAuths=companyAuthorityService.findByUser(user); | ||
| 107 | + session.setAttribute(Constants.COMPANY_AUTHORITYS, cmyAuths); | ||
| 108 | + | ||
| 101 | captchaMap.remove(userName); | 109 | captchaMap.remove(userName); |
| 102 | rs.put("status", ResponseCode.SUCCESS); | 110 | rs.put("status", ResponseCode.SUCCESS); |
| 103 | } catch (Exception e) { | 111 | } catch (Exception e) { |
| @@ -106,6 +114,43 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -106,6 +114,43 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 106 | } | 114 | } |
| 107 | return rs; | 115 | return rs; |
| 108 | } | 116 | } |
| 117 | + | ||
| 118 | + /** | ||
| 119 | + * 返回当前用户的公司权限数据,用于构建页面级联下拉框 | ||
| 120 | + * @return | ||
| 121 | + */ | ||
| 122 | + @RequestMapping("companyData") | ||
| 123 | + public List<CompanyData> companyData(HttpServletRequest request){ | ||
| 124 | + List<CompanyData> rs = new ArrayList<>(); | ||
| 125 | + CompanyData companyData; | ||
| 126 | + | ||
| 127 | + ArrayListMultimap<String, CompanyAuthority> map = ArrayListMultimap.create(); | ||
| 128 | + List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) request.getSession().getAttribute(Constants.COMPANY_AUTHORITYS); | ||
| 129 | + | ||
| 130 | + for(CompanyAuthority cAuth : cmyAuths){ | ||
| 131 | + map.put(cAuth.getCompanyCode()+"_"+cAuth.getCompanyName(), cAuth); | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + Set<String> keys = map.keySet(); | ||
| 135 | + String[] temps; | ||
| 136 | + for(String k : keys){ | ||
| 137 | + temps = k.split("_"); | ||
| 138 | + | ||
| 139 | + companyData = new CompanyData(); | ||
| 140 | + companyData.setCompanyCode(temps[0]); | ||
| 141 | + companyData.setCompanyName(temps[1]); | ||
| 142 | + companyData.setChildren(new ArrayList<CompanyData.ChildrenCompany>()); | ||
| 143 | + | ||
| 144 | + cmyAuths = map.get(k); | ||
| 145 | + for(CompanyAuthority c : cmyAuths){ | ||
| 146 | + companyData.getChildren().add(new CompanyData.ChildrenCompany(c.getSubCompanyCode(), c.getSubCompanyName())); | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + rs.add(companyData); | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + return rs; | ||
| 153 | + } | ||
| 109 | 154 | ||
| 110 | @RequestMapping(value = "/login/captchaStatus") | 155 | @RequestMapping(value = "/login/captchaStatus") |
| 111 | public int captchaStatus(String userName){ | 156 | public int captchaStatus(String userName){ |
| @@ -162,7 +207,7 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -162,7 +207,7 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 162 | * @Description: TODO(修改密码) | 207 | * @Description: TODO(修改密码) |
| 163 | * @param oldPWD | 208 | * @param oldPWD |
| 164 | * 原始密码 | 209 | * 原始密码 |
| 165 | - * @param newwPWD | 210 | + * @param newPWD |
| 166 | * 新密码 | 211 | * 新密码 |
| 167 | * @param cnewPWD | 212 | * @param cnewPWD |
| 168 | * 确认新密码 | 213 | * 确认新密码 |
src/main/java/com/bsth/controller/sys/dto/CompanyData.java
0 → 100644
| 1 | +package com.bsth.controller.sys.dto; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * Created by panzhao on 2016/11/22. | ||
| 7 | + */ | ||
| 8 | +public class CompanyData { | ||
| 9 | + | ||
| 10 | + private String companyCode; | ||
| 11 | + | ||
| 12 | + private String companyName; | ||
| 13 | + | ||
| 14 | + private List<ChildrenCompany> children; | ||
| 15 | + | ||
| 16 | + public String getCompanyCode() { | ||
| 17 | + return companyCode; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + public void setCompanyCode(String companyCode) { | ||
| 21 | + this.companyCode = companyCode; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + public String getCompanyName() { | ||
| 25 | + return companyName; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + public void setCompanyName(String companyName) { | ||
| 29 | + this.companyName = companyName; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public List<ChildrenCompany> getChildren() { | ||
| 33 | + return children; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public void setChildren(List<ChildrenCompany> children) { | ||
| 37 | + this.children = children; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public static class ChildrenCompany { | ||
| 41 | + private String code; | ||
| 42 | + | ||
| 43 | + private String name; | ||
| 44 | + | ||
| 45 | + public ChildrenCompany(String code, String name){ | ||
| 46 | + this.code = code; | ||
| 47 | + this.name = name; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public String getName() { | ||
| 51 | + return name; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public void setName(String name) { | ||
| 55 | + this.name = name; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public String getCode() { | ||
| 59 | + return code; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public void setCode(String code) { | ||
| 63 | + this.code = code; | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | +} |
src/main/java/com/bsth/data/BasicData.java
| @@ -308,9 +308,9 @@ public class BasicData implements CommandLineRunner { | @@ -308,9 +308,9 @@ public class BasicData implements CommandLineRunner { | ||
| 308 | if (StringUtils.isEmpty(jobCode)) | 308 | if (StringUtils.isEmpty(jobCode)) |
| 309 | continue; | 309 | continue; |
| 310 | 310 | ||
| 311 | - if (jobCode.indexOf("-") != -1) { | 311 | + /*if (jobCode.indexOf("-") != -1) { |
| 312 | jobCode = jobCode.split("-")[1]; | 312 | jobCode = jobCode.split("-")[1]; |
| 313 | - } | 313 | + }*/ |
| 314 | if (p.getPosts() != null) { | 314 | if (p.getPosts() != null) { |
| 315 | if (p.getPosts().equals("1")) | 315 | if (p.getPosts().equals("1")) |
| 316 | jsyTempMap.put(jobCode, p); | 316 | jsyTempMap.put(jobCode, p); |
src/main/java/com/bsth/data/arrival/ArrivalData_GPS.java
| @@ -41,8 +41,8 @@ public class ArrivalData_GPS implements CommandLineRunner{ | @@ -41,8 +41,8 @@ public class ArrivalData_GPS implements CommandLineRunner{ | ||
| 41 | 41 | ||
| 42 | @Override | 42 | @Override |
| 43 | public void run(String... arg0) throws Exception { | 43 | public void run(String... arg0) throws Exception { |
| 44 | - logger.info("ArrivalData_GPS,30,10"); | ||
| 45 | - //Application.mainServices.scheduleWithFixedDelay(dataLoaderThread, 40, 10, TimeUnit.SECONDS); | 44 | + logger.info("ArrivalData_GPS,30,06"); |
| 45 | + //Application.mainServices.scheduleWithFixedDelay(dataLoaderThread, 40, 6, TimeUnit.SECONDS); | ||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | @Component | 48 | @Component |
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
| 1 | package com.bsth.data.gpsdata; | 1 | package com.bsth.data.gpsdata; |
| 2 | 2 | ||
| 3 | -import java.io.BufferedReader; | ||
| 4 | -import java.io.InputStreamReader; | ||
| 5 | -import java.util.*; | ||
| 6 | -import java.util.concurrent.TimeUnit; | ||
| 7 | - | 3 | +import com.alibaba.fastjson.JSON; |
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.data.BasicData; | ||
| 6 | +import com.bsth.data.forecast.ForecastRealServer; | ||
| 7 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 8 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 9 | +import com.bsth.util.ConfigUtil; | ||
| 10 | +import com.google.common.collect.TreeMultimap; | ||
| 8 | import org.apache.commons.lang3.StringUtils; | 11 | import org.apache.commons.lang3.StringUtils; |
| 9 | import org.apache.http.HttpEntity; | 12 | import org.apache.http.HttpEntity; |
| 10 | import org.apache.http.client.methods.CloseableHttpResponse; | 13 | import org.apache.http.client.methods.CloseableHttpResponse; |
| @@ -17,15 +20,9 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -17,15 +20,9 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
| 17 | import org.springframework.boot.CommandLineRunner; | 20 | import org.springframework.boot.CommandLineRunner; |
| 18 | import org.springframework.stereotype.Component; | 21 | import org.springframework.stereotype.Component; |
| 19 | 22 | ||
| 20 | -import com.alibaba.fastjson.JSON; | ||
| 21 | -import com.alibaba.fastjson.JSONObject; | ||
| 22 | -import com.bsth.Application; | ||
| 23 | -import com.bsth.data.BasicData; | ||
| 24 | -import com.bsth.data.forecast.ForecastRealServer; | ||
| 25 | -import com.bsth.data.schedule.DayOfSchedule; | ||
| 26 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 27 | -import com.bsth.util.ConfigUtil; | ||
| 28 | -import com.google.common.collect.TreeMultimap; | 23 | +import java.io.BufferedReader; |
| 24 | +import java.io.InputStreamReader; | ||
| 25 | +import java.util.*; | ||
| 29 | 26 | ||
| 30 | /** | 27 | /** |
| 31 | * | 28 | * |
| @@ -68,7 +65,7 @@ public class GpsRealData implements CommandLineRunner{ | @@ -68,7 +65,7 @@ public class GpsRealData implements CommandLineRunner{ | ||
| 68 | @Override | 65 | @Override |
| 69 | public void run(String... arg0) throws Exception { | 66 | public void run(String... arg0) throws Exception { |
| 70 | logger.info("gpsDataLoader,20,6"); | 67 | logger.info("gpsDataLoader,20,6"); |
| 71 | - Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS); | 68 | + //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS); |
| 72 | } | 69 | } |
| 73 | 70 | ||
| 74 | public GpsEntity add(GpsEntity gps) { | 71 | public GpsEntity add(GpsEntity gps) { |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| 1 | package com.bsth.data.schedule; | 1 | package com.bsth.data.schedule; |
| 2 | 2 | ||
| 3 | -import java.text.ParseException; | ||
| 4 | -import java.text.SimpleDateFormat; | ||
| 5 | -import java.util.ArrayList; | ||
| 6 | -import java.util.Collection; | ||
| 7 | -import java.util.Collections; | ||
| 8 | -import java.util.HashMap; | ||
| 9 | -import java.util.HashSet; | ||
| 10 | -import java.util.Iterator; | ||
| 11 | -import java.util.LinkedList; | ||
| 12 | -import java.util.List; | ||
| 13 | -import java.util.Map; | ||
| 14 | -import java.util.Set; | ||
| 15 | -import java.util.concurrent.TimeUnit; | ||
| 16 | - | ||
| 17 | -import com.bsth.data.schedule.thread.SubmitToTrafficManage; | ||
| 18 | -import org.apache.commons.lang3.StringUtils; | ||
| 19 | -import org.joda.time.DateTime; | ||
| 20 | -import org.joda.time.format.DateTimeFormat; | ||
| 21 | -import org.joda.time.format.DateTimeFormatter; | ||
| 22 | -import org.slf4j.Logger; | ||
| 23 | -import org.slf4j.LoggerFactory; | ||
| 24 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 25 | -import org.springframework.boot.CommandLineRunner; | ||
| 26 | -import org.springframework.stereotype.Component; | ||
| 27 | - | ||
| 28 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 29 | import com.alibaba.fastjson.JSONArray; | 4 | import com.alibaba.fastjson.JSONArray; |
| 30 | import com.bsth.Application; | 5 | import com.bsth.Application; |
| @@ -34,6 +9,7 @@ import com.bsth.data.gpsdata.GpsRealData; | @@ -34,6 +9,7 @@ import com.bsth.data.gpsdata.GpsRealData; | ||
| 34 | import com.bsth.data.schedule.thread.ScheduleLateThread; | 9 | import com.bsth.data.schedule.thread.ScheduleLateThread; |
| 35 | import com.bsth.data.schedule.thread.SchedulePstThread; | 10 | import com.bsth.data.schedule.thread.SchedulePstThread; |
| 36 | import com.bsth.data.schedule.thread.ScheduleRefreshThread; | 11 | import com.bsth.data.schedule.thread.ScheduleRefreshThread; |
| 12 | +import com.bsth.data.schedule.thread.SubmitToTrafficManage; | ||
| 37 | import com.bsth.entity.realcontrol.LineConfig; | 13 | import com.bsth.entity.realcontrol.LineConfig; |
| 38 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 14 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 39 | import com.bsth.entity.schedule.SchedulePlanInfo; | 15 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| @@ -44,6 +20,19 @@ import com.bsth.util.DateUtils; | @@ -44,6 +20,19 @@ import com.bsth.util.DateUtils; | ||
| 44 | import com.bsth.websocket.handler.SendUtils; | 20 | import com.bsth.websocket.handler.SendUtils; |
| 45 | import com.google.common.collect.ArrayListMultimap; | 21 | import com.google.common.collect.ArrayListMultimap; |
| 46 | import com.google.common.collect.TreeMultimap; | 22 | import com.google.common.collect.TreeMultimap; |
| 23 | +import org.apache.commons.lang3.StringUtils; | ||
| 24 | +import org.joda.time.format.DateTimeFormat; | ||
| 25 | +import org.joda.time.format.DateTimeFormatter; | ||
| 26 | +import org.slf4j.Logger; | ||
| 27 | +import org.slf4j.LoggerFactory; | ||
| 28 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 29 | +import org.springframework.boot.CommandLineRunner; | ||
| 30 | +import org.springframework.stereotype.Component; | ||
| 31 | + | ||
| 32 | +import java.text.ParseException; | ||
| 33 | +import java.text.SimpleDateFormat; | ||
| 34 | +import java.util.*; | ||
| 35 | +import java.util.concurrent.TimeUnit; | ||
| 47 | 36 | ||
| 48 | /** | 37 | /** |
| 49 | * | 38 | * |
src/main/java/com/bsth/data/schedule/thread/SchedulePstThread.java
| 1 | package com.bsth.data.schedule.thread; | 1 | package com.bsth.data.schedule.thread; |
| 2 | 2 | ||
| 3 | -import java.util.LinkedList; | ||
| 4 | - | ||
| 5 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | -import org.springframework.stereotype.Component; | ||
| 7 | - | ||
| 8 | import com.bsth.data.schedule.DayOfSchedule; | 3 | import com.bsth.data.schedule.DayOfSchedule; |
| 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 4 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 10 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 5 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 6 | +import org.slf4j.Logger; | ||
| 7 | +import org.slf4j.LoggerFactory; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.orm.jpa.JpaObjectRetrievalFailureException; | ||
| 10 | +import org.springframework.stereotype.Component; | ||
| 11 | + | ||
| 12 | +import javax.persistence.EntityNotFoundException; | ||
| 13 | +import java.util.LinkedList; | ||
| 11 | 14 | ||
| 12 | /** | 15 | /** |
| 13 | - * | ||
| 14 | - * @ClassName: SchedulePstThread | ||
| 15 | - * @Description: TODO(班次异步持久化) | ||
| 16 | - * @author PanZhao | ||
| 17 | - * @date 2016年8月24日 上午1:47:05 | ||
| 18 | - * | 16 | + * @author PanZhao |
| 17 | + * @ClassName: SchedulePstThread | ||
| 18 | + * @Description: TODO(班次异步持久化) | ||
| 19 | + * @date 2016年8月24日 上午1:47:05 | ||
| 19 | */ | 20 | */ |
| 20 | @Component | 21 | @Component |
| 21 | -public class SchedulePstThread extends Thread{ | ||
| 22 | - | ||
| 23 | - @Autowired | ||
| 24 | - ScheduleRealInfoRepository scheduleRepository; | ||
| 25 | - | ||
| 26 | - @Override | ||
| 27 | - public void run() { | ||
| 28 | - LinkedList<ScheduleRealInfo> list = DayOfSchedule.pstBuffer; | ||
| 29 | - | ||
| 30 | - ScheduleRealInfo schedule; | ||
| 31 | - for (int i = 0; i < 1000; i++) { | ||
| 32 | - schedule = list.poll(); | ||
| 33 | - if (null == schedule) | ||
| 34 | - break; | ||
| 35 | - | ||
| 36 | - scheduleRepository.save(schedule); | ||
| 37 | - } | ||
| 38 | - } | 22 | +public class SchedulePstThread extends Thread { |
| 23 | + | ||
| 24 | + @Autowired | ||
| 25 | + ScheduleRealInfoRepository scheduleRepository; | ||
| 26 | + | ||
| 27 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public void run() { | ||
| 31 | + | ||
| 32 | + LinkedList<ScheduleRealInfo> list = DayOfSchedule.pstBuffer; | ||
| 33 | + | ||
| 34 | + ScheduleRealInfo schedule; | ||
| 35 | + for (int i = 0; i < 1000; i++) { | ||
| 36 | + schedule = list.poll(); | ||
| 37 | + if (null == schedule) | ||
| 38 | + break; | ||
| 39 | + | ||
| 40 | + try { | ||
| 41 | + scheduleRepository.save(schedule); | ||
| 42 | + } | ||
| 43 | + catch (JpaObjectRetrievalFailureException e1){ | ||
| 44 | + logger.error("JpaObjectRetrievalFailureException error.... 可忽略"); | ||
| 45 | + } | ||
| 46 | + catch(EntityNotFoundException e2){ | ||
| 47 | + logger.error("EntityNotFoundException error.... 可忽略"); | ||
| 48 | + } | ||
| 49 | + catch (Exception e) { | ||
| 50 | + logger.error("", e); | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + } | ||
| 39 | } | 54 | } |
src/main/java/com/bsth/entity/mcy_forms/Changetochange.java
| 1 | package com.bsth.entity.mcy_forms; | 1 | package com.bsth.entity.mcy_forms; |
| 2 | 2 | ||
| 3 | +import java.util.Date; | ||
| 4 | + | ||
| 5 | +import javax.persistence.Entity; | ||
| 6 | +import javax.persistence.GeneratedValue; | ||
| 7 | +import javax.persistence.Id; | ||
| 8 | +import javax.persistence.Table; | ||
| 9 | + | ||
| 10 | +@Entity | ||
| 11 | +@Table(name = "bsth_c_chtoch") | ||
| 3 | public class Changetochange { | 12 | public class Changetochange { |
| 13 | + @Id | ||
| 14 | + @GeneratedValue | ||
| 15 | + private Integer id; | ||
| 16 | + | ||
| 17 | + private String rq;//日期 | ||
| 18 | + | ||
| 19 | + private String gs;//公司 | ||
| 20 | + | ||
| 21 | + private String fgs;//分公司 | ||
| 22 | + | ||
| 23 | + private String xl;//线路 | ||
| 24 | + | ||
| 25 | + private String lp;//路牌 | ||
| 26 | + | ||
| 27 | + private String fssj;//发生时间 | ||
| 28 | + | ||
| 29 | + private String xgsj;//修改时间 | ||
| 30 | + | ||
| 31 | + private String pcch;//配车车号 | ||
| 32 | + | ||
| 33 | + private String pcry;//配车人员 | ||
| 34 | + | ||
| 35 | + private String jhch;//计划车号 | ||
| 36 | + | ||
| 37 | + private String jhgh;//计划工号 | ||
| 38 | + | ||
| 39 | + private String sjch;//实际车号 | ||
| 40 | + | ||
| 41 | + private String sjgh;//实际工号 | ||
| 42 | + | ||
| 43 | + private String yy;//原因 | ||
| 44 | + | ||
| 45 | + private String xgr;//修改人 | ||
| 46 | + | ||
| 47 | + | ||
| 48 | + public Integer getId() { | ||
| 49 | + return id; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setId(Integer id) { | ||
| 53 | + this.id = id; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public String getRq() { | ||
| 57 | + return rq; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public void setRq(String rq) { | ||
| 61 | + this.rq = rq; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public String getGs() { | ||
| 65 | + return gs; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public void setGs(String gs) { | ||
| 69 | + this.gs = gs; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public String getFgs() { | ||
| 73 | + return fgs; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public void setFgs(String fgs) { | ||
| 77 | + this.fgs = fgs; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public String getXl() { | ||
| 81 | + return xl; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setXl(String xl) { | ||
| 85 | + this.xl = xl; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public String getLp() { | ||
| 89 | + return lp; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setLp(String lp) { | ||
| 93 | + this.lp = lp; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getFssj() { | ||
| 97 | + return fssj; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFssj(String fssj) { | ||
| 101 | + this.fssj = fssj; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getXgsj() { | ||
| 105 | + return xgsj; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setXgsj(String xgsj) { | ||
| 109 | + this.xgsj = xgsj; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public String getPcch() { | ||
| 113 | + return pcch; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setPcch(String pcch) { | ||
| 117 | + this.pcch = pcch; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getPcry() { | ||
| 121 | + return pcry; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public void setPcry(String pcry) { | ||
| 125 | + this.pcry = pcry; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + | ||
| 129 | + public String getJhch() { | ||
| 130 | + return jhch; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public void setJhch(String jhch) { | ||
| 134 | + this.jhch = jhch; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public String getJhgh() { | ||
| 138 | + return jhgh; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + public void setJhgh(String jhgh) { | ||
| 142 | + this.jhgh = jhgh; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public String getSjch() { | ||
| 146 | + return sjch; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + public void setSjch(String sjch) { | ||
| 150 | + this.sjch = sjch; | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + public String getSjgh() { | ||
| 154 | + return sjgh; | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + public void setSjgh(String sjgh) { | ||
| 158 | + this.sjgh = sjgh; | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + public String getYy() { | ||
| 162 | + return yy; | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + public void setYy(String yy) { | ||
| 166 | + this.yy = yy; | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + public String getXgr() { | ||
| 170 | + return xgr; | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + public void setXgr(String xgr) { | ||
| 174 | + this.xgr = xgr; | ||
| 175 | + } | ||
| 176 | + | ||
| 4 | 177 | ||
| 5 | 178 | ||
| 6 | } | 179 | } |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
| @@ -2,13 +2,11 @@ package com.bsth.entity.realcontrol; | @@ -2,13 +2,11 @@ package com.bsth.entity.realcontrol; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.sys.SysUser; | 3 | import com.bsth.entity.sys.SysUser; |
| 4 | import com.fasterxml.jackson.annotation.JsonIgnore; | 4 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 5 | - | ||
| 6 | -import javax.persistence.*; | ||
| 7 | - | ||
| 8 | import org.apache.commons.lang3.StringUtils; | 5 | import org.apache.commons.lang3.StringUtils; |
| 9 | import org.joda.time.format.DateTimeFormat; | 6 | import org.joda.time.format.DateTimeFormat; |
| 10 | import org.joda.time.format.DateTimeFormatter; | 7 | import org.joda.time.format.DateTimeFormatter; |
| 11 | 8 | ||
| 9 | +import javax.persistence.*; | ||
| 12 | import java.util.Date; | 10 | import java.util.Date; |
| 13 | import java.util.HashSet; | 11 | import java.util.HashSet; |
| 14 | import java.util.Set; | 12 | import java.util.Set; |
| @@ -49,11 +47,6 @@ public class ScheduleRealInfo { | @@ -49,11 +47,6 @@ public class ScheduleRealInfo { | ||
| 49 | 47 | ||
| 50 | /** 车辆自编号 */ | 48 | /** 车辆自编号 */ |
| 51 | private String clZbh; | 49 | private String clZbh; |
| 52 | - | ||
| 53 | - /** 报道时间(格式 HH:mm) | ||
| 54 | - private String bdTime; */ | ||
| 55 | - /** 出场时间(格式 HH:mm) | ||
| 56 | - private String ccTime;*/ | ||
| 57 | 50 | ||
| 58 | /** 驾驶员工号 */ | 51 | /** 驾驶员工号 */ |
| 59 | private String jGh; | 52 | private String jGh; |
| @@ -143,15 +136,6 @@ public class ScheduleRealInfo { | @@ -143,15 +136,6 @@ public class ScheduleRealInfo { | ||
| 143 | @Transient | 136 | @Transient |
| 144 | private boolean late; | 137 | private boolean late; |
| 145 | 138 | ||
| 146 | - /**实际里程*/ | ||
| 147 | - private Float realMileage; | ||
| 148 | - | ||
| 149 | - /** 增加公里 */ | ||
| 150 | - private Float addMileage; | ||
| 151 | - | ||
| 152 | - /** 抽减公里 */ | ||
| 153 | - private Float remMileage; | ||
| 154 | - | ||
| 155 | /** 备注*/ | 139 | /** 备注*/ |
| 156 | private String remarks; | 140 | private String remarks; |
| 157 | 141 | ||
| @@ -169,16 +153,126 @@ public class ScheduleRealInfo { | @@ -169,16 +153,126 @@ public class ScheduleRealInfo { | ||
| 169 | private Integer opDirectiveState; | 153 | private Integer opDirectiveState; |
| 170 | 154 | ||
| 171 | /** 起点站计划到达时间 */ | 155 | /** 起点站计划到达时间 */ |
| 156 | + @Transient | ||
| 172 | private String qdzArrDatejh; | 157 | private String qdzArrDatejh; |
| 173 | - | 158 | + |
| 174 | /** 起点站实际到达时间 */ | 159 | /** 起点站实际到达时间 */ |
| 160 | + @Transient | ||
| 175 | private String qdzArrDatesj; | 161 | private String qdzArrDatesj; |
| 176 | - | 162 | + |
| 177 | /** 子任务 */ | 163 | /** 子任务 */ |
| 178 | @OneToMany(fetch = FetchType.LAZY/*, cascade = CascadeType.ALL*/) | 164 | @OneToMany(fetch = FetchType.LAZY/*, cascade = CascadeType.ALL*/) |
| 179 | private Set<ChildTaskPlan> cTasks = new HashSet<>(); | 165 | private Set<ChildTaskPlan> cTasks = new HashSet<>(); |
| 180 | - | ||
| 181 | - /** ---------------- | 166 | + |
| 167 | + /** 关联的公司名称 */ | ||
| 168 | + private String gsName; | ||
| 169 | + /** 关联的公司编码 */ | ||
| 170 | + private String gsBm; | ||
| 171 | + /** 关联的分公司名称 */ | ||
| 172 | + private String fgsName; | ||
| 173 | + /** 关联的分公司编码 */ | ||
| 174 | + private String fgsBm; | ||
| 175 | + /** 出场顺序号 */ | ||
| 176 | + private Integer ccno; | ||
| 177 | + | ||
| 178 | + //待发调试(是否自动调整) | ||
| 179 | + private boolean dfAuto; | ||
| 180 | + //是否有GPS信号 | ||
| 181 | + private boolean online; | ||
| 182 | + | ||
| 183 | + public boolean isDfAuto() { | ||
| 184 | + return dfAuto; | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + public void setDfAuto(boolean dfAuto) { | ||
| 188 | + this.dfAuto = dfAuto; | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + public boolean isOnline() { | ||
| 192 | + return online; | ||
| 193 | + } | ||
| 194 | + | ||
| 195 | + public void setOnline(boolean online) { | ||
| 196 | + this.online = online; | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + public String getQdzArrDatejh() { | ||
| 200 | + return qdzArrDatejh; | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + public void setQdzArrDatejh(String qdzArrDatejh) { | ||
| 204 | + this.qdzArrDatejh = qdzArrDatejh; | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + public String getQdzArrDatesj() { | ||
| 208 | + return qdzArrDatesj; | ||
| 209 | + } | ||
| 210 | + | ||
| 211 | + public void setQdzArrDatesj(String qdzArrDatesj) { | ||
| 212 | + this.qdzArrDatesj = qdzArrDatesj; | ||
| 213 | + } | ||
| 214 | + | ||
| 215 | + public void setcTasks(Set<ChildTaskPlan> cTasks) { | ||
| 216 | + this.cTasks = cTasks; | ||
| 217 | + } | ||
| 218 | + | ||
| 219 | + public String getGsName() { | ||
| 220 | + return gsName; | ||
| 221 | + } | ||
| 222 | + | ||
| 223 | + public void setGsName(String gsName) { | ||
| 224 | + this.gsName = gsName; | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + public String getGsBm() { | ||
| 228 | + return gsBm; | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + public void setGsBm(String gsBm) { | ||
| 232 | + this.gsBm = gsBm; | ||
| 233 | + } | ||
| 234 | + | ||
| 235 | + public String getFgsName() { | ||
| 236 | + return fgsName; | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + public void setFgsName(String fgsName) { | ||
| 240 | + this.fgsName = fgsName; | ||
| 241 | + } | ||
| 242 | + | ||
| 243 | + public String getFgsBm() { | ||
| 244 | + return fgsBm; | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | + public void setFgsBm(String fgsBm) { | ||
| 248 | + this.fgsBm = fgsBm; | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + public Integer getCcno() { | ||
| 252 | + return ccno; | ||
| 253 | + } | ||
| 254 | + | ||
| 255 | + public void setCcno(Integer ccno) { | ||
| 256 | + this.ccno = ccno; | ||
| 257 | + } | ||
| 258 | + | ||
| 259 | + public static DateTimeFormatter getFmtHHmm() { | ||
| 260 | + return fmtHHmm; | ||
| 261 | + } | ||
| 262 | + | ||
| 263 | + public static void setFmtHHmm(DateTimeFormatter fmtHHmm) { | ||
| 264 | + ScheduleRealInfo.fmtHHmm = fmtHHmm; | ||
| 265 | + } | ||
| 266 | + | ||
| 267 | + public static DateTimeFormatter getFmtyyyyMMddHHmm() { | ||
| 268 | + return fmtyyyyMMddHHmm; | ||
| 269 | + } | ||
| 270 | + | ||
| 271 | + public static void setFmtyyyyMMddHHmm(DateTimeFormatter fmtyyyyMMddHHmm) { | ||
| 272 | + ScheduleRealInfo.fmtyyyyMMddHHmm = fmtyyyyMMddHHmm; | ||
| 273 | + } | ||
| 274 | + | ||
| 275 | + /** ---------------- | ||
| 182 | @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) | 276 | @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) |
| 183 | private RealTimeModel sjfcModel; | 277 | private RealTimeModel sjfcModel; |
| 184 | @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) | 278 | @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) |
| @@ -460,30 +554,6 @@ public class ScheduleRealInfo { | @@ -460,30 +554,6 @@ public class ScheduleRealInfo { | ||
| 460 | this.status = status; | 554 | this.status = status; |
| 461 | } | 555 | } |
| 462 | 556 | ||
| 463 | - public Float getRealMileage() { | ||
| 464 | - return realMileage; | ||
| 465 | - } | ||
| 466 | - | ||
| 467 | - public void setRealMileage(Float realMileage) { | ||
| 468 | - this.realMileage = realMileage; | ||
| 469 | - } | ||
| 470 | - | ||
| 471 | - public Float getAddMileage() { | ||
| 472 | - return addMileage; | ||
| 473 | - } | ||
| 474 | - | ||
| 475 | - public void setAddMileage(Float addMileage) { | ||
| 476 | - this.addMileage = addMileage; | ||
| 477 | - } | ||
| 478 | - | ||
| 479 | - public Float getRemMileage() { | ||
| 480 | - return remMileage; | ||
| 481 | - } | ||
| 482 | - | ||
| 483 | - public void setRemMileage(Float remMileage) { | ||
| 484 | - this.remMileage = remMileage; | ||
| 485 | - } | ||
| 486 | - | ||
| 487 | public String getRemarks() { | 557 | public String getRemarks() { |
| 488 | return remarks; | 558 | return remarks; |
| 489 | } | 559 | } |
src/main/java/com/bsth/entity/sys/CompanyAuthority.java
0 → 100644
| 1 | +package com.bsth.entity.sys; | ||
| 2 | + | ||
| 3 | +import javax.persistence.*; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * Created by panzhao on 2016/11/22. | ||
| 7 | + */ | ||
| 8 | +@Entity | ||
| 9 | +@Table(name = "bsth_c_sys_company_auth") | ||
| 10 | +public class CompanyAuthority { | ||
| 11 | + | ||
| 12 | + @Id | ||
| 13 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 14 | + private Integer id; | ||
| 15 | + | ||
| 16 | + /** 公司代码 */ | ||
| 17 | + private String companyCode; | ||
| 18 | + | ||
| 19 | + /** 公司名称 */ | ||
| 20 | + private String companyName; | ||
| 21 | + | ||
| 22 | + /** 分公司代码 */ | ||
| 23 | + private String subCompanyCode; | ||
| 24 | + | ||
| 25 | + /** 分公司代码 */ | ||
| 26 | + private String subCompanyName; | ||
| 27 | + | ||
| 28 | + private Integer roleId; | ||
| 29 | + | ||
| 30 | + public String getSubCompanyName() { | ||
| 31 | + return subCompanyName; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setSubCompanyName(String subCompanyName) { | ||
| 35 | + this.subCompanyName = subCompanyName; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public String getSubCompanyCode() { | ||
| 39 | + return subCompanyCode; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public void setSubCompanyCode(String subCompanyCode) { | ||
| 43 | + this.subCompanyCode = subCompanyCode; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public String getCompanyName() { | ||
| 47 | + return companyName; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setCompanyName(String companyName) { | ||
| 51 | + this.companyName = companyName; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public String getCompanyCode() { | ||
| 55 | + return companyCode; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public void setCompanyCode(String companyCode) { | ||
| 59 | + this.companyCode = companyCode; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public Integer getId() { | ||
| 63 | + return id; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public void setId(Integer id) { | ||
| 67 | + this.id = id; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public Integer getRoleId() { | ||
| 71 | + return roleId; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public void setRoleId(Integer roleId) { | ||
| 75 | + this.roleId = roleId; | ||
| 76 | + } | ||
| 77 | +} |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -29,22 +29,23 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -29,22 +29,23 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 29 | @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 order by bcs") | 29 | @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 order by bcs") |
| 30 | List<ScheduleRealInfo> exportWaybill(String jName,String clZbh,String lpName); | 30 | List<ScheduleRealInfo> exportWaybill(String jName,String clZbh,String lpName); |
| 31 | 31 | ||
| 32 | + //把sum(addMileage) 替换为0 数据表去掉了 add_mileage 字段 | ||
| 32 | @Query(value="select new map(clZbh as clZbh,jGh as jGh,jName as jName,sum(jhlc) as zgl," | 33 | @Query(value="select new map(clZbh as clZbh,jGh as jGh,jName as jName,sum(jhlc) as zgl," |
| 33 | - + "sum(addMileage) as ksgl,count(jName) as bcs) from ScheduleRealInfo s where" | 34 | + + " 0 as ksgl,count(jName) as bcs) from ScheduleRealInfo s where" |
| 34 | + " s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh,jName") | 35 | + " s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh,jName") |
| 35 | List<Map<String, Object>> dailyInfo(String line,String date); | 36 | List<Map<String, Object>> dailyInfo(String line,String date); |
| 36 | 37 | ||
| 37 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,d.sender,d.timestamp," | 38 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,d.sender,d.timestamp," |
| 38 | + " d.txt_content FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 " | 39 | + " d.txt_content FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 " |
| 39 | + "d ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " | 40 | + "d ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " |
| 40 | - + "r.schedule_date like %?2% and r.cl_zbh like %?3% order by d.timestamp",nativeQuery=true) | 41 | + + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% order by d.timestamp",nativeQuery=true) |
| 41 | List<Object[]> historyMessage(String line,String date,String code); | 42 | List<Object[]> historyMessage(String line,String date,String code); |
| 42 | 43 | ||
| 43 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " | 44 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " |
| 44 | + " FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 d " | 45 | + " FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 d " |
| 45 | + " ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " | 46 | + " ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " |
| 46 | - + " r.schedule_date like %?2% and r.cl_zbh like %?3% group by " | ||
| 47 | - + " lp_name,xl_name,cl_zbh order by d.timestamp",nativeQuery=true) | 47 | + + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% group by " |
| 48 | + + " lp_name,xl_name,cl_zbh",nativeQuery=true) | ||
| 48 | List<Object[]> historyMessageCount(String line,String date,String code); | 49 | List<Object[]> historyMessageCount(String line,String date,String code); |
| 49 | 50 | ||
| 50 | @Query(value = "select max(id) from ScheduleRealInfo") | 51 | @Query(value = "select max(id) from ScheduleRealInfo") |
| @@ -100,10 +101,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -100,10 +101,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 100 | void deleteByLineCodeAndDate(String xlBm, String schDate); | 101 | void deleteByLineCodeAndDate(String xlBm, String schDate); |
| 101 | 102 | ||
| 102 | //去掉了 xlBm is not null | 103 | //去掉了 xlBm is not null |
| 103 | - @Query(value="select s from ScheduleRealInfo s where (s.xlBm = ?1 or s.xlBm is not null) and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") | 104 | + @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") |
| 104 | List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date); | 105 | List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date); |
| 105 | 106 | ||
| 106 | - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where (s.xlBm = ?1 or s.xlBm is not null) and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY xlBm,clZbh") | 107 | + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY xlBm,clZbh") |
| 107 | List<Map<String,Object>> yesterdayDataList(String line,String date); | 108 | List<Map<String,Object>> yesterdayDataList(String line,String date); |
| 108 | 109 | ||
| 109 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") | 110 | @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") |
src/main/java/com/bsth/repository/sys/CompanyAuthorityRepository.java
0 → 100644
| 1 | +package com.bsth.repository.sys; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.sys.CompanyAuthority; | ||
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | +import org.springframework.data.jpa.repository.Modifying; | ||
| 6 | +import org.springframework.data.jpa.repository.Query; | ||
| 7 | +import org.springframework.stereotype.Repository; | ||
| 8 | + | ||
| 9 | +import java.util.List; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * Created by panzhao on 2016/11/22. | ||
| 13 | + */ | ||
| 14 | +@Repository | ||
| 15 | +public interface CompanyAuthorityRepository extends BaseRepository<CompanyAuthority, Integer>{ | ||
| 16 | + | ||
| 17 | + @Modifying | ||
| 18 | + @Query(value="DELETE FROM CompanyAuthority WHERE roleId = ?1") | ||
| 19 | + void deleteByRoleId(Integer roleId); | ||
| 20 | + | ||
| 21 | + @Query(value = "select ca from CompanyAuthority ca where ca.roleId in ?1") | ||
| 22 | + List<CompanyAuthority> findByRoles(List<Integer> idx); | ||
| 23 | +} |
src/main/java/com/bsth/repository/sys/ModuleRepository.java
| 1 | package com.bsth.repository.sys; | 1 | package com.bsth.repository.sys; |
| 2 | 2 | ||
| 3 | -import java.util.List; | ||
| 4 | -import java.util.Set; | ||
| 5 | - | 3 | +import com.bsth.entity.sys.Module; |
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 6 | import org.springframework.data.jpa.domain.Specification; | 5 | import org.springframework.data.jpa.domain.Specification; |
| 7 | -import org.springframework.data.jpa.repository.EntityGraph; | ||
| 8 | import org.springframework.data.jpa.repository.Query; | 6 | import org.springframework.data.jpa.repository.Query; |
| 9 | import org.springframework.stereotype.Repository; | 7 | import org.springframework.stereotype.Repository; |
| 10 | 8 | ||
| 11 | -import com.bsth.entity.sys.Module; | ||
| 12 | -import com.bsth.repository.BaseRepository; | 9 | +import java.util.List; |
| 10 | +import java.util.Set; | ||
| 13 | 11 | ||
| 14 | @Repository | 12 | @Repository |
| 15 | -public interface ModuleRepository extends BaseRepository<Module, Integer>{ | ||
| 16 | - | ||
| 17 | - @Query("select m from Module m where m.groupType in ?1") | ||
| 18 | - List<Module> findByGroupType(String[] groupType); | ||
| 19 | - | ||
| 20 | - List<Module> findByPId(Integer pId); | ||
| 21 | - | ||
| 22 | - @Query("select m from Module m where m.id in ?1") | ||
| 23 | - Set<Module> findByIds(List<Integer> ids); | ||
| 24 | - | ||
| 25 | - @Override | ||
| 26 | - List<Module> findAll(Specification<Module> spec); | 13 | +public interface ModuleRepository extends BaseRepository<Module, Integer> { |
| 14 | + | ||
| 15 | + @Query("select m from Module m where m.groupType in ?1") | ||
| 16 | + List<Module> findByGroupType(String[] groupType); | ||
| 17 | + | ||
| 18 | + List<Module> findByPId(Integer pId); | ||
| 19 | + | ||
| 20 | + @Query("select m from Module m where m.id in ?1") | ||
| 21 | + Set<Module> findByIds(List<Integer> ids); | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + List<Module> findAll(Specification<Module> spec); | ||
| 25 | + | ||
| 27 | } | 26 | } |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -3,8 +3,10 @@ package com.bsth.service.forms.impl; | @@ -3,8 +3,10 @@ package com.bsth.service.forms.impl; | ||
| 3 | import java.sql.ResultSet; | 3 | import java.sql.ResultSet; |
| 4 | import java.sql.SQLException; | 4 | import java.sql.SQLException; |
| 5 | import java.text.DecimalFormat; | 5 | import java.text.DecimalFormat; |
| 6 | +import java.text.ParseException; | ||
| 6 | import java.text.SimpleDateFormat; | 7 | import java.text.SimpleDateFormat; |
| 7 | import java.util.ArrayList; | 8 | import java.util.ArrayList; |
| 9 | +import java.util.Date; | ||
| 8 | import java.util.HashMap; | 10 | import java.util.HashMap; |
| 9 | import java.util.Iterator; | 11 | import java.util.Iterator; |
| 10 | import java.util.List; | 12 | import java.util.List; |
| @@ -226,11 +228,66 @@ public class FormsServiceImpl implements FormsService{ | @@ -226,11 +228,66 @@ public class FormsServiceImpl implements FormsService{ | ||
| 226 | } | 228 | } |
| 227 | 229 | ||
| 228 | //换人换车情况日统计 | 230 | //换人换车情况日统计 |
| 229 | - @Override | ||
| 230 | - public List<Changetochange> changetochange(Map<String, Object> map) { | ||
| 231 | - | ||
| 232 | - return null; | ||
| 233 | - } | 231 | + String rq; |
| 232 | + @Override | ||
| 233 | + public List<Changetochange> changetochange(Map<String, Object> map) { | ||
| 234 | + | ||
| 235 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd") ; | ||
| 236 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日") ; | ||
| 237 | + Date d = null ; | ||
| 238 | + Date d1 = null ; | ||
| 239 | + try { | ||
| 240 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 241 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 242 | + } catch (ParseException e) { | ||
| 243 | + | ||
| 244 | + e.printStackTrace(); | ||
| 245 | + } | ||
| 246 | + String rq2=sdf1.format(d); | ||
| 247 | + String rq3=sdf1.format(d1); | ||
| 248 | + | ||
| 249 | + rq=rq2+"-"+ rq3; | ||
| 250 | + | ||
| 251 | + String sql=" select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | ||
| 252 | + if(!map.get("startDate").toString().equals(" ")&&!map.get("endDate").toString().equals(" ")){ | ||
| 253 | + sql+= "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '"+map.get("startDate").toString()+"' and '"+map.get("endDate").toString()+"'"; | ||
| 254 | + } | ||
| 255 | + if(!map.get("line").equals("")){ | ||
| 256 | + sql+="and line_code='"+map.get("line")+"'"; | ||
| 257 | + } | ||
| 258 | + if(map.get("sel").equals("2")){ | ||
| 259 | + sql+=" and c.pcch!=c.pcry"; | ||
| 260 | + }else if(map.get("sel").equals("1")){ | ||
| 261 | + sql+=" and c.jhgh!=c.sjgh"; | ||
| 262 | + } | ||
| 263 | + | ||
| 264 | + | ||
| 265 | + List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | ||
| 266 | + | ||
| 267 | + @Override | ||
| 268 | + public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 269 | + Changetochange chan= new Changetochange(); | ||
| 270 | + | ||
| 271 | + chan.setRq(rq); | ||
| 272 | + chan.setGs(arg0.getString("gs").toString()); | ||
| 273 | + chan.setFgs(arg0.getString("fgs").toString()); | ||
| 274 | + chan.setXl(arg0.getString("xl").toString()); | ||
| 275 | + chan.setLp(arg0.getString("lp").toString()); | ||
| 276 | + chan.setFssj(arg0.getString("fssj").toString()); | ||
| 277 | + chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 278 | + chan.setPcch(arg0.getString("pcch").toString()); | ||
| 279 | + chan.setPcry(arg0.getString("pcry").toString()); | ||
| 280 | + chan.setJhch(arg0.getString("jhch").toString()); | ||
| 281 | + chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 282 | + chan.setSjch(arg0.getString("sjch").toString()); | ||
| 283 | + chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 284 | + chan.setYy(arg0.getString("yy").toString()); | ||
| 285 | + chan.setXgr(arg0.getString("xgr").toString()); | ||
| 286 | + return chan; | ||
| 287 | + } | ||
| 288 | + }); | ||
| 289 | + return list; | ||
| 290 | + } | ||
| 234 | 291 | ||
| 235 | 292 | ||
| 236 | //路单数据 | 293 | //路单数据 |
src/main/java/com/bsth/service/oil/YlbService.java
| @@ -7,7 +7,7 @@ import com.bsth.entity.oil.Ylb; | @@ -7,7 +7,7 @@ import com.bsth.entity.oil.Ylb; | ||
| 7 | import com.bsth.service.BaseService; | 7 | import com.bsth.service.BaseService; |
| 8 | 8 | ||
| 9 | public interface YlbService extends BaseService<Ylb, Integer>{ | 9 | public interface YlbService extends BaseService<Ylb, Integer>{ |
| 10 | - Map<String, Object> obtain(String rq); | 10 | + Map<String, Object> obtain(Map<String, Object> map); |
| 11 | String obtainDsq(); | 11 | String obtainDsq(); |
| 12 | Map<String, Object> sort(Map<String, Object> map); | 12 | Map<String, Object> sort(Map<String, Object> map); |
| 13 | 13 |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -85,7 +85,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -85,7 +85,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 85 | //前一天所有车辆最后进场班次信息 | 85 | //前一天所有车辆最后进场班次信息 |
| 86 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); | 86 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); |
| 87 | //从排班表中计算出行驶的总里程 | 87 | //从排班表中计算出行驶的总里程 |
| 88 | - List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("1024",rq); | 88 | + List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("",rq); |
| 89 | 89 | ||
| 90 | for(int x=0;x<listpb.size();x++){ | 90 | for(int x=0;x<listpb.size();x++){ |
| 91 | 91 | ||
| @@ -151,7 +151,13 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -151,7 +151,13 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 151 | */ | 151 | */ |
| 152 | @Transactional | 152 | @Transactional |
| 153 | @Override | 153 | @Override |
| 154 | - public Map<String, Object> obtain(String rq) { | 154 | + public Map<String, Object> obtain(Map<String, Object> map2) { |
| 155 | + String rq=map2.get("rq").toString(); | ||
| 156 | + String line=""; | ||
| 157 | + if(map2.get("xlbm_eq")!=null){ | ||
| 158 | + line=map2.get("xlbm_eq").toString(); | ||
| 159 | + } | ||
| 160 | + | ||
| 155 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 161 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 156 | //保留两位小数 | 162 | //保留两位小数 |
| 157 | DecimalFormat df = new DecimalFormat("#.00"); | 163 | DecimalFormat df = new DecimalFormat("#.00"); |
| @@ -164,7 +170,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -164,7 +170,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 164 | //前一天所有车辆最后进场班次信息 | 170 | //前一天所有车辆最后进场班次信息 |
| 165 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); | 171 | List<Ylb> ylListBe=repository.obtainYlbefore(rq); |
| 166 | //从排班表中计算出行驶的总里程 | 172 | //从排班表中计算出行驶的总里程 |
| 167 | - List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("1024",rq); | 173 | + List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq); |
| 168 | 174 | ||
| 169 | for(int x=0;x<listpb.size();x++){ | 175 | for(int x=0;x<listpb.size();x++){ |
| 170 | 176 |
src/main/java/com/bsth/service/realcontrol/RealMapService.java
0 → 100644
src/main/java/com/bsth/service/realcontrol/impl/RealMapServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.realcontrol.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 4 | +import com.bsth.controller.realcontrol.dto.StationSpatialData; | ||
| 5 | +import com.bsth.service.realcontrol.RealMapService; | ||
| 6 | +import com.google.common.base.Splitter; | ||
| 7 | +import org.slf4j.Logger; | ||
| 8 | +import org.slf4j.LoggerFactory; | ||
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | +import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
| 11 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 12 | +import org.springframework.stereotype.Service; | ||
| 13 | + | ||
| 14 | +import java.util.HashMap; | ||
| 15 | +import java.util.List; | ||
| 16 | +import java.util.Map; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * Created by panzhao on 2016/11/23. | ||
| 20 | + */ | ||
| 21 | +@Service | ||
| 22 | +public class RealMapServiceImpl implements RealMapService { | ||
| 23 | + | ||
| 24 | + @Autowired | ||
| 25 | + JdbcTemplate jdbcTemplate; | ||
| 26 | + | ||
| 27 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public Map<String, Object> stationSpatialData(String idx) { | ||
| 31 | + Map<String, Object> rs = new HashMap(); | ||
| 32 | + | ||
| 33 | + try { | ||
| 34 | + List<String> idArray = Splitter.on(",").splitToList(idx); | ||
| 35 | + //拼接in语句 | ||
| 36 | + String inStr = ""; | ||
| 37 | + for (String code : idArray) { | ||
| 38 | + inStr += (",'" + code+"'"); | ||
| 39 | + } | ||
| 40 | + inStr = " (" + inStr.substring(1) + ")"; | ||
| 41 | + | ||
| 42 | + String sql = "select R.LINE_CODE,R.STATION_NAME,R.STATION_CODE,R.STATION_MARK,R.DIRECTIONS,R.DISTANCES,R.TO_TIME, R.VERSIONS,S.G_LONX,S.G_LATY,S.RADIUS,S.SHAPES_TYPE,ST_AsText(S.G_POLYGON_GRID) as G_POLYGON_GRID, R.STATION_ROUTE_CODE from bsth_c_stationroute r inner join bsth_c_station s on r.station=s.id where r.line_code in "+inStr+" and r.destroy=0"; | ||
| 43 | + | ||
| 44 | + List<StationSpatialData> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(StationSpatialData.class)); | ||
| 45 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 46 | + rs.put("list", list); | ||
| 47 | + } catch (Exception e) { | ||
| 48 | + logger.error("", e); | ||
| 49 | + rs.put("status", ResponseCode.ERROR); | ||
| 50 | + rs.put("msg", "查询站点空间数据出现异常!"); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + return rs; | ||
| 54 | + } | ||
| 55 | +} |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| 1 | package com.bsth.service.realcontrol.impl; | 1 | package com.bsth.service.realcontrol.impl; |
| 2 | 2 | ||
| 3 | -import java.text.DecimalFormat; | ||
| 4 | -import java.text.ParseException; | ||
| 5 | -import java.text.SimpleDateFormat; | ||
| 6 | -import java.util.ArrayList; | ||
| 7 | -import java.util.Collection; | ||
| 8 | -import java.util.Collections; | ||
| 9 | -import java.util.Date; | ||
| 10 | -import java.util.HashMap; | ||
| 11 | -import java.util.HashSet; | ||
| 12 | -import java.util.Iterator; | ||
| 13 | -import java.util.List; | ||
| 14 | -import java.util.Map; | ||
| 15 | -import java.util.Set; | ||
| 16 | - | ||
| 17 | -import com.bsth.entity.realcontrol.LineConfig; | ||
| 18 | -import org.apache.commons.lang3.StringUtils; | ||
| 19 | -import org.joda.time.format.DateTimeFormat; | ||
| 20 | -import org.joda.time.format.DateTimeFormatter; | ||
| 21 | -import org.slf4j.Logger; | ||
| 22 | -import org.slf4j.LoggerFactory; | ||
| 23 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 24 | -import org.springframework.stereotype.Service; | ||
| 25 | - | ||
| 26 | import com.alibaba.fastjson.JSONArray; | 3 | import com.alibaba.fastjson.JSONArray; |
| 27 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
| 28 | import com.bsth.common.ResponseCode; | 5 | import com.bsth.common.ResponseCode; |
| @@ -39,6 +16,7 @@ import com.bsth.entity.Cars; | @@ -39,6 +16,7 @@ import com.bsth.entity.Cars; | ||
| 39 | import com.bsth.entity.Line; | 16 | import com.bsth.entity.Line; |
| 40 | import com.bsth.entity.Personnel; | 17 | import com.bsth.entity.Personnel; |
| 41 | import com.bsth.entity.realcontrol.ChildTaskPlan; | 18 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 19 | +import com.bsth.entity.realcontrol.LineConfig; | ||
| 42 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 20 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 43 | import com.bsth.entity.schedule.CarConfigInfo; | 21 | import com.bsth.entity.schedule.CarConfigInfo; |
| 44 | import com.bsth.entity.schedule.EmployeeConfigInfo; | 22 | import com.bsth.entity.schedule.EmployeeConfigInfo; |
| @@ -54,17 +32,25 @@ import com.bsth.security.util.SecurityUtils; | @@ -54,17 +32,25 @@ import com.bsth.security.util.SecurityUtils; | ||
| 54 | import com.bsth.service.SectionRouteService; | 32 | import com.bsth.service.SectionRouteService; |
| 55 | import com.bsth.service.impl.BaseServiceImpl; | 33 | import com.bsth.service.impl.BaseServiceImpl; |
| 56 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 34 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 57 | -import com.bsth.util.DateUtils; | ||
| 58 | -import com.bsth.util.ReportRelatedUtils; | ||
| 59 | -import com.bsth.util.ReportUtils; | ||
| 60 | -import com.bsth.util.TimeUtils; | ||
| 61 | -import com.bsth.util.TransGPS; | 35 | +import com.bsth.util.*; |
| 62 | import com.bsth.util.TransGPS.Location; | 36 | import com.bsth.util.TransGPS.Location; |
| 63 | import com.bsth.websocket.handler.SendUtils; | 37 | import com.bsth.websocket.handler.SendUtils; |
| 64 | import com.google.common.base.Splitter; | 38 | import com.google.common.base.Splitter; |
| 65 | import com.google.common.collect.ArrayListMultimap; | 39 | import com.google.common.collect.ArrayListMultimap; |
| 66 | import com.google.common.collect.Lists; | 40 | import com.google.common.collect.Lists; |
| 67 | import com.google.common.collect.Multimap; | 41 | import com.google.common.collect.Multimap; |
| 42 | +import org.apache.commons.lang3.StringUtils; | ||
| 43 | +import org.joda.time.format.DateTimeFormat; | ||
| 44 | +import org.joda.time.format.DateTimeFormatter; | ||
| 45 | +import org.slf4j.Logger; | ||
| 46 | +import org.slf4j.LoggerFactory; | ||
| 47 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 48 | +import org.springframework.stereotype.Service; | ||
| 49 | + | ||
| 50 | +import java.text.DecimalFormat; | ||
| 51 | +import java.text.ParseException; | ||
| 52 | +import java.text.SimpleDateFormat; | ||
| 53 | +import java.util.*; | ||
| 68 | 54 | ||
| 69 | @Service | 55 | @Service |
| 70 | public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInfo, Long> | 56 | public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInfo, Long> |
| @@ -289,6 +275,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -289,6 +275,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 289 | rs.put("msg", "驾驶员工号不能为空!"); | 275 | rs.put("msg", "驾驶员工号不能为空!"); |
| 290 | return rs; | 276 | return rs; |
| 291 | } | 277 | } |
| 278 | + //截取工号 | ||
| 279 | + if(t.getsGh().indexOf("-") != -1){ | ||
| 280 | + t.setsGh(t.getsGh().split("-")[1]); | ||
| 281 | + } | ||
| 292 | 282 | ||
| 293 | t.setScheduleDateStr(schDate); | 283 | t.setScheduleDateStr(schDate); |
| 294 | t.setScheduleDate(sdfyyyyMMdd.parse(schDate)); | 284 | t.setScheduleDate(sdfyyyyMMdd.parse(schDate)); |
| @@ -454,12 +444,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -454,12 +444,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 454 | 444 | ||
| 455 | @Override | 445 | @Override |
| 456 | public void adjustDriver(ScheduleRealInfo schedule, String driver, String driverName) { | 446 | public void adjustDriver(ScheduleRealInfo schedule, String driver, String driverName) { |
| 447 | + if(driver.indexOf("-") != -1) | ||
| 448 | + driver = driver.split("-")[1]; | ||
| 457 | schedule.setjGh(driver); | 449 | schedule.setjGh(driver); |
| 458 | schedule.setjName(driverName); | 450 | schedule.setjName(driverName); |
| 459 | } | 451 | } |
| 460 | 452 | ||
| 461 | @Override | 453 | @Override |
| 462 | public void adjustConductor(ScheduleRealInfo schedule, String conductor, String conductorName) { | 454 | public void adjustConductor(ScheduleRealInfo schedule, String conductor, String conductorName) { |
| 455 | + if(conductor.indexOf("-") != -1) | ||
| 456 | + conductor = conductor.split("-")[1]; | ||
| 463 | schedule.setsGh(conductor); | 457 | schedule.setsGh(conductor); |
| 464 | schedule.setsName(conductorName); | 458 | schedule.setsName(conductorName); |
| 465 | } | 459 | } |
| @@ -1135,8 +1129,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1135,8 +1129,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1135 | addMileage += tempJhlc; | 1129 | addMileage += tempJhlc; |
| 1136 | ljbc++; | 1130 | ljbc++; |
| 1137 | }else{ | 1131 | }else{ |
| 1132 | + if(scheduleRealInfo.getBcType().equals("normal")){ | ||
| 1133 | + jhbc++; | ||
| 1134 | + } | ||
| 1138 | jhlc += tempJhlc; | 1135 | jhlc += tempJhlc; |
| 1139 | - jhbc++; | ||
| 1140 | if(scheduleRealInfo.getStatus() == -1){ | 1136 | if(scheduleRealInfo.getStatus() == -1){ |
| 1141 | remMileage += tempJhlc; | 1137 | remMileage += tempJhlc; |
| 1142 | cjbc++; | 1138 | cjbc++; |
| @@ -1285,6 +1281,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1285,6 +1281,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1285 | if(scheduleRealInfo.isSflj()){ | 1281 | if(scheduleRealInfo.isSflj()){ |
| 1286 | ljgl += tempJhlc; | 1282 | ljgl += tempJhlc; |
| 1287 | } | 1283 | } |
| 1284 | + }else{ | ||
| 1285 | + ssgl += tempJhlc; | ||
| 1286 | + ssgl_other += tempJhlc; | ||
| 1288 | } | 1287 | } |
| 1289 | }else{ | 1288 | }else{ |
| 1290 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | 1289 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| @@ -1522,7 +1521,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1522,7 +1521,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1522 | if(scheduleRealInfo.getXlBm().equals(yesterdayDataList.get(i).get("xlBm")) && scheduleRealInfo.getClZbh().equals(yesterdayDataList.get(i).get("clZbh")) | 1521 | if(scheduleRealInfo.getXlBm().equals(yesterdayDataList.get(i).get("xlBm")) && scheduleRealInfo.getClZbh().equals(yesterdayDataList.get(i).get("clZbh")) |
| 1523 | && scheduleRealInfo.getjGh().equals(yesterdayDataList.get(i).get("jGh"))){ | 1522 | && scheduleRealInfo.getjGh().equals(yesterdayDataList.get(i).get("jGh"))){ |
| 1524 | //根据线路代码获取公司 | 1523 | //根据线路代码获取公司 |
| 1525 | - Line li = lineRepository.findByLineCode(line); | 1524 | + Line li = lineRepository.findByLineCode(scheduleRealInfo.getXlBm()); |
| 1526 | yesterdayDataList.get(i).put("company", li.getCompany()); | 1525 | yesterdayDataList.get(i).put("company", li.getCompany()); |
| 1527 | //计算总公里 | 1526 | //计算总公里 |
| 1528 | Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | 1527 | Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); |
src/main/java/com/bsth/service/schedule/utils/DataImportExportService.java
| @@ -24,6 +24,7 @@ public interface DataImportExportService { | @@ -24,6 +24,7 @@ public interface DataImportExportService { | ||
| 24 | * @throws Exception | 24 | * @throws Exception |
| 25 | */ | 25 | */ |
| 26 | void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception; | 26 | void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception; |
| 27 | + void fileDataImport(File datafile, File ktrFile) throws Exception; | ||
| 27 | 28 | ||
| 28 | /** | 29 | /** |
| 29 | * 数据导出。 | 30 | * 数据导出。 |
src/main/java/com/bsth/service/schedule/utils/DataImportExportServiceImpl.java
| @@ -111,6 +111,31 @@ public class DataImportExportServiceImpl implements DataImportExportService, Ini | @@ -111,6 +111,31 @@ public class DataImportExportServiceImpl implements DataImportExportService, Ini | ||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | @Override | 113 | @Override |
| 114 | + public void fileDataImport(File datafile, File ktrFile) throws Exception { | ||
| 115 | +// // 1、上传数据文件 | ||
| 116 | +// File uploadFile = datafile; | ||
| 117 | + | ||
| 118 | + // 2、使用kettle运行封装数据导入逻辑的ktr转换文件 | ||
| 119 | + // 2.1、初始化kettle(组件初始化已经做了) | ||
| 120 | + // 2.2、创建转换元数据,转换 | ||
| 121 | + TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | ||
| 122 | + Trans trans = new Trans(transMeta); | ||
| 123 | + // 2.3、设定命名参数,用于指定数据文件,注意每个ktr必须都有以下指定的命名参数 | ||
| 124 | + trans.setParameterValue("filepath", datafile.getAbsolutePath()); // 指定导入数据文件的位置 | ||
| 125 | + trans.setParameterValue("erroroutputdir", dataToolsProperties.getTransErrordir()); // ktr转换错误输出目录 | ||
| 126 | + // TODO:可以考虑设定日志输出 | ||
| 127 | + // 2.4、执行转换 | ||
| 128 | + trans.execute(null); | ||
| 129 | + // 2.5、等待转换结束 | ||
| 130 | + trans.waitUntilFinished(); | ||
| 131 | + | ||
| 132 | + // 3、判定ktr错误数,注意这种错误代表部分数据错误,不会终止转换执行,一般设计ktr的时候,会有错误输出文件,TODO:以后考虑使用日志实时输出 | ||
| 133 | + if (trans.getErrors() > 0) { | ||
| 134 | + throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | ||
| 135 | + } | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + @Override | ||
| 114 | public File fileDataOutput(String fileName, File ktrFile) throws Exception { | 139 | public File fileDataOutput(String fileName, File ktrFile) throws Exception { |
| 115 | return fileDataOutput(fileName, ktrFile, null); | 140 | return fileDataOutput(fileName, ktrFile, null); |
| 116 | } | 141 | } |
src/main/java/com/bsth/service/sys/CompanyAuthorityService.java
0 → 100644
| 1 | +package com.bsth.service.sys; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.sys.CompanyAuthority; | ||
| 4 | +import com.bsth.entity.sys.SysUser; | ||
| 5 | +import com.bsth.service.BaseService; | ||
| 6 | + | ||
| 7 | +import java.util.List; | ||
| 8 | +import java.util.Map; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * Created by panzhao on 2016/11/22. | ||
| 12 | + */ | ||
| 13 | +public interface CompanyAuthorityService extends BaseService<CompanyAuthority, Integer> { | ||
| 14 | + Map<String,Object> save(Integer roleId, List<CompanyAuthority> list); | ||
| 15 | + | ||
| 16 | + List<CompanyAuthority> findByUser(SysUser user); | ||
| 17 | +} |
src/main/java/com/bsth/service/sys/impl/CompanyAuthorityServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.sys.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 4 | +import com.bsth.entity.sys.CompanyAuthority; | ||
| 5 | +import com.bsth.entity.sys.Role; | ||
| 6 | +import com.bsth.entity.sys.SysUser; | ||
| 7 | +import com.bsth.repository.sys.CompanyAuthorityRepository; | ||
| 8 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 9 | +import com.bsth.service.sys.CompanyAuthorityService; | ||
| 10 | +import org.slf4j.Logger; | ||
| 11 | +import org.slf4j.LoggerFactory; | ||
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 13 | +import org.springframework.stereotype.Service; | ||
| 14 | +import org.springframework.transaction.annotation.Transactional; | ||
| 15 | + | ||
| 16 | +import java.util.*; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * Created by panzhao on 2016/11/22. | ||
| 20 | + */ | ||
| 21 | +@Service | ||
| 22 | +public class CompanyAuthorityServiceImpl extends BaseServiceImpl<CompanyAuthority, Integer> implements CompanyAuthorityService { | ||
| 23 | + | ||
| 24 | + @Autowired | ||
| 25 | + CompanyAuthorityRepository companyAuthorityRepository; | ||
| 26 | + | ||
| 27 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 28 | + | ||
| 29 | + @Transactional | ||
| 30 | + @Override | ||
| 31 | + public Map<String, Object> save(Integer roleId, List<CompanyAuthority> list) { | ||
| 32 | + Map<String, Object> rs = new HashMap(); | ||
| 33 | + | ||
| 34 | + try { | ||
| 35 | + for(CompanyAuthority cauth : list){ | ||
| 36 | + cauth.setRoleId(roleId); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + //删除原数据 | ||
| 40 | + companyAuthorityRepository.deleteByRoleId(roleId); | ||
| 41 | + | ||
| 42 | + //重新写入数据 | ||
| 43 | + companyAuthorityRepository.save(list); | ||
| 44 | + | ||
| 45 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 46 | + } catch (Exception e) { | ||
| 47 | + logger.error("", e); | ||
| 48 | + rs.put("status", ResponseCode.ERROR); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + return rs; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + public List<CompanyAuthority> findByUser(SysUser user) { | ||
| 56 | + Set<Role> roles = user.getRoles(); | ||
| 57 | + if(roles == null || roles.size() == 0) | ||
| 58 | + return null; | ||
| 59 | + | ||
| 60 | + List<Integer> idx = new ArrayList<>(); | ||
| 61 | + for(Role r : roles) | ||
| 62 | + idx.add(r.getId()); | ||
| 63 | + | ||
| 64 | + List<CompanyAuthority> cAuths = companyAuthorityRepository.findByRoles(idx); | ||
| 65 | + return cAuths; | ||
| 66 | + } | ||
| 67 | +} |
src/main/java/com/bsth/service/sys/impl/ModuleServiceImpl.java
| 1 | package com.bsth.service.sys.impl; | 1 | package com.bsth.service.sys.impl; |
| 2 | 2 | ||
| 3 | -import java.util.ArrayList; | ||
| 4 | -import java.util.HashMap; | ||
| 5 | -import java.util.HashSet; | ||
| 6 | -import java.util.List; | ||
| 7 | -import java.util.Map; | ||
| 8 | -import java.util.Set; | ||
| 9 | - | ||
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | -import org.springframework.data.domain.Sort; | ||
| 12 | -import org.springframework.data.domain.Sort.Direction; | ||
| 13 | -import org.springframework.stereotype.Service; | ||
| 14 | - | ||
| 15 | import com.bsth.common.ResponseCode; | 3 | import com.bsth.common.ResponseCode; |
| 16 | import com.bsth.entity.sys.Module; | 4 | import com.bsth.entity.sys.Module; |
| 17 | import com.bsth.entity.sys.Role; | 5 | import com.bsth.entity.sys.Role; |
| @@ -20,12 +8,23 @@ import com.bsth.repository.sys.ModuleRepository; | @@ -20,12 +8,23 @@ import com.bsth.repository.sys.ModuleRepository; | ||
| 20 | import com.bsth.security.util.SecurityUtils; | 8 | import com.bsth.security.util.SecurityUtils; |
| 21 | import com.bsth.service.impl.BaseServiceImpl; | 9 | import com.bsth.service.impl.BaseServiceImpl; |
| 22 | import com.bsth.service.sys.ModuleService; | 10 | import com.bsth.service.sys.ModuleService; |
| 11 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 12 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 13 | +import org.springframework.jdbc.core.RowMapper; | ||
| 14 | +import org.springframework.stereotype.Service; | ||
| 15 | + | ||
| 16 | +import java.sql.ResultSet; | ||
| 17 | +import java.sql.SQLException; | ||
| 18 | +import java.util.*; | ||
| 23 | 19 | ||
| 24 | @Service | 20 | @Service |
| 25 | public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implements ModuleService{ | 21 | public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implements ModuleService{ |
| 26 | 22 | ||
| 27 | @Autowired | 23 | @Autowired |
| 28 | ModuleRepository moduleRepository; | 24 | ModuleRepository moduleRepository; |
| 25 | + | ||
| 26 | + @Autowired | ||
| 27 | + JdbcTemplate jdbcTemplate; | ||
| 29 | 28 | ||
| 30 | @Override | 29 | @Override |
| 31 | public List<Module> findByGroupType(String group) { | 30 | public List<Module> findByGroupType(String group) { |
| @@ -62,26 +61,38 @@ public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implemen | @@ -62,26 +61,38 @@ public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implemen | ||
| 62 | SysUser user = SecurityUtils.getCurrentUser(); | 61 | SysUser user = SecurityUtils.getCurrentUser(); |
| 63 | Set<Role> roles = user.getRoles(); | 62 | Set<Role> roles = user.getRoles(); |
| 64 | 63 | ||
| 65 | - List<Module> all = (List<Module>) moduleRepository.findAll(new Sort(Direction.ASC, "id")) | ||
| 66 | - ,results = new ArrayList<>(); | ||
| 67 | - | 64 | + String inCond = ""; |
| 65 | + for(Role r : roles) | ||
| 66 | + inCond += ("," + r.getId()); | ||
| 67 | + | ||
| 68 | + inCond = "(" + inCond.substring(1) + ")"; | ||
| 69 | + | ||
| 70 | + String sql = "select ID,CREATE_DATE,`ENABLE`,GROUP_TYPE,ICON,MAPP_SYMBOL,NAME,P_ID,PATH,UPDATE_DATE,CONTAINER from bsth_c_sys_module m where id in (select modules from bsth_c_sys_role_modules where roles in "+inCond+") or group_type != 3"; | ||
| 71 | + List<Module> all = jdbcTemplate.query(sql, new ModuleRowMapper()) | ||
| 72 | + ,rs = new ArrayList<>(); | ||
| 73 | + | ||
| 68 | Map<Integer, Module> map = new HashMap<>(); | 74 | Map<Integer, Module> map = new HashMap<>(); |
| 69 | for(Module m : all){ | 75 | for(Module m : all){ |
| 70 | map.put(m.getId(), m); | 76 | map.put(m.getId(), m); |
| 71 | - for(Role r : roles){ | ||
| 72 | - if(m.getRoles().contains(r)) | ||
| 73 | - results.add(m); | ||
| 74 | - } | 77 | + if(m.getGroupType().equals("3")) |
| 78 | + rs.add(m); | ||
| 75 | } | 79 | } |
| 76 | 80 | ||
| 77 | //上层目录和组节点 | 81 | //上层目录和组节点 |
| 78 | Set<Module> pSet = new HashSet<>(); | 82 | Set<Module> pSet = new HashSet<>(); |
| 79 | - for(Module m : results){ | 83 | + for(Module m : rs){ |
| 80 | searchParentNode(m, map, pSet); | 84 | searchParentNode(m, map, pSet); |
| 81 | } | 85 | } |
| 82 | - results.addAll(pSet); | ||
| 83 | - | ||
| 84 | - return results; | 86 | + rs.addAll(pSet); |
| 87 | + | ||
| 88 | + //排序 | ||
| 89 | + Collections.sort(rs, new Comparator<Module>() { | ||
| 90 | + @Override | ||
| 91 | + public int compare(Module o1, Module o2) { | ||
| 92 | + return o1.getId() - o2.getId(); | ||
| 93 | + } | ||
| 94 | + }); | ||
| 95 | + return rs; | ||
| 85 | } | 96 | } |
| 86 | 97 | ||
| 87 | /** | 98 | /** |
| @@ -105,4 +116,24 @@ public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implemen | @@ -105,4 +116,24 @@ public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implemen | ||
| 105 | searchParentNode(pModule, idMap, pSet); | 116 | searchParentNode(pModule, idMap, pSet); |
| 106 | } | 117 | } |
| 107 | } | 118 | } |
| 119 | + | ||
| 120 | + public class ModuleRowMapper implements RowMapper<Module>{ | ||
| 121 | + | ||
| 122 | + @Override | ||
| 123 | + public Module mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 124 | + Module module = new Module(); | ||
| 125 | + module.setId(rs.getInt("ID")); | ||
| 126 | + module.setCreateDate(rs.getDate("CREATE_DATE")); | ||
| 127 | + module.setEnable(rs.getBoolean("ENABLE")); | ||
| 128 | + module.setGroupType(rs.getString("GROUP_TYPE")); | ||
| 129 | + module.setIcon(rs.getString("ICON")); | ||
| 130 | + module.setMappSymbol(rs.getString("MAPP_SYMBOL")); | ||
| 131 | + module.setName(rs.getString("NAME")); | ||
| 132 | + module.setpId(rs.getInt("P_ID")); | ||
| 133 | + module.setPath(rs.getString("PATH")); | ||
| 134 | + module.setUpdateDate(rs.getDate("UPDATE_DATE")); | ||
| 135 | + module.setContainer(rs.getString("CONTAINER")); | ||
| 136 | + return module; | ||
| 137 | + } | ||
| 138 | + } | ||
| 108 | } | 139 | } |
src/main/resources/application-dev.properties
| @@ -8,7 +8,7 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | @@ -8,7 +8,7 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 8 | spring.jpa.database= MYSQL | 8 | spring.jpa.database= MYSQL |
| 9 | spring.jpa.show-sql= false | 9 | spring.jpa.show-sql= false |
| 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.201/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 11 | +spring.datasource.url= jdbc:mysql://192.168.168.201/qp_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 12 | spring.datasource.username= root | 12 | spring.datasource.username= root |
| 13 | spring.datasource.password= 123456 | 13 | spring.datasource.password= 123456 |
| 14 | #DATASOURCE | 14 | #DATASOURCE |
src/main/resources/application-prod.properties
| @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 8 | spring.jpa.database= MYSQL | 8 | spring.jpa.database= MYSQL |
| 9 | spring.jpa.show-sql= false | 9 | spring.jpa.show-sql= false |
| 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.171:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 11 | +spring.datasource.url= jdbc:mysql://192.168.40.100:3306/qp_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 12 | spring.datasource.username= root | 12 | spring.datasource.username= root |
| 13 | -spring.datasource.password= root2jsp | 13 | +spring.datasource.password= root@JSP2jsp |
| 14 | #DATASOURCE | 14 | #DATASOURCE |
| 15 | spring.datasource.max-active=100 | 15 | spring.datasource.max-active=100 |
| 16 | spring.datasource.max-idle=8 | 16 | spring.datasource.max-idle=8 |
| @@ -26,6 +26,6 @@ spring.datasource.validation-query=select 1 | @@ -26,6 +26,6 @@ spring.datasource.validation-query=select 1 | ||
| 26 | ## | 26 | ## |
| 27 | #222.66.0.204:5555 | 27 | #222.66.0.204:5555 |
| 28 | ##\u5B9E\u65F6gps | 28 | ##\u5B9E\u65F6gps |
| 29 | -http.gps.real.url= http://192.168.168.171:8080/transport_server/rtgps/ | 29 | +http.gps.real.url= http://192.168.40.82:8080/transport_server/rtgps/ |
| 30 | ##\u6D88\u606F\u4E0B\u53D1 | 30 | ##\u6D88\u606F\u4E0B\u53D1 |
| 31 | -http.send.directive = http://192.168.168.171:8080/transport_server/message/ | ||
| 32 | \ No newline at end of file | 31 | \ No newline at end of file |
| 32 | +http.send.directive = http://192.168.40.82:8080/transport_server/message/ | ||
| 33 | \ No newline at end of file | 33 | \ No newline at end of file |
src/main/resources/datatools/config-prod.properties
| @@ -5,13 +5,13 @@ datatools.kettle_properties=/datatools/kettle.properties | @@ -5,13 +5,13 @@ datatools.kettle_properties=/datatools/kettle.properties | ||
| 5 | # 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正) | 5 | # 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正) |
| 6 | 6 | ||
| 7 | #数据库ip地址 | 7 | #数据库ip地址 |
| 8 | -datatools.kvars_dbip=192.168.168.171 | 8 | +datatools.kvars_dbip=192.168.40.100 |
| 9 | #数据库用户名 | 9 | #数据库用户名 |
| 10 | datatools.kvars_dbuname=root | 10 | datatools.kvars_dbuname=root |
| 11 | #数据库密码 | 11 | #数据库密码 |
| 12 | -datatools.kvars_dbpwd=root2jsp | 12 | +datatools.kvars_dbpwd=root@JSP2jsp |
| 13 | #数据库库名 | 13 | #数据库库名 |
| 14 | -datatools.kvars_dbdname=control | 14 | +datatools.kvars_dbdname=qp_control |
| 15 | 15 | ||
| 16 | # 3、上传数据配置信息 | 16 | # 3、上传数据配置信息 |
| 17 | # 上传文件目录配置(根据不同的环境需要修正) | 17 | # 上传文件目录配置(根据不同的环境需要修正) |
src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
| @@ -11,17 +11,17 @@ | @@ -11,17 +11,17 @@ | ||
| 11 | <parameters> | 11 | <parameters> |
| 12 | <parameter> | 12 | <parameter> |
| 13 | <name>tempfilepath</name> | 13 | <name>tempfilepath</name> |
| 14 | - <default_value/> | 14 | + <default_value>/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/temp/test</default_value> |
| 15 | <description>默认输出的文件路径名</description> | 15 | <description>默认输出的文件路径名</description> |
| 16 | </parameter> | 16 | </parameter> |
| 17 | <parameter> | 17 | <parameter> |
| 18 | <name>ttid</name> | 18 | <name>ttid</name> |
| 19 | - <default_value/> | 19 | + <default_value>63</default_value> |
| 20 | <description>时刻表id</description> | 20 | <description>时刻表id</description> |
| 21 | </parameter> | 21 | </parameter> |
| 22 | <parameter> | 22 | <parameter> |
| 23 | <name>xlid</name> | 23 | <name>xlid</name> |
| 24 | - <default_value/> | 24 | + <default_value>63017</default_value> |
| 25 | <description>线路id</description> | 25 | <description>线路id</description> |
| 26 | </parameter> | 26 | </parameter> |
| 27 | </parameters> | 27 | </parameters> |
| @@ -1212,6 +1212,156 @@ | @@ -1212,6 +1212,156 @@ | ||
| 1212 | <type>String</type> | 1212 | <type>String</type> |
| 1213 | <format/> | 1213 | <format/> |
| 1214 | </field> | 1214 | </field> |
| 1215 | + <field> | ||
| 1216 | + <name>fcno31_id</name> | ||
| 1217 | + <type>String</type> | ||
| 1218 | + <format/> | ||
| 1219 | + </field> | ||
| 1220 | + <field> | ||
| 1221 | + <name>fcno31_fcsj</name> | ||
| 1222 | + <type>String</type> | ||
| 1223 | + <format/> | ||
| 1224 | + </field> | ||
| 1225 | + <field> | ||
| 1226 | + <name>fcno31_zdname</name> | ||
| 1227 | + <type>String</type> | ||
| 1228 | + <format/> | ||
| 1229 | + </field> | ||
| 1230 | + <field> | ||
| 1231 | + <name>fcno31_bctype</name> | ||
| 1232 | + <type>String</type> | ||
| 1233 | + <format/> | ||
| 1234 | + </field> | ||
| 1235 | + <field> | ||
| 1236 | + <name>fcno31_xldir</name> | ||
| 1237 | + <type>String</type> | ||
| 1238 | + <format/> | ||
| 1239 | + </field> | ||
| 1240 | + <field> | ||
| 1241 | + <name>fcno31_isfb</name> | ||
| 1242 | + <type>String</type> | ||
| 1243 | + <format/> | ||
| 1244 | + </field> | ||
| 1245 | + <field> | ||
| 1246 | + <name>fcno32_id</name> | ||
| 1247 | + <type>String</type> | ||
| 1248 | + <format/> | ||
| 1249 | + </field> | ||
| 1250 | + <field> | ||
| 1251 | + <name>fcno32_fcsj</name> | ||
| 1252 | + <type>String</type> | ||
| 1253 | + <format/> | ||
| 1254 | + </field> | ||
| 1255 | + <field> | ||
| 1256 | + <name>fcno32_zdname</name> | ||
| 1257 | + <type>String</type> | ||
| 1258 | + <format/> | ||
| 1259 | + </field> | ||
| 1260 | + <field> | ||
| 1261 | + <name>fcno32_bctype</name> | ||
| 1262 | + <type>String</type> | ||
| 1263 | + <format/> | ||
| 1264 | + </field> | ||
| 1265 | + <field> | ||
| 1266 | + <name>fcno32_xldir</name> | ||
| 1267 | + <type>String</type> | ||
| 1268 | + <format/> | ||
| 1269 | + </field> | ||
| 1270 | + <field> | ||
| 1271 | + <name>fcno32_isfb</name> | ||
| 1272 | + <type>String</type> | ||
| 1273 | + <format/> | ||
| 1274 | + </field> | ||
| 1275 | + <field> | ||
| 1276 | + <name>fcno33_id</name> | ||
| 1277 | + <type>String</type> | ||
| 1278 | + <format/> | ||
| 1279 | + </field> | ||
| 1280 | + <field> | ||
| 1281 | + <name>fcno33_fcsj</name> | ||
| 1282 | + <type>String</type> | ||
| 1283 | + <format/> | ||
| 1284 | + </field> | ||
| 1285 | + <field> | ||
| 1286 | + <name>fcno33_zdname</name> | ||
| 1287 | + <type>String</type> | ||
| 1288 | + <format/> | ||
| 1289 | + </field> | ||
| 1290 | + <field> | ||
| 1291 | + <name>fcno33_bctype</name> | ||
| 1292 | + <type>String</type> | ||
| 1293 | + <format/> | ||
| 1294 | + </field> | ||
| 1295 | + <field> | ||
| 1296 | + <name>fcno33_xldir</name> | ||
| 1297 | + <type>String</type> | ||
| 1298 | + <format/> | ||
| 1299 | + </field> | ||
| 1300 | + <field> | ||
| 1301 | + <name>fcno33_isfb</name> | ||
| 1302 | + <type>String</type> | ||
| 1303 | + <format/> | ||
| 1304 | + </field> | ||
| 1305 | + <field> | ||
| 1306 | + <name>fcno34_id</name> | ||
| 1307 | + <type>String</type> | ||
| 1308 | + <format/> | ||
| 1309 | + </field> | ||
| 1310 | + <field> | ||
| 1311 | + <name>fcno34_fcsj</name> | ||
| 1312 | + <type>String</type> | ||
| 1313 | + <format/> | ||
| 1314 | + </field> | ||
| 1315 | + <field> | ||
| 1316 | + <name>fcno34_zdname</name> | ||
| 1317 | + <type>String</type> | ||
| 1318 | + <format/> | ||
| 1319 | + </field> | ||
| 1320 | + <field> | ||
| 1321 | + <name>fcno34_bctype</name> | ||
| 1322 | + <type>String</type> | ||
| 1323 | + <format/> | ||
| 1324 | + </field> | ||
| 1325 | + <field> | ||
| 1326 | + <name>fcno34_xldir</name> | ||
| 1327 | + <type>String</type> | ||
| 1328 | + <format/> | ||
| 1329 | + </field> | ||
| 1330 | + <field> | ||
| 1331 | + <name>fcno34_isfb</name> | ||
| 1332 | + <type>String</type> | ||
| 1333 | + <format/> | ||
| 1334 | + </field> | ||
| 1335 | + <field> | ||
| 1336 | + <name>fcno35_id</name> | ||
| 1337 | + <type>String</type> | ||
| 1338 | + <format/> | ||
| 1339 | + </field> | ||
| 1340 | + <field> | ||
| 1341 | + <name>fcno35_fcsj</name> | ||
| 1342 | + <type>String</type> | ||
| 1343 | + <format/> | ||
| 1344 | + </field> | ||
| 1345 | + <field> | ||
| 1346 | + <name>fcno35_zdname</name> | ||
| 1347 | + <type>String</type> | ||
| 1348 | + <format/> | ||
| 1349 | + </field> | ||
| 1350 | + <field> | ||
| 1351 | + <name>fcno35_bctype</name> | ||
| 1352 | + <type>String</type> | ||
| 1353 | + <format/> | ||
| 1354 | + </field> | ||
| 1355 | + <field> | ||
| 1356 | + <name>fcno35_xldir</name> | ||
| 1357 | + <type>String</type> | ||
| 1358 | + <format/> | ||
| 1359 | + </field> | ||
| 1360 | + <field> | ||
| 1361 | + <name>fcno35_isfb</name> | ||
| 1362 | + <type>String</type> | ||
| 1363 | + <format/> | ||
| 1364 | + </field> | ||
| 1215 | </fields> | 1365 | </fields> |
| 1216 | <custom> | 1366 | <custom> |
| 1217 | <header_font_name>arial</header_font_name> | 1367 | <header_font_name>arial</header_font_name> |
| @@ -3776,6 +3926,426 @@ | @@ -3776,6 +3926,426 @@ | ||
| 3776 | <target_null_string/> | 3926 | <target_null_string/> |
| 3777 | <target_aggregation_type>-</target_aggregation_type> | 3927 | <target_aggregation_type>-</target_aggregation_type> |
| 3778 | </field> | 3928 | </field> |
| 3929 | + <field> | ||
| 3930 | + <field_name>id</field_name> | ||
| 3931 | + <key_value>31</key_value> | ||
| 3932 | + <target_name>fcno31_id</target_name> | ||
| 3933 | + <target_type>String</target_type> | ||
| 3934 | + <target_format/> | ||
| 3935 | + <target_length>-1</target_length> | ||
| 3936 | + <target_precision>-1</target_precision> | ||
| 3937 | + <target_decimal_symbol/> | ||
| 3938 | + <target_grouping_symbol/> | ||
| 3939 | + <target_currency_symbol/> | ||
| 3940 | + <target_null_string/> | ||
| 3941 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 3942 | + </field> | ||
| 3943 | + <field> | ||
| 3944 | + <field_name>fcsj</field_name> | ||
| 3945 | + <key_value>31</key_value> | ||
| 3946 | + <target_name>fcno31_fcsj</target_name> | ||
| 3947 | + <target_type>String</target_type> | ||
| 3948 | + <target_format/> | ||
| 3949 | + <target_length>-1</target_length> | ||
| 3950 | + <target_precision>-1</target_precision> | ||
| 3951 | + <target_decimal_symbol/> | ||
| 3952 | + <target_grouping_symbol/> | ||
| 3953 | + <target_currency_symbol/> | ||
| 3954 | + <target_null_string/> | ||
| 3955 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 3956 | + </field> | ||
| 3957 | + <field> | ||
| 3958 | + <field_name>fczdName</field_name> | ||
| 3959 | + <key_value>31</key_value> | ||
| 3960 | + <target_name>fcno31_zdname</target_name> | ||
| 3961 | + <target_type>String</target_type> | ||
| 3962 | + <target_format/> | ||
| 3963 | + <target_length>-1</target_length> | ||
| 3964 | + <target_precision>-1</target_precision> | ||
| 3965 | + <target_decimal_symbol/> | ||
| 3966 | + <target_grouping_symbol/> | ||
| 3967 | + <target_currency_symbol/> | ||
| 3968 | + <target_null_string/> | ||
| 3969 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 3970 | + </field> | ||
| 3971 | + <field> | ||
| 3972 | + <field_name>bc_type</field_name> | ||
| 3973 | + <key_value>31</key_value> | ||
| 3974 | + <target_name>fcno31_bctype</target_name> | ||
| 3975 | + <target_type>String</target_type> | ||
| 3976 | + <target_format/> | ||
| 3977 | + <target_length>-1</target_length> | ||
| 3978 | + <target_precision>-1</target_precision> | ||
| 3979 | + <target_decimal_symbol/> | ||
| 3980 | + <target_grouping_symbol/> | ||
| 3981 | + <target_currency_symbol/> | ||
| 3982 | + <target_null_string/> | ||
| 3983 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 3984 | + </field> | ||
| 3985 | + <field> | ||
| 3986 | + <field_name>xl_dir</field_name> | ||
| 3987 | + <key_value>31</key_value> | ||
| 3988 | + <target_name>fcno31_xldir</target_name> | ||
| 3989 | + <target_type>String</target_type> | ||
| 3990 | + <target_format/> | ||
| 3991 | + <target_length>-1</target_length> | ||
| 3992 | + <target_precision>-1</target_precision> | ||
| 3993 | + <target_decimal_symbol/> | ||
| 3994 | + <target_grouping_symbol/> | ||
| 3995 | + <target_currency_symbol/> | ||
| 3996 | + <target_null_string/> | ||
| 3997 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 3998 | + </field> | ||
| 3999 | + <field> | ||
| 4000 | + <field_name>isfb</field_name> | ||
| 4001 | + <key_value>31</key_value> | ||
| 4002 | + <target_name>fcno31_isfb</target_name> | ||
| 4003 | + <target_type>String</target_type> | ||
| 4004 | + <target_format/> | ||
| 4005 | + <target_length>-1</target_length> | ||
| 4006 | + <target_precision>-1</target_precision> | ||
| 4007 | + <target_decimal_symbol/> | ||
| 4008 | + <target_grouping_symbol/> | ||
| 4009 | + <target_currency_symbol/> | ||
| 4010 | + <target_null_string/> | ||
| 4011 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4012 | + </field> | ||
| 4013 | + <field> | ||
| 4014 | + <field_name>id</field_name> | ||
| 4015 | + <key_value>32</key_value> | ||
| 4016 | + <target_name>fcno32_id</target_name> | ||
| 4017 | + <target_type>String</target_type> | ||
| 4018 | + <target_format/> | ||
| 4019 | + <target_length>-1</target_length> | ||
| 4020 | + <target_precision>-1</target_precision> | ||
| 4021 | + <target_decimal_symbol/> | ||
| 4022 | + <target_grouping_symbol/> | ||
| 4023 | + <target_currency_symbol/> | ||
| 4024 | + <target_null_string/> | ||
| 4025 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4026 | + </field> | ||
| 4027 | + <field> | ||
| 4028 | + <field_name>fcsj</field_name> | ||
| 4029 | + <key_value>32</key_value> | ||
| 4030 | + <target_name>fcno32_fcsj</target_name> | ||
| 4031 | + <target_type>String</target_type> | ||
| 4032 | + <target_format/> | ||
| 4033 | + <target_length>-1</target_length> | ||
| 4034 | + <target_precision>-1</target_precision> | ||
| 4035 | + <target_decimal_symbol/> | ||
| 4036 | + <target_grouping_symbol/> | ||
| 4037 | + <target_currency_symbol/> | ||
| 4038 | + <target_null_string/> | ||
| 4039 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4040 | + </field> | ||
| 4041 | + <field> | ||
| 4042 | + <field_name>fczdName</field_name> | ||
| 4043 | + <key_value>32</key_value> | ||
| 4044 | + <target_name>fcno32_zdname</target_name> | ||
| 4045 | + <target_type>String</target_type> | ||
| 4046 | + <target_format/> | ||
| 4047 | + <target_length>-1</target_length> | ||
| 4048 | + <target_precision>-1</target_precision> | ||
| 4049 | + <target_decimal_symbol/> | ||
| 4050 | + <target_grouping_symbol/> | ||
| 4051 | + <target_currency_symbol/> | ||
| 4052 | + <target_null_string/> | ||
| 4053 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4054 | + </field> | ||
| 4055 | + <field> | ||
| 4056 | + <field_name>bc_type</field_name> | ||
| 4057 | + <key_value>32</key_value> | ||
| 4058 | + <target_name>fcno32_bctype</target_name> | ||
| 4059 | + <target_type>String</target_type> | ||
| 4060 | + <target_format/> | ||
| 4061 | + <target_length>-1</target_length> | ||
| 4062 | + <target_precision>-1</target_precision> | ||
| 4063 | + <target_decimal_symbol/> | ||
| 4064 | + <target_grouping_symbol/> | ||
| 4065 | + <target_currency_symbol/> | ||
| 4066 | + <target_null_string/> | ||
| 4067 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4068 | + </field> | ||
| 4069 | + <field> | ||
| 4070 | + <field_name>xl_dir</field_name> | ||
| 4071 | + <key_value>32</key_value> | ||
| 4072 | + <target_name>fcno32_xldir</target_name> | ||
| 4073 | + <target_type>String</target_type> | ||
| 4074 | + <target_format/> | ||
| 4075 | + <target_length>-1</target_length> | ||
| 4076 | + <target_precision>-1</target_precision> | ||
| 4077 | + <target_decimal_symbol/> | ||
| 4078 | + <target_grouping_symbol/> | ||
| 4079 | + <target_currency_symbol/> | ||
| 4080 | + <target_null_string/> | ||
| 4081 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4082 | + </field> | ||
| 4083 | + <field> | ||
| 4084 | + <field_name>isfb</field_name> | ||
| 4085 | + <key_value>32</key_value> | ||
| 4086 | + <target_name>fcno32_isfb</target_name> | ||
| 4087 | + <target_type>String</target_type> | ||
| 4088 | + <target_format/> | ||
| 4089 | + <target_length>-1</target_length> | ||
| 4090 | + <target_precision>-1</target_precision> | ||
| 4091 | + <target_decimal_symbol/> | ||
| 4092 | + <target_grouping_symbol/> | ||
| 4093 | + <target_currency_symbol/> | ||
| 4094 | + <target_null_string/> | ||
| 4095 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4096 | + </field> | ||
| 4097 | + <field> | ||
| 4098 | + <field_name>id</field_name> | ||
| 4099 | + <key_value>33</key_value> | ||
| 4100 | + <target_name>fcno33_id</target_name> | ||
| 4101 | + <target_type>String</target_type> | ||
| 4102 | + <target_format/> | ||
| 4103 | + <target_length>-1</target_length> | ||
| 4104 | + <target_precision>-1</target_precision> | ||
| 4105 | + <target_decimal_symbol/> | ||
| 4106 | + <target_grouping_symbol/> | ||
| 4107 | + <target_currency_symbol/> | ||
| 4108 | + <target_null_string/> | ||
| 4109 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4110 | + </field> | ||
| 4111 | + <field> | ||
| 4112 | + <field_name>fcsj</field_name> | ||
| 4113 | + <key_value>33</key_value> | ||
| 4114 | + <target_name>fcno33_fcsj</target_name> | ||
| 4115 | + <target_type>String</target_type> | ||
| 4116 | + <target_format/> | ||
| 4117 | + <target_length>-1</target_length> | ||
| 4118 | + <target_precision>-1</target_precision> | ||
| 4119 | + <target_decimal_symbol/> | ||
| 4120 | + <target_grouping_symbol/> | ||
| 4121 | + <target_currency_symbol/> | ||
| 4122 | + <target_null_string/> | ||
| 4123 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4124 | + </field> | ||
| 4125 | + <field> | ||
| 4126 | + <field_name>fczdName</field_name> | ||
| 4127 | + <key_value>33</key_value> | ||
| 4128 | + <target_name>fcno33_zdname</target_name> | ||
| 4129 | + <target_type>String</target_type> | ||
| 4130 | + <target_format/> | ||
| 4131 | + <target_length>-1</target_length> | ||
| 4132 | + <target_precision>-1</target_precision> | ||
| 4133 | + <target_decimal_symbol/> | ||
| 4134 | + <target_grouping_symbol/> | ||
| 4135 | + <target_currency_symbol/> | ||
| 4136 | + <target_null_string/> | ||
| 4137 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4138 | + </field> | ||
| 4139 | + <field> | ||
| 4140 | + <field_name>bc_type</field_name> | ||
| 4141 | + <key_value>33</key_value> | ||
| 4142 | + <target_name>fcno33_bctype</target_name> | ||
| 4143 | + <target_type>String</target_type> | ||
| 4144 | + <target_format/> | ||
| 4145 | + <target_length>-1</target_length> | ||
| 4146 | + <target_precision>-1</target_precision> | ||
| 4147 | + <target_decimal_symbol/> | ||
| 4148 | + <target_grouping_symbol/> | ||
| 4149 | + <target_currency_symbol/> | ||
| 4150 | + <target_null_string/> | ||
| 4151 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4152 | + </field> | ||
| 4153 | + <field> | ||
| 4154 | + <field_name>xl_dir</field_name> | ||
| 4155 | + <key_value>33</key_value> | ||
| 4156 | + <target_name>fcno33_xldir</target_name> | ||
| 4157 | + <target_type>String</target_type> | ||
| 4158 | + <target_format/> | ||
| 4159 | + <target_length>-1</target_length> | ||
| 4160 | + <target_precision>-1</target_precision> | ||
| 4161 | + <target_decimal_symbol/> | ||
| 4162 | + <target_grouping_symbol/> | ||
| 4163 | + <target_currency_symbol/> | ||
| 4164 | + <target_null_string/> | ||
| 4165 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4166 | + </field> | ||
| 4167 | + <field> | ||
| 4168 | + <field_name>isfb</field_name> | ||
| 4169 | + <key_value>33</key_value> | ||
| 4170 | + <target_name>fcno33_isfb</target_name> | ||
| 4171 | + <target_type>String</target_type> | ||
| 4172 | + <target_format/> | ||
| 4173 | + <target_length>-1</target_length> | ||
| 4174 | + <target_precision>-1</target_precision> | ||
| 4175 | + <target_decimal_symbol/> | ||
| 4176 | + <target_grouping_symbol/> | ||
| 4177 | + <target_currency_symbol/> | ||
| 4178 | + <target_null_string/> | ||
| 4179 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4180 | + </field> | ||
| 4181 | + <field> | ||
| 4182 | + <field_name>id</field_name> | ||
| 4183 | + <key_value>34</key_value> | ||
| 4184 | + <target_name>fcno34_id</target_name> | ||
| 4185 | + <target_type>String</target_type> | ||
| 4186 | + <target_format/> | ||
| 4187 | + <target_length>-1</target_length> | ||
| 4188 | + <target_precision>-1</target_precision> | ||
| 4189 | + <target_decimal_symbol/> | ||
| 4190 | + <target_grouping_symbol/> | ||
| 4191 | + <target_currency_symbol/> | ||
| 4192 | + <target_null_string/> | ||
| 4193 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4194 | + </field> | ||
| 4195 | + <field> | ||
| 4196 | + <field_name>fcsj</field_name> | ||
| 4197 | + <key_value>34</key_value> | ||
| 4198 | + <target_name>fcno34_fcsj</target_name> | ||
| 4199 | + <target_type>String</target_type> | ||
| 4200 | + <target_format/> | ||
| 4201 | + <target_length>-1</target_length> | ||
| 4202 | + <target_precision>-1</target_precision> | ||
| 4203 | + <target_decimal_symbol/> | ||
| 4204 | + <target_grouping_symbol/> | ||
| 4205 | + <target_currency_symbol/> | ||
| 4206 | + <target_null_string/> | ||
| 4207 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4208 | + </field> | ||
| 4209 | + <field> | ||
| 4210 | + <field_name>fczdName</field_name> | ||
| 4211 | + <key_value>34</key_value> | ||
| 4212 | + <target_name>fcno34_zdname</target_name> | ||
| 4213 | + <target_type>String</target_type> | ||
| 4214 | + <target_format/> | ||
| 4215 | + <target_length>-1</target_length> | ||
| 4216 | + <target_precision>-1</target_precision> | ||
| 4217 | + <target_decimal_symbol/> | ||
| 4218 | + <target_grouping_symbol/> | ||
| 4219 | + <target_currency_symbol/> | ||
| 4220 | + <target_null_string/> | ||
| 4221 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4222 | + </field> | ||
| 4223 | + <field> | ||
| 4224 | + <field_name>bc_type</field_name> | ||
| 4225 | + <key_value>34</key_value> | ||
| 4226 | + <target_name>fcno34_bctype</target_name> | ||
| 4227 | + <target_type>String</target_type> | ||
| 4228 | + <target_format/> | ||
| 4229 | + <target_length>-1</target_length> | ||
| 4230 | + <target_precision>-1</target_precision> | ||
| 4231 | + <target_decimal_symbol/> | ||
| 4232 | + <target_grouping_symbol/> | ||
| 4233 | + <target_currency_symbol/> | ||
| 4234 | + <target_null_string/> | ||
| 4235 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4236 | + </field> | ||
| 4237 | + <field> | ||
| 4238 | + <field_name>xl_dir</field_name> | ||
| 4239 | + <key_value>34</key_value> | ||
| 4240 | + <target_name>fcno34_xldir</target_name> | ||
| 4241 | + <target_type>String</target_type> | ||
| 4242 | + <target_format/> | ||
| 4243 | + <target_length>-1</target_length> | ||
| 4244 | + <target_precision>-1</target_precision> | ||
| 4245 | + <target_decimal_symbol/> | ||
| 4246 | + <target_grouping_symbol/> | ||
| 4247 | + <target_currency_symbol/> | ||
| 4248 | + <target_null_string/> | ||
| 4249 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4250 | + </field> | ||
| 4251 | + <field> | ||
| 4252 | + <field_name>isfb</field_name> | ||
| 4253 | + <key_value>34</key_value> | ||
| 4254 | + <target_name>fcno34_isfb</target_name> | ||
| 4255 | + <target_type>String</target_type> | ||
| 4256 | + <target_format/> | ||
| 4257 | + <target_length>-1</target_length> | ||
| 4258 | + <target_precision>-1</target_precision> | ||
| 4259 | + <target_decimal_symbol/> | ||
| 4260 | + <target_grouping_symbol/> | ||
| 4261 | + <target_currency_symbol/> | ||
| 4262 | + <target_null_string/> | ||
| 4263 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4264 | + </field> | ||
| 4265 | + <field> | ||
| 4266 | + <field_name>id</field_name> | ||
| 4267 | + <key_value>35</key_value> | ||
| 4268 | + <target_name>fcno35_id</target_name> | ||
| 4269 | + <target_type>String</target_type> | ||
| 4270 | + <target_format/> | ||
| 4271 | + <target_length>-1</target_length> | ||
| 4272 | + <target_precision>-1</target_precision> | ||
| 4273 | + <target_decimal_symbol/> | ||
| 4274 | + <target_grouping_symbol/> | ||
| 4275 | + <target_currency_symbol/> | ||
| 4276 | + <target_null_string/> | ||
| 4277 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4278 | + </field> | ||
| 4279 | + <field> | ||
| 4280 | + <field_name>fcsj</field_name> | ||
| 4281 | + <key_value>35</key_value> | ||
| 4282 | + <target_name>fcno35_fcsj</target_name> | ||
| 4283 | + <target_type>String</target_type> | ||
| 4284 | + <target_format/> | ||
| 4285 | + <target_length>-1</target_length> | ||
| 4286 | + <target_precision>-1</target_precision> | ||
| 4287 | + <target_decimal_symbol/> | ||
| 4288 | + <target_grouping_symbol/> | ||
| 4289 | + <target_currency_symbol/> | ||
| 4290 | + <target_null_string/> | ||
| 4291 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4292 | + </field> | ||
| 4293 | + <field> | ||
| 4294 | + <field_name>fczdName</field_name> | ||
| 4295 | + <key_value>35</key_value> | ||
| 4296 | + <target_name>fcno35_zdname</target_name> | ||
| 4297 | + <target_type>String</target_type> | ||
| 4298 | + <target_format/> | ||
| 4299 | + <target_length>-1</target_length> | ||
| 4300 | + <target_precision>-1</target_precision> | ||
| 4301 | + <target_decimal_symbol/> | ||
| 4302 | + <target_grouping_symbol/> | ||
| 4303 | + <target_currency_symbol/> | ||
| 4304 | + <target_null_string/> | ||
| 4305 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4306 | + </field> | ||
| 4307 | + <field> | ||
| 4308 | + <field_name>bc_type</field_name> | ||
| 4309 | + <key_value>35</key_value> | ||
| 4310 | + <target_name>fcno35_bctype</target_name> | ||
| 4311 | + <target_type>String</target_type> | ||
| 4312 | + <target_format/> | ||
| 4313 | + <target_length>-1</target_length> | ||
| 4314 | + <target_precision>-1</target_precision> | ||
| 4315 | + <target_decimal_symbol/> | ||
| 4316 | + <target_grouping_symbol/> | ||
| 4317 | + <target_currency_symbol/> | ||
| 4318 | + <target_null_string/> | ||
| 4319 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4320 | + </field> | ||
| 4321 | + <field> | ||
| 4322 | + <field_name>xl_dir</field_name> | ||
| 4323 | + <key_value>35</key_value> | ||
| 4324 | + <target_name>fcno35_xldir</target_name> | ||
| 4325 | + <target_type>String</target_type> | ||
| 4326 | + <target_format/> | ||
| 4327 | + <target_length>-1</target_length> | ||
| 4328 | + <target_precision>-1</target_precision> | ||
| 4329 | + <target_decimal_symbol/> | ||
| 4330 | + <target_grouping_symbol/> | ||
| 4331 | + <target_currency_symbol/> | ||
| 4332 | + <target_null_string/> | ||
| 4333 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4334 | + </field> | ||
| 4335 | + <field> | ||
| 4336 | + <field_name>isfb</field_name> | ||
| 4337 | + <key_value>35</key_value> | ||
| 4338 | + <target_name>fcno35_isfb</target_name> | ||
| 4339 | + <target_type>String</target_type> | ||
| 4340 | + <target_format/> | ||
| 4341 | + <target_length>-1</target_length> | ||
| 4342 | + <target_precision>-1</target_precision> | ||
| 4343 | + <target_decimal_symbol/> | ||
| 4344 | + <target_grouping_symbol/> | ||
| 4345 | + <target_currency_symbol/> | ||
| 4346 | + <target_null_string/> | ||
| 4347 | + <target_aggregation_type>-</target_aggregation_type> | ||
| 4348 | + </field> | ||
| 3779 | </fields> | 4349 | </fields> |
| 3780 | <cluster_schema/> | 4350 | <cluster_schema/> |
| 3781 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 4351 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
src/main/resources/ms-jdbc.properties
| 1 | +#ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 2 | +#ms.mysql.url= jdbc:mysql://192.168.40.82:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 3 | +#ms.mysql.username= root | ||
| 4 | +#ms.mysql.password= 123456 | ||
| 5 | + | ||
| 1 | ms.mysql.driver= com.mysql.jdbc.Driver | 6 | ms.mysql.driver= com.mysql.jdbc.Driver |
| 2 | ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | 7 | ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 3 | ms.mysql.username= root | 8 | ms.mysql.username= root |
| 4 | ms.mysql.password= 123456 | 9 | ms.mysql.password= 123456 |
| 5 | - | ||
| 6 | -#ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 7 | -#ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | ||
| 8 | -#ms.mysql.username= root | ||
| 9 | -#ms.mysql.password= root2jsp | ||
| 10 | \ No newline at end of file | 10 | \ No newline at end of file |
src/main/resources/static/index.html
| @@ -145,7 +145,7 @@ tr.row-active td { | @@ -145,7 +145,7 @@ tr.row-active td { | ||
| 145 | <div class="page-header-inner "> | 145 | <div class="page-header-inner "> |
| 146 | <!-- LOGO --> | 146 | <!-- LOGO --> |
| 147 | <div class="page-logo"> | 147 | <div class="page-logo"> |
| 148 | - <a href="index.html" class="logo-default logo-default-text" > 闵行公交调度系统 </a> | 148 | + <a href="index.html" class="logo-default logo-default-text" > 青浦公交调度系统 </a> |
| 149 | <div class="menu-toggler sidebar-toggler"> | 149 | <div class="menu-toggler sidebar-toggler"> |
| 150 | </div> | 150 | </div> |
| 151 | </div> | 151 | </div> |
src/main/resources/static/login.html
| @@ -180,7 +180,7 @@ h3.logo-text{ | @@ -180,7 +180,7 @@ h3.logo-text{ | ||
| 180 | <div class="wrapper ng-scope"> | 180 | <div class="wrapper ng-scope"> |
| 181 | <div id="loginPanel" class="dialog dialog-shadow"> | 181 | <div id="loginPanel" class="dialog dialog-shadow"> |
| 182 | <br> | 182 | <br> |
| 183 | - <h3 class="logo-text">闵行公交调度系统 </h3> | 183 | + <h3 class="logo-text">青浦公交调度系统 </h3> |
| 184 | <hr> | 184 | <hr> |
| 185 | <form style="padding: 0px 35px;"> | 185 | <form style="padding: 0px 35px;"> |
| 186 | <div class="form-group" style="margin-bottom: 0"> | 186 | <div class="form-group" style="margin-bottom: 0"> |
src/main/resources/static/pages/control/line/index.html
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | <div class="portlet-title banner" > | 18 | <div class="portlet-title banner" > |
| 19 | <div class="caption col_hide_1280" style="color: #FFF;"> | 19 | <div class="caption col_hide_1280" style="color: #FFF;"> |
| 20 | <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span | 20 | <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span |
| 21 | - class="caption-subject bold" style="font-size: 24px;">闵行公交线路调度系统</span> | 21 | + class="caption-subject bold" style="font-size: 24px;">青浦公交线路调度系统</span> |
| 22 | </div> | 22 | </div> |
| 23 | <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;"> | 23 | <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;"> |
| 24 | <span class="top_username"></span> <span class="operation_mode_text animated" ></span> | 24 | <span class="top_username"></span> <span class="operation_mode_text animated" ></span> |
src/main/resources/static/pages/forms/mould/changetochange.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/account.html
| @@ -80,44 +80,18 @@ | @@ -80,44 +80,18 @@ | ||
| 80 | locale : 'zh-cn' | 80 | locale : 'zh-cn' |
| 81 | }); | 81 | }); |
| 82 | 82 | ||
| 83 | - $('#line').select2({ | ||
| 84 | - ajax: { | ||
| 85 | - url: '/realSchedule/findLine', | ||
| 86 | - type: 'post', | ||
| 87 | - dataType: 'json', | ||
| 88 | - delay: 150, | ||
| 89 | - data: function(params){ | ||
| 90 | - return{line: params.term}; | ||
| 91 | - }, | ||
| 92 | - processResults: function (data) { | ||
| 93 | - return { | ||
| 94 | - results: data | ||
| 95 | - }; | ||
| 96 | - }, | ||
| 97 | - cache: true | ||
| 98 | - }, | ||
| 99 | - templateResult: function(repo){ | ||
| 100 | - if (repo.loading) return repo.text; | ||
| 101 | - var h = '<span>'+repo.text+'</span>'; | ||
| 102 | - return h; | ||
| 103 | - }, | ||
| 104 | - escapeMarkup: function (markup) { return markup; }, | ||
| 105 | - minimumInputLength: 1, | ||
| 106 | - templateSelection: function(repo){ | ||
| 107 | - return repo.text; | ||
| 108 | - }, | ||
| 109 | - language: { | ||
| 110 | - noResults: function(){ | ||
| 111 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 112 | - }, | ||
| 113 | - inputTooShort : function(e) { | ||
| 114 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 115 | - }, | ||
| 116 | - searching : function() { | ||
| 117 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 118 | - } | ||
| 119 | - } | ||
| 120 | - }); | 83 | + $.get('/basic/lineCode2Name',function(result){ |
| 84 | + var data=[]; | ||
| 85 | + | ||
| 86 | + for(var code in result){ | ||
| 87 | + data.push({id: code, text: result[code]}); | ||
| 88 | + } | ||
| 89 | + console.log(data); | ||
| 90 | + initPinYinSelect2('#line',data,''); | ||
| 91 | + | ||
| 92 | + }) | ||
| 93 | + | ||
| 94 | + | ||
| 121 | $('#code').select2({ | 95 | $('#code').select2({ |
| 122 | ajax: { | 96 | ajax: { |
| 123 | url: '/realSchedule/sreachVehic', | 97 | url: '/realSchedule/sreachVehic', |
src/main/resources/static/pages/forms/statement/changetochange.html
| @@ -10,63 +10,98 @@ | @@ -10,63 +10,98 @@ | ||
| 10 | border: 1px solid; } | 10 | border: 1px solid; } |
| 11 | .table-bordered > thead > tr > th, | 11 | .table-bordered > thead > tr > th, |
| 12 | .table-bordered > thead > tr > td { | 12 | .table-bordered > thead > tr > td { |
| 13 | - border-bottom-width: 2px; } | 13 | + border-bottom-width: 2px; |
| 14 | + text-align: center;} | ||
| 14 | 15 | ||
| 15 | .table > tbody + tbody { | 16 | .table > tbody + tbody { |
| 16 | border-top: 1px solid; } | 17 | border-top: 1px solid; } |
| 18 | + .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; } | ||
| 19 | +.table-checkable tr > th:first-child, .table-checkable tr > td:first-child { | ||
| 20 | + text-align: center; | ||
| 21 | + max-width: initial; | ||
| 22 | + min-width: 40px; | ||
| 23 | + padding-left: 0; | ||
| 24 | + padding-right: 0; | ||
| 25 | +} | ||
| 26 | + | ||
| 17 | </style> | 27 | </style> |
| 18 | 28 | ||
| 19 | <div class="page-head"> | 29 | <div class="page-head"> |
| 20 | <div class="page-title"> | 30 | <div class="page-title"> |
| 21 | - <h1>鎹汉鎹㈣溅鎯呭喌缁熻琛</h1> | 31 | + <h1>换人换车情况统计表</h1> |
| 22 | </div> | 32 | </div> |
| 23 | </div> | 33 | </div> |
| 24 | 34 | ||
| 25 | <div class="row"> | 35 | <div class="row"> |
| 26 | <div class="col-md-12"> | 36 | <div class="col-md-12"> |
| 27 | <div class="portlet light porttlet-fit bordered"> | 37 | <div class="portlet light porttlet-fit bordered"> |
| 38 | + <div class="portlet-title"> | ||
| 39 | + <form class="form-inline" action="" method="post"> | ||
| 40 | + <div style="display: inline-block;"> | ||
| 41 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 42 | + <select class="form-control" name="line" id="line" style="width: 120px;"></select> | ||
| 43 | + </div> | ||
| 44 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 45 | + <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 46 | + <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | ||
| 47 | + </div> | ||
| 48 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 49 | + <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 50 | + <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 51 | + </div> | ||
| 52 | + <div style="display: inline-block;"> | ||
| 53 | + <span class="item-label" style="width: 120px;">类型: </span> | ||
| 54 | + <select class="form-control" id="sel"> | ||
| 55 | + <option value="">请选择</option> | ||
| 56 | + <option value="1">换人</option> | ||
| 57 | + <option value="2">换车</option> | ||
| 58 | + </select> | ||
| 59 | + </div> | ||
| 60 | + <div class="form-group"> | ||
| 61 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 62 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 63 | + </div> | ||
| 64 | + </form> | ||
| 65 | + </div> | ||
| 28 | <div class="portlet-body"> | 66 | <div class="portlet-body"> |
| 29 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 67 | + <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> |
| 30 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 68 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 31 | <thead> | 69 | <thead> |
| 32 | <tr> | 70 | <tr> |
| 33 | - <th colspan="13">鎹汉鎹㈣溅鎯呭喌缁熻琛</th> | 71 | + <th colspan="15">换人换车情况统计表</th> |
| 34 | </tr> | 72 | </tr> |
| 35 | - <!-- <tr> | ||
| 36 | - <td colspan="12">杞﹂槦 绔 <span id="sDate"></span>鑷<span id="eDate"></span></td> | ||
| 37 | - </tr> --> | ||
| 38 | <tr> | 73 | <tr> |
| 39 | - <td rowspan="3">鏃ユ湡</td> | ||
| 40 | - <td rowspan="3">鍏徃</td> | ||
| 41 | - <td rowspan="3">鍒嗗叕鍙</td> | ||
| 42 | - <td rowspan="3">绾胯矾</td> | ||
| 43 | - <td rowspan="3">璺墝</td> | ||
| 44 | - <td rowspan="3">鍙戠敓鏃堕棿</td> | ||
| 45 | - <td rowspan="3">淇敼鏃堕棿</td> | ||
| 46 | - <td colspan="3">閰嶈溅</td> | ||
| 47 | - <td colspan="3">浜哄憳</td> | ||
| 48 | - <td rowspan="3">鍘熷洜</td> | ||
| 49 | - <td rowspan="3">淇敼浜</td> | 74 | + <td rowspan="3" style=" padding-top: 50px;">日期</td> |
| 75 | + <td rowspan="3" style=" padding-top: 50px;">公司</td> | ||
| 76 | + <td rowspan="3" style=" padding-top: 50px;">分公司</td> | ||
| 77 | + <td rowspan="3" style=" padding-top: 50px;">线路</td> | ||
| 78 | + <td rowspan="3" style=" padding-top: 50px;">路牌</td> | ||
| 79 | + <td rowspan="3" style=" padding-top: 50px;">发生时间</td> | ||
| 80 | + <td rowspan="3" style=" padding-top: 50px;">修改时间</td> | ||
| 81 | + <td colspan="2">配车</td> | ||
| 82 | + <td colspan="4">人员</td> | ||
| 83 | + <td rowspan="3" style=" padding-top: 50px;">原因</td> | ||
| 84 | + <td rowspan="3" style=" padding-top: 50px;">修改人</td> | ||
| 50 | </tr> | 85 | </tr> |
| 51 | <tr> | 86 | <tr> |
| 52 | - <td>璁″垝</td> | ||
| 53 | - <td>瀹為檯</td> | ||
| 54 | - <td>璁″垝</td> | ||
| 55 | - <td>瀹為檯</td> | 87 | + <td>计划</td> |
| 88 | + <td>实际</td> | ||
| 89 | + <td colspan="2">计划</td> | ||
| 90 | + <td colspan="2">实际</td> | ||
| 91 | + | ||
| 56 | </tr> | 92 | </tr> |
| 57 | <tr> | 93 | <tr> |
| 58 | - <td>璁″垝</td> | ||
| 59 | - <td>瀹為檯</td> | ||
| 60 | - <td>璁″垝</td> | ||
| 61 | - <td>瀹為檯</td> | 94 | + <td>车号</td> |
| 95 | + <td>车号</td> | ||
| 96 | + <td>工号</td> | ||
| 97 | + <td>人员</td> | ||
| 98 | + <td>工号</td> | ||
| 99 | + <td>人员</td> | ||
| 62 | </tr> | 100 | </tr> |
| 63 | </thead> | 101 | </thead> |
| 64 | - <tbody class="list_correctForm"> | 102 | + <tbody> |
| 65 | 103 | ||
| 66 | </tbody> | 104 | </tbody> |
| 67 | - <tbody class="list_correctForm_statistics"> | ||
| 68 | - | ||
| 69 | - </tbody> | ||
| 70 | </table> | 105 | </table> |
| 71 | </div> | 106 | </div> |
| 72 | </div> | 107 | </div> |
| @@ -76,7 +111,7 @@ | @@ -76,7 +111,7 @@ | ||
| 76 | 111 | ||
| 77 | <script> | 112 | <script> |
| 78 | $(function(){ | 113 | $(function(){ |
| 79 | - // 鍏抽棴宸︿晶鏍 | 114 | + // 关闭左侧栏 |
| 80 | if (!$('body').hasClass('page-sidebar-closed')) | 115 | if (!$('body').hasClass('page-sidebar-closed')) |
| 81 | $('.menu-toggler.sidebar-toggler').click(); | 116 | $('.menu-toggler.sidebar-toggler').click(); |
| 82 | 117 | ||
| @@ -113,162 +148,81 @@ | @@ -113,162 +148,81 @@ | ||
| 113 | }, | 148 | }, |
| 114 | language: { | 149 | language: { |
| 115 | noResults: function(){ | 150 | noResults: function(){ |
| 116 | - return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒扮嚎璺紒</span>'; | ||
| 117 | - }, | ||
| 118 | - inputTooShort : function(e) { | ||
| 119 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆绾胯矾鎼滅储绾胯矾</span>'; | ||
| 120 | - }, | ||
| 121 | - searching : function() { | ||
| 122 | - return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储绾胯矾...</span>'; | ||
| 123 | - } | ||
| 124 | - } | ||
| 125 | - }); | ||
| 126 | - $('#lpName').select2({ | ||
| 127 | - ajax: { | ||
| 128 | - url: '/realSchedule/findLpName', | ||
| 129 | - type: 'post', | ||
| 130 | - dataType: 'json', | ||
| 131 | - delay: 150, | ||
| 132 | - data: function(params){ | ||
| 133 | - return{lpName: params.term}; | ||
| 134 | - }, | ||
| 135 | - processResults: function (data) { | ||
| 136 | - return { | ||
| 137 | - results: data | ||
| 138 | - }; | ||
| 139 | - }, | ||
| 140 | - cache: true | ||
| 141 | - }, | ||
| 142 | - templateResult: function(repo){ | ||
| 143 | - if (repo.loading) return repo.text; | ||
| 144 | - var h = '<span>'+repo.text+'</span>'; | ||
| 145 | - return h; | ||
| 146 | - }, | ||
| 147 | - escapeMarkup: function (markup) { return markup; }, | ||
| 148 | - minimumInputLength: 1, | ||
| 149 | - templateSelection: function(repo){ | ||
| 150 | - return repo.text; | ||
| 151 | - }, | ||
| 152 | - language: { | ||
| 153 | - noResults: function(){ | ||
| 154 | - return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒拌矾鐗岋紒</span>'; | 151 | + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; |
| 155 | }, | 152 | }, |
| 156 | inputTooShort : function(e) { | 153 | inputTooShort : function(e) { |
| 157 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆璺墝鎼滅储璺墝</span>'; | 154 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; |
| 158 | }, | 155 | }, |
| 159 | searching : function() { | 156 | searching : function() { |
| 160 | - return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储璺墝...</span>'; | 157 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; |
| 161 | } | 158 | } |
| 162 | } | 159 | } |
| 163 | }); | 160 | }); |
| 164 | - $('#code').select2({ | ||
| 165 | - ajax: { | ||
| 166 | - url: '/realSchedule/sreachVehic', | ||
| 167 | - dataType: 'json', | ||
| 168 | - delay: 150, | ||
| 169 | - data: function(params){ | ||
| 170 | - return{nbbm: params.term}; | ||
| 171 | - }, | ||
| 172 | - processResults: function (data) { | ||
| 173 | - return { | ||
| 174 | - results: data | ||
| 175 | - }; | ||
| 176 | - }, | ||
| 177 | - cache: true | ||
| 178 | - }, | ||
| 179 | - templateResult: function(repo){ | ||
| 180 | - if (repo.loading) return repo.text; | ||
| 181 | - var h = '<span>'+repo.text+'</span>'; | ||
| 182 | - h += (repo.lineName?' <span class="select2-desc">'+repo.lineName+'</span>':''); | ||
| 183 | - return h; | ||
| 184 | - }, | ||
| 185 | - escapeMarkup: function (markup) { return markup; }, | ||
| 186 | - minimumInputLength: 1, | ||
| 187 | - templateSelection: function(repo){ | ||
| 188 | - return repo.text; | ||
| 189 | - }, | ||
| 190 | - language: { | ||
| 191 | - noResults: function(){ | ||
| 192 | - return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒拌溅杈嗭紒</span>'; | ||
| 193 | - }, | ||
| 194 | - inputTooShort : function(e) { | ||
| 195 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆鑷紪鍙锋悳绱㈣溅杈</span>'; | ||
| 196 | - }, | ||
| 197 | - searching : function() { | ||
| 198 | - return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储杞﹁締...</span>'; | ||
| 199 | - } | ||
| 200 | - } | ||
| 201 | - }); | ||
| 202 | - | 161 | + var line; |
| 162 | + var startDate; | ||
| 163 | + var endDate; | ||
| 203 | $("#query").on("click",function(){ | 164 | $("#query").on("click",function(){ |
| 204 | - var line = $("#line").val(); | ||
| 205 | - var startDate = $("#startDate").val(); | ||
| 206 | - var endDate = $("#endDate").val(); | ||
| 207 | - var lpName = $("#lpName").val(); | ||
| 208 | - var code = $("#code").val(); | ||
| 209 | - $post("/realSchedule/correctForm",{line:line,startDate:startDate,endDate:endDate,lpName:lpName,code:code},function(result){ | ||
| 210 | - $("#sDate").text(startDate); | ||
| 211 | - $("#eDate").text(endDate); | ||
| 212 | - var temp = {}; | ||
| 213 | - var today_account = 0; | ||
| 214 | - temp["line"] = $("#line").text() ; | ||
| 215 | - temp["totalAdjustment"] = result.length; | ||
| 216 | - | ||
| 217 | - $.each(result, function(i, obj) { | ||
| 218 | - if(moment(obj.scheduleDate).format("YYYY-MM-DD") == moment(obj.updateDate).format("YYYY-MM-DD")){ | ||
| 219 | - today_account++; | ||
| 220 | - } | ||
| 221 | - obj.updateDate = moment(obj.updateDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 222 | - }); | ||
| 223 | - | ||
| 224 | - temp["todayAdjustment"] = today_account; | ||
| 225 | - temp["beforeAdjustment"] = result.length-today_account; | ||
| 226 | - temp["historyAdjustment"] = 0; | ||
| 227 | - | ||
| 228 | - var list_correctForm = template('list_correctForm',{list:result}); | ||
| 229 | - // 鎶婃覆鏌撳ソ鐨勬ā鐗坔tml鏂囨湰杩藉姞鍒拌〃鏍间腑 | ||
| 230 | - $('#forms .list_correctForm').html(list_correctForm); | ||
| 231 | - | ||
| 232 | - var list_correctForm_statistics = template('list_correctForm_statistics',temp); | ||
| 233 | - $('#forms .list_correctForm_statistics').html(list_correctForm_statistics); | ||
| 234 | - }); | 165 | + line = $("#line").val(); |
| 166 | + sel = $("#sel").val(); | ||
| 167 | + var startDate1=$("#startDate").val(); | ||
| 168 | + var endDate1=$("#endDate").val(); | ||
| 169 | + | ||
| 170 | + if(startDate1!=''&&endDate1!=''){ | ||
| 171 | + $post('/mcy_forms/changetochange',{sel:sel,line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | ||
| 172 | + startDate = $("#startDate").val(); | ||
| 173 | + endDate = $("#endDate").val(); | ||
| 174 | + $("#sDate").text(startDate); | ||
| 175 | + $("#eDate").text(endDate); | ||
| 176 | + var temp = {}; | ||
| 177 | + var today_account = 0; | ||
| 178 | + temp["line"] = $("#line").text(); | ||
| 179 | + $.each(result, function(i, obj) { | ||
| 180 | + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 181 | + today_account++; | ||
| 182 | + } | ||
| 183 | + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 184 | + }); | ||
| 185 | + // 把数据填充到模版中 | ||
| 186 | + var tbodyHtml = template('changetochange',{list:result}); | ||
| 187 | + // 把渲染好的模版html文本追加到表格中 | ||
| 188 | + $('#forms tbody').html(tbodyHtml); | ||
| 189 | + }) | ||
| 190 | + | ||
| 191 | + }else{ | ||
| 192 | + alert("请选择时间范围!"); | ||
| 193 | + } | ||
| 194 | + }); | ||
| 195 | + | ||
| 196 | + $("#export").on("click",function(){ | ||
| 197 | + $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ | ||
| 198 | + window.open("/downloadFile/download?fileName=换人换车情况日统计"+moment(startDate).format("YYYYMMDD")); | ||
| 235 | }); | 199 | }); |
| 236 | }); | 200 | }); |
| 201 | + }); | ||
| 237 | </script> | 202 | </script> |
| 238 | -<script type="text/html" id="list_correctForm"> | 203 | +<script type="text/html" id="changetochange"> |
| 239 | {{each list as obj i}} | 204 | {{each list as obj i}} |
| 240 | <tr> | 205 | <tr> |
| 241 | - <td>{{obj.xlName}}</td> | ||
| 242 | - <td>{{obj.lpName}}</td> | ||
| 243 | - <td>{{obj.clZbh}}</td> | ||
| 244 | - <td>{{obj.jName}}</td> | ||
| 245 | - <td>{{obj.sName}}</td> | ||
| 246 | - <td>{{obj.fcsj}}</td> | ||
| 247 | - <td>{{obj.fcsjActual}}</td> | ||
| 248 | - <td>{{obj.zdsj}}</td> | ||
| 249 | - <td>{{obj.zdsjActual}}</td> | ||
| 250 | - <td>{{obj.updateBy}}</td> | ||
| 251 | - <td>{{obj.updateDate}}</td> | ||
| 252 | - <td>{{obj.remarks}}</td> | 206 | + <td>{{obj.rq}}</td> |
| 207 | + <td>{{obj.gs}}</td> | ||
| 208 | + <td>{{obj.fgs}}</td> | ||
| 209 | + <td>{{obj.xl}}</td> | ||
| 210 | + <td>{{obj.lp}}</td> | ||
| 211 | + <td>{{obj.fssj}}</td> | ||
| 212 | + <td>{{obj.xgsj}}</td> | ||
| 213 | + <td>{{obj.pcch}}</td> | ||
| 214 | + <td>{{obj.pcry}}</td> | ||
| 215 | + <td>{{obj.jhgh}}</td> | ||
| 216 | + <td>{{obj.jhch}}</td> | ||
| 217 | + <td>{{obj.sjgh}}</td> | ||
| 218 | + <td>{{obj.sjch}}</td> | ||
| 219 | + <td>{{obj.yy}}</td> | ||
| 220 | + <td>{{obj.xgr}}</td> | ||
| 253 | </tr> | 221 | </tr> |
| 254 | {{/each}} | 222 | {{/each}} |
| 255 | {{if list.length == 0}} | 223 | {{if list.length == 0}} |
| 256 | <tr> | 224 | <tr> |
| 257 | - <td colspan="12"><h6 class="muted">娌℃湁鎵惧埌鐩稿叧鏁版嵁</h6></td> | 225 | + <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> |
| 258 | </tr> | 226 | </tr> |
| 259 | {{/if}} | 227 | {{/if}} |
| 260 | </script> | 228 | </script> |
| 261 | -<script type="text/html" id="list_correctForm_statistics"> | ||
| 262 | - <tr> | ||
| 263 | - <td colspan="2">绾胯矾:</td> | ||
| 264 | - <td>{{line}}</td> | ||
| 265 | - <td>璋冩暣鎬绘暟</td> | ||
| 266 | - <td>{{totalAdjustment}}</td> | ||
| 267 | - <td>浜嬪厛璋冩暣</td> | ||
| 268 | - <td>{{beforeAdjustment}}</td> | ||
| 269 | - <td>褰撴棩璋冩暣</td> | ||
| 270 | - <td>{{todayAdjustment}}</td> | ||
| 271 | - <td>鍘嗗彶璋冩暣</td> | ||
| 272 | - <td colspan="2">{{historyAdjustment}}</td> | ||
| 273 | - </tr> | ||
| 274 | -</script> | ||
| 275 | \ No newline at end of file | 229 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/correctForm.html
| @@ -107,44 +107,19 @@ | @@ -107,44 +107,19 @@ | ||
| 107 | locale : 'zh-cn' | 107 | locale : 'zh-cn' |
| 108 | }); | 108 | }); |
| 109 | 109 | ||
| 110 | - $('#line').select2({ | ||
| 111 | - ajax: { | ||
| 112 | - url: '/realSchedule/findLine', | ||
| 113 | - type: 'post', | ||
| 114 | - dataType: 'json', | ||
| 115 | - delay: 150, | ||
| 116 | - data: function(params){ | ||
| 117 | - return{line: params.term}; | ||
| 118 | - }, | ||
| 119 | - processResults: function (data) { | ||
| 120 | - return { | ||
| 121 | - results: data | ||
| 122 | - }; | ||
| 123 | - }, | ||
| 124 | - cache: true | ||
| 125 | - }, | ||
| 126 | - templateResult: function(repo){ | ||
| 127 | - if (repo.loading) return repo.text; | ||
| 128 | - var h = '<span>'+repo.text+'</span>'; | ||
| 129 | - return h; | ||
| 130 | - }, | ||
| 131 | - escapeMarkup: function (markup) { return markup; }, | ||
| 132 | - minimumInputLength: 1, | ||
| 133 | - templateSelection: function(repo){ | ||
| 134 | - return repo.text; | ||
| 135 | - }, | ||
| 136 | - language: { | ||
| 137 | - noResults: function(){ | ||
| 138 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 139 | - }, | ||
| 140 | - inputTooShort : function(e) { | ||
| 141 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 142 | - }, | ||
| 143 | - searching : function() { | ||
| 144 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 145 | - } | ||
| 146 | - } | ||
| 147 | - }); | 110 | + |
| 111 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 112 | + var data=[]; | ||
| 113 | + | ||
| 114 | + for(var code in result){ | ||
| 115 | + data.push({id: code, text: result[code]}); | ||
| 116 | + } | ||
| 117 | + console.log(data); | ||
| 118 | + initPinYinSelect2('#line',data,''); | ||
| 119 | + | ||
| 120 | + }) | ||
| 121 | + | ||
| 122 | + | ||
| 148 | $('#lpName').select2({ | 123 | $('#lpName').select2({ |
| 149 | ajax: { | 124 | ajax: { |
| 150 | url: '/realSchedule/findLpName', | 125 | url: '/realSchedule/findLpName', |
src/main/resources/static/pages/forms/statement/daily.html
| @@ -92,45 +92,16 @@ | @@ -92,45 +92,16 @@ | ||
| 92 | locale : 'zh-cn' | 92 | locale : 'zh-cn' |
| 93 | }); | 93 | }); |
| 94 | 94 | ||
| 95 | - $('#line').select2({ | ||
| 96 | - ajax: { | ||
| 97 | - url: '/realSchedule/findLine', | ||
| 98 | - type: 'post', | ||
| 99 | - dataType: 'json', | ||
| 100 | - delay: 150, | ||
| 101 | - data: function(params){ | ||
| 102 | - return{line: params.term}; | ||
| 103 | - }, | ||
| 104 | - processResults: function (data) { | ||
| 105 | - return { | ||
| 106 | - results: data | ||
| 107 | - }; | ||
| 108 | - }, | ||
| 109 | - cache: true | ||
| 110 | - }, | ||
| 111 | - templateResult: function(repo){ | ||
| 112 | - if (repo.loading) return repo.text; | ||
| 113 | - var h = '<span>'+repo.text+'</span>'; | ||
| 114 | - return h; | ||
| 115 | - }, | ||
| 116 | - escapeMarkup: function (markup) { return markup; }, | ||
| 117 | - minimumInputLength: 1, | ||
| 118 | - templateSelection: function(repo){ | ||
| 119 | - return repo.text; | ||
| 120 | - }, | ||
| 121 | - language: { | ||
| 122 | - noResults: function(){ | ||
| 123 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 124 | - }, | ||
| 125 | - inputTooShort : function(e) { | ||
| 126 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 127 | - }, | ||
| 128 | - searching : function() { | ||
| 129 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 130 | - } | ||
| 131 | - } | ||
| 132 | - }); | ||
| 133 | - | 95 | + $.get('/basic/lineCode2Name',function(result){ |
| 96 | + var data=[]; | ||
| 97 | + | ||
| 98 | + for(var code in result){ | ||
| 99 | + data.push({id: code, text: result[code]}); | ||
| 100 | + } | ||
| 101 | + console.log(data); | ||
| 102 | + initPinYinSelect2('#line',data,''); | ||
| 103 | + | ||
| 104 | + }) | ||
| 134 | var line; | 105 | var line; |
| 135 | var date; | 106 | var date; |
| 136 | $("#query").on("click",function(){ | 107 | $("#query").on("click",function(){ |
src/main/resources/static/pages/forms/statement/historyMessage.html
| @@ -80,44 +80,16 @@ | @@ -80,44 +80,16 @@ | ||
| 80 | locale : 'zh-cn' | 80 | locale : 'zh-cn' |
| 81 | }); | 81 | }); |
| 82 | 82 | ||
| 83 | - $('#line').select2({ | ||
| 84 | - ajax: { | ||
| 85 | - url: '/realSchedule/findLine', | ||
| 86 | - type: 'post', | ||
| 87 | - dataType: 'json', | ||
| 88 | - delay: 150, | ||
| 89 | - data: function(params){ | ||
| 90 | - return{line: params.term}; | ||
| 91 | - }, | ||
| 92 | - processResults: function (data) { | ||
| 93 | - return { | ||
| 94 | - results: data | ||
| 95 | - }; | ||
| 96 | - }, | ||
| 97 | - cache: true | ||
| 98 | - }, | ||
| 99 | - templateResult: function(repo){ | ||
| 100 | - if (repo.loading) return repo.text; | ||
| 101 | - var h = '<span>'+repo.text+'</span>'; | ||
| 102 | - return h; | ||
| 103 | - }, | ||
| 104 | - escapeMarkup: function (markup) { return markup; }, | ||
| 105 | - minimumInputLength: 1, | ||
| 106 | - templateSelection: function(repo){ | ||
| 107 | - return repo.text; | ||
| 108 | - }, | ||
| 109 | - language: { | ||
| 110 | - noResults: function(){ | ||
| 111 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 112 | - }, | ||
| 113 | - inputTooShort : function(e) { | ||
| 114 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 115 | - }, | ||
| 116 | - searching : function() { | ||
| 117 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 118 | - } | 83 | + $.get('/basic/lineCode2Name',function(result){ |
| 84 | + var data=[]; | ||
| 85 | + | ||
| 86 | + for(var code in result){ | ||
| 87 | + data.push({id: code, text: result[code]}); | ||
| 119 | } | 88 | } |
| 120 | - }); | 89 | + console.log(data); |
| 90 | + initPinYinSelect2('#line',data,''); | ||
| 91 | + | ||
| 92 | + }) | ||
| 121 | $('#code').select2({ | 93 | $('#code').select2({ |
| 122 | ajax: { | 94 | ajax: { |
| 123 | url: '/realSchedule/sreachVehic', | 95 | url: '/realSchedule/sreachVehic', |
src/main/resources/static/pages/forms/statement/jobSummary.html
| @@ -194,43 +194,17 @@ | @@ -194,43 +194,17 @@ | ||
| 194 | locale : 'zh-cn' | 194 | locale : 'zh-cn' |
| 195 | }); | 195 | }); |
| 196 | 196 | ||
| 197 | - $('#line').select2({ | ||
| 198 | - ajax: { | ||
| 199 | - url: '/realSchedule/findLine', | ||
| 200 | - dataType: 'json', | ||
| 201 | - delay: 150, | ||
| 202 | - data: function(params){ | ||
| 203 | - return{line: params.term}; | ||
| 204 | - }, | ||
| 205 | - processResults: function (data) { | ||
| 206 | - return { | ||
| 207 | - results: data | ||
| 208 | - }; | ||
| 209 | - }, | ||
| 210 | - cache: true | ||
| 211 | - }, | ||
| 212 | - templateResult: function(repo){ | ||
| 213 | - if (repo.loading) return repo.text; | ||
| 214 | - var h = '<span>'+repo.text+'</span>'; | ||
| 215 | - return h; | ||
| 216 | - }, | ||
| 217 | - escapeMarkup: function (markup) { return markup; }, | ||
| 218 | - minimumInputLength: 1, | ||
| 219 | - templateSelection: function(repo){ | ||
| 220 | - return repo.text; | ||
| 221 | - }, | ||
| 222 | - language: { | ||
| 223 | - noResults: function(){ | ||
| 224 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 225 | - }, | ||
| 226 | - inputTooShort : function(e) { | ||
| 227 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 228 | - }, | ||
| 229 | - searching : function() { | ||
| 230 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 231 | - } | ||
| 232 | - } | ||
| 233 | - }); | 197 | + $.get('/basic/lineCode2Name',function(result){ |
| 198 | + var data=[]; | ||
| 199 | + | ||
| 200 | + for(var code in result){ | ||
| 201 | + data.push({id: code, text: result[code]}); | ||
| 202 | + } | ||
| 203 | + console.log(data); | ||
| 204 | + initPinYinSelect2('#line',data,''); | ||
| 205 | + | ||
| 206 | + }) | ||
| 207 | + | ||
| 234 | }); | 208 | }); |
| 235 | </script> | 209 | </script> |
| 236 | <script type="text/html" id="list_forms"> | 210 | <script type="text/html" id="list_forms"> |
src/main/resources/static/pages/forms/statement/linepassengerflow.html
| @@ -21,12 +21,12 @@ | @@ -21,12 +21,12 @@ | ||
| 21 | <h1>线路客流量报表</h1> | 21 | <h1>线路客流量报表</h1> |
| 22 | </div> | 22 | </div> |
| 23 | </div> | 23 | </div> |
| 24 | - | ||
| 25 | -<div class="row"> | ||
| 26 | - <div class="col-md-12"> | ||
| 27 | - <div class="portlet light porttlet-fit bordered"> | ||
| 28 | - <div class="portlet-title"> | ||
| 29 | - <form class="form-inline" action=""> | 24 | + |
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | <div style="display: inline-block;"> | 30 | <div style="display: inline-block;"> |
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 31 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| @@ -38,10 +38,10 @@ | @@ -38,10 +38,10 @@ | ||
| 38 | <div class="form-group"> | 38 | <div class="form-group"> |
| 39 | <input class="btn btn-default" type="button" id="query" value="筛选"/> | 39 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 40 | <input class="btn btn-default" type="button" id="export" value="导出"/> | 40 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 41 | - </div> | ||
| 42 | - </form> | ||
| 43 | - </div> | ||
| 44 | - <div class="portlet-body"> | 41 | + </div> |
| 42 | + </form> | ||
| 43 | + </div> | ||
| 44 | + <div class="portlet-body"> | ||
| 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 46 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | <thead> | 47 | <thead> |
| @@ -56,63 +56,34 @@ | @@ -56,63 +56,34 @@ | ||
| 56 | 56 | ||
| 57 | </tbody> | 57 | </tbody> |
| 58 | </table> | 58 | </table> |
| 59 | - </div> | ||
| 60 | - </div> | ||
| 61 | - </div> | ||
| 62 | - </div> | ||
| 63 | -</div> | ||
| 64 | - | ||
| 65 | -<script> | 59 | + </div> |
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | +</div> | ||
| 64 | + | ||
| 65 | +<script> | ||
| 66 | $(function(){ | 66 | $(function(){ |
| 67 | - var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; | ||
| 68 | - // 关闭左侧栏 | ||
| 69 | - if (!$('body').hasClass('page-sidebar-closed')) | 67 | + var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; |
| 68 | + // 关闭左侧栏 | ||
| 69 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 70 | $('.menu-toggler.sidebar-toggler').click(); | 70 | $('.menu-toggler.sidebar-toggler').click(); |
| 71 | - | ||
| 72 | - $("#date").datetimepicker({ | ||
| 73 | - format : 'YYYY-MM-DD', | ||
| 74 | - locale : 'zh-cn' | 71 | + |
| 72 | + $("#date").datetimepicker({ | ||
| 73 | + format : 'YYYY-MM-DD', | ||
| 74 | + locale : 'zh-cn' | ||
| 75 | }); | 75 | }); |
| 76 | 76 | ||
| 77 | - $('#line').select2({ | ||
| 78 | - ajax: { | ||
| 79 | - url: '/realSchedule/findLine', | ||
| 80 | - type: 'post', | ||
| 81 | - dataType: 'json', | ||
| 82 | - delay: 150, | ||
| 83 | - data: function(params){ | ||
| 84 | - return{line: params.term}; | ||
| 85 | - }, | ||
| 86 | - processResults: function (data) { | ||
| 87 | - return { | ||
| 88 | - results: data | ||
| 89 | - }; | ||
| 90 | - }, | ||
| 91 | - cache: true | ||
| 92 | - }, | ||
| 93 | - templateResult: function(repo){ | ||
| 94 | - if (repo.loading) return repo.text; | ||
| 95 | - var h = '<span>'+repo.text+'</span>'; | ||
| 96 | - return h; | ||
| 97 | - }, | ||
| 98 | - escapeMarkup: function (markup) { return markup; }, | ||
| 99 | - minimumInputLength: 1, | ||
| 100 | - templateSelection: function(repo){ | ||
| 101 | - return repo.text; | ||
| 102 | - }, | ||
| 103 | - language: { | ||
| 104 | - noResults: function(){ | ||
| 105 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 106 | - }, | ||
| 107 | - inputTooShort : function(e) { | ||
| 108 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 109 | - }, | ||
| 110 | - searching : function() { | ||
| 111 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 112 | - } | ||
| 113 | - } | ||
| 114 | - }); | ||
| 115 | - | 77 | + $.get('/basic/lineCode2Name',function(result){ |
| 78 | + var data=[]; | ||
| 79 | + | ||
| 80 | + for(var code in result){ | ||
| 81 | + data.push({id: code, text: result[code]}); | ||
| 82 | + } | ||
| 83 | + console.log(data); | ||
| 84 | + initPinYinSelect2('#line',data,''); | ||
| 85 | + | ||
| 86 | + }) | ||
| 116 | 87 | ||
| 117 | $("#query").on("click",function(){ | 88 | $("#query").on("click",function(){ |
| 118 | var line = $("#line").val(); | 89 | var line = $("#line").val(); |
| @@ -126,10 +97,10 @@ | @@ -126,10 +97,10 @@ | ||
| 126 | // 把渲染好的模版html文本追加到表格中 | 97 | // 把渲染好的模版html文本追加到表格中 |
| 127 | $('#forms tbody').html(tbodyHtml); | 98 | $('#forms tbody').html(tbodyHtml); |
| 128 | }); | 99 | }); |
| 129 | - }); | ||
| 130 | - }); | ||
| 131 | -</script> | ||
| 132 | -<script type="text/html" id="list_linepasswengerflow"> | 100 | + }); |
| 101 | + }); | ||
| 102 | +</script> | ||
| 103 | +<script type="text/html" id="list_linepasswengerflow"> | ||
| 133 | {{each list as obj i}} | 104 | {{each list as obj i}} |
| 134 | <tr> | 105 | <tr> |
| 135 | <td>{{i+1}}</td> | 106 | <td>{{i+1}}</td> |
| @@ -142,5 +113,5 @@ | @@ -142,5 +113,5 @@ | ||
| 142 | <tr> | 113 | <tr> |
| 143 | <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> | 114 | <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> |
| 144 | </tr> | 115 | </tr> |
| 145 | - {{/if}} | 116 | + {{/if}} |
| 146 | </script> | 117 | </script> |
| 147 | \ No newline at end of file | 118 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/operationservice.html
| @@ -102,44 +102,18 @@ | @@ -102,44 +102,18 @@ | ||
| 102 | locale : 'zh-cn' | 102 | locale : 'zh-cn' |
| 103 | }); | 103 | }); |
| 104 | 104 | ||
| 105 | - $('#line').select2({ | ||
| 106 | - ajax: { | ||
| 107 | - url: '/realSchedule/findLine', | ||
| 108 | - type: 'post', | ||
| 109 | - dataType: 'json', | ||
| 110 | - delay: 150, | ||
| 111 | - data: function(params){ | ||
| 112 | - return{line: params.term}; | ||
| 113 | - }, | ||
| 114 | - processResults: function (data) { | ||
| 115 | - return { | ||
| 116 | - results: data | ||
| 117 | - }; | ||
| 118 | - }, | ||
| 119 | - cache: true | ||
| 120 | - }, | ||
| 121 | - templateResult: function(repo){ | ||
| 122 | - if (repo.loading) return repo.text; | ||
| 123 | - var h = '<span>'+repo.text+'</span>'; | ||
| 124 | - return h; | ||
| 125 | - }, | ||
| 126 | - escapeMarkup: function (markup) { return markup; }, | ||
| 127 | - minimumInputLength: 1, | ||
| 128 | - templateSelection: function(repo){ | ||
| 129 | - return repo.text; | ||
| 130 | - }, | ||
| 131 | - language: { | ||
| 132 | - noResults: function(){ | ||
| 133 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 134 | - }, | ||
| 135 | - inputTooShort : function(e) { | ||
| 136 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 137 | - }, | ||
| 138 | - searching : function() { | ||
| 139 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 140 | - } | ||
| 141 | - } | ||
| 142 | - }); | 105 | + |
| 106 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 107 | + var data=[]; | ||
| 108 | + | ||
| 109 | + for(var code in result){ | ||
| 110 | + data.push({id: code, text: result[code]}); | ||
| 111 | + } | ||
| 112 | + console.log(data); | ||
| 113 | + initPinYinSelect2('#line',data,''); | ||
| 114 | + | ||
| 115 | + }) | ||
| 116 | + | ||
| 143 | $('#lpName').select2({ | 117 | $('#lpName').select2({ |
| 144 | ajax: { | 118 | ajax: { |
| 145 | url: '/realSchedule/findLpName', | 119 | url: '/realSchedule/findLpName', |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| @@ -43,6 +43,7 @@ | @@ -43,6 +43,7 @@ | ||
| 43 | </div> | 43 | </div> |
| 44 | <div class="portlet-body"> | 44 | <div class="portlet-body"> |
| 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | ||
| 46 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 47 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | <thead> | 48 | <thead> |
| 48 | <tr> | 49 | <tr> |
| @@ -82,23 +83,23 @@ | @@ -82,23 +83,23 @@ | ||
| 82 | <td>援外</td> | 83 | <td>援外</td> |
| 83 | <td>其他</td> | 84 | <td>其他</td> |
| 84 | <td>全日</td> | 85 | <td>全日</td> |
| 85 | - <td>6:31~<br>8:30</td> | ||
| 86 | - <td>16:01~<br>18:00</td> | 86 | + <td>早高峰</td> |
| 87 | + <td>晚高峰</td> | ||
| 87 | <td>全日</td> | 88 | <td>全日</td> |
| 88 | - <td>6:31~<br>8:30</td> | ||
| 89 | - <td>16:01~<br>18:00</td> | 89 | + <td>早高峰</td> |
| 90 | + <td>晚高峰</td> | ||
| 90 | <td>全日</td> | 91 | <td>全日</td> |
| 91 | - <td>6:31~<br>8:30</td> | ||
| 92 | - <td>16:01~<br>18:00</td> | 92 | + <td>早高峰</td> |
| 93 | + <td>晚高峰</td> | ||
| 93 | <td>全日</td> | 94 | <td>全日</td> |
| 94 | - <td>6:31~<br>8:30</td> | ||
| 95 | - <td>16:01~<br>18:00</td> | 95 | + <td>早高峰</td> |
| 96 | + <td>晚高峰</td> | ||
| 96 | <td>全日</td> | 97 | <td>全日</td> |
| 97 | - <td>6:31~<br>8:30</td> | ||
| 98 | - <td>16:01~<br>18:00</td> | 98 | + <td>早高峰</td> |
| 99 | + <td>晚高峰</td> | ||
| 99 | <td>全日</td> | 100 | <td>全日</td> |
| 100 | - <td>6:31~<br>8:30</td> | ||
| 101 | - <td>16:01~<br>18:00</td> | 101 | + <td>早高峰</td> |
| 102 | + <td>晚高峰</td> | ||
| 102 | </tr> | 103 | </tr> |
| 103 | </thead> | 104 | </thead> |
| 104 | 105 | ||
| @@ -260,44 +261,18 @@ | @@ -260,44 +261,18 @@ | ||
| 260 | locale : 'zh-cn' | 261 | locale : 'zh-cn' |
| 261 | }); | 262 | }); |
| 262 | 263 | ||
| 263 | - $('#line').select2({ | ||
| 264 | - ajax: { | ||
| 265 | - url: '/realSchedule/findLine', | ||
| 266 | - dataType: 'json', | ||
| 267 | - delay: 150, | ||
| 268 | - data: function(params){ | ||
| 269 | - return{line: params.term}; | ||
| 270 | - }, | ||
| 271 | - processResults: function (data) { | ||
| 272 | - return { | ||
| 273 | - results: data | ||
| 274 | - }; | ||
| 275 | - }, | ||
| 276 | - cache: true | ||
| 277 | - }, | ||
| 278 | - templateResult: function(repo){ | ||
| 279 | - if (repo.loading) return repo.text; | ||
| 280 | - var h = '<span>'+repo.text+'</span>'; | ||
| 281 | - return h; | ||
| 282 | - }, | ||
| 283 | - escapeMarkup: function (markup) { return markup; }, | ||
| 284 | - minimumInputLength: 1, | ||
| 285 | - templateSelection: function(repo){ | ||
| 286 | - return repo.text; | ||
| 287 | - }, | ||
| 288 | - language: { | ||
| 289 | - noResults: function(){ | ||
| 290 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 291 | - }, | ||
| 292 | - inputTooShort : function(e) { | ||
| 293 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 294 | - }, | ||
| 295 | - searching : function() { | ||
| 296 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 297 | - } | ||
| 298 | - } | ||
| 299 | - }); | ||
| 300 | - | 264 | + |
| 265 | + | ||
| 266 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 267 | + var data=[]; | ||
| 268 | + | ||
| 269 | + for(var code in result){ | ||
| 270 | + data.push({id: code, text: result[code]}); | ||
| 271 | + } | ||
| 272 | + console.log(data); | ||
| 273 | + initPinYinSelect2('#line',data,''); | ||
| 274 | + | ||
| 275 | + }) | ||
| 301 | //查询 | 276 | //查询 |
| 302 | $("#query").on('click',function(){ | 277 | $("#query").on('click',function(){ |
| 303 | var line = $("#line").val(); | 278 | var line = $("#line").val(); |
src/main/resources/static/pages/forms/statement/shifday.html
| @@ -97,44 +97,17 @@ $(function(){ | @@ -97,44 +97,17 @@ $(function(){ | ||
| 97 | locale : 'zh-cn' | 97 | locale : 'zh-cn' |
| 98 | }); | 98 | }); |
| 99 | 99 | ||
| 100 | - $('#line').select2({ | ||
| 101 | - ajax: { | ||
| 102 | - url: '/realSchedule/findLine', | ||
| 103 | - type: 'post', | ||
| 104 | - dataType: 'json', | ||
| 105 | - delay: 150, | ||
| 106 | - data: function(params){ | ||
| 107 | - return{line: params.term}; | ||
| 108 | - }, | ||
| 109 | - processResults: function (data) { | ||
| 110 | - return { | ||
| 111 | - results: data | ||
| 112 | - }; | ||
| 113 | - }, | ||
| 114 | - cache: true | ||
| 115 | - }, | ||
| 116 | - templateResult: function(repo){ | ||
| 117 | - if (repo.loading) return repo.text; | ||
| 118 | - var h = '<span>'+repo.text+'</span>'; | ||
| 119 | - return h; | ||
| 120 | - }, | ||
| 121 | - escapeMarkup: function (markup) { return markup; }, | ||
| 122 | - minimumInputLength: 1, | ||
| 123 | - templateSelection: function(repo){ | ||
| 124 | - return repo.text; | ||
| 125 | - }, | ||
| 126 | - language: { | ||
| 127 | - noResults: function(){ | ||
| 128 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 129 | - }, | ||
| 130 | - inputTooShort : function(e) { | ||
| 131 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 132 | - }, | ||
| 133 | - searching : function() { | ||
| 134 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 135 | - } | ||
| 136 | - } | ||
| 137 | - }); | 100 | + |
| 101 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 102 | + var data=[]; | ||
| 103 | + | ||
| 104 | + for(var code in result){ | ||
| 105 | + data.push({id: code, text: result[code]}); | ||
| 106 | + } | ||
| 107 | + console.log(data); | ||
| 108 | + initPinYinSelect2('#line',data,''); | ||
| 109 | + | ||
| 110 | + }) | ||
| 138 | 111 | ||
| 139 | $("#query").on("click",function(){ | 112 | $("#query").on("click",function(){ |
| 140 | var line = $("#line").val(); | 113 | var line = $("#line").val(); |
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
| @@ -87,44 +87,17 @@ | @@ -87,44 +87,17 @@ | ||
| 87 | locale : 'zh-cn' | 87 | locale : 'zh-cn' |
| 88 | }); | 88 | }); |
| 89 | 89 | ||
| 90 | - $('#line').select2({ | ||
| 91 | - ajax: { | ||
| 92 | - url: '/realSchedule/findLine', | ||
| 93 | - type: 'post', | ||
| 94 | - dataType: 'json', | ||
| 95 | - delay: 150, | ||
| 96 | - data: function(params){ | ||
| 97 | - return{line: params.term}; | ||
| 98 | - }, | ||
| 99 | - processResults: function (data) { | ||
| 100 | - return { | ||
| 101 | - results: data | ||
| 102 | - }; | ||
| 103 | - }, | ||
| 104 | - cache: true | ||
| 105 | - }, | ||
| 106 | - templateResult: function(repo){ | ||
| 107 | - if (repo.loading) return repo.text; | ||
| 108 | - var h = '<span>'+repo.text+'</span>'; | ||
| 109 | - return h; | ||
| 110 | - }, | ||
| 111 | - escapeMarkup: function (markup) { return markup; }, | ||
| 112 | - minimumInputLength: 1, | ||
| 113 | - templateSelection: function(repo){ | ||
| 114 | - return repo.text; | ||
| 115 | - }, | ||
| 116 | - language: { | ||
| 117 | - noResults: function(){ | ||
| 118 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 119 | - }, | ||
| 120 | - inputTooShort : function(e) { | ||
| 121 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 122 | - }, | ||
| 123 | - searching : function() { | ||
| 124 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 125 | - } | ||
| 126 | - } | ||
| 127 | - }); | 90 | + |
| 91 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 92 | + var data=[]; | ||
| 93 | + | ||
| 94 | + for(var code in result){ | ||
| 95 | + data.push({id: code, text: result[code]}); | ||
| 96 | + } | ||
| 97 | + console.log(data); | ||
| 98 | + initPinYinSelect2('#line',data,''); | ||
| 99 | + | ||
| 100 | + }) | ||
| 128 | $('#lpName').select2({ | 101 | $('#lpName').select2({ |
| 129 | ajax: { | 102 | ajax: { |
| 130 | url: '/realSchedule/findLpName', | 103 | url: '/realSchedule/findLpName', |
src/main/resources/static/pages/forms/statement/singledata.html
| @@ -92,44 +92,18 @@ | @@ -92,44 +92,18 @@ | ||
| 92 | locale : 'zh-cn' | 92 | locale : 'zh-cn' |
| 93 | }); | 93 | }); |
| 94 | 94 | ||
| 95 | - $('#line').select2({ | ||
| 96 | - ajax: { | ||
| 97 | - url: '/realSchedule/findLine', | ||
| 98 | - type: 'post', | ||
| 99 | - dataType: 'json', | ||
| 100 | - delay: 150, | ||
| 101 | - data: function(params){ | ||
| 102 | - return{line: params.term}; | ||
| 103 | - }, | ||
| 104 | - processResults: function (data) { | ||
| 105 | - return { | ||
| 106 | - results: data | ||
| 107 | - }; | ||
| 108 | - }, | ||
| 109 | - cache: true | ||
| 110 | - }, | ||
| 111 | - templateResult: function(repo){ | ||
| 112 | - if (repo.loading) return repo.text; | ||
| 113 | - var h = '<span>'+repo.text+'</span>'; | ||
| 114 | - return h; | ||
| 115 | - }, | ||
| 116 | - escapeMarkup: function (markup) { return markup; }, | ||
| 117 | - minimumInputLength: 1, | ||
| 118 | - templateSelection: function(repo){ | ||
| 119 | - return repo.text; | ||
| 120 | - }, | ||
| 121 | - language: { | ||
| 122 | - noResults: function(){ | ||
| 123 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 124 | - }, | ||
| 125 | - inputTooShort : function(e) { | ||
| 126 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 127 | - }, | ||
| 128 | - searching : function() { | ||
| 129 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 130 | - } | ||
| 131 | - } | ||
| 132 | - }); | 95 | + |
| 96 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 97 | + var data=[]; | ||
| 98 | + | ||
| 99 | + for(var code in result){ | ||
| 100 | + data.push({id: code, text: result[code]}); | ||
| 101 | + } | ||
| 102 | + console.log(data); | ||
| 103 | + initPinYinSelect2('#line',data,''); | ||
| 104 | + | ||
| 105 | + }) | ||
| 106 | + | ||
| 133 | $('#lpName').select2({ | 107 | $('#lpName').select2({ |
| 134 | ajax: { | 108 | ajax: { |
| 135 | url: '/realSchedule/findLpName', | 109 | url: '/realSchedule/findLpName', |
src/main/resources/static/pages/forms/statement/statisticsDaily .html
| @@ -43,6 +43,7 @@ | @@ -43,6 +43,7 @@ | ||
| 43 | </div> | 43 | </div> |
| 44 | <div class="portlet-body"> | 44 | <div class="portlet-body"> |
| 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | ||
| 46 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 47 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | <thead> | 48 | <thead> |
| 48 | <tr> | 49 | <tr> |
| @@ -70,7 +71,7 @@ | @@ -70,7 +71,7 @@ | ||
| 70 | <td rowspan="2">原因</td> | 71 | <td rowspan="2">原因</td> |
| 71 | </tr> | 72 | </tr> |
| 72 | <tr> | 73 | <tr> |
| 73 | - <td>路阻</td> | 74 | + <td width="31px">路阻</td> |
| 74 | <td>吊慢</td> | 75 | <td>吊慢</td> |
| 75 | <td>故障</td> | 76 | <td>故障</td> |
| 76 | <td>纠纷</td> | 77 | <td>纠纷</td> |
| @@ -82,23 +83,23 @@ | @@ -82,23 +83,23 @@ | ||
| 82 | <td>援外</td> | 83 | <td>援外</td> |
| 83 | <td>其他</td> | 84 | <td>其他</td> |
| 84 | <td>全日</td> | 85 | <td>全日</td> |
| 85 | - <td>6:31~8:30</td> | ||
| 86 | - <td>16:01~18:00</td> | 86 | + <td>早高峰</td> |
| 87 | + <td>晚高峰</td> | ||
| 87 | <td>全日</td> | 88 | <td>全日</td> |
| 88 | - <td>6:31~8:30</td> | ||
| 89 | - <td>16:01~18:00</td> | 89 | + <td>早高峰</td> |
| 90 | + <td>晚高峰</td> | ||
| 90 | <td>全日</td> | 91 | <td>全日</td> |
| 91 | - <td>6:31~8:30</td> | ||
| 92 | - <td>16:01~18:00</td> | 92 | + <td>早高峰</td> |
| 93 | + <td>晚高峰</td> | ||
| 93 | <td>全日</td> | 94 | <td>全日</td> |
| 94 | - <td>6:31~8:30</td> | ||
| 95 | - <td>16:01~18:00</td> | 95 | + <td>早高峰</td> |
| 96 | + <td>晚高峰</td> | ||
| 96 | <td>全日</td> | 97 | <td>全日</td> |
| 97 | - <td>6:31~8:30</td> | ||
| 98 | - <td>16:01~18:00</td> | 98 | + <td>早高峰</td> |
| 99 | + <td>晚高峰</td> | ||
| 99 | <td>全日</td> | 100 | <td>全日</td> |
| 100 | - <td>6:31~8:30</td> | ||
| 101 | - <td>16:01~18:00</td> | 101 | + <td>早高峰</td> |
| 102 | + <td>晚高峰</td> | ||
| 102 | </tr> | 103 | </tr> |
| 103 | </thead> | 104 | </thead> |
| 104 | <tbody class="statisticsDaily"> | 105 | <tbody class="statisticsDaily"> |
| @@ -163,47 +164,21 @@ | @@ -163,47 +164,21 @@ | ||
| 163 | format : 'YYYY-MM-DD', | 164 | format : 'YYYY-MM-DD', |
| 164 | locale : 'zh-cn' | 165 | locale : 'zh-cn' |
| 165 | }); | 166 | }); |
| 167 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 168 | + var data=[]; | ||
| 169 | + | ||
| 170 | + for(var code in result){ | ||
| 171 | + data.push({id: code, text: result[code]}); | ||
| 172 | + } | ||
| 173 | + console.log(data); | ||
| 174 | + initPinYinSelect2('#line',data,''); | ||
| 175 | + | ||
| 176 | + }) | ||
| 166 | 177 | ||
| 167 | - $('#line').select2({ | ||
| 168 | - ajax: { | ||
| 169 | - url: '/realSchedule/findLine', | ||
| 170 | - dataType: 'json', | ||
| 171 | - delay: 150, | ||
| 172 | - data: function(params){ | ||
| 173 | - return{line: params.term}; | ||
| 174 | - }, | ||
| 175 | - processResults: function (data) { | ||
| 176 | - return { | ||
| 177 | - results: data | ||
| 178 | - }; | ||
| 179 | - }, | ||
| 180 | - cache: true | ||
| 181 | - }, | ||
| 182 | - templateResult: function(repo){ | ||
| 183 | - if (repo.loading) return repo.text; | ||
| 184 | - var h = '<span>'+repo.text+'</span>'; | ||
| 185 | - return h; | ||
| 186 | - }, | ||
| 187 | - escapeMarkup: function (markup) { return markup; }, | ||
| 188 | - minimumInputLength: 1, | ||
| 189 | - templateSelection: function(repo){ | ||
| 190 | - return repo.text; | ||
| 191 | - }, | ||
| 192 | - language: { | ||
| 193 | - noResults: function(){ | ||
| 194 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 195 | - }, | ||
| 196 | - inputTooShort : function(e) { | ||
| 197 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 198 | - }, | ||
| 199 | - searching : function() { | ||
| 200 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 201 | - } | ||
| 202 | - } | ||
| 203 | - }); | 178 | + |
| 204 | $("#query").on("click",function(){ | 179 | $("#query").on("click",function(){ |
| 205 | var line = $("#line").val(); | 180 | var line = $("#line").val(); |
| 206 | - var xlName = $("#line").text(); | 181 | + var xlName = $("#select2-line-container").html(); |
| 207 | var date = $("#date").val(); | 182 | var date = $("#date").val(); |
| 208 | $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName},function(result){ | 183 | $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName},function(result){ |
| 209 | // 把数据填充到模版中 | 184 | // 把数据填充到模版中 |
src/main/resources/static/pages/forms/statement/vehicleloading.html
| @@ -82,44 +82,19 @@ | @@ -82,44 +82,19 @@ | ||
| 82 | locale : 'zh-cn' | 82 | locale : 'zh-cn' |
| 83 | }); | 83 | }); |
| 84 | 84 | ||
| 85 | - $('#line').select2({ | ||
| 86 | - ajax: { | ||
| 87 | - url: '/realSchedule/findLine', | ||
| 88 | - type: 'post', | ||
| 89 | - dataType: 'json', | ||
| 90 | - delay: 150, | ||
| 91 | - data: function(params){ | ||
| 92 | - return{line: params.term}; | ||
| 93 | - }, | ||
| 94 | - processResults: function (data) { | ||
| 95 | - return { | ||
| 96 | - results: data | ||
| 97 | - }; | ||
| 98 | - }, | ||
| 99 | - cache: true | ||
| 100 | - }, | ||
| 101 | - templateResult: function(repo){ | ||
| 102 | - if (repo.loading) return repo.text; | ||
| 103 | - var h = '<span>'+repo.text+'</span>'; | ||
| 104 | - return h; | ||
| 105 | - }, | ||
| 106 | - escapeMarkup: function (markup) { return markup; }, | ||
| 107 | - minimumInputLength: 1, | ||
| 108 | - templateSelection: function(repo){ | ||
| 109 | - return repo.text; | ||
| 110 | - }, | ||
| 111 | - language: { | ||
| 112 | - noResults: function(){ | ||
| 113 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 114 | - }, | ||
| 115 | - inputTooShort : function(e) { | ||
| 116 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 117 | - }, | ||
| 118 | - searching : function() { | ||
| 119 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 120 | - } | ||
| 121 | - } | ||
| 122 | - }); | 85 | + |
| 86 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 87 | + var data=[]; | ||
| 88 | + | ||
| 89 | + for(var code in result){ | ||
| 90 | + data.push({id: code, text: result[code]}); | ||
| 91 | + } | ||
| 92 | + console.log(data); | ||
| 93 | + initPinYinSelect2('#line',data,''); | ||
| 94 | + | ||
| 95 | + }) | ||
| 96 | + | ||
| 97 | + | ||
| 123 | $('#lpName').select2({ | 98 | $('#lpName').select2({ |
| 124 | ajax: { | 99 | ajax: { |
| 125 | url: '/realSchedule/findLpName', | 100 | url: '/realSchedule/findLpName', |
src/main/resources/static/pages/forms/statement/waybill.html
| @@ -21,49 +21,49 @@ | @@ -21,49 +21,49 @@ | ||
| 21 | <h1>行车路单</h1> | 21 | <h1>行车路单</h1> |
| 22 | </div> | 22 | </div> |
| 23 | </div> | 23 | </div> |
| 24 | - | ||
| 25 | -<div class="row"> | ||
| 26 | - <div class="col-md-12"> | ||
| 27 | - <div class="portlet light porttlet-fit bordered"> | ||
| 28 | - <div class="portlet-title"> | ||
| 29 | - <form class="form-inline" action=""> | ||
| 30 | - <div style="display: inline-block;"> | 24 | + |
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | + <div style="display: inline-block;"> | ||
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 31 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 33 | - </div> | ||
| 34 | - <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | - <span class="item-label" style="width: 80px;">时间: </span> | ||
| 36 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 37 | - </div> | ||
| 38 | - <div class="form-group" style="display: inline-block;margin-left: 15px;"> | ||
| 39 | - <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 40 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 41 | - <input class="btn btn-default" type="button" id="print" value="打印"/> | ||
| 42 | - <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> | ||
| 43 | - </div> | ||
| 44 | - </form> | ||
| 45 | - </div> | ||
| 46 | - <div class="portlet-body"> | ||
| 47 | - <div class="row"> | ||
| 48 | - <div class="col-md-3"> | ||
| 49 | - <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> | ||
| 50 | - <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | ||
| 51 | - <thead> | ||
| 52 | - <tr class="hidden"> | ||
| 53 | - <th>人员</th> | ||
| 54 | - <th>自编号</th> | ||
| 55 | - <th>路牌</th> | ||
| 56 | - </tr> | ||
| 57 | - </thead> | ||
| 58 | - <tbody> | ||
| 59 | - | ||
| 60 | - </tbody> | ||
| 61 | - </table> | ||
| 62 | - </div> | ||
| 63 | - </div> | ||
| 64 | - <div class="col-md-9" id="printArea"> | ||
| 65 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 66 | - <table class="table table-bordered table-checkable" id="forms"> | 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | ||
| 36 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 37 | + </div> | ||
| 38 | + <div class="form-group" style="display: inline-block;margin-left: 15px;"> | ||
| 39 | + <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 40 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 41 | + <input class="btn btn-default" type="button" id="print" value="打印"/> | ||
| 42 | + <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> | ||
| 43 | + </div> | ||
| 44 | + </form> | ||
| 45 | + </div> | ||
| 46 | + <div class="portlet-body"> | ||
| 47 | + <div class="row"> | ||
| 48 | + <div class="col-md-3"> | ||
| 49 | + <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> | ||
| 50 | + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | ||
| 51 | + <thead> | ||
| 52 | + <tr class="hidden"> | ||
| 53 | + <th>人员</th> | ||
| 54 | + <th>自编号</th> | ||
| 55 | + <th>路牌</th> | ||
| 56 | + </tr> | ||
| 57 | + </thead> | ||
| 58 | + <tbody> | ||
| 59 | + | ||
| 60 | + </tbody> | ||
| 61 | + </table> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + <div class="col-md-9" id="printArea"> | ||
| 65 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 66 | + <table class="table table-bordered table-checkable" id="forms"> | ||
| 67 | <tbody class="ludan_1"> | 67 | <tbody class="ludan_1"> |
| 68 | 68 | ||
| 69 | </tbody> | 69 | </tbody> |
| @@ -75,28 +75,39 @@ | @@ -75,28 +75,39 @@ | ||
| 75 | </tbody> | 75 | </tbody> |
| 76 | <tbody class="ludan_4"> | 76 | <tbody class="ludan_4"> |
| 77 | 77 | ||
| 78 | - </tbody> | ||
| 79 | - </table> | ||
| 80 | - </div> | ||
| 81 | - </div> | ||
| 82 | - </div> | ||
| 83 | - </div> | ||
| 84 | - </div> | ||
| 85 | - </div> | ||
| 86 | -</div> | ||
| 87 | - | ||
| 88 | -<script> | ||
| 89 | - $(function(){ | ||
| 90 | - // 关闭左侧栏 | ||
| 91 | - if (!$('body').hasClass('page-sidebar-closed')) | 78 | + </tbody> |
| 79 | + </table> | ||
| 80 | + </div> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + </div> | ||
| 84 | + </div> | ||
| 85 | + </div> | ||
| 86 | +</div> | ||
| 87 | + | ||
| 88 | +<script> | ||
| 89 | + $(function(){ | ||
| 90 | + // 关闭左侧栏 | ||
| 91 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 92 | $('.menu-toggler.sidebar-toggler').click(); | 92 | $('.menu-toggler.sidebar-toggler').click(); |
| 93 | - | ||
| 94 | - $("#date").datetimepicker({ | ||
| 95 | - format : 'YYYY-MM-DD', | ||
| 96 | - locale : 'zh-cn' | 93 | + |
| 94 | + $("#date").datetimepicker({ | ||
| 95 | + format : 'YYYY-MM-DD', | ||
| 96 | + locale : 'zh-cn' | ||
| 97 | }); | 97 | }); |
| 98 | 98 | ||
| 99 | - $('#line').select2({ | 99 | + $.get('/basic/lineCode2Name',function(result){ |
| 100 | + var data=[]; | ||
| 101 | + | ||
| 102 | + for(var code in result){ | ||
| 103 | + data.push({id: code, text: result[code]}); | ||
| 104 | + } | ||
| 105 | + console.log(data); | ||
| 106 | + initPinYinSelect2('#line',data,''); | ||
| 107 | + | ||
| 108 | + }) | ||
| 109 | + | ||
| 110 | + /* $('#line').select2({ | ||
| 100 | ajax: { | 111 | ajax: { |
| 101 | url: '/realSchedule/findLine', | 112 | url: '/realSchedule/findLine', |
| 102 | type: 'post', | 113 | type: 'post', |
| @@ -134,29 +145,30 @@ | @@ -134,29 +145,30 @@ | ||
| 134 | } | 145 | } |
| 135 | } | 146 | } |
| 136 | }); | 147 | }); |
| 148 | + */ | ||
| 137 | 149 | ||
| 138 | - var date = ''; | ||
| 139 | - $("#query").on("click",function(){ | ||
| 140 | - var line = $("#line").val(); | 150 | + var date = ''; |
| 151 | + $("#query").on("click",function(){ | ||
| 152 | + var line = $("#line").val(); | ||
| 141 | date = $("#date").val(); | 153 | date = $("#date").val(); |
| 142 | - $(".hidden").removeClass("hidden"); | ||
| 143 | - $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | ||
| 144 | - // 把数据填充到模版中 | ||
| 145 | - var tbodyHtml = template('list_info',{list:result}); | ||
| 146 | - // 把渲染好的模版html文本追加到表格中 | ||
| 147 | - $('#info tbody').html(tbodyHtml); | ||
| 148 | - }); | 154 | + $(".hidden").removeClass("hidden"); |
| 155 | + $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | ||
| 156 | + // 把数据填充到模版中 | ||
| 157 | + var tbodyHtml = template('list_info',{list:result}); | ||
| 158 | + // 把渲染好的模版html文本追加到表格中 | ||
| 159 | + $('#info tbody').html(tbodyHtml); | ||
| 160 | + }); | ||
| 149 | }); | 161 | }); |
| 150 | 162 | ||
| 151 | var params = new Array(); | 163 | var params = new Array(); |
| 152 | - var jName = ''; | 164 | + var jName = ''; |
| 153 | $("#info tbody").on("click","tr",function(){ | 165 | $("#info tbody").on("click","tr",function(){ |
| 154 | if($(this).children().size() < 2){ | 166 | if($(this).children().size() < 2){ |
| 155 | return; | 167 | return; |
| 156 | - } | ||
| 157 | - | ||
| 158 | - $(this).children().each(function(index){ | ||
| 159 | - params[index] = $(this).text(); | 168 | + } |
| 169 | + | ||
| 170 | + $(this).children().each(function(index){ | ||
| 171 | + params[index] = $(this).text(); | ||
| 160 | }); | 172 | }); |
| 161 | console.log(params); | 173 | console.log(params); |
| 162 | jName = params[0].split("\\")[0]; | 174 | jName = params[0].split("\\")[0]; |
| @@ -169,18 +181,18 @@ | @@ -169,18 +181,18 @@ | ||
| 169 | // 把渲染好的模版html文本追加到表格中 | 181 | // 把渲染好的模版html文本追加到表格中 |
| 170 | $('#forms .ludan_1').html(ludan_1); | 182 | $('#forms .ludan_1').html(ludan_1); |
| 171 | //$('#forms .ludan_4').html(ludan_4); | 183 | //$('#forms .ludan_4').html(ludan_4); |
| 172 | - }); | 184 | + }); |
| 173 | $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | 185 | $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 174 | - getTime(result); | ||
| 175 | - var ludan_2 = template('ludan_2',{list:result}); | ||
| 176 | - // 把渲染好的模版html文本追加到表格中 | ||
| 177 | - $('#forms .ludan_2').html(ludan_2); | 186 | + getTime(result); |
| 187 | + var ludan_2 = template('ludan_2',{list:result}); | ||
| 188 | + // 把渲染好的模版html文本追加到表格中 | ||
| 189 | + $('#forms .ludan_2').html(ludan_2); | ||
| 178 | }); | 190 | }); |
| 179 | $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | 191 | $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 180 | var ludan_3 = template('ludan_3',result); | 192 | var ludan_3 = template('ludan_3',result); |
| 181 | $('#forms .ludan_3').html(ludan_3); | 193 | $('#forms .ludan_3').html(ludan_3); |
| 182 | }); | 194 | }); |
| 183 | - | 195 | + |
| 184 | }); | 196 | }); |
| 185 | 197 | ||
| 186 | $("#export").on("click",function(){ | 198 | $("#export").on("click",function(){ |
| @@ -216,22 +228,22 @@ | @@ -216,22 +228,22 @@ | ||
| 216 | } | 228 | } |
| 217 | } | 229 | } |
| 218 | }); | 230 | }); |
| 219 | - } | ||
| 220 | - }); | ||
| 221 | -</script> | ||
| 222 | -<script type="text/html" id="list_info"> | ||
| 223 | - {{each list as obj i}} | ||
| 224 | - <tr> | ||
| 225 | - <td width="45%">{{obj[4]}}\{{obj[1]}}</td> | ||
| 226 | - <td width="32%">{{obj[2]}}</td> | ||
| 227 | - <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td> | ||
| 228 | - </tr> | ||
| 229 | - {{/each}} | ||
| 230 | - {{if list.length == 0}} | ||
| 231 | - <tr> | ||
| 232 | - <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 233 | - </tr> | ||
| 234 | - {{/if}} | 231 | + } |
| 232 | + }); | ||
| 233 | +</script> | ||
| 234 | +<script type="text/html" id="list_info"> | ||
| 235 | + {{each list as obj i}} | ||
| 236 | + <tr> | ||
| 237 | + <td width="45%">{{obj[4]}}\{{obj[1]}}</td> | ||
| 238 | + <td width="32%">{{obj[2]}}</td> | ||
| 239 | + <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td> | ||
| 240 | + </tr> | ||
| 241 | + {{/each}} | ||
| 242 | + {{if list.length == 0}} | ||
| 243 | + <tr> | ||
| 244 | + <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 245 | + </tr> | ||
| 246 | + {{/if}} | ||
| 235 | </script> | 247 | </script> |
| 236 | <script type="text/html" id="ludan_1"> | 248 | <script type="text/html" id="ludan_1"> |
| 237 | <tr> | 249 | <tr> |
| @@ -292,31 +304,31 @@ | @@ -292,31 +304,31 @@ | ||
| 292 | <td colspan="1">快</td> | 304 | <td colspan="1">快</td> |
| 293 | <td colspan="1">慢</td> | 305 | <td colspan="1">慢</td> |
| 294 | </tr> | 306 | </tr> |
| 295 | -</script> | ||
| 296 | -<script type="text/html" id="ludan_2"> | ||
| 297 | - {{each list as obj i}} | ||
| 298 | - <tr> | ||
| 299 | - <td>{{i+1}}</td> | ||
| 300 | - <td>{{obj.jName}}</td> | ||
| 301 | - <td>{{obj.sName}}</td> | ||
| 302 | - <td> </td> | ||
| 303 | - <td>{{obj.qdzName}}</td> | ||
| 304 | - <td>{{obj.zdzName}}</td> | ||
| 305 | - <td>{{obj.fcsj}}</td> | ||
| 306 | - <td>{{obj.fcsjActual}}</td> | ||
| 307 | - <td>{{obj.zdsj}}</td> | ||
| 308 | - <td>{{obj.zdsjActual}}</td> | ||
| 309 | - <td>{{obj.fast}}</td> | ||
| 310 | - <td>{{obj.slow}}</td> | 307 | +</script> |
| 308 | +<script type="text/html" id="ludan_2"> | ||
| 309 | + {{each list as obj i}} | ||
| 310 | + <tr> | ||
| 311 | + <td>{{i+1}}</td> | ||
| 312 | + <td>{{obj.jName}}</td> | ||
| 313 | + <td>{{obj.sName}}</td> | ||
| 314 | + <td> </td> | ||
| 315 | + <td>{{obj.qdzName}}</td> | ||
| 316 | + <td>{{obj.zdzName}}</td> | ||
| 317 | + <td>{{obj.fcsj}}</td> | ||
| 318 | + <td>{{obj.fcsjActual}}</td> | ||
| 319 | + <td>{{obj.zdsj}}</td> | ||
| 320 | + <td>{{obj.zdsjActual}}</td> | ||
| 321 | + <td>{{obj.fast}}</td> | ||
| 322 | + <td>{{obj.slow}}</td> | ||
| 311 | <td>{{obj.jhlc}}</td> | 323 | <td>{{obj.jhlc}}</td> |
| 312 | - <td>{{obj.remarks}}</td> | ||
| 313 | - </tr> | 324 | + <td>{{obj.remarks}}</td> |
| 325 | + </tr> | ||
| 314 | {{/each}} | 326 | {{/each}} |
| 315 | {{if list.length == 0}} | 327 | {{if list.length == 0}} |
| 316 | <tr> | 328 | <tr> |
| 317 | <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> | 329 | <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> |
| 318 | </tr> | 330 | </tr> |
| 319 | - {{/if}} | 331 | + {{/if}} |
| 320 | </script> | 332 | </script> |
| 321 | <script type="text/html" id="ludan_3"> | 333 | <script type="text/html" id="ludan_3"> |
| 322 | <tr> | 334 | <tr> |
src/main/resources/static/pages/forms/statement/waybillday.html
| @@ -79,45 +79,16 @@ | @@ -79,45 +79,16 @@ | ||
| 79 | locale : 'zh-cn' | 79 | locale : 'zh-cn' |
| 80 | }); | 80 | }); |
| 81 | 81 | ||
| 82 | - $('#line').select2({ | ||
| 83 | - ajax: { | ||
| 84 | - url: '/realSchedule/findLine', | ||
| 85 | - type: 'post', | ||
| 86 | - dataType: 'json', | ||
| 87 | - delay: 150, | ||
| 88 | - data: function(params){ | ||
| 89 | - return{line: params.term}; | ||
| 90 | - }, | ||
| 91 | - processResults: function (data) { | ||
| 92 | - return { | ||
| 93 | - results: data | ||
| 94 | - }; | ||
| 95 | - }, | ||
| 96 | - cache: true | ||
| 97 | - }, | ||
| 98 | - templateResult: function(repo){ | ||
| 99 | - if (repo.loading) return repo.text; | ||
| 100 | - var h = '<span>'+repo.text+'</span>'; | ||
| 101 | - return h; | ||
| 102 | - }, | ||
| 103 | - escapeMarkup: function (markup) { return markup; }, | ||
| 104 | - minimumInputLength: 1, | ||
| 105 | - templateSelection: function(repo){ | ||
| 106 | - return repo.text; | ||
| 107 | - }, | ||
| 108 | - language: { | ||
| 109 | - noResults: function(){ | ||
| 110 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 111 | - }, | ||
| 112 | - inputTooShort : function(e) { | ||
| 113 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 114 | - }, | ||
| 115 | - searching : function() { | ||
| 116 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 117 | - } | ||
| 118 | - } | ||
| 119 | - }); | ||
| 120 | - | 82 | + $.get('/basic/lineCode2Name',function(result){ |
| 83 | + var data=[]; | ||
| 84 | + | ||
| 85 | + for(var code in result){ | ||
| 86 | + data.push({id: code, text: result[code]}); | ||
| 87 | + } | ||
| 88 | + console.log(data); | ||
| 89 | + initPinYinSelect2('#line',data,''); | ||
| 90 | + | ||
| 91 | + }) | ||
| 121 | var line; | 92 | var line; |
| 122 | var date; | 93 | var date; |
| 123 | $("#query").on("click",function(){ | 94 | $("#query").on("click",function(){ |
src/main/resources/static/pages/oil/list.html
| @@ -294,8 +294,7 @@ $(function(){ | @@ -294,8 +294,7 @@ $(function(){ | ||
| 294 | } | 294 | } |
| 295 | }); | 295 | }); |
| 296 | $get('/ylb/obtain', params, function(){ | 296 | $get('/ylb/obtain', params, function(){ |
| 297 | - console.log("----------------------"); | ||
| 298 | - jsDoQuery(null,true); | 297 | + jsDoQuery(params,true); |
| 299 | }); | 298 | }); |
| 300 | }else{ | 299 | }else{ |
| 301 | layer.msg('请选择日期.'); | 300 | layer.msg('请选择日期.'); |
src/main/resources/static/pages/permission/role/companyAuthority.html
0 → 100644
| 1 | +<style> | ||
| 2 | + .cmpy-auth-card { | ||
| 3 | + width: 760px; | ||
| 4 | + background: #fff; | ||
| 5 | + margin: auto; | ||
| 6 | + padding: 15px; | ||
| 7 | + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); | ||
| 8 | + } | ||
| 9 | + | ||
| 10 | + .cmpy-auth-card .yunyin-company-panel:last-child { | ||
| 11 | + border-bottom: none; | ||
| 12 | + padding-bottom: 0px; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + .yunyin-company-panel { | ||
| 16 | + border-bottom: 1px solid #e9e5e5; | ||
| 17 | + padding-bottom: 5px; | ||
| 18 | + | ||
| 19 | + user-select:none; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + .yunyin-company-panel .company { | ||
| 23 | + font-size: 13px; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + .yunyin-company-panel .sub-company { | ||
| 27 | + display: inline-block; | ||
| 28 | + text-align: center; | ||
| 29 | + padding: 5px 15px; | ||
| 30 | + border-radius: 5px !important; | ||
| 31 | + color: #5d5c5c; | ||
| 32 | + font-size: 13px; | ||
| 33 | + background: linear-gradient(to bottom, #fafafa, #eeeeee); | ||
| 34 | + cursor: pointer; | ||
| 35 | + border: 1px solid #eeeeee; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + .yunyin-company-panel .sub-company.active { | ||
| 39 | + background: linear-gradient(to bottom, #2ab4c0, #229ea9); | ||
| 40 | + color: #fdfdfd; | ||
| 41 | + } | ||
| 42 | +</style> | ||
| 43 | + | ||
| 44 | +<div id="roleCompanyAuthority"> | ||
| 45 | + | ||
| 46 | + <div class="page-head"> | ||
| 47 | + <div class="page-title"> | ||
| 48 | + <h1>模块配置</h1> | ||
| 49 | + </div> | ||
| 50 | + </div> | ||
| 51 | + | ||
| 52 | + <ul class="page-breadcrumb breadcrumb"> | ||
| 53 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i | ||
| 54 | + class="fa fa-circle"></i></li> | ||
| 55 | + <li><span class="active">权限管理</span> <i class="fa fa-circle"></i></li> | ||
| 56 | + <li><a href="list.html" data-pjax>角色管理</a> <i class="fa fa-circle"></i></li> | ||
| 57 | + <li><span class="active">分公司数据权限</span></li> | ||
| 58 | + </ul> | ||
| 59 | + | ||
| 60 | + <div class="cmpy-auth-card"> | ||
| 61 | + | ||
| 62 | + <h4>角色信息</h4> | ||
| 63 | + <table class="table"> | ||
| 64 | + <tr> | ||
| 65 | + <td> | ||
| 66 | + 代码:<span id="roleCode"></span> | ||
| 67 | + </td> | ||
| 68 | + <td> | ||
| 69 | + 名称:<span id="roleName"></span> | ||
| 70 | + </td> | ||
| 71 | + </tr> | ||
| 72 | + </table> | ||
| 73 | + </div> | ||
| 74 | + <br><br> | ||
| 75 | + <div class="cmpy-auth-card cmpy-list"> | ||
| 76 | + </div> | ||
| 77 | + | ||
| 78 | + <div class="cmpy-auth-card" style="text-align: right;"> | ||
| 79 | + <button type="button" class="btn btn-default">返回</button> | ||
| 80 | + <button type="button" class="btn btn-primary saveBtn" ><i class="fa fa-check"></i>保存</button> | ||
| 81 | + </div> | ||
| 82 | + | ||
| 83 | + <script id="role-company-authority-temp" type="text/html"> | ||
| 84 | + {{each list as obj i}} | ||
| 85 | + <div class="yunyin-company-panel"> | ||
| 86 | + <h5 class="company">{{obj.name}}</h5> | ||
| 87 | + {{each obj.childs as fgs i}} | ||
| 88 | + <div class="sub-company" data-company="{{obj.name}}" data-id="{{fgs.upCode}}_{{fgs.businessCode}}">{{fgs.businessName}}</div> | ||
| 89 | + {{/each}} | ||
| 90 | + </div> | ||
| 91 | + {{/each}} | ||
| 92 | + </script> | ||
| 93 | + | ||
| 94 | +</div> | ||
| 95 | + | ||
| 96 | +<script> | ||
| 97 | +$(function () { | ||
| 98 | + var id = $.url().param('no') | ||
| 99 | + ,roleObj; | ||
| 100 | + | ||
| 101 | + if(!id){ | ||
| 102 | + alert('缺少主键'); | ||
| 103 | + } | ||
| 104 | + else{ | ||
| 105 | + $.get('/role/'+id , function(obj){ | ||
| 106 | + $('#roleCompanyAuthority #roleCode').text(obj.codeName); | ||
| 107 | + $('#roleCompanyAuthority #roleName').text(obj.roleName); | ||
| 108 | + }); | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + $.get('/business/all', function (rs) { | ||
| 113 | + var baseCode; | ||
| 114 | + //找到跟节点 | ||
| 115 | + $.each(rs, function () { | ||
| 116 | + if(this.upCode == 0){ | ||
| 117 | + baseCode=this.businessCode; | ||
| 118 | + return false; | ||
| 119 | + } | ||
| 120 | + }); | ||
| 121 | + if(!baseCode){ | ||
| 122 | + alert('大爷找不到跟节点,数据有问题吧!!!'); | ||
| 123 | + return; | ||
| 124 | + } | ||
| 125 | + //提取二级节点 | ||
| 126 | + var secondMap={}; | ||
| 127 | + $.each(rs, function () { | ||
| 128 | + if(this.upCode==baseCode){ | ||
| 129 | + secondMap[this.businessCode] = { | ||
| 130 | + name: this.businessName, | ||
| 131 | + childs: [] | ||
| 132 | + }; | ||
| 133 | + } | ||
| 134 | + }); | ||
| 135 | + //分公司节点 | ||
| 136 | + $.each(rs, function () { | ||
| 137 | + if(secondMap[this.upCode]) | ||
| 138 | + secondMap[this.upCode].childs.push(this); | ||
| 139 | + }); | ||
| 140 | + | ||
| 141 | + //排序 | ||
| 142 | + for(var sid in secondMap){ | ||
| 143 | + secondMap[sid].childs.sort(naturalSort); | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + var htmlStr=template('role-company-authority-temp', {list: get_vals(secondMap)}); | ||
| 147 | + $('#roleCompanyAuthority .cmpy-list').html(htmlStr); | ||
| 148 | + | ||
| 149 | + //查询公司权限信息 | ||
| 150 | + $get('/companyAuthority/all', {roleId_eq: id}, function (rs) { | ||
| 151 | + //console.log(rs); | ||
| 152 | + var dataId; | ||
| 153 | + $.each(rs, function () { | ||
| 154 | + dataId=this.companyCode+'_'+this.subCompanyCode; | ||
| 155 | + $('.cmpy-list div.sub-company[data-id='+dataId+']').addClass('active'); | ||
| 156 | + }); | ||
| 157 | + }); | ||
| 158 | + }); | ||
| 159 | + | ||
| 160 | + $('#roleCompanyAuthority').on('click', '.cmpy-list .sub-company', function () { | ||
| 161 | + if($(this).hasClass('active')) | ||
| 162 | + $(this).removeClass('active'); | ||
| 163 | + else | ||
| 164 | + $(this).addClass('active'); | ||
| 165 | + }); | ||
| 166 | + | ||
| 167 | + var get_vals = function(json) { | ||
| 168 | + var array = []; | ||
| 169 | + for (var key in json) { | ||
| 170 | + array.push(json[key]); | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + return array; | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + var naturalSort=function (a, b) { | ||
| 177 | + return a.businessCode.localeCompare(b.businessCode); | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + //保存 | ||
| 181 | + $('#roleCompanyAuthority .saveBtn').on('click', function () { | ||
| 182 | + var ats=$('.cmpy-list div.sub-company.active', '#roleCompanyAuthority') | ||
| 183 | + ,data=[]; | ||
| 184 | + var code; | ||
| 185 | + $.each(ats, function () { | ||
| 186 | + code = $(this).data('id').split('_'); | ||
| 187 | + data.push({ | ||
| 188 | + companyCode: code[0], | ||
| 189 | + subCompanyCode: code[1], | ||
| 190 | + companyName: $(this).data('company'), | ||
| 191 | + subCompanyName: $(this).text() | ||
| 192 | + }); | ||
| 193 | + }); | ||
| 194 | + | ||
| 195 | + $post('/companyAuthority/save', {roleId: id, authJsonStr: JSON.stringify(data)}, function (rs) { | ||
| 196 | + alert('保存成功!'); | ||
| 197 | + }) | ||
| 198 | + }); | ||
| 199 | +}); | ||
| 200 | +</script> | ||
| 0 | \ No newline at end of file | 201 | \ No newline at end of file |
src/main/resources/static/pages/permission/role/list.html
| @@ -66,9 +66,15 @@ | @@ -66,9 +66,15 @@ | ||
| 66 | <a href="settings.html?no={{role.id}}" data-pjax class=" font-blue " | 66 | <a href="settings.html?no={{role.id}}" data-pjax class=" font-blue " |
| 67 | style="display: inline-block; margin-right: 5px;"> <i | 67 | style="display: inline-block; margin-right: 5px;"> <i |
| 68 | class="fa fa-meh-o"> </i> 模块配置 | 68 | class="fa fa-meh-o"> </i> 模块配置 |
| 69 | - </a> <a href="javascript:;" class=" font-blue " | ||
| 70 | - style="display: inline-block;" > <i class="fa fa-key"> | ||
| 71 | - </i> 分配资源 | 69 | + </a> |
| 70 | + <a href="javascript:;" class=" font-blue " | ||
| 71 | + style="display: inline-block;color: #aaaaaa !important;" > <i class="fa fa-key"> | ||
| 72 | + </i> 系统资源权限 | ||
| 73 | + </a> | ||
| 74 | + | ||
| 75 | + <hr> | ||
| 76 | + <a href="companyAuthority.html?no={{role.id}}" data-pjax class="font-blue" | ||
| 77 | + style="display: inline-block; font-size: 12px;" > 分公司数据权限 | ||
| 72 | </a> | 78 | </a> |
| 73 | </div> | 79 | </div> |
| 74 | </div> | 80 | </div> |
src/main/resources/static/pages/report/inoutstation.html
| @@ -169,44 +169,17 @@ | @@ -169,44 +169,17 @@ | ||
| 169 | locale : 'zh-cn' | 169 | locale : 'zh-cn' |
| 170 | }); | 170 | }); |
| 171 | 171 | ||
| 172 | - $('#line').select2({ | ||
| 173 | - ajax: { | ||
| 174 | - url: '/realSchedule/findLine', | ||
| 175 | - type: 'post', | ||
| 176 | - dataType: 'json', | ||
| 177 | - delay: 150, | ||
| 178 | - data: function(params){ | ||
| 179 | - return{line: params.term}; | ||
| 180 | - }, | ||
| 181 | - processResults: function (data) { | ||
| 182 | - return { | ||
| 183 | - results: data | ||
| 184 | - }; | ||
| 185 | - }, | ||
| 186 | - cache: true | ||
| 187 | - }, | ||
| 188 | - templateResult: function(repo){ | ||
| 189 | - if (repo.loading) return repo.text; | ||
| 190 | - var h = '<span>'+repo.text+'</span>'; | ||
| 191 | - return h; | ||
| 192 | - }, | ||
| 193 | - escapeMarkup: function (markup) { return markup; }, | ||
| 194 | - minimumInputLength: 1, | ||
| 195 | - templateSelection: function(repo){ | ||
| 196 | - return repo.text; | ||
| 197 | - }, | ||
| 198 | - language: { | ||
| 199 | - noResults: function(){ | ||
| 200 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 201 | - }, | ||
| 202 | - inputTooShort : function(e) { | ||
| 203 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 204 | - }, | ||
| 205 | - searching : function() { | ||
| 206 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 207 | - } | 172 | + |
| 173 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 174 | + var data=[]; | ||
| 175 | + | ||
| 176 | + for(var code in result){ | ||
| 177 | + data.push({id: code, text: result[code]}); | ||
| 208 | } | 178 | } |
| 209 | - }); | 179 | + console.log(data); |
| 180 | + initPinYinSelect2('#line',data,''); | ||
| 181 | + | ||
| 182 | + }) | ||
| 210 | 183 | ||
| 211 | 184 | ||
| 212 | $("#query").on("click",function(){ | 185 | $("#query").on("click",function(){ |
src/main/resources/static/pages/report/message/message.html
| @@ -112,44 +112,16 @@ | @@ -112,44 +112,16 @@ | ||
| 112 | $("#date").val(year + "-0" + month + "-" + day); | 112 | $("#date").val(year + "-0" + month + "-" + day); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | - $('#line').select2({ | ||
| 116 | - ajax: { | ||
| 117 | - url: '/realSchedule/findLine', | ||
| 118 | - type: 'post', | ||
| 119 | - dataType: 'json', | ||
| 120 | - delay: 150, | ||
| 121 | - data: function(params){ | ||
| 122 | - return{line: params.term}; | ||
| 123 | - }, | ||
| 124 | - processResults: function (data) { | ||
| 125 | - return { | ||
| 126 | - results: data | ||
| 127 | - }; | ||
| 128 | - }, | ||
| 129 | - cache: true | ||
| 130 | - }, | ||
| 131 | - templateResult: function(repo){ | ||
| 132 | - if (repo.loading) return repo.text; | ||
| 133 | - var h = '<span>'+repo.text+'</span>'; | ||
| 134 | - return h; | ||
| 135 | - }, | ||
| 136 | - escapeMarkup: function (markup) { return markup; }, | ||
| 137 | - minimumInputLength: 1, | ||
| 138 | - templateSelection: function(repo){ | ||
| 139 | - return repo.text; | ||
| 140 | - }, | ||
| 141 | - language: { | ||
| 142 | - noResults: function(){ | ||
| 143 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 144 | - }, | ||
| 145 | - inputTooShort : function(e) { | ||
| 146 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 147 | - }, | ||
| 148 | - searching : function() { | ||
| 149 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 150 | - } | 115 | + $.get('/basic/lineCode2Name',function(result){ |
| 116 | + var data=[]; | ||
| 117 | + | ||
| 118 | + for(var code in result){ | ||
| 119 | + data.push({id: code, text: result[code]}); | ||
| 151 | } | 120 | } |
| 152 | - }); | 121 | + console.log(data); |
| 122 | + initPinYinSelect2('#line',data,''); | ||
| 123 | + | ||
| 124 | + }) | ||
| 153 | $('#code').select2({ | 125 | $('#code').select2({ |
| 154 | ajax: { | 126 | ajax: { |
| 155 | url: '/realSchedule/sreachVehic', | 127 | url: '/realSchedule/sreachVehic', |
src/main/resources/static/pages/report/oil/oilListMonth.html
| @@ -103,44 +103,16 @@ | @@ -103,44 +103,16 @@ | ||
| 103 | $("#date").val(year + "-0" + month + "-" + day); | 103 | $("#date").val(year + "-0" + month + "-" + day); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | - $('#line').select2({ | ||
| 107 | - ajax: { | ||
| 108 | - url: '/realSchedule/findLine', | ||
| 109 | - dataType: 'json', | ||
| 110 | - delay: 150, | ||
| 111 | - data: function(params){ | ||
| 112 | - return{line: params.term}; | ||
| 113 | - }, | ||
| 114 | - processResults: function (data) { | ||
| 115 | - return { | ||
| 116 | - results: data | ||
| 117 | - }; | ||
| 118 | - }, | ||
| 119 | - cache: true | ||
| 120 | - }, | ||
| 121 | - templateResult: function(repo){ | ||
| 122 | - if (repo.loading) return repo.text; | ||
| 123 | - var h = '<span>'+repo.text+'</span>'; | ||
| 124 | - return h; | ||
| 125 | - }, | ||
| 126 | - escapeMarkup: function (markup) { return markup; }, | ||
| 127 | - minimumInputLength: 1, | ||
| 128 | - templateSelection: function(repo){ | ||
| 129 | - return repo.text; | ||
| 130 | - }, | ||
| 131 | - language: { | ||
| 132 | - noResults: function(){ | ||
| 133 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 134 | - }, | ||
| 135 | - inputTooShort : function(e) { | ||
| 136 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 137 | - }, | ||
| 138 | - searching : function() { | ||
| 139 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 140 | - } | ||
| 141 | - } | ||
| 142 | - }); | ||
| 143 | - | 106 | + $.get('/basic/lineCode2Name',function(result){ |
| 107 | + var data=[]; | ||
| 108 | + | ||
| 109 | + for(var code in result){ | ||
| 110 | + data.push({id: code, text: result[code]}); | ||
| 111 | + } | ||
| 112 | + console.log(data); | ||
| 113 | + initPinYinSelect2('#line',data,''); | ||
| 114 | + | ||
| 115 | + }) | ||
| 144 | //查询 | 116 | //查询 |
| 145 | $("#query").on('click',function(){ | 117 | $("#query").on('click',function(){ |
| 146 | var line = $("#line").val(); | 118 | var line = $("#line").val(); |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| @@ -96,6 +96,25 @@ angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', fu | @@ -96,6 +96,25 @@ angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', fu | ||
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | ), | 98 | ), |
| 99 | + import: $resource( | ||
| 100 | + '/cars/importfile', | ||
| 101 | + {}, | ||
| 102 | + { | ||
| 103 | + do: { | ||
| 104 | + method: 'POST', | ||
| 105 | + headers: { | ||
| 106 | + 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 107 | + }, | ||
| 108 | + transformRequest: function(obj) { | ||
| 109 | + var str = []; | ||
| 110 | + for (var p in obj) { | ||
| 111 | + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); | ||
| 112 | + } | ||
| 113 | + return str.join("&"); | ||
| 114 | + } | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + ), | ||
| 99 | validate: $resource( | 118 | validate: $resource( |
| 100 | '/cars/validate/:type', | 119 | '/cars/validate/:type', |
| 101 | {}, | 120 | {}, |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| @@ -75,6 +75,8 @@ | @@ -75,6 +75,8 @@ | ||
| 75 | <td> | 75 | <td> |
| 76 | <a ui-sref="ttInfoDetailManage_edit({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" | 76 | <a ui-sref="ttInfoDetailManage_edit({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" |
| 77 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> | 77 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> |
| 78 | + <a ng-click="ctrl.toTtInfoDetailAuto()" | ||
| 79 | + class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a> | ||
| 78 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" | 80 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" |
| 79 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> | 81 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> |
| 80 | <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a> | 82 | <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a> |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/main.js
| @@ -131,6 +131,12 @@ angular.module('ScheduleApp').controller( | @@ -131,6 +131,12 @@ angular.module('ScheduleApp').controller( | ||
| 131 | 131 | ||
| 132 | self.doPage(); | 132 | self.doPage(); |
| 133 | 133 | ||
| 134 | + // 自动生成时刻表 | ||
| 135 | + self.toTtInfoDetailAuto = function() { | ||
| 136 | + showPjax(); | ||
| 137 | + $.pjax({url: 'pages/base/timesmodel/index.html', container: pjaxContainer}); | ||
| 138 | + }; | ||
| 139 | + | ||
| 134 | // TODO: | 140 | // TODO: |
| 135 | } | 141 | } |
| 136 | ] | 142 | ] |
src/main/resources/static/real_control_v2/css/line_schedule.css
| @@ -101,11 +101,11 @@ | @@ -101,11 +101,11 @@ | ||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | .line-schedule-table dl dt:nth-of-type(5), .line-schedule-table dl dd:nth-of-type(5) { | 103 | .line-schedule-table dl dt:nth-of-type(5), .line-schedule-table dl dd:nth-of-type(5) { |
| 104 | - width: 11%; | 104 | + width: 10%; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | .line-schedule-table dl dt:nth-of-type(6), .line-schedule-table dl dd:nth-of-type(6) { | 107 | .line-schedule-table dl dt:nth-of-type(6), .line-schedule-table dl dd:nth-of-type(6) { |
| 108 | - width: calc(15% + 8px); | 108 | + width: calc(13% + 18px); |
| 109 | /*color: #676767;*/ | 109 | /*color: #676767;*/ |
| 110 | } | 110 | } |
| 111 | 111 | ||
| @@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | .line-schedule-table dl dt:nth-of-type(8), .line-schedule-table dl dd:nth-of-type(8) { | 116 | .line-schedule-table dl dt:nth-of-type(8), .line-schedule-table dl dd:nth-of-type(8) { |
| 117 | - width: calc(48% - 228px); | 117 | + width: calc(51% - 238px); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | .line-schedule-table dl dt:nth-of-type(9), .line-schedule-table dl dd:nth-of-type(9) { | 120 | .line-schedule-table dl dt:nth-of-type(9), .line-schedule-table dl dd:nth-of-type(9) { |
| @@ -253,7 +253,7 @@ span.fcsj-diff { | @@ -253,7 +253,7 @@ span.fcsj-diff { | ||
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | .tl-wd{ | 255 | .tl-wd{ |
| 256 | - background: #e2e2a0; | 256 | + background: #caca4f; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | .tl-xxsd{ | 259 | .tl-xxsd{ |
src/main/resources/static/real_control_v2/css/north.css
| 1 | .north { | 1 | .north { |
| 2 | - background: linear-gradient(to right ,#595959, #7b7b7b,#595959); | ||
| 3 | height: 120px; | 2 | height: 120px; |
| 4 | position: relative; | 3 | position: relative; |
| 5 | transition: all .3s ease; | 4 | transition: all .3s ease; |
| @@ -9,6 +8,10 @@ | @@ -9,6 +8,10 @@ | ||
| 9 | background: linear-gradient(to right, #082F4A, #125688, #0a3f64); | 8 | background: linear-gradient(to right, #082F4A, #125688, #0a3f64); |
| 10 | } | 9 | } |
| 11 | 10 | ||
| 11 | +.north.monitor{ | ||
| 12 | + background: linear-gradient(to right ,#595959, #7b7b7b,#595959); | ||
| 13 | +} | ||
| 14 | + | ||
| 12 | .north.scok-colse { | 15 | .north.scok-colse { |
| 13 | background: linear-gradient(to right, #924040, #ce6262, #924040) !important; | 16 | background: linear-gradient(to right, #924040, #ce6262, #924040) !important; |
| 14 | } | 17 | } |
src/main/resources/static/real_control_v2/js/common.js
| @@ -150,6 +150,7 @@ var gb_common = (function() { | @@ -150,6 +150,7 @@ var gb_common = (function() { | ||
| 150 | 'type': 'device', | 150 | 'type': 'device', |
| 151 | 'device': this.deviceId | 151 | 'device': this.deviceId |
| 152 | }, | 152 | }, |
| 153 | + 'data': {lineId: this.lineId, upDown: this.upDown}, | ||
| 153 | 'icon': 'uk-icon-bus' | 154 | 'icon': 'uk-icon-bus' |
| 154 | }); | 155 | }); |
| 155 | }); | 156 | }); |
| @@ -157,7 +158,7 @@ var gb_common = (function() { | @@ -157,7 +158,7 @@ var gb_common = (function() { | ||
| 157 | } | 158 | } |
| 158 | 159 | ||
| 159 | return treeData; | 160 | return treeData; |
| 160 | - } | 161 | + }; |
| 161 | 162 | ||
| 162 | var lineAutocomplete = function(element) { | 163 | var lineAutocomplete = function(element) { |
| 163 | //construction data | 164 | //construction data |
src/main/resources/static/real_control_v2/js/data/data_basic.js
| @@ -51,6 +51,8 @@ var gb_data_basic = (function () { | @@ -51,6 +51,8 @@ var gb_data_basic = (function () { | ||
| 51 | var data=[],name; | 51 | var data=[],name; |
| 52 | for(var jobCode in rs){ | 52 | for(var jobCode in rs){ |
| 53 | name=rs[jobCode]; | 53 | name=rs[jobCode]; |
| 54 | + /*if(jobCode.indexOf("-")!=-1) | ||
| 55 | + jobCode=jobCode.split('-')[1];*/ | ||
| 54 | data.push({ | 56 | data.push({ |
| 55 | value: jobCode+'/'+name, | 57 | value: jobCode+'/'+name, |
| 56 | fullChars: pinyin.getFullChars(name).toUpperCase(), | 58 | fullChars: pinyin.getFullChars(name).toUpperCase(), |
src/main/resources/static/real_control_v2/js/data/data_gps.js
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | var gb_data_gps = (function() { | 3 | var gb_data_gps = (function() { |
| 4 | 4 | ||
| 5 | //fixed time refresh delay | 5 | //fixed time refresh delay |
| 6 | - var delay = 1000 * 8; | 6 | + var delay = 1000 * 7; |
| 7 | //deviceId ——> gps | 7 | //deviceId ——> gps |
| 8 | var realData = {}; | 8 | var realData = {}; |
| 9 | //refresh after callback | 9 | //refresh after callback |
| @@ -38,7 +38,9 @@ var gb_data_gps = (function() { | @@ -38,7 +38,9 @@ var gb_data_gps = (function() { | ||
| 38 | upArr.push(this); | 38 | upArr.push(this); |
| 39 | } else | 39 | } else |
| 40 | addArr.push(this); | 40 | addArr.push(this); |
| 41 | - | 41 | + //起终点 拼接方向标识 |
| 42 | + if(this.sEPoint) | ||
| 43 | + this.stopNo=this.stopNo+'_'+this.upDown; | ||
| 42 | realData[this.deviceId] = this; | 44 | realData[this.deviceId] = this; |
| 43 | }); | 45 | }); |
| 44 | 46 |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| @@ -77,7 +77,7 @@ var gb_schedule_table = (function() { | @@ -77,7 +77,7 @@ var gb_schedule_table = (function() { | ||
| 77 | content: { | 77 | content: { |
| 78 | text: function(e) { | 78 | text: function(e) { |
| 79 | var lineCode=$(e.target).parents('li.line_schedule').data('id') | 79 | var lineCode=$(e.target).parents('li.line_schedule').data('id') |
| 80 | - ,id=$(e.target).parent().data('id') | 80 | + ,id=$(e.target).parents('dl').data('id') |
| 81 | ,sch=line2Schedule[lineCode][id]; | 81 | ,sch=line2Schedule[lineCode][id]; |
| 82 | return temps['sfsj_sch-detail-temp'](sch); | 82 | return temps['sfsj_sch-detail-temp'](sch); |
| 83 | } | 83 | } |
src/main/resources/static/real_control_v2/js/main.js
| @@ -58,7 +58,7 @@ var gb_main_ep = new EventProxy(), | @@ -58,7 +58,7 @@ var gb_main_ep = new EventProxy(), | ||
| 58 | }); | 58 | }); |
| 59 | 59 | ||
| 60 | //嵌入地图页面 | 60 | //嵌入地图页面 |
| 61 | - $('li.map-panel','#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); | 61 | + $('li.map-panel','#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); |
| 62 | }); | 62 | }); |
| 63 | 63 | ||
| 64 | function g_emit(id) { | 64 | function g_emit(id) { |
src/main/resources/static/real_control_v2/js/utils/svg_chart.js
| @@ -223,13 +223,11 @@ var gb_svg_chart = (function() { | @@ -223,13 +223,11 @@ var gb_svg_chart = (function() { | ||
| 223 | var svgs = $('.line-chart[data-code=' + lineCode + ']'), | 223 | var svgs = $('.line-chart[data-code=' + lineCode + ']'), |
| 224 | data = gb_data_gps.gpsByLineCode(lineCode); | 224 | data = gb_data_gps.gpsByLineCode(lineCode); |
| 225 | 225 | ||
| 226 | - var list=[]; | ||
| 227 | - //过滤数据,起终点站附加 方向标识 | 226 | + var list=[]; |
| 227 | + //过滤无站点字段的数据 | ||
| 228 | $.each(data, function(){ | 228 | $.each(data, function(){ |
| 229 | if(!this.stopNo || this.stopNo=='') | 229 | if(!this.stopNo || this.stopNo=='') |
| 230 | return true; | 230 | return true; |
| 231 | - if(this.sEPoint) | ||
| 232 | - this.stopNo=this.stopNo+'_'+this.upDown; | ||
| 233 | list.push(this); | 231 | list.push(this); |
| 234 | }); | 232 | }); |
| 235 | 233 | ||
| @@ -241,9 +239,7 @@ var gb_svg_chart = (function() { | @@ -241,9 +239,7 @@ var gb_svg_chart = (function() { | ||
| 241 | marker_clusterer(this, lineCode); | 239 | marker_clusterer(this, lineCode); |
| 242 | }); | 240 | }); |
| 243 | 241 | ||
| 244 | - | ||
| 245 | - //marker_clusterer(lineCode); | ||
| 246 | - } | 242 | + }; |
| 247 | 243 | ||
| 248 | var draw_gps = function(svg, data) { | 244 | var draw_gps = function(svg, data) { |
| 249 | //remove merge_hide class | 245 | //remove merge_hide class |
src/main/resources/static/real_control_v2/js/utils/svg_chart_tooltip.js
| 1 | /* 线路模拟图 tooltip */ | 1 | /* 线路模拟图 tooltip */ |
| 2 | 2 | ||
| 3 | -var gb_svg_tooltip = (function() { | 3 | +var gb_svg_tooltip = (function () { |
| 4 | 4 | ||
| 5 | var temps; | 5 | var temps; |
| 6 | - $.get('/real_control_v2/fragments/home/tooltip.html', function(dom) { | 6 | + $.get('/real_control_v2/fragments/home/tooltip.html', function (dom) { |
| 7 | temps = gb_common.compileTempByDom(dom); | 7 | temps = gb_common.compileTempByDom(dom); |
| 8 | }); | 8 | }); |
| 9 | 9 | ||
| 10 | // normal gps tooltip | 10 | // normal gps tooltip |
| 11 | - $(document).on('mouseenter', 'svg .gps-wrap rect', function() { | 11 | + $(document).on('mouseenter', 'svg .gps-wrap rect', function () { |
| 12 | var rect = $(this); | 12 | var rect = $(this); |
| 13 | - if(rect.attr('aria-describedby')) | ||
| 14 | - return; | 13 | + if (rect.attr('aria-describedby')) |
| 14 | + return; | ||
| 15 | var gps = gb_data_gps.findOne($(this).attr('_id').split('_')[1]); | 15 | var gps = gb_data_gps.findOne($(this).attr('_id').split('_')[1]); |
| 16 | $(this).qtip({ | 16 | $(this).qtip({ |
| 17 | show: { | 17 | show: { |
| @@ -19,7 +19,7 @@ var gb_svg_tooltip = (function() { | @@ -19,7 +19,7 @@ var gb_svg_tooltip = (function() { | ||
| 19 | delay: 300 | 19 | delay: 300 |
| 20 | }, | 20 | }, |
| 21 | content: { | 21 | content: { |
| 22 | - text: function() { | 22 | + text: function () { |
| 23 | return temps['tooltip_gps_temp'](gps); | 23 | return temps['tooltip_gps_temp'](gps); |
| 24 | } | 24 | } |
| 25 | }, | 25 | }, |
| @@ -35,13 +35,13 @@ var gb_svg_tooltip = (function() { | @@ -35,13 +35,13 @@ var gb_svg_tooltip = (function() { | ||
| 35 | delay: 300 | 35 | delay: 300 |
| 36 | }, | 36 | }, |
| 37 | events: { | 37 | events: { |
| 38 | - hidden: function(event, api) { | 38 | + hidden: function (event, api) { |
| 39 | rect.dblclick(null); | 39 | rect.dblclick(null); |
| 40 | rect.removeAttr('fiexd-tip'); | 40 | rect.removeAttr('fiexd-tip'); |
| 41 | //destroy dom | 41 | //destroy dom |
| 42 | $(this).qtip('destroy', true); | 42 | $(this).qtip('destroy', true); |
| 43 | }, | 43 | }, |
| 44 | - visible: function() { | 44 | + visible: function () { |
| 45 | show_baidu_map($('.tip_map_wrap', this)[0], gps); | 45 | show_baidu_map($('.tip_map_wrap', this)[0], gps); |
| 46 | rect.dblclick(fiexdTip); | 46 | rect.dblclick(fiexdTip); |
| 47 | } | 47 | } |
| @@ -50,24 +50,24 @@ var gb_svg_tooltip = (function() { | @@ -50,24 +50,24 @@ var gb_svg_tooltip = (function() { | ||
| 50 | }); | 50 | }); |
| 51 | 51 | ||
| 52 | //multiple gps tooltip | 52 | //multiple gps tooltip |
| 53 | - $(document).on('mouseenter', 'svg .merge-item rect', function() { | 53 | + $(document).on('mouseenter', 'svg .merge-item rect', function () { |
| 54 | var rect = $(this); | 54 | var rect = $(this); |
| 55 | - if(rect.attr('aria-describedby')) | ||
| 56 | - return; | ||
| 57 | - // var gps = gb_data_gps.findOne($(this).attr('_id').split('_')[1]); | 55 | + if (rect.attr('aria-describedby')) |
| 56 | + return; | ||
| 57 | + // var gps = gb_data_gps.findOne($(this).attr('_id').split('_')[1]); | ||
| 58 | //获取聚合的gps | 58 | //获取聚合的gps |
| 59 | - var lineCode=$(this).parents('svg').data('code') | ||
| 60 | - ,stop=$(this).parent().attr('_id').substr(7)//merger_ | ||
| 61 | - ,gpsArray=searchByStop(gb_data_gps.gpsByLineCode(lineCode), stop); | 59 | + var lineCode = $(this).parents('svg').data('code') |
| 60 | + , stop = $(this).parent().attr('_id').substr(7)//merger_ | ||
| 61 | + , gpsArray = searchByStop(gb_data_gps.gpsByLineCode(lineCode), stop); | ||
| 62 | 62 | ||
| 63 | - console.log('stop...',stop); | 63 | + // console.log('stop...',stop); |
| 64 | $(this).qtip({ | 64 | $(this).qtip({ |
| 65 | show: { | 65 | show: { |
| 66 | ready: true, | 66 | ready: true, |
| 67 | delay: 300 | 67 | delay: 300 |
| 68 | }, | 68 | }, |
| 69 | content: { | 69 | content: { |
| 70 | - text: function() { | 70 | + text: function () { |
| 71 | return temps['tooltip_multi_gps_temp']({list: gpsArray}); | 71 | return temps['tooltip_multi_gps_temp']({list: gpsArray}); |
| 72 | } | 72 | } |
| 73 | }, | 73 | }, |
| @@ -83,12 +83,12 @@ var gb_svg_tooltip = (function() { | @@ -83,12 +83,12 @@ var gb_svg_tooltip = (function() { | ||
| 83 | delay: 300 | 83 | delay: 300 |
| 84 | }, | 84 | }, |
| 85 | events: { | 85 | events: { |
| 86 | - hidden: function(event, api) { | 86 | + hidden: function (event, api) { |
| 87 | //rect.dblclick(null); | 87 | //rect.dblclick(null); |
| 88 | //destroy dom | 88 | //destroy dom |
| 89 | $(this).qtip('destroy', true); | 89 | $(this).qtip('destroy', true); |
| 90 | }, | 90 | }, |
| 91 | - visible: function() { | 91 | + visible: function () { |
| 92 | show_baidu_map($('.tip_map_wrap', this)[0], gpsArray); | 92 | show_baidu_map($('.tip_map_wrap', this)[0], gpsArray); |
| 93 | //rect.dblclick(fiexdTip); | 93 | //rect.dblclick(fiexdTip); |
| 94 | } | 94 | } |
| @@ -97,7 +97,7 @@ var gb_svg_tooltip = (function() { | @@ -97,7 +97,7 @@ var gb_svg_tooltip = (function() { | ||
| 97 | }); | 97 | }); |
| 98 | 98 | ||
| 99 | //dblclick | 99 | //dblclick |
| 100 | - var fiexdTip = function() { | 100 | + var fiexdTip = function () { |
| 101 | var tipId = $(this).attr('aria-describedby'); | 101 | var tipId = $(this).attr('aria-describedby'); |
| 102 | if (tipId) { | 102 | if (tipId) { |
| 103 | var api = $('#' + tipId).qtip('api'); | 103 | var api = $('#' + tipId).qtip('api'); |
| @@ -114,59 +114,59 @@ var gb_svg_tooltip = (function() { | @@ -114,59 +114,59 @@ var gb_svg_tooltip = (function() { | ||
| 114 | 114 | ||
| 115 | var carIcon = '/assets/img/bus1.png'; | 115 | var carIcon = '/assets/img/bus1.png'; |
| 116 | //,normalIcon = '/assets/img/Marker_32px_583000_easyicon.net.png'; | 116 | //,normalIcon = '/assets/img/Marker_32px_583000_easyicon.net.png'; |
| 117 | - var show_baidu_map = function(elem, list) { | ||
| 118 | - if(!window.BMap) | 117 | + var show_baidu_map = function (elem, list) { |
| 118 | + if (!window.BMap) | ||
| 119 | return; | 119 | return; |
| 120 | 120 | ||
| 121 | - if(!isArray(list)) | ||
| 122 | - list=[list]; | 121 | + if (!isArray(list)) |
| 122 | + list = [list]; | ||
| 123 | //init map | 123 | //init map |
| 124 | var map = new BMap.Map(elem); | 124 | var map = new BMap.Map(elem); |
| 125 | map.setMapStyle({ | 125 | map.setMapStyle({ |
| 126 | - style: 'googlelite' | 126 | + style: 'googlelite' |
| 127 | }); | 127 | }); |
| 128 | map.enableScrollWheelZoom(true); | 128 | map.enableScrollWheelZoom(true); |
| 129 | //gps marker | 129 | //gps marker |
| 130 | - var coord,point; | ||
| 131 | - $.each(list, function(i){ | ||
| 132 | - coord = TransGPS.wgsToBD(this.lat, this.lon); | ||
| 133 | - point = new BMap.Point(coord.lng, coord.lat); | ||
| 134 | - | ||
| 135 | - var marker = new BMap.Marker(point), | ||
| 136 | - icon = new BMap.Icon(carIcon, new BMap.Size(25, 25)); | ||
| 137 | - marker.setIcon(icon); | ||
| 138 | - marker.setRotation(this.direction); | ||
| 139 | - marker.setTop(true); | ||
| 140 | - map.addOverlay(marker); | ||
| 141 | - | ||
| 142 | - if(i>=list.length-1) | ||
| 143 | - map.centerAndZoom(point, 15); | 130 | + var coord, point; |
| 131 | + $.each(list, function (i) { | ||
| 132 | + coord = TransGPS.wgsToBD(this.lat, this.lon); | ||
| 133 | + point = new BMap.Point(coord.lng, coord.lat); | ||
| 134 | + | ||
| 135 | + var marker = new BMap.Marker(point), | ||
| 136 | + icon = new BMap.Icon(carIcon, new BMap.Size(25, 25)); | ||
| 137 | + marker.setIcon(icon); | ||
| 138 | + marker.setRotation(this.direction); | ||
| 139 | + marker.setTop(true); | ||
| 140 | + map.addOverlay(marker); | ||
| 141 | + | ||
| 142 | + if (i >= list.length - 1) | ||
| 143 | + map.centerAndZoom(point, 15); | ||
| 144 | }); | 144 | }); |
| 145 | //draw line routes | 145 | //draw line routes |
| 146 | gb_svg_map_util.drawLine(map, list[0]); | 146 | gb_svg_map_util.drawLine(map, list[0]); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | - function searchByStop(list, stop){ | ||
| 150 | - var rs = []; | ||
| 151 | - $.each(list, function(){ | ||
| 152 | - if(this.stopNo==stop) | ||
| 153 | - rs.push(this); | ||
| 154 | - }); | ||
| 155 | - return rs; | 149 | + function searchByStop(list, stop) { |
| 150 | + var rs = []; | ||
| 151 | + $.each(list, function () { | ||
| 152 | + if (this.stopNo == stop) | ||
| 153 | + rs.push(this); | ||
| 154 | + }); | ||
| 155 | + return rs; | ||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | - function updateFixedTip(es){ | ||
| 159 | - $.each(es, function(){ | ||
| 160 | - if(!$(this).attr('fiexd-tip')) | ||
| 161 | - return true; | 158 | + function updateFixedTip(es) { |
| 159 | + $.each(es, function () { | ||
| 160 | + if (!$(this).attr('fiexd-tip')) | ||
| 161 | + return true; | ||
| 162 | 162 | ||
| 163 | - var qtip=$('#'+$(this).attr('aria-describedby')); | 163 | + var qtip = $('#' + $(this).attr('aria-describedby')); |
| 164 | 164 | ||
| 165 | 165 | ||
| 166 | - }); | 166 | + }); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | return { | 169 | return { |
| 170 | - update: updateFixedTip | 170 | + update: updateFixedTip |
| 171 | }; | 171 | }; |
| 172 | })(); | 172 | })(); |
src/main/resources/static/real_control_v2/main.html
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | <div class="uk-width-4-10"> | 39 | <div class="uk-width-4-10"> |
| 40 | <div class="uk-panel"> | 40 | <div class="uk-panel"> |
| 41 | <h2 class="north-logo"> | 41 | <h2 class="north-logo"> |
| 42 | - <i class="uk-icon-life-ring"></i> 闵行公交线路调度 | 42 | + <i class="uk-icon-life-ring"></i> 青浦公交线路调度 |
| 43 | </h2> | 43 | </h2> |
| 44 | </div> | 44 | </div> |
| 45 | </div> | 45 | </div> |
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | background: red; | 9 | background: red; |
| 10 | color: white; | 10 | color: white; |
| 11 | padding: 7px; | 11 | padding: 7px; |
| 12 | - left: calc(50% - 150px); | 12 | + left: calc(50% - 250px); |
| 13 | border-radius: 5px; | 13 | border-radius: 5px; |
| 14 | font-size: 20px; | 14 | font-size: 20px; |
| 15 | cursor: pointer; | 15 | cursor: pointer; |
| @@ -111,7 +111,8 @@ | @@ -111,7 +111,8 @@ | ||
| 111 | height: calc(100% - 7px); | 111 | height: calc(100% - 7px); |
| 112 | overflow: auto; | 112 | overflow: auto; |
| 113 | padding-top: 7px; | 113 | padding-top: 7px; |
| 114 | - font-size: 13px | 114 | + font-size: 13px; |
| 115 | + position: relative; | ||
| 115 | } | 116 | } |
| 116 | 117 | ||
| 117 | .real_br_cont .uk-form .uk-form-row{ | 118 | .real_br_cont .uk-form .uk-form-row{ |
| @@ -163,4 +164,166 @@ | @@ -163,4 +164,166 @@ | ||
| 163 | background-color: #fff; | 164 | background-color: #fff; |
| 164 | border-radius: 4px; | 165 | border-radius: 4px; |
| 165 | box-shadow: 0 2px 5px rgba(0,0,0,0.1); | 166 | box-shadow: 0 2px 5px rgba(0,0,0,0.1); |
| 167 | +} | ||
| 168 | + | ||
| 169 | +.gps_info_win p{ | ||
| 170 | + margin: 9px 0; | ||
| 171 | + font-size: 13px; | ||
| 172 | +} | ||
| 173 | + | ||
| 174 | +.gps_info_win h4,.gps_info_win h5{ | ||
| 175 | + color: #0E6AF9; | ||
| 176 | + margin: 10px 0; | ||
| 177 | +} | ||
| 178 | + | ||
| 179 | +.gps_info_win .date-str{ | ||
| 180 | + color: gray;font-size: 12px; | ||
| 181 | +} | ||
| 182 | + | ||
| 183 | +.gps_info_win a{ | ||
| 184 | + color:#878887;font-size:12px; | ||
| 185 | +} | ||
| 186 | + | ||
| 187 | + | ||
| 188 | +.spinner { | ||
| 189 | + margin: 50px auto; | ||
| 190 | + width: 50px; | ||
| 191 | + height: 40px; | ||
| 192 | + text-align: center; | ||
| 193 | + font-size: 10px; | ||
| 194 | +} | ||
| 195 | + | ||
| 196 | +.spinner > div { | ||
| 197 | + background-color: #69D7E1; | ||
| 198 | + height: 100%; | ||
| 199 | + width: 6px; | ||
| 200 | + display: inline-block; | ||
| 201 | + | ||
| 202 | + -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out; | ||
| 203 | + animation: sk-stretchdelay 1.2s infinite ease-in-out; | ||
| 204 | +} | ||
| 205 | + | ||
| 206 | +.spinner .rect2 { | ||
| 207 | + -webkit-animation-delay: -1.1s; | ||
| 208 | + animation-delay: -1.1s; | ||
| 209 | +} | ||
| 210 | + | ||
| 211 | +.spinner .rect3 { | ||
| 212 | + -webkit-animation-delay: -1.0s; | ||
| 213 | + animation-delay: -1.0s; | ||
| 214 | +} | ||
| 215 | + | ||
| 216 | +.spinner .rect4 { | ||
| 217 | + -webkit-animation-delay: -0.9s; | ||
| 218 | + animation-delay: -0.9s; | ||
| 219 | +} | ||
| 220 | + | ||
| 221 | +.spinner .rect5 { | ||
| 222 | + -webkit-animation-delay: -0.8s; | ||
| 223 | + animation-delay: -0.8s; | ||
| 224 | +} | ||
| 225 | + | ||
| 226 | +@-webkit-keyframes sk-stretchdelay { | ||
| 227 | + 0%, 40%, 100% { -webkit-transform: scaleY(0.4) } | ||
| 228 | + 20% { -webkit-transform: scaleY(1.0) } | ||
| 229 | +} | ||
| 230 | + | ||
| 231 | +@keyframes sk-stretchdelay { | ||
| 232 | + 0%, 40%, 100% { | ||
| 233 | + transform: scaleY(0.4); | ||
| 234 | + -webkit-transform: scaleY(0.4); | ||
| 235 | + } 20% { | ||
| 236 | + transform: scaleY(1.0); | ||
| 237 | + -webkit-transform: scaleY(1.0); | ||
| 238 | + } | ||
| 239 | +} | ||
| 240 | + | ||
| 241 | +.sk-cube-grid { | ||
| 242 | + width: 40px; | ||
| 243 | + height: 40px; | ||
| 244 | + margin: 100px auto; | ||
| 245 | +} | ||
| 246 | + | ||
| 247 | +.sk-cube-grid .sk-cube { | ||
| 248 | + width: 33%; | ||
| 249 | + height: 33%; | ||
| 250 | + background-color: #69D7E1; | ||
| 251 | + float: left; | ||
| 252 | + -webkit-animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out; | ||
| 253 | + animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out; | ||
| 254 | +} | ||
| 255 | +.sk-cube-grid .sk-cube1 { | ||
| 256 | + -webkit-animation-delay: 0.2s; | ||
| 257 | + animation-delay: 0.2s; } | ||
| 258 | +.sk-cube-grid .sk-cube2 { | ||
| 259 | + -webkit-animation-delay: 0.3s; | ||
| 260 | + animation-delay: 0.3s; } | ||
| 261 | +.sk-cube-grid .sk-cube3 { | ||
| 262 | + -webkit-animation-delay: 0.4s; | ||
| 263 | + animation-delay: 0.4s; } | ||
| 264 | +.sk-cube-grid .sk-cube4 { | ||
| 265 | + -webkit-animation-delay: 0.1s; | ||
| 266 | + animation-delay: 0.1s; } | ||
| 267 | +.sk-cube-grid .sk-cube5 { | ||
| 268 | + -webkit-animation-delay: 0.2s; | ||
| 269 | + animation-delay: 0.2s; } | ||
| 270 | +.sk-cube-grid .sk-cube6 { | ||
| 271 | + -webkit-animation-delay: 0.3s; | ||
| 272 | + animation-delay: 0.3s; } | ||
| 273 | +.sk-cube-grid .sk-cube7 { | ||
| 274 | + -webkit-animation-delay: 0s; | ||
| 275 | + animation-delay: 0s; } | ||
| 276 | +.sk-cube-grid .sk-cube8 { | ||
| 277 | + -webkit-animation-delay: 0.1s; | ||
| 278 | + animation-delay: 0.1s; } | ||
| 279 | +.sk-cube-grid .sk-cube9 { | ||
| 280 | + -webkit-animation-delay: 0.2s; | ||
| 281 | + animation-delay: 0.2s; } | ||
| 282 | + | ||
| 283 | +@-webkit-keyframes sk-cubeGridScaleDelay { | ||
| 284 | + 0%, 70%, 100% { | ||
| 285 | + -webkit-transform: scale3D(1, 1, 1); | ||
| 286 | + transform: scale3D(1, 1, 1); | ||
| 287 | + } 35% { | ||
| 288 | + -webkit-transform: scale3D(0, 0, 1); | ||
| 289 | + transform: scale3D(0, 0, 1); | ||
| 290 | + } | ||
| 291 | +} | ||
| 292 | + | ||
| 293 | +@keyframes sk-cubeGridScaleDelay { | ||
| 294 | + 0%, 70%, 100% { | ||
| 295 | + -webkit-transform: scale3D(1, 1, 1); | ||
| 296 | + transform: scale3D(1, 1, 1); | ||
| 297 | + } 35% { | ||
| 298 | + -webkit-transform: scale3D(0, 0, 1); | ||
| 299 | + transform: scale3D(0, 0, 1); | ||
| 300 | + } | ||
| 301 | +} | ||
| 302 | +.sk-cube-grid._center{ | ||
| 303 | + position: absolute; | ||
| 304 | + top: 30%; | ||
| 305 | + left: 50%; | ||
| 306 | + transform: translate(-50%, -50%); | ||
| 307 | + -webkit-transform: translate(-50%, -50%); | ||
| 308 | +} | ||
| 309 | + | ||
| 310 | +#tcWrap.maplibTc{ | ||
| 311 | + display: none; | ||
| 312 | +} | ||
| 313 | + | ||
| 314 | +.real_spatial_panel{ | ||
| 315 | + position: absolute; | ||
| 316 | + width: 300px; | ||
| 317 | + height: 500px; | ||
| 318 | + top: 5px; | ||
| 319 | + left: 5px; | ||
| 320 | + background: rgba(255, 255, 255, 0.98); | ||
| 321 | + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); | ||
| 322 | + display: none; | ||
| 323 | +} | ||
| 324 | + | ||
| 325 | +.station-route-tree{ | ||
| 326 | + width: 100%; | ||
| 327 | + height: 100%; | ||
| 328 | + overflow: auto; | ||
| 166 | } | 329 | } |
| 167 | \ No newline at end of file | 330 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_config.html
0 → 100644
| 1 | +<div> | ||
| 2 | + <script id="map-config-form-temp" type="text/html"> | ||
| 3 | + <form class="uk-form uk-form-stacked"> | ||
| 4 | + <div class="uk-form-row"> | ||
| 5 | + <span class="uk-form-label">图层</span> | ||
| 6 | + <div class="uk-form-controls"> | ||
| 7 | + <label><input type="radio" value="baidu" name="map_type" {{if map_type=='baidu'}}checked{{/if}}> 百度</label> | ||
| 8 | + <label><input type="radio" value="gaode" name="map_type" {{if map_type=='gaode'}}checked{{/if}}> 高德</label> | ||
| 9 | + <label><input type="checkbox" name="traffic" {{if traffic}}checked{{/if}}> 实时路况</label> | ||
| 10 | + </div> | ||
| 11 | + </div> | ||
| 12 | + | ||
| 13 | + <div class="uk-form-row"> | ||
| 14 | + <span class="uk-form-label">空间数据</span> | ||
| 15 | + <div class="uk-form-controls"> | ||
| 16 | + <label><input type="checkbox" name="spatial_data_station" {{if spatialData.station}}checked{{/if}}> 站点</label> | ||
| 17 | + <label><input type="checkbox" {{if spatialData.electronicFence}}checked{{/if}}> 电子围栏</label> | ||
| 18 | + <label><input type="checkbox" {{if spatialData.carPark}}checked{{/if}}> 停车场</label> | ||
| 19 | + </div> | ||
| 20 | + </div> | ||
| 21 | + | ||
| 22 | + <div class="uk-form-row"> | ||
| 23 | + <span class="uk-form-label">异常警报输出</span> | ||
| 24 | + <div class="uk-form-controls"> | ||
| 25 | + <label><input type="checkbox" {{if abnormalPrint.speeding}}checked{{/if}}> 超速</label> | ||
| 26 | + <label><input type="checkbox" {{if abnormalPrint.outBounds}}checked{{/if}}> 越界</label> | ||
| 27 | + <label><input type="checkbox" {{if abnormalPrint.largeMargin}}checked{{/if}}> 大间隔</label> | ||
| 28 | + </div> | ||
| 29 | + </div> | ||
| 30 | + | ||
| 31 | + <div class="uk-form-row"> | ||
| 32 | + <span class="uk-form-label">车辆图标</span> | ||
| 33 | + <div class="uk-form-controls"> | ||
| 34 | + <label><input type="checkbox" {{if carIcon.angle}}checked{{/if}}> 标示角度</label> | ||
| 35 | + <label><input type="checkbox" {{if carIcon.converge}}checked{{/if}}> 聚合</label> | ||
| 36 | + </div> | ||
| 37 | + </div> | ||
| 38 | + | ||
| 39 | + <div class="uk-form-row"> | ||
| 40 | + <span class="uk-form-label">车辆颜色</span> | ||
| 41 | + <div class="uk-form-controls"> | ||
| 42 | + <div class="color_block"> | ||
| 43 | + 上行 | ||
| 44 | + <div class="sp-placeholder"> | ||
| 45 | + <div class="sp-placeholder-color" data-name="carIcon.color.up" style="background: {{carIcon.color.up}}"></div> | ||
| 46 | + </div> | ||
| 47 | + </div> | ||
| 48 | + | ||
| 49 | + <div class="color_block"> | ||
| 50 | + 下行 | ||
| 51 | + <div class="sp-placeholder"> | ||
| 52 | + <div class="sp-placeholder-color" data-name="carIcon.color.down" style="background: {{carIcon.color.down}}"></div> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + | ||
| 56 | + <div class="color_block"> | ||
| 57 | + 非营运 | ||
| 58 | + <div class="sp-placeholder"> | ||
| 59 | + <div class="sp-placeholder-color" data-name="carIcon.color.nonOperation" style="background: {{carIcon.color.nonOperation}}"></div> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + | ||
| 65 | + <div class="uk-form-row"> | ||
| 66 | + <span class="uk-form-label">路段颜色</span> | ||
| 67 | + <div class="uk-form-controls"> | ||
| 68 | + <div class="color_block"> | ||
| 69 | + 上行 | ||
| 70 | + <div class="sp-placeholder"> | ||
| 71 | + <div class="sp-placeholder-color" data-name="section.color.up" style="background: {{section.color.up}}"></div> | ||
| 72 | + </div> | ||
| 73 | + </div> | ||
| 74 | + | ||
| 75 | + <div class="color_block"> | ||
| 76 | + 下行 | ||
| 77 | + <div class="sp-placeholder"> | ||
| 78 | + <div class="sp-placeholder-color" data-name="section.color.down" style="background: {{section.color.down}}"></div> | ||
| 79 | + </div> | ||
| 80 | + </div> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + | ||
| 84 | + <br> | ||
| 85 | + </form> | ||
| 86 | + </script> | ||
| 87 | +</div> | ||
| 88 | +<!-- 1111 --> | ||
| 0 | \ No newline at end of file | 89 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
0 → 100644
| 1 | +<div> | ||
| 2 | + <script id="map-win-gps-detail-temp" type="text/html"> | ||
| 3 | + <div class="gps_info_win" > | ||
| 4 | + <h4>{{nbbm}}</h4> | ||
| 5 | + <h5> | ||
| 6 | + {{lineName}} | ||
| 7 | + ({{if stationName!=null}} | ||
| 8 | + {{stationName}} | ||
| 9 | + {{else}} | ||
| 10 | + 未知站点 | ||
| 11 | + {{/if}}) | ||
| 12 | + </h5> | ||
| 13 | + <p>速度:{{speed}}</p> | ||
| 14 | + <p>角度:{{direction}}</p> | ||
| 15 | + <p>经度:{{lon}}</p> | ||
| 16 | + <p>纬度:{{lat}}</p> | ||
| 17 | + | ||
| 18 | + <p class="date-str">{{dateStr}}</p> | ||
| 19 | + <hr> | ||
| 20 | + {{if expectStopTime!=null}} | ||
| 21 | + <a href="javascript:;" style="color: #07D;margin-right: 7px;">预计 {{expectStopTime}} 分钟到达终点</a> | ||
| 22 | + {{/if}} | ||
| 23 | + <a href="javascript:;" style="float: right;">轨迹回放</a> | ||
| 24 | + </div> | ||
| 25 | + </script> | ||
| 26 | +</div> | ||
| 27 | +<!-- 2222 --> | ||
| 0 | \ No newline at end of file | 28 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/js/config.js
| 1 | /** 地图配置信息 */ | 1 | /** 地图配置信息 */ |
| 2 | 2 | ||
| 3 | -var gb_map_config=(function () { | 3 | +var gb_map_config = (function () { |
| 4 | 4 | ||
| 5 | - var defaultConfig={ | 5 | + var defaultConfig = { |
| 6 | 6 | ||
| 7 | //地图类型 | 7 | //地图类型 |
| 8 | map_type: 'baidu', | 8 | map_type: 'baidu', |
| @@ -22,16 +22,140 @@ var gb_map_config=(function () { | @@ -22,16 +22,140 @@ var gb_map_config=(function () { | ||
| 22 | angle: false, | 22 | angle: false, |
| 23 | converge: false, | 23 | converge: false, |
| 24 | color: { | 24 | color: { |
| 25 | - up: 'blue', | ||
| 26 | - down: 'red', | ||
| 27 | - nonOperation: 'grey' | 25 | + up: 'rgba(94, 150, 210, 1)', |
| 26 | + down: 'rgba(201, 33, 33, 1)', | ||
| 27 | + nonOperation: 'rgba(136, 133, 133, 1)' | ||
| 28 | } | 28 | } |
| 29 | }, | 29 | }, |
| 30 | - section:{ | 30 | + section: { |
| 31 | color: { | 31 | color: { |
| 32 | up: 'blue', | 32 | up: 'blue', |
| 33 | down: 'red' | 33 | down: 'red' |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| 36 | }; | 36 | }; |
| 37 | + | ||
| 38 | + var temps; | ||
| 39 | + | ||
| 40 | + var init = function () { | ||
| 41 | + $.get('/real_control_v2/mapmonitor/fragments/map_config.html', function (dom) { | ||
| 42 | + temps = gb_common.compileTempByDom(dom, {compress: true}); | ||
| 43 | + | ||
| 44 | + //渲染表单 | ||
| 45 | + var formHtml = temps['map-config-form-temp'](defaultConfig); | ||
| 46 | + $('.map_config_wrap').html(formHtml); | ||
| 47 | + | ||
| 48 | + //颜色选择器 | ||
| 49 | + $('.map_config_wrap .color_block .sp-placeholder .sp-placeholder-color').each(function () { | ||
| 50 | + var c = $(this).css('background-color'); | ||
| 51 | + $(this).spectrum({ | ||
| 52 | + color: c, | ||
| 53 | + showInput: true, | ||
| 54 | + chooseText: "确定", | ||
| 55 | + cancelText: "取消", | ||
| 56 | + preferredFormat: "rgb", | ||
| 57 | + showAlpha: true, | ||
| 58 | + change: function (color) { | ||
| 59 | + $(this).css('background-color', color); | ||
| 60 | + //set attr | ||
| 61 | + recursion_set_attr(defaultConfig, $(this).data('name'), color.toString()); | ||
| 62 | + //重新渲染地图覆盖物 | ||
| 63 | + gb_map_overlay_mge.reDraw(); | ||
| 64 | + } | ||
| 65 | + }); | ||
| 66 | + }); | ||
| 67 | + | ||
| 68 | + $('.map_config_wrap form input').on('change', configChangeHandler); | ||
| 69 | + | ||
| 70 | + }); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + var configChangeHandler = function () { | ||
| 74 | + //console.log('configChangeHandler..',this); | ||
| 75 | + var name = $(this).attr('name') | ||
| 76 | + , val = $(this).attr('value'); | ||
| 77 | + | ||
| 78 | + if (!name) | ||
| 79 | + return; | ||
| 80 | + | ||
| 81 | + handler[name] && handler[name].call(this, val); | ||
| 82 | + }; | ||
| 83 | + | ||
| 84 | + var handler = { | ||
| 85 | + map_type: changeMapType, | ||
| 86 | + traffic: trafficSwitch, | ||
| 87 | + spatial_data_station: spatial_data_station | ||
| 88 | + }; | ||
| 89 | + | ||
| 90 | + //切换地图类型 | ||
| 91 | + function changeMapType(val) { | ||
| 92 | + //修改配置项 | ||
| 93 | + set('map_type', val); | ||
| 94 | + | ||
| 95 | + gb_map_imap.changeMap(val, function () { | ||
| 96 | + //重绘覆盖物 | ||
| 97 | + gb_map_overlay_mge.reDraw(); | ||
| 98 | + setTimeout(function () { | ||
| 99 | + //实时路况为打开状态 | ||
| 100 | + if (defaultConfig.traffic) | ||
| 101 | + gb_map_imap.call('traffic', true); | ||
| 102 | + }, 1000); | ||
| 103 | + }); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + //实时路况 | ||
| 107 | + function trafficSwitch(val) { | ||
| 108 | + //修改配置项 | ||
| 109 | + set('traffic', this.checked); | ||
| 110 | + gb_map_imap.call('traffic', this.checked); | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + //空间数据 站点 | ||
| 114 | + function spatial_data_station(val) { | ||
| 115 | + defaultConfig.spatialData.station=this.checked; | ||
| 116 | + gb_map_spatial_data.refresh(); | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + function recursion_get_attr(data, attr) { | ||
| 120 | + var ats = attr.split('.'), | ||
| 121 | + val = data; | ||
| 122 | + | ||
| 123 | + $.each(ats, function (i, a) { | ||
| 124 | + val = val[a]; | ||
| 125 | + | ||
| 126 | + if (!val) | ||
| 127 | + return false; | ||
| 128 | + }); | ||
| 129 | + | ||
| 130 | + return val; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + function recursion_set_attr(data, attr, value) { | ||
| 134 | + var ats = attr.split('.'), | ||
| 135 | + tempVal = data | ||
| 136 | + , len = ats.length; | ||
| 137 | + | ||
| 138 | + $.each(ats, function (i, a) { | ||
| 139 | + if (i == len - 1) { | ||
| 140 | + tempVal[a] = value; | ||
| 141 | + return false; | ||
| 142 | + } | ||
| 143 | + else | ||
| 144 | + tempVal = tempVal[a]; | ||
| 145 | + | ||
| 146 | + if (!tempVal) | ||
| 147 | + return false; | ||
| 148 | + }); | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + function set(name, val) { | ||
| 152 | + defaultConfig[name] = val; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + return { | ||
| 156 | + getConfig: function () { | ||
| 157 | + return defaultConfig; | ||
| 158 | + }, | ||
| 159 | + init: init | ||
| 160 | + } | ||
| 37 | })(); | 161 | })(); |
| 38 | \ No newline at end of file | 162 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js
0 → 100644
| 1 | +var gb_map_gps_tree = (function () { | ||
| 2 | + | ||
| 3 | + | ||
| 4 | + var treeObj; | ||
| 5 | + | ||
| 6 | + var jstreeChanged = function (e, node, event) { | ||
| 7 | + gb_map_overlay_mge.refresh(); | ||
| 8 | + }; | ||
| 9 | + | ||
| 10 | + var init = function (cb) { | ||
| 11 | + //设备树 | ||
| 12 | + var treeData = gb_common.get_device_tree_data(); | ||
| 13 | + treeObj = $('.real_right_gps_panel .gps_tree_list') | ||
| 14 | + //节点初始化完成 | ||
| 15 | + .on('ready.jstree', function () { | ||
| 16 | + treeObj.jstree(true).open_all(); | ||
| 17 | + //删掉tree node a标签的 href值(避免鼠标悬停浏览器出现状态条) | ||
| 18 | + $('.gps_tree_list .jstree-container-ul a.jstree-anchor').removeAttr('href'); | ||
| 19 | + }) | ||
| 20 | + //state插件 状态恢复完成 | ||
| 21 | + .on('state_ready.jstree', function () { | ||
| 22 | + //绑定checkbox状态切换事件 | ||
| 23 | + treeObj.on('check_node.jstree uncheck_node.jstree', jstreeChanged); | ||
| 24 | + cb && cb(); | ||
| 25 | + }) | ||
| 26 | + .on('activate_node.jstree', function (e, n) { | ||
| 27 | + var node = n.node; | ||
| 28 | + if(node.a_attr && node.a_attr.type=='device'){ | ||
| 29 | + var device = node.a_attr.device; | ||
| 30 | + gb_map_overlay_mge._focus(device); | ||
| 31 | + } | ||
| 32 | + }) | ||
| 33 | + .jstree({ | ||
| 34 | + 'core': { | ||
| 35 | + 'data': treeData | ||
| 36 | + }, | ||
| 37 | + 'checkbox': { | ||
| 38 | + 'keep_selected_style': false, | ||
| 39 | + 'whole_node': false, | ||
| 40 | + 'tie_selection': false | ||
| 41 | + }, | ||
| 42 | + 'contextmenu': { | ||
| 43 | + 'items': { | ||
| 44 | + '轨迹回放': { | ||
| 45 | + 'label': '轨迹回放', | ||
| 46 | + 'action': function (data) { | ||
| 47 | + console.log('action', data); | ||
| 48 | + } | ||
| 49 | + }, | ||
| 50 | + '发送指令': { | ||
| 51 | + 'label': '发送指令', | ||
| 52 | + 'action': function (data) { | ||
| 53 | + console.log('action', data); | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + }, | ||
| 58 | + 'plugins': ['checkbox', 'contextmenu', 'state'] | ||
| 59 | + }); | ||
| 60 | + }; | ||
| 61 | + | ||
| 62 | + return { | ||
| 63 | + init: init, | ||
| 64 | + getChecked: function () { | ||
| 65 | + return treeObj.jstree(true).get_checked(true); | ||
| 66 | + } | ||
| 67 | + }; | ||
| 68 | +})(); | ||
| 0 | \ No newline at end of file | 69 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/js/map/iMap.js
| 1 | -/** 各地图平台通用接口定义 */ | ||
| 2 | -var gb_map_imap = (function(){ | ||
| 3 | - | ||
| 4 | - var storage = window.localStorage; | ||
| 5 | - // 地图DOM容器 | ||
| 6 | - var mapContainer = $('#mapContainer'); | ||
| 7 | - var maps = {}; | ||
| 8 | - //尝试从 localStorage 里获取默认的地图类型 | ||
| 9 | - var currentMap = storage.getItem('real_map'); | ||
| 10 | - var mapProxy = { | ||
| 11 | - //添加一个地图实例 | ||
| 12 | - addMap: function(name, text, instance){ | ||
| 13 | - maps[name] = {name: name, text: text, instance: instance}; | ||
| 14 | - | ||
| 15 | - if(!currentMap) | ||
| 16 | - currentMap = name; | ||
| 17 | - return mapProxy; | ||
| 18 | - }, | ||
| 19 | - changeDefault: function(mapName){ | ||
| 20 | - if(mapName == currentMap) | ||
| 21 | - return; | ||
| 22 | - if(maps[mapName]){ | ||
| 23 | - //原地图 destroy | ||
| 24 | - var oldMap = maps[currentMap].instance; | ||
| 25 | - oldMap.destroy && oldMap.destroy(); | ||
| 26 | - $(gb_map_consts.mapContainer).html(''); | ||
| 27 | - //解除实时路况按钮点击事件 | ||
| 28 | - $(gb_map_consts.trafficBtn).unbind('click'); | ||
| 29 | - | ||
| 30 | - //新地图 INIT | ||
| 31 | - var text = maps[mapName].text; | ||
| 32 | - //layer.msg('正在切换到' + text + '...', {icon : 16,shade : [ 0.6, '#393D49' ],time : 0}); | ||
| 33 | - var newMap = maps[mapName].instance; | ||
| 34 | - newMap.init(); | ||
| 35 | - setText(text); | ||
| 36 | - | ||
| 37 | - currentMap = mapName; | ||
| 38 | - //收拢线路 | ||
| 39 | - $('.mapRightWrap .collapse.in').collapse('hide'); | ||
| 40 | - }else | ||
| 41 | - alertErr('不存在的地图实例' + mapName); | ||
| 42 | - }, | ||
| 43 | - createCarIcon: createCarIcon, | ||
| 44 | - call: function(f, opts){ | ||
| 45 | - if(f == 'init') | ||
| 46 | - setText(maps[currentMap].text); | ||
| 47 | - | ||
| 48 | - var instance = maps[currentMap].instance; | ||
| 49 | - if(instance[f]) | ||
| 50 | - instance[f](opts); | ||
| 51 | - else | ||
| 52 | - alertErr('当前地图实例不支持操作:' + f); | ||
| 53 | - return mapProxy; | ||
| 54 | - } | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - //绘制车辆icon | ||
| 58 | - function createCarIcon(gps, w){ | ||
| 59 | - var canvas = $('<canvas></canvas>')[0]; | ||
| 60 | - var ctx = canvas.getContext('2d'); | ||
| 61 | - | ||
| 62 | - var colours = color(gps); | ||
| 63 | - | ||
| 64 | - ctx.shadowOffsetX = 5; // 阴影Y轴偏移 | ||
| 65 | - ctx.shadowOffsetY = 5; // 阴影X轴偏移 | ||
| 66 | - ctx.shadowBlur = 1; // 模糊尺寸 | ||
| 67 | - ctx.shadowColor = colours.shadow; // 颜色 | ||
| 68 | - | ||
| 69 | - //绘制背景 | ||
| 70 | - if(!w) | ||
| 71 | - w = 70; | ||
| 72 | - | ||
| 73 | - ctx.roundRect(0, 0, w, 25, 5).stroke(); | ||
| 74 | - ctx.fillStyle=colours.bgColor; | ||
| 75 | - ctx.fill(); | ||
| 76 | - //文字 | ||
| 77 | - ctx.font="14px arial"; | ||
| 78 | - ctx.fillStyle = "#fff"; | ||
| 79 | - ctx.fillText(gps.nbbm, 8, 18); | ||
| 80 | - | ||
| 81 | - return canvas.toDataURL(); | ||
| 82 | - } | ||
| 83 | - | ||
| 84 | - function color(g){ | ||
| 85 | - var colours = {}; | ||
| 86 | - switch (g.state) { | ||
| 87 | - case 0: | ||
| 88 | - if(g.upDown == 0){ | ||
| 89 | - //营运上行 | ||
| 90 | - colours['bgColor'] = 'rgba(94, 150, 210, 1)'; | ||
| 91 | - colours['shadow'] = 'rgba(94, 150, 210, 0.3)'; | ||
| 92 | - } | ||
| 93 | - else if(g.upDown == 1){ | ||
| 94 | - //营运下行 | ||
| 95 | - colours['bgColor'] = 'rgba(201, 33, 33, 1)'; | ||
| 96 | - colours['shadow'] = 'rgba(201, 33, 33, 0.3)'; | ||
| 97 | - } | ||
| 98 | - else{ | ||
| 99 | - //未知走向 | ||
| 100 | - colours['bgColor'] = 'rgba(0, 0, 0, 1)'; | ||
| 101 | - colours['shadow'] = 'rgba(0, 0, 0, 0.3)'; | ||
| 102 | - } | ||
| 103 | - break; | ||
| 104 | - | ||
| 105 | - default: | ||
| 106 | - //非营运 | ||
| 107 | - colours['bgColor'] = 'rgba(136, 133, 133, 1)'; | ||
| 108 | - colours['shadow'] = 'rgba(136, 133, 133, 0.3)'; | ||
| 109 | - break; | ||
| 110 | - } | ||
| 111 | - | ||
| 112 | - return colours; | ||
| 113 | - } | ||
| 114 | - | ||
| 115 | - function alertErr(text){ | ||
| 116 | - notify_err('map -'+text); | ||
| 117 | - } | ||
| 118 | - | ||
| 119 | - function setText(text) { | ||
| 120 | - $('#curr_map_name').text(text); | ||
| 121 | - } | ||
| 122 | - | ||
| 123 | - //文件载入完毕 | ||
| 124 | - mapmonitor_load_ep.emitLater('load_iMap'); | ||
| 125 | - return mapProxy; | 1 | +/** 地图 api 代理 */ |
| 2 | +var gb_map_imap = (function () { | ||
| 3 | + | ||
| 4 | + var storage = window.localStorage; | ||
| 5 | + // 地图DOM容器 | ||
| 6 | + var mapContainer = $('#mapContainer'); | ||
| 7 | + var maps = {}; | ||
| 8 | + //尝试从 localStorage 里获取默认的地图类型 | ||
| 9 | + var currentMap = storage.getItem('real_map'); | ||
| 10 | + var mapProxy = { | ||
| 11 | + //添加一个地图实例 | ||
| 12 | + addMap: function (name, text, instance) { | ||
| 13 | + maps[name] = {name: name, text: text, instance: instance}; | ||
| 14 | + | ||
| 15 | + if (!currentMap) | ||
| 16 | + currentMap = name; | ||
| 17 | + return mapProxy; | ||
| 18 | + }, | ||
| 19 | + changeMap: function (mapName, cb) { | ||
| 20 | + if (mapName == currentMap) | ||
| 21 | + return; | ||
| 22 | + if (maps[mapName]) { | ||
| 23 | + //原地图 destroy | ||
| 24 | + var oldMap = maps[currentMap].instance; | ||
| 25 | + oldMap.destroy && oldMap.destroy(); | ||
| 26 | + //新地图 INIT | ||
| 27 | + //var text = maps[mapName].text; | ||
| 28 | + //layer.msg('正在切换到' + text + '...', {icon : 16,shade : [ 0.6, '#393D49' ],time : 0}); | ||
| 29 | + var newMap = maps[mapName].instance; | ||
| 30 | + | ||
| 31 | + currentMap = mapName; | ||
| 32 | + newMap.init(cb); | ||
| 33 | + } else | ||
| 34 | + alertErr('不存在的地图实例' + mapName); | ||
| 35 | + }, | ||
| 36 | + createCarIcon: createCarIcon, | ||
| 37 | + call: function (f, opts) { | ||
| 38 | + var instance = maps[currentMap].instance; | ||
| 39 | + if (instance[f]) | ||
| 40 | + instance[f](opts); | ||
| 41 | + else | ||
| 42 | + alertErr('当前地图实例不支持操作:' + f); | ||
| 43 | + return mapProxy; | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + //绘制车辆icon | ||
| 48 | + function createCarIcon(gps, w) { | ||
| 49 | + var canvas = $('<canvas></canvas>')[0]; | ||
| 50 | + var ctx = canvas.getContext('2d'); | ||
| 51 | + | ||
| 52 | + var colours = color(gps); | ||
| 53 | + | ||
| 54 | + ctx.shadowOffsetX = 5; // 阴影Y轴偏移 | ||
| 55 | + ctx.shadowOffsetY = 5; // 阴影X轴偏移 | ||
| 56 | + ctx.shadowBlur = 1; // 模糊尺寸 | ||
| 57 | + ctx.shadowColor = colours.shadow; // 颜色 | ||
| 58 | + | ||
| 59 | + //绘制背景 | ||
| 60 | + if (!w) | ||
| 61 | + w = 70; | ||
| 62 | + | ||
| 63 | + ctx.roundRect(0, 0, w, 25, 5).stroke(); | ||
| 64 | + ctx.fillStyle = colours.bgColor; | ||
| 65 | + ctx.fill(); | ||
| 66 | + //文字 | ||
| 67 | + ctx.font = "14px arial"; | ||
| 68 | + ctx.fillStyle = "#fff"; | ||
| 69 | + ctx.fillText(gps.nbbm, 8, 18); | ||
| 70 | + | ||
| 71 | + return canvas.toDataURL(); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + function color(g) { | ||
| 75 | + var colours = {}; | ||
| 76 | + switch (g.state) { | ||
| 77 | + case 0: | ||
| 78 | + if (g.upDown == 0) { | ||
| 79 | + //营运上行 | ||
| 80 | + colours['bgColor'] = gb_map_config.getConfig().carIcon.color.up; | ||
| 81 | + colours['shadow'] = 'rgba(94, 150, 210, 0.3)'; | ||
| 82 | + } | ||
| 83 | + else if (g.upDown == 1) { | ||
| 84 | + //营运下行 | ||
| 85 | + colours['bgColor'] = gb_map_config.getConfig().carIcon.color.down; | ||
| 86 | + colours['shadow'] = 'rgba(201, 33, 33, 0.3)'; | ||
| 87 | + } | ||
| 88 | + break; | ||
| 89 | + | ||
| 90 | + default: | ||
| 91 | + //非营运 | ||
| 92 | + colours['bgColor'] = gb_map_config.getConfig().carIcon.color.nonOperation; | ||
| 93 | + colours['shadow'] = 'rgba(136, 133, 133, 0.3)'; | ||
| 94 | + break; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + return colours; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + function alertErr(text) { | ||
| 101 | + notify_err('map -' + text); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + function setText(text) { | ||
| 105 | + $('#curr_map_name').text(text); | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + //文件载入完毕 | ||
| 109 | + mapmonitor_load_ep.emitLater('load_iMap'); | ||
| 110 | + return mapProxy; | ||
| 126 | })(); | 111 | })(); |
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/baidu.js
| @@ -11,25 +11,28 @@ var gb_map_baidu = (function(){ | @@ -11,25 +11,28 @@ var gb_map_baidu = (function(){ | ||
| 11 | 11 | ||
| 12 | var polylines={}; | 12 | var polylines={}; |
| 13 | var buffAreas = {}; | 13 | var buffAreas = {}; |
| 14 | + | ||
| 15 | + var ctrl; | ||
| 14 | var baiduInstance = { | 16 | var baiduInstance = { |
| 15 | //初始化 | 17 | //初始化 |
| 16 | - init: function(){ | 18 | + init: function(cb){ |
| 17 | if(!window.BMap){ | 19 | if(!window.BMap){ |
| 18 | alert('地图没有加载成功,请确认是否能正常连接外网!!'); | 20 | alert('地图没有加载成功,请确认是否能正常连接外网!!'); |
| 19 | return; | 21 | return; |
| 20 | } | 22 | } |
| 21 | map = new BMap.Map($(gb_map_consts.mapContainer)[0]); | 23 | map = new BMap.Map($(gb_map_consts.mapContainer)[0]); |
| 22 | //中心点和缩放级别 | 24 | //中心点和缩放级别 |
| 23 | - map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 12); | 25 | + map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 13); |
| 24 | map.enableScrollWheelZoom(); | 26 | map.enableScrollWheelZoom(); |
| 25 | 27 | ||
| 26 | - window.localStorage.setItem('real_map', 'baidu'); | 28 | + cb && cb(); |
| 29 | + //window.localStorage.setItem('real_map', 'baidu'); | ||
| 27 | 30 | ||
| 28 | // 路况控件 | 31 | // 路况控件 |
| 29 | -/* var ctrl = new BMapLib.TrafficControl(); | 32 | + ctrl = new BMapLib.TrafficControl(); |
| 30 | map.addControl(ctrl); | 33 | map.addControl(ctrl); |
| 31 | 34 | ||
| 32 | - $(gb_map_consts.trafficBtn).on('click', function() { | 35 | + /*$(gb_map_consts.trafficBtn).on('click', function() { |
| 33 | if (traffVisible) { | 36 | if (traffVisible) { |
| 34 | ctrl.hide(); | 37 | ctrl.hide(); |
| 35 | traffVisible = false; | 38 | traffVisible = false; |
| @@ -52,42 +55,57 @@ var gb_map_baidu = (function(){ | @@ -52,42 +55,57 @@ var gb_map_baidu = (function(){ | ||
| 52 | destroy: function(){ | 55 | destroy: function(){ |
| 53 | realMarkers = {}; | 56 | realMarkers = {}; |
| 54 | linePolyline = []; | 57 | linePolyline = []; |
| 55 | - }, | 58 | + }/*, |
| 56 | clear: function(){ | 59 | clear: function(){ |
| 57 | realMarkers = {}; | 60 | realMarkers = {}; |
| 58 | map.clearOverlays(); | 61 | map.clearOverlays(); |
| 59 | - }, | 62 | + }*/, |
| 60 | //画线路图层 | 63 | //画线路图层 |
| 61 | - drawLine: function(opts){ | ||
| 62 | - if(polylines[opts.key]){ | ||
| 63 | - //centerToPolyline(polylines[opts.key]); | 64 | + drawLine: function(opt){ |
| 65 | + if(polylines[opt.id]) | ||
| 64 | return; | 66 | return; |
| 65 | - } | ||
| 66 | - var plconfg={strokeWeight:6, strokeOpacity:0.5}; | ||
| 67 | - var pos = [], tempArray; | ||
| 68 | - var route; | ||
| 69 | - var polyline; | ||
| 70 | - //上行 | ||
| 71 | - if(opts.updown==0){ | ||
| 72 | - route=opts.route.up; | ||
| 73 | - plconfg.strokeColor="blue"; | ||
| 74 | - } | ||
| 75 | - else if(opts.updown==1){ | ||
| 76 | - route=opts.route.down; | ||
| 77 | - plconfg.strokeColor="red"; | ||
| 78 | - } | 67 | + |
| 68 | + var pos = [], temps; | ||
| 69 | + var route = opt.upDown==0?opt.route.up:opt.route.down; | ||
| 70 | + | ||
| 79 | $.each(route.split(','), function(){ | 71 | $.each(route.split(','), function(){ |
| 80 | - tempArray = this.split(' '); | ||
| 81 | - pos.push(new BMap.Point(tempArray[0], tempArray[1])); | 72 | + temps = this.split(' '); |
| 73 | + pos.push(new BMap.Point(temps[0], temps[1])); | ||
| 82 | }); | 74 | }); |
| 83 | 75 | ||
| 84 | - polyline = new BMap.Polyline(pos, plconfg); | ||
| 85 | - polylines[opts.key]=polyline; | 76 | + var polyline = new BMap.Polyline(pos, opt.style); |
| 77 | + //根据ID保存映射 | ||
| 78 | + polylines[opt.id]=polyline; | ||
| 79 | + if(opt.hide) | ||
| 80 | + polyline.hide(); | ||
| 86 | map.addOverlay(polyline); | 81 | map.addOverlay(polyline); |
| 87 | 82 | ||
| 88 | - console.log('centerToPolyline...'); | ||
| 89 | - centerToPolyline(polyline); | 83 | + //延迟居中,避免多次调用时抖动 |
| 84 | + delayToCenter(pos[parseInt(pos.length / 2)]); | ||
| 85 | + //map.panTo(pos[parseInt(pos.length / 2)]); | ||
| 90 | }, | 86 | }, |
| 87 | + traffic: function (enable) { | ||
| 88 | + if(enable) | ||
| 89 | + ctrl.show(); | ||
| 90 | + else | ||
| 91 | + ctrl.hide(); | ||
| 92 | + }, | ||
| 93 | + //根据id 显示polyline | ||
| 94 | + refreshPolyline: function (opt) { | ||
| 95 | + var idx = opt.idx; | ||
| 96 | + for(var id in polylines){ | ||
| 97 | + if(idx.indexOf(id) != -1) | ||
| 98 | + polylines[id].show(); | ||
| 99 | + else | ||
| 100 | + polylines[id].hide(); | ||
| 101 | + } | ||
| 102 | + }, | ||
| 103 | + //定位到线路中间点 | ||
| 104 | + centerToLine: function (opt) { | ||
| 105 | + var pos=polylines[opt.id].getPath(); | ||
| 106 | + console.log('定位到中心,,,', pos[parseInt(pos.length / 2)]); | ||
| 107 | + map.setCenter(pos[parseInt(pos.length / 2)]); | ||
| 108 | + }/*, | ||
| 91 | removeLine: function(opts){ | 109 | removeLine: function(opts){ |
| 92 | var polyline=polylines[opts.key]; | 110 | var polyline=polylines[opts.key]; |
| 93 | if(polyline){ | 111 | if(polyline){ |
| @@ -95,36 +113,48 @@ var gb_map_baidu = (function(){ | @@ -95,36 +113,48 @@ var gb_map_baidu = (function(){ | ||
| 95 | polylines[opts.key]=null; | 113 | polylines[opts.key]=null; |
| 96 | delete polylines[opts.key]; | 114 | delete polylines[opts.key]; |
| 97 | } | 115 | } |
| 98 | - }, | 116 | + }*/, |
| 99 | //绘制GPS信号 | 117 | //绘制GPS信号 |
| 100 | drawRealGpsMarker: function(opts){ | 118 | drawRealGpsMarker: function(opts){ |
| 101 | var gpsArray = opts.gpsList; | 119 | var gpsArray = opts.gpsList; |
| 102 | var marker, coord; | 120 | var marker, coord; |
| 103 | $.each(gpsArray, function(i, gps){ | 121 | $.each(gpsArray, function(i, gps){ |
| 104 | - if(opts.coordTransform){ | ||
| 105 | - //坐标转换 | ||
| 106 | - coord = TransGPS.wgsToBD(gps.lat, gps.lon); | ||
| 107 | - gps.bd_lat = coord.lat; | ||
| 108 | - gps.bd_lon = coord.lng; | ||
| 109 | - } | ||
| 110 | - | ||
| 111 | 122 | ||
| 112 | marker = realMarkers[gps.deviceId]; | 123 | marker = realMarkers[gps.deviceId]; |
| 113 | - if(marker){ | ||
| 114 | - if(gps.timestamp == marker.gpsData.timestamp) | ||
| 115 | - return; | ||
| 116 | - else | ||
| 117 | - moveMarker(marker, gps);//移动marker | ||
| 118 | - } | 124 | + if(marker && gps.timestamp == marker.gpsData.timestamp) |
| 125 | + return; | ||
| 119 | else{ | 126 | else{ |
| 120 | - //创建marker | ||
| 121 | - marker = createBDMarkerByGps(gps); | ||
| 122 | - map.addOverlay(marker); | ||
| 123 | - //设备号和marker映射 | ||
| 124 | - realMarkers[gps.deviceId] = marker; | 127 | + //转换坐标 |
| 128 | + transCoord(gps); | ||
| 129 | + | ||
| 130 | + if(marker) | ||
| 131 | + moveMarker(marker, gps);//移动marker | ||
| 132 | + else { | ||
| 133 | + //创建marker | ||
| 134 | + marker = createBDMarkerByGps(gps); | ||
| 135 | + map.addOverlay(marker); | ||
| 136 | + //设备号和marker映射 | ||
| 137 | + realMarkers[gps.deviceId] = marker; | ||
| 138 | + } | ||
| 125 | } | 139 | } |
| 126 | }); | 140 | }); |
| 127 | }, | 141 | }, |
| 142 | + clearAll: function () { | ||
| 143 | + //清除所有覆盖物 | ||
| 144 | + realMarkers = {}; | ||
| 145 | + polylines={}; | ||
| 146 | + map.clearOverlays(); | ||
| 147 | + | ||
| 148 | + }, | ||
| 149 | + showGpsMarker:function (opt) { | ||
| 150 | + var chs = opt.chs; | ||
| 151 | + for(var device in realMarkers){ | ||
| 152 | + if(chs[device]) | ||
| 153 | + realMarkers[device].show(); | ||
| 154 | + else | ||
| 155 | + realMarkers[device].hide(); | ||
| 156 | + } | ||
| 157 | + }, | ||
| 128 | removeGps: function(opts){ | 158 | removeGps: function(opts){ |
| 129 | var deviceArr = opts.deviceArr; | 159 | var deviceArr = opts.deviceArr; |
| 130 | $.each(deviceArr, function(){ | 160 | $.each(deviceArr, function(){ |
| @@ -184,10 +214,16 @@ var gb_map_baidu = (function(){ | @@ -184,10 +214,16 @@ var gb_map_baidu = (function(){ | ||
| 184 | } | 214 | } |
| 185 | }; | 215 | }; |
| 186 | 216 | ||
| 217 | + function transCoord(gps) { | ||
| 218 | + var coord = TransGPS.wgsToBD(gps.lat, gps.lon); | ||
| 219 | + gps.bd_lat = coord.lat; | ||
| 220 | + gps.bd_lon = coord.lng; | ||
| 221 | + } | ||
| 222 | + | ||
| 187 | var bd_gps_info_win_opts = { | 223 | var bd_gps_info_win_opts = { |
| 188 | - width : 190, | 224 | + width : 0, |
| 189 | height: 255, | 225 | height: 255, |
| 190 | - enableMessage:true | 226 | + enableMessage:false |
| 191 | }; | 227 | }; |
| 192 | function createBDMarkerByGps(gpsData){ | 228 | function createBDMarkerByGps(gpsData){ |
| 193 | 229 | ||
| @@ -201,9 +237,9 @@ var gb_map_baidu = (function(){ | @@ -201,9 +237,9 @@ var gb_map_baidu = (function(){ | ||
| 201 | marker.infoWindow = new BMap.InfoWindow(bd_gps_info_win_opts); | 237 | marker.infoWindow = new BMap.InfoWindow(bd_gps_info_win_opts); |
| 202 | marker.gpsData = gpsData; | 238 | marker.gpsData = gpsData; |
| 203 | //click | 239 | //click |
| 204 | - /*marker.addEventListener('click', function(){ | 240 | + marker.addEventListener('click', function(){ |
| 205 | bdOpenWindow(this); | 241 | bdOpenWindow(this); |
| 206 | - });*/ | 242 | + }); |
| 207 | //mouseover | 243 | //mouseover |
| 208 | marker.addEventListener('mouseover', function(){ | 244 | marker.addEventListener('mouseover', function(){ |
| 209 | setTop(this); | 245 | setTop(this); |
| @@ -212,7 +248,7 @@ var gb_map_baidu = (function(){ | @@ -212,7 +248,7 @@ var gb_map_baidu = (function(){ | ||
| 212 | } | 248 | } |
| 213 | 249 | ||
| 214 | //隐藏线路线条 | 250 | //隐藏线路线条 |
| 215 | - function hideLinePolyline(){ | 251 | +/* function hideLinePolyline(){ |
| 216 | if(!linePolyline || linePolyline.length == 0) | 252 | if(!linePolyline || linePolyline.length == 0) |
| 217 | return; | 253 | return; |
| 218 | 254 | ||
| @@ -231,7 +267,7 @@ var gb_map_baidu = (function(){ | @@ -231,7 +267,7 @@ var gb_map_baidu = (function(){ | ||
| 231 | $.each(linePolyline, function(){ | 267 | $.each(linePolyline, function(){ |
| 232 | this.setStrokeOpacity(0.5); | 268 | this.setStrokeOpacity(0.5); |
| 233 | }); | 269 | }); |
| 234 | - } | 270 | + }*/ |
| 235 | 271 | ||
| 236 | function moveMarker(m, gps){ | 272 | function moveMarker(m, gps){ |
| 237 | m.setPosition(new BMap.Point(gps.bd_lon, gps.bd_lat)); | 273 | m.setPosition(new BMap.Point(gps.bd_lon, gps.bd_lat)); |
| @@ -255,15 +291,28 @@ var gb_map_baidu = (function(){ | @@ -255,15 +291,28 @@ var gb_map_baidu = (function(){ | ||
| 255 | } | 291 | } |
| 256 | 292 | ||
| 257 | function bdOpenWindow(marker){ | 293 | function bdOpenWindow(marker){ |
| 258 | - marker.gpsData.fromNow = moment(marker.gpsData.timestamp).fromNow(); | 294 | + var gps = marker.gpsData; |
| 295 | + //线路名 | ||
| 296 | + gps.lineName = gb_data_basic.lineCode2NameAll()[gps.lineId]; | ||
| 297 | + //时间 | ||
| 298 | + gps.dateStr = moment(gps.timestamp).format('YYYY-MM-DD HH:mm:ss'); | ||
| 259 | 299 | ||
| 260 | - marker.infoWindow.setContent(template('map_gps_info_win_temp', marker.gpsData)); | 300 | + marker.infoWindow.setContent(gb_map_overlay_mge.map_gps_win_temp(gps)); |
| 261 | map.openInfoWindow(marker.infoWindow, marker.point); | 301 | map.openInfoWindow(marker.infoWindow, marker.point); |
| 262 | } | 302 | } |
| 263 | 303 | ||
| 264 | - function centerToPolyline(polyline){ | 304 | +/* function centerToPolyline(polyline){ |
| 265 | var pos=polyline.getPath(); | 305 | var pos=polyline.getPath(); |
| 266 | map.panTo(pos[parseInt(pos.length / 2)]); | 306 | map.panTo(pos[parseInt(pos.length / 2)]); |
| 307 | + }*/ | ||
| 308 | + | ||
| 309 | + | ||
| 310 | + var c_delay = 300, c_point; | ||
| 311 | + function delayToCenter(point) { | ||
| 312 | + c_point = point; | ||
| 313 | + setTimeout(function () { | ||
| 314 | + map.panTo(c_point); | ||
| 315 | + }, c_delay); | ||
| 267 | } | 316 | } |
| 268 | 317 | ||
| 269 | //文件载入完毕 | 318 | //文件载入完毕 |
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/gaode.js
| @@ -16,11 +16,12 @@ var gb_map_gaode = (function() { | @@ -16,11 +16,12 @@ var gb_map_gaode = (function() { | ||
| 16 | var topMarkr; | 16 | var topMarkr; |
| 17 | var realMarkers = {}; | 17 | var realMarkers = {}; |
| 18 | //线路路由线条 | 18 | //线路路由线条 |
| 19 | - var linePolyline; | 19 | + var polylines={}; |
| 20 | //实时路况是否显示 | 20 | //实时路况是否显示 |
| 21 | var traffVisible; | 21 | var traffVisible; |
| 22 | + var trafficLayer; | ||
| 22 | var gaodeInstance = { | 23 | var gaodeInstance = { |
| 23 | - init : function() { | 24 | + init : function(cb) { |
| 24 | var $mapCon = $(gb_map_consts.mapContainer); | 25 | var $mapCon = $(gb_map_consts.mapContainer); |
| 25 | $mapCon.html(mapLoadAnim); | 26 | $mapCon.html(mapLoadAnim); |
| 26 | //设置样式 | 27 | //设置样式 |
| @@ -28,21 +29,21 @@ var gb_map_gaode = (function() { | @@ -28,21 +29,21 @@ var gb_map_gaode = (function() { | ||
| 28 | 29 | ||
| 29 | map = new AMap.Map($mapCon[0]); | 30 | map = new AMap.Map($mapCon[0]); |
| 30 | // 地图中心和缩放级别 | 31 | // 地图中心和缩放级别 |
| 31 | - map.setZoomAndCenter(14, [ gb_map_consts.center_point.lng, gb_map_consts.center_point.lat ]); | 32 | + map.setZoomAndCenter(13, [ gb_map_consts.center_point.lng, gb_map_consts.center_point.lat ]); |
| 32 | // 加载完成 | 33 | // 加载完成 |
| 33 | AMap.event.addListener(map, 'complete', function() { | 34 | AMap.event.addListener(map, 'complete', function() { |
| 34 | - layer.closeAll(); | ||
| 35 | - window.localStorage.setItem('real_map', 'gaode'); | 35 | + //window.localStorage.setItem('real_map', 'gaode'); |
| 36 | /*storage.setItem('real_map', REAL_GAODE_TEXT); | 36 | /*storage.setItem('real_map', REAL_GAODE_TEXT); |
| 37 | $('.sk-cube-grid._center').remove();*/ | 37 | $('.sk-cube-grid._center').remove();*/ |
| 38 | + cb && cb(); | ||
| 38 | }); | 39 | }); |
| 39 | 40 | ||
| 40 | // 实时路况图层 | 41 | // 实时路况图层 |
| 41 | - var trafficLayer = new AMap.TileLayer.Traffic(); | 42 | + trafficLayer = new AMap.TileLayer.Traffic(); |
| 42 | trafficLayer.setMap(map); | 43 | trafficLayer.setMap(map); |
| 43 | trafficLayer.hide(); | 44 | trafficLayer.hide(); |
| 44 | 45 | ||
| 45 | - $(gb_map_consts.trafficBtn).on('click', function() { | 46 | + /*$(gb_map_consts.trafficBtn).on('click', function() { |
| 46 | if (traffVisible) { | 47 | if (traffVisible) { |
| 47 | trafficLayer.hide(); | 48 | trafficLayer.hide(); |
| 48 | traffVisible = false; | 49 | traffVisible = false; |
| @@ -54,7 +55,7 @@ var gb_map_gaode = (function() { | @@ -54,7 +55,7 @@ var gb_map_gaode = (function() { | ||
| 54 | $(this).addClass('active'); | 55 | $(this).addClass('active'); |
| 55 | hideLinePolyline(); | 56 | hideLinePolyline(); |
| 56 | } | 57 | } |
| 57 | - }); | 58 | + });*/ |
| 58 | }, | 59 | }, |
| 59 | setStyle : function() { | 60 | setStyle : function() { |
| 60 | $('.mapRightWrap').addClass('gaode'); | 61 | $('.mapRightWrap').addClass('gaode'); |
| @@ -67,50 +68,93 @@ var gb_map_gaode = (function() { | @@ -67,50 +68,93 @@ var gb_map_gaode = (function() { | ||
| 67 | $('.mapTools').removeClass('gaode'); | 68 | $('.mapTools').removeClass('gaode'); |
| 68 | $('.leftUtils').removeClass('gaode'); | 69 | $('.leftUtils').removeClass('gaode'); |
| 69 | }, | 70 | }, |
| 70 | - clear: function(){ | 71 | + traffic: function (enable) { |
| 72 | + if(enable) | ||
| 73 | + trafficLayer.show(); | ||
| 74 | + else | ||
| 75 | + trafficLayer.hide(); | ||
| 76 | + }, | ||
| 77 | + clearAll: function () { | ||
| 78 | + realMarkers = {}; | ||
| 79 | + polylines={}; | ||
| 80 | + map.clearMap(); | ||
| 81 | + } | ||
| 82 | + /*clear: function(){ | ||
| 71 | realMarkers = {}; | 83 | realMarkers = {}; |
| 72 | map.clearMap(); | 84 | map.clearMap(); |
| 73 | linePolyline = []; | 85 | linePolyline = []; |
| 74 | - }, | ||
| 75 | - drawLine: function(opts){ | ||
| 76 | - linePolyline = []; | 86 | + }*/, |
| 87 | + drawLine: function(opt){ | ||
| 88 | + //linePolyline = []; | ||
| 89 | + var pos = [], temps; | ||
| 90 | + var route = opt.upDown==0?opt.route.up_gcj:opt.route.down_gcj; | ||
| 77 | 91 | ||
| 78 | - map.clearMap(); | 92 | + $.each(route.split(','), function(){ |
| 93 | + temps = this.split(' '); | ||
| 94 | + pos.push([temps[0], temps[1]]); | ||
| 95 | + }); | ||
| 79 | 96 | ||
| 80 | - var upArr = [], downArr = []; | ||
| 81 | - var upLineOps = {path: upArr, strokeColor:"blue", strokeWeight:6, strokeOpacity:0.5} | ||
| 82 | - ,downLineOps = {path: downArr, strokeColor:"red", strokeWeight:6, strokeOpacity:0.5}; | ||
| 83 | - var route = opts.route; | ||
| 84 | - //上行 | ||
| 85 | - if(route.up){ | ||
| 86 | - $.each(route.up_gcj.split(','), function(){ | ||
| 87 | - tempArray = this.split(' '); | ||
| 88 | - upArr.push([tempArray[0], tempArray[1]]); | ||
| 89 | - }); | ||
| 90 | - var upLine = new AMap.Polyline(upLineOps); | ||
| 91 | - //保存线条引用 | ||
| 92 | - linePolyline.push(upLine); | ||
| 93 | - upLine.setMap(map); | ||
| 94 | - map.setCenter(upArr[parseInt(upArr.length / 2)]); | 97 | + opt.style.path=pos; |
| 98 | + var polyline = new AMap.Polyline(opt.style); | ||
| 99 | + //根据ID保存映射 | ||
| 100 | + polylines[opt.id]=polyline; | ||
| 101 | + if(opt.hide) | ||
| 102 | + polyline.hide(); | ||
| 95 | 103 | ||
| 104 | + polyline.setMap(map); | ||
| 105 | + | ||
| 106 | + map.setCenter(pos[parseInt(pos.length / 2)]); | ||
| 107 | + | ||
| 108 | + }, | ||
| 109 | + //根据id 显示polyline | ||
| 110 | + refreshPolyline: function (opt) { | ||
| 111 | + var idx = opt.idx; | ||
| 112 | + for(var id in polylines){ | ||
| 113 | + if(idx.indexOf(id) != -1) | ||
| 114 | + polylines[id].show(); | ||
| 115 | + else | ||
| 116 | + polylines[id].hide(); | ||
| 96 | } | 117 | } |
| 97 | - //下行 | ||
| 98 | - if(route.down){ | ||
| 99 | - $.each(route.down_gcj.split(','), function(){ | ||
| 100 | - tempArray = this.split(' '); | ||
| 101 | - downArr.push([tempArray[0], tempArray[1]]); | ||
| 102 | - }); | ||
| 103 | - var downLine = new AMap.Polyline(downLineOps); | ||
| 104 | - //保存线条引用 | ||
| 105 | - linePolyline.push(downLine); | ||
| 106 | - downLine.setMap(map); | ||
| 107 | - } | ||
| 108 | - //实时路况下不显示 | ||
| 109 | - if(traffVisible) | ||
| 110 | - hideLinePolyline(); | ||
| 111 | }, | 118 | }, |
| 112 | drawRealGpsMarker: function(opts){ | 119 | drawRealGpsMarker: function(opts){ |
| 113 | - var gpsArray = opts.gpsList; | 120 | + gpsArray = opts.gpsList; |
| 121 | + var coord; | ||
| 122 | + $.each(gpsArray, function(i, gps){ | ||
| 123 | + | ||
| 124 | + marker = realMarkers[gps.deviceId]; | ||
| 125 | + if(marker && gps.timestamp == marker.gpsData.timestamp) | ||
| 126 | + return; | ||
| 127 | + else{ | ||
| 128 | + //转换坐标 | ||
| 129 | + transCoord(gps); | ||
| 130 | + | ||
| 131 | + if(marker) | ||
| 132 | + moveMarker(marker, gps);//移动marker | ||
| 133 | + else { | ||
| 134 | + //创建marker | ||
| 135 | + marker = createGDMarkerByGps(gps); | ||
| 136 | + realMarkers[gps.deviceId] = marker | ||
| 137 | + } | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + /*coord = TransGPS.transformFromWGSToGCJ(gps.lat, gps.lon); | ||
| 141 | + gps.gcj_lat = coord.lat; | ||
| 142 | + gps.gcj_lon = coord.lng; | ||
| 143 | + | ||
| 144 | + marker = realMarkers[gps.deviceId]; | ||
| 145 | + if(marker){ | ||
| 146 | + if(gps.timestamp == marker.gpsData.timestamp) | ||
| 147 | + return; | ||
| 148 | + else | ||
| 149 | + moveMarker(marker, gps);//移动marker | ||
| 150 | + } | ||
| 151 | + else{ | ||
| 152 | + var marker = createGDMarkerByGps(gps); | ||
| 153 | + realMarkers[gps.deviceId] = marker | ||
| 154 | + }*/ | ||
| 155 | + }); | ||
| 156 | + | ||
| 157 | + /*var gpsArray = opts.gpsList; | ||
| 114 | var coord; | 158 | var coord; |
| 115 | $.each(gpsArray, function(i, gps){ | 159 | $.each(gpsArray, function(i, gps){ |
| 116 | if(opts.coordTransform){ | 160 | if(opts.coordTransform){ |
| @@ -130,7 +174,16 @@ var gb_map_gaode = (function() { | @@ -130,7 +174,16 @@ var gb_map_gaode = (function() { | ||
| 130 | var marker = createGDMarkerByGps(gps); | 174 | var marker = createGDMarkerByGps(gps); |
| 131 | realMarkers[gps.deviceId] = marker | 175 | realMarkers[gps.deviceId] = marker |
| 132 | } | 176 | } |
| 133 | - }); | 177 | + });*/ |
| 178 | + }, | ||
| 179 | + showGpsMarker: function (opt) { | ||
| 180 | + var chs = opt.chs; | ||
| 181 | + for(var device in realMarkers){ | ||
| 182 | + if(chs[device]) | ||
| 183 | + realMarkers[device].show(); | ||
| 184 | + else | ||
| 185 | + realMarkers[device].hide(); | ||
| 186 | + } | ||
| 134 | }, | 187 | }, |
| 135 | goToMarker: function(opts){ | 188 | goToMarker: function(opts){ |
| 136 | var deviceId = opts.deviceId | 189 | var deviceId = opts.deviceId |
| @@ -147,6 +200,12 @@ var gb_map_gaode = (function() { | @@ -147,6 +200,12 @@ var gb_map_gaode = (function() { | ||
| 147 | } | 200 | } |
| 148 | }; | 201 | }; |
| 149 | 202 | ||
| 203 | + function transCoord(gps) { | ||
| 204 | + var coord = TransGPS.transformFromWGSToGCJ(gps.lat, gps.lon); | ||
| 205 | + gps.gcj_lat = coord.lat; | ||
| 206 | + gps.gcj_lon = coord.lng; | ||
| 207 | + } | ||
| 208 | + | ||
| 150 | function createGDMarkerByGps(gps){ | 209 | function createGDMarkerByGps(gps){ |
| 151 | //根据编码长度 计算marker 宽度 | 210 | //根据编码长度 计算marker 宽度 |
| 152 | var w = gps.nbbm.length * 10; | 211 | var w = gps.nbbm.length * 10; |
| @@ -156,7 +215,7 @@ var gb_map_gaode = (function() { | @@ -156,7 +215,7 @@ var gb_map_gaode = (function() { | ||
| 156 | position: [gps.gcj_lon, gps.gcj_lat], | 215 | position: [gps.gcj_lon, gps.gcj_lat], |
| 157 | icon: new AMap.Icon({ | 216 | icon: new AMap.Icon({ |
| 158 | size: new AMap.Size(w, 25), //图标大小 | 217 | size: new AMap.Size(w, 25), //图标大小 |
| 159 | - image: iMap.createCarIcon(gps, w) | 218 | + image: gb_map_imap.createCarIcon(gps, w) |
| 160 | }), | 219 | }), |
| 161 | offset: new AMap.Pixel(-35, -12) | 220 | offset: new AMap.Pixel(-35, -12) |
| 162 | }); | 221 | }); |
| @@ -184,14 +243,14 @@ var gb_map_gaode = (function() { | @@ -184,14 +243,14 @@ var gb_map_gaode = (function() { | ||
| 184 | var w = gps.nbbm.length * 10; | 243 | var w = gps.nbbm.length * 10; |
| 185 | m.setIcon(new AMap.Icon({ | 244 | m.setIcon(new AMap.Icon({ |
| 186 | size: new AMap.Size(w, 25), | 245 | size: new AMap.Size(w, 25), |
| 187 | - image: iMap.createCarIcon(gps, w) | 246 | + image: gb_map_imap.createCarIcon(gps, w) |
| 188 | })); | 247 | })); |
| 189 | 248 | ||
| 190 | if(m.infoWindow.getIsOpen()) | 249 | if(m.infoWindow.getIsOpen()) |
| 191 | openWindow(m); | 250 | openWindow(m); |
| 192 | } | 251 | } |
| 193 | 252 | ||
| 194 | - //隐藏线路线条 | 253 | +/* //隐藏线路线条 |
| 195 | function hideLinePolyline(){ | 254 | function hideLinePolyline(){ |
| 196 | if(!linePolyline || linePolyline.length == 0) | 255 | if(!linePolyline || linePolyline.length == 0) |
| 197 | return; | 256 | return; |
| @@ -199,9 +258,9 @@ var gb_map_gaode = (function() { | @@ -199,9 +258,9 @@ var gb_map_gaode = (function() { | ||
| 199 | $.each(linePolyline, function(){ | 258 | $.each(linePolyline, function(){ |
| 200 | this.setOptions({strokeOpacity: 0}); | 259 | this.setOptions({strokeOpacity: 0}); |
| 201 | }); | 260 | }); |
| 202 | - } | 261 | + }*/ |
| 203 | 262 | ||
| 204 | - //显示线路线条 | 263 | +/* //显示线路线条 |
| 205 | function showLinePolyline(){ | 264 | function showLinePolyline(){ |
| 206 | if(!linePolyline || linePolyline.length == 0) | 265 | if(!linePolyline || linePolyline.length == 0) |
| 207 | return; | 266 | return; |
| @@ -210,14 +269,16 @@ var gb_map_gaode = (function() { | @@ -210,14 +269,16 @@ var gb_map_gaode = (function() { | ||
| 210 | $.each(linePolyline, function(){ | 269 | $.each(linePolyline, function(){ |
| 211 | this.setOptions({strokeOpacity: 0.5}); | 270 | this.setOptions({strokeOpacity: 0.5}); |
| 212 | }); | 271 | }); |
| 213 | - } | 272 | + }*/ |
| 214 | 273 | ||
| 215 | function openWindow(marker){ | 274 | function openWindow(marker){ |
| 216 | - marker.gpsData.fromNow = moment(marker.gpsData.timestamp).fromNow(); | ||
| 217 | - /*var infoWindow = new AMap.InfoWindow({ | ||
| 218 | - content: template('gps_info_win_temp', marker.gpsData) | ||
| 219 | - });*/ | ||
| 220 | - marker.infoWindow.setContent(template('gps_info_win_temp', marker.gpsData)); | 275 | + var gps = marker.gpsData; |
| 276 | + //线路名 | ||
| 277 | + gps.lineName = gb_data_basic.lineCode2NameAll()[gps.lineId]; | ||
| 278 | + //时间 | ||
| 279 | + gps.dateStr = moment(gps.timestamp).format('YYYY-MM-DD HH:mm:ss'); | ||
| 280 | +//{size: AMap.Size(290,255)} | ||
| 281 | + marker.infoWindow.setContent(gb_map_overlay_mge.map_gps_win_temp(gps)); | ||
| 221 | marker.infoWindow.open(map, marker.getPosition()); | 282 | marker.infoWindow.open(map, marker.getPosition()); |
| 222 | } | 283 | } |
| 223 | 284 |
src/main/resources/static/real_control_v2/mapmonitor/js/map_overlay_manager.js
| 1 | -var gb_map_overlay_mge=(function () { | 1 | +var gb_map_overlay_mge = (function () { |
| 2 | 2 | ||
| 3 | + var storage = window.localStorage; | ||
| 3 | 4 | ||
| 4 | - var gpsRefresh=function(addArr, upArr, upDownChange) { | ||
| 5 | - //console.log('1111111', addArr, upArr, upDownChange); | 5 | + var temps; |
| 6 | + $.get('/real_control_v2/mapmonitor/fragments/map_infowindow.html', function (dom) { | ||
| 7 | + temps = gb_common.compileTempByDom(dom, {compress: true}); | ||
| 8 | + }); | ||
| 9 | + | ||
| 10 | + var gpsRefresh = function (addArr, upArr, upDownChange) { | ||
| 11 | + //如果地图正在重绘,暂时不刷新GPS | ||
| 12 | + if(reDrawing) | ||
| 13 | + return; | ||
| 6 | var all = addArr.concat(upArr).concat(upDownChange); | 14 | var all = addArr.concat(upArr).concat(upDownChange); |
| 7 | gpsRefreshAll(all); | 15 | gpsRefreshAll(all); |
| 8 | 16 | ||
| 9 | }; | 17 | }; |
| 10 | 18 | ||
| 11 | - var gpsRefreshAll=function (all) { | ||
| 12 | - gb_map_imap.call('drawRealGpsMarker', {gpsList: all, coordTransform: true}); | 19 | + var gpsRefreshAll = function (allList) { |
| 20 | + gb_map_imap.call('drawRealGpsMarker', {gpsList: allList}); | ||
| 13 | }; | 21 | }; |
| 14 | 22 | ||
| 15 | - if(gb_data_gps){ | ||
| 16 | - //如果是嵌入线调,注册GPS刷新事件 | ||
| 17 | - gb_data_gps.registerCallback(gpsRefresh); | 23 | + var deviceFilter = function (node) { |
| 24 | + return node.a_attr && node.a_attr.type=='device'; | ||
| 25 | + }; | ||
| 26 | + | ||
| 27 | + //绘制线路走向 | ||
| 28 | + var drawAllSection=function () { | ||
| 29 | + //绘制线路走向 | ||
| 30 | + var lines=JSON.parse(storage.getItem('lineControlItems')); | ||
| 31 | + $.each(lines, function () { | ||
| 32 | + //从storage里获取路由数据 | ||
| 33 | + var lineCode=this.lineCode; | ||
| 34 | + var route = JSON.parse(storage.getItem(lineCode + '_route')); | ||
| 35 | + //上行 | ||
| 36 | + gb_map_imap.call('drawLine', { | ||
| 37 | + route: route, | ||
| 38 | + style: {strokeWeight:6, strokeColor: gb_map_config.getConfig().section.color.up}, | ||
| 39 | + id: lineCode+'_0', | ||
| 40 | + upDown: 0, | ||
| 41 | + hide: true | ||
| 42 | + }); | ||
| 43 | + //下行 | ||
| 44 | + gb_map_imap.call('drawLine', { | ||
| 45 | + route: route, | ||
| 46 | + style: {strokeWeight:6, strokeColor: gb_map_config.getConfig().section.color.down}, | ||
| 47 | + id: lineCode+'_1', | ||
| 48 | + upDown: 1, | ||
| 49 | + hide: true | ||
| 50 | + }); | ||
| 51 | + | ||
| 52 | + }); | ||
| 53 | + }; | ||
| 54 | + | ||
| 55 | + //根据选中项显示路段 | ||
| 56 | + var showSection = function (chs) { | ||
| 57 | + var idx = {}; | ||
| 58 | + $.each(chs, function () { | ||
| 59 | + idx[this.data.lineId+'_'+this.data.upDown]=1; | ||
| 60 | + }); | ||
| 61 | + | ||
| 62 | + gb_map_imap.call('refreshPolyline', {idx: gb_common.get_keys(idx)}); | ||
| 63 | + }; | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + //是否正在重绘 | ||
| 67 | + var reDrawing; | ||
| 68 | + var reDraw = function () { | ||
| 69 | + reDrawing = true; | ||
| 70 | + | ||
| 71 | + gb_map_imap.call('clearAll'); | ||
| 72 | + | ||
| 73 | + drawAllSection(); | ||
| 74 | + //初始绘制 | ||
| 75 | + gpsRefreshAll(gb_common.get_vals(gb_data_gps.allGps)); | ||
| 76 | + | ||
| 77 | + showOverlayByChecks(); | ||
| 78 | + //显示路段 | ||
| 79 | + showSection(getCheckedDevice()); | ||
| 80 | + | ||
| 81 | + reDrawing = false; | ||
| 18 | } | 82 | } |
| 19 | 83 | ||
| 20 | - return {}; | 84 | + var init = function () { |
| 85 | + reDraw(); | ||
| 86 | + //注册GPS刷新事件 | ||
| 87 | + gb_data_gps.registerCallback(gpsRefresh); | ||
| 88 | + }; | ||
| 89 | + | ||
| 90 | + | ||
| 91 | + var showOverlayByChecks = function () { | ||
| 92 | + var chs = getCheckedDevice(),chsMap={}; | ||
| 93 | + $.each(chs, function () { | ||
| 94 | + chsMap[this.a_attr.device]=true; | ||
| 95 | + }); | ||
| 96 | + | ||
| 97 | + gb_map_imap.call('showGpsMarker', {chs: chsMap}); | ||
| 98 | + | ||
| 99 | + //路段 | ||
| 100 | + showSection(chs); | ||
| 101 | + | ||
| 102 | + }; | ||
| 103 | + | ||
| 104 | + var _focus = function (deviceId) { | ||
| 105 | + gb_map_imap.call('goToMarker', {deviceId: deviceId}); | ||
| 106 | + //打开信息窗口 | ||
| 107 | + gb_map_imap.call('openWindow',{deviceId: deviceId}); | ||
| 108 | + }; | ||
| 109 | + | ||
| 110 | + function getCheckedDevice() { | ||
| 111 | + return gb_map_gps_tree.getChecked().filter(deviceFilter); | ||
| 112 | + } | ||
| 113 | + return { | ||
| 114 | + init: init, | ||
| 115 | + refresh: showOverlayByChecks, | ||
| 116 | + _focus: _focus, | ||
| 117 | + map_gps_win_temp: function (data) { | ||
| 118 | + return temps['map-win-gps-detail-temp'](data); | ||
| 119 | + }, | ||
| 120 | + reDraw: reDraw, | ||
| 121 | + getCheckedDevice: getCheckedDevice | ||
| 122 | + }; | ||
| 21 | })(); | 123 | })(); |
| 22 | \ No newline at end of file | 124 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/js/real.js
| @@ -5,56 +5,21 @@ var mapmonitor_load_ep = EventProxy.create('load_iMap', 'load_baidu', 'load_gaod | @@ -5,56 +5,21 @@ var mapmonitor_load_ep = EventProxy.create('load_iMap', 'load_baidu', 'load_gaod | ||
| 5 | .addMap('gaode', '高德地图', gb_map_gaode) | 5 | .addMap('gaode', '高德地图', gb_map_gaode) |
| 6 | .call('init'); | 6 | .call('init'); |
| 7 | 7 | ||
| 8 | - //设备树 | ||
| 9 | - var treeData = gb_common.get_device_tree_data(); | ||
| 10 | - _tree = $('.real_right_gps_panel .gps_tree_list') | ||
| 11 | - .on('loaded.jstree', function () { | ||
| 12 | - _tree.jstree(true).open_all(); | ||
| 13 | - //删掉tree node a标签的 href值(不然鼠标悬停浏览器会出现状态条) | ||
| 14 | - $('.gps_tree_list .jstree-container-ul a.jstree-anchor').removeAttr('href'); | ||
| 15 | - }) | ||
| 16 | - .jstree({ | ||
| 17 | - 'core': { | ||
| 18 | - 'data': treeData | ||
| 19 | - }, | ||
| 20 | - 'checkbox': { | ||
| 21 | - 'keep_selected_style': false, | ||
| 22 | - 'whole_node': false, | ||
| 23 | - 'tie_selection': false | ||
| 24 | - }, | ||
| 25 | - 'contextmenu':{ | ||
| 26 | - 'items': { | ||
| 27 | - '轨迹回放':{ | ||
| 28 | - 'label': '轨迹回放', | ||
| 29 | - 'action': function (data) { | ||
| 30 | - console.log('action', data); | ||
| 31 | - } | ||
| 32 | - }, | ||
| 33 | - '发送指令':{ | ||
| 34 | - 'label': '发送指令', | ||
| 35 | - 'action': function (data) { | ||
| 36 | - console.log('action', data); | ||
| 37 | - } | ||
| 38 | - } | ||
| 39 | - } | ||
| 40 | - }, | ||
| 41 | - 'plugins': ['checkbox', 'contextmenu', 'state'] | ||
| 42 | - }); | 8 | + //init config form |
| 9 | + gb_map_config.init(); | ||
| 10 | + | ||
| 11 | + //init tree | ||
| 12 | + gb_map_gps_tree.init(function () { | ||
| 13 | + gb_map_overlay_mge.init(); | ||
| 14 | + gb_map_spatial_data.init(); | ||
| 15 | + }); | ||
| 43 | 16 | ||
| 44 | $(".real_bottom_panel").resizable({ | 17 | $(".real_bottom_panel").resizable({ |
| 45 | handles: { | 18 | handles: { |
| 46 | 'n': '.real_bottom_panel #handle' | 19 | 'n': '.real_bottom_panel #handle' |
| 47 | }, | 20 | }, |
| 48 | maxHeight: 650, | 21 | maxHeight: 650, |
| 49 | - minHeight: 70 | ||
| 50 | - }); | ||
| 51 | - | ||
| 52 | - $(".color_block").spectrum({ | ||
| 53 | - color: "#f00", | ||
| 54 | - showInput: true, | ||
| 55 | - chooseText: "确定", | ||
| 56 | - cancelText: "取消", | ||
| 57 | - preferredFormat: "hex" | 22 | + minHeight: 18 |
| 58 | }); | 23 | }); |
| 59 | }); | 24 | }); |
| 60 | 25 | ||
| @@ -63,9 +28,7 @@ var gb_map_consts = { | @@ -63,9 +28,7 @@ var gb_map_consts = { | ||
| 63 | center_point: { | 28 | center_point: { |
| 64 | lng: 121.544336, | 29 | lng: 121.544336, |
| 65 | lat: 31.221315 | 30 | lat: 31.221315 |
| 66 | - }, | ||
| 67 | - allGps: {}, | ||
| 68 | - trafficBtn: '' //实时路况按钮 | 31 | + } |
| 69 | }; | 32 | }; |
| 70 | 33 | ||
| 71 | //Canvas 带圆角的矩形 | 34 | //Canvas 带圆角的矩形 |
src/main/resources/static/real_control_v2/mapmonitor/js/spatial_data.js
0 → 100644
| 1 | +/** 空间数据 */ | ||
| 2 | + | ||
| 3 | +var gb_map_spatial_data = (function () { | ||
| 4 | + | ||
| 5 | + var storage = window.localStorage; | ||
| 6 | + | ||
| 7 | + var activeLines = JSON.parse(storage.getItem('lineControlItems')); | ||
| 8 | + var line_idx = (function () { | ||
| 9 | + var str = ''; | ||
| 10 | + for (var i = 0, item; item = activeLines[i++];) { | ||
| 11 | + str += (',' + item.lineCode); | ||
| 12 | + } | ||
| 13 | + return str.substr(1); | ||
| 14 | + })(); | ||
| 15 | + | ||
| 16 | + //线路站点路由数据 | ||
| 17 | + var lineStationArr; | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + var init = function () { | ||
| 21 | + gb_common.$get('/realMap/stationSpatialData', {idx: line_idx}, function (rs) { | ||
| 22 | + var list = rs.list; | ||
| 23 | + //排序 | ||
| 24 | + list.sort(function (a, b) { | ||
| 25 | + return a.stationRouteCode - b.stationRouteCode; | ||
| 26 | + }); | ||
| 27 | + //按线路分组 | ||
| 28 | + lineStationArr = gb_common.groupBy(list, 'lineCode'); | ||
| 29 | + //再按上下行分组 | ||
| 30 | + for (var lineCode in lineStationArr) { | ||
| 31 | + lineStationArr[lineCode] = gb_common.groupBy(lineStationArr[lineCode], 'directions'); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + refresh(); | ||
| 35 | + }); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + var refresh = function () { | ||
| 39 | + if (!triggerElem()) | ||
| 40 | + return; | ||
| 41 | + | ||
| 42 | + //绘制站点路由树 | ||
| 43 | + $('.station-route-tree').jstree({ | ||
| 44 | + 'core': { | ||
| 45 | + 'data': get_st_route_tree_data() | ||
| 46 | + }, | ||
| 47 | + 'checkbox': { | ||
| 48 | + 'keep_selected_style': false, | ||
| 49 | + 'whole_node': false, | ||
| 50 | + 'tie_selection': false | ||
| 51 | + }, | ||
| 52 | + 'plugins': ['checkbox', 'state'] | ||
| 53 | + }); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + var triggerElem = function () { | ||
| 57 | + var config = gb_map_config.getConfig().spatialData | ||
| 58 | + , elem = $('.real_spatial_panel'); | ||
| 59 | + | ||
| 60 | + for (var att in config) { | ||
| 61 | + if (config[att]) { | ||
| 62 | + elem.show(); | ||
| 63 | + return true; | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + elem.hide(); | ||
| 67 | + return false; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + var get_st_route_tree_data = function () { | ||
| 71 | + var treeData = []; | ||
| 72 | + | ||
| 73 | + for (var lineCode in lineStationArr) { | ||
| 74 | + name = gb_data_basic.codeToLine[lineCode].name; | ||
| 75 | + treeData.push({ | ||
| 76 | + 'text': name, | ||
| 77 | + 'children': [ | ||
| 78 | + { | ||
| 79 | + 'text': '上行', | ||
| 80 | + 'children': grabs(lineStationArr[lineCode][0]), | ||
| 81 | + }, | ||
| 82 | + { | ||
| 83 | + 'text': '下行', | ||
| 84 | + 'children': grabs(lineStationArr[lineCode][1]), | ||
| 85 | + } | ||
| 86 | + ] | ||
| 87 | + }) | ||
| 88 | + } | ||
| 89 | + return treeData; | ||
| 90 | + }; | ||
| 91 | + | ||
| 92 | + var grabs = function (array) { | ||
| 93 | + if (!array) | ||
| 94 | + return; | ||
| 95 | + var rs = []; | ||
| 96 | + $.each(array, function () { | ||
| 97 | + rs.push({ | ||
| 98 | + 'text': this.stationName, | ||
| 99 | + 'data': {}, | ||
| 100 | + 'icon': false | ||
| 101 | + }); | ||
| 102 | + }); | ||
| 103 | + return rs; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + return { | ||
| 107 | + refresh: refresh, | ||
| 108 | + init: init | ||
| 109 | + }; | ||
| 110 | +})(); | ||
| 0 | \ No newline at end of file | 111 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/real.html
| 1 | <link href="/assets/css/TrafficControl.css" rel="stylesheet"/> | 1 | <link href="/assets/css/TrafficControl.css" rel="stylesheet"/> |
| 2 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css"/> | 2 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css"/> |
| 3 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/spectrum/spectrum.css"/> | 3 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/spectrum/spectrum.css"/> |
| 4 | - | ||
| 5 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/form-advanced.gradient.min.css"/> | 4 | <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/form-advanced.gradient.min.css"/> |
| 6 | <link rel="stylesheet" href="/real_control_v2/mapmonitor/css/real.css"/> | 5 | <link rel="stylesheet" href="/real_control_v2/mapmonitor/css/real.css"/> |
| 7 | 6 | ||
| 8 | <div class="map-system-msg"> | 7 | <div class="map-system-msg"> |
| 9 | - <a class="z-depth-2" href="/pages/mapmonitor/alone/wrap.html" target="_blank">当前地图模块正在维护升级,点这里打开原版地图。</a> | 8 | + <a class="z-depth-2" href="/pages/mapmonitor/alone/wrap.html" target="_blank"><i style="transform: rotate(90deg);" class="uk-icon-hand-pointer-o"></i> 当前地图模块正在维护升级中,请点这里打开原版地图。</a> |
| 10 | </div> | 9 | </div> |
| 11 | 10 | ||
| 12 | <div id="real_map_container"></div> | 11 | <div id="real_map_container"></div> |
| @@ -26,104 +25,28 @@ | @@ -26,104 +25,28 @@ | ||
| 26 | <div class="real_bl_cont"> | 25 | <div class="real_bl_cont"> |
| 27 | 26 | ||
| 28 | </div> | 27 | </div> |
| 29 | - <div class="real_br_cont"> | ||
| 30 | - <form class="uk-form uk-form-stacked"> | ||
| 31 | - <div class="uk-form-row"> | ||
| 32 | - <span class="uk-form-label">图层</span> | ||
| 33 | - <div class="uk-form-controls"> | ||
| 34 | - <label><input type="radio" name="map_type" checked> 百度</label> | ||
| 35 | - <label><input type="radio" name="map_type"> 高德</label> | ||
| 36 | - <label><input type="checkbox" name="map_type"> 实时路况</label> | ||
| 37 | - </div> | ||
| 38 | - </div> | ||
| 39 | - | ||
| 40 | - <div class="uk-form-row"> | ||
| 41 | - <span class="uk-form-label">空间数据</span> | ||
| 42 | - <div class="uk-form-controls"> | ||
| 43 | - <label><input type="checkbox" checked> 站点</label> | ||
| 44 | - <label><input type="checkbox" > 电子围栏</label> | ||
| 45 | - <label><input type="checkbox" > 停车场</label> | ||
| 46 | - </div> | ||
| 47 | - </div> | ||
| 48 | - | ||
| 49 | - <div class="uk-form-row"> | ||
| 50 | - <span class="uk-form-label">异常警报输出</span> | ||
| 51 | - <div class="uk-form-controls"> | ||
| 52 | - <label><input type="checkbox" checked> 超速</label> | ||
| 53 | - <label><input type="checkbox" checked> 越界</label> | ||
| 54 | - <label><input type="checkbox" > 大间隔</label> | ||
| 55 | - </div> | ||
| 56 | - </div> | ||
| 57 | - | ||
| 58 | - <div class="uk-form-row"> | ||
| 59 | - <span class="uk-form-label">车辆图标</span> | ||
| 60 | - <div class="uk-form-controls"> | ||
| 61 | - <label><input type="checkbox" > 标示角度</label> | ||
| 62 | - <label><input type="checkbox" > 聚合</label> | ||
| 63 | - </div> | ||
| 64 | - </div> | ||
| 65 | - | ||
| 66 | - <div class="uk-form-row"> | ||
| 67 | - <span class="uk-form-label">车辆颜色</span> | ||
| 68 | - <div class="uk-form-controls"> | ||
| 69 | - <div class="color_block"> | ||
| 70 | - 上行 | ||
| 71 | - <div class="sp-placeholder"> | ||
| 72 | - <div class="sp-placeholder-color" ></div> | ||
| 73 | - </div> | ||
| 74 | - </div> | ||
| 75 | - | ||
| 76 | - <div class="color_block"> | ||
| 77 | - 下行 | ||
| 78 | - <div class="sp-placeholder"> | ||
| 79 | - <div class="sp-placeholder-color" ></div> | ||
| 80 | - </div> | ||
| 81 | - </div> | ||
| 82 | - | ||
| 83 | - <div class="color_block"> | ||
| 84 | - 非营运 | ||
| 85 | - <div class="sp-placeholder"> | ||
| 86 | - <div class="sp-placeholder-color" ></div> | ||
| 87 | - </div> | ||
| 88 | - </div> | ||
| 89 | - </div> | ||
| 90 | - </div> | ||
| 91 | - | ||
| 92 | - <div class="uk-form-row"> | ||
| 93 | - <span class="uk-form-label">路段颜色</span> | ||
| 94 | - <div class="uk-form-controls"> | ||
| 95 | - <div class="color_block"> | ||
| 96 | - 上行 | ||
| 97 | - <div class="sp-placeholder"> | ||
| 98 | - <div class="sp-placeholder-color" ></div> | ||
| 99 | - </div> | ||
| 100 | - </div> | 28 | + <div class="real_br_cont map_config_wrap"> |
| 29 | + </div> | ||
| 30 | +</div> | ||
| 101 | 31 | ||
| 102 | - <div class="color_block"> | ||
| 103 | - 下行 | ||
| 104 | - <div class="sp-placeholder"> | ||
| 105 | - <div class="sp-placeholder-color" ></div> | ||
| 106 | - </div> | ||
| 107 | - </div> | ||
| 108 | - </div> | ||
| 109 | - </div> | 32 | +<div class="real_spatial_panel uk-animation-scale"> |
| 33 | + <div class="station-route-tree"> | ||
| 110 | 34 | ||
| 111 | - <br> | ||
| 112 | - </form> | ||
| 113 | </div> | 35 | </div> |
| 114 | </div> | 36 | </div> |
| 115 | 37 | ||
| 38 | +<script src="/real_control_v2/mapmonitor/js/config.js"></script> | ||
| 39 | +<script src="/real_control_v2/mapmonitor/js/gps_tree.js"></script> | ||
| 40 | +<script src="/real_control_v2/mapmonitor/js/spatial_data.js"></script> | ||
| 116 | <script src="/real_control_v2/mapmonitor/js/map_overlay_manager.js"></script> | 41 | <script src="/real_control_v2/mapmonitor/js/map_overlay_manager.js"></script> |
| 117 | <script src="/real_control_v2/mapmonitor/js/real.js"></script> | 42 | <script src="/real_control_v2/mapmonitor/js/real.js"></script> |
| 118 | <script src="/real_control_v2/mapmonitor/js/map/iMap.js"></script> | 43 | <script src="/real_control_v2/mapmonitor/js/map/iMap.js"></script> |
| 119 | <script src="/real_control_v2/mapmonitor/js/map/platform/baidu.js"></script> | 44 | <script src="/real_control_v2/mapmonitor/js/map/platform/baidu.js"></script> |
| 120 | <script src="/real_control_v2/mapmonitor/js/map/platform/gaode.js"></script> | 45 | <script src="/real_control_v2/mapmonitor/js/map/platform/gaode.js"></script> |
| 121 | - | ||
| 122 | <!-- jquery ui --> | 46 | <!-- jquery ui --> |
| 123 | <script src="/real_control_v2/assets/plugins/jquery.ui/core.js"></script> | 47 | <script src="/real_control_v2/assets/plugins/jquery.ui/core.js"></script> |
| 124 | <script src="/real_control_v2/assets/plugins/jquery.ui/widget.js"></script> | 48 | <script src="/real_control_v2/assets/plugins/jquery.ui/widget.js"></script> |
| 125 | <script src="/real_control_v2/assets/plugins/jquery.ui/mouse.js"></script> | 49 | <script src="/real_control_v2/assets/plugins/jquery.ui/mouse.js"></script> |
| 126 | <script src="/real_control_v2/assets/plugins/jquery.ui/resizable.js"></script> | 50 | <script src="/real_control_v2/assets/plugins/jquery.ui/resizable.js"></script> |
| 127 | - | ||
| 128 | - | 51 | +<!-- 颜色选择器 --> |
| 129 | <script src="/real_control_v2/assets/plugins/spectrum/spectrum.js"></script> | 52 | <script src="/real_control_v2/assets/plugins/spectrum/spectrum.js"></script> |
| 130 | \ No newline at end of file | 53 | \ No newline at end of file |
src/main/resources/static/real_control_v2/mapmonitor/real_monitor/js/map/platform/baidu.js
| @@ -184,7 +184,7 @@ var gb_map_baidu = (function(){ | @@ -184,7 +184,7 @@ var gb_map_baidu = (function(){ | ||
| 184 | }; | 184 | }; |
| 185 | 185 | ||
| 186 | var bd_gps_info_win_opts = { | 186 | var bd_gps_info_win_opts = { |
| 187 | - width : 190, | 187 | + width : 150, |
| 188 | height: 255, | 188 | height: 255, |
| 189 | enableMessage:true | 189 | enableMessage:true |
| 190 | }; | 190 | }; |