Plan.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. namespace Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.SqlCollection
  7. {
  8. public class Plan
  9. {
  10. public static String QUERY_ORDER_DLIV = @"select a.order_no,
  11. min(b.customer_no) customer_no,
  12. min(b.forecorpcode) forecorpcode,
  13. TRANSIT_TYP,
  14. region_no,
  15. destination,
  16. station_no,
  17. spcl_ln_no,
  18. isownedcar,
  19. isshipping,
  20. port_no,
  21. port_desc,
  22. carrier_unit,
  23. inceptcorpcode,
  24. sum(a.order_qty) order_qty,
  25. sum(a.weight) weight
  26. from slm_order_line a
  27. join slm_order_head b on a.order_no = b.order_no
  28. join slm_order_delivery_transit c on a.order_no = c.order_no
  29. and a.order_seq = c.order_seq
  30. where 1 = 1 {0}
  31. group by a.order_no,
  32. TRANSIT_TYP,
  33. region_no,
  34. destination,
  35. station_no,
  36. spcl_ln_no,
  37. isownedcar,
  38. isshipping,
  39. port_no,
  40. port_desc,
  41. carrier_unit,
  42. inceptcorpcode
  43. ";
  44. public static string QUERY_SLM_DLIV_DIR = @"select
  45. dliv_dirno,
  46. forecorpcode,
  47. customer_no,
  48. plandate,
  49. transport_num,
  50. transit_typ,
  51. get_on_pcd,
  52. quantity,
  53. weight,
  54. trans_car_no,
  55. ship_no,
  56. destination,
  57. station_no,
  58. station_nm,
  59. spcl_ln_no,
  60. spcl_ln_nm,
  61. isshipping,
  62. port_no,
  63. port_desc,
  64. inceptcorpcode,
  65. reinceptcorp,
  66. receivor,
  67. carrier_unit,
  68. phonecode,
  69. driveridcard,
  70. dliv_prog_cd,
  71. isout,
  72. printstatus,
  73. tranprtstatus,
  74. to_char(dliv_rollbacktime,'{1}') dliv_rollbacktime,
  75. dliv_rollbackname,
  76. validflag,
  77. create_name,
  78. to_char(create_time,'{1}') create_time,
  79. update_name,
  80. to_char(update_time,'{1}') update_time,
  81. delete_name,
  82. to_char(delete_time,'{1}') delete_time
  83. from slm_dliv_dir where 1= 1 {0} ";
  84. public static string QUERY_SLM_DELV_DIR_DETAIL = @"select
  85. dliv_dirno,
  86. seq,
  87. order_no,
  88. order_seq,
  89. height,
  90. width,
  91. length,
  92. prod_line,
  93. producname,
  94. spec_abbsym,
  95. steel_code,
  96. used_cd,
  97. prdnm_cd,
  98. quantity,
  99. weight,
  100. price,
  101. money,
  102. transmoney,
  103. deduct_flag,
  104. to_char(deduct_date,'{1}') deduct_date,
  105. to_char(refund_back,'{1}') refund_back,
  106. ship_dliv_prog_cd,
  107. create_name,
  108. to_char(create_time,'{1}') create_time,
  109. update_name,
  110. to_char(update_time,'{1}') update_time,
  111. from slm_dliv_dir_detail where 1 = 1 ";
  112. public static string QUERY_SEND_INFO = @"select b.order_ln_status,
  113. b.order_no,
  114. b.order_seq,
  115. c.prod_line,
  116. c.steel_code,
  117. b.height,
  118. b.width,
  119. b.length,
  120. b.weight,
  121. d.station_no,
  122. d.port_no,
  123. d.inceptcorpcode,
  124. a.customer_no,
  125. b.order_qty,
  126. b.fixsize,
  127. b.delvry_bdate,
  128. b.memo,
  129. a.order_bdate,
  130. a.order_edate
  131. from slm_order_head a
  132. join slm_order_line b
  133. on a.order_no = b.order_no
  134. join slm_order_prod c
  135. on b.order_no = c.order_no
  136. and b.order_seq = c.order_seq
  137. join slm_order_delivery_transit d
  138. on b.order_no = d.order_no
  139. and b.order_seq = d.order_seq
  140. where 1 = 1 {0}";
  141. public static string QUERY_SHIPNOAPPLYRINPUT = @"select transport_num,
  142. to_char(transmonth,'yyyy-mm') transmonth,
  143. transit_typ,
  144. wagon_no,
  145. quantity,
  146. weight,
  147. load_wgt,
  148. slab_wgt,
  149. destination,
  150. station_no,
  151. port_no,
  152. port_desc,
  153. carrier_unit,
  154. contact_name,
  155. contact_phone,
  156. scheme_no,
  157. remark,
  158. validflag,
  159. create_name,
  160. to_char(create_time,'{1}') create_time,
  161. update_name,
  162. to_char(update_time,'{1}') update_time,
  163. delete_name,
  164. to_char(delete_time,'{1}') delete_time
  165. from slm_dliv_shipapply_result
  166. where 1 = 1 {0}";
  167. }
  168. }