From b2c391f9212a7cd068be32cd2469c2bf300920c1 Mon Sep 17 00:00:00 2001
From: hexiaodong <1@1.com>
Date: Thu, 13 Nov 2025 23:05:02 +0800
Subject: [PATCH] hxd20251113
---
antis-ncc-admin/.env.development | 1 +
antis-ncc-admin/src/views/lqPurchaseRecords/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqPurchaseRecords/Form.vue | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqPurchaseRecords/index.vue | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqReimbursementApplication/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqReimbursementApplication/Form.vue | 482 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqReimbursementApplication/index.vue | 289 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqReimbursementCategory/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqReimbursementCategory/Form.vue | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
antis-ncc-admin/src/views/lqReimbursementCategory/index.vue | 263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsCrInput.cs | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsInfoOutput.cs | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListOutput.cs | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListQueryInput.cs | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsUpInput.cs | 17 +++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationCrInput.cs | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationInfoOutput.cs | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListOutput.cs | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListQueryInput.cs | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationUpInput.cs | 17 +++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryCrInput.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryInfoOutput.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListOutput.cs | 46 ++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListQueryInput.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryUpInput.cs | 17 +++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqPurchaseRecordsEntity.cs | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementApplicationEntity.cs | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementCategoryEntity.cs | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqPurchaseRecordsMapper.cs | 21 +++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementApplicationMapper.cs | 14 ++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementCategoryMapper.cs | 14 ++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqPurchaseRecordsService.cs | 6 ++++++
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementApplicationService.cs | 6 ++++++
netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementCategoryService.cs | 6 ++++++
netcore/src/Modularity/Extend/NCC.Extend/LqPurchaseRecordsService.cs | 297 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementApplicationService.cs | 476 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementCategoryService.cs | 241 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
37 files changed, 4246 insertions(+), 0 deletions(-)
create mode 100644 antis-ncc-admin/src/views/lqPurchaseRecords/ExportBox.vue
create mode 100644 antis-ncc-admin/src/views/lqPurchaseRecords/Form.vue
create mode 100644 antis-ncc-admin/src/views/lqPurchaseRecords/index.vue
create mode 100644 antis-ncc-admin/src/views/lqReimbursementApplication/ExportBox.vue
create mode 100644 antis-ncc-admin/src/views/lqReimbursementApplication/Form.vue
create mode 100644 antis-ncc-admin/src/views/lqReimbursementApplication/index.vue
create mode 100644 antis-ncc-admin/src/views/lqReimbursementCategory/ExportBox.vue
create mode 100644 antis-ncc-admin/src/views/lqReimbursementCategory/Form.vue
create mode 100644 antis-ncc-admin/src/views/lqReimbursementCategory/index.vue
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsCrInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsInfoOutput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListOutput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListQueryInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsUpInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationCrInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationInfoOutput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListOutput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListQueryInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationUpInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryCrInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryInfoOutput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListOutput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListQueryInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryUpInput.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqPurchaseRecordsEntity.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementApplicationEntity.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementCategoryEntity.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqPurchaseRecordsMapper.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementApplicationMapper.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementCategoryMapper.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqPurchaseRecordsService.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementApplicationService.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementCategoryService.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend/LqPurchaseRecordsService.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementApplicationService.cs
create mode 100644 netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementCategoryService.cs
diff --git a/antis-ncc-admin/.env.development b/antis-ncc-admin/.env.development
index 4c02e12..97a5767 100644
--- a/antis-ncc-admin/.env.development
+++ b/antis-ncc-admin/.env.development
@@ -3,5 +3,6 @@
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# VUE_APP_BASE_API = 'https://erp.lvqianmeiye.com'
VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com'
+#VUE_APP_BASE_API = 'http://localhost:2011'
# VUE_APP_BASE_API = 'http://localhost:2011'
VUE_APP_BASE_WSS = 'ws://192.168.110.45:2011/websocket'
diff --git a/antis-ncc-admin/src/views/lqPurchaseRecords/ExportBox.vue b/antis-ncc-admin/src/views/lqPurchaseRecords/ExportBox.vue
new file mode 100644
index 0000000..4fc5c07
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqPurchaseRecords/ExportBox.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+ 当前页面数据
+ 全部页面数据
+
+
+
+ 全选
+
+
+ {{item.label}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/antis-ncc-admin/src/views/lqPurchaseRecords/Form.vue b/antis-ncc-admin/src/views/lqPurchaseRecords/Form.vue
new file mode 100644
index 0000000..0af65db
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqPurchaseRecords/Form.vue
@@ -0,0 +1,330 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.level1Name }} - {{ item.typeName }}
+ ({{ item.level2Code }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/antis-ncc-admin/src/views/lqPurchaseRecords/index.vue b/antis-ncc-admin/src/views/lqPurchaseRecords/index.vue
new file mode 100644
index 0000000..419db4f
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqPurchaseRecords/index.vue
@@ -0,0 +1,330 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+ 展开
+ 收起
+
+
+
+
+
+
+
+ 新增
+ 导出
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/antis-ncc-admin/src/views/lqReimbursementApplication/ExportBox.vue b/antis-ncc-admin/src/views/lqReimbursementApplication/ExportBox.vue
new file mode 100644
index 0000000..4fc5c07
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqReimbursementApplication/ExportBox.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+ 当前页面数据
+ 全部页面数据
+
+
+
+ 全选
+
+
+ {{item.label}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/antis-ncc-admin/src/views/lqReimbursementApplication/Form.vue b/antis-ncc-admin/src/views/lqReimbursementApplication/Form.vue
new file mode 100644
index 0000000..e437581
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqReimbursementApplication/Form.vue
@@ -0,0 +1,482 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择购买物品
+
+ 已选择 {{ selectedPurchaseRecords.length }} 条记录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.purchaseTime ? formatDate(scope.row.purchaseTime) : '' }}
+
+
+
+
+
+ 移除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.purchaseTime ? formatDate(scope.row.purchaseTime) : '' }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/antis-ncc-admin/src/views/lqReimbursementApplication/index.vue b/antis-ncc-admin/src/views/lqReimbursementApplication/index.vue
new file mode 100644
index 0000000..551ee4a
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqReimbursementApplication/index.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+ 展开
+ 收起
+
+
+
+
+
+
+
+ 新增
+ 导出
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/antis-ncc-admin/src/views/lqReimbursementCategory/ExportBox.vue b/antis-ncc-admin/src/views/lqReimbursementCategory/ExportBox.vue
new file mode 100644
index 0000000..4fc5c07
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqReimbursementCategory/ExportBox.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+ 当前页面数据
+ 全部页面数据
+
+
+
+ 全选
+
+
+ {{item.label}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/antis-ncc-admin/src/views/lqReimbursementCategory/Form.vue b/antis-ncc-admin/src/views/lqReimbursementCategory/Form.vue
new file mode 100644
index 0000000..7edf1a0
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqReimbursementCategory/Form.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/antis-ncc-admin/src/views/lqReimbursementCategory/index.vue b/antis-ncc-admin/src/views/lqReimbursementCategory/index.vue
new file mode 100644
index 0000000..92e5cc8
--- /dev/null
+++ b/antis-ncc-admin/src/views/lqReimbursementCategory/index.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+ 展开
+ 收起
+
+
+
+
+
+
+
+ 新增
+ 导出
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsCrInput.cs
new file mode 100644
index 0000000..0790eab
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsCrInput.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using NCC.Common.Model;
+
+namespace NCC.Extend.Entitys.Dto.LqPurchaseRecords
+{
+ ///
+ /// 购买记录表修改输入参数
+ ///
+ public class LqPurchaseRecordsCrInput
+ {
+ ///
+ /// 记录编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 购买物品编号
+ ///
+ public string reimbursementCategoryId { get; set; }
+
+ ///
+ /// 购买物品名称
+ ///
+ public string reimbursementCategoryName { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public decimal unitPrice { get; set; }
+
+ ///
+ /// 数量
+ ///
+ public int? quantity { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public decimal amount { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ public string memo { get; set; }
+
+ ///
+ /// 附件
+ ///
+ public List attachment { get; set; }
+
+ ///
+ /// 购买时间
+ ///
+ public DateTime? purchaseTime { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? createTime { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人门店
+ ///
+ public string createUserStoreId { get; set; }
+
+ ///
+ /// 审批状态
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public DateTime? approveTime { get; set; }
+
+ ///
+ /// 审批单编号
+ ///
+ public string applicationId { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsInfoOutput.cs
new file mode 100644
index 0000000..0c8132f
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsInfoOutput.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using NCC.Common.Model;
+
+namespace NCC.Extend.Entitys.Dto.LqPurchaseRecords
+{
+ ///
+ /// 购买记录表输出参数
+ ///
+ public class LqPurchaseRecordsInfoOutput
+ {
+ ///
+ /// 记录编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 购买物品编号
+ ///
+ public string reimbursementCategoryId { get; set; }
+
+ ///
+ /// 购买物品名称
+ ///
+ public string reimbursementCategoryName { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public decimal unitPrice { get; set; }
+
+ ///
+ /// 数量
+ ///
+ public int? quantity { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public decimal amount { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ public string memo { get; set; }
+
+ ///
+ /// 附件
+ ///
+ public List attachment { get; set; }
+
+ ///
+ /// 购买时间
+ ///
+ public DateTime? purchaseTime { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? createTime { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人门店
+ ///
+ public string createUserStoreId { get; set; }
+
+ ///
+ /// 审批状态
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public DateTime? approveTime { get; set; }
+
+ ///
+ /// 审批单编号
+ ///
+ public string applicationId { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListOutput.cs
new file mode 100644
index 0000000..8ac636e
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListOutput.cs
@@ -0,0 +1,86 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqPurchaseRecords
+{
+ ///
+ /// 购买记录表输入参数
+ ///
+ public class LqPurchaseRecordsListOutput
+ {
+ ///
+ /// 记录编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 购买物品编号
+ ///
+ public string reimbursementCategoryId { get; set; }
+
+ ///
+ /// 购买物品名称
+ ///
+ public string reimbursementCategoryName { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public decimal unitPrice { get; set; }
+
+ ///
+ /// 数量
+ ///
+ public int? quantity { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public decimal amount { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ public string memo { get; set; }
+
+ ///
+ /// 购买时间
+ ///
+ public DateTime? purchaseTime { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? createTime { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人门店
+ ///
+ public string createUserStoreId { get; set; }
+
+ ///
+ /// 审批状态
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public DateTime? approveTime { get; set; }
+
+ ///
+ /// 审批单编号
+ ///
+ public string applicationId { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListQueryInput.cs
new file mode 100644
index 0000000..bad54e2
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsListQueryInput.cs
@@ -0,0 +1,98 @@
+using NCC.Common.Filter;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqPurchaseRecords
+{
+ ///
+ /// 购买记录表列表查询输入
+ ///
+ public class LqPurchaseRecordsListQueryInput : PageInputBase
+ {
+ ///
+ /// 选择导出数据key
+ ///
+ public string selectKey { get; set; }
+
+ ///
+ ///
+ ///
+ public int dataType { get; set; }
+
+
+ ///
+ /// 记录编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 购买物品编号
+ ///
+ public string reimbursementCategoryId { get; set; }
+
+ ///
+ /// 购买物品名称
+ ///
+ public string reimbursementCategoryName { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public string unitPrice { get; set; }
+
+ ///
+ /// 数量
+ ///
+ public string quantity { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public string amount { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ public string memo { get; set; }
+
+ ///
+ /// 购买时间
+ ///
+ public string purchaseTime { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public string createTime { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ public string createUser { get; set; }
+
+ ///
+ /// 创建人门店
+ ///
+ public string createUserStoreId { get; set; }
+
+ ///
+ /// 审批状态
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public string approveTime { get; set; }
+
+ ///
+ /// 审批单编号
+ ///
+ public string applicationId { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsUpInput.cs
new file mode 100644
index 0000000..ce7c226
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPurchaseRecordsUpInput.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqPurchaseRecords
+{
+ ///
+ /// 购买记录表更新输入参数
+ ///
+ public class LqPurchaseRecordsUpInput : LqPurchaseRecordsCrInput
+ {
+ ///
+ /// 记录编号
+ ///
+ public string id { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationCrInput.cs
new file mode 100644
index 0000000..65e4b6c
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationCrInput.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementApplication
+{
+ ///
+ /// 报销申请表修改输入参数
+ ///
+ public class LqReimbursementApplicationCrInput
+ {
+ ///
+ /// 申请编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 申请人编号
+ ///
+ public string applicationUserId { get; set; }
+
+ ///
+ /// 申请人姓名
+ ///
+ public string applicationUserName { get; set; }
+
+ ///
+ /// 申请门店
+ ///
+ public string applicationStoreId { get; set; }
+
+ ///
+ /// 申请时间
+ ///
+ public DateTime? applicationTime { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public string amount { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批结果
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public string approveTime { get; set; }
+
+ ///
+ /// 关联购买编号
+ ///
+ public string purchaseRecordsId { get; set; }
+
+ ///
+ /// 选中的购买记录ID列表(用于更新购买记录的审批单编号)
+ ///
+ public List selectedPurchaseRecordIds { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationInfoOutput.cs
new file mode 100644
index 0000000..b3d0cd9
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationInfoOutput.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementApplication
+{
+ ///
+ /// 报销申请表输出参数
+ ///
+ public class LqReimbursementApplicationInfoOutput
+ {
+ ///
+ /// 申请编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 申请人编号
+ ///
+ public string applicationUserId { get; set; }
+
+ ///
+ /// 申请人姓名
+ ///
+ public string applicationUserName { get; set; }
+
+ ///
+ /// 申请门店
+ ///
+ public string applicationStoreId { get; set; }
+
+ ///
+ /// 申请时间
+ ///
+ public DateTime? applicationTime { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public string amount { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批结果
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public string approveTime { get; set; }
+
+ ///
+ /// 关联购买编号
+ ///
+ public string purchaseRecordsId { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListOutput.cs
new file mode 100644
index 0000000..9fc9128
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListOutput.cs
@@ -0,0 +1,61 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementApplication
+{
+ ///
+ /// 报销申请表输入参数
+ ///
+ public class LqReimbursementApplicationListOutput
+ {
+ ///
+ /// 申请编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 申请人编号
+ ///
+ public string applicationUserId { get; set; }
+
+ ///
+ /// 申请人姓名
+ ///
+ public string applicationUserName { get; set; }
+
+ ///
+ /// 申请门店
+ ///
+ public string applicationStoreId { get; set; }
+
+ ///
+ /// 申请时间
+ ///
+ public DateTime? applicationTime { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public string amount { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批结果
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public string approveTime { get; set; }
+
+ ///
+ /// 关联购买编号
+ ///
+ public string purchaseRecordsId { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListQueryInput.cs
new file mode 100644
index 0000000..a668a9f
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationListQueryInput.cs
@@ -0,0 +1,73 @@
+using NCC.Common.Filter;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementApplication
+{
+ ///
+ /// 报销申请表列表查询输入
+ ///
+ public class LqReimbursementApplicationListQueryInput : PageInputBase
+ {
+ ///
+ /// 选择导出数据key
+ ///
+ public string selectKey { get; set; }
+
+ ///
+ ///
+ ///
+ public int dataType { get; set; }
+
+
+ ///
+ /// 申请编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 申请人编号
+ ///
+ public string applicationUserId { get; set; }
+
+ ///
+ /// 申请人姓名
+ ///
+ public string applicationUserName { get; set; }
+
+ ///
+ /// 申请门店
+ ///
+ public string applicationStoreId { get; set; }
+
+ ///
+ /// 申请时间
+ ///
+ public string applicationTime { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ public string amount { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ public string approveUser { get; set; }
+
+ ///
+ /// 审批结果
+ ///
+ public string approveStatus { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ public string approveTime { get; set; }
+
+ ///
+ /// 关联购买编号
+ ///
+ public string purchaseRecordsId { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationUpInput.cs
new file mode 100644
index 0000000..4cf701d
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementApplicationUpInput.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementApplication
+{
+ ///
+ /// 报销申请表更新输入参数
+ ///
+ public class LqReimbursementApplicationUpInput : LqReimbursementApplicationCrInput
+ {
+ ///
+ /// 申请编号
+ ///
+ public string id { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryCrInput.cs
new file mode 100644
index 0000000..be25e56
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryCrInput.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementCategory
+{
+ ///
+ /// 报销分类表修改输入参数
+ ///
+ public class LqReimbursementCategoryCrInput
+ {
+ ///
+ /// 分类编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 一级名称
+ ///
+ public string level1Name { get; set; }
+
+ ///
+ /// 二级名称
+ ///
+ public string typeName { get; set; }
+
+ ///
+ /// 权责收付实现
+ ///
+ public string implement { get; set; }
+
+ ///
+ /// 费用计入
+ ///
+ public string costsRecorded { get; set; }
+
+ ///
+ /// 一级编号
+ ///
+ public string level1Code { get; set; }
+
+ ///
+ /// 二级编号
+ ///
+ public string level2Code { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryInfoOutput.cs
new file mode 100644
index 0000000..0a2ac69
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryInfoOutput.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementCategory
+{
+ ///
+ /// 报销分类表输出参数
+ ///
+ public class LqReimbursementCategoryInfoOutput
+ {
+ ///
+ /// 分类编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 一级名称
+ ///
+ public string level1Name { get; set; }
+
+ ///
+ /// 二级名称
+ ///
+ public string typeName { get; set; }
+
+ ///
+ /// 权责收付实现
+ ///
+ public string implement { get; set; }
+
+ ///
+ /// 费用计入
+ ///
+ public string costsRecorded { get; set; }
+
+ ///
+ /// 一级编号
+ ///
+ public string level1Code { get; set; }
+
+ ///
+ /// 二级编号
+ ///
+ public string level2Code { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListOutput.cs
new file mode 100644
index 0000000..ccf7aff
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListOutput.cs
@@ -0,0 +1,46 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementCategory
+{
+ ///
+ /// 报销分类表输入参数
+ ///
+ public class LqReimbursementCategoryListOutput
+ {
+ ///
+ /// 分类编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 一级名称
+ ///
+ public string level1Name { get; set; }
+
+ ///
+ /// 二级名称
+ ///
+ public string typeName { get; set; }
+
+ ///
+ /// 权责收付实现
+ ///
+ public string implement { get; set; }
+
+ ///
+ /// 费用计入
+ ///
+ public string costsRecorded { get; set; }
+
+ ///
+ /// 一级编号
+ ///
+ public string level1Code { get; set; }
+
+ ///
+ /// 二级编号
+ ///
+ public string level2Code { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListQueryInput.cs
new file mode 100644
index 0000000..91aa010
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryListQueryInput.cs
@@ -0,0 +1,58 @@
+using NCC.Common.Filter;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementCategory
+{
+ ///
+ /// 报销分类表列表查询输入
+ ///
+ public class LqReimbursementCategoryListQueryInput : PageInputBase
+ {
+ ///
+ /// 选择导出数据key
+ ///
+ public string selectKey { get; set; }
+
+ ///
+ ///
+ ///
+ public int dataType { get; set; }
+
+
+ ///
+ /// 分类编号
+ ///
+ public string id { get; set; }
+
+ ///
+ /// 一级名称
+ ///
+ public string level1Name { get; set; }
+
+ ///
+ /// 二级名称
+ ///
+ public string typeName { get; set; }
+
+ ///
+ /// 权责收付实现
+ ///
+ public string implement { get; set; }
+
+ ///
+ /// 费用计入
+ ///
+ public string costsRecorded { get; set; }
+
+ ///
+ /// 一级编号
+ ///
+ public string level1Code { get; set; }
+
+ ///
+ /// 二级编号
+ ///
+ public string level2Code { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryUpInput.cs
new file mode 100644
index 0000000..a7817d9
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReimbursementCategoryUpInput.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Dto.LqReimbursementCategory
+{
+ ///
+ /// 报销分类表更新输入参数
+ ///
+ public class LqReimbursementCategoryUpInput : LqReimbursementCategoryCrInput
+ {
+ ///
+ /// 分类编号
+ ///
+ public string id { get; set; }
+
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqPurchaseRecordsEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqPurchaseRecordsEntity.cs
new file mode 100644
index 0000000..fc31519
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqPurchaseRecordsEntity.cs
@@ -0,0 +1,111 @@
+using NCC.Common.Const;
+using SqlSugar;
+using System;
+
+namespace NCC.Extend.Entitys
+{
+ ///
+ /// 购买记录表
+ ///
+ [SugarTable("lq_purchase_records")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqPurchaseRecordsEntity
+ {
+ ///
+ /// 记录编号
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 购买物品编号
+ ///
+ [SugarColumn(ColumnName = "F_ReimbursementCategoryId")]
+ public string ReimbursementCategoryId { get; set; }
+
+ ///
+ /// 购买物品名称
+ ///
+ [SugarColumn(ColumnName = "F_ReimbursementCategoryName")]
+ public string ReimbursementCategoryName { get; set; }
+
+ ///
+ /// 单价
+ ///
+ [SugarColumn(ColumnName = "F_UnitPrice")]
+ public decimal UnitPrice { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [SugarColumn(ColumnName = "F_Quantity")]
+ public int? Quantity { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ [SugarColumn(ColumnName = "F_Amount")]
+ public decimal Amount { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ [SugarColumn(ColumnName = "F_Memo")]
+ public string Memo { get; set; }
+
+ ///
+ /// 附件
+ ///
+ [SugarColumn(ColumnName = "F_Attachment")]
+ public string Attachment { get; set; }
+
+ ///
+ /// 购买时间
+ ///
+ [SugarColumn(ColumnName = "F_PurchaseTime")]
+ public DateTime? PurchaseTime { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "F_CreateTime")]
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "F_CreateUser")]
+ public string CreateUser { get; set; }
+
+ ///
+ /// 创建人门店
+ ///
+ [SugarColumn(ColumnName = "F_CreateUserStoreId")]
+ public string CreateUserStoreId { get; set; }
+
+ ///
+ /// 审批状态
+ ///
+ [SugarColumn(ColumnName = "F_ApproveStatus")]
+ public string ApproveStatus { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ [SugarColumn(ColumnName = "F_ApproveUser")]
+ public string ApproveUser { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ [SugarColumn(ColumnName = "F_ApproveTime")]
+ public DateTime? ApproveTime { get; set; }
+
+ ///
+ /// 审批单编号
+ ///
+ [SugarColumn(ColumnName = "F_ApplicationId")]
+ public string ApplicationId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementApplicationEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementApplicationEntity.cs
new file mode 100644
index 0000000..49d2aa3
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementApplicationEntity.cs
@@ -0,0 +1,75 @@
+using NCC.Common.Const;
+using SqlSugar;
+using System;
+
+namespace NCC.Extend.Entitys
+{
+ ///
+ /// 报销申请表
+ ///
+ [SugarTable("lq_reimbursement_application")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqReimbursementApplicationEntity
+ {
+ ///
+ /// 申请编号
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 申请人编号
+ ///
+ [SugarColumn(ColumnName = "F_ApplicationUserId")]
+ public string ApplicationUserId { get; set; }
+
+ ///
+ /// 申请人姓名
+ ///
+ [SugarColumn(ColumnName = "F_ApplicationUserName")]
+ public string ApplicationUserName { get; set; }
+
+ ///
+ /// 申请门店
+ ///
+ [SugarColumn(ColumnName = "F_ApplicationStoreId")]
+ public string ApplicationStoreId { get; set; }
+
+ ///
+ /// 申请时间
+ ///
+ [SugarColumn(ColumnName = "F_ApplicationTime")]
+ public DateTime? ApplicationTime { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ [SugarColumn(ColumnName = "F_Amount")]
+ public string Amount { get; set; }
+
+ ///
+ /// 审批人
+ ///
+ [SugarColumn(ColumnName = "F_ApproveUser")]
+ public string ApproveUser { get; set; }
+
+ ///
+ /// 审批结果
+ ///
+ [SugarColumn(ColumnName = "F_ApproveStatus")]
+ public string ApproveStatus { get; set; }
+
+ ///
+ /// 审批时间
+ ///
+ [SugarColumn(ColumnName = "F_ApproveTime")]
+ public string ApproveTime { get; set; }
+
+ ///
+ /// 关联购买编号
+ ///
+ [SugarColumn(ColumnName = "F_PurchaseRecordsId")]
+ public string PurchaseRecordsId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementCategoryEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementCategoryEntity.cs
new file mode 100644
index 0000000..051a675
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/LqReimbursementCategoryEntity.cs
@@ -0,0 +1,57 @@
+using NCC.Common.Const;
+using SqlSugar;
+using System;
+
+namespace NCC.Extend.Entitys
+{
+ ///
+ /// 报销分类表
+ ///
+ [SugarTable("lq_reimbursement_category")]
+ [Tenant(ClaimConst.TENANT_ID)]
+ public class LqReimbursementCategoryEntity
+ {
+ ///
+ /// 分类编号
+ ///
+ [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 一级名称
+ ///
+ [SugarColumn(ColumnName = "F_Level1Name")]
+ public string Level1Name { get; set; }
+
+ ///
+ /// 二级名称
+ ///
+ [SugarColumn(ColumnName = "F_TypeName")]
+ public string TypeName { get; set; }
+
+ ///
+ /// 权责收付实现
+ ///
+ [SugarColumn(ColumnName = "F_Implement")]
+ public string Implement { get; set; }
+
+ ///
+ /// 费用计入
+ ///
+ [SugarColumn(ColumnName = "F_CostsRecorded")]
+ public string CostsRecorded { get; set; }
+
+ ///
+ /// 一级编号
+ ///
+ [SugarColumn(ColumnName = "F_Level1Code")]
+ public string Level1Code { get; set; }
+
+ ///
+ /// 二级编号
+ ///
+ [SugarColumn(ColumnName = "F_Level2Code")]
+ public string Level2Code { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqPurchaseRecordsMapper.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqPurchaseRecordsMapper.cs
new file mode 100644
index 0000000..2925bf9
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqPurchaseRecordsMapper.cs
@@ -0,0 +1,21 @@
+using NCC.Common.Helper;
+using NCC.Common.Model;
+using NCC.Extend.Entitys.Dto.LqPurchaseRecords;
+using Mapster;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Mapper.LqPurchaseRecords
+{
+ public class Mapper : IRegister
+ {
+ public void Register(TypeAdapterConfig config)
+ {
+ config.ForType()
+ .Map(dest => dest.Attachment, src => src.attachment.ToJson())
+ ;
+ config.ForType()
+ .Map(dest => dest.attachment, src => src.Attachment.ToObject>())
+ ;
+ }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementApplicationMapper.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementApplicationMapper.cs
new file mode 100644
index 0000000..a4650cd
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementApplicationMapper.cs
@@ -0,0 +1,14 @@
+using NCC.Common.Helper;
+using NCC.Extend.Entitys.Dto.LqReimbursementApplication;
+using Mapster;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Mapper.LqReimbursementApplication
+{
+ public class Mapper : IRegister
+ {
+ public void Register(TypeAdapterConfig config)
+ {
+ }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementCategoryMapper.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementCategoryMapper.cs
new file mode 100644
index 0000000..218744a
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqReimbursementCategoryMapper.cs
@@ -0,0 +1,14 @@
+using NCC.Common.Helper;
+using NCC.Extend.Entitys.Dto.LqReimbursementCategory;
+using Mapster;
+using System.Collections.Generic;
+
+namespace NCC.Extend.Entitys.Mapper.LqReimbursementCategory
+{
+ public class Mapper : IRegister
+ {
+ public void Register(TypeAdapterConfig config)
+ {
+ }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqPurchaseRecordsService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqPurchaseRecordsService.cs
new file mode 100644
index 0000000..ee1a27d
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqPurchaseRecordsService.cs
@@ -0,0 +1,6 @@
+namespace NCC.Extend.Interfaces.LqPurchaseRecords
+{
+ public interface ILqPurchaseRecordsService
+ {
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementApplicationService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementApplicationService.cs
new file mode 100644
index 0000000..da3be84
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementApplicationService.cs
@@ -0,0 +1,6 @@
+namespace NCC.Extend.Interfaces.LqReimbursementApplication
+{
+ public interface ILqReimbursementApplicationService
+ {
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementCategoryService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementCategoryService.cs
new file mode 100644
index 0000000..96b87c2
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqReimbursementCategoryService.cs
@@ -0,0 +1,6 @@
+namespace NCC.Extend.Interfaces.LqReimbursementCategory
+{
+ public interface ILqReimbursementCategoryService
+ {
+ }
+}
\ No newline at end of file
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqPurchaseRecordsService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqPurchaseRecordsService.cs
new file mode 100644
index 0000000..2734be1
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqPurchaseRecordsService.cs
@@ -0,0 +1,297 @@
+using NCC.Common.Core.Manager;
+using NCC.Common.Enum;
+using NCC.Common.Extension;
+using NCC.Common.Filter;
+using NCC.Dependency;
+using NCC.DynamicApiController;
+using NCC.FriendlyException;
+using NCC.Extend.Interfaces.LqPurchaseRecords;
+using Mapster;
+using Microsoft.AspNetCore.Mvc;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using NCC.Extend.Entitys;
+using NCC.Extend.Entitys.Dto.LqPurchaseRecords;
+using Yitter.IdGenerator;
+using NCC.Common.Helper;
+using NCC.JsonSerialization;
+using NCC.Common.Model.NPOI;
+using NCC.Common.Configuration;
+using NCC.DataEncryption;
+using NCC.ClayObject;
+
+namespace NCC.Extend.LqPurchaseRecords
+{
+ ///
+ /// 购买记录表服务
+ ///
+ [ApiDescriptionSettings(Tag = "Extend",Name = "LqPurchaseRecords", Order = 200)]
+ [Route("api/Extend/[controller]")]
+ public class LqPurchaseRecordsService : ILqPurchaseRecordsService, IDynamicApiController, ITransient
+ {
+ private readonly ISqlSugarRepository _lqPurchaseRecordsRepository;
+ private readonly SqlSugarScope _db;
+ private readonly IUserManager _userManager;
+
+ ///
+ /// 初始化一个类型的新实例
+ ///
+ public LqPurchaseRecordsService(
+ ISqlSugarRepository lqPurchaseRecordsRepository,
+ IUserManager userManager)
+ {
+ _lqPurchaseRecordsRepository = lqPurchaseRecordsRepository;
+ _db = _lqPurchaseRecordsRepository.Context;
+ _userManager = userManager;
+ }
+
+ ///
+ /// 获取购买记录表
+ ///
+ /// 参数
+ ///
+ [HttpGet("{id}")]
+ public async Task GetInfo(string id)
+ {
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ var output = entity.Adapt();
+ return output;
+ }
+
+ ///
+ /// 获取购买记录表列表
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("")]
+ public async Task GetList([FromQuery] LqPurchaseRecordsListQueryInput input)
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+ List queryPurchaseTime = input.purchaseTime != null ? input.purchaseTime.Split(',').ToObeject>() : null;
+ DateTime? startPurchaseTime = queryPurchaseTime != null ? Ext.GetDateTime(queryPurchaseTime.First()) : null;
+ DateTime? endPurchaseTime = queryPurchaseTime != null ? Ext.GetDateTime(queryPurchaseTime.Last()) : null;
+ List queryCreateTime = input.createTime != null ? input.createTime.Split(',').ToObeject>() : null;
+ DateTime? startCreateTime = queryCreateTime != null ? Ext.GetDateTime(queryCreateTime.First()) : null;
+ DateTime? endCreateTime = queryCreateTime != null ? Ext.GetDateTime(queryCreateTime.Last()) : null;
+ List queryApproveTime = input.approveTime != null ? input.approveTime.Split(',').ToObeject>() : null;
+ DateTime? startApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.First()) : null;
+ DateTime? endApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.Last()) : null;
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
+ .WhereIF(!string.IsNullOrEmpty(input.reimbursementCategoryId), p => p.ReimbursementCategoryId.Contains(input.reimbursementCategoryId))
+ .WhereIF(!string.IsNullOrEmpty(input.reimbursementCategoryName), p => p.ReimbursementCategoryName.Contains(input.reimbursementCategoryName))
+ .WhereIF(!string.IsNullOrEmpty(input.unitPrice), p => p.UnitPrice.Equals(input.unitPrice))
+ .WhereIF(!string.IsNullOrEmpty(input.quantity), p => p.Quantity.Equals(input.quantity))
+ .WhereIF(!string.IsNullOrEmpty(input.amount), p => p.Amount.Equals(input.amount))
+ .WhereIF(!string.IsNullOrEmpty(input.memo), p => p.Memo.Contains(input.memo))
+ .WhereIF(queryPurchaseTime != null, p => p.PurchaseTime >= new DateTime(startPurchaseTime.ToDate().Year, startPurchaseTime.ToDate().Month, startPurchaseTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryPurchaseTime != null, p => p.PurchaseTime <= new DateTime(endPurchaseTime.ToDate().Year, endPurchaseTime.ToDate().Month, endPurchaseTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(queryCreateTime != null, p => p.CreateTime >= new DateTime(startCreateTime.ToDate().Year, startCreateTime.ToDate().Month, startCreateTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryCreateTime != null, p => p.CreateTime <= new DateTime(endCreateTime.ToDate().Year, endCreateTime.ToDate().Month, endCreateTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.createUser), p => p.CreateUser.Equals(input.createUser))
+ .WhereIF(!string.IsNullOrEmpty(input.createUserStoreId), p => p.CreateUserStoreId.Contains(input.createUserStoreId))
+ .WhereIF(!string.IsNullOrEmpty(input.approveStatus), p => p.ApproveStatus.Contains(input.approveStatus))
+ .WhereIF(!string.IsNullOrEmpty(input.approveUser), p => p.ApproveUser.Equals(input.approveUser))
+ .WhereIF(queryApproveTime != null, p => p.ApproveTime >= new DateTime(startApproveTime.ToDate().Year, startApproveTime.ToDate().Month, startApproveTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryApproveTime != null, p => p.ApproveTime <= new DateTime(endApproveTime.ToDate().Year, endApproveTime.ToDate().Month, endApproveTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationId), p => p.ApplicationId.Contains(input.applicationId))
+ .Select(it=> new LqPurchaseRecordsListOutput
+ {
+ id = it.Id,
+ reimbursementCategoryId=it.ReimbursementCategoryId,
+ reimbursementCategoryName=it.ReimbursementCategoryName,
+ unitPrice=it.UnitPrice,
+ quantity=it.Quantity,
+ amount=it.Amount,
+ memo=it.Memo,
+ purchaseTime=it.PurchaseTime,
+ createTime=it.CreateTime,
+ createUser=it.CreateUser,
+ createUserStoreId=it.CreateUserStoreId,
+ approveStatus=it.ApproveStatus,
+ approveUser=it.ApproveUser,
+ approveTime=it.ApproveTime,
+ applicationId=it.ApplicationId,
+ }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+
+ ///
+ /// 新建购买记录表
+ ///
+ /// 参数
+ ///
+ [HttpPost("")]
+ public async Task Create([FromBody] LqPurchaseRecordsCrInput input)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var entity = input.Adapt();
+ entity.Id = YitIdHelper.NextId().ToString();
+ var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+ }
+
+ ///
+ /// 获取购买记录表无分页列表
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("Actions/GetNoPagingList")]
+ public async Task GetNoPagingList([FromQuery] LqPurchaseRecordsListQueryInput input)
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+ List queryPurchaseTime = input.purchaseTime != null ? input.purchaseTime.Split(',').ToObeject>() : null;
+ DateTime? startPurchaseTime = queryPurchaseTime != null ? Ext.GetDateTime(queryPurchaseTime.First()) : null;
+ DateTime? endPurchaseTime = queryPurchaseTime != null ? Ext.GetDateTime(queryPurchaseTime.Last()) : null;
+ List queryCreateTime = input.createTime != null ? input.createTime.Split(',').ToObeject>() : null;
+ DateTime? startCreateTime = queryCreateTime != null ? Ext.GetDateTime(queryCreateTime.First()) : null;
+ DateTime? endCreateTime = queryCreateTime != null ? Ext.GetDateTime(queryCreateTime.Last()) : null;
+ List queryApproveTime = input.approveTime != null ? input.approveTime.Split(',').ToObeject>() : null;
+ DateTime? startApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.First()) : null;
+ DateTime? endApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.Last()) : null;
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
+ .WhereIF(!string.IsNullOrEmpty(input.reimbursementCategoryId), p => p.ReimbursementCategoryId.Contains(input.reimbursementCategoryId))
+ .WhereIF(!string.IsNullOrEmpty(input.reimbursementCategoryName), p => p.ReimbursementCategoryName.Contains(input.reimbursementCategoryName))
+ .WhereIF(!string.IsNullOrEmpty(input.unitPrice), p => p.UnitPrice.Equals(input.unitPrice))
+ .WhereIF(!string.IsNullOrEmpty(input.quantity), p => p.Quantity.Equals(input.quantity))
+ .WhereIF(!string.IsNullOrEmpty(input.amount), p => p.Amount.Equals(input.amount))
+ .WhereIF(!string.IsNullOrEmpty(input.memo), p => p.Memo.Contains(input.memo))
+ .WhereIF(queryPurchaseTime != null, p => p.PurchaseTime >= new DateTime(startPurchaseTime.ToDate().Year, startPurchaseTime.ToDate().Month, startPurchaseTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryPurchaseTime != null, p => p.PurchaseTime <= new DateTime(endPurchaseTime.ToDate().Year, endPurchaseTime.ToDate().Month, endPurchaseTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(queryCreateTime != null, p => p.CreateTime >= new DateTime(startCreateTime.ToDate().Year, startCreateTime.ToDate().Month, startCreateTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryCreateTime != null, p => p.CreateTime <= new DateTime(endCreateTime.ToDate().Year, endCreateTime.ToDate().Month, endCreateTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.createUser), p => p.CreateUser.Equals(input.createUser))
+ .WhereIF(!string.IsNullOrEmpty(input.createUserStoreId), p => p.CreateUserStoreId.Contains(input.createUserStoreId))
+ .WhereIF(!string.IsNullOrEmpty(input.approveStatus), p => p.ApproveStatus.Contains(input.approveStatus))
+ .WhereIF(!string.IsNullOrEmpty(input.approveUser), p => p.ApproveUser.Equals(input.approveUser))
+ .WhereIF(queryApproveTime != null, p => p.ApproveTime >= new DateTime(startApproveTime.ToDate().Year, startApproveTime.ToDate().Month, startApproveTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryApproveTime != null, p => p.ApproveTime <= new DateTime(endApproveTime.ToDate().Year, endApproveTime.ToDate().Month, endApproveTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationId), p => p.ApplicationId.Contains(input.applicationId))
+ .Select(it=> new LqPurchaseRecordsListOutput
+ {
+ id = it.Id,
+ reimbursementCategoryId=it.ReimbursementCategoryId,
+ reimbursementCategoryName=it.ReimbursementCategoryName,
+ unitPrice=it.UnitPrice,
+ quantity=it.Quantity,
+ amount=it.Amount,
+ memo=it.Memo,
+ purchaseTime=it.PurchaseTime,
+ createTime=it.CreateTime,
+ createUser=it.CreateUser,
+ createUserStoreId=it.CreateUserStoreId,
+ approveStatus=it.ApproveStatus,
+ approveUser=it.ApproveUser,
+ approveTime=it.ApproveTime,
+ applicationId=it.ApplicationId,
+ }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync();
+ return data;
+ }
+
+ ///
+ /// 导出购买记录表
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("Actions/Export")]
+ public async Task Export([FromQuery] LqPurchaseRecordsListQueryInput input)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var exportData = new List();
+ if (input.dataType == 0)
+ {
+ var data = Clay.Object(await this.GetList(input));
+ exportData = data.Solidify>().list;
+ }
+ else
+ {
+ exportData = await this.GetNoPagingList(input);
+ }
+ List paramList = "[{\"value\":\"记录编号\",\"field\":\"id\"},{\"value\":\"购买物品编号\",\"field\":\"reimbursementCategoryId\"},{\"value\":\"购买物品名称\",\"field\":\"reimbursementCategoryName\"},{\"value\":\"单价\",\"field\":\"unitPrice\"},{\"value\":\"数量\",\"field\":\"quantity\"},{\"value\":\"总金额\",\"field\":\"amount\"},{\"value\":\"备注说明\",\"field\":\"memo\"},{\"value\":\"购买时间\",\"field\":\"purchaseTime\"},{\"value\":\"创建时间\",\"field\":\"createTime\"},{\"value\":\"创建人\",\"field\":\"createUser\"},{\"value\":\"创建人门店\",\"field\":\"createUserStoreId\"},{\"value\":\"审批状态\",\"field\":\"approveStatus\"},{\"value\":\"审批人\",\"field\":\"approveUser\"},{\"value\":\"审批时间\",\"field\":\"approveTime\"},{\"value\":\"审批单编号\",\"field\":\"applicationId\"},]".ToList();
+ ExcelConfig excelconfig = new ExcelConfig();
+ excelconfig.FileName = "购买记录表.xls";
+ excelconfig.HeadFont = "微软雅黑";
+ excelconfig.HeadPoint = 10;
+ excelconfig.IsAllSizeColumn = true;
+ excelconfig.ColumnModel = new List();
+ List selectKeyList = input.selectKey.Split(',').ToList();
+ foreach (var item in selectKeyList)
+ {
+ var isExist = paramList.Find(p => p.field == item);
+ if (isExist != null)
+ {
+ excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value });
+ }
+ }
+ var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;
+ ExcelExportHelper.Export(exportData, excelconfig, addPath);
+ var fileName = _userManager.UserId + "|" + addPath + "|xls";
+ var output = new
+ {
+ name = excelconfig.FileName,
+ url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC")
+ };
+ return output;
+ }
+
+ ///
+ /// 批量删除购买记录表
+ ///
+ /// 主键数组
+ ///
+ [HttpPost("batchRemove")]
+ public async Task BatchRemove([FromBody] List ids)
+ {
+ var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync();
+ if (entitys.Count > 0)
+ {
+ try
+ {
+ //开启事务
+ _db.BeginTran();
+ //批量删除购买记录表
+ await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync();
+ //关闭事务
+ _db.CommitTran();
+ }
+ catch (Exception)
+ {
+ //回滚事务
+ _db.RollbackTran();
+ throw NCCException.Oh(ErrorCode.COM1002);
+ }
+ }
+ }
+
+ ///
+ /// 更新购买记录表
+ ///
+ /// 主键
+ /// 参数
+ ///
+ [HttpPut("{id}")]
+ public async Task Update(string id, [FromBody] LqPurchaseRecordsUpInput input)
+ {
+ var entity = input.Adapt();
+ var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
+ }
+
+ ///
+ /// 删除购买记录表
+ ///
+ ///
+ [HttpDelete("{id}")]
+ public async Task Delete(string id)
+ {
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
+ var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);
+ }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementApplicationService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementApplicationService.cs
new file mode 100644
index 0000000..74cac8d
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementApplicationService.cs
@@ -0,0 +1,476 @@
+using NCC.Common.Core.Manager;
+using NCC.Common.Enum;
+using NCC.Common.Extension;
+using NCC.Common.Filter;
+using NCC.Dependency;
+using NCC.DynamicApiController;
+using NCC.FriendlyException;
+using NCC.Extend.Interfaces.LqReimbursementApplication;
+using Mapster;
+using Microsoft.AspNetCore.Mvc;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using NCC.Extend.Entitys;
+using NCC.Extend.Entitys.Dto.LqReimbursementApplication;
+using Yitter.IdGenerator;
+using NCC.Common.Helper;
+using NCC.JsonSerialization;
+using NCC.Common.Model.NPOI;
+using NCC.Common.Configuration;
+using NCC.DataEncryption;
+using NCC.ClayObject;
+
+namespace NCC.Extend.LqReimbursementApplication
+{
+ ///
+ /// 报销申请表服务
+ ///
+ [ApiDescriptionSettings(Tag = "Extend",Name = "LqReimbursementApplication", Order = 200)]
+ [Route("api/Extend/[controller]")]
+ public class LqReimbursementApplicationService : ILqReimbursementApplicationService, IDynamicApiController, ITransient
+ {
+ private readonly ISqlSugarRepository _lqReimbursementApplicationRepository;
+ private readonly SqlSugarScope _db;
+ private readonly IUserManager _userManager;
+
+ ///
+ /// 初始化一个类型的新实例
+ ///
+ public LqReimbursementApplicationService(
+ ISqlSugarRepository lqReimbursementApplicationRepository,
+ IUserManager userManager)
+ {
+ _lqReimbursementApplicationRepository = lqReimbursementApplicationRepository;
+ _db = _lqReimbursementApplicationRepository.Context;
+ _userManager = userManager;
+ }
+
+ ///
+ /// 获取报销申请表
+ ///
+ /// 参数
+ ///
+ [HttpGet("{id}")]
+ public async Task GetInfo(string id)
+ {
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ var output = entity.Adapt();
+ return output;
+ }
+
+ ///
+ /// 获取报销申请表列表
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("")]
+ public async Task GetList([FromQuery] LqReimbursementApplicationListQueryInput input)
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+ List queryApplicationTime = input.applicationTime != null ? input.applicationTime.Split(',').ToObeject>() : null;
+ DateTime? startApplicationTime = queryApplicationTime != null ? Ext.GetDateTime(queryApplicationTime.First()) : null;
+ DateTime? endApplicationTime = queryApplicationTime != null ? Ext.GetDateTime(queryApplicationTime.Last()) : null;
+ List queryApproveTime = input.approveTime != null ? input.approveTime.Split(',').ToObeject>() : null;
+ DateTime? startApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.First()) : null;
+ DateTime? endApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.Last()) : null;
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationUserId), p => p.ApplicationUserId.Contains(input.applicationUserId))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationUserName), p => p.ApplicationUserName.Contains(input.applicationUserName))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationStoreId), p => p.ApplicationStoreId.Contains(input.applicationStoreId))
+ .WhereIF(queryApplicationTime != null, p => p.ApplicationTime >= new DateTime(startApplicationTime.ToDate().Year, startApplicationTime.ToDate().Month, startApplicationTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryApplicationTime != null, p => p.ApplicationTime <= new DateTime(endApplicationTime.ToDate().Year, endApplicationTime.ToDate().Month, endApplicationTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.amount), p => p.Amount.Contains(input.amount))
+ .WhereIF(!string.IsNullOrEmpty(input.approveUser), p => p.ApproveUser.Equals(input.approveUser))
+ .WhereIF(!string.IsNullOrEmpty(input.approveStatus), p => p.ApproveStatus.Contains(input.approveStatus))
+ // .WhereIF(queryApproveTime != null, p => p.ApproveTime >= new DateTime(startApproveTime.ToDate().Year, startApproveTime.ToDate().Month, startApproveTime.ToDate().Day, 0, 0, 0))
+ //.WhereIF(queryApproveTime != null, p => p.ApproveTime <= new DateTime(endApproveTime.ToDate().Year, endApproveTime.ToDate().Month, endApproveTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.purchaseRecordsId), p => p.PurchaseRecordsId.Contains(input.purchaseRecordsId))
+ .Select(it=> new LqReimbursementApplicationListOutput
+ {
+ id = it.Id,
+ applicationUserId=it.ApplicationUserId,
+ applicationUserName=it.ApplicationUserName,
+ applicationStoreId=it.ApplicationStoreId,
+ applicationTime=it.ApplicationTime,
+ amount=it.Amount,
+ approveUser=it.ApproveUser,
+ approveStatus=it.ApproveStatus,
+ approveTime=it.ApproveTime,
+ purchaseRecordsId=it.PurchaseRecordsId,
+ }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+
+ ///
+ /// 新建报销申请表
+ ///
+ /// 参数
+ ///
+ [HttpPost("")]
+ public async Task Create([FromBody] LqReimbursementApplicationCrInput input)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var entity = input.Adapt();
+ entity.Id = YitIdHelper.NextId().ToString();
+
+ try
+ {
+ //开启事务
+ _db.BeginTran();
+
+ // 保存报销申请表
+ var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+
+ // 更新购买记录的审批单编号和审批状态为"待审批"
+ if (input.selectedPurchaseRecordIds != null && input.selectedPurchaseRecordIds.Count > 0)
+ {
+ // 先更新ApplicationId
+ await _db.Updateable()
+ .SetColumns(it => it.ApplicationId == entity.Id)
+ .Where(it => input.selectedPurchaseRecordIds.Contains(it.Id))
+ .ExecuteCommandAsync();
+
+ // 再更新ApproveStatus(分开更新确保都能执行)
+ await _db.Updateable()
+ .SetColumns(it => it.ApproveStatus == "待审批")
+ .Where(it => input.selectedPurchaseRecordIds.Contains(it.Id))
+ .ExecuteCommandAsync();
+ }
+
+ //关闭事务
+ _db.CommitTran();
+ }
+ catch (Exception)
+ {
+ //回滚事务
+ _db.RollbackTran();
+ throw;
+ }
+ }
+
+ ///
+ /// 获取报销申请表无分页列表
+ ///
+ /// 请求参数
+ ///
+ [NonAction]
+ public async Task GetNoPagingList([FromQuery] LqReimbursementApplicationListQueryInput input)
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+ List queryApplicationTime = input.applicationTime != null ? input.applicationTime.Split(',').ToObeject>() : null;
+ DateTime? startApplicationTime = queryApplicationTime != null ? Ext.GetDateTime(queryApplicationTime.First()) : null;
+ DateTime? endApplicationTime = queryApplicationTime != null ? Ext.GetDateTime(queryApplicationTime.Last()) : null;
+ List queryApproveTime = input.approveTime != null ? input.approveTime.Split(',').ToObeject>() : null;
+ DateTime? startApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.First()) : null;
+ DateTime? endApproveTime = queryApproveTime != null ? Ext.GetDateTime(queryApproveTime.Last()) : null;
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationUserId), p => p.ApplicationUserId.Contains(input.applicationUserId))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationUserName), p => p.ApplicationUserName.Contains(input.applicationUserName))
+ .WhereIF(!string.IsNullOrEmpty(input.applicationStoreId), p => p.ApplicationStoreId.Contains(input.applicationStoreId))
+ .WhereIF(queryApplicationTime != null, p => p.ApplicationTime >= new DateTime(startApplicationTime.ToDate().Year, startApplicationTime.ToDate().Month, startApplicationTime.ToDate().Day, 0, 0, 0))
+ .WhereIF(queryApplicationTime != null, p => p.ApplicationTime <= new DateTime(endApplicationTime.ToDate().Year, endApplicationTime.ToDate().Month, endApplicationTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.amount), p => p.Amount.Contains(input.amount))
+ .WhereIF(!string.IsNullOrEmpty(input.approveUser), p => p.ApproveUser.Equals(input.approveUser))
+ .WhereIF(!string.IsNullOrEmpty(input.approveStatus), p => p.ApproveStatus.Contains(input.approveStatus))
+ // .WhereIF(queryApproveTime != null, p => p.ApproveTime >= new DateTime(startApproveTime.ToDate().Year, startApproveTime.ToDate().Month, startApproveTime.ToDate().Day, 0, 0, 0))
+ // .WhereIF(queryApproveTime != null, p => p.ApproveTime <= new DateTime(endApproveTime.ToDate().Year, endApproveTime.ToDate().Month, endApproveTime.ToDate().Day, 23, 59, 59))
+ .WhereIF(!string.IsNullOrEmpty(input.purchaseRecordsId), p => p.PurchaseRecordsId.Contains(input.purchaseRecordsId))
+ .Select(it=> new LqReimbursementApplicationListOutput
+ {
+ id = it.Id,
+ applicationUserId=it.ApplicationUserId,
+ applicationUserName=it.ApplicationUserName,
+ applicationStoreId=it.ApplicationStoreId,
+ applicationTime=it.ApplicationTime,
+ amount=it.Amount,
+ approveUser=it.ApproveUser,
+ approveStatus=it.ApproveStatus,
+ approveTime=it.ApproveTime,
+ purchaseRecordsId=it.PurchaseRecordsId,
+ }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync();
+ return data;
+ }
+
+ ///
+ /// 导出报销申请表
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("Actions/Export")]
+ public async Task Export([FromQuery] LqReimbursementApplicationListQueryInput input)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var exportData = new List();
+ if (input.dataType == 0)
+ {
+ var data = Clay.Object(await this.GetList(input));
+ exportData = data.Solidify>().list;
+ }
+ else
+ {
+ exportData = await this.GetNoPagingList(input);
+ }
+ List paramList = "[{\"value\":\"申请编号\",\"field\":\"id\"},{\"value\":\"申请人编号\",\"field\":\"applicationUserId\"},{\"value\":\"申请人姓名\",\"field\":\"applicationUserName\"},{\"value\":\"申请门店\",\"field\":\"applicationStoreId\"},{\"value\":\"申请时间\",\"field\":\"applicationTime\"},{\"value\":\"总金额\",\"field\":\"amount\"},{\"value\":\"审批人\",\"field\":\"approveUser\"},{\"value\":\"审批结果\",\"field\":\"approveStatus\"},{\"value\":\"审批时间\",\"field\":\"approveTime\"},{\"value\":\"关联购买编号\",\"field\":\"purchaseRecordsId\"},]".ToList();
+ ExcelConfig excelconfig = new ExcelConfig();
+ excelconfig.FileName = "报销申请表.xls";
+ excelconfig.HeadFont = "微软雅黑";
+ excelconfig.HeadPoint = 10;
+ excelconfig.IsAllSizeColumn = true;
+ excelconfig.ColumnModel = new List();
+ List selectKeyList = input.selectKey.Split(',').ToList();
+ foreach (var item in selectKeyList)
+ {
+ var isExist = paramList.Find(p => p.field == item);
+ if (isExist != null)
+ {
+ excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value });
+ }
+ }
+ var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;
+ ExcelExportHelper.Export(exportData, excelconfig, addPath);
+ var fileName = _userManager.UserId + "|" + addPath + "|xls";
+ var output = new
+ {
+ name = excelconfig.FileName,
+ url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC")
+ };
+ return output;
+ }
+
+ ///
+ /// 批量删除报销申请表
+ ///
+ /// 主键数组
+ ///
+ [HttpPost("batchRemove")]
+ public async Task BatchRemove([FromBody] List ids)
+ {
+ var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync();
+ if (entitys.Count > 0)
+ {
+ try
+ {
+ //开启事务
+ _db.BeginTran();
+ //批量删除报销申请表
+ await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync();
+ //关闭事务
+ _db.CommitTran();
+ }
+ catch (Exception)
+ {
+ //回滚事务
+ _db.RollbackTran();
+ throw NCCException.Oh(ErrorCode.COM1002);
+ }
+ }
+ }
+
+ ///
+ /// 更新报销申请表
+ ///
+ /// 主键
+ /// 参数
+ ///
+ [HttpPut("{id}")]
+ public async Task Update(string id, [FromBody] LqReimbursementApplicationUpInput input)
+ {
+ try
+ {
+ //开启事务
+ _db.BeginTran();
+
+ // 获取原有的关联购买记录ID
+ var oldEntity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ var oldIds = new List();
+ if (oldEntity != null && !string.IsNullOrEmpty(oldEntity.PurchaseRecordsId))
+ {
+ // 获取原有购买记录ID列表
+ oldIds = oldEntity.PurchaseRecordsId.Split(',').Where(x => !string.IsNullOrEmpty(x)).ToList();
+ }
+
+ // 获取新的购买记录ID列表
+ var newIds = input.selectedPurchaseRecordIds ?? new List();
+
+ // 确保 purchaseRecordsId 字段包含所有选中的记录ID(逗号分隔)
+ if (newIds.Count > 0)
+ {
+ input.purchaseRecordsId = string.Join(",", newIds);
+ }
+ else
+ {
+ input.purchaseRecordsId = null;
+ }
+
+ // 找出需要移除关联的记录(在旧列表中但不在新列表中)
+ var idsToRemove = oldIds.Where(x => !newIds.Contains(x)).ToList();
+ if (idsToRemove.Count > 0)
+ {
+ // 清除这些购买记录的审批单编号和审批状态
+ await _db.Updateable()
+ .SetColumns(it => new LqPurchaseRecordsEntity
+ {
+ ApplicationId = null,
+ ApproveStatus = "未审批"
+ })
+ .Where(it => idsToRemove.Contains(it.Id))
+ .ExecuteCommandAsync();
+ }
+
+ // 更新报销申请表(确保 purchaseRecordsId 字段被正确更新)
+ var entity = input.Adapt();
+ var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
+
+ // 更新所有选中的购买记录的审批单编号和审批状态为"待审批"
+ // 包括新追加的记录和已存在的记录(确保状态正确)
+ if (newIds.Count > 0)
+ {
+ // 先更新ApplicationId
+ await _db.Updateable()
+ .SetColumns(it => it.ApplicationId == id)
+ .Where(it => newIds.Contains(it.Id))
+ .ExecuteCommandAsync();
+
+ // 再更新ApproveStatus(分开更新确保都能执行)
+ await _db.Updateable()
+ .SetColumns(it => it.ApproveStatus == "待审批")
+ .Where(it => newIds.Contains(it.Id))
+ .ExecuteCommandAsync();
+ }
+
+ //关闭事务
+ _db.CommitTran();
+ }
+ catch (Exception)
+ {
+ //回滚事务
+ _db.RollbackTran();
+ throw;
+ }
+ }
+
+ ///
+ /// 删除报销申请表
+ ///
+ ///
+ [HttpDelete("{id}")]
+ public async Task Delete(string id)
+ {
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
+ var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);
+ }
+
+ ///
+ /// 通过审批
+ ///
+ /// 申请编号
+ ///
+ [HttpPost("{id}/Actions/Approve")]
+ public async Task Approve(string id)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
+
+ try
+ {
+ //开启事务
+ _db.BeginTran();
+
+ // 更新申请表的审批状态
+ entity.ApproveStatus = "已审批";
+ entity.ApproveTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ entity.ApproveUser = userInfo.userId;
+ await _db.Updateable(entity).ExecuteCommandAsync();
+
+ // 更新关联的购买记录
+ if (!string.IsNullOrEmpty(entity.PurchaseRecordsId))
+ {
+ var purchaseIds = entity.PurchaseRecordsId.Split(',').Where(x => !string.IsNullOrEmpty(x)).ToList();
+ if (purchaseIds.Count > 0)
+ {
+ await _db.Updateable()
+ .SetColumns(it => new LqPurchaseRecordsEntity
+ {
+ ApproveStatus = "已审批",
+ ApproveTime = DateTime.Now,
+ ApproveUser = userInfo.userId
+ })
+ .Where(it => purchaseIds.Contains(it.Id))
+ .ExecuteCommandAsync();
+ }
+ }
+
+ //关闭事务
+ _db.CommitTran();
+ }
+ catch (Exception)
+ {
+ //回滚事务
+ _db.RollbackTran();
+ throw;
+ }
+ }
+
+ ///
+ /// 拒绝审批
+ ///
+ /// 申请编号
+ ///
+ [HttpPost("{id}/Actions/Reject")]
+ public async Task Reject(string id)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
+
+ try
+ {
+ //开启事务
+ _db.BeginTran();
+
+ // 更新申请表的审批状态
+ entity.ApproveStatus = "未通过";
+ entity.ApproveTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ entity.ApproveUser = userInfo.userId;
+ await _db.Updateable(entity).ExecuteCommandAsync();
+
+ // 更新关联的购买记录
+ if (!string.IsNullOrEmpty(entity.PurchaseRecordsId))
+ {
+ var purchaseIds = entity.PurchaseRecordsId.Split(',').Where(x => !string.IsNullOrEmpty(x)).ToList();
+ if (purchaseIds.Count > 0)
+ {
+ await _db.Updateable()
+ .SetColumns(it => new LqPurchaseRecordsEntity
+ {
+ ApproveStatus = "未通过",
+ ApproveTime = DateTime.Now,
+ ApproveUser = userInfo.userId
+ })
+ .Where(it => purchaseIds.Contains(it.Id))
+ .ExecuteCommandAsync();
+ }
+ }
+
+ //关闭事务
+ _db.CommitTran();
+ }
+ catch (Exception)
+ {
+ //回滚事务
+ _db.RollbackTran();
+ throw;
+ }
+ }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementCategoryService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementCategoryService.cs
new file mode 100644
index 0000000..a2634f3
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqReimbursementCategoryService.cs
@@ -0,0 +1,241 @@
+using NCC.Common.Core.Manager;
+using NCC.Common.Enum;
+using NCC.Common.Extension;
+using NCC.Common.Filter;
+using NCC.Dependency;
+using NCC.DynamicApiController;
+using NCC.FriendlyException;
+using NCC.Extend.Interfaces.LqReimbursementCategory;
+using Mapster;
+using Microsoft.AspNetCore.Mvc;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using NCC.Extend.Entitys;
+using NCC.Extend.Entitys.Dto.LqReimbursementCategory;
+using Yitter.IdGenerator;
+using NCC.Common.Helper;
+using NCC.JsonSerialization;
+using NCC.Common.Model.NPOI;
+using NCC.Common.Configuration;
+using NCC.DataEncryption;
+using NCC.ClayObject;
+
+namespace NCC.Extend.LqReimbursementCategory
+{
+ ///
+ /// 报销分类表服务
+ ///
+ [ApiDescriptionSettings(Tag = "Extend",Name = "LqReimbursementCategory", Order = 200)]
+ [Route("api/Extend/[controller]")]
+ public class LqReimbursementCategoryService : ILqReimbursementCategoryService, IDynamicApiController, ITransient
+ {
+ private readonly ISqlSugarRepository _lqReimbursementCategoryRepository;
+ private readonly SqlSugarScope _db;
+ private readonly IUserManager _userManager;
+
+ ///
+ /// 初始化一个类型的新实例
+ ///
+ public LqReimbursementCategoryService(
+ ISqlSugarRepository lqReimbursementCategoryRepository,
+ IUserManager userManager)
+ {
+ _lqReimbursementCategoryRepository = lqReimbursementCategoryRepository;
+ _db = _lqReimbursementCategoryRepository.Context;
+ _userManager = userManager;
+ }
+
+ ///
+ /// 获取报销分类表
+ ///
+ /// 参数
+ ///
+ [HttpGet("{id}")]
+ public async Task GetInfo(string id)
+ {
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ var output = entity.Adapt();
+ return output;
+ }
+
+ ///
+ /// 获取报销分类表列表
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("")]
+ public async Task GetList([FromQuery] LqReimbursementCategoryListQueryInput input)
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
+ .WhereIF(!string.IsNullOrEmpty(input.level1Name), p => p.Level1Name.Contains(input.level1Name))
+ .WhereIF(!string.IsNullOrEmpty(input.typeName), p => p.TypeName.Contains(input.typeName))
+ .WhereIF(!string.IsNullOrEmpty(input.implement), p => p.Implement.Contains(input.implement))
+ .WhereIF(!string.IsNullOrEmpty(input.costsRecorded), p => p.CostsRecorded.Contains(input.costsRecorded))
+ .WhereIF(!string.IsNullOrEmpty(input.level1Code), p => p.Level1Code.Contains(input.level1Code))
+ .WhereIF(!string.IsNullOrEmpty(input.level2Code), p => p.Level2Code.Contains(input.level2Code))
+ .Select(it=> new LqReimbursementCategoryListOutput
+ {
+ id = it.Id,
+ level1Name=it.Level1Name,
+ typeName=it.TypeName,
+ implement=it.Implement,
+ costsRecorded=it.CostsRecorded,
+ level1Code=it.Level1Code,
+ level2Code=it.Level2Code,
+ }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
+ return PageResult.SqlSugarPageResult(data);
+ }
+
+ ///
+ /// 新建报销分类表
+ ///
+ /// 参数
+ ///
+ [HttpPost("")]
+ public async Task Create([FromBody] LqReimbursementCategoryCrInput input)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var entity = input.Adapt();
+ entity.Id = YitIdHelper.NextId().ToString();
+ var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
+ }
+
+ ///
+ /// 获取报销分类表无分页列表(用于下拉选择)
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("Actions/GetNoPagingList")]
+ public async Task GetNoPagingList([FromQuery] LqReimbursementCategoryListQueryInput input)
+ {
+ var sidx = input.sidx == null ? "id" : input.sidx;
+ var data = await _db.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
+ .WhereIF(!string.IsNullOrEmpty(input.level1Name), p => p.Level1Name.Contains(input.level1Name))
+ .WhereIF(!string.IsNullOrEmpty(input.typeName), p => p.TypeName.Contains(input.typeName))
+ .WhereIF(!string.IsNullOrEmpty(input.implement), p => p.Implement.Contains(input.implement))
+ .WhereIF(!string.IsNullOrEmpty(input.costsRecorded), p => p.CostsRecorded.Contains(input.costsRecorded))
+ .WhereIF(!string.IsNullOrEmpty(input.level1Code), p => p.Level1Code.Contains(input.level1Code))
+ .WhereIF(!string.IsNullOrEmpty(input.level2Code), p => p.Level2Code.Contains(input.level2Code))
+ .Select(it=> new LqReimbursementCategoryListOutput
+ {
+ id = it.Id,
+ level1Name=it.Level1Name,
+ typeName=it.TypeName,
+ implement=it.Implement,
+ costsRecorded=it.CostsRecorded,
+ level1Code=it.Level1Code,
+ level2Code=it.Level2Code,
+ }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync();
+ return data;
+ }
+
+ ///
+ /// 导出报销分类表
+ ///
+ /// 请求参数
+ ///
+ [HttpGet("Actions/Export")]
+ public async Task Export([FromQuery] LqReimbursementCategoryListQueryInput input)
+ {
+ var userInfo = await _userManager.GetUserInfo();
+ var exportData = new List();
+ if (input.dataType == 0)
+ {
+ var data = Clay.Object(await this.GetList(input));
+ exportData = data.Solidify>().list;
+ }
+ else
+ {
+ exportData = await this.GetNoPagingList(input);
+ }
+ List paramList = "[{\"value\":\"分类编号\",\"field\":\"id\"},{\"value\":\"一级名称\",\"field\":\"level1Name\"},{\"value\":\"二级名称\",\"field\":\"typeName\"},{\"value\":\"权责收付实现\",\"field\":\"implement\"},{\"value\":\"费用计入\",\"field\":\"costsRecorded\"},{\"value\":\"一级编号\",\"field\":\"level1Code\"},{\"value\":\"二级编号\",\"field\":\"level2Code\"},]".ToList();
+ ExcelConfig excelconfig = new ExcelConfig();
+ excelconfig.FileName = "报销分类表.xls";
+ excelconfig.HeadFont = "微软雅黑";
+ excelconfig.HeadPoint = 10;
+ excelconfig.IsAllSizeColumn = true;
+ excelconfig.ColumnModel = new List();
+ List selectKeyList = input.selectKey.Split(',').ToList();
+ foreach (var item in selectKeyList)
+ {
+ var isExist = paramList.Find(p => p.field == item);
+ if (isExist != null)
+ {
+ excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value });
+ }
+ }
+ var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;
+ ExcelExportHelper.Export(exportData, excelconfig, addPath);
+ var fileName = _userManager.UserId + "|" + addPath + "|xls";
+ var output = new
+ {
+ name = excelconfig.FileName,
+ url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC")
+ };
+ return output;
+ }
+
+ ///
+ /// 批量删除报销分类表
+ ///
+ /// 主键数组
+ ///
+ [HttpPost("batchRemove")]
+ public async Task BatchRemove([FromBody] List ids)
+ {
+ var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync();
+ if (entitys.Count > 0)
+ {
+ try
+ {
+ //开启事务
+ _db.BeginTran();
+ //批量删除报销分类表
+ await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync();
+ //关闭事务
+ _db.CommitTran();
+ }
+ catch (Exception)
+ {
+ //回滚事务
+ _db.RollbackTran();
+ throw NCCException.Oh(ErrorCode.COM1002);
+ }
+ }
+ }
+
+ ///
+ /// 更新报销分类表
+ ///
+ /// 主键
+ /// 参数
+ ///
+ [HttpPut("{id}")]
+ public async Task Update(string id, [FromBody] LqReimbursementCategoryUpInput input)
+ {
+ var entity = input.Adapt();
+ var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
+ }
+
+ ///
+ /// 删除报销分类表
+ ///
+ ///
+ [HttpDelete("{id}")]
+ public async Task Delete(string id)
+ {
+ var entity = await _db.Queryable().FirstAsync(p => p.Id == id);
+ _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
+ var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync();
+ if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);
+ }
+ }
+}
--
libgit2 0.21.4