fix
This commit is contained in:
@@ -46,7 +46,7 @@ public class AutoIngredientsController {
|
||||
@PostMapping("/submit-assay-result")
|
||||
@Operation(summary = "检测结果同步")
|
||||
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);
|
||||
return CommonResult.success("成功");
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.zt.plat.module.qms.thirdpartyapi.service;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
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.collection.CollUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@Service
|
||||
@@ -194,7 +197,15 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
||||
if (configSubSampleMethodConfItem.getRequired()) {
|
||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||
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);
|
||||
if (fieldValue == null) {
|
||||
fieldValue = "";
|
||||
}
|
||||
// System.out.println("fieldValue:" + fieldValue);
|
||||
|
||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||
String project = target.getProject();
|
||||
|
||||
Reference in New Issue
Block a user