expense_model.dart 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. import '../../shared/models/approval_status.dart';
  2. /// 费用报销主表,对应 [Expense] 表。
  3. class ExpenseModel {
  4. final String id;
  5. final String expenseNo;
  6. final DateTime? expenseDate;
  7. final String applicantId;
  8. final String applicantName;
  9. final String deptId;
  10. final String deptName;
  11. final String currencyCode;
  12. final bool isGenerateVoucher;
  13. final String voucherNo;
  14. final double approvedAmount;
  15. final double totalAmount;
  16. final double totalAmtnSh;
  17. final String purpose;
  18. final String remark;
  19. final String paymentMethod;
  20. final bool isInvoiceVerified;
  21. final bool isTaxIdMatched;
  22. final bool isCategoryCompliant;
  23. final String bankTransferNo;
  24. final String paymentStatus;
  25. final String status;
  26. final String approvalInstanceId;
  27. final String previousInstanceIds;
  28. final DateTime? effectiveDate;
  29. final String auditorId;
  30. final int version;
  31. final DateTime createTime;
  32. final DateTime updateTime;
  33. final bool isDeleted;
  34. final int isTransferred;
  35. final int isClosed;
  36. final bool isAuditApproved;
  37. // ── 瞬态字段(API 从 ERP 实时查询,非存储) ──
  38. final String currentApproverId;
  39. final List<String> approvalChain;
  40. final List<ApprovalRecord> approvalRecords;
  41. // ── 子表 ──
  42. final List<ExpenseDetailModel> details;
  43. final List<String> attachments;
  44. const ExpenseModel({
  45. required this.id,
  46. required this.expenseNo,
  47. this.expenseDate,
  48. this.applicantId = '',
  49. this.applicantName = '',
  50. this.deptId = '',
  51. this.deptName = '',
  52. this.currencyCode = '',
  53. this.isGenerateVoucher = true,
  54. this.voucherNo = '',
  55. this.approvedAmount = 0.0,
  56. this.totalAmount = 0.0,
  57. this.totalAmtnSh = 0.0,
  58. this.purpose = '',
  59. this.remark = '',
  60. this.paymentMethod = '',
  61. this.isInvoiceVerified = false,
  62. this.isTaxIdMatched = false,
  63. this.isCategoryCompliant = false,
  64. this.bankTransferNo = '',
  65. this.paymentStatus = 'unpaid',
  66. this.status = 'draft',
  67. this.approvalInstanceId = '',
  68. this.previousInstanceIds = '',
  69. this.effectiveDate,
  70. this.auditorId = '',
  71. this.version = 1,
  72. required this.createTime,
  73. required this.updateTime,
  74. this.isDeleted = false,
  75. this.isTransferred = 0,
  76. this.isClosed = 0,
  77. this.isAuditApproved = false,
  78. this.currentApproverId = '',
  79. this.approvalChain = const [],
  80. this.approvalRecords = const [],
  81. this.details = const [],
  82. this.attachments = const [],
  83. });
  84. factory ExpenseModel.fromJson(Map<String, dynamic> json) {
  85. return ExpenseModel(
  86. id: json['id'] as String? ?? '',
  87. expenseNo: json['expenseNo'] as String? ?? '',
  88. expenseDate: json['expenseDate'] != null
  89. ? DateTime.parse(json['expenseDate'] as String)
  90. : null,
  91. applicantId: json['usrNo'] as String? ?? '',
  92. applicantName:
  93. json['applicantName'] as String? ?? json['usrNo'] as String? ?? '',
  94. deptId: json['dept'] as String? ?? '',
  95. deptName: json['deptName'] as String? ?? json['dept'] as String? ?? '',
  96. currencyCode: json['curId'] as String? ?? '',
  97. isGenerateVoucher: (json['vohId'] as String?) == 'T' || json['isGenerateVoucher'] == true,
  98. voucherNo: json['vohNo'] as String? ?? '',
  99. approvedAmount: (json['approvedAmount'] as num?)?.toDouble() ?? 0.0,
  100. totalAmount: (json['totalAmount'] as num?)?.toDouble() ?? 0.0,
  101. totalAmtnSh: (json['totalAmtnSh'] as num?)?.toDouble() ?? 0.0,
  102. purpose: json['reason'] as String? ?? json['purpose'] as String? ?? '',
  103. remark: json['rem'] as String? ?? '',
  104. paymentMethod: json['payId'] as String? ?? '',
  105. isInvoiceVerified: json['isInvoiceVerified'] as bool? ?? false,
  106. isTaxIdMatched: json['isTaxIdMatched'] as bool? ?? false,
  107. isCategoryCompliant: json['isCategoryCompliant'] as bool? ?? false,
  108. bankTransferNo: json['bankTransferNo'] as String? ?? '',
  109. paymentStatus: json['paymentStatus'] as String? ?? 'unpaid',
  110. status: json['clsDate'] != null
  111. ? 'closed'
  112. : (json['status'] as String? ?? 'draft'),
  113. approvalInstanceId: json['approvalInstanceId'] as String? ?? '',
  114. previousInstanceIds: json['previousInstanceIds'] as String? ?? '',
  115. effectiveDate: json['effDd'] != null
  116. ? DateTime.parse(json['effDd'] as String)
  117. : null,
  118. auditorId: json['chkMan'] as String? ?? '',
  119. version: json['version'] as int? ?? 1,
  120. createTime: json['createTime'] != null
  121. ? DateTime.parse(json['createTime'] as String)
  122. : DateTime.now(),
  123. updateTime: json['updateTime'] != null
  124. ? DateTime.parse(json['updateTime'] as String)
  125. : DateTime.now(),
  126. isDeleted: json['isDeleted'] as bool? ?? false,
  127. isTransferred: json['isTransferred'] as int? ?? 0,
  128. isClosed: json['isClosed'] as int? ?? 0,
  129. isAuditApproved: (json['isAuditApproved'] as int?) == 1,
  130. currentApproverId: json['currentApproverId'] as String? ?? '',
  131. approvalChain:
  132. (json['approvalChain'] as List<dynamic>?)
  133. ?.map((e) => e as String)
  134. .toList() ??
  135. [],
  136. approvalRecords:
  137. (json['approvalRecords'] as List<dynamic>?)
  138. ?.map((e) => ApprovalRecord.fromJson(e as Map<String, dynamic>))
  139. .toList() ??
  140. [],
  141. details:
  142. (json['details'] as List<dynamic>?)
  143. ?.map(
  144. (e) => ExpenseDetailModel.fromJson(e as Map<String, dynamic>),
  145. )
  146. .toList() ??
  147. [],
  148. attachments:
  149. (json['attachments'] as List<dynamic>?)
  150. ?.map((e) => e as String)
  151. .toList() ??
  152. [],
  153. );
  154. }
  155. Map<String, dynamic> toJson() => {
  156. 'id': id,
  157. 'expenseNo': expenseNo,
  158. 'expenseDate': expenseDate?.toIso8601String(),
  159. 'applicantId': applicantId,
  160. 'applicantName': applicantName,
  161. 'deptId': deptId,
  162. 'deptName': deptName,
  163. 'currencyCode': currencyCode,
  164. 'isGenerateVoucher': isGenerateVoucher,
  165. 'voucherNo': voucherNo,
  166. 'approvedAmount': approvedAmount,
  167. 'totalAmount': totalAmount,
  168. 'totalAmtnSh': totalAmtnSh,
  169. 'purpose': purpose,
  170. 'remark': remark,
  171. 'paymentMethod': paymentMethod,
  172. 'isInvoiceVerified': isInvoiceVerified,
  173. 'isTaxIdMatched': isTaxIdMatched,
  174. 'isCategoryCompliant': isCategoryCompliant,
  175. 'bankTransferNo': bankTransferNo,
  176. 'paymentStatus': paymentStatus,
  177. 'status': status,
  178. 'approvalInstanceId': approvalInstanceId,
  179. 'previousInstanceIds': previousInstanceIds,
  180. 'effectiveDate': effectiveDate?.toIso8601String(),
  181. 'auditorId': auditorId,
  182. 'version': version,
  183. 'createTime': createTime.toIso8601String(),
  184. 'updateTime': updateTime.toIso8601String(),
  185. 'isDeleted': isDeleted,
  186. 'isTransferred': isTransferred,
  187. 'isClosed': isClosed,
  188. 'isAuditApproved': isAuditApproved ? 1 : 0,
  189. 'currentApproverId': currentApproverId,
  190. 'approvalChain': approvalChain,
  191. 'approvalRecords': approvalRecords.map((r) => r.toJson()).toList(),
  192. 'details': details.map((d) => d.toJson()).toList(),
  193. 'attachments': attachments,
  194. };
  195. ExpenseModel copyWith({
  196. String? id,
  197. String? expenseNo,
  198. DateTime? expenseDate,
  199. String? applicantId,
  200. String? applicantName,
  201. String? deptId,
  202. String? deptName,
  203. String? currencyCode,
  204. bool? isGenerateVoucher,
  205. String? voucherNo,
  206. double? approvedAmount,
  207. double? totalAmount,
  208. double? totalAmtnSh,
  209. String? purpose,
  210. String? remark,
  211. String? paymentMethod,
  212. bool? isInvoiceVerified,
  213. bool? isTaxIdMatched,
  214. bool? isCategoryCompliant,
  215. String? bankTransferNo,
  216. String? paymentStatus,
  217. String? status,
  218. String? approvalInstanceId,
  219. String? previousInstanceIds,
  220. DateTime? effectiveDate,
  221. String? auditorId,
  222. int? version,
  223. DateTime? createTime,
  224. DateTime? updateTime,
  225. bool? isDeleted,
  226. int? isTransferred,
  227. int? isClosed,
  228. bool? isAuditApproved,
  229. String? currentApproverId,
  230. List<String>? approvalChain,
  231. List<ApprovalRecord>? approvalRecords,
  232. List<ExpenseDetailModel>? details,
  233. List<String>? attachments,
  234. }) {
  235. return ExpenseModel(
  236. id: id ?? this.id,
  237. expenseNo: expenseNo ?? this.expenseNo,
  238. expenseDate: expenseDate ?? this.expenseDate,
  239. applicantId: applicantId ?? this.applicantId,
  240. applicantName: applicantName ?? this.applicantName,
  241. deptId: deptId ?? this.deptId,
  242. deptName: deptName ?? this.deptName,
  243. currencyCode: currencyCode ?? this.currencyCode,
  244. isGenerateVoucher: isGenerateVoucher ?? this.isGenerateVoucher,
  245. voucherNo: voucherNo ?? this.voucherNo,
  246. approvedAmount: approvedAmount ?? this.approvedAmount,
  247. totalAmount: totalAmount ?? this.totalAmount,
  248. totalAmtnSh: totalAmtnSh ?? this.totalAmtnSh,
  249. purpose: purpose ?? this.purpose,
  250. remark: remark ?? this.remark,
  251. paymentMethod: paymentMethod ?? this.paymentMethod,
  252. isInvoiceVerified: isInvoiceVerified ?? this.isInvoiceVerified,
  253. isTaxIdMatched: isTaxIdMatched ?? this.isTaxIdMatched,
  254. isCategoryCompliant: isCategoryCompliant ?? this.isCategoryCompliant,
  255. bankTransferNo: bankTransferNo ?? this.bankTransferNo,
  256. paymentStatus: paymentStatus ?? this.paymentStatus,
  257. status: status ?? this.status,
  258. approvalInstanceId: approvalInstanceId ?? this.approvalInstanceId,
  259. previousInstanceIds: previousInstanceIds ?? this.previousInstanceIds,
  260. effectiveDate: effectiveDate ?? this.effectiveDate,
  261. auditorId: auditorId ?? this.auditorId,
  262. version: version ?? this.version,
  263. createTime: createTime ?? this.createTime,
  264. updateTime: updateTime ?? this.updateTime,
  265. isDeleted: isDeleted ?? this.isDeleted,
  266. isTransferred: isTransferred ?? this.isTransferred,
  267. isClosed: isClosed ?? this.isClosed,
  268. isAuditApproved: isAuditApproved ?? this.isAuditApproved,
  269. currentApproverId: currentApproverId ?? this.currentApproverId,
  270. approvalChain: approvalChain ?? this.approvalChain,
  271. approvalRecords: approvalRecords ?? this.approvalRecords,
  272. details: details ?? this.details,
  273. attachments: attachments ?? this.attachments,
  274. );
  275. }
  276. }
  277. /// 费用报销明细,对应 [ExpenseDetail] 表。
  278. class ExpenseDetailModel {
  279. final String id;
  280. final String expenseId;
  281. final String expenseApplyId;
  282. final String expenseApplyNo;
  283. final DateTime? expenseApplyDate;
  284. final String expenseCategory;
  285. final String categoryName;
  286. final String priority;
  287. final String purpose;
  288. final String projectId;
  289. final String projectName;
  290. final String costDeptId;
  291. final String costDeptName;
  292. final String acctSubjectId;
  293. final String acctSubjectName;
  294. final double amount;
  295. final double taxRate;
  296. final double taxAmount;
  297. final double totalAmount;
  298. final String currencyCode;
  299. final double exchangeRate;
  300. final double baseAmount;
  301. final double approvedAmount;
  302. final String customerVendorId;
  303. final String customerVendorName;
  304. final double offsetAmount;
  305. final String bankName;
  306. final String bankAccountName;
  307. final String bankAccount;
  308. final String sqMan;
  309. final String sqManName;
  310. final String aeNo;
  311. final String aeDd;
  312. final String remark;
  313. final int? preItm;
  314. final int sortOrder;
  315. final List<String> attachments;
  316. final DateTime createTime;
  317. final DateTime updateTime;
  318. final bool isDeleted;
  319. const ExpenseDetailModel({
  320. required this.id,
  321. required this.expenseId,
  322. this.expenseApplyId = '',
  323. this.expenseApplyNo = '',
  324. this.expenseApplyDate,
  325. this.expenseCategory = '',
  326. this.categoryName = '',
  327. this.priority = '1',
  328. this.purpose = '',
  329. this.projectId = '',
  330. this.projectName = '',
  331. this.costDeptId = '',
  332. this.costDeptName = '',
  333. this.acctSubjectId = '',
  334. this.acctSubjectName = '',
  335. required this.amount,
  336. this.taxRate = 0,
  337. this.taxAmount = 0.0,
  338. required this.totalAmount,
  339. this.currencyCode = '',
  340. this.exchangeRate = 1.0,
  341. this.baseAmount = 0.0,
  342. this.approvedAmount = 0.0,
  343. this.customerVendorId = '',
  344. this.customerVendorName = '',
  345. this.offsetAmount = 0.0,
  346. this.bankName = '',
  347. this.bankAccountName = '',
  348. this.bankAccount = '',
  349. this.sqMan = '',
  350. this.sqManName = '',
  351. this.aeNo = '',
  352. this.aeDd = '',
  353. this.remark = '',
  354. this.preItm,
  355. this.sortOrder = 1,
  356. this.attachments = const [],
  357. required this.createTime,
  358. required this.updateTime,
  359. this.isDeleted = false,
  360. });
  361. factory ExpenseDetailModel.fromJson(Map<String, dynamic> json) {
  362. return ExpenseDetailModel(
  363. id: json['id'] as String? ?? '',
  364. expenseId: json['expenseId'] as String? ?? '',
  365. expenseApplyId: json['aeNo'] as String? ?? '',
  366. expenseApplyNo: json['aeNo'] as String? ?? '',
  367. expenseApplyDate: json['aeDd'] != null
  368. ? DateTime.parse(json['aeDd'] as String)
  369. : null,
  370. expenseCategory:
  371. json['idxNo'] as String? ?? json['expenseCategory'] as String? ?? '',
  372. categoryName:
  373. json['idxName'] as String? ?? json['categoryName'] as String? ?? '',
  374. priority: json['priority'] as String? ?? '1',
  375. purpose: json['purpose'] as String? ?? '',
  376. projectId: json['objNo'] as String? ?? '',
  377. projectName:
  378. json['objName'] as String? ?? json['projectName'] as String? ?? '',
  379. costDeptId: json['dep'] as String? ?? '',
  380. costDeptName: json['depName'] as String? ?? json['dep'] as String? ?? '',
  381. acctSubjectId: json['accNo'] as String? ?? '',
  382. acctSubjectName: json['accName'] as String? ?? '',
  383. amount:
  384. (json['amount'] as num?)?.toDouble() ??
  385. (json['amtn'] as num?)?.toDouble() ??
  386. 0.0,
  387. taxRate:
  388. (json['taxRate'] as num?)?.toDouble() ??
  389. (json['taxRto'] as num?)?.toDouble() ??
  390. 0.0,
  391. taxAmount:
  392. (json['taxAmount'] as num?)?.toDouble() ??
  393. (json['tax'] as num?)?.toDouble() ??
  394. 0.0,
  395. totalAmount:
  396. (json['totalAmount'] as num?)?.toDouble() ??
  397. (json['amt'] as num?)?.toDouble() ??
  398. 0.0,
  399. currencyCode: json['currencyCode'] as String? ?? '',
  400. exchangeRate: (json['exchangeRate'] as num?)?.toDouble() ?? 1.0,
  401. baseAmount: (json['baseAmount'] as num?)?.toDouble() ?? 0.0,
  402. approvedAmount: (json['approvedAmount'] as num?)?.toDouble() ?? 0.0,
  403. customerVendorId: json['cust'] as String? ?? '',
  404. customerVendorName: json['custName'] as String? ?? '',
  405. offsetAmount: (json['offsetAmount'] as num?)?.toDouble() ?? 0.0,
  406. bankName: json['bankName'] as String? ?? '',
  407. bankAccountName: json['bankAccountName'] as String? ?? '',
  408. bankAccount: json['bankAccount'] as String? ?? '',
  409. sqMan: json['sqMan'] as String? ?? '',
  410. sqManName:
  411. json['sqName'] as String? ??
  412. json['sqManName'] as String? ??
  413. json['sqMan'] as String? ??
  414. '',
  415. aeNo: json['aeNo'] as String? ?? '',
  416. aeDd: json['aeDd'] as String? ?? '',
  417. remark: json['rem'] as String? ?? '',
  418. preItm: json['preItm'] as int?,
  419. sortOrder: json['itm'] as int? ?? 1,
  420. attachments:
  421. (json['attachments'] as List<dynamic>?)
  422. ?.map((e) => e as String)
  423. .toList() ??
  424. [],
  425. createTime: json['createTime'] != null
  426. ? DateTime.parse(json['createTime'] as String)
  427. : DateTime.now(),
  428. updateTime: json['updateTime'] != null
  429. ? DateTime.parse(json['updateTime'] as String)
  430. : DateTime.now(),
  431. isDeleted: json['isDeleted'] as bool? ?? false,
  432. );
  433. }
  434. Map<String, dynamic> toJson() => {
  435. 'id': id,
  436. 'expenseId': expenseId,
  437. 'expenseApplyId': expenseApplyId,
  438. 'expenseApplyNo': expenseApplyNo,
  439. 'expenseApplyDate': expenseApplyDate?.toIso8601String(),
  440. 'expenseCategory': expenseCategory,
  441. 'categoryName': categoryName,
  442. 'priority': priority,
  443. 'purpose': purpose,
  444. 'projectId': projectId,
  445. 'projectName': projectName,
  446. 'costDeptId': costDeptId,
  447. 'costDeptName': costDeptName,
  448. 'acctSubjectId': acctSubjectId,
  449. 'acctSubjectName': acctSubjectName,
  450. 'amount': amount,
  451. 'taxRate': taxRate,
  452. 'taxAmount': taxAmount,
  453. 'totalAmount': totalAmount,
  454. 'currencyCode': currencyCode,
  455. 'exchangeRate': exchangeRate,
  456. 'baseAmount': baseAmount,
  457. 'approvedAmount': approvedAmount,
  458. 'customerVendorId': customerVendorId,
  459. 'customerVendorName': customerVendorName,
  460. 'offsetAmount': offsetAmount,
  461. 'bankName': bankName,
  462. 'bankAccountName': bankAccountName,
  463. 'bankAccount': bankAccount,
  464. 'sqMan': sqMan,
  465. 'sqManName': sqManName,
  466. 'aeNo': aeNo,
  467. 'aeDd': aeDd,
  468. 'remark': remark,
  469. 'preItm': preItm,
  470. 'sortOrder': sortOrder,
  471. 'attachments': attachments,
  472. 'createTime': createTime.toIso8601String(),
  473. 'updateTime': updateTime.toIso8601String(),
  474. 'isDeleted': isDeleted,
  475. };
  476. ExpenseDetailModel copyWith({
  477. String? id,
  478. String? expenseId,
  479. String? expenseApplyId,
  480. String? expenseApplyNo,
  481. DateTime? expenseApplyDate,
  482. String? expenseCategory,
  483. String? categoryName,
  484. String? priority,
  485. String? purpose,
  486. String? projectId,
  487. String? projectName,
  488. String? costDeptId,
  489. String? costDeptName,
  490. String? acctSubjectId,
  491. String? acctSubjectName,
  492. double? amount,
  493. double? taxRate,
  494. double? taxAmount,
  495. double? totalAmount,
  496. String? currencyCode,
  497. double? exchangeRate,
  498. double? baseAmount,
  499. double? approvedAmount,
  500. String? customerVendorId,
  501. String? customerVendorName,
  502. double? offsetAmount,
  503. String? bankName,
  504. String? bankAccountName,
  505. String? bankAccount,
  506. String? sqMan,
  507. String? sqManName,
  508. String? aeNo,
  509. String? aeDd,
  510. String? remark,
  511. int? preItm,
  512. int? sortOrder,
  513. List<String>? attachments,
  514. DateTime? createTime,
  515. DateTime? updateTime,
  516. bool? isDeleted,
  517. }) {
  518. return ExpenseDetailModel(
  519. id: id ?? this.id,
  520. expenseId: expenseId ?? this.expenseId,
  521. expenseApplyId: expenseApplyId ?? this.expenseApplyId,
  522. expenseApplyNo: expenseApplyNo ?? this.expenseApplyNo,
  523. expenseApplyDate: expenseApplyDate ?? this.expenseApplyDate,
  524. expenseCategory: expenseCategory ?? this.expenseCategory,
  525. categoryName: categoryName ?? this.categoryName,
  526. priority: priority ?? this.priority,
  527. purpose: purpose ?? this.purpose,
  528. projectId: projectId ?? this.projectId,
  529. projectName: projectName ?? this.projectName,
  530. costDeptId: costDeptId ?? this.costDeptId,
  531. costDeptName: costDeptName ?? this.costDeptName,
  532. acctSubjectId: acctSubjectId ?? this.acctSubjectId,
  533. acctSubjectName: acctSubjectName ?? this.acctSubjectName,
  534. amount: amount ?? this.amount,
  535. taxRate: taxRate ?? this.taxRate,
  536. taxAmount: taxAmount ?? this.taxAmount,
  537. totalAmount: totalAmount ?? this.totalAmount,
  538. currencyCode: currencyCode ?? this.currencyCode,
  539. exchangeRate: exchangeRate ?? this.exchangeRate,
  540. baseAmount: baseAmount ?? this.baseAmount,
  541. approvedAmount: approvedAmount ?? this.approvedAmount,
  542. customerVendorId: customerVendorId ?? this.customerVendorId,
  543. customerVendorName: customerVendorName ?? this.customerVendorName,
  544. offsetAmount: offsetAmount ?? this.offsetAmount,
  545. bankName: bankName ?? this.bankName,
  546. bankAccountName: bankAccountName ?? this.bankAccountName,
  547. bankAccount: bankAccount ?? this.bankAccount,
  548. sqMan: sqMan ?? this.sqMan,
  549. sqManName: sqManName ?? this.sqManName,
  550. aeNo: aeNo ?? this.aeNo,
  551. aeDd: aeDd ?? this.aeDd,
  552. remark: remark ?? this.remark,
  553. preItm: preItm ?? this.preItm,
  554. sortOrder: sortOrder ?? this.sortOrder,
  555. attachments: attachments ?? this.attachments,
  556. createTime: createTime ?? this.createTime,
  557. updateTime: updateTime ?? this.updateTime,
  558. isDeleted: isDeleted ?? this.isDeleted,
  559. );
  560. }
  561. }