Explorar el Código

交易市场平台(供应商)

wwh hace 1 mes
padre
commit
18d9546b4e
Se han modificado 15 ficheros con 1222 adiciones y 234 borrados
  1. 483 11
      baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/BizYakHealthSourceRecord.java
  2. 150 44
      baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/dto/OpenBreedingProcessRecordDto.java
  3. 130 48
      baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/dto/OpenDiagnosisRecordDto.java
  4. 122 28
      baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/dto/OpenQuarantineRecordDto.java
  5. 1 1
      baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/service/YakDiseaseWarningAnalyzer.java
  6. 87 25
      baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/support/HealthRecordOpenApiMapper.java
  7. 2 8
      baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/support/HealthRecordRegionSupport.java
  8. 121 19
      baqing-admin/src/main/resources/mapper/industryservice/BizYakHealthSourceRecordMapper.xml
  9. 15 15
      baqing-admin/src/main/resources/thirdparty/stub-diagnosis-records.json
  10. 14 7
      baqing-admin/src/main/resources/thirdparty/stub-process-records.json
  11. 21 12
      baqing-admin/src/main/resources/thirdparty/stub-quarantine-records.json
  12. 2 2
      baqing-admin/src/test/java/com/ruoyi/web/modules/industryservice/service/YakDiseaseWarningAnalyzerTest.java
  13. 2 2
      baqing-admin/src/test/java/com/ruoyi/web/modules/industryservice/service/YakDiseaseWarningSyncServiceTest.java
  14. 25 5
      baqing-admin/src/test/java/com/ruoyi/web/modules/industryservice/support/HealthRecordOpenApiMapperTest.java
  15. 47 7
      sql/biz_yak_health_source_record.sql

+ 483 - 11
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/BizYakHealthSourceRecord.java

@@ -4,7 +4,7 @@ import java.util.Date;
4 4
 import com.fasterxml.jackson.annotation.JsonFormat;
5 5
 
6 6
 /**
7
- * 第三方健康源数据 biz_yak_health_source_record。
7
+ * 第三方健康源数据 biz_yak_health_source_record,字段与 OpenAPI 返回对齐
8 8
  */
9 9
 public class BizYakHealthSourceRecord
10 10
 {
@@ -24,11 +24,93 @@ public class BizYakHealthSourceRecord
24 24
 
25 25
     private String farmName;
26 26
 
27
+    private Long enclosureId;
28
+
29
+    private String enclosureName;
30
+
31
+    private Long cattleId;
32
+
33
+    private String earTagNumber;
34
+
35
+    /** 展示用编号:优先耳标,否则牛只ID */
27 36
     private String yakNo;
28 37
 
29
-    private String resultCode;
38
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
39
+    private Date sourceCreateTime;
40
+
41
+    private Long quarantineUnitId;
42
+
43
+    private String quarantineUnitName;
44
+
45
+    private Long quarantinePersonnelId;
46
+
47
+    private String quarantinePersonnelName;
48
+
49
+    private String quarantineItem;
50
+
51
+    private String quarantineResult;
52
+
53
+    private String quarantineReport;
54
+
55
+    private String certificate;
56
+
57
+    private String scenePicture;
58
+
59
+    private String age;
60
+
61
+    private String etiology;
62
+
63
+    private String diagnosisResult;
64
+
65
+    private String medicationName;
66
+
67
+    private String medicationMethod;
68
+
69
+    private String clinic;
70
+
71
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
72
+    private Date treatmentTime;
73
+
74
+    private String treatmentCycle;
75
+
76
+    private String treatmentEffect;
77
+
78
+    private String conditionChange;
79
+
80
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
81
+    private Date recoveryTime;
82
+
83
+    private String recoveryHealthStatus;
84
+
85
+    private String recordNo;
86
+
87
+    private String sourceType;
88
+
89
+    private Long taskId;
90
+
91
+    private String operationType;
92
+
93
+    private Long batchId;
94
+
95
+    private String cattleIds;
96
+
97
+    private Long executorUserId;
30 98
 
31
-    private String resultText;
99
+    private String executorName;
100
+
101
+    private String executeResult;
102
+
103
+    private String detailJson;
104
+
105
+    private String materialUsageJson;
106
+
107
+    private String attachments;
108
+
109
+    private String exceptionFlag;
110
+
111
+    private String exceptionDesc;
112
+
113
+    private String remark;
32 114
 
33 115
     /** 0未分析 1已分析 */
34 116
     private String analyzedFlag;
@@ -112,6 +194,46 @@ public class BizYakHealthSourceRecord
112 194
         this.farmName = farmName;
113 195
     }
114 196
 
197
+    public Long getEnclosureId()
198
+    {
199
+        return enclosureId;
200
+    }
201
+
202
+    public void setEnclosureId(Long enclosureId)
203
+    {
204
+        this.enclosureId = enclosureId;
205
+    }
206
+
207
+    public String getEnclosureName()
208
+    {
209
+        return enclosureName;
210
+    }
211
+
212
+    public void setEnclosureName(String enclosureName)
213
+    {
214
+        this.enclosureName = enclosureName;
215
+    }
216
+
217
+    public Long getCattleId()
218
+    {
219
+        return cattleId;
220
+    }
221
+
222
+    public void setCattleId(Long cattleId)
223
+    {
224
+        this.cattleId = cattleId;
225
+    }
226
+
227
+    public String getEarTagNumber()
228
+    {
229
+        return earTagNumber;
230
+    }
231
+
232
+    public void setEarTagNumber(String earTagNumber)
233
+    {
234
+        this.earTagNumber = earTagNumber;
235
+    }
236
+
115 237
     public String getYakNo()
116 238
     {
117 239
         return yakNo;
@@ -122,24 +244,374 @@ public class BizYakHealthSourceRecord
122 244
         this.yakNo = yakNo;
123 245
     }
124 246
 
