mDataRecord.pas 27 KB

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