mDataRecord.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  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. FCalcType: TsdValue;
  48. // 累计
  49. FAddDealQuantity: TsdValue;
  50. FAddDealTotalPrice: TsdValue;
  51. FAddQcQuantity: TsdValue;
  52. FAddQcTotalPrice: TsdValue;
  53. FAddQcBGLCode: TsdValue;
  54. FAddQcBGLNum: TsdValue;
  55. FAddPcQuantity: TsdValue;
  56. FAddPcTotalPrice: TsdValue;
  57. FAddPcBGLCode: TsdValue;
  58. FAddPcBGLNum: TsdValue;
  59. FAddGatherQuantity: TsdValue;
  60. FAddGatherTotalPrice: TsdValue;
  61. FLockLevel: TsdValue;
  62. FLockInfo: TsdValue;
  63. FLockNewPrice: TsdValue;
  64. FCreatePhaseID: TsdValue;
  65. FIsMeasureAdd: TsdValue;
  66. FPeg: TsdValue;
  67. FDrawingCode: TsdValue;
  68. FMemoStr: TsdValue;
  69. FDgnQuantity1: TsdValue;
  70. FDgnQuantity2: TsdValue;
  71. FDgnPrice: TsdValue;
  72. FDealDgnQuantity1: TsdValue;
  73. FDealDgnQuantity2: TsdValue;
  74. FCDgnQuantity1: TsdValue;
  75. FCDgnQuantity2: TsdValue;
  76. FAddDgnPrice: TsdValue;
  77. FHasBookMark: TsdValue;
  78. FMarkMemo: TsdValue;
  79. FDealCode: TsdValue;
  80. FDealCompany: TsdValue;
  81. FDealType: TsdValue;
  82. FAddCutTotalPrice: TsdValue;
  83. FAddPayTotalPrice: TsdValue;
  84. FAddCompleteRate: TsdValue;
  85. <<<<<<< HEAD
  86. FCacheMisTP: Double;
  87. FCacheOrgTP: Double;
  88. FCacheOthTP: Double;
  89. =======
  90. FPM_AddTotalPrice: TsdValue;
  91. >>>>>>> 3.1.3.3
  92. protected
  93. procedure DoAfterAddFields; override;
  94. public
  95. property ID: TsdValue read FID;
  96. property ParentID: TsdValue read FParentID;
  97. property NextSiblingID: TsdValue read FNextSiblingID;
  98. property SerialNo: TsdValue read FSerialNo;
  99. property IsLeaf: TsdValue read FIsLeaf;
  100. property LeafXmjID: TsdValue read FLeafXmjID;
  101. property XiangCode: TsdValue read FXiangCode;
  102. property MuCode: TsdValue read FMuCode;
  103. property JieCode: TsdValue read FJieCode;
  104. property XimuCode: TsdValue read FXimuCode;
  105. property IndexCode: TsdValue read FIndexCode;
  106. property Code: TsdValue read FCode;
  107. property B_Code: TsdValue read FB_Code;
  108. property Name: TsdValue read FName;
  109. property Units: TsdValue read FUnits;
  110. property Alias: TsdValue read FAlias;
  111. property Price: TsdValue read FPrice;
  112. property NewPrice: TsdValue read FNewPrice;
  113. property OrgQuantity: TsdValue read FOrgQuantity;
  114. property OrgTotalPrice: TsdValue read FOrgTotalPrice;
  115. property MisQuantity: TsdValue read FMisQuantity;
  116. property MisTotalPrice: TsdValue read FMisTotalPrice;
  117. property OthQuantity: TsdValue read FOthQuantity;
  118. property OthTotalPrice: TsdValue read FOthTotalPrice;
  119. property Quantity: TsdValue read FQuantity;
  120. property TotalPrice: TsdValue read FTotalPrice;
  121. property CalcType: TsdValue read FCalcType;
  122. property AddDealQuantity: TsdValue read FAddDealQuantity;
  123. property AddDealTotalPrice: TsdValue read FAddDealTotalPrice;
  124. property AddQcQuantity: TsdValue read FAddQcQuantity;
  125. property AddQcTotalPrice: TsdValue read FAddQcTotalPrice;
  126. property AddQcBGLCode: TsdValue read FAddQcBGLCode;
  127. property AddQcBGLNum: TsdValue read FAddQcBGLNum;
  128. property AddPcQuantity: TsdValue read FAddPcQuantity;
  129. property AddPcTotalPrice: TsdValue read FAddPcTotalPrice;
  130. property AddPcBGLCode: TsdValue read FAddPcBGLCode;
  131. property AddPcBGLNum: TsdValue read FAddPcBGLNum;
  132. property AddGatherQuantity: TsdValue read FAddGatherQuantity;
  133. property AddGatherTotalPrice: TsdValue read FAddGatherTotalPrice;
  134. property LockLevel: TsdValue read FLockLevel;
  135. property LockInfo: TsdValue read FLockInfo;
  136. property LockNewPrice: TsdValue read FLockNewPrice;
  137. property CreatePhaseID: TsdValue read FCreatePhaseID;
  138. property IsMeasureAdd: TsdValue read FIsMeasureAdd;
  139. property Peg: TsdValue read FPeg;
  140. property DrawingCode: TsdValue read FDrawingCode;
  141. property MemoStr: TsdValue read FMemoStr;
  142. property DgnQuantity1: TsdValue read FDgnQuantity1;
  143. property DgnQuantity2: TsdValue read FDgnQuantity2;
  144. property DgnPrice: TsdValue read FDgnPrice;
  145. property DealDgnQuantity1: TsdValue read FDealDgnQuantity1;
  146. property DealDgnQuantity2: TsdValue read FDealDgnQuantity2;
  147. property CDgnQuantity1: TsdValue read FCDgnQuantity1;
  148. property CDgnQuantity2: TsdValue read FCDgnQuantity2;
  149. property AddDgnPrice: TsdValue read FAddDgnPrice;
  150. property HasBookMark: TsdValue read FHasBookMark;
  151. property MarkMemo: TsdValue read FMarkMemo;
  152. property DealCode: TsdValue read FDealCode;
  153. property DealCompany: TsdValue read FDealCompany;
  154. property DealType: TsdValue read FDealType;
  155. property AddCutTotalPrice: TsdValue read FAddCutTotalPrice;
  156. property AddPayTotalPrice: TsdValue read FAddPayTotalPrice;
  157. property AddCompleteRate: TsdValue read FAddCompleteRate;
  158. <<<<<<< HEAD
  159. // Cache Data 用于增量计算,记录原始值
  160. property CacheOrgTP: Double read FCacheOrgTP write FCacheOrgTP;
  161. property CacheMisTP: Double read FCacheMisTP write FCacheMisTP;
  162. property CacheOthTP: Double read FCacheOthTP write FCacheOthTP;
  163. =======
  164. property PM_AddTotalPrice: TsdValue read FPM_AddTotalPrice;
  165. >>>>>>> 3.1.3.3
  166. end;
  167. TStageRecord = class(TMeasureBaseRecord)
  168. private
  169. FBillsID: TsdValue;
  170. FDealQuantity: TsdValue;
  171. FDealTotalPrice: TsdValue;
  172. FDealFlag: TsdValue;
  173. FDealFormula: TsdValue;
  174. FQcQuantity: TsdValue;
  175. FQcTotalPrice: TsdValue;
  176. FQcFlag: TsdValue;
  177. FQcFormula: TsdValue;
  178. FQcBGLCode: TsdValue;
  179. FQcBGLNum: TsdValue;
  180. FPcQuantity: TsdValue;
  181. FPcTotalPrice: TsdValue;
  182. FPcFlag: TsdValue;
  183. FPcFormula: TsdValue;
  184. FPcBGLCode: TsdValue;
  185. FPcBGLNum: TsdValue;
  186. FGatherQuantity: TsdValue;
  187. FGatherTotalPrice: TsdValue;
  188. FEndDealQuantity: TsdValue;
  189. FEndDealTotalPrice: TsdValue;
  190. FEndQcQuantity: TsdValue;
  191. FEndQcTotalPrice: TsdValue;
  192. FEndQcBGLCode: TsdValue;
  193. FEndQcBGLNum: TsdValue;
  194. FEndPcQuantity: TsdValue;
  195. FEndPcTotalPrice: TsdValue;
  196. FEndPcBGLCode: TsdValue;
  197. FEndPcBGLNum: TsdValue;
  198. FEndGatherQuantity: TsdValue;
  199. FEndGatherTotalPrice: TsdValue;
  200. FPreDealQuantity: TsdValue;
  201. FPreDealTotalPrice: TsdValue;
  202. FPreQcQuantity: TsdValue;
  203. FPreQcTotalPrice: TsdValue;
  204. FPreQcBGLCode: TsdValue;
  205. FPreQcBGLNum: TsdValue;
  206. FPrePcQuantity: TsdValue;
  207. FPrePcTotalPrice: TsdValue;
  208. FPrePcBGLCode: TsdValue;
  209. FPrePcBGLNum: TsdValue;
  210. FPreGatherQuantity: TsdValue;
  211. FPreGatherTotalPrice: TsdValue;
  212. FHasBookMark: TsdValue;
  213. FMarkMemo: TsdValue;
  214. <<<<<<< HEAD
  215. FCacheDealTP: Double;
  216. =======
  217. FPM_PreTotalPrice: TsdValue;
  218. FPM_TotalPrice: TsdValue;
  219. >>>>>>> 3.1.3.3
  220. protected
  221. procedure DoAfterAddFields; override;
  222. public
  223. property BillsID: TsdValue read FBillsID;
  224. property DealQuantity: TsdValue read FDealQuantity;
  225. property DealTotalPrice: TsdValue read FDealTotalPrice;
  226. property DealFlag: TsdValue read FDealFlag;
  227. property DealFormula: TsdValue read FDealFormula;
  228. property QcQuantity: TsdValue read FQcQuantity;
  229. property QcTotalPrice: TsdValue read FQcTotalPrice;
  230. property QcFlag: TsdValue read FQcFlag;
  231. property QcFormula: TsdValue read FQcFormula;
  232. property QcBGLCode: TsdValue read FQcBGLCode;
  233. property QcBGLNum: TsdValue read FQcBGLNum;
  234. property PcQuantity: TsdValue read FPcQuantity;
  235. property PcTotalPrice: TsdValue read FPcTotalPrice;
  236. property PcFlag: TsdValue read FPcFlag;
  237. property PcFormula: TsdValue read FPcFormula;
  238. property PcBGLCode: TsdValue read FPcBGLCode;
  239. property PcBGLNum: TsdValue read FPcBGLNum;
  240. property GatherQuantity: TsdValue read FGatherQuantity;
  241. property GatherTotalPrice: TsdValue read FGatherTotalPrice;
  242. property EndDealQuantity: TsdValue read FEndDealQuantity;
  243. property EndDealTotalPrice: TsdValue read FEndDealTotalPrice;
  244. property EndQcQuantity: TsdValue read FEndQcQuantity;
  245. property EndQcTotalPrice: TsdValue read FEndQcTotalPrice;
  246. property EndQcBGLCode: TsdValue read FEndQcBGLCode;
  247. property EndQcBGLNum: TsdValue read FEndQcBGLNum;
  248. property EndPcQuantity: TsdValue read FEndPcQuantity;
  249. property EndPcTotalPrice: TsdValue read FEndPcTotalPrice;
  250. property EndPcBGLCode: TsdValue read FEndPcBGLCode;
  251. property EndPcBGLNum: TsdValue read FEndPcBGLNum;
  252. property EndGatherQuantity: TsdValue read FEndGatherQuantity;
  253. property EndGatherTotalPrice: TsdValue read FEndGatherTotalPrice;
  254. property PreDealQuantity: TsdValue read FPreDealQuantity;
  255. property PreDealTotalPrice: TsdValue read FPreDealTotalPrice;
  256. property PreQcQuantity: TsdValue read FPreQcQuantity;
  257. property PreQcTotalPrice: TsdValue read FPreQcTotalPrice;
  258. property PreQcBGLCode: TsdValue read FPreQcBGLCode;
  259. property PreQcBGLNum: TsdValue read FPreQcBGLNum;
  260. property PrePcQuantity: TsdValue read FPrePcQuantity;
  261. property PrePcTotalPrice: TsdValue read FPrePcTotalPrice;
  262. property PrePcBGLCode: TsdValue read FPrePcBGLCode;
  263. property PrePcBGLNum: TsdValue read FPrePcBGLNum;
  264. property PreGatherQuantity: TsdValue read FPreGatherQuantity;
  265. property PreGatherTotalPrice: TsdValue read FPreGatherTotalPrice;
  266. property HasBookMark: TsdValue read FHasBookMark;
  267. property MarkMemo: TsdValue read FMarkMemo;
  268. <<<<<<< HEAD
  269. property CacheDealTP: Double read FCacheDealTP write FCacheDealTP;
  270. =======
  271. property PM_PreTotalPrice: TsdValue read FPM_PreTotalPrice;
  272. property PM_TotalPrice: TsdValue read FPM_TotalPrice;
  273. end;
  274. TProjectGLRecord = class(TMeasureBaseRecord)
  275. private
  276. FID: TsdValue;
  277. FCode: TsdValue;
  278. FName: TsdValue;
  279. FUnits: TsdValue;
  280. FSpecs: TsdValue;
  281. FBasePrice: TsdValue;
  282. FRiskRange: TsdValue;
  283. FLockedPhaseID: TsdValue;
  284. FCreatePhaseID: TsdValue;
  285. FInfoPrice: TsdValue;
  286. FInfoDate: TsdValue;
  287. FDeltaPrice: TsdValue;
  288. FValidDeltaPrice: TsdValue;
  289. FPM_PreQuantity: TsdValue;
  290. FPM_PreTotalPrice: TsdValue;
  291. FPM_Quantity: TsdValue;
  292. FPM_TotalPrice: TsdValue;
  293. protected
  294. procedure DoAfterAddFields; override;
  295. public
  296. property ID: TsdValue read FID;
  297. property Code: TsdValue read FCode;
  298. property Name: TsdValue read FName;
  299. property Units: TsdValue read FUnits;
  300. property Specs: TsdValue read FSpecs;
  301. property BasePrice: TsdValue read FBasePrice;
  302. property RiskRange: TsdValue read FRiskRange;
  303. property LockedPhaseID: TsdValue read FLockedPhaseID;
  304. property CreatePhaseID: TsdValue read FCreatePhaseID;
  305. property InfoPrice: TsdValue read FInfoPrice;
  306. property InfoDate: TsdValue read FInfoDate;
  307. property DeltaPrice: TsdValue read FDeltaPrice;
  308. property ValidDeltaPrice: TsdValue read FValidDeltaPrice;
  309. property PM_PreQuantity: TsdValue read FPM_PreQuantity;
  310. property PM_PreTotalPrice: TsdValue read FPM_PreTotalPrice;
  311. property PM_Quantity: TsdValue read FPM_Quantity;
  312. property PM_TotalPrice: TsdValue read FPM_TotalPrice;
  313. end;
  314. TDetailGLRecord = class(TMeasureBaseRecord)
  315. private
  316. FID: TsdValue;
  317. FBillsID: TsdValue;
  318. FGLID: TsdValue;
  319. FCode: TsdValue;
  320. FQuantity: TsdValue;
  321. FCreatePhaseID: TsdValue;
  322. FLastBillsQuantity: TsdValue;
  323. FLockedPhaseID: TsdValue;
  324. FRelaProjectGL: TProjectGLRecord;
  325. protected
  326. procedure DoAfterAddFields; override;
  327. public
  328. property ID: TsdValue read FID;
  329. property BillsID: TsdValue read FBillsID;
  330. property GLID: TsdValue read FGLID;
  331. property Code: TsdValue read FCode;
  332. property Quantity: TsdValue read FQuantity;
  333. property CreatePhaseID: TsdValue read FCreatePhaseID;
  334. property LastBillsQuantity: TsdValue read FLastBillsQuantity;
  335. property LockedPhaseID: TsdValue read FLockedPhaseID;
  336. property RelaProjectGL: TProjectGLRecord read FRelaProjectGL write FRelaProjectGL;
  337. >>>>>>> 3.1.3.3
  338. end;
  339. implementation
  340. { TBillsRecord }
  341. procedure TBillsRecord.DoAfterAddFields;
  342. begin
  343. inherited;
  344. FID := ValueByName('ID');
  345. FParentID := ValueByName('ParentID');
  346. FNextSiblingID := ValueByName('NextSiblingID');
  347. FSerialNo := ValueByName('SerialNo');
  348. FIsLeaf := ValueByName('IsLeaf');
  349. FLeafXmjID := ValueByName('LeafXmjID');
  350. FXiangCode := ValueByName('XiangCode');
  351. FMuCode := ValueByName('MuCode');
  352. FJieCode := ValueByName('JieCode');
  353. FXimuCode := ValueByName('XimuCode');
  354. FIndexCode := ValueByName('IndexCode');
  355. FCode := ValueByName('Code');
  356. FB_Code := ValueByName('B_Code');
  357. FName := ValueByName('Name');
  358. FUnits := ValueByName('Units');
  359. FAlias := ValueByName('Alias');
  360. FPrice := ValueByName('Price');
  361. FNewPrice := ValueByName('NewPrice');
  362. FOrgQuantity := ValueByName('OrgQuantity');
  363. FOrgTotalPrice := ValueByName('OrgTotalPrice');
  364. FMisQuantity := ValueByName('MisQuantity');
  365. FMisTotalPrice := ValueByName('MisTotalPrice');
  366. FOthQuantity := ValueByName('OthQuantity');
  367. FOthTotalPrice := ValueByName('OthTotalPrice');
  368. FQuantity := ValueByName('Quantity');
  369. FTotalPrice := ValueByName('TotalPrice');
  370. FCalcType := ValueByName('CalcType');
  371. FAddDealQuantity := ValueByName('AddDealQuantity');
  372. FAddDealTotalPrice := ValueByName('AddDealTotalPrice');
  373. FAddQcQuantity := ValueByName('AddQcQuantity');
  374. FAddQcTotalPrice := ValueByName('AddQcTotalPrice');
  375. FAddQcBGLCode := ValueByName('AddQcBGLCode');
  376. FAddQcBGLNum := ValueByName('AddQcBGLNum');
  377. FAddPcQuantity := ValueByName('AddPcQuantity');
  378. FAddPcTotalPrice := ValueByName('AddPcTotalPrice');
  379. FAddPcBGLCode := ValueByName('AddPcBGLCode');
  380. FAddPcBGLNum := ValueByName('AddPcBGLNum');
  381. FAddGatherQuantity := ValueByName('AddGatherQuantity');
  382. FAddGatherTotalPrice := ValueByName('AddGatherTotalPrice');
  383. FLockLevel := ValueByName('LockLevel');
  384. FLockInfo := ValueByName('LockInfo');
  385. FLockNewPrice := ValueByName('LockNewPrice');
  386. FCreatePhaseID := ValueByName('CreatePhaseID');
  387. FIsMeasureAdd := ValueByName('IsMeasureAdd');
  388. FPeg := ValueByName('Peg');
  389. FDrawingCode := ValueByName('DrawingCode');
  390. FMemoStr := ValueByName('MemoStr');
  391. FDgnQuantity1 := ValueByName('DgnQuantity1');
  392. FDgnQuantity2 := ValueByName('DgnQuantity2');
  393. FDgnPrice := ValueByName('DgnPrice');
  394. FDealDgnQuantity1 := ValueByName('DealDgnQuantity1');
  395. FDealDgnQuantity2 := ValueByName('DealDgnQuantity2');
  396. FCDgnQuantity1 := ValueByName('CDgnQuantity1');
  397. FCDgnQuantity2 := ValueByName('CDgnQuantity2');
  398. FAddDgnPrice := ValueByName('AddDgnPrice');
  399. FHasBookMark := ValueByName('HasBookMark');
  400. FMarkMemo := ValueByName('MarkMemo');
  401. FDealCode := ValueByName('DealCode');
  402. FDealCompany := ValueByName('DealCompany');
  403. FDealType := ValueByName('DealType');
  404. FAddCutTotalPrice := ValueByName('AddCutTotalPrice');
  405. FAddPayTotalPrice := ValueByName('AddPayTotalPrice');
  406. FAddCompleteRate := ValueByName('AddCompleteRate');
  407. FPM_AddTotalPrice := ValueByName('PM_AddTotalPrice');
  408. end;
  409. { TStageRecord }
  410. procedure TStageRecord.DoAfterAddFields;
  411. begin
  412. inherited;
  413. FBillsID := ValueByName('BillsID');
  414. FDealQuantity := ValueByName('DealQuantity');
  415. FDealTotalPrice := ValueByName('DealTotalPrice');
  416. FDealFlag := ValueByName('DealFlag');
  417. FDealFormula := ValueByName('DealFormula');
  418. FQcQuantity := ValueByName('QcQuantity');
  419. FQcTotalPrice := ValueByName('QcTotalPrice');
  420. FQcFlag := ValueByName('QcFlag');
  421. FQcFormula := ValueByName('QcFormula');
  422. FQcBGLCode := ValueByName('QcBGLCode');
  423. FQcBGLNum := ValueByName('QcBGLNum');
  424. FPcQuantity := ValueByName('PcQuantity');
  425. FPcTotalPrice := ValueByName('PcTotalPrice');
  426. FPcFlag := ValueByName('PcFlag');
  427. FPcFormula := ValueByName('PcFormula');
  428. FPcBGLCode := ValueByName('PcBGLCode');
  429. FPcBGLNum := ValueByName('PcBGLNum');
  430. FGatherQuantity := ValueByName('GatherQuantity');
  431. FGatherTotalPrice := ValueByName('GatherTotalPrice');
  432. FEndDealQuantity := ValueByName('EndDealQuantity');
  433. FEndDealTotalPrice := ValueByName('EndDealTotalPrice');
  434. FEndQcQuantity := ValueByName('EndQcQuantity');
  435. FEndQcTotalPrice := ValueByName('EndQcTotalPrice');
  436. FEndQcBGLCode := ValueByName('EndQcBGLCode');
  437. FEndQcBGLNum := ValueByName('EndQcBGLNum');
  438. FEndPcQuantity := ValueByName('EndPcQuantity');
  439. FEndPcTotalPrice := ValueByName('EndPcTotalPrice');
  440. FEndPcBGLCode := ValueByName('EndPcBGLCode');
  441. FEndPcBGLNum := ValueByName('EndPcBGLNum');
  442. FEndGatherQuantity := ValueByName('EndGatherQuantity');
  443. FEndGatherTotalPrice := ValueByName('EndGatherTotalPrice');
  444. FPreDealQuantity := ValueByName('PreDealQuantity');
  445. FPreDealTotalPrice := ValueByName('PreDealTotalPrice');
  446. FPreQcQuantity := ValueByName('PreQcQuantity');
  447. FPreQcTotalPrice := ValueByName('PreQcTotalPrice');
  448. FPreQcBGLCode := ValueByName('PreQcBGLCode');
  449. FPreQcBGLNum := ValueByName('PreQcBGLNum');
  450. FPrePcQuantity := ValueByName('PrePcQuantity');
  451. FPrePcTotalPrice := ValueByName('PrePcTotalPrice');
  452. FPrePcBGLCode := ValueByName('PrePcBGLCode');
  453. FPrePcBGLNum := ValueByName('PrePcBGLNum');
  454. FPreGatherQuantity := ValueByName('PreGatherQuantity');
  455. FPreGatherTotalPrice := ValueByName('PreGatherTotalPrice');
  456. FHasBookMark := ValueByName('HasBookMark');
  457. FMarkMemo := ValueByName('MarkMemo');
  458. FPM_PreTotalPrice := ValueByName('PM_PreTotalPrice');
  459. FPM_TotalPrice := ValueByName('PM_TotalPrice');
  460. end;
  461. { TProjectGLRecord }
  462. procedure TProjectGLRecord.DoAfterAddFields;
  463. begin
  464. inherited;
  465. FID := ValueByName('ID');
  466. FCode := ValueByName('Code');
  467. FName := ValueByName('Name');
  468. FUnits := ValueByName('Units');
  469. FSpecs := ValueByName('Specs');
  470. FBasePrice := ValueByName('BasePrice');
  471. FRiskRange := ValueByName('RiskRange');
  472. FLockedPhaseID := ValueByName('LockedPhaseID');
  473. FCreatePhaseID := ValueByName('CreatePhaseID');
  474. FInfoPrice := ValueByName('InfoPrice');
  475. FInfoDate := ValueByName('InfoDate');
  476. FDeltaPrice := ValueByName('DeltaPrice');
  477. FValidDeltaPrice := ValueByName('ValidDeltaPrice');
  478. FPM_PreQuantity := ValueByName('PM_PreQuantity');
  479. FPM_PreTotalPrice := ValueByName('PM_PreTotalPrice');
  480. FPM_Quantity := ValueByName('PM_Quantity');
  481. FPM_TotalPrice := ValueByName('PM_TotalPrice');
  482. end;
  483. { TDetailGLRecord }
  484. procedure TDetailGLRecord.DoAfterAddFields;
  485. begin
  486. inherited;
  487. FID := ValueByName('ID');
  488. FBillsID := ValueByName('BillsID');
  489. FGLID := ValueByName('GLID');
  490. FCode := ValueByName('Code');
  491. FQuantity := ValueByName('Quantity');
  492. FCreatePhaseID := ValueByName('CreatePhaseID');
  493. FLastBillsQuantity := ValueByName('LastBillsQuantity');
  494. FLockedPhaseID := ValueByName('LockedPhaseID');
  495. end;
  496. { TMeasureBaseRecord }
  497. procedure TMeasureBaseRecord.AddDifferValue(AValue: TsdValue;
  498. ADiffer: Double);
  499. begin
  500. if ADiffer <> 0 then
  501. AValue.AsFloat := AValue.AsFloat + ADiffer;
  502. end;
  503. procedure TMeasureBaseRecord.SetBoolValue(AValue: TsdValue;
  504. ABool: Boolean);
  505. begin
  506. if AValue.AsBoolean <> ABool then
  507. AValue.AsBoolean := ABool;
  508. end;
  509. procedure TMeasureBaseRecord.SetFloatValue(AValue: TsdValue;
  510. AFloat: Double);
  511. begin
  512. if AValue.AsFloat <> AFloat then
  513. AValue.AsFloat := AFloat;
  514. end;
  515. procedure TMeasureBaseRecord.SetIntValue(AValue: TsdValue; AInt: Integer);
  516. begin
  517. if AValue.AsInteger <> AInt then
  518. AValue.AsInteger := AInt;
  519. end;
  520. end.