payment_detail_audit.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. 'use strict';
  2. /**
  3. * 版本数据模型
  4. *
  5. * @author CaiAoLin
  6. * @date 2017/10/25
  7. * @version
  8. */
  9. const auditConst = require('../const/audit').stage;
  10. const shenpiConst = require('../const/shenpi');
  11. module.exports = app => {
  12. class PaymentDetailAudit extends app.BaseService {
  13. /**
  14. * 构造函数
  15. *
  16. * @param {Object} ctx - egg全局变量
  17. * @return {void}
  18. */
  19. constructor(ctx) {
  20. super(ctx);
  21. this.tableName = 'payment_detail_audit';
  22. }
  23. /**
  24. * 获取审核人流程列表
  25. *
  26. * @param auditorId
  27. * @return {Promise<*>}
  28. */
  29. async getAuditGroupByList(detailId, times) {
  30. const sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, la.`times`, la.`td_id`, la.`aid`, la.`order` ' +
  31. ' FROM ?? AS la Left Join ?? AS pa On la.`aid` = pa.`id`' +
  32. ' WHERE la.`td_id` = ? and la.`times` = ? GROUP BY la.`aid` ORDER BY la.`order`';
  33. const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, detailId, times];
  34. return await this.db.query(sql, sqlParam);
  35. }
  36. /**
  37. * 复制上一期的审批人列表给最新一期
  38. *
  39. * @param transaction - 新增一期的事务
  40. * @param {Object} preStage - 上一期
  41. * @param {Object} newStage - 最新一期
  42. * @return {Promise<*>}
  43. */
  44. async copyPreDetailAuditors(transaction, preDetail, newDetail) {
  45. const auditors = await this.getAuditGroupByList(preDetail.id, preDetail.times);
  46. const newAuditors = [];
  47. for (const a of auditors) {
  48. const na = {
  49. tender_id: preDetail.tender_id,
  50. tr_id: preDetail.tr_id,
  51. td_id: newDetail.id,
  52. aid: a.aid,
  53. times: newDetail.times,
  54. order: newAuditors.length + 1,
  55. status: auditConst.status.uncheck,
  56. };
  57. newAuditors.push(na);
  58. }
  59. const result = await transaction.insert(this.tableName, newAuditors);
  60. return (result.effectRows = auditors.length);
  61. }
  62. /**
  63. * 获取 审核列表信息
  64. *
  65. * @param {Number} detailId - 支付审批表单详情id
  66. * @param {Number} times - 第几次审批
  67. * @return {Promise<*>}
  68. */
  69. async getAuditors(detailId, times = 1) {
  70. const sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time`, g.`sort` ' +
  71. 'FROM ?? AS la, ?? AS pa, (SELECT `aid`,(@i:=@i+1) as `sort` FROM ??, (select @i:=0) as it WHERE `td_id` = ? AND `times` = ? GROUP BY `aid`) as g ' +
  72. 'WHERE la.`td_id` = ? and la.`times` = ? and la.`aid` = pa.`id` and g.`aid` = la.`aid` order by la.`order`';
  73. const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, this.tableName, detailId, times, detailId, times];
  74. const result = await this.db.query(sql, sqlParam);
  75. const sql2 = 'SELECT COUNT(a.`aid`) as num FROM (SELECT `aid` FROM ?? WHERE `td_id` = ? AND `times` = ? GROUP BY `aid`) as a';
  76. const sqlParam2 = [this.tableName, detailId, times];
  77. const count = await this.db.queryOne(sql2, sqlParam2);
  78. for (const i in result) {
  79. result[i].max_sort = count.num;
  80. }
  81. return result;
  82. }
  83. /**
  84. * 获取 当前审核人
  85. *
  86. * @param {Number} materialId - 支付审批表单详情id
  87. * @param {Number} times - 第几次审批
  88. * @return {Promise<*>}
  89. */
  90. async getCurAuditor(detailId, times = 1) {
  91. const sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time` ' +
  92. ' FROM ?? AS la Left Join ?? AS pa On la.`aid` = pa.`id` ' +
  93. ' WHERE la.`td_id` = ? and la.`status` = ? and la.`times` = ?';
  94. const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, detailId, auditConst.status.checking, times];
  95. return await this.db.queryOne(sql, sqlParam);
  96. }
  97. async updateNewAuditList(detail, newIdList) {
  98. const transaction = await this.db.beginTransaction();
  99. try {
  100. // 先删除旧的审批流,再添加新的
  101. await transaction.delete(this.tableName, { td_id: detail.id, times: detail.times });
  102. const newAuditors = [];
  103. let order = 1;
  104. for (const aid of newIdList) {
  105. newAuditors.push({
  106. tender_id: detail.tender_id, tr_id: detail.tr_id, td_id: detail.id, aid,
  107. times: detail.times, order, status: auditConst.status.uncheck,
  108. });
  109. order++;
  110. }
  111. if (newAuditors.length > 0) await transaction.insert(this.tableName, newAuditors);
  112. await transaction.commit();
  113. } catch (err) {
  114. await transaction.rollback();
  115. throw err;
  116. }
  117. }
  118. async updateLastAudit(detail, auditList, lastId) {
  119. const transaction = await this.db.beginTransaction();
  120. try {
  121. // 先判断auditList里的aid是否与lastId相同,相同则删除并重新更新order
  122. const idList = this._.map(auditList, 'aid');
  123. let order = idList.length + 1;
  124. if (idList.indexOf(lastId) !== -1) {
  125. await transaction.delete(this.tableName, { td_id: detail.id, times: detail.times, aid: lastId });
  126. const audit = this._.find(auditList, { aid: lastId });
  127. // 顺移之后审核人流程顺序
  128. await this._syncOrderByDelete(transaction, detail.id, audit.order, detail.times);
  129. order = order - 1;
  130. }
  131. // 添加终审
  132. const newAuditor = {
  133. tender_id: detail.tender_id, tr_id: detail.tr_id, td_id: detail.id, aid: lastId,
  134. times: detail.times, order, status: auditConst.status.uncheck,
  135. };
  136. await transaction.insert(this.tableName, newAuditor);
  137. await transaction.commit();
  138. } catch (err) {
  139. await transaction.rollback();
  140. throw err;
  141. }
  142. }
  143. /**
  144. * 移除审核人时,同步其后审核人order
  145. * @param transaction - 事务
  146. * @param {Number} materialId - 材料调差期id
  147. * @param {Number} auditorId - 审核人id
  148. * @param {Number} times - 第几次审批
  149. * @return {Promise<*>}
  150. * @private
  151. */
  152. async _syncOrderByDelete(transaction, detailId, order, times, selfOperate = '-') {
  153. this.initSqlBuilder();
  154. this.sqlBuilder.setAndWhere('td_id', {
  155. value: detailId,
  156. operate: '=',
  157. });
  158. this.sqlBuilder.setAndWhere('order', {
  159. value: order,
  160. operate: '>=',
  161. });
  162. this.sqlBuilder.setAndWhere('times', {
  163. value: times,
  164. operate: '=',
  165. });
  166. this.sqlBuilder.setUpdateData('order', {
  167. value: 1,
  168. selfOperate,
  169. });
  170. const [sql, sqlParam] = this.sqlBuilder.build(this.tableName, 'update');
  171. const data = await transaction.query(sql, sqlParam);
  172. return data;
  173. }
  174. /**
  175. * 获取审核人流程列表(包括原报)
  176. * @param {Number} materialId 调差id
  177. * @param {Number} times 审核次数
  178. * @return {Promise<Array>} 查询结果集(包括原报)
  179. */
  180. async getAuditorsWithOwner(detailId, times = 1) {
  181. const result = await this.getAuditGroupByList(detailId, times);
  182. const sql =
  183. 'SELECT pa.`id` As aid, pa.`name`, pa.`company`, pa.`role`, ? As times, ? As mid, 0 As `order`' +
  184. ' FROM ' +
  185. this.ctx.service.paymentDetail.tableName +
  186. ' As s' +
  187. ' LEFT JOIN ' +
  188. this.ctx.service.projectAccount.tableName +
  189. ' As pa' +
  190. ' ON s.uid = pa.id' +
  191. ' WHERE s.id = ?';
  192. const sqlParam = [times, detailId, detailId];
  193. const user = await this.db.queryOne(sql, sqlParam);
  194. result.unshift(user);
  195. return result;
  196. }
  197. /**
  198. * 获取 最新审核顺序
  199. *
  200. * @param {Number} materialId - 材料调差期id
  201. * @param {Number} times - 第几次审批
  202. * @return {Promise<number>}
  203. */
  204. async getNewOrder(detailId, times = 1) {
  205. const sql = 'SELECT Max(??) As max_order FROM ?? Where `td_id` = ? and `times` = ?';
  206. const sqlParam = ['order', this.tableName, detailId, times];
  207. const result = await this.db.queryOne(sql, sqlParam);
  208. return result && result.max_order ? result.max_order + 1 : 1;
  209. }
  210. /**
  211. * 新增审核人
  212. *
  213. * @param {Number} materialId - 材料调差期id
  214. * @param {Number} auditorId - 审核人id
  215. * @param {Number} times - 第几次审批
  216. * @return {Promise<number>}
  217. */
  218. async addAuditor(detailId, auditorId, times = 1, is_gdzs = 0) {
  219. const transaction = await this.db.beginTransaction();
  220. try {
  221. let newOrder = await this.getNewOrder(detailId, times);
  222. // 判断是否存在固定终审,存在则newOrder - 1并使终审order+1
  223. newOrder = is_gdzs === 1 ? newOrder - 1 : newOrder;
  224. if (is_gdzs) await this._syncOrderByDelete(transaction, detailId, newOrder, times, '+');
  225. const data = {
  226. tender_id: this.ctx.tender.id,
  227. tr_id: this.ctx.trInfo.id,
  228. td_id: detailId,
  229. aid: auditorId,
  230. times,
  231. order: newOrder,
  232. status: auditConst.status.uncheck,
  233. };
  234. const result = await transaction.insert(this.tableName, data);
  235. await transaction.commit();
  236. return result.affectedRows === 1;
  237. } catch (err) {
  238. await transaction.rollback();
  239. throw err;
  240. }
  241. return false;
  242. }
  243. /**
  244. * 移除审核人
  245. *
  246. * @param {Number} materialId - 材料调差期id
  247. * @param {Number} auditorId - 审核人id
  248. * @param {Number} times - 第几次审批
  249. * @return {Promise<boolean>}
  250. */
  251. async deleteAuditor(detailId, auditorId, times = 1) {
  252. const transaction = await this.db.beginTransaction();
  253. try {
  254. const condition = { td_id: detailId, aid: auditorId, times };
  255. const auditor = await this.getDataByCondition(condition);
  256. if (!auditor) {
  257. throw '该审核人不存在';
  258. }
  259. await this._syncOrderByDelete(transaction, detailId, auditor.order, times);
  260. await transaction.delete(this.tableName, condition);
  261. await transaction.commit();
  262. } catch (err) {
  263. await transaction.rollback();
  264. throw err;
  265. }
  266. return true;
  267. }
  268. /**
  269. * 移除审核人
  270. *
  271. * @param {Number} materialId - 材料调差期id
  272. * @param {Number} status - 期状态
  273. * @param {Number} status - 期次数
  274. * @return {Promise<boolean>}
  275. */
  276. async getAuditorByStatus(detailId, status, times = 1) {
  277. let auditor = null;
  278. let sql = '';
  279. let sqlParam = '';
  280. switch (status) {
  281. case auditConst.status.checking :
  282. case auditConst.status.checked :
  283. case auditConst.status.checkNoPre :
  284. sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, la.`times`, la.`tr_id`, la.`td_id`, la.`aid`, la.`order` ' +
  285. ' FROM ?? AS la Left Join ?? AS pa On la.`aid` = pa.`id` ' +
  286. ' WHERE la.`td_id` = ? and la.`status` = ? ' +
  287. ' ORDER BY la.`times` desc, la.`order` desc';
  288. sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, detailId, status];
  289. auditor = await this.db.queryOne(sql, sqlParam);
  290. break;
  291. case auditConst.status.checkNo :
  292. sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, la.`times`, la.`tr_id`, la.`td_id`, la.`aid`, la.`order` ' +
  293. ' FROM ?? AS la Left Join ?? AS pa On la.`aid` = pa.`id`' +
  294. ' WHERE la.`td_id` = ? and la.`status` = ? and la.`times` = ?' +
  295. ' ORDER BY la.`times` desc, la.`order` desc';
  296. sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, detailId, auditConst.status.checkNo, parseInt(times) - 1];
  297. auditor = await this.db.queryOne(sql, sqlParam);
  298. break;
  299. case auditConst.status.uncheck :
  300. default:break;
  301. }
  302. return auditor;
  303. }
  304. /**
  305. * 开始审批
  306. * @param {Number} materialId - 材料调差期id
  307. * @param {Number} times - 第几次审批
  308. * @return {Promise<boolean>}
  309. */
  310. async start(detailId, times = 1) {
  311. const audit = await this.getDataByCondition({ td_id: detailId, times, order: 1 });
  312. if (!audit) {
  313. if (this.ctx.trinfo.sp_status === shenpiConst.sp_status.gdspl) {
  314. throw '请联系管理员添加审批人';
  315. } else {
  316. throw '请先选择审批人,再上报数据';
  317. }
  318. }
  319. const transaction = await this.db.beginTransaction();
  320. try {
  321. await transaction.update(this.tableName, { id: audit.id, status: auditConst.status.checking, begin_time: new Date() });
  322. // 如果是报表角色则需要更新到detail中
  323. const updateDetailData = {
  324. id: detailId, status: auditConst.status.checking,
  325. };
  326. const rptAudit = await this.ctx.service.paymentRptAudit.getDataByCondition({ td_id: detailId, uid: this.ctx.session.sessionUser.accountId });
  327. if (rptAudit && rptAudit.signature_msg) {
  328. const report_json = JSON.parse(this.ctx.detail.report_json);
  329. const sign_msg = JSON.parse(rptAudit.signature_msg);
  330. updateDetailData.report_json = JSON.stringify(await this.ctx.service.paymentDetail.signOneSignatureData(report_json, rptAudit.signature_name, sign_msg));
  331. }
  332. await transaction.update(this.ctx.service.paymentDetail.tableName, updateDetailData);
  333. // 判断用户是否有权限查看支付审批,没有则自动加入到权限中
  334. const auditList = await this.getAllDataByCondition({ where: { td_id: detailId, times } });
  335. const rptAuditList = await this.ctx.service.paymentRptAudit.getAllDataByCondition({ where: { td_id: detailId } });
  336. const auditIdList = this._.map(auditList, 'aid');
  337. const rptAuditIdList = this._.map(rptAuditList, 'uid');
  338. const permissionAuditList = await this.ctx.service.paymentPermissionAudit.getAllDataByCondition({ where: { pid: this.ctx.session.sessionProject.id } });
  339. const paIdList = this._.map(permissionAuditList, 'uid');
  340. const detailIdList = this._.union(auditIdList, rptAuditIdList);
  341. const newAudits = this._.difference(detailIdList, paIdList);
  342. if (newAudits.length > 0) {
  343. const accountList = await this.ctx.service.projectAccount.getAllDataByCondition({
  344. where: { project_id: this.ctx.session.sessionProject.id, id: newAudits },
  345. columns: ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group', 'mobile'],
  346. });
  347. await this.ctx.service.paymentPermissionAudit.saveAudits(this.ctx.session.sessionProject.id, accountList, transaction);
  348. }
  349. // todo 更新标段tender状态 ?
  350. await transaction.commit();
  351. } catch (err) {
  352. await transaction.rollback();
  353. throw err;
  354. }
  355. return true;
  356. }
  357. async _checked(pid, detailId, checkData, times) {
  358. const time = new Date();
  359. // 整理当前流程审核人状态更新
  360. const audit = await this.getDataByCondition({ td_id: detailId, times, status: auditConst.status.checking });
  361. if (!audit) {
  362. throw '审核数据错误';
  363. }
  364. const nextAudit = await this.getDataByCondition({ td_id: detailId, times, order: audit.order + 1 });
  365. const transaction = await this.db.beginTransaction();
  366. try {
  367. await transaction.update(this.tableName, { id: audit.id, status: checkData.checkType, opinion: checkData.opinion, end_time: time });
  368. // 如果是报表角色则需要更新到detail中
  369. const updateDetailData = {
  370. id: detailId,
  371. };
  372. const rptAudit = await this.ctx.service.paymentRptAudit.getDataByCondition({ td_id: detailId, uid: audit.aid });
  373. if (rptAudit && rptAudit.signature_msg) {
  374. const report_json = JSON.parse(this.ctx.detail.report_json);
  375. const sign_msg = JSON.parse(rptAudit.signature_msg);
  376. updateDetailData.report_json = JSON.stringify(await this.ctx.service.paymentDetail.signOneSignatureData(report_json, rptAudit.signature_name, sign_msg));
  377. }
  378. // 无下一审核人表示,审核结束
  379. if (nextAudit) {
  380. // 流程至下一审批人
  381. await transaction.update(this.tableName, { id: nextAudit.id, status: auditConst.status.checking, begin_time: time });
  382. // 同步 期信息
  383. updateDetailData.status = auditConst.status.checking;
  384. } else {
  385. // 本期结束
  386. // 同步 期信息
  387. updateDetailData.status = checkData.checkType;
  388. }
  389. await transaction.update(this.ctx.service.paymentDetail.tableName, updateDetailData);
  390. await transaction.commit();
  391. } catch (err) {
  392. await transaction.rollback();
  393. throw err;
  394. }
  395. }
  396. async _checkNo(pid, detailId, checkData, times) {
  397. const time = new Date();
  398. // 整理当前流程审核人状态更新
  399. const audit = await this.getDataByCondition({ td_id: detailId, times, status: auditConst.status.checking });
  400. if (!audit) {
  401. throw '审核数据错误';
  402. }
  403. const sql = 'SELECT `tender_id`, `tr_id`, `td_id`, `aid`, `order` FROM ?? WHERE `td_id` = ? and `times` = ? GROUP BY `aid` ORDER BY `id` ASC';
  404. const sqlParam = [this.tableName, detailId, times];
  405. const auditors = await this.db.query(sql, sqlParam);
  406. let order = 1;
  407. for (const a of auditors) {
  408. a.times = times + 1;
  409. a.order = order;
  410. a.status = auditConst.status.uncheck;
  411. order++;
  412. }
  413. const transaction = await this.db.beginTransaction();
  414. try {
  415. await transaction.update(this.tableName, { id: audit.id, status: checkData.checkType, opinion: checkData.opinion, end_time: time });
  416. // 清空所有签名数据
  417. let report_json = JSON.parse(this.ctx.detail.report_json);
  418. report_json = await this.ctx.service.paymentDetail.clearAllSignatureData(report_json);
  419. // 同步期信息
  420. await transaction.update(this.ctx.service.paymentDetail.tableName, {
  421. id: detailId, status: checkData.checkType,
  422. times: times + 1,
  423. report_json: JSON.stringify(report_json),
  424. });
  425. // 拷贝新一次审核流程列表
  426. await transaction.insert(this.tableName, auditors);
  427. await transaction.commit();
  428. } catch (err) {
  429. await transaction.rollback();
  430. throw err;
  431. }
  432. }
  433. async _checkNoPre(pid, detailId, checkData, times) {
  434. const time = new Date();
  435. // 整理当前流程审核人状态更新
  436. const audit = await this.getDataByCondition({ td_id: detailId, times, status: auditConst.status.checking });
  437. if (!audit || audit.order <= 1) {
  438. throw '审核数据错误';
  439. }
  440. // 添加重新审批后,不能用order-1,取groupby值里的上一个才对
  441. const auditors2 = await this.getAuditGroupByList(detailId, times);
  442. const auditorIndex = await auditors2.findIndex(function(item) {
  443. return item.aid === audit.aid;
  444. });
  445. const preAuditor = auditors2[auditorIndex - 1];
  446. const transaction = await this.db.beginTransaction();
  447. try {
  448. await transaction.update(this.tableName, { id: audit.id, status: checkData.checkType, opinion: checkData.opinion, end_time: time });
  449. // 顺移气候审核人流程顺序
  450. this.initSqlBuilder();
  451. this.sqlBuilder.setAndWhere('td_id', { value: detailId, operate: '=' });
  452. this.sqlBuilder.setAndWhere('order', { value: audit.order, operate: '>' });
  453. this.sqlBuilder.setUpdateData('order', { value: 2, selfOperate: '+' });
  454. const [sql, sqlParam] = this.sqlBuilder.build(this.tableName, 'update');
  455. const data = await transaction.query(sql, sqlParam);
  456. const newAuditors = [];
  457. newAuditors.push({
  458. tender_id: audit.tender_id, tr_id: audit.tr_id, td_id: audit.td_id, aid: preAuditor.aid,
  459. times: audit.times, order: audit.order + 1, status: auditConst.status.checking,
  460. begin_time: time,
  461. });
  462. newAuditors.push({
  463. tender_id: audit.tender_id, tr_id: audit.tr_id, td_id: audit.td_id, aid: audit.aid,
  464. times: audit.times, order: audit.order + 2, status: auditConst.status.uncheck,
  465. });
  466. await transaction.insert(this.tableName, newAuditors);
  467. // 清除本人的签章
  468. await this.ctx.service.paymentRptAudit.clearSignatureMsg(transaction, detailId, audit.aid);
  469. await transaction.commit();
  470. } catch (error) {
  471. await transaction.rollback();
  472. throw error;
  473. }
  474. }
  475. /**
  476. * 审批
  477. * @param {Number} materialId - 材料调差期id
  478. * @param {auditConst.status.checked|auditConst.status.checkNo} checkType - 审批结果
  479. * @param {Number} times - 第几次审批
  480. * @return {Promise<void>}
  481. */
  482. async check(detailId, checkData, times = 1) {
  483. if (checkData.checkType !== auditConst.status.checked && checkData.checkType !== auditConst.status.checkNo && checkData.checkType !== auditConst.status.checkNoPre) {
  484. throw '提交数据错误';
  485. }
  486. const pid = this.ctx.session.sessionProject.id;
  487. switch (checkData.checkType) {
  488. case auditConst.status.checked:
  489. await this._checked(pid, detailId, checkData, times);
  490. break;
  491. case auditConst.status.checkNo:
  492. await this._checkNo(pid, detailId, checkData, times);
  493. break;
  494. case auditConst.status.checkNoPre:
  495. await this._checkNoPre(pid, detailId, checkData, times);
  496. break;
  497. default:
  498. throw '无效审批操作';
  499. }
  500. }
  501. }
  502. return PaymentDetailAudit;
  503. };