Commit 20269297852c108ca4a4078e5c816f98fd6c3dce

Authored by 徐烜
1 parent 67a99dff

Update

src/main/java/com/bsth/entity/schedule/rule/ScheduleRule1Flat.java
@@ -57,6 +57,7 @@ public class ScheduleRule1Flat extends BEntity { @@ -57,6 +57,7 @@ public class ScheduleRule1Flat extends BEntity {
57 private String lpNames; 57 private String lpNames;
58 /** 对应的路牌ids(用逗号隔开) */ 58 /** 对应的路牌ids(用逗号隔开) */
59 @NotNull 59 @NotNull
  60 + @Column(length = 1000)
60 private String lpIds; 61 private String lpIds;
61 /** 起始路牌(从0开始) */ 62 /** 起始路牌(从0开始) */
62 @NotNull 63 @NotNull
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
@@ -360,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im @@ -360,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im
360 } 360 }
361 editInfo.getHeader().addAll(Arrays.asList(headarrays)); 361 editInfo.getHeader().addAll(Arrays.asList(headarrays));
362 362
363 - editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy)); 363 + editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f,总里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy));
364 } 364 }
365 365
366 LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//"); 366 LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//");
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/new/sa1.js 0 → 100644
  1 +/**
  2 + * saTimeTable指令工具集,创建内部单元格类,及其他操作
  3 + */
  4 +angular.module('ScheduleApp').factory(
  5 + 'SaTimeTableUtils',
  6 + [
  7 + function() {
  8 + /**
  9 + * 表格,单元格头类
  10 + * 如:路牌,出1,青2......进6
  11 + */
  12 + var Cell_Header = function(str) {
  13 + /** 表头数据 */
  14 + this.headStr = str;
  15 + };
  16 + Cell_Header.prototype.setHead = function(str) {
  17 + this.headStr = str || "";
  18 + };
  19 +
  20 + /**
  21 + * 表格,单元格内容类,在表格上只显示时间,但是内部还是保存其他值。
  22 + */
  23 + var Cell_Body_Bc = function() {
  24 + /** 表格单元格显示的信息 */
  25 + this.info = undefined;
  26 +
  27 + this.isSel = false; // 是否被选中
  28 + this.isCanSel = true; // 是否能被选择
  29 + this.isValidInfo = false; // 数据是否有效
  30 +
  31 + this.data = {}; // 内部信息
  32 +
  33 + this.data.ttdid = undefined; // 班次信息Id
  34 + this.data.fcsj = undefined; // 发车时间
  35 + this.data.bcType = undefined; // 班次类型
  36 + this.data.xldir = undefined; // 线路方向
  37 + this.data.isfb = undefined; // 是否分班
  38 + this.data.jhlc = undefined; // 计划里程
  39 + this.data.qdz = null; // 起点站id
  40 + this.data.zdz = null; // 终点站id
  41 + this.data.tcc = null; // 停车场id
  42 +
  43 + this.self.lpId = undefined; // 路牌Id
  44 + this.self.lpName = undefined; // 路牌名字
  45 +
  46 + this.self.fcno = undefined; // 发车序号
  47 + this.self.bcs = undefined; // 班次数
  48 + };
  49 + /**
  50 + * 路牌单元格类。
  51 + */
  52 + var Cell_Body_Lp = function() {
  53 + this.info = undefined;
  54 +
  55 + this.isSel = false; // 是否被选中
  56 + this.isCanSel = false; // 是否能被选择
  57 + this.isValidInfo = false; // 数据是否有效
  58 +
  59 + this.data = {}; // 内部信息
  60 +
  61 + this.data.lpId = undefined; // 路牌Id
  62 + this.data.lpName = undefined; // 路牌名字
  63 + };
  64 + /**
  65 + * 统计单元格类。
  66 + */
  67 + var Cell_Body_Stat = function() {
  68 + this.info = undefined;
  69 +
  70 + this.isSel = false; // 是否被选中
  71 + this.isCanSel = false; // 是否能被选择
  72 + this.isValidInfo = false; // 数据是否有效
  73 +
  74 + this.data = {}; // 内部信息
  75 + };
  76 +
  77 + Cell_Body_Bc.prototype.canSel = function() { // 是否能被选中
  78 + return this.isCanSel;
  79 + };
  80 + Cell_Body_Bc.prototype.canUpdate = function() { // 是否能更新
  81 + return this.isSel && this.data.ttdid;
  82 + };
  83 + Cell_Body_Bc.prototype.canDelete = function() { // 是否能删除
  84 + return this.isSel && this.data.ttdid;
  85 + };
  86 + Cell_Body_Bc.prototype.validInfo = function() { // 验证班次内数据是否正确
  87 + if (this.canSel() && this.data.ttdid) {
  88 + if (this.data.bcType == 'in') {
  89 + this.isValidInfo = this.data.qdz != null && this.data.tcc != null;
  90 + } else if (this.data.bcType == 'out') {
  91 + this.isValidInfo = this.data.tcc != null && this.data.zdz != null;
  92 + } else {
  93 + this.isValidInfo = this.data.qdz != null && this.data.zdz != null;
  94 + }
  95 + } else {
  96 + this.isValidInfo = true;
  97 + }
  98 + return this.isValidInfo;
  99 + };
  100 + Cell_Body_Bc.prototype.where = function(
  101 + xldir, startTime_h_m, endTime_h_m, isInOut
  102 + ) { // 判定班次是否在指定条件内
  103 +
  104 + var fcsj_m_h = [];
  105 + fcsj_m_h[0] = parseInt(this.data.fcsj.split(":")[0]);
  106 + fcsj_m_h[1] = parseInt(this.data.fcsj.split(":")[1]);
  107 +
  108 + var fcsj = new Date(2000,1,1);
  109 + fcsj.setHours(fcsj_m_h[0]);
  110 + fcsj.setMinutes(fcsj_m_h[1]);
  111 +
  112 + var s_temp_date = new Date(2000, 1, 1);
  113 + var e_temp_date = new Date(2000, 1, 1);
  114 +
  115 + if (xldir == 2) { // 上下行
  116 + // 判定是否要进出场班次
  117 + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) {
  118 + return false;
  119 + }
  120 +
  121 + if (startTime_h_m) {
  122 + if (endTime_h_m) {
  123 + s_temp_date.setHours(startTime_h_m[0]);
  124 + s_temp_date.setMinutes(startTime_h_m[1]);
  125 + e_temp_date.setHours(endTime_h_m[0]);
  126 + e_temp_date.setMinutes(endTime_h_m[1]);
  127 + return fcsj >= s_temp_date && fcsj <= e_temp_date;
  128 + } else {
  129 + s_temp_date.setHours(startTime_h_m[0]);
  130 + s_temp_date.setMinutes(startTime_h_m[1]);
  131 + return fcsj >= s_temp_date;
  132 + }
  133 + } else {
  134 + if (endTime_h_m) {
  135 + e_temp_date.setHours(endTime_h_m[0]);
  136 + e_temp_date.setMinutes(endTime_h_m[1]);
  137 + return fcsj <= e_temp_date;
  138 + } else {
  139 + return false;
  140 + }
  141 + }
  142 + } else {
  143 + // 判定是否要进出场班次
  144 + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) {
  145 + return false;
  146 + }
  147 +
  148 + if (xldir == this.xldir) {
  149 + if (startTime_h_m) {
  150 + if (endTime_h_m) {
  151 + s_temp_date.setHours(startTime_h_m[0]);
  152 + s_temp_date.setMinutes(startTime_h_m[1]);
  153 + e_temp_date.setHours(endTime_h_m[0]);
  154 + e_temp_date.setMinutes(endTime_h_m[1]);
  155 + return fcsj >= s_temp_date && fcsj <= e_temp_date;
  156 + } else {
  157 + s_temp_date.setHours(startTime_h_m[0]);
  158 + s_temp_date.setMinutes(startTime_h_m[1]);
  159 + return fcsj >= s_temp_date;
  160 + }
  161 + } else {
  162 + if (endTime_h_m) {
  163 + e_temp_date.setHours(endTime_h_m[0]);
  164 + e_temp_date.setMinutes(endTime_h_m[1]);
  165 + return fcsj <= e_temp_date;
  166 + } else {
  167 + return true;
  168 + }
  169 + }
  170 + } else {
  171 + return false;
  172 + }
  173 + }
  174 + };
  175 +
  176 + Cell_Body_Lp.prototype.canSel = function() { // 是否能被选中
  177 + return this.isCanSel;
  178 + };
  179 + Cell_Body_Lp.prototype.canUpdate = function() { // 是否能更新
  180 + return this.isSel && this.data.ttdid;
  181 + };
  182 + Cell_Body_Lp.prototype.canDelete = function() { // 是否能删除
  183 + return this.isSel && this.data.ttdid;
  184 + };
  185 +
  186 + Cell_Body_Stat.prototype.canSel = function() { // 是否能被选中
  187 + return this.isCanSel;
  188 + };
  189 + Cell_Body_Stat.prototype.canUpdate = function() { // 是否能更新
  190 + return this.isSel && this.data.ttdid;
  191 + };
  192 + Cell_Body_Stat.prototype.canDelete = function() { // 是否能删除
  193 + return this.isSel && this.data.ttdid;
  194 + };
  195 +
  196 + return {
  197 + // TODO:
  198 + };
  199 + }
  200 + ]
  201 +);
0 \ No newline at end of file 202 \ No newline at end of file