125
-    public String getResultCode()
247
+    public Date getSourceCreateTime()
248
+    {
249
+        return sourceCreateTime;
250
+    }
251
+
252
+    public void setSourceCreateTime(Date sourceCreateTime)
253
+    {
254
+        this.sourceCreateTime = sourceCreateTime;
255
+    }
256
+
257
+    public Long getQuarantineUnitId()
258
+    {
259
+        return quarantineUnitId;
260
+    }
261
+
262
+    public void setQuarantineUnitId(Long quarantineUnitId)
263
+    {
264
+        this.quarantineUnitId = quarantineUnitId;
265
+    }
266
+
267
+    public String getQuarantineUnitName()
268
+    {
269
+        return quarantineUnitName;
270
+    }
271
+
272
+    public void setQuarantineUnitName(String quarantineUnitName)
273
+    {
274
+        this.quarantineUnitName = quarantineUnitName;
275
+    }
276
+
277
+    public Long getQuarantinePersonnelId()
278
+    {
279
+        return quarantinePersonnelId;
280
+    }
281
+
282
+    public void setQuarantinePersonnelId(Long quarantinePersonnelId)
283
+    {
284
+        this.quarantinePersonnelId = quarantinePersonnelId;
285
+    }
286
+
287
+    public String getQuarantinePersonnelName()
288
+    {
289
+        return quarantinePersonnelName;
290
+    }
291
+
292
+    public void setQuarantinePersonnelName(String quarantinePersonnelName)
293
+    {
294
+        this.quarantinePersonnelName = quarantinePersonnelName;
295
+    }
296
+
297
+    public String getQuarantineItem()
298
+    {
299
+        return quarantineItem;
300
+    }
301
+
302
+    public void setQuarantineItem(String quarantineItem)
303
+    {
304
+        this.quarantineItem = quarantineItem;
305
+    }
306
+
307
+    public String getQuarantineResult()
308
+    {
309
+        return quarantineResult;
310
+    }
311
+
312
+    public void setQuarantineResult(String quarantineResult)
313
+    {
314
+        this.quarantineResult = quarantineResult;
315
+    }
316
+
317
+    public String getQuarantineReport()
318
+    {
319
+        return quarantineReport;
320
+    }
321
+
322
+    public void setQuarantineReport(String quarantineReport)
323
+    {
324
+        this.quarantineReport = quarantineReport;
325
+    }
326
+
327
+    public String getCertificate()
328
+    {
329
+        return certificate;
330
+    }
331
+
332
+    public void setCertificate(String certificate)
333
+    {
334
+        this.certificate = certificate;
335
+    }
336
+
337
+    public String getScenePicture()
338
+    {
339
+        return scenePicture;
340
+    }
341
+
342
+    public void setScenePicture(String scenePicture)
343
+    {
344
+        this.scenePicture = scenePicture;
345
+    }
346
+
347
+    public String getAge()
348
+    {
349
+        return age;
350
+    }
351
+
352
+    public void setAge(String age)
353
+    {
354
+        this.age = age;
355
+    }
356
+
357
+    public String getEtiology()
358
+    {
359
+        return etiology;
360
+    }
361
+
362
+    public void setEtiology(String etiology)
363
+    {
364
+        this.etiology = etiology;
365
+    }
366
+
367
+    public String getDiagnosisResult()
368
+    {
369
+        return diagnosisResult;
370
+    }
371
+
372
+    public void setDiagnosisResult(String diagnosisResult)
373
+    {
374
+        this.diagnosisResult = diagnosisResult;
375
+    }
376
+
377
+    public String getMedicationName()
378
+    {
379
+        return medicationName;
380
+    }
381
+
382
+    public void setMedicationName(String medicationName)
383
+    {
384
+        this.medicationName = medicationName;
385
+    }
386
+
387
+    public String getMedicationMethod()
388
+    {
389
+        return medicationMethod;
390
+    }
391
+
392
+    public void setMedicationMethod(String medicationMethod)
393
+    {
394
+        this.medicationMethod = medicationMethod;
395
+    }
396
+
397
+    public String getClinic()
398
+    {
399
+        return clinic;
400
+    }
401
+
402
+    public void setClinic(String clinic)
403
+    {
404
+        this.clinic = clinic;
405
+    }
406
+
407
+    public Date getTreatmentTime()
408
+    {
409
+        return treatmentTime;
410
+    }
411
+
412
+    public void setTreatmentTime(Date treatmentTime)
413
+    {
414
+        this.treatmentTime = treatmentTime;
415
+    }
416
+
417
+    public String getTreatmentCycle()
418
+    {
419
+        return treatmentCycle;
420
+    }
421
+
422
+    public void setTreatmentCycle(String treatmentCycle)
423
+    {
424
+        this.treatmentCycle = treatmentCycle;
425
+    }
426
+
427
+    public String getTreatmentEffect()
428
+    {
429
+        return treatmentEffect;
430
+    }
431
+
432
+    public void setTreatmentEffect(String treatmentEffect)
433
+    {
434
+        this.treatmentEffect = treatmentEffect;
435
+    }
436
+
437
+    public String getConditionChange()
438
+    {
439
+        return conditionChange;
440
+    }
441
+
442
+    public void setConditionChange(String conditionChange)
443
+    {
444
+        this.conditionChange = conditionChange;
445
+    }
446
+
447
+    public Date getRecoveryTime()
448
+    {
449
+        return recoveryTime;
450
+    }
451
+
452
+    public void setRecoveryTime(Date recoveryTime)
453
+    {
454
+        this.recoveryTime = recoveryTime;
455
+    }
456
+
457
+    public String getRecoveryHealthStatus()
458
+    {
459
+        return recoveryHealthStatus;
460
+    }
461
+
462
+    public void setRecoveryHealthStatus(String recoveryHealthStatus)
463
+    {
464
+        this.recoveryHealthStatus = recoveryHealthStatus;
465
+    }
466
+
467
+    public String getRecordNo()
468
+    {
469
+        return recordNo;
470
+    }
471
+
472
+    public void setRecordNo(String recordNo)
473
+    {
474
+        this.recordNo = recordNo;
475
+    }
476
+
477
+    public String getSourceType()
478
+    {
479
+        return sourceType;
480
+    }
481
+
482
+    public void setSourceType(String sourceType)
483
+    {
484
+        this.sourceType = sourceType;
485
+    }
486
+
487
+    public Long getTaskId()
488
+    {
489
+        return taskId;
490
+    }
491
+
492
+    public void setTaskId(Long taskId)
493
+    {
494
+        this.taskId = taskId;
495
+    }
496
+
497
+    public String getOperationType()
498
+    {
499
+        return operationType;
500
+    }
501
+
502
+    public void setOperationType(String operationType)
503
+    {
504
+        this.operationType = operationType;
505
+    }
506
+
507
+    public Long getBatchId()
508
+    {
509
+        return batchId;
510
+    }
511
+
512
+    public void setBatchId(Long batchId)
513
+    {
514
+        this.batchId = batchId;
515
+    }
516
+
517
+    public String getCattleIds()
518
+    {
519
+        return cattleIds;
520
+    }
521
+
522
+    public void setCattleIds(String cattleIds)
523
+    {
524
+        this.cattleIds = cattleIds;
525
+    }
526
+
527
+    public Long getExecutorUserId()
528
+    {
529
+        return executorUserId;
530
+    }
531
+
532
+    public void setExecutorUserId(Long executorUserId)
533
+    {
534
+        this.executorUserId = executorUserId;
535
+    }
536
+
537
+    public String getExecutorName()
538
+    {
539
+        return executorName;
540
+    }
541
+
542
+    public void setExecutorName(String executorName)
543
+    {
544
+        this.executorName = executorName;
545
+    }
546
+
547
+    public String getExecuteResult()
548
+    {
549
+        return executeResult;
550
+    }
551
+
552
+    public void setExecuteResult(String executeResult)
553
+    {
554
+        this.executeResult = executeResult;
555
+    }
556
+
557
+    public String getDetailJson()
558
+    {
559
+        return detailJson;
560
+    }
561
+
562
+    public void setDetailJson(String detailJson)
563
+    {
564
+        this.detailJson = detailJson;
565
+    }
566
+
567
+    public String getMaterialUsageJson()
568
+    {
569
+        return materialUsageJson;
570
+    }
571
+
572
+    public void setMaterialUsageJson(String materialUsageJson)
573
+    {
574
+        this.materialUsageJson = materialUsageJson;
575
+    }
576
+
577
+    public String getAttachments()
578
+    {
579
+        return attachments;
580
+    }
581
+
582
+    public void setAttachments(String attachments)
583
+    {
584
+        this.attachments = attachments;
585
+    }
586
+
587
+    public String getExceptionFlag()
588
+    {
589
+        return exceptionFlag;
590
+    }
591
+
592
+    public void setExceptionFlag(String exceptionFlag)
593
+    {
594
+        this.exceptionFlag = exceptionFlag;
595
+    }
596
+
597
+    public String getExceptionDesc()
126 598
     {
127
-        return resultCode;
599
+        return exceptionDesc;
128 600
     }
129 601
 
130
-    public void setResultCode(String resultCode)
602
+    public void setExceptionDesc(String exceptionDesc)
131 603
     {
132
-        this.resultCode = resultCode;
604
+        this.exceptionDesc = exceptionDesc;
133 605
     }
134 606
 
135
-    public String getResultText()
607
+    public String getRemark()
136 608
     {
137
-        return resultText;
609
+        return remark;
138 610
     }
139 611
 
140
-    public void setResultText(String resultText)
612
+    public void setRemark(String remark)
141 613
     {
142
-        this.resultText = resultText;
614
+        this.remark = remark;
143 615
     }
144 616
 
145 617
     public String getAnalyzedFlag()

+ 150 - 44
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/dto/OpenBreedingProcessRecordDto.java

@@ -3,36 +3,52 @@ package com.ruoyi.web.modules.industryservice.domain.dto;
3 3
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 4
 
5 5
 /**
6
- * 第三方开放接口「查询养殖过程记录列表」单条记录。
7
- * 接口:{@code GET /open-api/v1/farming/breeding-process-records}
6
+ * 第三方开放接口「查询养殖过程记录列表」单条记录 OpenFarmingProcessRecordVo
7
+ * 接口:{@code GET /open-api/v1/farming/process-records}
8 8
  */
9 9
 @JsonIgnoreProperties(ignoreUnknown = true)
10 10
 public class OpenBreedingProcessRecordDto
