Commit 2cf6d5fcab8a186223bb8dd1ddcf55bcde44cca2

Authored by 徐烜
1 parent a70acadf

update

src/main/java/com/bsth/controller/CarsController.java
1 1 package com.bsth.controller;
2 2  
3 3 import com.bsth.entity.Cars;
4   -import com.bsth.service.schedule.utils.DataImportExportService;
5 4 import com.bsth.service.schedule.utils.DataToolsProperties;
6 5 import org.springframework.beans.factory.annotation.Autowired;
7 6 import org.springframework.boot.context.properties.EnableConfigurationProperties;
... ... @@ -18,8 +17,6 @@ import java.util.Map;
18 17 public class CarsController extends BaseController<Cars, Integer> {
19 18  
20 19 @Autowired
21   - private DataImportExportService dataImportExportService;
22   - @Autowired
23 20 private DataToolsProperties dataToolsProperties;
24 21  
25 22 /**
... ...
src/main/java/com/bsth/controller/PersonnelController.java
1 1 package com.bsth.controller;
2 2  
3 3 import com.bsth.entity.Personnel;
4   -import com.bsth.service.schedule.utils.DataImportExportService;
5 4 import com.bsth.service.schedule.utils.DataToolsProperties;
6 5 import org.springframework.beans.factory.annotation.Autowired;
7 6 import org.springframework.boot.context.properties.EnableConfigurationProperties;
... ... @@ -18,8 +17,6 @@ import java.util.Map;
18 17 public class PersonnelController extends BaseController<Personnel, Integer> {
19 18  
20 19 @Autowired
21   - private DataImportExportService dataImportExportService;
22   - @Autowired
23 20 private DataToolsProperties dataToolsProperties;
24 21  
25 22 /**
... ...
src/main/java/com/bsth/controller/schedule/CarConfigInfoController.java
... ... @@ -2,6 +2,9 @@ package com.bsth.controller.schedule;
2 2  
3 3 import com.bsth.controller.BaseController;
4 4 import com.bsth.entity.schedule.CarConfigInfo;
  5 +import com.bsth.service.schedule.utils.DataToolsProperties;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.boot.context.properties.EnableConfigurationProperties;
5 8 import org.springframework.web.bind.annotation.RequestMapping;
6 9 import org.springframework.web.bind.annotation.RestController;
7 10  
... ... @@ -10,5 +13,13 @@ import org.springframework.web.bind.annotation.RestController;
10 13 */
11 14 @RestController
12 15 @RequestMapping("cci")
  16 +@EnableConfigurationProperties(DataToolsProperties.class)
13 17 public class CarConfigInfoController extends BaseController<CarConfigInfo, Long> {
  18 + @Autowired
  19 + private DataToolsProperties dataToolsProperties;
  20 +
  21 + @Override
  22 + protected String getDataImportKtrClasspath() {
  23 + return dataToolsProperties.getCarsconfigDatainputktr();
  24 + }
14 25 }
... ...
src/main/java/com/bsth/service/schedule/utils/DataToolsProperties.java
... ... @@ -31,6 +31,9 @@ public class DataToolsProperties {
31 31 /** 人员信息导入ktr转换 */
32 32 @NotNull
33 33 private String employeesDatainputktr;
  34 + /** 车辆配置信息导入 */
  35 + @NotNull
  36 + private String carsconfigDatainputktr;
34 37  
35 38 // TODO:
36 39  
... ... @@ -73,4 +76,12 @@ public class DataToolsProperties {
73 76 public void setEmployeesDatainputktr(String employeesDatainputktr) {
74 77 this.employeesDatainputktr = employeesDatainputktr;
75 78 }
  79 +
  80 + public String getCarsconfigDatainputktr() {
  81 + return carsconfigDatainputktr;
  82 + }
  83 +
  84 + public void setCarsconfigDatainputktr(String carsconfigDatainputktr) {
  85 + this.carsconfigDatainputktr = carsconfigDatainputktr;
  86 + }
76 87 }
... ...
src/main/resources/datatools/config.properties
... ... @@ -17,7 +17,7 @@ datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
17 17 # 时刻明细信息导入
18 18  
19 19 # 车辆配置信息导入
20   -
  20 +datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
21 21 # 人员配置信息导入
22 22  
23 23 # 排班规则信息导入**
24 24 \ No newline at end of file
... ...
src/main/resources/datatools/ktrs/carsConfigDataInput.ktr 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>carsConfigDataInput</name>
  5 + <description>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</description>
  6 + <extended_description>&#x914d;&#x8f66;&#x4fe1;&#x606f;</extended_description>
  7 + <trans_version/>
  8 + <trans_type>Normal</trans_type>
  9 + <trans_status>0</trans_status>
  10 + <directory>&#x2f;</directory>
  11 + <parameters>
  12 + <parameter>
  13 + <name>erroroutputdir</name>
  14 + <default_value/>
  15 + <description>ktr step&#x914d;&#x7f6e;&#x7684;&#x9519;&#x8bef;&#x8f93;&#x51fa;&#x76ee;&#x5f55;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>filepath</name>
  19 + <default_value/>
  20 + <description>&#x5f85;&#x5904;&#x7406;&#x5bfc;&#x5165;&#x7684;excel&#x6587;&#x4ef6;</description>
  21 + </parameter>
  22 + </parameters>
  23 + <log>
  24 +<trans-log-table><connection/>
  25 +<schema/>
  26 +<table/>
  27 +<size_limit_lines/>
  28 +<interval/>
  29 +<timeout_days/>
  30 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
  31 +<perf-log-table><connection/>
  32 +<schema/>
  33 +<table/>
  34 +<interval/>
  35 +<timeout_days/>
  36 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
  37 +<channel-log-table><connection/>
  38 +<schema/>
  39 +<table/>
  40 +<timeout_days/>
  41 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
  42 +<step-log-table><connection/>
  43 +<schema/>
  44 +<table/>
  45 +<timeout_days/>
  46 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
  47 +<metrics-log-table><connection/>
  48 +<schema/>
  49 +<table/>
  50 +<timeout_days/>
  51 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
  52 + </log>
  53 + <maxdate>
  54 + <connection/>
  55 + <table/>
  56 + <field/>
  57 + <offset>0.0</offset>
  58 + <maxdiff>0.0</maxdiff>
  59 + </maxdate>
  60 + <size_rowset>10000</size_rowset>
  61 + <sleep_time_empty>50</sleep_time_empty>
  62 + <sleep_time_full>50</sleep_time_full>
  63 + <unique_connections>N</unique_connections>
  64 + <feedback_shown>Y</feedback_shown>
  65 + <feedback_size>50000</feedback_size>
  66 + <using_thread_priorities>Y</using_thread_priorities>
  67 + <shared_objects_file/>
  68 + <capture_step_performance>N</capture_step_performance>
  69 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  70 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  71 + <dependencies>
  72 + </dependencies>
  73 + <partitionschemas>
  74 + </partitionschemas>
  75 + <slaveservers>
  76 + </slaveservers>
  77 + <clusterschemas>
  78 + </clusterschemas>
  79 + <created_user>-</created_user>
  80 + <created_date>2016&#x2f;06&#x2f;29 13&#x3a;15&#x3a;32.118</created_date>
  81 + <modified_user>-</modified_user>
  82 + <modified_date>2016&#x2f;06&#x2f;29 13&#x3a;15&#x3a;32.118</modified_date>
  83 + <key_for_session_key/>
  84 + <is_key_private>N</is_key_private>
  85 + </info>
  86 + <notepads>
  87 + <notepad>
  88 + <note>&#x914d;&#x8f66;&#x5206;&#x5f53;&#x524d;&#x2f;&#x5386;&#x53f2;&#x2f;&#x8ba1;&#x5212;&#xff0c;&#x5386;&#x53f2;&#x914d;&#x8f66;&#x6709;&#x7ec8;&#x6b62;&#x65f6;&#x95f4;&#xff0c;&#x7136;&#x540e;&#x662f;&#x5426;&#x5207;&#x6362;&#x57fa;&#x672c;&#x90fd;&#x662f;1&#xa;&#x662f;&#x5426;&#x5207;&#x6362; &#x6682;&#x65f6;&#x4e0d;&#x77e5;&#x9053;&#x4ec0;&#x4e48;&#x610f;&#x601d;&#xff0c;&#x5f53;&#x524d;&#x914d;&#x8f66;&#x90fd;&#x8bbe;&#x7f6e;&#x4e3a;0&#xa;&#x7ec8;&#x6b62;&#x65f6;&#x95f4; &#x5f53;&#x524d;&#x914d;&#x8f66;&#x6ca1;&#x6709;&#x7ec8;&#x6b62;&#x65f6;&#x95f4;&#xff0c;&#x8fd9;&#x4e2a;&#x4f30;&#x8ba1;&#x8981;&#x4f5c;&#x4e3a;&#x67e5;&#x8be2;&#x6761;&#x4ef6;&#x7684;&#xa;&#x65e9;&#x73ed;&#x65f6;&#x95f4; &#x6ca1;&#x6709;&#x6682;&#x65f6;&#x7a7a;&#x7740;&#xa;&#x672b;&#x73ed;&#x65f6;&#x95f4; &#x6ca1;&#x6709;&#x6682;&#x65f6;&#x7a7a;&#x7740;</note>
  89 + <xloc>260</xloc>
  90 + <yloc>124</yloc>
  91 + <width>391</width>
  92 + <heigth>90</heigth>
  93 + <fontname>YaHei Consolas Hybrid</fontname>
  94 + <fontsize>12</fontsize>
  95 + <fontbold>N</fontbold>
  96 + <fontitalic>N</fontitalic>
  97 + <fontcolorred>0</fontcolorred>
  98 + <fontcolorgreen>0</fontcolorgreen>
  99 + <fontcolorblue>0</fontcolorblue>
  100 + <backgroundcolorred>255</backgroundcolorred>
  101 + <backgroundcolorgreen>205</backgroundcolorgreen>
  102 + <backgroundcolorblue>112</backgroundcolorblue>
  103 + <bordercolorred>100</bordercolorred>
  104 + <bordercolorgreen>100</bordercolorgreen>
  105 + <bordercolorblue>100</bordercolorblue>
  106 + <drawshadow>Y</drawshadow>
  107 + </notepad>
  108 + </notepads>
  109 + <connection>
  110 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  111 + <server>192.168.168.201</server>
  112 + <type>MYSQL</type>
  113 + <access>Native</access>
  114 + <database>control</database>
  115 + <port>3306</port>
  116 + <username>root</username>
  117 + <password>Encrypted 2be98afc86aa7f2e4cb79ff228dc6fa8c</password>
  118 + <servername/>
  119 + <data_tablespace/>
  120 + <index_tablespace/>
  121 + <attributes>
  122 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  123 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  124 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  125 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  126 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  127 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  128 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  129 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  130 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  131 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  132 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  133 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  134 + </attributes>
  135 + </connection>
  136 + <connection>
  137 + <name>xlab_mysql_youle</name>
  138 + <server>101.231.124.8</server>
  139 + <type>MYSQL</type>
  140 + <access>Native</access>
  141 + <database>xlab_youle</database>
  142 + <port>45687</port>
  143 + <username>xlab-youle</username>
  144 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  145 + <servername/>
  146 + <data_tablespace/>
  147 + <index_tablespace/>
  148 + <attributes>
  149 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  150 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  151 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  152 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  153 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  154 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  155 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  156 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  157 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  158 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  159 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  160 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  161 + </attributes>
  162 + </connection>
  163 + <connection>
  164 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  165 + <server>localhost</server>
  166 + <type>MYSQL</type>
  167 + <access>Native</access>
  168 + <database>xlab_youle</database>
  169 + <port>3306</port>
  170 + <username>root</username>
  171 + <password>Encrypted </password>
  172 + <servername/>
  173 + <data_tablespace/>
  174 + <index_tablespace/>
  175 + <attributes>
  176 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  177 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  178 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  179 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  180 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  181 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  182 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  183 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  184 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  185 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  186 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  187 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  188 + </attributes>
  189 + </connection>
  190 + <connection>
  191 + <name>xlab_youle</name>
  192 + <server/>
  193 + <type>MYSQL</type>
  194 + <access>JNDI</access>
  195 + <database>xlab_youle</database>
  196 + <port>1521</port>
  197 + <username/>
  198 + <password>Encrypted </password>
  199 + <servername/>
  200 + <data_tablespace/>
  201 + <index_tablespace/>
  202 + <attributes>
  203 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  204 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  205 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  206 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  207 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  208 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  209 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  210 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  211 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  212 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  213 + </attributes>
  214 + </connection>
  215 + <order>
  216 + <hop> <from>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  217 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x5173;&#x8054;</to><enabled>Y</enabled> </hop>
  218 + <hop> <from>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_ccinfo</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  219 + <hop> <from>&#x662f;&#x5426;&#x5207;&#x6362;</from><to>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_ccinfo</to><enabled>Y</enabled> </hop>
  220 + <hop> <from>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x5173;&#x8054;</from><to>&#x67e5;&#x627e;&#x8f66;&#x8f86;&#x5173;&#x8054;</to><enabled>Y</enabled> </hop>
  221 + <hop> <from>&#x67e5;&#x627e;&#x8f66;&#x8f86;&#x5173;&#x8054;</from><to>&#x662f;&#x5426;&#x5207;&#x6362;</to><enabled>Y</enabled> </hop>
  222 + <hop> <from>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</from><to>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</to><enabled>Y</enabled> </hop>
  223 + </order>
  224 + <step>
  225 + <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>
  226 + <type>ExcelInput</type>
  227 + <description/>
  228 + <distribute>Y</distribute>
  229 + <custom_distribution/>
  230 + <copies>1</copies>
  231 + <partitioning>
  232 + <method>none</method>
  233 + <schema_name/>
  234 + </partitioning>
  235 + <header>Y</header>
  236 + <noempty>Y</noempty>
  237 + <stoponempty>N</stoponempty>
  238 + <filefield/>
  239 + <sheetfield/>
  240 + <sheetrownumfield/>
  241 + <rownumfield/>
  242 + <sheetfield/>
  243 + <filefield/>
  244 + <limit>0</limit>
  245 + <encoding/>
  246 + <add_to_result_filenames>Y</add_to_result_filenames>
  247 + <accept_filenames>Y</accept_filenames>
  248 + <accept_field>filepath_</accept_field>
  249 + <accept_stepname>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</accept_stepname>
  250 + <file>
  251 + <name/>
  252 + <filemask/>
  253 + <exclude_filemask/>
  254 + <file_required>N</file_required>
  255 + <include_subfolders>N</include_subfolders>
  256 + </file>
  257 + <fields>
  258 + <field>
  259 + <name>&#x7ebf;&#x8def;</name>
  260 + <type>String</type>
  261 + <length>-1</length>
  262 + <precision>-1</precision>
  263 + <trim_type>none</trim_type>
  264 + <repeat>N</repeat>
  265 + <format/>
  266 + <currency/>
  267 + <decimal/>
  268 + <group/>
  269 + </field>
  270 + <field>
  271 + <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>
  272 + <type>String</type>
  273 + <length>-1</length>
  274 + <precision>-1</precision>
  275 + <trim_type>none</trim_type>
  276 + <repeat>N</repeat>
  277 + <format/>
  278 + <currency/>
  279 + <decimal/>
  280 + <group/>
  281 + </field>
  282 + <field>
  283 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  284 + <type>String</type>
  285 + <length>-1</length>
  286 + <precision>-1</precision>
  287 + <trim_type>none</trim_type>
  288 + <repeat>N</repeat>
  289 + <format/>
  290 + <currency/>
  291 + <decimal/>
  292 + <group/>
  293 + </field>
  294 + <field>
  295 + <name>&#x7ec8;&#x7ed3;&#x65e5;&#x671f;</name>
  296 + <type>String</type>
  297 + <length>-1</length>
  298 + <precision>-1</precision>
  299 + <trim_type>none</trim_type>
  300 + <repeat>N</repeat>
  301 + <format/>
  302 + <currency/>
  303 + <decimal/>
  304 + <group/>
  305 + </field>
  306 + <field>
  307 + <name>&#x505c;&#x8f66;&#x70b9;</name>
  308 + <type>String</type>
  309 + <length>-1</length>
  310 + <precision>-1</precision>
  311 + <trim_type>none</trim_type>
  312 + <repeat>N</repeat>
  313 + <format/>
  314 + <currency/>
  315 + <decimal/>
  316 + <group/>
  317 + </field>
  318 + </fields>
  319 + <sheets>
  320 + <sheet>
  321 + <name>&#x5de5;&#x4f5c;&#x8868;1</name>
  322 + <startrow>0</startrow>
  323 + <startcol>0</startcol>
  324 + </sheet>
  325 + </sheets>
  326 + <strict_types>N</strict_types>
  327 + <error_ignored>N</error_ignored>
  328 + <error_line_skipped>N</error_line_skipped>
  329 + <bad_line_files_destination_directory/>
  330 + <bad_line_files_extension>warning</bad_line_files_extension>
  331 + <error_line_files_destination_directory/>
  332 + <error_line_files_extension>error</error_line_files_extension>
  333 + <line_number_files_destination_directory/>
  334 + <line_number_files_extension>line</line_number_files_extension>
  335 + <shortFileFieldName/>
  336 + <pathFieldName/>
  337 + <hiddenFieldName/>
  338 + <lastModificationTimeFieldName/>
  339 + <uriNameFieldName/>
  340 + <rootUriNameFieldName/>
  341 + <extensionFieldName/>
  342 + <sizeFieldName/>
  343 + <spreadsheet_type>JXL</spreadsheet_type>
  344 + <cluster_schema/>
  345 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  346 + <xloc>155</xloc>
  347 + <yloc>56</yloc>
  348 + <draw>Y</draw>
  349 + </GUI>
  350 + </step>
  351 +
  352 + <step>
  353 + <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
  354 + <type>SelectValues</type>
  355 + <description/>
  356 + <distribute>Y</distribute>
  357 + <custom_distribution/>
  358 + <copies>1</copies>
  359 + <partitioning>
  360 + <method>none</method>
  361 + <schema_name/>
  362 + </partitioning>
  363 + <fields> <field> <name>&#x7ebf;&#x8def;</name>
  364 + <rename>xl</rename>
  365 + <length>-2</length>
  366 + <precision>-2</precision>
  367 + </field> <field> <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>
  368 + <rename>cl</rename>
  369 + <length>-2</length>
  370 + <precision>-2</precision>
  371 + </field> <field> <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  372 + <rename>qyrq</rename>
  373 + <length>-2</length>
  374 + <precision>-2</precision>
  375 + </field> <field> <name>&#x7ec8;&#x7ed3;&#x65e5;&#x671f;</name>
  376 + <rename>zzrq</rename>
  377 + <length>-2</length>
  378 + <precision>-2</precision>
  379 + </field> <field> <name>&#x505c;&#x8f66;&#x70b9;</name>
  380 + <rename>tcd</rename>
  381 + <length>-2</length>
  382 + <precision>-2</precision>
  383 + </field> <select_unspecified>N</select_unspecified>
  384 + </fields> <cluster_schema/>
  385 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  386 + <xloc>306</xloc>
  387 + <yloc>56</yloc>
  388 + <draw>Y</draw>
  389 + </GUI>
  390 + </step>
  391 +
  392 + <step>
  393 + <name>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_ccinfo</name>
  394 + <type>InsertUpdate</type>
  395 + <description/>
  396 + <distribute>Y</distribute>
  397 + <custom_distribution/>
  398 + <copies>1</copies>
  399 + <partitioning>
  400 + <method>none</method>
  401 + <schema_name/>
  402 + </partitioning>
  403 + <connection>bus_control_&#x516c;&#x53f8;_201</connection>
  404 + <commit>100</commit>
  405 + <update_bypassed>N</update_bypassed>
  406 + <lookup>
  407 + <schema/>
  408 + <table>bsth_c_s_ccinfo</table>
  409 + <key>
  410 + <name>xlId</name>
  411 + <field>xl</field>
  412 + <condition>&#x3d;</condition>
  413 + <name2/>
  414 + </key>
  415 + <key>
  416 + <name>clId</name>
  417 + <field>cl</field>
  418 + <condition>&#x3d;</condition>
  419 + <name2/>
  420 + </key>
  421 + <value>
  422 + <name>xl</name>
  423 + <rename>xlId</rename>
  424 + <update>Y</update>
  425 + </value>
  426 + <value>
  427 + <name>cl</name>
  428 + <rename>clId</rename>
  429 + <update>Y</update>
  430 + </value>
  431 + <value>
  432 + <name>is_switch</name>
  433 + <rename>isswitch</rename>
  434 + <update>Y</update>
  435 + </value>
  436 + <value>
  437 + <name>tcd</name>
  438 + <rename>tcd</rename>
  439 + <update>Y</update>
  440 + </value>
  441 + <value>
  442 + <name>zzrq</name>
  443 + <rename>zzrq</rename>
  444 + <update>Y</update>
  445 + </value>
  446 + <value>
  447 + <name>qyrq</name>
  448 + <rename>qyrq</rename>
  449 + <update>Y</update>
  450 + </value>
  451 + </lookup>
  452 + <cluster_schema/>
  453 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  454 + <xloc>715</xloc>
  455 + <yloc>197</yloc>
  456 + <draw>Y</draw>
  457 + </GUI>
  458 + </step>
  459 +
  460 + <step>
  461 + <name>&#x662f;&#x5426;&#x5207;&#x6362;</name>
  462 + <type>Constant</type>
  463 + <description/>
  464 + <distribute>Y</distribute>
  465 + <custom_distribution/>
  466 + <copies>1</copies>
  467 + <partitioning>
  468 + <method>none</method>
  469 + <schema_name/>
  470 + </partitioning>
  471 + <fields>
  472 + <field>
  473 + <name>isswitch</name>
  474 + <type>Integer</type>
  475 + <format/>
  476 + <currency/>
  477 + <decimal/>
  478 + <group/>
  479 + <nullif>0</nullif>
  480 + <length>-1</length>
  481 + <precision>-1</precision>
  482 + <set_empty_string>N</set_empty_string>
  483 + </field>
  484 + </fields>
  485 + <cluster_schema/>
  486 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  487 + <xloc>713</xloc>
  488 + <yloc>54</yloc>
  489 + <draw>Y</draw>
  490 + </GUI>
  491 + </step>
  492 +
  493 + <step>
  494 + <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x5173;&#x8054;</name>
  495 + <type>DBLookup</type>
  496 + <description/>
  497 + <distribute>Y</distribute>
  498 + <custom_distribution/>
  499 + <copies>1</copies>
  500 + <partitioning>
  501 + <method>none</method>
  502 + <schema_name/>
  503 + </partitioning>
  504 + <connection>bus_control_&#x516c;&#x53f8;_201</connection>
  505 + <cache>N</cache>
  506 + <cache_load_all>N</cache_load_all>
  507 + <cache_size>0</cache_size>
  508 + <lookup>
  509 + <schema/>
  510 + <table>bsth_c_line</table>
  511 + <orderby/>
  512 + <fail_on_multiple>N</fail_on_multiple>
  513 + <eat_row_on_failure>N</eat_row_on_failure>
  514 + <key>
  515 + <name>xl</name>
  516 + <field>name</field>
  517 + <condition>&#x3d;</condition>
  518 + <name2/>
  519 + </key>
  520 + <value>
  521 + <name>id</name>
  522 + <rename>xlId</rename>
  523 + <default/>
  524 + <type>Integer</type>
  525 + </value>
  526 + </lookup>
  527 + <cluster_schema/>
  528 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  529 + <xloc>439</xloc>
  530 + <yloc>56</yloc>
  531 + <draw>Y</draw>
  532 + </GUI>
  533 + </step>
  534 +
  535 + <step>
  536 + <name>&#x67e5;&#x627e;&#x8f66;&#x8f86;&#x5173;&#x8054;</name>
  537 + <type>DBLookup</type>
  538 + <description/>
  539 + <distribute>Y</distribute>
  540 + <custom_distribution/>
  541 + <copies>1</copies>
  542 + <partitioning>
  543 + <method>none</method>
  544 + <schema_name/>
  545 + </partitioning>
  546 + <connection>bus_control_&#x516c;&#x53f8;_201</connection>
  547 + <cache>N</cache>
  548 + <cache_load_all>N</cache_load_all>
  549 + <cache_size>0</cache_size>
  550 + <lookup>
  551 + <schema/>
  552 + <table>bsth_c_cars</table>
  553 + <orderby/>
  554 + <fail_on_multiple>N</fail_on_multiple>
  555 + <eat_row_on_failure>N</eat_row_on_failure>
  556 + <key>
  557 + <name>cl</name>
  558 + <field>inside_code</field>
  559 + <condition>&#x3d;</condition>
  560 + <name2/>
  561 + </key>
  562 + <value>
  563 + <name>id</name>
  564 + <rename>clId</rename>
  565 + <default/>
  566 + <type>Integer</type>
  567 + </value>
  568 + </lookup>
  569 + <cluster_schema/>
  570 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  571 + <xloc>579</xloc>
  572 + <yloc>55</yloc>
  573 + <draw>Y</draw>
  574 + </GUI>
  575 + </step>
  576 +
  577 + <step>
  578 + <name>&#x9519;&#x8bef;&#x8f93;&#x51fa;</name>
  579 + <type>ExcelOutput</type>
  580 + <description/>
  581 + <distribute>Y</distribute>
  582 + <custom_distribution/>
  583 + <copies>1</copies>
  584 + <partitioning>
  585 + <method>none</method>
  586 + <schema_name/>
  587 + </partitioning>
  588 + <header>Y</header>
  589 + <footer>N</footer>
  590 + <encoding>UTF-8</encoding>
  591 + <append>N</append>
  592 + <add_to_result_filenames>Y</add_to_result_filenames>
  593 + <file>
  594 + <name>&#x24;&#x7b;erroroutputdir&#x7d;&#x2f;&#x5f53;&#x524d;&#x914d;&#x8f66;_&#x9519;&#x8bef;</name>
  595 + <extention>xls</extention>
  596 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  597 + <create_parent_folder>N</create_parent_folder>
  598 + <split>N</split>
  599 + <add_date>N</add_date>
  600 + <add_time>N</add_time>
  601 + <SpecifyFormat>N</SpecifyFormat>
  602 + <date_time_format/>
  603 + <sheetname>Sheet1</sheetname>
  604 + <autosizecolums>N</autosizecolums>
  605 + <nullisblank>N</nullisblank>
  606 + <protect_sheet>N</protect_sheet>
  607 + <password>Encrypted </password>
  608 + <splitevery>0</splitevery>
  609 + <usetempfiles>N</usetempfiles>
  610 + <tempdirectory/>
  611 + </file>
  612 + <template>
  613 + <enabled>N</enabled>
  614 + <append>N</append>
  615 + <filename>template.xls</filename>
  616 + </template>
  617 + <fields>
  618 + <field>
  619 + <name>xl</name>
  620 + <type>String</type>
  621 + <format/>
  622 + </field>
  623 + <field>
  624 + <name>cl</name>
  625 + <type>String</type>
  626 + <format/>
  627 + </field>
  628 + <field>
  629 + <name>qyrq</name>
  630 + <type>String</type>
  631 + <format/>
  632 + </field>
  633 + <field>
  634 + <name>zzrq</name>
  635 + <type>String</type>
  636 + <format/>
  637 + </field>
  638 + <field>
  639 + <name>tcd</name>
  640 + <type>String</type>
  641 + <format/>
  642 + </field>
  643 + <field>
  644 + <name>xlId</name>
  645 + <type>Integer</type>
  646 + <format/>
  647 + </field>
  648 + <field>
  649 + <name>clId</name>
  650 + <type>Integer</type>
  651 + <format/>
  652 + </field>
  653 + <field>
  654 + <name>isswitch</name>
  655 + <type>Integer</type>
  656 + <format/>
  657 + </field>
  658 + <field>
  659 + <name>error_count</name>
  660 + <type>Integer</type>
  661 + <format/>
  662 + </field>
  663 + <field>
  664 + <name>error_desc</name>
  665 + <type>String</type>
  666 + <format/>
  667 + </field>
  668 + <field>
  669 + <name>error_column1</name>
  670 + <type>String</type>
  671 + <format/>
  672 + </field>
  673 + <field>
  674 + <name>error_column2</name>
  675 + <type>String</type>
  676 + <format/>
  677 + </field>
  678 + </fields>
  679 + <custom>
  680 + <header_font_name>arial</header_font_name>
  681 + <header_font_size>10</header_font_size>
  682 + <header_font_bold>N</header_font_bold>
  683 + <header_font_italic>N</header_font_italic>
  684 + <header_font_underline>no</header_font_underline>
  685 + <header_font_orientation>horizontal</header_font_orientation>
  686 + <header_font_color>black</header_font_color>
  687 + <header_background_color>none</header_background_color>
  688 + <header_row_height>255</header_row_height>
  689 + <header_alignment>left</header_alignment>
  690 + <header_image/>
  691 + <row_font_name>arial</row_font_name>
  692 + <row_font_size>10</row_font_size>
  693 + <row_font_color>black</row_font_color>
  694 + <row_background_color>none</row_background_color>
  695 + </custom>
  696 + <cluster_schema/>
  697 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  698 + <xloc>718</xloc>
  699 + <yloc>314</yloc>
  700 + <draw>Y</draw>
  701 + </GUI>
  702 + </step>
  703 +
  704 + <step>
  705 + <name>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</name>
  706 + <type>GetVariable</type>
  707 + <description/>
  708 + <distribute>Y</distribute>
  709 + <custom_distribution/>
  710 + <copies>1</copies>
  711 + <partitioning>
  712 + <method>none</method>
  713 + <schema_name/>
  714 + </partitioning>
  715 + <fields>
  716 + <field>
  717 + <name>filepath_</name>
  718 + <variable>&#x24;&#x7b;filepath&#x7d;</variable>
  719 + <type>String</type>
  720 + <format/>
  721 + <currency/>
  722 + <decimal/>
  723 + <group/>
  724 + <length>-1</length>
  725 + <precision>-1</precision>
  726 + <trim_type>none</trim_type>
  727 + </field>
  728 + <field>
  729 + <name>erroroutputdir_</name>
  730 + <variable>&#x24;&#x7b;erroroutputdir&#x7d;</variable>
  731 + <type>String</type>
  732 + <format/>
  733 + <currency/>
  734 + <decimal/>
  735 + <group/>
  736 + <length>-1</length>
  737 + <precision>-1</precision>
  738 + <trim_type>none</trim_type>
  739 + </field>
  740 + </fields>
  741 + <cluster_schema/>
  742 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  743 + <xloc>156</xloc>
  744 + <yloc>150</yloc>
  745 + <draw>Y</draw>
  746 + </GUI>
  747 + </step>
  748 +
  749 + <step_error_handling>
  750 + <error>
  751 + <source_step>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_ccinfo</source_step>
  752 + <target_step>&#x9519;&#x8bef;&#x8f93;&#x51fa;</target_step>
  753 + <is_enabled>Y</is_enabled>
  754 + <nr_valuename>error_count</nr_valuename>
  755 + <descriptions_valuename>error_desc</descriptions_valuename>
  756 + <fields_valuename>error_column1</fields_valuename>
  757 + <codes_valuename>error_column2</codes_valuename>
  758 + <max_errors/>
  759 + <max_pct_errors/>
  760 + <min_pct_rows/>
  761 + </error>
  762 + </step_error_handling>
  763 + <slave-step-copy-partition-distribution>
  764 +</slave-step-copy-partition-distribution>
  765 + <slave_transformation>N</slave_transformation>
  766 +
  767 +</transformation>
... ...
src/main/resources/datatools/ktrs/carsDataInput.ktr
... ... @@ -930,8 +930,14 @@
930 930 <schema/>
931 931 <table>bsth_c_cars</table>
932 932 <key>
933   - <name>insideCode</name>
934   - <field>inside_code</field>
  933 + <name>businessCode</name>
  934 + <field>business_code</field>
  935 + <condition>&#x3d;</condition>
  936 + <name2/>
  937 + </key>
  938 + <key>
  939 + <name>carPlate</name>
  940 + <field>car_plate</field>
935 941 <condition>&#x3d;</condition>
936 942 <name2/>
937 943 </key>
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/busConfig.js
... ... @@ -61,7 +61,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;BusConfigService&#39;, [&#39;BusConfigService_g&#39;,
61 61  
62 62 }]);
63 63  
64   -angular.module('ScheduleApp').controller('BusConfigCtrl', ['BusConfigService', '$state', function(busConfigService, $state) {
  64 +angular.module('ScheduleApp').controller('BusConfigCtrl', ['BusConfigService', '$state', '$uibModal', function(busConfigService, $state, $uibModal) {
65 65 var self = this;
66 66  
67 67 // 切换到form状态
... ... @@ -69,6 +69,68 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;BusConfigCtrl&#39;, [&#39;BusConfigService&#39;, &#39;
69 69 //alert("切换");
70 70 $state.go("busConfig_form");
71 71 }
  72 +
  73 + // 导入excel
  74 + self.importData = function() {
  75 + // large方式弹出模态对话框
  76 + var modalInstance = $uibModal.open({
  77 + templateUrl: '/pages/scheduleApp/module/core/busConfig/dataImport.html',
  78 + size: "lg",
  79 + animation: true,
  80 + backdrop: 'static',
  81 + resolve: {
  82 + // 可以传值给controller
  83 + },
  84 + windowClass: 'center-modal',
  85 + controller: "BusConfigToolsCtrl",
  86 + controllerAs: "ctrl",
  87 + bindToController: true
  88 + });
  89 + modalInstance.result.then(
  90 + function() {
  91 + console.log("dataImport.html打开");
  92 + },
  93 + function() {
  94 + console.log("dataImport.html消失");
  95 + }
  96 + );
  97 + };
  98 +}]);
  99 +
  100 +angular.module('ScheduleApp').controller('BusConfigToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) {
  101 + var self = this;
  102 + self.data = "TODO";
  103 +
  104 + // 关闭窗口
  105 + self.close = function() {
  106 + $modalInstance.dismiss("cancel");
  107 + };
  108 +
  109 + self.clearInputFile = function() {
  110 + angular.element("input[type='file']").val(null);
  111 + };
  112 +
  113 + // 上传文件组件
  114 + self.uploader = new FileUploader({
  115 + url: "/cci/dataImport",
  116 + filters: [] // 用于过滤文件,比如只允许导入excel
  117 + });
  118 + self.uploader.onAfterAddingFile = function(fileItem)
  119 + {
  120 + console.info('onAfterAddingFile', fileItem);
  121 + console.log(self.uploader.queue.length);
  122 + if (self.uploader.queue.length > 1)
  123 + self.uploader.removeFromQueue(0);
  124 + };
  125 + self.uploader.onSuccessItem = function(fileItem, response, status, headers)
  126 + {
  127 + console.info('onSuccessItem', fileItem, response, status, headers);
  128 + };
  129 + self.uploader.onErrorItem = function(fileItem, response, status, headers)
  130 + {
  131 + console.info('onErrorItem', fileItem, response, status, headers);
  132 + };
  133 +
72 134 }]);
73 135  
74 136 angular.module('ScheduleApp').controller('BusConfigListCtrl', ['BusConfigService', function(busConfigService) {
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/dataExport.html 0 → 100644
src/main/resources/static/pages/scheduleApp/module/core/busConfig/dataImport.html 0 → 100644
  1 +<div class="modal-header">
  2 + <h3 class="modal-title">车辆配置信息excel数据导入</h3>
  3 +</div>
  4 +<div class="modal-body">
  5 + <div class="col-md-6">
  6 + <div class="input-group">
  7 + <input type="file" class="form-control" nv-file-select="" uploader="ctrl.uploader"/>
  8 + <span class="input-group-btn">
  9 + <button type="button" ng-click="ctrl.clearInputFile()" class="btn btn-default">
  10 + <span class="glyphicon glyphicon-trash"></span>
  11 + </button>
  12 + </span>
  13 + </div>
  14 + </div>
  15 +
  16 + <div class="table-scrollable table-scrollable-borderless">
  17 + <table class="table table-hover table-light">
  18 + <thead>
  19 + <tr class="uppercase">
  20 + <th width="50%">文件名</th>
  21 + <th ng-show="ctrl.uploader.isHTML5">大小(M)</th>
  22 + <th ng-show="ctrl.uploader.isHTML5">进度</th>
  23 + <th>状态</th>
  24 + <th>操作</th>
  25 + </tr>
  26 + </thead>
  27 + <tbody>
  28 + <tr ng-repeat="item in ctrl.uploader.queue">
  29 + <td>
  30 + <strong>{{ item.file.name }}</strong>
  31 + </td>
  32 + <td ng-show="ctrl.uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>
  33 + <td ng-show="ctrl.uploader.isHTML5">
  34 + <div class="progress progress-sm" style="margin-bottom: 0;">
  35 + <div class="progress-bar progress-bar-info" role="progressbar"
  36 + ng-style="{ 'width': item.progress + '%' }"></div>
  37 + </div>
  38 + </td>
  39 + <td class="text-center">
  40 + <span ng-show="item.isSuccess" class="text-success">
  41 + <i class="glyphicon glyphicon-ok"></i>
  42 + </span>
  43 + <span ng-show="item.isCancel" class="text-info">
  44 + <i class="glyphicon glyphicon-ban-circle"></i>
  45 + </span>
  46 + <span ng-show="item.isError" class="text-danger">
  47 + <i class="glyphicon glyphicon-remove"></i>
  48 + </span>
  49 + </td>
  50 + <td nowrap>
  51 + <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()"
  52 + ng-disabled="item.isReady || item.isUploading || item.isSuccess">
  53 + <span class="glyphicon glyphicon-upload"></span> 上传
  54 + </button>
  55 + <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()"
  56 + ng-disabled="!item.isUploading">
  57 + <span class="glyphicon glyphicon-ban-circle"></span> 取消
  58 + </button>
  59 + <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
  60 + <span class="glyphicon glyphicon-trash"></span> 删除
  61 + </button>
  62 + </td>
  63 + </tr>
  64 + </tbody>
  65 + </table>
  66 + </div>
  67 +
  68 +</div>
  69 +
  70 +<div class="modal-footer">
  71 + <button class="btn btn-primary" ng-click="ctrl.close()">关闭</button>
  72 +</div>
0 73 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/detail.html
  1 +<h1>TODO</h1>
0 2 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/edit.html
  1 +<h1>TODO</h1>
0 2 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/form.html
  1 +<h1>TODO</h1>
0 2 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/index.html
... ... @@ -40,6 +40,12 @@
40 40 </a>
41 41 <ul class="dropdown-menu pull-right">
42 42 <li>
  43 + <a href="javascript:" class="tool-action" ng-click="ctrl.importData()">
  44 + <i class="fa fa-file-excel-o"></i>
  45 + 导入excel
  46 + </a>
  47 + </li>
  48 + <li>
43 49 <a href="javascript:" class="tool-action">
44 50 <i class="fa fa-file-excel-o"></i>
45 51 导出excel
... ... @@ -48,8 +54,8 @@
48 54 <li class="divider"></li>
49 55 <li>
50 56 <a href="javascript:" class="tool-action">
51   - <i class="fa fa-refresh"></i>
52   - 刷行数据
  57 + <i class="fa fa-download"></i>
  58 + excel模版
53 59 </a>
54 60 </li>
55 61 </ul>
... ...
src/main/resources/static/pages/scheduleApp/module/main.js
... ... @@ -304,6 +304,7 @@ ScheduleApp.config([&#39;$stateProvider&#39;, &#39;$urlRouterProvider&#39;, function($stateProvi
304 304 name: 'busConfig_module',
305 305 insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
306 306 files: [
  307 + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js",
307 308 "pages/scheduleApp/module/core/busConfig/busConfig.js"
308 309 ]
309 310 });
... ...