12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145 |
- <?xml version="1.0" encoding="UTF-8"?>
- <transformation>
- <info>
- <name>采购到货单主表数据同步</name>
- <description/>
- <extended_description/>
- <trans_version/>
- <trans_type>Normal</trans_type>
- <trans_status>0</trans_status>
- <directory>/</directory>
- <parameters>
- </parameters>
- <log>
- <trans-log-table>
- <connection/>
- <schema/>
- <table/>
- <size_limit_lines/>
- <interval/>
- <timeout_days/>
- <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>
- <perf-log-table>
- <connection/>
- <schema/>
- <table/>
- <interval/>
- <timeout_days/>
- <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>
- <channel-log-table>
- <connection/>
- <schema/>
- <table/>
- <timeout_days/>
- <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>
- <step-log-table>
- <connection/>
- <schema/>
- <table/>
- <timeout_days/>
- <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>
- <metrics-log-table>
- <connection/>
- <schema/>
- <table/>
- <timeout_days/>
- <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>
- </log>
- <maxdate>
- <connection/>
- <table/>
- <field/>
- <offset>0.0</offset>
- <maxdiff>0.0</maxdiff>
- </maxdate>
- <size_rowset>10000</size_rowset>
- <sleep_time_empty>50</sleep_time_empty>
- <sleep_time_full>50</sleep_time_full>
- <unique_connections>N</unique_connections>
- <feedback_shown>Y</feedback_shown>
- <feedback_size>50000</feedback_size>
- <using_thread_priorities>Y</using_thread_priorities>
- <shared_objects_file/>
- <capture_step_performance>N</capture_step_performance>
- <step_performance_capturing_delay>1000</step_performance_capturing_delay>
- <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
- <dependencies>
- </dependencies>
- <partitionschemas>
- </partitionschemas>
- <slaveservers>
- </slaveservers>
- <clusterschemas>
- </clusterschemas>
- <created_user>-</created_user>
- <created_date>2024/01/09 15:07:19.021</created_date>
- <modified_user>-</modified_user>
- <modified_date>2024/01/09 15:07:19.021</modified_date>
- <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
- <is_key_private>N</is_key_private>
- </info>
- <notepads>
- </notepads>
- <connection>
- <name>MOM</name>
- <server>${MOMDB_HOST}</server>
- <type>MYSQL</type>
- <access>Native</access>
- <database>${MOMDB_NAME}</database>
- <port>3306</port>
- <username>${MOMDB_USER}</username>
- <password>${MOMDB_PASSWORD}</password>
- <servername/>
- <data_tablespace/>
- <index_tablespace/>
- <attributes>
- <attribute>
- <code>EXTRA_OPTION_MYSQL.characterEncoding</code>
- <attribute>utf-8</attribute>
- </attribute>
- <attribute>
- <code>EXTRA_OPTION_MYSQL.defaultFetchSize</code>
- <attribute>5000</attribute>
- </attribute>
- <attribute>
- <code>EXTRA_OPTION_MYSQL.rewriteBatchedStatements</code>
- <attribute>true</attribute>
- </attribute>
- <attribute>
- <code>EXTRA_OPTION_MYSQL.useCompression</code>
- <attribute>true</attribute>
- </attribute>
- <attribute>
- <code>EXTRA_OPTION_MYSQL.useCursorFetch</code>
- <attribute>true</attribute>
- </attribute>
- <attribute>
- <code>EXTRA_OPTION_MYSQL.useServerPrepStmts</code>
- <attribute>true</attribute>
- </attribute>
- <attribute>
- <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>IS_CLUSTERED</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>PORT_NUMBER</code>
- <attribute>3306</attribute>
- </attribute>
- <attribute>
- <code>PRESERVE_RESERVED_WORD_CASE</code>
- <attribute>Y</attribute>
- </attribute>
- <attribute>
- <code>QUOTE_ALL_FIELDS</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>STREAM_RESULTS</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
- <attribute>Y</attribute>
- </attribute>
- <attribute>
- <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
- <attribute>Y</attribute>
- </attribute>
- <attribute>
- <code>USE_POOLING</code>
- <attribute>N</attribute>
- </attribute>
- </attributes>
- </connection>
- <connection>
- <name>U8</name>
- <server>${U8DB_HOST}</server>
- <type>MSSQL</type>
- <access>Native</access>
- <database>${U8DB_NAME}</database>
- <port>1433</port>
- <username>${U8DB_USER}</username>
- <password>${U8DB_PASSWORD}</password>
- <servername/>
- <data_tablespace/>
- <index_tablespace/>
- <attributes>
- <attribute>
- <code>EXTRA_OPTION_MSSQL.instance</code>
- <attribute>dbo</attribute>
- </attribute>
- <attribute>
- <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>IS_CLUSTERED</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>MSSQL_DOUBLE_DECIMAL_SEPARATOR</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>PORT_NUMBER</code>
- <attribute>1433</attribute>
- </attribute>
- <attribute>
- <code>PRESERVE_RESERVED_WORD_CASE</code>
- <attribute>Y</attribute>
- </attribute>
- <attribute>
- <code>QUOTE_ALL_FIELDS</code>
- <attribute>N</attribute>
- </attribute>
- <attribute>
- <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
- <attribute>Y</attribute>
- </attribute>
- <attribute>
- <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
- <attribute>Y</attribute>
- </attribute>
- <attribute>
- <code>USE_POOLING</code>
- <attribute>N</attribute>
- </attribute>
- </attributes>
- </connection>
- <order>
- <hop>
- <from>插入 / 更新</from>
- <to>复制记录到结果</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>Java 代码-id</from>
- <to>插入 / 更新</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>表输入</from>
- <to>Java 代码-id</to>
- <enabled>Y</enabled>
- </hop>
- </order>
- <step>
- <name>Java 代码-id</name>
- <type>UserDefinedJavaClass</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <definitions>
- <definition>
- <class_type>TRANSFORM_CLASS</class_type>
- <class_name>Processor</class_name>
- <class_source>//import com.cath.set.util.CodeRuleUtil;
- import com.cath.util.SnowflakeIdWorkerUtil;
- SnowflakeIdWorkerUtil snowflakeIdWorkerUtil = new SnowflakeIdWorkerUtil(3, 5, 5);
- public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
- if (first) {
- first = false;
- }
- Object[] r = getRow();
- if (r == null) {
- setOutputDone();
- return false;
- }
- r = createOutputRow(r, data.outputRowMeta.size());
- //String taskCode = get(Fields.In, "interface_code").getString(r);
- //get(Fields.Out, "task_code").setValue(r, taskCode);
- String id = String.valueOf(snowflakeIdWorkerUtil.nextId());
- get(Fields.Out, "id").setValue(r, id);
- putRow(data.outputRowMeta, r);
- return true;
- }
- </class_source>
- </definition>
- </definitions>
- <fields>
- <field>
- <field_name>id</field_name>
- <field_type>String</field_type>
- <field_length>-1</field_length>
- <field_precision>-1</field_precision>
- </field>
- </fields>
- <clear_result_fields>N</clear_result_fields>
- <info_steps/>
- <target_steps/>
- <usage_parameters/>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>304</xloc>
- <yloc>128</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>复制记录到结果</name>
- <type>RowsToResult</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>608</xloc>
- <yloc>128</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>插入 / 更新</name>
- <type>InsertUpdate</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>MOM</connection>
- <commit>1000</commit>
- <update_bypassed>Y</update_bypassed>
- <lookup>
- <schema/>
- <table>wms_task_in</table>
- <key>
- <name>interface_id</name>
- <field>interface_id</field>
- <condition>=</condition>
- <name2/>
- </key>
- <key>
- <name>bill_type</name>
- <field>bill_type</field>
- <condition>=</condition>
- <name2/>
- </key>
- <value>
- <name>interface_id</name>
- <rename>interface_id</rename>
- <update>N</update>
- </value>
- <value>
- <name>interface_code</name>
- <rename>interface_code</rename>
- <update>N</update>
- </value>
- <value>
- <name>id</name>
- <rename>id</rename>
- <update>N</update>
- </value>
- <value>
- <name>bill_type</name>
- <rename>bill_type</rename>
- <update>N</update>
- </value>
- <value>
- <name>task_type</name>
- <rename>task_type</rename>
- <update>N</update>
- </value>
- <value>
- <name>task_date</name>
- <rename>task_date</rename>
- <update>N</update>
- </value>
- <value>
- <name>task_code</name>
- <rename>task_code</rename>
- <update>N</update>
- </value>
- <value>
- <name>dept_code</name>
- <rename>dept_code</rename>
- <update>N</update>
- </value>
- <value>
- <name>employee_code</name>
- <rename>employee_code</rename>
- <update>N</update>
- </value>
- <value>
- <name>supplier_code</name>
- <rename>supplier_code</rename>
- <update>N</update>
- </value>
- <value>
- <name>create_id</name>
- <rename>sync_id</rename>
- <update>N</update>
- </value>
- <value>
- <name>create_by</name>
- <rename>sync_name</rename>
- <update>N</update>
- </value>
- <value>
- <name>create_time</name>
- <rename>sync_time</rename>
- <update>N</update>
- </value>
- </lookup>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>448</xloc>
- <yloc>128</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>表输入</name>
- <type>TableInput</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>U8</connection>
- <sql>DECLARE @USER_NAME VARCHAR(50),@USER_ID INT,@BEGIN_DATE DATE,@END_DATE DATE
- SET @USER_NAME = CASE '${USER_NAME}' WHEN '' THEN '管理员(kettle)' ELSE '${USER_NAME}' END
- SET @USER_ID = CASE 0${USER_ID} WHEN 0 THEN 1 ELSE 0${USER_ID} END
- SET @BEGIN_DATE = CASE '${BEGIN_DATE}' WHEN '' THEN CONVERT(VARCHAR(100), GETDATE(), 23) ELSE '${BEGIN_DATE}' END
- SET @END_DATE = CASE '${BEGIN_DATE}' WHEN '' THEN CONVERT(VARCHAR(100), GETDATE(), 23) ELSE '${END_DATE}' END
- SELECT
- T1.ID AS interface_id
- ,T1.cCode AS interface_code
- ,1 AS task_type --1入库、-1入库退、-1出库、1出库退
- ,5 AS bill_type --1生产订单、2委外订单、3委外到货单、4采购订单、5采购到货单、6销售订单、7销售发货单
- ,'IT5-'+T1.cCode AS task_code
- ,CONVERT(DATE,T1.dDate) AS task_date
- ,T1.cDepCode AS dept_code
- ,T1.cPersonCode AS employee_code
- ,T1.cVenCode AS supplier_code
- ,@USER_NAME AS sync_name
- ,@USER_ID AS sync_id
- ,GETDATE() AS sync_time
- FROM PU_ArrivalVouch T1
- WHERE 1=1
- AND T1.iBillType =0 --1退货、0到货
- AND T1.cBusType ='普通采购'
- AND ISNULL(T1.cverifier,'') <>''
- AND EXISTS(SELECT 1 FROM PU_ArrivalVouchs T WHERE ID =T1.ID AND ISNULL(fValidInQuan,0) =0)
- AND CONVERT(DATE,T1.dDate) BETWEEN @BEGIN_DATE AND @END_DATE
- </sql>
- <limit>0</limit>
- <lookup/>
- <execute_each_row>N</execute_each_row>
- <variables_active>Y</variables_active>
- <lazy_conversion_active>N</lazy_conversion_active>
- <cached_row_meta_active>N</cached_row_meta_active>
- <row-meta>
- <value-meta>
- <type>Integer</type>
- <storagetype>normal</storagetype>
- <name>interface_id</name>
- <length>9</length>
- <precision>0</precision>
- <origin>表输入</origin>
- <comments>interface_id</comments>
- <conversion_Mask>####0;-####0</conversion_Mask>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>String</type>
- <storagetype>normal</storagetype>
- <name>interface_code</name>
- <length>30</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>interface_code</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>Integer</type>
- <storagetype>normal</storagetype>
- <name>task_type</name>
- <length>9</length>
- <precision>0</precision>
- <origin>表输入</origin>
- <comments>task_type</comments>
- <conversion_Mask>####0;-####0</conversion_Mask>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>Integer</type>
- <storagetype>normal</storagetype>
- <name>bill_type</name>
- <length>9</length>
- <precision>0</precision>
- <origin>表输入</origin>
- <comments>bill_type</comments>
- <conversion_Mask>####0;-####0</conversion_Mask>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>String</type>
- <storagetype>normal</storagetype>
- <name>task_code</name>
- <length>34</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>task_code</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>String</type>
- <storagetype>normal</storagetype>
- <name>task_date</name>
- <length>10</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>task_date</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>String</type>
- <storagetype>normal</storagetype>
- <name>dept_code</name>
- <length>12</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>dept_code</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>String</type>
- <storagetype>normal</storagetype>
- <name>employee_code</name>
- <length>20</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>employee_code</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>String</type>
- <storagetype>normal</storagetype>
- <name>supplier_code</name>
- <length>20</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>supplier_code</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>String</type>
- <storagetype>normal</storagetype>
- <name>sync_name</name>
- <length>6</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>sync_name</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>Integer</type>
- <storagetype>normal</storagetype>
- <name>sync_id</name>
- <length>9</length>
- <precision>0</precision>
- <origin>表输入</origin>
- <comments>sync_id</comments>
- <conversion_Mask>####0;-####0</conversion_Mask>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- <value-meta>
- <type>Timestamp</type>
- <storagetype>normal</storagetype>
- <name>sync_time</name>
- <length>3</length>
- <precision>-1</precision>
- <origin>表输入</origin>
- <comments>sync_time</comments>
- <conversion_Mask/>
- <decimal_symbol>.</decimal_symbol>
- <grouping_symbol>,</grouping_symbol>
- <currency_symbol/>
- <trim_type>none</trim_type>
- <case_insensitive>N</case_insensitive>
- <collator_disabled>Y</collator_disabled>
- <collator_strength>0</collator_strength>
- <sort_descending>N</sort_descending>
- <output_padding>N</output_padding>
- <date_format_lenient>N</date_format_lenient>
- <date_format_locale>zh_CN</date_format_locale>
- <date_format_timezone>Asia/Shanghai</date_format_timezone>
- <lenient_string_to_number>N</lenient_string_to_number>
- </value-meta>
- </row-meta>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>144</xloc>
- <yloc>128</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step_error_handling>
- </step_error_handling>
- <slave-step-copy-partition-distribution>
- </slave-step-copy-partition-distribution>
- <slave_transformation>N</slave_transformation>
- <attributes/>
- </transformation>
|