Commit 759f9f27d86ce1d7d72d74f16f54028c8ea4ecb4

Authored by “wangming”
1 parent 7f83b333

123321

Showing 20 changed files with 3139 additions and 114 deletions
add_first_upgrade_performance_fields.sql 0 → 100644
  1 +-- 为个人业绩统计表添加首单业绩和升单业绩字段
  2 +ALTER TABLE lq_statistics_personal_performance
  3 +ADD COLUMN F_FirstOrderPerformance decimal(18,2) DEFAULT '0.00' COMMENT '首单业绩' AFTER F_UpgradeOrderCount,
  4 +ADD COLUMN F_UpgradeOrderPerformance decimal(18,2) DEFAULT '0.00' COMMENT '升单业绩' AFTER F_FirstOrderPerformance;
  5 +
  6 +-- 为门店总业绩统计表添加首单业绩和升单业绩字段
  7 +ALTER TABLE lq_statistics_store_total_performance
  8 +ADD COLUMN F_FirstOrderPerformance decimal(18,2) DEFAULT '0.00' COMMENT '首单业绩' AFTER F_UpgradeOrderCount,
  9 +ADD COLUMN F_UpgradeOrderPerformance decimal(18,2) DEFAULT '0.00' COMMENT '升单业绩' AFTER F_FirstOrderPerformance;
  10 +
  11 +-- 为工资统计表添加首单业绩和升单业绩字段
  12 +ALTER TABLE lq_salary_statistics
  13 +ADD COLUMN F_FirstOrderPerformance decimal(18,2) DEFAULT '0.00' COMMENT '首单业绩' AFTER F_UpgradePerformance,
  14 +ADD COLUMN F_UpgradeOrderPerformance decimal(18,2) DEFAULT '0.00' COMMENT '升单业绩' AFTER F_FirstOrderPerformance;
... ...
antis-ncc-admin/src/api/extend/salaryCalculation.js
... ... @@ -44,3 +44,30 @@ export function saveDepartmentConsumePerformanceStatistics(statisticsMonth) {
44 44 data: { statisticsMonth }
45 45 })
46 46 }
  47 +
  48 +// 保存门店总业绩统计数据
  49 +export function saveStoreTotalPerformanceStatistics(statisticsMonth) {
  50 + return request({
  51 + url: '/api/Extend/LqStatistics/save-store-total-performance-stats',
  52 + method: 'POST',
  53 + data: { statisticsMonth }
  54 + })
  55 +}
  56 +
  57 +// 保存工资统计数据
  58 +export function saveSalaryStatistics(statisticsMonth) {
  59 + return request({
  60 + url: '/api/Extend/LqStatistics/save-salary-statistics',
  61 + method: 'POST',
  62 + data: { statisticsMonth }
  63 + })
  64 +}
  65 +
  66 +// 获取工资统计列表
  67 +export function getSalaryStatisticsList(params) {
  68 + return request({
  69 + url: '/api/Extend/LqStatistics/get-salary-statistics-list',
  70 + method: 'POST',
  71 + data: params
  72 + })
  73 +}
... ...
antis-ncc-admin/src/router/modules/base.js
... ... @@ -75,6 +75,28 @@ const baseRouter = [{
75 75 zhTitle: '拓客活动',
76 76 icon: 'icon-ym icon-ym-s-data',
77 77 }
  78 + },
  79 + {
  80 + path: '/salaryCalculation',
  81 + component: (resolve) => require(['@/views/salaryCalculation/index'], resolve),
  82 + name: 'salaryCalculation',
  83 + meta: {
  84 + title: 'salaryCalculation',
  85 + affix: false,
  86 + zhTitle: '工资计算',
  87 + icon: 'icon-ym icon-ym-money',
  88 + }
  89 + },
  90 + {
  91 + path: '/salaryStatistics',
  92 + component: (resolve) => require(['@/views/salaryStatistics/index'], resolve),
  93 + name: 'salaryStatistics',
  94 + meta: {
  95 + title: 'salaryStatistics',
  96 + affix: false,
  97 + zhTitle: '工资统计',
  98 + icon: 'icon-ym icon-ym-s-data',
  99 + }
78 100 }
79 101 ]
80 102 export default baseRouter
81 103 \ No newline at end of file
... ...
antis-ncc-admin/src/views/salaryCalculation/index.vue
... ... @@ -134,6 +134,38 @@
134 134 </el-button>
135 135 </div>
136 136  
  137 + <div class="stat-item red-item">
  138 + <div class="stat-header">
  139 + <i class="el-icon-s-finance"></i>
  140 + <span>门店总业绩</span>
  141 + </div>
  142 + <el-button
  143 + type="danger"
  144 + :loading="loadingStates.storeTotalPerformance"
  145 + @click="handleStoreTotalPerformanceStatistics"
  146 + class="stat-button"
  147 + :disabled="!statisticsMonth"
  148 + >
  149 + 立即统计
  150 + </el-button>
  151 + </div>
  152 +
  153 + <div class="stat-item gold-item">
  154 + <div class="stat-header">
  155 + <i class="el-icon-money"></i>
  156 + <span>工资统计</span>
  157 + </div>
  158 + <el-button
  159 + type="warning"
  160 + :loading="loadingStates.salaryStatistics"
  161 + @click="handleSalaryStatistics"
  162 + class="stat-button"
  163 + :disabled="!statisticsMonth"
  164 + >
  165 + 立即统计
  166 + </el-button>
  167 + </div>
  168 +
137 169 <!-- 预留位置,用于未来添加更多统计方法 -->
138 170 <div class="stat-item placeholder-item">
139 171 <div class="stat-header">
... ... @@ -172,9 +204,14 @@
172 204 <el-card class="box-card result-card">
173 205 <div slot="header" class="clearfix">
174 206 <span><i class="el-icon-document"></i> 统计结果</span>
175   - <el-button type="text" @click="clearResults">
176   - <i class="el-icon-delete"></i> 清空
177   - </el-button>
  207 + <div>
  208 + <el-button type="success" size="mini" @click="goToSalaryPage">
  209 + <i class="el-icon-view"></i> 查看工资统计
  210 + </el-button>
  211 + <el-button type="text" @click="clearResults">
  212 + <i class="el-icon-delete"></i> 清空
  213 + </el-button>
  214 + </div>
