Commit 3925a4b02c6b29288f781f89f4419961ce76a107
1 parent
5c7dc54f
线调页面布局,调整包结构
Showing
18 changed files
with
497 additions
and
35 deletions
src/main/java/com/bsth/StartCommand.java
| ... | ... | @@ -11,8 +11,10 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 11 | 11 | import org.springframework.boot.CommandLineRunner; |
| 12 | 12 | import org.springframework.stereotype.Component; |
| 13 | 13 | |
| 14 | -import com.bsth.gpsdata.thread.GpsBufferRefreshThread; | |
| 14 | +import com.bsth.common.GetSchedulePlanThread; | |
| 15 | 15 | import com.bsth.security.SecurityMetadataSourceService; |
| 16 | +import com.bsth.util.DateUtils; | |
| 17 | +import com.bsth.vehicle.gpsdata.GpsRefreshThread; | |
| 16 | 18 | |
| 17 | 19 | /** |
| 18 | 20 | * 随应用启动运行 |
| ... | ... | @@ -27,10 +29,13 @@ public class StartCommand implements CommandLineRunner{ |
| 27 | 29 | @Autowired |
| 28 | 30 | SecurityMetadataSourceService invocationSecurityMetadataSourceService; |
| 29 | 31 | |
| 30 | - public static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); | |
| 32 | + public static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(2); | |
| 31 | 33 | |
| 32 | 34 | @Autowired |
| 33 | - GpsBufferRefreshThread gpsRefreshThread; | |
| 35 | + GpsRefreshThread gpsRefreshThread; | |
| 36 | + | |
| 37 | + @Autowired | |
| 38 | + GetSchedulePlanThread getSchedulePlanThread; | |
| 34 | 39 | |
| 35 | 40 | @Override |
| 36 | 41 | public void run(String... arg0){ |
| ... | ... | @@ -43,7 +48,14 @@ public class StartCommand implements CommandLineRunner{ |
| 43 | 48 | * GPS实时数据更新线程,每次执行完成4秒后开始下一次 |
| 44 | 49 | * 如果抛出异常,后续执行将被取消 |
| 45 | 50 | */ |
| 46 | - scheduler.scheduleWithFixedDelay(gpsRefreshThread, 0, 4, TimeUnit.SECONDS); | |
| 51 | + //scheduler.scheduleWithFixedDelay(gpsRefreshThread, 0, 4, TimeUnit.SECONDS); | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 定时0点从计划排班表抓取当天实际排班 | |
| 55 | + */ | |
| 56 | + //scheduler.scheduleAtFixedRate(getSchedulePlanThread | |
| 57 | + // , 0//DateUtils.getTimesnight() - System.currentTimeMillis() / 1000 | |
| 58 | + // , 60 * 60 * 24, TimeUnit.SECONDS); | |
| 47 | 59 | } catch (Exception e) { |
| 48 | 60 | e.printStackTrace(); |
| 49 | 61 | } | ... | ... |
src/main/java/com/bsth/common/GetSchedulePlanThread.java
0 → 100644
| 1 | +package com.bsth.common; | |
| 2 | + | |
| 3 | +import java.text.SimpleDateFormat; | |
| 4 | +import java.util.Date; | |
| 5 | +import java.util.Iterator; | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.stereotype.Component; | |
| 10 | + | |
| 11 | +import com.bsth.entity.schedule.SchedulePlanInfo; | |
| 12 | +import com.bsth.repository.schedule.SchedulePlanInfoRepository; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * | |
| 16 | + * @ClassName: GetSchedulePlanThread | |
| 17 | + * @Description: TODO(从计划排班表抓取当天实际排班) | |
| 18 | + * @author PanZhao | |
| 19 | + * @date 2016年6月6日 下午7:42:43 | |
| 20 | + * | |
| 21 | + */ | |
| 22 | +@Component | |
| 23 | +public class GetSchedulePlanThread extends Thread{ | |
| 24 | + | |
| 25 | + @Autowired | |
| 26 | + SchedulePlanInfoRepository schedulePlanInfoRepository; | |
| 27 | + | |
| 28 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 29 | + | |
| 30 | + @Override | |
| 31 | + public void run() { | |
| 32 | + List<SchedulePlanInfo> list = schedulePlanInfoRepository.findByDate(/*sdf.format(new Date())*/"2016-06-01"); | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + } | |
| 37 | +} | ... | ... |
src/main/java/com/bsth/controller/realcontrol/DirectiveController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 4 | +import org.springframework.web.bind.annotation.RestController; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * | |
| 8 | + * @ClassName: DirectiveController | |
| 9 | + * @Description: TODO(调度指令) | |
| 10 | + * @author PanZhao | |
| 11 | + * @date 2016年6月7日 上午9:52:11 | |
| 12 | + * | |
| 13 | + */ | |
| 14 | +@RestController | |
| 15 | +@RequestMapping("/realcontrol/directive") | |
| 16 | +public class DirectiveController { | |
| 17 | + | |
| 18 | +} | ... | ... |
src/main/java/com/bsth/repository/schedule/SchedulePlanInfoRepository.java
| 1 | -package com.bsth.repository.schedule; | |
| 2 | - | |
| 3 | -import com.bsth.entity.schedule.SchedulePlanInfo; | |
| 4 | -import com.bsth.repository.BaseRepository; | |
| 5 | -import org.springframework.stereotype.Repository; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * Created by xu on 16/6/6. | |
| 9 | - */ | |
| 10 | -@Repository | |
| 11 | -public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanInfo, Long> { | |
| 12 | -} | |
| 1 | +package com.bsth.repository.schedule; | |
| 2 | + | |
| 3 | +import com.bsth.entity.schedule.SchedulePlanInfo; | |
| 4 | +import com.bsth.repository.BaseRepository; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +import org.springframework.data.jpa.repository.Query; | |
| 9 | +import org.springframework.stereotype.Repository; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * Created by xu on 16/6/6. | |
| 13 | + */ | |
| 14 | +@Repository | |
| 15 | +public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanInfo, Long> { | |
| 16 | + | |
| 17 | + @Query(value = "select * from bsth_c_s_sp_info where DATE_FORMAT(schedule_date, '%Y-%m-%d')=?1", nativeQuery = true) | |
| 18 | + List<SchedulePlanInfo> findByDate(String dateformat); | |
| 19 | +} | ... | ... |
src/main/java/com/bsth/util/DateUtils.java
0 → 100644
| 1 | +package com.bsth.util; | |
| 2 | + | |
| 3 | +import java.util.Calendar; | |
| 4 | + | |
| 5 | +public class DateUtils { | |
| 6 | + | |
| 7 | + // 获得当天0点时间 | |
| 8 | + public static int getTimesmorning() { | |
| 9 | + Calendar cal = Calendar.getInstance(); | |
| 10 | + cal.set(Calendar.HOUR_OF_DAY, 0); | |
| 11 | + cal.set(Calendar.SECOND, 0); | |
| 12 | + cal.set(Calendar.MINUTE, 0); | |
| 13 | + cal.set(Calendar.MILLISECOND, 0); | |
| 14 | + return (int) (cal.getTimeInMillis() / 1000); | |
| 15 | + } | |
| 16 | + | |
| 17 | + // 获得当天24点时间 | |
| 18 | + public static int getTimesnight() { | |
| 19 | + Calendar cal = Calendar.getInstance(); | |
| 20 | + cal.set(Calendar.HOUR_OF_DAY, 24); | |
| 21 | + cal.set(Calendar.SECOND, 0); | |
| 22 | + cal.set(Calendar.MINUTE, 0); | |
| 23 | + cal.set(Calendar.MILLISECOND, 0); | |
| 24 | + return (int) (cal.getTimeInMillis() / 1000); | |
| 25 | + } | |
| 26 | + | |
| 27 | + // 获得本周一0点时间 | |
| 28 | + public static int getTimesWeekmorning() { | |
| 29 | + Calendar cal = Calendar.getInstance(); | |
| 30 | + cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); | |
| 31 | + cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); | |
| 32 | + return (int) (cal.getTimeInMillis() / 1000); | |
| 33 | + } | |
| 34 | + | |
| 35 | + // 获得本周日24点时间 | |
| 36 | + public static int getTimesWeeknight() { | |
| 37 | + Calendar cal = Calendar.getInstance(); | |
| 38 | + cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); | |
| 39 | + cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); | |
| 40 | + return (int) ((cal.getTime().getTime() + (7 * 24 * 60 * 60 * 1000)) / 1000); | |
| 41 | + } | |
| 42 | + | |
| 43 | + // 获得本月第一天0点时间 | |
| 44 | + public static int getTimesMonthmorning() { | |
| 45 | + Calendar cal = Calendar.getInstance(); | |
| 46 | + cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); | |
| 47 | + cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH)); | |
| 48 | + return (int) (cal.getTimeInMillis() / 1000); | |
| 49 | + } | |
| 50 | + | |
| 51 | + // 获得本月最后一天24点时间 | |
| 52 | + public static int getTimesMonthnight() { | |
| 53 | + Calendar cal = Calendar.getInstance(); | |
| 54 | + cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); | |
| 55 | + cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH)); | |
| 56 | + cal.set(Calendar.HOUR_OF_DAY, 24); | |
| 57 | + return (int) (cal.getTimeInMillis() / 1000); | |
| 58 | + } | |
| 59 | +} | ... | ... |
src/main/java/com/bsth/vehicle/UpstreamEntrance.java
0 → 100644
| 1 | +package com.bsth.vehicle; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 4 | +import org.springframework.web.bind.annotation.RestController; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * | |
| 8 | + * @ClassName: UpstreamEntrance | |
| 9 | + * @Description: TODO(车载网关上行入口) | |
| 10 | + * @author PanZhao | |
| 11 | + * @date 2016年6月7日 下午3:00:01 | |
| 12 | + * | |
| 13 | + */ | |
| 14 | +@RestController | |
| 15 | +@RequestMapping("/control/upstream") | |
| 16 | +public class UpstreamEntrance { | |
| 17 | + | |
| 18 | +} | ... | ... |
src/main/java/com/bsth/vehicle/directive/Consts.java
0 → 100644
src/main/java/com/bsth/vehicle/directive/entity/Directive.java
0 → 100644
| 1 | +package com.bsth.vehicle.directive.entity; | |
| 2 | + | |
| 3 | +import javax.persistence.Entity; | |
| 4 | +import javax.persistence.GeneratedValue; | |
| 5 | +import javax.persistence.Id; | |
| 6 | +import javax.persistence.Table; | |
| 7 | + | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * | |
| 11 | + * @ClassName: Directive | |
| 12 | + * @Description: TODO(调度指令) | |
| 13 | + * @author PanZhao | |
| 14 | + * @date 2016年6月7日 上午10:21:59 | |
| 15 | + * | |
| 16 | + */ | |
| 17 | +@Entity | |
| 18 | +@Table(name = "bsth_v_directive") | |
| 19 | +public class Directive { | |
| 20 | + | |
| 21 | + @Id | |
| 22 | + @GeneratedValue | |
| 23 | + private Integer id; | |
| 24 | + | |
| 25 | + //一级协议 | |
| 26 | + private short operCode; | |
| 27 | + | |
| 28 | + //数据 | |
| 29 | + private DirectiveData data; | |
| 30 | + | |
| 31 | + public Integer getId() { | |
| 32 | + return id; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void setId(Integer id) { | |
| 36 | + this.id = id; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public short getOperCode() { | |
| 40 | + return operCode; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public void setOperCode(short operCode) { | |
| 44 | + this.operCode = operCode; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public DirectiveData getData() { | |
| 48 | + return data; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public void setData(DirectiveData data) { | |
| 52 | + this.data = data; | |
| 53 | + } | |
| 54 | +} | ... | ... |
src/main/java/com/bsth/vehicle/directive/entity/DirectiveData.java
0 → 100644
| 1 | +package com.bsth.vehicle.directive.entity; | |
| 2 | + | |
| 3 | +import javax.persistence.Embeddable; | |
| 4 | + | |
| 5 | +@Embeddable | |
| 6 | +public class DirectiveData { | |
| 7 | + // 公司代码 | |
| 8 | + private short companyCode; | |
| 9 | + | |
| 10 | + // 设备号 | |
| 11 | + private String deviceId; | |
| 12 | + | |
| 13 | + // 时间戳 | |
| 14 | + private Long timestamp; | |
| 15 | + | |
| 16 | + // 保留 默认0 | |
| 17 | + private short instructType = 0; | |
| 18 | + | |
| 19 | + /* | |
| 20 | + * 调度指令 调度指令。 0X00表示信息短语 0X01表示取消上次指令+调度指令(闹钟有效) 0x02表示为调度指令(闹钟有效) | |
| 21 | + * 0x03表示运营状态指令(闹钟无效) 0x04表示其他指令 | |
| 22 | + */ | |
| 23 | + private DispatchInstruct dispatchInstruct; | |
| 24 | + | |
| 25 | + // 唯一标识 | |
| 26 | + private Long msgId; | |
| 27 | + | |
| 28 | + // 闹钟 | |
| 29 | + private Long alarmTime; | |
| 30 | + | |
| 31 | + // 多个运营状态字节 | |
| 32 | + private Long serviceState; | |
| 33 | + | |
| 34 | + // 消息文本 | |
| 35 | + private String txtContent; | |
| 36 | + | |
| 37 | + public short getCompanyCode() { | |
| 38 | + return companyCode; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setCompanyCode(short companyCode) { | |
| 42 | + this.companyCode = companyCode; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getDeviceId() { | |
| 46 | + return deviceId; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setDeviceId(String deviceId) { | |
| 50 | + this.deviceId = deviceId; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public Long getTimestamp() { | |
| 54 | + return timestamp; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setTimestamp(Long timestamp) { | |
| 58 | + this.timestamp = timestamp; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public short getInstructType() { | |
| 62 | + return instructType; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setInstructType(short instructType) { | |
| 66 | + this.instructType = instructType; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public DispatchInstruct getDispatchInstruct() { | |
| 70 | + return dispatchInstruct; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setDispatchInstruct(DispatchInstruct dispatchInstruct) { | |
| 74 | + this.dispatchInstruct = dispatchInstruct; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public Long getMsgId() { | |
| 78 | + return msgId; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setMsgId(Long msgId) { | |
| 82 | + this.msgId = msgId; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public Long getAlarmTime() { | |
| 86 | + return alarmTime; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void setAlarmTime(Long alarmTime) { | |
| 90 | + this.alarmTime = alarmTime; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public Long getServiceState() { | |
| 94 | + return serviceState; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public void setServiceState(Long serviceState) { | |
| 98 | + this.serviceState = serviceState; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public String getTxtContent() { | |
| 102 | + return txtContent; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public void setTxtContent(String txtContent) { | |
| 106 | + this.txtContent = txtContent; | |
| 107 | + } | |
| 108 | +} | ... | ... |
src/main/java/com/bsth/vehicle/directive/entity/DispatchInstruct.java
0 → 100644
| 1 | +package com.bsth.vehicle.directive.entity; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * | |
| 5 | + * @ClassName: DispatchInstruct | |
| 6 | + * @Description: TODO(调度指令) | |
| 7 | + * @author PanZhao | |
| 8 | + * @date 2016年6月7日 下午2:15:10 | |
| 9 | + * | |
| 10 | + */ | |
| 11 | +public enum DispatchInstruct { | |
| 12 | + // 信息短语 | |
| 13 | + PHRASE((byte) 0x00), | |
| 14 | + // 取消上次指令+调度指令(闹钟有效) | |
| 15 | + CANCEL_AND_CLOCK_ON((byte) 0x01), | |
| 16 | + // 调度指令(闹钟有效) | |
| 17 | + DISPATCH_CLOCK_ON((byte) 0x02), | |
| 18 | + // 运营状态指令(闹钟无效) | |
| 19 | + OPERATE_CLOCK_OFF((byte) 0x03), | |
| 20 | + // 其他 | |
| 21 | + OTHER((byte) 0x04); | |
| 22 | + | |
| 23 | + private final byte value; | |
| 24 | + | |
| 25 | + DispatchInstruct(byte value) { | |
| 26 | + this.value = value; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public byte getValue() { | |
| 30 | + return value; | |
| 31 | + } | |
| 32 | +} | ... | ... |
src/main/java/com/bsth/gpsdata/thread/GpsBufferRefreshThread.java renamed to src/main/java/com/bsth/vehicle/gpsdata/GpsRefreshThread.java
| 1 | -package com.bsth.gpsdata.thread; | |
| 1 | +package com.bsth.vehicle.gpsdata; | |
| 2 | 2 | |
| 3 | 3 | import java.io.BufferedReader; |
| 4 | 4 | import java.io.InputStreamReader; |
| ... | ... | @@ -19,9 +19,9 @@ import org.springframework.stereotype.Component; |
| 19 | 19 | |
| 20 | 20 | import com.alibaba.fastjson.JSON; |
| 21 | 21 | import com.alibaba.fastjson.JSONObject; |
| 22 | -import com.bsth.gpsdata.buffer.GpsRealDataBuffer; | |
| 23 | -import com.bsth.gpsdata.entity.GpsRealData; | |
| 24 | 22 | import com.bsth.util.Tools; |
| 23 | +import com.bsth.vehicle.gpsdata.buffer.GpsRealDataBuffer; | |
| 24 | +import com.bsth.vehicle.gpsdata.entity.GpsRealData; | |
| 25 | 25 | import com.google.common.collect.ImmutableMap; |
| 26 | 26 | |
| 27 | 27 | /** |
| ... | ... | @@ -33,15 +33,15 @@ import com.google.common.collect.ImmutableMap; |
| 33 | 33 | * |
| 34 | 34 | */ |
| 35 | 35 | @Component |
| 36 | -public class GpsBufferRefreshThread extends Thread{ | |
| 36 | +public class GpsRefreshThread extends Thread{ | |
| 37 | 37 | |
| 38 | - private static Logger logger = LoggerFactory.getLogger(GpsBufferRefreshThread.class); | |
| 38 | + private static Logger logger = LoggerFactory.getLogger(GpsRefreshThread.class); | |
| 39 | 39 | |
| 40 | 40 | //接口地址 |
| 41 | 41 | private static String url; |
| 42 | 42 | |
| 43 | 43 | |
| 44 | - public GpsBufferRefreshThread() { | |
| 44 | + public GpsRefreshThread() { | |
| 45 | 45 | Tools t = new Tools("application.properties"); |
| 46 | 46 | url = t.getValue("http.gps.real.url"); |
| 47 | 47 | } | ... | ... |
src/main/java/com/bsth/gpsdata/buffer/GpsRealDataBuffer.java renamed to src/main/java/com/bsth/vehicle/gpsdata/buffer/GpsRealDataBuffer.java
| 1 | -package com.bsth.gpsdata.buffer; | |
| 1 | +package com.bsth.vehicle.gpsdata.buffer; | |
| 2 | 2 | |
| 3 | 3 | import java.util.ArrayList; |
| 4 | 4 | import java.util.HashMap; |
| ... | ... | @@ -14,9 +14,9 @@ import org.springframework.stereotype.Component; |
| 14 | 14 | |
| 15 | 15 | import com.bsth.entity.Cars; |
| 16 | 16 | import com.bsth.entity.Station; |
| 17 | -import com.bsth.gpsdata.entity.GpsRealData; | |
| 18 | 17 | import com.bsth.repository.CarsRepository; |
| 19 | 18 | import com.bsth.repository.StationRepository; |
| 19 | +import com.bsth.vehicle.gpsdata.entity.GpsRealData; | |
| 20 | 20 | import com.google.common.collect.ArrayListMultimap; |
| 21 | 21 | import com.google.common.collect.ImmutableMap; |
| 22 | 22 | import com.google.common.collect.ListMultimap; | ... | ... |
src/main/java/com/bsth/gpsdata/controller/GpsDataController.java renamed to src/main/java/com/bsth/vehicle/gpsdata/controller/GpsDataController.java
| 1 | -package com.bsth.gpsdata.controller; | |
| 1 | +package com.bsth.vehicle.gpsdata.controller; | |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | |
| ... | ... | @@ -8,8 +8,8 @@ import org.springframework.web.bind.annotation.RequestMapping; |
| 8 | 8 | import org.springframework.web.bind.annotation.RequestParam; |
| 9 | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 10 | |
| 11 | -import com.bsth.gpsdata.buffer.GpsRealDataBuffer; | |
| 12 | -import com.bsth.gpsdata.entity.GpsRealData; | |
| 11 | +import com.bsth.vehicle.gpsdata.buffer.GpsRealDataBuffer; | |
| 12 | +import com.bsth.vehicle.gpsdata.entity.GpsRealData; | |
| 13 | 13 | import com.google.common.base.Splitter; |
| 14 | 14 | |
| 15 | 15 | @RestController | ... | ... |
src/main/java/com/bsth/gpsdata/entity/GpsRealData.java renamed to src/main/java/com/bsth/vehicle/gpsdata/entity/GpsRealData.java
src/main/resources/static/pages/control/line/css/lineControl.css
| ... | ... | @@ -804,6 +804,7 @@ height: 400px; |
| 804 | 804 | background-color: #E4D3D3; |
| 805 | 805 | text-align: center; |
| 806 | 806 | font-family: arial; |
| 807 | + color: #433833; | |
| 807 | 808 | } |
| 808 | 809 | |
| 809 | 810 | .tab_line .panel-wrap ._panel ._body .pb-table tr td:nth-child(2) |
| ... | ... | @@ -841,10 +842,19 @@ height: 400px; |
| 841 | 842 | .pb-table tr{ |
| 842 | 843 | cursor: default; |
| 843 | 844 | } |
| 845 | +.pb-table tr td{ | |
| 846 | + transition: all .3s ease; | |
| 847 | +} | |
| 848 | + | |
| 844 | 849 | .pb-table tr.active-menu td{ |
| 845 | - border-left: 0; | |
| 850 | + border-left: 0; | |
| 846 | 851 | border-right: 0; |
| 847 | - background: #A8B4E4; | |
| 852 | + background: #666; | |
| 853 | + color: white | |
| 854 | +} | |
| 855 | + | |
| 856 | +.pb-table tr.active-menu td a{ | |
| 857 | + color: #93AAEF !important; | |
| 848 | 858 | } |
| 849 | 859 | |
| 850 | 860 | /* .pb-table tr:hover td{ |
| ... | ... | @@ -939,6 +949,11 @@ height: 400px; |
| 939 | 949 | line-height: 35px; |
| 940 | 950 | background: #7EBBAF; |
| 941 | 951 | color: white; |
| 952 | + cursor: pointer; | |
| 953 | +} | |
| 954 | + | |
| 955 | +._panel_footer:hover{ | |
| 956 | + background: #71A79C; | |
| 942 | 957 | } |
| 943 | 958 | |
| 944 | 959 | .log-item{ |
| ... | ... | @@ -1128,6 +1143,28 @@ height: 400px; |
| 1128 | 1143 | pointer-events: auto; |
| 1129 | 1144 | } |
| 1130 | 1145 | |
| 1146 | +._panel_footer .popover{ | |
| 1147 | + color: black; | |
| 1148 | + max-width: 500px; | |
| 1149 | +} | |
| 1150 | + | |
| 1151 | +.tg-question-table tr td{ | |
| 1152 | + border-bottom: 1px solid #F7F7F7; | |
| 1153 | + font-family: 微软雅黑; | |
| 1154 | +} | |
| 1155 | + | |
| 1156 | +.tg-question-table tr td:nth-child(1){ | |
| 1157 | + text-align: right; | |
| 1158 | + width: 80px; | |
| 1159 | + padding-right: 10px; | |
| 1160 | + height: 24px; | |
| 1161 | +} | |
| 1162 | + | |
| 1163 | +.tg-question-table tr td:nth-child(2){ | |
| 1164 | + font-size: 12px; | |
| 1165 | + color: gray; | |
| 1166 | +} | |
| 1167 | + | |
| 1131 | 1168 | /* .menu-item:hover > .menu { |
| 1132 | 1169 | -webkit-transition-delay: 100ms; |
| 1133 | 1170 | transition-delay: 300ms; | ... | ... |
src/main/resources/static/pages/control/line/index.html
| ... | ... | @@ -533,8 +533,9 @@ |
| 533 | 533 | </div> |
| 534 | 534 | </div> |
| 535 | 535 | </div> |
| 536 | - <div class="_panel_footer"> | |
| 536 | + <div class="_panel_footer" id="tgTools"> | |
| 537 | 537 | 托管状态,计算机自动处理 |
| 538 | + <i id="tgQuestion" class="fa fa-question-circle" style="cursor: pointer;"></i> | |
| 538 | 539 | </div> |
| 539 | 540 | </div> |
| 540 | 541 | </div> |
| ... | ... | @@ -674,6 +675,7 @@ $(function() { |
| 674 | 675 | getTemp('temps/home_tp.html'); |
| 675 | 676 | getTemp('temps/home_table_tp.html'); |
| 676 | 677 | getTemp('temps/tooltip_tp.html'); |
| 678 | + getTemp('temps/alone_tp.html'); | |
| 677 | 679 | |
| 678 | 680 | function getTemp(url){ |
| 679 | 681 | $.get(url, function(template){ | ... | ... |
src/main/resources/static/pages/control/line/js/alone.js
| ... | ... | @@ -12,12 +12,34 @@ var _alone = (function(){ |
| 12 | 12 | height: '100%' |
| 13 | 13 | }) |
| 14 | 14 | |
| 15 | + /*$('#tgTools').tooltip({ | |
| 16 | + title: '取消托管,切换为人工处理' | |
| 17 | + });*/ | |
| 18 | + | |
| 19 | + $('#tgTools').on('click', function(){ | |
| 20 | + layer.confirm('取消托管,切换为人工处理?', { | |
| 21 | + btn : [ '确定', '取消' ], | |
| 22 | + icon : 3, | |
| 23 | + }, function(){ | |
| 24 | + | |
| 25 | + }); | |
| 26 | + }); | |
| 27 | + | |
| 28 | + //托管Question | |
| 29 | + $('#tgQuestion').popover({ | |
| 30 | + content: template('tg_question_info_temp', {}), | |
| 31 | + html: true, | |
| 32 | + placement: 'left', | |
| 33 | + trigger: 'hover' | |
| 34 | + }); | |
| 35 | + | |
| 36 | + //表格右键呼出菜单 | |
| 15 | 37 | $('.pb-table tr').on('contextmenu', function(e){ |
| 16 | 38 | e.preventDefault(); |
| 17 | 39 | $('.pb-table tr.active-menu').removeClass('active-menu'); |
| 18 | 40 | |
| 19 | 41 | var tr = $(this); |
| 20 | - showMenu(e.pageX, e.pageY); | |
| 42 | + showMenu(e.pageX, e.pageY + 3); | |
| 21 | 43 | |
| 22 | 44 | tr.addClass('active-menu'); |
| 23 | 45 | $(document).one('click', function(){ |
| ... | ... | @@ -30,10 +52,11 @@ var _alone = (function(){ |
| 30 | 52 | |
| 31 | 53 | |
| 32 | 54 | function showMenu(x, y) { |
| 33 | - var menu = $('#rightMenu'); | |
| 34 | - docWidth = $(document).width(), docHeight = $(document).height(), | |
| 55 | + var menu = $('#rightMenu'), | |
| 56 | + docWidth = $(document).width(), docHeight = $(document).height(), | |
| 35 | 57 | menuHeight = menu.height(), |
| 36 | - menuWidth = menu.width(); | |
| 58 | + menuWidth = menu.width(), | |
| 59 | + offset = 12; | |
| 37 | 60 | /* 边界 */ |
| 38 | 61 | if (y > (docHeight - menuHeight)) { |
| 39 | 62 | y = docHeight - menuHeight - offset; | ... | ... |
src/main/resources/static/pages/control/line/temps/alone_tp.html
0 → 100644
| 1 | +<!-- 单线路调度模板 --> | |
| 2 | + | |
| 3 | +<!-- 托管状态描述 --> | |
| 4 | +<script id="tg_question_info_temp" type="text/html"> | |
| 5 | +<table class="tg-question-table"> | |
| 6 | + <tr> | |
| 7 | + <td>恢复运营</td> | |
| 8 | + <td class="font-blue-steel">同意(切换营运状态)</td> | |
| 9 | + </tr> | |
| 10 | + <tr> | |
| 11 | + <td>申请调档</td> | |
| 12 | + <td class="font-blue-steel">同意</td> | |
| 13 | + </tr> | |
| 14 | + <tr> | |
| 15 | + <td>出场请求</td> | |
| 16 | + <td class="font-blue-steel">同意</td> | |
| 17 | + </tr> | |
| 18 | + <tr> | |
| 19 | + <td>进场请求</td> | |
| 20 | + <td class="font-blue-steel">同意(切换非营运状态)</td> | |
| 21 | + </tr> | |
| 22 | + <tr> | |
| 23 | + <td>加油请求</td> | |
| 24 | + <td class="font-blue-steel">同意</td> | |
| 25 | + </tr> | |
| 26 | + <tr> | |
| 27 | + <td>车辆故障</td> | |
| 28 | + <td>不处理</td> | |
| 29 | + </tr> | |
| 30 | + <tr> | |
| 31 | + <td>路阻报告</td> | |
| 32 | + <td>不处理</td> | |
| 33 | + </tr> | |
| 34 | + <tr> | |
| 35 | + <td>事故报告</td> | |
| 36 | + <td>不处理</td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td>扣证纠纷 </td> | |
| 40 | + <td>不处理</td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td>报警</td> | |
| 44 | + <td>不处理</td> | |
| 45 | + </tr> | |
| 46 | +</table> | |
| 47 | +</script> | |
| 0 | 48 | \ No newline at end of file | ... | ... |