Commit 14886461e4485135f920867e0e4371e9599353de

Authored by 潘钊
2 parents 933f4e6a 75699f96

Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang

src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
... ... @@ -3,6 +3,7 @@ package com.bsth.entity.schedule;
3 3 import com.bsth.entity.Line;
4 4 import com.bsth.entity.sys.SysUser;
5 5 import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output;
  6 +import org.apache.commons.lang3.StringUtils;
6 7  
7 8 import javax.persistence.*;
8 9 import java.util.Date;
... ... @@ -199,12 +200,29 @@ public class SchedulePlanInfo {
199 200 }
200 201  
201 202 this.j = employeeConfigInfo.getJsy().getId();
202   - this.jGh = employeeConfigInfo.getJsy().getJobCode();
  203 +// this.jGh = employeeConfigInfo.getJsy().getJobCode();
  204 + if (StringUtils.isNotEmpty(employeeConfigInfo.getJsy().getJobCode())) {
  205 + String[] jsy_temp = employeeConfigInfo.getJsy().getJobCode().split("-");
  206 + if (jsy_temp.length > 1) {
  207 + this.jGh = jsy_temp[1];
  208 + } else {
  209 + this.jGh = jsy_temp[0];
  210 + }
  211 + }
203 212 this.jName = employeeConfigInfo.getJsy().getPersonnelName();
204 213 // 关联的售票员
205 214 if (employeeConfigInfo.getSpy() != null) {
206 215 this.s = employeeConfigInfo.getSpy().getId();
207   - this.sGh = employeeConfigInfo.getSpy().getJobCode();
  216 +// this.sGh = employeeConfigInfo.getSpy().getJobCode();
  217 + if (StringUtils.isNotEmpty(employeeConfigInfo.getSpy().getJobCode())) {
  218 + String[] spy_temp = employeeConfigInfo.getSpy().getJobCode().split("-");
  219 + if (spy_temp.length > 1) {
  220 + this.sGh = spy_temp[1];
  221 + } else {
  222 + this.sGh = spy_temp[0];
  223 + }
  224 + }
  225 +
208 226 this.sName = employeeConfigInfo.getSpy().getPersonnelName();
209 227 }
210 228  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -640,13 +640,39 @@ var PublicFunctions = function () {
640 640  
641 641 WorldsBMap.clearMarkAndOverlays();
642 642  
643   - var ceter_index = Math.round(resultdata.length / 2);
644   -
645   - var ceterPointsStr = resultdata[ceter_index].bJwpoints;
646   -
647   - var ceterPointsArray = ceterPointsStr.split(' ');
648   -
649   - var polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
  643 + var polyline_center;
  644 +
  645 + // 如果站点路由数据不为空
  646 + if(resultdata.length>0) {
  647 +
  648 + var ceter_index = Math.round(resultdata.length / 2);
  649 +
  650 + var ceterPointsStr = resultdata[ceter_index].bJwpoints;
  651 +
  652 + var ceterPointsArray = ceterPointsStr.split(' ');
  653 +
  654 + polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
  655 +
  656 + // 遍历站点路由数据
  657 + for(var s = 0 ; s<resultdata.length;s++) {
  658 +
  659 + // 中心点坐标字符串
  660 + var bJwpointsStr = resultdata[s].bJwpoints;
  661 +
  662 + var stationName = resultdata[s].stationName;
  663 +
  664 + // 起个中心点坐标字符串
  665 + var bJwpointsArray = bJwpointsStr.split(' ');
  666 +
  667 + // 设置中心点
  668 + var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
  669 +
  670 + /** 在地图上画点 @param:<point_center:中心坐标点> */
  671 + WorldsBMap.drawingUpStationPoint(point_center,stationName,s+1);
  672 +
  673 + }
  674 +
  675 + }
650 676  
651 677 // 路段数据长度
652 678 var dataLen = data.length;
... ... @@ -680,36 +706,10 @@ var PublicFunctions = function () {
680 706 polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
681 707  
682 708 }
683   -
684 709 /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
685 710 WorldsBMap.drawingUpline(polylineArray,polyline_center);
686 711  
687 712 }
688   -
689   - // 如果站点路由数据不为空
690   - if(resultdata.length>0) {
691   -
692   - // 遍历站点路由数据
693   - for(var s = 0 ; s<resultdata.length;s++) {
694   -
695   - // 中心点坐标字符串
696   - var bJwpointsStr = resultdata[s].bJwpoints;
697   -
698   - var stationName = resultdata[s].stationName;
699   -
700   - // 起个中心点坐标字符串
701   - var bJwpointsArray = bJwpointsStr.split(' ');
702   -
703   - // 设置中心点
704   - var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
705   -
706   - /** 在地图上画点 @param:<point_center:中心坐标点> */
707   - WorldsBMap.drawingUpStationPoint(point_center,stationName,s+1);
708   -
709   - }
710   -
711   - }
712   -
713 713 }
714 714  
715 715 });
... ...