11 11
 {
12 12
     private Long id;
13 13
 
14
+    private String recordNo;
15
+
16
+    private String sourceType;
17
+
18
+    private Long taskId;
19
+
20
+    private String operationType;
21
+
14 22
     private Long farmId;
15 23
 
16
-    private String farmName;
24
+    private Long enclosureId;
25
+
26
+    private Long batchId;
27
+
28
+    private String cattleIds;
29
+
30
+    private Long executorUserId;
31
+
32
+    private String executorName;
17 33
 
18
-    private String county;
34
+    private String executeTime;
19 35
 
20
-    private String town;
36
+    private String executeResult;
21 37
 
22
-    private String cattleNo;
38
+    private String detailJson;
23 39
 
24
-    private String earTagNumber;
40
+    private String materialUsageJson;
25 41
 
26
-    /** 记录时间 */
27
-    private String recordTime;
42
+    private String attachments;
28 43
 
29
-    /** 过程类型/内容摘要 */
30
-    private String processType;
44
+    private String exceptionFlag;
31 45
 
32
-    private String processContent;
46
+    private String exceptionDesc;
33 47
 
34 48
     private String remark;
35 49
 
50
+    private String createTime;
51
+
36 52
     public Long getId()
37 53
     {
38 54
         return id;
@@ -43,6 +59,46 @@ public class OpenBreedingProcessRecordDto
43 59
         this.id = id;
44 60
     }
45 61
 
62
+    public String getRecordNo()
63
+    {
64
+        return recordNo;
65
+    }
66
+
67
+    public void setRecordNo(String recordNo)
68
+    {
69
+        this.recordNo = recordNo;
70
+    }
71
+
72
+    public String getSourceType()
73
+    {
74
+        return sourceType;
75
+    }
76
+
77
+    public void setSourceType(String sourceType)
78
+    {
79
+        this.sourceType = sourceType;
80
+    }
81
+
82
+    public Long getTaskId()
83
+    {
84
+        return taskId;
85
+    }
86
+
87
+    public void setTaskId(Long taskId)
88
+    {
89
+        this.taskId = taskId;
90
+    }
91
+
92
+    public String getOperationType()
93
+    {
94
+        return operationType;
95
+    }
96
+
97
+    public void setOperationType(String operationType)
98
+    {
99
+        this.operationType = operationType;
100
+    }
101
+
46 102
     public Long getFarmId()
47 103
     {
48 104
         return farmId;
@@ -53,84 +109,124 @@ public class OpenBreedingProcessRecordDto
53 109
         this.farmId = farmId;
54 110
     }
55 111
 
56
-    public String getFarmName()
112
+    public Long getEnclosureId()
113
+    {
114
+        return enclosureId;
115
+    }
116
+
117
+    public void setEnclosureId(Long enclosureId)
118
+    {
119
+        this.enclosureId = enclosureId;
120
+    }
121
+
122
+    public Long getBatchId()
123
+    {
124
+        return batchId;
125
+    }
126
+
127
+    public void setBatchId(Long batchId)
128
+    {
129
+        this.batchId = batchId;
130
+    }
131
+
132
+    public String getCattleIds()
133
+    {
134
+        return cattleIds;
135
+    }
136
+
137
+    public void setCattleIds(String cattleIds)
57 138
     {
58
-        return farmName;
139
+        this.cattleIds = cattleIds;
59 140
     }
60 141
 
61
-    public void setFarmName(String farmName)
142
+    public Long getExecutorUserId()
62 143
     {
63
-        this.farmName = farmName;
144
+        return executorUserId;
64 145
     }
65 146
 
66
-    public String getCounty()
147
+    public void setExecutorUserId(Long executorUserId)
67 148
     {
68
-        return county;
149
+        this.executorUserId = executorUserId;
69 150
     }
70 151
 
71
-    public void setCounty(String county)
152
+    public String getExecutorName()
72 153
     {
73
-        this.county = county;
154
+        return executorName;
74 155
     }
75 156
 
76
-    public String getTown()
157
+    public void setExecutorName(String executorName)
77 158
     {
78
-        return town;
159
+        this.executorName = executorName;
79 160
     }
80 161
 
81
-    public void setTown(String town)
162
+    public String getExecuteTime()
82 163
     {
83
-        this.town = town;
164
+        return executeTime;
84 165
     }
85 166
 
86
-    public String getCattleNo()
167
+    public void setExecuteTime(String executeTime)
87 168
     {
88
-        return cattleNo;
169
+        this.executeTime = executeTime;
89 170
     }
90 171
 
91
-    public void setCattleNo(String cattleNo)
172
+    public String getExecuteResult()
92 173
     {
93
-        this.cattleNo = cattleNo;
174
+        return executeResult;
94 175
     }
95 176
 
96
-    public String getEarTagNumber()
177
+    public void setExecuteResult(String executeResult)
97 178
     {
98
-        return earTagNumber;
179
+        this.executeResult = executeResult;
99 180
     }
100 181
 
101
-    public void setEarTagNumber(String earTagNumber)
182
+    public String getDetailJson()
102 183
     {
103
-        this.earTagNumber = earTagNumber;
184
+        return detailJson;
104 185
     }
105 186
 
106
-    public String getRecordTime()
187
+    public void setDetailJson(String detailJson)
107 188
     {
108
-        return recordTime;
189
+        this.detailJson = detailJson;
109 190
     }
110 191
 
111
-    public void setRecordTime(String recordTime)
192
+    public String getMaterialUsageJson()
112 193
     {
113
-        this.recordTime = recordTime;
194
+        return materialUsageJson;
114 195
     }
115 196
 
116
-    public String getProcessType()
197
+    public void setMaterialUsageJson(String materialUsageJson)
117 198
     {
118
-        return processType;
199
+        this.materialUsageJson = materialUsageJson;
119 200
     }
120 201
 
121
-    public void setProcessType(String processType)
202
+    public String getAttachments()
122 203
     {
123
-        this.processType = processType;
204
+        return attachments;
124 205
     }
125 206
 
126
-    public String getProcessContent()
207
+    public void setAttachments(String attachments)
127 208
     {
128
-        return processContent;
209
+        this.attachments = attachments;
129 210
     }
130 211
 
131
-    public void setProcessContent(String processContent)
212
+    public String getExceptionFlag()
132 213
     {
133
-        this.processContent = processContent;
214
+        return exceptionFlag;
215
+    }
216
+
217
+    public void setExceptionFlag(String exceptionFlag)
218
+    {
219
+        this.exceptionFlag = exceptionFlag;
220
+    }
221
+
222
+    public String getExceptionDesc()
223
+    {
224
+        return exceptionDesc;
225
+    }
226
+
227
+    public void setExceptionDesc(String exceptionDesc)
228
+    {
229
+        this.exceptionDesc = exceptionDesc;
134 230
     }
135 231
 
136 232
     public String getRemark()
@@ -142,4 +238,14 @@ public class OpenBreedingProcessRecordDto
142 238
     {
143 239
         this.remark = remark;
144 240
     }
241
+
242
+    public String getCreateTime()
243
+    {
244
+        return createTime;
245
+    }
246
+
247
+    public void setCreateTime(String createTime)
248
+    {
249
+        this.createTime = createTime;
250
+    }
145 251
 }

+ 130 - 48
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/dto/OpenDiagnosisRecordDto.java

@@ -3,7 +3,7 @@ package com.ruoyi.web.modules.industryservice.domain.dto;
3 3
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 4
 
5 5
 /**
6
- * 第三方开放接口「查询诊疗记录列表」单条记录。
6
+ * 第三方开放接口「查询诊疗记录列表」单条记录 OpenHealthVo
7 7
  * 接口:{@code GET /open-api/v1/farming/diagnosis-records}
8 8
  */
9 9
 @JsonIgnoreProperties(ignoreUnknown = true)
@@ -13,25 +13,37 @@ public class OpenDiagnosisRecordDto
13 13
 
14 14
     private Long farmId;
15 15
 
16
-    private String farmName;
16
+    private Long farmEnclosureId;
17 17
 
18
-    private String county;
18
+    private Long cattleId;
19 19
 
20
-    private String town;
20
+    private String age;
21 21
 
22
-    private String cattleNo;
22
+    private String etiology;
23 23
 
24
-    private String earTagNumber;
25
-
26
-    /** 诊疗时间 */
27 24
     private String diagnosisTime;
28 25
 
29
-    /** 病种/诊断结果 */
30
-    private String diseaseName;
31
-
32 26
     private String diagnosisResult;
33 27
 
34
-    private String remark;
28
+    private String medicationName;
29
+
30
+    private String medicationMethod;
31
+
32
+    private String clinic;
33
+
34
+    private String treatmentTime;
35
+
36
+    private String treatmentCycle;
37
+
38
+    private String treatmentEffect;
39
+
40
+    private String conditionChange;
41
+
42
+    private String recoveryTime;
43
+
44
+    private String recoveryHealthStatus;
45
+
46
+    private String createTime;
35 47
 
36 48
     public Long getId()
37 49
     {
@@ -53,93 +65,163 @@ public class OpenDiagnosisRecordDto
53 65
         this.farmId = farmId;
54 66
     }
55 67
 
56
-    public String getFarmName()
68
+    public Long getFarmEnclosureId()
57 69
     {
58
-        return farmName;
70
+        return farmEnclosureId;
59 71
     }
60 72
 
61
-    public void setFarmName(String farmName)
73
+    public void setFarmEnclosureId(Long farmEnclosureId)
62 74
     {
63
-        this.farmName = farmName;
75
+        this.farmEnclosureId = farmEnclosureId;
64 76
     }
65 77
 
66
-    public String getCounty()
78
+    public Long getCattleId()
67 79
     {
68
-        return county;
80
+        return cattleId;
69 81
     }
70 82
 
71
-    public void setCounty(String county)
83
+    public void setCattleId(Long cattleId)
72 84
     {
73
-        this.county = county;
85
+        this.cattleId = cattleId;
74 86
     }
75 87
 
76
-    public String getTown()
88
+    public String getAge()
77 89
     {
78
-        return town;
90
+        return age;
79 91
     }
80 92
 
81
-    public void setTown(String town)
93
+    public void setAge(String age)
82 94
     {
83
-        this.town = town;
95
+        this.age = age;
84 96
     }
85 97
 
86
-    public String getCattleNo()
98
+    public String getEtiology()
87 99
     {
88
-        return cattleNo;
100
+        return etiology;
89 101
     }
90 102
 
91
-    public void setCattleNo(String cattleNo)
103
+    public void setEtiology(String etiology)
92 104
     {
93
-        this.cattleNo = cattleNo;
105
+        this.etiology = etiology;
94 106
     }
95 107
 
96
-    public String getEarTagNumber()
108
+    public String getDiagnosisTime()
97 109
     {
98
-        return earTagNumber;
110
+        return diagnosisTime;
99 111
     }
100 112
 
101
-    public void setEarTagNumber(String earTagNumber)
113
+    public void setDiagnosisTime(String diagnosisTime)
102 114
     {
103
-        this.earTagNumber = earTagNumber;
115
+        this.diagnosisTime = diagnosisTime;
104 116
     }
105 117
 
106
-    public String getDiagnosisTime()
118
+    public String getDiagnosisResult()
107 119
     {
108
-        return diagnosisTime;
120
+        return diagnosisResult;
109 121
     }
110 122
 
111
-    public void setDiagnosisTime(String diagnosisTime)
123
+    public void setDiagnosisResult(String diagnosisResult)
112 124
     {
113
-        this.diagnosisTime = diagnosisTime;
125
+        this.diagnosisResult = diagnosisResult;
114 126
     }
115 127
 
116
-    public String getDiseaseName()
128
+    public String getMedicationName()
117 129
     {
118
-        return diseaseName;
130
+        return medicationName;
119 131
     }
120 132
 
121
-    public void setDiseaseName(String diseaseName)
133
+    public void setMedicationName(String medicationName)
122 134
     {
123
-        this.diseaseName = diseaseName;
135
+        this.medicationName = medicationName;
124 136
     }
125 137
 
126
-    public String getDiagnosisResult()
138
+    public String getMedicationMethod()
127 139
     {
128
-        return diagnosisResult;
140
+        return medicationMethod;
129 141
     }
130 142
 
