DailyFeePaymentRepository.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. using AutoMapper;
  2. using NPOI.SS.Formula.Functions;
  3. using OASystem.Domain;
  4. using OASystem.Domain.Dtos;
  5. using OASystem.Domain.Dtos.Financial;
  6. using OASystem.Domain.Entities.Financial;
  7. using OASystem.Domain.ViewModels.Financial;
  8. using OASystem.Infrastructure.Repositories.System;
  9. using System;
  10. using System.Collections.Generic;
  11. using System.ComponentModel.Design;
  12. using System.Linq;
  13. using System.Runtime.Intrinsics.Arm;
  14. using System.Text;
  15. using System.Threading.Tasks;
  16. namespace OASystem.Infrastructure.Repositories.Financial
  17. {
  18. /// <summary>
  19. /// 财务 - 日付申请
  20. /// </summary>
  21. public class DailyFeePaymentRepository : BaseRepository<Fin_DailyFeePayment, Fin_DailyFeePaymentView>
  22. {
  23. private readonly IMapper _mapper;
  24. private readonly System.SetDataTypeRepository _setDataTypeRep;
  25. private readonly System.UsersRepository _UsersRep;
  26. private readonly System.CompanyRepository _CompanyRep;
  27. public DailyFeePaymentRepository(SqlSugarClient sqlSugar, IMapper mapper, System.SetDataTypeRepository setDataTypeRep,
  28. UsersRepository usersRep, CompanyRepository companyRep)
  29. : base(sqlSugar)
  30. {
  31. this._mapper = mapper;
  32. this._setDataTypeRep = setDataTypeRep;
  33. this._UsersRep = usersRep;
  34. this._CompanyRep = companyRep;
  35. }
  36. /// <summary>
  37. /// 日付申请查询 使用的数据源
  38. /// </summary>
  39. /// <param name="dto"></param>
  40. /// <returns></returns>
  41. public async Task<Result> GetPagePriceTypeData(PortDtoBase dto, int currUserId = 0)
  42. {
  43. Result result = new Result() { Code = -2 };
  44. dynamic? DailyFeePaymentList = null;
  45. var setTypeData = _setDataTypeRep.QueryDto<Sys_SetDataType, Fin_DailyFeePaymentPagePriceTypeView>().ToList();
  46. var setData = _setDataTypeRep.QueryDto<Sys_SetData, Fin_DailyFeePaymentPagePriceSubTypeView>().ToList();
  47. //48人员费用 49办公费用 50 销售费用 51 其他费用 55 大运会
  48. var typeIds = new List<int>() {
  49. 48, //人员费用
  50. 49, //办公费用
  51. 50, //销售费用
  52. 51, //其他费用
  53. 55, //大运会
  54. 90, //各部门基础固定费用明细
  55. };
  56. var priceTypeData = setTypeData.Where(s => typeIds.Contains(s.Id)).ToList();
  57. var priceSubTypeData = setData.Where(s => typeIds.Contains(s.STid)).ToList();
  58. var isEnable = false;
  59. //员工姓名列表
  60. var userData = _sqlSugar.Queryable<Sys_Users>()
  61. .LeftJoin<Sys_Department>((u, d) => u.DepId == d.Id)
  62. .LeftJoin<Sys_JobPost>((u, d, jp) => u.JobPostId == jp.Id)
  63. .Where((u, d, jp) => u.IsDel == 0)
  64. .Select((u, d, jp) => new
  65. {
  66. u.Id,
  67. u.CnName,
  68. u.DepId,
  69. d.DepName,
  70. u.JobPostId,
  71. jp.JobName
  72. })
  73. .ToList();
  74. //1 经理职位 查看该部门下所有人员
  75. if (currUserId > 0)
  76. {
  77. //42
  78. var auditUserIds = _sqlSugar.Queryable<Sys_UserAuthority>().Where(x => x.IsDel == 0 && x.SmId == 42 && x.FId == 12).Select(x => x.UId).ToList();
  79. if (!auditUserIds.Contains(currUserId))
  80. {
  81. var screenWheres = new List<string>() { "经理", "主管" };
  82. var userInfo = userData.Find(x => x.Id == currUserId && screenWheres.Contains(x.JobName));
  83. if (userInfo != null)
  84. {
  85. userData = userData.Where(x => x.DepName.Equals(userInfo.DepName)).ToList();
  86. }
  87. else
  88. {
  89. userData = userData.Where(x => x.Id == currUserId).ToList();
  90. }
  91. }
  92. else
  93. {
  94. userData.Insert(0, new { Id = -1, CnName = "全部", DepId = 0, DepName = "", JobPostId = 0, JobName = "" });
  95. }
  96. }
  97. var userData1 = userData.Select(x => new { x.Id, x.CnName }).ToList();
  98. //62 公转 63 私转
  99. var feeMarkTypeData = setTypeData.Where(s => s.Id == 62 || s.Id == 63).ToList();
  100. var feeMarkSubTypeData = setData.Where(s => s.STid == 62 || s.STid == 63).ToList();
  101. var companyNameData = await _CompanyRep.GetCompanyNameData();
  102. if (dto.PortType == 1) //web
  103. {
  104. DailyFeePaymentList = new
  105. {
  106. FeeTypeData = priceTypeData,
  107. FeeSubTypeData = priceSubTypeData,
  108. UserNameData = userData1,
  109. FeeMarkTypeData = feeMarkTypeData,
  110. FeeMarkSubTypeData = feeMarkSubTypeData,
  111. CompanyNameData = companyNameData.Data
  112. };
  113. }
  114. else if (dto.PortType == 2) //安卓
  115. {
  116. DailyFeePaymentList = new
  117. {
  118. UserNameData = userData1,
  119. FeeTypeData = priceTypeData,
  120. FeeTypeSubData = priceSubTypeData
  121. };
  122. }
  123. result.Code = 0;
  124. result.Msg = "查询成功!";
  125. result.Data = DailyFeePaymentList;
  126. return result;
  127. }
  128. /// <summary>
  129. /// 日付申请查询 使用的数据源
  130. /// </summary>
  131. /// <param name="dto"></param>
  132. /// <returns></returns>
  133. public async Task<Result> GetPriceTypeAddData(PortDtoBase dto)
  134. {
  135. Result result = new Result() { Code = -2 };
  136. dynamic? DailyFeePaymentList = null;
  137. var setTypeData = _setDataTypeRep.QueryDto<Sys_SetDataType, Fin_DailyFeePaymentPagePriceTypeView>().ToList();
  138. var setData = _setDataTypeRep.QueryDto<Sys_SetData, Fin_DailyFeePaymentPagePriceSubTypeView>().ToList();
  139. //48人员费用 49办公费用 50 销售费用 51 其他费用 55 大运会
  140. var priceTypeData = setTypeData.Where(s => s.Id == 48 || s.Id == 49 || s.Id == 50 || s.Id == 51 || s.Id == 55).ToList();
  141. var priceSubTypeData = setData.Where(s => s.STid == 48 || s.STid == 49 || s.STid == 50 || s.STid == 51 || s.STid == 55).ToList();
  142. //员工姓名列表
  143. var userNameData = await _UsersRep.GetUserNameList(dto.PortType);
  144. //62 公转 63 私转
  145. var feeMarkTypeData = setTypeData.Where(s => s.Id == 62 || s.Id == 63).ToList();
  146. var feeMarkSubTypeData = setData.Where(s => s.STid == 62 || s.STid == 63).ToList();
  147. var companyNameData = await _CompanyRep.GetCompanyNameData();
  148. if (dto.PortType == 1) //web
  149. {
  150. DailyFeePaymentList = new Fin_DailyFeePaymentPagePriceTypeDataView
  151. {
  152. FeeTypeData = priceTypeData,
  153. FeeSubTypeData = priceSubTypeData,
  154. UserNameData = userNameData.Data,
  155. FeeMarkTypeData = feeMarkTypeData,
  156. FeeMarkSubTypeData = feeMarkSubTypeData,
  157. CompanyNameData = companyNameData.Data
  158. };
  159. }
  160. else if (dto.PortType == 2) //安卓
  161. {
  162. DailyFeePaymentList = new
  163. {
  164. CompanyNameData = companyNameData.Data,
  165. FeeTypeData = feeMarkTypeData,
  166. FeeTypeSubData = feeMarkSubTypeData
  167. };
  168. }
  169. result.Code = 0;
  170. result.Msg = "查询成功!";
  171. result.Data = DailyFeePaymentList;
  172. return result;
  173. }
  174. /// <summary>
  175. /// 日付申请 page 查询
  176. /// </summary>
  177. /// <param name="dto"></param>
  178. /// <returns></returns>
  179. public async Task<Result> GetPageSearchAll(PageDailyFeePaymentDto dto)
  180. {
  181. Result result = new Result() { Code = -2 };
  182. ListViewBase<Fin_DailyFeePaymentPageListView> dailyFeePaymentPageList = new ListViewBase<Fin_DailyFeePaymentPageListView>()
  183. {
  184. ReceiveDt = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
  185. };
  186. #region sql条件处理
  187. string sqlWhere = "";
  188. if (dto.CompanyId != -1) //公司
  189. sqlWhere += string.Format(" And dfp.CompanyId = {0}", dto.CompanyId);
  190. if (dto.FinancialAuditStatus != -1) //财务审核
  191. sqlWhere += string.Format(" And dfp.FAudit = {0}", dto.FinancialAuditStatus);
  192. if (dto.ManagerAuditStatus != -1) //总经理审核
  193. sqlWhere += string.Format(" And dfp.MAudit = {0}", dto.ManagerAuditStatus);
  194. if (dto.IsPaySign != -1) //付款状态
  195. {
  196. sqlWhere += string.Format(" And dfp.IsPay = {0}", dto.IsPaySign);
  197. }
  198. if (dto.FeeTypeId != -1) //费用类型
  199. {
  200. if (dto.FeeSubTypeId != -1) //子类处理
  201. {
  202. sqlWhere += string.Format(" And dfp.PriceTypeId = {0}", dto.FeeSubTypeId);
  203. }
  204. else
  205. {
  206. var setData = _setDataTypeRep.QueryDto<Sys_SetData, SetDataView>(s => s.STid == dto.FeeTypeId).ToList();
  207. if (setData.Count > 0)
  208. {
  209. string setDataIds = "";
  210. foreach (var item in setData)
  211. {
  212. setDataIds += item.Id + ",";
  213. }
  214. if (setDataIds.Length > 0)
  215. {
  216. setDataIds = setDataIds.Substring(0, setDataIds.Length - 1);
  217. sqlWhere += string.Format(" And dfp.PriceTypeId In ({0})", setDataIds);
  218. }
  219. }
  220. }
  221. }
  222. if (!string.IsNullOrEmpty(dto.FeeDesc))
  223. sqlWhere += string.Format(" And dfp.Instructions Like '%{0}%'", dto.FeeDesc);
  224. if (dto.CreateUserId != -1)
  225. sqlWhere += string.Format(" And dfp.CreateUserId = {0}", dto.CreateUserId);
  226. int startIndex = (dto.PageIndex - 1) * dto.PageSize + 1;
  227. int endIndex = startIndex + dto.PageSize - 1;
  228. string sqlPage = string.Format(@"Select * From (
  229. Select row_number() over (order by dfp.Id Desc) as RowNumber,
  230. dfp.Id,dfp.CompanyId,c.CompanyName,dfp.Instructions,dfp.SumPrice,
  231. dfp.CreateUserId,u.CnName CreateUser,dfp.CreateTime,dfp.FAudit,dfp.MAudit,
  232. dfp.PriceTypeId,dfp.IsPay
  233. From Fin_DailyFeePayment dfp
  234. Inner Join Sys_Company c On dfp.CompanyId = c.Id
  235. Left Join Sys_Users u On dfp.CreateUserId = u.Id
  236. Where dfp.IsDel=0 {0}
  237. ) temp Where RowNumber Between {1} and {2}", sqlWhere, startIndex, endIndex);
  238. string sqlCount = string.Format(@"Select COUNT(1) as Count From (
  239. Select dfp.Id,dfp.CompanyId,c.CompanyName,dfp.Instructions,dfp.SumPrice,
  240. dfp.CreateUserId,u.CnName CreateUser,dfp.CreateTime,dfp.FAudit,dfp.MAudit,
  241. dfp.PriceTypeId
  242. From Fin_DailyFeePayment dfp
  243. Inner Join Sys_Company c On dfp.CompanyId = c.Id
  244. Left Join Sys_Users u On dfp.CreateUserId = u.Id
  245. Where dfp.IsDel=0 {0}
  246. ) temp ", sqlWhere);
  247. #endregion
  248. if (dto.PortType == 1 || dto.PortType == 2 || dto.PortType == 3) //web
  249. {
  250. //Fin_DailyFeePaymentPageCount
  251. var dailyFeePaymentCount = await _sqlSugar.SqlQueryable<Fin_DailyFeePaymentPageCount>(sqlCount).FirstAsync();
  252. var DailyFeePaymentData = await _sqlSugar.SqlQueryable<Fin_DailyFeePaymentPageListView>(sqlPage).ToListAsync();
  253. int totalCount = dailyFeePaymentCount.Count;
  254. dailyFeePaymentPageList = new ListViewBase<Fin_DailyFeePaymentPageListView>
  255. {
  256. CurrPageIndex = dto.PageIndex,
  257. CurrPageSize = dto.PageSize,
  258. DataCount = totalCount,
  259. DataList = DailyFeePaymentData
  260. };
  261. }
  262. result.Code = 0;
  263. result.Msg = "查询成功!";
  264. result.Data = dailyFeePaymentPageList;
  265. return result;
  266. }
  267. /// <summary>
  268. /// 日付申请 single 查询 By Id
  269. /// </summary>
  270. /// <param name="dto"></param>
  271. /// <returns></returns>
  272. public async Task<Result> GetSearchById(SearchDailyFeePaymentDto dto)
  273. {
  274. Result result = new Result() { Code = -2 };
  275. if (dto.PortType == 1) //web
  276. {
  277. Fin_DailyFeePaymentInfolView feeData = new Fin_DailyFeePaymentInfolView();
  278. string feeSql = string.Format(@"Select * From Fin_DailyFeePayment
  279. Where IsDel=0 And Id = {0} ", dto.Id);
  280. feeData = await _sqlSugar.SqlQueryable<Fin_DailyFeePaymentInfolView>(feeSql).FirstAsync();
  281. string feeContentSql = string.Format(@"Select * From Fin_DailyFeePaymentContent
  282. Where IsDel=0 And DFPId = {0} ", dto.Id);
  283. feeData.FeeContents = await _sqlSugar.SqlQueryable<Fin_DailyFeePaymentContentInfolView>(feeContentSql).ToListAsync();
  284. result.Code = 0;
  285. result.Msg = "查询成功!";
  286. result.Data = feeData;
  287. }
  288. else if (dto.PortType == 2 || dto.PortType == 3) //android And ios
  289. {
  290. Fin_DailyFeePaymentInfoAndroidlView feeData = new Fin_DailyFeePaymentInfoAndroidlView();
  291. string feeSql = string.Format(@"Select * From Fin_DailyFeePayment
  292. Where IsDel=0 And Id = {0} ", dto.Id);
  293. feeData = await _sqlSugar.SqlQueryable<Fin_DailyFeePaymentInfoAndroidlView>(feeSql).FirstAsync();
  294. //feeData.TransferTypeId = feeData.TransferTypeId == 0 ? 62 : feeData.TransferTypeId == 1 ? 63 : 0;
  295. string feeContentSql = string.Format(@"Select * From Fin_DailyFeePaymentContent
  296. Where IsDel=0 And DFPId = {0} ", dto.Id);
  297. feeData.FeeContents = await _sqlSugar.SqlQueryable<Fin_DailyFeePaymentContentInfolView>(feeContentSql).ToListAsync();
  298. result.Code = 0;
  299. result.Msg = "查询成功!";
  300. result.Data = feeData;
  301. }
  302. return result;
  303. }
  304. /// <summary>
  305. /// 日付申请 添加
  306. /// </summary>
  307. /// <param name="dto"></param>
  308. /// <returns></returns>
  309. public async Task<Result> Add(AddDailyFeePaymentDto dto)
  310. {
  311. Result result = new Result() { Code = -2 };
  312. _sqlSugar.BeginTran();
  313. try
  314. {
  315. Fin_DailyFeePayment _fee = _mapper.Map<Fin_DailyFeePayment>(dto);
  316. _fee.CreateUserId = dto.UserId;
  317. /*
  318. * 2024-10-29
  319. * 各部门基础固定费用明细”里的费用数据新增后,财务和总经理审核都默认直接通过isAudit=1),并且可编辑,如果ispay=1的话将不可编辑
  320. */
  321. var priceTypeInfo = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.Id == dto.PriceTypeId).FirstAsync();
  322. if (priceTypeInfo != null && priceTypeInfo.STid == 90)
  323. {
  324. _fee.FAudit = 1;
  325. _fee.FAuditDate = DateTime.Now;
  326. _fee.MAudit = 1;
  327. _fee.MAuditDate = DateTime.Now;
  328. }
  329. int? feeId = await _sqlSugar.Insertable(_fee).ExecuteReturnIdentityAsync();
  330. if (dto.FeeContents.Count > 0)
  331. {
  332. List<Fin_DailyFeePaymentContent> _feeContents = _mapper.Map<List<Fin_DailyFeePaymentContent>>(dto.FeeContents);
  333. foreach (var item in _feeContents)
  334. {
  335. item.DFPId = feeId == null ? -1 : Convert.ToInt32(feeId);
  336. item.CreateUserId = dto.UserId;
  337. }
  338. await _sqlSugar.Insertable(_feeContents).ExecuteCommandAsync();
  339. }
  340. _sqlSugar.CommitTran();
  341. result.Code = 0;
  342. var data = new { dailyId = feeId, sign = 1 };
  343. result.Data = data;
  344. }
  345. catch (Exception ex)
  346. {
  347. _sqlSugar.RollbackTran();
  348. result.Msg = ex.Message;
  349. }
  350. return result;
  351. }
  352. /// <summary>
  353. /// 日付申请 编辑
  354. /// </summary>
  355. /// <param name="dto"></param>
  356. /// <returns></returns>
  357. public async Task<Result> Edit(EditDailyFeePaymentDto dto)
  358. {
  359. Result result = new Result() { Code = -2 };
  360. #region 已审核过的日付申请不可编辑
  361. var _DailyFeePayment = await _sqlSugar.Queryable<Fin_DailyFeePayment>().Where(it => it.Id == dto.Id && it.IsDel == 0).FirstAsync();
  362. if (_DailyFeePayment != null)
  363. {
  364. if (_DailyFeePayment.FAudit == 1 || _DailyFeePayment.MAudit == 1)
  365. {
  366. var setData = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.Id == dto.PriceTypeId).FirstAsync();
  367. if (setData != null)
  368. {
  369. if (setData.STid == 90)
  370. {
  371. if (_DailyFeePayment.IsPay == 1)
  372. {
  373. result.Msg = "该笔费用已付款,不可修改!";
  374. return result;
  375. }
  376. }
  377. else
  378. {
  379. result.Msg = "审核已通过,不可修改!";
  380. return result;
  381. }
  382. }
  383. else
  384. {
  385. result.Msg = "审核已通过,不可修改!";
  386. return result;
  387. }
  388. }
  389. }
  390. #endregion
  391. _sqlSugar.BeginTran();
  392. try
  393. {
  394. Fin_DailyFeePayment _fee = _mapper.Map<Fin_DailyFeePayment>(dto);
  395. _fee.CreateUserId = dto.UserId;
  396. int? editFeeStatus = await _sqlSugar.Updateable<Fin_DailyFeePayment>()
  397. .Where(a => a.Id == dto.Id)
  398. .SetColumns(a => new Fin_DailyFeePayment
  399. {
  400. Instructions = dto.Instructions,
  401. SumPrice = dto.SumPrice,
  402. TransferTypeId = dto.TransferTypeId,
  403. PriceTypeId = dto.PriceTypeId,
  404. CompanyId = dto.CompanyId,
  405. }).ExecuteCommandAsync();
  406. List<Fin_DailyFeePaymentContent> _feeContents = _mapper.Map<List<Fin_DailyFeePaymentContent>>(dto.FeeContents);
  407. await _sqlSugar.Updateable<Fin_DailyFeePaymentContent>()
  408. .Where(a => a.DFPId == _fee.Id)
  409. .SetColumns(a => new Fin_DailyFeePaymentContent
  410. {
  411. IsDel = 1,
  412. DeleteUserId = _fee.CreateUserId,
  413. DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
  414. }).ExecuteCommandAsync();
  415. if (_feeContents.Count > 0)
  416. {
  417. foreach (var item in _feeContents)
  418. {
  419. item.DFPId = _fee.Id;
  420. item.CreateUserId = dto.UserId;
  421. }
  422. if (_feeContents.Count > 0)
  423. {
  424. await _sqlSugar.Insertable(_feeContents).ExecuteCommandAsync();
  425. }
  426. }
  427. _sqlSugar.CommitTran();
  428. result.Code = 0;
  429. var data = new { dailyId = dto.Id, sign = 2 };
  430. result.Data = data;
  431. }
  432. catch (Exception ex)
  433. {
  434. _sqlSugar.RollbackTran();
  435. result.Msg = ex.Message;
  436. }
  437. return result;
  438. }
  439. /// <summary>
  440. /// 日付申请 删除
  441. /// </summary>
  442. /// <param name="dto"></param>
  443. /// <returns></returns>
  444. public async Task<Result> Del(DelDailyFeePaymentDto dto)
  445. {
  446. Result result = new Result() { Code = -2 };
  447. int? delFeeStatus = await _sqlSugar.Updateable<Fin_DailyFeePayment>()
  448. .Where(a => a.Id == dto.Id)
  449. .SetColumns(a => new Fin_DailyFeePayment
  450. {
  451. IsDel = 1,
  452. DeleteUserId = dto.Id,
  453. DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
  454. }).ExecuteCommandAsync();
  455. result.Code = 0;
  456. return result;
  457. }
  458. /// <summary>
  459. /// 日付申请 审核
  460. /// </summary>
  461. /// <param name="dto"></param>
  462. /// <returns></returns>
  463. public async Task<Result> DailyPaymentAudit(DP_AuditStatusDto dto)
  464. {
  465. Result result = new Result() { Code = -2 };
  466. if (dto.AuditType == 1) //财务审核
  467. {
  468. int? auditStatus = await _sqlSugar.Updateable<Fin_DailyFeePayment>()
  469. .Where(a => a.Id == dto.Id)
  470. .SetColumns(a => new Fin_DailyFeePayment
  471. {
  472. FAudit = dto.AuditStatus,
  473. FAuditDate = DateTime.Now,
  474. }).ExecuteCommandAsync();
  475. if (auditStatus != null && auditStatus > 0)
  476. result.Code = 0;
  477. else
  478. result.Msg = "财务审核操作失败";
  479. }
  480. else if (dto.AuditType == 2) //总经理
  481. {
  482. int? auditStatus = await _sqlSugar.Updateable<Fin_DailyFeePayment>()
  483. .Where(a => a.Id == dto.Id)
  484. .SetColumns(a => new Fin_DailyFeePayment
  485. {
  486. MAudit = dto.AuditStatus,
  487. MAuditDate = DateTime.Now,
  488. }).ExecuteCommandAsync();
  489. if (auditStatus != null && auditStatus > 0)
  490. result.Code = 0;
  491. else
  492. result.Msg = "总经理审核操作失败";
  493. }
  494. return result;
  495. }
  496. }
  497. }