feat:核销记录查询
This commit is contained in:
1 parent
c02988656a
commit
a8771e0139
25 files changed
+994
-43
No files matched your search
@@ -253,6 +253,78 @@ class ServiceHardOrder {
|
||||
Map<String, dynamic> toJson() => _$ServiceHardOrderToJson(this);
|
||||
}
|
||||
|
||||
/// 当前终端核销记录的服务端查询参数。
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class VerificationRecordQueryRequest {
|
||||
const VerificationRecordQueryRequest({
|
||||
required this.hardId,
|
||||
required this.startDate,
|
||||
required this.endDate,
|
||||
this.verificationType,
|
||||
});
|
||||
|
||||
final int hardId;
|
||||
final String startDate;
|
||||
final String endDate;
|
||||
final String? verificationType;
|
||||
|
||||
factory VerificationRecordQueryRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$VerificationRecordQueryRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$VerificationRecordQueryRequestToJson(this);
|
||||
}
|
||||
|
||||
/// 核销记录只承载列表展示字段,不复用本地订单实体,避免混淆远端与本地状态。
|
||||
@JsonSerializable()
|
||||
class ServiceVerificationRecord {
|
||||
const ServiceVerificationRecord({
|
||||
required this.orderId,
|
||||
required this.orderNo,
|
||||
required this.verificationType,
|
||||
required this.verificationTypeName,
|
||||
required this.username,
|
||||
required this.productDesc,
|
||||
required this.payTypeName,
|
||||
required this.totalPrice,
|
||||
required this.verificationTime,
|
||||
this.userDeptName,
|
||||
});
|
||||
|
||||
/// 后端 Long 为避免跨端精度丢失可能序列化为字符串,终端同时兼容数字返回。
|
||||
@JsonKey(fromJson: JsonTool.anyToInt)
|
||||
final int orderId;
|
||||
final String orderNo;
|
||||
final String verificationType;
|
||||
final String verificationTypeName;
|
||||
final String username;
|
||||
final String? userDeptName;
|
||||
final String productDesc;
|
||||
final String payTypeName;
|
||||
|
||||
/// 金额仍按整数分使用,同时兼容部分环境将数值序列化为字符串。
|
||||
@JsonKey(fromJson: JsonTool.anyToInt)
|
||||
final int totalPrice;
|
||||
final DateTime verificationTime;
|
||||
|
||||
factory ServiceVerificationRecord.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceVerificationRecordFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceVerificationRecordToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceVerificationRecordPage extends ServicePageBase {
|
||||
ServiceVerificationRecordPage({this.records});
|
||||
|
||||
final List<ServiceVerificationRecord>? records;
|
||||
|
||||
factory ServiceVerificationRecordPage.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceVerificationRecordPageFromJson(json);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() => _$ServiceVerificationRecordPageToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceOpenCard {
|
||||
/// 用户名
|
||||
@@ -521,13 +593,45 @@ class ServiceHardCreateHardQrCodeScanOrder {
|
||||
_$ServiceHardCreateHardQrCodeScanOrderToJson(this);
|
||||
}
|
||||
|
||||
/// 终端识别本人后返回的预约菜单,身份字段已经由服务端脱敏。
|
||||
/// 终端本人预约菜单查询参数。
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class ReservationMenuQueryRequest {
|
||||
const ReservationMenuQueryRequest({
|
||||
required this.hardId,
|
||||
required this.recognitionType,
|
||||
required this.maskName,
|
||||
this.cardNumber,
|
||||
this.faceUserId,
|
||||
});
|
||||
|
||||
/// 当前终端设备 ID。
|
||||
final int hardId;
|
||||
|
||||
/// 本人识别方式,沿用后端 CARD、FACE 契约。
|
||||
final String recognitionType;
|
||||
|
||||
/// 是否由服务端脱敏用户姓名。
|
||||
final bool maskName;
|
||||
|
||||
/// 饭卡卡号,仅 CARD 识别时传递。
|
||||
final String? cardNumber;
|
||||
|
||||
/// 人脸插件识别出的用户 ID,仅 FACE 识别时传递。
|
||||
final int? faceUserId;
|
||||
|
||||
factory ReservationMenuQueryRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$ReservationMenuQueryRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ReservationMenuQueryRequestToJson(this);
|
||||
}
|
||||
|
||||
/// 终端识别本人后返回的预约菜单,姓名由服务端按终端配置决定是否脱敏。
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class ServiceReservationMenuQuery {
|
||||
/// 服务端脱敏后的用餐人姓名。
|
||||
/// 服务端按终端配置返回的用户姓名;字段名保留用于兼容既有协议。
|
||||
final String maskedName;
|
||||
|
||||
/// 用餐人所属部门或班级名称。
|
||||
/// 用户所属部门名称。
|
||||
final String? deptName;
|
||||
|
||||
/// 当前终端绑定的食堂名称。
|
||||
|
||||
Reference in new issue
Block a user