add oracle code parameter

main_design2.1
nextwo 2 years ago
parent bc1b3afe84
commit 49a6ac8996

@ -28,6 +28,8 @@ class AssetSearch {
this.tagCode,
this.assetGroupName,
this.assetGroup,
this.oracleCodeTypeId,
this.oracleCodeValue
});
AssetSearch.fromJson(dynamic json) {
@ -57,6 +59,8 @@ class AssetSearch {
tagCode = json['tagCode'];
assetGroupName = json['assetGroupName'];
assetGroup = json['assetGroup'] != null ? Lookup.fromJson(json['assetGroup']) : null;
oracleCodeTypeId=json['assetOracleCodeTypeId'];
oracleCodeValue=json['assetOracleCodeValue'];
}
String code;
@ -85,6 +89,8 @@ class AssetSearch {
String tagCode;
String assetGroupName;
Lookup assetGroup;
String oracleCodeValue;
int oracleCodeTypeId;
AssetSearch copyWith({
String code,
@ -113,6 +119,8 @@ class AssetSearch {
String tagCode,
String assetGroupName,
Lookup assetGroup,
String oracleCodeValue,
int oracleCodeTypeId
}) =>
AssetSearch(
code: code ?? this.code,
@ -141,6 +149,8 @@ class AssetSearch {
tagCode: tagCode ?? this.tagCode,
assetGroupName: assetGroupName ?? this.assetGroupName,
assetGroup: assetGroup ?? this.assetGroup,
oracleCodeValue: oracleCodeValue ?? this.oracleCodeValue,
oracleCodeTypeId: oracleCodeTypeId ?? this.oracleCodeTypeId
);
Map<String, dynamic> toJson() {
@ -183,6 +193,8 @@ class AssetSearch {
if (assetGroup != null) {
map['assetGroup'] = assetGroup.toJson();
}
if (oracleCodeValue != null && oracleCodeValue.isNotEmpty) map['assetOracleCodeValue'] = oracleCodeValue;
if (oracleCodeTypeId != null) map['assetOracleCodeTypeId'] = oracleCodeTypeId;
return map;
}
}

@ -181,6 +181,10 @@ class _SearchAssetPageState extends State<SearchAssetPage> {
case 1:
search.assetNo = value;
break;
case 2:
search.oracleCodeValue = value;
search.oracleCodeTypeId = 412;
break;
case 3:
search.assetSerialNumber = value;
break;

Loading…
Cancel
Save