ctlKCJListStat.cs 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916
  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Windows.Forms;
  7. namespace Core.XgMes.Client.JGKC.SteelPlateManager
  8. {
  9. /// <summary>
  10. /// 中板成品库存综合查询统计分析控件
  11. /// </summary>
  12. public class ctlKCJListStat : System.Windows.Forms.UserControl
  13. {
  14. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatButtress;
  15. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatRollNO;
  16. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatBilletID;
  17. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatResult;
  18. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatPlanNO;
  19. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatCondole;
  20. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatSend;
  21. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatSendOnly;
  22. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_StatInTime;
  23. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_NOrderNOStat;
  24. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_PlyStat;
  25. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_WidthStat;
  26. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_LengthStat;
  27. private Infragistics.Win.UltraWinEditors.UltraCheckEditor Chk_StatPrd;
  28. private Infragistics.Win.UltraWinEditors.UltraCheckEditor Chk_StatStoveNO;
  29. private Infragistics.Win.UltraWinEditors.UltraCheckEditor Chk_StatRemark;
  30. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_shdw;
  31. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_DZ;
  32. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultchkPactnoDW;
  33. private Infragistics.Win.UltraWinEditors.UltraCheckEditor uchk_InSteel;
  34. private Infragistics.Win.UltraWinEditors.UltraCheckEditor uchk_Steel;
  35. private Infragistics.Win.UltraWinEditors.UltraCheckEditor uck_Pactno;
  36. /// <summary>
  37. /// 必需的设计器变量。
  38. /// </summary>
  39. private System.ComponentModel.Container components = null;
  40. public ctlKCJListStat()
  41. {
  42. // 该调用是 Windows.Forms 窗体设计器所必需的。
  43. InitializeComponent();
  44. // TODO: 在 InitializeComponent 调用后添加任何初始化
  45. }
  46. /// <summary>
  47. /// 清理所有正在使用的资源。
  48. /// </summary>
  49. protected override void Dispose( bool disposing )
  50. {
  51. if( disposing )
  52. {
  53. if(components != null)
  54. {
  55. components.Dispose();
  56. }
  57. }
  58. base.Dispose( disposing );
  59. }
  60. #region 组件设计器生成的代码
  61. /// <summary>
  62. /// 设计器支持所需的方法 - 不要使用代码编辑器
  63. /// 修改此方法的内容。
  64. /// </summary>
  65. private void InitializeComponent()
  66. {
  67. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  68. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  69. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  70. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  71. Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
  72. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  73. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  74. Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
  75. Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
  76. Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
  77. Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
  78. Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
  79. Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
  80. Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
  81. Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
  82. Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
  83. Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
  84. Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
  85. Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
  86. Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance();
  87. Infragistics.Win.Appearance appearance21 = new Infragistics.Win.Appearance();
  88. Infragistics.Win.Appearance appearance22 = new Infragistics.Win.Appearance();
  89. this.chk_StatButtress = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  90. this.chk_StatRollNO = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  91. this.chk_StatBilletID = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  92. this.chk_StatResult = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  93. this.chk_StatPlanNO = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  94. this.chk_StatCondole = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  95. this.chk_StatSend = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  96. this.chk_StatSendOnly = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  97. this.chk_StatInTime = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  98. this.chk_NOrderNOStat = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  99. this.chk_PlyStat = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  100. this.chk_WidthStat = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  101. this.chk_LengthStat = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  102. this.Chk_StatPrd = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  103. this.Chk_StatStoveNO = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  104. this.Chk_StatRemark = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  105. this.chk_shdw = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  106. this.chk_DZ = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  107. this.ultchkPactnoDW = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  108. this.uchk_InSteel = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  109. this.uchk_Steel = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  110. this.uck_Pactno = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  111. this.SuspendLayout();
  112. //
  113. // chk_StatButtress
  114. //
  115. appearance1.BackColor = System.Drawing.Color.LightCyan;
  116. this.chk_StatButtress.Appearance = appearance1;
  117. this.chk_StatButtress.Location = new System.Drawing.Point(0, 2);
  118. this.chk_StatButtress.Name = "chk_StatButtress";
  119. this.chk_StatButtress.Size = new System.Drawing.Size(102, 20);
  120. this.chk_StatButtress.TabIndex = 34;
  121. this.chk_StatButtress.Text = "堆位";
  122. //
  123. // chk_StatRollNO
  124. //
  125. appearance2.BackColor = System.Drawing.Color.LightCyan;
  126. this.chk_StatRollNO.Appearance = appearance2;
  127. this.chk_StatRollNO.Location = new System.Drawing.Point(98, 2);
  128. this.chk_StatRollNO.Name = "chk_StatRollNO";
  129. this.chk_StatRollNO.Size = new System.Drawing.Size(92, 20);
  130. this.chk_StatRollNO.TabIndex = 35;
  131. this.chk_StatRollNO.Text = "轧编号";
  132. //
  133. // chk_StatBilletID
  134. //
  135. appearance3.BackColor = System.Drawing.Color.LightCyan;
  136. this.chk_StatBilletID.Appearance = appearance3;
  137. this.chk_StatBilletID.Location = new System.Drawing.Point(0, 52);
  138. this.chk_StatBilletID.Name = "chk_StatBilletID";
  139. this.chk_StatBilletID.Size = new System.Drawing.Size(102, 20);
  140. this.chk_StatBilletID.TabIndex = 36;
  141. this.chk_StatBilletID.Text = "序号";
  142. //
  143. // chk_StatResult
  144. //
  145. appearance4.BackColor = System.Drawing.Color.LightCyan;
  146. this.chk_StatResult.Appearance = appearance4;
  147. this.chk_StatResult.Checked = true;
  148. this.chk_StatResult.CheckState = System.Windows.Forms.CheckState.Checked;
  149. this.chk_StatResult.Location = new System.Drawing.Point(0, 73);
  150. this.chk_StatResult.Name = "chk_StatResult";
  151. this.chk_StatResult.Size = new System.Drawing.Size(102, 20);
  152. this.chk_StatResult.TabIndex = 38;
  153. this.chk_StatResult.Text = "含判定结果";
  154. //
  155. // chk_StatPlanNO
  156. //
  157. appearance5.BackColor = System.Drawing.Color.LightCyan;
  158. this.chk_StatPlanNO.Appearance = appearance5;
  159. this.chk_StatPlanNO.Location = new System.Drawing.Point(0, 18);
  160. this.chk_StatPlanNO.Name = "chk_StatPlanNO";
  161. this.chk_StatPlanNO.Size = new System.Drawing.Size(102, 20);
  162. this.chk_StatPlanNO.TabIndex = 41;
  163. this.chk_StatPlanNO.Text = "现计划号";
  164. //
  165. // chk_StatCondole
  166. //
  167. appearance6.BackColor = System.Drawing.Color.LightCyan;
  168. this.chk_StatCondole.Appearance = appearance6;
  169. this.chk_StatCondole.Location = new System.Drawing.Point(98, 19);
  170. this.chk_StatCondole.Name = "chk_StatCondole";
  171. this.chk_StatCondole.Size = new System.Drawing.Size(92, 20);
  172. this.chk_StatCondole.TabIndex = 42;
  173. this.chk_StatCondole.Text = "含吊号";
  174. //
  175. // chk_StatSend
  176. //
  177. appearance7.BackColor = System.Drawing.Color.LightCyan;
  178. this.chk_StatSend.Appearance = appearance7;
  179. this.chk_StatSend.Location = new System.Drawing.Point(0, 129);
  180. this.chk_StatSend.Name = "chk_StatSend";
  181. this.chk_StatSend.Size = new System.Drawing.Size(102, 20);
  182. this.chk_StatSend.TabIndex = 43;
  183. this.chk_StatSend.Text = "含已发运";
  184. this.chk_StatSend.CheckedChanged += new System.EventHandler(this.chk_StatSend_CheckedChanged);
  185. //
  186. // chk_StatSendOnly
  187. //
  188. appearance8.BackColor = System.Drawing.Color.LightCyan;
  189. this.chk_StatSendOnly.Appearance = appearance8;
  190. this.chk_StatSendOnly.Location = new System.Drawing.Point(98, 73);
  191. this.chk_StatSendOnly.Name = "chk_StatSendOnly";
  192. this.chk_StatSendOnly.Size = new System.Drawing.Size(92, 20);
  193. this.chk_StatSendOnly.TabIndex = 45;
  194. this.chk_StatSendOnly.Text = "仅已发运";
  195. this.chk_StatSendOnly.CheckedChanged += new System.EventHandler(this.chk_StatSendOnly_CheckedChanged);
  196. //
  197. // chk_StatInTime
  198. //
  199. appearance9.BackColor = System.Drawing.Color.LightCyan;
  200. this.chk_StatInTime.Appearance = appearance9;
  201. this.chk_StatInTime.Location = new System.Drawing.Point(0, 147);
  202. this.chk_StatInTime.Name = "chk_StatInTime";
  203. this.chk_StatInTime.Size = new System.Drawing.Size(102, 20);
  204. this.chk_StatInTime.TabIndex = 47;
  205. this.chk_StatInTime.Text = "含入库信息";
  206. //
  207. // chk_NOrderNOStat
  208. //
  209. appearance10.BackColor = System.Drawing.Color.LightCyan;
  210. this.chk_NOrderNOStat.Appearance = appearance10;
  211. this.chk_NOrderNOStat.Location = new System.Drawing.Point(0, 34);
  212. this.chk_NOrderNOStat.Name = "chk_NOrderNOStat";
  213. this.chk_NOrderNOStat.Size = new System.Drawing.Size(102, 20);
  214. this.chk_NOrderNOStat.TabIndex = 49;
  215. this.chk_NOrderNOStat.Text = "现订单号";
  216. //
  217. // chk_PlyStat
  218. //
  219. appearance11.BackColor = System.Drawing.Color.LightCyan;
  220. this.chk_PlyStat.Appearance = appearance11;
  221. this.chk_PlyStat.Location = new System.Drawing.Point(0, 93);
  222. this.chk_PlyStat.Name = "chk_PlyStat";
  223. this.chk_PlyStat.Size = new System.Drawing.Size(80, 20);
  224. this.chk_PlyStat.TabIndex = 52;
  225. this.chk_PlyStat.Text = "厚";
  226. //
  227. // chk_WidthStat
  228. //
  229. appearance12.BackColor = System.Drawing.Color.LightCyan;
  230. this.chk_WidthStat.Appearance = appearance12;
  231. this.chk_WidthStat.Location = new System.Drawing.Point(52, 93);
  232. this.chk_WidthStat.Name = "chk_WidthStat";
  233. this.chk_WidthStat.Size = new System.Drawing.Size(80, 20);
  234. this.chk_WidthStat.TabIndex = 53;
  235. this.chk_WidthStat.Text = "宽";
  236. //
  237. // chk_LengthStat
  238. //
  239. appearance13.BackColor = System.Drawing.Color.LightCyan;
  240. this.chk_LengthStat.Appearance = appearance13;
  241. this.chk_LengthStat.Location = new System.Drawing.Point(0, 109);
  242. this.chk_LengthStat.Name = "chk_LengthStat";
  243. this.chk_LengthStat.Size = new System.Drawing.Size(102, 20);
  244. this.chk_LengthStat.TabIndex = 54;
  245. this.chk_LengthStat.Text = "含长度";
  246. //
  247. // Chk_StatPrd
  248. //
  249. appearance14.BackColor = System.Drawing.Color.LightCyan;
  250. this.Chk_StatPrd.Appearance = appearance14;
  251. this.Chk_StatPrd.Location = new System.Drawing.Point(0, 166);
  252. this.Chk_StatPrd.Name = "Chk_StatPrd";
  253. this.Chk_StatPrd.Size = new System.Drawing.Size(102, 20);
  254. this.Chk_StatPrd.TabIndex = 56;
  255. this.Chk_StatPrd.Text = "含生产信息";
  256. //
  257. // Chk_StatStoveNO
  258. //
  259. appearance15.BackColor = System.Drawing.Color.LightCyan;
  260. this.Chk_StatStoveNO.Appearance = appearance15;
  261. this.Chk_StatStoveNO.Location = new System.Drawing.Point(98, 38);
  262. this.Chk_StatStoveNO.Name = "Chk_StatStoveNO";
  263. this.Chk_StatStoveNO.Size = new System.Drawing.Size(92, 20);
  264. this.Chk_StatStoveNO.TabIndex = 57;
  265. this.Chk_StatStoveNO.Text = "炉号";
  266. //
  267. // Chk_StatRemark
  268. //
  269. appearance16.BackColor = System.Drawing.Color.LightCyan;
  270. this.Chk_StatRemark.Appearance = appearance16;
  271. this.Chk_StatRemark.Location = new System.Drawing.Point(98, 90);
  272. this.Chk_StatRemark.Name = "Chk_StatRemark";
  273. this.Chk_StatRemark.Size = new System.Drawing.Size(92, 20);
  274. this.Chk_StatRemark.TabIndex = 58;
  275. this.Chk_StatRemark.Text = "备注";
  276. //
  277. // chk_shdw
  278. //
  279. appearance17.BackColor = System.Drawing.Color.LightCyan;
  280. this.chk_shdw.Appearance = appearance17;
  281. this.chk_shdw.Location = new System.Drawing.Point(98, 112);
  282. this.chk_shdw.Name = "chk_shdw";
  283. this.chk_shdw.Size = new System.Drawing.Size(84, 17);
  284. this.chk_shdw.TabIndex = 66;
  285. this.chk_shdw.Text = "收货单位";
  286. //
  287. // chk_DZ
  288. //
  289. appearance18.BackColor = System.Drawing.Color.LightCyan;
  290. this.chk_DZ.Appearance = appearance18;
  291. this.chk_DZ.Location = new System.Drawing.Point(98, 129);
  292. this.chk_DZ.Name = "chk_DZ";
  293. this.chk_DZ.Size = new System.Drawing.Size(56, 17);
  294. this.chk_DZ.TabIndex = 65;
  295. this.chk_DZ.Text = "到站";
  296. //
  297. // ultchkPactnoDW
  298. //
  299. appearance19.BackColor = System.Drawing.Color.LightCyan;
  300. this.ultchkPactnoDW.Appearance = appearance19;
  301. this.ultchkPactnoDW.Location = new System.Drawing.Point(98, 55);
  302. this.ultchkPactnoDW.Name = "ultchkPactnoDW";
  303. this.ultchkPactnoDW.Size = new System.Drawing.Size(92, 20);
  304. this.ultchkPactnoDW.TabIndex = 69;
  305. this.ultchkPactnoDW.Text = "合同单位";
  306. //
  307. // uchk_InSteel
  308. //
  309. appearance20.BackColor = System.Drawing.Color.LightCyan;
  310. this.uchk_InSteel.Appearance = appearance20;
  311. this.uchk_InSteel.Location = new System.Drawing.Point(193, 2);
  312. this.uchk_InSteel.Name = "uchk_InSteel";
  313. this.uchk_InSteel.Size = new System.Drawing.Size(92, 20);
  314. this.uchk_InSteel.TabIndex = 73;
  315. this.uchk_InSteel.Text = "入库牌号";
  316. //
  317. // uchk_Steel
  318. //
  319. appearance21.BackColor = System.Drawing.Color.LightCyan;
  320. this.uchk_Steel.Appearance = appearance21;
  321. this.uchk_Steel.Location = new System.Drawing.Point(193, 20);
  322. this.uchk_Steel.Name = "uchk_Steel";
  323. this.uchk_Steel.Size = new System.Drawing.Size(92, 20);
  324. this.uchk_Steel.TabIndex = 74;
  325. this.uchk_Steel.Text = "牌号";
  326. //
  327. // uck_Pactno
  328. //
  329. appearance22.BackColor = System.Drawing.Color.LightCyan;
  330. this.uck_Pactno.Appearance = appearance22;
  331. this.uck_Pactno.Location = new System.Drawing.Point(193, 38);
  332. this.uck_Pactno.Name = "uck_Pactno";
  333. this.uck_Pactno.Size = new System.Drawing.Size(92, 20);
  334. this.uck_Pactno.TabIndex = 76;
  335. this.uck_Pactno.Text = "合同号";
  336. //
  337. // ctlKCJListStat
  338. //
  339. this.Controls.Add(this.uck_Pactno);
  340. this.Controls.Add(this.uchk_Steel);
  341. this.Controls.Add(this.uchk_InSteel);
  342. this.Controls.Add(this.chk_shdw);
  343. this.Controls.Add(this.chk_DZ);
  344. this.Controls.Add(this.ultchkPactnoDW);
  345. this.Controls.Add(this.Chk_StatRemark);
  346. this.Controls.Add(this.Chk_StatStoveNO);
  347. this.Controls.Add(this.Chk_StatPrd);
  348. this.Controls.Add(this.chk_LengthStat);
  349. this.Controls.Add(this.chk_WidthStat);
  350. this.Controls.Add(this.chk_PlyStat);
  351. this.Controls.Add(this.chk_NOrderNOStat);
  352. this.Controls.Add(this.chk_StatInTime);
  353. this.Controls.Add(this.chk_StatSendOnly);
  354. this.Controls.Add(this.chk_StatSend);
  355. this.Controls.Add(this.chk_StatCondole);
  356. this.Controls.Add(this.chk_StatPlanNO);
  357. this.Controls.Add(this.chk_StatResult);
  358. this.Controls.Add(this.chk_StatBilletID);
  359. this.Controls.Add(this.chk_StatRollNO);
  360. this.Controls.Add(this.chk_StatButtress);
  361. this.Name = "ctlKCJListStat";
  362. this.Size = new System.Drawing.Size(285, 187);
  363. this.ResumeLayout(false);
  364. }
  365. #endregion
  366. #region "Property
  367. private string _SelectStr = "SELECT 1 THEORYWEIGHTZL ";
  368. //+ "COUNT(A.BILLETID) QUANTITY,SUM(A.THEORYWEIGHT) THEORYWEIGHT ";
  369. private string _FromStr = "FROM KCJ_TURNOFFLIST_ZW A,KCJ_TURNOFFBUTTRESSLIST_ZW B,SEL_PACTDETAIL C WHERE A.BILLETID=B.BILLETID AND A.ORDERNO=C.ORDERNO(+) AND A.STORAGESTATUS='501602' AND A.ISVALID='1' ";
  370. private string _GroupbyStr = " GROUP BY A.DETERMINANTCARDNUMBER,BUYERCODE ";
  371. private string _SendSelectStr = " SELECT TO_CHAR(B.PICKSTORAGETIME,'YY-MM-DD HH24') PICKSTORAGETIME,B.LISTNUMBER ";
  372. private string _SendGroupby = " GROUP BY A.DETERMINANTCARDNUMBER,B.PICKSTORAGETIME,B.LISTNUMBER,BUYERCODE";
  373. private string _SendFromStr = " FROM KCJ_TURNOFFLIST_ZW A,KCJ_TURNOFFSENDLIST_ZW B,SEL_PACTDETAIL C WHERE A.BILLETID=B.SERIALNUMBER AND A.ORDERNO=C.ORDERNO(+) AND B.ISVALID<>'0' AND B.SENDTYPE<='1' AND A.ISVALID='1' ";
  374. private string _CSendSelectStr = " SELECT TO_CHAR(B.PICKSTORAGETIME,'YY-MM-DD HH24') PICKSTORAGETIME,B.LISTNUMBER";
  375. private string _CSendGroupBy = " GROUP BY A.DETERMINANTCARDNUMBER,B.PICKSTORAGETIME,B.LISTNUMBER,BUYERCODE";
  376. private string _CSendFromStr = " FROM KCJ_TURNOFFLIST_ZW A,KCJ_TURNOFFSENDLIST_ZW B,SEL_PACTINFO_CLEAR C WHERE A.BILLETID=B.SERIALNUMBER AND B.ISVALID<>'0' AND B.SENDTYPE<='1' AND A.ISVALID='1' ";
  377. //+" AND B.BUTTRESS=D.BUTTRESS(+) AND D.BUTTRESS(+) NOT IN('虚拟堆位','预装发运')";
  378. private void chk_StatSendOnly_CheckedChanged(object sender, System.EventArgs e)
  379. {
  380. if (this.chk_StatSendOnly.Checked)
  381. {
  382. this.chk_StatSend.Checked = false;
  383. }
  384. }
  385. private void chk_StatSend_CheckedChanged(object sender, System.EventArgs e)
  386. {
  387. if (this.chk_StatSend.Checked)
  388. {
  389. this.chk_StatSendOnly.Checked = false;
  390. }
  391. }
  392. public System.Collections.ArrayList SendSelectStr
  393. {
  394. get
  395. {
  396. if (this.chk_StatSend.Checked | this.chk_StatSendOnly.Checked)
  397. {
  398. System.Collections.ArrayList rtnList = new ArrayList();
  399. string rtnStr = _SendSelectStr;
  400. string CrtnStr = _CSendSelectStr;
  401. if (this.chk_StatButtress.Checked)
  402. {
  403. rtnStr = rtnStr + ",B.BUTTRESS ";
  404. CrtnStr = CrtnStr + ",B.BUTTRESS ";
  405. }
  406. if (this.chk_StatRollNO.Checked)
  407. {
  408. rtnStr = rtnStr + ",B.ROLLNO ROLLNUMBER ";
  409. CrtnStr = CrtnStr + ",B.ROLLNO ROLLNUMBER ";
  410. }
  411. if (this.chk_StatPlanNO.Checked)
  412. {
  413. rtnStr = rtnStr + ",C.PACTNO,C.PACTINDEX ";
  414. CrtnStr = CrtnStr + ",C.PACTNO,C.PACTINDEX ";
  415. }
  416. if (this.chk_NOrderNOStat.Checked)
  417. {
  418. rtnStr = rtnStr + ",B.ORDERFORMNUMBER ALLOTORDERFORM ";
  419. CrtnStr = CrtnStr + ",B.ORDERFORMNUMBER ALLOTORDERFORM ";
  420. }
  421. if (this.uchk_Steel.Checked)
  422. {
  423. rtnStr = rtnStr + ",A.DETERMINANTCARDNUMBER DETERMINANTCARDNUMBER ";
  424. CrtnStr = CrtnStr + ",A.DETERMINANTCARDNUMBER DETERMINANTCARDNUMBER ";
  425. }
  426. if (this.uchk_InSteel.Checked)
  427. {
  428. rtnStr = rtnStr + ",A.Insteel INSTROAGESTEEL ";
  429. CrtnStr = CrtnStr + ",A.Insteel INSTROAGESTEEL ";
  430. }
  431. if (this.chk_StatCondole.Checked)
  432. {
  433. rtnStr = rtnStr + ",B.CONDOLENUMBER ";
  434. CrtnStr = CrtnStr + ",B.CONDOLENUMBER ";
  435. }
  436. if (this.chk_StatResult.Checked)
  437. {
  438. rtnStr = rtnStr + ",(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=B.DETERMINANTRESULT) DETERMINANTRESULT,A.DETERMINANTREASON,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=B.JUDGEEASONCODE) JUDGEEASONCODE ";
  439. CrtnStr = CrtnStr + ",(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=B.DETERMINANTRESULT) DETERMINANTRESULT,A.DETERMINANTREASON,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=B.JUDGEEASONCODE) JUDGEEASONCODE ";
  440. }
  441. if (this.chk_PlyStat.Checked)
  442. {
  443. rtnStr = rtnStr + ",B.PLY ";
  444. CrtnStr = CrtnStr + ",B.PLY ";
  445. }
  446. if (this.chk_WidthStat.Checked)
  447. {
  448. rtnStr = rtnStr + ",B.WIDTH ";
  449. CrtnStr = CrtnStr + ",B.WIDTH ";
  450. }
  451. if (this.chk_LengthStat.Checked)
  452. {
  453. rtnStr = rtnStr + ",B.LENGTH ";
  454. CrtnStr = CrtnStr + ",B.LENGTH ";
  455. }
  456. if (this.Chk_StatStoveNO.Checked)
  457. {
  458. rtnStr = rtnStr + ",B.STOVENO ";
  459. CrtnStr = CrtnStr + ",B.STOVENO ";
  460. }
  461. if (this.uck_Pactno.Checked)
  462. {
  463. rtnStr = rtnStr + ",c.pactno ";
  464. CrtnStr = CrtnStr + ",c.pactno ";
  465. }
  466. if (this.Chk_StatRemark.Checked)
  467. {
  468. rtnStr = rtnStr + ",NULL HANDREMARK ";
  469. CrtnStr = CrtnStr + ",NULL HANDREMARK ";
  470. }
  471. if (this.chk_StatInTime.Checked)
  472. {
  473. rtnStr = rtnStr + ",TO_CHAR(A.INTIME,'YYYY-MM-DD') INSTORAGETIME,A.INSTEEL INSTROAGESTEEL,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=A.INCLASSTEAM) INCLASSTEAM ";
  474. CrtnStr = CrtnStr + ",TO_CHAR(A.INTIME,'YYYY-MM-DD') INSTORAGETIME,A.INSTEEL INSTROAGESTEEL,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=A.INCLASSTEAM) INCLASSTEAM ";
  475. }
  476. if (this.Chk_StatPrd.Checked)
  477. {
  478. rtnStr = rtnStr + ",TO_CHAR(A.PTIME,'YYYY-MM-DD') PTIME,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=A.PCLASSTEAM) PCLASSTEAM ";
  479. CrtnStr = CrtnStr + ",TO_CHAR(A.PTIME,'YYYY-MM-DD') PTIME,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=A.PCLASSTEAM) PCLASSTEAM ";
  480. }
  481. if (this.chk_StatBilletID.Checked)
  482. {
  483. rtnStr = rtnStr + ",A.BILLETID,1 QUANTITY,B.WEIGHT THEORYWEIGHT ";
  484. CrtnStr = CrtnStr + ",A.BILLETID,1 QUANTITY,B.WEIGHT THEORYWEIGHT ";
  485. }
  486. if (this.chk_DZ.Checked)
  487. {
  488. rtnStr = rtnStr + ",(SELECT STATIONNAME FROM SEL_STATIONINFO WHERE STATIONCODE = C.STATIONCODE) STATIONCODE ";
  489. CrtnStr = CrtnStr + ",(SELECT STATIONNAME FROM SEL_STATIONINFO WHERE STATIONCODE = C.STATIONCODE) STATIONCODE ";
  490. }
  491. if (this.chk_shdw.Checked)
  492. {
  493. rtnStr = rtnStr + ",(SELECT INCEPTCORPNAME FROM SEL_INCEPTCORPINFO WHERE INCEPTCORPCODE = C.INCEPTCORPCODE) INCEPTCORPCODE ";
  494. CrtnStr = CrtnStr + ",(SELECT INCEPTCORPNAME FROM SEL_INCEPTCORPINFO WHERE INCEPTCORPCODE = C.INCEPTCORPCODE) INCEPTCORPCODE ";
  495. }
  496. if (this.ultchkPactnoDW.Checked)
  497. {
  498. rtnStr = rtnStr + ",(select tt.buyername from sel_buyerbaseinfo tt WHERE tt.buyercode = C.BUYERCODE) BUYERCODE ";
  499. CrtnStr = CrtnStr + ",(select tt.buyername from sel_buyerbaseinfo tt WHERE tt.buyercode = C.BUYERCODE) BUYERCODE ";
  500. }
  501. else
  502. {
  503. rtnStr = rtnStr + ",COUNT(A.BILLETID) QUANTITY,SUM(A.THEORYWEIGHT) THEORYWEIGHT ";
  504. CrtnStr = CrtnStr + ",COUNT(A.BILLETID) QUANTITY,SUM(A.THEORYWEIGHT) THEORYWEIGHT ";
  505. }
  506. rtnStr = rtnStr + _SendFromStr;
  507. CrtnStr = CrtnStr + _CSendFromStr;
  508. rtnList.Add(rtnStr);
  509. rtnList.Add(CrtnStr);
  510. return rtnList;
  511. }
  512. else
  513. {
  514. return null;
  515. }
  516. }
  517. }
  518. public System.Collections.ArrayList SendGroupby
  519. {
  520. get
  521. {
  522. if (this.chk_StatSend.Checked | this.chk_StatSendOnly.Checked)
  523. {
  524. System.Collections.ArrayList rtnList = new ArrayList();
  525. string rtnStr = _SendGroupby;
  526. string CrtnStr = _CSendGroupBy;
  527. if (this.chk_StatButtress.Checked)
  528. {
  529. rtnStr = rtnStr + ",B.BUTTRESS ";
  530. CrtnStr = CrtnStr + ",B.BUTTRESS ";
  531. }
  532. if (this.chk_StatRollNO.Checked)
  533. {
  534. rtnStr = rtnStr + ",B.ROLLNO ";
  535. CrtnStr = CrtnStr + ",B.ROLLNO ";
  536. }
  537. if (this.chk_StatPlanNO.Checked)
  538. {
  539. rtnStr = rtnStr + ",C.PACTNO,C.PACTINDEX ";
  540. CrtnStr = CrtnStr + ",C.PACTNO,C.PACTINDEX ";
  541. }
  542. if (this.chk_NOrderNOStat.Checked)
  543. {
  544. rtnStr = rtnStr + ",B.ORDERFORMNUMBER ";
  545. CrtnStr = CrtnStr + ",B.ORDERFORMNUMBER ";
  546. }
  547. if (this.uck_Pactno.Checked)
  548. {
  549. rtnStr = rtnStr + ",c.pactno ";
  550. CrtnStr = CrtnStr + ",c.pactno ";
  551. }
  552. if (this.uchk_InSteel.Checked)
  553. {
  554. rtnStr = rtnStr + ",A.Insteel ";
  555. CrtnStr = CrtnStr + ",A.Insteel ";
  556. }
  557. if (this.uchk_Steel.Checked)
  558. {
  559. rtnStr = rtnStr + ",A.DETERMINANTCARDNUMBER ";
  560. CrtnStr = CrtnStr + ",A.DETERMINANTCARDNUMBER ";
  561. }
  562. if (this.chk_StatCondole.Checked)
  563. {
  564. rtnStr = rtnStr + ",B.CONDOLENUMBER ";
  565. CrtnStr = CrtnStr + ",B.CONDOLENUMBER ";
  566. }
  567. if (this.chk_StatResult.Checked)
  568. {
  569. rtnStr = rtnStr + ",B.DETERMINANTRESULT ";
  570. CrtnStr = CrtnStr + ",B.DETERMINANTRESULT ";
  571. }
  572. if (this.chk_PlyStat.Checked)
  573. {
  574. rtnStr = rtnStr + ",B.PLY ";
  575. CrtnStr = CrtnStr + ",B.PLY ";
  576. }
  577. if (this.chk_WidthStat.Checked)
  578. {
  579. rtnStr = rtnStr + ",B.WIDTH ";
  580. CrtnStr = CrtnStr + ",B.WIDTH ";
  581. }
  582. if (this.chk_LengthStat.Checked)
  583. {
  584. rtnStr = rtnStr + ",B.LENGTH ";
  585. CrtnStr = CrtnStr + ",B.LENGTH ";
  586. }
  587. if (this.Chk_StatStoveNO.Checked)
  588. {
  589. rtnStr = rtnStr + ",B.STOVENO ";
  590. CrtnStr = CrtnStr + ",B.STOVENO ";
  591. }
  592. if (this.chk_DZ.Checked)
  593. {
  594. rtnStr = rtnStr + ",C.STATIONCODE ";
  595. CrtnStr = CrtnStr + ",C.STATIONCODE ";
  596. }
  597. if (this.chk_shdw.Checked)
  598. {
  599. rtnStr = rtnStr + ",C.INCEPTCORPCODE ";
  600. CrtnStr = CrtnStr + ",C.INCEPTCORPCODE ";
  601. }
  602. if (this.chk_StatInTime.Checked)
  603. {
  604. rtnStr = rtnStr + ",TO_CHAR(A.INTIME,'YYYY-MM-DD'),A.INSTEEL,A.INCLASSTEAM ";
  605. CrtnStr = CrtnStr + ",TO_CHAR(A.INTIME,'YYYY-MM-DD'),A.INSTEEL,A.INCLASSTEAM ";
  606. }
  607. if (this.Chk_StatPrd.Checked)
  608. {
  609. rtnStr = rtnStr + ",TO_CHAR(A.PTIME,'YYYY-MM-DD'),A.PCLASSTEAM ";
  610. CrtnStr = CrtnStr + ",TO_CHAR(A.PTIME,'YYYY-MM-DD'),A.PCLASSTEAM ";
  611. }
  612. if (chk_StatBilletID.Checked)
  613. {
  614. rtnStr = rtnStr + ",B.WEIGHT ";
  615. CrtnStr = CrtnStr + ",B.WEIGHT ";
  616. }
  617. rtnList.Add(rtnStr);
  618. rtnList.Add(CrtnStr);
  619. return rtnList;
  620. }
  621. else
  622. {
  623. return null;
  624. }
  625. }
  626. }
  627. public System.Collections.ArrayList Groupby
  628. {
  629. get
  630. {
  631. System.Collections.ArrayList rtnList = new ArrayList();
  632. string rtnStr = _GroupbyStr;
  633. if (this.chk_StatSendOnly.Checked)
  634. {
  635. return null;
  636. }
  637. if (this.chk_StatButtress.Checked)
  638. {
  639. rtnStr = rtnStr + ",B.BUTTRESS";
  640. }
  641. if (this.chk_StatRollNO.Checked)
  642. {
  643. rtnStr = rtnStr + ",A.ROLLNUMBER";
  644. }
  645. if (this.chk_StatPlanNO.Checked)
  646. {
  647. rtnStr = rtnStr + ",C.PACTNO,C.PACTINDEX ";
  648. }
  649. if (this.uck_Pactno.Checked)
  650. {
  651. rtnStr = rtnStr + ",C.PACTNO ";
  652. }
  653. if (this.uck_Pactno.Checked)
  654. {
  655. rtnStr = rtnStr + ",c.pactno";
  656. }
  657. if (this.uchk_InSteel.Checked)
  658. {
  659. rtnStr = rtnStr + ",A.Insteel ";
  660. }
  661. if (this.uchk_Steel.Checked)
  662. {
  663. rtnStr = rtnStr + ",A.DETERMINANTCARDNUMBER ";
  664. }
  665. if (this.chk_NOrderNOStat.Checked)
  666. {
  667. rtnStr = rtnStr + ",A.ORDERNO ";
  668. }
  669. if (this.chk_StatResult.Checked)
  670. {
  671. rtnStr = rtnStr + ",A.DETERMINANTRESULT";
  672. }
  673. if (this.chk_PlyStat.Checked)
  674. {
  675. rtnStr = rtnStr + ",A.PLY ";
  676. }
  677. if (this.chk_StatCondole.Checked)
  678. {
  679. rtnStr = rtnStr + ",B.CONDOLENUMBER ";
  680. }
  681. if (this.chk_WidthStat.Checked)
  682. {
  683. rtnStr = rtnStr + ",A.WIDTH ";
  684. }
  685. if (this.chk_LengthStat.Checked)
  686. {
  687. rtnStr = rtnStr + ",A.LENGTH ";
  688. }
  689. if (this.Chk_StatStoveNO.Checked)
  690. {
  691. rtnStr = rtnStr + ",A.STOVENO ";
  692. }
  693. if (this.Chk_StatRemark.Checked)
  694. {
  695. rtnStr = rtnStr + ",B.HANDREMARK ";
  696. }
  697. if (this.chk_DZ.Checked)
  698. {
  699. rtnStr = rtnStr + ",C.STATIONCODE ";
  700. }
  701. if (this.chk_shdw.Checked)
  702. {
  703. rtnStr = rtnStr + ",C.INCEPTCORPCODE ";
  704. }
  705. if (this.chk_StatInTime.Checked)
  706. {
  707. rtnStr = rtnStr + ",TO_CHAR(A.INTIME,'YYYY-MM-DD'),A.INSTEEL,A.INCLASSTEAM ";
  708. }
  709. if (this.Chk_StatPrd.Checked)
  710. {
  711. rtnStr = rtnStr + ",TO_CHAR(A.PTIME,'YYYY-MM-DD'),A.PCLASSTEAM ";
  712. }
  713. if (this.chk_StatBilletID.Checked)
  714. {
  715. rtnStr = "";
  716. rtnList.Add("");
  717. return rtnList;
  718. }
  719. rtnList.Add(rtnStr);
  720. return rtnList;
  721. }
  722. }
  723. public System.Collections.ArrayList SelectStr
  724. {
  725. get
  726. {
  727. System.Collections.ArrayList rtnList = new ArrayList();
  728. string rtnStr = _SelectStr;
  729. if (this.chk_StatSendOnly.Checked)//仅发运信息
  730. {
  731. return null;
  732. }
  733. if (this.chk_StatButtress.Checked)
  734. {
  735. rtnStr = rtnStr + ",B.BUTTRESS ";
  736. }
  737. if (this.chk_StatRollNO.Checked)
  738. {
  739. rtnStr = rtnStr + ",A.ROLLNUMBER ";
  740. }
  741. if (this.uchk_Steel.Checked)
  742. {
  743. rtnStr = rtnStr + ",A.DETERMINANTCARDNUMBER ";
  744. }
  745. if (this.uchk_InSteel.Checked)
  746. {
  747. rtnStr = rtnStr + ",A.Insteel INSTROAGESTEEL ";
  748. }
  749. if (this.uck_Pactno.Checked)
  750. {
  751. rtnStr = rtnStr + ",c.PACTNO ";
  752. }
  753. if (this.chk_StatPlanNO.Checked)
  754. {
  755. rtnStr = rtnStr + ",C.PACTINDEX ";
  756. }
  757. if (this.chk_NOrderNOStat.Checked)
  758. {
  759. rtnStr = rtnStr + ",A.ORDERNO ALLOTORDERFORM ";
  760. }
  761. if (this.chk_StatCondole.Checked)
  762. {
  763. rtnStr = rtnStr + ",B.CONDOLENUMBER ";
  764. if (rtnStr.IndexOf("THEORYWEIGHTZL") > 0)
  765. {
  766. rtnStr.Replace(" A.THEORYWEIGHT THEORYWEIGHTZL ,", " ");
  767. }
  768. }
  769. if (this.chk_StatResult.Checked)
  770. {
  771. rtnStr = rtnStr + ",(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=A.DETERMINANTRESULT) DETERMINANTRESULT ";
  772. }
  773. if (this.chk_PlyStat.Checked)
  774. {
  775. rtnStr = rtnStr + ",A.PLY ";
  776. }
  777. if (this.chk_WidthStat.Checked)
  778. {
  779. rtnStr = rtnStr + ",A.WIDTH ";
  780. }
  781. if (this.chk_LengthStat.Checked)
  782. {
  783. rtnStr = rtnStr + ",A.LENGTH ";
  784. }
  785. if (this.Chk_StatStoveNO.Checked)
  786. {
  787. rtnStr = rtnStr + ",A.STOVENO ";
  788. }
  789. if (this.Chk_StatRemark.Checked)
  790. {
  791. rtnStr = rtnStr + ",B.HANDREMARK ";
  792. }
  793. if (this.chk_DZ.Checked)
  794. {
  795. rtnStr = rtnStr + ",(SELECT STATIONNAME FROM SEL_STATIONINFO WHERE STATIONCODE = C.STATIONCODE) STATIONCODE ";
  796. }
  797. if (this.chk_shdw.Checked)
  798. {
  799. rtnStr = rtnStr + ",(SELECT INCEPTCORPNAME FROM SEL_INCEPTCORPINFO WHERE INCEPTCORPCODE = C.INCEPTCORPCODE) INCEPTCORPCODE ";
  800. }
  801. if (this.chk_StatInTime.Checked)
  802. {
  803. rtnStr = rtnStr + ",TO_CHAR(A.INTIME,'YYYY-MM-DD') INSTORAGETIME,A.INSTEEL INSTROAGESTEEL,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=A.INCLASSTEAM) INCLASSTEAM ";
  804. }
  805. if (this.Chk_StatPrd.Checked)
  806. {
  807. rtnStr = rtnStr + ",TO_CHAR(A.PTIME,'YYYY-MM-DD') PTIME,(SELECT NAME_ FROM SCM_BASE_INFO WHERE ID_=A.PCLASSTEAM) PCLASSTEAM ";
  808. }
  809. if (this.chk_StatBilletID.Checked)
  810. {
  811. rtnStr = rtnStr + ",A.BILLETID,1 QUANTITY,A.THEORYWEIGHT ";
  812. }
  813. else
  814. {
  815. rtnStr = rtnStr + ",COUNT(A.BILLETID) QUANTITY,SUM(A.THEORYWEIGHT) THEORYWEIGHT ";
  816. }
  817. rtnStr = rtnStr + _FromStr;
  818. rtnList.Add(rtnStr);
  819. return rtnList;
  820. }
  821. }
  822. #endregion
  823. }
  824. }