Commit e2c7c95410807eab21192b0057a7750890eac9cc
Merge branch 'master' of http://39.98.150.180/antissoft/lvqianmeiye_ERP
Showing
25 changed files
with
1540 additions
and
400 deletions
antis-ncc-admin/src/api/extend/salaryCalculation.js
| @@ -26,3 +26,21 @@ export function saveTechPerformanceStatistics(statisticsMonth) { | @@ -26,3 +26,21 @@ export function saveTechPerformanceStatistics(statisticsMonth) { | ||
| 26 | data: { statisticsMonth } | 26 | data: { statisticsMonth } |
| 27 | }) | 27 | }) |
| 28 | } | 28 | } |
| 29 | + | ||
| 30 | +// 保存门店耗卡业绩统计数据 | ||
| 31 | +export function saveStoreConsumePerformanceStatistics(statisticsMonth) { | ||
| 32 | + return request({ | ||
| 33 | + url: '/api/Extend/LqStatistics/save-store-consume-performance-stats', | ||
| 34 | + method: 'POST', | ||
| 35 | + data: { statisticsMonth } | ||
| 36 | + }) | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +// 保存个人消耗业绩统计数据 | ||
| 40 | +export function saveDepartmentConsumePerformanceStatistics(statisticsMonth) { | ||
| 41 | + return request({ | ||
| 42 | + url: '/api/Extend/LqStatistics/save-department-consume-performance-stats', | ||
| 43 | + method: 'POST', | ||
| 44 | + data: { statisticsMonth } | ||
| 45 | + }) | ||
| 46 | +} |
antis-ncc-admin/src/views/salaryCalculation/index.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="salary-calculation-container"> | 2 | <div class="salary-calculation-container"> |
| 3 | - <!-- 页面头部 --> | ||
| 4 | - <div class="header-card"> | ||
| 5 | - <h1 class="title">工资计算与统计系统</h1> | ||
| 6 | - <p class="subtitle">智能生成各类业绩统计数据,一键完成工资计算</p> | ||
| 7 | - </div> | ||
| 8 | - | ||
| 9 | - <!-- 月份选择区域 --> | ||
| 10 | - <el-card class="box-card month-selector-card"> | ||
| 11 | - <div slot="header" class="clearfix"> | ||
| 12 | - <span><i class="el-icon-date"></i> 选择统计月份</span> | ||
| 13 | - <el-button style="float: right; padding: 3px 0" type="text" @click="resetMonth">重置</el-button> | ||
| 14 | - </div> | ||
| 15 | - <div class="month-picker-wrapper"> | ||
| 16 | - <el-date-picker | ||
| 17 | - v-model="statisticsMonth" | ||
| 18 | - type="month" | ||
| 19 | - placeholder="选择月份" | ||
| 20 | - format="yyyy年MM月" | ||
| 21 | - value-format="yyyyMM" | ||
| 22 | - :clearable="false" | ||
| 23 | - class="month-picker" | ||
| 24 | - > | ||
| 25 | - </el-date-picker> | ||
| 26 | - </div> | ||
| 27 | - </el-card> | ||
| 28 | - | ||
| 29 | <!-- 主要内容区域 - 左右布局 --> | 3 | <!-- 主要内容区域 - 左右布局 --> |
| 30 | <div class="main-content"> | 4 | <div class="main-content"> |
| 31 | <!-- 左侧:统计操作区域 --> | 5 | <!-- 左侧:统计操作区域 --> |
| 32 | <div class="left-panel"> | 6 | <div class="left-panel"> |
| 33 | - <!-- 一键计算工资 --> | ||
| 34 | - <el-card class="box-card calculate-card"> | ||
| 35 | - <div slot="header" class="clearfix"> | ||
| 36 | - <span><i class="el-icon-cpu"></i> 一键计算工资</span> | ||
| 37 | - </div> | ||
| 38 | - <div class="calculate-content"> | ||
| 39 | - <p class="calculate-desc">按顺序执行所有统计方法,生成完整的工资数据</p> | ||
| 40 | - <el-button | ||
| 41 | - type="primary" | ||
| 42 | - size="large" | ||
| 43 | - :loading="isCalculating" | ||
| 44 | - @click="handleCalculateSalary" | ||
| 45 | - class="calculate-button" | ||
| 46 | - :disabled="!statisticsMonth" | ||
| 47 | - > | ||
| 48 | - <i class="el-icon-magic-stick"></i> | ||
| 49 | - {{ isCalculating ? '计算中...' : '一键计算工资' }} | ||
| 50 | - </el-button> | ||
| 51 | - <div v-if="calculationProgress.length > 0" class="progress-info"> | ||
| 52 | - <div class="progress-title">计算进度:</div> | ||
| 53 | - <div v-for="(step, index) in calculationProgress" :key="index" class="progress-step"> | ||
| 54 | - <i :class="getProgressIcon(step.status)" :style="{ color: getProgressColor(step.status) }"></i> | ||
| 55 | - <span :class="{ 'completed': step.status === 'completed', 'failed': step.status === 'failed' }"> | ||
| 56 | - {{ step.name }} | ||
| 57 | - </span> | ||
| 58 | - </div> | 7 | + <!-- 顶部控制区域 - 同一行显示 --> |
| 8 | + <div class="top-controls-row"> | ||
| 9 | + <!-- 月份选择区域 --> | ||
| 10 | + <el-card class="box-card month-selector-card"> | ||
| 11 | + <div slot="header" class="clearfix"> | ||
| 12 | + <span><i class="el-icon-date"></i> 选择统计月份</span> | ||
| 13 | + <el-button style="float: right; padding: 3px 0" type="text" @click="resetMonth">重置</el-button> | ||
| 59 | </div> | 14 | </div> |
| 60 | - </div> | ||
| 61 | - </el-card> | 15 | + <div class="month-picker-wrapper"> |
| 16 | + <el-date-picker | ||
| 17 | + v-model="statisticsMonth" | ||
| 18 | + type="month" | ||
| 19 | + placeholder="选择月份" | ||
| 20 | + format="yyyy年MM月" | ||
| 21 | + value-format="yyyyMM" | ||
| 22 | + :clearable="false" | ||
| 23 | + class="month-picker" | ||
| 24 | + > | ||
| 25 | + </el-date-picker> | ||
| 26 | + </div> | ||
| 27 | + </el-card> | ||
| 28 | + | ||
| 29 | + <!-- 一键计算工资 --> | ||
| 30 | + <el-card class="box-card calculate-card"> | ||
| 31 | + <div slot="header" class="clearfix"> | ||
| 32 | + <span><i class="el-icon-cpu"></i> 一键计算工资</span> | ||
| 33 | + </div> | ||
| 34 | + <div class="calculate-content"> | ||
| 35 | + <p class="calculate-desc">按顺序执行所有统计方法,生成完整的工资数据</p> | ||
| 36 | + <el-button | ||
| 37 | + type="primary" | ||
| 38 | + size="large" | ||
| 39 | + :loading="isCalculating" | ||
| 40 | + @click="handleCalculateSalary" | ||
| 41 | + class="calculate-button" | ||
| 42 | + :disabled="!statisticsMonth" | ||
| 43 | + > | ||
| 44 | + <i class="el-icon-magic-stick"></i> | ||
| 45 | + {{ isCalculating ? '计算中...' : '一键计算工资' }} | ||
| 46 | + </el-button> | ||
| 47 | + </div> | ||
| 48 | + </el-card> | ||
| 49 | + </div> | ||
| 62 | 50 | ||
| 63 | <!-- 单独统计操作 --> | 51 | <!-- 单独统计操作 --> |
| 64 | <el-card class="box-card statistics-card"> | 52 | <el-card class="box-card statistics-card"> |
| @@ -114,6 +102,38 @@ | @@ -114,6 +102,38 @@ | ||
| 114 | </el-button> | 102 | </el-button> |
| 115 | </div> | 103 | </div> |
| 116 | 104 | ||
| 105 | + <div class="stat-item purple-item"> | ||
| 106 | + <div class="stat-header"> | ||
| 107 | + <i class="el-icon-s-shop"></i> | ||
| 108 | + <span>门店耗卡业绩</span> | ||
| 109 | + </div> | ||
| 110 | + <el-button | ||
| 111 | + type="info" | ||
| 112 | + :loading="loadingStates.storeConsumePerformance" | ||
| 113 | + @click="handleStoreConsumePerformanceStatistics" | ||
| 114 | + class="stat-button" | ||
| 115 | + :disabled="!statisticsMonth" | ||
| 116 | + > | ||
| 117 | + 立即统计 | ||
| 118 | + </el-button> | ||
| 119 | + </div> | ||
| 120 | + | ||
| 121 | + <div class="stat-item teal-item"> | ||
| 122 | + <div class="stat-header"> | ||
| 123 | + <i class="el-icon-user-solid"></i> | ||
| 124 | + <span>个人消耗业绩</span> | ||
| 125 | + </div> | ||
| 126 | + <el-button | ||
| 127 | + type="primary" | ||
| 128 | + :loading="loadingStates.departmentConsumePerformance" | ||
| 129 | + @click="handleDepartmentConsumePerformanceStatistics" | ||
| 130 | + class="stat-button" | ||
| 131 | + :disabled="!statisticsMonth" | ||
| 132 | + > | ||
| 133 | + 立即统计 | ||
| 134 | + </el-button> | ||
| 135 | + </div> | ||
| 136 | + | ||
| 117 | <!-- 预留位置,用于未来添加更多统计方法 --> | 137 | <!-- 预留位置,用于未来添加更多统计方法 --> |
| 118 | <div class="stat-item placeholder-item"> | 138 | <div class="stat-item placeholder-item"> |
| 119 | <div class="stat-header"> | 139 | <div class="stat-header"> |
| @@ -134,17 +154,27 @@ | @@ -134,17 +154,27 @@ | ||
| 134 | 154 | ||
| 135 | <!-- 右侧:结果显示区域 --> | 155 | <!-- 右侧:结果显示区域 --> |
| 136 | <div class="right-panel"> | 156 | <div class="right-panel"> |
| 157 | + <!-- 计算进度区域 --> | ||
| 158 | + <el-card class="box-card progress-card" v-if="calculationProgress.length > 0"> | ||
| 159 | + <div slot="header" class="clearfix"> | ||
| 160 | + <span><i class="el-icon-time"></i> 计算进度</span> | ||
| 161 | + </div> | ||
| 162 | + <div class="progress-content"> | ||
| 163 | + <div v-for="(step, index) in calculationProgress" :key="index" class="progress-step"> | ||
| 164 | + <i :class="getProgressIcon(step.status)" :style="{ color: getProgressColor(step.status) }"></i> | ||
| 165 | + <span :class="{ 'completed': step.status === 'completed', 'failed': step.status === 'failed' }"> | ||
| 166 | + {{ step.name }} | ||
| 167 | + </span> | ||
| 168 | + </div> | ||
| 169 | + </div> | ||
| 170 | + </el-card> | ||
| 171 | + | ||
| 137 | <el-card class="box-card result-card"> | 172 | <el-card class="box-card result-card"> |
| 138 | <div slot="header" class="clearfix"> | 173 | <div slot="header" class="clearfix"> |
| 139 | <span><i class="el-icon-document"></i> 统计结果</span> | 174 | <span><i class="el-icon-document"></i> 统计结果</span> |
| 140 | - <div class="header-actions"> | ||
| 141 | - <el-button type="text" @click="exportResults" :disabled="results.length === 0"> | ||
| 142 | - <i class="el-icon-download"></i> 导出 | ||
| 143 | - </el-button> | ||
| 144 | - <el-button type="text" @click="clearResults"> | ||
| 145 | - <i class="el-icon-delete"></i> 清空 | ||
| 146 | - </el-button> | ||
| 147 | - </div> | 175 | + <el-button type="text" @click="clearResults"> |
| 176 | + <i class="el-icon-delete"></i> 清空 | ||
| 177 | + </el-button> | ||
| 148 | </div> | 178 | </div> |
| 149 | <div class="result-list" ref="resultList"> | 179 | <div class="result-list" ref="resultList"> |
| 150 | <div v-if="results.length === 0" class="no-results"> | 180 | <div v-if="results.length === 0" class="no-results"> |
| @@ -171,7 +201,9 @@ | @@ -171,7 +201,9 @@ | ||
| 171 | import { | 201 | import { |
| 172 | saveGoldTriangleStatistics, | 202 | saveGoldTriangleStatistics, |
| 173 | savePersonalPerformanceStatistics, | 203 | savePersonalPerformanceStatistics, |
| 174 | - saveTechPerformanceStatistics | 204 | + saveTechPerformanceStatistics, |
| 205 | + saveStoreConsumePerformanceStatistics, | ||
| 206 | + saveDepartmentConsumePerformanceStatistics | ||
| 175 | } from '@/api/extend/salaryCalculation' | 207 | } from '@/api/extend/salaryCalculation' |
| 176 | 208 | ||
| 177 | export default { | 209 | export default { |
| @@ -182,7 +214,9 @@ export default { | @@ -182,7 +214,9 @@ export default { | ||
| 182 | loadingStates: { | 214 | loadingStates: { |
| 183 | goldTriangle: false, | 215 | goldTriangle: false, |
| 184 | personalPerformance: false, | 216 | personalPerformance: false, |
| 185 | - techPerformance: false | 217 | + techPerformance: false, |
| 218 | + storeConsumePerformance: false, | ||
| 219 | + departmentConsumePerformance: false | ||
| 186 | }, | 220 | }, |
| 187 | results: [], // 存储统计结果,最多保留10条 | 221 | results: [], // 存储统计结果,最多保留10条 |
| 188 | isCalculating: false, // 一键计算状态 | 222 | isCalculating: false, // 一键计算状态 |
| @@ -220,14 +254,6 @@ export default { | @@ -220,14 +254,6 @@ export default { | ||
| 220 | } | 254 | } |
| 221 | return json | 255 | return json |
| 222 | }, | 256 | }, |
| 223 | - exportResults() { | ||
| 224 | - if (this.results.length === 0) { | ||
| 225 | - this.$message.warning('没有可导出的结果') | ||
| 226 | - return | ||
| 227 | - } | ||
| 228 | - // 这里可以实现导出功能 | ||
| 229 | - this.$message.success('导出功能开发中...') | ||
| 230 | - }, | ||
| 231 | 257 | ||
| 232 | // 一键计算工资 | 258 | // 一键计算工资 |
| 233 | async handleCalculateSalary() { | 259 | async handleCalculateSalary() { |
| @@ -256,6 +282,16 @@ export default { | @@ -256,6 +282,16 @@ export default { | ||
| 256 | name: '科技部开单业绩统计', | 282 | name: '科技部开单业绩统计', |
| 257 | method: 'handleTechPerformanceStatistics', | 283 | method: 'handleTechPerformanceStatistics', |
| 258 | type: 'tech-performance' | 284 | type: 'tech-performance' |
| 285 | + }, | ||
| 286 | + { | ||
| 287 | + name: '门店耗卡业绩统计', | ||
| 288 | + method: 'handleStoreConsumePerformanceStatistics', | ||
| 289 | + type: 'store-consume-performance' | ||
| 290 | + }, | ||
| 291 | + { | ||
| 292 | + name: '个人消耗业绩统计', | ||
| 293 | + method: 'handleDepartmentConsumePerformanceStatistics', | ||
| 294 | + type: 'department-consume-performance' | ||
| 259 | } | 295 | } |
| 260 | ] | 296 | ] |
| 261 | 297 | ||
| @@ -428,6 +464,62 @@ export default { | @@ -428,6 +464,62 @@ export default { | ||
| 428 | } finally { | 464 | } finally { |
| 429 | this.loadingStates.techPerformance = false | 465 | this.loadingStates.techPerformance = false |
| 430 | } | 466 | } |
| 467 | + }, | ||
| 468 | + | ||
| 469 | + // 门店耗卡业绩统计 | ||
| 470 | + async handleStoreConsumePerformanceStatistics() { | ||
| 471 | + this.loadingStates.storeConsumePerformance = true | ||
| 472 | + try { | ||
| 473 | + const response = await saveStoreConsumePerformanceStatistics(this.statisticsMonth) | ||
| 474 | + this.addResult({ | ||
| 475 | + type: 'store-consume-performance', | ||
| 476 | + title: '门店耗卡业绩统计', | ||
| 477 | + success: true, | ||
| 478 | + data: response.data, | ||
| 479 | + time: new Date().toLocaleString() | ||
| 480 | + }) | ||
| 481 | + this.$message.success('门店耗卡业绩统计完成') | ||
| 482 | + } catch (error) { | ||
| 483 | + this.addResult({ | ||
| 484 | + type: 'store-consume-performance', | ||
| 485 | + title: '门店耗卡业绩统计', | ||
| 486 | + success: false, | ||
| 487 | + data: error.message || '统计失败', | ||
| 488 | + time: new Date().toLocaleString() | ||
| 489 | + }) | ||
| 490 | + this.$message.error('门店耗卡业绩统计失败') | ||
| 491 | + throw error | ||
| 492 | + } finally { | ||
| 493 | + this.loadingStates.storeConsumePerformance = false | ||
| 494 | + } | ||
| 495 | + }, | ||
| 496 | + | ||
| 497 | + // 个人消耗业绩统计 | ||
| 498 | + async handleDepartmentConsumePerformanceStatistics() { | ||
| 499 | + this.loadingStates.departmentConsumePerformance = true | ||
| 500 | + try { | ||
| 501 | + const response = await saveDepartmentConsumePerformanceStatistics(this.statisticsMonth) | ||
| 502 | + this.addResult({ | ||
| 503 | + type: 'department-consume-performance', | ||
| 504 | + title: '个人消耗业绩统计', | ||
| 505 | + success: true, | ||
| 506 | + data: response.data, | ||
| 507 | + time: new Date().toLocaleString() | ||
| 508 | + }) | ||
| 509 | + this.$message.success('个人消耗业绩统计完成') | ||
| 510 | + } catch (error) { | ||
| 511 | + this.addResult({ | ||
| 512 | + type: 'department-consume-performance', | ||
| 513 | + title: '个人消耗业绩统计', | ||
| 514 | + success: false, | ||
| 515 | + data: error.message || '统计失败', | ||
| 516 | + time: new Date().toLocaleString() | ||
| 517 | + }) | ||
| 518 | + this.$message.error('个人消耗业绩统计失败') | ||
| 519 | + throw error | ||
| 520 | + } finally { | ||
| 521 | + this.loadingStates.departmentConsumePerformance = false | ||
| 522 | + } | ||
| 431 | } | 523 | } |
| 432 | } | 524 | } |
| 433 | } | 525 | } |
| @@ -440,27 +532,6 @@ export default { | @@ -440,27 +532,6 @@ export default { | ||
| 440 | min-height: calc(100vh - 50px); | 532 | min-height: calc(100vh - 50px); |
| 441 | font-family: 'Arial', sans-serif; | 533 | font-family: 'Arial', sans-serif; |
| 442 | 534 | ||
| 443 | - .header-card { | ||
| 444 | - background: linear-gradient(135deg, #409EFF, #79BBFF); | ||
| 445 | - color: #fff; | ||
| 446 | - padding: 30px; | ||
| 447 | - border-radius: 15px; | ||
| 448 | - margin-bottom: 20px; | ||
| 449 | - text-align: center; | ||
| 450 | - box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2); | ||
| 451 | - | ||
| 452 | - .title { | ||
| 453 | - font-size: 2.5em; | ||
| 454 | - margin-bottom: 10px; | ||
| 455 | - font-weight: bold; | ||
| 456 | - } | ||
| 457 | - | ||
| 458 | - .subtitle { | ||
| 459 | - font-size: 1.1em; | ||
| 460 | - opacity: 0.9; | ||
| 461 | - } | ||
| 462 | - } | ||
| 463 | - | ||
| 464 | .box-card { | 535 | .box-card { |
| 465 | border-radius: 10px; | 536 | border-radius: 10px; |
| 466 | margin-bottom: 20px; | 537 | margin-bottom: 20px; |
| @@ -480,115 +551,92 @@ export default { | @@ -480,115 +551,92 @@ export default { | ||
| 480 | } | 551 | } |
| 481 | } | 552 | } |
| 482 | 553 | ||
| 483 | - .month-selector-card { | ||
| 484 | - .month-picker-wrapper { | ||
| 485 | - display: flex; | ||
| 486 | - justify-content: center; | ||
| 487 | - align-items: center; | ||
| 488 | - } | ||
| 489 | - .month-picker { | ||
| 490 | - width: 100%; | ||
| 491 | - max-width: 300px; | ||
| 492 | - } | ||
| 493 | - } | ||
| 494 | - | ||
| 495 | - // 主要内容区域 - 左右布局 | ||
| 496 | - .main-content { | 554 | + // 顶部控制区域 - 同一行显示两个卡片 |
| 555 | + .top-controls-row { | ||
| 497 | display: flex; | 556 | display: flex; |
| 498 | gap: 20px; | 557 | gap: 20px; |
| 499 | - min-height: 600px; | ||
| 500 | - | ||
| 501 | - .left-panel { | ||
| 502 | - flex: 1; | ||
| 503 | - min-width: 0; // 防止flex子项溢出 | ||
| 504 | - } | 558 | + margin-bottom: 20px; |
| 505 | 559 | ||
| 506 | - .right-panel { | 560 | + .month-selector-card, .calculate-card { |
| 507 | flex: 1; | 561 | flex: 1; |
| 508 | min-width: 0; | 562 | min-width: 0; |
| 509 | } | 563 | } |
| 510 | - } | ||
| 511 | - | ||
| 512 | - // 一键计算工资卡片 | ||
| 513 | - .calculate-card { | ||
| 514 | - margin-bottom: 20px; | ||
| 515 | - background: linear-gradient(135deg, #67C23A, #85CE61); | ||
| 516 | - color: white; | ||
| 517 | - | ||
| 518 | - ::v-deep .el-card__header { | ||
| 519 | - background: rgba(255, 255, 255, 0.1); | ||
| 520 | - color: white; | ||
| 521 | - border-bottom: 1px solid rgba(255, 255, 255, 0.2); | ||
| 522 | - } | ||
| 523 | 564 | ||
| 524 | - .calculate-content { | ||
| 525 | - text-align: center; | ||
| 526 | - | ||
| 527 | - .calculate-desc { | ||
| 528 | - color: rgba(255, 255, 255, 0.9); | ||
| 529 | - margin-bottom: 20px; | ||
| 530 | - font-size: 1.1em; | 565 | + .month-selector-card { |
| 566 | + .month-picker-wrapper { | ||
| 567 | + display: flex; | ||
| 568 | + justify-content: flex-start; | ||
| 569 | + align-items: center; | ||
| 531 | } | 570 | } |
| 532 | - | ||
| 533 | - .calculate-button { | 571 | + .month-picker { |
| 534 | width: 100%; | 572 | width: 100%; |
| 535 | - height: 60px; | ||
| 536 | - font-size: 1.3em; | ||
| 537 | - font-weight: bold; | ||
| 538 | - border-radius: 10px; | ||
| 539 | - background: rgba(255, 255, 255, 0.2); | ||
| 540 | - border: 2px solid rgba(255, 255, 255, 0.3); | ||
| 541 | - color: white; | 573 | + max-width: 200px; |
| 574 | + } | ||
| 575 | + } | ||
| 542 | 576 | ||
| 543 | - &:hover:not(:disabled) { | ||
| 544 | - background: rgba(255, 255, 255, 0.3); | ||
| 545 | - border-color: rgba(255, 255, 255, 0.5); | ||
| 546 | - } | 577 | + .calculate-card { |
| 578 | + background: linear-gradient(135deg, #67C23A, #85CE61); | ||
| 579 | + color: white; | ||
| 547 | 580 | ||
| 548 | - &:disabled { | ||
| 549 | - opacity: 0.6; | ||
| 550 | - } | 581 | + ::v-deep .el-card__header { |
| 582 | + background: rgba(255, 255, 255, 0.1); | ||
| 583 | + color: white; | ||
| 584 | + border-bottom: 1px solid rgba(255, 255, 255, 0.2); | ||
| 551 | } | 585 | } |
| 552 | 586 | ||
| 553 | - .progress-info { | ||
| 554 | - margin-top: 20px; | ||
| 555 | - text-align: left; | 587 | + .calculate-content { |
| 588 | + text-align: center; | ||
| 556 | 589 | ||
| 557 | - .progress-title { | ||
| 558 | - font-weight: bold; | ||
| 559 | - margin-bottom: 10px; | 590 | + .calculate-desc { |
| 560 | color: rgba(255, 255, 255, 0.9); | 591 | color: rgba(255, 255, 255, 0.9); |
| 592 | + margin-bottom: 15px; | ||
| 593 | + font-size: 0.95em; | ||
| 594 | + line-height: 1.4; | ||
| 561 | } | 595 | } |
| 562 | 596 | ||
| 563 | - .progress-step { | ||
| 564 | - display: flex; | ||
| 565 | - align-items: center; | ||
| 566 | - margin-bottom: 8px; | ||
| 567 | - font-size: 0.95em; | 597 | + .calculate-button { |
| 598 | + width: 100%; | ||
| 599 | + height: 40px; | ||
| 600 | + font-size: 1em; | ||
| 601 | + font-weight: bold; | ||
| 602 | + border-radius: 6px; | ||
| 603 | + background: rgba(255, 255, 255, 0.2); | ||
| 604 | + border: 2px solid rgba(255, 255, 255, 0.3); | ||
| 605 | + color: white; | ||
| 568 | 606 | ||
| 569 | - i { | ||
| 570 | - margin-right: 8px; | ||
| 571 | - font-size: 1.1em; | 607 | + &:hover:not(:disabled) { |
| 608 | + background: rgba(255, 255, 255, 0.3); | ||
| 609 | + border-color: rgba(255, 255, 255, 0.5); | ||
| 572 | } | 610 | } |
| 573 | 611 | ||
| 574 | - span { | ||
| 575 | - color: rgba(255, 255, 255, 0.9); | ||
| 576 | - | ||
| 577 | - &.completed { | ||
| 578 | - color: #fff; | ||
| 579 | - font-weight: bold; | ||
| 580 | - } | ||
| 581 | - | ||
| 582 | - &.failed { | ||
| 583 | - color: #ffeb3b; | ||
| 584 | - font-weight: bold; | ||
| 585 | - } | 612 | + &:disabled { |
| 613 | + opacity: 0.6; | ||
| 586 | } | 614 | } |
| 587 | } | 615 | } |
| 588 | } | 616 | } |
| 589 | } | 617 | } |
| 590 | } | 618 | } |
| 591 | 619 | ||
| 620 | + // 主要内容区域 - 左右布局 | ||
| 621 | + .main-content { | ||
| 622 | + display: flex; | ||
| 623 | + gap: 20px; | ||
| 624 | + min-height: 600px; | ||
| 625 | + | ||
| 626 | + .left-panel { | ||
| 627 | + flex: 1; | ||
| 628 | + min-width: 0; // 防止flex子项溢出 | ||
| 629 | + } | ||
| 630 | + | ||
| 631 | + .right-panel { | ||
| 632 | + flex: 1; | ||
| 633 | + min-width: 0; | ||
| 634 | + display: flex; | ||
| 635 | + flex-direction: column; | ||
| 636 | + } | ||
| 637 | + } | ||
| 638 | + | ||
| 639 | + | ||
| 592 | // 统计操作卡片 | 640 | // 统计操作卡片 |
| 593 | .statistics-card { | 641 | .statistics-card { |
| 594 | .statistics-grid { | 642 | .statistics-grid { |
| @@ -648,6 +696,16 @@ export default { | @@ -648,6 +696,16 @@ export default { | ||
| 648 | .stat-header i { color: #E6A23C; } | 696 | .stat-header i { color: #E6A23C; } |
| 649 | } | 697 | } |
| 650 | 698 | ||
| 699 | + &.purple-item { | ||
| 700 | + border-color: #909399; | ||
| 701 | + .stat-header i { color: #909399; } | ||
| 702 | + } | ||
| 703 | + | ||
| 704 | + &.teal-item { | ||
| 705 | + border-color: #17A2B8; | ||
| 706 | + .stat-header i { color: #17A2B8; } | ||
| 707 | + } | ||
| 708 | + | ||
| 651 | &.placeholder-item { | 709 | &.placeholder-item { |
| 652 | border-color: #C0C4CC; | 710 | border-color: #C0C4CC; |
| 653 | background: #f5f7fa; | 711 | background: #f5f7fa; |
| @@ -657,17 +715,64 @@ export default { | @@ -657,17 +715,64 @@ export default { | ||
| 657 | } | 715 | } |
| 658 | } | 716 | } |
| 659 | 717 | ||
| 718 | + // 进度卡片 | ||
| 719 | + .progress-card { | ||
| 720 | + margin-bottom: 20px; | ||
| 721 | + background: linear-gradient(135deg, #E6F7FF, #BAE7FF); | ||
| 722 | + border: 1px solid #91D5FF; | ||
| 723 | + | ||
| 724 | + .progress-content { | ||
| 725 | + .progress-step { | ||
| 726 | + display: flex; | ||
| 727 | + align-items: center; | ||
| 728 | + margin-bottom: 12px; | ||
| 729 | + padding: 8px 12px; | ||
| 730 | + background: rgba(255, 255, 255, 0.7); | ||
| 731 | + border-radius: 6px; | ||
| 732 | + font-size: 0.95em; | ||
| 733 | + | ||
| 734 | + &:last-child { | ||
| 735 | + margin-bottom: 0; | ||
| 736 | + } | ||
| 737 | + | ||
| 738 | + i { | ||
| 739 | + margin-right: 10px; | ||
| 740 | + font-size: 1.1em; | ||
| 741 | + } | ||
| 742 | + | ||
| 743 | + span { | ||
| 744 | + color: #333; | ||
| 745 | + font-weight: 500; | ||
| 746 | + | ||
| 747 | + &.completed { | ||
| 748 | + color: #67C23A; | ||
| 749 | + font-weight: bold; | ||
| 750 | + } | ||
| 751 | + | ||
| 752 | + &.failed { | ||
| 753 | + color: #F56C6C; | ||
| 754 | + font-weight: bold; | ||
| 755 | + } | ||
| 756 | + } | ||
| 757 | + } | ||
| 758 | + } | ||
| 759 | + } | ||
| 760 | + | ||
| 660 | // 结果显示卡片 | 761 | // 结果显示卡片 |
| 661 | .result-card { | 762 | .result-card { |
| 662 | - height: 100%; | 763 | + flex: 1; |
| 764 | + display: flex; | ||
| 765 | + flex-direction: column; | ||
| 663 | 766 | ||
| 664 | - .header-actions { | 767 | + ::v-deep .el-card__body { |
| 768 | + flex: 1; | ||
| 665 | display: flex; | 769 | display: flex; |
| 666 | - gap: 10px; | 770 | + flex-direction: column; |
| 771 | + padding: 20px; | ||
| 667 | } | 772 | } |
| 668 | 773 | ||
| 669 | .result-list { | 774 | .result-list { |
| 670 | - max-height: 500px; | 775 | + flex: 1; |
| 671 | overflow-y: auto; | 776 | overflow-y: auto; |
| 672 | padding-right: 10px; | 777 | padding-right: 10px; |
| 673 | 778 | ||
| @@ -701,6 +806,10 @@ export default { | @@ -701,6 +806,10 @@ export default { | ||
| 701 | background-color: #f9f9f9; | 806 | background-color: #f9f9f9; |
| 702 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); | 807 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| 703 | 808 | ||
| 809 | + &:last-child { | ||
| 810 | + margin-bottom: 0; | ||
| 811 | + } | ||
| 812 | + | ||
| 704 | &.success-item { | 813 | &.success-item { |
| 705 | border-color: #67C23A; | 814 | border-color: #67C23A; |
| 706 | } | 815 | } |
| @@ -764,14 +873,13 @@ export default { | @@ -764,14 +873,13 @@ export default { | ||
| 764 | padding: 10px; | 873 | padding: 10px; |
| 765 | } | 874 | } |
| 766 | 875 | ||
| 767 | - .header-card { | ||
| 768 | - padding: 20px; | ||
| 769 | - .title { | ||
| 770 | - font-size: 1.8em; | ||
| 771 | - } | ||
| 772 | - .subtitle { | ||
| 773 | - font-size: 0.9em; | ||
| 774 | - } | 876 | + .top-controls-row { |
| 877 | + flex-direction: column; | ||
| 878 | + gap: 15px; | ||
| 879 | + } | ||
| 880 | + | ||
| 881 | + .month-selector-card, .calculate-card { | ||
| 882 | + width: 100%; | ||
| 775 | } | 883 | } |
| 776 | 884 | ||
| 777 | .statistics-grid { | 885 | .statistics-grid { |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/LqKdKdjlbListOutput.cs
| @@ -11,52 +11,52 @@ namespace NCC.Extend.Entitys.Dto.LqKdKdjlb | @@ -11,52 +11,52 @@ namespace NCC.Extend.Entitys.Dto.LqKdKdjlb | ||
| 11 | /// 开单编号 | 11 | /// 开单编号 |
| 12 | /// </summary> | 12 | /// </summary> |
| 13 | public string id { get; set; } | 13 | public string id { get; set; } |
| 14 | - | 14 | + |
| 15 | /// <summary> | 15 | /// <summary> |
| 16 | /// 单据门店 | 16 | /// 单据门店 |
| 17 | /// </summary> | 17 | /// </summary> |
| 18 | public string djmd { get; set; } | 18 | public string djmd { get; set; } |
| 19 | - | 19 | + |
| 20 | /// <summary> | 20 | /// <summary> |
| 21 | /// 金三角 | 21 | /// 金三角 |
| 22 | /// </summary> | 22 | /// </summary> |
| 23 | public string jsj { get; set; } | 23 | public string jsj { get; set; } |
| 24 | - | 24 | + |
| 25 | /// <summary> | 25 | /// <summary> |
| 26 | /// 开单日期 | 26 | /// 开单日期 |
| 27 | /// </summary> | 27 | /// </summary> |
| 28 | public DateTime? kdrq { get; set; } | 28 | public DateTime? kdrq { get; set; } |
| 29 | - | 29 | + |
| 30 | /// <summary> | 30 | /// <summary> |
| 31 | /// 顾客类型 | 31 | /// 顾客类型 |
| 32 | /// </summary> | 32 | /// </summary> |
| 33 | public string gjlx { get; set; } | 33 | public string gjlx { get; set; } |
| 34 | - | 34 | + |
| 35 | /// <summary> | 35 | /// <summary> |
| 36 | /// 合作机构 | 36 | /// 合作机构 |
| 37 | /// </summary> | 37 | /// </summary> |
| 38 | public string hgjg { get; set; } | 38 | public string hgjg { get; set; } |
| 39 | - | 39 | + |
| 40 | /// <summary> | 40 | /// <summary> |
| 41 | /// 整单业绩 | 41 | /// 整单业绩 |
| 42 | /// </summary> | 42 | /// </summary> |
| 43 | public decimal zdyj { get; set; } | 43 | public decimal zdyj { get; set; } |
| 44 | - | 44 | + |
| 45 | /// <summary> | 45 | /// <summary> |
| 46 | /// 实付业绩 | 46 | /// 实付业绩 |
| 47 | /// </summary> | 47 | /// </summary> |
| 48 | public decimal sfyj { get; set; } | 48 | public decimal sfyj { get; set; } |
| 49 | - | 49 | + |
| 50 | /// <summary> | 50 | /// <summary> |
| 51 | /// 欠款 | 51 | /// 欠款 |
| 52 | /// </summary> | 52 | /// </summary> |
| 53 | public decimal qk { get; set; } | 53 | public decimal qk { get; set; } |
| 54 | - | 54 | + |
| 55 | /// <summary> | 55 | /// <summary> |
| 56 | /// 储扣方式 | 56 | /// 储扣方式 |
| 57 | /// </summary> | 57 | /// </summary> |
| 58 | public string ckfs { get; set; } | 58 | public string ckfs { get; set; } |
| 59 | - | 59 | + |
| 60 | /// <summary> | 60 | /// <summary> |
| 61 | /// 储扣总金额 | 61 | /// 储扣总金额 |
| 62 | /// </summary> | 62 | /// </summary> |
| @@ -66,76 +66,80 @@ namespace NCC.Extend.Entitys.Dto.LqKdKdjlb | @@ -66,76 +66,80 @@ namespace NCC.Extend.Entitys.Dto.LqKdKdjlb | ||
| 66 | /// 付款方式 | 66 | /// 付款方式 |
| 67 | /// </summary> | 67 | /// </summary> |
| 68 | public string fkfs { get; set; } | 68 | public string fkfs { get; set; } |
| 69 | - | 69 | + |
| 70 | /// <summary> | 70 | /// <summary> |
| 71 | /// 付款医院 | 71 | /// 付款医院 |
| 72 | /// </summary> | 72 | /// </summary> |
| 73 | public string fkyy { get; set; } | 73 | public string fkyy { get; set; } |
| 74 | - | 74 | + |
| 75 | /// <summary> | 75 | /// <summary> |
| 76 | /// 付款判断 | 76 | /// 付款判断 |
| 77 | /// </summary> | 77 | /// </summary> |
| 78 | public string fkpd { get; set; } | 78 | public string fkpd { get; set; } |
| 79 | - | 79 | + |
| 80 | /// <summary> | 80 | /// <summary> |
| 81 | /// 客户来源 | 81 | /// 客户来源 |
| 82 | /// </summary> | 82 | /// </summary> |
| 83 | public string khly { get; set; } | 83 | public string khly { get; set; } |
| 84 | - | 84 | + |
| 85 | /// <summary> | 85 | /// <summary> |
| 86 | /// 推荐人 | 86 | /// 推荐人 |
| 87 | /// </summary> | 87 | /// </summary> |
| 88 | public string tjr { get; set; } | 88 | public string tjr { get; set; } |
| 89 | - | 89 | + |
| 90 | /// <summary> | 90 | /// <summary> |
| 91 | /// 是否首开订单 | 91 | /// 是否首开订单 |
| 92 | /// </summary> | 92 | /// </summary> |
| 93 | public string sfskdd { get; set; } | 93 | public string sfskdd { get; set; } |
| 94 | - | 94 | + |
| 95 | /// <summary> | 95 | /// <summary> |
| 96 | /// 简介 | 96 | /// 简介 |
| 97 | /// </summary> | 97 | /// </summary> |
| 98 | public string jj { get; set; } | 98 | public string jj { get; set; } |
| 99 | - | 99 | + |
| 100 | /// <summary> | 100 | /// <summary> |
| 101 | /// 备注 | 101 | /// 备注 |
| 102 | /// </summary> | 102 | /// </summary> |
| 103 | public string bz { get; set; } | 103 | public string bz { get; set; } |
| 104 | - | 104 | + |
| 105 | /// <summary> | 105 | /// <summary> |
| 106 | /// 开单会员 | 106 | /// 开单会员 |
| 107 | /// </summary> | 107 | /// </summary> |
| 108 | public string kdhy { get; set; } | 108 | public string kdhy { get; set; } |
| 109 | - | 109 | + |
| 110 | /// <summary> | 110 | /// <summary> |
| 111 | /// 开单会员名称 | 111 | /// 开单会员名称 |
| 112 | /// </summary> | 112 | /// </summary> |
| 113 | public string kdhyc { get; set; } | 113 | public string kdhyc { get; set; } |
| 114 | - | 114 | + |
| 115 | /// <summary> | 115 | /// <summary> |
| 116 | /// 开单会员手机号 | 116 | /// 开单会员手机号 |
| 117 | /// </summary> | 117 | /// </summary> |
| 118 | public string kdhysjh { get; set; } | 118 | public string kdhysjh { get; set; } |
| 119 | - | 119 | + |
| 120 | /// <summary> | 120 | /// <summary> |
| 121 | /// 健康师业绩 | 121 | /// 健康师业绩 |
| 122 | /// </summary> | 122 | /// </summary> |
| 123 | public string jksyj { get; set; } | 123 | public string jksyj { get; set; } |
| 124 | - | 124 | + |
| 125 | /// <summary> | 125 | /// <summary> |
| 126 | /// 科技部老师业绩 | 126 | /// 科技部老师业绩 |
| 127 | /// </summary> | 127 | /// </summary> |
| 128 | public string kjblsyj { get; set; } | 128 | public string kjblsyj { get; set; } |
| 129 | - | 129 | + |
| 130 | /// <summary> | 130 | /// <summary> |
| 131 | /// 品项信息 | 131 | /// 品项信息 |
| 132 | /// </summary> | 132 | /// </summary> |
| 133 | public string pxxx { get; set; } | 133 | public string pxxx { get; set; } |
| 134 | - | 134 | + |
| 135 | /// <summary> | 135 | /// <summary> |
| 136 | /// 方案其他 | 136 | /// 方案其他 |
| 137 | /// </summary> | 137 | /// </summary> |
| 138 | public string F_FIleUrl { get; set; } | 138 | public string F_FIleUrl { get; set; } |
| 139 | - | 139 | + |
| 140 | + /// <summary> | ||
| 141 | + /// 是否有效 | ||
| 142 | + /// </summary> | ||
| 143 | + public int IsEffective { get; set; } | ||
| 140 | } | 144 | } |
| 141 | } | 145 | } |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatistics/DepartmentInfo/DepartmentInfo.cs
0 → 100644
| 1 | +using System; | ||
| 2 | + | ||
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStatistics.DepartmentInfo | ||
| 4 | +{ | ||
| 5 | + /// <summary> | ||
| 6 | + /// 部门信息 | ||
| 7 | + /// </summary> | ||
| 8 | + public class DepartmentInfo | ||
| 9 | + { | ||
| 10 | + /// <summary> | ||
| 11 | + /// 部门ID | ||
| 12 | + /// </summary> | ||
| 13 | + public string DepartmentId { get; set; } | ||
| 14 | + | ||
| 15 | + /// <summary> | ||
| 16 | + /// 部门名称 | ||
| 17 | + /// </summary> | ||
| 18 | + public string DepartmentName { get; set; } | ||
| 19 | + | ||
| 20 | + /// <summary> | ||
| 21 | + /// 父部门ID | ||
| 22 | + /// </summary> | ||
| 23 | + public string ParentId { get; set; } | ||
| 24 | + } | ||
| 25 | +} | ||
| 0 | \ No newline at end of file | 26 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsDepartmentConsumePerformance/LqStatisticsDepartmentConsumePerformanceInfoOutput.cs
0 → 100644
| 1 | +using System; | ||
| 2 | + | ||
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStatisticsDepartmentConsumePerformance | ||
| 4 | +{ | ||
| 5 | + /// <summary> | ||
| 6 | + /// 个人消耗业绩统计详情输出 | ||
| 7 | + /// </summary> | ||
| 8 | + public class LqStatisticsDepartmentConsumePerformanceInfoOutput | ||
| 9 | + { | ||
| 10 | + /// <summary> | ||
| 11 | + /// 主键ID | ||
| 12 | + /// </summary> | ||
| 13 | + public string Id { get; set; } | ||
| 14 | + | ||
| 15 | + /// <summary> | ||
| 16 | + /// 岗位类型(健康师, 科技部老师) | ||
| 17 | + /// </summary> | ||
| 18 | + public string DepartmentType { get; set; } | ||
| 19 | + | ||
| 20 | + /// <summary> | ||
| 21 | + /// 用户ID | ||
| 22 | + /// </summary> | ||
| 23 | + public string UserId { get; set; } | ||
| 24 | + | ||
| 25 | + /// <summary> | ||
| 26 | + /// 用户账号 | ||
| 27 | + /// </summary> | ||
| 28 | + public string UserCode { get; set; } | ||
| 29 | + | ||
| 30 | + /// <summary> | ||
| 31 | + /// 用户姓名 | ||
| 32 | + /// </summary> | ||
| 33 | + public string UserName { get; set; } | ||
| 34 | + | ||
| 35 | + /// <summary> | ||
| 36 | + /// 门店ID | ||
| 37 | + /// </summary> | ||
| 38 | + public string StoreId { get; set; } | ||
| 39 | + | ||
| 40 | + /// <summary> | ||
| 41 | + /// 门店编码 | ||
| 42 | + /// </summary> | ||
| 43 | + public string StoreCode { get; set; } | ||
| 44 | + | ||
| 45 | + /// <summary> | ||
| 46 | + /// 门店名称 | ||
| 47 | + /// </summary> | ||
| 48 | + public string StoreName { get; set; } | ||
| 49 | + | ||
| 50 | + /// <summary> | ||
| 51 | + /// 统计月份(YYYYMM格式) | ||
| 52 | + /// </summary> | ||
| 53 | + public string StatisticsMonth { get; set; } | ||
| 54 | + | ||
| 55 | + /// <summary> | ||
| 56 | + /// 消耗业绩 | ||
| 57 | + /// </summary> | ||
| 58 | + public decimal ConsumePerformance { get; set; } | ||
| 59 | + | ||
| 60 | + /// <summary> | ||
| 61 | + /// 消耗数量 | ||
| 62 | + /// </summary> | ||
| 63 | + public decimal ConsumeQuantity { get; set; } | ||
| 64 | + | ||
| 65 | + /// <summary> | ||
| 66 | + /// 手工费 | ||
| 67 | + /// </summary> | ||
| 68 | + public decimal ManualFee { get; set; } | ||
| 69 | + | ||
| 70 | + /// <summary> | ||
| 71 | + /// 创建时间 | ||
| 72 | + /// </summary> | ||
| 73 | + public DateTime? CreateTime { get; set; } | ||
| 74 | + | ||
| 75 | + /// <summary> | ||
| 76 | + /// 更新时间 | ||
| 77 | + /// </summary> | ||
| 78 | + public DateTime? UpdateTime { get; set; } | ||
| 79 | + } | ||
| 80 | +} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsDepartmentConsumePerformance/LqStatisticsDepartmentConsumePerformanceListOutput.cs
0 → 100644
| 1 | +using System; | ||
| 2 | + | ||
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStatisticsDepartmentConsumePerformance | ||
| 4 | +{ | ||
| 5 | + /// <summary> | ||
| 6 | + /// 个人消耗业绩统计列表输出 | ||
| 7 | + /// </summary> | ||
| 8 | + public class LqStatisticsDepartmentConsumePerformanceListOutput | ||
| 9 | + { | ||
| 10 | + /// <summary> | ||
| 11 | + /// 主键ID | ||
| 12 | + /// </summary> | ||
| 13 | + public string Id { get; set; } | ||
| 14 | + | ||
| 15 | + /// <summary> | ||
| 16 | + /// 岗位类型(健康师, 科技部老师) | ||
| 17 | + /// </summary> | ||
| 18 | + public string DepartmentType { get; set; } | ||
| 19 | + | ||
| 20 | + /// <summary> | ||
| 21 | + /// 用户ID | ||
| 22 | + /// </summary> | ||
| 23 | + public string UserId { get; set; } | ||
| 24 | + | ||
| 25 | + /// <summary> | ||
| 26 | + /// 用户账号 | ||
| 27 | + /// </summary> | ||
| 28 | + public string UserCode { get; set; } | ||
| 29 | + | ||
| 30 | + /// <summary> | ||
| 31 | + /// 用户姓名 | ||
| 32 | + /// </summary> | ||
| 33 | + public string UserName { get; set; } | ||
| 34 | + | ||
| 35 | + /// <summary> | ||
| 36 | + /// 门店ID | ||
| 37 | + /// </summary> | ||
| 38 | + public string StoreId { get; set; } | ||
| 39 | + | ||
| 40 | + /// <summary> | ||
| 41 | + /// 门店编码 | ||
| 42 | + /// </summary> | ||
| 43 | + public string StoreCode { get; set; } | ||
| 44 | + | ||
| 45 | + /// <summary> | ||
| 46 | + /// 门店名称 | ||
| 47 | + /// </summary> | ||
| 48 | + public string StoreName { get; set; } | ||
| 49 | + | ||
| 50 | + /// <summary> | ||
| 51 | + /// 统计月份(YYYYMM格式) | ||
| 52 | + /// </summary> | ||
| 53 | + public string StatisticsMonth { get; set; } | ||
| 54 | + | ||
| 55 | + /// <summary> | ||
| 56 | + /// 消耗业绩 | ||
| 57 | + /// </summary> | ||
| 58 | + public decimal ConsumePerformance { get; set; } | ||
| 59 | + | ||
| 60 | + /// <summary> | ||
| 61 | + /// 消耗数量 | ||
| 62 | + /// </summary> | ||
| 63 | + public decimal ConsumeQuantity { get; set; } | ||
| 64 | + | ||
| 65 | + /// <summary> | ||
| 66 | + /// 手工费 | ||
| 67 | + /// </summary> | ||
| 68 | + public decimal ManualFee { get; set; } | ||
| 69 | + | ||
| 70 | + /// <summary> | ||
| 71 | + /// 创建时间 | ||
| 72 | + /// </summary> | ||
| 73 | + public DateTime? CreateTime { get; set; } | ||
| 74 | + | ||
| 75 | + /// <summary> | ||
| 76 | + /// 更新时间 | ||
| 77 | + /// </summary> | ||
| 78 | + public DateTime? UpdateTime { get; set; } | ||
| 79 | + } | ||
| 80 | +} | ||
| 0 | \ No newline at end of file | 81 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsDepartmentConsumePerformance/LqStatisticsDepartmentConsumePerformanceListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | ||
| 2 | + | ||
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStatisticsDepartmentConsumePerformance | ||
| 4 | +{ | ||
| 5 | + /// <summary> | ||
| 6 | + /// 个人消耗业绩统计列表查询输入 | ||
| 7 | + /// </summary> | ||
| 8 | + public class LqStatisticsDepartmentConsumePerformanceListQueryInput : PageInputBase | ||
| 9 | + { | ||
| 10 | + /// <summary> | ||
| 11 | + /// 岗位类型(健康师, 科技部老师) | ||
| 12 | + /// </summary> | ||
| 13 | + public string DepartmentType { get; set; } | ||
| 14 | + | ||
| 15 | + /// <summary> | ||
| 16 | + /// 用户ID | ||
| 17 | + /// </summary> | ||
| 18 | + public string UserId { get; set; } | ||
| 19 | + | ||
| 20 | + /// <summary> | ||
| 21 | + /// 用户账号 | ||
| 22 | + /// </summary> | ||
| 23 | + public string UserCode { get; set; } | ||
| 24 | + | ||
| 25 | + /// <summary> | ||
| 26 | + /// 用户姓名 | ||
| 27 | + /// </summary> | ||
| 28 | + public string UserName { get; set; } | ||
| 29 | + | ||
| 30 | + /// <summary> | ||
| 31 | + /// 门店ID | ||
| 32 | + /// </summary> | ||
| 33 | + public string StoreId { get; set; } | ||
| 34 | + | ||
| 35 | + /// <summary> | ||
| 36 | + /// 门店编码 | ||
| 37 | + /// </summary> | ||
| 38 | + public string StoreCode { get; set; } | ||
| 39 | + | ||
| 40 | + /// <summary> | ||
| 41 | + /// 门店名称 | ||
| 42 | + /// </summary> | ||
| 43 | + public string StoreName { get; set; } | ||
| 44 | + | ||
| 45 | + /// <summary> | ||
| 46 | + /// 统计月份(YYYYMM格式) | ||
| 47 | + /// </summary> | ||
| 48 | + public string StatisticsMonth { get; set; } | ||
| 49 | + | ||
| 50 | + /// <summary> | ||
| 51 | + /// 开始月份(YYYYMM格式) | ||
| 52 | + /// </summary> | ||
| 53 | + public string StartMonth { get; set; } | ||
| 54 | + | ||
| 55 | + /// <summary> | ||
| 56 | + /// 结束月份(YYYYMM格式) | ||
| 57 | + /// </summary> | ||
| 58 | + public string EndMonth { get; set; } | ||
| 59 | + } | ||
| 60 | +} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreConsumePerformance/LqStatisticsStoreConsumePerformanceInfoOutput.cs
0 → 100644
| 1 | +using System; | ||
| 2 | + | ||
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreConsumePerformance | ||
| 4 | +{ | ||
| 5 | + /// <summary> | ||
| 6 | + /// 门店耗卡业绩统计详情输出 | ||
| 7 | + /// </summary> | ||
| 8 | + public class LqStatisticsStoreConsumePerformanceInfoOutput | ||
| 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 storeCode { get; set; } | ||
| 24 | + | ||
| 25 | + /// <summary> | ||
| 26 | + /// 门店名称 | ||
| 27 | + /// </summary> | ||
| 28 | + public string storeName { get; set; } | ||
| 29 | + | ||
| 30 | + /// <summary> | ||
| 31 | + /// 统计月份(YYYYMM格式) | ||
| 32 | + /// </summary> | ||
| 33 | + public string statisticsMonth { get; set; } | ||
| 34 | + | ||
| 35 | + /// <summary> | ||
| 36 | + /// 消耗业绩 | ||
| 37 | + /// </summary> | ||
| 38 | + public decimal consumePerformance { get; set; } | ||
| 39 | + | ||
| 40 | + /// <summary> | ||
| 41 | + /// 消耗数量 | ||
| 42 | + /// </summary> | ||
| 43 | + public decimal consumeQuantity { get; set; } | ||
| 44 | + | ||
| 45 | + /// <summary> | ||
| 46 | + /// 手工费 | ||
| 47 | + /// </summary> | ||
| 48 | + public decimal manualFee { get; set; } | ||
| 49 | + | ||
| 50 | + /// <summary> | ||
| 51 | + /// 创建时间 | ||
| 52 | + /// </summary> | ||
| 53 | + public DateTime? createTime { get; set; } | ||
| 54 | + | ||
| 55 | + /// <summary> | ||
| 56 | + /// 更新时间 | ||
| 57 | + /// </summary> | ||
| 58 | + public DateTime? updateTime { get; set; } | ||
| 59 | + } | ||
| 60 | +} | ||
| 0 | \ No newline at end of file | 61 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreConsumePerformance/LqStatisticsStoreConsumePerformanceListOutput.cs
0 → 100644
| 1 | +using System; | ||
| 2 | + | ||
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreConsumePerformance | ||
| 4 | +{ | ||
| 5 | + /// <summary> | ||
| 6 | + /// 门店耗卡业绩统计列表输出 | ||
| 7 | + /// </summary> | ||
| 8 | + public class LqStatisticsStoreConsumePerformanceListOutput | ||
| 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 storeCode { get; set; } | ||
| 24 | + | ||
| 25 | + /// <summary> | ||
| 26 | + /// 门店名称 | ||
| 27 | + /// </summary> | ||
| 28 | + public string storeName { get; set; } | ||
| 29 | + | ||
| 30 | + /// <summary> | ||
| 31 | + /// 统计月份(YYYYMM格式) | ||
| 32 | + /// </summary> | ||
| 33 | + public string statisticsMonth { get; set; } | ||
| 34 | + | ||
| 35 | + /// <summary> | ||
| 36 | + /// 消耗业绩 | ||
| 37 | + /// </summary> | ||
| 38 | + public decimal consumePerformance { get; set; } | ||
| 39 | + | ||
| 40 | + /// <summary> | ||
| 41 | + /// 消耗数量 | ||
| 42 | + /// </summary> | ||
| 43 | + public decimal consumeQuantity { get; set; } | ||
| 44 | + | ||
| 45 | + /// <summary> | ||
| 46 | + /// 手工费 | ||
| 47 | + /// </summary> | ||
| 48 | + public decimal manualFee { get; set; } | ||
| 49 | + | ||
| 50 | + /// <summary> | ||
| 51 | + /// 创建时间 | ||
| 52 | + /// </summary> | ||
| 53 | + public DateTime? createTime { get; set; } | ||
| 54 | + | ||
| 55 | + /// <summary> | ||
| 56 | + /// 更新时间 | ||
| 57 | + /// </summary> | ||
| 58 | + public DateTime? updateTime { get; set; } | ||
| 59 | + } | ||
| 60 | +} | ||
| 0 | \ No newline at end of file | 61 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreConsumePerformance/LqStatisticsStoreConsumePerformanceListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | ||
| 2 | + | ||
| 3 | +namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreConsumePerformance | ||
| 4 | +{ | ||
| 5 | + /// <summary> | ||
| 6 | + /// 门店耗卡业绩统计列表查询输入 | ||
| 7 | + /// </summary> | ||
| 8 | + public class LqStatisticsStoreConsumePerformanceListQueryInput : PageInputBase | ||
| 9 | + { | ||
| 10 | + /// <summary> | ||
| 11 | + /// 门店ID | ||
| 12 | + /// </summary> | ||
| 13 | + public string storeId { get; set; } | ||
| 14 | + | ||
| 15 | + /// <summary> | ||
| 16 | + /// 门店编码 | ||
| 17 | + /// </summary> | ||
| 18 | + public string storeCode { get; set; } | ||
| 19 | + | ||
| 20 | + /// <summary> | ||
| 21 | + /// 门店名称 | ||
| 22 | + /// </summary> | ||
| 23 | + public string storeName { get; set; } | ||
| 24 | + | ||
| 25 | + /// <summary> | ||
| 26 | + /// 统计月份(YYYYMM格式) | ||
| 27 | + /// </summary> | ||
| 28 | + public string statisticsMonth { get; set; } | ||
| 29 | + | ||
| 30 | + /// <summary> | ||
| 31 | + /// 开始月份(YYYYMM格式) | ||
| 32 | + /// </summary> | ||
| 33 | + public string startMonth { get; set; } | ||
| 34 | + | ||
| 35 | + /// <summary> | ||
| 36 | + /// 结束月份(YYYYMM格式) | ||
| 37 | + /// </summary> | ||
| 38 | + public string endMonth { get; set; } | ||
| 39 | + } | ||
| 40 | +} | ||
| 0 | \ No newline at end of file | 41 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXhHyhk/LqXhHyhkListQueryInput.cs
| @@ -23,66 +23,56 @@ namespace NCC.Extend.Entitys.Dto.LqXhHyhk | @@ -23,66 +23,56 @@ namespace NCC.Extend.Entitys.Dto.LqXhHyhk | ||
| 23 | /// 耗卡编号 | 23 | /// 耗卡编号 |
| 24 | /// </summary> | 24 | /// </summary> |
| 25 | public string id { get; set; } | 25 | public string id { get; set; } |
| 26 | - | 26 | + |
| 27 | /// <summary> | 27 | /// <summary> |
| 28 | /// 门店 | 28 | /// 门店 |
| 29 | /// </summary> | 29 | /// </summary> |
| 30 | public string md { get; set; } | 30 | public string md { get; set; } |
| 31 | - | 31 | + |
| 32 | /// <summary> | 32 | /// <summary> |
| 33 | /// 门店编号 | 33 | /// 门店编号 |
| 34 | /// </summary> | 34 | /// </summary> |
| 35 | public string mdbh { get; set; } | 35 | public string mdbh { get; set; } |
| 36 | - | 36 | + |
| 37 | /// <summary> | 37 | /// <summary> |
| 38 | /// 门店名称 | 38 | /// 门店名称 |
| 39 | /// </summary> | 39 | /// </summary> |
| 40 | public string mdmc { get; set; } | 40 | public string mdmc { get; set; } |
| 41 | - | 41 | + |
| 42 | /// <summary> | 42 | /// <summary> |
| 43 | /// 会员 | 43 | /// 会员 |
| 44 | /// </summary> | 44 | /// </summary> |
| 45 | public string hy { get; set; } | 45 | public string hy { get; set; } |
| 46 | - | 46 | + |
| 47 | /// <summary> | 47 | /// <summary> |
| 48 | /// 会员账号 | 48 | /// 会员账号 |
| 49 | /// </summary> | 49 | /// </summary> |
| 50 | public string hyzh { get; set; } | 50 | public string hyzh { get; set; } |
| 51 | - | 51 | + |
| 52 | /// <summary> | 52 | /// <summary> |
| 53 | /// 会员名称 | 53 | /// 会员名称 |
| 54 | /// </summary> | 54 | /// </summary> |
| 55 | public string hymc { get; set; } | 55 | public string hymc { get; set; } |
| 56 | - | 56 | + |
| 57 | /// <summary> | 57 | /// <summary> |
| 58 | /// 顾客类型 | 58 | /// 顾客类型 |
| 59 | /// </summary> | 59 | /// </summary> |
| 60 | public string gklx { get; set; } | 60 | public string gklx { get; set; } |
| 61 | - | ||
| 62 | - /// <summary> | ||
| 63 | - /// 消费金额 | ||
| 64 | - /// </summary> | ||
| 65 | - public string xfje { get; set; } | ||
| 66 | - | ||
| 67 | - /// <summary> | ||
| 68 | - /// 手工费用 | ||
| 69 | - /// </summary> | ||
| 70 | - public string sgfy { get; set; } | ||
| 71 | - | 61 | + |
| 72 | /// <summary> | 62 | /// <summary> |
| 73 | /// 是否有科技部 | 63 | /// 是否有科技部 |
| 74 | /// </summary> | 64 | /// </summary> |
| 75 | public string sfykjb { get; set; } | 65 | public string sfykjb { get; set; } |
| 76 | - | 66 | + |
| 77 | /// <summary> | 67 | /// <summary> |
| 78 | /// 耗卡时间 | 68 | /// 耗卡时间 |
| 79 | /// </summary> | 69 | /// </summary> |
| 80 | public string hksj { get; set; } | 70 | public string hksj { get; set; } |
| 81 | - | 71 | + |
| 82 | /// <summary> | 72 | /// <summary> |
| 83 | /// 操作人员 | 73 | /// 操作人员 |
| 84 | /// </summary> | 74 | /// </summary> |
| 85 | public string czry { get; set; } | 75 | public string czry { get; set; } |
| 86 | - | 76 | + |
| 87 | } | 77 | } |
| 88 | } | 78 | } |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXhJksyj/LqXhJksyjCrInput.cs
| @@ -11,31 +11,31 @@ namespace NCC.Extend.Entitys.Dto.LqXhJksyj | @@ -11,31 +11,31 @@ namespace NCC.Extend.Entitys.Dto.LqXhJksyj | ||
| 11 | /// 业绩编号 | 11 | /// 业绩编号 |
| 12 | /// </summary> | 12 | /// </summary> |
| 13 | public string id { get; set; } | 13 | public string id { get; set; } |
| 14 | - | 14 | + |
| 15 | /// <summary> | 15 | /// <summary> |
| 16 | /// 关联开单编号 | 16 | /// 关联开单编号 |
| 17 | /// </summary> | 17 | /// </summary> |
| 18 | public string glkdbh { get; set; } | 18 | public string glkdbh { get; set; } |
| 19 | - | 19 | + |
| 20 | /// <summary> | 20 | /// <summary> |
| 21 | /// 健康师 | 21 | /// 健康师 |
| 22 | /// </summary> | 22 | /// </summary> |
| 23 | public string jks { get; set; } | 23 | public string jks { get; set; } |
| 24 | - | 24 | + |
| 25 | /// <summary> | 25 | /// <summary> |
| 26 | /// 健康师姓名 | 26 | /// 健康师姓名 |
| 27 | /// </summary> | 27 | /// </summary> |
| 28 | public string jksxm { get; set; } | 28 | public string jksxm { get; set; } |
| 29 | - | 29 | + |
| 30 | /// <summary> | 30 | /// <summary> |
| 31 | /// 健康师账号 | 31 | /// 健康师账号 |
| 32 | /// </summary> | 32 | /// </summary> |
| 33 | public string jkszh { get; set; } | 33 | public string jkszh { get; set; } |
| 34 | - | 34 | + |
| 35 | /// <summary> | 35 | /// <summary> |
| 36 | /// 健康师业绩 | 36 | /// 健康师业绩 |
| 37 | /// </summary> | 37 | /// </summary> |
| 38 | - public string jksyj { get; set; } | 38 | + public decimal jksyj { get; set; } |
| 39 | 39 | ||
| 40 | /// <summary> | 40 | /// <summary> |
| 41 | /// 业绩时间 | 41 | /// 业绩时间 |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXhKjbsyj/LqXhKjbsyjCrInput.cs
| @@ -35,7 +35,7 @@ namespace NCC.Extend.Entitys.Dto.LqXhKjbsyj | @@ -35,7 +35,7 @@ namespace NCC.Extend.Entitys.Dto.LqXhKjbsyj | ||
| 35 | /// <summary> | 35 | /// <summary> |
| 36 | /// 科技部老师业绩 | 36 | /// 科技部老师业绩 |
| 37 | /// </summary> | 37 | /// </summary> |
| 38 | - public string kjblsyj { get; set; } | 38 | + public decimal kjblsyj { get; set; } |
| 39 | 39 | ||
| 40 | /// <summary> | 40 | /// <summary> |
| 41 | /// 业绩时间 | 41 | /// 业绩时间 |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqXhPxmx/LqXhPxmxInfoOutput.cs
| @@ -56,11 +56,6 @@ namespace NCC.Extend.Entitys.Dto.LqXhPxmx | @@ -56,11 +56,6 @@ namespace NCC.Extend.Entitys.Dto.LqXhPxmx | ||
| 56 | public int? projectNumber { get; set; } | 56 | public int? projectNumber { get; set; } |
| 57 | 57 | ||
| 58 | /// <summary> | 58 | /// <summary> |
| 59 | - /// 是否有效 | ||
| 60 | - /// </summary> | ||
| 61 | - public int? isEnabled { get; set; } | ||
| 62 | - | ||
| 63 | - /// <summary> | ||
| 64 | /// 来源类型(开卡/赠送/其他) | 59 | /// 来源类型(开卡/赠送/其他) |
| 65 | /// </summary> | 60 | /// </summary> |
| 66 | public string sourceType { get; set; } | 61 | public string sourceType { get; set; } |
| @@ -71,6 +66,11 @@ namespace NCC.Extend.Entitys.Dto.LqXhPxmx | @@ -71,6 +66,11 @@ namespace NCC.Extend.Entitys.Dto.LqXhPxmx | ||
| 71 | public decimal totalPrice { get; set; } | 66 | public decimal totalPrice { get; set; } |
| 72 | 67 | ||
| 73 | /// <summary> | 68 | /// <summary> |
| 69 | + /// 是否有效 | ||
| 70 | + /// </summary> | ||
| 71 | + public int? isEffective { get; set; } | ||
| 72 | + | ||
| 73 | + /// <summary> | ||
| 74 | /// 健康师业绩列表 | 74 | /// 健康师业绩列表 |
| 75 | /// </summary> | 75 | /// </summary> |
| 76 | public List<LqXhJksyjInfoOutput> lqXhJksyjList { get; set; } | 76 | public List<LqXhJksyjInfoOutput> lqXhJksyjList { get; set; } |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_department_consume_performance/LqStatisticsDepartmentConsumePerformanceEntity.cs
0 → 100644
| 1 | +using System; | ||
| 2 | +using NCC.Common.Const; | ||
| 3 | +using SqlSugar; | ||
| 4 | + | ||
| 5 | +namespace NCC.Extend.Entitys.lq_statistics_department_consume_performance | ||
| 6 | +{ | ||
| 7 | + /// <summary> | ||
| 8 | + /// 个人消耗业绩统计 | ||
| 9 | + /// </summary> | ||
| 10 | + [SugarTable("lq_statistics_department_consume_performance")] | ||
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | ||
| 12 | + public class LqStatisticsDepartmentConsumePerformanceEntity | ||
| 13 | + { | ||
| 14 | + /// <summary> | ||
| 15 | + /// 主键ID | ||
| 16 | + /// </summary> | ||
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | ||
| 18 | + public string Id { get; set; } | ||
| 19 | + | ||
| 20 | + /// <summary> | ||
| 21 | + /// 岗位类型(健康师, 科技部老师) | ||
| 22 | + /// </summary> | ||
| 23 | + [SugarColumn(ColumnName = "F_DepartmentType")] | ||
| 24 | + public string DepartmentType { get; set; } | ||
| 25 | + | ||
| 26 | + /// <summary> | ||
| 27 | + /// 用户ID | ||
| 28 | + /// </summary> | ||
| 29 | + [SugarColumn(ColumnName = "F_UserId")] | ||
| 30 | + public string UserId { get; set; } | ||
| 31 | + | ||
| 32 | + /// <summary> | ||
| 33 | + /// 用户账号 | ||
| 34 | + /// </summary> | ||
| 35 | + [SugarColumn(ColumnName = "F_UserCode")] | ||
| 36 | + public string UserCode { get; set; } | ||
| 37 | + | ||
| 38 | + /// <summary> | ||
| 39 | + /// 用户姓名 | ||
| 40 | + /// </summary> | ||
| 41 | + [SugarColumn(ColumnName = "F_UserName")] | ||
| 42 | + public string UserName { get; set; } | ||
| 43 | + | ||
| 44 | + /// <summary> | ||
| 45 | + /// 门店ID | ||
| 46 | + /// </summary> | ||
| 47 | + [SugarColumn(ColumnName = "F_StoreId")] | ||
| 48 | + public string StoreId { get; set; } | ||
| 49 | + | ||
| 50 | + /// <summary> | ||
| 51 | + /// 门店编码 | ||
| 52 | + /// </summary> | ||
| 53 | + [SugarColumn(ColumnName = "F_StoreCode")] | ||
| 54 | + public string StoreCode { get; set; } | ||
| 55 | + | ||
| 56 | + /// <summary> | ||
| 57 | + /// 门店名称 | ||
| 58 | + /// </summary> | ||
| 59 | + [SugarColumn(ColumnName = "F_StoreName")] | ||
| 60 | + public string StoreName { get; set; } | ||
| 61 | + | ||
| 62 | + /// <summary> | ||
| 63 | + /// 统计月份(YYYYMM格式) | ||
| 64 | + /// </summary> | ||
| 65 | + [SugarColumn(ColumnName = "F_StatisticsMonth")] | ||
| 66 | + public string StatisticsMonth { get; set; } | ||
| 67 | + | ||
| 68 | + /// <summary> | ||
| 69 | + /// 消耗业绩 | ||
| 70 | + /// </summary> | ||
| 71 | + [SugarColumn(ColumnName = "F_ConsumePerformance")] | ||
| 72 | + public decimal ConsumePerformance { get; set; } | ||
| 73 | + | ||
| 74 | + /// <summary> | ||
| 75 | + /// 消耗数量 | ||
| 76 | + /// </summary> | ||
| 77 | + [SugarColumn(ColumnName = "F_ConsumeQuantity")] | ||
| 78 | + public decimal ConsumeQuantity { get; set; } | ||
| 79 | + | ||
| 80 | + /// <summary> | ||
| 81 | + /// 手工费 | ||
| 82 | + /// </summary> | ||
| 83 | + [SugarColumn(ColumnName = "F_ManualFee")] | ||
| 84 | + public decimal ManualFee { get; set; } | ||
| 85 | + | ||
| 86 | + /// <summary> | ||
| 87 | + /// 创建时间 | ||
| 88 | + /// </summary> | ||
| 89 | + [SugarColumn(ColumnName = "F_CreateTime")] | ||
| 90 | + public DateTime? CreateTime { get; set; } | ||
| 91 | + | ||
| 92 | + /// <summary> | ||
| 93 | + /// 更新时间 | ||
| 94 | + /// </summary> | ||
| 95 | + [SugarColumn(ColumnName = "F_UpdateTime")] | ||
| 96 | + public DateTime? UpdateTime { get; set; } | ||
| 97 | + } | ||
| 98 | +} |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_store_consume_performance/LqStatisticsStoreConsumePerformanceEntity.cs
0 → 100644
| 1 | +using System; | ||
| 2 | +using NCC.Common.Const; | ||
| 3 | +using SqlSugar; | ||
| 4 | + | ||
| 5 | +namespace NCC.Extend.Entitys.lq_statistics_store_consume_performance | ||
| 6 | +{ | ||
| 7 | + /// <summary> | ||
| 8 | + /// 门店耗卡业绩统计 | ||
| 9 | + /// </summary> | ||
| 10 | + [SugarTable("lq_statistics_store_consume_performance")] | ||
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | ||
| 12 | + public class LqStatisticsStoreConsumePerformanceEntity | ||
| 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_StoreCode")] | ||
| 30 | + public string StoreCode { get; set; } | ||
| 31 | + | ||
| 32 | + /// <summary> | ||
| 33 | + /// 门店名称 | ||
| 34 | + /// </summary> | ||
| 35 | + [SugarColumn(ColumnName = "F_StoreName")] | ||
| 36 | + public string StoreName { get; set; } | ||
| 37 | + | ||
| 38 | + /// <summary> | ||
| 39 | + /// 统计月份(YYYYMM格式) | ||
| 40 | + /// </summary> | ||
| 41 | + [SugarColumn(ColumnName = "F_StatisticsMonth")] | ||
| 42 | + public string StatisticsMonth { get; set; } | ||
| 43 | + | ||
| 44 | + /// <summary> | ||
| 45 | + /// 消耗业绩 | ||
| 46 | + /// </summary> | ||
| 47 | + [SugarColumn(ColumnName = "F_ConsumePerformance")] | ||
| 48 | + public decimal ConsumePerformance { get; set; } | ||
| 49 | + | ||
| 50 | + /// <summary> | ||
| 51 | + /// 消耗数量 | ||
| 52 | + /// </summary> | ||
| 53 | + [SugarColumn(ColumnName = "F_ConsumeQuantity")] | ||
| 54 | + public decimal ConsumeQuantity { get; set; } | ||
| 55 | + | ||
| 56 | + /// <summary> | ||
| 57 | + /// 手工费 | ||
| 58 | + /// </summary> | ||
| 59 | + [SugarColumn(ColumnName = "F_ManualFee")] | ||
| 60 | + public decimal ManualFee { get; set; } | ||
| 61 | + | ||
| 62 | + /// <summary> | ||
| 63 | + /// 创建时间 | ||
| 64 | + /// </summary> | ||
| 65 | + [SugarColumn(ColumnName = "F_CreateTime")] | ||
| 66 | + public DateTime? CreateTime { get; set; } | ||
| 67 | + | ||
| 68 | + /// <summary> | ||
| 69 | + /// 更新时间 | ||
| 70 | + /// </summary> | ||
| 71 | + [SugarColumn(ColumnName = "F_UpdateTime")] | ||
| 72 | + public DateTime? UpdateTime { get; set; } | ||
| 73 | + } | ||
| 74 | +} | ||
| 0 | \ No newline at end of file | 75 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_xh_hyhk/LqXhHyhkEntity.cs
| @@ -63,13 +63,13 @@ namespace NCC.Extend.Entitys.lq_xh_hyhk | @@ -63,13 +63,13 @@ namespace NCC.Extend.Entitys.lq_xh_hyhk | ||
| 63 | /// 消费金额 | 63 | /// 消费金额 |
| 64 | /// </summary> | 64 | /// </summary> |
| 65 | [SugarColumn(ColumnName = "xfje")] | 65 | [SugarColumn(ColumnName = "xfje")] |
| 66 | - public string Xfje { get; set; } | 66 | + public decimal? Xfje { get; set; } |
| 67 | 67 | ||
| 68 | /// <summary> | 68 | /// <summary> |
| 69 | /// 手工费用 | 69 | /// 手工费用 |
| 70 | /// </summary> | 70 | /// </summary> |
| 71 | [SugarColumn(ColumnName = "sgfy")] | 71 | [SugarColumn(ColumnName = "sgfy")] |
| 72 | - public string Sgfy { get; set; } | 72 | + public decimal? Sgfy { get; set; } |
| 73 | 73 | ||
| 74 | /// <summary> | 74 | /// <summary> |
| 75 | /// 是否有科技部 | 75 | /// 是否有科技部 |
| @@ -77,23 +77,6 @@ namespace NCC.Extend.Entitys.lq_xh_hyhk | @@ -77,23 +77,6 @@ namespace NCC.Extend.Entitys.lq_xh_hyhk | ||
| 77 | [SugarColumn(ColumnName = "sfykjb")] | 77 | [SugarColumn(ColumnName = "sfykjb")] |
| 78 | public string Sfykjb { get; set; } | 78 | public string Sfykjb { get; set; } |
| 79 | 79 | ||
| 80 | - /// <summary> | ||
| 81 | - /// 健康师业绩 | ||
| 82 | - /// </summary> | ||
| 83 | - [SugarColumn(ColumnName = "jksyj")] | ||
| 84 | - public string Jksyj { get; set; } | ||
| 85 | - | ||
| 86 | - /// <summary> | ||
| 87 | - /// 科技部业绩 | ||
| 88 | - /// </summary> | ||
| 89 | - [SugarColumn(ColumnName = "kjbyj")] | ||
| 90 | - public string Kjbyj { get; set; } | ||
| 91 | - | ||
| 92 | - /// <summary> | ||
| 93 | - /// 品项信息 | ||
| 94 | - /// </summary> | ||
| 95 | - [SugarColumn(ColumnName = "pxxx")] | ||
| 96 | - public string Pxxx { get; set; } | ||
| 97 | 80 | ||
| 98 | /// <summary> | 81 | /// <summary> |
| 99 | /// 耗卡时间 | 82 | /// 耗卡时间 |
| @@ -108,15 +91,27 @@ namespace NCC.Extend.Entitys.lq_xh_hyhk | @@ -108,15 +91,27 @@ namespace NCC.Extend.Entitys.lq_xh_hyhk | ||
| 108 | public string Czry { get; set; } | 91 | public string Czry { get; set; } |
| 109 | 92 | ||
| 110 | /// <summary> | 93 | /// <summary> |
| 94 | + /// 签名文件 | ||
| 95 | + /// </summary> | ||
| 96 | + [SugarColumn(ColumnName = "F_SignatureFile")] | ||
| 97 | + public string SignatureFile { get; set; } | ||
| 98 | + | ||
| 99 | + /// <summary> | ||
| 111 | /// 创建时间 | 100 | /// 创建时间 |
| 112 | /// </summary> | 101 | /// </summary> |
| 113 | [SugarColumn(ColumnName = "F_CreateTime")] | 102 | [SugarColumn(ColumnName = "F_CreateTime")] |
| 114 | - public DateTime CreateTime { get; set; } | 103 | + public DateTime? CreateTime { get; set; } |
| 115 | 104 | ||
| 116 | /// <summary> | 105 | /// <summary> |
| 117 | /// 修改时间 | 106 | /// 修改时间 |
| 118 | /// </summary> | 107 | /// </summary> |
| 119 | [SugarColumn(ColumnName = "F_UpdateTime")] | 108 | [SugarColumn(ColumnName = "F_UpdateTime")] |
| 120 | - public DateTime UpdateTime { get; set; } | 109 | + public DateTime? UpdateTime { get; set; } |
| 110 | + | ||
| 111 | + /// <summary> | ||
| 112 | + /// 是否有效 | ||
| 113 | + /// </summary> | ||
| 114 | + [SugarColumn(ColumnName = "F_IsEffective")] | ||
| 115 | + public int? IsEffective { get; set; } = 1; | ||
| 121 | } | 116 | } |
| 122 | } | 117 | } |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_xh_jksyj/LqXhJksyjEntity.cs
| @@ -16,65 +16,71 @@ namespace NCC.Extend.Entitys.lq_xh_jksyj | @@ -16,65 +16,71 @@ namespace NCC.Extend.Entitys.lq_xh_jksyj | ||
| 16 | /// </summary> | 16 | /// </summary> |
| 17 | [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | 17 | [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] |
| 18 | public string Id { get; set; } | 18 | public string Id { get; set; } |
| 19 | - | 19 | + |
| 20 | /// <summary> | 20 | /// <summary> |
| 21 | /// 关联开单编号 | 21 | /// 关联开单编号 |
| 22 | /// </summary> | 22 | /// </summary> |
| 23 | - [SugarColumn(ColumnName = "glkdbh")] | 23 | + [SugarColumn(ColumnName = "glkdbh")] |
| 24 | public string Glkdbh { get; set; } | 24 | public string Glkdbh { get; set; } |
| 25 | - | 25 | + |
| 26 | /// <summary> | 26 | /// <summary> |
| 27 | /// 健康师 | 27 | /// 健康师 |
| 28 | /// </summary> | 28 | /// </summary> |
| 29 | - [SugarColumn(ColumnName = "jks")] | 29 | + [SugarColumn(ColumnName = "jks")] |
| 30 | public string Jks { get; set; } | 30 | public string Jks { get; set; } |
| 31 | - | 31 | + |
| 32 | /// <summary> | 32 | /// <summary> |
| 33 | /// 健康师姓名 | 33 | /// 健康师姓名 |
| 34 | /// </summary> | 34 | /// </summary> |
| 35 | - [SugarColumn(ColumnName = "jksxm")] | 35 | + [SugarColumn(ColumnName = "jksxm")] |
| 36 | public string Jksxm { get; set; } | 36 | public string Jksxm { get; set; } |
| 37 | - | 37 | + |
| 38 | /// <summary> | 38 | /// <summary> |
| 39 | /// 健康师账号 | 39 | /// 健康师账号 |
| 40 | /// </summary> | 40 | /// </summary> |
| 41 | - [SugarColumn(ColumnName = "jkszh")] | 41 | + [SugarColumn(ColumnName = "jkszh")] |
| 42 | public string Jkszh { get; set; } | 42 | public string Jkszh { get; set; } |
| 43 | - | 43 | + |
| 44 | /// <summary> | 44 | /// <summary> |
| 45 | /// 健康师业绩 | 45 | /// 健康师业绩 |
| 46 | /// </summary> | 46 | /// </summary> |
| 47 | - [SugarColumn(ColumnName = "jksyj")] | ||
| 48 | - public string Jksyj { get; set; } | ||
| 49 | - | 47 | + [SugarColumn(ColumnName = "jksyj")] |
| 48 | + public decimal? Jksyj { get; set; } | ||
| 49 | + | ||
| 50 | /// <summary> | 50 | /// <summary> |
| 51 | /// 业绩时间 | 51 | /// 业绩时间 |
| 52 | /// </summary> | 52 | /// </summary> |
| 53 | - [SugarColumn(ColumnName = "yjsj")] | 53 | + [SugarColumn(ColumnName = "yjsj")] |
| 54 | public DateTime? Yjsj { get; set; } | 54 | public DateTime? Yjsj { get; set; } |
| 55 | 55 | ||
| 56 | /// <summary> | 56 | /// <summary> |
| 57 | /// 金三角id | 57 | /// 金三角id |
| 58 | /// </summary> | 58 | /// </summary> |
| 59 | - [SugarColumn(ColumnName = "F_jsjid")] | 59 | + [SugarColumn(ColumnName = "F_jsjid")] |
| 60 | public string JsjId { get; set; } | 60 | public string JsjId { get; set; } |
| 61 | 61 | ||
| 62 | /// <summary> | 62 | /// <summary> |
| 63 | /// 耗卡品项id | 63 | /// 耗卡品项id |
| 64 | /// </summary> | 64 | /// </summary> |
| 65 | - [SugarColumn(ColumnName = "F_kdpxid")] | 65 | + [SugarColumn(ColumnName = "F_kdpxid")] |
| 66 | public string Kdpxid { get; set; } | 66 | public string Kdpxid { get; set; } |
| 67 | 67 | ||
| 68 | /// <summary> | 68 | /// <summary> |
| 69 | /// 手工费 | 69 | /// 手工费 |
| 70 | /// </summary> | 70 | /// </summary> |
| 71 | - [SugarColumn(ColumnName = "F_LaborCost")] | 71 | + [SugarColumn(ColumnName = "F_LaborCost")] |
| 72 | public decimal? LaborCost { get; set; } | 72 | public decimal? LaborCost { get; set; } |
| 73 | 73 | ||
| 74 | /// <summary> | 74 | /// <summary> |
| 75 | /// 耗卡品项次数 | 75 | /// 耗卡品项次数 |
| 76 | /// </summary> | 76 | /// </summary> |
| 77 | - [SugarColumn(ColumnName = "F_kdpxNumber")] | 77 | + [SugarColumn(ColumnName = "F_kdpxNumber")] |
| 78 | public decimal? KdpxNumber { get; set; } | 78 | public decimal? KdpxNumber { get; set; } |
| 79 | + | ||
| 80 | + /// <summary> | ||
| 81 | + /// 是否有效 | ||
| 82 | + /// </summary> | ||
| 83 | + [SugarColumn(ColumnName = "F_IsEffective")] | ||
| 84 | + public int? IsEffective { get; set; } = 1; | ||
| 79 | } | 85 | } |
| 80 | } | 86 | } |
| 81 | \ No newline at end of file | 87 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_xh_kjbsyj/LqXhKjbsyjEntity.cs
| @@ -45,7 +45,7 @@ namespace NCC.Extend.Entitys.lq_xh_kjbsyj | @@ -45,7 +45,7 @@ namespace NCC.Extend.Entitys.lq_xh_kjbsyj | ||
| 45 | /// 科技部老师业绩 | 45 | /// 科技部老师业绩 |
| 46 | /// </summary> | 46 | /// </summary> |
| 47 | [SugarColumn(ColumnName = "kjblsyj")] | 47 | [SugarColumn(ColumnName = "kjblsyj")] |
| 48 | - public string Kjblsyj { get; set; } | 48 | + public decimal? Kjblsyj { get; set; } |
| 49 | 49 | ||
| 50 | /// <summary> | 50 | /// <summary> |
| 51 | /// 业绩时间 | 51 | /// 业绩时间 |
| @@ -70,5 +70,11 @@ namespace NCC.Extend.Entitys.lq_xh_kjbsyj | @@ -70,5 +70,11 @@ namespace NCC.Extend.Entitys.lq_xh_kjbsyj | ||
| 70 | /// </summary> | 70 | /// </summary> |
| 71 | [SugarColumn(ColumnName = "F_hdpxNumber")] | 71 | [SugarColumn(ColumnName = "F_hdpxNumber")] |
| 72 | public decimal? HdpxNumber { get; set; } | 72 | public decimal? HdpxNumber { get; set; } |
| 73 | + | ||
| 74 | + /// <summary> | ||
| 75 | + /// 是否有效 | ||
| 76 | + /// </summary> | ||
| 77 | + [SugarColumn(ColumnName = "F_IsEffective")] | ||
| 78 | + public int? IsEffective { get; set; } = 1; | ||
| 73 | } | 79 | } |
| 74 | } | 80 | } |
| 75 | \ No newline at end of file | 81 | \ No newline at end of file |
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_xh_pxmx/LqXhPxmxEntity.cs
| @@ -66,12 +66,6 @@ namespace NCC.Extend.Entitys.lq_xh_pxmx | @@ -66,12 +66,6 @@ namespace NCC.Extend.Entitys.lq_xh_pxmx | ||
| 66 | public int ProjectNumber { get; set; } | 66 | public int ProjectNumber { get; set; } |
| 67 | 67 | ||
| 68 | /// <summary> | 68 | /// <summary> |
| 69 | - /// 是否有效 | ||
| 70 | - /// </summary> | ||
| 71 | - [SugarColumn(ColumnName = "F_IsEnabled")] | ||
| 72 | - public int? IsEnabled { get; set; } | ||
| 73 | - | ||
| 74 | - /// <summary> | ||
| 75 | /// 来源类型 | 69 | /// 来源类型 |
| 76 | /// </summary> | 70 | /// </summary> |
| 77 | [SugarColumn(ColumnName = "F_SourceType")] | 71 | [SugarColumn(ColumnName = "F_SourceType")] |
| @@ -82,5 +76,11 @@ namespace NCC.Extend.Entitys.lq_xh_pxmx | @@ -82,5 +76,11 @@ namespace NCC.Extend.Entitys.lq_xh_pxmx | ||
| 82 | /// </summary> | 76 | /// </summary> |
| 83 | [SugarColumn(ColumnName = "F_TotalPrice")] | 77 | [SugarColumn(ColumnName = "F_TotalPrice")] |
| 84 | public decimal TotalPrice { get; set; } | 78 | public decimal TotalPrice { get; set; } |
| 79 | + | ||
| 80 | + /// <summary> | ||
| 81 | + /// 是否有效 | ||
| 82 | + /// </summary> | ||
| 83 | + [SugarColumn(ColumnName = "F_IsEffective")] | ||
| 84 | + public int? IsEffective { get; set; } = 1; | ||
| 85 | } | 85 | } |
| 86 | } | 86 | } |
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
| @@ -234,7 +234,7 @@ namespace NCC.Extend.LqKdKdjlb | @@ -234,7 +234,7 @@ namespace NCC.Extend.LqKdKdjlb | ||
| 234 | jksyj = it.Jksyj, | 234 | jksyj = it.Jksyj, |
| 235 | kjblsyj = it.Kjblsyj, | 235 | kjblsyj = it.Kjblsyj, |
| 236 | pxxx = it.Pxxx, | 236 | pxxx = it.Pxxx, |
| 237 | - F_FIleUrl = it.F_FIleUrl, | 237 | + IsEffective = it.IsEffective, |
| 238 | }) | 238 | }) |
| 239 | .MergeTable() | 239 | .MergeTable() |
| 240 | .OrderBy(sidx + " " + input.sort) | 240 | .OrderBy(sidx + " " + input.sort) |
netcore/src/Modularity/Extend/NCC.Extend/LqMdXdbhsjService.cs
| @@ -28,7 +28,7 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -28,7 +28,7 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 28 | /// <summary> | 28 | /// <summary> |
| 29 | /// 门店新店保护时间服务 | 29 | /// 门店新店保护时间服务 |
| 30 | /// </summary> | 30 | /// </summary> |
| 31 | - [ApiDescriptionSettings(Tag = "Extend", Name = "LqMdXdbhsj", Order = 201)] | 31 | + [ApiDescriptionSettings(Tag = "绿纤门店信息服务", Name = "LqMdXdbhsj", Order = 201)] |
| 32 | [Route("api/Extend/[controller]")] | 32 | [Route("api/Extend/[controller]")] |
| 33 | public class LqMdXdbhsjService : ILqMdXdbhsjService, IDynamicApiController, ITransient | 33 | public class LqMdXdbhsjService : ILqMdXdbhsjService, IDynamicApiController, ITransient |
| 34 | { | 34 | { |
| @@ -46,6 +46,7 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -46,6 +46,7 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 46 | _userManager = userManager; | 46 | _userManager = userManager; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | + #region 门店新店保护时间信息 | ||
| 49 | /// <summary> | 50 | /// <summary> |
| 50 | /// 获取门店新店保护时间信息 | 51 | /// 获取门店新店保护时间信息 |
| 51 | /// </summary> | 52 | /// </summary> |
| @@ -58,7 +59,9 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -58,7 +59,9 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 58 | var output = entity.Adapt<LqMdXdbhsjInfoOutput>(); | 59 | var output = entity.Adapt<LqMdXdbhsjInfoOutput>(); |
| 59 | return output; | 60 | return output; |
| 60 | } | 61 | } |
| 62 | + #endregion | ||
| 61 | 63 | ||
| 64 | + #region 门店新店保护时间列表 | ||
| 62 | /// <summary> | 65 | /// <summary> |
| 63 | /// 获取门店新店保护时间列表 | 66 | /// 获取门店新店保护时间列表 |
| 64 | /// </summary> | 67 | /// </summary> |
| @@ -88,7 +91,9 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -88,7 +91,9 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 88 | .ToPagedListAsync(input.currentPage, input.pageSize); | 91 | .ToPagedListAsync(input.currentPage, input.pageSize); |
| 89 | return PageResult<LqMdXdbhsjListOutput>.SqlSugarPageResult(data); | 92 | return PageResult<LqMdXdbhsjListOutput>.SqlSugarPageResult(data); |
| 90 | } | 93 | } |
| 94 | + #endregion | ||
| 91 | 95 | ||
| 96 | + #region 新建门店新店保护时间 | ||
| 92 | /// <summary> | 97 | /// <summary> |
| 93 | /// 新建门店新店保护时间 | 98 | /// 新建门店新店保护时间 |
| 94 | /// </summary> | 99 | /// </summary> |
| @@ -105,7 +110,7 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -105,7 +110,7 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 105 | // 验证时间逻辑 | 110 | // 验证时间逻辑 |
| 106 | if (entity.Bhkssj >= entity.Bhjssj) | 111 | if (entity.Bhkssj >= entity.Bhjssj) |
| 107 | { | 112 | { |
| 108 | - throw NCCException.Oh(ErrorCode.COM1000, "保护开始时间必须早于保护结束时间"); | 113 | + throw NCCException.Oh("保护开始时间必须早于保护结束时间"); |
| 109 | } | 114 | } |
| 110 | 115 | ||
| 111 | // 检查是否存在重叠的保护时间 | 116 | // 检查是否存在重叠的保护时间 |
| @@ -118,14 +123,16 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -118,14 +123,16 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 118 | 123 | ||
| 119 | if (exists) | 124 | if (exists) |
| 120 | { | 125 | { |
| 121 | - throw NCCException.Oh(ErrorCode.COM1000, "该门店在指定时间段内已存在保护时间设置"); | 126 | + throw NCCException.Oh("该门店在指定时间段内已存在保护时间设置"); |
| 122 | } | 127 | } |
| 123 | 128 | ||
| 124 | var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | 129 | var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); |
| 125 | if (!(isOk > 0)) | 130 | if (!(isOk > 0)) |
| 126 | throw NCCException.Oh(ErrorCode.COM1000); | 131 | throw NCCException.Oh(ErrorCode.COM1000); |
| 127 | } | 132 | } |
| 133 | + #endregion | ||
| 128 | 134 | ||
| 135 | + #region 更新门店新店保护时间 | ||
| 129 | /// <summary> | 136 | /// <summary> |
| 130 | /// 更新门店新店保护时间 | 137 | /// 更新门店新店保护时间 |
| 131 | /// </summary> | 138 | /// </summary> |
| @@ -161,7 +168,9 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -161,7 +168,9 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 161 | if (!(isOk > 0)) | 168 | if (!(isOk > 0)) |
| 162 | throw NCCException.Oh(ErrorCode.COM1001); | 169 | throw NCCException.Oh(ErrorCode.COM1001); |
| 163 | } | 170 | } |
| 171 | + #endregion | ||
| 164 | 172 | ||
| 173 | + #region 删除门店新店保护时间 | ||
| 165 | /// <summary> | 174 | /// <summary> |
| 166 | /// 删除门店新店保护时间 | 175 | /// 删除门店新店保护时间 |
| 167 | /// </summary> | 176 | /// </summary> |
| @@ -175,7 +184,9 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -175,7 +184,9 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 175 | if (!(isOk > 0)) | 184 | if (!(isOk > 0)) |
| 176 | throw NCCException.Oh(ErrorCode.COM1002); | 185 | throw NCCException.Oh(ErrorCode.COM1002); |
| 177 | } | 186 | } |
| 187 | + #endregion | ||
| 178 | 188 | ||
| 189 | + #region 获取门店新店保护时间下拉选择数据 | ||
| 179 | /// <summary> | 190 | /// <summary> |
| 180 | /// 获取门店新店保护时间下拉选择数据 | 191 | /// 获取门店新店保护时间下拉选择数据 |
| 181 | /// </summary> | 192 | /// </summary> |
| @@ -194,7 +205,9 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -194,7 +205,9 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 194 | .ToListAsync(); | 205 | .ToListAsync(); |
| 195 | return new { list = list }; | 206 | return new { list = list }; |
| 196 | } | 207 | } |
| 208 | + #endregion | ||
| 197 | 209 | ||
| 210 | + #region 根据门店ID获取当前有效的保护时间 | ||
| 198 | /// <summary> | 211 | /// <summary> |
| 199 | /// 根据门店ID获取当前有效的保护时间 | 212 | /// 根据门店ID获取当前有效的保护时间 |
| 200 | /// </summary> | 213 | /// </summary> |
| @@ -205,7 +218,6 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -205,7 +218,6 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 205 | { | 218 | { |
| 206 | var now = DateTime.Now; | 219 | var now = DateTime.Now; |
| 207 | var entity = await _db.Queryable<LqMdXdbhsjEntity>().Where(p => p.Mdid == mdid && p.Sfqy == 1).Where(p => p.Bhkssj <= now && p.Bhjssj >= now).FirstAsync(); | 220 | var entity = await _db.Queryable<LqMdXdbhsjEntity>().Where(p => p.Mdid == mdid && p.Sfqy == 1).Where(p => p.Bhkssj <= now && p.Bhjssj >= now).FirstAsync(); |
| 208 | - | ||
| 209 | if (entity == null) | 221 | if (entity == null) |
| 210 | { | 222 | { |
| 211 | return new { hasProtection = false, message = "该门店当前无保护时间设置" }; | 223 | return new { hasProtection = false, message = "该门店当前无保护时间设置" }; |
| @@ -214,5 +226,6 @@ namespace NCC.Extend.LqMdXdbhsj | @@ -214,5 +226,6 @@ namespace NCC.Extend.LqMdXdbhsj | ||
| 214 | var output = entity.Adapt<LqMdXdbhsjInfoOutput>(); | 226 | var output = entity.Adapt<LqMdXdbhsjInfoOutput>(); |
| 215 | return new { hasProtection = true, data = output }; | 227 | return new { hasProtection = true, data = output }; |
| 216 | } | 228 | } |
| 229 | + #endregion | ||
| 217 | } | 230 | } |
| 218 | } | 231 | } |
netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs
| @@ -28,7 +28,7 @@ namespace NCC.Extend.LqMdxx | @@ -28,7 +28,7 @@ namespace NCC.Extend.LqMdxx | ||
| 28 | /// <summary> | 28 | /// <summary> |
| 29 | /// 门店信息服务 | 29 | /// 门店信息服务 |
| 30 | /// </summary> | 30 | /// </summary> |
| 31 | - [ApiDescriptionSettings(Tag = "绿纤门店信息服务",Name = "LqMdxx", Order = 200)] | 31 | + [ApiDescriptionSettings(Tag = "绿纤门店信息服务", Name = "LqMdxx", Order = 200)] |
| 32 | [Route("api/Extend/[controller]")] | 32 | [Route("api/Extend/[controller]")] |
| 33 | public class LqMdxxService : ILqMdxxService, IDynamicApiController, ITransient | 33 | public class LqMdxxService : ILqMdxxService, IDynamicApiController, ITransient |
| 34 | { | 34 | { |
| @@ -39,15 +39,14 @@ namespace NCC.Extend.LqMdxx | @@ -39,15 +39,14 @@ namespace NCC.Extend.LqMdxx | ||
| 39 | /// <summary> | 39 | /// <summary> |
| 40 | /// 初始化一个<see cref="LqMdxxService"/>类型的新实例 | 40 | /// 初始化一个<see cref="LqMdxxService"/>类型的新实例 |
| 41 | /// </summary> | 41 | /// </summary> |
| 42 | - public LqMdxxService( | ||
| 43 | - ISqlSugarRepository<LqMdxxEntity> lqMdxxRepository, | ||
| 44 | - IUserManager userManager) | 42 | + public LqMdxxService(ISqlSugarRepository<LqMdxxEntity> lqMdxxRepository, IUserManager userManager) |
| 45 | { | 43 | { |
| 46 | - _lqMdxxRepository = lqMdxxRepository; | 44 | + _lqMdxxRepository = lqMdxxRepository; |
| 47 | _db = _lqMdxxRepository.Context; | 45 | _db = _lqMdxxRepository.Context; |
| 48 | _userManager = userManager; | 46 | _userManager = userManager; |
| 49 | } | 47 | } |
| 50 | 48 | ||
| 49 | + #region 门店信息 | ||
| 51 | /// <summary> | 50 | /// <summary> |
| 52 | /// 获取门店信息 | 51 | /// 获取门店信息 |
| 53 | /// </summary> | 52 | /// </summary> |
| @@ -60,12 +59,14 @@ namespace NCC.Extend.LqMdxx | @@ -60,12 +59,14 @@ namespace NCC.Extend.LqMdxx | ||
| 60 | var output = entity.Adapt<LqMdxxInfoOutput>(); | 59 | var output = entity.Adapt<LqMdxxInfoOutput>(); |
| 61 | return output; | 60 | return output; |
| 62 | } | 61 | } |
| 62 | + #endregion | ||
| 63 | 63 | ||
| 64 | + #region 门店信息列表 | ||
| 64 | /// <summary> | 65 | /// <summary> |
| 65 | - /// 获取门店信息列表 | ||
| 66 | - /// </summary> | ||
| 67 | - /// <param name="input">请求参数</param> | ||
| 68 | - /// <returns></returns> | 66 | + /// 获取门店信息列表 |
| 67 | + /// </summary> | ||
| 68 | + /// <param name="input">请求参数</param> | ||
| 69 | + /// <returns></returns> | ||
| 69 | [HttpGet("")] | 70 | [HttpGet("")] |
| 70 | public async Task<dynamic> GetList([FromQuery] LqMdxxListQueryInput input) | 71 | public async Task<dynamic> GetList([FromQuery] LqMdxxListQueryInput input) |
| 71 | { | 72 | { |
| @@ -90,37 +91,39 @@ namespace NCC.Extend.LqMdxx | @@ -90,37 +91,39 @@ namespace NCC.Extend.LqMdxx | ||
| 90 | .WhereIF(!string.IsNullOrEmpty(input.gsmc), p => p.Gsmc.Contains(input.gsmc)) | 91 | .WhereIF(!string.IsNullOrEmpty(input.gsmc), p => p.Gsmc.Contains(input.gsmc)) |
| 91 | .WhereIF(!string.IsNullOrEmpty(input.fr), p => p.Fr.Contains(input.fr)) | 92 | .WhereIF(!string.IsNullOrEmpty(input.fr), p => p.Fr.Contains(input.fr)) |
| 92 | .WhereIF(!string.IsNullOrEmpty(input.ywsb), p => p.Ywsb.Equals(input.ywsb)) | 93 | .WhereIF(!string.IsNullOrEmpty(input.ywsb), p => p.Ywsb.Equals(input.ywsb)) |
| 93 | - .Select(it=> new LqMdxxListOutput | 94 | + .Select(it => new LqMdxxListOutput |
| 94 | { | 95 | { |
| 95 | id = it.Id, | 96 | id = it.Id, |
| 96 | - mdbm=it.Mdbm, | ||
| 97 | - djmdbh=it.Djmdbh, | ||
| 98 | - djmd=it.Djmd, | ||
| 99 | - dm=it.Dm, | ||
| 100 | - cs=it.Cs, | ||
| 101 | - dz=it.Dz, | ||
| 102 | - xm=it.Xm, | ||
| 103 | - dhhm=it.Dhhm, | ||
| 104 | - zj=it.Zj, | ||
| 105 | - kysj=it.Kysj, | ||
| 106 | - zxzt=it.Zxzt, | ||
| 107 | - gsmc=it.Gsmc, | ||
| 108 | - fr=it.Fr, | ||
| 109 | - ywsb=it.Ywsb, | ||
| 110 | - jyb=it.Jyb, | ||
| 111 | - kjb=it.Kjb, | ||
| 112 | - dxmb=it.Dxmb, | ||
| 113 | - syb=it.Syb, | ||
| 114 | - xsyj=it.Xsyj, | ||
| 115 | - xhyj=it.Xhyj, | ||
| 116 | - xms=it.Xms, | ||
| 117 | - rt1=it.Rt1, | ||
| 118 | - rt2=it.Rt2, | ||
| 119 | - rc=it.Rc, | ||
| 120 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | ||
| 121 | - return PageResult<LqMdxxListOutput>.SqlSugarPageResult(data); | 97 | + mdbm = it.Mdbm, |
| 98 | + djmdbh = it.Djmdbh, | ||
| 99 | + djmd = it.Djmd, | ||
| 100 | + dm = it.Dm, | ||
| 101 | + cs = it.Cs, | ||
| 102 | + dz = it.Dz, | ||
| 103 | + xm = it.Xm, | ||
| 104 | + dhhm = it.Dhhm, | ||
| 105 | + zj = it.Zj, | ||
| 106 | + kysj = it.Kysj, | ||
| 107 | + zxzt = it.Zxzt, | ||
| 108 | + gsmc = it.Gsmc, | ||
| 109 | + fr = it.Fr, | ||
| 110 | + ywsb = it.Ywsb, | ||
| 111 | + jyb = it.Jyb, | ||
| 112 | + kjb = it.Kjb, | ||
| 113 | + dxmb = it.Dxmb, | ||
| 114 | + syb = it.Syb, | ||
| 115 | + xsyj = it.Xsyj, | ||
| 116 | + xhyj = it.Xhyj, | ||
| 117 | + xms = it.Xms, | ||
| 118 | + rt1 = it.Rt1, | ||
| 119 | + rt2 = it.Rt2, | ||
| 120 | + rc = it.Rc, | ||
| 121 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); | ||
| 122 | + return PageResult<LqMdxxListOutput>.SqlSugarPageResult(data); | ||
| 122 | } | 123 | } |
| 124 | + #endregion | ||
| 123 | 125 | ||
| 126 | + #region 新建门店信息 | ||
| 124 | /// <summary> | 127 | /// <summary> |
| 125 | /// 新建门店信息 | 128 | /// 新建门店信息 |
| 126 | /// </summary> | 129 | /// </summary> |
| @@ -135,7 +138,9 @@ namespace NCC.Extend.LqMdxx | @@ -135,7 +138,9 @@ namespace NCC.Extend.LqMdxx | ||
| 135 | var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); | 138 | var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); |
| 136 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); | 139 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); |
| 137 | } | 140 | } |
| 141 | + #endregion | ||
| 138 | 142 | ||
| 143 | + #region 获取门店信息无分页列表 | ||
| 139 | /// <summary> | 144 | /// <summary> |
| 140 | /// 获取门店信息无分页列表 | 145 | /// 获取门店信息无分页列表 |
| 141 | /// </summary> | 146 | /// </summary> |
| @@ -165,27 +170,29 @@ namespace NCC.Extend.LqMdxx | @@ -165,27 +170,29 @@ namespace NCC.Extend.LqMdxx | ||
| 165 | .WhereIF(!string.IsNullOrEmpty(input.gsmc), p => p.Gsmc.Contains(input.gsmc)) | 170 | .WhereIF(!string.IsNullOrEmpty(input.gsmc), p => p.Gsmc.Contains(input.gsmc)) |
| 166 | .WhereIF(!string.IsNullOrEmpty(input.fr), p => p.Fr.Contains(input.fr)) | 171 | .WhereIF(!string.IsNullOrEmpty(input.fr), p => p.Fr.Contains(input.fr)) |
| 167 | .WhereIF(!string.IsNullOrEmpty(input.ywsb), p => p.Ywsb.Equals(input.ywsb)) | 172 | .WhereIF(!string.IsNullOrEmpty(input.ywsb), p => p.Ywsb.Equals(input.ywsb)) |
| 168 | - .Select(it=> new LqMdxxListOutput | 173 | + .Select(it => new LqMdxxListOutput |
| 169 | { | 174 | { |
| 170 | id = it.Id, | 175 | id = it.Id, |
| 171 | - mdbm=it.Mdbm, | ||
| 172 | - djmdbh=it.Djmdbh, | ||
| 173 | - djmd=it.Djmd, | ||
| 174 | - dm=it.Dm, | ||
| 175 | - cs=it.Cs, | ||
| 176 | - dz=it.Dz, | ||
| 177 | - xm=it.Xm, | ||
| 178 | - dhhm=it.Dhhm, | ||
| 179 | - zj=it.Zj, | ||
| 180 | - kysj=it.Kysj, | ||
| 181 | - zxzt=it.Zxzt, | ||
| 182 | - gsmc=it.Gsmc, | ||
| 183 | - fr=it.Fr, | ||
| 184 | - ywsb=it.Ywsb, | ||
| 185 | - }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); | ||
| 186 | - return data; | 176 | + mdbm = it.Mdbm, |
| 177 | + djmdbh = it.Djmdbh, | ||
| 178 | + djmd = it.Djmd, | ||
| 179 | + dm = it.Dm, | ||
| 180 | + cs = it.Cs, | ||
| 181 | + dz = it.Dz, | ||
| 182 | + xm = it.Xm, | ||
| 183 | + dhhm = it.Dhhm, | ||
| 184 | + zj = it.Zj, | ||
| 185 | + kysj = it.Kysj, | ||
| 186 | + zxzt = it.Zxzt, | ||
| 187 | + gsmc = it.Gsmc, | ||
| 188 | + fr = it.Fr, | ||
| 189 | + ywsb = it.Ywsb, | ||
| 190 | + }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync(); | ||
| 191 | + return data; | ||
| 187 | } | 192 | } |
| 193 | + #endregion | ||
| 188 | 194 | ||
| 195 | + #region 导出门店信息 | ||
| 189 | /// <summary> | 196 | /// <summary> |
| 190 | /// 导出门店信息 | 197 | /// 导出门店信息 |
| 191 | /// </summary> | 198 | /// </summary> |
| @@ -205,7 +212,7 @@ namespace NCC.Extend.LqMdxx | @@ -205,7 +212,7 @@ namespace NCC.Extend.LqMdxx | ||
| 205 | { | 212 | { |
| 206 | exportData = await this.GetNoPagingList(input); | 213 | exportData = await this.GetNoPagingList(input); |
| 207 | } | 214 | } |
| 208 | - List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"门店编码\",\"field\":\"mdbm\"},{\"value\":\"单据门店编号\",\"field\":\"djmdbh\"},{\"value\":\"单据门店\",\"field\":\"djmd\"},{\"value\":\"店名\",\"field\":\"dm\"},{\"value\":\"城市\",\"field\":\"cs\"},{\"value\":\"地址\",\"field\":\"dz\"},{\"value\":\"姓名\",\"field\":\"xm\"},{\"value\":\"电话号码\",\"field\":\"dhhm\"},{\"value\":\"座机\",\"field\":\"zj\"},{\"value\":\"开业时间\",\"field\":\"kysj\"},{\"value\":\"最新状态\",\"field\":\"zxzt\"},{\"value\":\"工商名称\",\"field\":\"gsmc\"},{\"value\":\"法人\",\"field\":\"fr\"},{\"value\":\"有无社保\",\"field\":\"ywsb\"},]".ToList<ParamsModel>(); | 215 | + List<ParamsModel> paramList = "[{\"value\":\"主键\",\"field\":\"id\"},{\"value\":\"门店编码\",\"field\":\"mdbm\"},{\"value\":\"单据门店编号\",\"field\":\"djmdbh\"},{\"value\":\"单据门店\",\"field\":\"djmd\"},{\"value\":\"店名\",\"field\":\"dm\"},{\"value\":\"城市\",\"field\":\"cs\"},{\"value\":\"地址\",\"field\":\"dz\"},{\"value\":\"姓名\",\"field\":\"xm\"},{\"value\":\"电话号码\",\"field\":\"dhhm\"},{\"value\":\"座机\",\"field\":\"zj\"},{\"value\":\"开业时间\",\"field\":\"kysj\"},{\"value\":\"最新状态\",\"field\":\"zxzt\"},{\"value\":\"工商名称\",\"field\":\"gsmc\"},{\"value\":\"法人\",\"field\":\"fr\"},{\"value\":\"有无社保\",\"field\":\"ywsb\"},]".ToList<ParamsModel>(); |
| 209 | ExcelConfig excelconfig = new ExcelConfig(); | 216 | ExcelConfig excelconfig = new ExcelConfig(); |
| 210 | excelconfig.FileName = "门店信息.xls"; | 217 | excelconfig.FileName = "门店信息.xls"; |
| 211 | excelconfig.HeadFont = "微软雅黑"; | 218 | excelconfig.HeadFont = "微软雅黑"; |
| @@ -231,7 +238,9 @@ namespace NCC.Extend.LqMdxx | @@ -231,7 +238,9 @@ namespace NCC.Extend.LqMdxx | ||
| 231 | }; | 238 | }; |
| 232 | return output; | 239 | return output; |
| 233 | } | 240 | } |
| 241 | + #endregion | ||
| 234 | 242 | ||
| 243 | + #region 批量删除门店信息 | ||
| 235 | /// <summary> | 244 | /// <summary> |
| 236 | /// 批量删除门店信息 | 245 | /// 批量删除门店信息 |
| 237 | /// </summary> | 246 | /// </summary> |
| @@ -248,7 +257,7 @@ namespace NCC.Extend.LqMdxx | @@ -248,7 +257,7 @@ namespace NCC.Extend.LqMdxx | ||
| 248 | //开启事务 | 257 | //开启事务 |
| 249 | _db.BeginTran(); | 258 | _db.BeginTran(); |
| 250 | //批量删除门店信息 | 259 | //批量删除门店信息 |
| 251 | - await _db.Deleteable<LqMdxxEntity>().In(d => d.Id,ids).ExecuteCommandAsync(); | 260 | + await _db.Deleteable<LqMdxxEntity>().In(d => d.Id, ids).ExecuteCommandAsync(); |
| 252 | //关闭事务 | 261 | //关闭事务 |
| 253 | _db.CommitTran(); | 262 | _db.CommitTran(); |
| 254 | } | 263 | } |
| @@ -260,7 +269,9 @@ namespace NCC.Extend.LqMdxx | @@ -260,7 +269,9 @@ namespace NCC.Extend.LqMdxx | ||
| 260 | } | 269 | } |
| 261 | } | 270 | } |
| 262 | } | 271 | } |
| 272 | + #endregion | ||
| 263 | 273 | ||
| 274 | + #region 更新门店信息 | ||
| 264 | /// <summary> | 275 | /// <summary> |
| 265 | /// 更新门店信息 | 276 | /// 更新门店信息 |
| 266 | /// </summary> | 277 | /// </summary> |
| @@ -275,7 +286,9 @@ namespace NCC.Extend.LqMdxx | @@ -275,7 +286,9 @@ namespace NCC.Extend.LqMdxx | ||
| 275 | var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); | 286 | var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| 276 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | 287 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); |
| 277 | } | 288 | } |
| 289 | + #endregion | ||
| 278 | 290 | ||
| 291 | + #region 更新门店目标字段 | ||
| 279 | /// <summary> | 292 | /// <summary> |
| 280 | /// 更新门店目标字段 | 293 | /// 更新门店目标字段 |
| 281 | /// </summary> | 294 | /// </summary> |
| @@ -286,8 +299,8 @@ namespace NCC.Extend.LqMdxx | @@ -286,8 +299,8 @@ namespace NCC.Extend.LqMdxx | ||
| 286 | public async Task UpdateTargets(string id, [FromBody] LqMdxxTargetUpdateInput input) | 299 | public async Task UpdateTargets(string id, [FromBody] LqMdxxTargetUpdateInput input) |
| 287 | { | 300 | { |
| 288 | var isOk = await _db.Updateable<LqMdxxEntity>() | 301 | var isOk = await _db.Updateable<LqMdxxEntity>() |
| 289 | - .SetColumns(it => new LqMdxxEntity | ||
| 290 | - { | 302 | + .SetColumns(it => new LqMdxxEntity |
| 303 | + { | ||
| 291 | Xsyj = input.xsyj, | 304 | Xsyj = input.xsyj, |
| 292 | Xhyj = input.xhyj, | 305 | Xhyj = input.xhyj, |
| 293 | Xms = input.xms, | 306 | Xms = input.xms, |
| @@ -299,7 +312,9 @@ namespace NCC.Extend.LqMdxx | @@ -299,7 +312,9 @@ namespace NCC.Extend.LqMdxx | ||
| 299 | .ExecuteCommandAsync(); | 312 | .ExecuteCommandAsync(); |
| 300 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); | 313 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); |
| 301 | } | 314 | } |
| 315 | + #endregion | ||
| 302 | 316 | ||
| 317 | + #region 删除门店信息 | ||
| 303 | /// <summary> | 318 | /// <summary> |
| 304 | /// 删除门店信息 | 319 | /// 删除门店信息 |
| 305 | /// </summary> | 320 | /// </summary> |
| @@ -312,7 +327,9 @@ namespace NCC.Extend.LqMdxx | @@ -312,7 +327,9 @@ namespace NCC.Extend.LqMdxx | ||
| 312 | var isOk = await _db.Deleteable<LqMdxxEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); | 327 | var isOk = await _db.Deleteable<LqMdxxEntity>().Where(d => d.Id == id).ExecuteCommandAsync(); |
| 313 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); | 328 | if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); |
| 314 | } | 329 | } |
| 330 | + #endregion | ||
| 315 | 331 | ||
| 332 | + #region 获取门店下拉选择数据 | ||
| 316 | /// <summary> | 333 | /// <summary> |
| 317 | /// 获取门店下拉选择数据 | 334 | /// 获取门店下拉选择数据 |
| 318 | /// </summary> | 335 | /// </summary> |
| @@ -325,6 +342,6 @@ namespace NCC.Extend.LqMdxx | @@ -325,6 +342,6 @@ namespace NCC.Extend.LqMdxx | ||
| 325 | .ToListAsync(); | 342 | .ToListAsync(); |
| 326 | return new { list = list }; | 343 | return new { list = list }; |
| 327 | } | 344 | } |
| 328 | - | 345 | + #endregion |
| 329 | } | 346 | } |
| 330 | } | 347 | } |
netcore/src/Modularity/Extend/NCC.Extend/LqStatisticsService.cs
| @@ -13,7 +13,10 @@ using NCC.Dependency; | @@ -13,7 +13,10 @@ using NCC.Dependency; | ||
| 13 | using NCC.DynamicApiController; | 13 | using NCC.DynamicApiController; |
| 14 | using NCC.Extend.Entitys.Dto.LqMdxx; | 14 | using NCC.Extend.Entitys.Dto.LqMdxx; |
| 15 | using NCC.Extend.Entitys.Dto.LqStatistics; | 15 | using NCC.Extend.Entitys.Dto.LqStatistics; |
| 16 | +using NCC.Extend.Entitys.Dto.LqStatistics.DepartmentInfo; | ||
| 17 | +using NCC.Extend.Entitys.Dto.LqStatisticsStoreConsumePerformance; | ||
| 16 | using NCC.Extend.Entitys.Dto.LqStatisticsTechPerformance; | 18 | using NCC.Extend.Entitys.Dto.LqStatisticsTechPerformance; |
| 19 | +using NCC.Extend.Entitys.Dto.LqStatisticsDepartmentConsumePerformance; | ||
| 17 | using NCC.Extend.Entitys.Dto.LqYcsdJsj; | 20 | using NCC.Extend.Entitys.Dto.LqYcsdJsj; |
| 18 | using NCC.Extend.Entitys.lq_hytk_kjbsyj; | 21 | using NCC.Extend.Entitys.lq_hytk_kjbsyj; |
| 19 | using NCC.Extend.Entitys.lq_jinsanjiao_user; | 22 | using NCC.Extend.Entitys.lq_jinsanjiao_user; |
| @@ -26,7 +29,9 @@ using NCC.Extend.Entitys.lq_ycsd_jsj; | @@ -26,7 +29,9 @@ using NCC.Extend.Entitys.lq_ycsd_jsj; | ||
| 26 | using NCC.Extend.Entitys.lq_yjmxb; | 29 | using NCC.Extend.Entitys.lq_yjmxb; |
| 27 | using NCC.Extend.Entitys.lq_statistics_gold_triangle; | 30 | using NCC.Extend.Entitys.lq_statistics_gold_triangle; |
| 28 | using NCC.Extend.Entitys.lq_statistics_personal_performance; | 31 | using NCC.Extend.Entitys.lq_statistics_personal_performance; |
| 32 | +using NCC.Extend.Entitys.lq_statistics_store_consume_performance; | ||
| 29 | using NCC.Extend.Entitys.lq_statistics_tech_performance; | 33 | using NCC.Extend.Entitys.lq_statistics_tech_performance; |
| 34 | +using NCC.Extend.Entitys.lq_statistics_department_consume_performance; | ||
| 30 | using NCC.Extend.Entitys.lq_xmzl; | 35 | using NCC.Extend.Entitys.lq_xmzl; |
| 31 | using NCC.Extend.Entitys.Dto.LqStatisticsPersonalPerformance; | 36 | using NCC.Extend.Entitys.Dto.LqStatisticsPersonalPerformance; |
| 32 | using NCC.Extend.Entitys.v_tech_teacher_flow; | 37 | using NCC.Extend.Entitys.v_tech_teacher_flow; |
| @@ -1882,26 +1887,386 @@ namespace NCC.Extend.LqStatistics | @@ -1882,26 +1887,386 @@ namespace NCC.Extend.LqStatistics | ||
| 1882 | 1887 | ||
| 1883 | #endregion | 1888 | #endregion |
| 1884 | 1889 | ||
| 1890 | + #region 门店耗卡业绩统计 | ||
| 1891 | + | ||
| 1892 | + /// <summary> | ||
| 1893 | + /// 【4】保存门店耗卡业绩统计数据 | ||
| 1894 | + /// </summary> | ||
| 1895 | + /// <remarks> | ||
| 1896 | + /// 统计指定月份各门店的耗卡业绩数据,包括消耗业绩、消耗数量、手工费 | ||
| 1897 | + /// | ||
| 1898 | + /// 示例请求: | ||
| 1899 | + /// ```json | ||
| 1900 | + /// { | ||
| 1901 | + /// "statisticsMonth": "202501" | ||
| 1902 | + /// } | ||
| 1903 | + /// ``` | ||
| 1904 | + /// | ||
| 1905 | + /// 参数说明: | ||
| 1906 | + /// - statisticsMonth: 统计月份,格式为YYYYMM | ||
| 1907 | + /// </remarks> | ||
| 1908 | + /// <param name="input">统计月份输入参数</param> | ||
| 1909 | + /// <returns>保存结果</returns> | ||
| 1910 | + /// <response code="200">成功保存统计数据</response> | ||
| 1911 | + /// <response code="400">参数错误</response> | ||
| 1912 | + /// <response code="500">服务器错误</response> | ||
| 1913 | + [HttpPost("save-store-consume-performance-stats")] | ||
| 1914 | + public async Task<dynamic> SaveStoreConsumePerformanceStatistics([FromBody] SalaryStatisticsInput input) | ||
| 1915 | + { | ||
| 1916 | + if (input == null || string.IsNullOrEmpty(input.StatisticsMonth) || input.StatisticsMonth.Length != 6) | ||
| 1917 | + { | ||
| 1918 | + throw NCCException.Oh("统计月份格式错误,请使用YYYYMM格式"); | ||
| 1919 | + } | ||
| 1920 | + | ||
| 1921 | + var statisticsMonth = input.StatisticsMonth; | ||
| 1922 | + | ||
| 1923 | + try | ||
| 1924 | + { | ||
| 1925 | + _logger.LogInformation($"开始统计门店耗卡业绩数据,月份:{statisticsMonth}"); | ||
| 1926 | + | ||
| 1927 | + // 使用数据库聚合方式,直接在数据库中完成所有统计计算 | ||
| 1928 | + var sql = @" | ||
| 1929 | + SELECT | ||
| 1930 | + hyhk.md AS StoreId, | ||
| 1931 | + mdxx.mdbm AS StoreCode, | ||
| 1932 | + hyhk.mdmc AS StoreName, | ||
| 1933 | + @statisticsMonth AS StatisticsMonth, | ||
| 1934 | + COALESCE(SUM(pxmx.F_TotalPrice), 0) AS ConsumePerformance, | ||
| 1935 | + COALESCE(SUM(pxmx.F_ProjectNumber), 0) AS ConsumeQuantity, | ||
| 1936 | + COALESCE(SUM(hyhk.sgfy), 0) AS ManualFee | ||
| 1937 | + FROM lq_xh_hyhk hyhk | ||
| 1938 | + LEFT JOIN lq_xh_pxmx pxmx ON hyhk.F_Id = pxmx.F_ConsumeInfoId AND pxmx.F_IsEffective = 1 | ||
| 1939 | + LEFT JOIN lq_mdxx mdxx ON hyhk.md = mdxx.F_Id | ||
| 1940 | + WHERE hyhk.F_IsEffective = 1 | ||
| 1941 | + AND DATE_FORMAT(hyhk.hksj, '%Y%m') = @statisticsMonth | ||
| 1942 | + GROUP BY hyhk.md, hyhk.mdmc, mdxx.mdbm | ||
| 1943 | + HAVING ConsumePerformance > 0 OR ConsumeQuantity > 0 OR ManualFee > 0 | ||
| 1944 | + ORDER BY ConsumePerformance DESC"; | ||
| 1945 | + | ||
| 1946 | + // 执行SQL查询 | ||
| 1947 | + var statisticsData = await _db.Ado.SqlQueryAsync<dynamic>(sql, new { statisticsMonth }); | ||
| 1948 | + | ||
| 1949 | + if (!statisticsData.Any()) | ||
| 1950 | + { | ||
| 1951 | + return new | ||
| 1952 | + { | ||
| 1953 | + Success = true, | ||
| 1954 | + Message = $"未找到 {statisticsMonth} 月份的门店耗卡业绩统计数据", | ||
| 1955 | + SavedCount = 0 | ||
| 1956 | + }; | ||
| 1957 | + } | ||
| 1958 | + | ||
| 1959 | + // 转换为实体对象 | ||
| 1960 | + var entities = statisticsData.Select(data => new LqStatisticsStoreConsumePerformanceEntity | ||
| 1961 | + { | ||
| 1962 | + Id = YitIdHelper.NextId().ToString(), | ||
| 1963 | + StoreId = data.StoreId?.ToString() ?? "", | ||
| 1964 | + StoreCode = data.StoreCode?.ToString() ?? "", | ||
| 1965 | + StoreName = data.StoreName?.ToString() ?? "", | ||
| 1966 | + StatisticsMonth = data.StatisticsMonth?.ToString() ?? statisticsMonth, | ||
| 1967 | + ConsumePerformance = Convert.ToDecimal(data.ConsumePerformance ?? 0), | ||
| 1968 | + ConsumeQuantity = Convert.ToDecimal(data.ConsumeQuantity ?? 0), | ||
| 1969 | + ManualFee = Convert.ToDecimal(data.ManualFee ?? 0), | ||
| 1970 | + CreateTime = DateTime.Now, | ||
| 1971 | + UpdateTime = DateTime.Now | ||
| 1972 | + }).ToList(); | ||
| 1973 | + | ||
| 1974 | + // 使用事务确保数据一致性 | ||
| 1975 | + var result = await _db.Ado.UseTranAsync(async () => | ||
| 1976 | + { | ||
| 1977 | + // 先删除该月份的历史数据 | ||
| 1978 | + await _db.Deleteable<LqStatisticsStoreConsumePerformanceEntity>() | ||
| 1979 | + .Where(x => x.StatisticsMonth == statisticsMonth) | ||
| 1980 | + .ExecuteCommandAsync(); | ||
| 1981 | + | ||
| 1982 | + // 批量插入新数据 | ||
| 1983 | + return await _db.Insertable(entities).ExecuteCommandAsync(); | ||
| 1984 | + }); | ||
| 1985 | + | ||
| 1986 | + var savedCount = result.IsSuccess ? result.Data : 0; | ||
| 1987 | + _logger.LogInformation($"成功保存门店耗卡业绩统计数据 - 月份: {statisticsMonth}, 记录数: {savedCount}"); | ||
| 1988 | + | ||
| 1989 | + return new | ||
| 1990 | + { | ||
| 1991 | + Success = true, | ||
| 1992 | + Message = $"成功保存 {savedCount} 条门店耗卡业绩统计数据", | ||
| 1993 | + SavedCount = savedCount, | ||
| 1994 | + StatisticsMonth = statisticsMonth | ||
| 1995 | + }; | ||
| 1996 | + } | ||
| 1997 | + catch (Exception ex) | ||
| 1998 | + { | ||
| 1999 | + _logger.LogError(ex, $"保存门店耗卡业绩统计数据失败 - 月份: {statisticsMonth}"); | ||
| 2000 | + throw NCCException.Oh($"保存门店耗卡业绩统计数据失败: {ex.Message}"); | ||
| 2001 | + } | ||
| 2002 | + } | ||
| 2003 | + | ||
| 2004 | + /// <summary> | ||
| 2005 | + /// 查询门店耗卡业绩统计数据 | ||
| 2006 | + /// </summary> | ||
| 2007 | + /// <remarks> | ||
| 2008 | + /// 分页查询门店耗卡业绩统计数据,支持按门店、月份等条件筛选 | ||
| 2009 | + /// | ||
| 2010 | + /// 示例请求: | ||
| 2011 | + /// ``` | ||
| 2012 | + /// GET /api/Extend/LqStatistics/get-store-consume-performance-stats?currentPage=1&pageSize=10&statisticsMonth=202501 | ||
| 2013 | + /// ``` | ||
| 2014 | + /// | ||
| 2015 | + /// 参数说明: | ||
| 2016 | + /// - currentPage: 当前页码 | ||
| 2017 | + /// - pageSize: 每页大小 | ||
| 2018 | + /// - statisticsMonth: 统计月份筛选 | ||
| 2019 | + /// - storeId: 门店ID筛选 | ||
| 2020 | + /// - storeName: 门店名称筛选 | ||
| 2021 | + /// </remarks> | ||
| 2022 | + /// <param name="input">查询参数</param> | ||
| 2023 | + /// <returns>分页的门店耗卡业绩统计数据</returns> | ||
| 2024 | + /// <response code="200">成功返回统计数据</response> | ||
| 2025 | + /// <response code="400">参数错误</response> | ||
| 2026 | + /// <response code="500">服务器错误</response> | ||
| 2027 | + [HttpGet("get-store-consume-performance-stats")] | ||
| 2028 | + public async Task<SqlSugarPagedList<LqStatisticsStoreConsumePerformanceEntity>> GetStoreConsumePerformanceStatistics([FromQuery] LqStatisticsStoreConsumePerformanceListQueryInput input) | ||
| 2029 | + { | ||
| 2030 | + try | ||
| 2031 | + { | ||
| 2032 | + var query = _db.Queryable<LqStatisticsStoreConsumePerformanceEntity>() | ||
| 2033 | + .WhereIF(!string.IsNullOrEmpty(input.storeId), x => x.StoreId.Contains(input.storeId)) | ||
| 2034 | + .WhereIF(!string.IsNullOrEmpty(input.storeCode), x => x.StoreCode.Contains(input.storeCode)) | ||
| 2035 | + .WhereIF(!string.IsNullOrEmpty(input.storeName), x => x.StoreName.Contains(input.storeName)) | ||
| 2036 | + .WhereIF(!string.IsNullOrEmpty(input.statisticsMonth), x => x.StatisticsMonth == input.statisticsMonth) | ||
| 2037 | + .WhereIF(!string.IsNullOrEmpty(input.startMonth), x => string.Compare(x.StatisticsMonth, input.startMonth) >= 0) | ||
| 2038 | + .WhereIF(!string.IsNullOrEmpty(input.endMonth), x => string.Compare(x.StatisticsMonth, input.endMonth) <= 0) | ||
| 2039 | + .OrderBy(x => x.StatisticsMonth, OrderByType.Desc) | ||
| 2040 | + .OrderBy(x => x.StoreName, OrderByType.Asc); | ||
| 2041 | + | ||
| 2042 | + var result = await query.ToPagedListAsync(input.currentPage, input.pageSize); | ||
| 2043 | + return result; | ||
| 2044 | + } | ||
| 2045 | + catch (Exception ex) | ||
| 2046 | + { | ||
| 2047 | + _logger.LogError(ex, "查询门店耗卡业绩统计数据失败"); | ||
| 2048 | + throw NCCException.Oh($"查询门店耗卡业绩统计数据失败: {ex.Message}"); | ||
| 2049 | + } | ||
| 2050 | + } | ||
| 2051 | + | ||
| 2052 | + #endregion | ||
| 2053 | + | ||
| 2054 | + #region 个人消耗业绩统计 | ||
| 2055 | + | ||
| 2056 | + /// <summary> | ||
| 2057 | + /// 【5】保存个人消耗业绩统计数据 | ||
| 2058 | + /// </summary> | ||
| 2059 | + /// <remarks> | ||
| 2060 | + /// 统计健康师和科技部老师的消耗业绩数据 | ||
| 2061 | + /// | ||
| 2062 | + /// 示例请求: | ||
| 2063 | + /// ```json | ||
| 2064 | + /// { | ||
| 2065 | + /// "statisticsMonth": "202501" | ||
| 2066 | + /// } | ||
| 2067 | + /// ``` | ||
| 2068 | + /// | ||
| 2069 | + /// 参数说明: | ||
| 2070 | + /// - statisticsMonth: 统计月份(YYYYMM格式) | ||
| 2071 | + /// </remarks> | ||
| 2072 | + /// <param name="input">统计输入参数</param> | ||
| 2073 | + /// <returns>保存结果</returns> | ||
| 2074 | + /// <response code="200">成功保存个人消耗业绩统计数据</response> | ||
| 2075 | + /// <response code="400">参数错误</response> | ||
| 2076 | + /// <response code="500">服务器错误</response> | ||
| 2077 | + [HttpPost("save-department-consume-performance-stats")] | ||
| 2078 | + public async Task<dynamic> SaveDepartmentConsumePerformanceStatistics([FromBody] SalaryStatisticsInput input) | ||
| 2079 | + { | ||
| 2080 | + try | ||
| 2081 | + { | ||
| 2082 | + if (input == null || string.IsNullOrEmpty(input.StatisticsMonth) || input.StatisticsMonth.Length != 6) | ||
| 2083 | + { | ||
| 2084 | + throw NCCException.Oh("统计月份格式错误,请使用YYYYMM格式"); | ||
| 2085 | + } | ||
| 2086 | + | ||
| 2087 | + var statisticsMonth = input.StatisticsMonth; | ||
| 2088 | + var allStatisticsData = new List<LqStatisticsDepartmentConsumePerformanceEntity>(); | ||
| 2089 | + | ||
| 2090 | + // 1. 统计健康师消耗业绩 | ||
| 2091 | + var healthCoachSql = @" | ||
| 2092 | + SELECT | ||
| 2093 | + '健康师' as F_DepartmentType, | ||
| 2094 | + jksyj.jkszh as F_UserId, | ||
| 2095 | + jksyj.jkszh as F_UserCode, | ||
| 2096 | + jksyj.jksxm as F_UserName, | ||
| 2097 | + hyhk.md as F_StoreId, | ||
| 2098 | + md.mdbm as F_StoreCode, | ||
| 2099 | + md.dm as F_StoreName, | ||
| 2100 | + @statisticsMonth as F_StatisticsMonth, | ||
| 2101 | + COALESCE(SUM(jksyj.jksyj), 0) as F_ConsumePerformance, | ||
| 2102 | + COALESCE(SUM(jksyj.F_kdpxNumber), 0) as F_ConsumeQuantity, | ||
| 2103 | + COALESCE(SUM(jksyj.F_LaborCost), 0) as F_ManualFee | ||
| 2104 | + FROM lq_xh_jksyj jksyj | ||
| 2105 | + INNER JOIN lq_xh_hyhk hyhk ON jksyj.glkdbh = hyhk.F_Id AND hyhk.F_IsEffective = 1 | ||
| 2106 | + LEFT JOIN lq_mdxx md ON hyhk.md = md.F_Id | ||
| 2107 | + WHERE jksyj.F_IsEffective = 1 | ||
| 2108 | + AND DATE_FORMAT(hyhk.hksj, '%Y%m') = @statisticsMonth | ||
| 2109 | + GROUP BY jksyj.jkszh, jksyj.jksxm, hyhk.md, md.mdbm, md.dm"; | ||
| 2110 | + | ||
| 2111 | + var healthCoachData = await _db.Ado.SqlQueryAsync<dynamic>(healthCoachSql, new { statisticsMonth }); | ||
| 2112 | + foreach (var item in healthCoachData) | ||
| 2113 | + { | ||
| 2114 | + allStatisticsData.Add(new LqStatisticsDepartmentConsumePerformanceEntity | ||
| 2115 | + { | ||
| 2116 | + Id = YitIdHelper.NextId().ToString(), | ||
| 2117 | + DepartmentType = item.F_DepartmentType?.ToString(), | ||
| 2118 | + UserId = item.F_UserId?.ToString(), | ||
| 2119 | + UserCode = item.F_UserCode?.ToString(), | ||
| 2120 | + UserName = item.F_UserName?.ToString(), | ||
| 2121 | + StoreId = item.F_StoreId?.ToString(), | ||
| 2122 | + StoreCode = item.F_StoreCode?.ToString(), | ||
| 2123 | + StoreName = item.F_StoreName?.ToString(), | ||
| 2124 | + StatisticsMonth = statisticsMonth, | ||
| 2125 | + ConsumePerformance = Convert.ToDecimal(item.F_ConsumePerformance ?? 0), | ||
| 2126 | + ConsumeQuantity = Convert.ToDecimal(item.F_ConsumeQuantity ?? 0), | ||
| 2127 | + ManualFee = Convert.ToDecimal(item.F_ManualFee ?? 0), | ||
| 2128 | + CreateTime = DateTime.Now | ||
| 2129 | + }); | ||
| 2130 | + } | ||
| 2131 | + | ||
| 2132 | + // 2. 统计科技部老师消耗业绩 | ||
| 2133 | + var techTeacherSql = @" | ||
| 2134 | + SELECT | ||
| 2135 | + '科技部老师' as F_DepartmentType, | ||
| 2136 | + kjbsyj.kjblszh as F_UserId, | ||
| 2137 | + kjbsyj.kjblszh as F_UserCode, | ||
| 2138 | + kjbsyj.kjblsxm as F_UserName, | ||
| 2139 | + hyhk.md as F_StoreId, | ||
| 2140 | + md.mdbm as F_StoreCode, | ||
| 2141 | + md.dm as F_StoreName, | ||
| 2142 | + @statisticsMonth as F_StatisticsMonth, | ||
| 2143 | + COALESCE(SUM(kjbsyj.kjblsyj), 0) as F_ConsumePerformance, | ||
| 2144 | + COALESCE(SUM(kjbsyj.F_hdpxNumber), 0) as F_ConsumeQuantity, | ||
| 2145 | + COALESCE(SUM(kjbsyj.F_LaborCost), 0) as F_ManualFee | ||
| 2146 | + FROM lq_xh_kjbsyj kjbsyj | ||
| 2147 | + INNER JOIN lq_xh_hyhk hyhk ON kjbsyj.glkdbh = hyhk.F_Id AND hyhk.F_IsEffective = 1 | ||
| 2148 | + LEFT JOIN lq_mdxx md ON hyhk.md = md.F_Id | ||
| 2149 | + WHERE kjbsyj.F_IsEffective = 1 | ||
| 2150 | + AND DATE_FORMAT(hyhk.hksj, '%Y%m') = @statisticsMonth | ||
| 2151 | + GROUP BY kjbsyj.kjblszh, kjbsyj.kjblsxm, hyhk.md, md.mdbm, md.dm"; | ||
| 2152 | + | ||
| 2153 | + var techTeacherData = await _db.Ado.SqlQueryAsync<dynamic>(techTeacherSql, new { statisticsMonth }); | ||
| 2154 | + foreach (var item in techTeacherData) | ||
| 2155 | + { | ||
| 2156 | + allStatisticsData.Add(new LqStatisticsDepartmentConsumePerformanceEntity | ||
| 2157 | + { | ||
| 2158 | + Id = YitIdHelper.NextId().ToString(), | ||
| 2159 | + DepartmentType = item.F_DepartmentType?.ToString(), | ||
| 2160 | + UserId = item.F_UserId?.ToString(), | ||
| 2161 | + UserCode = item.F_UserCode?.ToString(), | ||
| 2162 | + UserName = item.F_UserName?.ToString(), | ||
| 2163 | + StoreId = item.F_StoreId?.ToString(), | ||
| 2164 | + StoreCode = item.F_StoreCode?.ToString(), | ||
| 2165 | + StoreName = item.F_StoreName?.ToString(), | ||
| 2166 | + StatisticsMonth = statisticsMonth, | ||
| 2167 | + ConsumePerformance = Convert.ToDecimal(item.F_ConsumePerformance ?? 0), | ||
| 2168 | + ConsumeQuantity = Convert.ToDecimal(item.F_ConsumeQuantity ?? 0), | ||
| 2169 | + ManualFee = Convert.ToDecimal(item.F_ManualFee ?? 0), | ||
| 2170 | + CreateTime = DateTime.Now | ||
| 2171 | + }); | ||
| 2172 | + } | ||
| 2173 | + | ||
| 2174 | + // 3. 使用事务保存数据 | ||
| 2175 | + var result = await _db.Ado.UseTranAsync(async () => | ||
| 2176 | + { | ||
| 2177 | + // 删除当月已存在的数据 | ||
| 2178 | + await _db.Deleteable<LqStatisticsDepartmentConsumePerformanceEntity>() | ||
| 2179 | + .Where(x => x.StatisticsMonth == statisticsMonth) | ||
| 2180 | + .ExecuteCommandAsync(); | ||
| 2181 | + | ||
| 2182 | + // 批量插入新数据 | ||
| 2183 | + if (allStatisticsData.Any()) | ||
| 2184 | + { | ||
| 2185 | + await _db.Insertable(allStatisticsData).ExecuteCommandAsync(); | ||
| 2186 | + } | ||
| 2187 | + | ||
| 2188 | + return allStatisticsData.Count; | ||
| 2189 | + }); | ||
| 2190 | + | ||
| 2191 | + var savedCount = result.IsSuccess ? result.Data : 0; | ||
| 2192 | + | ||
| 2193 | + return new | ||
| 2194 | + { | ||
| 2195 | + Success = true, | ||
| 2196 | + Message = $"成功保存 {savedCount} 条个人消耗业绩统计数据", | ||
| 2197 | + SavedCount = savedCount, | ||
| 2198 | + StatisticsMonth = statisticsMonth | ||
| 2199 | + }; | ||
| 2200 | + } | ||
| 2201 | + catch (Exception ex) | ||
| 2202 | + { | ||
| 2203 | + _logger.LogError(ex, "保存个人消耗业绩统计数据失败"); | ||
| 2204 | + throw NCCException.Oh($"保存个人消耗业绩统计数据失败: {ex.Message}"); | ||
| 2205 | + } | ||
| 2206 | + } | ||
| 2207 | + | ||
| 1885 | /// <summary> | 2208 | /// <summary> |
| 1886 | - /// 部门信息 | 2209 | + /// 查询个人消耗业绩统计数据 |
| 1887 | /// </summary> | 2210 | /// </summary> |
| 1888 | - public class DepartmentInfo | 2211 | + /// <remarks> |
| 2212 | + /// 支持按部门类型、用户、门店、月份等条件查询个人消耗业绩统计数据 | ||
| 2213 | + /// | ||
| 2214 | + /// 示例请求: | ||
| 2215 | + /// ``` | ||
| 2216 | + /// GET /api/Extend/LqStatistics/get-department-consume-performance-stats?departmentType=健康师&statisticsMonth=202501&currentPage=1&pageSize=10 | ||
| 2217 | + /// ``` | ||
| 2218 | + /// | ||
| 2219 | + /// 参数说明: | ||
| 2220 | + /// - departmentType: 部门类型(健康师, 科技部老师) | ||
| 2221 | + /// - userId: 用户ID | ||
| 2222 | + /// - userCode: 用户账号 | ||
| 2223 | + /// - userName: 用户姓名 | ||
| 2224 | + /// - storeId: 门店ID | ||
| 2225 | + /// - storeCode: 门店编码 | ||
| 2226 | + /// - storeName: 门店名称 | ||
| 2227 | + /// - statisticsMonth: 统计月份(YYYYMM格式) | ||
| 2228 | + /// - startMonth: 开始月份(YYYYMM格式) | ||
| 2229 | + /// - endMonth: 结束月份(YYYYMM格式) | ||
| 2230 | + /// - currentPage: 当前页码 | ||
| 2231 | + /// - pageSize: 每页大小 | ||
| 2232 | + /// </remarks> | ||
| 2233 | + /// <param name="input">查询参数</param> | ||
| 2234 | + /// <returns>分页查询结果</returns> | ||
| 2235 | + /// <response code="200">查询成功</response> | ||
| 2236 | + /// <response code="400">参数错误</response> | ||
| 2237 | + /// <response code="500">服务器错误</response> | ||
| 2238 | + [HttpGet("get-department-consume-performance-stats")] | ||
| 2239 | + public async Task<SqlSugarPagedList<LqStatisticsDepartmentConsumePerformanceEntity>> GetDepartmentConsumePerformanceStatistics([FromQuery] LqStatisticsDepartmentConsumePerformanceListQueryInput input) | ||
| 1889 | { | 2240 | { |
| 1890 | - /// <summary> | ||
| 1891 | - /// 部门ID | ||
| 1892 | - /// </summary> | ||
| 1893 | - public string DepartmentId { get; set; } | ||
| 1894 | - | ||
| 1895 | - /// <summary> | ||
| 1896 | - /// 部门名称 | ||
| 1897 | - /// </summary> | ||
| 1898 | - public string DepartmentName { get; set; } | ||
| 1899 | - | ||
| 1900 | - /// <summary> | ||
| 1901 | - /// 父部门ID | ||
| 1902 | - /// </summary> | ||
| 1903 | - public string ParentId { get; set; } | 2241 | + try |
| 2242 | + { | ||
| 2243 | + var query = _db.Queryable<LqStatisticsDepartmentConsumePerformanceEntity>() | ||
| 2244 | + .WhereIF(!string.IsNullOrEmpty(input.DepartmentType), x => x.DepartmentType.Contains(input.DepartmentType)) | ||
| 2245 | + .WhereIF(!string.IsNullOrEmpty(input.UserId), x => x.UserId.Contains(input.UserId)) | ||
| 2246 | + .WhereIF(!string.IsNullOrEmpty(input.UserCode), x => x.UserCode.Contains(input.UserCode)) | ||
| 2247 | + .WhereIF(!string.IsNullOrEmpty(input.UserName), x => x.UserName.Contains(input.UserName)) | ||
| 2248 | + .WhereIF(!string.IsNullOrEmpty(input.StoreId), x => x.StoreId.Contains(input.StoreId)) | ||
| 2249 | + .WhereIF(!string.IsNullOrEmpty(input.StoreCode), x => x.StoreCode.Contains(input.StoreCode)) | ||
| 2250 | + .WhereIF(!string.IsNullOrEmpty(input.StoreName), x => x.StoreName.Contains(input.StoreName)) | ||
| 2251 | + .WhereIF(!string.IsNullOrEmpty(input.StatisticsMonth), x => x.StatisticsMonth == input.StatisticsMonth) | ||
| 2252 | + .WhereIF(!string.IsNullOrEmpty(input.StartMonth), x => string.Compare(x.StatisticsMonth, input.StartMonth) >= 0) | ||
| 2253 | + .WhereIF(!string.IsNullOrEmpty(input.EndMonth), x => string.Compare(x.StatisticsMonth, input.EndMonth) <= 0) | ||
| 2254 | + .OrderBy(x => x.StatisticsMonth, OrderByType.Desc) | ||
| 2255 | + .OrderBy(x => x.DepartmentType, OrderByType.Asc) | ||
| 2256 | + .OrderBy(x => x.UserName, OrderByType.Asc); | ||
| 2257 | + | ||
| 2258 | + var result = await query.ToPagedListAsync(input.currentPage, input.pageSize); | ||
| 2259 | + return result; | ||
| 2260 | + } | ||
| 2261 | + catch (Exception ex) | ||
| 2262 | + { | ||
| 2263 | + _logger.LogError(ex, "查询个人消耗业绩统计数据失败"); | ||
| 2264 | + throw NCCException.Oh($"查询个人消耗业绩统计数据失败: {ex.Message}"); | ||
| 2265 | + } | ||
| 1904 | } | 2266 | } |
| 1905 | 2267 | ||
| 2268 | + #endregion | ||
| 2269 | + | ||
| 2270 | + | ||
| 1906 | } | 2271 | } |
| 1907 | } | 2272 | } |
netcore/src/Modularity/Extend/NCC.Extend/LqXhHyhkService.cs
| @@ -128,9 +128,9 @@ namespace NCC.Extend.LqXhHyhk | @@ -128,9 +128,9 @@ namespace NCC.Extend.LqXhHyhk | ||
| 128 | memberId = pxmx.MemberId, | 128 | memberId = pxmx.MemberId, |
| 129 | createTime = pxmx.CreateTIme, | 129 | createTime = pxmx.CreateTIme, |
| 130 | projectNumber = pxmx.ProjectNumber, | 130 | projectNumber = pxmx.ProjectNumber, |
| 131 | - isEnabled = pxmx.IsEnabled, | ||
| 132 | sourceType = pxmx.SourceType, | 131 | sourceType = pxmx.SourceType, |
| 133 | totalPrice = pxmx.TotalPrice, | 132 | totalPrice = pxmx.TotalPrice, |
| 133 | + isEffective = pxmx.IsEffective, | ||
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | // 关联该品项的健康师业绩 | 136 | // 关联该品项的健康师业绩 |
| @@ -183,8 +183,9 @@ namespace NCC.Extend.LqXhHyhk | @@ -183,8 +183,9 @@ namespace NCC.Extend.LqXhHyhk | ||
| 183 | .WhereIF(!string.IsNullOrEmpty(input.hyzh), p => p.Hyzh.Contains(input.hyzh)) | 183 | .WhereIF(!string.IsNullOrEmpty(input.hyzh), p => p.Hyzh.Contains(input.hyzh)) |
| 184 | .WhereIF(!string.IsNullOrEmpty(input.hymc), p => p.Hymc.Contains(input.hymc)) | 184 | .WhereIF(!string.IsNullOrEmpty(input.hymc), p => p.Hymc.Contains(input.hymc)) |
| 185 | .WhereIF(!string.IsNullOrEmpty(input.gklx), p => p.Gklx.Equals(input.gklx)) | 185 | .WhereIF(!string.IsNullOrEmpty(input.gklx), p => p.Gklx.Equals(input.gklx)) |
| 186 | - .WhereIF(!string.IsNullOrEmpty(input.xfje), p => p.Xfje.Contains(input.xfje)) | ||
| 187 | - .WhereIF(!string.IsNullOrEmpty(input.sgfy), p => p.Sgfy.Contains(input.sgfy)) | 186 | + // 注意:xfje 和 sgfy 现在是 decimal 类型,不支持字符串模糊查询 |
| 187 | + // .WhereIF(!string.IsNullOrEmpty(input.xfje), p => SqlFunc.ToString(p.Xfje).Contains(input.xfje)) | ||
| 188 | + // .WhereIF(!string.IsNullOrEmpty(input.sgfy), p => SqlFunc.ToString(p.Sgfy).Contains(input.sgfy)) | ||
| 188 | .WhereIF(!string.IsNullOrEmpty(input.sfykjb), p => p.Sfykjb.Equals(input.sfykjb)) | 189 | .WhereIF(!string.IsNullOrEmpty(input.sfykjb), p => p.Sfykjb.Equals(input.sfykjb)) |
| 189 | .WhereIF(queryHksj != null, p => p.Hksj >= new DateTime(startHksj.ToDate().Year, startHksj.ToDate().Month, startHksj.ToDate().Day, 0, 0, 0)) | 190 | .WhereIF(queryHksj != null, p => p.Hksj >= new DateTime(startHksj.ToDate().Year, startHksj.ToDate().Month, startHksj.ToDate().Day, 0, 0, 0)) |
| 190 | .WhereIF(queryHksj != null, p => p.Hksj <= new DateTime(endHksj.ToDate().Year, endHksj.ToDate().Month, endHksj.ToDate().Day, 23, 59, 59)) | 191 | .WhereIF(queryHksj != null, p => p.Hksj <= new DateTime(endHksj.ToDate().Year, endHksj.ToDate().Month, endHksj.ToDate().Day, 23, 59, 59)) |
| @@ -199,8 +200,8 @@ namespace NCC.Extend.LqXhHyhk | @@ -199,8 +200,8 @@ namespace NCC.Extend.LqXhHyhk | ||
| 199 | hyzh = it.Hyzh, | 200 | hyzh = it.Hyzh, |
| 200 | hymc = it.Hymc, | 201 | hymc = it.Hymc, |
| 201 | gklx = it.Gklx, | 202 | gklx = it.Gklx, |
| 202 | - xfje = it.Xfje, | ||
| 203 | - sgfy = it.Sgfy, | 203 | + xfje = SqlFunc.ToString(it.Xfje), |
| 204 | + sgfy = SqlFunc.ToString(it.Sgfy), | ||
| 204 | sfykjb = it.Sfykjb, | 205 | sfykjb = it.Sfykjb, |
| 205 | hksj = it.Hksj, | 206 | hksj = it.Hksj, |
| 206 | czry = it.Czry, | 207 | czry = it.Czry, |
| @@ -285,7 +286,6 @@ namespace NCC.Extend.LqXhHyhk | @@ -285,7 +286,6 @@ namespace NCC.Extend.LqXhHyhk | ||
| 285 | BillingItemId = item.billingItemId, | 286 | BillingItemId = item.billingItemId, |
| 286 | CreateTIme = DateTime.Now, | 287 | CreateTIme = DateTime.Now, |
| 287 | MemberId = entity.Hy, | 288 | MemberId = entity.Hy, |
| 288 | - IsEnabled = 0, | ||
| 289 | ProjectNumber = item.projectNumber ?? 1, | 289 | ProjectNumber = item.projectNumber ?? 1, |
| 290 | TotalPrice = (decimal)(item.pxjg * (item.projectNumber ?? 1)), | 290 | TotalPrice = (decimal)(item.pxjg * (item.projectNumber ?? 1)), |
| 291 | Px = item.px, | 291 | Px = item.px, |
| @@ -346,7 +346,18 @@ namespace NCC.Extend.LqXhHyhk | @@ -346,7 +346,18 @@ namespace NCC.Extend.LqXhHyhk | ||
| 346 | // 批量插入品项明细 | 346 | // 批量插入品项明细 |
| 347 | if (allPxmxEntities.Any()) | 347 | if (allPxmxEntities.Any()) |
| 348 | { | 348 | { |
| 349 | - await _db.Insertable(allPxmxEntities).ExecuteCommandAsync(); | 349 | + // 分别处理插入和更新 |
| 350 | + var existingEntities = allPxmxEntities.Where(e => !string.IsNullOrEmpty(e.Id)).ToList(); | ||
| 351 | + var newEntities = allPxmxEntities.Where(e => string.IsNullOrEmpty(e.Id)).ToList(); | ||
| 352 | + | ||
| 353 | + if (existingEntities.Any()) | ||
| 354 | + { | ||
| 355 | + await _db.Updateable(existingEntities).ExecuteCommandAsync(); | ||
| 356 | + } | ||
| 357 | + if (newEntities.Any()) | ||
| 358 | + { | ||
| 359 | + await _db.Insertable(newEntities).ExecuteCommandAsync(); | ||
| 360 | + } | ||
| 350 | } | 361 | } |
| 351 | // 批量插入健康师业绩 | 362 | // 批量插入健康师业绩 |
| 352 | if (allJksyjEntities.Any()) | 363 | if (allJksyjEntities.Any()) |
| @@ -394,8 +405,6 @@ namespace NCC.Extend.LqXhHyhk | @@ -394,8 +405,6 @@ namespace NCC.Extend.LqXhHyhk | ||
| 394 | .WhereIF(!string.IsNullOrEmpty(input.hyzh), p => p.Hyzh.Contains(input.hyzh)) | 405 | .WhereIF(!string.IsNullOrEmpty(input.hyzh), p => p.Hyzh.Contains(input.hyzh)) |
| 395 | .WhereIF(!string.IsNullOrEmpty(input.hymc), p => p.Hymc.Contains(input.hymc)) | 406 | .WhereIF(!string.IsNullOrEmpty(input.hymc), p => p.Hymc.Contains(input.hymc)) |
| 396 | .WhereIF(!string.IsNullOrEmpty(input.gklx), p => p.Gklx.Equals(input.gklx)) | 407 | .WhereIF(!string.IsNullOrEmpty(input.gklx), p => p.Gklx.Equals(input.gklx)) |
| 397 | - .WhereIF(!string.IsNullOrEmpty(input.xfje), p => p.Xfje.Contains(input.xfje)) | ||
| 398 | - .WhereIF(!string.IsNullOrEmpty(input.sgfy), p => p.Sgfy.Contains(input.sgfy)) | ||
| 399 | .WhereIF(!string.IsNullOrEmpty(input.sfykjb), p => p.Sfykjb.Equals(input.sfykjb)) | 408 | .WhereIF(!string.IsNullOrEmpty(input.sfykjb), p => p.Sfykjb.Equals(input.sfykjb)) |
| 400 | .WhereIF(queryHksj != null, p => p.Hksj >= new DateTime(startHksj.ToDate().Year, startHksj.ToDate().Month, startHksj.ToDate().Day, 0, 0, 0)) | 409 | .WhereIF(queryHksj != null, p => p.Hksj >= new DateTime(startHksj.ToDate().Year, startHksj.ToDate().Month, startHksj.ToDate().Day, 0, 0, 0)) |
| 401 | .WhereIF(queryHksj != null, p => p.Hksj <= new DateTime(endHksj.ToDate().Year, endHksj.ToDate().Month, endHksj.ToDate().Day, 23, 59, 59)) | 410 | .WhereIF(queryHksj != null, p => p.Hksj <= new DateTime(endHksj.ToDate().Year, endHksj.ToDate().Month, endHksj.ToDate().Day, 23, 59, 59)) |
| @@ -410,8 +419,8 @@ namespace NCC.Extend.LqXhHyhk | @@ -410,8 +419,8 @@ namespace NCC.Extend.LqXhHyhk | ||
| 410 | hyzh = it.Hyzh, | 419 | hyzh = it.Hyzh, |
| 411 | hymc = it.Hymc, | 420 | hymc = it.Hymc, |
| 412 | gklx = it.Gklx, | 421 | gklx = it.Gklx, |
| 413 | - xfje = it.Xfje, | ||
| 414 | - sgfy = it.Sgfy, | 422 | + xfje = SqlFunc.ToString(it.Xfje), |
| 423 | + sgfy = SqlFunc.ToString(it.Sgfy), | ||
| 415 | sfykjb = it.Sfykjb, | 424 | sfykjb = it.Sfykjb, |
| 416 | hksj = it.Hksj, | 425 | hksj = it.Hksj, |
| 417 | czry = it.Czry, | 426 | czry = it.Czry, |
| @@ -510,7 +519,7 @@ namespace NCC.Extend.LqXhHyhk | @@ -510,7 +519,7 @@ namespace NCC.Extend.LqXhHyhk | ||
| 510 | 519 | ||
| 511 | #region 更新会员耗卡 | 520 | #region 更新会员耗卡 |
| 512 | /// <summary> | 521 | /// <summary> |
| 513 | - /// 更新会员耗卡 | 522 | + /// 更新会员耗卡,不会删除品项明细,只会更新或新增 |
| 514 | /// </summary> | 523 | /// </summary> |
| 515 | /// <param name="id">主键</param> | 524 | /// <param name="id">主键</param> |
| 516 | /// <param name="input">参数</param> | 525 | /// <param name="input">参数</param> |
| @@ -531,8 +540,8 @@ namespace NCC.Extend.LqXhHyhk | @@ -531,8 +540,8 @@ namespace NCC.Extend.LqXhHyhk | ||
| 531 | await _db.Deleteable<LqXhJksyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); | 540 | await _db.Deleteable<LqXhJksyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); |
| 532 | await _db.Deleteable<LqXhKjbsyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); | 541 | await _db.Deleteable<LqXhKjbsyjEntity>().Where(u => u.Glkdbh == id).ExecuteCommandAsync(); |
| 533 | 542 | ||
| 534 | - //清空原有数据 | ||
| 535 | - await _db.Deleteable<LqXhPxmxEntity>().Where(u => u.ConsumeInfoId == id).ExecuteCommandAsync(); | 543 | + // 注意:品项明细表不做删除操作,只更新或新增 |
| 544 | + // await _db.Deleteable<LqXhPxmxEntity>().Where(u => u.ConsumeInfoId == id).ExecuteCommandAsync(); | ||
| 536 | 545 | ||
| 537 | // 收集所有需要插入的实体,然后批量插入 | 546 | // 收集所有需要插入的实体,然后批量插入 |
| 538 | var allPxmxEntities = new List<LqXhPxmxEntity>(); | 547 | var allPxmxEntities = new List<LqXhPxmxEntity>(); |
| @@ -544,22 +553,43 @@ namespace NCC.Extend.LqXhHyhk | @@ -544,22 +553,43 @@ namespace NCC.Extend.LqXhHyhk | ||
| 544 | { | 553 | { |
| 545 | foreach (var item in input.lqXhPxmxList) | 554 | foreach (var item in input.lqXhPxmxList) |
| 546 | { | 555 | { |
| 547 | - // 创建品项明细实体 | ||
| 548 | - var lqXhPxmxEntity = new LqXhPxmxEntity | 556 | + // 检查品项明细是否已存在 |
| 557 | + var existingPxmx = await _db.Queryable<LqXhPxmxEntity>() | ||
| 558 | + .Where(p => p.Id == item.id) | ||
| 559 | + .FirstAsync(); | ||
| 560 | + | ||
| 561 | + LqXhPxmxEntity lqXhPxmxEntity; | ||
| 562 | + if (existingPxmx != null) | ||
| 549 | { | 563 | { |
| 550 | - Id = YitIdHelper.NextId().ToString(), | ||
| 551 | - ConsumeInfoId = entity.Id, | ||
| 552 | - BillingItemId = item.billingItemId, | ||
| 553 | - CreateTIme = DateTime.Now, | ||
| 554 | - MemberId = entity.Hy, | ||
| 555 | - IsEnabled = 0, | ||
| 556 | - ProjectNumber = item.projectNumber ?? 1, | ||
| 557 | - TotalPrice = (decimal)(item.pxjg * (item.projectNumber ?? 1)), | ||
| 558 | - Px = item.px, | ||
| 559 | - Pxmc = item.pxmc, | ||
| 560 | - Pxjg = item.pxjg, | ||
| 561 | - SourceType = item.sourceType, | ||
| 562 | - }; | 564 | + // 更新现有记录 |
| 565 | + lqXhPxmxEntity = existingPxmx; | ||
| 566 | + // 注意:LqXhPxmxEntity 没有 UpdateTime 字段 | ||
| 567 | + lqXhPxmxEntity.MemberId = entity.Hy; | ||
| 568 | + lqXhPxmxEntity.ProjectNumber = item.projectNumber ?? 1; | ||
| 569 | + lqXhPxmxEntity.TotalPrice = (decimal)(item.pxjg * (item.projectNumber ?? 1)); | ||
| 570 | + lqXhPxmxEntity.Px = item.px; | ||
| 571 | + lqXhPxmxEntity.Pxmc = item.pxmc; | ||
| 572 | + lqXhPxmxEntity.Pxjg = item.pxjg; | ||
| 573 | + lqXhPxmxEntity.SourceType = item.sourceType; | ||
| 574 | + } | ||
| 575 | + else | ||
| 576 | + { | ||
| 577 | + // 创建新记录 | ||
| 578 | + lqXhPxmxEntity = new LqXhPxmxEntity | ||
| 579 | + { | ||
| 580 | + Id = YitIdHelper.NextId().ToString(), | ||
| 581 | + ConsumeInfoId = entity.Id, | ||
| 582 | + BillingItemId = item.billingItemId, | ||
| 583 | + CreateTIme = DateTime.Now, | ||
| 584 | + MemberId = entity.Hy, | ||
| 585 | + ProjectNumber = item.projectNumber ?? 1, | ||
| 586 | + TotalPrice = (decimal)(item.pxjg * (item.projectNumber ?? 1)), | ||
| 587 | + Px = item.px, | ||
| 588 | + Pxmc = item.pxmc, | ||
| 589 | + Pxjg = item.pxjg, | ||
| 590 | + SourceType = item.sourceType, | ||
| 591 | + }; | ||
| 592 | + } | ||
| 563 | allPxmxEntities.Add(lqXhPxmxEntity); | 593 | allPxmxEntities.Add(lqXhPxmxEntity); |
| 564 | 594 | ||
| 565 | // 收集该品项关联的健康师业绩 | 595 | // 收集该品项关联的健康师业绩 |
| @@ -614,7 +644,18 @@ namespace NCC.Extend.LqXhHyhk | @@ -614,7 +644,18 @@ namespace NCC.Extend.LqXhHyhk | ||
| 614 | // 批量插入品项明细 | 644 | // 批量插入品项明细 |
| 615 | if (allPxmxEntities.Any()) | 645 | if (allPxmxEntities.Any()) |
| 616 | { | 646 | { |
| 617 | - await _db.Insertable(allPxmxEntities).ExecuteCommandAsync(); | 647 | + // 分别处理插入和更新 |
| 648 | + var existingEntities = allPxmxEntities.Where(e => !string.IsNullOrEmpty(e.Id)).ToList(); | ||
| 649 | + var newEntities = allPxmxEntities.Where(e => string.IsNullOrEmpty(e.Id)).ToList(); | ||
| 650 | + | ||
| 651 | + if (existingEntities.Any()) | ||
| 652 | + { | ||
| 653 | + await _db.Updateable(existingEntities).ExecuteCommandAsync(); | ||
| 654 | + } | ||
| 655 | + if (newEntities.Any()) | ||
| 656 | + { | ||
| 657 | + await _db.Insertable(newEntities).ExecuteCommandAsync(); | ||
| 658 | + } | ||
| 618 | } | 659 | } |
| 619 | // 批量插入健康师业绩 | 660 | // 批量插入健康师业绩 |
| 620 | if (allJksyjEntities.Any()) | 661 | if (allJksyjEntities.Any()) |