mDataRecord.pas 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. unit mDataRecord;
  2. interface
  3. uses
  4. Classes, sdDB;
  5. type
  6. TBillsRecord = class(TsdDataRecord)
  7. private
  8. // 树结构
  9. FID: TsdValue;
  10. FParentID: TsdValue;
  11. FNextSiblingID: TsdValue;
  12. // 报表专用
  13. FSerialNo: TsdValue;
  14. FIsLeaf: TsdValue;
  15. FLeafXmjID: TsdValue;
  16. FXiangCode: TsdValue;
  17. FMuCode: TsdValue;
  18. FJieCode: TsdValue;
  19. FXimuCode: TsdValue;
  20. FIndexCode: TsdValue;
  21. // 基础数据
  22. FCode: TsdValue;
  23. FB_Code: TsdValue;
  24. FName: TsdValue;
  25. FUnits: TsdValue;
  26. FAlias: TsdValue;
  27. // 单价
  28. FPrice: TsdValue;
  29. FNewPrice: TsdValue;
  30. // 0号台账计算相关
  31. FOrgQuantity: TsdValue;
  32. FOrgTotalPrice: TsdValue;
  33. FMisQuantity: TsdValue;
  34. FMisTotalPrice: TsdValue;
  35. FOthQuantity: TsdValue;
  36. FOthTotalPrice: TsdValue;
  37. FQuantity: TsdValue;
  38. FTotalPrice: TsdValue;
  39. // 累计
  40. FAddDealQuantity: TsdValue;
  41. FAddDealTotalPrice: TsdValue;
  42. FAddQcQuantity: TsdValue;
  43. FAddQcTotalPrice: TsdValue;
  44. FAddQcBGLCode: TsdValue;
  45. FAddQcBGLNum: TsdValue;
  46. FAddPcQuantity: TsdValue;
  47. FAddPcTotalPrice: TsdValue;
  48. FAddPcBGLCode: TsdValue;
  49. FAddPcBGLNum: TsdValue;
  50. FAddGatherQuantity: TsdValue;
  51. FAddGatherTotalPrice: TsdValue;
  52. FLockLevel: TsdValue;
  53. FLockInfo: TsdValue;
  54. FLockNewPrice: TsdValue;
  55. FCreatePhaseID: TsdValue;
  56. FIsMeasureAdd: TsdValue;
  57. FPeg: TsdValue;
  58. FDrawingCode: TsdValue;
  59. FMemoStr: TsdValue;
  60. FDgnQuantity1: TsdValue;
  61. FDgnQuantity2: TsdValue;
  62. FDgnPrice: TsdValue;
  63. FDealDgnQuantity1: TsdValue;
  64. FDealDgnQuantity2: TsdValue;
  65. FCDgnQuantity1: TsdValue;
  66. FCDgnQuantity2: TsdValue;
  67. FAddDgnPrice: TsdValue;
  68. FHasBookMark: TsdValue;
  69. FMarkMemo: TsdValue;
  70. FDealCode: TsdValue;
  71. FDealCompany: TsdValue;
  72. FDealType: TsdValue;
  73. FAddCutTotalPrice: TsdValue;
  74. FAddPayTotalPrice: TsdValue;
  75. FAddCompleteRate: TsdValue;
  76. protected
  77. procedure DoAfterAddFields; override;
  78. public
  79. property ID: TsdValue read FID;
  80. property ParentID: TsdValue read FParentID;
  81. property NextSiblingID: TsdValue read FNextSiblingID;
  82. property SerialNo: TsdValue read FSerialNo;
  83. property IsLeaf: TsdValue read FIsLeaf;
  84. property LeafXmjID: TsdValue read FLeafXmjID;
  85. property XiangCode: TsdValue read FXiangCode;
  86. property MuCode: TsdValue read FMuCode;
  87. property JieCode: TsdValue read FJieCode;
  88. property XimuCode: TsdValue read FXimuCode;
  89. property IndexCode: TsdValue read FIndexCode;
  90. property Code: TsdValue read FCode;
  91. property B_Code: TsdValue read FB_Code;
  92. property Name: TsdValue read FName;
  93. property Units: TsdValue read FUnits;
  94. property Alias: TsdValue read FAlias;
  95. property Price: TsdValue read FPrice;
  96. property NewPrice: TsdValue read FNewPrice;
  97. property OrgQuantity: TsdValue read FOrgQuantity;
  98. property OrgTotalPrice: TsdValue read FOrgTotalPrice;
  99. property MisQuantity: TsdValue read FMisQuantity;
  100. property MisTotalPrice: TsdValue read FMisTotalPrice;
  101. property OthQuantity: TsdValue read FOthQuantity;
  102. property OthTotalPrice: TsdValue read FOthTotalPrice;
  103. property Quantity: TsdValue read FQuantity;
  104. property TotalPrice: TsdValue read FTotalPrice;
  105. property AddDealQuantity: TsdValue read FAddDealQuantity;
  106. property AddDealTotalPrice: TsdValue read FAddDealTotalPrice;
  107. property AddQcQuantity: TsdValue read FAddQcQuantity;
  108. property AddQcTotalPrice: TsdValue read FAddQcTotalPrice;
  109. property AddQcBGLCode: TsdValue read FAddQcBGLCode;
  110. property AddQcBGLNum: TsdValue read FAddQcBGLNum;
  111. property AddPcQuantity: TsdValue read FAddPcQuantity;
  112. property AddPcTotalPrice: TsdValue read FAddPcTotalPrice;
  113. property AddPcBGLCode: TsdValue read FAddPcBGLCode;
  114. property AddPcBGLNum: TsdValue read FAddPcBGLNum;
  115. property AddGatherQuantity: TsdValue read FAddGatherQuantity;
  116. property AddGatherTotalPrice: TsdValue read FAddGatherTotalPrice;
  117. property LockLevel: TsdValue read FLockLevel;
  118. property LockInfo: TsdValue read FLockInfo;
  119. property LockNewPrice: TsdValue read FLockNewPrice;
  120. property CreatePhaseID: TsdValue read FCreatePhaseID;
  121. property IsMeasureAdd: TsdValue read FIsMeasureAdd;
  122. property Peg: TsdValue read FPeg;
  123. property DrawingCode: TsdValue read FDrawingCode;
  124. property MemoStr: TsdValue read FMemoStr;
  125. property DgnQuantity1: TsdValue read FDgnQuantity1;
  126. property DgnQuantity2: TsdValue read FDgnQuantity2;
  127. property DgnPrice: TsdValue read FDgnPrice;
  128. property DealDgnQuantity1: TsdValue read FDealDgnQuantity1;
  129. property DealDgnQuantity2: TsdValue read FDealDgnQuantity2;
  130. property CDgnQuantity1: TsdValue read FCDgnQuantity1;
  131. property CDgnQuantity2: TsdValue read FCDgnQuantity2;
  132. property AddDgnPrice: TsdValue read FAddDgnPrice;
  133. property HasBookMark: TsdValue read FHasBookMark;
  134. property MarkMemo: TsdValue read FMarkMemo;
  135. property DealCode: TsdValue read FDealCode;
  136. property DealCompany: TsdValue read FDealCompany;
  137. property DealType: TsdValue read FDealType;
  138. property AddCutTotalPrice: TsdValue read FAddCutTotalPrice;
  139. property AddPayTotalPrice: TsdValue read FAddPayTotalPrice;
  140. property AddCompleteRate: TsdValue read FAddCompleteRate;
  141. end;
  142. TStageRecord = class(TsdDataRecord)
  143. private
  144. FBillsID: TsdValue;
  145. FDealQuantity: TsdValue;
  146. FDealTotalPrice: TsdValue;
  147. FDealFlag: TsdValue;
  148. FDealFormula: TsdValue;
  149. FQcQuantity: TsdValue;
  150. FQcTotalPrice: TsdValue;
  151. FQcFlag: TsdValue;
  152. FQcFormula: TsdValue;
  153. FQcBGLCode: TsdValue;
  154. FQcBGLNum: TsdValue;
  155. FPcQuantity: TsdValue;
  156. FPcTotalPrice: TsdValue;
  157. FPcFlag: TsdValue;
  158. FPcFormula: TsdValue;
  159. FPcBGLCode: TsdValue;
  160. FPcBGLNum: TsdValue;
  161. FGatherQuantity: TsdValue;
  162. FGatherTotalPrice: TsdValue;
  163. FEndDealQuantity: TsdValue;
  164. FEndDealTotalPrice: TsdValue;
  165. FEndQcQuantity: TsdValue;
  166. FEndQcTotalPrice: TsdValue;
  167. FEndQcBGLCode: TsdValue;
  168. FEndQcBGLNum: TsdValue;
  169. FEndPcQuantity: TsdValue;
  170. FEndPcTotalPrice: TsdValue;
  171. FEndPcBGLCode: TsdValue;
  172. FEndPcBGLNum: TsdValue;
  173. FEndGatherQuantity: TsdValue;
  174. FEndGatherTotalPrice: TsdValue;
  175. FPreDealQuantity: TsdValue;
  176. FPreDealTotalPrice: TsdValue;
  177. FPreQcQuantity: TsdValue;
  178. FPreQcTotalPrice: TsdValue;
  179. FPreQcBGLCode: TsdValue;
  180. FPreQcBGLNum: TsdValue;
  181. FPrePcQuantity: TsdValue;
  182. FPrePcTotalPrice: TsdValue;
  183. FPrePcBGLCode: TsdValue;
  184. FPrePcBGLNum: TsdValue;
  185. FPreGatherQuantity: TsdValue;
  186. FPreGatherTotalPrice: TsdValue;
  187. FHasBookMark: TsdValue;
  188. FMarkMemo: TsdValue;
  189. protected
  190. procedure DoAfterAddFields; override;
  191. public
  192. property BillsID: TsdValue read FBillsID;
  193. property DealQuantity: TsdValue read FDealQuantity;
  194. property DealTotalPrice: TsdValue read FDealTotalPrice;
  195. property DealFlag: TsdValue read FDealFlag;
  196. property DealFormula: TsdValue read FDealFormula;
  197. property QcQuantity: TsdValue read FQcQuantity;
  198. property QcTotalPrice: TsdValue read FQcTotalPrice;
  199. property QcFlag: TsdValue read FQcFlag;
  200. property QcFormula: TsdValue read FQcFormula;
  201. property QcBGLCode: TsdValue read FQcBGLCode;
  202. property QcBGLNum: TsdValue read FQcBGLNum;
  203. property PcQuantity: TsdValue read FPcQuantity;
  204. property PcTotalPrice: TsdValue read FPcTotalPrice;
  205. property PcFlag: TsdValue read FPcFlag;
  206. property PcFormula: TsdValue read FPcFormula;
  207. property PcBGLCode: TsdValue read FPcBGLCode;
  208. property PcBGLNum: TsdValue read FPcBGLNum;
  209. property GatherQuantity: TsdValue read FGatherQuantity;
  210. property GatherTotalPrice: TsdValue read FGatherTotalPrice;
  211. property EndDealQuantity: TsdValue read FEndDealQuantity;
  212. property EndDealTotalPrice: TsdValue read FEndDealTotalPrice;
  213. property EndQcQuantity: TsdValue read FEndQcQuantity;
  214. property EndQcTotalPrice: TsdValue read FEndQcTotalPrice;
  215. property EndQcBGLCode: TsdValue read FEndQcBGLCode;
  216. property EndQcBGLNum: TsdValue read FEndQcBGLNum;
  217. property EndPcQuantity: TsdValue read FEndPcQuantity;
  218. property EndPcTotalPrice: TsdValue read FEndPcTotalPrice;
  219. property EndPcBGLCode: TsdValue read FEndPcBGLCode;
  220. property EndPcBGLNum: TsdValue read FEndPcBGLNum;
  221. property EndGatherQuantity: TsdValue read FEndGatherQuantity;
  222. property EndGatherTotalPrice: TsdValue read FEndGatherTotalPrice;
  223. property PreDealQuantity: TsdValue read FPreDealQuantity;
  224. property PreDealTotalPrice: TsdValue read FPreDealTotalPrice;
  225. property PreQcQuantity: TsdValue read FPreQcQuantity;
  226. property PreQcTotalPrice: TsdValue read FPreQcTotalPrice;
  227. property PreQcBGLCode: TsdValue read FPreQcBGLCode;
  228. property PreQcBGLNum: TsdValue read FPreQcBGLNum;
  229. property PrePcQuantity: TsdValue read FPrePcQuantity;
  230. property PrePcTotalPrice: TsdValue read FPrePcTotalPrice;
  231. property PrePcBGLCode: TsdValue read FPrePcBGLCode;
  232. property PrePcBGLNum: TsdValue read FPrePcBGLNum;
  233. property PreGatherQuantity: TsdValue read FPreGatherQuantity;
  234. property PreGatherTotalPrice: TsdValue read FPreGatherTotalPrice;
  235. property HasBookMark: TsdValue read FHasBookMark;
  236. property MarkMemo: TsdValue read FMarkMemo;
  237. end;
  238. implementation
  239. { TBillsRecord }
  240. procedure TBillsRecord.DoAfterAddFields;
  241. begin
  242. inherited;
  243. FID := ValueByName('ID');
  244. FParentID := ValueByName('ParentID');
  245. FNextSiblingID := ValueByName('NextSiblingID');
  246. FSerialNo := ValueByName('SerialNo');
  247. FIsLeaf := ValueByName('IsLeaf');
  248. FLeafXmjID := ValueByName('LeafXmjID');
  249. FXiangCode := ValueByName('XiangCode');
  250. FMuCode := ValueByName('MuCode');
  251. FJieCode := ValueByName('JieCode');
  252. FXimuCode := ValueByName('XimuCode');
  253. FIndexCode := ValueByName('IndexCode');
  254. FCode := ValueByName('Code');
  255. FB_Code := ValueByName('B_Code');
  256. FName := ValueByName('Name');
  257. FUnits := ValueByName('Units');
  258. FAlias := ValueByName('Alias');
  259. FPrice := ValueByName('Price');
  260. FNewPrice := ValueByName('NewPrice');
  261. FOrgQuantity := ValueByName('OrgQuantity');
  262. FOrgTotalPrice := ValueByName('OrgTotalPrice');
  263. FMisQuantity := ValueByName('MisQuantity');
  264. FMisTotalPrice := ValueByName('MisTotalPrice');
  265. FOthQuantity := ValueByName('OthQuantity');
  266. FOthTotalPrice := ValueByName('OthTotalPrice');
  267. FQuantity := ValueByName('Quantity');
  268. FTotalPrice := ValueByName('TotalPrice');
  269. FAddDealQuantity := ValueByName('AddDealQuantity');
  270. FAddDealTotalPrice := ValueByName('AddDealTotalPrice');
  271. FAddQcQuantity := ValueByName('AddQcQuantity');
  272. FAddQcTotalPrice := ValueByName('AddQcTotalPrice');
  273. FAddQcBGLCode := ValueByName('AddQcBGLCode');
  274. FAddQcBGLNum := ValueByName('AddQcBGLNum');
  275. FAddPcQuantity := ValueByName('AddPcQuantity');
  276. FAddPcTotalPrice := ValueByName('AddPcTotalPrice');
  277. FAddPcBGLCode := ValueByName('AddPcBGLCode');
  278. FAddPcBGLNum := ValueByName('AddPcBGLNum');
  279. FAddGatherQuantity := ValueByName('AddGatherQuantity');
  280. FAddGatherTotalPrice := ValueByName('AddGatherTotalPrice');
  281. FLockLevel := ValueByName('LockLevel');
  282. FLockInfo := ValueByName('LockInfo');
  283. FLockNewPrice := ValueByName('LockNewPrice');
  284. FCreatePhaseID := ValueByName('CreatePhaseID');
  285. FIsMeasureAdd := ValueByName('IsMeasureAdd');
  286. FPeg := ValueByName('Peg');
  287. FDrawingCode := ValueByName('DrawingCode');
  288. FMemoStr := ValueByName('MemoStr');
  289. FDgnQuantity1 := ValueByName('DgnQuantity1');
  290. FDgnQuantity2 := ValueByName('DgnQuantity2');
  291. FDgnPrice := ValueByName('DgnPrice');
  292. FDealDgnQuantity1 := ValueByName('DealDgnQuantity1');
  293. FDealDgnQuantity2 := ValueByName('DealDgnQuantity2');
  294. FCDgnQuantity1 := ValueByName('CDgnQuantity1');
  295. FCDgnQuantity2 := ValueByName('CDgnQuantity2');
  296. FAddDgnPrice := ValueByName('AddDgnPrice');
  297. FHasBookMark := ValueByName('HasBookMark');
  298. FMarkMemo := ValueByName('MarkMemo');
  299. FDealCode := ValueByName('DealCode');
  300. FDealCompany := ValueByName('DealCompany');
  301. FDealType := ValueByName('DealType');
  302. FAddCutTotalPrice := ValueByName('AddCutTotalPrice');
  303. FAddPayTotalPrice := ValueByName('AddPayTotalPrice');
  304. FAddCompleteRate := ValueByName('AddCompleteRate');
  305. end;
  306. { TStageRecord }
  307. procedure TStageRecord.DoAfterAddFields;
  308. begin
  309. inherited;
  310. FBillsID := ValueByName('BillsID');
  311. FDealQuantity := ValueByName('DealQuantity');
  312. FDealTotalPrice := ValueByName('DealTotalPrice');
  313. FDealFlag := ValueByName('DealFlag');
  314. FDealFormula := ValueByName('DealFormula');
  315. FQcQuantity := ValueByName('QcQuantity');
  316. FQcTotalPrice := ValueByName('QcTotalPrice');
  317. FQcFlag := ValueByName('QcFlag');
  318. FQcFormula := ValueByName('QcFormula');
  319. FQcBGLCode := ValueByName('QcBGLCode');
  320. FQcBGLNum := ValueByName('QcBGLNum');
  321. FPcQuantity := ValueByName('PcQuantity');
  322. FPcTotalPrice := ValueByName('PcTotalPrice');
  323. FPcFlag := ValueByName('PcFlag');
  324. FPcFormula := ValueByName('PcFormula');
  325. FPcBGLCode := ValueByName('PcBGLCode');
  326. FPcBGLNum := ValueByName('PcBGLNum');
  327. FGatherQuantity := ValueByName('GatherQuantity');
  328. FGatherTotalPrice := ValueByName('GatherTotalPrice');
  329. FEndDealQuantity := ValueByName('EndDealQuantity');
  330. FEndDealTotalPrice := ValueByName('EndDealTotalPrice');
  331. FEndQcQuantity := ValueByName('EndQcQuantity');
  332. FEndQcTotalPrice := ValueByName('EndQcTotalPrice');
  333. FEndQcBGLCode := ValueByName('EndQcBGLCode');
  334. FEndQcBGLNum := ValueByName('EndQcBGLNum');
  335. FEndPcQuantity := ValueByName('EndPcQuantity');
  336. FEndPcTotalPrice := ValueByName('EndPcTotalPrice');
  337. FEndPcBGLCode := ValueByName('EndPcBGLCode');
  338. FEndPcBGLNum := ValueByName('EndPcBGLNum');
  339. FEndGatherQuantity := ValueByName('EndGatherQuantity');
  340. FEndGatherTotalPrice := ValueByName('EndGatherTotalPrice');
  341. FPreDealQuantity := ValueByName('PreDealQuantity');
  342. FPreDealTotalPrice := ValueByName('PreDealTotalPrice');
  343. FPreQcQuantity := ValueByName('PreQcQuantity');
  344. FPreQcTotalPrice := ValueByName('PreQcTotalPrice');
  345. FPreQcBGLCode := ValueByName('PreQcBGLCode');
  346. FPreQcBGLNum := ValueByName('PreQcBGLNum');
  347. FPrePcQuantity := ValueByName('PrePcQuantity');
  348. FPrePcTotalPrice := ValueByName('PrePcTotalPrice');
  349. FPrePcBGLCode := ValueByName('PrePcBGLCode');
  350. FPrePcBGLNum := ValueByName('PrePcBGLNum');
  351. FPreGatherQuantity := ValueByName('PreGatherQuantity');
  352. FPreGatherTotalPrice := ValueByName('PreGatherTotalPrice');
  353. FHasBookMark := ValueByName('HasBookMark');
  354. FMarkMemo := ValueByName('MarkMemo');
  355. end;
  356. end.