131
-    public void setDiagnosisResult(String diagnosisResult)
143
+    public void setMedicationMethod(String medicationMethod)
132 144
     {
133
-        this.diagnosisResult = diagnosisResult;
145
+        this.medicationMethod = medicationMethod;
146
+    }
147
+
148
+    public String getClinic()
149
+    {
150
+        return clinic;
151
+    }
152
+
153
+    public void setClinic(String clinic)
154
+    {
155
+        this.clinic = clinic;
156
+    }
157
+
158
+    public String getTreatmentTime()
159
+    {
160
+        return treatmentTime;
161
+    }
162
+
163
+    public void setTreatmentTime(String treatmentTime)
164
+    {
165
+        this.treatmentTime = treatmentTime;
166
+    }
167
+
168
+    public String getTreatmentCycle()
169
+    {
170
+        return treatmentCycle;
171
+    }
172
+
173
+    public void setTreatmentCycle(String treatmentCycle)
174
+    {
175
+        this.treatmentCycle = treatmentCycle;
176
+    }
177
+
178
+    public String getTreatmentEffect()
179
+    {
180
+        return treatmentEffect;
181
+    }
182
+
183
+    public void setTreatmentEffect(String treatmentEffect)
184
+    {
185
+        this.treatmentEffect = treatmentEffect;
186
+    }
187
+
188
+    public String getConditionChange()
189
+    {
190
+        return conditionChange;
191
+    }
192
+
193
+    public void setConditionChange(String conditionChange)
194
+    {
195
+        this.conditionChange = conditionChange;
196
+    }
197
+
198
+    public String getRecoveryTime()
199
+    {
200
+        return recoveryTime;
201
+    }
202
+
203
+    public void setRecoveryTime(String recoveryTime)
204
+    {
205
+        this.recoveryTime = recoveryTime;
206
+    }
207
+
208
+    public String getRecoveryHealthStatus()
209
+    {
210
+        return recoveryHealthStatus;
211
+    }
212
+
213
+    public void setRecoveryHealthStatus(String recoveryHealthStatus)
214
+    {
215
+        this.recoveryHealthStatus = recoveryHealthStatus;
134 216
     }
135 217
 
136
-    public String getRemark()
218
+    public String getCreateTime()
137 219
     {
138
-        return remark;
220
+        return createTime;
139 221
     }
140 222
 
141
-    public void setRemark(String remark)
223
+    public void setCreateTime(String createTime)
142 224
     {
143
-        this.remark = remark;
225
+        this.createTime = createTime;
144 226
     }
145 227
 }

+ 122 - 28
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/domain/dto/OpenQuarantineRecordDto.java

@@ -3,7 +3,7 @@ package com.ruoyi.web.modules.industryservice.domain.dto;
3 3
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 4
 
5 5
 /**
6
- * 第三方开放接口「查询检疫记录列表」单条记录。
6
+ * 第三方开放接口「查询检疫记录列表」单条记录 OpenQuarantineRecordVo
7 7
  * 接口:{@code GET /open-api/v1/farming/quarantine-records}
8 8
  */
9 9
 @JsonIgnoreProperties(ignoreUnknown = true)
@@ -15,21 +15,35 @@ public class OpenQuarantineRecordDto
15 15
 
16 16
     private String farmName;
17 17
 
18
-    private String county;
18
+    private Long farmEnclosureId;
19 19
 
20
-    private String town;
20
+    private String farmEnclosureName;
21 21
 
22
-    private String cattleNo;
22
+    private Long cattleId;
23 23
 
24 24
     private String earTagNumber;
25 25
 
26
-    /** 检疫时间 */
27
-    private String quarantineTime;
26
+    private Long quarantineUnitId;
27
+
28
+    private String quarantineUnitName;
29
+
30
+    private Long quarantinePersonnelId;
31
+
32
+    private String quarantinePersonnelName;
33
+
34
+    private String quarantineItem;
28 35
 
29
-    /** 检疫结果(正常/异常/阳性等) */
30 36
     private String quarantineResult;
31 37
 
32
-    private String remark;
38
+    private String quarantineTime;
39
+
40
+    private String quarantineReport;
41
+
42
+    private String certificate;
43
+
44
+    private String scenePicture;
45
+
46
+    private String createTime;
33 47
 
34 48
     public Long getId()
35 49
     {
@@ -61,34 +75,34 @@ public class OpenQuarantineRecordDto
61 75
         this.farmName = farmName;
62 76
     }
63 77
 
64
-    public String getCounty()
78
+    public Long getFarmEnclosureId()
65 79
     {
66
-        return county;
80
+        return farmEnclosureId;
67 81
     }
68 82
 
69
-    public void setCounty(String county)
83
+    public void setFarmEnclosureId(Long farmEnclosureId)
70 84
     {
71
-        this.county = county;
85
+        this.farmEnclosureId = farmEnclosureId;
72 86
     }
73 87
 
74
-    public String getTown()
88
+    public String getFarmEnclosureName()
75 89
     {
76
-        return town;
90
+        return farmEnclosureName;
77 91
     }
78 92
 
79
-    public void setTown(String town)
93
+    public void setFarmEnclosureName(String farmEnclosureName)
80 94
     {
81
-        this.town = town;
95
+        this.farmEnclosureName = farmEnclosureName;
82 96
     }
83 97
 
84
-    public String getCattleNo()
98
+    public Long getCattleId()
85 99
     {
86
-        return cattleNo;
100
+        return cattleId;
87 101
     }
88 102
 
89
-    public void setCattleNo(String cattleNo)
103
+    public void setCattleId(Long cattleId)
90 104
     {
91
-        this.cattleNo = cattleNo;
105
+        this.cattleId = cattleId;
92 106
     }
93 107
 
94 108
     public String getEarTagNumber()
@@ -101,14 +115,54 @@ public class OpenQuarantineRecordDto
101 115
         this.earTagNumber = earTagNumber;
102 116
     }
103 117
 
104
-    public String getQuarantineTime()
118
+    public Long getQuarantineUnitId()
105 119
     {
106
-        return quarantineTime;
120
+        return quarantineUnitId;
107 121
     }
108 122
 
109
-    public void setQuarantineTime(String quarantineTime)
123
+    public void setQuarantineUnitId(Long quarantineUnitId)
110 124
     {
111
-        this.quarantineTime = quarantineTime;
125
+        this.quarantineUnitId = quarantineUnitId;
126
+    }
127
+
128
+    public String getQuarantineUnitName()
129
+    {
130
+        return quarantineUnitName;
131
+    }
132
+
133
+    public void setQuarantineUnitName(String quarantineUnitName)
134
+    {
135
+        this.quarantineUnitName = quarantineUnitName;
136
+    }
137
+
138
+    public Long getQuarantinePersonnelId()
139
+    {
140
+        return quarantinePersonnelId;
141
+    }
142
+
143
+    public void setQuarantinePersonnelId(Long quarantinePersonnelId)
144
+    {
145
+        this.quarantinePersonnelId = quarantinePersonnelId;
146
+    }
147
+
148
+    public String getQuarantinePersonnelName()
149
+    {
150
+        return quarantinePersonnelName;
151
+    }
152
+
153
+    public void setQuarantinePersonnelName(String quarantinePersonnelName)
154
+    {
155
+        this.quarantinePersonnelName = quarantinePersonnelName;
156
+    }
157
+
158
+    public String getQuarantineItem()
159
+    {
160
+        return quarantineItem;
161
+    }
162
+
163
+    public void setQuarantineItem(String quarantineItem)
164
+    {
165
+        this.quarantineItem = quarantineItem;
112 166
     }
113 167
 
114 168
     public String getQuarantineResult()
@@ -121,13 +175,53 @@ public class OpenQuarantineRecordDto
121 175
         this.quarantineResult = quarantineResult;
122 176
     }
123 177
 
124
-    public String getRemark()
178
+    public String getQuarantineTime()
179
+    {
180
+        return quarantineTime;
181
+    }
182
+
183
+    public void setQuarantineTime(String quarantineTime)
184
+    {
185
+        this.quarantineTime = quarantineTime;
186
+    }
187
+
188
+    public String getQuarantineReport()
189
+    {
190
+        return quarantineReport;
191
+    }
192
+
193
+    public void setQuarantineReport(String quarantineReport)
194
+    {
195
+        this.quarantineReport = quarantineReport;
196
+    }
197
+
198
+    public String getCertificate()
199
+    {
200
+        return certificate;
201
+    }
202
+
203
+    public void setCertificate(String certificate)
204
+    {
205
+        this.certificate = certificate;
206
+    }
207
+
208
+    public String getScenePicture()
209
+    {
210
+        return scenePicture;
211
+    }
212
+
213
+    public void setScenePicture(String scenePicture)
214
+    {
215
+        this.scenePicture = scenePicture;
216
+    }
217
+
218
+    public String getCreateTime()
125 219
     {
126
-        return remark;
220
+        return createTime;
127 221
     }
128 222
 
129
-    public void setRemark(String remark)
223
+    public void setCreateTime(String createTime)
130 224
     {
131
-        this.remark = remark;
225
+        this.createTime = createTime;
132 226
     }
133 227
 }

+ 1 - 1
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/service/YakDiseaseWarningAnalyzer.java

