Commit d27272fe79fce87b29e0a4e9a34ce52a04b29586
1 parent
64338fb5
Update
Showing
13 changed files
with
923 additions
and
502 deletions
src/main/java/com/bsth/service/schedule/TTInfoDetailService.java
| ... | ... | @@ -52,7 +52,7 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> { |
| 52 | 52 | this.xldir = xldir; |
| 53 | 53 | if ("N".equals(isfb)) |
| 54 | 54 | this.isfb = false; |
| 55 | - else if ("Y".equals(isfb)) | |
| 55 | + else if ("Y".equals(isfb) || "true".equals(isfb)) | |
| 56 | 56 | this.isfb = true; |
| 57 | 57 | else |
| 58 | 58 | this.isfb = false; | ... | ... |
src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
| ... | ... | @@ -16,12 +16,12 @@ |
| 16 | 16 | </parameter> |
| 17 | 17 | <parameter> |
| 18 | 18 | <name>ttid</name> |
| 19 | - <default_value>63</default_value> | |
| 19 | + <default_value>79</default_value> | |
| 20 | 20 | <description>时刻表id</description> |
| 21 | 21 | </parameter> |
| 22 | 22 | <parameter> |
| 23 | 23 | <name>xlid</name> |
| 24 | - <default_value>63017</default_value> | |
| 24 | + <default_value>63020</default_value> | |
| 25 | 25 | <description>线路id</description> |
| 26 | 26 | </parameter> |
| 27 | 27 | </parameters> |
| ... | ... | @@ -2045,6 +2045,36 @@ |
| 2045 | 2045 | </step> |
| 2046 | 2046 | |
| 2047 | 2047 | <step> |
| 2048 | + <name>合并内容</name> | |
| 2049 | + <type>ScriptValueMod</type> | |
| 2050 | + <description/> | |
| 2051 | + <distribute>Y</distribute> | |
| 2052 | + <custom_distribution/> | |
| 2053 | + <copies>1</copies> | |
| 2054 | + <partitioning> | |
| 2055 | + <method>none</method> | |
| 2056 | + <schema_name/> | |
| 2057 | + </partitioning> | |
| 2058 | + <compatible>N</compatible> | |
| 2059 | + <optimizationLevel>9</optimizationLevel> | |
| 2060 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 2061 | + <jsScript_name>Script 1</jsScript_name> | |
| 2062 | + <jsScript_script>//Script here

// 顺序,id,fcsj,jhlc,zdname,bctype,xldir,isfb
var all_content_array = [];
var all_content = ""; 
all_content_array.push(id);
all_content_array.push(fcsj);
all_content_array.push(jhlc);
all_content_array.push(fczdName);
all_content_array.push(bc_type);
all_content_array.push(xl_dir);
all_content_array.push(isfb);
all_content_array.push(qdz || 'null');
all_content_array.push(zdz || 'null');
all_content_array.push(tcc || 'null');

all_content = all_content_array.join(","); // 逗号分隔</jsScript_script> | |
| 2063 | + </jsScript> </jsScripts> <fields> <field> <name>all_content</name> | |
| 2064 | + <rename>all_content</rename> | |
| 2065 | + <type>String</type> | |
| 2066 | + <length>-1</length> | |
| 2067 | + <precision>-1</precision> | |
| 2068 | + <replace>N</replace> | |
| 2069 | + </field> </fields> <cluster_schema/> | |
| 2070 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2071 | + <xloc>551</xloc> | |
| 2072 | + <yloc>366</yloc> | |
| 2073 | + <draw>Y</draw> | |
| 2074 | + </GUI> | |
| 2075 | + </step> | |
| 2076 | + | |
| 2077 | + <step> | |
| 2048 | 2078 | <name>字段选择</name> |
| 2049 | 2079 | <type>SelectValues</type> |
| 2050 | 2080 | <description/> |
| ... | ... | @@ -2231,62 +2261,8 @@ |
| 2231 | 2261 | </step> |
| 2232 | 2262 | |
| 2233 | 2263 | <step> |
| 2234 | - <name>查找终点站名称</name> | |
| 2235 | - <type>DBLookup</type> | |
| 2236 | - <description/> | |
| 2237 | - <distribute>Y</distribute> | |
| 2238 | - <custom_distribution/> | |
| 2239 | - <copies>1</copies> | |
| 2240 | - <partitioning> | |
| 2241 | - <method>none</method> | |
| 2242 | - <schema_name/> | |
| 2243 | - </partitioning> | |
| 2244 | - <connection>bus_control_variable</connection> | |
| 2245 | - <cache>Y</cache> | |
| 2246 | - <cache_load_all>Y</cache_load_all> | |
| 2247 | - <cache_size>0</cache_size> | |
| 2248 | - <lookup> | |
| 2249 | - <schema/> | |
| 2250 | - <table>bsth_c_stationroute</table> | |
| 2251 | - <orderby/> | |
| 2252 | - <fail_on_multiple>N</fail_on_multiple> | |
| 2253 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 2254 | - <key> | |
| 2255 | - <name>xl</name> | |
| 2256 | - <field>line</field> | |
| 2257 | - <condition>=</condition> | |
| 2258 | - <name2/> | |
| 2259 | - </key> | |
| 2260 | - <key> | |
| 2261 | - <name>xl_dir</name> | |
| 2262 | - <field>directions</field> | |
| 2263 | - <condition>=</condition> | |
| 2264 | - <name2/> | |
| 2265 | - </key> | |
| 2266 | - <key> | |
| 2267 | - <name>endZdType</name> | |
| 2268 | - <field>station_mark</field> | |
| 2269 | - <condition>=</condition> | |
| 2270 | - <name2/> | |
| 2271 | - </key> | |
| 2272 | - <value> | |
| 2273 | - <name>station_name</name> | |
| 2274 | - <rename>zdzName</rename> | |
| 2275 | - <default/> | |
| 2276 | - <type>String</type> | |
| 2277 | - </value> | |
| 2278 | - </lookup> | |
| 2279 | - <cluster_schema/> | |
| 2280 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2281 | - <xloc>688</xloc> | |
| 2282 | - <yloc>86</yloc> | |
| 2283 | - <draw>Y</draw> | |
| 2284 | - </GUI> | |
| 2285 | - </step> | |
| 2286 | - | |
| 2287 | - <step> | |
| 2288 | - <name>查找起点站名称</name> | |
| 2289 | - <type>DBLookup</type> | |
| 2264 | + <name>文本文件输出</name> | |
| 2265 | + <type>TextFileOutput</type> | |
| 2290 | 2266 | <description/> |
| 2291 | 2267 | <distribute>Y</distribute> |
| 2292 | 2268 | <custom_distribution/> |
| ... | ... | @@ -2295,351 +2271,95 @@ |
| 2295 | 2271 | <method>none</method> |
| 2296 | 2272 | <schema_name/> |
| 2297 | 2273 | </partitioning> |
| 2298 | - <connection>bus_control_variable</connection> | |
| 2299 | - <cache>Y</cache> | |
| 2300 | - <cache_load_all>Y</cache_load_all> | |
| 2301 | - <cache_size>0</cache_size> | |
| 2302 | - <lookup> | |
| 2303 | - <schema/> | |
| 2304 | - <table>bsth_c_stationroute</table> | |
| 2305 | - <orderby/> | |
| 2306 | - <fail_on_multiple>N</fail_on_multiple> | |
| 2307 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 2308 | - <key> | |
| 2309 | - <name>xl</name> | |
| 2310 | - <field>line</field> | |
| 2311 | - <condition>=</condition> | |
| 2312 | - <name2/> | |
| 2313 | - </key> | |
| 2314 | - <key> | |
| 2315 | - <name>xl_dir</name> | |
| 2316 | - <field>directions</field> | |
| 2317 | - <condition>=</condition> | |
| 2318 | - <name2/> | |
| 2319 | - </key> | |
| 2320 | - <key> | |
| 2321 | - <name>startZdType</name> | |
| 2322 | - <field>station_mark</field> | |
| 2323 | - <condition>=</condition> | |
| 2324 | - <name2/> | |
| 2325 | - </key> | |
| 2326 | - <value> | |
| 2327 | - <name>station_name</name> | |
| 2328 | - <rename>qdzName</rename> | |
| 2329 | - <default/> | |
| 2274 | + <separator>;</separator> | |
| 2275 | + <enclosure>"</enclosure> | |
| 2276 | + <enclosure_forced>N</enclosure_forced> | |
| 2277 | + <enclosure_fix_disabled>N</enclosure_fix_disabled> | |
| 2278 | + <header>Y</header> | |
| 2279 | + <footer>N</footer> | |
| 2280 | + <format>DOS</format> | |
| 2281 | + <compression>None</compression> | |
| 2282 | + <encoding>UTF-8</encoding> | |
| 2283 | + <endedLine/> | |
| 2284 | + <fileNameInField>N</fileNameInField> | |
| 2285 | + <fileNameField/> | |
| 2286 | + <create_parent_folder>Y</create_parent_folder> | |
| 2287 | + <file> | |
| 2288 | + <name>${tempfilepath}</name> | |
| 2289 | + <is_command>N</is_command> | |
| 2290 | + <servlet_output>N</servlet_output> | |
| 2291 | + <do_not_open_new_file_init>N</do_not_open_new_file_init> | |
| 2292 | + <extention>txt</extention> | |
| 2293 | + <append>N</append> | |
| 2294 | + <split>N</split> | |
| 2295 | + <haspartno>N</haspartno> | |
| 2296 | + <add_date>N</add_date> | |
| 2297 | + <add_time>N</add_time> | |
| 2298 | + <SpecifyFormat>N</SpecifyFormat> | |
| 2299 | + <date_time_format/> | |
| 2300 | + <add_to_result_filenames>Y</add_to_result_filenames> | |
| 2301 | + <pad>N</pad> | |
| 2302 | + <fast_dump>N</fast_dump> | |
| 2303 | + <splitevery>0</splitevery> | |
| 2304 | + </file> | |
| 2305 | + <fields> | |
| 2306 | + <field> | |
| 2307 | + <name>lp</name> | |
| 2330 | 2308 | <type>String</type> |
| 2331 | - </value> | |
| 2332 | - </lookup> | |
| 2333 | - <cluster_schema/> | |
| 2334 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2335 | - <xloc>553</xloc> | |
| 2336 | - <yloc>86</yloc> | |
| 2337 | - <draw>Y</draw> | |
| 2338 | - </GUI> | |
| 2339 | - </step> | |
| 2340 | - | |
| 2341 | - <step> | |
| 2342 | - <name>正常班次站点查询用数据</name> | |
| 2343 | - <type>ScriptValueMod</type> | |
| 2344 | - <description/> | |
| 2345 | - <distribute>Y</distribute> | |
| 2346 | - <custom_distribution/> | |
| 2347 | - <copies>1</copies> | |
| 2348 | - <partitioning> | |
| 2349 | - <method>none</method> | |
| 2350 | - <schema_name/> | |
| 2351 | - </partitioning> | |
| 2352 | - <compatible>N</compatible> | |
| 2353 | - <optimizationLevel>9</optimizationLevel> | |
| 2354 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 2355 | - <jsScript_name>Script 1</jsScript_name> | |
| 2356 | - <jsScript_script>//Script here

var startZdType = 'B'; // 起点站站点类型标识别
var endZdType = 'E'; // 终点站站点类型标识</jsScript_script> | |
| 2357 | - </jsScript> </jsScripts> <fields> <field> <name>startZdType</name> | |
| 2358 | - <rename>startZdType</rename> | |
| 2309 | + <format/> | |
| 2310 | + <currency/> | |
| 2311 | + <decimal/> | |
| 2312 | + <group/> | |
| 2313 | + <nullif/> | |
| 2314 | + <trim_type>none</trim_type> | |
| 2315 | + <length>255</length> | |
| 2316 | + <precision>-1</precision> | |
| 2317 | + </field> | |
| 2318 | + <field> | |
| 2319 | + <name>fcno1</name> | |
| 2359 | 2320 | <type>String</type> |
| 2321 | + <format/> | |
| 2322 | + <currency/> | |
| 2323 | + <decimal/> | |
| 2324 | + <group/> | |
| 2325 | + <nullif/> | |
| 2326 | + <trim_type>none</trim_type> | |
| 2360 | 2327 | <length>-1</length> |
| 2361 | 2328 | <precision>-1</precision> |
| 2362 | - <replace>N</replace> | |
| 2363 | - </field> <field> <name>endZdType</name> | |
| 2364 | - <rename>endZdType</rename> | |
| 2329 | + </field> | |
| 2330 | + <field> | |
| 2331 | + <name>fcno2</name> | |
| 2365 | 2332 | <type>String</type> |
| 2333 | + <format/> | |
| 2334 | + <currency/> | |
| 2335 | + <decimal/> | |
| 2336 | + <group/> | |
| 2337 | + <nullif/> | |
| 2338 | + <trim_type>none</trim_type> | |
| 2366 | 2339 | <length>-1</length> |
| 2367 | 2340 | <precision>-1</precision> |
| 2368 | - <replace>N</replace> | |
| 2369 | - </field> </fields> <cluster_schema/> | |
| 2370 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2371 | - <xloc>391</xloc> | |
| 2372 | - <yloc>87</yloc> | |
| 2373 | - <draw>Y</draw> | |
| 2374 | - </GUI> | |
| 2375 | - </step> | |
| 2376 | - | |
| 2377 | - <step> | |
| 2378 | - <name>获取变量</name> | |
| 2379 | - <type>GetVariable</type> | |
| 2380 | - <description/> | |
| 2381 | - <distribute>Y</distribute> | |
| 2382 | - <custom_distribution/> | |
| 2383 | - <copies>1</copies> | |
| 2384 | - <partitioning> | |
| 2385 | - <method>none</method> | |
| 2386 | - <schema_name/> | |
| 2387 | - </partitioning> | |
| 2388 | - <fields> | |
| 2341 | + </field> | |
| 2389 | 2342 | <field> |
| 2390 | - <name>xlid_</name> | |
| 2391 | - <variable>${xlid}</variable> | |
| 2392 | - <type>Integer</type> | |
| 2343 | + <name>fcno3</name> | |
| 2344 | + <type>String</type> | |
| 2393 | 2345 | <format/> |
| 2394 | 2346 | <currency/> |
| 2395 | 2347 | <decimal/> |
| 2396 | 2348 | <group/> |
| 2349 | + <nullif/> | |
| 2350 | + <trim_type>none</trim_type> | |
| 2397 | 2351 | <length>-1</length> |
| 2398 | 2352 | <precision>-1</precision> |
| 2399 | - <trim_type>none</trim_type> | |
| 2400 | 2353 | </field> |
| 2401 | 2354 | <field> |
| 2402 | - <name>ttid_</name> | |
| 2403 | - <variable>${ttid}</variable> | |
| 2404 | - <type>Number</type> | |
| 2355 | + <name>fcno4</name> | |
| 2356 | + <type>String</type> | |
| 2405 | 2357 | <format/> |
| 2406 | 2358 | <currency/> |
| 2407 | 2359 | <decimal/> |
| 2408 | 2360 | <group/> |
| 2409 | - <length>-1</length> | |
| 2410 | - <precision>-1</precision> | |
| 2411 | - <trim_type>none</trim_type> | |
| 2412 | - </field> | |
| 2413 | - </fields> | |
| 2414 | - <cluster_schema/> | |
| 2415 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2416 | - <xloc>45</xloc> | |
| 2417 | - <yloc>189</yloc> | |
| 2418 | - <draw>Y</draw> | |
| 2419 | - </GUI> | |
| 2420 | - </step> | |
| 2421 | - | |
| 2422 | - <step> | |
| 2423 | - <name>表输入</name> | |
| 2424 | - <type>TableInput</type> | |
| 2425 | - <description/> | |
| 2426 | - <distribute>Y</distribute> | |
| 2427 | - <custom_distribution/> | |
| 2428 | - <copies>1</copies> | |
| 2429 | - <partitioning> | |
| 2430 | - <method>none</method> | |
| 2431 | - <schema_name/> | |
| 2432 | - </partitioning> | |
| 2433 | - <connection>bus_control_variable</connection> | |
| 2434 | - <sql>select 
t.id as id
, g.lp_name as lp
, g.xl as xl
, qdz
, zdz
, tcc
, fcsj
, jhlc
, bc_type 
, bcs
, fcno
, xl_dir
, isfb
from bsth_c_s_ttinfo_detail t left join 
bsth_c_s_gbi g on t.lp = g.id 
where 
g.xl = ? and
t.ttinfo = ? 
order by t.bcs asc</sql> | |
| 2435 | - <limit>0</limit> | |
| 2436 | - <lookup>获取变量</lookup> | |
| 2437 | - <execute_each_row>N</execute_each_row> | |
| 2438 | - <variables_active>Y</variables_active> | |
| 2439 | - <lazy_conversion_active>N</lazy_conversion_active> | |
| 2440 | - <cluster_schema/> | |
| 2441 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2442 | - <xloc>130</xloc> | |
| 2443 | - <yloc>85</yloc> | |
| 2444 | - <draw>Y</draw> | |
| 2445 | - </GUI> | |
| 2446 | - </step> | |
| 2447 | - | |
| 2448 | - <step> | |
| 2449 | - <name>计算发车站名</name> | |
| 2450 | - <type>ScriptValueMod</type> | |
| 2451 | - <description/> | |
| 2452 | - <distribute>Y</distribute> | |
| 2453 | - <custom_distribution/> | |
| 2454 | - <copies>1</copies> | |
| 2455 | - <partitioning> | |
| 2456 | - <method>none</method> | |
| 2457 | - <schema_name/> | |
| 2458 | - </partitioning> | |
| 2459 | - <compatible>N</compatible> | |
| 2460 | - <optimizationLevel>9</optimizationLevel> | |
| 2461 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 2462 | - <jsScript_name>Script 1</jsScript_name> | |
| 2463 | - <jsScript_script>//Script here

var fczdName = null; // 发车站点名字
if (bc_type == "in") {
 fczdName = "进场";
} else if (bc_type == "out") {
 fczdName = "出场";
} else {
 fczdName = qdzName;
}</jsScript_script> | |
| 2464 | - </jsScript> </jsScripts> <fields> <field> <name>fczdName</name> | |
| 2465 | - <rename>fczdName</rename> | |
| 2466 | - <type>String</type> | |
| 2467 | - <length>-1</length> | |
| 2468 | - <precision>-1</precision> | |
| 2469 | - <replace>N</replace> | |
| 2470 | - </field> </fields> <cluster_schema/> | |
| 2471 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2472 | - <xloc>550</xloc> | |
| 2473 | - <yloc>276</yloc> | |
| 2474 | - <draw>Y</draw> | |
| 2475 | - </GUI> | |
| 2476 | - </step> | |
| 2477 | - | |
| 2478 | - <step> | |
| 2479 | - <name>过滤记录</name> | |
| 2480 | - <type>FilterRows</type> | |
| 2481 | - <description/> | |
| 2482 | - <distribute>Y</distribute> | |
| 2483 | - <custom_distribution/> | |
| 2484 | - <copies>1</copies> | |
| 2485 | - <partitioning> | |
| 2486 | - <method>none</method> | |
| 2487 | - <schema_name/> | |
| 2488 | - </partitioning> | |
| 2489 | -<send_true_to>正常班次站点查询用数据</send_true_to> | |
| 2490 | -<send_false_to>进场出场班次查询用的数据</send_false_to> | |
| 2491 | - <compare> | |
| 2492 | -<condition> | |
| 2493 | - <negated>N</negated> | |
| 2494 | - <leftvalue>bc_type</leftvalue> | |
| 2495 | - <function>=</function> | |
| 2496 | - <rightvalue/> | |
| 2497 | - <value><name>constant</name><type>String</type><text>normal</text><length>-1</length><precision>-1</precision><isnull>N</isnull><mask/></value> </condition> | |
| 2498 | - </compare> | |
| 2499 | - <cluster_schema/> | |
| 2500 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2501 | - <xloc>248</xloc> | |
| 2502 | - <yloc>87</yloc> | |
| 2503 | - <draw>Y</draw> | |
| 2504 | - </GUI> | |
| 2505 | - </step> | |
| 2506 | - | |
| 2507 | - <step> | |
| 2508 | - <name>进场出场班次查询用的数据</name> | |
| 2509 | - <type>ScriptValueMod</type> | |
| 2510 | - <description/> | |
| 2511 | - <distribute>Y</distribute> | |
| 2512 | - <custom_distribution/> | |
| 2513 | - <copies>1</copies> | |
| 2514 | - <partitioning> | |
| 2515 | - <method>none</method> | |
| 2516 | - <schema_name/> | |
| 2517 | - </partitioning> | |
| 2518 | - <compatible>N</compatible> | |
| 2519 | - <optimizationLevel>9</optimizationLevel> | |
| 2520 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 2521 | - <jsScript_name>Script 1</jsScript_name> | |
| 2522 | - <jsScript_script>//Script here

var qdzName = null; // 起点站名字
var zdzName = null; // 终点站名字</jsScript_script> | |
| 2523 | - </jsScript> </jsScripts> <fields> <field> <name>qdzName</name> | |
| 2524 | - <rename>qdzName</rename> | |
| 2525 | - <type>String</type> | |
| 2526 | - <length>-1</length> | |
| 2527 | - <precision>-1</precision> | |
| 2528 | - <replace>N</replace> | |
| 2529 | - </field> <field> <name>zdzName</name> | |
| 2530 | - <rename>zdzName</rename> | |
| 2531 | - <type>String</type> | |
| 2532 | - <length>-1</length> | |
| 2533 | - <precision>-1</precision> | |
| 2534 | - <replace>N</replace> | |
| 2535 | - </field> </fields> <cluster_schema/> | |
| 2536 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2537 | - <xloc>250</xloc> | |
| 2538 | - <yloc>188</yloc> | |
| 2539 | - <draw>Y</draw> | |
| 2540 | - </GUI> | |
| 2541 | - </step> | |
| 2542 | - | |
| 2543 | - <step> | |
| 2544 | - <name>文本文件输出</name> | |
| 2545 | - <type>TextFileOutput</type> | |
| 2546 | - <description/> | |
| 2547 | - <distribute>Y</distribute> | |
| 2548 | - <custom_distribution/> | |
| 2549 | - <copies>1</copies> | |
| 2550 | - <partitioning> | |
| 2551 | - <method>none</method> | |
| 2552 | - <schema_name/> | |
| 2553 | - </partitioning> | |
| 2554 | - <separator>;</separator> | |
| 2555 | - <enclosure>"</enclosure> | |
| 2556 | - <enclosure_forced>N</enclosure_forced> | |
| 2557 | - <enclosure_fix_disabled>N</enclosure_fix_disabled> | |
| 2558 | - <header>Y</header> | |
| 2559 | - <footer>N</footer> | |
| 2560 | - <format>DOS</format> | |
| 2561 | - <compression>None</compression> | |
| 2562 | - <encoding/> | |
| 2563 | - <endedLine/> | |
| 2564 | - <fileNameInField>N</fileNameInField> | |
| 2565 | - <fileNameField/> | |
| 2566 | - <create_parent_folder>Y</create_parent_folder> | |
| 2567 | - <file> | |
| 2568 | - <name>${tempfilepath}</name> | |
| 2569 | - <is_command>N</is_command> | |
| 2570 | - <servlet_output>N</servlet_output> | |
| 2571 | - <do_not_open_new_file_init>N</do_not_open_new_file_init> | |
| 2572 | - <extention>txt</extention> | |
| 2573 | - <append>N</append> | |
| 2574 | - <split>N</split> | |
| 2575 | - <haspartno>N</haspartno> | |
| 2576 | - <add_date>N</add_date> | |
| 2577 | - <add_time>N</add_time> | |
| 2578 | - <SpecifyFormat>N</SpecifyFormat> | |
| 2579 | - <date_time_format/> | |
| 2580 | - <add_to_result_filenames>Y</add_to_result_filenames> | |
| 2581 | - <pad>N</pad> | |
| 2582 | - <fast_dump>N</fast_dump> | |
| 2583 | - <splitevery>0</splitevery> | |
| 2584 | - </file> | |
| 2585 | - <fields> | |
| 2586 | - <field> | |
| 2587 | - <name>lp</name> | |
| 2588 | - <type>String</type> | |
| 2589 | - <format/> | |
| 2590 | - <currency/> | |
| 2591 | - <decimal/> | |
| 2592 | - <group/> | |
| 2593 | - <nullif/> | |
| 2594 | - <trim_type>none</trim_type> | |
| 2595 | - <length>255</length> | |
| 2596 | - <precision>-1</precision> | |
| 2597 | - </field> | |
| 2598 | - <field> | |
| 2599 | - <name>fcno1</name> | |
| 2600 | - <type>String</type> | |
| 2601 | - <format/> | |
| 2602 | - <currency/> | |
| 2603 | - <decimal/> | |
| 2604 | - <group/> | |
| 2605 | - <nullif/> | |
| 2606 | - <trim_type>none</trim_type> | |
| 2607 | - <length>-1</length> | |
| 2608 | - <precision>-1</precision> | |
| 2609 | - </field> | |
| 2610 | - <field> | |
| 2611 | - <name>fcno2</name> | |
| 2612 | - <type>String</type> | |
| 2613 | - <format/> | |
| 2614 | - <currency/> | |
| 2615 | - <decimal/> | |
| 2616 | - <group/> | |
| 2617 | - <nullif/> | |
| 2618 | - <trim_type>none</trim_type> | |
| 2619 | - <length>-1</length> | |
| 2620 | - <precision>-1</precision> | |
| 2621 | - </field> | |
| 2622 | - <field> | |
| 2623 | - <name>fcno3</name> | |
| 2624 | - <type>String</type> | |
| 2625 | - <format/> | |
| 2626 | - <currency/> | |
| 2627 | - <decimal/> | |
| 2628 | - <group/> | |
| 2629 | - <nullif/> | |
| 2630 | - <trim_type>none</trim_type> | |
| 2631 | - <length>-1</length> | |
| 2632 | - <precision>-1</precision> | |
| 2633 | - </field> | |
| 2634 | - <field> | |
| 2635 | - <name>fcno4</name> | |
| 2636 | - <type>String</type> | |
| 2637 | - <format/> | |
| 2638 | - <currency/> | |
| 2639 | - <decimal/> | |
| 2640 | - <group/> | |
| 2641 | - <nullif/> | |
| 2642 | - <trim_type>none</trim_type> | |
| 2361 | + <nullif/> | |
| 2362 | + <trim_type>none</trim_type> | |
| 2643 | 2363 | <length>-1</length> |
| 2644 | 2364 | <precision>-1</precision> |
| 2645 | 2365 | </field> |
| ... | ... | @@ -3445,8 +3165,8 @@ |
| 3445 | 3165 | </step> |
| 3446 | 3166 | |
| 3447 | 3167 | <step> |
| 3448 | - <name>合并内容</name> | |
| 3449 | - <type>ScriptValueMod</type> | |
| 3168 | + <name>查找终点站名称</name> | |
| 3169 | + <type>DBLookup</type> | |
| 3450 | 3170 | <description/> |
| 3451 | 3171 | <distribute>Y</distribute> |
| 3452 | 3172 | <custom_distribution/> |
| ... | ... | @@ -3455,21 +3175,301 @@ |
| 3455 | 3175 | <method>none</method> |
| 3456 | 3176 | <schema_name/> |
| 3457 | 3177 | </partitioning> |
| 3458 | - <compatible>N</compatible> | |
| 3459 | - <optimizationLevel>9</optimizationLevel> | |
| 3460 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 3461 | - <jsScript_name>Script 1</jsScript_name> | |
| 3462 | - <jsScript_script>//Script here

// 顺序,id,fcsj,jhlc,zdname,bctype,xldir,isfb
var all_content_array = [];
var all_content = ""; 
all_content_array.push(id);
all_content_array.push(fcsj);
all_content_array.push(jhlc);
all_content_array.push(fczdName);
all_content_array.push(bc_type);
all_content_array.push(xl_dir);
all_content_array.push(isfb);
all_content_array.push(qdz || 'null');
all_content_array.push(zdz || 'null');
all_content_array.push(tcc || 'null');

all_content = all_content_array.join(","); // 逗号分隔</jsScript_script> | |
| 3463 | - </jsScript> </jsScripts> <fields> <field> <name>all_content</name> | |
| 3464 | - <rename>all_content</rename> | |
| 3465 | - <type>String</type> | |
| 3466 | - <length>-1</length> | |
| 3467 | - <precision>-1</precision> | |
| 3468 | - <replace>N</replace> | |
| 3469 | - </field> </fields> <cluster_schema/> | |
| 3470 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3471 | - <xloc>551</xloc> | |
| 3472 | - <yloc>366</yloc> | |
| 3178 | + <connection>bus_control_variable</connection> | |
| 3179 | + <cache>Y</cache> | |
| 3180 | + <cache_load_all>Y</cache_load_all> | |
| 3181 | + <cache_size>0</cache_size> | |
| 3182 | + <lookup> | |
| 3183 | + <schema/> | |
| 3184 | + <table>bsth_c_stationroute</table> | |
| 3185 | + <orderby/> | |
| 3186 | + <fail_on_multiple>N</fail_on_multiple> | |
| 3187 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 3188 | + <key> | |
| 3189 | + <name>xl</name> | |
| 3190 | + <field>line</field> | |
| 3191 | + <condition>=</condition> | |
| 3192 | + <name2/> | |
| 3193 | + </key> | |
| 3194 | + <key> | |
| 3195 | + <name>xl_dir</name> | |
| 3196 | + <field>directions</field> | |
| 3197 | + <condition>=</condition> | |
| 3198 | + <name2/> | |
| 3199 | + </key> | |
| 3200 | + <key> | |
| 3201 | + <name>endZdType</name> | |
| 3202 | + <field>station_mark</field> | |
| 3203 | + <condition>=</condition> | |
| 3204 | + <name2/> | |
| 3205 | + </key> | |
| 3206 | + <value> | |
| 3207 | + <name>station_name</name> | |
| 3208 | + <rename>zdzName</rename> | |
| 3209 | + <default/> | |
| 3210 | + <type>String</type> | |
| 3211 | + </value> | |
| 3212 | + </lookup> | |
| 3213 | + <cluster_schema/> | |
| 3214 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3215 | + <xloc>688</xloc> | |
| 3216 | + <yloc>86</yloc> | |
| 3217 | + <draw>Y</draw> | |
| 3218 | + </GUI> | |
| 3219 | + </step> | |
| 3220 | + | |
| 3221 | + <step> | |
| 3222 | + <name>查找起点站名称</name> | |
| 3223 | + <type>DBLookup</type> | |
| 3224 | + <description/> | |
| 3225 | + <distribute>Y</distribute> | |
| 3226 | + <custom_distribution/> | |
| 3227 | + <copies>1</copies> | |
| 3228 | + <partitioning> | |
| 3229 | + <method>none</method> | |
| 3230 | + <schema_name/> | |
| 3231 | + </partitioning> | |
| 3232 | + <connection>bus_control_variable</connection> | |
| 3233 | + <cache>Y</cache> | |
| 3234 | + <cache_load_all>Y</cache_load_all> | |
| 3235 | + <cache_size>0</cache_size> | |
| 3236 | + <lookup> | |
| 3237 | + <schema/> | |
| 3238 | + <table>bsth_c_stationroute</table> | |
| 3239 | + <orderby/> | |
| 3240 | + <fail_on_multiple>N</fail_on_multiple> | |
| 3241 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 3242 | + <key> | |
| 3243 | + <name>xl</name> | |
| 3244 | + <field>line</field> | |
| 3245 | + <condition>=</condition> | |
| 3246 | + <name2/> | |
| 3247 | + </key> | |
| 3248 | + <key> | |
| 3249 | + <name>xl_dir</name> | |
| 3250 | + <field>directions</field> | |
| 3251 | + <condition>=</condition> | |
| 3252 | + <name2/> | |
| 3253 | + </key> | |
| 3254 | + <key> | |
| 3255 | + <name>startZdType</name> | |
| 3256 | + <field>station_mark</field> | |
| 3257 | + <condition>=</condition> | |
| 3258 | + <name2/> | |
| 3259 | + </key> | |
| 3260 | + <value> | |
| 3261 | + <name>station_name</name> | |
| 3262 | + <rename>qdzName</rename> | |
| 3263 | + <default/> | |
| 3264 | + <type>String</type> | |
| 3265 | + </value> | |
| 3266 | + </lookup> | |
| 3267 | + <cluster_schema/> | |
| 3268 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3269 | + <xloc>553</xloc> | |
| 3270 | + <yloc>86</yloc> | |
| 3271 | + <draw>Y</draw> | |
| 3272 | + </GUI> | |
| 3273 | + </step> | |
| 3274 | + | |
| 3275 | + <step> | |
| 3276 | + <name>正常班次站点查询用数据</name> | |
| 3277 | + <type>ScriptValueMod</type> | |
| 3278 | + <description/> | |
| 3279 | + <distribute>Y</distribute> | |
| 3280 | + <custom_distribution/> | |
| 3281 | + <copies>1</copies> | |
| 3282 | + <partitioning> | |
| 3283 | + <method>none</method> | |
| 3284 | + <schema_name/> | |
| 3285 | + </partitioning> | |
| 3286 | + <compatible>N</compatible> | |
| 3287 | + <optimizationLevel>9</optimizationLevel> | |
| 3288 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 3289 | + <jsScript_name>Script 1</jsScript_name> | |
| 3290 | + <jsScript_script>//Script here

var startZdType = 'B'; // 起点站站点类型标识别
var endZdType = 'E'; // 终点站站点类型标识</jsScript_script> | |
| 3291 | + </jsScript> </jsScripts> <fields> <field> <name>startZdType</name> | |
| 3292 | + <rename>startZdType</rename> | |
| 3293 | + <type>String</type> | |
| 3294 | + <length>-1</length> | |
| 3295 | + <precision>-1</precision> | |
| 3296 | + <replace>N</replace> | |
| 3297 | + </field> <field> <name>endZdType</name> | |
| 3298 | + <rename>endZdType</rename> | |
| 3299 | + <type>String</type> | |
| 3300 | + <length>-1</length> | |
| 3301 | + <precision>-1</precision> | |
| 3302 | + <replace>N</replace> | |
| 3303 | + </field> </fields> <cluster_schema/> | |
| 3304 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3305 | + <xloc>391</xloc> | |
| 3306 | + <yloc>87</yloc> | |
| 3307 | + <draw>Y</draw> | |
| 3308 | + </GUI> | |
| 3309 | + </step> | |
| 3310 | + | |
| 3311 | + <step> | |
| 3312 | + <name>获取变量</name> | |
| 3313 | + <type>GetVariable</type> | |
| 3314 | + <description/> | |
| 3315 | + <distribute>Y</distribute> | |
| 3316 | + <custom_distribution/> | |
| 3317 | + <copies>1</copies> | |
| 3318 | + <partitioning> | |
| 3319 | + <method>none</method> | |
| 3320 | + <schema_name/> | |
| 3321 | + </partitioning> | |
| 3322 | + <fields> | |
| 3323 | + <field> | |
| 3324 | + <name>xlid_</name> | |
| 3325 | + <variable>${xlid}</variable> | |
| 3326 | + <type>Integer</type> | |
| 3327 | + <format/> | |
| 3328 | + <currency/> | |
| 3329 | + <decimal/> | |
| 3330 | + <group/> | |
| 3331 | + <length>-1</length> | |
| 3332 | + <precision>-1</precision> | |
| 3333 | + <trim_type>none</trim_type> | |
| 3334 | + </field> | |
| 3335 | + <field> | |
| 3336 | + <name>ttid_</name> | |
| 3337 | + <variable>${ttid}</variable> | |
| 3338 | + <type>Number</type> | |
| 3339 | + <format/> | |
| 3340 | + <currency/> | |
| 3341 | + <decimal/> | |
| 3342 | + <group/> | |
| 3343 | + <length>-1</length> | |
| 3344 | + <precision>-1</precision> | |
| 3345 | + <trim_type>none</trim_type> | |
| 3346 | + </field> | |
| 3347 | + </fields> | |
| 3348 | + <cluster_schema/> | |
| 3349 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3350 | + <xloc>45</xloc> | |
| 3351 | + <yloc>189</yloc> | |
| 3352 | + <draw>Y</draw> | |
| 3353 | + </GUI> | |
| 3354 | + </step> | |
| 3355 | + | |
| 3356 | + <step> | |
| 3357 | + <name>表输入</name> | |
| 3358 | + <type>TableInput</type> | |
| 3359 | + <description/> | |
| 3360 | + <distribute>Y</distribute> | |
| 3361 | + <custom_distribution/> | |
| 3362 | + <copies>1</copies> | |
| 3363 | + <partitioning> | |
| 3364 | + <method>none</method> | |
| 3365 | + <schema_name/> | |
| 3366 | + </partitioning> | |
| 3367 | + <connection>bus_control_variable</connection> | |
| 3368 | + <sql>select 
t.id as id
, g.lp_name as lp
, g.xl as xl
, qdz
, zdz
, tcc
, fcsj
, jhlc
, bc_type 
, bcs
, fcno
, xl_dir
, isfb
from bsth_c_s_ttinfo_detail t left join 
bsth_c_s_gbi g on t.lp = g.id 
where 
g.xl = ? and
t.ttinfo = ? 
order by t.bcs asc</sql> | |
| 3369 | + <limit>0</limit> | |
| 3370 | + <lookup>获取变量</lookup> | |
| 3371 | + <execute_each_row>N</execute_each_row> | |
| 3372 | + <variables_active>Y</variables_active> | |
| 3373 | + <lazy_conversion_active>N</lazy_conversion_active> | |
| 3374 | + <cluster_schema/> | |
| 3375 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3376 | + <xloc>130</xloc> | |
| 3377 | + <yloc>85</yloc> | |
| 3378 | + <draw>Y</draw> | |
| 3379 | + </GUI> | |
| 3380 | + </step> | |
| 3381 | + | |
| 3382 | + <step> | |
| 3383 | + <name>计算发车站名</name> | |
| 3384 | + <type>ScriptValueMod</type> | |
| 3385 | + <description/> | |
| 3386 | + <distribute>Y</distribute> | |
| 3387 | + <custom_distribution/> | |
| 3388 | + <copies>1</copies> | |
| 3389 | + <partitioning> | |
| 3390 | + <method>none</method> | |
| 3391 | + <schema_name/> | |
| 3392 | + </partitioning> | |
| 3393 | + <compatible>N</compatible> | |
| 3394 | + <optimizationLevel>9</optimizationLevel> | |
| 3395 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 3396 | + <jsScript_name>Script 1</jsScript_name> | |
| 3397 | + <jsScript_script>//Script here

var fczdName = null; // 发车站点名字
if (bc_type == "in") {
 fczdName = "进场";
} else if (bc_type == "out") {
 fczdName = "出场";
} else {
 fczdName = qdzName;
}</jsScript_script> | |
| 3398 | + </jsScript> </jsScripts> <fields> <field> <name>fczdName</name> | |
| 3399 | + <rename>fczdName</rename> | |
| 3400 | + <type>String</type> | |
| 3401 | + <length>-1</length> | |
| 3402 | + <precision>-1</precision> | |
| 3403 | + <replace>N</replace> | |
| 3404 | + </field> </fields> <cluster_schema/> | |
| 3405 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3406 | + <xloc>550</xloc> | |
| 3407 | + <yloc>276</yloc> | |
| 3408 | + <draw>Y</draw> | |
| 3409 | + </GUI> | |
| 3410 | + </step> | |
| 3411 | + | |
| 3412 | + <step> | |
| 3413 | + <name>过滤记录</name> | |
| 3414 | + <type>FilterRows</type> | |
| 3415 | + <description/> | |
| 3416 | + <distribute>Y</distribute> | |
| 3417 | + <custom_distribution/> | |
| 3418 | + <copies>1</copies> | |
| 3419 | + <partitioning> | |
| 3420 | + <method>none</method> | |
| 3421 | + <schema_name/> | |
| 3422 | + </partitioning> | |
| 3423 | +<send_true_to>正常班次站点查询用数据</send_true_to> | |
| 3424 | +<send_false_to>进场出场班次查询用的数据</send_false_to> | |
| 3425 | + <compare> | |
| 3426 | +<condition> | |
| 3427 | + <negated>N</negated> | |
| 3428 | + <leftvalue>bc_type</leftvalue> | |
| 3429 | + <function>=</function> | |
| 3430 | + <rightvalue/> | |
| 3431 | + <value><name>constant</name><type>String</type><text>normal</text><length>-1</length><precision>-1</precision><isnull>N</isnull><mask/></value> </condition> | |
| 3432 | + </compare> | |
| 3433 | + <cluster_schema/> | |
| 3434 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3435 | + <xloc>248</xloc> | |
| 3436 | + <yloc>87</yloc> | |
| 3437 | + <draw>Y</draw> | |
| 3438 | + </GUI> | |
| 3439 | + </step> | |
| 3440 | + | |
| 3441 | + <step> | |
| 3442 | + <name>进场出场班次查询用的数据</name> | |
| 3443 | + <type>ScriptValueMod</type> | |
| 3444 | + <description/> | |
| 3445 | + <distribute>Y</distribute> | |
| 3446 | + <custom_distribution/> | |
| 3447 | + <copies>1</copies> | |
| 3448 | + <partitioning> | |
| 3449 | + <method>none</method> | |
| 3450 | + <schema_name/> | |
| 3451 | + </partitioning> | |
| 3452 | + <compatible>N</compatible> | |
| 3453 | + <optimizationLevel>9</optimizationLevel> | |
| 3454 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 3455 | + <jsScript_name>Script 1</jsScript_name> | |
| 3456 | + <jsScript_script>//Script here

var qdzName = null; // 起点站名字
var zdzName = null; // 终点站名字</jsScript_script> | |
| 3457 | + </jsScript> </jsScripts> <fields> <field> <name>qdzName</name> | |
| 3458 | + <rename>qdzName</rename> | |
| 3459 | + <type>String</type> | |
| 3460 | + <length>-1</length> | |
| 3461 | + <precision>-1</precision> | |
| 3462 | + <replace>N</replace> | |
| 3463 | + </field> <field> <name>zdzName</name> | |
| 3464 | + <rename>zdzName</rename> | |
| 3465 | + <type>String</type> | |
| 3466 | + <length>-1</length> | |
| 3467 | + <precision>-1</precision> | |
| 3468 | + <replace>N</replace> | |
| 3469 | + </field> </fields> <cluster_schema/> | |
| 3470 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 3471 | + <xloc>250</xloc> | |
| 3472 | + <yloc>188</yloc> | |
| 3473 | 3473 | <draw>Y</draw> |
| 3474 | 3474 | </GUI> |
| 3475 | 3475 | </step> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/dts1/load/loadingWidget.js
| ... | ... | @@ -2,21 +2,50 @@ |
| 2 | 2 | /** |
| 3 | 3 | * loading载入中指令。 |
| 4 | 4 | */ |
| 5 | -angular.module('ScheduleApp').directive('loadingWidget', ['requestNotificationChannel', function(requestNotificationChannel) { | |
| 6 | - return { | |
| 7 | - restrict: 'A', | |
| 8 | - link: function(scope, element) { | |
| 9 | - // 初始隐藏loading界面 | |
| 10 | - element.hide(); | |
| 11 | - | |
| 12 | - // 开始请求通知处理 | |
| 13 | - requestNotificationChannel.onRequestStarted(scope, function() { | |
| 14 | - element.show(); | |
| 15 | - }); | |
| 16 | - // 请求结束通知处理 | |
| 17 | - requestNotificationChannel.onRequestEnded(scope, function() { | |
| 18 | - element.hide(); | |
| 19 | - }); | |
| 5 | +angular.module('ScheduleApp').directive( | |
| 6 | + 'loadingWidget', | |
| 7 | + [ | |
| 8 | + 'requestNotificationChannel', | |
| 9 | + function(requestNotificationChannel) { | |
| 10 | + return { | |
| 11 | + restrict: 'A', | |
| 12 | + | |
| 13 | + compile: function(tElem, tAttrs) { | |
| 14 | + var loadingCount = 0; | |
| 15 | + | |
| 16 | + return { | |
| 17 | + pre: function(scope, element, attr) { | |
| 18 | + | |
| 19 | + }, | |
| 20 | + post: function(scope, element, attr) { | |
| 21 | + // 初始隐藏loading界面 | |
| 22 | + element.hide(); | |
| 23 | + | |
| 24 | + // 开始请求通知处理 | |
| 25 | + requestNotificationChannel.onRequestStarted(scope, function(requestInfo) { | |
| 26 | + if (loadingCount == 0) { | |
| 27 | + element.show(); | |
| 28 | + } | |
| 29 | + loadingCount ++; | |
| 30 | + // TODO:以后在载入中显示requestInfo相关信息 | |
| 31 | + console.log(requestInfo); | |
| 32 | + console.log(loadingCount); | |
| 33 | + }); | |
| 34 | + // 请求结束通知处理 | |
| 35 | + requestNotificationChannel.onRequestEnded(scope, function() { | |
| 36 | + loadingCount --; | |
| 37 | + if (loadingCount == 0) { | |
| 38 | + element.hide(); | |
| 39 | + } | |
| 40 | + | |
| 41 | + console.log(loadingCount); | |
| 42 | + }); | |
| 43 | + } | |
| 44 | + }; | |
| 45 | + } | |
| 46 | + | |
| 47 | + }; | |
| 48 | + | |
| 20 | 49 | } |
| 21 | - }; | |
| 22 | -}]); | |
| 23 | 50 | \ No newline at end of file |
| 51 | + ] | |
| 52 | +); | |
| 24 | 53 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTable.js
| ... | ... | @@ -69,6 +69,7 @@ angular.module('ScheduleApp').directive('saTimetable', ['$compile', '$window', |
| 69 | 69 | // ------------------- dom事件处理function -----------------// |
| 70 | 70 | scope[ctrlAs].$$cell_click = function(rowindex, colindex, cell) { |
| 71 | 71 | console.log("click " + "row=" + rowindex + ",col=" + colindex); |
| 72 | + var internal_ds = scope[ctrlAs].ds.detailInfos; | |
| 72 | 73 | |
| 73 | 74 | if (cell.ttdid) { // 是班次的单元格才能操作 |
| 74 | 75 | cell.sel = !cell.sel; | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTableTemplate.html
| ... | ... | @@ -201,10 +201,30 @@ |
| 201 | 201 | .tt_table dl{ |
| 202 | 202 | transition: all .1s ease; |
| 203 | 203 | } |
| 204 | + | |
| 205 | + .tt_table dd { | |
| 206 | + color: #2765A7; | |
| 207 | + } | |
| 208 | + | |
| 204 | 209 | .tt_table dd.active { |
| 205 | - background: #8baabf !important; | |
| 210 | + /*background: #8baabf !important;*/ | |
| 211 | + /*color: white;*/ | |
| 212 | + border: 2px solid #09284a; | |
| 213 | + } | |
| 214 | + | |
| 215 | + .tt_table dd.error { | |
| 216 | + background: #e43a45 !important; | |
| 217 | + color: white; | |
| 218 | + } | |
| 219 | + .tt_table dd.region { | |
| 220 | + background: #686d7b !important; | |
| 206 | 221 | color: white; |
| 207 | 222 | } |
| 223 | + .tt_table dd.isfb { | |
| 224 | + background: #adff00 !important; | |
| 225 | + color: #501a1a; | |
| 226 | + } | |
| 227 | + | |
| 208 | 228 | .tt_table_no_border .tt_table>.tt_table_head dl dt { |
| 209 | 229 | font-weight: 600; |
| 210 | 230 | font-size: 13px; |
| ... | ... | @@ -302,7 +322,13 @@ |
| 302 | 322 | ng-init="colIndex = $index" |
| 303 | 323 | ng-click="$saTimeTableCtrl.$$cell_click(rowIndex, colIndex, cell)" |
| 304 | 324 | ng-dblclick="$saTimeTableCtrl.$$cell_dbclick(rowIndex, colIndex, cell)" |
| 305 | - ng-class="{lpName: !cell.ttdid, active: cell.sel}" | |
| 325 | + ng-class="{ | |
| 326 | + lpName: !cell.ttdid, | |
| 327 | + error: cell.invalidFlag, | |
| 328 | + active: cell.sel, | |
| 329 | + region: cell.bc_type == 'region', | |
| 330 | + isfb: cell.isfb | |
| 331 | + }" | |
| 306 | 332 | > |
| 307 | 333 | {{cell.fcsj}} |
| 308 | 334 | </dd> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/main.js
| ... | ... | @@ -21,10 +21,10 @@ ScheduleApp.factory('requestNotificationChannel', ['$rootScope', function($rootS |
| 21 | 21 | var activeCalls = 0; |
| 22 | 22 | |
| 23 | 23 | // 发布开始请求通知 |
| 24 | - var requestStarted = function() { | |
| 24 | + var requestStarted = function(requestInfo) { | |
| 25 | 25 | activeCalls += 1; |
| 26 | 26 | console.log("activeCalls=" + activeCalls); |
| 27 | - $rootScope.$broadcast(_START_REQUEST_); | |
| 27 | + $rootScope.$broadcast(_START_REQUEST_, requestInfo); | |
| 28 | 28 | }; |
| 29 | 29 | // 发布请求结束通知 |
| 30 | 30 | var requestEnded = function() { |
| ... | ... | @@ -39,8 +39,8 @@ ScheduleApp.factory('requestNotificationChannel', ['$rootScope', function($rootS |
| 39 | 39 | * @param handler 通知处理器函数 |
| 40 | 40 | */ |
| 41 | 41 | var onRequestStarted = function($scope, handler) { |
| 42 | - $scope.$on(_START_REQUEST_, function(event) { | |
| 43 | - handler(); | |
| 42 | + $scope.$on(_START_REQUEST_, function(event, requestInfo) { | |
| 43 | + handler(requestInfo); | |
| 44 | 44 | }); |
| 45 | 45 | }; |
| 46 | 46 | /** |
| ... | ... | @@ -72,7 +72,7 @@ ScheduleApp.factory( |
| 72 | 72 | function(requestNotificationChannel, $q) { |
| 73 | 73 | return { |
| 74 | 74 | request: function(config) { |
| 75 | - requestNotificationChannel.requestStarted(); | |
| 75 | + requestNotificationChannel.requestStarted(config); | |
| 76 | 76 | return config; |
| 77 | 77 | }, |
| 78 | 78 | requestError: function(rejection) { | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
| ... | ... | @@ -2,24 +2,53 @@ |
| 2 | 2 | /** |
| 3 | 3 | * loading载入中指令。 |
| 4 | 4 | */ |
| 5 | -angular.module('ScheduleApp').directive('loadingWidget', ['requestNotificationChannel', function(requestNotificationChannel) { | |
| 6 | - return { | |
| 7 | - restrict: 'A', | |
| 8 | - link: function(scope, element) { | |
| 9 | - // 初始隐藏loading界面 | |
| 10 | - element.hide(); | |
| 11 | - | |
| 12 | - // 开始请求通知处理 | |
| 13 | - requestNotificationChannel.onRequestStarted(scope, function() { | |
| 14 | - element.show(); | |
| 15 | - }); | |
| 16 | - // 请求结束通知处理 | |
| 17 | - requestNotificationChannel.onRequestEnded(scope, function() { | |
| 18 | - element.hide(); | |
| 19 | - }); | |
| 5 | +angular.module('ScheduleApp').directive( | |
| 6 | + 'loadingWidget', | |
| 7 | + [ | |
| 8 | + 'requestNotificationChannel', | |
| 9 | + function(requestNotificationChannel) { | |
| 10 | + return { | |
| 11 | + restrict: 'A', | |
| 12 | + | |
| 13 | + compile: function(tElem, tAttrs) { | |
| 14 | + var loadingCount = 0; | |
| 15 | + | |
| 16 | + return { | |
| 17 | + pre: function(scope, element, attr) { | |
| 18 | + | |
| 19 | + }, | |
| 20 | + post: function(scope, element, attr) { | |
| 21 | + // 初始隐藏loading界面 | |
| 22 | + element.hide(); | |
| 23 | + | |
| 24 | + // 开始请求通知处理 | |
| 25 | + requestNotificationChannel.onRequestStarted(scope, function(requestInfo) { | |
| 26 | + if (loadingCount == 0) { | |
| 27 | + element.show(); | |
| 28 | + } | |
| 29 | + loadingCount ++; | |
| 30 | + // TODO:以后在载入中显示requestInfo相关信息 | |
| 31 | + console.log(requestInfo); | |
| 32 | + console.log(loadingCount); | |
| 33 | + }); | |
| 34 | + // 请求结束通知处理 | |
| 35 | + requestNotificationChannel.onRequestEnded(scope, function() { | |
| 36 | + loadingCount --; | |
| 37 | + if (loadingCount == 0) { | |
| 38 | + element.hide(); | |
| 39 | + } | |
| 40 | + | |
| 41 | + console.log(loadingCount); | |
| 42 | + }); | |
| 43 | + } | |
| 44 | + }; | |
| 45 | + } | |
| 46 | + | |
| 47 | + }; | |
| 48 | + | |
| 20 | 49 | } |
| 21 | - }; | |
| 22 | -}]); | |
| 50 | + ] | |
| 51 | +); | |
| 23 | 52 | /** |
| 24 | 53 | * remoteValidation指令,远程数据验证验证,作为属性放在某个指令上,依赖与指令的ngModel。 |
| 25 | 54 | * 属性如下: |
| ... | ... | @@ -3730,6 +3759,7 @@ angular.module('ScheduleApp').directive('saTimetable', ['$compile', '$window', |
| 3730 | 3759 | // ------------------- dom事件处理function -----------------// |
| 3731 | 3760 | scope[ctrlAs].$$cell_click = function(rowindex, colindex, cell) { |
| 3732 | 3761 | console.log("click " + "row=" + rowindex + ",col=" + colindex); |
| 3762 | + var internal_ds = scope[ctrlAs].ds.detailInfos; | |
| 3733 | 3763 | |
| 3734 | 3764 | if (cell.ttdid) { // 是班次的单元格才能操作 |
| 3735 | 3765 | cell.sel = !cell.sel; | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
| ... | ... | @@ -1185,7 +1185,30 @@ ScheduleApp.config([ |
| 1185 | 1185 | }); |
| 1186 | 1186 | }] |
| 1187 | 1187 | } |
| 1188 | - }); | |
| 1188 | + }) | |
| 1189 | + .state("ttInfoDetailManage_detail_edit_mulselect", { // 时刻表详细信息批量单元格修改 | |
| 1190 | + url: '/ttInfoDetailManage_detail_edit_mulselect/:xlid/:ttid/:xlname/:ttname', | |
| 1191 | + views: { | |
| 1192 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-mulselect.html'} | |
| 1193 | + }, | |
| 1194 | + resolve: { | |
| 1195 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1196 | + return $ocLazyLoad.load({ | |
| 1197 | + name: 'ttInfoDetailManage_detail_edit_mulselect', | |
| 1198 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1199 | + files: [ | |
| 1200 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1201 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1202 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | |
| 1203 | + ] | |
| 1204 | + }); | |
| 1205 | + }] | |
| 1206 | + } | |
| 1207 | + }) | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + ; | |
| 1189 | 1212 | |
| 1190 | 1213 | } |
| 1191 | 1214 | ]); |
| 1192 | 1215 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html
| ... | ... | @@ -91,7 +91,7 @@ |
| 91 | 91 | <label class="col-md-2 control-label">起点站:</label> |
| 92 | 92 | <div class="col-md-3"> |
| 93 | 93 | <sa-Select5 name="qdz" |
| 94 | - model="ctrl.TimeTableDetailForSave" | |
| 94 | + model="ctrl.stop_temp" | |
| 95 | 95 | cmaps="{'qdz.id' : 'stationid'}" |
| 96 | 96 | dcname="qdz.id" |
| 97 | 97 | icname="stationid" |
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | <label class="col-md-2 control-label">停车场:</label> |
| 114 | 114 | <div class="col-md-3"> |
| 115 | 115 | <sa-Select5 name="tcc" |
| 116 | - model="ctrl.TimeTableDetailForSave" | |
| 116 | + model="ctrl.stop_temp" | |
| 117 | 117 | cmaps="{'tcc.id': 'id'}" |
| 118 | 118 | dcname="tcc.id" |
| 119 | 119 | icname="id" |
| ... | ... | @@ -137,7 +137,7 @@ |
| 137 | 137 | <label class="col-md-2 control-label">停车场:</label> |
| 138 | 138 | <div class="col-md-3"> |
| 139 | 139 | <sa-Select5 name="tcc" |
| 140 | - model="ctrl.TimeTableDetailForSave" | |
| 140 | + model="ctrl.stop_temp" | |
| 141 | 141 | cmaps="{'tcc.id': 'id'}" |
| 142 | 142 | dcname="tcc.id" |
| 143 | 143 | icname="id" |
| ... | ... | @@ -159,7 +159,7 @@ |
| 159 | 159 | <label class="col-md-2 control-label">终点站:</label> |
| 160 | 160 | <div class="col-md-3"> |
| 161 | 161 | <sa-Select5 name="zdz" |
| 162 | - model="ctrl.TimeTableDetailForSave" | |
| 162 | + model="ctrl.stop_temp" | |
| 163 | 163 | cmaps="{'zdz.id' : 'stationid'}" |
| 164 | 164 | dcname="zdz.id" |
| 165 | 165 | icname="stationid" |
| ... | ... | @@ -183,7 +183,7 @@ |
| 183 | 183 | <label class="col-md-2 control-label">起点站:</label> |
| 184 | 184 | <div class="col-md-3"> |
| 185 | 185 | <sa-Select5 name="qdz" |
| 186 | - model="ctrl.TimeTableDetailForSave" | |
| 186 | + model="ctrl.stop_temp" | |
| 187 | 187 | cmaps="{'qdz.id' : 'stationid'}" |
| 188 | 188 | dcname="qdz.id" |
| 189 | 189 | icname="stationid" |
| ... | ... | @@ -205,7 +205,7 @@ |
| 205 | 205 | <label class="col-md-2 control-label">终点站:</label> |
| 206 | 206 | <div class="col-md-3"> |
| 207 | 207 | <sa-Select5 name="zdz" |
| 208 | - model="ctrl.TimeTableDetailForSave" | |
| 208 | + model="ctrl.stop_temp" | |
| 209 | 209 | cmaps="{'zdz.id' : 'stationid'}" |
| 210 | 210 | dcname="zdz.id" |
| 211 | 211 | icname="stationid" |
| ... | ... | @@ -304,6 +304,15 @@ |
| 304 | 304 | </div> |
| 305 | 305 | |
| 306 | 306 | </div> |
| 307 | + | |
| 308 | + <div class="form-group has-success has-feedback"> | |
| 309 | + <label class="col-md-2 control-label">开始分班:</label> | |
| 310 | + <div class="col-md-3"> | |
| 311 | + <sa-Radiogroup model="ctrl.TimeTableDetailForSave.isFB" dicgroup="truefalseType" name="isFB"></sa-Radiogroup> | |
| 312 | + </div> | |
| 313 | + | |
| 314 | + </div> | |
| 315 | + | |
| 307 | 316 | <div class="form-group"> |
| 308 | 317 | <label class="col-md-2 control-label">备注:</label> |
| 309 | 318 | <div class="col-md-3"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-mulselect.html
0 → 100644
| 1 | +<div ng-controller="TimeTableDetailManageFormCtrl_mulselect as ctrl"> | |
| 2 | + <div class="page-head"> | |
| 3 | + <div class="page-title"> | |
| 4 | + <h1>修改班次信息</h1> | |
| 5 | + </div> | |
| 6 | + </div> | |
| 7 | + | |
| 8 | + <ul class="page-breadcrumb breadcrumb"> | |
| 9 | + <li> | |
| 10 | + <a href="/pages/home.html" data-pjax>首页</a> | |
| 11 | + <i class="fa fa-circle"></i> | |
| 12 | + </li> | |
| 13 | + <li> | |
| 14 | + <span class="active">运营计划管理</span> | |
| 15 | + <i class="fa fa-circle"></i> | |
| 16 | + </li> | |
| 17 | + <li> | |
| 18 | + <a ui-sref="ttInfoManage">时刻表管理</a> | |
| 19 | + <i class="fa fa-circle"></i> | |
| 20 | + </li> | |
| 21 | + <li> | |
| 22 | + <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a> | |
| 23 | + <i class="fa fa-circle"></i> | |
| 24 | + </li> | |
| 25 | + <li> | |
| 26 | + <span class="active">修改班次信息</span> | |
| 27 | + </li> | |
| 28 | + </ul> | |
| 29 | + | |
| 30 | + <div class="portlet light bordered"> | |
| 31 | + <div class="portlet-title"> | |
| 32 | + <div class="caption"> | |
| 33 | + <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 34 | + class="caption-subject font-red-sunglo bold uppercase" >批量选择</span> | |
| 35 | + </div> | |
| 36 | + </div> | |
| 37 | + | |
| 38 | + <div class="portlet-body form"> | |
| 39 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | |
| 40 | + <div class="form-body"> | |
| 41 | + | |
| 42 | + <div class="form-group has-success has-feedback"> | |
| 43 | + <label class="col-md-2 control-label">方向:</label> | |
| 44 | + <div class="col-md-3"> | |
| 45 | + <sa-Radiogroup model="ctrl.xldir" dicgroup="LineTrend" name="xlDir"></sa-Radiogroup> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + | |
| 49 | + <div class="form-group has-success has-feedback"> | |
| 50 | + <label class="col-md-2 control-label">开始时间:</label> | |
| 51 | + <div class="col-md-3"> | |
| 52 | + <input type="text" class="form-control" name="starttime" | |
| 53 | + ng-model="ctrl.starttime" | |
| 54 | + ng-pattern="ctrl.time_regex" | |
| 55 | + /> | |
| 56 | + </div> | |
| 57 | + <!-- 隐藏块,显示验证信息 --> | |
| 58 | + <div class="alert alert-danger well-sm" ng-show="myForm.starttime.$error.pattern"> | |
| 59 | + 时间格式错误,应该是格式hh:mm,如:06:39 | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + | |
| 63 | + <div class="form-group has-success has-feedback"> | |
| 64 | + <label class="col-md-2 control-label">结束时间:</label> | |
| 65 | + <div class="col-md-3"> | |
| 66 | + <input type="text" class="form-control" name="endtime" | |
| 67 | + ng-model="ctrl.endtime" | |
| 68 | + ng-pattern="ctrl.time_regex" | |
| 69 | + /> | |
| 70 | + </div> | |
| 71 | + <!-- 隐藏块,显示验证信息 --> | |
| 72 | + <div class="alert alert-danger well-sm" ng-show="myForm.endtime.$error.pattern"> | |
| 73 | + 时间格式错误,应该是格式hh:mm,如:06:39 | |
| 74 | + </div> | |
| 75 | + </div> | |
| 76 | + | |
| 77 | + </div> | |
| 78 | + | |
| 79 | + <div class="form-actions"> | |
| 80 | + <div class="row"> | |
| 81 | + <div class="col-md-offset-3 col-md-4"> | |
| 82 | + <button type="submit" class="btn green" | |
| 83 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 84 | + <a type="button" class="btn default" | |
| 85 | + ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})" ><i class="fa fa-times"></i> 取消</a> | |
| 86 | + </div> | |
| 87 | + </div> | |
| 88 | + </div> | |
| 89 | + </form> | |
| 90 | + | |
| 91 | + </div> | |
| 92 | + </div> | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | +</div> | |
| 98 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit3.html
| ... | ... | @@ -31,14 +31,14 @@ |
| 31 | 31 | <span class="caption-subject bold uppercase" ng-bind="ctrl.title"></span> |
| 32 | 32 | </div> |
| 33 | 33 | <div class="actions"> |
| 34 | - <i class="fa fa-arrow-up" aria-hidden="true"></i> | |
| 35 | - <span style="padding-right: 10px;">上行班次</span> | |
| 36 | - <i class="fa fa-arrow-down" aria-hidden="true"></i> | |
| 37 | - <span style="padding-right: 10px;">下行班次</span> | |
| 38 | - <i class="fa fa-circle-o-notch" aria-hidden="true"></i> | |
| 39 | - <span style="padding-right: 10px;">区间班次</span> | |
| 40 | - <i class="fa fa-adjust" aria-hidden="true"></i> | |
| 41 | - <span style="padding-right: 10px;">分班班次</span> | |
| 34 | + <!--<i class="fa fa-arrow-up" aria-hidden="true"></i>--> | |
| 35 | + <!--<span style="padding-right: 10px;">上行班次</span>--> | |
| 36 | + <!--<i class="fa fa-arrow-down" aria-hidden="true"></i>--> | |
| 37 | + <!--<span style="padding-right: 10px;">下行班次</span>--> | |
| 38 | + <!--<i class="fa fa-circle-o-notch" aria-hidden="true"></i>--> | |
| 39 | + <span style="padding-right: 10px;background: #686d7b;color: white;text-align: center;">区间班次</span> | |
| 40 | + <!--<i class="fa fa-adjust" aria-hidden="true"></i>--> | |
| 41 | + <span style="padding-right: 10px;background: #adff00;color: #501a1a;text-align: center;">分班班次</span> | |
| 42 | 42 | |
| 43 | 43 | <div class="btn-group"> |
| 44 | 44 | <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> |
| ... | ... | @@ -48,9 +48,9 @@ |
| 48 | 48 | </a> |
| 49 | 49 | <ul class="dropdown-menu pull-right"> |
| 50 | 50 | <li> |
| 51 | - <a href="javascript:" class="tool-action" ng-click="ctrl.singleEditBcDetail()"> | |
| 51 | + <a href="javascript:" class="tool-action" ng-click="ctrl.multiselect()"> | |
| 52 | 52 | <i class="fa fa-file-excel-o"></i> |
| 53 | - 修改 | |
| 53 | + 批量选择 | |
| 54 | 54 | </a> |
| 55 | 55 | </li> |
| 56 | 56 | <li> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/route.js
| ... | ... | @@ -118,7 +118,30 @@ ScheduleApp.config([ |
| 118 | 118 | }); |
| 119 | 119 | }] |
| 120 | 120 | } |
| 121 | - }); | |
| 121 | + }) | |
| 122 | + .state("ttInfoDetailManage_detail_edit_mulselect", { // 时刻表详细信息批量单元格修改 | |
| 123 | + url: '/ttInfoDetailManage_detail_edit_mulselect/:xlid/:ttid/:xlname/:ttname', | |
| 124 | + views: { | |
| 125 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-mulselect.html'} | |
| 126 | + }, | |
| 127 | + resolve: { | |
| 128 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 129 | + return $ocLazyLoad.load({ | |
| 130 | + name: 'ttInfoDetailManage_detail_edit_mulselect', | |
| 131 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 132 | + files: [ | |
| 133 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 134 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 135 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | |
| 136 | + ] | |
| 137 | + }); | |
| 138 | + }] | |
| 139 | + } | |
| 140 | + }) | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + ; | |
| 122 | 145 | |
| 123 | 146 | } |
| 124 | 147 | ]); |
| 125 | 148 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
| ... | ... | @@ -47,6 +47,99 @@ angular.module('ScheduleApp').factory( |
| 47 | 47 | for (var i = 0; i < editInfo.detailInfos.length; i++) { |
| 48 | 48 | for (var j = 0; j < editInfo.detailInfos[i].length; j++) { |
| 49 | 49 | editInfo.detailInfos[i][j].sel = false; |
| 50 | + // 给cell定义一个valid属性,及方法,判定这个班次的数据是否正常 | |
| 51 | + editInfo.detailInfos[i][j].invalidFlag = true; | |
| 52 | + editInfo.detailInfos[i][j].validInfo = function() { // 验证方法 | |
| 53 | + if (!this.ttdid) { | |
| 54 | + this.invalidFlag = false; | |
| 55 | + return; | |
| 56 | + } | |
| 57 | + | |
| 58 | + if (this.bc_type == 'in') { | |
| 59 | + if (this.qdz == null || this.tcc == null) { | |
| 60 | + this.invalidFlag = true; | |
| 61 | + } else { | |
| 62 | + this.invalidFlag = false; | |
| 63 | + } | |
| 64 | + } else if (this.bc_type == 'out') { | |
| 65 | + if (this.tcc == null || this.zdz == null) { | |
| 66 | + this.invalidFlag = true; | |
| 67 | + } else { | |
| 68 | + this.invalidFlag = false; | |
| 69 | + } | |
| 70 | + } else { | |
| 71 | + if (this.qdz == null || this.zdz == null) { | |
| 72 | + this.invalidFlag = true; | |
| 73 | + } else { | |
| 74 | + this.invalidFlag = false; | |
| 75 | + } | |
| 76 | + } | |
| 77 | + }; | |
| 78 | + editInfo.detailInfos[i][j].where = function(xldir, startTime_h_m, endTime_h_m) { // where方法 | |
| 79 | + var fcsj_m_h = []; | |
| 80 | + fcsj_m_h[0] = parseInt(this.fcsj.split(":")[0]); | |
| 81 | + fcsj_m_h[1] = parseInt(this.fcsj.split(":")[1]); | |
| 82 | + | |
| 83 | + var fcsj = new Date(2000,1,1); | |
| 84 | + fcsj.setHours(fcsj_m_h[0]); | |
| 85 | + fcsj.setMinutes(fcsj_m_h[1]); | |
| 86 | + | |
| 87 | + var s_temp_date = new Date(2000, 1, 1); | |
| 88 | + var e_temp_date = new Date(2000, 1, 1); | |
| 89 | + | |
| 90 | + if (xldir) { | |
| 91 | + if (xldir == this.xldir) { | |
| 92 | + if (startTime_h_m) { | |
| 93 | + if (endTime_h_m) { | |
| 94 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 95 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 96 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 97 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 98 | + return fcsj >= s_temp_date && fcsj <= e_temp_date; | |
| 99 | + } else { | |
| 100 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 101 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 102 | + return fcsj >= s_temp_date; | |
| 103 | + } | |
| 104 | + } else { | |
| 105 | + if (endTime_h_m) { | |
| 106 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 107 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 108 | + return fcsj <= e_temp_date; | |
| 109 | + } else { | |
| 110 | + return true; | |
| 111 | + } | |
| 112 | + } | |
| 113 | + } else { | |
| 114 | + return false; | |
| 115 | + } | |
| 116 | + } else { | |
| 117 | + if (startTime_h_m) { | |
| 118 | + if (endTime_h_m) { | |
| 119 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 120 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 121 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 122 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 123 | + return fcsj >= s_temp_date && fcsj <= e_temp_date; | |
| 124 | + } else { | |
| 125 | + s_temp_date.setHours(startTime_h_m[0]); | |
| 126 | + s_temp_date.setMinutes(startTime_h_m[1]); | |
| 127 | + return fcsj >= s_temp_date; | |
| 128 | + } | |
| 129 | + } else { | |
| 130 | + if (endTime_h_m) { | |
| 131 | + e_temp_date.setHours(endTime_h_m[0]); | |
| 132 | + e_temp_date.setMinutes(endTime_h_m[1]); | |
| 133 | + return fcsj <= e_temp_date; | |
| 134 | + } else { | |
| 135 | + return false; | |
| 136 | + } | |
| 137 | + } | |
| 138 | + } | |
| 139 | + | |
| 140 | + }; | |
| 141 | + editInfo.detailInfos[i][j].validInfo(); | |
| 142 | + | |
| 50 | 143 | } |
| 51 | 144 | } |
| 52 | 145 | } else { |
| ... | ... | @@ -66,7 +159,7 @@ angular.module('ScheduleApp').factory( |
| 66 | 159 | return flag; |
| 67 | 160 | }, |
| 68 | 161 | |
| 69 | - editInfos: function(updateObject) { // 批量保存数据 | |
| 162 | + editInfos: function(updateObject) { // 批量保存数据 // TODO: | |
| 70 | 163 | var deferred = $q.defer(); |
| 71 | 164 | |
| 72 | 165 | // 找出所有选中的ttinfodetailids |
| ... | ... | @@ -110,24 +203,14 @@ angular.module('ScheduleApp').factory( |
| 110 | 203 | } |
| 111 | 204 | } else { |
| 112 | 205 | // 赋值(上下行,发车时间,班次类型,起点站,终点站,停车场) |
| 113 | - if (value.fcsj) { | |
| 114 | - ttinfodetailIds[index].fcsj = value.fcsj; | |
| 115 | - } | |
| 116 | - if (value.xlDir) { | |
| 117 | - ttinfodetailIds[index].xldir = value.xlDir; | |
| 118 | - } | |
| 119 | - if (value.bcType) { | |
| 120 | - ttinfodetailIds[index].bc_type = value.bcType; | |
| 121 | - } | |
| 122 | - if (value.qdz) { | |
| 123 | - ttinfodetailIds[index].qdz = value.qdz; | |
| 124 | - } | |
| 125 | - if (value.zdz) { | |
| 126 | - ttinfodetailIds[index].zdz = value.zdz; | |
| 127 | - } | |
| 128 | - if (value.tcc) { | |
| 129 | - ttinfodetailIds[index].tcc = value.tcc; | |
| 130 | - } | |
| 206 | + ttinfodetailIds[index].fcsj = value.fcsj || undefined; | |
| 207 | + ttinfodetailIds[index].xldir = value.xlDir || undefined; | |
| 208 | + ttinfodetailIds[index].bc_type = value.bcType || undefined; | |
| 209 | + ttinfodetailIds[index].qdz = value.qdz || undefined; | |
| 210 | + ttinfodetailIds[index].zdz = value.zdz || undefined; | |
| 211 | + ttinfodetailIds[index].tcc = value.tcc || undefined; | |
| 212 | + | |
| 213 | + ttinfodetailIds[index].validInfo(); | |
| 131 | 214 | |
| 132 | 215 | success_counts ++; |
| 133 | 216 | if (success_counts + error_counts == ttinfodetailIds.length) { |
| ... | ... | @@ -258,6 +341,15 @@ angular.module('ScheduleApp').controller( |
| 258 | 341 | |
| 259 | 342 | |
| 260 | 343 | }; |
| 344 | + // 批量选择 | |
| 345 | + self.multiselect = function() { | |
| 346 | + $state.go("ttInfoDetailManage_detail_edit_mulselect", { | |
| 347 | + xlid: self.xlid, | |
| 348 | + ttid: self.ttid, | |
| 349 | + xlname: self.xlname, | |
| 350 | + ttname: self.ttname | |
| 351 | + }); | |
| 352 | + }; | |
| 261 | 353 | |
| 262 | 354 | // 查询对象类 |
| 263 | 355 | var TTInfoDetail = service.getQueryClass(); |
| ... | ... | @@ -330,8 +422,7 @@ angular.module('ScheduleApp').controller( |
| 330 | 422 | return true; |
| 331 | 423 | } |
| 332 | 424 | } |
| 333 | - } | |
| 334 | - | |
| 425 | + }; | |
| 335 | 426 | |
| 336 | 427 | } |
| 337 | 428 | |
| ... | ... | @@ -368,19 +459,40 @@ angular.module('ScheduleApp').controller( |
| 368 | 459 | |
| 369 | 460 | self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; |
| 370 | 461 | |
| 462 | + self.stop_temp = { | |
| 463 | + qdz: {id: undefined}, // 起点站 | |
| 464 | + zdz: {id: undefined}, // 终点站 | |
| 465 | + tcc: {id: undefined}, // 停车场 | |
| 466 | + setModelValue: function(timeTableDetailForSave) { | |
| 467 | + var model = timeTableDetailForSave; | |
| 468 | + this.qdz.id = model.qdz ? model.qdz.id : undefined; | |
| 469 | + this.zdz.id = model.zdz ? model.zdz.id : undefined; | |
| 470 | + this.tcc.id = model.tcc ? model.tcc.id : undefined; | |
| 471 | + }, | |
| 472 | + reSetModelValue: function(timeTableDetailForSave) { | |
| 473 | + var model = timeTableDetailForSave; | |
| 474 | + if (model == "in") { | |
| 475 | + model.qdz = this.qdz; | |
| 476 | + model.tcc = this.tcc; | |
| 477 | + } else if (model.bcType == "out") { | |
| 478 | + model.tcc = this.tcc; | |
| 479 | + model.zdz = this.zdz; | |
| 480 | + } else { | |
| 481 | + model.qdz = this.qdz; | |
| 482 | + model.zdz = this.zdz; | |
| 483 | + } | |
| 484 | + } | |
| 485 | + | |
| 486 | + }; | |
| 487 | + self.stop_temp.qdz_temp = undefined; // 起点站id | |
| 488 | + self.stop_temp.zdz_temp = undefined; // 终点站id | |
| 489 | + self.stop_temp.tcc_temp = undefined; // 停车场id | |
| 490 | + | |
| 371 | 491 | if (id) { |
| 372 | 492 | TTInfoDetail.get({id: id}, function(value) { |
| 373 | 493 | self.TimeTableDetailForSave = value; |
| 374 | - if (!self.TimeTableDetailForSave.qdz) { | |
| 375 | - self.TimeTableDetailForSave.qdz = {}; | |
| 376 | - } | |
| 377 | - if (!self.TimeTableDetailForSave.zdz) { | |
| 378 | - self.TimeTableDetailForSave.zdz = {}; | |
| 379 | - } | |
| 380 | - if (!self.TimeTableDetailForSave.tcc) { | |
| 381 | - self.TimeTableDetailForSave.tcc = {}; | |
| 382 | - } | |
| 383 | 494 | |
| 495 | + self.stop_temp.setModelValue(value); | |
| 384 | 496 | self.title2 = |
| 385 | 497 | self.xlname + "(" + self.ttname + ")" + "时刻表明细信息" + |
| 386 | 498 | "->路牌" + self.TimeTableDetailForSave.lp.lpName + |
| ... | ... | @@ -397,14 +509,7 @@ angular.module('ScheduleApp').controller( |
| 397 | 509 | // delete $stateParams.id; |
| 398 | 510 | //} |
| 399 | 511 | |
| 400 | - // TODO: | |
| 401 | - | |
| 402 | - if (self.TimeTableDetailForSave.tcc && !self.TimeTableDetailForSave.tcc.id) | |
| 403 | - delete self.TimeTableDetailForSave.tcc; | |
| 404 | - if (self.TimeTableDetailForSave.qdz && !self.TimeTableDetailForSave.qdz.id) | |
| 405 | - delete self.TimeTableDetailForSave.qdz; | |
| 406 | - if (self.TimeTableDetailForSave.zdz && !self.TimeTableDetailForSave.zdz.id) | |
| 407 | - delete self.TimeTableDetailForSave.zdz; | |
| 512 | + self.stop_temp.reSetModelValue(self.TimeTableDetailForSave); | |
| 408 | 513 | |
| 409 | 514 | self.TimeTableDetailForSave.$save(function(value) { |
| 410 | 515 | // 修正内部edit的值 |
| ... | ... | @@ -413,9 +518,15 @@ angular.module('ScheduleApp').controller( |
| 413 | 518 | for (var j = 0; j < detailInfos[i].length; j++) { |
| 414 | 519 | if (detailInfos[i][j].ttdid == id) { |
| 415 | 520 | // 赋值(上下行,发车时间,班次类型) |
| 416 | - detailInfos[i][j].fcsj = value.fcsj; | |
| 417 | - detailInfos[i][j].xldir = value.xlDir; | |
| 418 | - detailInfos[i][j].bc_type = value.bcType; | |
| 521 | + detailInfos[i][j].fcsj = value.fcsj || undefined; | |
| 522 | + detailInfos[i][j].xldir = value.xlDir || undefined; | |
| 523 | + detailInfos[i][j].bc_type = value.bcType || undefined; | |
| 524 | + detailInfos[i][j].tcc = value.tcc || undefined; | |
| 525 | + detailInfos[i][j].zdz = value.zdz || undefined; | |
| 526 | + detailInfos[i][j].qdz = value.qdz || undefined; | |
| 527 | + detailInfos[i][j].isfb = value.isFB; | |
| 528 | + | |
| 529 | + detailInfos[i][j].validInfo(); | |
| 419 | 530 | } |
| 420 | 531 | } |
| 421 | 532 | } |
| ... | ... | @@ -452,7 +563,7 @@ angular.module('ScheduleApp').controller( |
| 452 | 563 | var TTInfoDetail = service.getQueryClass(); |
| 453 | 564 | |
| 454 | 565 | // 时间正则表达式(格式hh:mm,如:06:39) |
| 455 | - self.time_regex = /^(([0-1]\d)|(2[0-4])):[0-5]\d$/; | |
| 566 | + self.time_regex = /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/; | |
| 456 | 567 | // 整数 |
| 457 | 568 | self.number_regex = /^-?\d+$/; |
| 458 | 569 | // 小数 |
| ... | ... | @@ -514,3 +625,74 @@ angular.module('ScheduleApp').controller( |
| 514 | 625 | ] |
| 515 | 626 | ); |
| 516 | 627 | |
| 628 | +// edit-mulselect.html 具体班次明细修改页面 | |
| 629 | +angular.module('ScheduleApp').controller( | |
| 630 | + 'TimeTableDetailManageFormCtrl_mulselect', | |
| 631 | + [ | |
| 632 | + 'TimeTableDetailManageService_old', | |
| 633 | + '$stateParams', | |
| 634 | + '$state', | |
| 635 | + function(service, $stateParams, $state) { | |
| 636 | + var self = this; | |
| 637 | + | |
| 638 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 639 | + self.xlid = $stateParams.xlid; // 获取传过来的线路id | |
| 640 | + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id | |
| 641 | + self.xlname = $stateParams.xlname; // 获取传过来的线路名字 | |
| 642 | + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字 | |
| 643 | + | |
| 644 | + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; | |
| 645 | + | |
| 646 | + self.xldir = undefined; // 线路上下行 | |
| 647 | + self.starttime = undefined; // 开始时间 | |
| 648 | + self.endtime = undefined; // 结束时间 | |
| 649 | + | |
| 650 | + // 时间正则表达式(格式hh:mm,如:06:39) | |
| 651 | + self.time_regex = /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/; | |
| 652 | + | |
| 653 | + // 提交方法 | |
| 654 | + self.submit = function() { | |
| 655 | + var startTime_h_m = undefined; | |
| 656 | + var endtime_h_m = undefined; | |
| 657 | + if (self.starttime) { | |
| 658 | + startTime_h_m = []; | |
| 659 | + startTime_h_m.push(parseInt(self.starttime.split(":")[0])); | |
| 660 | + startTime_h_m.push(parseInt(self.starttime.split(":")[1])); | |
| 661 | + } | |
| 662 | + if (self.endtime) { | |
| 663 | + endtime_h_m = []; | |
| 664 | + endtime_h_m.push(parseInt(self.endtime.split(":")[0])); | |
| 665 | + endtime_h_m.push(parseInt(self.endtime.split(":")[1])); | |
| 666 | + } | |
| 667 | + | |
| 668 | + // 根据时间范围,选择班次 | |
| 669 | + | |
| 670 | + var ds = service.getEditInfo().detailInfos; | |
| 671 | + | |
| 672 | + for (var i = 0; i < ds.length; i++) { | |
| 673 | + for (var j = 0; j < ds[i].length; j++) { | |
| 674 | + ds[i][j].sel = false; | |
| 675 | + } | |
| 676 | + } | |
| 677 | + | |
| 678 | + for (var i = 0; i < ds.length; i++) { | |
| 679 | + for (var j = 0; j < ds[i].length; j++) { | |
| 680 | + if (ds[i][j].ttdid && ds[i][j].fcsj) { | |
| 681 | + ds[i][j].sel = ds[i][j].where(self.xldir, startTime_h_m, endtime_h_m); | |
| 682 | + } | |
| 683 | + } | |
| 684 | + } | |
| 685 | + | |
| 686 | + $state.go("ttInfoDetailManage_edit3", { | |
| 687 | + xlid: self.xlid, | |
| 688 | + ttid: self.ttid, | |
| 689 | + xlname: self.xlname, | |
| 690 | + ttname: self.ttname | |
| 691 | + }); | |
| 692 | + | |
| 693 | + }; | |
| 694 | + | |
| 695 | + } | |
| 696 | + ] | |
| 697 | +); | |
| 698 | + | ... | ... |