Commit 83b1ec28c91ab04397a2a1fb94724caabf9439cf

Authored by yiming
2 parents 04adac8d a16f9bfa

Merge remote-tracking branch 'origin/minhang_2024_04' into minhang_2024_04

src/main/java/com/bsth/common/Constants.java
... ... @@ -42,6 +42,7 @@ public class Constants {
42 42 public static final String COMPANY_AUTHORITYS = "cmyAuths";
43 43 public static final String STATION_AND_SECTION_COUNT = "/station/updateStationAndSectionCode";
44 44  
  45 + public static final String OUT_URL = "/out/**";
45 46 /**
46 47 * 解除调度指令和班次的外键约束
47 48 */
... ...
src/main/java/com/bsth/controller/zndd/DKlController.java 0 → 100644
  1 +package com.bsth.controller.zndd;
  2 +
  3 +
  4 +import com.bsth.controller.BaseController;
  5 +import com.bsth.entity.DKLInfo;
  6 +import com.bsth.service.DKLInfoService;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.web.bind.annotation.PathVariable;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestMethod;
  11 +import org.springframework.web.bind.annotation.RestController;
  12 +
  13 +@RestController
  14 +@RequestMapping("dkl_logger")
  15 +public class DKlController extends BaseController<DKLInfo, Integer> {
  16 +
  17 + @Autowired
  18 + DKLInfoService DKLInfoService;
  19 +
  20 + @RequestMapping(value = "updatedkl/{id}", method = RequestMethod.POST)
  21 + public int updatedkl(@PathVariable("id") Integer id){
  22 + return DKLInfoService.updatedkl(id);
  23 + }
  24 +}
... ...
src/main/java/com/bsth/data/zndd/OutEntrance.java 0 → 100644
  1 +package com.bsth.data.zndd;
  2 +
  3 +import com.alibaba.fastjson.JSONArray;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.bsth.common.ResponseCode;
  6 +import com.bsth.data.BasicData;
  7 +import com.bsth.data.schedule.DayOfSchedule;
  8 +import com.bsth.entity.DKLInfo;
  9 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  10 +import com.bsth.service.DKLInfoService;
  11 +import com.bsth.util.SignUtils;
  12 +import com.bsth.websocket.handler.SendUtils;
  13 +import org.slf4j.Logger;
  14 +import org.slf4j.LoggerFactory;
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.dao.DataAccessException;
  17 +import org.springframework.jdbc.core.JdbcTemplate;
  18 +import org.springframework.web.bind.annotation.*;
  19 +
  20 +import java.util.*;
  21 +
  22 +/**
  23 + * 对外接口
  24 + * 与站牌、小程序对接接口
  25 + * 调度预案通用接口
  26 + */
  27 +@RestController
  28 +@RequestMapping("/out")
  29 +public class OutEntrance {
  30 +
  31 + @Autowired
  32 + SendUtils sendUtils;
  33 + @Autowired
  34 + DayOfSchedule dayOfSchedule;
  35 +
  36 + @Autowired
  37 + private DKLInfoService dklInfoService;
  38 +
  39 + Logger logger = LoggerFactory.getLogger(this.getClass());
  40 +
  41 + @Autowired
  42 + JdbcTemplate jdbcTemplate;
  43 +
  44 +
  45 + @RequestMapping(value = "/klyj", method = RequestMethod.POST)
  46 + public Map klyj(@RequestBody JSONObject jsonObject) {
  47 + Map rtn = new HashMap<>();
  48 + try {
  49 + logger.info("大客流接口调用----");
  50 + if(!SignUtils.validation(Long.parseLong(jsonObject.getString("timestamp")),jsonObject.getString("sign"))){
  51 + rtn.put("status", "验证失败");
  52 + return rtn;
  53 + }
  54 + String num=jsonObject.getString("num");
  55 + JSONArray jsonArray = jsonObject.getJSONArray("stations");
  56 + for (int i = 0; i < jsonArray.size(); i++) {
  57 + JSONObject line=jsonArray.getJSONObject(i);
  58 + String lineCode = line.get("lineCode").toString();
  59 + String stationCode = line.get("stationCode").toString();
  60 + String dir = line.get("dir").toString();
  61 + String lineName=BasicData.lineCode2NameMap.get(lineCode);
  62 + String stationName=BasicData.stationCode2NameMap.get(lineCode+"_"+dir+"_"+stationCode);
  63 +
  64 + DKLInfo dklInfo =new DKLInfo();
  65 + dklInfo.setLineCode(lineCode);
  66 + dklInfo.setLineName(lineName);
  67 + dklInfo.setStationCode(stationCode);
  68 + dklInfo.setStationName(stationName);
  69 + dklInfo.setNum(Integer.parseInt(num));
  70 + dklInfo.setUpDown(dir);
  71 + dklInfoService.save(dklInfo);
  72 +
  73 + Map m = new HashMap();
  74 + m.put("stationCode", stationCode);
  75 + m.put("lineCode", lineCode);
  76 + m.put("stationName",stationName);
  77 + m.put("lineName",lineName);
  78 + m.put("num",num);
  79 + m.put("xlDir",dir);
  80 + sendUtils.klyj(m);//推送
  81 + }
  82 + rtn.put("status",ResponseCode.SUCCESS);
  83 + } catch (Exception e) {
  84 + rtn.put("err", ResponseCode.ERROR);
  85 + logger.error("",e);
  86 + }
  87 + return rtn;
  88 + }
  89 +
  90 +
  91 +
  92 + //调度获取站台视频
  93 + @RequestMapping(value = "/getStationVideo", method = RequestMethod.GET)
  94 + public String getStationVideo(@RequestParam Map m) {
  95 + if (m.get("lineCode")==null || m.get("upDown")==null){
  96 + return null;
  97 + }
  98 + String sql="select url from station_video where line_code ='"+m.get("lineCode")+"' and up_down ='"+m.get("upDown")+"'";
  99 + String url= null;
  100 + try {
  101 + url = jdbcTemplate.queryForObject(sql,String.class);
  102 + } catch (DataAccessException e) {
  103 + return null;
  104 + }
  105 + return url;
  106 + }
  107 +
  108 +
  109 +}
... ...
src/main/java/com/bsth/entity/DKLInfo.java 0 → 100644
  1 +package com.bsth.entity;
  2 +
  3 +import javax.persistence.*;
  4 +import java.util.Date;
  5 +
  6 +
  7 +@Entity
  8 +@Table(name = "dkl_info")
  9 +public class DKLInfo {
  10 +
  11 + // ID
  12 + @Id
  13 + @GeneratedValue(strategy = GenerationType.IDENTITY)
  14 + private Integer id;
  15 +
  16 + private String lineCode;
  17 +
  18 + private String lineName;
  19 +
  20 + private String stationCode;
  21 +
  22 + private String stationName;
  23 +
  24 + private int num;
  25 +
  26 + private String upDown;
  27 +
  28 + private String image;
  29 +
  30 + private String status;
  31 +
  32 + // 创建日期
  33 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  34 + private Date createDate;
  35 +
  36 +
  37 + public Integer getId() {
  38 + return id;
  39 + }
  40 +
  41 + public void setId(Integer id) {
  42 + this.id = id;
  43 + }
  44 +
  45 + public String getLineCode() {
  46 + return lineCode;
  47 + }
  48 +
  49 + public void setLineCode(String lineCode) {
  50 + this.lineCode = lineCode;
  51 + }
  52 +
  53 + public String getLineName() {
  54 + return lineName;
  55 + }
  56 +
  57 + public void setLineName(String lineName) {
  58 + this.lineName = lineName;
  59 + }
  60 +
  61 + public String getStationCode() {
  62 + return stationCode;
  63 + }
  64 +
  65 + public void setStationCode(String stationCode) {
  66 + this.stationCode = stationCode;
  67 + }
  68 +
  69 + public String getStationName() {
  70 + return stationName;
  71 + }
  72 +
  73 + public void setStationName(String stationName) {
  74 + this.stationName = stationName;
  75 + }
  76 +
  77 + public int getNum() {
  78 + return num;
  79 + }
  80 +
  81 + public void setNum(int num) {
  82 + this.num = num;
  83 + }
  84 +
  85 + public String getUpDown() {
  86 + return upDown;
  87 + }
  88 +
  89 + public void setUpDown(String upDown) {
  90 + this.upDown = upDown;
  91 + }
  92 +
  93 + public String getImage() {
  94 + return image;
  95 + }
  96 +
  97 + public void setImage(String image) {
  98 + this.image = image;
  99 + }
  100 +
  101 + public Date getCreateDate() {
  102 + return createDate;
  103 + }
  104 +
  105 + public void setCreateDate(Date createDate) {
  106 + this.createDate = createDate;
  107 + }
  108 +
  109 + public String getStatus() {
  110 + return status;
  111 + }
  112 +
  113 + public void setStatus(String status) {
  114 + this.status = status;
  115 + }
  116 +}
... ...
src/main/java/com/bsth/filter/BaseFilter.java
... ... @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter {
17 17 * 白名单
18 18 */
19 19 private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE,
20   - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT,Constants.XIANDIAO_LOGIN ,Constants.IPAD_IMG_URL};
  20 + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT,Constants.XIANDIAO_LOGIN ,Constants.IPAD_IMG_URL,Constants.OUT_URL};
