BaseData.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.SqlCollection
  6. {
  7. public class BaseData
  8. {
  9. /// <summary>
  10. /// 查询客户基础信息
  11. /// </summary>
  12. public static string _QUERYSLMBASECUSTOMER = @"select
  13. customer_no,
  14. customer_nm,
  15. forecorpcode,
  16. forecorpname,
  17. region_nm,
  18. sale_org,
  19. bigarea,
  20. region_no,
  21. custm_lvl,
  22. market_sys,
  23. abrvition,
  24. org,
  25. py,
  26. validflag,
  27. create_name,
  28. to_char(create_time,'{1}') create_time,
  29. update_name,
  30. to_char(update_time,'{1}') update_time,
  31. delete_name,
  32. to_char(delete_time,'{1}') delete_time
  33. from slm_base_customer
  34. where 1 = 1 {0} ";
  35. /// <summary>
  36. /// 查询扩展信息SQL
  37. /// </summary>
  38. public static string _QUERYSLMBASECUSTMUNITIF = @"select
  39. custm_ctgry,
  40. cust_seq,
  41. custm_prpty,
  42. legal_psn,
  43. agent,
  44. address,
  45. zip_code,
  46. bank,
  47. account,
  48. tax_id,
  49. phone,
  50. salecard,
  51. fax,
  52. create_name,
  53. to_char(create_time,'{1}') create_time
  54. from slm_base_custm_unit where 1 = 1 {0} ";
  55. public static string _QUERYSLMBASECUSTFERINFO = @"select
  56. customer_no,
  57. sale_org,
  58. address,
  59. region_no,
  60. station_no,
  61. spcl_ln_no,
  62. trans_typ,
  63. isownedcar,
  64. isshipping,
  65. incerptcode,
  66. loaddock,
  67. unloaddock,
  68. ship_destination,
  69. memo,
  70. validflag,
  71. create_name,
  72. to_char(create_time,'{1}') create_time,
  73. update_name,
  74. to_char(update_time,'{1}') update_time,
  75. delete_name,
  76. to_char(delete_time,'{1}') delete_time,
  77. forecorpcode,
  78. freight_no,
  79. station_nm
  80. from slm_base_custm_freight
  81. where 1 = 1 {0}";
  82. /// <summary>
  83. /// 查询子公司信息
  84. /// </summary>
  85. public static string _QUERYSLMFORECORPINFO = @"select
  86. forecorpcode ,
  87. forecorpname ,
  88. principal ,
  89. address ,
  90. validflag ,
  91. fore_tp ,
  92. create_name,
  93. to_char(create_time,'{1}') create_time,
  94. update_name,
  95. to_char(update_time,'{1}') update_time,
  96. delete_name,
  97. to_char(delete_time,'{1}') delete_time
  98. from slm_base_forecorpinfo
  99. where 1 = 1 {0} ";
  100. /// <summary>
  101. /// 查询运输信息
  102. /// </summary>
  103. public static string _QUERYSLMBASESTATION = @"select
  104. station_no,
  105. station_nm,
  106. loaddock,
  107. unloaddock,
  108. transfee,
  109. accept_person,
  110. telcode,
  111. percode,
  112. owned_city,
  113. remark
  114. from slm_base_station where 1 = 1 {0} ";
  115. /// <summary>
  116. /// 查询区域信息
  117. /// </summary>
  118. public static string _QUERYSLMBASEREGION = @"select
  119. region_no,
  120. region_nm,
  121. p_region_no,
  122. region_type,
  123. capital_fl,
  124. pr_capital_fl,
  125. region_seq,
  126. fl,
  127. reg_id,
  128. reg_dtime,
  129. mod_id,
  130. mod_dtime
  131. from slm_base_region where 1 = 1 {0}";
  132. /// <summary>
  133. /// 查询区域类型信息
  134. /// </summary>
  135. public static string _QUERYSLMBASEREGIONTYPE = @"select
  136. region_lvl_no,
  137. region_lvl_nm,
  138. region_type_no,
  139. region_type_nm,
  140. fl,
  141. reg_id,
  142. reg_dtime,
  143. mod_id,
  144. mod_dtime
  145. from slm_base_region_type where 1 = 1 {0}";
  146. /// <summary>
  147. /// 获取行政区域级别信息
  148. /// </summary>
  149. public static string _GETDISTINCTREGIONTPE = @"select
  150. distinct region_lvl_no,
  151. region_lvl_nm
  152. from slm_base_region_tpe
  153. order by region_lvl_no";
  154. /// <summary>
  155. /// 获取行政区域级别信息
  156. /// </summary>
  157. public static string _GETDISTINCTREGIONTYPE = @"select
  158. distinct region_lvl_no,
  159. region_lvl_nm,
  160. region_type_no,
  161. region_type_nm
  162. from slm_base_region_tpe
  163. order by region_lvl_no";
  164. }
  165. }