178 215 </div>
179 216 <div class="result-list" ref="resultList">
180 217 <div v-if="results.length === 0" class="no-results">
... ... @@ -203,7 +240,9 @@ import {
203 240 savePersonalPerformanceStatistics,
204 241 saveTechPerformanceStatistics,
205 242 saveStoreConsumePerformanceStatistics,
206   - saveDepartmentConsumePerformanceStatistics
  243 + saveDepartmentConsumePerformanceStatistics,
  244 + saveStoreTotalPerformanceStatistics,
  245 + saveSalaryStatistics
207 246 } from '@/api/extend/salaryCalculation'
208 247  
209 248 export default {
... ... @@ -216,7 +255,9 @@ export default {
216 255 personalPerformance: false,
217 256 techPerformance: false,
218 257 storeConsumePerformance: false,
219   - departmentConsumePerformance: false
  258 + departmentConsumePerformance: false,
  259 + storeTotalPerformance: false,
  260 + salaryStatistics: false
220 261 },
221 262 results: [], // 存储统计结果,最多保留10条
222 263 isCalculating: false, // 一键计算状态
... ... @@ -292,6 +333,16 @@ export default {
292 333 name: '个人消耗业绩统计',
293 334 method: 'handleDepartmentConsumePerformanceStatistics',
294 335 type: 'department-consume-performance'
  336 + },
  337 + {
  338 + name: '门店总业绩统计',
  339 + method: 'handleStoreTotalPerformanceStatistics',
  340 + type: 'store-total-performance'
  341 + },
  342 + {
  343 + name: '工资统计',
  344 + method: 'handleSalaryStatistics',
  345 + type: 'salary-statistics'
295 346 }
296 347 ]
297 348  
... ... @@ -520,6 +571,72 @@ export default {
520 571 } finally {
521 572 this.loadingStates.departmentConsumePerformance = false
522 573 }
  574 + },
  575 +
  576 + // 门店总业绩统计
  577 + async handleStoreTotalPerformanceStatistics() {
  578 + this.loadingStates.storeTotalPerformance = true
  579 + try {
  580 + const response = await saveStoreTotalPerformanceStatistics(this.statisticsMonth)
  581 + this.addResult({
  582 + type: 'store-total-performance',
  583 + title: '门店总业绩统计',
  584 + success: true,
  585 + data: response.data,
  586 + time: new Date().toLocaleString()
  587 + })
  588 + this.$message.success('门店总业绩统计完成')
  589 + } catch (error) {
  590 + this.addResult({
  591 + type: 'store-total-performance',
  592 + title: '门店总业绩统计',
  593 + success: false,
  594 + data: error.message || '统计失败',
  595 + time: new Date().toLocaleString()
  596 + })
  597 + this.$message.error('门店总业绩统计失败')
  598 + throw error
  599 + } finally {
  600 + this.loadingStates.storeTotalPerformance = false
  601 + }
  602 + },
  603 +
  604 + // 工资统计
  605 + async handleSalaryStatistics() {
  606 + this.loadingStates.salaryStatistics = true
  607 + try {
  608 + const response = await saveSalaryStatistics(this.statisticsMonth)
  609 + this.addResult({
  610 + type: 'salary-statistics',
  611 + title: '工资统计',
  612 + success: true,
  613 + data: response.data,
  614 + time: new Date().toLocaleString()
  615 + })
  616 + this.$message.success('工资统计完成')
  617 + } catch (error) {
  618 + this.addResult({
  619 + type: 'salary-statistics',
  620 + title: '工资统计',
  621 + success: false,
  622 + data: error.message || '统计失败',
  623 + time: new Date().toLocaleString()
  624 + })
  625 + this.$message.error('工资统计失败')
  626 + throw error
  627 + } finally {
  628 + this.loadingStates.salaryStatistics = false
  629 + }
  630 + },
  631 +
  632 + // 跳转到工资统计页面
  633 + goToSalaryPage() {
  634 + this.$router.push({
  635 + path: '/salaryStatistics',
  636 + query: {
  637 + month: this.statisticsMonth
  638 + }
  639 + })
523 640 }
524 641 }
525 642 }
... ... @@ -706,6 +823,16 @@ export default {
706 823 .stat-header i { color: #17A2B8; }
707 824 }
708 825  
  826 + &.red-item {
  827 + border-color: #F56C6C;
  828 + .stat-header i { color: #F56C6C; }
  829 + }
  830 +
  831 + &.gold-item {
  832 + border-color: #E6A23C;
  833 + .stat-header i { color: #E6A23C; }
  834 + }
  835 +
709 836 &.placeholder-item {
710 837 border-color: #C0C4CC;
711 838 background: #f5f7fa;
... ...
antis-ncc-admin/src/views/salaryStatistics/index.vue 0 → 100644
  1 +<template>
  2 + <div class="salary-statistics-container">
  3 + <!-- 查询条件 -->
  4 + <el-card class="box-card search-card">
  5 + <div slot="header" class="clearfix">
  6 + <span><i class="el-icon-search"></i> 查询条件</span>
  7 + </div>
  8 + <el-form :model="queryForm" :inline="true" size="small">
  9 + <el-form-item label="统计月份">
  10 + <el-date-picker v-model="queryForm.statisticsMonth" type="month" placeholder="选择月份" format="yyyy年MM月"
  11 + value-format="yyyyMM" clearable>
  12 + </el-date-picker>
  13 + </el-form-item>
  14 + <el-form-item label="门店名称">
  15 + <el-input v-model="queryForm.storeName" placeholder="请输入门店名称" clearable>
  16 + </el-input>
  17 + </el-form-item>
  18 + <el-form-item label="员工姓名">
  19 + <el-input v-model="queryForm.employeeName" placeholder="请输入员工姓名" clearable>
  20 + </el-input>
  21 + </el-form-item>
  22 + <el-form-item label="核算岗位">
  23 + <el-select v-model="queryForm.position" placeholder="请选择岗位" clearable>
  24 + <el-option label="健康师" value="健康师"></el-option>
  25 + <el-option label="店助" value="店助"></el-option>
  26 + <el-option label="店长" value="店长"></el-option>
  27 + <el-option label="主任" value="主任"></el-option>
  28 + <el-option label="总经理" value="总经理"></el-option>
  29 + <el-option label="经理" value="经理"></el-option>
  30 + <el-option label="科技部老师" value="科技部老师"></el-option>
  31 + <el-option label="顾问" value="顾问"></el-option>
  32 + </el-select>
  33 + </el-form-item>
  34 + <el-form-item label="是否锁定">
  35 + <el-select v-model="queryForm.isLocked" placeholder="请选择锁定状态" clearable>
  36 + <el-option label="未锁定" :value="0"></el-option>
  37 + <el-option label="已锁定" :value="1"></el-option>
  38 + </el-select>
  39 + </el-form-item>
  40 + <el-form-item>
  41 + <el-button type="primary" @click="handleSearch" :loading="loading">
  42 + <i class="el-icon-search"></i> 查询
  43 + </el-button>
  44 + <el-button @click="handleReset">
  45 + <i class="el-icon-refresh"></i> 重置
  46 + </el-button>
  47 + </el-form-item>
  48 + </el-form>
  49 + </el-card>
  50 +
  51 + <!-- 数据表格 -->
  52 + <el-card class="box-card table-card">
  53 + <div slot="header" class="clearfix">
  54 + <span><i class="el-icon-s-data"></i> 工资统计列表</span>
  55 + </div>
  56 +
  57 + <el-table :data="tableData" v-loading="loading" stripe border height="600" :summary-method="getSummaries"
  58 + show-summary>
  59 + <el-table-column prop="EmployeeName" label="员工姓名" width="100" fixed="left"></el-table-column>
  60 + <el-table-column prop="StoreName" label="门店名称" width="120" fixed="left"></el-table-column>
  61 + <el-table-column prop="Position" label="岗位" width="100"></el-table-column>
  62 + <el-table-column prop="GoldTriangleTeam" label="金三角战队" width="120"></el-table-column>
  63 +
  64 + <!-- 业绩相关 -->
  65 + <el-table-column prop="TotalPerformance" label="总业绩" width="100" align="right">
  66 + <template slot-scope="scope">
  67 + {{ formatMoney(scope.row.TotalPerformance) }}
  68 + </template>
  69 + </el-table-column>
  70 + <el-table-column prop="BasePerformance" label="基础业绩" width="100" align="right">
  71 + <template slot-scope="scope">
  72 + {{ formatMoney(scope.row.BasePerformance) }}
  73 + </template>
  74 + </el-table-column>
  75 + <el-table-column prop="CooperationPerformance" label="合作业绩" width="100" align="right">
  76 + <template slot-scope="scope">
  77 + {{ formatMoney(scope.row.CooperationPerformance) }}
  78 + </template>
  79 + </el-table-column>
  80 + <el-table-column prop="NewCustomerPerformance" label="新客业绩" width="100" align="right">
  81 + <template slot-scope="scope">
  82 + {{ formatMoney(scope.row.NewCustomerPerformance) }}
  83 + </template>
  84 + </el-table-column>
  85 + <el-table-column prop="UpgradePerformance" label="升单业绩" width="100" align="right">
  86 + <template slot-scope="scope">
  87 + {{ formatMoney(scope.row.UpgradePerformance) }}
  88 + </template>
  89 + </el-table-column>
  90 + <el-table-column prop="ProjectCount" label="项目数" width="80" align="right"></el-table-column>
  91 + <el-table-column prop="StoreTotalPerformance" label="门店总业绩" width="120" align="right">
  92 + <template slot-scope="scope">
  93 + {{ formatMoney(scope.row.StoreTotalPerformance) }}
  94 + </template>
  95 + </el-table-column>
  96 + <el-table-column prop="TeamPerformance" label="队伍业绩" width="100" align="right">
  97 + <template slot-scope="scope">
  98 + {{ formatMoney(scope.row.TeamPerformance) }}
  99 + </template>
  100 + </el-table-column>
  101 + <el-table-column prop="PerformanceRatio" label="占比" width="80" align="right">
  102 + <template slot-scope="scope">
  103 + {{ formatPercent(scope.row.PerformanceRatio) }}
  104 + </template>
  105 + </el-table-column>
  106 + <el-table-column prop="NewCustomerConversionRate" label="新客成交率" width="100" align="right">
  107 + <template slot-scope="scope">
  108 + {{ formatPercent(scope.row.NewCustomerConversionRate) }}
  109 + </template>
  110 + </el-table-column>
  111 + <el-table-column prop="NewCustomerPoint" label="新客提点" width="100" align="right">
  112 + <template slot-scope="scope">
  113 + {{ formatPercent(scope.row.NewCustomerPoint) }}
  114 + </template>
  115 + </el-table-column>
  116 + <el-table-column prop="UpgradePoint" label="升单提点" width="100" align="right">
  117 + <template slot-scope="scope">
  118 + {{ formatPercent(scope.row.UpgradePoint) }}
  119 + </template>
  120 + </el-table-column>
  121 + <el-table-column prop="TraceabilityPerformance" label="溯源业绩" width="100" align="right">
  122 + <template slot-scope="scope">
  123 + {{ formatMoney(scope.row.TraceabilityPerformance) }}
  124 + </template>
  125 + </el-table-column>
  126 + <el-table-column prop="CellPerformance" label="cell业绩" width="100" align="right">
  127 + <template slot-scope="scope">
  128 + {{ formatMoney(scope.row.CellPerformance) }}
  129 + </template>
  130 + </el-table-column>
  131 + <el-table-column prop="ProjectOnePerformance" label="大项目一部业绩" width="120" align="right">
  132 + <template slot-scope="scope">
  133 + {{ formatMoney(scope.row.ProjectOnePerformance) }}
  134 + </template>
  135 + </el-table-column>
  136 + <el-table-column prop="ProjectTwoPerformance" label="大项目二部业绩" width="120" align="right">
  137 + <template slot-scope="scope">
  138 + {{ formatMoney(scope.row.ProjectTwoPerformance) }}
  139 + </template>
  140 + </el-table-column>
  141 + <el-table-column prop="MonthlyPerformance" label="当月业绩" width="100" align="right">
  142 + <template slot-scope="scope">
  143 + {{ formatMoney(scope.row.MonthlyPerformance) }}
  144 + </template>
  145 + </el-table-column>
  146 +
  147 + <!-- 成本相关 -->
  148 + <el-table-column prop="PropertyWaterElectricity" label="物业水电" width="100" align="right">
  149 + <template slot-scope="scope">
  150 + {{ formatMoney(scope.row.PropertyWaterElectricity) }}
  151 + </template>
  152 + </el-table-column>
  153 + <el-table-column prop="StoreExpense" label="门店支出" width="100" align="right">
  154 + <template slot-scope="scope">
  155 + {{ formatMoney(scope.row.StoreExpense) }}
  156 + </template>
  157 + </el-table-column>
  158 + <el-table-column prop="ProductMaterial" label="产品物料" width="100" align="right">
  159 + <template slot-scope="scope">
  160 + {{ formatMoney(scope.row.ProductMaterial) }}
  161 + </template>
  162 + </el-table-column>
  163 + <el-table-column prop="MicroSculptureCost" label="微雕成本" width="100" align="right">
  164 + <template slot-scope="scope">
  165 + {{ formatMoney(scope.row.MicroSculptureCost) }}
  166 + </template>
  167 + </el-table-column>
  168 + <el-table-column prop="OtherCooperationCost" label="其它合作成本" width="120" align="right">
  169 + <template slot-scope="scope">
  170 + {{ formatMoney(scope.row.OtherCooperationCost) }}
  171 + </template>
  172 + </el-table-column>
  173 + <el-table-column prop="TowelWashing" label="洗毛巾" width="100" align="right">
  174 + <template slot-scope="scope">
  175 + {{ formatMoney(scope.row.TowelWashing) }}
  176 + </template>
  177 + </el-table-column>
  178 + <el-table-column prop="GrossProfit" label="毛利" width="100" align="right">
  179 + <template slot-scope="scope">
  180 + {{ formatMoney(scope.row.GrossProfit) }}
  181 + </template>
  182 + </el-table-column>
  183 +
  184 + <!-- 提成相关 -->
  185 + <el-table-column prop="GeneralManagerCommission" label="总经理提成额" width="120" align="right">
  186 + <template slot-scope="scope">
  187 + {{ formatMoney(scope.row.GeneralManagerCommission) }}
  188 + </template>
  189 + </el-table-column>
  190 + <el-table-column prop="ManagerCommission" label="经理提成额" width="100" align="right">
  191 + <template slot-scope="scope">
  192 + {{ formatMoney(scope.row.ManagerCommission) }}
  193 + </template>
  194 + </el-table-column>
  195 + <el-table-column prop="Consumption" label="消耗" width="100" align="right">
  196 + <template slot-scope="scope">
  197 + {{ formatMoney(scope.row.Consumption) }}
  198 + </template>
  199 + </el-table-column>
  200 + <el-table-column prop="AttendanceDays" label="到店人头" width="100" align="right"></el-table-column>
  201 + <el-table-column prop="StoreDays" label="在店天数" width="100" align="right"></el-table-column>
  202 + <el-table-column prop="LeaveDays" label="请假天数" width="100" align="right"></el-table-column>
  203 + <el-table-column prop="CommissionPoint" label="提点" width="80" align="right">
  204 + <template slot-scope="scope">
  205 + {{ formatPercent(scope.row.CommissionPoint) }}
  206 + </template>
  207 + </el-table-column>
  208 + <el-table-column prop="BasePerformanceCommission" label="基础业绩提成" width="120" align="right">
  209 + <template slot-scope="scope">
  210 + {{ formatMoney(scope.row.BasePerformanceCommission) }}
  211 + </template>
  212 + </el-table-column>
  213 + <el-table-column prop="CooperationPerformanceCommission" label="合作业绩提成" width="120" align="right">
  214 + <template slot-scope="scope">
  215 + {{ formatMoney(scope.row.CooperationPerformanceCommission) }}
  216 + </template>
  217 + </el-table-column>
  218 + <el-table-column prop="ConsultantCommission" label="顾问提成" width="100" align="right">
  219 + <template slot-scope="scope">
  220 + {{ formatMoney(scope.row.ConsultantCommission) }}
  221 + </template>
  222 + </el-table-column>
  223 + <el-table-column prop="StoreTAreaCommission" label="门店T区提成" width="120" align="right">
  224 + <template slot-scope="scope">
  225 + {{ formatMoney(scope.row.StoreTAreaCommission) }}
  226 + </template>
  227 + </el-table-column>
  228 + <el-table-column prop="AssistantCommission1" label="店助提成" width="100" align="right">
  229 + <template slot-scope="scope">
  230 + {{ formatMoney(scope.row.AssistantCommission1) }}
  231 + </template>
  232 + </el-table-column>
  233 + <el-table-column prop="AssistantDirectorCommission" label="店助主任提成" width="120" align="right">
  234 + <template slot-scope="scope">
  235 + {{ formatMoney(scope.row.AssistantDirectorCommission) }}
  236 + </template>
  237 + </el-table-column>
  238 + <el-table-column prop="DirectorCommission" label="主任提成" width="100" align="right">
  239 + <template slot-scope="scope">
  240 + {{ formatMoney(scope.row.DirectorCommission) }}
  241 + </template>
  242 + </el-table-column>
  243 + <el-table-column prop="AssistantCommission2" label="店长提成" width="100" align="right">
  244 + <template slot-scope="scope">
  245 + {{ formatMoney(scope.row.AssistantCommission2) }}
  246 + </template>
  247 + </el-table-column>
  248 + <el-table-column prop="GeneralManagerCommissionAmount" label="总经理提成" width="120" align="right">
  249 + <template slot-scope="scope">
  250 + {{ formatMoney(scope.row.GeneralManagerCommissionAmount) }}
  251 + </template>
  252 + </el-table-column>
  253 + <el-table-column prop="ManagerCommissionAmount" label="经理提成" width="100" align="right">
  254 + <template slot-scope="scope">
  255 + {{ formatMoney(scope.row.ManagerCommissionAmount) }}
  256 + </template>
  257 + </el-table-column>
  258 + <el-table-column prop="PerformanceCommission" label="业绩提成" width="100" align="right">
  259 + <template slot-scope="scope">
  260 + {{ formatMoney(scope.row.PerformanceCommission) }}
  261 + </template>
  262 + </el-table-column>
  263 + <el-table-column prop="ConsumptionCommission" label="消耗提成" width="100" align="right">
  264 + <template slot-scope="scope">
  265 + {{ formatMoney(scope.row.ConsumptionCommission) }}
  266 + </template>
  267 + </el-table-column>
  268 + <el-table-column prop="TechGroupLeaderCommission" label="科技部组长提成" width="120" align="right">
  269 + <template slot-scope="scope">
  270 + {{ formatMoney(scope.row.TechGroupLeaderCommission) }}
  271 + </template>
  272 + </el-table-column>
  273 + <el-table-column prop="TraceabilityCommission" label="溯源提成" width="100" align="right">
  274 + <template slot-scope="scope">
  275 + {{ formatMoney(scope.row.TraceabilityCommission) }}
  276 + </template>
  277 + </el-table-column>
  278 + <el-table-column prop="CellCommission" label="cell提成" width="100" align="right">
  279 + <template slot-scope="scope">
  280 + {{ formatMoney(scope.row.CellCommission) }}
  281 + </template>
  282 + </el-table-column>
  283 + <el-table-column prop="ProjectCommission" label="大项目部提成" width="120" align="right">
  284 + <template slot-scope="scope">
  285 + {{ formatMoney(scope.row.ProjectCommission) }}
  286 + </template>
  287 + </el-table-column>
  288 + <el-table-column prop="CommissionTotal" label="提成合计" width="100" align="right">
  289 + <template slot-scope="scope">
  290 + {{ formatMoney(scope.row.CommissionTotal) }}
  291 + </template>
  292 + </el-table-column>
  293 +
  294 + <!-- 底薪相关 -->
  295 + <el-table-column prop="HealthCoachBaseSalary" label="健康师底薪" width="120" align="right">
  296 + <template slot-scope="scope">
  297 + {{ formatMoney(scope.row.HealthCoachBaseSalary) }}
  298 + </template>
  299 + </el-table-column>
  300 + <el-table-column prop="AssistantBaseSalary" label="店助底薪" width="100" align="right">
  301 + <template slot-scope="scope">
  302 + {{ formatMoney(scope.row.AssistantBaseSalary) }}
  303 + </template>
  304 + </el-table-column>
  305 + <el-table-column prop="ManagerBaseSalary" label="店长底薪" width="100" align="right">
  306 + <template slot-scope="scope">
  307 + {{ formatMoney(scope.row.ManagerBaseSalary) }}
  308 + </template>
  309 + </el-table-column>
  310 + <el-table-column prop="DirectorBaseSalary" label="主任底薪" width="100" align="right">
  311 + <template slot-scope="scope">
  312 + {{ formatMoney(scope.row.DirectorBaseSalary) }}
  313 + </template>
  314 + </el-table-column>
  315 + <el-table-column prop="AssistantDirectorBaseSalary" label="店助主任底薪" width="120" align="right">
  316 + <template slot-scope="scope">
  317 + {{ formatMoney(scope.row.AssistantDirectorBaseSalary) }}
  318 + </template>
  319 + </el-table-column>
  320 + <el-table-column prop="GeneralManagerBaseSalary" label="总经理底薪" width="120" align="right">
  321 + <template slot-scope="scope">
  322 + {{ formatMoney(scope.row.GeneralManagerBaseSalary) }}
  323 + </template>
  324 + </el-table-column>
  325 + <el-table-column prop="ManagerBaseSalaryAmount" label="经理底薪" width="100" align="right">
  326 + <template slot-scope="scope">
  327 + {{ formatMoney(scope.row.ManagerBaseSalaryAmount) }}
  328 + </template>
  329 + </el-table-column>
  330 + <el-table-column prop="TechTeacherBaseSalary" label="科技部老师底薪" width="120" align="right">
  331 + <template slot-scope="scope">
  332 + {{ formatMoney(scope.row.TechTeacherBaseSalary) }}
  333 + </template>
  334 + </el-table-column>
  335 + <el-table-column prop="ProjectBaseSalary" label="大项目部底薪" width="120" align="right">
  336 + <template slot-scope="scope">
  337 + {{ formatMoney(scope.row.ProjectBaseSalary) }}
  338 + </template>
  339 + </el-table-column>
  340 + <el-table-column prop="BaseSalaryTotal" label="底薪合计" width="100" align="right">
  341 + <template slot-scope="scope">
  342 + {{ formatMoney(scope.row.BaseSalaryTotal) }}
  343 + </template>
  344 + </el-table-column>
  345 +
  346 + <!-- 其他收入 -->
  347 + <el-table-column prop="ManualWork" label="手工" width="100" align="right">
  348 + <template slot-scope="scope">
  349 + {{ formatMoney(scope.row.ManualWork) }}
  350 + </template>
  351 + </el-table-column>
  352 + <el-table-column prop="HeadCountReward" label="人头奖励" width="100" align="right">
  353 + <template slot-scope="scope">
  354 + {{ formatMoney(scope.row.HeadCountReward) }}
  355 + </template>
  356 + </el-table-column>
  357 + <el-table-column prop="PhoneManagement" label="手机管理" width="100" align="right">
  358 + <template slot-scope="scope">
  359 + {{ formatMoney(scope.row.PhoneManagement) }}
  360 + </template>
  361 + </el-table-column>
  362 + <el-table-column prop="CarAllowance" label="车补" width="100" align="right">
  363 + <template slot-scope="scope">
  364 + {{ formatMoney(scope.row.CarAllowance) }}
  365 + </template>
  366 + </el-table-column>
  367 + <el-table-column prop="LessRest" label="少休" width="100" align="right">
  368 + <template slot-scope="scope">
  369 + {{ formatMoney(scope.row.LessRest) }}
  370 + </template>
  371 + </el-table-column>
  372 + <el-table-column prop="FullAttendance" label="全勤" width="100" align="right">
  373 + <template slot-scope="scope">
  374 + {{ formatMoney(scope.row.FullAttendance) }}
  375 + </template>
  376 + </el-table-column>
  377 + <el-table-column prop="CalculatedGrossSalary" label="核算应发工资" width="120" align="right">
  378 + <template slot-scope="scope">
  379 + {{ formatMoney(scope.row.CalculatedGrossSalary) }}
  380 + </template>
  381 + </el-table-column>
  382 +
  383 + <!-- 保底相关 -->
  384 + <el-table-column prop="Guarantee" label="保底" width="100" align="right">
  385 + <template slot-scope="scope">
  386 + {{ formatMoney(scope.row.Guarantee) }}
  387 + </template>
  388 + </el-table-column>
  389 + <el-table-column prop="GuaranteeLeave" label="保底请假" width="100" align="right">
  390 + <template slot-scope="scope">
  391 + {{ formatMoney(scope.row.GuaranteeLeave) }}
  392 + </template>
  393 + </el-table-column>
  394 + <el-table-column prop="GuaranteeBaseSalary" label="保底底薪" width="100" align="right">
  395 + <template slot-scope="scope">
  396 + {{ formatMoney(scope.row.GuaranteeBaseSalary) }}
  397 + </template>
  398 + </el-table-column>
  399 + <el-table-column prop="GuaranteeSupplement" label="保底补差" width="100" align="right">
  400 + <template slot-scope="scope">
  401 + {{ formatMoney(scope.row.GuaranteeSupplement) }}
  402 + </template>
  403 + </el-table-column>
  404 + <el-table-column prop="FinalGrossSalary" label="最终应发工资" width="120" align="right">
  405 + <template slot-scope="scope">
  406 + {{ formatMoney(scope.row.FinalGrossSalary) }}
  407 + </template>
  408 + </el-table-column>
  409 +
  410 + <!-- 补贴相关 -->
  411 + <el-table-column prop="MonthlyTrainingSubsidy" label="当月培训补贴" width="120" align="right">
  412 + <template slot-scope="scope">
  413 + {{ formatMoney(scope.row.MonthlyTrainingSubsidy) }}
  414 + </template>
  415 + </el-table-column>
  416 + <el-table-column prop="MonthlyTransportSubsidy" label="当月交通补贴" width="120" align="right">
  417 + <template slot-scope="scope">
  418 + {{ formatMoney(scope.row.MonthlyTransportSubsidy) }}
  419 + </template>
  420 + </el-table-column>
  421 + <el-table-column prop="LastMonthTrainingSubsidy" label="上月培训补贴" width="120" align="right">
  422 + <template slot-scope="scope">
  423 + {{ formatMoney(scope.row.LastMonthTrainingSubsidy) }}
  424 + </template>
  425 + </el-table-column>
  426 + <el-table-column prop="LastMonthTransportSubsidy" label="上月交通补贴" width="120" align="right">
  427 + <template slot-scope="scope">
  428 + {{ formatMoney(scope.row.LastMonthTransportSubsidy) }}
  429 + </template>
  430 + </el-table-column>
  431 + <el-table-column prop="SubsidyTotal" label="补贴合计" width="100" align="right">
  432 + <template slot-scope="scope">
  433 + {{ formatMoney(scope.row.SubsidyTotal) }}
  434 + </template>
  435 + </el-table-column>
  436 +
  437 + <!-- 扣款相关 -->
  438 + <el-table-column prop="MissingCard" label="缺卡" width="100" align="right">
  439 + <template slot-scope="scope">
  440 + {{ formatMoney(scope.row.MissingCard) }}
  441 + </template>
  442 + </el-table-column>
  443 + <el-table-column prop="Late" label="迟到" width="100" align="right">
  444 + <template slot-scope="scope">
  445 + {{ formatMoney(scope.row.Late) }}
  446 + </template>
  447 + </el-table-column>
  448 + <el-table-column prop="Leave" label="请假" width="100" align="right">
  449 + <template slot-scope="scope">
  450 + {{ formatMoney(scope.row.Leave) }}
  451 + </template>
  452 + </el-table-column>
  453 + <el-table-column prop="SocialSecurityDeduction" label="扣社保" width="100" align="right">
  454 + <template slot-scope="scope">
  455 + {{ formatMoney(scope.row.SocialSecurityDeduction) }}
  456 + </template>
  457 + </el-table-column>
  458 + <el-table-column prop="RewardDeduction" label="扣除奖励" width="100" align="right">
  459 + <template slot-scope="scope">
  460 + {{ formatMoney(scope.row.RewardDeduction) }}
  461 + </template>
  462 + </el-table-column>
  463 + <el-table-column prop="AccommodationDeduction" label="扣住宿" width="100" align="right">
  464 + <template slot-scope="scope">
  465 + {{ formatMoney(scope.row.AccommodationDeduction) }}
  466 + </template>
  467 + </el-table-column>
  468 + <el-table-column prop="StudyPeriodDeduction" label="扣学习期" width="100" align="right">
  469 + <template slot-scope="scope">
  470 + {{ formatMoney(scope.row.StudyPeriodDeduction) }}
  471 + </template>
  472 + </el-table-column>
  473 + <el-table-column prop="WorkClothesDeduction" label="扣工作服" width="100" align="right">
  474 + <template slot-scope="scope">
  475 + {{ formatMoney(scope.row.WorkClothesDeduction) }}
  476 + </template>
  477 + </el-table-column>
  478 + <el-table-column prop="DeductionTotal" label="扣款合计" width="100" align="right">
  479 + <template slot-scope="scope">
  480 + {{ formatMoney(scope.row.DeductionTotal) }}
  481 + </template>
  482 + </el-table-column>
  483 +
  484 + <!-- 其他 -->
  485 + <el-table-column prop="Bonus" label="发奖金" width="100" align="right">
  486 + <template slot-scope="scope">
  487 + {{ formatMoney(scope.row.Bonus) }}
  488 + </template>
  489 + </el-table-column>
  490 + <el-table-column prop="PhoneDepositReturn" label="退手机押金" width="120" align="right">
  491 + <template slot-scope="scope">
  492 + {{ formatMoney(scope.row.PhoneDepositReturn) }}
  493 + </template>
  494 + </el-table-column>
  495 + <el-table-column prop="AccommodationDepositReturn" label="退住宿押金" width="120" align="right">
  496 + <template slot-scope="scope">
  497 + {{ formatMoney(scope.row.AccommodationDepositReturn) }}
  498 + </template>
  499 + </el-table-column>
  500 + <el-table-column prop="ActualGrossSalary" label="实发工资" width="100" align="right">
  501 + <template slot-scope="scope">
  502 + {{ formatMoney(scope.row.ActualGrossSalary) }}
  503 + </template>
  504 + </el-table-column>
  505 + <el-table-column prop="MonthlyPaymentStatus" label="当月是否发放" width="120" align="center"></el-table-column>
  506 + <el-table-column prop="PaymentAmount" label="支付金额" width="100" align="right">
  507 + <template slot-scope="scope">
  508 + {{ formatMoney(scope.row.PaymentAmount) }}
  509 + </template>
  510 + </el-table-column>
  511 + <el-table-column prop="PendingPaymentAmount" label="待支付金额" width="120" align="right">
  512 + <template slot-scope="scope">
  513 + {{ formatMoney(scope.row.PendingPaymentAmount) }}
  514 + </template>
  515 + </el-table-column>
  516 + <el-table-column prop="LastMonthSupplement" label="补发上月" width="100" align="right">
  517 + <template slot-scope="scope">
  518 + {{ formatMoney(scope.row.LastMonthSupplement) }}
  519 + </template>
  520 + </el-table-column>
  521 + <el-table-column prop="MonthlyPaymentTotal" label="当月支付总额" width="120" align="right">
  522 + <template slot-scope="scope">
  523 + {{ formatMoney(scope.row.MonthlyPaymentTotal) }}
  524 + </template>
  525 + </el-table-column>
  526 + <el-table-column prop="IsLocked" label="是否锁定" width="100" align="center">
  527 + <template slot-scope="scope">
  528 + <el-tag :type="scope.row.IsLocked ? 'danger' : 'success'">
  529 + {{ scope.row.IsLocked ? '是' : '否' }}
  530 + </el-tag>
  531 + </template>
  532 + </el-table-column>
  533 +
  534 + <!-- 工资相关 -->
  535 + <el-table-column label="工资数据" align="center">
  536 + <el-table-column prop="FinalGrossSalary" label="最终应发工资" width="120" align="right">
  537 + <template slot-scope="scope">
  538 + {{ formatMoney(scope.row.FinalGrossSalary) }}
  539 + </template>
  540 + </el-table-column>
  541 + <el-table-column prop="actualSalary" label="实发工资" width="100" align="right">
  542 + <template slot-scope="scope">
  543 + {{ formatMoney(scope.row.actualSalary) }}
  544 + </template>
  545 + </el-table-column>
  546 + <el-table-column prop="totalDeduction" label="扣款合计" width="100" align="right">
  547 + <template slot-scope="scope">
  548 + {{ formatMoney(scope.row.totalDeduction) }}
  549 + </template>
  550 + </el-table-column>
  551 + </el-table-column>
  552 +
  553 + <!-- 其他数据 -->
  554 + <el-table-column prop="projectCount" label="项目数" width="80" align="center"></el-table-column>
  555 + <el-table-column prop="workingDays" label="在店天数" width="100" align="center"></el-table-column>
  556 + <el-table-column prop="leaveDays" label="请假天数" width="100" align="center"></el-table-column>
  557 +
  558 + <!-- 状态 -->
  559 + <el-table-column prop="IsLocked" label="锁定状态" width="100" align="center">
  560 + <template slot-scope="scope">
  561 + <el-tag :type="scope.row.IsLocked === 1 ? 'danger' : 'success'">
  562 + {{ scope.row.IsLocked === 1 ? '已锁定' : '未锁定' }}
  563 + </el-tag>
  564 + </template>
  565 + </el-table-column>
  566 +
  567 + <!-- 操作 -->
  568 + <el-table-column label="操作" width="120" fixed="right" align="center">
  569 + <template slot-scope="scope">
  570 + <el-button type="text" size="mini" @click="handleView(scope.row)">
  571 + <i class="el-icon-view"></i> 查看
  572 + </el-button>
  573 + <el-button type="text" size="mini" @click="handleLock(scope.row)" :disabled="scope.row.IsLocked === 1">
  574 + <i class="el-icon-lock"></i> 锁定
  575 + </el-button>
  576 + </template>
  577 + </el-table-column>
  578 + </el-table>
  579 +
  580 + <!-- 分页 -->
  581 + <div class="pagination-container">
  582 + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  583 + :current-page="pagination.currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="pagination.pageSize"
  584 + :total="pagination.total" layout="total, sizes, prev, pager, next, jumper">
  585 + </el-pagination>
  586 + </div>
  587 + </el-card>
  588 + </div>
  589 +</template>
  590 +
  591 +<script>
  592 +import { getSalaryStatisticsList } from '@/api/extend/salaryCalculation'
  593 +
  594 +export default {
  595 + name: 'SalaryStatistics',
  596 + data() {
  597 + return {
  598 + loading: false,
  599 + queryForm: {
  600 + statisticsMonth: this.$route.query.month || this.getCurrentMonth(),
  601 + storeName: '',
  602 + employeeName: '',
  603 + position: '',
  604 + isLocked: null
  605 + },
  606 + tableData: [],
  607 + pagination: {
  608 + currentPage: 1,
  609 + pageSize: 20,
  610 + total: 0
  611 + }
  612 + }
  613 + },
  614 + mounted() {
  615 + this.handleSearch()
  616 + },
  617 + methods: {
  618 + // 获取当前月份
  619 + getCurrentMonth() {
  620 + const now = new Date()
  621 + const year = now.getFullYear()
  622 + const month = String(now.getMonth() + 1).padStart(2, '0')
  623 + return `${year}${month}`
  624 + },
  625 +
  626 + // 查询数据
  627 + async handleSearch() {
  628 + this.loading = true
  629 + try {
  630 + const params = {
  631 + ...this.queryForm,
  632 + currentPage: this.pagination.currentPage,
  633 + pageSize: this.pagination.pageSize
  634 + }
  635 +
  636 + const response = await getSalaryStatisticsList(params)
  637 + console.log(response)
  638 + this.tableData = response.data.list || []
  639 + this.pagination.total = response.data.pagination.total || 0
  640 + } catch (error) {
  641 + this.$message.error('查询失败:' + error.message)
  642 + } finally {
  643 + this.loading = false
  644 + }
  645 + },
  646 +
  647 + // 重置查询条件
  648 + handleReset() {
  649 + this.queryForm = {
  650 + statisticsMonth: this.getCurrentMonth(),
  651 + storeName: '',
  652 + employeeName: '',
  653 + position: '',
  654 + isLocked: null
  655 + }
  656 + this.pagination.currentPage = 1
  657 + this.handleSearch()
  658 + },
  659 +
  660 + // 分页大小改变
  661 + handleSizeChange(val) {
  662 + this.pagination.pageSize = val
  663 + this.pagination.currentPage = 1
  664 + this.handleSearch()
  665 + },
  666 +
  667 + // 当前页改变
  668 + handleCurrentChange(val) {
  669 + this.pagination.currentPage = val
  670 + this.handleSearch()
  671 + },
  672 +
  673 + // 查看详情
  674 + handleView(row) {
  675 + this.$message.info('查看详情功能待开发')
  676 + },
  677 +
  678 + // 锁定记录
  679 + handleLock(row) {
  680 + this.$confirm('确定要锁定这条记录吗?锁定后将无法修改。', '确认锁定', {
  681 + confirmButtonText: '确定',
  682 + cancelButtonText: '取消',
  683 + type: 'warning'
  684 + }).then(() => {
  685 + this.$message.success('锁定功能待开发')
  686 + }).catch(() => {
  687 + this.$message.info('已取消锁定')
  688 + })
  689 + },
  690 +
  691 +
  692 +
  693 + // 格式化金额
  694 + formatMoney(value) {
  695 + if (value === null || value === undefined) return '0.00'
  696 + return Number(value).toFixed(2)
  697 + },
  698 + formatPercent(value) {
  699 + if (value === null || value === undefined) return '0.00'
  700 + return Number(value).toFixed(2)
  701 + },
  702 +
  703 + // 表格合计
  704 + getSummaries(param) {
  705 + const { columns, data } = param
  706 + const sums = []
  707 + columns.forEach((column, index) => {
  708 + if (index === 0) {
  709 + sums[index] = '合计'
  710 + return
  711 + }
  712 +
  713 + const values = data.map(item => Number(item[column.property]))
  714 + if (column.property && this.isMoneyColumn(column.property)) {
  715 + if (!values.every(value => isNaN(value))) {
  716 + sums[index] = values.reduce((prev, curr) => {
  717 + const value = Number(curr)
  718 + if (!isNaN(value)) {
  719 + return prev + curr
  720 + } else {
  721 + return prev
  722 + }
  723 + }, 0).toFixed(2)
  724 + } else {
  725 + sums[index] = ''
  726 + }
  727 + } else {
  728 + sums[index] = ''
  729 + }
  730 + })
  731 + return sums
  732 + },
  733 +
  734 + // 判断是否为金额列
  735 + isMoneyColumn(property) {
  736 + const moneyColumns = [
  737 + 'TotalPerformance', 'BasePerformance', 'CooperationPerformance', 'StoreTotalPerformance',
  738 + 'CommissionTotal', 'BasePerformanceCommission', 'CooperationPerformanceCommission',
  739 + 'BaseSalaryTotal', 'HealthCoachBaseSalary', 'StoreManagerBaseSalary',
  740 + 'FinalGrossSalary', 'ActualGrossSalary', 'DeductionTotal'
  741 + ]
  742 + return moneyColumns.includes(property)
  743 + }
  744 + }
  745 +}
  746 +</script>
  747 +
  748 +<style lang="scss" scoped>
  749 +.salary-statistics-container {
  750 + padding: 20px;
  751 + background-color: #f0f2f5;
  752 +
  753 + .search-card {
  754 + margin-bottom: 20px;
  755 + }
  756 +
  757 + .table-card {
  758 + .header-actions {
  759 + float: right;
  760 + }
  761 + }
  762 +
  763 + .pagination-container {
  764 + margin-top: 20px;
  765 + text-align: right;
  766 + }
  767 +}
  768 +
  769 +.box-card {
  770 + border-radius: 8px;
  771 + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  772 +}
  773 +</style>
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqSalaryStatistics/LqSalaryStatisticsListOutput.cs 0 → 100644
  1 +using System;
  2 +
  3 +namespace NCC.Extend.Entitys.Dto.LqSalaryStatistics
  4 +{
  5 + /// <summary>
  6 + /// 工资统计列表输出参数
  7 + /// </summary>
  8 + public class LqSalaryStatisticsListOutput
  9 + {
  10 + /// <summary>
  11 + /// 主键ID
  12 + /// </summary>
  13 + public string Id { get; set; }
  14 +
  15 + /// <summary>
  16 + /// 统计月份
  17 + /// </summary>
  18 + public string StatisticsMonth { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 门店ID
  22 + /// </summary>
  23 + public string StoreId { get; set; }
  24 +
  25 + /// <summary>
  26 + /// 门店名称
  27 + /// </summary>
  28 + public string StoreName { get; set; }
  29 +
  30 + /// <summary>
  31 + /// 员工ID
  32 + /// </summary>
  33 + public string EmployeeId { get; set; }
  34 +
  35 + /// <summary>
  36 + /// 员工姓名
  37 + /// </summary>
  38 + public string EmployeeName { get; set; }
  39 +
  40 + /// <summary>
  41 + /// 岗位
  42 + /// </summary>
  43 + public string Position { get; set; }
  44 +
  45 + /// <summary>
  46 + /// 金三角战队
  47 + /// </summary>
  48 + public string GoldTriangleTeam { get; set; }
  49 +
  50 + /// <summary>
  51 + /// 总业绩
  52 + /// </summary>
  53 + public decimal TotalPerformance { get; set; }
  54 +
  55 + /// <summary>
  56 + /// 基础业绩
  57 + /// </summary>
  58 + public decimal BasePerformance { get; set; }
  59 +
  60 + /// <summary>
  61 + /// 合作业绩
  62 + /// </summary>
  63 + public decimal CooperationPerformance { get; set; }
  64 +
  65 + /// <summary>
  66 + /// 奖励业绩
  67 + /// </summary>
  68 + public decimal RewardPerformance { get; set; }
  69 +
  70 + /// <summary>
  71 + /// 新客业绩
  72 + /// </summary>
  73 + public decimal NewCustomerPerformance { get; set; }
  74 +
  75 + /// <summary>
  76 + /// 升单业绩
  77 + /// </summary>
  78 + public decimal UpgradePerformance { get; set; }
  79 +
  80 + /// <summary>
  81 + /// 项目数
  82 + /// </summary>
  83 + public int ProjectCount { get; set; }
  84 +
  85 + /// <summary>
  86 + /// 门店总业绩
  87 + /// </summary>
  88 + public decimal StoreTotalPerformance { get; set; }
  89 +
  90 + /// <summary>
  91 + /// 队伍业绩
  92 + /// </summary>
  93 + public decimal TeamPerformance { get; set; }
  94 +
  95 + /// <summary>
  96 + /// 占比
  97 + /// </summary>
  98 + public decimal PerformanceRatio { get; set; }
  99 +
  100 + /// <summary>
  101 + /// 新客成交率
  102 + /// </summary>
  103 + public decimal NewCustomerConversionRate { get; set; }
  104 +
  105 + /// <summary>
  106 + /// 新客提点
  107 + /// </summary>
  108 + public decimal NewCustomerPoint { get; set; }
  109 +
  110 + /// <summary>
  111 + /// 升单提点
  112 + /// </summary>
  113 + public decimal UpgradePoint { get; set; }
  114 +
  115 + /// <summary>
  116 + /// 溯源业绩
  117 + /// </summary>
  118 + public decimal TraceabilityPerformance { get; set; }
  119 +
  120 + /// <summary>
  121 + /// Cell业绩
  122 + /// </summary>
  123 + public decimal CellPerformance { get; set; }
  124 +
  125 + /// <summary>
  126 + /// 大项目一部业绩
  127 + /// </summary>
  128 + public decimal ProjectOnePerformance { get; set; }
  129 +
  130 + /// <summary>
  131 + /// 大项目二部业绩
  132 + /// </summary>
  133 + public decimal ProjectTwoPerformance { get; set; }
  134 +
  135 + /// <summary>
  136 + /// 当月业绩
  137 + /// </summary>
  138 + public decimal MonthlyPerformance { get; set; }
  139 +
  140 + /// <summary>
  141 + /// 物业水电
  142 + /// </summary>
  143 + public decimal PropertyWaterElectricity { get; set; }
  144 +
  145 + /// <summary>
  146 + /// 门店支出
  147 + /// </summary>
  148 + public decimal StoreExpense { get; set; }
  149 +
  150 + /// <summary>
  151 + /// 产品物料
  152 + /// </summary>
  153 + public decimal ProductMaterial { get; set; }
  154 +
  155 + /// <summary>
  156 + /// 微雕成本
  157 + /// </summary>
  158 + public decimal MicroSculptureCost { get; set; }
  159 +
  160 + /// <summary>
  161 + /// 其它合作成本
  162 + /// </summary>
  163 + public decimal OtherCooperationCost { get; set; }
  164 +
  165 + /// <summary>
  166 + /// 洗毛巾
  167 + /// </summary>
  168 + public decimal TowelWashing { get; set; }
  169 +
  170 + /// <summary>
  171 + /// 毛利
  172 + /// </summary>
  173 + public decimal GrossProfit { get; set; }
  174 +
  175 + /// <summary>
  176 + /// 总经理提成额
  177 + /// </summary>
  178 + public decimal GeneralManagerCommission { get; set; }
  179 +
  180 + /// <summary>
  181 + /// 经理提成额
  182 + /// </summary>
  183 + public decimal ManagerCommission { get; set; }
  184 +
  185 + /// <summary>
  186 + /// 消耗
  187 + /// </summary>
  188 + public decimal Consumption { get; set; }
  189 +
  190 + /// <summary>
  191 + /// 到店人头
  192 + /// </summary>
  193 + public int AttendanceDays { get; set; }
  194 +
  195 + /// <summary>
  196 + /// 在店天数
  197 + /// </summary>
  198 + public int StoreDays { get; set; }
  199 +
  200 + /// <summary>
  201 + /// 请假天数
  202 + /// </summary>
  203 + public int LeaveDays { get; set; }
  204 +
  205 + /// <summary>
  206 + /// 提点
  207 + /// </summary>
  208 + public decimal CommissionPoint { get; set; }
  209 +
  210 + /// <summary>
  211 + /// 基础业绩提成
  212 + /// </summary>
  213 + public decimal BasePerformanceCommission { get; set; }
  214 +
  215 + /// <summary>
  216 + /// 合作业绩提成
  217 + /// </summary>
  218 + public decimal CooperationPerformanceCommission { get; set; }
  219 +
  220 + /// <summary>
  221 + /// 顾问提成
  222 + /// </summary>
  223 + public decimal ConsultantCommission { get; set; }
  224 +
  225 + /// <summary>
  226 + /// 门店T区提成
  227 + /// </summary>
  228 + public decimal StoreTAreaCommission { get; set; }
  229 +
  230 + /// <summary>
  231 + /// 店助提成
  232 + /// </summary>
  233 + public decimal AssistantCommission1 { get; set; }
  234 +
  235 + /// <summary>
  236 + /// 店助主任提成
  237 + /// </summary>
  238 + public decimal AssistantDirectorCommission { get; set; }
  239 +
  240 + /// <summary>
  241 + /// 主任提成
  242 + /// </summary>
  243 + public decimal DirectorCommission { get; set; }
  244 +
  245 + /// <summary>
  246 + /// 店长提成
  247 + /// </summary>
  248 + public decimal AssistantCommission2 { get; set; }
  249 +
  250 + /// <summary>
  251 + /// 总经理提成
  252 + /// </summary>
  253 + public decimal GeneralManagerCommissionAmount { get; set; }
  254 +
  255 + /// <summary>
  256 + /// 经理提成
  257 + /// </summary>
  258 + public decimal ManagerCommissionAmount { get; set; }
  259 +
  260 + /// <summary>
  261 + /// 业绩提成
  262 + /// </summary>
  263 + public decimal PerformanceCommission { get; set; }
  264 +
  265 + /// <summary>
  266 + /// 消耗提成
  267 + /// </summary>
  268 + public decimal ConsumptionCommission { get; set; }
  269 +
  270 + /// <summary>
  271 + /// 科技部组长提成
  272 + /// </summary>
  273 + public decimal TechGroupLeaderCommission { get; set; }
  274 +
  275 + /// <summary>
  276 + /// 溯源提成
  277 + /// </summary>
  278 + public decimal TraceabilityCommission { get; set; }
  279 +
  280 + /// <summary>
  281 + /// Cell提成
  282 + /// </summary>
  283 + public decimal CellCommission { get; set; }
  284 +
  285 + /// <summary>
  286 + /// 大项目部提成
  287 + /// </summary>
  288 + public decimal ProjectCommission { get; set; }
  289 +
  290 + /// <summary>
  291 + /// 提成合计
  292 + /// </summary>
  293 + public decimal CommissionTotal { get; set; }
  294 +
  295 + /// <summary>
  296 + /// 健康师底薪
  297 + /// </summary>
  298 + public decimal HealthCoachBaseSalary { get; set; }
  299 +
  300 + /// <summary>
  301 + /// 店助底薪
  302 + /// </summary>
  303 + public decimal AssistantBaseSalary { get; set; }
  304 +
  305 + /// <summary>
  306 + /// 店长底薪
  307 + /// </summary>
  308 + public decimal ManagerBaseSalary { get; set; }
  309 +
  310 + /// <summary>
  311 + /// 主任底薪
  312 + /// </summary>
  313 + public decimal DirectorBaseSalary { get; set; }
  314 +
  315 + /// <summary>
  316 + /// 店助主任底薪
  317 + /// </summary>
  318 + public decimal AssistantDirectorBaseSalary { get; set; }
  319 +
  320 + /// <summary>
  321 + /// 总经理底薪
  322 + /// </summary>
  323 + public decimal GeneralManagerBaseSalary { get; set; }
  324 +
  325 + /// <summary>
  326 + /// 经理底薪
  327 + /// </summary>
  328 + public decimal ManagerBaseSalaryAmount { get; set; }
  329 +
  330 + /// <summary>
  331 + /// 科技部老师底薪
  332 + /// </summary>
  333 + public decimal TechTeacherBaseSalary { get; set; }
  334 +
  335 + /// <summary>
  336 + /// 大项目部底薪
  337 + /// </summary>
  338 + public decimal ProjectBaseSalary { get; set; }
  339 +
  340 + /// <summary>
  341 + /// 底薪合计
  342 + /// </summary>
  343 + public decimal BaseSalaryTotal { get; set; }
  344 +
  345 + /// <summary>
  346 + /// 手工
  347 + /// </summary>
  348 + public decimal ManualWork { get; set; }
  349 +
  350 + /// <summary>
  351 + /// 人头奖励
  352 + /// </summary>
  353 + public decimal HeadCountReward { get; set; }
  354 +
  355 + /// <summary>
  356 + /// 手机管理
  357 + /// </summary>
  358 + public decimal PhoneManagement { get; set; }
  359 +
  360 + /// <summary>
  361 + /// 车补
  362 + /// </summary>
  363 + public decimal CarAllowance { get; set; }
  364 +
  365 + /// <summary>
  366 + /// 少休
  367 + /// </summary>
  368 + public decimal LessRest { get; set; }
  369 +
  370 + /// <summary>
  371 + /// 全勤
  372 + /// </summary>
  373 + public decimal FullAttendance { get; set; }
  374 +
  375 + /// <summary>
  376 + /// 核算应发工资
  377 + /// </summary>
  378 + public decimal CalculatedGrossSalary { get; set; }
  379 +
  380 + /// <summary>
  381 + /// 保底
  382 + /// </summary>
  383 + public decimal Guarantee { get; set; }
  384 +
  385 + /// <summary>
  386 + /// 保底请假
  387 + /// </summary>
  388 + public decimal GuaranteeLeave { get; set; }
  389 +
  390 + /// <summary>
  391 + /// 保底底薪
  392 + /// </summary>
  393 + public decimal GuaranteeBaseSalary { get; set; }
  394 +
  395 + /// <summary>
  396 + /// 保底补差
  397 + /// </summary>
  398 + public decimal GuaranteeSupplement { get; set; }
  399 +
  400 + /// <summary>
  401 + /// 最终应发工资
  402 + /// </summary>
  403 + public decimal FinalGrossSalary { get; set; }
  404 +
  405 + /// <summary>
  406 + /// 当月培训补贴
  407 + /// </summary>
  408 + public decimal MonthlyTrainingSubsidy { get; set; }
  409 +
  410 + /// <summary>
  411 + /// 当月交通补贴
  412 + /// </summary>
  413 + public decimal MonthlyTransportSubsidy { get; set; }
  414 +
  415 + /// <summary>
  416 + /// 上月培训补贴
  417 + /// </summary>
  418 + public decimal LastMonthTrainingSubsidy { get; set; }
  419 +
  420 + /// <summary>
  421 + /// 上月交通补贴
  422 + /// </summary>
  423 + public decimal LastMonthTransportSubsidy { get; set; }
  424 +
  425 + /// <summary>
  426 + /// 补贴合计
  427 + /// </summary>
  428 + public decimal SubsidyTotal { get; set; }
  429 +
  430 + /// <summary>
  431 + /// 缺卡
  432 + /// </summary>
  433 + public decimal MissingCard { get; set; }
  434 +
  435 + /// <summary>
  436 + /// 迟到
  437 + /// </summary>
  438 + public decimal Late { get; set; }
  439 +
  440 + /// <summary>
  441 + /// 请假
  442 + /// </summary>
  443 + public decimal Leave { get; set; }
  444 +
  445 + /// <summary>
  446 + /// 扣社保
  447 + /// </summary>
  448 + public decimal SocialSecurityDeduction { get; set; }
  449 +
  450 + /// <summary>
  451 + /// 扣除奖励
  452 + /// </summary>
  453 + public decimal RewardDeduction { get; set; }
  454 +
  455 + /// <summary>
  456 + /// 扣住宿
  457 + /// </summary>
  458 + public decimal AccommodationDeduction { get; set; }
  459 +
  460 + /// <summary>
  461 + /// 扣学习期
  462 + /// </summary>
  463 + public decimal StudyPeriodDeduction { get; set; }
  464 +
  465 + /// <summary>
  466 + /// 扣工作服
  467 + /// </summary>
  468 + public decimal WorkClothesDeduction { get; set; }
  469 +
  470 + /// <summary>
  471 + /// 扣款合计
  472 + /// </summary>
  473 + public decimal DeductionTotal { get; set; }
  474 +
  475 + /// <summary>
  476 + /// 发奖金
  477 + /// </summary>
  478 + public decimal Bonus { get; set; }
  479 +
  480 + /// <summary>
  481 + /// 退手机押金
  482 + /// </summary>
  483 + public decimal PhoneDepositReturn { get; set; }
  484 +
  485 + /// <summary>
  486 + /// 退住宿押金
  487 + /// </summary>
  488 + public decimal AccommodationDepositReturn { get; set; }
  489 +
  490 + /// <summary>
  491 + /// 实发工资
  492 + /// </summary>
  493 + public decimal ActualGrossSalary { get; set; }
  494 +
  495 + /// <summary>
  496 + /// 当月是否发放
  497 + /// </summary>
  498 + public string MonthlyPaymentStatus { get; set; }
  499 +
  500 + /// <summary>
  501 + /// 支付金额
  502 + /// </summary>
  503 + public decimal PaymentAmount { get; set; }
  504 +
  505 + /// <summary>
  506 + /// 待支付金额
  507 + /// </summary>
  508 + public decimal PendingPaymentAmount { get; set; }
  509 +
  510 + /// <summary>
  511 + /// 补发上月
  512 + /// </summary>
  513 + public decimal LastMonthSupplement { get; set; }
  514 +
  515 + /// <summary>
  516 + /// 当月支付总额
  517 + /// </summary>
  518 + public decimal MonthlyPaymentTotal { get; set; }
  519 +
  520 + /// <summary>
  521 + /// 是否锁定
  522 + /// </summary>
  523 + public bool IsLocked { get; set; }
  524 +
  525 + /// <summary>
  526 + /// 创建时间
  527 + /// </summary>
  528 + public DateTime CreateTime { get; set; }
  529 +
  530 + /// <summary>
  531 + /// 更新时间
  532 + /// </summary>
  533 + public DateTime UpdateTime { get; set; }
  534 +
  535 +
  536 +
  537 +
  538 + }
  539 +}
0 540 \ No newline at end of file
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqSalaryStatistics/LqSalaryStatisticsListQueryInput.cs 0 → 100644
  1 +using NCC.Common.Filter;
  2 +
  3 +namespace NCC.Extend.Entitys.Dto.LqSalaryStatistics
  4 +{
  5 + /// <summary>
  6 + /// 工资统计列表查询输入参数
  7 + /// </summary>
  8 + public class LqSalaryStatisticsListQueryInput : PageInputBase
  9 + {
  10 + /// <summary>
  11 + /// 门店ID
  12 + /// </summary>
  13 + public string storeId { get; set; }
  14 +
  15 + /// <summary>
  16 + /// 门店名称
  17 + /// </summary>
  18 + public string storeName { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 员工姓名
  22 + /// </summary>
  23 + public string employeeName { get; set; }
  24 +
  25 + /// <summary>
  26 + /// 员工ID
  27 + /// </summary>
  28 + public string employeeId { get; set; }
  29 +
  30 + /// <summary>
  31 + /// 核算岗位
  32 + /// </summary>
  33 + public string position { get; set; }
  34 +
  35 + /// <summary>
  36 + /// 统计月份
  37 + /// </summary>
  38 + public string statisticsMonth { get; set; }
  39 +
  40 + /// <summary>
  41 + /// 是否锁定
  42 + /// </summary>
  43 + public int? isLocked { get; set; }
  44 + }
  45 +}
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsPersonalPerformance/LqStatisticsPersonalPerformanceListOutput.cs
... ... @@ -73,6 +73,26 @@ namespace NCC.Extend.Entitys.Dto.LqStatisticsPersonalPerformance
73 73 public int OrderCount { get; set; }
74 74  
75 75 /// <summary>
  76 + /// 首开单数量
  77 + /// </summary>
  78 + public int FirstOrderCount { get; set; }
  79 +
  80 + /// <summary>
  81 + /// 升单数量
  82 + /// </summary>
  83 + public int UpgradeOrderCount { get; set; }
  84 +
  85 + /// <summary>
  86 + /// 首单业绩
  87 + /// </summary>
  88 + public decimal FirstOrderPerformance { get; set; }
  89 +
  90 + /// <summary>
  91 + /// 升单业绩
  92 + /// </summary>
  93 + public decimal UpgradeOrderPerformance { get; set; }
  94 +
  95 + /// <summary>
76 96 /// 最后订单日期
77 97 /// </summary>
78 98 public DateTime? LastOrderDate { get; set; }
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceInfoOutput.cs 0 → 100644
  1 +using System;
  2 +
  3 +namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreTotalPerformance
  4 +{
  5 + /// <summary>
  6 + /// 门店总业绩统计详情输出参数
  7 + /// </summary>
  8 + public class LqStatisticsStoreTotalPerformanceInfoOutput
  9 + {
  10 + /// <summary>
  11 + /// 主键ID
  12 + /// </summary>
  13 + public string id { get; set; }
  14 +
  15 + /// <summary>
  16 + /// 门店ID
  17 + /// </summary>
  18 + public string storeId { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 门店名称
  22 + /// </summary>
  23 + public string storeName { get; set; }
  24 +
  25 + /// <summary>
  26 + /// 统计月份
  27 + /// </summary>
  28 + public string statisticsMonth { get; set; }
  29 +
  30 + /// <summary>
  31 + /// 总业绩
  32 + /// </summary>
  33 + public decimal totalPerformance { get; set; }
  34 +
  35 + /// <summary>
  36 + /// 欠款金额
  37 + /// </summary>
  38 + public decimal debtAmount { get; set; }
  39 +
  40 + /// <summary>
  41 + /// 总单业绩
  42 + /// </summary>
  43 + public decimal totalOrderPerformance { get; set; }
  44 +
  45 + /// <summary>
  46 + /// 储扣总金额
  47 + /// </summary>
  48 + public decimal storageDeductionAmount { get; set; }
  49 +
  50 + /// <summary>
  51 + /// 品项数量
  52 + /// </summary>
  53 + public int itemQuantity { get; set; }
  54 +
  55 + /// <summary>
  56 + /// 首开单数量
  57 + /// </summary>
  58 + public int firstOrderCount { get; set; }
  59 +
  60 + /// <summary>
  61 + /// 升单数量
  62 + /// </summary>
  63 + public int upgradeOrderCount { get; set; }
  64 +
  65 + /// <summary>
  66 + /// 创建时间
  67 + /// </summary>
  68 + public DateTime? createTime { get; set; }
  69 + }
  70 +}
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceListOutput.cs 0 → 100644
  1 +using System;
  2 +
  3 +namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreTotalPerformance
  4 +{
  5 + /// <summary>
  6 + /// 门店总业绩统计列表输出参数
  7 + /// </summary>
  8 + public class LqStatisticsStoreTotalPerformanceListOutput
  9 + {
  10 + /// <summary>
  11 + /// 主键ID
  12 + /// </summary>
  13 + public string id { get; set; }
  14 +
  15 + /// <summary>
  16 + /// 门店ID
  17 + /// </summary>
  18 + public string storeId { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 门店名称
  22 + /// </summary>
  23 + public string storeName { get; set; }
  24 +
  25 + /// <summary>
  26 + /// 统计月份
  27 + /// </summary>
  28 + public string statisticsMonth { get; set; }
  29 +
  30 + /// <summary>
  31 + /// 总业绩
  32 + /// </summary>
  33 + public decimal totalPerformance { get; set; }
  34 +
  35 + /// <summary>
  36 + /// 欠款金额
  37 + /// </summary>
  38 + public decimal debtAmount { get; set; }
  39 +
  40 + /// <summary>
  41 + /// 总单业绩
  42 + /// </summary>
  43 + public decimal totalOrderPerformance { get; set; }
  44 +
  45 + /// <summary>
  46 + /// 储扣总金额
  47 + /// </summary>
  48 + public decimal storageDeductionAmount { get; set; }
  49 +
  50 + /// <summary>
  51 + /// 品项数量
  52 + /// </summary>
  53 + public int itemQuantity { get; set; }
  54 +
  55 + /// <summary>
  56 + /// 首开单数量
  57 + /// </summary>
  58 + public int firstOrderCount { get; set; }
  59 +
  60 + /// <summary>
  61 + /// 升单数量
  62 + /// </summary>
  63 + public int upgradeOrderCount { get; set; }
  64 +
  65 + /// <summary>
  66 + /// 首单业绩
  67 + /// </summary>
  68 + public decimal firstOrderPerformance { get; set; }
  69 +
  70 + /// <summary>
  71 + /// 升单业绩
  72 + /// </summary>
  73 + public decimal upgradeOrderPerformance { get; set; }
  74 +
  75 + /// <summary>
  76 + /// 创建时间
  77 + /// </summary>
  78 + public DateTime? createTime { get; set; }
  79 + }
  80 +}
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceListQueryInput.cs 0 → 100644
  1 +using NCC.Common.Filter;
  2 +
  3 +namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreTotalPerformance
  4 +{
  5 + /// <summary>
  6 + /// 门店总业绩统计列表查询输入参数
  7 + /// </summary>
  8 + public class LqStatisticsStoreTotalPerformanceListQueryInput : PageInputBase
  9 + {
  10 + /// <summary>
  11 + /// 门店ID
  12 + /// </summary>
  13 + public string storeId { get; set; }
  14 +
  15 + /// <summary>
  16 + /// 门店名称
  17 + /// </summary>
  18 + public string storeName { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 统计月份
  22 + /// </summary>
  23 + public string statisticsMonth { get; set; }
  24 + }
  25 +}
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_salary_statistics/LqSalaryStatisticsEntity.cs 0 → 100644
  1 +using System;
  2 +using NCC.Common.Const;
  3 +using SqlSugar;
  4 +
  5 +namespace NCC.Extend.Entitys.lq_salary_statistics
  6 +{
  7 + /// <summary>
  8 + /// 工资统计表
  9 + /// </summary>
  10 + [SugarTable("lq_salary_statistics")]
  11 + [Tenant(ClaimConst.TENANT_ID)]
  12 + public class LqSalaryStatisticsEntity
  13 + {
  14 + /// <summary>
  15 + /// 主键ID
  16 + /// </summary>
  17 + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
  18 + public string Id { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 门店ID
  22 + /// </summary>
  23 + [SugarColumn(ColumnName = "F_StoreId")]
  24 + public string StoreId { get; set; }
  25 +
  26 + /// <summary>
  27 + /// 门店名称
  28 + /// </summary>
  29 + [SugarColumn(ColumnName = "F_StoreName")]
  30 + public string StoreName { get; set; }
  31 +
  32 + /// <summary>
  33 + /// 核算岗位
  34 + /// </summary>
  35 + [SugarColumn(ColumnName = "F_Position")]
  36 + public string Position { get; set; }
  37 +
  38 + /// <summary>
  39 + /// 员工姓名
  40 + /// </summary>
  41 + [SugarColumn(ColumnName = "F_EmployeeName")]
  42 + public string EmployeeName { get; set; }
  43 +
  44 + /// <summary>
  45 + /// 员工ID
  46 + /// </summary>
  47 + [SugarColumn(ColumnName = "F_EmployeeId")]
  48 + public string EmployeeId { get; set; }
  49 +
  50 + /// <summary>
  51 + /// 金三角战队
  52 + /// </summary>
  53 + [SugarColumn(ColumnName = "F_GoldTriangleTeam")]
  54 + public string GoldTriangleTeam { get; set; }
  55 +
  56 + /// <summary>
  57 + /// 总业绩
  58 + /// </summary>
  59 + [SugarColumn(ColumnName = "F_TotalPerformance")]
  60 + public decimal TotalPerformance { get; set; }
  61 +
  62 + /// <summary>
  63 + /// 基础业绩
  64 + /// </summary>
  65 + [SugarColumn(ColumnName = "F_BasePerformance")]
  66 + public decimal BasePerformance { get; set; }
  67 +
  68 + /// <summary>
  69 + /// 合作业绩
  70 + /// </summary>
  71 + [SugarColumn(ColumnName = "F_CooperationPerformance")]
  72 + public decimal CooperationPerformance { get; set; }
  73 +
  74 + /// <summary>
  75 + /// 奖励业绩
  76 + /// </summary>
  77 + [SugarColumn(ColumnName = "F_RewardPerformance")]
  78 + public decimal RewardPerformance { get; set; }
  79 +
  80 + /// <summary>
  81 + /// 门店总业绩
  82 + /// </summary>
  83 + [SugarColumn(ColumnName = "F_StoreTotalPerformance")]
  84 + public decimal StoreTotalPerformance { get; set; }
  85 +
  86 + /// <summary>
  87 + /// 队伍业绩
  88 + /// </summary>
  89 + [SugarColumn(ColumnName = "F_TeamPerformance")]
  90 + public decimal TeamPerformance { get; set; }
  91 +
  92 + /// <summary>
  93 + /// 占比
  94 + /// </summary>
  95 + [SugarColumn(ColumnName = "F_Percentage")]
  96 + public decimal Percentage { get; set; }
  97 +
  98 + /// <summary>
  99 + /// 新客业绩
  100 + /// </summary>
  101 + [SugarColumn(ColumnName = "F_NewCustomerPerformance")]
  102 + public decimal NewCustomerPerformance { get; set; }
  103 +
  104 + /// <summary>
  105 + /// 新客成交率
  106 + /// </summary>
  107 + [SugarColumn(ColumnName = "F_NewCustomerConversionRate")]
  108 + public decimal NewCustomerConversionRate { get; set; }
  109 +
  110 + /// <summary>
  111 + /// 新客提点
  112 + /// </summary>
  113 + [SugarColumn(ColumnName = "F_NewCustomerPoint")]
  114 + public decimal NewCustomerPoint { get; set; }
  115 +
  116 + /// <summary>
  117 + /// 升单业绩
  118 + /// </summary>
  119 + [SugarColumn(ColumnName = "F_UpgradePerformance")]
  120 + public decimal UpgradePerformance { get; set; }
  121 +
  122 + /// <summary>
  123 + /// 升单提点
  124 + /// </summary>
  125 + [SugarColumn(ColumnName = "F_UpgradePoint")]
  126 + public decimal UpgradePoint { get; set; }
  127 +
  128 + /// <summary>
  129 + /// 溯源业绩
  130 + /// </summary>
  131 + [SugarColumn(ColumnName = "F_TraceabilityPerformance")]
  132 + public decimal TraceabilityPerformance { get; set; }
  133 +
  134 + /// <summary>
  135 + /// Cell业绩
  136 + /// </summary>
  137 + [SugarColumn(ColumnName = "F_CellPerformance")]
  138 + public decimal CellPerformance { get; set; }
  139 +
  140 + /// <summary>
  141 + /// 大项目一部业绩
  142 + /// </summary>
  143 + [SugarColumn(ColumnName = "F_MajorProject1Performance")]
  144 + public decimal MajorProject1Performance { get; set; }
  145 +
  146 + /// <summary>
  147 + /// 大项目二部业绩
  148 + /// </summary>
  149 + [SugarColumn(ColumnName = "F_MajorProject2Performance")]
  150 + public decimal MajorProject2Performance { get; set; }
  151 +
  152 + /// <summary>
  153 + /// 当月业绩
  154 + /// </summary>
  155 + [SugarColumn(ColumnName = "F_MonthlyPerformance")]
  156 + public decimal MonthlyPerformance { get; set; }
  157 +
  158 + /// <summary>
  159 + /// 物业水电
  160 + /// </summary>
  161 + [SugarColumn(ColumnName = "F_PropertyWaterElectricity")]
  162 + public decimal PropertyWaterElectricity { get; set; }
  163 +
  164 + /// <summary>
  165 + /// 门店支出
  166 + /// </summary>
  167 + [SugarColumn(ColumnName = "F_StoreExpense")]
  168 + public decimal StoreExpense { get; set; }
  169 +
  170 + /// <summary>
  171 + /// 产品物料
  172 + /// </summary>
  173 + [SugarColumn(ColumnName = "F_ProductMaterial")]
  174 + public decimal ProductMaterial { get; set; }
  175 +
  176 + /// <summary>
  177 + /// 微雕成本
  178 + /// </summary>
  179 + [SugarColumn(ColumnName = "F_MicroSculptureCost")]
  180 + public decimal MicroSculptureCost { get; set; }
  181 +
  182 + /// <summary>
  183 + /// 其它合作成本
  184 + /// </summary>
  185 + [SugarColumn(ColumnName = "F_OtherCooperationCost")]
  186 + public decimal OtherCooperationCost { get; set; }
  187 +
  188 + /// <summary>
  189 + /// 洗毛巾
  190 + /// </summary>
  191 + [SugarColumn(ColumnName = "F_TowelWashing")]
  192 + public decimal TowelWashing { get; set; }
  193 +
  194 + /// <summary>
  195 + /// 毛利
  196 + /// </summary>
  197 + [SugarColumn(ColumnName = "F_GrossProfit")]
  198 + public decimal GrossProfit { get; set; }
  199 +
  200 + /// <summary>
  201 + /// 总经理提成额
  202 + /// </summary>
  203 + [SugarColumn(ColumnName = "F_GeneralManagerCommission")]
  204 + public decimal GeneralManagerCommission { get; set; }
  205 +
  206 + /// <summary>
  207 + /// 经理提成额
  208 + /// </summary>
  209 + [SugarColumn(ColumnName = "F_ManagerCommission")]
  210 + public decimal ManagerCommission { get; set; }
  211 +
  212 + /// <summary>
  213 + /// 消耗
  214 + /// </summary>
  215 + [SugarColumn(ColumnName = "F_Consumption")]
  216 + public decimal Consumption { get; set; }
  217 +
  218 + /// <summary>
  219 + /// 项目数
  220 + /// </summary>
  221 + [SugarColumn(ColumnName = "F_ProjectCount")]
  222 + public int ProjectCount { get; set; }
  223 +
  224 + /// <summary>
  225 + /// 到店人头
  226 + /// </summary>
  227 + [SugarColumn(ColumnName = "F_CustomerCount")]
  228 + public int CustomerCount { get; set; }
  229 +
  230 + /// <summary>
  231 + /// 在店天数
  232 + /// </summary>
  233 + [SugarColumn(ColumnName = "F_WorkingDays")]
  234 + public int WorkingDays { get; set; }
  235 +
  236 + /// <summary>
  237 + /// 请假天数
  238 + /// </summary>
  239 + [SugarColumn(ColumnName = "F_LeaveDays")]
  240 + public int LeaveDays { get; set; }
  241 +
  242 + /// <summary>
  243 + /// 提点
  244 + /// </summary>
  245 + [SugarColumn(ColumnName = "F_CommissionPoint")]
  246 + public decimal CommissionPoint { get; set; }
  247 +
  248 + /// <summary>
  249 + /// 基础业绩提成
  250 + /// </summary>
  251 + [SugarColumn(ColumnName = "F_BasePerformanceCommission")]
  252 + public decimal BasePerformanceCommission { get; set; }
  253 +
  254 + /// <summary>
  255 + /// 合作业绩提成
  256 + /// </summary>
  257 + [SugarColumn(ColumnName = "F_CooperationPerformanceCommission")]
  258 + public decimal CooperationPerformanceCommission { get; set; }
  259 +
  260 + /// <summary>
  261 + /// 顾问提成
  262 + /// </summary>
  263 + [SugarColumn(ColumnName = "F_ConsultantCommission")]
  264 + public decimal ConsultantCommission { get; set; }
  265 +
  266 + /// <summary>
  267 + /// 门店T区提成
  268 + /// </summary>
  269 + [SugarColumn(ColumnName = "F_StoreTZoneCommission")]
  270 + public decimal StoreTZoneCommission { get; set; }
  271 +
  272 + /// <summary>
  273 + /// 店助提成
  274 + /// </summary>
  275 + [SugarColumn(ColumnName = "F_AssistantCommission")]
  276 + public decimal AssistantCommission { get; set; }
  277 +
  278 + /// <summary>
  279 + /// 店助主任提成
  280 + /// </summary>
  281 + [SugarColumn(ColumnName = "F_AssistantDirectorCommission")]
  282 + public decimal AssistantDirectorCommission { get; set; }
  283 +
  284 + /// <summary>
  285 + /// 主任提成
  286 + /// </summary>
  287 + [SugarColumn(ColumnName = "F_DirectorCommission")]
  288 + public decimal DirectorCommission { get; set; }
  289 +
  290 + /// <summary>
  291 + /// 店长提成
  292 + /// </summary>
  293 + [SugarColumn(ColumnName = "F_StoreManagerCommission")]
  294 + public decimal StoreManagerCommission { get; set; }
  295 +
  296 + /// <summary>
  297 + /// 总经理提成
  298 + /// </summary>
  299 + [SugarColumn(ColumnName = "F_GeneralManagerCommissionTotal")]
  300 + public decimal GeneralManagerCommissionTotal { get; set; }
  301 +
  302 + /// <summary>
  303 + /// 经理提成
  304 + /// </summary>
  305 + [SugarColumn(ColumnName = "F_ManagerCommissionTotal")]
  306 + public decimal ManagerCommissionTotal { get; set; }
  307 +
  308 + /// <summary>
  309 + /// 业绩提成
  310 + /// </summary>
  311 + [SugarColumn(ColumnName = "F_PerformanceCommission")]
  312 + public decimal PerformanceCommission { get; set; }
  313 +
  314 + /// <summary>
  315 + /// 消耗提成
  316 + /// </summary>
  317 + [SugarColumn(ColumnName = "F_ConsumptionCommission")]
  318 + public decimal ConsumptionCommission { get; set; }
  319 +
  320 + /// <summary>
  321 + /// 科技部组长提成
  322 + /// </summary>
  323 + [SugarColumn(ColumnName = "F_TechGroupLeaderCommission")]
  324 + public decimal TechGroupLeaderCommission { get; set; }
  325 +
  326 + /// <summary>
  327 + /// 溯源提成
  328 + /// </summary>
  329 + [SugarColumn(ColumnName = "F_TraceabilityCommission")]
  330 + public decimal TraceabilityCommission { get; set; }
  331 +
  332 + /// <summary>
  333 + /// Cell提成
  334 + /// </summary>
  335 + [SugarColumn(ColumnName = "F_CellCommission")]
  336 + public decimal CellCommission { get; set; }
  337 +
  338 + /// <summary>
  339 + /// 大项目部提成
  340 + /// </summary>
  341 + [SugarColumn(ColumnName = "F_MajorProjectCommission")]
  342 + public decimal MajorProjectCommission { get; set; }
  343 +
  344 + /// <summary>
  345 + /// 提成合计
  346 + /// </summary>
  347 + [SugarColumn(ColumnName = "F_TotalCommission")]
  348 + public decimal TotalCommission { get; set; }
  349 +
  350 + /// <summary>
  351 + /// 健康师底薪
  352 + /// </summary>
  353 + [SugarColumn(ColumnName = "F_HealthCoachBaseSalary")]
  354 + public decimal HealthCoachBaseSalary { get; set; }
  355 +
  356 + /// <summary>
  357 + /// 店助底薪
  358 + /// </summary>
  359 + [SugarColumn(ColumnName = "F_AssistantBaseSalary")]
  360 + public decimal AssistantBaseSalary { get; set; }
  361 +
  362 + /// <summary>
  363 + /// 店长底薪
  364 + /// </summary>
  365 + [SugarColumn(ColumnName = "F_StoreManagerBaseSalary")]
  366 + public decimal StoreManagerBaseSalary { get; set; }
  367 +
  368 + /// <summary>
  369 + /// 主任底薪
  370 + /// </summary>
  371 + [SugarColumn(ColumnName = "F_DirectorBaseSalary")]
  372 + public decimal DirectorBaseSalary { get; set; }
  373 +
  374 + /// <summary>
  375 + /// 店助主任底薪
  376 + /// </summary>
  377 + [SugarColumn(ColumnName = "F_AssistantDirectorBaseSalary")]
  378 + public decimal AssistantDirectorBaseSalary { get; set; }
  379 +
  380 + /// <summary>
  381 + /// 总经理底薪
  382 + /// </summary>
  383 + [SugarColumn(ColumnName = "F_GeneralManagerBaseSalary")]
  384 + public decimal GeneralManagerBaseSalary { get; set; }
  385 +
  386 + /// <summary>
  387 + /// 经理底薪
  388 + /// </summary>
  389 + [SugarColumn(ColumnName = "F_ManagerBaseSalary")]
  390 + public decimal ManagerBaseSalary { get; set; }
  391 +
  392 + /// <summary>
  393 + /// 科技部老师底薪
  394 + /// </summary>
  395 + [SugarColumn(ColumnName = "F_TechTeacherBaseSalary")]
  396 + public decimal TechTeacherBaseSalary { get; set; }
  397 +
  398 + /// <summary>
  399 + /// 大项目部底薪
  400 + /// </summary>
  401 + [SugarColumn(ColumnName = "F_MajorProjectBaseSalary")]
  402 + public decimal MajorProjectBaseSalary { get; set; }
  403 +
  404 + /// <summary>
  405 + /// 底薪合计
  406 + /// </summary>
  407 + [SugarColumn(ColumnName = "F_TotalBaseSalary")]
  408 + public decimal TotalBaseSalary { get; set; }
  409 +
  410 + /// <summary>
  411 + /// 手工费
  412 + /// </summary>
  413 + [SugarColumn(ColumnName = "F_HandworkFee")]
  414 + public decimal HandworkFee { get; set; }
  415 +
  416 + /// <summary>
  417 + /// 人头奖励
  418 + /// </summary>
  419 + [SugarColumn(ColumnName = "F_PersonnelReward")]
  420 + public decimal PersonnelReward { get; set; }
  421 +
  422 + /// <summary>
  423 + /// 手机管理费
  424 + /// </summary>
  425 + [SugarColumn(ColumnName = "F_PhoneManagement")]
  426 + public decimal PhoneManagement { get; set; }
  427 +
  428 + /// <summary>
  429 + /// 车补
  430 + /// </summary>
  431 + [SugarColumn(ColumnName = "F_TransportationAllowance")]
  432 + public decimal TransportationAllowance { get; set; }
  433 +
  434 + /// <summary>
  435 + /// 少休费
  436 + /// </summary>
  437 + [SugarColumn(ColumnName = "F_LessRest")]
  438 + public decimal LessRest { get; set; }
  439 +
  440 + /// <summary>
  441 + /// 全勤奖
  442 + /// </summary>
  443 + [SugarColumn(ColumnName = "F_FullAttendance")]
  444 + public decimal FullAttendance { get; set; }
  445 +
  446 + /// <summary>
  447 + /// 核算应发工资
  448 + /// </summary>
  449 + [SugarColumn(ColumnName = "F_CalculatedGrossSalary")]
  450 + public decimal CalculatedGrossSalary { get; set; }
  451 +
  452 + /// <summary>
  453 + /// 保底工资
  454 + /// </summary>
  455 + [SugarColumn(ColumnName = "F_GuaranteedSalary")]
  456 + public decimal GuaranteedSalary { get; set; }
  457 +
  458 + /// <summary>
  459 + /// 保底请假扣款
  460 + /// </summary>
  461 + [SugarColumn(ColumnName = "F_GuaranteedLeaveDeduction")]
  462 + public decimal GuaranteedLeaveDeduction { get; set; }
  463 +
  464 + /// <summary>
  465 + /// 保底底薪
  466 + /// </summary>
  467 + [SugarColumn(ColumnName = "F_GuaranteedBaseSalary")]
  468 + public decimal GuaranteedBaseSalary { get; set; }
  469 +
  470 + /// <summary>
  471 + /// 保底补差
  472 + /// </summary>
  473 + [SugarColumn(ColumnName = "F_GuaranteedSupplement")]
  474 + public decimal GuaranteedSupplement { get; set; }
  475 +
  476 + /// <summary>
  477 + /// 最终应发工资
  478 + /// </summary>
  479 + [SugarColumn(ColumnName = "F_FinalGrossSalary")]
  480 + public decimal FinalGrossSalary { get; set; }
  481 +
  482 + /// <summary>
  483 + /// 当月培训补贴
  484 + /// </summary>
  485 + [SugarColumn(ColumnName = "F_MonthlyTrainingSubsidy")]
  486 + public decimal MonthlyTrainingSubsidy { get; set; }
  487 +
  488 + /// <summary>
  489 + /// 当月交通补贴
  490 + /// </summary>
  491 + [SugarColumn(ColumnName = "F_MonthlyTransportSubsidy")]
  492 + public decimal MonthlyTransportSubsidy { get; set; }
  493 +
  494 + /// <summary>
  495 + /// 上月培训补贴
  496 + /// </summary>
  497 + [SugarColumn(ColumnName = "F_LastMonthTrainingSubsidy")]
  498 + public decimal LastMonthTrainingSubsidy { get; set; }
  499 +
  500 + /// <summary>
  501 + /// 上月交通补贴
  502 + /// </summary>
  503 + [SugarColumn(ColumnName = "F_LastMonthTransportSubsidy")]
  504 + public decimal LastMonthTransportSubsidy { get; set; }
  505 +
  506 + /// <summary>
  507 + /// 补贴合计
  508 + /// </summary>
  509 + [SugarColumn(ColumnName = "F_TotalSubsidy")]
  510 + public decimal TotalSubsidy { get; set; }
  511 +
  512 + /// <summary>
  513 + /// 缺卡扣款
  514 + /// </summary>
  515 + [SugarColumn(ColumnName = "F_MissingCard")]
  516 + public decimal MissingCard { get; set; }
  517 +
  518 + /// <summary>
  519 + /// 迟到扣款
  520 + /// </summary>
  521 + [SugarColumn(ColumnName = "F_LateArrival")]
  522 + public decimal LateArrival { get; set; }
  523 +
  524 + /// <summary>
  525 + /// 请假扣款
  526 + /// </summary>
  527 + [SugarColumn(ColumnName = "F_LeaveDeduction")]
  528 + public decimal LeaveDeduction { get; set; }
  529 +
  530 + /// <summary>
  531 + /// 扣社保
  532 + /// </summary>
  533 + [SugarColumn(ColumnName = "F_SocialInsuranceDeduction")]
  534 + public decimal SocialInsuranceDeduction { get; set; }
  535 +
  536 + /// <summary>
  537 + /// 扣除奖励
  538 + /// </summary>
  539 + [SugarColumn(ColumnName = "F_RewardDeduction")]
  540 + public decimal RewardDeduction { get; set; }
  541 +
  542 + /// <summary>
  543 + /// 扣住宿费
  544 + /// </summary>
  545 + [SugarColumn(ColumnName = "F_AccommodationDeduction")]
  546 + public decimal AccommodationDeduction { get; set; }
  547 +
  548 + /// <summary>
  549 + /// 扣学习期费用
  550 + /// </summary>
  551 + [SugarColumn(ColumnName = "F_StudyPeriodDeduction")]
  552 + public decimal StudyPeriodDeduction { get; set; }
  553 +
  554 + /// <summary>
  555 + /// 扣工作服费用
  556 + /// </summary>
  557 + [SugarColumn(ColumnName = "F_WorkClothesDeduction")]
  558 + public decimal WorkClothesDeduction { get; set; }
  559 +
  560 + /// <summary>
  561 + /// 扣款合计
  562 + /// </summary>
  563 + [SugarColumn(ColumnName = "F_TotalDeduction")]
  564 + public decimal TotalDeduction { get; set; }
  565 +
  566 + /// <summary>
  567 + /// 发奖金
  568 + /// </summary>
  569 + [SugarColumn(ColumnName = "F_Bonus")]
  570 + public decimal Bonus { get; set; }
  571 +
  572 + /// <summary>
  573 + /// 退手机押金
  574 + /// </summary>
  575 + [SugarColumn(ColumnName = "F_ReturnPhoneDeposit")]
  576 + public decimal ReturnPhoneDeposit { get; set; }
  577 +
  578 + /// <summary>
  579 + /// 退住宿押金
  580 + /// </summary>
  581 + [SugarColumn(ColumnName = "F_ReturnAccommodationDeposit")]
  582 + public decimal ReturnAccommodationDeposit { get; set; }
  583 +
  584 + /// <summary>
  585 + /// 实发工资
  586 + /// </summary>
  587 + [SugarColumn(ColumnName = "F_ActualSalary")]
  588 + public decimal ActualSalary { get; set; }
  589 +
  590 + /// <summary>
  591 + /// 当月是否发放
  592 + /// </summary>
  593 + [SugarColumn(ColumnName = "F_MonthlyPaymentStatus")]
  594 + public string MonthlyPaymentStatus { get; set; }
  595 +
  596 + /// <summary>
  597 + /// 支付金额
  598 + /// </summary>
  599 + [SugarColumn(ColumnName = "F_PaidAmount")]
  600 + public decimal PaidAmount { get; set; }
  601 +
  602 + /// <summary>
  603 + /// 待支付金额
  604 + /// </summary>
  605 + [SugarColumn(ColumnName = "F_PendingAmount")]
  606 + public decimal PendingAmount { get; set; }
  607 +
  608 + /// <summary>
  609 + /// 补发上月
  610 + /// </summary>
  611 + [SugarColumn(ColumnName = "F_LastMonthSupplement")]
  612 + public decimal LastMonthSupplement { get; set; }
  613 +
  614 + /// <summary>
  615 + /// 当月支付总额
  616 + /// </summary>
  617 + [SugarColumn(ColumnName = "F_MonthlyTotalPayment")]
  618 + public decimal MonthlyTotalPayment { get; set; }
  619 +
  620 + /// <summary>
  621 + /// 统计月份(YYYYMM)
  622 + /// </summary>
  623 + [SugarColumn(ColumnName = "F_StatisticsMonth")]
  624 + public string StatisticsMonth { get; set; }
  625 +
  626 + /// <summary>
  627 + /// 是否锁定(0未锁定,1已锁定)
  628 + /// </summary>
  629 + [SugarColumn(ColumnName = "F_IsLocked")]
  630 + public int IsLocked { get; set; }
  631 +
  632 + /// <summary>
  633 + /// 创建时间
  634 + /// </summary>
  635 + [SugarColumn(ColumnName = "F_CreateTime")]
  636 + public DateTime CreateTime { get; set; }
  637 +
  638 + /// <summary>
  639 + /// 更新时间
  640 + /// </summary>
  641 + [SugarColumn(ColumnName = "F_UpdateTime")]
  642 + public DateTime UpdateTime { get; set; }
  643 +
  644 + /// <summary>
  645 + /// 创建人
  646 + /// </summary>
  647 + [SugarColumn(ColumnName = "F_CreateUser")]
  648 + public string CreateUser { get; set; }
  649 +
  650 + /// <summary>
  651 + /// 更新人
  652 + /// </summary>
  653 + [SugarColumn(ColumnName = "F_UpdateUser")]
  654 + public string UpdateUser { get; set; }
  655 + }
  656 +}
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_department_consume_performance/LqStatisticsDepartmentConsumePerformanceEntity.cs
... ... @@ -94,5 +94,11 @@ namespace NCC.Extend.Entitys.lq_statistics_department_consume_performance
94 94 /// </summary>
95 95 [SugarColumn(ColumnName = "F_UpdateTime")]
96 96 public DateTime? UpdateTime { get; set; }
  97 +
  98 + /// <summary>
  99 + /// 是否新店
  100 + /// </summary>
  101 + [SugarColumn(ColumnName = "F_IsNewStore")]
  102 + public string IsNewStore { get; set; }
97 103 }
98 104 }
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_personal_performance/LqStatisticsPersonalPerformanceEntity.cs
... ... @@ -90,6 +90,30 @@ namespace NCC.Extend.Entitys.lq_statistics_personal_performance
90 90 public int OrderCount { get; set; }
91 91  
92 92 /// <summary>
  93 + /// 首开单数量
  94 + /// </summary>
  95 + [SugarColumn(ColumnName = "F_FirstOrderCount")]
  96 + public int FirstOrderCount { get; set; }
  97 +
  98 + /// <summary>
  99 + /// 升单数量
  100 + /// </summary>
  101 + [SugarColumn(ColumnName = "F_UpgradeOrderCount")]
  102 + public int UpgradeOrderCount { get; set; }
  103 +
  104 + /// <summary>
  105 + /// 首单业绩
  106 + /// </summary>
  107 + [SugarColumn(ColumnName = "F_FirstOrderPerformance")]
  108 + public decimal FirstOrderPerformance { get; set; }
  109 +
  110 + /// <summary>
  111 + /// 升单业绩
  112 + /// </summary>
  113 + [SugarColumn(ColumnName = "F_UpgradeOrderPerformance")]
  114 + public decimal UpgradeOrderPerformance { get; set; }
  115 +
  116 + /// <summary>
93 117 /// 最后订单日期
94 118 /// </summary>
95 119 [SugarColumn(ColumnName = "F_LastOrderDate")]
... ...
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_store_total_performance/LqStatisticsStoreTotalPerformanceEntity.cs 0 → 100644
  1 +using System;
  2 +using NCC.Common.Const;
  3 +using SqlSugar;
  4 +
  5 +namespace NCC.Extend.Entitys.lq_statistics_store_total_performance
  6 +{
  7 + /// <summary>
  8 + /// 门店总业绩统计
  9 + /// </summary>
  10 + [SugarTable("lq_statistics_store_total_performance")]
  11 + [Tenant(ClaimConst.TENANT_ID)]
  12 + public class LqStatisticsStoreTotalPerformanceEntity
  13 + {
  14 + /// <summary>
  15 + /// 主键ID
  16 + /// </summary>
  17 + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)]
  18 + public string Id { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 门店ID
  22 + /// </summary>
  23 + [SugarColumn(ColumnName = "F_StoreId")]
  24 + public string StoreId { get; set; }
  25 +
  26 + /// <summary>
  27 + /// 门店名称
  28 + /// </summary>
  29 + [SugarColumn(ColumnName = "F_StoreName")]
  30 + public string StoreName { get; set; }
  31 +
  32 + /// <summary>
  33 + /// 统计月份(YYYYMM格式)
  34 + /// </summary>
  35 + [SugarColumn(ColumnName = "F_StatisticsMonth")]
  36 + public string StatisticsMonth { get; set; }
  37 +
  38 + /// <summary>
  39 + /// 总业绩
  40 + /// </summary>
  41 + [SugarColumn(ColumnName = "F_TotalPerformance")]
  42 + public decimal TotalPerformance { get; set; }
  43 +
  44 + /// <summary>
  45 + /// 欠款金额
  46 + /// </summary>
  47 + [SugarColumn(ColumnName = "F_DebtAmount")]
  48 + public decimal DebtAmount { get; set; }
  49 +
  50 + /// <summary>
  51 + /// 总单业绩
  52 + /// </summary>
  53 + [SugarColumn(ColumnName = "F_TotalOrderPerformance")]
  54 + public decimal TotalOrderPerformance { get; set; }
  55 +
  56 + /// <summary>
  57 + /// 储扣总金额
  58 + /// </summary>
  59 + [SugarColumn(ColumnName = "F_StorageDeductionAmount")]
  60 + public decimal StorageDeductionAmount { get; set; }
  61 +
  62 + /// <summary>
  63 + /// 品项数量
  64 + /// </summary>
  65 + [SugarColumn(ColumnName = "F_ItemQuantity")]
  66 + public int ItemQuantity { get; set; }
  67 +
  68 + /// <summary>
  69 + /// 首开单数量
  70 + /// </summary>
  71 + [SugarColumn(ColumnName = "F_FirstOrderCount")]
  72 + public int FirstOrderCount { get; set; }
  73 +
  74 + /// <summary>
  75 + /// 升单数量
  76 + /// </summary>
  77 + [SugarColumn(ColumnName = "F_UpgradeOrderCount")]
  78 + public int UpgradeOrderCount { get; set; }
  79 +
  80 + /// <summary>
  81 + /// 首单业绩
  82 + /// </summary>
  83 + [SugarColumn(ColumnName = "F_FirstOrderPerformance")]
  84 + public decimal FirstOrderPerformance { get; set; }
  85 +
  86 + /// <summary>
  87 + /// 升单业绩
  88 + /// </summary>
  89 + [SugarColumn(ColumnName = "F_UpgradeOrderPerformance")]
  90 + public decimal UpgradeOrderPerformance { get; set; }
  91 +
  92 + /// <summary>
  93 + /// 创建时间
  94 + /// </summary>
  95 + [SugarColumn(ColumnName = "F_CreateTime")]
  96 + public DateTime? CreateTime { get; set; }
  97 + }
  98 +}
... ...
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
... ... @@ -350,7 +350,17 @@ namespace NCC.Extend.LqKdKdjlb
350 350 }
351 351 //通过会员id查询会员信息
352 352 var memberInfo = await _db.Queryable<LqKhxxEntity>().Where(u => u.Id == entity.Kdhy).FirstAsync();
353   - memberInfo.Khlx = "老客";
  353 + //通过开单记录表查询这个会员开单金额
  354 + var kdAmount = await _db.Queryable<LqKdKdjlbEntity>().Where(u => u.Kdhy == entity.Kdhy).SumAsync(u => u.Sfyj);
  355 + //如果开单金额小于500,为散客,如果大于500,为会员
  356 + if (kdAmount < 500)
  357 + {
  358 + memberInfo.Khlx = MemberTypeEnum.散客.GetHashCode().ToString();
  359 + }
  360 + else
  361 + {
  362 + memberInfo.Khlx = MemberTypeEnum.会员.GetHashCode().ToString();
  363 + }
354 364 await _db.Updateable(memberInfo).ExecuteCommandAsync();
355 365 // 批量插入扣款信息
356 366 if (allDeductEntities.Any())
... ...
netcore/src/Modularity/Extend/NCC.Extend/LqStatisticsService.cs
... ... @@ -15,7 +15,9 @@ using NCC.Extend.Entitys.Dto.LqMdxx;
15 15 using NCC.Extend.Entitys.Dto.LqStatistics;
16 16 using NCC.Extend.Entitys.Dto.LqStatistics.DepartmentInfo;
17 17 using NCC.Extend.Entitys.Dto.LqStatisticsStoreConsumePerformance;
  18 +using NCC.Extend.Entitys.Dto.LqStatisticsStoreTotalPerformance;
18 19 using NCC.Extend.Entitys.Dto.LqStatisticsTechPerformance;
  20 +using NCC.Extend.Entitys.Dto.LqSalaryStatistics;
19 21 using NCC.Extend.Entitys.Dto.LqStatisticsDepartmentConsumePerformance;
20 22 using NCC.Extend.Entitys.Dto.LqYcsdJsj;
21 23 using NCC.Extend.Entitys.lq_hytk_kjbsyj;
... ... @@ -24,13 +26,16 @@ using NCC.Extend.Entitys.lq_kd_jksyj;
24 26 using NCC.Extend.Entitys.lq_kd_kdjlb;
25 27 using NCC.Extend.Entitys.lq_kd_kjbsyj;
26 28 using NCC.Extend.Entitys.lq_mdxx;
  29 +using NCC.Extend.Entitys.lq_md_xdbhsj;
27 30 using NCC.Extend.Entitys.lq_xh_kjbsyj;
28 31 using NCC.Extend.Entitys.lq_ycsd_jsj;
29 32 using NCC.Extend.Entitys.lq_yjmxb;
30 33 using NCC.Extend.Entitys.lq_statistics_gold_triangle;
31 34 using NCC.Extend.Entitys.lq_statistics_personal_performance;
32 35 using NCC.Extend.Entitys.lq_statistics_store_consume_performance;
  36 +using NCC.Extend.Entitys.lq_statistics_store_total_performance;
33 37 using NCC.Extend.Entitys.lq_statistics_tech_performance;
  38 +using NCC.Extend.Entitys.lq_salary_statistics;
34 39 using NCC.Extend.Entitys.lq_statistics_department_consume_performance;
35 40 using NCC.Extend.Entitys.lq_xmzl;
36 41 using NCC.Extend.Entitys.Dto.LqStatisticsPersonalPerformance;
... ... @@ -1423,6 +1428,10 @@ namespace NCC.Extend.LqStatistics
1423 1428 ELSE COALESCE(u.F_GW, '')
1424 1429 END AS Position,
1425 1430 COUNT(DISTINCT jksyj.glkdbh) AS OrderCount,
  1431 + COUNT(DISTINCT CASE WHEN kd.sfskdd = '是' THEN jksyj.glkdbh END) AS FirstOrderCount,
  1432 + COUNT(DISTINCT CASE WHEN kd.sfskdd = '否' THEN jksyj.glkdbh END) AS UpgradeOrderCount,
  1433 + SUM(CASE WHEN kd.sfskdd = '是' THEN CAST(jksyj.jksyj AS DECIMAL(18,2)) ELSE 0 END) AS FirstOrderPerformance,
  1434 + SUM(CASE WHEN kd.sfskdd = '否' THEN CAST(jksyj.jksyj AS DECIMAL(18,2)) ELSE 0 END) AS UpgradeOrderPerformance,
1426 1435 MAX(jksyj.yjsj) AS LastOrderDate,
1427 1436 MIN(jksyj.yjsj) AS FirstOrderDate,
1428 1437 SUM(
... ... @@ -1440,10 +1449,11 @@ namespace NCC.Extend.LqStatistics
1440 1449 SUM(CAST(jksyj.jksyj AS DECIMAL(18,2))) AS TotalPerformance
1441 1450 FROM lq_kd_jksyj jksyj
1442 1451 INNER JOIN lq_kd_pxmx pxmx ON jksyj.F_kdpxid = pxmx.F_Id AND pxmx.F_IsEffective = 1
  1452 + INNER JOIN lq_kd_kdjlb kd ON jksyj.glkdbh = kd.F_Id
1443 1453 INNER JOIN lq_xmzl xmzl ON pxmx.px = xmzl.F_Id
1444 1454 INNER JOIN BASE_USER u ON jksyj.jkszh = u.F_Id
1445 1455 LEFT JOIN lq_mdxx md ON u.F_MDID = md.F_Id
1446   - LEFT JOIN lq_ycsd_jsj jsj ON jksyj.jsj_id = jsj.F_Id AND jsj.yf = @statisticsMonth
  1456 + LEFT JOIN lq_ycsd_jsj jsj ON u.F_MDID = jsj.md AND jsj.yf = @statisticsMonth
1447 1457 LEFT JOIN (
1448 1458 SELECT DISTINCT user_id, F_Month, MAX(is_leader) as is_leader
1449 1459 FROM lq_jinsanjiao_user
... ... @@ -1513,6 +1523,10 @@ namespace NCC.Extend.LqStatistics
1513 1523 BasePerformance = Convert.ToDecimal(stats.BasePerformance ?? 0),
1514 1524 CooperationPerformance = Convert.ToDecimal(stats.CooperationPerformance ?? 0),
1515 1525 OrderCount = Convert.ToInt32(stats.OrderCount ?? 0),
  1526 + FirstOrderCount = Convert.ToInt32(stats.FirstOrderCount ?? 0),
  1527 + UpgradeOrderCount = Convert.ToInt32(stats.UpgradeOrderCount ?? 0),
  1528 + FirstOrderPerformance = Convert.ToDecimal(stats.FirstOrderPerformance ?? 0),
  1529 + UpgradeOrderPerformance = Convert.ToDecimal(stats.UpgradeOrderPerformance ?? 0),
1516 1530 LastOrderDate = stats.LastOrderDate as DateTime?,
1517 1531 FirstOrderDate = stats.FirstOrderDate as DateTime?,
1518 1532 CreateTime = DateTime.Now
... ... @@ -1627,8 +1641,30 @@ namespace NCC.Extend.LqStatistics
1627 1641 // 按总业绩降序排序
1628 1642 query = query.OrderBy(x => x.TotalPerformance, OrderByType.Desc);
1629 1643  
1630   - // 分页查询
1631   - var result = await query.ToPagedListAsync(input.currentPage, input.pageSize);
  1644 + // 分页查询并映射到DTO
  1645 + var result = await query.Select(it => new LqStatisticsPersonalPerformanceListOutput
  1646 + {
  1647 + Id = it.Id,
  1648 + StatisticsMonth = it.StatisticsMonth,
  1649 + StoreId = it.StoreId,
  1650 + StoreName = it.StoreName,
  1651 + GoldTriangleId = it.GoldTriangleId,
  1652 + GoldTriangleName = it.GoldTriangleName,
  1653 + Position = it.Position,
  1654 + EmployeeId = it.EmployeeId,
  1655 + EmployeeName = it.EmployeeName,
  1656 + TotalPerformance = it.TotalPerformance,
  1657 + BasePerformance = it.BasePerformance,
  1658 + CooperationPerformance = it.CooperationPerformance,
  1659 + OrderCount = it.OrderCount,
  1660 + FirstOrderCount = it.FirstOrderCount,
  1661 + UpgradeOrderCount = it.UpgradeOrderCount,
  1662 + FirstOrderPerformance = it.FirstOrderPerformance,
  1663 + UpgradeOrderPerformance = it.UpgradeOrderPerformance,
  1664 + LastOrderDate = it.LastOrderDate,
  1665 + FirstOrderDate = it.FirstOrderDate,
  1666 + CreateTime = it.CreateTime
  1667 + }).ToPagedListAsync(input.currentPage, input.pageSize);
1632 1668  
1633 1669 return new
1634 1670 {
... ... @@ -2111,6 +2147,37 @@ namespace NCC.Extend.LqStatistics
2111 2147 var healthCoachData = await _db.Ado.SqlQueryAsync<dynamic>(healthCoachSql, new { statisticsMonth });
2112 2148 foreach (var item in healthCoachData)
2113 2149 {
  2150 + // 判断门店是否为新店(通过新店保护时间表查询)
  2151 + var isNewStore = "否";
  2152 + if (!string.IsNullOrEmpty(item.F_StoreId?.ToString()))
  2153 + {
  2154 + var statisticsDate = DateTime.ParseExact(statisticsMonth + "01", "yyyyMMdd", null);
  2155 + var monthStart = statisticsDate.AddDays(-statisticsDate.Day + 1);
  2156 + var monthEnd = statisticsDate.AddMonths(1).AddDays(-1);
  2157 +
  2158 + // 查询门店在统计月份是否处于新店保护期内
  2159 + var storeId = item.F_StoreId?.ToString();
  2160 + var newStoreProtectionSql = @"
  2161 + SELECT COUNT(1) as Count
  2162 + FROM lq_md_xdbhsj
  2163 + WHERE mdid = @storeId
  2164 + AND sfqy = 1
  2165 + AND bhkssj <= @monthEnd
  2166 + AND bhjssj >= @monthStart";
  2167 + var protectionResult = await _db.Ado.SqlQueryAsync<dynamic>(newStoreProtectionSql, new
  2168 + {
  2169 + storeId,
  2170 + monthStart = monthStart.ToString("yyyy-MM-dd"),
  2171 + monthEnd = monthEnd.ToString("yyyy-MM-dd")
  2172 + });
  2173 + var hasProtection = protectionResult.FirstOrDefault()?.Count > 0;
  2174 +
  2175 + if (hasProtection)
  2176 + {
  2177 + isNewStore = "是";
  2178 + }
  2179 + }
  2180 +
2114 2181 allStatisticsData.Add(new LqStatisticsDepartmentConsumePerformanceEntity
2115 2182 {
2116 2183 Id = YitIdHelper.NextId().ToString(),
... ... @@ -2125,6 +2192,7 @@ namespace NCC.Extend.LqStatistics
2125 2192 ConsumePerformance = Convert.ToDecimal(item.F_ConsumePerformance ?? 0),
2126 2193 ConsumeQuantity = Convert.ToDecimal(item.F_ConsumeQuantity ?? 0),
2127 2194 ManualFee = Convert.ToDecimal(item.F_ManualFee ?? 0),
  2195 + IsNewStore = isNewStore,
2128 2196 CreateTime = DateTime.Now
2129 2197 });
2130 2198 }
... ... @@ -2153,6 +2221,37 @@ namespace NCC.Extend.LqStatistics
2153 2221 var techTeacherData = await _db.Ado.SqlQueryAsync<dynamic>(techTeacherSql, new { statisticsMonth });
2154 2222 foreach (var item in techTeacherData)
2155 2223 {
  2224 + // 判断门店是否为新店(通过新店保护时间表查询)
  2225 + var isNewStore = "否";
  2226 + if (!string.IsNullOrEmpty(item.F_StoreId?.ToString()))
  2227 + {
  2228 + var statisticsDate = DateTime.ParseExact(statisticsMonth + "01", "yyyyMMdd", null);
  2229 + var monthStart = statisticsDate.AddDays(-statisticsDate.Day + 1);
  2230 + var monthEnd = statisticsDate.AddMonths(1).AddDays(-1);
  2231 +
  2232 + // 查询门店在统计月份是否处于新店保护期内
  2233 + var storeId = item.F_StoreId?.ToString();
  2234 + var newStoreProtectionSql = @"
  2235 + SELECT COUNT(1) as Count
  2236 + FROM lq_md_xdbhsj
  2237 + WHERE mdid = @storeId
  2238 + AND sfqy = 1
  2239 + AND bhkssj <= @monthEnd
  2240 + AND bhjssj >= @monthStart";
  2241 + var protectionResult = await _db.Ado.SqlQueryAsync<dynamic>(newStoreProtectionSql, new
  2242 + {
  2243 + storeId,
  2244 + monthStart = monthStart.ToString("yyyy-MM-dd"),
  2245 + monthEnd = monthEnd.ToString("yyyy-MM-dd")
  2246 + });
  2247 + var hasProtection = protectionResult.FirstOrDefault()?.Count > 0;
  2248 +
  2249 + if (hasProtection)
  2250 + {
  2251 + isNewStore = "是";
  2252 + }
  2253 + }
  2254 +
2156 2255 allStatisticsData.Add(new LqStatisticsDepartmentConsumePerformanceEntity
2157 2256 {
2158 2257 Id = YitIdHelper.NextId().ToString(),
... ... @@ -2167,6 +2266,7 @@ namespace NCC.Extend.LqStatistics
2167 2266 ConsumePerformance = Convert.ToDecimal(item.F_ConsumePerformance ?? 0),
2168 2267 ConsumeQuantity = Convert.ToDecimal(item.F_ConsumeQuantity ?? 0),
2169 2268 ManualFee = Convert.ToDecimal(item.F_ManualFee ?? 0),
  2269 + IsNewStore = isNewStore,
2170 2270 CreateTime = DateTime.Now
2171 2271 });
2172 2272 }
... ... @@ -2267,6 +2367,498 @@ namespace NCC.Extend.LqStatistics
2267 2367  
2268 2368 #endregion
2269 2369  
  2370 + #region 门店总业绩统计
  2371 +
  2372 + /// <summary>
  2373 + /// 保存门店总业绩统计数据
  2374 + /// </summary>
  2375 + /// <remarks>
  2376 + /// 统计门店的总业绩、欠款金额、总单业绩、储扣总金额、品项数量、首开单数量、升单数量
  2377 + ///
  2378 + /// 示例请求:
  2379 + /// ```json
  2380 + /// {
  2381 + /// "statisticsMonth": "202501"
  2382 + /// }
  2383 + /// ```
  2384 + ///
  2385 + /// 参数说明:
  2386 + /// - statisticsMonth: 统计月份,格式为YYYYMM
  2387 + /// </remarks>
  2388 + /// <param name="input">统计输入参数</param>
  2389 + /// <returns>保存结果</returns>
  2390 + /// <response code="200">成功保存门店总业绩统计数据</response>
  2391 + /// <response code="400">参数错误</response>
  2392 + /// <response code="500">服务器错误</response>
  2393 + [HttpPost("save-store-total-performance-stats")]
  2394 + public async Task<dynamic> SaveStoreTotalPerformanceStatistics([FromBody] SalaryStatisticsInput input)
  2395 + {
  2396 + try
  2397 + {
  2398 + if (input == null || string.IsNullOrEmpty(input.StatisticsMonth) || input.StatisticsMonth.Length != 6)
  2399 + {
  2400 + throw NCCException.Oh("统计月份格式错误,请使用YYYYMM格式");
  2401 + }
  2402 +
  2403 + var statisticsMonth = input.StatisticsMonth;
  2404 +
  2405 + // 统计门店总业绩数据
  2406 + var storePerformanceSql = @"
  2407 + SELECT
  2408 + kd.djmd as F_StoreId,
  2409 + md.dm as F_StoreName,
  2410 + @statisticsMonth as F_StatisticsMonth,
  2411 + COALESCE(SUM(kd.zdyj), 0) as F_TotalPerformance,
  2412 + COALESCE(SUM(kd.qk), 0) as F_DebtAmount,
  2413 + COALESCE(SUM(kd.sfyj), 0) as F_TotalOrderPerformance,
  2414 + COALESCE(SUM(kd.F_DeductAmount), 0) as F_StorageDeductionAmount,
  2415 + COUNT(pxmx.F_Id) as F_ItemQuantity,
  2416 + COUNT(DISTINCT CASE WHEN kd.sfskdd = '是' THEN kd.F_Id END) as F_FirstOrderCount,
  2417 + COUNT(DISTINCT CASE WHEN kd.sfskdd = '否' THEN kd.F_Id END) as F_UpgradeOrderCount,
  2418 + SUM(CASE WHEN kd.sfskdd = '是' THEN COALESCE(kd.zdyj, 0) ELSE 0 END) as F_FirstOrderPerformance,
  2419 + SUM(CASE WHEN kd.sfskdd = '否' THEN COALESCE(kd.zdyj, 0) ELSE 0 END) as F_UpgradeOrderPerformance
  2420 + FROM lq_kd_kdjlb kd
  2421 + LEFT JOIN lq_mdxx md ON kd.djmd = md.F_Id
  2422 + LEFT JOIN lq_kd_pxmx pxmx ON kd.F_Id = pxmx.glkdbh AND pxmx.F_IsEffective = 1
  2423 + WHERE kd.F_IsEffective = 1
  2424 + AND DATE_FORMAT(kd.kdrq, '%Y%m') = @statisticsMonth
  2425 + GROUP BY kd.djmd, md.dm";
  2426 +
  2427 + var storePerformanceData = await _db.Ado.SqlQueryAsync<dynamic>(storePerformanceSql, new { statisticsMonth });
  2428 +
  2429 + var entities = storePerformanceData.Select(data => new LqStatisticsStoreTotalPerformanceEntity
  2430 + {
  2431 + Id = YitIdHelper.NextId().ToString(),
  2432 + StoreId = data.F_StoreId?.ToString() ?? "",
  2433 + StoreName = data.F_StoreName?.ToString() ?? "",
  2434 + StatisticsMonth = statisticsMonth,
  2435 + TotalPerformance = Convert.ToDecimal(data.F_TotalPerformance ?? 0),
  2436 + DebtAmount = Convert.ToDecimal(data.F_DebtAmount ?? 0),
  2437 + TotalOrderPerformance = Convert.ToDecimal(data.F_TotalOrderPerformance ?? 0),
  2438 + StorageDeductionAmount = Convert.ToDecimal(data.F_StorageDeductionAmount ?? 0),
  2439 + ItemQuantity = Convert.ToInt32(data.F_ItemQuantity ?? 0),
  2440 + FirstOrderCount = Convert.ToInt32(data.F_FirstOrderCount ?? 0),
  2441 + UpgradeOrderCount = Convert.ToInt32(data.F_UpgradeOrderCount ?? 0),
  2442 + FirstOrderPerformance = Convert.ToDecimal(data.F_FirstOrderPerformance ?? 0),
  2443 + UpgradeOrderPerformance = Convert.ToDecimal(data.F_UpgradeOrderPerformance ?? 0),
  2444 + CreateTime = DateTime.Now
  2445 + }).ToList();
  2446 +
  2447 + // 使用事务确保数据一致性
  2448 + var result = await _db.Ado.UseTranAsync(async () =>
  2449 + {
  2450 + // 先删除该月份的历史数据
  2451 + await _db.Deleteable<LqStatisticsStoreTotalPerformanceEntity>()
  2452 + .Where(x => x.StatisticsMonth == statisticsMonth)
  2453 + .ExecuteCommandAsync();
  2454 +
  2455 + // 批量插入新数据
  2456 + if (entities.Any())
  2457 + {
  2458 + return await _db.Insertable(entities).ExecuteCommandAsync();
  2459 + }
  2460 + return 0;
  2461 + });
  2462 +
  2463 + var savedCount = result.IsSuccess ? result.Data : 0;
  2464 + _logger.LogInformation($"成功保存门店总业绩统计数据 - 月份: {statisticsMonth}, 记录数: {savedCount}");
  2465 +
  2466 + return new
  2467 + {
  2468 + Success = true,
  2469 + Message = $"成功保存 {savedCount} 条门店总业绩统计数据",
  2470 + SavedCount = savedCount,
  2471 + StatisticsMonth = statisticsMonth
  2472 + };
  2473 + }
  2474 + catch (Exception ex)
  2475 + {
  2476 + _logger.LogError(ex, $"保存门店总业绩统计数据失败 - 月份: {input?.StatisticsMonth}");
  2477 + throw NCCException.Oh($"保存门店总业绩统计数据失败: {ex.Message}");
  2478 + }
  2479 + }
  2480 +
  2481 + /// <summary>
  2482 + /// 获取门店总业绩统计列表
  2483 + /// </summary>
  2484 + /// <remarks>
  2485 + /// 分页查询门店总业绩统计数据
  2486 + ///
  2487 + /// 示例请求:
  2488 + /// ```json
  2489 + /// {
  2490 + /// "currentPage": 1,
  2491 + /// "pageSize": 20,
  2492 + /// "storeId": "门店ID",
  2493 + /// "statisticsMonth": "202501"
  2494 + /// }
  2495 + /// ```
  2496 + /// </remarks>
  2497 + /// <param name="input">查询参数</param>
  2498 + /// <returns>分页数据</returns>
  2499 + /// <response code="200">成功返回门店总业绩统计列表</response>
  2500 + /// <response code="400">参数错误</response>
  2501 + /// <response code="500">服务器错误</response>
  2502 + [HttpGet("store-total-performance-list")]
  2503 + public async Task<dynamic> GetStoreTotalPerformanceList([FromQuery] LqStatisticsStoreTotalPerformanceListQueryInput input)
  2504 + {
  2505 + try
  2506 + {
  2507 + var sidx = input.sidx == null ? "createTime" : input.sidx;
  2508 + var data = await _db.Queryable<LqStatisticsStoreTotalPerformanceEntity>()
  2509 + .WhereIF(!string.IsNullOrEmpty(input.storeId), p => p.StoreId.Contains(input.storeId))
  2510 + .WhereIF(!string.IsNullOrEmpty(input.storeName), p => p.StoreName.Contains(input.storeName))
  2511 + .WhereIF(!string.IsNullOrEmpty(input.statisticsMonth), p => p.StatisticsMonth.Equals(input.statisticsMonth))
  2512 + .Select(it => new LqStatisticsStoreTotalPerformanceListOutput
  2513 + {
  2514 + id = it.Id,
  2515 + storeId = it.StoreId,
  2516 + storeName = it.StoreName,
  2517 + statisticsMonth = it.StatisticsMonth,
  2518 + totalPerformance = it.TotalPerformance,
  2519 + debtAmount = it.DebtAmount,
  2520 + totalOrderPerformance = it.TotalOrderPerformance,
  2521 + storageDeductionAmount = it.StorageDeductionAmount,
  2522 + itemQuantity = it.ItemQuantity,
  2523 + firstOrderCount = it.FirstOrderCount,
  2524 + upgradeOrderCount = it.UpgradeOrderCount,
  2525 + firstOrderPerformance = it.FirstOrderPerformance,
  2526 + upgradeOrderPerformance = it.UpgradeOrderPerformance,
  2527 + createTime = it.CreateTime
  2528 + })
  2529 + .OrderBy(sidx + " " + input.sort)
  2530 + .ToPagedListAsync(input.currentPage, input.pageSize);
  2531 +
  2532 + return PageResult<LqStatisticsStoreTotalPerformanceListOutput>.SqlSugarPageResult(data);
  2533 + }
  2534 + catch (Exception ex)
  2535 + {
  2536 + _logger.LogError(ex, "获取门店总业绩统计列表失败");
  2537 + throw NCCException.Oh($"获取门店总业绩统计列表失败: {ex.Message}");
  2538 + }
  2539 + }
  2540 +
  2541 + #endregion
  2542 +
  2543 + #region 工资统计
  2544 +
  2545 + /// <summary>
  2546 + /// 保存工资统计数据
  2547 + /// </summary>
  2548 + /// <remarks>
  2549 + /// 初始化工资统计表,从其他统计表读取数据并计算工资
  2550 + ///
  2551 + /// 示例请求:
  2552 + /// ```json
  2553 + /// {
  2554 + /// "statisticsMonth": "202501"
  2555 + /// }
  2556 + /// ```
  2557 + ///
  2558 + /// 参数说明:
  2559 + /// - statisticsMonth: 统计月份,格式为YYYYMM
  2560 + /// </remarks>
  2561 + /// <param name="input">统计输入参数</param>
  2562 + /// <returns>保存结果</returns>
  2563 + /// <response code="200">成功保存工资统计数据</response>
  2564 + /// <response code="400">参数错误</response>
  2565 + /// <response code="500">服务器错误</response>
  2566 + [HttpPost("save-salary-statistics")]
  2567 + public async Task<dynamic> SaveSalaryStatistics([FromBody] SalaryStatisticsInput input)
  2568 + {
  2569 + try
  2570 + {
  2571 + if (input == null || string.IsNullOrEmpty(input.StatisticsMonth) || input.StatisticsMonth.Length != 6)
  2572 + {
  2573 + throw NCCException.Oh("统计月份格式错误,请使用YYYYMM格式");
  2574 + }
  2575 +
  2576 + var statisticsMonth = input.StatisticsMonth;
  2577 +
  2578 + // 1. 先初始化所有员工到工资统计表
  2579 + await InitializeSalaryStatistics(statisticsMonth);
  2580 +
  2581 + // 2. 从其他统计表读取数据并更新工资统计表
  2582 + await UpdateSalaryStatisticsFromOtherTables(statisticsMonth);
  2583 +
  2584 + _logger.LogInformation($"成功保存工资统计数据 - 月份: {statisticsMonth}");
  2585 +
  2586 + return new
  2587 + {
  2588 + Success = true,
  2589 + Message = $"成功保存 {statisticsMonth} 月份工资统计数据",
  2590 + StatisticsMonth = statisticsMonth
  2591 + };
  2592 + }
  2593 + catch (Exception ex)
  2594 + {
  2595 + _logger.LogError(ex, $"保存工资统计数据失败 - 月份: {input?.StatisticsMonth}");
  2596 + throw NCCException.Oh($"保存工资统计数据失败: {ex.Message}");
  2597 + }
  2598 + }
  2599 +
  2600 + /// <summary>
  2601 + /// 获取工资统计列表
  2602 + /// </summary>
  2603 + /// <remarks>
  2604 + /// 分页查询工资统计数据
  2605 + ///
  2606 + /// 示例请求:
  2607 + /// ```json
  2608 + /// POST /api/Extend/LqStatistics/get-salary-statistics-list
  2609 + /// {
  2610 + /// "currentPage": 1,
  2611 + /// "pageSize": 10,
  2612 + /// "statisticsMonth": "202401",
  2613 + /// "storeName": "门店名称",
  2614 + /// "employeeName": "员工姓名",
  2615 + /// "position": "岗位"
  2616 + /// }
  2617 + /// ```
  2618 + /// </remarks>
  2619 + /// <param name="input">查询参数</param>
  2620 + /// <returns>分页数据</returns>
  2621 + /// <response code="200">查询成功</response>
  2622 + /// <response code="400">参数错误</response>
  2623 + /// <response code="500">服务器内部错误</response>
  2624 + [HttpPost("get-salary-statistics-list")]
  2625 + public async Task<dynamic> GetSalaryStatisticsList([FromBody] LqSalaryStatisticsListQueryInput input)
  2626 + {
  2627 + try
  2628 + {
  2629 + var query = _db.Queryable<LqSalaryStatisticsEntity>();
  2630 +
  2631 + // 添加查询条件
  2632 + query = query.WhereIF(!string.IsNullOrEmpty(input.statisticsMonth), x => x.StatisticsMonth == input.statisticsMonth);
  2633 + query = query.WhereIF(!string.IsNullOrEmpty(input.storeName), x => x.StoreName.Contains(input.storeName));
  2634 + query = query.WhereIF(!string.IsNullOrEmpty(input.employeeName), x => x.EmployeeName.Contains(input.employeeName));
  2635 + query = query.WhereIF(!string.IsNullOrEmpty(input.position), x => x.Position == input.position);
  2636 + query = query.WhereIF(input.isLocked.HasValue, x => x.IsLocked == input.isLocked.Value);
  2637 + // 按总业绩降序排序
  2638 + // 分页查询
  2639 + var data = await query.Select(x => new LqSalaryStatisticsListOutput
  2640 + {
  2641 + Id = x.Id,
  2642 + StatisticsMonth = x.StatisticsMonth,
  2643 + StoreId = x.StoreId,
  2644 + StoreName = x.StoreName,
  2645 + EmployeeId = x.EmployeeId,
  2646 + EmployeeName = x.EmployeeName,
  2647 + Position = x.Position,
  2648 + GoldTriangleTeam = x.GoldTriangleTeam,
  2649 + TotalPerformance = x.TotalPerformance,
  2650 + BasePerformance = x.BasePerformance,
  2651 + CooperationPerformance = x.CooperationPerformance,
  2652 + RewardPerformance = x.RewardPerformance,
  2653 + StoreTotalPerformance = x.StoreTotalPerformance,
  2654 + TeamPerformance = x.TeamPerformance,
  2655 + PerformanceRatio = x.Percentage,
  2656 + NewCustomerPerformance = x.NewCustomerPerformance,
  2657 + NewCustomerConversionRate = x.NewCustomerConversionRate,
  2658 + NewCustomerPoint = x.NewCustomerPoint,
  2659 + UpgradePerformance = x.UpgradePerformance,
  2660 + UpgradePoint = x.UpgradePoint,
  2661 + TraceabilityPerformance = x.TraceabilityPerformance,
  2662 + CellPerformance = x.CellPerformance,
  2663 + ProjectOnePerformance = x.MajorProject1Performance,
  2664 + ProjectTwoPerformance = x.MajorProject2Performance,
  2665 + MonthlyPerformance = x.MonthlyPerformance,
  2666 + PropertyWaterElectricity = x.PropertyWaterElectricity,
  2667 + StoreExpense = x.StoreExpense,
  2668 + ProductMaterial = x.ProductMaterial,
  2669 + MicroSculptureCost = x.MicroSculptureCost,
  2670 + OtherCooperationCost = x.OtherCooperationCost,
  2671 + TowelWashing = x.TowelWashing,
  2672 + GrossProfit = x.GrossProfit,
  2673 + GeneralManagerCommission = x.GeneralManagerCommission,
  2674 + ManagerCommission = x.ManagerCommission,
  2675 + Consumption = x.Consumption,
  2676 + ProjectCount = x.ProjectCount,
  2677 + AttendanceDays = x.CustomerCount,
  2678 + StoreDays = x.WorkingDays,
  2679 + LeaveDays = x.LeaveDays,
  2680 + CommissionPoint = x.CommissionPoint,
  2681 + BasePerformanceCommission = x.BasePerformanceCommission,
  2682 + CooperationPerformanceCommission = x.CooperationPerformanceCommission,
  2683 + ConsultantCommission = x.ConsultantCommission,
  2684 + StoreTAreaCommission = x.StoreTZoneCommission,
  2685 + AssistantCommission1 = x.AssistantCommission,
  2686 + AssistantDirectorCommission = x.AssistantDirectorCommission,
  2687 + DirectorCommission = x.DirectorCommission,
  2688 + AssistantCommission2 = x.StoreManagerCommission,
  2689 + GeneralManagerCommissionAmount = x.GeneralManagerCommissionTotal,
  2690 + ManagerCommissionAmount = x.ManagerCommissionTotal,
  2691 + PerformanceCommission = x.PerformanceCommission,
  2692 + ConsumptionCommission = x.ConsumptionCommission,
  2693 + TechGroupLeaderCommission = x.TechGroupLeaderCommission,
  2694 + TraceabilityCommission = x.TraceabilityCommission,
  2695 + CellCommission = x.CellCommission,
  2696 + ProjectCommission = x.MajorProjectCommission,
  2697 + CommissionTotal = x.TotalCommission,
  2698 + HealthCoachBaseSalary = x.HealthCoachBaseSalary,
  2699 + AssistantBaseSalary = x.AssistantBaseSalary,
  2700 + ManagerBaseSalary = x.StoreManagerBaseSalary,
  2701 + DirectorBaseSalary = x.DirectorBaseSalary,
  2702 + AssistantDirectorBaseSalary = x.AssistantDirectorBaseSalary,
  2703 + GeneralManagerBaseSalary = x.GeneralManagerBaseSalary,
  2704 + ManagerBaseSalaryAmount = x.ManagerBaseSalary,
  2705 + TechTeacherBaseSalary = x.TechTeacherBaseSalary,
  2706 + ProjectBaseSalary = x.MajorProjectBaseSalary,
  2707 + BaseSalaryTotal = x.TotalBaseSalary,
  2708 + ManualWork = x.HandworkFee,
  2709 + HeadCountReward = x.PersonnelReward,
  2710 + PhoneManagement = x.PhoneManagement,
  2711 + CarAllowance = x.TransportationAllowance,
  2712 + LessRest = x.LessRest,
  2713 + FullAttendance = x.FullAttendance,
  2714 + CalculatedGrossSalary = x.CalculatedGrossSalary,
  2715 + Guarantee = x.GuaranteedSalary,
  2716 + GuaranteeLeave = x.GuaranteedLeaveDeduction,
  2717 + GuaranteeBaseSalary = x.GuaranteedBaseSalary,
  2718 + GuaranteeSupplement = x.GuaranteedSupplement,
  2719 + FinalGrossSalary = x.FinalGrossSalary,
  2720 + MonthlyTrainingSubsidy = x.MonthlyTrainingSubsidy,
  2721 + MonthlyTransportSubsidy = x.MonthlyTransportSubsidy,
  2722 + LastMonthTrainingSubsidy = x.LastMonthTrainingSubsidy,
  2723 + LastMonthTransportSubsidy = x.LastMonthTransportSubsidy,
  2724 + SubsidyTotal = x.TotalSubsidy,
  2725 + MissingCard = x.MissingCard,
  2726 + Late = x.LateArrival,
  2727 + Leave = x.LeaveDeduction,
  2728 + SocialSecurityDeduction = x.SocialInsuranceDeduction,
  2729 + RewardDeduction = x.RewardDeduction,
  2730 + AccommodationDeduction = x.AccommodationDeduction,
  2731 + StudyPeriodDeduction = x.StudyPeriodDeduction,
  2732 + WorkClothesDeduction = x.WorkClothesDeduction,
  2733 + DeductionTotal = x.TotalDeduction,
  2734 + Bonus = x.Bonus,
  2735 + PhoneDepositReturn = x.ReturnPhoneDeposit,
  2736 + AccommodationDepositReturn = x.ReturnAccommodationDeposit,
  2737 + ActualGrossSalary = x.ActualSalary,
  2738 + MonthlyPaymentStatus = x.MonthlyPaymentStatus,
  2739 + PaymentAmount = x.PaidAmount,
  2740 + PendingPaymentAmount = x.PendingAmount,
  2741 + LastMonthSupplement = x.LastMonthSupplement,
  2742 + MonthlyPaymentTotal = x.MonthlyTotalPayment,
  2743 + IsLocked = x.IsLocked == 1,
  2744 + CreateTime = x.CreateTime,
  2745 + UpdateTime = x.UpdateTime
  2746 + }).MergeTable().OrderBy(x => x.TotalPerformance, OrderByType.Desc).ToPagedListAsync(input.currentPage, input.pageSize);
  2747 + return PageResult<LqSalaryStatisticsListOutput>.SqlSugarPageResult(data);
  2748 +
  2749 +
  2750 +
  2751 + }
  2752 + catch (Exception ex)
  2753 + {
  2754 + _logger.LogError(ex, "获取工资统计列表失败");
  2755 + throw NCCException.Oh($"获取工资统计列表失败: {ex.Message}");
  2756 + }
  2757 + }
  2758 +
  2759 + /// <summary>
  2760 + /// 初始化工资统计表
  2761 + /// </summary>
  2762 + private async Task InitializeSalaryStatistics(string statisticsMonth)
  2763 + {
  2764 + // 获取所有员工信息
  2765 + var employeesSql = @"
  2766 + SELECT
  2767 + u.F_Id as EmployeeId,
  2768 + u.F_RealName as EmployeeName,
  2769 + u.F_MDID as StoreId,
  2770 + COALESCE(md.dm, '') as StoreName,
  2771 + COALESCE(u.F_GW, '') as Position,
  2772 + COALESCE(jsj.jsj, '') as GoldTriangleTeam
  2773 + FROM BASE_USER u
  2774 + LEFT JOIN lq_mdxx md ON u.F_MDID COLLATE utf8mb4_unicode_ci = md.F_Id COLLATE utf8mb4_unicode_ci
  2775 + LEFT JOIN lq_ycsd_jsj jsj ON u.F_MDID COLLATE utf8mb4_unicode_ci = jsj.md COLLATE utf8mb4_unicode_ci AND jsj.yf = @statisticsMonth
  2776 + WHERE u.F_EnabledMark = 1
  2777 + AND (u.F_DeleteMark IS NULL OR u.F_DeleteMark = 0)";
  2778 +
  2779 + var employees = await _db.Ado.SqlQueryAsync<dynamic>(employeesSql, new { statisticsMonth });
  2780 +
  2781 + var salaryEntities = employees.Select(emp => new LqSalaryStatisticsEntity
  2782 + {
  2783 + Id = YitIdHelper.NextId().ToString(),
  2784 + StoreId = emp.StoreId?.ToString() ?? "",
  2785 + StoreName = emp.StoreName?.ToString() ?? "",
  2786 + Position = emp.Position?.ToString() ?? "",
  2787 + EmployeeName = emp.EmployeeName?.ToString() ?? "",
  2788 + EmployeeId = emp.EmployeeId?.ToString() ?? "",
  2789 + GoldTriangleTeam = emp.GoldTriangleTeam?.ToString() ?? "",
  2790 + StatisticsMonth = statisticsMonth,
  2791 + IsLocked = 0,
  2792 + CreateTime = DateTime.Now,
  2793 + UpdateTime = DateTime.Now,
  2794 + CreateUser = _userManager.UserId,
  2795 + UpdateUser = _userManager.UserId
  2796 + }).ToList();
  2797 +
  2798 + // 使用事务确保数据一致性
  2799 + await _db.Ado.UseTranAsync(async () =>
  2800 + {
  2801 + // 先删除该月份的历史数据
  2802 + await _db.Deleteable<LqSalaryStatisticsEntity>()
  2803 + .Where(x => x.StatisticsMonth == statisticsMonth)
  2804 + .ExecuteCommandAsync();
  2805 +
  2806 + // 批量插入新数据
  2807 + if (salaryEntities.Any())
  2808 + {
  2809 + await _db.Insertable(salaryEntities).ExecuteCommandAsync();
  2810 + }
  2811 + });
  2812 +
  2813 + _logger.LogInformation($"初始化工资统计表完成 - 月份: {statisticsMonth}, 员工数: {salaryEntities.Count}");
  2814 + }
  2815 +
  2816 + /// <summary>
  2817 + /// 从其他统计表更新工资统计数据
  2818 + /// </summary>
  2819 + private async Task UpdateSalaryStatisticsFromOtherTables(string statisticsMonth)
  2820 + {
  2821 + // 从个人业绩统计表更新数据
  2822 + var personalPerformanceSql = @"
  2823 + UPDATE lq_salary_statistics s
  2824 + INNER JOIN lq_statistics_personal_performance p
  2825 + ON s.F_EmployeeId COLLATE utf8mb4_unicode_ci = p.F_EmployeeId COLLATE utf8mb4_unicode_ci
  2826 + AND s.F_StatisticsMonth = p.F_StatisticsMonth
  2827 + SET
  2828 + s.F_TotalPerformance = p.F_TotalPerformance,
  2829 + s.F_BasePerformance = p.F_BasePerformance,
  2830 + s.F_CooperationPerformance = p.F_CooperationPerformance,
  2831 + s.F_ProjectCount = p.F_OrderCount,
  2832 + s.F_NewCustomerPerformance = p.F_FirstOrderPerformance,
  2833 + s.F_UpgradePerformance = p.F_UpgradeOrderPerformance
  2834 + WHERE s.F_StatisticsMonth = @statisticsMonth";
  2835 +
  2836 + await _db.Ado.ExecuteCommandAsync(personalPerformanceSql, new
  2837 + {
  2838 + statisticsMonth,
  2839 + userId = _userManager.UserId
  2840 + });
  2841 +
  2842 + // 从门店总业绩统计表更新门店相关数据
  2843 + var storePerformanceSql = @"
  2844 + UPDATE lq_salary_statistics s
  2845 + INNER JOIN lq_statistics_store_total_performance st
  2846 + ON s.F_StoreId COLLATE utf8mb4_unicode_ci = st.F_StoreId COLLATE utf8mb4_unicode_ci
  2847 + AND s.F_StatisticsMonth = st.F_StatisticsMonth
  2848 + SET
  2849 + s.F_StoreTotalPerformance = st.F_TotalPerformance
  2850 + WHERE s.F_StatisticsMonth = @statisticsMonth";
  2851 +
  2852 + await _db.Ado.ExecuteCommandAsync(storePerformanceSql, new
  2853 + {
  2854 + statisticsMonth,
  2855 + userId = _userManager.UserId
  2856 + });
  2857 +
  2858 + _logger.LogInformation($"从其他统计表更新工资数据完成 - 月份: {statisticsMonth}");
  2859 + }
  2860 +
  2861 + #endregion
2270 2862  
2271 2863 }
2272 2864 }
... ...
netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs
... ... @@ -16,6 +16,7 @@ using NCC.DataEncryption;
16 16 using NCC.Dependency;
17 17 using NCC.DynamicApiController;
18 18 using NCC.Extend.Entitys.Dto.LqTkjlb;
  19 +using NCC.Extend.Entitys.Enum;
19 20 using NCC.Extend.Entitys.lq_event;
20 21 using NCC.Extend.Entitys.lq_eventuser;
21 22 using NCC.Extend.Entitys.lq_khxx;
... ... @@ -182,7 +183,7 @@ namespace NCC.Extend.LqTkjlb
182 183 MemberInfo.Id = YitIdHelper.NextId().ToString();
183 184 MemberInfo.Khmc = entity.CustomerName;
184 185 MemberInfo.Sjh = input.customerPhone; // 设置手机号
185   - MemberInfo.Khlx = "线索";
  186 + MemberInfo.Khlx = MemberTypeEnum.线索.GetHashCode().ToString();
186 187 MemberInfo.Dah = "GK" + DateTime.Now.ToString("yyyyMMddHHmmss");
187 188 MemberInfo.Gsmd = eventUserInfo.StoreId;
188 189 var memberResult = await _db.Insertable(MemberInfo).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
... ...
拓客活动用户导入模板.csv deleted
1   -员工手机号,姓名,战队,门店,目标张数
2   -13800138001,张三,第一战队,北京旗舰店,50
3   -13800138002,李四,第二战队,上海分店,30
4   -13800138003,王五,,深圳分店,40
5   -13800138004,赵六,第三战队,,25
金三角业绩统计接口说明.md deleted
1   -# 金三角业绩统计接口说明
2   -
3   -## 接口概述
4   -新增了金三角业绩统计查询接口,根据金三角成员状态进行不同的统计方式。
5   -
6   -## 接口地址
7   -```
8   -GET /api/Extend/LqYcsdJsj/GetJsjPerformance
9   -```
10   -
11   -## 功能说明
12   -根据金三角成员状态进行不同的统计方式:
13   -1. **活跃成员**:业绩计入金三角总业绩
14   -2. **非活跃成员**:按单人业绩统计,金三角名称为"门店名+姓名"
15   -
16   -## 请求参数
17   -| 参数名 | 类型 | 必填 | 说明 |
18   -|--------|------|------|------|
19   -| startMonth | string | 否 | 开始月份,格式:yyyyMM |
20   -| endMonth | string | 否 | 结束月份,格式:yyyyMM |
21   -| jsjId | string | 否 | 金三角ID,用于查询特定金三角 |
22   -| storeId | string | 否 | 门店ID,用于查询特定门店 |
23   -
24   -## 响应参数
25   -| 字段名 | 类型 | 说明 |
26   -|--------|------|------|
27   -| JsjId | string | 金三角ID(非活跃成员时为用户ID) |
28   -| JsjName | string | 金三角名称(非活跃成员时为"门店名+姓名") |
29   -| Month | string | 月份(格式:yyyyMM) |
30   -| StoreId | string | 门店ID |
31   -| StoreName | string | 门店名称 |
32   -| OrderCount | int | 订单数量 |
33   -| TotalPerformance | decimal | 总业绩 |
34   -| LastOrderDate | DateTime? | 最后订单日期 |
35   -| FirstOrderDate | DateTime? | 首次订单日期 |
36   -| StatisticsType | string | 统计类型(ACTIVE-活跃金三角业绩,INACTIVE-单人业绩) |
37   -| MemberName | string | 成员姓名(仅单人业绩时使用) |
38   -
39   -## 示例请求
40   -```
41   -GET /api/Extend/LqYcsdJsj/GetJsjPerformance?startMonth=202401&endMonth=202412
42   -```
43   -
44   -## 示例响应
45   -```json
46   -{
47   - "code": 200,
48   - "msg": "操作成功",
49   - "data": [
50   - {
51   - "jsjId": "123456789",
52   - "jsjName": "金三角A组",
53   - "month": "202412",
54   - "storeId": "store001",
55   - "storeName": "绿纤川音店",
56   - "orderCount": 15,
57   - "totalPerformance": 50000.00,
58   - "lastOrderDate": "2024-12-15T14:30:00",
59   - "firstOrderDate": "2024-12-01T09:00:00",
60   - "statisticsType": "ACTIVE",
61   - "memberName": null
62   - },
63   - {
64   - "jsjId": "987654321",
65   - "jsjName": "绿纤川音店-张三",
66   - "month": "202412",
67   - "storeId": "store001",
68   - "storeName": "绿纤川音店",
69   - "orderCount": 8,
70   - "totalPerformance": 25000.00,
71   - "lastOrderDate": "2024-12-14T16:20:00",
72   - "firstOrderDate": "2024-12-02T10:15:00",
73   - "statisticsType": "INACTIVE",
74   - "memberName": "张三"
75   - }
76   - ]
77   -}
78   -```
79   -
80   -## 业务逻辑
81   -1. **活跃成员统计**:
82   - - 查询状态为"ACTIVE"的金三角成员
83   - - 将业绩计入金三角总业绩
84   - - 按金三角分组统计
85   -
86   -2. **非活跃成员统计**:
87   - - 查询状态为"INACTIVE"的金三角成员
88   - - 按单人业绩统计
89   - - 金三角名称为"门店名+姓名"格式
90   -
91   -3. **数据排序**:
92   - - 按月份降序(最新的月份在前)
93   - - 按总业绩降序(业绩高的在前)
94   -
95   -## 注意事项
96   -- 所有查询都是只读操作,不会修改数据库数据
97   -- 支持按月统计,可以指定月份范围
98   -- 支持按金三角ID和门店ID进行筛选
99   -- 返回结果包含统计类型标识,便于前端区分处理