|
@@ -7,6 +7,10 @@ LabourRequestEditIndexEntity $LabourRequestEditIndexEntityFromJson(Map<String, d
|
|
|
if (requestId != null) {
|
|
|
labourRequestEditIndexEntity.requestId = requestId;
|
|
|
}
|
|
|
+ final int? serviceType = jsonConvert.convert<int>(json['service_type']);
|
|
|
+ if (serviceType != null) {
|
|
|
+ labourRequestEditIndexEntity.serviceType = serviceType;
|
|
|
+ }
|
|
|
final String? jobStart = jsonConvert.convert<String>(json['job_start']);
|
|
|
if (jobStart != null) {
|
|
|
labourRequestEditIndexEntity.jobStart = jobStart;
|
|
@@ -27,6 +31,10 @@ LabourRequestEditIndexEntity $LabourRequestEditIndexEntityFromJson(Map<String, d
|
|
|
if (needNum != null) {
|
|
|
labourRequestEditIndexEntity.needNum = needNum;
|
|
|
}
|
|
|
+ final String? amount = jsonConvert.convert<String>(json['amount']);
|
|
|
+ if (amount != null) {
|
|
|
+ labourRequestEditIndexEntity.amount = amount;
|
|
|
+ }
|
|
|
final List<LabourRequestEditIndexTemplateList>? templateList = (json['template_list'] as List<dynamic>?)?.map(
|
|
|
(e) => jsonConvert.convert<LabourRequestEditIndexTemplateList>(e) as LabourRequestEditIndexTemplateList).toList();
|
|
|
if (templateList != null) {
|
|
@@ -37,42 +45,56 @@ LabourRequestEditIndexEntity $LabourRequestEditIndexEntityFromJson(Map<String, d
|
|
|
if (departmentList != null) {
|
|
|
labourRequestEditIndexEntity.departmentList = departmentList;
|
|
|
}
|
|
|
+ final List<LabourRequestEditIndexDepartmentList>? chargeList = (json['charge_list'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<LabourRequestEditIndexDepartmentList>(e) as LabourRequestEditIndexDepartmentList).toList();
|
|
|
+ if (chargeList != null) {
|
|
|
+ labourRequestEditIndexEntity.chargeList = chargeList;
|
|
|
+ }
|
|
|
return labourRequestEditIndexEntity;
|
|
|
}
|
|
|
|
|
|
Map<String, dynamic> $LabourRequestEditIndexEntityToJson(LabourRequestEditIndexEntity entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['request_id'] = entity.requestId;
|
|
|
+ data['service_type'] = entity.serviceType;
|
|
|
data['job_start'] = entity.jobStart;
|
|
|
data['job_end'] = entity.jobEnd;
|
|
|
data['department_id'] = entity.departmentId;
|
|
|
data['template_id'] = entity.templateId;
|
|
|
data['need_num'] = entity.needNum;
|
|
|
+ data['amount'] = entity.amount;
|
|
|
data['template_list'] = entity.templateList.map((v) => v.toJson()).toList();
|
|
|
data['department_list'] = entity.departmentList.map((v) => v.toJson()).toList();
|
|
|
+ data['charge_list'] = entity.chargeList.map((v) => v.toJson()).toList();
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
extension LabourRequestEditIndexEntityExtension on LabourRequestEditIndexEntity {
|
|
|
LabourRequestEditIndexEntity copyWith({
|
|
|
int? requestId,
|
|
|
+ int? serviceType,
|
|
|
String? jobStart,
|
|
|
String? jobEnd,
|
|
|
String? departmentId,
|
|
|
String? templateId,
|
|
|
int? needNum,
|
|
|
+ String? amount,
|
|
|
List<LabourRequestEditIndexTemplateList>? templateList,
|
|
|
List<LabourRequestEditIndexDepartmentList>? departmentList,
|
|
|
+ List<LabourRequestEditIndexDepartmentList>? chargeList,
|
|
|
}) {
|
|
|
return LabourRequestEditIndexEntity()
|
|
|
..requestId = requestId ?? this.requestId
|
|
|
+ ..serviceType = serviceType ?? this.serviceType
|
|
|
..jobStart = jobStart ?? this.jobStart
|
|
|
..jobEnd = jobEnd ?? this.jobEnd
|
|
|
..departmentId = departmentId ?? this.departmentId
|
|
|
..templateId = templateId ?? this.templateId
|
|
|
..needNum = needNum ?? this.needNum
|
|
|
+ ..amount = amount ?? this.amount
|
|
|
..templateList = templateList ?? this.templateList
|
|
|
- ..departmentList = departmentList ?? this.departmentList;
|
|
|
+ ..departmentList = departmentList ?? this.departmentList
|
|
|
+ ..chargeList = chargeList ?? this.chargeList;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -116,7 +138,7 @@ extension LabourRequestEditIndexTemplateListExtension on LabourRequestEditIndexT
|
|
|
|
|
|
LabourRequestEditIndexDepartmentList $LabourRequestEditIndexDepartmentListFromJson(Map<String, dynamic> json) {
|
|
|
final LabourRequestEditIndexDepartmentList labourRequestEditIndexDepartmentList = LabourRequestEditIndexDepartmentList();
|
|
|
- final int? value = jsonConvert.convert<int>(json['value']);
|
|
|
+ final String? value = jsonConvert.convert<String>(json['value']);
|
|
|
if (value != null) {
|
|
|
labourRequestEditIndexDepartmentList.value = value;
|
|
|
}
|
|
@@ -128,6 +150,10 @@ LabourRequestEditIndexDepartmentList $LabourRequestEditIndexDepartmentListFromJs
|
|
|
if (selected != null) {
|
|
|
labourRequestEditIndexDepartmentList.selected = selected;
|
|
|
}
|
|
|
+ final String? checked = jsonConvert.convert<String>(json['checked']);
|
|
|
+ if (checked != null) {
|
|
|
+ labourRequestEditIndexDepartmentList.checked = checked;
|
|
|
+ }
|
|
|
return labourRequestEditIndexDepartmentList;
|
|
|
}
|
|
|
|
|
@@ -136,18 +162,21 @@ Map<String, dynamic> $LabourRequestEditIndexDepartmentListToJson(LabourRequestEd
|
|
|
data['value'] = entity.value;
|
|
|
data['txt'] = entity.txt;
|
|
|
data['selected'] = entity.selected;
|
|
|
+ data['checked'] = entity.checked;
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
extension LabourRequestEditIndexDepartmentListExtension on LabourRequestEditIndexDepartmentList {
|
|
|
LabourRequestEditIndexDepartmentList copyWith({
|
|
|
- int? value,
|
|
|
+ String? value,
|
|
|
String? txt,
|
|
|
String? selected,
|
|
|
+ String? checked,
|
|
|
}) {
|
|
|
return LabourRequestEditIndexDepartmentList()
|
|
|
..value = value ?? this.value
|
|
|
..txt = txt ?? this.txt
|
|
|
- ..selected = selected ?? this.selected;
|
|
|
+ ..selected = selected ?? this.selected
|
|
|
+ ..checked = checked ?? this.checked;
|
|
|
}
|
|
|
}
|