fix
This commit is contained in:
@@ -46,7 +46,7 @@ public class AutoIngredientsController {
|
|||||||
@PostMapping("/submit-assay-result")
|
@PostMapping("/submit-assay-result")
|
||||||
@Operation(summary = "检测结果同步")
|
@Operation(summary = "检测结果同步")
|
||||||
public CommonResult<?> submitAssayResult(@RequestBody AutoIngredientsTaskAssayResultReqVO body) {
|
public CommonResult<?> submitAssayResult(@RequestBody AutoIngredientsTaskAssayResultReqVO body) {
|
||||||
System.out.println(com.alibaba.fastjson2.JSON.toJSONString(body));
|
// System.out.println(com.alibaba.fastjson2.JSON.toJSONString(body));
|
||||||
autoIngredientsService.submitAssayResult(body);
|
autoIngredientsService.submitAssayResult(body);
|
||||||
return CommonResult.success("成功");
|
return CommonResult.success("成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.zt.plat.module.qms.thirdpartyapi.service;
|
package com.zt.plat.module.qms.thirdpartyapi.service;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -43,6 +45,7 @@ import com.zt.plat.module.qms.thirdpartyapi.controller.vo.AutoIngredientsTaskRes
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ReflectUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -194,7 +197,15 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
|||||||
if (configSubSampleMethodConfItem.getRequired()) {
|
if (configSubSampleMethodConfItem.getRequired()) {
|
||||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||||
String field = source.getField();
|
String field = source.getField();
|
||||||
|
// System.out.println("field:" + field);
|
||||||
|
// Field field2 = ReflectUtil.getField(autoIngredientsTaskDetailAssayResultReqVO.getClass(), field);
|
||||||
|
// Map<String, Field> fieldMap = ReflectUtil.getFieldMap(autoIngredientsTaskDetailAssayResultReqVO.getClass());
|
||||||
|
// Object fieldValue2 = ReflectUtil.getFieldValue(autoIngredientsTaskDetailAssayResultReqVO, fieldMap.get(field));
|
||||||
Object fieldValue = BeanUtil.getFieldValue(autoIngredientsTaskDetailAssayResultReqVO, field);
|
Object fieldValue = BeanUtil.getFieldValue(autoIngredientsTaskDetailAssayResultReqVO, field);
|
||||||
|
if (fieldValue == null) {
|
||||||
|
fieldValue = "";
|
||||||
|
}
|
||||||
|
// System.out.println("fieldValue:" + fieldValue);
|
||||||
|
|
||||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||||
String project = target.getProject();
|
String project = target.getProject();
|
||||||
|
|||||||
Reference in New Issue
Block a user