|
@@ -26,7 +26,9 @@ import com.github.jfcloud.gene.flow.entity.FlowAudit;
|
|
|
import com.github.jfcloud.gene.flow.service.FlowAuditService;
|
|
|
import com.github.jfcloud.gene.flow.service.NotifyService;
|
|
|
import com.github.jfcloud.gene.sample.entity.*;
|
|
|
+import com.github.jfcloud.gene.sample.enums.PathogenSampleTypeEnum;
|
|
|
import com.github.jfcloud.gene.sample.enums.SampleTypeEnum;
|
|
|
+import com.github.jfcloud.gene.sample.enums.ScientificSampleTypeEnum;
|
|
|
import com.github.jfcloud.gene.sample.mapper.InspectionCommissionMapper;
|
|
|
import com.github.jfcloud.gene.sample.mapper.SampleAnimalMapper;
|
|
|
import com.github.jfcloud.gene.sample.mapper.SampleCheckOrderMapper;
|
|
@@ -115,9 +117,10 @@ public class SampleAnimalServiceImpl extends ServiceImpl<SampleAnimalMapper, Sam
|
|
|
sampleAnimal.insert();
|
|
|
|
|
|
//保存委托列表,通过JSON序列化转为列表
|
|
|
+ List<String> paTypes = PathogenSampleTypeEnum.resolveList(vo.getAnimal().getPathogenSampleType());
|
|
|
CommissionObjVo commissionObj = vo.getAnimal().getCommission();
|
|
|
JSONObject commissionJson = JSON.parseObject(JSON.toJSONString(commissionObj, SerializerFeature.WriteMapNullValue));
|
|
|
- for (String fieldName : commissionJson.keySet()) {
|
|
|
+ for (String fieldName : paTypes) {
|
|
|
JSONObject fieldJson = commissionJson.getJSONObject(fieldName);
|
|
|
if (fieldJson == null) {
|
|
|
continue;
|
|
@@ -144,9 +147,10 @@ public class SampleAnimalServiceImpl extends ServiceImpl<SampleAnimalMapper, Sam
|
|
|
}
|
|
|
|
|
|
//保存送检申请单
|
|
|
+ List<String> scTypes = ScientificSampleTypeEnum.resolveList(vo.getAnimal().getScientificSampleType());
|
|
|
CheckOrderObjVo orderObj = vo.getAnimal().getOrder();
|
|
|
JSONObject orderJson = JSON.parseObject(JSON.toJSONString(orderObj, SerializerFeature.WriteMapNullValue));
|
|
|
- for (String fieldName : orderJson.keySet()) {
|
|
|
+ for (String fieldName : scTypes) {
|
|
|
JSONObject fieldJson = orderJson.getJSONObject(fieldName);
|
|
|
if (fieldJson == null) {
|
|
|
continue;
|