21 21  
22 22 @Override
23 23 public void destroy() {
... ...
src/main/java/com/bsth/repository/DKLInfoRepository.java 0 → 100644
  1 +package com.bsth.repository;
  2 +
  3 +import com.bsth.entity.DKLInfo;
  4 +import org.springframework.data.jpa.repository.Modifying;
  5 +import org.springframework.data.jpa.repository.Query;
  6 +import org.springframework.stereotype.Repository;
  7 +import org.springframework.transaction.annotation.Transactional;
  8 +
  9 +
  10 +@Repository
  11 +public interface DKLInfoRepository extends BaseRepository<DKLInfo, Integer> {
  12 +
  13 + @Transactional
  14 + @Modifying
  15 + @Query(value = "UPDATE DKLInfo t set t.status=?2 WHERE t.id = ?1")
  16 + public void update(Integer id, String t);
  17 +}
... ...
src/main/java/com/bsth/security/WebSecurityConfig.java
... ... @@ -36,7 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
36 36 public void configure(WebSecurity web) throws Exception {
37 37 // 白名单
38 38 web.ignoring().antMatchers(Constants.LOGIN_PAGE, Constants.LOGIN, Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.CAPTCHA,
39   - Constants.SERVICE_INTERFACE, Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT);
  39 + Constants.SERVICE_INTERFACE, Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT,Constants.OUT_URL);
40 40 }
41 41  
42 42 @Override
... ...
src/main/java/com/bsth/security/filter/LoginInterceptor.java
... ... @@ -33,7 +33,7 @@ public class LoginInterceptor implements Filter {
33 33 * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证
34 34 */
35 35 private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE,
36   - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT,Constants.XIANDIAO_LOGIN,Constants.IPAD_IMG_URL };
  36 + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT,Constants.XIANDIAO_LOGIN,Constants.IPAD_IMG_URL,Constants.OUT_URL };
