Commit 1d37edd7 authored by 竹天卫's avatar 竹天卫

修改bug 校核计算是 如果是平行样检测,把每个人的计算结果返回展示 用于比较误差值

parent 64168ce1
......@@ -43,6 +43,12 @@ public class SampleCheck implements Serializable {
@ApiModelProperty("检测组名称")
private String teamGroupName;
@ApiModelProperty("主样校核计算结果json串")
private String mainMap;
@ApiModelProperty("次样校核计算结果json串")
private String secondaryMap;
@ApiModelProperty("最终校核计算结果json串")
private String countResult;
......
......@@ -18,7 +18,7 @@
from sample s
left join entrust e on e.id = s.entrust_id
<include refid="where" />
order by s.create_time desc
order by s.name
</select>
<select id="exportList" resultType="java.util.HashMap">
......
......@@ -75,11 +75,15 @@ public class SampleCheckTeamQuery {
@ApiModelProperty("主样检测结果 Map集合")
private Map<String, Object> mainResult;
@ApiModelProperty("次样检测结果 Map集合")
private Map<String, Object> secondaryResult;
@ApiModelProperty("主样校核计算结果 Map集合")
private Map<String, Object> mainMap;
@ApiModelProperty("次样校核计算结果 Map集合")
private Map<String, Object> secondaryMap;
@ApiModelProperty("最终校核计算结果 Map集合")
private Map<String, Object> endResult;
......
......@@ -79,7 +79,7 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse<List<SampleDistribution>> getEnclosureList(Integer sampleId, Integer teamGroupId, Integer userId);
BaseResponse<Map<String, String>> checkCount(CheckCountQuery query);
BaseResponse<Map<String,Map<String, String>>> checkCount(CheckCountQuery query);
BaseResponse<String> check(CheckQuery query);
......
......@@ -1807,14 +1807,20 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
* @param query
* @return
*/
public BaseResponse<Map<String, String>> checkCount(CheckCountQuery query) {
@Override
public BaseResponse<Map<String,Map<String, String>>> checkCount(CheckCountQuery query) {
if (query == null) {
return BaseResponse.errorMsg("参数错误");
}
Map<String,Map<String, String>> map = new HashMap<>();
List<String> checkResutlList = teamMapper.getByGroup(query.getTeamGroupId());
Map<String, String> countMap = new HashMap<>();
if (query.getIsParallel() == 0) {
Map<String, String> mainMap = commonService.checkCount(checkResutlList, query.getMainResult());
map.put("mainMap",mainMap);
map.put("secondaryMap",null);
map.put("countMap",mainMap);
countMap = mainMap;
} else if (query.getIsParallel() == 1) {
Map<String, String> mainMap = commonService.checkCount(checkResutlList, query.getMainResult());
......@@ -1888,8 +1894,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
countMap.put(name, mainMap.get(name));
}
}
map.put("mainMap",mainMap);
map.put("secondaryMap",secondaryMap);
map.put("countMap",countMap);
}
return BaseResponse.okData(countMap);
return BaseResponse.okData(map);
}
......@@ -1935,6 +1944,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.setTeamGroupId(sctQuery.getTeamGroupId())
.setTeamGroupName(sctQuery.getTeamGroupName())
.setCountResult(JSON.toJSONString(sctQuery.getEndResult()))
.setMainMap(JSON.toJSONString(sctQuery.getMainMap()))
.setSecondaryMap(JSON.toJSONString(sctQuery.getSecondaryMap()))
.setIsParallel(sctQuery.getIsParallel())
.setCreateTime(LocalDateTime.now());
sampleCheckMapper.insert(check);
......
......@@ -663,13 +663,13 @@ public class CheckCountUtil {
public static String countVdafXS(Map<String, String> countMap) {
BigDecimal Ad= getBigDecimal(countMap.get("Ad"));
BigDecimal count =
Ad.compareTo(new BigDecimal(30))==1?new BigDecimal(0.8):(
Ad.compareTo(new BigDecimal(25))==1?new BigDecimal(0.85):(
Ad.compareTo(new BigDecimal(20))==1?new BigDecimal(0.95):(
Ad.compareTo(new BigDecimal(15))==1?new BigDecimal(0.8):(
Ad.compareTo(new BigDecimal(10))==1?new BigDecimal(0.9):
new BigDecimal(0.95)
Double count =
Ad.compareTo(new BigDecimal(30))==1?0.8:(
Ad.compareTo(new BigDecimal(25))==1?0.85:(
Ad.compareTo(new BigDecimal(20))==1?0.95:(
Ad.compareTo(new BigDecimal(15))==1?0.8:(
Ad.compareTo(new BigDecimal(10))==1?0.9:
0.95
))));
return count.toString();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment