123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938 |
- import 'package:json_annotation/json_annotation.dart';
- import 'package:lszlgl/model/num_converter.dart';
- import 'package:lszlgl/model/string_converter.dart';
- import '../../service/dict_service.dart';
- part 'sample_task_rsp.g.dart';
- @JsonSerializable(genericArgumentFactories: true)
- class SampleTaskListRsp {
- final num? total;
- final List<SampleTaskItem>? list;
- const SampleTaskListRsp({
- this.total,
- this.list,
- });
- factory SampleTaskListRsp.fromJson(Map<String, dynamic> json) => _$SampleTaskListRspFromJson(json);
- Map<String, dynamic> toJson() => _$SampleTaskListRspToJson(this);
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class SampleTaskItem {
- num? id;
- String? qyryName;
- String? fjrq;
- String? ypbh;
- String? jtpzmc;
- num? deliveryStatus;
- num? ypdj;
- String? jyzb;
- String? qydq;
- num? jhcysl;
- num? zljysl;
- num? pzjyjg;
- num? pzjysl;
- num? sajyjg;
- num? sajysl;
- num? jhcyjg;
- String? lspz;
- num? bchlx;
- String? bdcnhhhzs;
- num? gcpwlx;
- String? lxfs;
- num? qydbsl;
- String? qyddjwd;
- String? qysj;
- num? qysl;
- bool? scgczsffsbjyzdbch;
- String? sheng;
- String? shi;
- String? qu;
- String? xian;
- String? cun;
- num? shidu;
- String? shsj;
- num? trdllx;
- num? wendu;
- num? wrwlx;
- num? zzmj;
- bool? zztdzwsfygcpw;
- bool? zztdzwsysytrsfywr;
- num? zjBaseEnterpriseId;
- num? zjBasePersonnelId;
- num? zjCodeSamplingTaskId;
- num? zjCodeSamplingPlanId;
- String? xzqh;
- num? zjBaseGrainInformationId;
- num? cypzmc;
- String? cypzName;
- String? qyrwdh;
- num? shengXzqh;
- num? shiXzqh;
- num? quXzqh;
- num? xiangXzqh;
- num? cunXzqh;
- num? createTime;
- num? state;
- String? name;
- String? dgryName;
- String? rwjssj;
- String? bsjzsj;
- num? rwlx;
- num? jclb;
- String? dwmc;
- List<EnterpriseItem>? enterpriseList;
- List<UseMedicineItem>? codeUseMedicineList;
- String? zzpz;
- String? shengXzqhName;
- String? shiXzqhName;
- String? quXzqhName;
- String? xiangXzqhName;
- String? cunXzqhName;
- String? cyjhbmCode;
- String? cyjhmc;
- String? niandu;
- List<SamplingTaskAllotSgjcItem>? codeSamplingTaskAllotSgjcRespList;
-
-
- num? sfyzpz;
- num? yzpzlx;
- num? shqjsffslyytq;
- num? shlssfsfpg;
- num? jnlbdsffszmwr;
- num? zjdswrlx;
- num? jnlbdsfzjswr;
- num? zjswrlx;
- List<JyjgxxItem>? jyjgxxRespVOList;
- num? jypzStatus;
- num? tqqk;
- List<NonghuItem>? codeSamplingNonghuList;
- String? xzqhCode;
- List<String>? filePictureList;
- SampleTaskItem({
- this.id,
- this.qyryName,
- this.fjrq,
- this.ypbh,
- this.jtpzmc,
- this.deliveryStatus,
- this.ypdj,
- this.jyzb,
- this.qydq,
- this.jhcysl,
- this.zljysl,
- this.pzjyjg,
- this.pzjysl,
- this.sajyjg,
- this.sajysl,
- this.jhcyjg,
- this.lspz,
- this.bchlx,
- this.bdcnhhhzs,
- this.gcpwlx,
- this.lxfs,
- this.qydbsl,
- this.qyddjwd,
- this.qysj,
- this.qysl,
- this.scgczsffsbjyzdbch,
- this.sheng,
- this.shi,
- this.qu,
- this.xian,
- this.cun,
- this.shidu,
- this.shsj,
- this.trdllx,
- this.wendu,
- this.wrwlx,
- this.zzmj,
- this.zztdzwsfygcpw,
- this.zztdzwsysytrsfywr,
- this.zjBaseEnterpriseId,
- this.zjBasePersonnelId,
- this.zjCodeSamplingTaskId,
- this.zjCodeSamplingPlanId,
- this.xzqh,
- this.zjBaseGrainInformationId,
- this.cypzmc,
- this.cypzName,
- this.qyrwdh,
- this.shengXzqh,
- this.shiXzqh,
- this.quXzqh,
- this.xiangXzqh,
- this.cunXzqh,
- this.createTime,
- this.state,
- this.name,
- this.dgryName,
- this.rwjssj,
- this.bsjzsj,
- this.rwlx,
- this.jclb,
- this.dwmc,
- this.enterpriseList,
- this.codeUseMedicineList,
- this.zzpz,
- this.shengXzqhName,
- this.shiXzqhName,
- this.quXzqhName,
- this.xiangXzqhName,
- this.cunXzqhName,
- this.cyjhbmCode,
- this.cyjhmc,
- this.niandu,
- this.codeSamplingTaskAllotSgjcRespList,
- this.sfyzpz,
- this.yzpzlx,
- this.shqjsffslyytq,
- this.shlssfsfpg,
- this.jnlbdsffszmwr,
- this.zjdswrlx,
- this.jnlbdsfzjswr,
- this.zjswrlx,
- this.jyjgxxRespVOList,
- this.jypzStatus,
- this.tqqk,
- this.codeSamplingNonghuList,
- this.xzqhCode,
- this.filePictureList,
- });
- SampleTaskItem createUI() {
-
- zztdzwsfygcpw ??= false;
-
- gcpwlx ??= DictService.getDictFirstNum(DictType.gcpwlx);
-
- zztdzwsysytrsfywr ??= false;
-
- wrwlx ??= DictService.getDictFirstNum(DictType.wrwlx);
-
- scgczsffsbjyzdbch ??= false;
-
- bchlx ??= DictService.getDictFirstNum(DictType.bchlx);
-
- shqjsffslyytq ??= 1;
-
- shlssfsfpg ??= 1;
-
- jnlbdsffszmwr ??= 1;
-
- zjdswrlx ??= DictService.getDictFirstNum(DictType.zjdswrlx);
-
- jnlbdsfzjswr ??= 1;
-
- zjswrlx ??= DictService.getDictFirstNum(DictType.zjswrlx);
- return this;
- }
- factory SampleTaskItem.fromJson(Map<String, dynamic> json) => _$SampleTaskItemFromJson(json)..createUI();
- Map<String, dynamic> toJson() => _$SampleTaskItemToJson(this);
- String getDeliveryStatusText() {
-
- return switch (deliveryStatus) { 0 => '待领取', 1 => '待扦样', 2 => '已扦样', _ => '' };
- }
- Map<String, dynamic> getReqJson() {
- Map<String, dynamic> map = {};
- map['state'] = state;
- map['id'] = id;
- map['xzqhCode'] = xzqhCode;
- map['xiangXzqhName'] = xiangXzqhName;
- map['cunXzqhName'] = cunXzqhName;
- map['qyddjwd'] = qyddjwd;
- map['zzmj'] = zzmj;
- map['trdllx'] = trdllx;
- map['bdcnhhhzs'] = bdcnhhhzs;
- map['lxfs'] = lxfs;
- map['lspz'] = lspz;
- map['jtpzmc'] = jtpzmc;
- map['sfyzpz'] = sfyzpz;
- map['yzpzlx'] = yzpzlx;
- map['shsj'] = shsj;
- map['qysj'] = qysj;
- map['qysl'] = qysl;
- map['qydbsl'] = qydbsl;
- map['wendu'] = wendu;
- map['shidu'] = shidu;
- map['zztdzwsfygcpw'] = zztdzwsfygcpw;
- map['gcpwlx'] = gcpwlx;
- map['zztdzwsysytrsfywr'] = zztdzwsysytrsfywr;
- map['wrwlx'] = wrwlx;
- map['scgczsffsbjyzdbch'] = scgczsffsbjyzdbch;
- map['bchlx'] = bchlx;
- map['shqjsffslyytq'] = shqjsffslyytq;
- map['shlssfsfpg'] = shlssfsfpg;
- map['jnlbdsffszmwr'] = jnlbdsffszmwr;
- map['zjdswrlx'] = zjdswrlx;
- map['jnlbdsfzjswr'] = jnlbdsfzjswr;
- map['zjswrlx'] = zjswrlx;
- List<UseMedicineItem>? medicineList = codeUseMedicineList?.where((e) => e.id == null).toList();
- if (medicineList != null && medicineList.isNotEmpty) {
- map['codeUseMedicineList'] = medicineList.map((e) => e.toReqJson()).toList();
- }
- map['dgryName'] = dgryName;
- map['tqqk'] = tqqk;
- List<NonghuItem>? nonghuList = codeSamplingNonghuList?.where((e) => e.id == null).toList();
- if (nonghuList != null && nonghuList.isNotEmpty) {
- map['codeSamplingNonghuList'] = nonghuList.map((e) => e.toReqJson()).toList();
- }
- map['filePictureList'] = filePictureList;
- return map;
- }
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class EnterpriseItem {
- final num? id;
- final String? address;
- final String? beizhu;
- final num? bgsmj;
- final num? cqlb;
- final num? dnczbksr;
- final num? dnywwtsr;
- final num? dwdzSheng;
- final String? dwdzShengName;
- final num? dwdzShi;
- final String? dwdzShiName;
- final num? dwdzXian;
- final String? dwdzXianName;
- final num? dwjb;
- final String? dwmc;
- final num? dwxz;
- final String? frdb;
- final num? jglb;
- final num? jyyrs;
- final String? lxfs;
- final num? rybzsl;
- final String? shtyxydm;
- final num? sysmj;
- final num? zjzmj;
- final num? zrs;
- final String? dwdz;
- final String? createTime;
- final String? creatorDeptId;
- final num? deptId;
- final String? sjzgdw;
-
-
- final String? flowCode;
- final num? flowStatus;
- final String? flowCause;
- final num? flowCheckUserId;
- final String? flowTime;
-
-
-
-
-
-
- final num? personnelCount;
- final num? instrumentEquipmentCount;
-
-
-
- const EnterpriseItem({
- this.id,
- this.address,
- this.beizhu,
- this.bgsmj,
- this.cqlb,
- this.dnczbksr,
- this.dnywwtsr,
- this.dwdzSheng,
- this.dwdzShengName,
- this.dwdzShi,
- this.dwdzShiName,
- this.dwdzXian,
- this.dwdzXianName,
- this.dwjb,
- this.dwmc,
- this.dwxz,
- this.frdb,
- this.jglb,
- this.jyyrs,
- this.lxfs,
- this.rybzsl,
- this.shtyxydm,
- this.sysmj,
- this.zjzmj,
- this.zrs,
- this.dwdz,
- this.createTime,
- this.creatorDeptId,
- this.deptId,
- this.sjzgdw,
- this.flowCode,
- this.flowStatus,
- this.flowCause,
- this.flowCheckUserId,
- this.flowTime,
- this.personnelCount,
- this.instrumentEquipmentCount,
- });
- factory EnterpriseItem.fromJson(Map<String, dynamic> json) => _$EnterpriseItemFromJson(json);
- Map<String, dynamic> toJson() => _$EnterpriseItemToJson(this);
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class UseMedicineItem {
- num? id;
- String? cjsj;
- String? syff;
- String? synypz;
- num? synysl;
- String? sysj;
- num? zjCodeSamplingTaskDetailsKcjcId;
- num? zjCodeSamplingTaskDetailsSgjcId;
- String? createTime;
- String? jcz;
- String? zczfw;
- UseMedicineItem({
- this.id,
- this.cjsj,
- this.syff,
- this.synypz,
- this.synysl,
- this.sysj,
- this.zjCodeSamplingTaskDetailsKcjcId,
- this.zjCodeSamplingTaskDetailsSgjcId,
- this.createTime,
- this.jcz,
- this.zczfw,
- });
- factory UseMedicineItem.fromJson(Map<String, dynamic> json) => _$UseMedicineItemFromJson(json);
- Map<String, dynamic> toJson() => _$UseMedicineItemToJson(this);
- Map<String, dynamic> toReqJson() {
- Map<String, dynamic> map = {};
- map['id'] = id;
- map['synypz'] = synypz;
- map['synysl'] = synysl;
- map['sysj'] = sysj;
- map['syff'] = syff;
- return map;
- }
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class NonghuItem {
-
- num? id;
-
- String? bdcnhhhzs;
-
- num? qysl;
-
- String? lxfs;
-
- num? qydbsl;
-
- num? zjCodeSamplingTaskDetailsSgjcId;
-
- num? zjCodeSamplingTaskDetailsKcjcId;
- NonghuItem({
- this.id,
- this.bdcnhhhzs,
- this.qysl,
- this.lxfs,
- this.qydbsl,
- this.zjCodeSamplingTaskDetailsKcjcId,
- this.zjCodeSamplingTaskDetailsSgjcId,
- });
- factory NonghuItem.fromJson(Map<String, dynamic> json) => _$NonghuItemFromJson(json);
- Map<String, dynamic> toJson() => _$NonghuItemToJson(this);
- Map<String, dynamic> toReqJson() {
- Map<String, dynamic> map = {};
- map['id'] = id;
- map['bdcnhhhzs'] = bdcnhhhzs;
- map['qysl'] = qysl;
- map['lxfs'] = lxfs;
- map['qydbsl'] = qydbsl;
- return map;
- }
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class SamplingTaskAllotSgjcItem {
- final num? id;
- final num? zjBaseGrainInformationId;
- final String? cypzmc;
- final num? samplingCount;
- final String? bsjzsj;
- final num? personnelId;
- final num? zjCodeSamplingPlanId;
- final num? zjCodeSamplingTaskId;
- final String? creater;
- final String? createDate;
- final String? updateDate;
- final String? cyjhbmCode;
- final String? cyjhmc;
- final String? niandu;
- final String? zzpz;
- final num? jhcysl;
- const SamplingTaskAllotSgjcItem({
- this.id,
- this.zjBaseGrainInformationId,
- this.cypzmc,
- this.samplingCount,
- this.bsjzsj,
- this.personnelId,
- this.zjCodeSamplingPlanId,
- this.zjCodeSamplingTaskId,
- this.creater,
- this.createDate,
- this.updateDate,
- this.cyjhbmCode,
- this.cyjhmc,
- this.niandu,
- this.zzpz,
- this.jhcysl,
- });
- factory SamplingTaskAllotSgjcItem.fromJson(Map<String, dynamic> json) => _$SamplingTaskAllotSgjcItemFromJson(json);
- Map<String, dynamic> toJson() => _$SamplingTaskAllotSgjcItemToJson(this);
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class JyjgxxItem {
-
- final num? zjBaseEnterpriseId;
-
- final String? dwmc;
-
- final String? address;
-
- final String? jydh;
-
- final String? ypjssj;
-
- final num? sjbj;
- const JyjgxxItem({
- this.zjBaseEnterpriseId,
- this.dwmc,
- this.address,
- this.jydh,
- this.ypjssj,
- this.sjbj,
- });
- factory JyjgxxItem.fromJson(Map<String, dynamic> json) => _$JyjgxxItemFromJson(json);
- Map<String, dynamic> toJson() => _$JyjgxxItemToJson(this);
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class SampleTaskItemKcjcRsp {
-
- num? id;
-
- num? zjBasePersonnelId;
-
- num? zjCodeSamplingTaskId;
-
- num? zjCodeSamplingPlanId;
-
- String? createTime;
-
- num? zjBaseEnterpriseId;
-
- num? xzqh;
-
- num? sfsy;
-
- String? code;
-
- String? bz;
-
- String? ccqymc;
-
- String? qycf;
-
- String? qyhw;
-
- String? qyqy;
-
- String? cangxing;
-
- String? rksj;
-
- num? rkdj;
-
- num? sclw;
-
- String? guoChandi;
-
- String? shengChandi;
-
- num? dbsl;
-
- String? lsxz;
-
- String? shnd;
-
- String? qysj;
-
- String? zjsysj;
-
- String? syyjmc;
-
- num? chfsqk;
-
- num? qyssclw;
-
- String? cljsss;
-
- String? qyrwdh;
-
- String? ypbh;
-
- String? name;
-
- num? rwlx;
-
- String? dwmc;
-
- num? cypzmc;
-
- String? cypzName;
-
- String? zzpz;
-
- num? jhcysl;
-
- num? pzjysl;
-
- num? zljysl;
-
- num? sajysl;
-
- num? ccjysl;
-
- String? bsjzsj;
-
- num? jhcyjg;
-
- num? zjBaseGrainInformationId;
-
- String? cyjhbmCode;
-
- String? cyjhmc;
-
- String? niandu;
-
- List<SampleTaskAllotItemRsp>? codeSamplingTaskAllotSgjcRespList;
-
- num? state;
-
- String? qyryName;
-
- String? xfbmName;
-
- num? deliveryStatus;
-
- num? lspz;
-
- String? szhwlszs;
-
- List<FileRsp>? fileList;
-
- num? jclb;
- SampleTaskItemKcjcRsp({
- this.id,
- this.zjBasePersonnelId,
- this.zjCodeSamplingTaskId,
- this.zjCodeSamplingPlanId,
- this.createTime,
- this.zjBaseEnterpriseId,
- this.xzqh,
- this.sfsy,
- this.code,
- this.bz,
- this.ccqymc,
- this.qycf,
- this.qyhw,
- this.qyqy,
- this.cangxing,
- this.rksj,
- this.rkdj,
- this.sclw,
- this.guoChandi,
- this.shengChandi,
- this.dbsl,
- this.lsxz,
- this.shnd,
- this.qysj,
- this.zjsysj,
- this.syyjmc,
- this.chfsqk,
- this.qyssclw,
- this.cljsss,
- this.qyrwdh,
- this.ypbh,
- this.name,
- this.rwlx,
- this.dwmc,
- this.cypzmc,
- this.cypzName,
- this.zzpz,
- this.jhcysl,
- this.pzjysl,
- this.zljysl,
- this.sajysl,
- this.ccjysl,
- this.bsjzsj,
- this.jhcyjg,
- this.zjBaseGrainInformationId,
- this.cyjhbmCode,
- this.cyjhmc,
- this.niandu,
- this.codeSamplingTaskAllotSgjcRespList,
- this.state,
- this.qyryName,
- this.xfbmName,
- this.deliveryStatus,
- this.lspz,
- this.szhwlszs,
- this.fileList,
- this.jclb,
- });
- factory SampleTaskItemKcjcRsp.fromJson(Map<String, dynamic> json) => _$SampleTaskItemKcjcRspFromJson(json);
- Map<String, dynamic> toJson() => _$SampleTaskItemKcjcRspToJson(this);
- Map<String, dynamic> getReqJson() {
- Map<String, dynamic> map = {};
- map['state'] = state;
- map['id'] = id;
- map['zjBasePersonnelId'] = zjBasePersonnelId;
- map['zjCodeSamplingTaskId'] = zjCodeSamplingTaskId;
- map['zjCodeSamplingPlanId'] = zjCodeSamplingPlanId;
- map['zjBaseEnterpriseId'] = zjBaseEnterpriseId;
- map['zjBaseGrainInformationId'] = zjBaseGrainInformationId;
- map['qyqy'] = qyqy;
- map['rksj'] = rksj;
- map['rkdj'] = rkdj;
- map['guoChandi'] = guoChandi;
- map['sclw'] = sclw;
- map['dbsl'] = dbsl;
- map['szhwlszs'] = szhwlszs;
- map['shnd'] = shnd;
- map['qysj'] = qysj;
- map['sfsy'] = sfsy;
- map['zjsysj'] = zjsysj;
- map['syyjmc'] = syyjmc;
- map['chfsqk'] = chfsqk;
- map['qyssclw'] = qyssclw;
- map['cljsss'] = cljsss;
- map['bz'] = bz;
- return map;
- }
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class FileRsp {
-
- num? id;
-
- String? name;
-
- String? url;
-
- num? objType;
-
- num? objId;
-
- num? type;
- FileRsp({
- this.id,
- this.name,
- this.url,
- this.objType,
- this.objId,
- this.type,
- });
- factory FileRsp.fromJson(Map<String, dynamic> json) => _$FileRspFromJson(json);
- Map<String, dynamic> toJson() => _$FileRspToJson(this);
- }
- @JsonSerializable(converters: [NumConverter(), StringConverter()])
- class SampleTaskAllotItemRsp {
-
- num? id;
-
- num? zjBaseGrainInformationId;
-
- String? cypzmc;
-
- num? samplingCount;
-
- String? bsjzsj;
-
- num? personnelId;
-
- num? zjCodeSamplingPlanId;
-
- num? zjCodeSamplingTaskId;
-
- String? creater;
-
- String? createDate;
-
- String? updateDate;
-
- String? cyjhbmCode;
-
- String? cyjhmc;
-
- String? niandu;
-
- String? zzpz;
-
- num? jhcysl;
-
- String? zzpzmc;
- SampleTaskAllotItemRsp({
- this.id,
- this.zjBaseGrainInformationId,
- this.cypzmc,
- this.samplingCount,
- this.bsjzsj,
- this.personnelId,
- this.zjCodeSamplingPlanId,
- this.zjCodeSamplingTaskId,
- this.creater,
- this.createDate,
- this.updateDate,
- this.cyjhbmCode,
- this.cyjhmc,
- this.niandu,
- this.zzpz,
- this.jhcysl,
- this.zzpzmc,
- });
- factory SampleTaskAllotItemRsp.fromJson(Map<String, dynamic> json) => _$SampleTaskAllotItemRspFromJson(json);
- Map<String, dynamic> toJson() => _$SampleTaskAllotItemRspToJson(this);
- }
|