37 37  
38 38  
39 39 @Override
... ...
src/main/java/com/bsth/service/DKLInfoService.java 0 → 100644
  1 +package com.bsth.service;
  2 +
  3 +import com.bsth.entity.DKLInfo;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +
  7 +public interface DKLInfoService extends BaseService<DKLInfo, Integer> {
  8 +
  9 + public int updatedkl(Integer id);
  10 +}
... ...
src/main/java/com/bsth/service/impl/DKLInfoServiceImpl.java 0 → 100644
  1 +package com.bsth.service.impl;
  2 +
  3 +import com.bsth.entity.DKLInfo;
  4 +import com.bsth.repository.DKLInfoRepository;
  5 +import com.bsth.service.DKLInfoService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +
  10 +@Service
  11 +public class DKLInfoServiceImpl extends BaseServiceImpl<DKLInfo, Integer> implements DKLInfoService {
  12 +
  13 + @Autowired
  14 + DKLInfoRepository DKLInfoRepository;
  15 + public int updatedkl(Integer id){
  16 +
  17 + DKLInfoRepository.update(id,"1");
  18 + return 0;
  19 +
  20 + }
  21 +
  22 +}
... ...
src/main/java/com/bsth/util/SignUtils.java 0 → 100644
  1 +package com.bsth.util;
  2 +
  3 +import com.bsth.service.schedule.utils.Md5Util;
  4 +
  5 +public class SignUtils {
  6 +
  7 + private static final String PASSWORD="e126853c7f6f43b4857fa8dfe3b28b5d90be9e68";
  8 + public static boolean validation(long timestamp,String sign){
  9 + String md5String= Md5Util.getMd5(timestamp+PASSWORD);
  10 + if(!md5String.equals(sign)){
  11 + return false;
  12 + }
  13 + if(System.currentTimeMillis()-timestamp>60*1000){
  14 + return false;
  15 + }
  16 + return true;
  17 + }
  18 +}
