bug
This commit is contained in:
parent
2b10624c21
commit
693986ae65
|
|
@ -82,7 +82,7 @@ public class AssessmentRecord
|
|||
public string District { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1待测评 2测评中 3生成中 4已完成
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class AssessmentRecordDto
|
|||
public string District { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1待测评 2测评中 3生成中 4已完成
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class AssessmentRecordQueryRequest : PagedRequest
|
|||
public long? AssessmentTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1待测评 2测评中 3生成中 4已完成
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class AssessmentReportDto
|
|||
public string District { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1待测评 2测评中 3生成中 4已完成
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ public class BookingDetailDto : BookingDto
|
|||
/// </summary>
|
||||
public string? PlannerAvatar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规划师职称
|
||||
/// </summary>
|
||||
public string? PlannerTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规划师简介
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ public class BookingDto
|
|||
/// </summary>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户UID
|
||||
/// </summary>
|
||||
public string? UserUid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户昵称
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public class AssessmentRecordService : IAssessmentRecordService
|
|||
/// </summary>
|
||||
private static readonly Dictionary<int, string> StatusNames = new()
|
||||
{
|
||||
{ 0, "待支付" },
|
||||
{ 1, "待测评" },
|
||||
{ 2, "测评中" },
|
||||
{ 3, "生成中" },
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@ public class PlannerService : IPlannerService
|
|||
{
|
||||
Id = b.Id,
|
||||
UserId = b.UserId,
|
||||
UserUid = b.User != null ? b.User.Uid : null,
|
||||
UserNickname = b.User != null ? b.User.Nickname : null,
|
||||
UserPhone = b.User != null ? b.User.Phone : null,
|
||||
OrderId = b.OrderId,
|
||||
|
|
@ -377,6 +378,7 @@ public class PlannerService : IPlannerService
|
|||
{
|
||||
Id = booking.Id,
|
||||
UserId = booking.UserId,
|
||||
UserUid = booking.User?.Uid,
|
||||
UserNickname = booking.User?.Nickname,
|
||||
UserPhone = booking.User?.Phone,
|
||||
OrderId = booking.OrderId,
|
||||
|
|
@ -384,6 +386,7 @@ public class PlannerService : IPlannerService
|
|||
PlannerId = booking.PlannerId,
|
||||
PlannerName = booking.Planner?.Name,
|
||||
PlannerAvatar = booking.Planner?.Avatar,
|
||||
PlannerTitle = booking.Planner?.Title,
|
||||
PlannerIntroduction = booking.Planner?.Introduction,
|
||||
BookingDate = booking.BookingDate,
|
||||
BookingTime = booking.BookingTime,
|
||||
|
|
@ -461,6 +464,7 @@ public class PlannerService : IPlannerService
|
|||
{
|
||||
Id = b.Id,
|
||||
UserId = b.UserId,
|
||||
UserUid = b.User != null ? b.User.Uid : null,
|
||||
UserNickname = b.User != null ? b.User.Nickname : null,
|
||||
UserPhone = b.User != null ? b.User.Phone : null,
|
||||
OrderId = b.OrderId,
|
||||
|
|
|
|||
|
|
@ -45,14 +45,18 @@ export interface UpdatePlannerRequest extends CreatePlannerRequest {
|
|||
export interface BookingItem {
|
||||
id: number
|
||||
userId: number
|
||||
userUid: string
|
||||
userNickname: string
|
||||
userPhone: string
|
||||
plannerId: number
|
||||
plannerName: string
|
||||
bookingDate: string
|
||||
studentName: string
|
||||
studentGrade: number
|
||||
studentGradeName: string
|
||||
name: string
|
||||
phone: string
|
||||
gender: number
|
||||
genderName: string
|
||||
grade: number
|
||||
gradeName: string
|
||||
status: number
|
||||
statusName: string
|
||||
createTime: string
|
||||
|
|
@ -61,11 +65,22 @@ export interface BookingItem {
|
|||
export interface BookingDetail extends BookingItem {
|
||||
plannerAvatar: string
|
||||
plannerTitle: string
|
||||
studentSchool: string
|
||||
studentScores: string
|
||||
remark: string | null
|
||||
majorName: string
|
||||
scoreChinese: number | null
|
||||
scoreMath: number | null
|
||||
scoreEnglish: number | null
|
||||
scorePhysics: number | null
|
||||
scoreChemistry: number | null
|
||||
scoreBiology: number | null
|
||||
scoreGeography: number | null
|
||||
scorePolitics: number | null
|
||||
plannerIntroduction: string
|
||||
orderAmount: number | null
|
||||
orderStatus: number | null
|
||||
orderStatusName: string | null
|
||||
orderId: number
|
||||
orderNo: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
export interface BookingQuery extends PagedRequest {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option label="待支付" :value="0" />
|
||||
<el-option label="待测评" :value="1" />
|
||||
<el-option label="测评中" :value="2" />
|
||||
<el-option label="生成中" :value="3" />
|
||||
|
|
@ -483,10 +484,11 @@ const editConclusionDialogVisible = computed({
|
|||
|
||||
/**
|
||||
* 获取状态标签类型
|
||||
* 待测评=info, 测评中=primary, 生成中=warning, 已完成=success
|
||||
* 待支付=info, 待测评=info, 测评中=primary, 生成中=warning, 已完成=success
|
||||
*/
|
||||
function getStatusTagType(status: number): 'info' | 'primary' | 'warning' | 'success' | 'danger' {
|
||||
switch (status) {
|
||||
case 0: return 'info'
|
||||
case 1: return 'info'
|
||||
case 2: return 'primary'
|
||||
case 3: return 'warning'
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
<el-table-column label="用户信息" min-width="150">
|
||||
<template #default="{ row }">
|
||||
<div>{{ row.userNickname }}</div>
|
||||
<div class="sub-text">UID: {{ row.userUid }}</div>
|
||||
<div class="sub-text">{{ row.userPhone }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -58,8 +59,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="学生信息" min-width="120">
|
||||
<template #default="{ row }">
|
||||
<div>{{ row.studentName }}</div>
|
||||
<div class="sub-text">{{ row.studentGradeName }}</div>
|
||||
<div>{{ row.name }}</div>
|
||||
<div class="sub-text">{{ row.genderName }} / {{ row.gradeName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="100" align="center">
|
||||
|
|
@ -99,6 +100,7 @@
|
|||
<el-descriptions :column="1" border v-if="detailData">
|
||||
<el-descriptions-item label="预约ID">{{ detailData.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单号">{{ detailData.orderNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户UID">{{ detailData.userUid }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户昵称">{{ detailData.userNickname }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户手机">{{ detailData.userPhone }}</el-descriptions-item>
|
||||
<el-descriptions-item label="规划师">
|
||||
|
|
@ -111,11 +113,19 @@
|
|||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预约日期">{{ detailData.bookingDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生姓名">{{ detailData.studentName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生年级">{{ detailData.studentGradeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生学校">{{ detailData.studentSchool || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生成绩">{{ detailData.studentScores || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ detailData.remark || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生姓名">{{ detailData.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ detailData.genderName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生年级">{{ detailData.gradeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ detailData.phone }}</el-descriptions-item>
|
||||
<el-descriptions-item label="专业名称">{{ detailData.majorName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="语文成绩">{{ detailData.scoreChinese ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="数学成绩">{{ detailData.scoreMath ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="英语成绩">{{ detailData.scoreEnglish ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="物理成绩">{{ detailData.scorePhysics ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="化学成绩">{{ detailData.scoreChemistry ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="生物成绩">{{ detailData.scoreBiology ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="地理成绩">{{ detailData.scoreGeography ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="政治成绩">{{ detailData.scorePolitics ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<el-tag :type="getStatusType(detailData.status)">{{ detailData.statusName }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
|
|
|
|||
|
|
@ -479,6 +479,8 @@ public class OrderService : IOrderService
|
|||
if (request.OrderType == 1)
|
||||
{
|
||||
// 测评订单 - 创建测评记录(Requirements 8.1)
|
||||
// 需要支付的订单,测评记录初始状态为0(待支付),支付成功后由回调设为1(待测评)
|
||||
// 免支付订单(邀请码)直接设为1(待测评)
|
||||
var assessmentRecord = new MiAssessment.Model.Entities.AssessmentRecord
|
||||
{
|
||||
UserId = userId,
|
||||
|
|
@ -492,7 +494,7 @@ public class OrderService : IOrderService
|
|||
Province = request.AssessmentInfo.Province,
|
||||
City = request.AssessmentInfo.City,
|
||||
District = request.AssessmentInfo.District,
|
||||
Status = 1, // 待测评
|
||||
Status = needPay ? 0 : 1, // 需要支付则待支付(0),免支付则待测评(1)
|
||||
CreateTime = now,
|
||||
UpdateTime = now,
|
||||
IsDeleted = false
|
||||
|
|
@ -779,6 +781,7 @@ public class OrderService : IOrderService
|
|||
{
|
||||
return status switch
|
||||
{
|
||||
0 => "待支付",
|
||||
1 => "待测评",
|
||||
2 => "测评中",
|
||||
3 => "生成中",
|
||||
|
|
|
|||
|
|
@ -825,8 +825,8 @@ public partial class MiAssessmentDbContext : DbContext
|
|||
.HasMaxLength(50)
|
||||
.HasComment("区县");
|
||||
entity.Property(e => e.Status)
|
||||
.HasDefaultValue(1)
|
||||
.HasComment("状态:1待测评 2测评中 3生成中 4已完成");
|
||||
.HasDefaultValue(0)
|
||||
.HasComment("状态:0待支付 1待测评 2测评中 3生成中 4已完成");
|
||||
entity.Property(e => e.StartTime)
|
||||
.HasComment("开始答题时间");
|
||||
entity.Property(e => e.SubmitTime)
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class AssessmentRecord
|
|||
public string District { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1待测评 2测评中 3生成中 4已完成
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class AssessmentHistoryDto
|
|||
public long AssessmentTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1待测评 2测评中 3生成中 4已完成
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace MiAssessment.Model.Models.Assessment;
|
|||
public class ResultStatusDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态:1待测评 2测评中 3生成中 4已完成 5生成失败
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成 5生成失败
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class OrderItemDto
|
|||
public long? AssessmentRecordId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 测评记录状态:1待测评 2测评中 3生成中 4已完成(测评订单时有值)
|
||||
/// 状态:0待支付 1待测评 2测评中 3生成中 4已完成(测评订单时有值)
|
||||
/// </summary>
|
||||
public int? AssessmentStatus { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -851,7 +851,7 @@ onLoad((options) => {
|
|||
}
|
||||
|
||||
.popup-body {
|
||||
padding: $spacing-xl $spacing-lg;
|
||||
padding: $spacing-lg;
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
|
|
@ -948,5 +948,6 @@ onLoad((options) => {
|
|||
color: $text-color;
|
||||
text-align: center;
|
||||
letter-spacing: 8rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user