mDataRecord.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710
  1. unit mDataRecord;
  2. interface
  3. uses
  4. Classes, sdDB;
  5. type
  6. TMeasureBaseRecord = class(TsdDataRecord)
  7. public
  8. procedure SetFloatValue(AValue: TsdValue; AFloat: Double);
  9. procedure SetIntValue(AValue: TsdValue; AInt: Integer);
  10. procedure SetBoolValue(AValue: TsdValue; ABool: Boolean);
  11. procedure AddDifferValue(AValue: TsdValue; ADiffer: Double);
  12. end;
  13. TBillsRecord = class(TMeasureBaseRecord)
  14. private
  15. // 树结构
  16. FID: TsdValue;
  17. FParentID: TsdValue;
  18. FNextSiblingID: TsdValue;
  19. // 报表专用
  20. FSerialNo: TsdValue;
  21. FIsLeaf: TsdValue;
  22. FLeafXmjID: TsdValue;
  23. FXiangCode: TsdValue;
  24. FMuCode: TsdValue;
  25. FJieCode: TsdValue;
  26. FXimuCode: TsdValue;
  27. FIndexCode: TsdValue;
  28. // 基础数据
  29. FCode: TsdValue;
  30. FB_Code: TsdValue;
  31. FName: TsdValue;
  32. FUnits: TsdValue;
  33. FAlias: TsdValue;
  34. // 单价
  35. FPrice: TsdValue;
  36. FNewPrice: TsdValue;
  37. // 0号台账计算相关
  38. FOrgQuantity: TsdValue;
  39. FOrgTotalPrice: TsdValue;
  40. FMisQuantity: TsdValue;
  41. FMisTotalPrice: TsdValue;
  42. FOthQuantity: TsdValue;
  43. FOthTotalPrice: TsdValue;
  44. FQuantity: TsdValue;
  45. FTotalPrice: TsdValue;
  46. // 累计
  47. FAddDealQuantity: TsdValue;
  48. FAddDealTotalPrice: TsdValue;
  49. FAddQcQuantity: TsdValue;
  50. FAddQcTotalPrice: TsdValue;
  51. FAddQcBGLCode: TsdValue;
  52. FAddQcBGLNum: TsdValue;
  53. FAddPcQuantity: TsdValue;
  54. FAddPcTotalPrice: TsdValue;
  55. FAddPcBGLCode: TsdValue;
  56. FAddPcBGLNum: TsdValue;
  57. FAddGatherQuantity: TsdValue;
  58. FAddGatherTotalPrice: TsdValue;
  59. FLockLevel: TsdValue;
  60. FLockInfo: TsdValue;
  61. FLockNewPrice: TsdValue;
  62. FCreatePhaseID: TsdValue;
  63. FIsMeasureAdd: TsdValue;
  64. FPeg: TsdValue;
  65. FDrawingCode: TsdValue;
  66. FMemoStr: TsdValue;
  67. FDgnQuantity1: TsdValue;
  68. FDgnQuantity2: TsdValue;
  69. FDgnPrice: TsdValue;
  70. FDealDgnQuantity1: TsdValue;
  71. FDealDgnQuantity2: TsdValue;
  72. FCDgnQuantity1: TsdValue;
  73. FCDgnQuantity2: TsdValue;
  74. FAddDgnPrice: TsdValue;
  75. FHasBookMark: TsdValue;
  76. FMarkMemo: TsdValue;
  77. FDealCode: TsdValue;
  78. FDealCompany: TsdValue;
  79. FDealType: TsdValue;
  80. FAddCutTotalPrice: TsdValue;
  81. FAddPayTotalPrice: TsdValue;
  82. FAddCompleteRate: TsdValue;
  83. FPM_AddTotalPrice: TsdValue;
  84. protected
  85. procedure DoAfterAddFields; override;
  86. public
  87. property ID: TsdValue read FID;
  88. property ParentID: TsdValue read FParentID;
  89. property NextSiblingID: TsdValue read FNextSiblingID;
  90. property SerialNo: TsdValue read FSerialNo;
  91. property IsLeaf: TsdValue read FIsLeaf;
  92. property LeafXmjID: TsdValue read FLeafXmjID;
  93. property XiangCode: TsdValue read FXiangCode;
  94. property MuCode: TsdValue read FMuCode;
  95. property JieCode: TsdValue read FJieCode;
  96. property XimuCode: TsdValue read FXimuCode;
  97. property IndexCode: TsdValue read FIndexCode;
  98. property Code: TsdValue read FCode;
  99. property B_Code: TsdValue read FB_Code;
  100. property Name: TsdValue read FName;
  101. property Units: TsdValue read FUnits;
  102. property Alias: TsdValue read FAlias;
  103. property Price: TsdValue read FPrice;
  104. property NewPrice: TsdValue read FNewPrice;
  105. property OrgQuantity: TsdValue read FOrgQuantity;
  106. property OrgTotalPrice: TsdValue read FOrgTotalPrice;
  107. property MisQuantity: TsdValue read FMisQuantity;
  108. property MisTotalPrice: TsdValue read FMisTotalPrice;
  109. property OthQuantity: TsdValue read FOthQuantity;
  110. property OthTotalPrice: TsdValue read FOthTotalPrice;
  111. property Quantity: TsdValue read FQuantity;
  112. property TotalPrice: TsdValue read FTotalPrice;
  113. property AddDealQuantity: TsdValue read FAddDealQuantity;
  114. property AddDealTotalPrice: TsdValue read FAddDealTotalPrice;
  115. property AddQcQuantity: TsdValue read FAddQcQuantity;
  116. property AddQcTotalPrice: TsdValue read FAddQcTotalPrice;
  117. property AddQcBGLCode: TsdValue read FAddQcBGLCode;
  118. property AddQcBGLNum: TsdValue read FAddQcBGLNum;
  119. property AddPcQuantity: TsdValue read FAddPcQuantity;
  120. property AddPcTotalPrice: TsdValue read FAddPcTotalPrice;
  121. property AddPcBGLCode: TsdValue read FAddPcBGLCode;
  122. property AddPcBGLNum: TsdValue read FAddPcBGLNum;
  123. property AddGatherQuantity: TsdValue read FAddGatherQuantity;
  124. property AddGatherTotalPrice: TsdValue read FAddGatherTotalPrice;
  125. property LockLevel: TsdValue read FLockLevel;
  126. property LockInfo: TsdValue read FLockInfo;
  127. property LockNewPrice: TsdValue read FLockNewPrice;
  128. property CreatePhaseID: TsdValue read FCreatePhaseID;
  129. property IsMeasureAdd: TsdValue read FIsMeasureAdd;
  130. property Peg: TsdValue read FPeg;
  131. property DrawingCode: TsdValue read FDrawingCode;
  132. property MemoStr: TsdValue read FMemoStr;
  133. property DgnQuantity1: TsdValue read FDgnQuantity1;
  134. property DgnQuantity2: TsdValue read FDgnQuantity2;
  135. property DgnPrice: TsdValue read FDgnPrice;
  136. property DealDgnQuantity1: TsdValue read FDealDgnQuantity1;
  137. property DealDgnQuantity2: TsdValue read FDealDgnQuantity2;
  138. property CDgnQuantity1: TsdValue read FCDgnQuantity1;
  139. property CDgnQuantity2: TsdValue read FCDgnQuantity2;
  140. property AddDgnPrice: TsdValue read FAddDgnPrice;
  141. property HasBookMark: TsdValue read FHasBookMark;
  142. property MarkMemo: TsdValue read FMarkMemo;
  143. property DealCode: TsdValue read FDealCode;
  144. property DealCompany: TsdValue read FDealCompany;
  145. property DealType: TsdValue read FDealType;
  146. property AddCutTotalPrice: TsdValue read FAddCutTotalPrice;
  147. property AddPayTotalPrice: TsdValue read FAddPayTotalPrice;
  148. property AddCompleteRate: TsdValue read FAddCompleteRate;
  149. property PM_AddTotalPrice: TsdValue read FPM_AddTotalPrice;
  150. end;
  151. TStageRecord = class(TMeasureBaseRecord)
  152. private
  153. FBillsID: TsdValue;
  154. FDealQuantity: TsdValue;
  155. FDealTotalPrice: TsdValue;
  156. FDealFlag: TsdValue;
  157. FDealFormula: TsdValue;
  158. FQcQuantity: TsdValue;
  159. FQcTotalPrice: TsdValue;
  160. FQcFlag: TsdValue;
  161. FQcFormula: TsdValue;
  162. FQcBGLCode: TsdValue;
  163. FQcBGLNum: TsdValue;
  164. FPcQuantity: TsdValue;
  165. FPcTotalPrice: TsdValue;
  166. FPcFlag: TsdValue;
  167. FPcFormula: TsdValue;
  168. FPcBGLCode: TsdValue;
  169. FPcBGLNum: TsdValue;
  170. FGatherQuantity: TsdValue;
  171. FGatherTotalPrice: TsdValue;
  172. FEndDealQuantity: TsdValue;
  173. FEndDealTotalPrice: TsdValue;
  174. FEndQcQuantity: TsdValue;
  175. FEndQcTotalPrice: TsdValue;
  176. FEndQcBGLCode: TsdValue;
  177. FEndQcBGLNum: TsdValue;
  178. FEndPcQuantity: TsdValue;
  179. FEndPcTotalPrice: TsdValue;
  180. FEndPcBGLCode: TsdValue;
  181. FEndPcBGLNum: TsdValue;
  182. FEndGatherQuantity: TsdValue;
  183. FEndGatherTotalPrice: TsdValue;
  184. FPreDealQuantity: TsdValue;
  185. FPreDealTotalPrice: TsdValue;
  186. FPreQcQuantity: TsdValue;
  187. FPreQcTotalPrice: TsdValue;
  188. FPreQcBGLCode: TsdValue;
  189. FPreQcBGLNum: TsdValue;
  190. FPrePcQuantity: TsdValue;
  191. FPrePcTotalPrice: TsdValue;
  192. FPrePcBGLCode: TsdValue;
  193. FPrePcBGLNum: TsdValue;
  194. FPreGatherQuantity: TsdValue;
  195. FPreGatherTotalPrice: TsdValue;
  196. FHasBookMark: TsdValue;
  197. FMarkMemo: TsdValue;
  198. FPM_PreTotalPrice: TsdValue;
  199. FPM_TotalPrice: TsdValue;
  200. protected
  201. procedure DoAfterAddFields; override;
  202. public
  203. property BillsID: TsdValue read FBillsID;
  204. property DealQuantity: TsdValue read FDealQuantity;
  205. property DealTotalPrice: TsdValue read FDealTotalPrice;
  206. property DealFlag: TsdValue read FDealFlag;
  207. property DealFormula: TsdValue read FDealFormula;
  208. property QcQuantity: TsdValue read FQcQuantity;
  209. property QcTotalPrice: TsdValue read FQcTotalPrice;
  210. property QcFlag: TsdValue read FQcFlag;
  211. property QcFormula: TsdValue read FQcFormula;
  212. property QcBGLCode: TsdValue read FQcBGLCode;
  213. property QcBGLNum: TsdValue read FQcBGLNum;
  214. property PcQuantity: TsdValue read FPcQuantity;
  215. property PcTotalPrice: TsdValue read FPcTotalPrice;
  216. property PcFlag: TsdValue read FPcFlag;
  217. property PcFormula: TsdValue read FPcFormula;
  218. property PcBGLCode: TsdValue read FPcBGLCode;
  219. property PcBGLNum: TsdValue read FPcBGLNum;
  220. property GatherQuantity: TsdValue read FGatherQuantity;
  221. property GatherTotalPrice: TsdValue read FGatherTotalPrice;
  222. property EndDealQuantity: TsdValue read FEndDealQuantity;
  223. property EndDealTotalPrice: TsdValue read FEndDealTotalPrice;
  224. property EndQcQuantity: TsdValue read FEndQcQuantity;
  225. property EndQcTotalPrice: TsdValue read FEndQcTotalPrice;
  226. property EndQcBGLCode: TsdValue read FEndQcBGLCode;
  227. property EndQcBGLNum: TsdValue read FEndQcBGLNum;
  228. property EndPcQuantity: TsdValue read FEndPcQuantity;
  229. property EndPcTotalPrice: TsdValue read FEndPcTotalPrice;
  230. property EndPcBGLCode: TsdValue read FEndPcBGLCode;
  231. property EndPcBGLNum: TsdValue read FEndPcBGLNum;
  232. property EndGatherQuantity: TsdValue read FEndGatherQuantity;
  233. property EndGatherTotalPrice: TsdValue read FEndGatherTotalPrice;
  234. property PreDealQuantity: TsdValue read FPreDealQuantity;
  235. property PreDealTotalPrice: TsdValue read FPreDealTotalPrice;
  236. property PreQcQuantity: TsdValue read FPreQcQuantity;
  237. property PreQcTotalPrice: TsdValue read FPreQcTotalPrice;
  238. property PreQcBGLCode: TsdValue read FPreQcBGLCode;
  239. property PreQcBGLNum: TsdValue read FPreQcBGLNum;
  240. property PrePcQuantity: TsdValue read FPrePcQuantity;
  241. property PrePcTotalPrice: TsdValue read FPrePcTotalPrice;
  242. property PrePcBGLCode: TsdValue read FPrePcBGLCode;
  243. property PrePcBGLNum: TsdValue read FPrePcBGLNum;
  244. property PreGatherQuantity: TsdValue read FPreGatherQuantity;
  245. property PreGatherTotalPrice: TsdValue read FPreGatherTotalPrice;
  246. property HasBookMark: TsdValue read FHasBookMark;
  247. property MarkMemo: TsdValue read FMarkMemo;
  248. property PM_PreTotalPrice: TsdValue read FPM_PreTotalPrice;
  249. property PM_TotalPrice: TsdValue read FPM_TotalPrice;
  250. end;
  251. TProjectGLRecord = class(TMeasureBaseRecord)
  252. private
  253. FID: TsdValue;
  254. FCode: TsdValue;
  255. FName: TsdValue;
  256. FUnits: TsdValue;
  257. FSpecs: TsdValue;
  258. FBasePrice: TsdValue;
  259. FRiskRange: TsdValue;
  260. FLockedPhaseID: TsdValue;
  261. FCreatePhaseID: TsdValue;
  262. FInfoPrice: TsdValue;
  263. FInfoDate: TsdValue;
  264. FDeltaPrice: TsdValue;
  265. FValidDeltaPrice: TsdValue;
  266. FPM_PreQuantity: TsdValue;
  267. FPM_PreTotalPrice: TsdValue;
  268. FPM_Quantity: TsdValue;
  269. FPM_TotalPrice: TsdValue;
  270. protected
  271. procedure DoAfterAddFields; override;
  272. public
  273. property ID: TsdValue read FID;
  274. property Code: TsdValue read FCode;
  275. property Name: TsdValue read FName;
  276. property Units: TsdValue read FUnits;
  277. property Specs: TsdValue read FSpecs;
  278. property BasePrice: TsdValue read FBasePrice;
  279. property RiskRange: TsdValue read FRiskRange;
  280. property LockedPhaseID: TsdValue read FLockedPhaseID;
  281. property CreatePhaseID: TsdValue read FCreatePhaseID;
  282. property InfoPrice: TsdValue read FInfoPrice;
  283. property InfoDate: TsdValue read FInfoDate;
  284. property DeltaPrice: TsdValue read FDeltaPrice;
  285. property ValidDeltaPrice: TsdValue read FValidDeltaPrice;
  286. property PM_PreQuantity: TsdValue read FPM_PreQuantity;
  287. property PM_PreTotalPrice: TsdValue read FPM_PreTotalPrice;
  288. property PM_Quantity: TsdValue read FPM_Quantity;
  289. property PM_TotalPrice: TsdValue read FPM_TotalPrice;
  290. end;
  291. TDetailGLRecord = class(TMeasureBaseRecord)
  292. private
  293. FID: TsdValue;
  294. FBillsID: TsdValue;
  295. FGLID: TsdValue;
  296. FCode: TsdValue;
  297. FQuantity: TsdValue;
  298. FCreatePhaseID: TsdValue;
  299. FLastBillsQuantity: TsdValue;
  300. FLockedPhaseID: TsdValue;
  301. FRelaProjectGL: TProjectGLRecord;
  302. protected
  303. procedure DoAfterAddFields; override;
  304. public
  305. property ID: TsdValue read FID;
  306. property BillsID: TsdValue read FBillsID;
  307. property GLID: TsdValue read FGLID;
  308. property Code: TsdValue read FCode;
  309. property Quantity: TsdValue read FQuantity;
  310. property CreatePhaseID: TsdValue read FCreatePhaseID;
  311. property LastBillsQuantity: TsdValue read FLastBillsQuantity;
  312. property LockedPhaseID: TsdValue read FLockedPhaseID;
  313. property RelaProjectGL: TProjectGLRecord read FRelaProjectGL write FRelaProjectGL;
  314. end;
  315. TStageCompareRecord = class(TMeasureBaseRecord)
  316. private
  317. FID: TsdValue;
  318. FQuantity0: TsdValue;
  319. FTotalPrice0: TsdValue;
  320. FQuantity1: TsdValue;
  321. FTotalPrice1: TsdValue;
  322. FQuantity2: TsdValue;
  323. FTotalPrice2: TsdValue;
  324. FQuantity3: TsdValue;
  325. FTotalPrice3: TsdValue;
  326. FQuantity4: TsdValue;
  327. FTotalPrice4: TsdValue;
  328. FQuantity5: TsdValue;
  329. FTotalPrice5: TsdValue;
  330. FQuantity6: TsdValue;
  331. FTotalPrice6: TsdValue;
  332. FQuantity7: TsdValue;
  333. FTotalPrice7: TsdValue;
  334. FQuantity8: TsdValue;
  335. FTotalPrice8: TsdValue;
  336. FQuantity9: TsdValue;
  337. FTotalPrice9: TsdValue;
  338. FQuantity10: TsdValue;
  339. FTotalPrice10: TsdValue;
  340. FQuantity11: TsdValue;
  341. FTotalPrice11: TsdValue;
  342. FQuantity12: TsdValue;
  343. FTotalPrice12: TsdValue;
  344. FQuantity13: TsdValue;
  345. FTotalPrice13: TsdValue;
  346. FQuantity14: TsdValue;
  347. FTotalPrice14: TsdValue;
  348. protected
  349. procedure DoAfterAddFields; override;
  350. public
  351. property ID: TsdValue read FID;
  352. property Quantity0: TsdValue read FQuantity0;
  353. property TotalPrice0 : TsdValue read FTotalPrice0;
  354. property Quantity1: TsdValue read FQuantity0;
  355. property TotalPrice1 : TsdValue read FTotalPrice0;
  356. property Quantity2: TsdValue read FQuantity0;
  357. property TotalPrice2 : TsdValue read FTotalPrice0;
  358. property Quantity3: TsdValue read FQuantity0;
  359. property TotalPrice3: TsdValue read FTotalPrice0;
  360. property Quantity4: TsdValue read FQuantity0;
  361. property TotalPrice4 : TsdValue read FTotalPrice0;
  362. property Quantity5: TsdValue read FQuantity0;
  363. property TotalPrice5 : TsdValue read FTotalPrice0;
  364. property Quantity6: TsdValue read FQuantity0;
  365. property TotalPrice6 : TsdValue read FTotalPrice0;
  366. property Quantity7: TsdValue read FQuantity0;
  367. property TotalPrice7 : TsdValue read FTotalPrice0;
  368. property Quantity8: TsdValue read FQuantity0;
  369. property TotalPrice8 : TsdValue read FTotalPrice0;
  370. property Quantity9: TsdValue read FQuantity0;
  371. property TotalPrice9 : TsdValue read FTotalPrice0;
  372. property Quantity10: TsdValue read FQuantity0;
  373. property TotalPrice10 : TsdValue read FTotalPrice0;
  374. property Quantity11: TsdValue read FQuantity0;
  375. property TotalPrice11 : TsdValue read FTotalPrice0;
  376. property Quantity12: TsdValue read FQuantity0;
  377. property TotalPrice12 : TsdValue read FTotalPrice0;
  378. property Quantity13: TsdValue read FQuantity0;
  379. property TotalPrice13 : TsdValue read FTotalPrice0;
  380. property Quantity14: TsdValue read FQuantity0;
  381. property TotalPrice14 : TsdValue read FTotalPrice0;
  382. end;
  383. implementation
  384. { TBillsRecord }
  385. procedure TBillsRecord.DoAfterAddFields;
  386. begin
  387. inherited;
  388. FID := ValueByName('ID');
  389. FParentID := ValueByName('ParentID');
  390. FNextSiblingID := ValueByName('NextSiblingID');
  391. FSerialNo := ValueByName('SerialNo');
  392. FIsLeaf := ValueByName('IsLeaf');
  393. FLeafXmjID := ValueByName('LeafXmjID');
  394. FXiangCode := ValueByName('XiangCode');
  395. FMuCode := ValueByName('MuCode');
  396. FJieCode := ValueByName('JieCode');
  397. FXimuCode := ValueByName('XimuCode');
  398. FIndexCode := ValueByName('IndexCode');
  399. FCode := ValueByName('Code');
  400. FB_Code := ValueByName('B_Code');
  401. FName := ValueByName('Name');
  402. FUnits := ValueByName('Units');
  403. FAlias := ValueByName('Alias');
  404. FPrice := ValueByName('Price');
  405. FNewPrice := ValueByName('NewPrice');
  406. FOrgQuantity := ValueByName('OrgQuantity');
  407. FOrgTotalPrice := ValueByName('OrgTotalPrice');
  408. FMisQuantity := ValueByName('MisQuantity');
  409. FMisTotalPrice := ValueByName('MisTotalPrice');
  410. FOthQuantity := ValueByName('OthQuantity');
  411. FOthTotalPrice := ValueByName('OthTotalPrice');
  412. FQuantity := ValueByName('Quantity');
  413. FTotalPrice := ValueByName('TotalPrice');
  414. FAddDealQuantity := ValueByName('AddDealQuantity');
  415. FAddDealTotalPrice := ValueByName('AddDealTotalPrice');
  416. FAddQcQuantity := ValueByName('AddQcQuantity');
  417. FAddQcTotalPrice := ValueByName('AddQcTotalPrice');
  418. FAddQcBGLCode := ValueByName('AddQcBGLCode');
  419. FAddQcBGLNum := ValueByName('AddQcBGLNum');
  420. FAddPcQuantity := ValueByName('AddPcQuantity');
  421. FAddPcTotalPrice := ValueByName('AddPcTotalPrice');
  422. FAddPcBGLCode := ValueByName('AddPcBGLCode');
  423. FAddPcBGLNum := ValueByName('AddPcBGLNum');
  424. FAddGatherQuantity := ValueByName('AddGatherQuantity');
  425. FAddGatherTotalPrice := ValueByName('AddGatherTotalPrice');
  426. FLockLevel := ValueByName('LockLevel');
  427. FLockInfo := ValueByName('LockInfo');
  428. FLockNewPrice := ValueByName('LockNewPrice');
  429. FCreatePhaseID := ValueByName('CreatePhaseID');
  430. FIsMeasureAdd := ValueByName('IsMeasureAdd');
  431. FPeg := ValueByName('Peg');
  432. FDrawingCode := ValueByName('DrawingCode');
  433. FMemoStr := ValueByName('MemoStr');
  434. FDgnQuantity1 := ValueByName('DgnQuantity1');
  435. FDgnQuantity2 := ValueByName('DgnQuantity2');
  436. FDgnPrice := ValueByName('DgnPrice');
  437. FDealDgnQuantity1 := ValueByName('DealDgnQuantity1');
  438. FDealDgnQuantity2 := ValueByName('DealDgnQuantity2');
  439. FCDgnQuantity1 := ValueByName('CDgnQuantity1');
  440. FCDgnQuantity2 := ValueByName('CDgnQuantity2');
  441. FAddDgnPrice := ValueByName('AddDgnPrice');
  442. FHasBookMark := ValueByName('HasBookMark');
  443. FMarkMemo := ValueByName('MarkMemo');
  444. FDealCode := ValueByName('DealCode');
  445. FDealCompany := ValueByName('DealCompany');
  446. FDealType := ValueByName('DealType');
  447. FAddCutTotalPrice := ValueByName('AddCutTotalPrice');
  448. FAddPayTotalPrice := ValueByName('AddPayTotalPrice');
  449. FAddCompleteRate := ValueByName('AddCompleteRate');
  450. FPM_AddTotalPrice := ValueByName('PM_AddTotalPrice');
  451. end;
  452. { TStageRecord }
  453. procedure TStageRecord.DoAfterAddFields;
  454. begin
  455. inherited;
  456. FBillsID := ValueByName('BillsID');
  457. FDealQuantity := ValueByName('DealQuantity');
  458. FDealTotalPrice := ValueByName('DealTotalPrice');
  459. FDealFlag := ValueByName('DealFlag');
  460. FDealFormula := ValueByName('DealFormula');
  461. FQcQuantity := ValueByName('QcQuantity');
  462. FQcTotalPrice := ValueByName('QcTotalPrice');
  463. FQcFlag := ValueByName('QcFlag');
  464. FQcFormula := ValueByName('QcFormula');
  465. FQcBGLCode := ValueByName('QcBGLCode');
  466. FQcBGLNum := ValueByName('QcBGLNum');
  467. FPcQuantity := ValueByName('PcQuantity');
  468. FPcTotalPrice := ValueByName('PcTotalPrice');
  469. FPcFlag := ValueByName('PcFlag');
  470. FPcFormula := ValueByName('PcFormula');
  471. FPcBGLCode := ValueByName('PcBGLCode');
  472. FPcBGLNum := ValueByName('PcBGLNum');
  473. FGatherQuantity := ValueByName('GatherQuantity');
  474. FGatherTotalPrice := ValueByName('GatherTotalPrice');
  475. FEndDealQuantity := ValueByName('EndDealQuantity');
  476. FEndDealTotalPrice := ValueByName('EndDealTotalPrice');
  477. FEndQcQuantity := ValueByName('EndQcQuantity');
  478. FEndQcTotalPrice := ValueByName('EndQcTotalPrice');
  479. FEndQcBGLCode := ValueByName('EndQcBGLCode');
  480. FEndQcBGLNum := ValueByName('EndQcBGLNum');
  481. FEndPcQuantity := ValueByName('EndPcQuantity');
  482. FEndPcTotalPrice := ValueByName('EndPcTotalPrice');
  483. FEndPcBGLCode := ValueByName('EndPcBGLCode');
  484. FEndPcBGLNum := ValueByName('EndPcBGLNum');
  485. FEndGatherQuantity := ValueByName('EndGatherQuantity');
  486. FEndGatherTotalPrice := ValueByName('EndGatherTotalPrice');
  487. FPreDealQuantity := ValueByName('PreDealQuantity');
  488. FPreDealTotalPrice := ValueByName('PreDealTotalPrice');
  489. FPreQcQuantity := ValueByName('PreQcQuantity');
  490. FPreQcTotalPrice := ValueByName('PreQcTotalPrice');
  491. FPreQcBGLCode := ValueByName('PreQcBGLCode');
  492. FPreQcBGLNum := ValueByName('PreQcBGLNum');
  493. FPrePcQuantity := ValueByName('PrePcQuantity');
  494. FPrePcTotalPrice := ValueByName('PrePcTotalPrice');
  495. FPrePcBGLCode := ValueByName('PrePcBGLCode');
  496. FPrePcBGLNum := ValueByName('PrePcBGLNum');
  497. FPreGatherQuantity := ValueByName('PreGatherQuantity');
  498. FPreGatherTotalPrice := ValueByName('PreGatherTotalPrice');
  499. FHasBookMark := ValueByName('HasBookMark');
  500. FMarkMemo := ValueByName('MarkMemo');
  501. FPM_PreTotalPrice := ValueByName('PM_PreTotalPrice');
  502. FPM_TotalPrice := ValueByName('PM_TotalPrice');
  503. end;
  504. { TProjectGLRecord }
  505. procedure TProjectGLRecord.DoAfterAddFields;
  506. begin
  507. inherited;
  508. FID := ValueByName('ID');
  509. FCode := ValueByName('Code');
  510. FName := ValueByName('Name');
  511. FUnits := ValueByName('Units');
  512. FSpecs := ValueByName('Specs');
  513. FBasePrice := ValueByName('BasePrice');
  514. FRiskRange := ValueByName('RiskRange');
  515. FLockedPhaseID := ValueByName('LockedPhaseID');
  516. FCreatePhaseID := ValueByName('CreatePhaseID');
  517. FInfoPrice := ValueByName('InfoPrice');
  518. FInfoDate := ValueByName('InfoDate');
  519. FDeltaPrice := ValueByName('DeltaPrice');
  520. FValidDeltaPrice := ValueByName('ValidDeltaPrice');
  521. FPM_PreQuantity := ValueByName('PM_PreQuantity');
  522. FPM_PreTotalPrice := ValueByName('PM_PreTotalPrice');
  523. FPM_Quantity := ValueByName('PM_Quantity');
  524. FPM_TotalPrice := ValueByName('PM_TotalPrice');
  525. end;
  526. { TDetailGLRecord }
  527. procedure TDetailGLRecord.DoAfterAddFields;
  528. begin
  529. inherited;
  530. FID := ValueByName('ID');
  531. FBillsID := ValueByName('BillsID');
  532. FGLID := ValueByName('GLID');
  533. FCode := ValueByName('Code');
  534. FQuantity := ValueByName('Quantity');
  535. FCreatePhaseID := ValueByName('CreatePhaseID');
  536. FLastBillsQuantity := ValueByName('LastBillsQuantity');
  537. FLockedPhaseID := ValueByName('LockedPhaseID');
  538. end;
  539. { TMeasureBaseRecord }
  540. procedure TMeasureBaseRecord.AddDifferValue(AValue: TsdValue;
  541. ADiffer: Double);
  542. begin
  543. if ADiffer <> 0 then
  544. AValue.AsFloat := AValue.AsFloat + ADiffer;
  545. end;
  546. procedure TMeasureBaseRecord.SetBoolValue(AValue: TsdValue;
  547. ABool: Boolean);
  548. begin
  549. if AValue.AsBoolean <> ABool then
  550. AValue.AsBoolean := ABool;
  551. end;
  552. procedure TMeasureBaseRecord.SetFloatValue(AValue: TsdValue;
  553. AFloat: Double);
  554. begin
  555. if AValue.AsFloat <> AFloat then
  556. AValue.AsFloat := AFloat;
  557. end;
  558. procedure TMeasureBaseRecord.SetIntValue(AValue: TsdValue; AInt: Integer);
  559. begin
  560. if AValue.AsInteger <> AInt then
  561. AValue.AsInteger := AInt;
  562. end;
  563. { TStageCompareRecord }
  564. procedure TStageCompareRecord.DoAfterAddFields;
  565. begin
  566. inherited;
  567. FID := ValueByName('ID');
  568. FQuantity0 := ValueByName('Quantity0');
  569. FTotalPrice0 := ValueByName('TotalPrice0');
  570. FQuantity1 := ValueByName('Quantity1');
  571. FTotalPrice1 := ValueByName('TotalPrice1');
  572. FQuantity2 := ValueByName('Quantity2');
  573. FTotalPrice2 := ValueByName('TotalPrice2');
  574. FQuantity3 := ValueByName('Quantity3');
  575. FTotalPrice3 := ValueByName('TotalPrice3');
  576. FQuantity4 := ValueByName('Quantity4');
  577. FTotalPrice4 := ValueByName('TotalPrice4');
  578. FQuantity5 := ValueByName('Quantity5');
  579. FTotalPrice5 := ValueByName('TotalPrice5');
  580. FQuantity6 := ValueByName('Quantity6');
  581. FTotalPrice6 := ValueByName('TotalPrice6');
  582. FQuantity7 := ValueByName('Quantity7');
  583. FTotalPrice7 := ValueByName('TotalPrice7');
  584. FQuantity8 := ValueByName('Quantity8');
  585. FTotalPrice8 := ValueByName('TotalPrice8');
  586. FQuantity9 := ValueByName('Quantity9');
  587. FTotalPrice9 := ValueByName('TotalPrice9');
  588. FQuantity10 := ValueByName('Quantity10');
  589. FTotalPrice10 := ValueByName('TotalPrice10');
  590. FQuantity11 := ValueByName('Quantity11');
  591. FTotalPrice11 := ValueByName('TotalPrice11');
  592. FQuantity12 := ValueByName('Quantity12');
  593. FTotalPrice12 := ValueByName('TotalPrice12');
  594. FQuantity13 := ValueByName('Quantity13');
  595. FTotalPrice13 := ValueByName('TotalPrice13');
  596. FQuantity14 := ValueByName('Quantity14');
  597. FTotalPrice14 := ValueByName('TotalPrice14');
  598. end;
  599. end.