@@ -70,7 +70,7 @@ public class YakDiseaseWarningAnalyzer
70 70
             {
71 71
                 for (BizYakHealthSourceRecord row : group)
72 72
                 {
73
-                    if (YakDiseaseWarningAnalysisRules.isAbnormalQuarantineResult(row.getResultCode()))
73
+                    if (YakDiseaseWarningAnalysisRules.isAbnormalQuarantineResult(row.getQuarantineResult()))
74 74
                     {
75 75
                         hits.add(row);
76 76
                     }

+ 87 - 25
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/support/HealthRecordOpenApiMapper.java

@@ -28,11 +28,23 @@ public final class HealthRecordOpenApiMapper
28 28
     {
29 29
         requireId(dto != null ? dto.getId() : null, "检疫记录");
30 30
         BizYakHealthSourceRecord row = baseRow(YakDiseaseWarningAnalysisRules.RECORD_TYPE_QUARANTINE,
31
-                "Q:" + dto.getId(), dto.getFarmId(), dto.getFarmName(), dto.getCounty(), dto.getTown());
32
-        row.setYakNo(resolveYakNo(dto.getEarTagNumber(), dto.getCattleNo()));
33
-        row.setRecordTime(parseDateTime(dto.getQuarantineTime()));
34
-        row.setResultCode(StringUtils.trim(dto.getQuarantineResult()));
35
-        row.setResultText(StringUtils.trim(dto.getRemark()));
31
+                "Q:" + dto.getId(), dto.getFarmId(), dto.getFarmName());
32
+        row.setEnclosureId(dto.getFarmEnclosureId());
33
+        row.setEnclosureName(StringUtils.trim(dto.getFarmEnclosureName()));
34
+        row.setCattleId(dto.getCattleId());
35
+        row.setEarTagNumber(StringUtils.trim(dto.getEarTagNumber()));
36
+        row.setYakNo(resolveYakNo(dto.getEarTagNumber(), dto.getCattleId()));
37
+        row.setRecordTime(parseDateTimeRequired(dto.getQuarantineTime(), "检疫时间"));
38
+        row.setSourceCreateTime(parseDateTimeOptional(dto.getCreateTime()));
39
+        row.setQuarantineUnitId(dto.getQuarantineUnitId());
40
+        row.setQuarantineUnitName(StringUtils.trim(dto.getQuarantineUnitName()));
41
+        row.setQuarantinePersonnelId(dto.getQuarantinePersonnelId());
42
+        row.setQuarantinePersonnelName(StringUtils.trim(dto.getQuarantinePersonnelName()));
43
+        row.setQuarantineItem(StringUtils.trim(dto.getQuarantineItem()));
44
+        row.setQuarantineResult(StringUtils.trim(dto.getQuarantineResult()));
45
+        row.setQuarantineReport(StringUtils.trim(dto.getQuarantineReport()));
46
+        row.setCertificate(StringUtils.trim(dto.getCertificate()));
47
+        row.setScenePicture(StringUtils.trim(dto.getScenePicture()));
36 48
         return row;
37 49
     }
38 50
 
@@ -40,12 +52,24 @@ public final class HealthRecordOpenApiMapper
40 52
     {
41 53
         requireId(dto != null ? dto.getId() : null, "诊疗记录");
42 54
         BizYakHealthSourceRecord row = baseRow(YakDiseaseWarningAnalysisRules.RECORD_TYPE_DIAGNOSIS,
43
-                "D:" + dto.getId(), dto.getFarmId(), dto.getFarmName(), dto.getCounty(), dto.getTown());
44
-        row.setYakNo(resolveYakNo(dto.getEarTagNumber(), dto.getCattleNo()));
45
-        row.setRecordTime(parseDateTime(dto.getDiagnosisTime()));
46
-        String disease = StringUtils.isNotEmpty(dto.getDiseaseName()) ? dto.getDiseaseName() : dto.getDiagnosisResult();
47
-        row.setResultCode(StringUtils.trim(disease));
48
-        row.setResultText(StringUtils.trim(dto.getRemark()));
55
+                "D:" + dto.getId(), dto.getFarmId(), null);
56
+        row.setEnclosureId(dto.getFarmEnclosureId());
57
+        row.setCattleId(dto.getCattleId());
58
+        row.setYakNo(resolveYakNo(null, dto.getCattleId()));
59
+        row.setRecordTime(parseDateTimeRequired(dto.getDiagnosisTime(), "诊疗时间"));
60
+        row.setSourceCreateTime(parseDateTimeOptional(dto.getCreateTime()));
61
+        row.setAge(StringUtils.trim(dto.getAge()));
62
+        row.setEtiology(StringUtils.trim(dto.getEtiology()));
63
+        row.setDiagnosisResult(StringUtils.trim(dto.getDiagnosisResult()));
64
+        row.setMedicationName(StringUtils.trim(dto.getMedicationName()));
65
+        row.setMedicationMethod(StringUtils.trim(dto.getMedicationMethod()));
66
+        row.setClinic(StringUtils.trim(dto.getClinic()));
67
+        row.setTreatmentTime(parseDateTimeOptional(dto.getTreatmentTime()));
68
+        row.setTreatmentCycle(StringUtils.trim(dto.getTreatmentCycle()));
69
+        row.setTreatmentEffect(StringUtils.trim(dto.getTreatmentEffect()));
70
+        row.setConditionChange(StringUtils.trim(dto.getConditionChange()));
71
+        row.setRecoveryTime(parseDateTimeOptional(dto.getRecoveryTime()));
72
+        row.setRecoveryHealthStatus(StringUtils.trim(dto.getRecoveryHealthStatus()));
49 73
         return row;
50 74
     }
51 75
 
@@ -53,40 +77,65 @@ public final class HealthRecordOpenApiMapper
53 77
     {
54 78
         requireId(dto != null ? dto.getId() : null, "养殖过程记录");
55 79
         BizYakHealthSourceRecord row = baseRow(YakDiseaseWarningAnalysisRules.RECORD_TYPE_BREEDING,
56
-                "B:" + dto.getId(), dto.getFarmId(), dto.getFarmName(), dto.getCounty(), dto.getTown());
57
-        row.setYakNo(resolveYakNo(dto.getEarTagNumber(), dto.getCattleNo()));
58
-        row.setRecordTime(parseDateTime(dto.getRecordTime()));
59
-        row.setResultCode(StringUtils.trim(dto.getProcessType()));
60
-        row.setResultText(StringUtils.trim(dto.getProcessContent()));
80
+                "B:" + dto.getId(), dto.getFarmId(), null);
81
+        row.setRecordNo(StringUtils.trim(dto.getRecordNo()));
82
+        row.setSourceType(StringUtils.trim(dto.getSourceType()));
83
+        row.setTaskId(dto.getTaskId());
84
+        row.setOperationType(StringUtils.trim(dto.getOperationType()));
85
+        row.setEnclosureId(dto.getEnclosureId());
86
+        row.setBatchId(dto.getBatchId());
87
+        row.setCattleIds(StringUtils.trim(dto.getCattleIds()));
88
+        row.setYakNo(resolveProcessYakNo(dto.getCattleIds()));
89
+        row.setRecordTime(parseDateTimeRequired(dto.getExecuteTime(), "执行时间"));
90
+        row.setSourceCreateTime(parseDateTimeOptional(dto.getCreateTime()));
91
+        row.setExecutorUserId(dto.getExecutorUserId());
92
+        row.setExecutorName(StringUtils.trim(dto.getExecutorName()));
93
+        row.setExecuteResult(StringUtils.trim(dto.getExecuteResult()));
94
+        row.setDetailJson(StringUtils.trim(dto.getDetailJson()));
95
+        row.setMaterialUsageJson(StringUtils.trim(dto.getMaterialUsageJson()));
96
+        row.setAttachments(StringUtils.trim(dto.getAttachments()));
97
+        row.setExceptionFlag(StringUtils.trim(dto.getExceptionFlag()));
98
+        row.setExceptionDesc(StringUtils.trim(dto.getExceptionDesc()));
99
+        row.setRemark(StringUtils.trim(dto.getRemark()));
61 100
         return row;
62 101
     }
63 102
 
64
-    private static BizYakHealthSourceRecord baseRow(int recordType, String externalId, Long farmId, String farmName,
65
-            String county, String town)
103
+    private static BizYakHealthSourceRecord baseRow(int recordType, String externalId, Long farmId, String farmName)
66 104
     {
67 105
         BizYakHealthSourceRecord row = new BizYakHealthSourceRecord();
68 106
         row.setRecordType(recordType);
69 107
         row.setExternalId(externalId);
70 108
         row.setFarmId(farmId);
71 109
         row.setFarmName(StringUtils.trim(farmName));
72
-        row.setRegionKey(HealthRecordRegionSupport.buildRegionKey(county, town, farmId, farmName));
110
+        row.setRegionKey(HealthRecordRegionSupport.buildRegionKey(farmId, farmName));
73 111
         row.setAnalyzedFlag(YakDiseaseWarningAnalysisRules.ANALYZED_NO);
74 112
         return row;
75 113
     }
76 114
 
77
-    private static String resolveYakNo(String earTag, String cattleNo)
115
+    private static String resolveYakNo(String earTag, Long cattleId)
78 116
     {
79 117
         if (StringUtils.isNotEmpty(earTag))
80 118
         {
81 119
             return earTag.trim();
82 120
         }
83
-        if (StringUtils.isNotEmpty(cattleNo))
121
+        if (cattleId != null)
84 122
         {
85
-            return cattleNo.trim();
123
+            return String.valueOf(cattleId);
86 124
         }
87 125
         return null;
88 126
     }
89 127
 
128
+    private static String resolveProcessYakNo(String cattleIds)
129
+    {
130
+        if (StringUtils.isEmpty(cattleIds))
131
+        {
132
+            return null;
133
+        }
134
+        String text = cattleIds.trim();
135
+        int comma = text.indexOf(',');
136
+        return comma > 0 ? text.substring(0, comma).trim() : text;
137
+    }
138
+
90 139
     private static void requireId(Long id, String label)
91 140
     {
92 141
         if (id == null)
@@ -95,13 +144,26 @@ public final class HealthRecordOpenApiMapper
95 144
         }
96 145
     }
97 146
 