... ...
src/main/java/com/bsth/websocket/handler/SendUtils.java
... ... @@ -218,6 +218,19 @@ public class SendUtils{
218 218 }
219 219 }
220 220  
  221 + public void klyj(Map<String, Object> cp) {
  222 + Map<String, Object> map = new HashMap<>();
  223 + map.put("fn", "klyj");
  224 + map.put("data", cp);
  225 + ObjectMapper mapper = new ObjectMapper();
  226 +
  227 + try {
  228 + socketHandler.sendMessageToLine(cp.get("lineCode").toString(), mapper.writeValueAsString(map));
  229 + } catch (JsonProcessingException e) {
  230 + logger.error("sendContingencyPlan", e);
  231 + }
  232 + }
  233 +
221 234 /**
222 235 * 将车辆异常停车发送至线调页面
223 236 */
... ...
src/main/resources/static/pages/forms/zndd/logger_dkl.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>客流记录</h1>
  22 + </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 +
  31 + <div style="display: inline-block;margin-left: 33px;">
  32 + <span class="item-label" style="width: 80px;">线路: </span>
  33 + <select class="form-control" name="line" id="line" style="width: 180px;">
  34 + <option value="">请选择线路...</option>
  35 + </select>
  36 + </div>
  37 + <div style="display: inline-block;margin-left: 24px;">
  38 + <span class="item-label" style="width: 80px;">&nbsp;开始时间: </span>
  39 + <input class="form-control" type="text" id="startDate" style="width: 180px;"/>
  40 + </div>
  41 +
  42 + <div style="display: inline-block;margin-left: 24px;">
  43 + <span class="item-label" style="width: 80px;">&nbsp;结束时间: </span>
  44 + <input class="form-control" type="text" id="endDate" style="width: 180px;"/>
  45 + </div>
  46 +
  47 + <!-- <div style="display: inline-block;margin-left: 24px;">
  48 + <span class="item-label" style="width: 80px;">&nbsp;时间: </span>
  49 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  50 + </div>-->
  51 + <div class="form-group">
  52 + <input class="btn btn-default" type="button" id="query" value="筛选"/><!--
  53 + <input class="btn btn-default" type="button" id="export" value="导出"/>-->
  54 + </div>
  55 + </form>
  56 + </div>
  57 + <div class="portlet-body">
  58 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  59 + <table class="table table-bordered table-hover table-checkable" id="forms">
  60 + <thead>
  61 + <tr>
  62 + <th colspan="7">智能调度执行记录</th>
  63 + </tr>
  64 +
  65 + <tr>
  66 + <td>线路名称</td>
  67 + <td>站点名称</td>
  68 + <td>方向</td>
  69 + <td>人数</td>
  70 + <td>生成班次</td>
  71 + <td>发现时间</td>
  72 + </tr>
  73 + </thead>
  74 + <tbody id="tbody">
  75 +
  76 + </tbody>
  77 + </table>
  78 + </div>
  79 + </div>
  80 + </div>
  81 + </div>
  82 +</div>
  83 +
  84 +<script>
  85 + $(function(){
  86 +
  87 + // 关闭左侧栏
  88 + if (!$('body').hasClass('page-sidebar-closed'))
  89 + $('.menu-toggler.sidebar-toggler').click();
  90 +
  91 + $("#startDate").datetimepicker({
  92 + format : 'YYYY-MM-DD',
  93 + locale : 'zh-cn'
  94 + });
  95 +
  96 + $("#endDate").datetimepicker({
  97 + format : 'YYYY-MM-DD',
  98 + locale : 'zh-cn'
  99 + });
  100 + var fage=false;
  101 + var xlList;
  102 + var obj = [];
  103 +
  104 +
  105 + $.get('/report/lineList',function(result){
  106 + xlList=result;
  107 + $.get('/user/companyData', function(result){
  108 + obj = result;
  109 + var options = '';
  110 + for(var i = 0; i < obj.length; i++){
  111 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  112 + }
  113 +
  114 + if(obj.length ==0){
  115 + $("#gsdmDiv_daily").css('display','none');
  116 + }else if(obj.length ==1){
  117 + $("#gsdmDiv_daily").css('display','none');
  118 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  119 + $('#fgsdmDiv_daily').css('display','none');
  120 + }
  121 + $('#gsdmDaily').html(options);
  122 + updateCompany();
  123 + });
  124 + })
  125 + $("#gsdmDaily").on("change",updateCompany);
  126 + function updateCompany(){
  127 + var company = $('#gsdmDaily').val();
  128 + var options = '';
  129 + for(var i = 0; i < obj.length; i++){
  130 + if(obj[i].companyCode == company){
  131 + var children = obj[i].children;
  132 + for(var j = 0; j < children.length; j++){
  133 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  134 + }
  135 + }
  136 + }
  137 + $('#fgsdmDaily').html(options);
  138 + }
  139 +
  140 + var tempData = {};
  141 + $.get('/report/lineList',function(xlList){
  142 + var data = [];
  143 + data.push({id: " ", text: "全部线路"});
  144 + $.get('/user/companyData', function(result){
  145 + for(var i = 0; i < result.length; i++){
  146 + var companyCode = result[i].companyCode;
  147 + var children = result[i].children;
  148 + for(var j = 0; j < children.length; j++){
  149 + var code = children[j].code;
  150 + for(var k=0;k < xlList.length;k++ ){
  151 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  152 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  153 +
  154 + }
  155 + }
  156 + }
  157 + initPinYinSelect2('#line',data,'');
  158 +
  159 + });
  160 + });
  161 +
  162 + $("#line").on("change", function(){
  163 + if($("#line").val() == " "){
  164 + $("#gsdmDaily").attr("disabled", false);
  165 + $("#fgsdmDaily").attr("disabled", false);
  166 + } else {
  167 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
  168 + $("#gsdmDaily").val(temp[0]);
  169 + updateCompany();
  170 + $("#fgsdmDaily").val(temp[1]);
  171 + $("#gsdmDaily").attr("disabled", true);
  172 + $("#fgsdmDaily").attr("disabled", true);
  173 + }
  174 + });
  175 +
  176 +
  177 + var line;
  178 + var startDate;
  179 + var endDate;
  180 + var gsdmDaily;
  181 + var fgsdmDaily;
  182 + var lineName=$("#select2-line-container").html();
  183 + $("#query").on("click",function(){
  184 +
  185 + line = $("#line").val();
  186 + startDate = $("#startDate").val();
  187 + endDate = $("#endDate").val();
  188 +
  189 + gsdmDaily=$("#gsdmDaily").val();
  190 + fgsdmDaily = $("#fgsdmDaily").val();
  191 + lineName=$("#select2-line-container").html();
  192 +
  193 + var fs = 'YYYY-MM-DD HH:mm';
  194 + var st = parseInt(moment(startDate, fs).format('X'));
  195 + var et = parseInt(moment(endDate, fs).format('X'));
  196 +
  197 + if(et < st)
  198 + notify_err('结束时间不能小于开始时间!');
  199 +
  200 + var i = layer.load(2);
  201 + $get('/dkl_logger/all',{lineCode_eq:line,type:'query',createDate_ge:startDate,createDate_le:endDate},function(result){
  202 +
  203 + $.each(result, function(i, obj) {
  204 + obj.createDate = moment(obj.createDate).format("YYYY-MM-DD HH:mm:ss");
  205 + });
  206 +
  207 + // 把数据填充到模版中
  208 + var tbodyHtml = template('dailyInfo',{list:result});
  209 + // 把渲染好的模版html文本追加到表格中
  210 + $('#tbody').html(tbodyHtml);
  211 + layer.close(i);
  212 +
  213 + line = $("#line").val();
  214 + startDate = $("#startDate").val();
  215 + endDate = $("#endDate").val();
  216 + $("#sDate").text(startDate);
  217 + $("#eDate").text(endDate);
  218 +
  219 + var total_zgl = 0,total_ks = 0;
  220 + var total_yh = 0,total_bc = 0;
  221 +
  222 + $.each(result, function(i, obj) {
  223 + total_zgl +=Number(obj.zlc*10000);
  224 + total_ks +=Number(obj.jzl1*10000);
  225 + total_yh += Number(obj.yh*10000);
  226 + total_bc += Number(obj.bc);
  227 +
  228 + });
  229 + $("#total_zgl").text((total_zgl/10000).toFixed(3));
  230 + $("#total_ks").text((total_ks/10000).toFixed(3));
  231 + $("#total_yh").text((total_yh/10000).toFixed(2));
  232 + $("#total_bc").text(total_bc.toFixed(0));
  233 +
  234 + var temp = {};
  235 + var today_account = 0;
  236 +
  237 + temp["line"] = $("#line").text();
  238 + $.each(result, function(i, obj) {
  239 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  240 + today_account++;
  241 + }
  242 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  243 + });
  244 + })
  245 + });
  246 +
  247 + $("#export").on("click",function(){
  248 + /* if($("#date").val() == null || $("#date").val().trim().length == 0){
  249 + layer.msg("请选择时间");
  250 + return;
  251 + }*/
  252 + line = $("#line").val();
  253 + date = $("#date").val();
  254 + gsdmDaily=$("#gsdmDaily").val();
  255 + fgsdmDaily = $("#fgsdmDaily").val();
  256 + lineName=$("#select2-line-container").html();
  257 + var i = layer.load(2);
  258 + $get('/logZndd/listall',{rq_eq:date,lineCode_eq:line,type:'export'},function(result){
  259 + window.open("/downloadFile/download?fileName="
  260 + +moment(date).format("YYYYMMDD")+"-"+lineName+"-班次日报表");
  261 + layer.close(i);
  262 + });
  263 + });
  264 + });
  265 +</script>
  266 +<script type="text/html" id="dailyInfo">
  267 + {{each list as obj i}}
  268 + <tr>
  269 + <td>{{obj.lineName}}</td>
  270 + <td>{{obj.stationName}}</td>
  271 + <td>
  272 + {{if obj.upDown == '0'}}
  273 + 上行
  274 + {{else if obj.upDown == '1'}}
  275 + 下行
  276 + {{/if}}
  277 + </td>
  278 + <td>{{obj.num}}</td>
  279 + <td>
  280 + {{if obj.status == '1'}}
  281 + 是
  282 + {{else}}
  283 + 否
  284 + {{/if}}
  285 + </td>
  286 +
  287 + <td>{{obj.createDate}}</td>
  288 + </tr>
  289 + {{/each}}
  290 + {{if list.length == 0}}
  291 + <tr>
  292 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
  293 + </tr>
  294 + {{/if}}
  295 +</script>
