采购退货单主表数据同步.ktr 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <transformation>
  3. <info>
  4. <name>采购退货单主表数据同步</name>
  5. <description/>
  6. <extended_description/>
  7. <trans_version/>
  8. <trans_type>Normal</trans_type>
  9. <trans_status>0</trans_status>
  10. <directory>/</directory>
  11. <parameters>
  12. </parameters>
  13. <log>
  14. <trans-log-table>
  15. <connection/>
  16. <schema/>
  17. <table/>
  18. <size_limit_lines/>
  19. <interval/>
  20. <timeout_days/>
  21. <field>
  22. <id>ID_BATCH</id>
  23. <enabled>Y</enabled>
  24. <name>ID_BATCH</name>
  25. </field>
  26. <field>
  27. <id>CHANNEL_ID</id>
  28. <enabled>Y</enabled>
  29. <name>CHANNEL_ID</name>
  30. </field>
  31. <field>
  32. <id>TRANSNAME</id>
  33. <enabled>Y</enabled>
  34. <name>TRANSNAME</name>
  35. </field>
  36. <field>
  37. <id>STATUS</id>
  38. <enabled>Y</enabled>
  39. <name>STATUS</name>
  40. </field>
  41. <field>
  42. <id>LINES_READ</id>
  43. <enabled>Y</enabled>
  44. <name>LINES_READ</name>
  45. <subject/>
  46. </field>
  47. <field>
  48. <id>LINES_WRITTEN</id>
  49. <enabled>Y</enabled>
  50. <name>LINES_WRITTEN</name>
  51. <subject/>
  52. </field>
  53. <field>
  54. <id>LINES_UPDATED</id>
  55. <enabled>Y</enabled>
  56. <name>LINES_UPDATED</name>
  57. <subject/>
  58. </field>
  59. <field>
  60. <id>LINES_INPUT</id>
  61. <enabled>Y</enabled>
  62. <name>LINES_INPUT</name>
  63. <subject/>
  64. </field>
  65. <field>
  66. <id>LINES_OUTPUT</id>
  67. <enabled>Y</enabled>
  68. <name>LINES_OUTPUT</name>
  69. <subject/>
  70. </field>
  71. <field>
  72. <id>LINES_REJECTED</id>
  73. <enabled>Y</enabled>
  74. <name>LINES_REJECTED</name>
  75. <subject/>
  76. </field>
  77. <field>
  78. <id>ERRORS</id>
  79. <enabled>Y</enabled>
  80. <name>ERRORS</name>
  81. </field>
  82. <field>
  83. <id>STARTDATE</id>
  84. <enabled>Y</enabled>
  85. <name>STARTDATE</name>
  86. </field>
  87. <field>
  88. <id>ENDDATE</id>
  89. <enabled>Y</enabled>
  90. <name>ENDDATE</name>
  91. </field>
  92. <field>
  93. <id>LOGDATE</id>
  94. <enabled>Y</enabled>
  95. <name>LOGDATE</name>
  96. </field>
  97. <field>
  98. <id>DEPDATE</id>
  99. <enabled>Y</enabled>
  100. <name>DEPDATE</name>
  101. </field>
  102. <field>
  103. <id>REPLAYDATE</id>
  104. <enabled>Y</enabled>
  105. <name>REPLAYDATE</name>
  106. </field>
  107. <field>
  108. <id>LOG_FIELD</id>
  109. <enabled>Y</enabled>
  110. <name>LOG_FIELD</name>
  111. </field>
  112. <field>
  113. <id>EXECUTING_SERVER</id>
  114. <enabled>N</enabled>
  115. <name>EXECUTING_SERVER</name>
  116. </field>
  117. <field>
  118. <id>EXECUTING_USER</id>
  119. <enabled>N</enabled>
  120. <name>EXECUTING_USER</name>
  121. </field>
  122. <field>
  123. <id>CLIENT</id>
  124. <enabled>N</enabled>
  125. <name>CLIENT</name>
  126. </field>
  127. </trans-log-table>
  128. <perf-log-table>
  129. <connection/>
  130. <schema/>
  131. <table/>
  132. <interval/>
  133. <timeout_days/>
  134. <field>
  135. <id>ID_BATCH</id>
  136. <enabled>Y</enabled>
  137. <name>ID_BATCH</name>
  138. </field>
  139. <field>
  140. <id>SEQ_NR</id>
  141. <enabled>Y</enabled>
  142. <name>SEQ_NR</name>
  143. </field>
  144. <field>
  145. <id>LOGDATE</id>
  146. <enabled>Y</enabled>
  147. <name>LOGDATE</name>
  148. </field>
  149. <field>
  150. <id>TRANSNAME</id>
  151. <enabled>Y</enabled>
  152. <name>TRANSNAME</name>
  153. </field>
  154. <field>
  155. <id>STEPNAME</id>
  156. <enabled>Y</enabled>
  157. <name>STEPNAME</name>
  158. </field>
  159. <field>
  160. <id>STEP_COPY</id>
  161. <enabled>Y</enabled>
  162. <name>STEP_COPY</name>
  163. </field>
  164. <field>
  165. <id>LINES_READ</id>
  166. <enabled>Y</enabled>
  167. <name>LINES_READ</name>
  168. </field>
  169. <field>
  170. <id>LINES_WRITTEN</id>
  171. <enabled>Y</enabled>
  172. <name>LINES_WRITTEN</name>
  173. </field>
  174. <field>
  175. <id>LINES_UPDATED</id>
  176. <enabled>Y</enabled>
  177. <name>LINES_UPDATED</name>
  178. </field>
  179. <field>
  180. <id>LINES_INPUT</id>
  181. <enabled>Y</enabled>
  182. <name>LINES_INPUT</name>
  183. </field>
  184. <field>
  185. <id>LINES_OUTPUT</id>
  186. <enabled>Y</enabled>
  187. <name>LINES_OUTPUT</name>
  188. </field>
  189. <field>
  190. <id>LINES_REJECTED</id>
  191. <enabled>Y</enabled>
  192. <name>LINES_REJECTED</name>
  193. </field>
  194. <field>
  195. <id>ERRORS</id>
  196. <enabled>Y</enabled>
  197. <name>ERRORS</name>
  198. </field>
  199. <field>
  200. <id>INPUT_BUFFER_ROWS</id>
  201. <enabled>Y</enabled>
  202. <name>INPUT_BUFFER_ROWS</name>
  203. </field>
  204. <field>
  205. <id>OUTPUT_BUFFER_ROWS</id>
  206. <enabled>Y</enabled>
  207. <name>OUTPUT_BUFFER_ROWS</name>
  208. </field>
  209. </perf-log-table>
  210. <channel-log-table>
  211. <connection/>
  212. <schema/>
  213. <table/>
  214. <timeout_days/>
  215. <field>
  216. <id>ID_BATCH</id>
  217. <enabled>Y</enabled>
  218. <name>ID_BATCH</name>
  219. </field>
  220. <field>
  221. <id>CHANNEL_ID</id>
  222. <enabled>Y</enabled>
  223. <name>CHANNEL_ID</name>
  224. </field>
  225. <field>
  226. <id>LOG_DATE</id>
  227. <enabled>Y</enabled>
  228. <name>LOG_DATE</name>
  229. </field>
  230. <field>
  231. <id>LOGGING_OBJECT_TYPE</id>
  232. <enabled>Y</enabled>
  233. <name>LOGGING_OBJECT_TYPE</name>
  234. </field>
  235. <field>
  236. <id>OBJECT_NAME</id>
  237. <enabled>Y</enabled>
  238. <name>OBJECT_NAME</name>
  239. </field>
  240. <field>
  241. <id>OBJECT_COPY</id>
  242. <enabled>Y</enabled>
  243. <name>OBJECT_COPY</name>
  244. </field>
  245. <field>
  246. <id>REPOSITORY_DIRECTORY</id>
  247. <enabled>Y</enabled>
  248. <name>REPOSITORY_DIRECTORY</name>
  249. </field>
  250. <field>
  251. <id>FILENAME</id>
  252. <enabled>Y</enabled>
  253. <name>FILENAME</name>
  254. </field>
  255. <field>
  256. <id>OBJECT_ID</id>
  257. <enabled>Y</enabled>
  258. <name>OBJECT_ID</name>
  259. </field>
  260. <field>
  261. <id>OBJECT_REVISION</id>
  262. <enabled>Y</enabled>
  263. <name>OBJECT_REVISION</name>
  264. </field>
  265. <field>
  266. <id>PARENT_CHANNEL_ID</id>
  267. <enabled>Y</enabled>
  268. <name>PARENT_CHANNEL_ID</name>
  269. </field>
  270. <field>
  271. <id>ROOT_CHANNEL_ID</id>
  272. <enabled>Y</enabled>
  273. <name>ROOT_CHANNEL_ID</name>
  274. </field>
  275. </channel-log-table>
  276. <step-log-table>
  277. <connection/>
  278. <schema/>
  279. <table/>
  280. <timeout_days/>
  281. <field>
  282. <id>ID_BATCH</id>
  283. <enabled>Y</enabled>
  284. <name>ID_BATCH</name>
  285. </field>
  286. <field>
  287. <id>CHANNEL_ID</id>
  288. <enabled>Y</enabled>
  289. <name>CHANNEL_ID</name>
  290. </field>
  291. <field>
  292. <id>LOG_DATE</id>
  293. <enabled>Y</enabled>
  294. <name>LOG_DATE</name>
  295. </field>
  296. <field>
  297. <id>TRANSNAME</id>
  298. <enabled>Y</enabled>
  299. <name>TRANSNAME</name>
  300. </field>
  301. <field>
  302. <id>STEPNAME</id>
  303. <enabled>Y</enabled>
  304. <name>STEPNAME</name>
  305. </field>
  306. <field>
  307. <id>STEP_COPY</id>
  308. <enabled>Y</enabled>
  309. <name>STEP_COPY</name>
  310. </field>
  311. <field>
  312. <id>LINES_READ</id>
  313. <enabled>Y</enabled>
  314. <name>LINES_READ</name>
  315. </field>
  316. <field>
  317. <id>LINES_WRITTEN</id>
  318. <enabled>Y</enabled>
  319. <name>LINES_WRITTEN</name>
  320. </field>
  321. <field>
  322. <id>LINES_UPDATED</id>
  323. <enabled>Y</enabled>
  324. <name>LINES_UPDATED</name>
  325. </field>
  326. <field>
  327. <id>LINES_INPUT</id>
  328. <enabled>Y</enabled>
  329. <name>LINES_INPUT</name>
  330. </field>
  331. <field>
  332. <id>LINES_OUTPUT</id>
  333. <enabled>Y</enabled>
  334. <name>LINES_OUTPUT</name>
  335. </field>
  336. <field>
  337. <id>LINES_REJECTED</id>
  338. <enabled>Y</enabled>
  339. <name>LINES_REJECTED</name>
  340. </field>
  341. <field>
  342. <id>ERRORS</id>
  343. <enabled>Y</enabled>
  344. <name>ERRORS</name>
  345. </field>
  346. <field>
  347. <id>LOG_FIELD</id>
  348. <enabled>N</enabled>
  349. <name>LOG_FIELD</name>
  350. </field>
  351. </step-log-table>
  352. <metrics-log-table>
  353. <connection/>
  354. <schema/>
  355. <table/>
  356. <timeout_days/>
  357. <field>
  358. <id>ID_BATCH</id>
  359. <enabled>Y</enabled>
  360. <name>ID_BATCH</name>
  361. </field>
  362. <field>
  363. <id>CHANNEL_ID</id>
  364. <enabled>Y</enabled>
  365. <name>CHANNEL_ID</name>
  366. </field>
  367. <field>
  368. <id>LOG_DATE</id>
  369. <enabled>Y</enabled>
  370. <name>LOG_DATE</name>
  371. </field>
  372. <field>
  373. <id>METRICS_DATE</id>
  374. <enabled>Y</enabled>
  375. <name>METRICS_DATE</name>
  376. </field>
  377. <field>
  378. <id>METRICS_CODE</id>
  379. <enabled>Y</enabled>
  380. <name>METRICS_CODE</name>
  381. </field>
  382. <field>
  383. <id>METRICS_DESCRIPTION</id>
  384. <enabled>Y</enabled>
  385. <name>METRICS_DESCRIPTION</name>
  386. </field>
  387. <field>
  388. <id>METRICS_SUBJECT</id>
  389. <enabled>Y</enabled>
  390. <name>METRICS_SUBJECT</name>
  391. </field>
  392. <field>
  393. <id>METRICS_TYPE</id>
  394. <enabled>Y</enabled>
  395. <name>METRICS_TYPE</name>
  396. </field>
  397. <field>
  398. <id>METRICS_VALUE</id>
  399. <enabled>Y</enabled>
  400. <name>METRICS_VALUE</name>
  401. </field>
  402. </metrics-log-table>
  403. </log>
  404. <maxdate>
  405. <connection/>
  406. <table/>
  407. <field/>
  408. <offset>0.0</offset>
  409. <maxdiff>0.0</maxdiff>
  410. </maxdate>
  411. <size_rowset>10000</size_rowset>
  412. <sleep_time_empty>50</sleep_time_empty>
  413. <sleep_time_full>50</sleep_time_full>
  414. <unique_connections>N</unique_connections>
  415. <feedback_shown>Y</feedback_shown>
  416. <feedback_size>50000</feedback_size>
  417. <using_thread_priorities>Y</using_thread_priorities>
  418. <shared_objects_file/>
  419. <capture_step_performance>N</capture_step_performance>
  420. <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  421. <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  422. <dependencies>
  423. </dependencies>
  424. <partitionschemas>
  425. </partitionschemas>
  426. <slaveservers>
  427. </slaveservers>
  428. <clusterschemas>
  429. </clusterschemas>
  430. <created_user>-</created_user>
  431. <created_date>2024/01/09 15:07:19.021</created_date>
  432. <modified_user>-</modified_user>
  433. <modified_date>2024/01/09 15:07:19.021</modified_date>
  434. <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
  435. <is_key_private>N</is_key_private>
  436. </info>
  437. <notepads>
  438. </notepads>
  439. <connection>
  440. <name>MOM</name>
  441. <server>${MOMDB_HOST}</server>
  442. <type>MYSQL</type>
  443. <access>Native</access>
  444. <database>${MOMDB_NAME}</database>
  445. <port>3306</port>
  446. <username>${MOMDB_USER}</username>
  447. <password>${MOMDB_PASSWORD}</password>
  448. <servername/>
  449. <data_tablespace/>
  450. <index_tablespace/>
  451. <attributes>
  452. <attribute>
  453. <code>EXTRA_OPTION_MYSQL.characterEncoding</code>
  454. <attribute>utf-8</attribute>
  455. </attribute>
  456. <attribute>
  457. <code>EXTRA_OPTION_MYSQL.defaultFetchSize</code>
  458. <attribute>5000</attribute>
  459. </attribute>
  460. <attribute>
  461. <code>EXTRA_OPTION_MYSQL.rewriteBatchedStatements</code>
  462. <attribute>true</attribute>
  463. </attribute>
  464. <attribute>
  465. <code>EXTRA_OPTION_MYSQL.useCompression</code>
  466. <attribute>true</attribute>
  467. </attribute>
  468. <attribute>
  469. <code>EXTRA_OPTION_MYSQL.useCursorFetch</code>
  470. <attribute>true</attribute>
  471. </attribute>
  472. <attribute>
  473. <code>EXTRA_OPTION_MYSQL.useServerPrepStmts</code>
  474. <attribute>true</attribute>
  475. </attribute>
  476. <attribute>
  477. <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
  478. <attribute>N</attribute>
  479. </attribute>
  480. <attribute>
  481. <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
  482. <attribute>N</attribute>
  483. </attribute>
  484. <attribute>
  485. <code>IS_CLUSTERED</code>
  486. <attribute>N</attribute>
  487. </attribute>
  488. <attribute>
  489. <code>PORT_NUMBER</code>
  490. <attribute>3306</attribute>
  491. </attribute>
  492. <attribute>
  493. <code>PRESERVE_RESERVED_WORD_CASE</code>
  494. <attribute>Y</attribute>
  495. </attribute>
  496. <attribute>
  497. <code>QUOTE_ALL_FIELDS</code>
  498. <attribute>N</attribute>
  499. </attribute>
  500. <attribute>
  501. <code>STREAM_RESULTS</code>
  502. <attribute>N</attribute>
  503. </attribute>
  504. <attribute>
  505. <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
  506. <attribute>Y</attribute>
  507. </attribute>
  508. <attribute>
  509. <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
  510. <attribute>Y</attribute>
  511. </attribute>
  512. <attribute>
  513. <code>USE_POOLING</code>
  514. <attribute>N</attribute>
  515. </attribute>
  516. </attributes>
  517. </connection>
  518. <connection>
  519. <name>U8</name>
  520. <server>${U8DB_HOST}</server>
  521. <type>MSSQL</type>
  522. <access>Native</access>
  523. <database>${U8DB_NAME}</database>
  524. <port>1433</port>
  525. <username>${U8DB_USER}</username>
  526. <password>${U8DB_PASSWORD}</password>
  527. <servername/>
  528. <data_tablespace/>
  529. <index_tablespace/>
  530. <attributes>
  531. <attribute>
  532. <code>EXTRA_OPTION_MSSQL.instance</code>
  533. <attribute>dbo</attribute>
  534. </attribute>
  535. <attribute>
  536. <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
  537. <attribute>N</attribute>
  538. </attribute>
  539. <attribute>
  540. <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
  541. <attribute>N</attribute>
  542. </attribute>
  543. <attribute>
  544. <code>IS_CLUSTERED</code>
  545. <attribute>N</attribute>
  546. </attribute>
  547. <attribute>
  548. <code>MSSQL_DOUBLE_DECIMAL_SEPARATOR</code>
  549. <attribute>N</attribute>
  550. </attribute>
  551. <attribute>
  552. <code>PORT_NUMBER</code>
  553. <attribute>1433</attribute>
  554. </attribute>
  555. <attribute>
  556. <code>PRESERVE_RESERVED_WORD_CASE</code>
  557. <attribute>Y</attribute>
  558. </attribute>
  559. <attribute>
  560. <code>QUOTE_ALL_FIELDS</code>
  561. <attribute>N</attribute>
  562. </attribute>
  563. <attribute>
  564. <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
  565. <attribute>Y</attribute>
  566. </attribute>
  567. <attribute>
  568. <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
  569. <attribute>Y</attribute>
  570. </attribute>
  571. <attribute>
  572. <code>USE_POOLING</code>
  573. <attribute>N</attribute>
  574. </attribute>
  575. </attributes>
  576. </connection>
  577. <order>
  578. <hop>
  579. <from>插入 / 更新</from>
  580. <to>复制记录到结果</to>
  581. <enabled>Y</enabled>
  582. </hop>
  583. <hop>
  584. <from>Java 代码-id</from>
  585. <to>插入 / 更新</to>
  586. <enabled>Y</enabled>
  587. </hop>
  588. <hop>
  589. <from>表输入</from>
  590. <to>Java 代码-id</to>
  591. <enabled>Y</enabled>
  592. </hop>
  593. </order>
  594. <step>
  595. <name>Java 代码-id</name>
  596. <type>UserDefinedJavaClass</type>
  597. <description/>
  598. <distribute>Y</distribute>
  599. <custom_distribution/>
  600. <copies>1</copies>
  601. <partitioning>
  602. <method>none</method>
  603. <schema_name/>
  604. </partitioning>
  605. <definitions>
  606. <definition>
  607. <class_type>TRANSFORM_CLASS</class_type>
  608. <class_name>Processor</class_name>
  609. <class_source>//import com.cath.set.util.CodeRuleUtil;
  610. import com.cath.util.SnowflakeIdWorkerUtil;
  611. SnowflakeIdWorkerUtil snowflakeIdWorkerUtil = new SnowflakeIdWorkerUtil(3, 5, 5);
  612. public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
  613. if (first) {
  614. first = false;
  615. }
  616. Object[] r = getRow();
  617. if (r == null) {
  618. setOutputDone();
  619. return false;
  620. }
  621. r = createOutputRow(r, data.outputRowMeta.size());
  622. //String taskCode = get(Fields.In, "interface_code").getString(r);
  623. //get(Fields.Out, "task_code").setValue(r, taskCode);
  624. String id = String.valueOf(snowflakeIdWorkerUtil.nextId());
  625. get(Fields.Out, "id").setValue(r, id);
  626. putRow(data.outputRowMeta, r);
  627. return true;
  628. }
  629. </class_source>
  630. </definition>
  631. </definitions>
  632. <fields>
  633. <field>
  634. <field_name>id</field_name>
  635. <field_type>String</field_type>
  636. <field_length>-1</field_length>
  637. <field_precision>-1</field_precision>
  638. </field>
  639. </fields>
  640. <clear_result_fields>N</clear_result_fields>
  641. <info_steps/>
  642. <target_steps/>
  643. <usage_parameters/>
  644. <attributes/>
  645. <cluster_schema/>
  646. <remotesteps>
  647. <input>
  648. </input>
  649. <output>
  650. </output>
  651. </remotesteps>
  652. <GUI>
  653. <xloc>304</xloc>
  654. <yloc>128</yloc>
  655. <draw>Y</draw>
  656. </GUI>
  657. </step>
  658. <step>
  659. <name>复制记录到结果</name>
  660. <type>RowsToResult</type>
  661. <description/>
  662. <distribute>Y</distribute>
  663. <custom_distribution/>
  664. <copies>1</copies>
  665. <partitioning>
  666. <method>none</method>
  667. <schema_name/>
  668. </partitioning>
  669. <attributes/>
  670. <cluster_schema/>
  671. <remotesteps>
  672. <input>
  673. </input>
  674. <output>
  675. </output>
  676. </remotesteps>
  677. <GUI>
  678. <xloc>608</xloc>
  679. <yloc>128</yloc>
  680. <draw>Y</draw>
  681. </GUI>
  682. </step>
  683. <step>
  684. <name>插入 / 更新</name>
  685. <type>InsertUpdate</type>
  686. <description/>
  687. <distribute>Y</distribute>
  688. <custom_distribution/>
  689. <copies>1</copies>
  690. <partitioning>
  691. <method>none</method>
  692. <schema_name/>
  693. </partitioning>
  694. <connection>MOM</connection>
  695. <commit>1000</commit>
  696. <update_bypassed>Y</update_bypassed>
  697. <lookup>
  698. <schema/>
  699. <table>wms_task_in</table>
  700. <key>
  701. <name>interface_id</name>
  702. <field>interface_id</field>
  703. <condition>=</condition>
  704. <name2/>
  705. </key>
  706. <key>
  707. <name>bill_type</name>
  708. <field>bill_type</field>
  709. <condition>=</condition>
  710. <name2/>
  711. </key>
  712. <value>
  713. <name>interface_id</name>
  714. <rename>interface_id</rename>
  715. <update>N</update>
  716. </value>
  717. <value>
  718. <name>interface_code</name>
  719. <rename>interface_code</rename>
  720. <update>N</update>
  721. </value>
  722. <value>
  723. <name>id</name>
  724. <rename>id</rename>
  725. <update>N</update>
  726. </value>
  727. <value>
  728. <name>bill_type</name>
  729. <rename>bill_type</rename>
  730. <update>N</update>
  731. </value>
  732. <value>
  733. <name>task_type</name>
  734. <rename>task_type</rename>
  735. <update>N</update>
  736. </value>
  737. <value>
  738. <name>task_date</name>
  739. <rename>task_date</rename>
  740. <update>N</update>
  741. </value>
  742. <value>
  743. <name>task_code</name>
  744. <rename>task_code</rename>
  745. <update>N</update>
  746. </value>
  747. <value>
  748. <name>dept_code</name>
  749. <rename>dept_code</rename>
  750. <update>N</update>
  751. </value>
  752. <value>
  753. <name>employee_code</name>
  754. <rename>employee_code</rename>
  755. <update>N</update>
  756. </value>
  757. <value>
  758. <name>supplier_code</name>
  759. <rename>supplier_code</rename>
  760. <update>N</update>
  761. </value>
  762. <value>
  763. <name>create_id</name>
  764. <rename>sync_id</rename>
  765. <update>N</update>
  766. </value>
  767. <value>
  768. <name>create_by</name>
  769. <rename>sync_name</rename>
  770. <update>N</update>
  771. </value>
  772. <value>
  773. <name>create_time</name>
  774. <rename>sync_time</rename>
  775. <update>N</update>
  776. </value>
  777. </lookup>
  778. <attributes/>
  779. <cluster_schema/>
  780. <remotesteps>
  781. <input>
  782. </input>
  783. <output>
  784. </output>
  785. </remotesteps>
  786. <GUI>
  787. <xloc>448</xloc>
  788. <yloc>128</yloc>
  789. <draw>Y</draw>
  790. </GUI>
  791. </step>
  792. <step>
  793. <name>表输入</name>
  794. <type>TableInput</type>
  795. <description/>
  796. <distribute>Y</distribute>
  797. <custom_distribution/>
  798. <copies>1</copies>
  799. <partitioning>
  800. <method>none</method>
  801. <schema_name/>
  802. </partitioning>
  803. <connection>U8</connection>
  804. <sql>DECLARE @USER_NAME VARCHAR(50),@USER_ID INT,@BEGIN_DATE DATE,@END_DATE DATE
  805. SET @USER_NAME = CASE '${USER_NAME}' WHEN '' THEN '管理员(kettle)' ELSE '${USER_NAME}' END
  806. SET @USER_ID = CASE 0${USER_ID} WHEN 0 THEN 1 ELSE 0${USER_ID} END
  807. SET @BEGIN_DATE = CASE '${BEGIN_DATE}' WHEN '' THEN CONVERT(VARCHAR(100), GETDATE(), 23) ELSE '${BEGIN_DATE}' END
  808. SET @END_DATE = CASE '${BEGIN_DATE}' WHEN '' THEN CONVERT(VARCHAR(100), GETDATE(), 23) ELSE '${END_DATE}' END
  809. SELECT
  810. T1.ID AS interface_id
  811. ,T1.cCode AS interface_code
  812. ,-1 AS task_type --1入库、-1入库退、-1出库、1出库退
  813. ,5 AS bill_type --1生产订单、2委外订单、3委外到货单、4采购订单、5采购到货单、6销售订单、7销售发货单
  814. ,'ITR5-'+T1.cCode AS task_code
  815. ,CONVERT(DATE,T1.dDate) AS task_date
  816. ,T1.cDepCode AS dept_code
  817. ,T1.cPersonCode AS employee_code
  818. ,T1.cVenCode AS supplier_code
  819. ,@USER_NAME AS sync_name
  820. ,@USER_ID AS sync_id
  821. ,GETDATE() AS sync_time
  822. FROM PU_ArrivalVouch T1
  823. WHERE 1=1
  824. AND T1.iBillType =1 --1退货、0到货
  825. AND T1.cBusType ='普通采购'
  826. AND ISNULL(T1.cverifier,'') &lt;&gt;''
  827. AND EXISTS(SELECT 1 FROM PU_ArrivalVouchs T WHERE ID =T1.ID AND ISNULL(fValidInQuan,0) =0)
  828. AND CONVERT(DATE,T1.dDate) BETWEEN @BEGIN_DATE AND @END_DATE
  829. </sql>
  830. <limit>0</limit>
  831. <lookup/>
  832. <execute_each_row>N</execute_each_row>
  833. <variables_active>Y</variables_active>
  834. <lazy_conversion_active>N</lazy_conversion_active>
  835. <cached_row_meta_active>N</cached_row_meta_active>
  836. <row-meta>
  837. <value-meta>
  838. <type>Integer</type>
  839. <storagetype>normal</storagetype>
  840. <name>interface_id</name>
  841. <length>9</length>
  842. <precision>0</precision>
  843. <origin>表输入</origin>
  844. <comments>interface_id</comments>
  845. <conversion_Mask>####0;-####0</conversion_Mask>
  846. <decimal_symbol>.</decimal_symbol>
  847. <grouping_symbol>,</grouping_symbol>
  848. <currency_symbol/>
  849. <trim_type>none</trim_type>
  850. <case_insensitive>N</case_insensitive>
  851. <collator_disabled>Y</collator_disabled>
  852. <collator_strength>0</collator_strength>
  853. <sort_descending>N</sort_descending>
  854. <output_padding>N</output_padding>
  855. <date_format_lenient>N</date_format_lenient>
  856. <date_format_locale>zh_CN</date_format_locale>
  857. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  858. <lenient_string_to_number>N</lenient_string_to_number>
  859. </value-meta>
  860. <value-meta>
  861. <type>String</type>
  862. <storagetype>normal</storagetype>
  863. <name>interface_code</name>
  864. <length>30</length>
  865. <precision>-1</precision>
  866. <origin>表输入</origin>
  867. <comments>interface_code</comments>
  868. <conversion_Mask/>
  869. <decimal_symbol>.</decimal_symbol>
  870. <grouping_symbol>,</grouping_symbol>
  871. <currency_symbol/>
  872. <trim_type>none</trim_type>
  873. <case_insensitive>N</case_insensitive>
  874. <collator_disabled>Y</collator_disabled>
  875. <collator_strength>0</collator_strength>
  876. <sort_descending>N</sort_descending>
  877. <output_padding>N</output_padding>
  878. <date_format_lenient>N</date_format_lenient>
  879. <date_format_locale>zh_CN</date_format_locale>
  880. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  881. <lenient_string_to_number>N</lenient_string_to_number>
  882. </value-meta>
  883. <value-meta>
  884. <type>Integer</type>
  885. <storagetype>normal</storagetype>
  886. <name>task_type</name>
  887. <length>9</length>
  888. <precision>0</precision>
  889. <origin>表输入</origin>
  890. <comments>task_type</comments>
  891. <conversion_Mask>####0;-####0</conversion_Mask>
  892. <decimal_symbol>.</decimal_symbol>
  893. <grouping_symbol>,</grouping_symbol>
  894. <currency_symbol/>
  895. <trim_type>none</trim_type>
  896. <case_insensitive>N</case_insensitive>
  897. <collator_disabled>Y</collator_disabled>
  898. <collator_strength>0</collator_strength>
  899. <sort_descending>N</sort_descending>
  900. <output_padding>N</output_padding>
  901. <date_format_lenient>N</date_format_lenient>
  902. <date_format_locale>zh_CN</date_format_locale>
  903. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  904. <lenient_string_to_number>N</lenient_string_to_number>
  905. </value-meta>
  906. <value-meta>
  907. <type>Integer</type>
  908. <storagetype>normal</storagetype>
  909. <name>bill_type</name>
  910. <length>9</length>
  911. <precision>0</precision>
  912. <origin>表输入</origin>
  913. <comments>bill_type</comments>
  914. <conversion_Mask>####0;-####0</conversion_Mask>
  915. <decimal_symbol>.</decimal_symbol>
  916. <grouping_symbol>,</grouping_symbol>
  917. <currency_symbol/>
  918. <trim_type>none</trim_type>
  919. <case_insensitive>N</case_insensitive>
  920. <collator_disabled>Y</collator_disabled>
  921. <collator_strength>0</collator_strength>
  922. <sort_descending>N</sort_descending>
  923. <output_padding>N</output_padding>
  924. <date_format_lenient>N</date_format_lenient>
  925. <date_format_locale>zh_CN</date_format_locale>
  926. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  927. <lenient_string_to_number>N</lenient_string_to_number>
  928. </value-meta>
  929. <value-meta>
  930. <type>String</type>
  931. <storagetype>normal</storagetype>
  932. <name>task_code</name>
  933. <length>35</length>
  934. <precision>-1</precision>
  935. <origin>表输入</origin>
  936. <comments>task_code</comments>
  937. <conversion_Mask/>
  938. <decimal_symbol>.</decimal_symbol>
  939. <grouping_symbol>,</grouping_symbol>
  940. <currency_symbol/>
  941. <trim_type>none</trim_type>
  942. <case_insensitive>N</case_insensitive>
  943. <collator_disabled>Y</collator_disabled>
  944. <collator_strength>0</collator_strength>
  945. <sort_descending>N</sort_descending>
  946. <output_padding>N</output_padding>
  947. <date_format_lenient>N</date_format_lenient>
  948. <date_format_locale>zh_CN</date_format_locale>
  949. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  950. <lenient_string_to_number>N</lenient_string_to_number>
  951. </value-meta>
  952. <value-meta>
  953. <type>String</type>
  954. <storagetype>normal</storagetype>
  955. <name>task_date</name>
  956. <length>10</length>
  957. <precision>-1</precision>
  958. <origin>表输入</origin>
  959. <comments>task_date</comments>
  960. <conversion_Mask/>
  961. <decimal_symbol>.</decimal_symbol>
  962. <grouping_symbol>,</grouping_symbol>
  963. <currency_symbol/>
  964. <trim_type>none</trim_type>
  965. <case_insensitive>N</case_insensitive>
  966. <collator_disabled>Y</collator_disabled>
  967. <collator_strength>0</collator_strength>
  968. <sort_descending>N</sort_descending>
  969. <output_padding>N</output_padding>
  970. <date_format_lenient>N</date_format_lenient>
  971. <date_format_locale>zh_CN</date_format_locale>
  972. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  973. <lenient_string_to_number>N</lenient_string_to_number>
  974. </value-meta>
  975. <value-meta>
  976. <type>String</type>
  977. <storagetype>normal</storagetype>
  978. <name>dept_code</name>
  979. <length>12</length>
  980. <precision>-1</precision>
  981. <origin>表输入</origin>
  982. <comments>dept_code</comments>
  983. <conversion_Mask/>
  984. <decimal_symbol>.</decimal_symbol>
  985. <grouping_symbol>,</grouping_symbol>
  986. <currency_symbol/>
  987. <trim_type>none</trim_type>
  988. <case_insensitive>N</case_insensitive>
  989. <collator_disabled>Y</collator_disabled>
  990. <collator_strength>0</collator_strength>
  991. <sort_descending>N</sort_descending>
  992. <output_padding>N</output_padding>
  993. <date_format_lenient>N</date_format_lenient>
  994. <date_format_locale>zh_CN</date_format_locale>
  995. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  996. <lenient_string_to_number>N</lenient_string_to_number>
  997. </value-meta>
  998. <value-meta>
  999. <type>String</type>
  1000. <storagetype>normal</storagetype>
  1001. <name>employee_code</name>
  1002. <length>20</length>
  1003. <precision>-1</precision>
  1004. <origin>表输入</origin>
  1005. <comments>employee_code</comments>
  1006. <conversion_Mask/>
  1007. <decimal_symbol>.</decimal_symbol>
  1008. <grouping_symbol>,</grouping_symbol>
  1009. <currency_symbol/>
  1010. <trim_type>none</trim_type>
  1011. <case_insensitive>N</case_insensitive>
  1012. <collator_disabled>Y</collator_disabled>
  1013. <collator_strength>0</collator_strength>
  1014. <sort_descending>N</sort_descending>
  1015. <output_padding>N</output_padding>
  1016. <date_format_lenient>N</date_format_lenient>
  1017. <date_format_locale>zh_CN</date_format_locale>
  1018. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1019. <lenient_string_to_number>N</lenient_string_to_number>
  1020. </value-meta>
  1021. <value-meta>
  1022. <type>String</type>
  1023. <storagetype>normal</storagetype>
  1024. <name>supplier_code</name>
  1025. <length>20</length>
  1026. <precision>-1</precision>
  1027. <origin>表输入</origin>
  1028. <comments>supplier_code</comments>
  1029. <conversion_Mask/>
  1030. <decimal_symbol>.</decimal_symbol>
  1031. <grouping_symbol>,</grouping_symbol>
  1032. <currency_symbol/>
  1033. <trim_type>none</trim_type>
  1034. <case_insensitive>N</case_insensitive>
  1035. <collator_disabled>Y</collator_disabled>
  1036. <collator_strength>0</collator_strength>
  1037. <sort_descending>N</sort_descending>
  1038. <output_padding>N</output_padding>
  1039. <date_format_lenient>N</date_format_lenient>
  1040. <date_format_locale>zh_CN</date_format_locale>
  1041. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1042. <lenient_string_to_number>N</lenient_string_to_number>
  1043. </value-meta>
  1044. <value-meta>
  1045. <type>String</type>
  1046. <storagetype>normal</storagetype>
  1047. <name>sync_name</name>
  1048. <length>6</length>
  1049. <precision>-1</precision>
  1050. <origin>表输入</origin>
  1051. <comments>sync_name</comments>
  1052. <conversion_Mask/>
  1053. <decimal_symbol>.</decimal_symbol>
  1054. <grouping_symbol>,</grouping_symbol>
  1055. <currency_symbol/>
  1056. <trim_type>none</trim_type>
  1057. <case_insensitive>N</case_insensitive>
  1058. <collator_disabled>Y</collator_disabled>
  1059. <collator_strength>0</collator_strength>
  1060. <sort_descending>N</sort_descending>
  1061. <output_padding>N</output_padding>
  1062. <date_format_lenient>N</date_format_lenient>
  1063. <date_format_locale>zh_CN</date_format_locale>
  1064. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1065. <lenient_string_to_number>N</lenient_string_to_number>
  1066. </value-meta>
  1067. <value-meta>
  1068. <type>Integer</type>
  1069. <storagetype>normal</storagetype>
  1070. <name>sync_id</name>
  1071. <length>9</length>
  1072. <precision>0</precision>
  1073. <origin>表输入</origin>
  1074. <comments>sync_id</comments>
  1075. <conversion_Mask>####0;-####0</conversion_Mask>
  1076. <decimal_symbol>.</decimal_symbol>
  1077. <grouping_symbol>,</grouping_symbol>
  1078. <currency_symbol/>
  1079. <trim_type>none</trim_type>
  1080. <case_insensitive>N</case_insensitive>
  1081. <collator_disabled>Y</collator_disabled>
  1082. <collator_strength>0</collator_strength>
  1083. <sort_descending>N</sort_descending>
  1084. <output_padding>N</output_padding>
  1085. <date_format_lenient>N</date_format_lenient>
  1086. <date_format_locale>zh_CN</date_format_locale>
  1087. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1088. <lenient_string_to_number>N</lenient_string_to_number>
  1089. </value-meta>
  1090. <value-meta>
  1091. <type>Timestamp</type>
  1092. <storagetype>normal</storagetype>
  1093. <name>sync_time</name>
  1094. <length>3</length>
  1095. <precision>-1</precision>
  1096. <origin>表输入</origin>
  1097. <comments>sync_time</comments>
  1098. <conversion_Mask/>
  1099. <decimal_symbol>.</decimal_symbol>
  1100. <grouping_symbol>,</grouping_symbol>
  1101. <currency_symbol/>
  1102. <trim_type>none</trim_type>
  1103. <case_insensitive>N</case_insensitive>
  1104. <collator_disabled>Y</collator_disabled>
  1105. <collator_strength>0</collator_strength>
  1106. <sort_descending>N</sort_descending>
  1107. <output_padding>N</output_padding>
  1108. <date_format_lenient>N</date_format_lenient>
  1109. <date_format_locale>zh_CN</date_format_locale>
  1110. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1111. <lenient_string_to_number>N</lenient_string_to_number>
  1112. </value-meta>
  1113. </row-meta>
  1114. <attributes/>
  1115. <cluster_schema/>
  1116. <remotesteps>
  1117. <input>
  1118. </input>
  1119. <output>
  1120. </output>
  1121. </remotesteps>
  1122. <GUI>
  1123. <xloc>144</xloc>
  1124. <yloc>128</yloc>
  1125. <draw>Y</draw>
  1126. </GUI>
  1127. </step>
  1128. <step_error_handling>
  1129. </step_error_handling>
  1130. <slave-step-copy-partition-distribution>
  1131. </slave-step-copy-partition-distribution>
  1132. <slave_transformation>N</slave_transformation>
  1133. <attributes/>
  1134. </transformation>