mDataRecord.pas 26 KB

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