0 296 \ No newline at end of file
... ...
src/main/resources/static/pages/permission/authorize_all/user_auth.html
... ... @@ -54,6 +54,7 @@
54 54 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_scheduleAnaly"> 时刻表分析</label></li>
55 55 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_message"> 调度消息分析</label></li>
56 56 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_changetochange"> 换人换车情况统计表</label></li>
  57 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_loggerr_dkl"> 客流日志</label></li>
57 58 </ul>
58 59 </div>
59 60  
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
... ... @@ -25,7 +25,9 @@
25 25 </div>
26 26 <i class="uk-icon-eye uk-icon-hover ct_eye_icon"></i>
27 27 <!--<i class="uk-icon-share-alt uk-icon-hover tp_info_icon" ></i>-->
  28 + <i class="uk-icon-video-camera uk-icon-hover ct_video_camera_icon" data-updown="{{dir}}" data-linecode="{{line.lineCode}}" data-toggle="tooltip" data-placement="bottom"></i>
28 29  
  30 + <span type="text" id="{{line.lineCode}}_{{dir}}" ></span>
29 31 <span class="warn_multi_station" data-updown="{{dir}}" data-code="{{line.lineCode}}"></span>
30 32 <div class="search_sch_panel">
31 33 <form class="uk-form" onsubmit="javascript:return false;">
... ...
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
... ... @@ -82,6 +82,13 @@
82 82 "event": "form_inoutstation",
83 83 "icon": "uk-icon-table"
84 84 }
  85 + ,
  86 + {
  87 + "id": 4.10,
  88 + "text": "客流记录",
  89 + "event": "form_loggerr_dkl",
  90 + "icon": "uk-icon-table"
  91 + }
