mDataRecord.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  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. implementation
  316. { TBillsRecord }
  317. procedure TBillsRecord.DoAfterAddFields;
  318. begin
  319. inherited;
  320. FID := ValueByName('ID');
  321. FParentID := ValueByName('ParentID');
  322. FNextSiblingID := ValueByName('NextSiblingID');
  323. FSerialNo := ValueByName('SerialNo');
  324. FIsLeaf := ValueByName('IsLeaf');
  325. FLeafXmjID := ValueByName('LeafXmjID');
  326. FXiangCode := ValueByName('XiangCode');
  327. FMuCode := ValueByName('MuCode');
  328. FJieCode := ValueByName('JieCode');
  329. FXimuCode := ValueByName('XimuCode');
  330. FIndexCode := ValueByName('IndexCode');
  331. FCode := ValueByName('Code');
  332. FB_Code := ValueByName('B_Code');
  333. FName := ValueByName('Name');
  334. FUnits := ValueByName('Units');
  335. FAlias := ValueByName('Alias');
  336. FPrice := ValueByName('Price');
  337. FNewPrice := ValueByName('NewPrice');
  338. FOrgQuantity := ValueByName('OrgQuantity');
  339. FOrgTotalPrice := ValueByName('OrgTotalPrice');
  340. FMisQuantity := ValueByName('MisQuantity');
  341. FMisTotalPrice := ValueByName('MisTotalPrice');
  342. FOthQuantity := ValueByName('OthQuantity');
  343. FOthTotalPrice := ValueByName('OthTotalPrice');
  344. FQuantity := ValueByName('Quantity');
  345. FTotalPrice := ValueByName('TotalPrice');
  346. FAddDealQuantity := ValueByName('AddDealQuantity');
  347. FAddDealTotalPrice := ValueByName('AddDealTotalPrice');
  348. FAddQcQuantity := ValueByName('AddQcQuantity');
  349. FAddQcTotalPrice := ValueByName('AddQcTotalPrice');
  350. FAddQcBGLCode := ValueByName('AddQcBGLCode');
  351. FAddQcBGLNum := ValueByName('AddQcBGLNum');
  352. FAddPcQuantity := ValueByName('AddPcQuantity');
  353. FAddPcTotalPrice := ValueByName('AddPcTotalPrice');
  354. FAddPcBGLCode := ValueByName('AddPcBGLCode');
  355. FAddPcBGLNum := ValueByName('AddPcBGLNum');
  356. FAddGatherQuantity := ValueByName('AddGatherQuantity');
  357. FAddGatherTotalPrice := ValueByName('AddGatherTotalPrice');
  358. FLockLevel := ValueByName('LockLevel');
  359. FLockInfo := ValueByName('LockInfo');
  360. FLockNewPrice := ValueByName('LockNewPrice');
  361. FCreatePhaseID := ValueByName('CreatePhaseID');
  362. FIsMeasureAdd := ValueByName('IsMeasureAdd');
  363. FPeg := ValueByName('Peg');
  364. FDrawingCode := ValueByName('DrawingCode');
  365. FMemoStr := ValueByName('MemoStr');
  366. FDgnQuantity1 := ValueByName('DgnQuantity1');
  367. FDgnQuantity2 := ValueByName('DgnQuantity2');
  368. FDgnPrice := ValueByName('DgnPrice');
  369. FDealDgnQuantity1 := ValueByName('DealDgnQuantity1');
  370. FDealDgnQuantity2 := ValueByName('DealDgnQuantity2');
  371. FCDgnQuantity1 := ValueByName('CDgnQuantity1');
  372. FCDgnQuantity2 := ValueByName('CDgnQuantity2');
  373. FAddDgnPrice := ValueByName('AddDgnPrice');
  374. FHasBookMark := ValueByName('HasBookMark');
  375. FMarkMemo := ValueByName('MarkMemo');
  376. FDealCode := ValueByName('DealCode');
  377. FDealCompany := ValueByName('DealCompany');
  378. FDealType := ValueByName('DealType');
  379. FAddCutTotalPrice := ValueByName('AddCutTotalPrice');
  380. FAddPayTotalPrice := ValueByName('AddPayTotalPrice');
  381. FAddCompleteRate := ValueByName('AddCompleteRate');
  382. FPM_AddTotalPrice := ValueByName('PM_AddTotalPrice');
  383. end;
  384. { TStageRecord }
  385. procedure TStageRecord.DoAfterAddFields;
  386. begin
  387. inherited;
  388. FBillsID := ValueByName('BillsID');
  389. FDealQuantity := ValueByName('DealQuantity');
  390. FDealTotalPrice := ValueByName('DealTotalPrice');
  391. FDealFlag := ValueByName('DealFlag');
  392. FDealFormula := ValueByName('DealFormula');
  393. FQcQuantity := ValueByName('QcQuantity');
  394. FQcTotalPrice := ValueByName('QcTotalPrice');
  395. FQcFlag := ValueByName('QcFlag');
  396. FQcFormula := ValueByName('QcFormula');
  397. FQcBGLCode := ValueByName('QcBGLCode');
  398. FQcBGLNum := ValueByName('QcBGLNum');
  399. FPcQuantity := ValueByName('PcQuantity');
  400. FPcTotalPrice := ValueByName('PcTotalPrice');
  401. FPcFlag := ValueByName('PcFlag');
  402. FPcFormula := ValueByName('PcFormula');
  403. FPcBGLCode := ValueByName('PcBGLCode');
  404. FPcBGLNum := ValueByName('PcBGLNum');
  405. FGatherQuantity := ValueByName('GatherQuantity');
  406. FGatherTotalPrice := ValueByName('GatherTotalPrice');
  407. FEndDealQuantity := ValueByName('EndDealQuantity');
  408. FEndDealTotalPrice := ValueByName('EndDealTotalPrice');
  409. FEndQcQuantity := ValueByName('EndQcQuantity');
  410. FEndQcTotalPrice := ValueByName('EndQcTotalPrice');
  411. FEndQcBGLCode := ValueByName('EndQcBGLCode');
  412. FEndQcBGLNum := ValueByName('EndQcBGLNum');
  413. FEndPcQuantity := ValueByName('EndPcQuantity');
  414. FEndPcTotalPrice := ValueByName('EndPcTotalPrice');
  415. FEndPcBGLCode := ValueByName('EndPcBGLCode');
  416. FEndPcBGLNum := ValueByName('EndPcBGLNum');
  417. FEndGatherQuantity := ValueByName('EndGatherQuantity');
  418. FEndGatherTotalPrice := ValueByName('EndGatherTotalPrice');
  419. FPreDealQuantity := ValueByName('PreDealQuantity');
  420. FPreDealTotalPrice := ValueByName('PreDealTotalPrice');
  421. FPreQcQuantity := ValueByName('PreQcQuantity');
  422. FPreQcTotalPrice := ValueByName('PreQcTotalPrice');
  423. FPreQcBGLCode := ValueByName('PreQcBGLCode');
  424. FPreQcBGLNum := ValueByName('PreQcBGLNum');
  425. FPrePcQuantity := ValueByName('PrePcQuantity');
  426. FPrePcTotalPrice := ValueByName('PrePcTotalPrice');
  427. FPrePcBGLCode := ValueByName('PrePcBGLCode');
  428. FPrePcBGLNum := ValueByName('PrePcBGLNum');
  429. FPreGatherQuantity := ValueByName('PreGatherQuantity');
  430. FPreGatherTotalPrice := ValueByName('PreGatherTotalPrice');
  431. FHasBookMark := ValueByName('HasBookMark');
  432. FMarkMemo := ValueByName('MarkMemo');
  433. FPM_PreTotalPrice := ValueByName('PM_PreTotalPrice');
  434. FPM_TotalPrice := ValueByName('PM_TotalPrice');
  435. end;
  436. { TProjectGLRecord }
  437. procedure TProjectGLRecord.DoAfterAddFields;
  438. begin
  439. inherited;
  440. FID := ValueByName('ID');
  441. FCode := ValueByName('Code');
  442. FName := ValueByName('Name');
  443. FUnits := ValueByName('Units');
  444. FSpecs := ValueByName('Specs');
  445. FBasePrice := ValueByName('BasePrice');
  446. FRiskRange := ValueByName('RiskRange');
  447. FLockedPhaseID := ValueByName('LockedPhaseID');
  448. FCreatePhaseID := ValueByName('CreatePhaseID');
  449. FInfoPrice := ValueByName('InfoPrice');
  450. FInfoDate := ValueByName('InfoDate');
  451. FDeltaPrice := ValueByName('DeltaPrice');
  452. FValidDeltaPrice := ValueByName('ValidDeltaPrice');
  453. FPM_PreQuantity := ValueByName('PM_PreQuantity');
  454. FPM_PreTotalPrice := ValueByName('PM_PreTotalPrice');
  455. FPM_Quantity := ValueByName('PM_Quantity');
  456. FPM_TotalPrice := ValueByName('PM_TotalPrice');
  457. end;
  458. { TDetailGLRecord }
  459. procedure TDetailGLRecord.DoAfterAddFields;
  460. begin
  461. inherited;
  462. FID := ValueByName('ID');
  463. FBillsID := ValueByName('BillsID');
  464. FGLID := ValueByName('GLID');
  465. FCode := ValueByName('Code');
  466. FQuantity := ValueByName('Quantity');
  467. FCreatePhaseID := ValueByName('CreatePhaseID');
  468. FLastBillsQuantity := ValueByName('LastBillsQuantity');
  469. FLockedPhaseID := ValueByName('LockedPhaseID');
  470. end;
  471. { TMeasureBaseRecord }
  472. procedure TMeasureBaseRecord.AddDifferValue(AValue: TsdValue;
  473. ADiffer: Double);
  474. begin
  475. if ADiffer <> 0 then
  476. AValue.AsFloat := AValue.AsFloat + ADiffer;
  477. end;
  478. procedure TMeasureBaseRecord.SetBoolValue(AValue: TsdValue;
  479. ABool: Boolean);
  480. begin
  481. if AValue.AsBoolean <> ABool then
  482. AValue.AsBoolean := ABool;
  483. end;
  484. procedure TMeasureBaseRecord.SetFloatValue(AValue: TsdValue;
  485. AFloat: Double);
  486. begin
  487. if AValue.AsFloat <> AFloat then
  488. AValue.AsFloat := AFloat;
  489. end;
  490. procedure TMeasureBaseRecord.SetIntValue(AValue: TsdValue; AInt: Integer);
  491. begin
  492. if AValue.AsInteger <> AInt then
  493. AValue.AsInteger := AInt;
  494. end;
  495. end.