Commit fa6de1d41a56bc676b91c665e3b2cbf8e420f578

Authored by 王通
1 parent 688aad40

1.线路班次调度页面,备注行增宽

2.修改"计划烂班"功能名称为“班次取消”,包括某些显示项。
3.线路班次调度页面,输入NP可筛选出发车不准点班次(不符合快一慢三)
4.班次"调整说明"选择项中加入"车辆故障上报类型"各明细项以供选择。

Too many changes to show.

To preserve performance only 1 of 22 files are displayed.

src/main/java/com/bsth/data/schedule/edit_logs/ScheduleModifyLogger.java
1   -package com.bsth.data.schedule.edit_logs;
2   -
3   -import com.alibaba.fastjson.JSONArray;
4   -import com.alibaba.fastjson.JSONObject;
5   -import com.bsth.controller.realcontrol.dto.ChangePersonCar;
6   -import com.bsth.data.schedule.edit_logs.entity.EditType;
7   -import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
8   -import com.bsth.entity.realcontrol.ScheduleRealInfo;
9   -import org.apache.commons.lang3.StringUtils;
10   -import org.slf4j.Logger;
11   -import org.slf4j.LoggerFactory;
12   -
13   -import java.util.LinkedList;
14   -
15   -/**
16   - * 班次修正记录
17   - * Created by panzhao on 2017/5/16.
18   - */
19   -public class ScheduleModifyLogger {
20   -
21   - public static LinkedList<SchEditInfo> list;
22   -
23   - static {
24   - list = new LinkedList<>();
25   - }
26   -
27   - static Logger log = LoggerFactory.getLogger(ScheduleModifyLogger.class);
28   -
29   - /**
30   - * 待发调整
31   - * opType 0: 双击调整、 1:待发调整、2:批量待发调整、3:间隔调整、4:调派系统调整
32   - */
33   - public static void dftz(ScheduleRealInfo sch, String opType, String oldDfsj, String nowDfsj, String remarks, String userId) {
34   - try {
35   - if (oldDfsj.equals(nowDfsj))
36   - return;
37   -
38   - SchEditInfo sei = SchEditInfo.getInstance(sch, userId);
39   - sei.setType(EditType.DFTZ);
40   - sei.setType2(opType);
41   - sei.setRemarks(remarks == null ? "" : remarks);
42   -
43   - //detail
44   - JSONObject jobj = new JSONObject();
45   - jobj.put("old", oldDfsj);
46   - jobj.put("now", nowDfsj);
47   -
48   - sei.setJsonArray(jobj.toJSONString());
49   -
50   - put(sei);
51   - } catch (Exception e) {
52   - log.error("", e);
53   - }
54   - }
55   -
56   - /**
57   - * 发车信息微调记录器
58   - */
59   - public static void fcxxwt(ScheduleRealInfo sch, String remarks, JSONArray jsonArray) {
60   -
61   - try {
62   - if (jsonArray == null || jsonArray.size() == 0)
63   - return;
64   -
65   - SchEditInfo sei = SchEditInfo.getInstance(sch);
66   - sei.setRemarks(remarks);
67   - sei.setJsonArray(jsonArray.toJSONString());
68   - sei.setType(EditType.FCXXWT);
69   -
70   - put(sei);
71   - } catch (Exception e) {
72   - log.error("", e);
73   - }
74   - }
75   -
76   - /**
77   - * 计划烂班
78   - *
79   - * @param remarks
80   - */
81   - public static void jhlb(ScheduleRealInfo sch, String remarks, String userId) {
82   - try {
83   - SchEditInfo sei = SchEditInfo.getInstance(sch, userId);
84   - sei.setRemarks(remarks);
85   - sei.setType(EditType.JHLB);
86   -
87   - put(sei);
88   - } catch (Exception e) {
89   - log.error("", e);
90   - }
91   - }
92   -
93   - /**
94   - * 实发调整
95   - *
96   - * @param sch
97   - * @param nowSfsj
98   - * @param remarks
99   - */
100   - public static void sftz(ScheduleRealInfo sch, String nowSfsj, String remarks) {
101   - try {
102   - SchEditInfo sei = SchEditInfo.getInstance(sch);
103   - sei.setRemarks(remarks);
104   - sei.setType(EditType.SFTZ);
105   - //detail
106   - JSONObject jobj = new JSONObject();
107   - jobj.put("old", sch.getFcsjActual());
108   - jobj.put("now", nowSfsj);
109   -
110   - sei.setJsonArray(jobj.toJSONString());
111   - put(sei);
112   - } catch (Exception e) {
113   - log.error("", e);
114   - }
115   - }
116   -
117   - /**
118   - * 撤销烂班
119   - *
120   - * @param sch
121   - */
122   - public static void cxlb(ScheduleRealInfo sch) {
123   - try {
124   - SchEditInfo sei = SchEditInfo.getInstance(sch);
125   - sei.setType(EditType.CXLB);
126   -
127   - put(sei);
128   - } catch (Exception e) {
129   - log.error("", e);
130   - }
131   - }
132   -
133   - /**
134   - * 撤销执行
135   - *
136   - * @param sch
137   - */
138   - public static void cxzx(ScheduleRealInfo sch) {
139   - try {
140   - SchEditInfo sei = SchEditInfo.getInstance(sch);
141   - sei.setType(EditType.CXZX);
142   -
143   - //detail
144   - JSONObject obj = new JSONObject();
145   - if (StringUtils.isNotEmpty(sch.getFcsjActual()))
146   - obj.put("old_sfsj", sch.getFcsjActual());
147   -
148   - if (StringUtils.isNotEmpty(sch.getZdsjActual()))
149   - obj.put("old_sdsj", sch.getZdsjActual());
150   -
151   - sei.setJsonArray(obj.toJSONString());
152   - put(sei);
153   - } catch (Exception e) {
154   - log.error("", e);
155   - }
156   - }
157   -
158   - /**
159   - * 撤销实发
160   - *
161   - * @param sch
162   - */
163   - public static void cxsf(ScheduleRealInfo sch) {
164   - try {
165   - SchEditInfo sei = SchEditInfo.getInstance(sch);
166   - sei.setType(EditType.CXSF);
167   -
168   - //detail
169   - JSONObject obj = new JSONObject();
170   - obj.put("old_sfsj", sch.getFcsjActual());
171   -
172   - sei.setJsonArray(obj.toJSONString());
173   - put(sei);
174   - } catch (Exception e) {
175   - log.error("", e);
176   - }
177   - }
178   -
179   - /**
180   - * 调整人车
181   - *
182   - * @param sch
183   - * @param cpc
184   - */
185   - public static void tzrc(ScheduleRealInfo sch, ChangePersonCar cpc, String userId) {
186   - try {
187   - String newNbbm = cpc.getClZbh();
188   - String newJsy = cpc.getJsy();
189   - String newSpy = cpc.getSpy();
190   -
191   - if (newNbbm == null && newJsy == null && newSpy==null)
192   - return;
193   -
194   - //detail
195   - JSONObject jobj = new JSONObject();
196   - if (StringUtils.isNotEmpty(newNbbm) && !newNbbm.equals(sch.getClZbh())) {
197   - jobj.put("old_nbbm", sch.getClZbh());
198   - jobj.put("now_nbbm", newNbbm);
199   - }
200   -
201   - String oldJsy = sch.getjGh() + "/" + sch.getjName();
202   - if (StringUtils.isNotEmpty(newJsy) && !newJsy.equals(oldJsy)) {
203   - jobj.put("old_jsy", oldJsy);
204   - jobj.put("now_jsy", newJsy);
205   - }
206   -
207   - String oldSpy = sch.getsGh() + "/" + sch.getsName();
208   - if(newSpy != null){
209   - if(newSpy.equals(""))
210   - newSpy = "/";
211   -
212   - if(!newSpy.equals(oldSpy)){
213   - jobj.put("old_spy", oldSpy);
214   - jobj.put("now_spy", newSpy);
215   - }
216   - }
217   -
218   - if(jobj.size() == 0)
219   - return;
220   -
221   - SchEditInfo sei = SchEditInfo.getInstance(sch, userId);
222   - sei.setType(EditType.TZRC);
223   -
224   - sei.setJsonArray(jobj.toJSONString());
225   - put(sei);
226   - } catch (Exception e) {
227   - log.error("", e);
228   - }
229   - }
230   -
231   - public static void put(SchEditInfo sei) {
232   - list.add(sei);
233   - }
234   -
235   - public static void afterEdit(ScheduleRealInfo sch, String remarks, JSONArray jsonArray) {
236   - try {
237   - if (jsonArray == null || jsonArray.size() == 0)
238   - return;
239   -
240   - SchEditInfo sei = SchEditInfo.getInstance(sch);
241   - sei.setRemarks(remarks);
242   - sei.setJsonArray(jsonArray.toJSONString());
243   - sei.setType(EditType.LSBCTZ);
244   -
245   - put(sei);
246   - } catch (Exception e) {
247   - log.error("", e);
248   - }
249   - }
250   -}
  1 +package com.bsth.data.schedule.edit_logs;
  2 +
  3 +import com.alibaba.fastjson.JSONArray;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  6 +import com.bsth.data.schedule.edit_logs.entity.EditType;
  7 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  8 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  9 +import org.apache.commons.lang3.StringUtils;
  10 +import org.slf4j.Logger;
  11 +import org.slf4j.LoggerFactory;
  12 +
  13 +import java.util.LinkedList;
  14 +
  15 +/**
  16 + * 班次修正记录
  17 + * Created by panzhao on 2017/5/16.
  18 + */
  19 +public class ScheduleModifyLogger {
  20 +
  21 + public static LinkedList<SchEditInfo> list;
  22 +
  23 + static {
  24 + list = new LinkedList<>();
  25 + }
  26 +
  27 + static Logger log = LoggerFactory.getLogger(ScheduleModifyLogger.class);
  28 +
  29 + /**
  30 + * 待发调整
  31 + * opType 0: 双击调整、 1:待发调整、2:批量待发调整、3:间隔调整、4:调派系统调整
  32 + */
  33 + public static void dftz(ScheduleRealInfo sch, String opType, String oldDfsj, String nowDfsj, String remarks, String userId) {
  34 + try {
  35 + if (oldDfsj.equals(nowDfsj))
  36 + return;
  37 +
  38 + SchEditInfo sei = SchEditInfo.getInstance(sch, userId);
  39 + sei.setType(EditType.DFTZ);
  40 + sei.setType2(opType);
  41 + sei.setRemarks(remarks == null ? "" : remarks);
  42 +
  43 + //detail
  44 + JSONObject jobj = new JSONObject();
  45 + jobj.put("old", oldDfsj);
  46 + jobj.put("now", nowDfsj);
  47 +
  48 + sei.setJsonArray(jobj.toJSONString());
  49 +
  50 + put(sei);
  51 + } catch (Exception e) {
  52 + log.error("", e);
  53 + }
  54 + }
  55 +
  56 + /**
  57 + * 发车信息微调记录器
  58 + */
  59 + public static void fcxxwt(ScheduleRealInfo sch, String remarks, JSONArray jsonArray) {
  60 +
  61 + try {
  62 + if (jsonArray == null || jsonArray.size() == 0)
  63 + return;
  64 +
  65 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  66 + sei.setRemarks(remarks);
  67 + sei.setJsonArray(jsonArray.toJSONString());
  68 + sei.setType(EditType.FCXXWT);
  69 +
  70 + put(sei);
  71 + } catch (Exception e) {
  72 + log.error("", e);
  73 + }
  74 + }
  75 +
  76 + /**
  77 + * 班次取消
  78 + *
  79 + * @param remarks
  80 + */
  81 + public static void jhlb(ScheduleRealInfo sch, String remarks, String userId) {
  82 + try {
  83 + SchEditInfo sei = SchEditInfo.getInstance(sch, userId);
  84 + sei.setRemarks(remarks);
  85 + sei.setType(EditType.JHLB);
  86 +
  87 + put(sei);
  88 + } catch (Exception e) {
  89 + log.error("", e);
  90 + }
  91 + }
  92 +
  93 + /**
  94 + * 实发调整
  95 + *
  96 + * @param sch
  97 + * @param nowSfsj
  98 + * @param remarks
  99 + */
  100 + public static void sftz(ScheduleRealInfo sch, String nowSfsj, String remarks) {
  101 + try {
  102 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  103 + sei.setRemarks(remarks);
  104 + sei.setType(EditType.SFTZ);
  105 + //detail
  106 + JSONObject jobj = new JSONObject();
  107 + jobj.put("old", sch.getFcsjActual());
  108 + jobj.put("now", nowSfsj);
  109 +
  110 + sei.setJsonArray(jobj.toJSONString());
  111 + put(sei);
  112 + } catch (Exception e) {
  113 + log.error("", e);
  114 + }
  115 + }
  116 +
  117 + /**
  118 + * 撤销烂班
  119 + *
  120 + * @param sch
  121 + */
  122 + public static void cxlb(ScheduleRealInfo sch) {
  123 + try {
  124 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  125 + sei.setType(EditType.CXLB);
  126 +
  127 + put(sei);
  128 + } catch (Exception e) {
  129 + log.error("", e);
  130 + }
  131 + }
  132 +
  133 + /**
  134 + * 撤销执行
  135 + *
  136 + * @param sch
  137 + */
  138 + public static void cxzx(ScheduleRealInfo sch) {
  139 + try {
  140 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  141 + sei.setType(EditType.CXZX);
  142 +
  143 + //detail
  144 + JSONObject obj = new JSONObject();
  145 + if (StringUtils.isNotEmpty(sch.getFcsjActual()))
  146 + obj.put("old_sfsj", sch.getFcsjActual());
  147 +
  148 + if (StringUtils.isNotEmpty(sch.getZdsjActual()))
  149 + obj.put("old_sdsj", sch.getZdsjActual());
  150 +
  151 + sei.setJsonArray(obj.toJSONString());
  152 + put(sei);
  153 + } catch (Exception e) {
  154 + log.error("", e);
  155 + }
  156 + }
  157 +
  158 + /**
  159 + * 撤销实发
  160 + *
  161 + * @param sch
  162 + */
  163 + public static void cxsf(ScheduleRealInfo sch) {
  164 + try {
  165 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  166 + sei.setType(EditType.CXSF);
  167 +
  168 + //detail
  169 + JSONObject obj = new JSONObject();
  170 + obj.put("old_sfsj", sch.getFcsjActual());
  171 +
  172 + sei.setJsonArray(obj.toJSONString());
  173 + put(sei);
  174 + } catch (Exception e) {
  175 + log.error("", e);
  176 + }
  177 + }
  178 +
  179 + /**
  180 + * 调整人车
  181 + *
  182 + * @param sch
  183 + * @param cpc
  184 + */
  185 + public static void tzrc(ScheduleRealInfo sch, ChangePersonCar cpc, String userId) {
  186 + try {
  187 + String newNbbm = cpc.getClZbh();
  188 + String newJsy = cpc.getJsy();
  189 + String newSpy = cpc.getSpy();
  190 +
  191 + if (newNbbm == null && newJsy == null && newSpy==null)
  192 + return;
  193 +
  194 + //detail
  195 + JSONObject jobj = new JSONObject();
  196 + if (StringUtils.isNotEmpty(newNbbm) && !newNbbm.equals(sch.getClZbh())) {
  197 + jobj.put("old_nbbm", sch.getClZbh());
  198 + jobj.put("now_nbbm", newNbbm);
  199 + }
  200 +
  201 + String oldJsy = sch.getjGh() + "/" + sch.getjName();
  202 + if (StringUtils.isNotEmpty(newJsy) && !newJsy.equals(oldJsy)) {
  203 + jobj.put("old_jsy", oldJsy);
  204 + jobj.put("now_jsy", newJsy);
  205 + }
  206 +
  207 + String oldSpy = sch.getsGh() + "/" + sch.getsName();
  208 + if(newSpy != null){
  209 + if(newSpy.equals(""))
  210 + newSpy = "/";
  211 +
  212 + if(!newSpy.equals(oldSpy)){
  213 + jobj.put("old_spy", oldSpy);
  214 + jobj.put("now_spy", newSpy);
  215 + }
  216 + }
  217 +
  218 + if(jobj.size() == 0)
  219 + return;
  220 +
  221 + SchEditInfo sei = SchEditInfo.getInstance(sch, userId);
  222 + sei.setType(EditType.TZRC);
  223 +
  224 + sei.setJsonArray(jobj.toJSONString());
  225 + put(sei);
  226 + } catch (Exception e) {
  227 + log.error("", e);
  228 + }
  229 + }
  230 +
  231 + public static void put(SchEditInfo sei) {
  232 + list.add(sei);
  233 + }
  234 +
  235 + public static void afterEdit(ScheduleRealInfo sch, String remarks, JSONArray jsonArray) {
  236 + try {
  237 + if (jsonArray == null || jsonArray.size() == 0)
  238 + return;
  239 +
  240 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  241 + sei.setRemarks(remarks);
  242 + sei.setJsonArray(jsonArray.toJSONString());
  243 + sei.setType(EditType.LSBCTZ);
  244 +
  245 + put(sei);
  246 + } catch (Exception e) {
  247 + log.error("", e);
  248 + }
  249 + }
  250 +}
... ...