98
-    private static Date parseDateTime(String value)
147
+    private static Date parseDateTimeRequired(String value, String label)
148
+    {
149
+        if (StringUtils.isEmpty(value))
150
+        {
151
+            throw new ServiceException(label + "不能为空");
152
+        }
153
+        return parseDateTime(value.trim());
154
+    }
155
+
156
+    private static Date parseDateTimeOptional(String value)
99 157
     {
100 158
         if (StringUtils.isEmpty(value))
101 159
         {
102
-            throw new ServiceException("记录时间不能为空");
160
+            return null;
103 161
         }
104
-        String text = value.trim();
162
+        return parseDateTime(value.trim());
163
+    }
164
+
165
+    private static Date parseDateTime(String text)
166
+    {
105 167
         try
106 168
         {
107 169
             synchronized (DATE_TIME)

+ 2 - 8
baqing-admin/src/main/java/com/ruoyi/web/modules/industryservice/support/HealthRecordRegionSupport.java

@@ -3,7 +3,7 @@ package com.ruoyi.web.modules.industryservice.support;
3 3
 import com.ruoyi.common.utils.StringUtils;
4 4
 
5 5
 /**
6
- * 健康源数据地区键构建。
6
+ * 健康源数据地区键构建(按牧场维度集中判断)
7 7
  */
8 8
 public final class HealthRecordRegionSupport
9 9
 {
@@ -11,14 +11,8 @@ public final class HealthRecordRegionSupport
11 11
     {
12 12
     }
13 13
 
14
-    public static String buildRegionKey(String county, String town, Long farmId, String farmName)
14
+    public static String buildRegionKey(Long farmId, String farmName)
15 15
     {
16
-        String countyPart = trimOrEmpty(county);
17
-        String townPart = trimOrEmpty(town);
18
-        if (StringUtils.isNotEmpty(countyPart) || StringUtils.isNotEmpty(townPart))
19
-        {
20
-            return countyPart + "|" + townPart;
21
-        }
22 16
         if (farmId != null)
23 17
         {
24 18
             return "F:" + farmId;

+ 121 - 19
baqing-admin/src/main/resources/mapper/industryservice/BizYakHealthSourceRecordMapper.xml

@@ -3,25 +3,72 @@
3 3
 <mapper namespace="com.ruoyi.web.modules.industryservice.mapper.BizYakHealthSourceRecordMapper">
4 4
 
5 5
     <resultMap type="com.ruoyi.web.modules.industryservice.domain.BizYakHealthSourceRecord" id="BizYakHealthSourceRecordResult">
6
-        <id     property="id"            column="id"/>
7
-        <result property="externalId"    column="external_id"/>
8
-        <result property="recordType"    column="record_type"/>
9
-        <result property="recordTime"    column="record_time"/>
10
-        <result property="regionKey"     column="region_key"/>
11
-        <result property="farmId"        column="farm_id"/>
12
-        <result property="farmName"      column="farm_name"/>
13
-        <result property="yakNo"         column="yak_no"/>
14
-        <result property="resultCode"    column="result_code"/>
15
-        <result property="resultText"    column="result_text"/>
16
-        <result property="analyzedFlag"  column="analyzed_flag"/>
17
-        <result property="lastSyncTime"  column="last_sync_time"/>
18
-        <result property="createTime"    column="create_time"/>
19
-        <result property="updateTime"    column="update_time"/>
6
+        <id     property="id"                      column="id"/>
7
+        <result property="externalId"              column="external_id"/>
8
+        <result property="recordType"              column="record_type"/>
9
+        <result property="recordTime"              column="record_time"/>
10
+        <result property="regionKey"               column="region_key"/>
11
+        <result property="farmId"                  column="farm_id"/>
12
+        <result property="farmName"                column="farm_name"/>
13
+        <result property="enclosureId"             column="enclosure_id"/>
14
+        <result property="enclosureName"           column="enclosure_name"/>
15
+        <result property="cattleId"                column="cattle_id"/>
16
+        <result property="earTagNumber"            column="ear_tag_number"/>
17
+        <result property="yakNo"                   column="yak_no"/>
18
+        <result property="sourceCreateTime"        column="source_create_time"/>
19
+        <result property="quarantineUnitId"        column="quarantine_unit_id"/>
20
+        <result property="quarantineUnitName"      column="quarantine_unit_name"/>
21
+        <result property="quarantinePersonnelId"   column="quarantine_personnel_id"/>
22
+        <result property="quarantinePersonnelName" column="quarantine_personnel_name"/>
23
+        <result property="quarantineItem"          column="quarantine_item"/>
24
+        <result property="quarantineResult"        column="quarantine_result"/>
25
+        <result property="quarantineReport"        column="quarantine_report"/>
26
+        <result property="certificate"             column="certificate"/>
27
+        <result property="scenePicture"            column="scene_picture"/>
28
+        <result property="age"                     column="age"/>
29
+        <result property="etiology"                column="etiology"/>
30
+        <result property="diagnosisResult"         column="diagnosis_result"/>
31
+        <result property="medicationName"          column="medication_name"/>
32
+        <result property="medicationMethod"        column="medication_method"/>
33
+        <result property="clinic"                  column="clinic"/>
34
+        <result property="treatmentTime"           column="treatment_time"/>
35
+        <result property="treatmentCycle"          column="treatment_cycle"/>
36
+        <result property="treatmentEffect"         column="treatment_effect"/>
37
+        <result property="conditionChange"         column="condition_change"/>
38
+        <result property="recoveryTime"            column="recovery_time"/>
39
+        <result property="recoveryHealthStatus"    column="recovery_health_status"/>
40
+        <result property="recordNo"                column="record_no"/>
41
+        <result property="sourceType"              column="source_type"/>
42
+        <result property="taskId"                  column="task_id"/>
43
+        <result property="operationType"           column="operation_type"/>
44
+        <result property="batchId"                 column="batch_id"/>
45
+        <result property="cattleIds"               column="cattle_ids"/>
46
+        <result property="executorUserId"          column="executor_user_id"/>
47
+        <result property="executorName"            column="executor_name"/>
48
+        <result property="executeResult"           column="execute_result"/>
49
+        <result property="detailJson"              column="detail_json"/>
50
+        <result property="materialUsageJson"       column="material_usage_json"/>
51
+        <result property="attachments"             column="attachments"/>
52
+        <result property="exceptionFlag"           column="exception_flag"/>
53
+        <result property="exceptionDesc"           column="exception_desc"/>
54
+        <result property="remark"                  column="remark"/>
55
+        <result property="analyzedFlag"            column="analyzed_flag"/>
56
+        <result property="lastSyncTime"            column="last_sync_time"/>
57
+        <result property="createTime"              column="create_time"/>
58
+        <result property="updateTime"              column="update_time"/>
20 59
     </resultMap>
21 60
 
22 61
     <sql id="selectVo">
23 62
         select id, external_id, record_type, record_time, region_key, farm_id, farm_name,
24
-               yak_no, result_code, result_text, analyzed_flag, last_sync_time, create_time, update_time
63
+               enclosure_id, enclosure_name, cattle_id, ear_tag_number, yak_no, source_create_time,
64
+               quarantine_unit_id, quarantine_unit_name, quarantine_personnel_id, quarantine_personnel_name,
65
+               quarantine_item, quarantine_result, quarantine_report, certificate, scene_picture,
66
+               age, etiology, diagnosis_result, medication_name, medication_method, clinic,
67
+               treatment_time, treatment_cycle, treatment_effect, condition_change, recovery_time, recovery_health_status,
68
+               record_no, source_type, task_id, operation_type, batch_id, cattle_ids,
69
+               executor_user_id, executor_name, execute_result, detail_json, material_usage_json, attachments,
70
+               exception_flag, exception_desc, remark,
71
+               analyzed_flag, last_sync_time, create_time, update_time
25 72
         from biz_yak_health_source_record
26 73
     </sql>
27 74
 
@@ -40,10 +87,26 @@
40 87
             useGeneratedKeys="true" keyProperty="id">
41 88
         insert into biz_yak_health_source_record (
42 89
             external_id, record_type, record_time, region_key, farm_id, farm_name,
43
-            yak_no, result_code, result_text, analyzed_flag, last_sync_time, create_time
90
+            enclosure_id, enclosure_name, cattle_id, ear_tag_number, yak_no, source_create_time,
91
+            quarantine_unit_id, quarantine_unit_name, quarantine_personnel_id, quarantine_personnel_name,
92
+            quarantine_item, quarantine_result, quarantine_report, certificate, scene_picture,
93
+            age, etiology, diagnosis_result, medication_name, medication_method, clinic,
94
+            treatment_time, treatment_cycle, treatment_effect, condition_change, recovery_time, recovery_health_status,
95
+            record_no, source_type, task_id, operation_type, batch_id, cattle_ids,
96
+            executor_user_id, executor_name, execute_result, detail_json, material_usage_json, attachments,
97
+            exception_flag, exception_desc, remark,
98
+            analyzed_flag, last_sync_time, create_time
44 99
         ) values (
45 100
             #{externalId}, #{recordType}, #{recordTime}, #{regionKey}, #{farmId}, #{farmName},
46
-            #{yakNo}, #{resultCode}, #{resultText}, #{analyzedFlag}, #{lastSyncTime}, sysdate()
101
+            #{enclosureId}, #{enclosureName}, #{cattleId}, #{earTagNumber}, #{yakNo}, #{sourceCreateTime},
102
+            #{quarantineUnitId}, #{quarantineUnitName}, #{quarantinePersonnelId}, #{quarantinePersonnelName},
103
+            #{quarantineItem}, #{quarantineResult}, #{quarantineReport}, #{certificate}, #{scenePicture},
104
+            #{age}, #{etiology}, #{diagnosisResult}, #{medicationName}, #{medicationMethod}, #{clinic},
105
+            #{treatmentTime}, #{treatmentCycle}, #{treatmentEffect}, #{conditionChange}, #{recoveryTime}, #{recoveryHealthStatus},
106
+            #{recordNo}, #{sourceType}, #{taskId}, #{operationType}, #{batchId}, #{cattleIds},
107
+            #{executorUserId}, #{executorName}, #{executeResult}, #{detailJson}, #{materialUsageJson}, #{attachments},
108
+            #{exceptionFlag}, #{exceptionDesc}, #{remark},
109
+            #{analyzedFlag}, #{lastSyncTime}, sysdate()
47 110
         )
48 111
     </insert>
49 112
 
@@ -53,9 +116,48 @@
53 116
             region_key = #{regionKey},
54 117
             farm_id = #{farmId},
55 118
             farm_name = #{farmName},
119
+            enclosure_id = #{enclosureId},
120
+            enclosure_name = #{enclosureName},
121
+            cattle_id = #{cattleId},
122
+            ear_tag_number = #{earTagNumber},
56 123
             yak_no = #{yakNo},
57
-            result_code = #{resultCode},
58
-            result_text = #{resultText},
124
+            source_create_time = #{sourceCreateTime},
125
+            quarantine_unit_id = #{quarantineUnitId},
126
+            quarantine_unit_name = #{quarantineUnitName},
127
+            quarantine_personnel_id = #{quarantinePersonnelId},
128
+            quarantine_personnel_name = #{quarantinePersonnelName},
129
+            quarantine_item = #{quarantineItem},
130
+            quarantine_result = #{quarantineResult},
131
+            quarantine_report = #{quarantineReport},
132
+            certificate = #{certificate},
133
+            scene_picture = #{scenePicture},
134
+            age = #{age},
135
+            etiology = #{etiology},
136
+            diagnosis_result = #{diagnosisResult},
137
+            medication_name = #{medicationName},
138
+            medication_method = #{medicationMethod},
139
+            clinic = #{clinic},
140
+            treatment_time = #{treatmentTime},
141
+            treatment_cycle = #{treatmentCycle},
142
+            treatment_effect = #{treatmentEffect},
143
+            condition_change = #{conditionChange},
144
+            recovery_time = #{recoveryTime},
145
+            recovery_health_status = #{recoveryHealthStatus},
146
+            record_no = #{recordNo},
147
+            source_type = #{sourceType},
148
+            task_id = #{taskId},
149
+            operation_type = #{operationType},
150
+            batch_id = #{batchId},
151
+            cattle_ids = #{cattleIds},
152
+            executor_user_id = #{executorUserId},
153
+            executor_name = #{executorName},
154
+            execute_result = #{executeResult},
155
+            detail_json = #{detailJson},
156
+            material_usage_json = #{materialUsageJson},
157
+            attachments = #{attachments},
158
+            exception_flag = #{exceptionFlag},
159
+            exception_desc = #{exceptionDesc},
160
+            remark = #{remark},
59 161
             last_sync_time = #{lastSyncTime},
60 162
             update_time = sysdate()
61 163
         where id = #{id}

+ 15 - 15
baqing-admin/src/main/resources/thirdparty/stub-diagnosis-records.json

@@ -2,31 +2,31 @@
2 2
   {
3 3
     "id": 3001,
4 4
     "farmId": 1,
5
-    "farmName": "示范牧场",
6
-    "county": "巴青县",
7
-    "town": "拉西镇",
8
-    "earTagNumber": "YAK-D-001",
5
+    "farmEnclosureId": 101,
6
+    "cattleId": 6001,
7
+    "age": "3岁",
8
+    "etiology": "疑似接触感染",
9 9
     "diagnosisTime": "2026-05-18 09:00:00",
10
-    "diseaseName": "口蹄疫疑似"
10
+    "diagnosisResult": "口蹄疫疑似",
11
+    "medicationName": "抗病毒注射液",
12
+    "clinic": "县兽医站",
13
+    "createTime": "2026-05-18 09:30:00"
11 14
   },
12 15
   {
13 16
     "id": 3002,
14 17
     "farmId": 1,
15
-    "farmName": "示范牧场",
16
-    "county": "巴青县",
17
-    "town": "拉西镇",
18
-    "earTagNumber": "YAK-D-002",
18
+    "farmEnclosureId": 101,
19
+    "cattleId": 6002,
19 20
     "diagnosisTime": "2026-05-18 10:30:00",
20
-    "diseaseName": "腹泻"
21
+    "diagnosisResult": "腹泻",
22
+    "createTime": "2026-05-18 11:00:00"
21 23
   },
22 24
   {
23 25
     "id": 3003,
24 26
     "farmId": 1,
25
-    "farmName": "示范牧场",
26
-    "county": "巴青县",
27
-    "town": "拉西镇",
28
-    "earTagNumber": "YAK-D-003",
27
+    "cattleId": 6003,
29 28
     "diagnosisTime": "2026-05-18 14:00:00",
30
-    "diseaseName": "发热"
29
+    "diagnosisResult": "发热",
30
+    "createTime": "2026-05-18 14:30:00"
31 31
   }
32 32
 ]

+ 14 - 7
baqing-admin/src/main/resources/thirdparty/stub-process-records.json

@@ -1,13 +1,20 @@
1 1
 [
2 2
   {
3 3
     "id": 4001,
4
+    "recordNo": "PR-20260517-001",
5
+    "sourceType": "task",
6
+    "taskId": 8001,
7
+    "operationType": "免疫",
4 8
     "farmId": 1,
5
-    "farmName": "示范牧场",
6
-    "county": "巴青县",
7
-    "town": "拉西镇",
8
-    "earTagNumber": "YAK-B-001",
9
-    "recordTime": "2026-05-17 08:00:00",
10
-    "processType": "免疫",
11
-    "processContent": "口蹄疫疫苗接种"
9
+    "enclosureId": 101,
10
+    "batchId": 9001,
11
+    "cattleIds": "7001,7002",
12
+    "executorUserId": 30,
13
+    "executorName": "李四",
14
+    "executeTime": "2026-05-17 08:00:00",
15
+    "executeResult": "已完成",
16
+    "detailJson": "{\"vaccine\":\"口蹄疫疫苗\"}",
17
+    "exceptionFlag": "0",
18
+    "createTime": "2026-05-17 08:30:00"
12 19
   }
13 20
 ]

+ 21 - 12
baqing-admin/src/main/resources/thirdparty/stub-quarantine-records.json

@@ -3,40 +3,49 @@
3 3
     "id": 2001,
4 4
     "farmId": 1,
5 5
     "farmName": "示范牧场",
6
-    "county": "巴青县",
7
-    "town": "拉西镇",
6
+    "farmEnclosureId": 101,
7
+    "farmEnclosureName": "一号圈舍",
8
+    "cattleId": 5001,
8 9
     "earTagNumber": "YAK-Q-001",
10
+    "quarantineUnitId": 10,
11
+    "quarantineUnitName": "县动物检疫站",
12
+    "quarantinePersonnelId": 20,
13
+    "quarantinePersonnelName": "张三",
14
+    "quarantineItem": "口蹄疫抗体检测",
9 15
     "quarantineTime": "2026-05-19 10:00:00",
10
-    "quarantineResult": "阳性"
16
+    "quarantineResult": "阳性",
17
+    "createTime": "2026-05-19 10:05:00"
11 18
   },
12 19
   {
13 20
     "id": 2002,
14 21
     "farmId": 1,
15 22
     "farmName": "示范牧场",
16
-    "county": "巴青县",
17
-    "town": "拉西镇",
23
+    "farmEnclosureId": 101,
24
+    "cattleId": 5002,
18 25
     "earTagNumber": "YAK-Q-002",
26
+    "quarantineItem": "布鲁氏菌病检测",
19 27
     "quarantineTime": "2026-05-19 11:00:00",
20
-    "quarantineResult": "异常"
28
+    "quarantineResult": "异常",
29
+    "createTime": "2026-05-19 11:05:00"
21 30
   },
22 31
   {
23 32
     "id": 2003,
24 33
     "farmId": 1,
25 34
     "farmName": "示范牧场",
26
-    "county": "巴青县",
27
-    "town": "拉西镇",
35
+    "cattleId": 5003,
28 36
     "earTagNumber": "YAK-Q-003",
29 37
     "quarantineTime": "2026-05-19 12:00:00",
30
-    "quarantineResult": "阳性"
38
+    "quarantineResult": "阳性",
39
+    "createTime": "2026-05-19 12:05:00"
31 40
   },
32 41
   {
33 42
     "id": 2004,
34 43
     "farmId": 1,
35 44
     "farmName": "示范牧场",
36
-    "county": "巴青县",
37
-    "town": "拉西镇",
45
+    "cattleId": 5004,
38 46
     "earTagNumber": "YAK-Q-004",
39 47
     "quarantineTime": "2026-05-19 13:00:00",
40
-    "quarantineResult": "正常"
48
+    "quarantineResult": "正常",
49
+    "createTime": "2026-05-19 13:05:00"
41 50
   }
42 51
 ]

+ 2 - 2
baqing-admin/src/test/java/com/ruoyi/web/modules/industryservice/service/YakDiseaseWarningAnalyzerTest.java

@@ -65,11 +65,11 @@ class YakDiseaseWarningAnalyzerTest
65 65
         BizYakHealthSourceRecord row = new BizYakHealthSourceRecord();
66 66
         row.setId(id);
67 67
         row.setRecordType(YakDiseaseWarningAnalysisRules.RECORD_TYPE_QUARANTINE);
68
-        row.setRegionKey("巴青县|拉西镇|1");
68
+        row.setRegionKey("F:1");
69 69
         row.setFarmName("示范牧场");
70 70
         row.setYakNo("YAK-Q-" + id);
71 71
         row.setRecordTime(recordTime);
72
-        row.setResultCode(result);
72
+        row.setQuarantineResult(result);
73 73
         return row;
74 74
     }
75 75
 

+ 2 - 2
baqing-admin/src/test/java/com/ruoyi/web/modules/industryservice/service/YakDiseaseWarningSyncServiceTest.java

@@ -88,8 +88,8 @@ class YakDiseaseWarningSyncServiceTest
88 88
         dto.setId(id);
89 89
         dto.setFarmId(1L);
90 90
         dto.setFarmName("示范牧场");
91
-        dto.setCounty("巴青县");
92
-        dto.setTown("拉西镇");
91
+        dto.setFarmEnclosureId(101L);
92
+        dto.setCattleId(5001L);
93 93
         dto.setEarTagNumber("YAK-Q-TEST");
94 94
         dto.setQuarantineTime("2026-05-19 10:00:00");
95 95
         dto.setQuarantineResult("阳性");

+ 25 - 5
baqing-admin/src/test/java/com/ruoyi/web/modules/industryservice/support/HealthRecordOpenApiMapperTest.java

@@ -6,21 +6,22 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
6 6
 import org.junit.jupiter.api.DisplayName;
7 7
 import org.junit.jupiter.api.Test;
8 8
 import com.ruoyi.web.modules.industryservice.domain.BizYakHealthSourceRecord;
9
+import com.ruoyi.web.modules.industryservice.domain.dto.OpenDiagnosisRecordDto;
9 10
 import com.ruoyi.web.modules.industryservice.domain.dto.OpenQuarantineRecordDto;
10 11
 
11 12
 @DisplayName("HealthRecordOpenApiMapper")
12 13
 class HealthRecordOpenApiMapperTest
13 14
 {
14 15
     @Test
15
-    @DisplayName("检疫记录映射 external_id 与地区键")
16
+    @DisplayName("检疫记录映射 external_id 与牧场地区键")
16 17
     void fromQuarantine()
17 18
     {
18 19
         OpenQuarantineRecordDto dto = new OpenQuarantineRecordDto();
19 20
         dto.setId(100L);
20 21
         dto.setFarmId(1L);
21 22
         dto.setFarmName("示范牧场");
22
-        dto.setCounty("巴青县");
23
-        dto.setTown("拉西镇");
23
+        dto.setFarmEnclosureId(101L);
24
+        dto.setCattleId(5001L);
24 25
         dto.setEarTagNumber("YAK-001");
25 26
         dto.setQuarantineTime("2026-05-19 10:00:00");
26 27
         dto.setQuarantineResult("阳性");
@@ -29,8 +30,27 @@ class HealthRecordOpenApiMapperTest
29 30
         assertEquals("Q:100", row.getExternalId());
30 31
         assertEquals(YakDiseaseWarningAnalysisRules.RECORD_TYPE_QUARANTINE, row.getRecordType().intValue());
31 32
         assertEquals("YAK-001", row.getYakNo());
32
-        assertEquals("阳性", row.getResultCode());
33
-        assertNotNull(row.getRegionKey());
33
+        assertEquals("阳性", row.getQuarantineResult());
34
+        assertEquals("F:1", row.getRegionKey());
34 35
         assertEquals(YakDiseaseWarningAnalysisRules.ANALYZED_NO, row.getAnalyzedFlag());
35 36
     }
37
+
38
+    @Test
39
+    @DisplayName("诊疗记录映射 cattleId 为 yak_no")
40
+    void fromDiagnosis()
41
+    {
42
+        OpenDiagnosisRecordDto dto = new OpenDiagnosisRecordDto();
43
+        dto.setId(200L);
44
+        dto.setFarmId(2L);
45
+        dto.setCattleId(6001L);
46
+        dto.setDiagnosisTime("2026-05-18 09:00:00");
47
+        dto.setDiagnosisResult("发热");
48
+
49
+        BizYakHealthSourceRecord row = HealthRecordOpenApiMapper.fromDiagnosis(dto);
50
+        assertEquals("D:200", row.getExternalId());
51
+        assertEquals("6001", row.getYakNo());
52
+        assertEquals("发热", row.getDiagnosisResult());
53
+        assertEquals("F:2", row.getRegionKey());
54
+        assertNotNull(row.getRecordTime());
55
+    }
36 56
 }

+ 47 - 7
sql/biz_yak_health_source_record.sql

@@ -1,15 +1,54 @@
1
+-- 牦牛疾病预警:第三方健康源数据(检疫/诊疗/养殖过程),字段与 OpenAPI 返回对齐
1 2
 CREATE TABLE IF NOT EXISTS `biz_yak_health_source_record` (
2 3
   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
3 4
   `external_id` varchar(64) NOT NULL COMMENT '第三方记录ID(类型前缀+主键)',
4 5
   `record_type` tinyint(4) NOT NULL COMMENT '1检疫 2诊疗 3养殖过程',
5
-  `record_time` datetime NOT NULL COMMENT '业务时间(检疫/诊疗/记录时间)',
6
-  `region_key` varchar(128) DEFAULT NULL COMMENT '地区键(县+乡镇或牧场,用于集中判断)',
7
-  `farm_id` bigint(20) DEFAULT NULL COMMENT '第三方农场ID',
8
-  `farm_name` varchar(128) DEFAULT NULL COMMENT '农场/牧场名称',
9
-  `yak_no` varchar(64) DEFAULT NULL COMMENT '牦牛编号(耳标/场内编号)',
10
-  `result_code` varchar(64) DEFAULT NULL COMMENT '结果码或病种摘要',
11
-  `result_text` varchar(512) DEFAULT NULL COMMENT '结果/诊断/过程描述',
6
+  `record_time` datetime NOT NULL COMMENT '业务时间(检疫/诊疗/执行时间)',
7
+  `region_key` varchar(128) DEFAULT NULL COMMENT '地区键(牧场维度,用于集中判断)',
8
+  `farm_id` bigint(20) DEFAULT NULL COMMENT '第三方养殖场ID',
9
+  `farm_name` varchar(128) DEFAULT NULL COMMENT '养殖场名称',
10
+  `enclosure_id` bigint(20) DEFAULT NULL COMMENT '圈舍ID',
11
+  `enclosure_name` varchar(128) DEFAULT NULL COMMENT '圈舍名称',
12
+  `cattle_id` bigint(20) DEFAULT NULL COMMENT '牛只ID',
13
+  `ear_tag_number` varchar(64) DEFAULT NULL COMMENT '耳标编号',
14
+  `yak_no` varchar(64) DEFAULT NULL COMMENT '展示编号(耳标或牛只ID)',
15
+  `source_create_time` datetime DEFAULT NULL COMMENT '第三方创建时间',
16
+  `quarantine_unit_id` bigint(20) DEFAULT NULL COMMENT '检疫单位ID',
17
+  `quarantine_unit_name` varchar(128) DEFAULT NULL COMMENT '检疫单位名称',
18
+  `quarantine_personnel_id` bigint(20) DEFAULT NULL COMMENT '检疫人员ID',
19
+  `quarantine_personnel_name` varchar(64) DEFAULT NULL COMMENT '检疫人员名称',
20
+  `quarantine_item` varchar(128) DEFAULT NULL COMMENT '检疫项目',
21
+  `quarantine_result` varchar(64) DEFAULT NULL COMMENT '检疫结果',
22
+  `quarantine_report` varchar(512) DEFAULT NULL COMMENT '检疫报告',
23
+  `certificate` varchar(128) DEFAULT NULL COMMENT '证书编号',
24
+  `scene_picture` varchar(512) DEFAULT NULL COMMENT '现场图片',
25
+  `age` varchar(32) DEFAULT NULL COMMENT '年龄',
26
+  `etiology` varchar(256) DEFAULT NULL COMMENT '病因',
27
+  `diagnosis_result` varchar(256) DEFAULT NULL COMMENT '诊断结果',
28
+  `medication_name` varchar(128) DEFAULT NULL COMMENT '用药名称',
29
+  `medication_method` varchar(128) DEFAULT NULL COMMENT '用药方式',
30
+  `clinic` varchar(128) DEFAULT NULL COMMENT '诊疗机构',
31
+  `treatment_time` datetime DEFAULT NULL COMMENT '治疗时间',
32
+  `treatment_cycle` varchar(64) DEFAULT NULL COMMENT '治疗周期',
33
+  `treatment_effect` varchar(128) DEFAULT NULL COMMENT '治疗效果',
34
+  `condition_change` varchar(256) DEFAULT NULL COMMENT '病情变化',
35
+  `recovery_time` datetime DEFAULT NULL COMMENT '康复时间',
36
+  `recovery_health_status` varchar(64) DEFAULT NULL COMMENT '康复健康状态',
37
+  `record_no` varchar(64) DEFAULT NULL COMMENT '过程记录编号',
38
+  `source_type` varchar(32) DEFAULT NULL COMMENT '来源类型',
39
+  `task_id` bigint(20) DEFAULT NULL COMMENT '任务ID',
40
+  `operation_type` varchar(64) DEFAULT NULL COMMENT '操作类型',
41
+  `batch_id` bigint(20) DEFAULT NULL COMMENT '批次ID',
42
+  `cattle_ids` varchar(512) DEFAULT NULL COMMENT '牛只ID列表',
43
+  `executor_user_id` bigint(20) DEFAULT NULL COMMENT '执行人用户ID',
44
+  `executor_name` varchar(64) DEFAULT NULL COMMENT '执行人',
45
+  `execute_result` varchar(256) DEFAULT NULL COMMENT '执行结果',
46
+  `detail_json` text COMMENT '执行明细JSON',
47
+  `material_usage_json` text COMMENT '物资使用JSON',
48
+  `attachments` varchar(512) DEFAULT NULL COMMENT '现场照片',
49
+  `exception_flag` char(1) DEFAULT NULL COMMENT '是否异常',
50
+  `exception_desc` varchar(256) DEFAULT NULL COMMENT '异常说明',
51
+  `remark` varchar(512) DEFAULT NULL COMMENT '备注',
12 52
   `analyzed_flag` char(1) NOT NULL DEFAULT '0' COMMENT '0未分析 1已分析',
13 53
   `last_sync_time` datetime DEFAULT NULL COMMENT '最近同步时间',
14 54
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',