Commit b08c534018a96b5179bda70b8907df75a55d5231
Merge branch 'master' of http://39.98.150.180/antissoft/lvqianmeiye_ERP
Showing
4 changed files
with
17 additions
and
35 deletions
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
| @@ -122,10 +122,15 @@ namespace NCC.Extend.LqKdKdjlb | @@ -122,10 +122,15 @@ namespace NCC.Extend.LqKdKdjlb | ||
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | var output = entity.Adapt<LqKdKdjlbInfoOutput>(); | 124 | var output = entity.Adapt<LqKdKdjlbInfoOutput>(); |
| 125 | + if (output.activityId != null) | ||
| 126 | + { | ||
| 127 | + output.activityName = await _db.Queryable<LqPackageInfoEntity>().Where(x => x.Id == entity.ActivityId).Select(x => x.ActivityName).FirstAsync(); | ||
| 128 | + } | ||
| 125 | //获取会员信息 | 129 | //获取会员信息 |
| 126 | var MemberInfo = await _db.Queryable<LqKhxxEntity>().FirstAsync(p => p.Id == entity.Kdhy); | 130 | var MemberInfo = await _db.Queryable<LqKhxxEntity>().FirstAsync(p => p.Id == entity.Kdhy); |
| 127 | output.kdhyc = MemberInfo.Khmc; | 131 | output.kdhyc = MemberInfo.Khmc; |
| 128 | output.kdhysjh = MemberInfo.Sjh; | 132 | output.kdhysjh = MemberInfo.Sjh; |
| 133 | + | ||
| 129 | if (!string.IsNullOrEmpty(entity.ActivityId)) | 134 | if (!string.IsNullOrEmpty(entity.ActivityId)) |
| 130 | { | 135 | { |
| 131 | output.activityName = await _db.Queryable<LqPackageInfoEntity>().Where(x => x.Id == entity.ActivityId).Select(x => x.ActivityName).FirstAsync(); | 136 | output.activityName = await _db.Queryable<LqPackageInfoEntity>().Where(x => x.Id == entity.ActivityId).Select(x => x.ActivityName).FirstAsync(); |
| @@ -2081,10 +2086,7 @@ namespace NCC.Extend.LqKdKdjlb | @@ -2081,10 +2086,7 @@ namespace NCC.Extend.LqKdKdjlb | ||
| 2081 | 2086 | ||
| 2082 | // 查询开单记录 | 2087 | // 查询开单记录 |
| 2083 | var billingRecords = await _db.Queryable<LqKdKdjlbEntity>() | 2088 | var billingRecords = await _db.Queryable<LqKdKdjlbEntity>() |
| 2084 | - .Where(w => w.Djmd == input.StoreId | ||
| 2085 | - && w.Kdrq >= input.StartTime | ||
| 2086 | - && w.Kdrq <= input.EndTime | ||
| 2087 | - && w.IsEffective == StatusEnum.有效.GetHashCode()) | 2089 | + .Where(w => w.Djmd == input.StoreId && w.Kdrq >= input.StartTime && w.Kdrq <= input.EndTime && w.IsEffective == StatusEnum.有效.GetHashCode()) |
| 2088 | .Select(it => new | 2090 | .Select(it => new |
| 2089 | { | 2091 | { |
| 2090 | id = it.Id, | 2092 | id = it.Id, |
| @@ -2095,8 +2097,8 @@ namespace NCC.Extend.LqKdKdjlb | @@ -2095,8 +2097,8 @@ namespace NCC.Extend.LqKdKdjlb | ||
| 2095 | zdyj = it.Zdyj, | 2097 | zdyj = it.Zdyj, |
| 2096 | sfyj = it.Sfyj, | 2098 | sfyj = it.Sfyj, |
| 2097 | qk = it.Qk, | 2099 | qk = it.Qk, |
| 2098 | - kdhyc = it.Kdhyc, | ||
| 2099 | - kdhysjh = it.Kdhysjh, | 2100 | + kdhyc = SqlFunc.Subqueryable<LqKhxxEntity>().Where(x => x.Id == it.Kdhy).Select(x => x.Khmc), |
| 2101 | + kdhysjh = SqlFunc.Subqueryable<LqKhxxEntity>().Where(x => x.Id == it.Kdhy).Select(x => x.Sjh), | ||
| 2100 | fkfs = it.Fkfs, // 付款方式 | 2102 | fkfs = it.Fkfs, // 付款方式 |
| 2101 | khly = it.Khly, // 客户来源 | 2103 | khly = it.Khly, // 客户来源 |
| 2102 | bz = it.Bz, // 备注 | 2104 | bz = it.Bz, // 备注 |
netcore/src/Modularity/Extend/NCC.Extend/LqTkjlbService.cs
| @@ -820,7 +820,7 @@ namespace NCC.Extend.LqTkjlb | @@ -820,7 +820,7 @@ namespace NCC.Extend.LqTkjlb | ||
| 820 | -- 邀约信息 | 820 | -- 邀约信息 |
| 821 | yaoy.F_Id as yaoy_id, -- 邀约ID | 821 | yaoy.F_Id as yaoy_id, -- 邀约ID |
| 822 | yaoy.F_CreateTime as yaoy_time, -- 邀约时间 | 822 | yaoy.F_CreateTime as yaoy_time, -- 邀约时间 |
| 823 | - yaoy.F_Status as yaoy_status, -- 邀约状态 | 823 | + yaoy.yysj as yaoy_appointment_time, -- 邀约时间 |
| 824 | -- 预约信息 | 824 | -- 预约信息 |
| 825 | yy.F_Id as yy_id, -- 预约ID | 825 | yy.F_Id as yy_id, -- 预约ID |
| 826 | yy.F_Status as yy_status, -- 预约状态 | 826 | yy.F_Status as yy_status, -- 预约状态 |
| @@ -862,10 +862,10 @@ namespace NCC.Extend.LqTkjlb | @@ -862,10 +862,10 @@ namespace NCC.Extend.LqTkjlb | ||
| 862 | LEFT JOIN ( | 862 | LEFT JOIN ( |
| 863 | SELECT | 863 | SELECT |
| 864 | hy as member_id, | 864 | hy as member_id, |
| 865 | - SUM(xfje) as total_consume_amount, | 865 | + SUM(COALESCE(xfje, 0)) as total_consume_amount, |
| 866 | COUNT(*) as consume_count, | 866 | COUNT(*) as consume_count, |
| 867 | - MIN(F_CreateTime) as first_consume_time, | ||
| 868 | - MAX(F_CreateTime) as last_consume_time | 867 | + MIN(hksj) as first_consume_time, |
| 868 | + MAX(hksj) as last_consume_time | ||
| 869 | FROM lq_xh_hyhk | 869 | FROM lq_xh_hyhk |
| 870 | WHERE F_IsEffective = 1 | 870 | WHERE F_IsEffective = 1 |
| 871 | GROUP BY hy | 871 | GROUP BY hy |
| @@ -873,11 +873,11 @@ namespace NCC.Extend.LqTkjlb | @@ -873,11 +873,11 @@ namespace NCC.Extend.LqTkjlb | ||
| 873 | LEFT JOIN ( | 873 | LEFT JOIN ( |
| 874 | SELECT | 874 | SELECT |
| 875 | kdhy as member_id, | 875 | kdhy as member_id, |
| 876 | - SUM(sfyj) as total_billing_amount, | ||
| 877 | - SUM(qk) as total_debt_amount, | 876 | + SUM(COALESCE(sfyj, 0)) as total_billing_amount, |
| 877 | + SUM(COALESCE(qk, 0)) as total_debt_amount, | ||
| 878 | COUNT(*) as billing_count, | 878 | COUNT(*) as billing_count, |
| 879 | - MIN(F_CreateTime) as first_billing_time, | ||
| 880 | - MAX(F_CreateTime) as last_billing_time | 879 | + MIN(kdrq) as first_billing_time, |
| 880 | + MAX(kdrq) as last_billing_time | ||
| 881 | FROM lq_kd_kdjlb | 881 | FROM lq_kd_kdjlb |
| 882 | WHERE F_IsEffective = 1 | 882 | WHERE F_IsEffective = 1 |
| 883 | GROUP BY kdhy | 883 | GROUP BY kdhy |
netcore/src/Modularity/Extend/NCC.Extend/Utils/LqKdKdjlbStringGenerator.cs
| @@ -51,6 +51,7 @@ namespace NCC.Extend.Utils | @@ -51,6 +51,7 @@ namespace NCC.Extend.Utils | ||
| 51 | sb.AppendLine($"⏩健康师:{string.Join("、", healthTeachers)}"); | 51 | sb.AppendLine($"⏩健康师:{string.Join("、", healthTeachers)}"); |
| 52 | 52 | ||
| 53 | // 活动方案:532工程 | 53 | // 活动方案:532工程 |
| 54 | + sb.AppendLine($"⏩活动方案:{entity.activityName ?? "无"}"); | ||
| 54 | // sb.AppendLine($"⏩活动方案:{entity.pxxx ?? "无"}"); | 55 | // sb.AppendLine($"⏩活动方案:{entity.pxxx ?? "无"}"); |
| 55 | // 跟单配合:王经理 竹主任 陈思思老师 | 56 | // 跟单配合:王经理 竹主任 陈思思老师 |
| 56 | var techTeachers = GetTechTeachers(entity.lqKdKjbsyjList); | 57 | var techTeachers = GetTechTeachers(entity.lqKdKjbsyjList); |
创建考勤汇总表.sql deleted
| 1 | -CREATE TABLE `lq_attendance_summary` ( | ||
| 2 | - `F_Id` varchar(50) NOT NULL COMMENT '考勤汇总ID', | ||
| 3 | - `F_UserId` varchar(50) NOT NULL COMMENT '用户ID(员工ID)', | ||
| 4 | - `F_Year` int NOT NULL COMMENT '年份', | ||
| 5 | - `F_Month` int NOT NULL COMMENT '月份', | ||
| 6 | - `F_EmployeeStatus` int NOT NULL DEFAULT 1 COMMENT '员工状态(1-在职,2-离职,3-停薪留职)', | ||
| 7 | - `F_WorkDays` decimal(5,2) NOT NULL DEFAULT 0.00 COMMENT '出勤天数', | ||
| 8 | - `F_LeaveDays` decimal(5,2) NOT NULL DEFAULT 0.00 COMMENT '请假天数', | ||
| 9 | - `F_RestDays` decimal(5,2) NOT NULL DEFAULT 0.00 COMMENT '休息天数', | ||
| 10 | - `F_Remark` varchar(2000) COMMENT '备注', | ||
| 11 | - `F_CreateUser` varchar(50) NOT NULL COMMENT '创建人ID', | ||
| 12 | - `F_CreateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
| 13 | - `F_UpdateUser` varchar(50) COMMENT '更新人ID', | ||
| 14 | - `F_UpdateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | ||
| 15 | - `F_IsEffective` int NOT NULL DEFAULT 1 COMMENT '是否有效(1-有效,-1-无效)', | ||
| 16 | - PRIMARY KEY (`F_Id`), | ||
| 17 | - UNIQUE KEY `uk_user_year_month` (`F_UserId`, `F_Year`, `F_Month`), | ||
| 18 | - KEY `idx_user_id` (`F_UserId`), | ||
| 19 | - KEY `idx_year_month` (`F_Year`, `F_Month`), | ||
| 20 | - KEY `idx_create_time` (`F_CreateTime`) | ||
| 21 | -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='考勤汇总表'; |