mDataRecord.pas 20 KB

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