From 47d33dcab5b64c9160d9f3d96e7d70d2e4c79cce Mon Sep 17 00:00:00 2001 From: “wangming” <“wangming@antissoft.com”> Date: Wed, 1 Oct 2025 10:57:18 +0800 Subject: [PATCH] 国庆快乐~ --- README.md | 311 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlCrInput.cs | 87 --------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlInfoOutput.cs | 87 --------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListOutput.cs | 86 -------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListQueryInput.cs | 98 -------------------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlUpInput.cs | 17 ----------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscCrInput.cs | 82 ---------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscInfoOutput.cs | 82 ---------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListOutput.cs | 81 --------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListQueryInput.cs | 93 --------------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscUpInput.cs | 17 ----------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/README.md | 6 +++--- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_ryzl/LqRyzlEntity.cs | 105 --------------------------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_tk_xsc/LqTkXscEntity.cs | 99 --------------------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqRyzlMapper.cs | 14 -------------- netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqTkXscMapper.cs | 14 -------------- netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqRyzlService.cs | 6 ------ netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqTkXscService.cs | 6 ------ netcore/src/Modularity/Extend/NCC.Extend/LqRyzlService.cs | 289 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend/LqTkXscService.cs | 289 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs | 1 - 21 files changed, 214 insertions(+), 1656 deletions(-) delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlCrInput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlInfoOutput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListOutput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListQueryInput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlUpInput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscCrInput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscInfoOutput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListOutput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListQueryInput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscUpInput.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_ryzl/LqRyzlEntity.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_tk_xsc/LqTkXscEntity.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqRyzlMapper.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqTkXscMapper.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqRyzlService.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqTkXscService.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend/LqRyzlService.cs delete mode 100644 netcore/src/Modularity/Extend/NCC.Extend/LqTkXscService.cs diff --git a/README.md b/README.md index 9c72122..167e850 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,16 @@ ## 项目简介 -绿纤ERP管理系统是一个基于现代化技术栈开发的企业资源规划系统,专为绿纤行业量身定制。系统采用前后端分离架构,提供完整的生产、销售、库存、财务等业务管理功能。 +绿纤ERP管理系统是一个基于现代化技术栈开发的企业资源规划系统,专为绿纤行业量身定制。系统采用前后端分离架构,提供完整的门店管理、业绩统计、工资核算、报表分析等业务管理功能。 + +## 🎯 核心功能亮点 + +- **📊 业绩统计系统** - 门店业绩、个人业绩、金三角业绩等多维度统计 +- **💰 工资核算系统** - 健康师底薪、提成、奖励等自动计算 +- **📈 报表分析系统** - 可视化图表、趋势分析、排行榜展示 +- **🏪 门店管理系统** - 门店信息、归属管理、新店保护 +- **👥 人员管理系统** - 健康师管理、金三角团队管理 +- **📋 客户管理系统** - 客户信息、会员权益、拓客记录 ## 技术栈 @@ -21,6 +30,7 @@ - **Vue Router** - 路由管理 - **Axios** - HTTP客户端 - **SCSS** - CSS预处理器 +- **ECharts** - 数据可视化图表库 ## 项目结构 @@ -46,9 +56,13 @@ lvqianmeiye_ERP/ │ │ ├── api/ # API接口 │ │ ├── components/ # 公共组件 │ │ ├── views/ # 页面视图 -│ │ │ ├── lqBmzb/ # 部门管理页面 -│ │ │ ├── lqCpxx/ # 产品信息页面 -│ │ │ ├── lqHygl/ # 会员管理页面 +│ │ │ ├── salaryStatistics/ # 工资统计页面 +│ │ │ ├── personalPerformanceStatistics/ # 个人业绩统计 +│ │ │ ├── storeTotalPerformanceStatistics/ # 门店总业绩统计 +│ │ │ ├── departmentConsumePerformanceStatistics/ # 部门消耗业绩统计 +│ │ │ ├── techPerformanceStatistics/ # 科技部业绩统计 +│ │ │ ├── storeConsumePerformanceStatistics/ # 门店消耗业绩统计 +│ │ │ ├── report/ # 报表分析页面 │ │ │ └── ... # 其他业务页面 │ │ ├── router/ # 路由配置 │ │ └── store/ # 状态管理 @@ -64,33 +78,25 @@ lvqianmeiye_ERP/ ### NCC.Extend(业务服务层) 包含所有业务服务的具体实现,按功能分类: -#### 📋 基础管理类 -- `LqCpxxService` - 产品信息管理服务 +#### 📊 业绩统计类 +- `LqStatisticsService` - 核心统计服务(个人业绩、门店业绩、金三角业绩等) +- `LqReportService` - 报表分析服务(趋势图、排行榜、仪表盘) + +#### 💰 工资核算类 +- `LqGzService` - 工资核算服务(健康师底薪、提成计算) + +#### 🏪 门店管理类 +- `LqMdxxService` - 门店信息管理服务 +- `LqMdXdbhsjService` - 门店新店保护时间管理 + +#### 👥 人员管理类 +- `LqYcsdJsjService` - 金三角设定管理服务 +- `LqJinsanjiaoUserService` - 金三角用户绑定管理 + +#### 📋 客户管理类 - `LqKhxxService` - 客户信息管理服务 -- `LqRyzlService` - 人员资料管理服务 - -#### 🏭 生产管理类 -- `LqJsfaService` - 工艺方案管理服务 -- `LqSbtjbService` - 设备统计管理服务 -- `LqYcsdJsjService` - 技术数据管理服务 -- `LqYcsdJjlftjsService` - 技术方案管理服务 -- `LqYcsdMdlbjhsxxService` - 模具管理服务 - -#### 💰 销售管理类 -- `LqXhHyhkService` - 销售回款管理服务 -- `LqXhmxbService` - 销售明细管理服务 -- `LqTkXscService` - 提成管理服务 -- `LqTkjlbService` - 提成记录管理服务 - -#### 📦 库存管理类 -- `LqKqhzbService` - 库存汇总管理服务 -- `LqLssjService` - 历史数据管理服务 -- `LqYjmxbService` - 原料明细管理服务 - -#### 📊 财务管理类 -- `LqSkzhService` - 收款账户管理服务 -- `LqHzfService` - 汇总费用管理服务 -- `LqJdqdService` - 季度清单管理服务 +- `LqTkjlbService` - 拓客记录管理服务 +- `LqEventService` - 拓客活动管理服务 #### 🔧 系统工具类 - `EmailService` - 邮件服务 @@ -99,9 +105,16 @@ lvqianmeiye_ERP/ - `WorkLogService` - 工作日志服务 ### NCC.Extend.Entitys(实体模型层) -- **Entity/** - 数据库实体模型(66个实体) -- **Dto/** - 数据传输对象(304个DTO) -- **Mapper/** - 对象映射配置(50个映射器) +- **Entity/** - 数据库实体模型(包含统计表、工资表等核心实体) + - `lq_statistics_personal_performance/` - 个人业绩统计实体 + - `lq_statistics_store_total_performance/` - 门店总业绩统计实体 + - `lq_statistics_gold_triangle/` - 金三角业绩统计实体 + - `lq_statistics_department_consume_performance/` - 部门消耗业绩统计实体 + - `lq_statistics_tech_performance/` - 科技部业绩统计实体 + - `lq_statistics_store_consume_performance/` - 门店消耗业绩统计实体 + - `lq_salary_statistics/` - 工资统计实体 +- **Dto/** - 数据传输对象(包含统计、报表等DTO) +- **Mapper/** - 对象映射配置 - **Model/** - 业务模型类 ### NCC.Extend.Interfaces(接口定义层) @@ -171,39 +184,44 @@ npm run dev > 💡 **说明**:所有业务功能的核心代码都位于 `netcore/src/Modularity/Extend/` 模块中 -### 📋 基础管理模块 -- **产品信息** (`LqCpxxService`) - 产品档案管理,产品分类维护 -- **客户信息** (`LqKhxxService`) - 客户档案管理,客户关系维护 -- **人员资料** (`LqRyzlService`) - 员工信息管理,人员档案维护 - -### 🏭 生产管理模块 -- **工艺方案** (`LqJsfaService`) - 生产工艺配置,工艺流程管理 -- **设备统计** (`LqSbtjbService`) - 设备使用情况统计,设备维护管理 -- **技术数据** (`LqYcsdJsjService`) - 技术参数管理,工艺数据维护 -- **技术方案** (`LqYcsdJjlftjsService`) - 技术方案管理,工艺优化 -- **模具管理** (`LqYcsdMdlbjhsxxService`) - 模具档案管理,模具维护 - -### 💰 销售管理模块 -- **销售回款** (`LqXhHyhkService`) - 销售回款管理,资金回笼跟踪 -- **销售明细** (`LqXhmxbService`) - 销售明细管理,销售数据分析 -- **提成管理** (`LqTkXscService`) - 销售提成计算,提成规则维护 -- **提成记录** (`LqTkjlbService`) - 提成记录管理,提成发放跟踪 - -### 📦 库存管理模块 -- **库存汇总** (`LqKqhzbService`) - 库存数据分析,库存统计报表 -- **历史数据** (`LqLssjService`) - 历史数据管理,数据归档 -- **原料明细** (`LqYjmxbService`) - 原料库存管理,原料使用跟踪 - -### 📊 财务管理模块 -- **收款账户** (`LqSkzhService`) - 收款账户管理,资金账户维护 -- **汇总费用** (`LqHzfService`) - 费用汇总管理,成本分析 -- **季度清单** (`LqJdqdService`) - 季度财务清单,财务报告 - -### 🔧 系统工具模块 -- **邮件服务** (`EmailService`) - 邮件发送,通知提醒 -- **文档管理** (`DocumentService`) - 文档存储,文件管理 -- **大数据分析** (`BigDataService`) - 数据分析,报表生成 -- **工作日志** (`WorkLogService`) - 工作日志记录,操作跟踪 +### 📊 业绩统计模块 +- **个人业绩统计** (`LqStatisticsService`) - 健康师个人业绩统计,包含首单业绩、升单业绩等 +- **门店总业绩统计** (`LqStatisticsService`) - 门店整体业绩统计,包含总业绩、欠款金额等 +- **金三角业绩统计** (`LqStatisticsService`) - 金三角团队业绩统计和分析 +- **部门消耗业绩统计** (`LqStatisticsService`) - 部门消耗业绩统计,包含人头数、人次等 +- **科技部业绩统计** (`LqStatisticsService`) - 科技部老师业绩统计 +- **门店消耗业绩统计** (`LqStatisticsService`) - 门店消耗业绩统计 + +### 💰 工资核算模块 +- **工资统计** (`LqGzService`) - 健康师工资核算,包含底薪、提成、奖励等 +- **底薪计算** - 根据业绩标准自动计算健康师底薪(一星、二星、三星标准) +- **提成计算** - 根据业绩类型计算各类提成(基础业绩、合作业绩、奖励业绩等) +- **占比计算** - 队伍业绩与个人总业绩的占比分析 + +### 📈 报表分析模块 +- **门店业绩趋势** (`LqReportService`) - 门店业绩时间趋势分析 +- **门店业绩排行榜** (`LqReportService`) - 门店业绩排名统计 +- **健康师业绩趋势** (`LqReportService`) - 健康师个人业绩趋势 +- **健康师业绩排行榜** (`LqReportService`) - 健康师业绩排名统计 +- **金三角业绩趋势** (`LqReportService`) - 金三角团队业绩趋势 +- **金三角业绩排行榜** (`LqReportService`) - 金三角团队排名统计 +- **综合仪表盘** (`LqReportService`) - 多维度数据汇总展示 + +### 🏪 门店管理模块 +- **门店信息管理** (`LqMdxxService`) - 门店基础信息维护 +- **门店归属管理** - 门店归属事业部、教育部、科技部等 +- **新店保护时间** (`LqMdXdbhsjService`) - 新店保护期管理 + +### 👥 人员管理模块 +- **金三角设定** (`LqYcsdJsjService`) - 金三角团队配置管理 +- **金三角用户绑定** (`LqJinsanjiaoUserService`) - 用户与金三角团队绑定关系 +- **顾问身份管理** - 根据金三角绑定自动设置顾问身份 + +### 📋 客户管理模块 +- **客户信息管理** (`LqKhxxService`) - 客户档案管理 +- **拓客记录管理** (`LqTkjlbService`) - 拓客活动记录 +- **拓客活动管理** (`LqEventService`) - 拓客活动配置 +- **会员权益管理** - 历史会员权益数据管理 ### ⚙️ 系统管理模块(位于System模块) - **用户管理** - 系统用户维护,用户权限管理 @@ -215,60 +233,91 @@ npm run dev ### 🎯 核心业务开发(Extend模块) -#### 添加新的业务服务 -1. **创建实体模型** (`NCC.Extend.Entitys/Entity/`) +#### 统计服务开发规范 +1. **统计表实体** (`NCC.Extend.Entitys/Entity/lq_statistics_*/`) ```csharp - [SugarTable("lq_新表名")] + [SugarTable("lq_statistics_新统计表")] [Tenant(ClaimConst.TENANT_ID)] - public class Lq新实体Entity + public class LqStatistics新统计Entity { [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] public string Id { get; set; } - // 其他字段... + + [SugarColumn(ColumnName = "F_StatisticsMonth")] + public string StatisticsMonth { get; set; } + + // 其他统计字段... } ``` -2. **创建DTO对象** (`NCC.Extend.Entitys/Dto/`) - - `Lq新实体ListQueryInput` - 列表查询输入 - - `Lq新实体CrInput` - 创建输入 - - `Lq新实体UpInput` - 更新输入 - - `Lq新实体InfoOutput` - 详情输出 - - `Lq新实体ListOutput` - 列表输出 +2. **统计DTO对象** (`NCC.Extend.Entitys/Dto/LqStatistics/`) + - `Lq新统计ListQueryInput` - 列表查询输入 + - `Lq新统计ListOutput` - 列表输出DTO + +3. **统计服务实现** (`LqStatisticsService`) + ```csharp + /// + /// 保存新统计数据 + /// + public async Task Save新统计Statistics(string statisticsMonth) + { + // 统计逻辑实现 + } + + /// + /// 获取新统计列表 + /// + public async Task Get新统计StatisticsList(Lq新统计ListQueryInput input) + { + // 查询逻辑实现 + } + ``` -3. **创建接口定义** (`NCC.Extend.Interfaces/`) +#### 报表服务开发规范 +1. **报表接口定义** (`NCC.Extend.Interfaces/LqReport/`) ```csharp - public interface ILq新实体Service : ITransient + public interface ILqReportService { - Task GetInfo(string id); - Task GetList(Lq新实体ListQueryInput input); - Task Create(Lq新实体CrInput input); - Task Update(string id, Lq新实体UpInput input); - Task Delete(string id); + Task Get新报表Data(新报表Input input); } ``` -4. **实现业务服务** (`NCC.Extend/`) +2. **报表服务实现** (`LqReportService`) ```csharp - [ApiDescriptionSettings(Tag = "Extend", Name = "Lq新实体", Order = 200)] - [Route("api/Extend/[controller]")] - public class Lq新实体Service : ILq新实体Service, IDynamicApiController, ITransient + [HttpPost("get-新报表-data")] + public async Task Get新报表Data(新报表Input input) { - // 服务实现... + // 报表数据查询和格式化 } ``` -#### 前端页面开发 -1. **创建页面组件** (`antis-ncc-admin/src/views/lq新模块/`) - - `index.vue` - 列表页面 - - `Form.vue` - 表单页面 - - `ExportBox.vue` - 导出组件 +#### 前端页面开发规范 +1. **统计页面组件** (`antis-ncc-admin/src/views/新统计Statistics/`) + - `index.vue` - 统计列表页面 + - 使用 `NCC-table` 组件 + - 支持分页、筛选、导出功能 + +2. **报表页面组件** (`antis-ncc-admin/src/views/report/`) + - 集成到现有报表页面 + - 使用 ECharts 图表组件 + - 支持时间筛选、类型切换 -2. **添加API接口** (`antis-ncc-admin/src/api/extend/`) +3. **API接口** (`antis-ncc-admin/src/api/`) ```javascript - export function getLq新实体List(data) { + // 统计接口 + export function get新统计StatisticsList(data) { return request({ - url: '/api/Extend/Lq新实体', - method: 'GET', + url: '/api/Extend/LqStatistics/get-新统计-statistics-list', + method: 'post', + data + }) + } + + // 报表接口 + export function get新报表Data(data) { + return request({ + url: '/api/Extend/LqReport/get-新报表-data', + method: 'post', data }) } @@ -341,6 +390,30 @@ proxy: { 2. 将 `dist` 目录部署到Web服务器 3. 配置Nginx或IIS反向代理 +## 开发规范 + +### 📋 项目开发规范 +- **ID生成规范**: 必须使用 `YitIdHelper.NextId().ToString()` 生成ID,禁止使用 `Guid.NewGuid().ToString()` +- **API接口规范**: GET请求使用data字段传参,不使用params +- **权限控制**: 所有数据查询必须添加园区权限过滤 +- **数据一致性**: 统计数据和列表数据必须使用相同的过滤条件 +- **UI一致性**: 所有页面必须使用统一的布局和样式规范 +- **性能优化**: 所有列表接口支持分页,避免大数据量查询 +- **安全防护**: 使用SqlSugar ORM防止SQL注入 + +### 🗄️ 数据库规范 +- **表命名**: 业务前缀 + 功能名称 (如: lq_) +- **字段命名**: 驼峰化 +- **时间字段**: 统一使用 DateTime 类型 +- **删除标记**: `base_organize.DeleteMark` 为 `null` 表示未删除 +- **SQL查询验证**: 对于统计类型的SQL查询,在提交代码前必须先使用MCP MySQL工具执行验证 + +### 🎨 前端开发规范 +- **组件开发**: views 与 components 分离,弹窗、二级页面必须单独创建 Vue 文件 +- **文件命名**: 使用 kebab-case (如: user-dialog.vue) +- **UI规范**: 统一使用 NCC-table,标签右对齐,卡片高度100px,内边距12px,圆角12px +- **性能要求**: 启用懒加载和代码分割,页面加载时间 < 3s + ## 常见问题 ### Q: 前端启动失败 @@ -355,15 +428,53 @@ A: 检查JWT配置和Token有效期设置 ### Q: 页面显示异常 A: 检查浏览器控制台错误信息和网络请求状态 +### Q: 统计SQL执行失败 +A: 使用MCP MySQL工具先验证SQL语法和字段名是否正确 + +### Q: 报表页面404错误 +A: 检查LqReportService是否正确实现ITransient接口并注册到DI容器 + ## 技术支持 如有技术问题,请联系开发团队或查看项目文档。 +## 📊 已完成功能 + +### ✅ 核心统计功能 +- [x] 个人业绩统计 - 健康师个人业绩统计,包含首单业绩、升单业绩等 +- [x] 门店总业绩统计 - 门店整体业绩统计,包含总业绩、欠款金额等 +- [x] 金三角业绩统计 - 金三角团队业绩统计和分析 +- [x] 部门消耗业绩统计 - 部门消耗业绩统计,包含人头数、人次等 +- [x] 科技部业绩统计 - 科技部老师业绩统计 +- [x] 门店消耗业绩统计 - 门店消耗业绩统计 + +### ✅ 工资核算功能 +- [x] 工资统计 - 健康师工资核算,包含底薪、提成、奖励等 +- [x] 底薪计算 - 根据业绩标准自动计算健康师底薪(一星、二星、三星标准) +- [x] 提成计算 - 根据业绩类型计算各类提成(基础业绩、合作业绩、奖励业绩等) +- [x] 占比计算 - 队伍业绩与个人总业绩的占比分析 + +### ✅ 报表分析功能 +- [x] 门店业绩趋势 - 门店业绩时间趋势分析 +- [x] 门店业绩排行榜 - 门店业绩排名统计 +- [x] 健康师业绩趋势 - 健康师个人业绩趋势 +- [x] 健康师业绩排行榜 - 健康师业绩排名统计 +- [x] 金三角业绩趋势 - 金三角团队业绩趋势 +- [x] 金三角业绩排行榜 - 金三角团队排名统计 +- [x] 综合仪表盘 - 多维度数据汇总展示 + +### ✅ 系统优化 +- [x] 删除废弃代码 - 清理lq_ryzl、lq_tk_xsc等废弃模块 +- [x] 修复SQL语法 - 解决MySQL兼容性问题 +- [x] 修复字段映射 - 解决数据库字段名不匹配问题 +- [x] 优化前端页面 - 修复布局、分页、样式等问题 + ## 版本信息 -- **当前版本**:v1.0.0 -- **最后更新**:2024年 +- **当前版本**:v2.0.0 +- **最后更新**:2024年12月 - **维护状态**:活跃开发中 +- **主要更新**:完成业绩统计、工资核算、报表分析等核心功能 --- diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlCrInput.cs deleted file mode 100644 index f3a1b60..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlCrInput.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqRyzl -{ - /// - /// 人员资料修改输入参数 - /// - public class LqRyzlCrInput - { - /// - /// 序号 - /// - public string id { get; set; } - - /// - /// 店名 - /// - public string dm { get; set; } - - /// - /// 职位 - /// - public string zw { get; set; } - - /// - /// 费用分摊 - /// - public string fyft { get; set; } - - /// - /// 岗位分类1 - /// - public string gwfl1 { get; set; } - - /// - /// 姓名 - /// - public string xm { get; set; } - - /// - /// 在职情况 - /// - public string zzqk { get; set; } - - /// - /// 岗位分类2 - /// - public string gwfl2 { get; set; } - - /// - /// 入职时间 - /// - public DateTime? rzsj { get; set; } - - /// - /// 离职时间 - /// - public DateTime? lzsj { get; set; } - - /// - /// 战队 - /// - public string zd { get; set; } - - /// - /// 预留1 - /// - public string yl1 { get; set; } - - /// - /// 预留2 - /// - public string yl2 { get; set; } - - /// - /// 预留3 - /// - public string yl3 { get; set; } - - /// - /// 手机号 - /// - public string sjh { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlInfoOutput.cs deleted file mode 100644 index 536e661..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlInfoOutput.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqRyzl -{ - /// - /// 人员资料输出参数 - /// - public class LqRyzlInfoOutput - { - /// - /// 序号 - /// - public string id { get; set; } - - /// - /// 店名 - /// - public string dm { get; set; } - - /// - /// 职位 - /// - public string zw { get; set; } - - /// - /// 费用分摊 - /// - public string fyft { get; set; } - - /// - /// 岗位分类1 - /// - public string gwfl1 { get; set; } - - /// - /// 姓名 - /// - public string xm { get; set; } - - /// - /// 在职情况 - /// - public string zzqk { get; set; } - - /// - /// 岗位分类2 - /// - public string gwfl2 { get; set; } - - /// - /// 入职时间 - /// - public DateTime? rzsj { get; set; } - - /// - /// 离职时间 - /// - public DateTime? lzsj { get; set; } - - /// - /// 战队 - /// - public string zd { get; set; } - - /// - /// 预留1 - /// - public string yl1 { get; set; } - - /// - /// 预留2 - /// - public string yl2 { get; set; } - - /// - /// 预留3 - /// - public string yl3 { get; set; } - - /// - /// 手机号 - /// - public string sjh { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListOutput.cs deleted file mode 100644 index 65efc34..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListOutput.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; - -namespace NCC.Extend.Entitys.Dto.LqRyzl -{ - /// - /// 人员资料输入参数 - /// - public class LqRyzlListOutput - { - /// - /// 序号 - /// - public string id { get; set; } - - /// - /// 店名 - /// - public string dm { get; set; } - - /// - /// 职位 - /// - public string zw { get; set; } - - /// - /// 费用分摊 - /// - public string fyft { get; set; } - - /// - /// 岗位分类1 - /// - public string gwfl1 { get; set; } - - /// - /// 姓名 - /// - public string xm { get; set; } - - /// - /// 在职情况 - /// - public string zzqk { get; set; } - - /// - /// 岗位分类2 - /// - public string gwfl2 { get; set; } - - /// - /// 入职时间 - /// - public DateTime? rzsj { get; set; } - - /// - /// 离职时间 - /// - public DateTime? lzsj { get; set; } - - /// - /// 战队 - /// - public string zd { get; set; } - - /// - /// 预留1 - /// - public string yl1 { get; set; } - - /// - /// 预留2 - /// - public string yl2 { get; set; } - - /// - /// 预留3 - /// - public string yl3 { get; set; } - - /// - /// 手机号 - /// - public string sjh { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListQueryInput.cs deleted file mode 100644 index 261949a..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlListQueryInput.cs +++ /dev/null @@ -1,98 +0,0 @@ -using NCC.Common.Filter; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqRyzl -{ - /// - /// 人员资料列表查询输入 - /// - public class LqRyzlListQueryInput : PageInputBase - { - /// - /// 选择导出数据key - /// - public string selectKey { get; set; } - - /// - /// - /// - public int dataType { get; set; } - - - /// - /// 序号 - /// - public string id { get; set; } - - /// - /// 店名 - /// - public string dm { get; set; } - - /// - /// 职位 - /// - public string zw { get; set; } - - /// - /// 费用分摊 - /// - public string fyft { get; set; } - - /// - /// 岗位分类1 - /// - public string gwfl1 { get; set; } - - /// - /// 姓名 - /// - public string xm { get; set; } - - /// - /// 在职情况 - /// - public string zzqk { get; set; } - - /// - /// 岗位分类2 - /// - public string gwfl2 { get; set; } - - /// - /// 入职时间 - /// - public string rzsj { get; set; } - - /// - /// 离职时间 - /// - public string lzsj { get; set; } - - /// - /// 战队 - /// - public string zd { get; set; } - - /// - /// 预留1 - /// - public string yl1 { get; set; } - - /// - /// 预留2 - /// - public string yl2 { get; set; } - - /// - /// 预留3 - /// - public string yl3 { get; set; } - - /// - /// 手机号 - /// - public string sjh { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlUpInput.cs deleted file mode 100644 index 78c076f..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqRyzl/LqRyzlUpInput.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqRyzl -{ - /// - /// 人员资料更新输入参数 - /// - public class LqRyzlUpInput : LqRyzlCrInput - { - /// - /// 序号 - /// - public string id { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscCrInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscCrInput.cs deleted file mode 100644 index 45bf4ca..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscCrInput.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqTkXsc -{ - /// - /// 线索池修改输入参数 - /// - public class LqTkXscCrInput - { - /// - /// 客户编号 - /// - public string id { get; set; } - - /// - /// 创建时间 - /// - public DateTime? tjsj { get; set; } - - /// - /// 拓客人员 - /// - public string tkry { get; set; } - - /// - /// 顾客姓名 - /// - public string gkxm { get; set; } - - /// - /// 电话号码 - /// - public string dhhm { get; set; } - - /// - /// 购买张数 - /// - public int? gmzs { get; set; } - - /// - /// 支付方式 - /// - public string zffs { get; set; } - - /// - /// 是否加微信 - /// - public string sfjwx { get; set; } - - /// - /// 备注 - /// - public string bz { get; set; } - - /// - /// 性别 - /// - public string xb { get; set; } - - /// - /// 生日 - /// - public DateTime? sr { get; set; } - - /// - /// 地址 - /// - public string dz { get; set; } - - /// - /// 邮箱 - /// - public string yx { get; set; } - - /// - /// 微信 - /// - public string wx { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscInfoOutput.cs deleted file mode 100644 index c2a840a..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscInfoOutput.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqTkXsc -{ - /// - /// 线索池输出参数 - /// - public class LqTkXscInfoOutput - { - /// - /// 客户编号 - /// - public string id { get; set; } - - /// - /// 创建时间 - /// - public DateTime? tjsj { get; set; } - - /// - /// 拓客人员 - /// - public string tkry { get; set; } - - /// - /// 顾客姓名 - /// - public string gkxm { get; set; } - - /// - /// 电话号码 - /// - public string dhhm { get; set; } - - /// - /// 购买张数 - /// - public int? gmzs { get; set; } - - /// - /// 支付方式 - /// - public string zffs { get; set; } - - /// - /// 是否加微信 - /// - public string sfjwx { get; set; } - - /// - /// 备注 - /// - public string bz { get; set; } - - /// - /// 性别 - /// - public string xb { get; set; } - - /// - /// 生日 - /// - public DateTime? sr { get; set; } - - /// - /// 地址 - /// - public string dz { get; set; } - - /// - /// 邮箱 - /// - public string yx { get; set; } - - /// - /// 微信 - /// - public string wx { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListOutput.cs deleted file mode 100644 index 6a3db24..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListOutput.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; - -namespace NCC.Extend.Entitys.Dto.LqTkXsc -{ - /// - /// 线索池输入参数 - /// - public class LqTkXscListOutput - { - /// - /// 客户编号 - /// - public string id { get; set; } - - /// - /// 创建时间 - /// - public DateTime? tjsj { get; set; } - - /// - /// 拓客人员 - /// - public string tkry { get; set; } - - /// - /// 顾客姓名 - /// - public string gkxm { get; set; } - - /// - /// 电话号码 - /// - public string dhhm { get; set; } - - /// - /// 购买张数 - /// - public int? gmzs { get; set; } - - /// - /// 支付方式 - /// - public string zffs { get; set; } - - /// - /// 是否加微信 - /// - public string sfjwx { get; set; } - - /// - /// 备注 - /// - public string bz { get; set; } - - /// - /// 性别 - /// - public string xb { get; set; } - - /// - /// 生日 - /// - public DateTime? sr { get; set; } - - /// - /// 地址 - /// - public string dz { get; set; } - - /// - /// 邮箱 - /// - public string yx { get; set; } - - /// - /// 微信 - /// - public string wx { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListQueryInput.cs deleted file mode 100644 index a1153b0..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscListQueryInput.cs +++ /dev/null @@ -1,93 +0,0 @@ -using NCC.Common.Filter; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqTkXsc -{ - /// - /// 线索池列表查询输入 - /// - public class LqTkXscListQueryInput : PageInputBase - { - /// - /// 选择导出数据key - /// - public string selectKey { get; set; } - - /// - /// - /// - public int dataType { get; set; } - - - /// - /// 客户编号 - /// - public string id { get; set; } - - /// - /// 创建时间 - /// - public string tjsj { get; set; } - - /// - /// 拓客人员 - /// - public string tkry { get; set; } - - /// - /// 顾客姓名 - /// - public string gkxm { get; set; } - - /// - /// 电话号码 - /// - public string dhhm { get; set; } - - /// - /// 购买张数 - /// - public string gmzs { get; set; } - - /// - /// 支付方式 - /// - public string zffs { get; set; } - - /// - /// 是否加微信 - /// - public string sfjwx { get; set; } - - /// - /// 备注 - /// - public string bz { get; set; } - - /// - /// 性别 - /// - public string xb { get; set; } - - /// - /// 生日 - /// - public string sr { get; set; } - - /// - /// 地址 - /// - public string dz { get; set; } - - /// - /// 邮箱 - /// - public string yx { get; set; } - - /// - /// 微信 - /// - public string wx { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscUpInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscUpInput.cs deleted file mode 100644 index 1464540..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqTkXsc/LqTkXscUpInput.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Dto.LqTkXsc -{ - /// - /// 线索池更新输入参数 - /// - public class LqTkXscUpInput : LqTkXscCrInput - { - /// - /// 客户编号 - /// - public string id { get; set; } - - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/README.md b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/README.md index bf3b176..d2b8cc8 100644 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/README.md +++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/README.md @@ -18,7 +18,7 @@ - `lq_mdgf/` - 门店股份占比明细 #### 人员相关表 -- `lq_ryzl/` - 人员资料 +- (已删除) `lq_ryzl/` - 人员资料 #### 项目相关表 - `lq_xmzl/` - 项目资料 @@ -63,7 +63,7 @@ - `lq_sbtjb/` - 社保统计表 - `lq_skzh/` - 收款账号 - `lq_tkjlb/` - 拓客记录表 -- `lq_tk_xsc/` - 拓客记录表 +- (已删除) `lq_tk_xsc/` - 拓客记录表 - `lq_yaoyjl/` - 邀约记录 - `lq_yxhdfa/` - 营销活动方案 - `lq_yyjl/` - 预约记录 @@ -80,7 +80,7 @@ 例如: - `NCC.Extend.Entitys.lq_mdxx` - 门店资料 -- `NCC.Extend.Entitys.lq_ryzl` - 人员资料 +- (已删除) `NCC.Extend.Entitys.lq_ryzl` - 人员资料 - `NCC.Extend.Entitys.lq_yjmxb` - 业绩明细表 ## 使用说明 diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_ryzl/LqRyzlEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_ryzl/LqRyzlEntity.cs deleted file mode 100644 index 77d3792..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_ryzl/LqRyzlEntity.cs +++ /dev/null @@ -1,105 +0,0 @@ -using NCC.Common.Const; -using SqlSugar; -using System; - -namespace NCC.Extend.Entitys.lq_ryzl -{ - /// - /// 人员资料 - /// - [SugarTable("lq_ryzl")] - [Tenant(ClaimConst.TENANT_ID)] - public class LqRyzlEntity - { - /// - /// 序号 - /// - [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] - public string Id { get; set; } - - /// - /// 店名 - /// - [SugarColumn(ColumnName = "dm")] - public string Dm { get; set; } - - /// - /// 职位 - /// - [SugarColumn(ColumnName = "zw")] - public string Zw { get; set; } - - /// - /// 费用分摊 - /// - [SugarColumn(ColumnName = "fyft")] - public string Fyft { get; set; } - - /// - /// 岗位分类1 - /// - [SugarColumn(ColumnName = "gwfl1")] - public string Gwfl1 { get; set; } - - /// - /// 姓名 - /// - [SugarColumn(ColumnName = "xm")] - public string Xm { get; set; } - - /// - /// 在职情况 - /// - [SugarColumn(ColumnName = "zzqk")] - public string Zzqk { get; set; } - - /// - /// 岗位分类2 - /// - [SugarColumn(ColumnName = "gwfl2")] - public string Gwfl2 { get; set; } - - /// - /// 入职时间 - /// - [SugarColumn(ColumnName = "rzsj")] - public DateTime? Rzsj { get; set; } - - /// - /// 离职时间 - /// - [SugarColumn(ColumnName = "lzsj")] - public DateTime? Lzsj { get; set; } - - /// - /// 战队 - /// - [SugarColumn(ColumnName = "zd")] - public string Zd { get; set; } - - /// - /// 预留1 - /// - [SugarColumn(ColumnName = "yl1")] - public string Yl1 { get; set; } - - /// - /// 预留2 - /// - [SugarColumn(ColumnName = "yl2")] - public string Yl2 { get; set; } - - /// - /// 预留3 - /// - [SugarColumn(ColumnName = "yl3")] - public string Yl3 { get; set; } - - /// - /// 手机号 - /// - [SugarColumn(ColumnName = "sjh")] - public string Sjh { get; set; } - - } -} \ No newline at end of file diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_tk_xsc/LqTkXscEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_tk_xsc/LqTkXscEntity.cs deleted file mode 100644 index 8c08699..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_tk_xsc/LqTkXscEntity.cs +++ /dev/null @@ -1,99 +0,0 @@ -using NCC.Common.Const; -using SqlSugar; -using System; - -namespace NCC.Extend.Entitys.lq_tk_xsc -{ - /// - /// 线索池 - /// - [SugarTable("lq_tk_xsc")] - [Tenant(ClaimConst.TENANT_ID)] - public class LqTkXscEntity - { - /// - /// 客户编号 - /// - [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] - public string Id { get; set; } - - /// - /// 创建时间 - /// - [SugarColumn(ColumnName = "tjsj")] - public DateTime? Tjsj { get; set; } - - /// - /// 拓客人员 - /// - [SugarColumn(ColumnName = "tkry")] - public string Tkry { get; set; } - - /// - /// 顾客姓名 - /// - [SugarColumn(ColumnName = "gkxm")] - public string Gkxm { get; set; } - - /// - /// 电话号码 - /// - [SugarColumn(ColumnName = "dhhm")] - public string Dhhm { get; set; } - - /// - /// 购买张数 - /// - [SugarColumn(ColumnName = "gmzs")] - public int? Gmzs { get; set; } - - /// - /// 支付方式 - /// - [SugarColumn(ColumnName = "zffs")] - public string Zffs { get; set; } - - /// - /// 是否加微信 - /// - [SugarColumn(ColumnName = "sfjwx")] - public string Sfjwx { get; set; } - - /// - /// 备注 - /// - [SugarColumn(ColumnName = "bz")] - public string Bz { get; set; } - - /// - /// 性别 - /// - [SugarColumn(ColumnName = "xb")] - public string Xb { get; set; } - - /// - /// 生日 - /// - [SugarColumn(ColumnName = "sr")] - public DateTime? Sr { get; set; } - - /// - /// 地址 - /// - [SugarColumn(ColumnName = "dz")] - public string Dz { get; set; } - - /// - /// 邮箱 - /// - [SugarColumn(ColumnName = "yx")] - public string Yx { get; set; } - - /// - /// 微信 - /// - [SugarColumn(ColumnName = "wx")] - public string Wx { get; set; } - - } -} \ No newline at end of file diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqRyzlMapper.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqRyzlMapper.cs deleted file mode 100644 index e9b29a2..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqRyzlMapper.cs +++ /dev/null @@ -1,14 +0,0 @@ -using NCC.Common.Helper; -using NCC.Extend.Entitys.Dto.LqRyzl; -using Mapster; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Mapper.LqRyzl -{ - public class Mapper : IRegister - { - public void Register(TypeAdapterConfig config) - { - } - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqTkXscMapper.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqTkXscMapper.cs deleted file mode 100644 index f1c0e05..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Mapper/LqTkXscMapper.cs +++ /dev/null @@ -1,14 +0,0 @@ -using NCC.Common.Helper; -using NCC.Extend.Entitys.Dto.LqTkXsc; -using Mapster; -using System.Collections.Generic; - -namespace NCC.Extend.Entitys.Mapper.LqTkXsc -{ - public class Mapper : IRegister - { - public void Register(TypeAdapterConfig config) - { - } - } -} diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqRyzlService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqRyzlService.cs deleted file mode 100644 index 1bdf2e2..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqRyzlService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace NCC.Extend.Interfaces.LqRyzl -{ - public interface ILqRyzlService - { - } -} \ No newline at end of file diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqTkXscService.cs b/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqTkXscService.cs deleted file mode 100644 index bb9932d..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend.Interfaces/ILqTkXscService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace NCC.Extend.Interfaces.LqTkXsc -{ - public interface ILqTkXscService - { - } -} \ No newline at end of file diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqRyzlService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqRyzlService.cs deleted file mode 100644 index 5d0afe6..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend/LqRyzlService.cs +++ /dev/null @@ -1,289 +0,0 @@ -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.LqRyzl; -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.lq_ryzl; -using NCC.Extend.Entitys.Dto.LqRyzl; -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.LqRyzl -{ - /// - /// 人员资料服务 - /// - [ApiDescriptionSettings(Tag = "Extend",Name = "LqRyzl", Order = 200)] - [Route("api/Extend/[controller]")] - public class LqRyzlService : ILqRyzlService, IDynamicApiController, ITransient - { - private readonly ISqlSugarRepository _lqRyzlRepository; - private readonly SqlSugarScope _db; - private readonly IUserManager _userManager; - - /// - /// 初始化一个类型的新实例 - /// - public LqRyzlService( - ISqlSugarRepository lqRyzlRepository, - IUserManager userManager) - { - _lqRyzlRepository = lqRyzlRepository; - _db = _lqRyzlRepository.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] LqRyzlListQueryInput input) - { - var sidx = input.sidx == null ? "id" : input.sidx; - List queryRzsj = input.rzsj != null ? input.rzsj.Split(',').ToObeject>() : null; - DateTime? startRzsj = queryRzsj != null ? Ext.GetDateTime(queryRzsj.First()) : null; - DateTime? endRzsj = queryRzsj != null ? Ext.GetDateTime(queryRzsj.Last()) : null; - List queryLzsj = input.lzsj != null ? input.lzsj.Split(',').ToObeject>() : null; - DateTime? startLzsj = queryLzsj != null ? Ext.GetDateTime(queryLzsj.First()) : null; - DateTime? endLzsj = queryLzsj != null ? Ext.GetDateTime(queryLzsj.Last()) : null; - var data = await _db.Queryable() - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) - .WhereIF(!string.IsNullOrEmpty(input.dm), p => p.Dm.Contains(input.dm)) - .WhereIF(!string.IsNullOrEmpty(input.zw), p => p.Zw.Contains(input.zw)) - .WhereIF(!string.IsNullOrEmpty(input.fyft), p => p.Fyft.Equals(input.fyft)) - .WhereIF(!string.IsNullOrEmpty(input.gwfl1), p => p.Gwfl1.Equals(input.gwfl1)) - .WhereIF(!string.IsNullOrEmpty(input.xm), p => p.Xm.Contains(input.xm)) - .WhereIF(!string.IsNullOrEmpty(input.zzqk), p => p.Zzqk.Equals(input.zzqk)) - .WhereIF(!string.IsNullOrEmpty(input.gwfl2), p => p.Gwfl2.Equals(input.gwfl2)) - .WhereIF(queryRzsj != null, p => p.Rzsj >= new DateTime(startRzsj.ToDate().Year, startRzsj.ToDate().Month, startRzsj.ToDate().Day, 0, 0, 0)) - .WhereIF(queryRzsj != null, p => p.Rzsj <= new DateTime(endRzsj.ToDate().Year, endRzsj.ToDate().Month, endRzsj.ToDate().Day, 23, 59, 59)) - .WhereIF(queryLzsj != null, p => p.Lzsj >= new DateTime(startLzsj.ToDate().Year, startLzsj.ToDate().Month, startLzsj.ToDate().Day, 0, 0, 0)) - .WhereIF(queryLzsj != null, p => p.Lzsj <= new DateTime(endLzsj.ToDate().Year, endLzsj.ToDate().Month, endLzsj.ToDate().Day, 23, 59, 59)) - .WhereIF(!string.IsNullOrEmpty(input.zd), p => p.Zd.Contains(input.zd)) - .WhereIF(!string.IsNullOrEmpty(input.yl1), p => p.Yl1.Contains(input.yl1)) - .WhereIF(!string.IsNullOrEmpty(input.yl2), p => p.Yl2.Contains(input.yl2)) - .WhereIF(!string.IsNullOrEmpty(input.yl3), p => p.Yl3.Contains(input.yl3)) - .WhereIF(!string.IsNullOrEmpty(input.sjh), p => p.Sjh.Contains(input.sjh)) - .Select(it=> new LqRyzlListOutput - { - id = it.Id, - dm=it.Dm, - zw=it.Zw, - fyft=it.Fyft, - gwfl1=it.Gwfl1, - xm=it.Xm, - zzqk=it.Zzqk, - gwfl2=it.Gwfl2, - rzsj=it.Rzsj, - lzsj=it.Lzsj, - zd=it.Zd, - yl1=it.Yl1, - yl2=it.Yl2, - yl3=it.Yl3, - sjh=it.Sjh, - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); - return PageResult.SqlSugarPageResult(data); - } - - /// - /// 新建人员资料 - /// - /// 参数 - /// - [HttpPost("")] - public async Task Create([FromBody] LqRyzlCrInput 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); - } - - /// - /// 获取人员资料无分页列表 - /// - /// 请求参数 - /// - [NonAction] - public async Task GetNoPagingList([FromQuery] LqRyzlListQueryInput input) - { - var sidx = input.sidx == null ? "id" : input.sidx; - List queryRzsj = input.rzsj != null ? input.rzsj.Split(',').ToObeject>() : null; - DateTime? startRzsj = queryRzsj != null ? Ext.GetDateTime(queryRzsj.First()) : null; - DateTime? endRzsj = queryRzsj != null ? Ext.GetDateTime(queryRzsj.Last()) : null; - List queryLzsj = input.lzsj != null ? input.lzsj.Split(',').ToObeject>() : null; - DateTime? startLzsj = queryLzsj != null ? Ext.GetDateTime(queryLzsj.First()) : null; - DateTime? endLzsj = queryLzsj != null ? Ext.GetDateTime(queryLzsj.Last()) : null; - var data = await _db.Queryable() - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) - .WhereIF(!string.IsNullOrEmpty(input.dm), p => p.Dm.Contains(input.dm)) - .WhereIF(!string.IsNullOrEmpty(input.zw), p => p.Zw.Contains(input.zw)) - .WhereIF(!string.IsNullOrEmpty(input.fyft), p => p.Fyft.Equals(input.fyft)) - .WhereIF(!string.IsNullOrEmpty(input.gwfl1), p => p.Gwfl1.Equals(input.gwfl1)) - .WhereIF(!string.IsNullOrEmpty(input.xm), p => p.Xm.Contains(input.xm)) - .WhereIF(!string.IsNullOrEmpty(input.zzqk), p => p.Zzqk.Equals(input.zzqk)) - .WhereIF(!string.IsNullOrEmpty(input.gwfl2), p => p.Gwfl2.Equals(input.gwfl2)) - .WhereIF(queryRzsj != null, p => p.Rzsj >= new DateTime(startRzsj.ToDate().Year, startRzsj.ToDate().Month, startRzsj.ToDate().Day, 0, 0, 0)) - .WhereIF(queryRzsj != null, p => p.Rzsj <= new DateTime(endRzsj.ToDate().Year, endRzsj.ToDate().Month, endRzsj.ToDate().Day, 23, 59, 59)) - .WhereIF(queryLzsj != null, p => p.Lzsj >= new DateTime(startLzsj.ToDate().Year, startLzsj.ToDate().Month, startLzsj.ToDate().Day, 0, 0, 0)) - .WhereIF(queryLzsj != null, p => p.Lzsj <= new DateTime(endLzsj.ToDate().Year, endLzsj.ToDate().Month, endLzsj.ToDate().Day, 23, 59, 59)) - .WhereIF(!string.IsNullOrEmpty(input.zd), p => p.Zd.Contains(input.zd)) - .WhereIF(!string.IsNullOrEmpty(input.yl1), p => p.Yl1.Contains(input.yl1)) - .WhereIF(!string.IsNullOrEmpty(input.yl2), p => p.Yl2.Contains(input.yl2)) - .WhereIF(!string.IsNullOrEmpty(input.yl3), p => p.Yl3.Contains(input.yl3)) - .WhereIF(!string.IsNullOrEmpty(input.sjh), p => p.Sjh.Contains(input.sjh)) - .Select(it=> new LqRyzlListOutput - { - id = it.Id, - dm=it.Dm, - zw=it.Zw, - fyft=it.Fyft, - gwfl1=it.Gwfl1, - xm=it.Xm, - zzqk=it.Zzqk, - gwfl2=it.Gwfl2, - rzsj=it.Rzsj, - lzsj=it.Lzsj, - zd=it.Zd, - yl1=it.Yl1, - yl2=it.Yl2, - yl3=it.Yl3, - sjh=it.Sjh, - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); - return data; - } - - /// - /// 导出人员资料 - /// - /// 请求参数 - /// - [HttpGet("Actions/Export")] - public async Task Export([FromQuery] LqRyzlListQueryInput 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\":\"dm\"},{\"value\":\"职位\",\"field\":\"zw\"},{\"value\":\"费用分摊\",\"field\":\"fyft\"},{\"value\":\"岗位分类1\",\"field\":\"gwfl1\"},{\"value\":\"姓名\",\"field\":\"xm\"},{\"value\":\"在职情况\",\"field\":\"zzqk\"},{\"value\":\"岗位分类2\",\"field\":\"gwfl2\"},{\"value\":\"入职时间\",\"field\":\"rzsj\"},{\"value\":\"离职时间\",\"field\":\"lzsj\"},{\"value\":\"战队\",\"field\":\"zd\"},{\"value\":\"预留1\",\"field\":\"yl1\"},{\"value\":\"预留2\",\"field\":\"yl2\"},{\"value\":\"预留3\",\"field\":\"yl3\"},{\"value\":\"手机号\",\"field\":\"sjh\"},]".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] LqRyzlUpInput 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/LqTkXscService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqTkXscService.cs deleted file mode 100644 index 043bced..0000000 --- a/netcore/src/Modularity/Extend/NCC.Extend/LqTkXscService.cs +++ /dev/null @@ -1,289 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Mapster; -using Microsoft.AspNetCore.Mvc; -using NCC.ClayObject; -using NCC.Common.Configuration; -using NCC.Common.Core.Manager; -using NCC.Common.Enum; -using NCC.Common.Extension; -using NCC.Common.Filter; -using NCC.Common.Helper; -using NCC.Common.Model.NPOI; -using NCC.DataEncryption; -using NCC.Dependency; -using NCC.DynamicApiController; -using NCC.Extend.Entitys.Dto.LqTkXsc; -using NCC.Extend.Entitys.lq_tk_xsc; -using NCC.Extend.Interfaces.LqTkXsc; -using NCC.FriendlyException; -using NCC.JsonSerialization; -using SqlSugar; -using Yitter.IdGenerator; - -namespace NCC.Extend.LqTkXsc -{ - /// - /// 线索池服务 - /// - [ApiDescriptionSettings(Tag = "Extend", Name = "LqTkXsc", Order = 200)] - [Route("api/Extend/[controller]")] - public class LqTkXscService : ILqTkXscService, IDynamicApiController, ITransient - { - private readonly ISqlSugarRepository _lqTkXscRepository; - private readonly SqlSugarScope _db; - private readonly IUserManager _userManager; - - /// - /// 初始化一个类型的新实例 - /// - public LqTkXscService(ISqlSugarRepository lqTkXscRepository, IUserManager userManager) - { - _lqTkXscRepository = lqTkXscRepository; - _db = _lqTkXscRepository.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] LqTkXscListQueryInput input) - { - var sidx = input.sidx == null ? "id" : input.sidx; - List queryTjsj = input.tjsj != null ? input.tjsj.Split(',').ToObeject>() : null; - DateTime? startTjsj = queryTjsj != null ? Ext.GetDateTime(queryTjsj.First()) : null; - DateTime? endTjsj = queryTjsj != null ? Ext.GetDateTime(queryTjsj.Last()) : null; - List querySr = input.sr != null ? input.sr.Split(',').ToObeject>() : null; - DateTime? startSr = querySr != null ? Ext.GetDateTime(querySr.First()) : null; - DateTime? endSr = querySr != null ? Ext.GetDateTime(querySr.Last()) : null; - var data = await _db.Queryable() - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) - .WhereIF(queryTjsj != null, p => p.Tjsj >= new DateTime(startTjsj.ToDate().Year, startTjsj.ToDate().Month, startTjsj.ToDate().Day, 0, 0, 0)) - .WhereIF(queryTjsj != null, p => p.Tjsj <= new DateTime(endTjsj.ToDate().Year, endTjsj.ToDate().Month, endTjsj.ToDate().Day, 23, 59, 59)) - .WhereIF(!string.IsNullOrEmpty(input.tkry), p => p.Tkry.Contains(input.tkry)) - .WhereIF(!string.IsNullOrEmpty(input.gkxm), p => p.Gkxm.Contains(input.gkxm)) - .WhereIF(!string.IsNullOrEmpty(input.dhhm), p => p.Dhhm.Contains(input.dhhm)) - .WhereIF(!string.IsNullOrEmpty(input.gmzs), p => p.Gmzs.Equals(input.gmzs)) - .WhereIF(!string.IsNullOrEmpty(input.zffs), p => p.Zffs.Equals(input.zffs)) - .WhereIF(!string.IsNullOrEmpty(input.sfjwx), p => p.Sfjwx.Equals(input.sfjwx)) - .WhereIF(!string.IsNullOrEmpty(input.bz), p => p.Bz.Contains(input.bz)) - .WhereIF(!string.IsNullOrEmpty(input.xb), p => p.Xb.Equals(input.xb)) - .WhereIF(querySr != null, p => p.Sr >= new DateTime(startSr.ToDate().Year, startSr.ToDate().Month, startSr.ToDate().Day, 0, 0, 0)) - .WhereIF(querySr != null, p => p.Sr <= new DateTime(endSr.ToDate().Year, endSr.ToDate().Month, endSr.ToDate().Day, 23, 59, 59)) - .WhereIF(!string.IsNullOrEmpty(input.dz), p => p.Dz.Contains(input.dz)) - .WhereIF(!string.IsNullOrEmpty(input.yx), p => p.Yx.Contains(input.yx)) - .WhereIF(!string.IsNullOrEmpty(input.wx), p => p.Wx.Contains(input.wx)) - .Select(it => new LqTkXscListOutput - { - id = it.Id, - tjsj = it.Tjsj, - tkry = it.Tkry, - gkxm = it.Gkxm, - dhhm = it.Dhhm, - gmzs = it.Gmzs, - zffs = it.Zffs, - sfjwx = it.Sfjwx, - bz = it.Bz, - xb = it.Xb, - sr = it.Sr, - dz = it.Dz, - yx = it.Yx, - wx = it.Wx, - }) - .MergeTable() - .OrderBy(sidx + " " + input.sort) - .ToPagedListAsync(input.currentPage, input.pageSize); - return PageResult.SqlSugarPageResult(data); - } - - /// - /// 新建线索池 - /// - /// 参数 - /// - [HttpPost("")] - public async Task Create([FromBody] LqTkXscCrInput 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); - } - - /// - /// 获取线索池无分页列表 - /// - /// 请求参数 - /// - [NonAction] - public async Task GetNoPagingList([FromQuery] LqTkXscListQueryInput input) - { - var sidx = input.sidx == null ? "id" : input.sidx; - List queryTjsj = input.tjsj != null ? input.tjsj.Split(',').ToObeject>() : null; - DateTime? startTjsj = queryTjsj != null ? Ext.GetDateTime(queryTjsj.First()) : null; - DateTime? endTjsj = queryTjsj != null ? Ext.GetDateTime(queryTjsj.Last()) : null; - List querySr = input.sr != null ? input.sr.Split(',').ToObeject>() : null; - DateTime? startSr = querySr != null ? Ext.GetDateTime(querySr.First()) : null; - DateTime? endSr = querySr != null ? Ext.GetDateTime(querySr.Last()) : null; - var data = await _db.Queryable() - .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id)) - .WhereIF(queryTjsj != null, p => p.Tjsj >= new DateTime(startTjsj.ToDate().Year, startTjsj.ToDate().Month, startTjsj.ToDate().Day, 0, 0, 0)) - .WhereIF(queryTjsj != null, p => p.Tjsj <= new DateTime(endTjsj.ToDate().Year, endTjsj.ToDate().Month, endTjsj.ToDate().Day, 23, 59, 59)) - .WhereIF(!string.IsNullOrEmpty(input.tkry), p => p.Tkry.Contains(input.tkry)) - .WhereIF(!string.IsNullOrEmpty(input.gkxm), p => p.Gkxm.Contains(input.gkxm)) - .WhereIF(!string.IsNullOrEmpty(input.dhhm), p => p.Dhhm.Contains(input.dhhm)) - .WhereIF(!string.IsNullOrEmpty(input.gmzs), p => p.Gmzs.Equals(input.gmzs)) - .WhereIF(!string.IsNullOrEmpty(input.zffs), p => p.Zffs.Equals(input.zffs)) - .WhereIF(!string.IsNullOrEmpty(input.sfjwx), p => p.Sfjwx.Equals(input.sfjwx)) - .WhereIF(!string.IsNullOrEmpty(input.bz), p => p.Bz.Contains(input.bz)) - .WhereIF(!string.IsNullOrEmpty(input.xb), p => p.Xb.Equals(input.xb)) - .WhereIF(querySr != null, p => p.Sr >= new DateTime(startSr.ToDate().Year, startSr.ToDate().Month, startSr.ToDate().Day, 0, 0, 0)) - .WhereIF(querySr != null, p => p.Sr <= new DateTime(endSr.ToDate().Year, endSr.ToDate().Month, endSr.ToDate().Day, 23, 59, 59)) - .WhereIF(!string.IsNullOrEmpty(input.dz), p => p.Dz.Contains(input.dz)) - .WhereIF(!string.IsNullOrEmpty(input.yx), p => p.Yx.Contains(input.yx)) - .WhereIF(!string.IsNullOrEmpty(input.wx), p => p.Wx.Contains(input.wx)) - .Select(it => new LqTkXscListOutput - { - id = it.Id, - tjsj = it.Tjsj, - tkry = it.Tkry, - gkxm = it.Gkxm, - dhhm = it.Dhhm, - gmzs = it.Gmzs, - zffs = it.Zffs, - sfjwx = it.Sfjwx, - bz = it.Bz, - xb = it.Xb, - sr = it.Sr, - dz = it.Dz, - yx = it.Yx, - wx = it.Wx, - }) - .MergeTable() - .OrderBy(sidx + " " + input.sort) - .ToListAsync(); - return data; - } - - /// - /// 导出线索池 - /// - /// 请求参数 - /// - [HttpGet("Actions/Export")] - public async Task Export([FromQuery] LqTkXscListQueryInput 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\":\"tjsj\"},{\"value\":\"拓客人员\",\"field\":\"tkry\"},{\"value\":\"顾客姓名\",\"field\":\"gkxm\"},{\"value\":\"电话号码\",\"field\":\"dhhm\"},{\"value\":\"购买张数\",\"field\":\"gmzs\"},{\"value\":\"支付方式\",\"field\":\"zffs\"},{\"value\":\"是否加微信\",\"field\":\"sfjwx\"},{\"value\":\"备注\",\"field\":\"bz\"},{\"value\":\"性别\",\"field\":\"xb\"},{\"value\":\"生日\",\"field\":\"sr\"},{\"value\":\"地址\",\"field\":\"dz\"},{\"value\":\"邮箱\",\"field\":\"yx\"},{\"value\":\"微信\",\"field\":\"wx\"},]".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] LqTkXscUpInput 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/LqTkjlbService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs index f2b4fd6..eb22cfa 100644 --- a/netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs +++ b/netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs @@ -21,7 +21,6 @@ using NCC.Extend.Entitys.lq_event; using NCC.Extend.Entitys.lq_eventuser; using NCC.Extend.Entitys.lq_khxx; using NCC.Extend.Entitys.lq_mdxx; -using NCC.Extend.Entitys.lq_ryzl; using NCC.Extend.Entitys.lq_tkjlb; using NCC.Extend.Interfaces.LqTkjlb; using NCC.FriendlyException; -- libgit2 0.21.4