采购订单子表数据同步.ktr 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746
  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. <parameter>
  13. <name>interface_id</name>
  14. <default_value/>
  15. <description/>
  16. </parameter>
  17. </parameters>
  18. <log>
  19. <trans-log-table>
  20. <connection/>
  21. <schema/>
  22. <table/>
  23. <size_limit_lines/>
  24. <interval/>
  25. <timeout_days/>
  26. <field>
  27. <id>ID_BATCH</id>
  28. <enabled>Y</enabled>
  29. <name>ID_BATCH</name>
  30. </field>
  31. <field>
  32. <id>CHANNEL_ID</id>
  33. <enabled>Y</enabled>
  34. <name>CHANNEL_ID</name>
  35. </field>
  36. <field>
  37. <id>TRANSNAME</id>
  38. <enabled>Y</enabled>
  39. <name>TRANSNAME</name>
  40. </field>
  41. <field>
  42. <id>STATUS</id>
  43. <enabled>Y</enabled>
  44. <name>STATUS</name>
  45. </field>
  46. <field>
  47. <id>LINES_READ</id>
  48. <enabled>Y</enabled>
  49. <name>LINES_READ</name>
  50. <subject/>
  51. </field>
  52. <field>
  53. <id>LINES_WRITTEN</id>
  54. <enabled>Y</enabled>
  55. <name>LINES_WRITTEN</name>
  56. <subject/>
  57. </field>
  58. <field>
  59. <id>LINES_UPDATED</id>
  60. <enabled>Y</enabled>
  61. <name>LINES_UPDATED</name>
  62. <subject/>
  63. </field>
  64. <field>
  65. <id>LINES_INPUT</id>
  66. <enabled>Y</enabled>
  67. <name>LINES_INPUT</name>
  68. <subject/>
  69. </field>
  70. <field>
  71. <id>LINES_OUTPUT</id>
  72. <enabled>Y</enabled>
  73. <name>LINES_OUTPUT</name>
  74. <subject/>
  75. </field>
  76. <field>
  77. <id>LINES_REJECTED</id>
  78. <enabled>Y</enabled>
  79. <name>LINES_REJECTED</name>
  80. <subject/>
  81. </field>
  82. <field>
  83. <id>ERRORS</id>
  84. <enabled>Y</enabled>
  85. <name>ERRORS</name>
  86. </field>
  87. <field>
  88. <id>STARTDATE</id>
  89. <enabled>Y</enabled>
  90. <name>STARTDATE</name>
  91. </field>
  92. <field>
  93. <id>ENDDATE</id>
  94. <enabled>Y</enabled>
  95. <name>ENDDATE</name>
  96. </field>
  97. <field>
  98. <id>LOGDATE</id>
  99. <enabled>Y</enabled>
  100. <name>LOGDATE</name>
  101. </field>
  102. <field>
  103. <id>DEPDATE</id>
  104. <enabled>Y</enabled>
  105. <name>DEPDATE</name>
  106. </field>
  107. <field>
  108. <id>REPLAYDATE</id>
  109. <enabled>Y</enabled>
  110. <name>REPLAYDATE</name>
  111. </field>
  112. <field>
  113. <id>LOG_FIELD</id>
  114. <enabled>Y</enabled>
  115. <name>LOG_FIELD</name>
  116. </field>
  117. <field>
  118. <id>EXECUTING_SERVER</id>
  119. <enabled>N</enabled>
  120. <name>EXECUTING_SERVER</name>
  121. </field>
  122. <field>
  123. <id>EXECUTING_USER</id>
  124. <enabled>N</enabled>
  125. <name>EXECUTING_USER</name>
  126. </field>
  127. <field>
  128. <id>CLIENT</id>
  129. <enabled>N</enabled>
  130. <name>CLIENT</name>
  131. </field>
  132. </trans-log-table>
  133. <perf-log-table>
  134. <connection/>
  135. <schema/>
  136. <table/>
  137. <interval/>
  138. <timeout_days/>
  139. <field>
  140. <id>ID_BATCH</id>
  141. <enabled>Y</enabled>
  142. <name>ID_BATCH</name>
  143. </field>
  144. <field>
  145. <id>SEQ_NR</id>
  146. <enabled>Y</enabled>
  147. <name>SEQ_NR</name>
  148. </field>
  149. <field>
  150. <id>LOGDATE</id>
  151. <enabled>Y</enabled>
  152. <name>LOGDATE</name>
  153. </field>
  154. <field>
  155. <id>TRANSNAME</id>
  156. <enabled>Y</enabled>
  157. <name>TRANSNAME</name>
  158. </field>
  159. <field>
  160. <id>STEPNAME</id>
  161. <enabled>Y</enabled>
  162. <name>STEPNAME</name>
  163. </field>
  164. <field>
  165. <id>STEP_COPY</id>
  166. <enabled>Y</enabled>
  167. <name>STEP_COPY</name>
  168. </field>
  169. <field>
  170. <id>LINES_READ</id>
  171. <enabled>Y</enabled>
  172. <name>LINES_READ</name>
  173. </field>
  174. <field>
  175. <id>LINES_WRITTEN</id>
  176. <enabled>Y</enabled>
  177. <name>LINES_WRITTEN</name>
  178. </field>
  179. <field>
  180. <id>LINES_UPDATED</id>
  181. <enabled>Y</enabled>
  182. <name>LINES_UPDATED</name>
  183. </field>
  184. <field>
  185. <id>LINES_INPUT</id>
  186. <enabled>Y</enabled>
  187. <name>LINES_INPUT</name>
  188. </field>
  189. <field>
  190. <id>LINES_OUTPUT</id>
  191. <enabled>Y</enabled>
  192. <name>LINES_OUTPUT</name>
  193. </field>
  194. <field>
  195. <id>LINES_REJECTED</id>
  196. <enabled>Y</enabled>
  197. <name>LINES_REJECTED</name>
  198. </field>
  199. <field>
  200. <id>ERRORS</id>
  201. <enabled>Y</enabled>
  202. <name>ERRORS</name>
  203. </field>
  204. <field>
  205. <id>INPUT_BUFFER_ROWS</id>
  206. <enabled>Y</enabled>
  207. <name>INPUT_BUFFER_ROWS</name>
  208. </field>
  209. <field>
  210. <id>OUTPUT_BUFFER_ROWS</id>
  211. <enabled>Y</enabled>
  212. <name>OUTPUT_BUFFER_ROWS</name>
  213. </field>
  214. </perf-log-table>
  215. <channel-log-table>
  216. <connection/>
  217. <schema/>
  218. <table/>
  219. <timeout_days/>
  220. <field>
  221. <id>ID_BATCH</id>
  222. <enabled>Y</enabled>
  223. <name>ID_BATCH</name>
  224. </field>
  225. <field>
  226. <id>CHANNEL_ID</id>
  227. <enabled>Y</enabled>
  228. <name>CHANNEL_ID</name>
  229. </field>
  230. <field>
  231. <id>LOG_DATE</id>
  232. <enabled>Y</enabled>
  233. <name>LOG_DATE</name>
  234. </field>
  235. <field>
  236. <id>LOGGING_OBJECT_TYPE</id>
  237. <enabled>Y</enabled>
  238. <name>LOGGING_OBJECT_TYPE</name>
  239. </field>
  240. <field>
  241. <id>OBJECT_NAME</id>
  242. <enabled>Y</enabled>
  243. <name>OBJECT_NAME</name>
  244. </field>
  245. <field>
  246. <id>OBJECT_COPY</id>
  247. <enabled>Y</enabled>
  248. <name>OBJECT_COPY</name>
  249. </field>
  250. <field>
  251. <id>REPOSITORY_DIRECTORY</id>
  252. <enabled>Y</enabled>
  253. <name>REPOSITORY_DIRECTORY</name>
  254. </field>
  255. <field>
  256. <id>FILENAME</id>
  257. <enabled>Y</enabled>
  258. <name>FILENAME</name>
  259. </field>
  260. <field>
  261. <id>OBJECT_ID</id>
  262. <enabled>Y</enabled>
  263. <name>OBJECT_ID</name>
  264. </field>
  265. <field>
  266. <id>OBJECT_REVISION</id>
  267. <enabled>Y</enabled>
  268. <name>OBJECT_REVISION</name>
  269. </field>
  270. <field>
  271. <id>PARENT_CHANNEL_ID</id>
  272. <enabled>Y</enabled>
  273. <name>PARENT_CHANNEL_ID</name>
  274. </field>
  275. <field>
  276. <id>ROOT_CHANNEL_ID</id>
  277. <enabled>Y</enabled>
  278. <name>ROOT_CHANNEL_ID</name>
  279. </field>
  280. </channel-log-table>
  281. <step-log-table>
  282. <connection/>
  283. <schema/>
  284. <table/>
  285. <timeout_days/>
  286. <field>
  287. <id>ID_BATCH</id>
  288. <enabled>Y</enabled>
  289. <name>ID_BATCH</name>
  290. </field>
  291. <field>
  292. <id>CHANNEL_ID</id>
  293. <enabled>Y</enabled>
  294. <name>CHANNEL_ID</name>
  295. </field>
  296. <field>
  297. <id>LOG_DATE</id>
  298. <enabled>Y</enabled>
  299. <name>LOG_DATE</name>
  300. </field>
  301. <field>
  302. <id>TRANSNAME</id>
  303. <enabled>Y</enabled>
  304. <name>TRANSNAME</name>
  305. </field>
  306. <field>
  307. <id>STEPNAME</id>
  308. <enabled>Y</enabled>
  309. <name>STEPNAME</name>
  310. </field>
  311. <field>
  312. <id>STEP_COPY</id>
  313. <enabled>Y</enabled>
  314. <name>STEP_COPY</name>
  315. </field>
  316. <field>
  317. <id>LINES_READ</id>
  318. <enabled>Y</enabled>
  319. <name>LINES_READ</name>
  320. </field>
  321. <field>
  322. <id>LINES_WRITTEN</id>
  323. <enabled>Y</enabled>
  324. <name>LINES_WRITTEN</name>
  325. </field>
  326. <field>
  327. <id>LINES_UPDATED</id>
  328. <enabled>Y</enabled>
  329. <name>LINES_UPDATED</name>
  330. </field>
  331. <field>
  332. <id>LINES_INPUT</id>
  333. <enabled>Y</enabled>
  334. <name>LINES_INPUT</name>
  335. </field>
  336. <field>
  337. <id>LINES_OUTPUT</id>
  338. <enabled>Y</enabled>
  339. <name>LINES_OUTPUT</name>
  340. </field>
  341. <field>
  342. <id>LINES_REJECTED</id>
  343. <enabled>Y</enabled>
  344. <name>LINES_REJECTED</name>
  345. </field>
  346. <field>
  347. <id>ERRORS</id>
  348. <enabled>Y</enabled>
  349. <name>ERRORS</name>
  350. </field>
  351. <field>
  352. <id>LOG_FIELD</id>
  353. <enabled>N</enabled>
  354. <name>LOG_FIELD</name>
  355. </field>
  356. </step-log-table>
  357. <metrics-log-table>
  358. <connection/>
  359. <schema/>
  360. <table/>
  361. <timeout_days/>
  362. <field>
  363. <id>ID_BATCH</id>
  364. <enabled>Y</enabled>
  365. <name>ID_BATCH</name>
  366. </field>
  367. <field>
  368. <id>CHANNEL_ID</id>
  369. <enabled>Y</enabled>
  370. <name>CHANNEL_ID</name>
  371. </field>
  372. <field>
  373. <id>LOG_DATE</id>
  374. <enabled>Y</enabled>
  375. <name>LOG_DATE</name>
  376. </field>
  377. <field>
  378. <id>METRICS_DATE</id>
  379. <enabled>Y</enabled>
  380. <name>METRICS_DATE</name>
  381. </field>
  382. <field>
  383. <id>METRICS_CODE</id>
  384. <enabled>Y</enabled>
  385. <name>METRICS_CODE</name>
  386. </field>
  387. <field>
  388. <id>METRICS_DESCRIPTION</id>
  389. <enabled>Y</enabled>
  390. <name>METRICS_DESCRIPTION</name>
  391. </field>
  392. <field>
  393. <id>METRICS_SUBJECT</id>
  394. <enabled>Y</enabled>
  395. <name>METRICS_SUBJECT</name>
  396. </field>
  397. <field>
  398. <id>METRICS_TYPE</id>
  399. <enabled>Y</enabled>
  400. <name>METRICS_TYPE</name>
  401. </field>
  402. <field>
  403. <id>METRICS_VALUE</id>
  404. <enabled>Y</enabled>
  405. <name>METRICS_VALUE</name>
  406. </field>
  407. </metrics-log-table>
  408. </log>
  409. <maxdate>
  410. <connection/>
  411. <table/>
  412. <field/>
  413. <offset>0.0</offset>
  414. <maxdiff>0.0</maxdiff>
  415. </maxdate>
  416. <size_rowset>10000</size_rowset>
  417. <sleep_time_empty>50</sleep_time_empty>
  418. <sleep_time_full>50</sleep_time_full>
  419. <unique_connections>N</unique_connections>
  420. <feedback_shown>Y</feedback_shown>
  421. <feedback_size>50000</feedback_size>
  422. <using_thread_priorities>Y</using_thread_priorities>
  423. <shared_objects_file/>
  424. <capture_step_performance>N</capture_step_performance>
  425. <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  426. <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  427. <dependencies>
  428. </dependencies>
  429. <partitionschemas>
  430. </partitionschemas>
  431. <slaveservers>
  432. </slaveservers>
  433. <clusterschemas>
  434. </clusterschemas>
  435. <created_user>-</created_user>
  436. <created_date>2024/01/10 11:03:15.382</created_date>
  437. <modified_user>-</modified_user>
  438. <modified_date>2024/01/10 11:03:15.382</modified_date>
  439. <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
  440. <is_key_private>N</is_key_private>
  441. </info>
  442. <notepads>
  443. </notepads>
  444. <connection>
  445. <name>MOM</name>
  446. <server>${mysql_host}</server>
  447. <type>MYSQL</type>
  448. <access>Native</access>
  449. <database>${mysql_dbname}</database>
  450. <port>3306</port>
  451. <username>${mysql_username}</username>
  452. <password>${mysql_password}</password>
  453. <servername/>
  454. <data_tablespace/>
  455. <index_tablespace/>
  456. <attributes>
  457. <attribute>
  458. <code>EXTRA_OPTION_MYSQL.characterEncoding</code>
  459. <attribute>utf-8</attribute>
  460. </attribute>
  461. <attribute>
  462. <code>EXTRA_OPTION_MYSQL.defaultFetchSize</code>
  463. <attribute>5000</attribute>
  464. </attribute>
  465. <attribute>
  466. <code>EXTRA_OPTION_MYSQL.rewriteBatchedStatements</code>
  467. <attribute>true</attribute>
  468. </attribute>
  469. <attribute>
  470. <code>EXTRA_OPTION_MYSQL.useCompression</code>
  471. <attribute>true</attribute>
  472. </attribute>
  473. <attribute>
  474. <code>EXTRA_OPTION_MYSQL.useCursorFetch</code>
  475. <attribute>true</attribute>
  476. </attribute>
  477. <attribute>
  478. <code>EXTRA_OPTION_MYSQL.useServerPrepStmts</code>
  479. <attribute>true</attribute>
  480. </attribute>
  481. <attribute>
  482. <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
  483. <attribute>N</attribute>
  484. </attribute>
  485. <attribute>
  486. <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
  487. <attribute>N</attribute>
  488. </attribute>
  489. <attribute>
  490. <code>IS_CLUSTERED</code>
  491. <attribute>N</attribute>
  492. </attribute>
  493. <attribute>
  494. <code>PORT_NUMBER</code>
  495. <attribute>3306</attribute>
  496. </attribute>
  497. <attribute>
  498. <code>PRESERVE_RESERVED_WORD_CASE</code>
  499. <attribute>Y</attribute>
  500. </attribute>
  501. <attribute>
  502. <code>QUOTE_ALL_FIELDS</code>
  503. <attribute>N</attribute>
  504. </attribute>
  505. <attribute>
  506. <code>STREAM_RESULTS</code>
  507. <attribute>N</attribute>
  508. </attribute>
  509. <attribute>
  510. <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
  511. <attribute>Y</attribute>
  512. </attribute>
  513. <attribute>
  514. <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
  515. <attribute>Y</attribute>
  516. </attribute>
  517. <attribute>
  518. <code>USE_POOLING</code>
  519. <attribute>N</attribute>
  520. </attribute>
  521. </attributes>
  522. </connection>
  523. <connection>
  524. <name>U8</name>
  525. <server>${U8DB_HOST}</server>
  526. <type>GENERIC</type>
  527. <access>Native</access>
  528. <database>${U8DB_NAME}</database>
  529. <port>1433</port>
  530. <username>${sqlserver_username}</username>
  531. <password>${sqlserver_password}</password>
  532. <servername/>
  533. <data_tablespace/>
  534. <index_tablespace/>
  535. <attributes>
  536. <attribute>
  537. <code>CUSTOM_DRIVER_CLASS</code>
  538. <attribute>${sqlserver_driverclassname}</attribute>
  539. </attribute>
  540. <attribute>
  541. <code>CUSTOM_URL</code>
  542. <attribute>${sqlserver_url}</attribute>
  543. </attribute>
  544. <attribute>
  545. <code>DATABASE_DIALECT_ID</code>
  546. <attribute>Generic database</attribute>
  547. </attribute>
  548. <attribute>
  549. <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
  550. <attribute>N</attribute>
  551. </attribute>
  552. <attribute>
  553. <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
  554. <attribute>N</attribute>
  555. </attribute>
  556. <attribute>
  557. <code>IS_CLUSTERED</code>
  558. <attribute>N</attribute>
  559. </attribute>
  560. <attribute>
  561. <code>PORT_NUMBER</code>
  562. <attribute>1433</attribute>
  563. </attribute>
  564. <attribute>
  565. <code>PRESERVE_RESERVED_WORD_CASE</code>
  566. <attribute>Y</attribute>
  567. </attribute>
  568. <attribute>
  569. <code>QUOTE_ALL_FIELDS</code>
  570. <attribute>N</attribute>
  571. </attribute>
  572. <attribute>
  573. <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
  574. <attribute>Y</attribute>
  575. </attribute>
  576. <attribute>
  577. <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
  578. <attribute>Y</attribute>
  579. </attribute>
  580. <attribute>
  581. <code>USE_POOLING</code>
  582. <attribute>N</attribute>
  583. </attribute>
  584. </attributes>
  585. </connection>
  586. <order>
  587. <hop>
  588. <from>流查询</from>
  589. <to>插入 / 更新</to>
  590. <enabled>Y</enabled>
  591. </hop>
  592. <hop>
  593. <from>表输入</from>
  594. <to>Java 代码-id</to>
  595. <enabled>Y</enabled>
  596. </hop>
  597. <hop>
  598. <from>表输入-mom物料档案</from>
  599. <to>流查询</to>
  600. <enabled>Y</enabled>
  601. </hop>
  602. <hop>
  603. <from>表输入-主id</from>
  604. <to>流查询-主id</to>
  605. <enabled>Y</enabled>
  606. </hop>
  607. <hop>
  608. <from>Java 代码-id</from>
  609. <to>流查询-主id</to>
  610. <enabled>Y</enabled>
  611. </hop>
  612. <hop>
  613. <from>流查询-主id</from>
  614. <to>流查询</to>
  615. <enabled>Y</enabled>
  616. </hop>
  617. <hop>
  618. <from>获取变量</from>
  619. <to>表输入</to>
  620. <enabled>Y</enabled>
  621. </hop>
  622. </order>
  623. <step>
  624. <name>Java 代码-id</name>
  625. <type>UserDefinedJavaClass</type>
  626. <description/>
  627. <distribute>Y</distribute>
  628. <custom_distribution/>
  629. <copies>1</copies>
  630. <partitioning>
  631. <method>none</method>
  632. <schema_name/>
  633. </partitioning>
  634. <definitions>
  635. <definition>
  636. <class_type>TRANSFORM_CLASS</class_type>
  637. <class_name>Processor</class_name>
  638. <class_source>public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
  639. Object[] r = getRow();
  640. if (r == null) {
  641. setOutputDone();
  642. return false;
  643. }
  644. r = createOutputRow(r, data.outputRowMeta.size());
  645. if (snowflakeIdWorker == null) {
  646. snowflakeIdWorker = new SnowflakeIdWorker(1, 1); // 设置你的workerId和datacenterId
  647. }
  648. String id = String.valueOf(snowflakeIdWorker.nextId());
  649. get(Fields.Out, "id").setValue(r, id);
  650. putRow(data.outputRowMeta, r);
  651. return true;
  652. }
  653. // 定义全局变量(放在类顶部)
  654. private static SnowflakeIdWorker snowflakeIdWorker = null;
  655. // 内部类:雪花算法实现
  656. public static class SnowflakeIdWorker {
  657. private final long twepoch = 1288834974657L;
  658. private final long workerIdBits = 5L;
  659. private final long datacenterIdBits = 5L;
  660. private final long maxWorkerId = -1L ^ (-1L &lt;&lt; workerIdBits);
  661. private final long maxDatacenterId = -1L ^ (-1L &lt;&lt; datacenterIdBits);
  662. private final long sequenceBits = 12L;
  663. private final long workerIdShift = sequenceBits;
  664. private final long datacenterIdShift = sequenceBits + workerIdBits;
  665. private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
  666. private final long sequenceMask = -1L ^ (-1L &lt;&lt; sequenceBits);
  667. private long workerId;
  668. private long datacenterId;
  669. private long sequence = 0L;
  670. private long lastTimestamp = -1L;
  671. public SnowflakeIdWorker(long workerId, long datacenterId) {
  672. if (workerId > maxWorkerId || workerId &lt; 0) {
  673. throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
  674. }
  675. if (datacenterId > maxDatacenterId || datacenterId &lt; 0) {
  676. throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
  677. }
  678. this.workerId = workerId;
  679. this.datacenterId = datacenterId;
  680. }
  681. public synchronized long nextId() {
  682. long timestamp = timeGen();
  683. if (timestamp &lt; lastTimestamp) {
  684. throw new RuntimeException("Clock moved backwards. Refusing to generate id for " + (lastTimestamp - timestamp) + " milliseconds");
  685. }
  686. if (lastTimestamp == timestamp) {
  687. sequence = (sequence + 1) &amp; sequenceMask;
  688. if (sequence == 0) {
  689. timestamp = tilNextMillis(lastTimestamp);
  690. }
  691. } else {
  692. sequence = 0L;
  693. }
  694. lastTimestamp = timestamp;
  695. return ((timestamp - twepoch) &lt;&lt; timestampLeftShift)
  696. | (datacenterId &lt;&lt; datacenterIdShift)
  697. | (workerId &lt;&lt; workerIdShift)
  698. | sequence;
  699. }
  700. private long tilNextMillis(long lastTimestamp) {
  701. long timestamp = timeGen();
  702. while (timestamp &lt;= lastTimestamp) {
  703. timestamp = timeGen();
  704. }
  705. return timestamp;
  706. }
  707. private long timeGen() {
  708. return System.currentTimeMillis();
  709. }
  710. }</class_source>
  711. </definition>
  712. </definitions>
  713. <fields>
  714. <field>
  715. <field_name>id</field_name>
  716. <field_type>String</field_type>
  717. <field_length>-1</field_length>
  718. <field_precision>-1</field_precision>
  719. </field>
  720. </fields>
  721. <clear_result_fields>N</clear_result_fields>
  722. <info_steps/>
  723. <target_steps/>
  724. <usage_parameters/>
  725. <attributes/>
  726. <cluster_schema/>
  727. <remotesteps>
  728. <input>
  729. </input>
  730. <output>
  731. </output>
  732. </remotesteps>
  733. <GUI>
  734. <xloc>272</xloc>
  735. <yloc>128</yloc>
  736. <draw>Y</draw>
  737. </GUI>
  738. </step>
  739. <step>
  740. <name>插入 / 更新</name>
  741. <type>InsertUpdate</type>
  742. <description/>
  743. <distribute>Y</distribute>
  744. <custom_distribution/>
  745. <copies>1</copies>
  746. <partitioning>
  747. <method>none</method>
  748. <schema_name/>
  749. </partitioning>
  750. <connection>MOM</connection>
  751. <commit>1000</commit>
  752. <update_bypassed>Y</update_bypassed>
  753. <lookup>
  754. <schema/>
  755. <table>wms_task_ins</table>
  756. <key>
  757. <name>interface_id</name>
  758. <field>interface_id</field>
  759. <condition>=</condition>
  760. <name2/>
  761. </key>
  762. <value>
  763. <name>interface_id</name>
  764. <rename>interface_id</rename>
  765. <update>N</update>
  766. </value>
  767. <value>
  768. <name>interface_row</name>
  769. <rename>interface_row</rename>
  770. <update>N</update>
  771. </value>
  772. <value>
  773. <name>id</name>
  774. <rename>id</rename>
  775. <update>N</update>
  776. </value>
  777. <value>
  778. <name>task_in_id</name>
  779. <rename>mom_task_in_id</rename>
  780. <update>N</update>
  781. </value>
  782. <value>
  783. <name>`row_number`</name>
  784. <rename>row_number</rename>
  785. <update>N</update>
  786. </value>
  787. <value>
  788. <name>material_code</name>
  789. <rename>material_code</rename>
  790. <update>N</update>
  791. </value>
  792. <value>
  793. <name>task_qty</name>
  794. <rename>task_qty</rename>
  795. <update>N</update>
  796. </value>
  797. <value>
  798. <name>unit_code</name>
  799. <rename>unit_code</rename>
  800. <update>N</update>
  801. </value>
  802. <value>
  803. <name>excess_ratio_in</name>
  804. <rename>mom_excess_ratio_in</rename>
  805. <update>N</update>
  806. </value>
  807. <value>
  808. <name>warehouse_code</name>
  809. <rename>mom_warehouse_code</rename>
  810. <update>N</update>
  811. </value>
  812. <value>
  813. <name>location_code</name>
  814. <rename>mom_location_code</rename>
  815. <update>N</update>
  816. </value>
  817. <value>
  818. <name>status</name>
  819. <rename>status</rename>
  820. <update>N</update>
  821. </value>
  822. <value>
  823. <name>is_close</name>
  824. <rename>is_close</rename>
  825. <update>N</update>
  826. </value>
  827. <value>
  828. <name>create_id</name>
  829. <rename>sync_id</rename>
  830. <update>N</update>
  831. </value>
  832. <value>
  833. <name>create_by</name>
  834. <rename>sync_name</rename>
  835. <update>N</update>
  836. </value>
  837. <value>
  838. <name>create_time</name>
  839. <rename>sync_time</rename>
  840. <update>N</update>
  841. </value>
  842. <value>
  843. <name>audit_by</name>
  844. <rename>sync_name</rename>
  845. <update>N</update>
  846. </value>
  847. <value>
  848. <name>audit_time</name>
  849. <rename>sync_time</rename>
  850. <update>N</update>
  851. </value>
  852. </lookup>
  853. <attributes/>
  854. <cluster_schema/>
  855. <remotesteps>
  856. <input>
  857. </input>
  858. <output>
  859. </output>
  860. </remotesteps>
  861. <GUI>
  862. <xloc>704</xloc>
  863. <yloc>128</yloc>
  864. <draw>Y</draw>
  865. </GUI>
  866. </step>
  867. <step>
  868. <name>流查询</name>
  869. <type>StreamLookup</type>
  870. <description/>
  871. <distribute>Y</distribute>
  872. <custom_distribution/>
  873. <copies>1</copies>
  874. <partitioning>
  875. <method>none</method>
  876. <schema_name/>
  877. </partitioning>
  878. <from>表输入-mom物料档案</from>
  879. <input_sorted>N</input_sorted>
  880. <preserve_memory>N</preserve_memory>
  881. <sorted_list>N</sorted_list>
  882. <integer_pair>N</integer_pair>
  883. <lookup>
  884. <key>
  885. <name>material_code</name>
  886. <field>mom_material_code</field>
  887. </key>
  888. <value>
  889. <name>mom_warehouse_code</name>
  890. <rename>mom_warehouse_code</rename>
  891. <default/>
  892. <type>String</type>
  893. </value>
  894. <value>
  895. <name>mom_location_code</name>
  896. <rename>mom_location_code</rename>
  897. <default/>
  898. <type>String</type>
  899. </value>
  900. <value>
  901. <name>mom_excess_ratio_in</name>
  902. <rename>mom_excess_ratio_in</rename>
  903. <default/>
  904. <type>BigNumber</type>
  905. </value>
  906. </lookup>
  907. <attributes/>
  908. <cluster_schema/>
  909. <remotesteps>
  910. <input>
  911. </input>
  912. <output>
  913. </output>
  914. </remotesteps>
  915. <GUI>
  916. <xloc>576</xloc>
  917. <yloc>128</yloc>
  918. <draw>Y</draw>
  919. </GUI>
  920. </step>
  921. <step>
  922. <name>流查询-主id</name>
  923. <type>StreamLookup</type>
  924. <description/>
  925. <distribute>Y</distribute>
  926. <custom_distribution/>
  927. <copies>1</copies>
  928. <partitioning>
  929. <method>none</method>
  930. <schema_name/>
  931. </partitioning>
  932. <from>表输入-主id</from>
  933. <input_sorted>N</input_sorted>
  934. <preserve_memory>N</preserve_memory>
  935. <sorted_list>N</sorted_list>
  936. <integer_pair>N</integer_pair>
  937. <lookup>
  938. <key>
  939. <name>master_interface_id</name>
  940. <field>master_interface_id</field>
  941. </key>
  942. <value>
  943. <name>mom_task_in_id</name>
  944. <rename>mom_task_in_id</rename>
  945. <default/>
  946. <type>String</type>
  947. </value>
  948. </lookup>
  949. <attributes/>
  950. <cluster_schema/>
  951. <remotesteps>
  952. <input>
  953. </input>
  954. <output>
  955. </output>
  956. </remotesteps>
  957. <GUI>
  958. <xloc>432</xloc>
  959. <yloc>128</yloc>
  960. <draw>Y</draw>
  961. </GUI>
  962. </step>
  963. <step>
  964. <name>表输入</name>
  965. <type>TableInput</type>
  966. <description/>
  967. <distribute>Y</distribute>
  968. <custom_distribution/>
  969. <copies>1</copies>
  970. <partitioning>
  971. <method>none</method>
  972. <schema_name/>
  973. </partitioning>
  974. <connection>U8</connection>
  975. <sql>DECLARE @USER_NAME VARCHAR(50),@USER_ID INT
  976. SET @USER_NAME = CASE '${USER_NAME}' WHEN '' THEN '管理员(kettle)' ELSE '${USER_NAME}' END
  977. SET @USER_ID = CASE 0${USER_ID} WHEN 0 THEN 1 ELSE 0${USER_ID} END
  978. SELECT
  979. 0${interface_id} AS master_interface_id
  980. ,T2.ID AS interface_id
  981. ,T2.iVouchRowNo AS interface_row
  982. ,T2.iVouchRowNo AS row_number
  983. --,ROW_NUMBER()OVER(ORDER BY T2.iVouchRowNo) AS row_number
  984. ,T2.cInvCode AS material_code
  985. ,T2.iQuantity AS task_qty
  986. ,T6.cComUnitCode AS unit_code
  987. ,0 AS status
  988. ,1 AS is_close
  989. ,@USER_NAME AS sync_name
  990. ,@USER_ID AS sync_id
  991. ,GETDATE() AS sync_time
  992. FROM PO_Pomain T1
  993. LEFT JOIN PO_Podetails T2 ON T1.POID =T2.POID
  994. LEFT JOIN Inventory T6 ON T2.cInvCode =T6.cInvCode
  995. WHERE 1=1
  996. AND T1.POID =0${interface_id}
  997. </sql>
  998. <limit>0</limit>
  999. <lookup/>
  1000. <execute_each_row>N</execute_each_row>
  1001. <variables_active>Y</variables_active>
  1002. <lazy_conversion_active>N</lazy_conversion_active>
  1003. <cached_row_meta_active>N</cached_row_meta_active>
  1004. <row-meta>
  1005. <value-meta>
  1006. <type>Integer</type>
  1007. <storagetype>normal</storagetype>
  1008. <name>master_interface_id</name>
  1009. <length>9</length>
  1010. <precision>0</precision>
  1011. <origin>表输入</origin>
  1012. <comments>master_interface_id</comments>
  1013. <conversion_Mask>####0;-####0</conversion_Mask>
  1014. <decimal_symbol>.</decimal_symbol>
  1015. <grouping_symbol>,</grouping_symbol>
  1016. <currency_symbol/>
  1017. <trim_type>none</trim_type>
  1018. <case_insensitive>N</case_insensitive>
  1019. <collator_disabled>Y</collator_disabled>
  1020. <collator_strength>0</collator_strength>
  1021. <sort_descending>N</sort_descending>
  1022. <output_padding>N</output_padding>
  1023. <date_format_lenient>N</date_format_lenient>
  1024. <date_format_locale>zh_CN</date_format_locale>
  1025. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1026. <lenient_string_to_number>N</lenient_string_to_number>
  1027. </value-meta>
  1028. <value-meta>
  1029. <type>Integer</type>
  1030. <storagetype>normal</storagetype>
  1031. <name>interface_id</name>
  1032. <length>9</length>
  1033. <precision>0</precision>
  1034. <origin>表输入</origin>
  1035. <comments>interface_id</comments>
  1036. <conversion_Mask>####0;-####0</conversion_Mask>
  1037. <decimal_symbol>.</decimal_symbol>
  1038. <grouping_symbol>,</grouping_symbol>
  1039. <currency_symbol/>
  1040. <trim_type>none</trim_type>
  1041. <case_insensitive>N</case_insensitive>
  1042. <collator_disabled>Y</collator_disabled>
  1043. <collator_strength>0</collator_strength>
  1044. <sort_descending>N</sort_descending>
  1045. <output_padding>N</output_padding>
  1046. <date_format_lenient>N</date_format_lenient>
  1047. <date_format_locale>zh_CN</date_format_locale>
  1048. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1049. <lenient_string_to_number>N</lenient_string_to_number>
  1050. </value-meta>
  1051. <value-meta>
  1052. <type>Integer</type>
  1053. <storagetype>normal</storagetype>
  1054. <name>interface_row</name>
  1055. <length>9</length>
  1056. <precision>0</precision>
  1057. <origin>表输入</origin>
  1058. <comments>interface_row</comments>
  1059. <conversion_Mask>####0;-####0</conversion_Mask>
  1060. <decimal_symbol>.</decimal_symbol>
  1061. <grouping_symbol>,</grouping_symbol>
  1062. <currency_symbol/>
  1063. <trim_type>none</trim_type>
  1064. <case_insensitive>N</case_insensitive>
  1065. <collator_disabled>Y</collator_disabled>
  1066. <collator_strength>0</collator_strength>
  1067. <sort_descending>N</sort_descending>
  1068. <output_padding>N</output_padding>
  1069. <date_format_lenient>N</date_format_lenient>
  1070. <date_format_locale>zh_CN</date_format_locale>
  1071. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1072. <lenient_string_to_number>N</lenient_string_to_number>
  1073. </value-meta>
  1074. <value-meta>
  1075. <type>Integer</type>
  1076. <storagetype>normal</storagetype>
  1077. <name>row_number</name>
  1078. <length>9</length>
  1079. <precision>0</precision>
  1080. <origin>表输入</origin>
  1081. <comments>row_number</comments>
  1082. <conversion_Mask>####0;-####0</conversion_Mask>
  1083. <decimal_symbol>.</decimal_symbol>
  1084. <grouping_symbol>,</grouping_symbol>
  1085. <currency_symbol/>
  1086. <trim_type>none</trim_type>
  1087. <case_insensitive>N</case_insensitive>
  1088. <collator_disabled>Y</collator_disabled>
  1089. <collator_strength>0</collator_strength>
  1090. <sort_descending>N</sort_descending>
  1091. <output_padding>N</output_padding>
  1092. <date_format_lenient>N</date_format_lenient>
  1093. <date_format_locale>zh_CN</date_format_locale>
  1094. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1095. <lenient_string_to_number>N</lenient_string_to_number>
  1096. </value-meta>
  1097. <value-meta>
  1098. <type>String</type>
  1099. <storagetype>normal</storagetype>
  1100. <name>material_code</name>
  1101. <length>60</length>
  1102. <precision>-1</precision>
  1103. <origin>表输入</origin>
  1104. <comments>material_code</comments>
  1105. <conversion_Mask/>
  1106. <decimal_symbol>.</decimal_symbol>
  1107. <grouping_symbol>,</grouping_symbol>
  1108. <currency_symbol/>
  1109. <trim_type>none</trim_type>
  1110. <case_insensitive>N</case_insensitive>
  1111. <collator_disabled>Y</collator_disabled>
  1112. <collator_strength>0</collator_strength>
  1113. <sort_descending>N</sort_descending>
  1114. <output_padding>N</output_padding>
  1115. <date_format_lenient>N</date_format_lenient>
  1116. <date_format_locale>zh_CN</date_format_locale>
  1117. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1118. <lenient_string_to_number>N</lenient_string_to_number>
  1119. </value-meta>
  1120. <value-meta>
  1121. <type>BigNumber</type>
  1122. <storagetype>normal</storagetype>
  1123. <name>task_qty</name>
  1124. <length>30</length>
  1125. <precision>10</precision>
  1126. <origin>表输入</origin>
  1127. <comments>task_qty</comments>
  1128. <conversion_Mask>######0.0###################;-######0.0###################</conversion_Mask>
  1129. <decimal_symbol>.</decimal_symbol>
  1130. <grouping_symbol/>
  1131. <currency_symbol/>
  1132. <trim_type>none</trim_type>
  1133. <case_insensitive>N</case_insensitive>
  1134. <collator_disabled>Y</collator_disabled>
  1135. <collator_strength>0</collator_strength>
  1136. <sort_descending>N</sort_descending>
  1137. <output_padding>N</output_padding>
  1138. <date_format_lenient>N</date_format_lenient>
  1139. <date_format_locale>zh_CN</date_format_locale>
  1140. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1141. <lenient_string_to_number>N</lenient_string_to_number>
  1142. </value-meta>
  1143. <value-meta>
  1144. <type>String</type>
  1145. <storagetype>normal</storagetype>
  1146. <name>unit_code</name>
  1147. <length>35</length>
  1148. <precision>-1</precision>
  1149. <origin>表输入</origin>
  1150. <comments>unit_code</comments>
  1151. <conversion_Mask/>
  1152. <decimal_symbol>.</decimal_symbol>
  1153. <grouping_symbol>,</grouping_symbol>
  1154. <currency_symbol/>
  1155. <trim_type>none</trim_type>
  1156. <case_insensitive>N</case_insensitive>
  1157. <collator_disabled>Y</collator_disabled>
  1158. <collator_strength>0</collator_strength>
  1159. <sort_descending>N</sort_descending>
  1160. <output_padding>N</output_padding>
  1161. <date_format_lenient>N</date_format_lenient>
  1162. <date_format_locale>zh_CN</date_format_locale>
  1163. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1164. <lenient_string_to_number>N</lenient_string_to_number>
  1165. </value-meta>
  1166. <value-meta>
  1167. <type>Integer</type>
  1168. <storagetype>normal</storagetype>
  1169. <name>status</name>
  1170. <length>9</length>
  1171. <precision>0</precision>
  1172. <origin>表输入</origin>
  1173. <comments>status</comments>
  1174. <conversion_Mask>####0;-####0</conversion_Mask>
  1175. <decimal_symbol>.</decimal_symbol>
  1176. <grouping_symbol>,</grouping_symbol>
  1177. <currency_symbol/>
  1178. <trim_type>none</trim_type>
  1179. <case_insensitive>N</case_insensitive>
  1180. <collator_disabled>Y</collator_disabled>
  1181. <collator_strength>0</collator_strength>
  1182. <sort_descending>N</sort_descending>
  1183. <output_padding>N</output_padding>
  1184. <date_format_lenient>N</date_format_lenient>
  1185. <date_format_locale>zh_CN</date_format_locale>
  1186. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1187. <lenient_string_to_number>N</lenient_string_to_number>
  1188. </value-meta>
  1189. <value-meta>
  1190. <type>Integer</type>
  1191. <storagetype>normal</storagetype>
  1192. <name>is_close</name>
  1193. <length>9</length>
  1194. <precision>0</precision>
  1195. <origin>表输入</origin>
  1196. <comments>is_close</comments>
  1197. <conversion_Mask>####0;-####0</conversion_Mask>
  1198. <decimal_symbol>.</decimal_symbol>
  1199. <grouping_symbol>,</grouping_symbol>
  1200. <currency_symbol/>
  1201. <trim_type>none</trim_type>
  1202. <case_insensitive>N</case_insensitive>
  1203. <collator_disabled>Y</collator_disabled>
  1204. <collator_strength>0</collator_strength>
  1205. <sort_descending>N</sort_descending>
  1206. <output_padding>N</output_padding>
  1207. <date_format_lenient>N</date_format_lenient>
  1208. <date_format_locale>zh_CN</date_format_locale>
  1209. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1210. <lenient_string_to_number>N</lenient_string_to_number>
  1211. </value-meta>
  1212. <value-meta>
  1213. <type>String</type>
  1214. <storagetype>normal</storagetype>
  1215. <name>sync_name</name>
  1216. <length>50</length>
  1217. <precision>-1</precision>
  1218. <origin>表输入</origin>
  1219. <comments>sync_name</comments>
  1220. <conversion_Mask/>
  1221. <decimal_symbol>.</decimal_symbol>
  1222. <grouping_symbol>,</grouping_symbol>
  1223. <currency_symbol/>
  1224. <trim_type>none</trim_type>
  1225. <case_insensitive>N</case_insensitive>
  1226. <collator_disabled>Y</collator_disabled>
  1227. <collator_strength>0</collator_strength>
  1228. <sort_descending>N</sort_descending>
  1229. <output_padding>N</output_padding>
  1230. <date_format_lenient>N</date_format_lenient>
  1231. <date_format_locale>zh_CN</date_format_locale>
  1232. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1233. <lenient_string_to_number>N</lenient_string_to_number>
  1234. </value-meta>
  1235. <value-meta>
  1236. <type>Integer</type>
  1237. <storagetype>normal</storagetype>
  1238. <name>sync_id</name>
  1239. <length>9</length>
  1240. <precision>0</precision>
  1241. <origin>表输入</origin>
  1242. <comments>sync_id</comments>
  1243. <conversion_Mask>####0;-####0</conversion_Mask>
  1244. <decimal_symbol>.</decimal_symbol>
  1245. <grouping_symbol>,</grouping_symbol>
  1246. <currency_symbol/>
  1247. <trim_type>none</trim_type>
  1248. <case_insensitive>N</case_insensitive>
  1249. <collator_disabled>Y</collator_disabled>
  1250. <collator_strength>0</collator_strength>
  1251. <sort_descending>N</sort_descending>
  1252. <output_padding>N</output_padding>
  1253. <date_format_lenient>N</date_format_lenient>
  1254. <date_format_locale>zh_CN</date_format_locale>
  1255. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1256. <lenient_string_to_number>N</lenient_string_to_number>
  1257. </value-meta>
  1258. <value-meta>
  1259. <type>Timestamp</type>
  1260. <storagetype>normal</storagetype>
  1261. <name>sync_time</name>
  1262. <length>3</length>
  1263. <precision>-1</precision>
  1264. <origin>表输入</origin>
  1265. <comments>sync_time</comments>
  1266. <conversion_Mask/>
  1267. <decimal_symbol>.</decimal_symbol>
  1268. <grouping_symbol>,</grouping_symbol>
  1269. <currency_symbol/>
  1270. <trim_type>none</trim_type>
  1271. <case_insensitive>N</case_insensitive>
  1272. <collator_disabled>Y</collator_disabled>
  1273. <collator_strength>0</collator_strength>
  1274. <sort_descending>N</sort_descending>
  1275. <output_padding>N</output_padding>
  1276. <date_format_lenient>N</date_format_lenient>
  1277. <date_format_locale>zh_CN</date_format_locale>
  1278. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1279. <lenient_string_to_number>N</lenient_string_to_number>
  1280. </value-meta>
  1281. </row-meta>
  1282. <attributes/>
  1283. <cluster_schema/>
  1284. <remotesteps>
  1285. <input>
  1286. </input>
  1287. <output>
  1288. </output>
  1289. </remotesteps>
  1290. <GUI>
  1291. <xloc>112</xloc>
  1292. <yloc>128</yloc>
  1293. <draw>Y</draw>
  1294. </GUI>
  1295. </step>
  1296. <step>
  1297. <name>表输入-mom物料档案</name>
  1298. <type>TableInput</type>
  1299. <description/>
  1300. <distribute>Y</distribute>
  1301. <custom_distribution/>
  1302. <copies>1</copies>
  1303. <partitioning>
  1304. <method>none</method>
  1305. <schema_name/>
  1306. </partitioning>
  1307. <connection>MOM</connection>
  1308. <sql>SELECT
  1309. material_code AS mom_material_code
  1310. ,excess_ratio_in AS mom_excess_ratio_in
  1311. ,warehouse_code_in AS mom_warehouse_code
  1312. ,location_code_in AS mom_location_code
  1313. FROM base_material</sql>
  1314. <limit>0</limit>
  1315. <lookup/>
  1316. <execute_each_row>N</execute_each_row>
  1317. <variables_active>N</variables_active>
  1318. <lazy_conversion_active>N</lazy_conversion_active>
  1319. <cached_row_meta_active>N</cached_row_meta_active>
  1320. <row-meta>
  1321. <value-meta>
  1322. <type>String</type>
  1323. <storagetype>normal</storagetype>
  1324. <name>mom_material_code</name>
  1325. <length>50</length>
  1326. <precision>-1</precision>
  1327. <origin>表输入-mom物料档案</origin>
  1328. <comments>mom_material_code</comments>
  1329. <conversion_Mask/>
  1330. <decimal_symbol>.</decimal_symbol>
  1331. <grouping_symbol>,</grouping_symbol>
  1332. <currency_symbol/>
  1333. <trim_type>none</trim_type>
  1334. <case_insensitive>N</case_insensitive>
  1335. <collator_disabled>Y</collator_disabled>
  1336. <collator_strength>0</collator_strength>
  1337. <sort_descending>N</sort_descending>
  1338. <output_padding>N</output_padding>
  1339. <date_format_lenient>N</date_format_lenient>
  1340. <date_format_locale>zh_CN</date_format_locale>
  1341. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1342. <lenient_string_to_number>N</lenient_string_to_number>
  1343. </value-meta>
  1344. <value-meta>
  1345. <type>BigNumber</type>
  1346. <storagetype>normal</storagetype>
  1347. <name>mom_excess_ratio_in</name>
  1348. <length>24</length>
  1349. <precision>6</precision>
  1350. <origin>表输入-mom物料档案</origin>
  1351. <comments>mom_excess_ratio_in</comments>
  1352. <conversion_Mask>######0.0###################;-######0.0###################</conversion_Mask>
  1353. <decimal_symbol>.</decimal_symbol>
  1354. <grouping_symbol/>
  1355. <currency_symbol/>
  1356. <trim_type>none</trim_type>
  1357. <case_insensitive>N</case_insensitive>
  1358. <collator_disabled>Y</collator_disabled>
  1359. <collator_strength>0</collator_strength>
  1360. <sort_descending>N</sort_descending>
  1361. <output_padding>N</output_padding>
  1362. <date_format_lenient>N</date_format_lenient>
  1363. <date_format_locale>zh_CN</date_format_locale>
  1364. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1365. <lenient_string_to_number>N</lenient_string_to_number>
  1366. </value-meta>
  1367. <value-meta>
  1368. <type>String</type>
  1369. <storagetype>normal</storagetype>
  1370. <name>mom_warehouse_code</name>
  1371. <length>50</length>
  1372. <precision>-1</precision>
  1373. <origin>表输入-mom物料档案</origin>
  1374. <comments>mom_warehouse_code</comments>
  1375. <conversion_Mask/>
  1376. <decimal_symbol>.</decimal_symbol>
  1377. <grouping_symbol>,</grouping_symbol>
  1378. <currency_symbol/>
  1379. <trim_type>none</trim_type>
  1380. <case_insensitive>N</case_insensitive>
  1381. <collator_disabled>Y</collator_disabled>
  1382. <collator_strength>0</collator_strength>
  1383. <sort_descending>N</sort_descending>
  1384. <output_padding>N</output_padding>
  1385. <date_format_lenient>N</date_format_lenient>
  1386. <date_format_locale>zh_CN</date_format_locale>
  1387. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1388. <lenient_string_to_number>N</lenient_string_to_number>
  1389. </value-meta>
  1390. <value-meta>
  1391. <type>String</type>
  1392. <storagetype>normal</storagetype>
  1393. <name>mom_location_code</name>
  1394. <length>50</length>
  1395. <precision>-1</precision>
  1396. <origin>表输入-mom物料档案</origin>
  1397. <comments>mom_location_code</comments>
  1398. <conversion_Mask/>
  1399. <decimal_symbol>.</decimal_symbol>
  1400. <grouping_symbol>,</grouping_symbol>
  1401. <currency_symbol/>
  1402. <trim_type>none</trim_type>
  1403. <case_insensitive>N</case_insensitive>
  1404. <collator_disabled>Y</collator_disabled>
  1405. <collator_strength>0</collator_strength>
  1406. <sort_descending>N</sort_descending>
  1407. <output_padding>N</output_padding>
  1408. <date_format_lenient>N</date_format_lenient>
  1409. <date_format_locale>zh_CN</date_format_locale>
  1410. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1411. <lenient_string_to_number>N</lenient_string_to_number>
  1412. </value-meta>
  1413. </row-meta>
  1414. <attributes/>
  1415. <cluster_schema/>
  1416. <remotesteps>
  1417. <input>
  1418. </input>
  1419. <output>
  1420. </output>
  1421. </remotesteps>
  1422. <GUI>
  1423. <xloc>480</xloc>
  1424. <yloc>224</yloc>
  1425. <draw>Y</draw>
  1426. </GUI>
  1427. </step>
  1428. <step>
  1429. <name>表输入-主id</name>
  1430. <type>TableInput</type>
  1431. <description/>
  1432. <distribute>Y</distribute>
  1433. <custom_distribution/>
  1434. <copies>1</copies>
  1435. <partitioning>
  1436. <method>none</method>
  1437. <schema_name/>
  1438. </partitioning>
  1439. <connection>MOM</connection>
  1440. <sql>SELECT
  1441. 0${interface_id} as master_interface_id,
  1442. id as mom_task_in_id
  1443. FROM wms_task_in
  1444. WHERE interface_id =0${interface_id} AND bill_type_code ='4' ORDER BY create_time DESC LIMIT 1
  1445. </sql>
  1446. <limit>0</limit>
  1447. <lookup/>
  1448. <execute_each_row>N</execute_each_row>
  1449. <variables_active>Y</variables_active>
  1450. <lazy_conversion_active>N</lazy_conversion_active>
  1451. <cached_row_meta_active>N</cached_row_meta_active>
  1452. <row-meta>
  1453. <value-meta>
  1454. <type>Integer</type>
  1455. <storagetype>normal</storagetype>
  1456. <name>master_interface_id</name>
  1457. <length>15</length>
  1458. <precision>0</precision>
  1459. <origin>表输入-主id</origin>
  1460. <comments>master_interface_id</comments>
  1461. <conversion_Mask>####0;-####0</conversion_Mask>
  1462. <decimal_symbol>.</decimal_symbol>
  1463. <grouping_symbol>,</grouping_symbol>
  1464. <currency_symbol/>
  1465. <trim_type>none</trim_type>
  1466. <case_insensitive>N</case_insensitive>
  1467. <collator_disabled>Y</collator_disabled>
  1468. <collator_strength>0</collator_strength>
  1469. <sort_descending>N</sort_descending>
  1470. <output_padding>N</output_padding>
  1471. <date_format_lenient>N</date_format_lenient>
  1472. <date_format_locale>zh_CN</date_format_locale>
  1473. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1474. <lenient_string_to_number>N</lenient_string_to_number>
  1475. </value-meta>
  1476. <value-meta>
  1477. <type>String</type>
  1478. <storagetype>normal</storagetype>
  1479. <name>mom_task_in_id</name>
  1480. <length>20</length>
  1481. <precision>-1</precision>
  1482. <origin>表输入-主id</origin>
  1483. <comments>mom_task_in_id</comments>
  1484. <conversion_Mask/>
  1485. <decimal_symbol>.</decimal_symbol>
  1486. <grouping_symbol>,</grouping_symbol>
  1487. <currency_symbol/>
  1488. <trim_type>none</trim_type>
  1489. <case_insensitive>N</case_insensitive>
  1490. <collator_disabled>Y</collator_disabled>
  1491. <collator_strength>0</collator_strength>
  1492. <sort_descending>N</sort_descending>
  1493. <output_padding>N</output_padding>
  1494. <date_format_lenient>N</date_format_lenient>
  1495. <date_format_locale>zh_CN</date_format_locale>
  1496. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1497. <lenient_string_to_number>N</lenient_string_to_number>
  1498. </value-meta>
  1499. </row-meta>
  1500. <attributes/>
  1501. <cluster_schema/>
  1502. <remotesteps>
  1503. <input>
  1504. </input>
  1505. <output>
  1506. </output>
  1507. </remotesteps>
  1508. <GUI>
  1509. <xloc>288</xloc>
  1510. <yloc>224</yloc>
  1511. <draw>Y</draw>
  1512. </GUI>
  1513. </step>
  1514. <step>
  1515. <name>获取变量</name>
  1516. <type>GetVariable</type>
  1517. <description/>
  1518. <distribute>Y</distribute>
  1519. <custom_distribution/>
  1520. <copies>1</copies>
  1521. <partitioning>
  1522. <method>none</method>
  1523. <schema_name/>
  1524. </partitioning>
  1525. <fields>
  1526. <field>
  1527. <name>mysql_driverclassname</name>
  1528. <variable>${mysql_driverclassname}</variable>
  1529. <type>String</type>
  1530. <format/>
  1531. <currency/>
  1532. <decimal/>
  1533. <group/>
  1534. <length>-1</length>
  1535. <precision>-1</precision>
  1536. <trim_type>none</trim_type>
  1537. </field>
  1538. <field>
  1539. <name>mysql_password</name>
  1540. <variable>${mysql_password}</variable>
  1541. <type>String</type>
  1542. <format/>
  1543. <currency/>
  1544. <decimal/>
  1545. <group/>
  1546. <length>-1</length>
  1547. <precision>-1</precision>
  1548. <trim_type>none</trim_type>
  1549. </field>
  1550. <field>
  1551. <name>mysql_url</name>
  1552. <variable>${mysql_url}</variable>
  1553. <type>String</type>
  1554. <format/>
  1555. <currency/>
  1556. <decimal/>
  1557. <group/>
  1558. <length>-1</length>
  1559. <precision>-1</precision>
  1560. <trim_type>none</trim_type>
  1561. </field>
  1562. <field>
  1563. <name>mysql_username</name>
  1564. <variable>${mysql_username}</variable>
  1565. <type>String</type>
  1566. <format/>
  1567. <currency/>
  1568. <decimal/>
  1569. <group/>
  1570. <length>-1</length>
  1571. <precision>-1</precision>
  1572. <trim_type>none</trim_type>
  1573. </field>
  1574. <field>
  1575. <name>USER_ID</name>
  1576. <variable>${USER_ID}</variable>
  1577. <type>String</type>
  1578. <format/>
  1579. <currency/>
  1580. <decimal/>
  1581. <group/>
  1582. <length>-1</length>
  1583. <precision>-1</precision>
  1584. <trim_type>none</trim_type>
  1585. </field>
  1586. <field>
  1587. <name>sqlserver_driverclassname</name>
  1588. <variable>${sqlserver_driverclassname}</variable>
  1589. <type>String</type>
  1590. <format/>
  1591. <currency/>
  1592. <decimal/>
  1593. <group/>
  1594. <length>-1</length>
  1595. <precision>-1</precision>
  1596. <trim_type>none</trim_type>
  1597. </field>
  1598. <field>
  1599. <name>sqlserver_password</name>
  1600. <variable>${sqlserver_password}</variable>
  1601. <type>String</type>
  1602. <format/>
  1603. <currency/>
  1604. <decimal/>
  1605. <group/>
  1606. <length>-1</length>
  1607. <precision>-1</precision>
  1608. <trim_type>none</trim_type>
  1609. </field>
  1610. <field>
  1611. <name>sqlserver_url</name>
  1612. <variable>${sqlserver_url}</variable>
  1613. <type>String</type>
  1614. <format/>
  1615. <currency/>
  1616. <decimal/>
  1617. <group/>
  1618. <length>-1</length>
  1619. <precision>-1</precision>
  1620. <trim_type>none</trim_type>
  1621. </field>
  1622. <field>
  1623. <name>sqlserver_username</name>
  1624. <variable>${sqlserver_username}</variable>
  1625. <type>String</type>
  1626. <format/>
  1627. <currency/>
  1628. <decimal/>
  1629. <group/>
  1630. <length>-1</length>
  1631. <precision>-1</precision>
  1632. <trim_type>none</trim_type>
  1633. </field>
  1634. <field>
  1635. <name>USER_NAME</name>
  1636. <variable>${USER_NAME}</variable>
  1637. <type>String</type>
  1638. <format/>
  1639. <currency/>
  1640. <decimal/>
  1641. <group/>
  1642. <length>-1</length>
  1643. <precision>-1</precision>
  1644. <trim_type>none</trim_type>
  1645. </field>
  1646. <field>
  1647. <name>BEGIN_DATE</name>
  1648. <variable>${BEGIN_DATE}</variable>
  1649. <type>String</type>
  1650. <format/>
  1651. <currency/>
  1652. <decimal/>
  1653. <group/>
  1654. <length>-1</length>
  1655. <precision>-1</precision>
  1656. <trim_type>none</trim_type>
  1657. </field>
  1658. <field>
  1659. <name>END_DATE</name>
  1660. <variable>${END_DATE}</variable>
  1661. <type>String</type>
  1662. <format/>
  1663. <currency/>
  1664. <decimal/>
  1665. <group/>
  1666. <length>-1</length>
  1667. <precision>-1</precision>
  1668. <trim_type>none</trim_type>
  1669. </field>
  1670. <field>
  1671. <name>DEPT_CODE</name>
  1672. <variable>${DEPT_CODE}</variable>
  1673. <type>String</type>
  1674. <format/>
  1675. <currency/>
  1676. <decimal/>
  1677. <group/>
  1678. <length>-1</length>
  1679. <precision>-1</precision>
  1680. <trim_type>none</trim_type>
  1681. </field>
  1682. <field>
  1683. <name>mysql_host</name>
  1684. <variable>${mysql_host}</variable>
  1685. <type>String</type>
  1686. <format/>
  1687. <currency/>
  1688. <decimal/>
  1689. <group/>
  1690. <length>-1</length>
  1691. <precision>-1</precision>
  1692. <trim_type>none</trim_type>
  1693. </field>
  1694. <field>
  1695. <name>mysql_dbname</name>
  1696. <variable>${mysql_dbname}</variable>
  1697. <type>String</type>
  1698. <format/>
  1699. <currency/>
  1700. <decimal/>
  1701. <group/>
  1702. <length>-1</length>
  1703. <precision>-1</precision>
  1704. <trim_type>none</trim_type>
  1705. </field>
  1706. </fields>
  1707. <attributes/>
  1708. <cluster_schema/>
  1709. <remotesteps>
  1710. <input>
  1711. </input>
  1712. <output>
  1713. </output>
  1714. </remotesteps>
  1715. <GUI>
  1716. <xloc>97</xloc>
  1717. <yloc>567</yloc>
  1718. <draw>Y</draw>
  1719. </GUI>
  1720. </step>
  1721. <step_error_handling>
  1722. </step_error_handling>
  1723. <slave-step-copy-partition-distribution>
  1724. </slave-step-copy-partition-distribution>
  1725. <slave_transformation>N</slave_transformation>
  1726. <attributes/>
  1727. </transformation>