85 92 ]
86 93 },
87 94 {
... ...
src/main/resources/static/real_control_v2/js/line_schedule/legend.js
... ... @@ -45,6 +45,45 @@ var gb_sch_legend = (function () {
45 45  
46 46 var eye_dom = '.schedule-wrap i.ct_eye_icon';
47 47 $(document).on('click', eye_dom, changeHandicappedStyle);
  48 +
  49 +
  50 + $(document).on('click', '.schedule-wrap i.ct_video_camera_icon', function (event) {
  51 + var upDown=event.target.dataset.updown;
  52 + var lineCode=event.target.dataset.linecode;
  53 + var params = {"upDown":upDown,"lineCode":lineCode};
  54 + $.get('/out/getStationVideo', params, function(url){
  55 + if(url!=''){
  56 + var imgHtml = "<iframe src='"+url+"?autoplay=1' style='width:100%;height:100%'/>";
  57 + layer.open({
  58 + type: 1,
  59 + offset: 'auto',
  60 + area: [700 + 'px', 394 + 'px'],
  61 + shadeClose: true,//点击外围关闭弹窗
  62 + scrollbar: true,//不现实滚动条
  63 + title: false, //不显示标题
  64 + content: imgHtml, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
  65 + cancel: function () {
  66 + }
  67 + })
  68 + }/*else {
  69 + notify_succ('设备不存在');
  70 + }*/
  71 +
  72 + });
  73 + });
  74 +
  75 + function popcf(data){
  76 + if(data.num < 5){
  77 + $("#"+data.lineCode+"_"+data.xlDir).text("(客流正常)");
  78 + $("#"+data.lineCode+"_"+data.xlDir).css("color", "#2765A7");
  79 +
  80 + }else {
  81 + $("#"+data.lineCode+"_"+data.xlDir).text("(客流拥挤)");
  82 + $("#"+data.lineCode+"_"+data.xlDir).css("color", "red");
  83 + }
  84 +
  85 + }
  86 +
48 87 function changeHandicappedStyle() {
49 88 if($(this).hasClass('active')){
50 89 $(eye_dom).removeClass('active');
... ... @@ -83,6 +122,7 @@ var gb_sch_legend = (function () {
83 122 };
84 123  
85 124 return {
86   - init: initLegend
  125 + init: initLegend,
  126 + popcf : popcf
87 127 };
88 128 })();
89 129 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/js/north/toolbar.js
... ... @@ -229,7 +229,10 @@ var gb_northToolbar = (function () {
229 229 },
230 230 form_shifday: function () {
231 231 gb_embed_form_hanlde.open_modal_form_fragment('/pages/mforms/shifdays/shifday.html', '班次车辆人员日统计');
232   - }
  232 + },
  233 + form_loggerr_dkl: function () {
  234 + gb_embed_form_hanlde.open_modal_form_fragment('/pages/forms/zndd/logger_dkl.html', '客流记录');
  235 + },
233 236 };
234 237  
235 238 return {
... ...
src/main/resources/static/real_control_v2/js/websocket/sch_websocket.js
... ... @@ -186,6 +186,10 @@ var gb_sch_websocket = (function () {
186 186 var signalState = function (msg) {
187 187 gb_signal_state.put(msg.data);
188 188 };
  189 + var klyj = function (msg){
  190 + gb_sch_legend.popcf(msg.data);
  191 + };
  192 +
189 193  
190 194 var carErrorStop = function (msg){
191 195 gb_carerrorstop.pop(msg.data);
... ... @@ -202,6 +206,7 @@ var gb_sch_websocket = (function () {
202 206 deviceOffline: deviceOffline,
203 207 safeDriv: safeDriv,
204 208 auto_wdtz: autoWdtz,
  209 + klyj:klyj,
205 210 carErrorStop: carErrorStop
206 211 };
207 212  
... ...