Commit 6c1fa63a authored by 竹天卫's avatar 竹天卫

123

parent 0657b028
...@@ -96,7 +96,7 @@ public interface IEntrustService extends IService<Entrust> { ...@@ -96,7 +96,7 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse<CheckUserResultVo> getCheckResult(Integer entrustId, Integer userId); BaseResponse<CheckUserResultVo> getCheckResult(Integer entrustId, Integer userId);
BaseResponse<Map<String, String>> checkCountFast(CheckCountFastQuery query); BaseResponse<Map<String, Object>> checkCountFast(CheckCountFastQuery query);
BaseResponse<String> checkCountNew(CheckCountNewQuery query); BaseResponse<String> checkCountNew(CheckCountNewQuery query);
......
...@@ -198,10 +198,12 @@ public class CommonServiceImpl { ...@@ -198,10 +198,12 @@ public class CommonServiceImpl {
JSONObject jsonObjectInput = jsonArray.getJSONObject(j); JSONObject jsonObjectInput = jsonArray.getJSONObject(j);
if(jsonObjectInput.get("name").equals(jsonObjectGroup.get("name"))){ if(jsonObjectInput.get("name").equals(jsonObjectGroup.get("name"))){
jsonObjectInput.put("retain",jsonObjectGroup.getString("retain")); jsonObjectInput.put("retain",jsonObjectGroup.getString("retain"));
jsonObjectInput.put("isinput",jsonObjectGroup.getString("isinput"));
break; break;
} }
} }
} }
if(jsonObjectGroup.containsKey("TSiO<sub>2</sub>")){ if(jsonObjectGroup.containsKey("TSiO<sub>2</sub>")){
if(map.containsKey("TSiO<sub>2</sub>")){ if(map.containsKey("TSiO<sub>2</sub>")){
jsonObjectGroup.put("TSiO<sub>2</sub>",map.get("TSiO<sub>2</sub>")); jsonObjectGroup.put("TSiO<sub>2</sub>",map.get("TSiO<sub>2</sub>"));
......
...@@ -3551,7 +3551,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -3551,7 +3551,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
*/ */
@Transactional @Transactional
@Override @Override
public BaseResponse<Map<String, String>> checkCountFast(CheckCountFastQuery query) { public BaseResponse<Map<String, Object>> checkCountFast(CheckCountFastQuery query) {
if (query == null) { if (query == null) {
return BaseResponse.errorMsg("参数错误"); return BaseResponse.errorMsg("参数错误");
} }
...@@ -3571,12 +3571,42 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -3571,12 +3571,42 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
} }
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getUserId(), query.getTeamGroupId(), query.getIntputResult()); JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getUserId(), query.getTeamGroupId(), query.getIntputResult());
String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString();
System.out.println(inputResult_String);
//计算检测结果 //计算检测结果
Map<String, String> resultMap = commonService.checkCount(checkResutlList, query.getIntputResult()); Map<String, String> resultMap = commonService.checkCount(checkResutlList, query.getIntputResult());
return BaseResponse.okData(resultMap); //如果存在工业分析检测组的检测项,需要把 Mad1 Mad2 Aad1 Aad2 Vad1 Vad2 的值展示出来
if(inputResult_jsonArray != null){
for(int i=0;i<inputResult_jsonArray.size();i++){
JSONObject jsonObjectInput = inputResult_jsonArray.getJSONObject(i);
if(jsonObjectInput.get("name").equals("Mad1")){
jsonObjectInput.put("value", resultMap.get("Mad1"));
}
if(jsonObjectInput.get("name").equals("Mad2")){
jsonObjectInput.put("value", resultMap.get("Mad2"));
}
if(jsonObjectInput.get("name").equals("Aad1")){
jsonObjectInput.put("value", resultMap.get("Aad1"));
}
if(jsonObjectInput.get("name").equals("Aad2")){
jsonObjectInput.put("value", resultMap.get("Aad2"));
}
if(jsonObjectInput.get("name").equals("Vad1")){
jsonObjectInput.put("value", resultMap.get("Vad1"));
}
if(jsonObjectInput.get("name").equals("Vad2")){
jsonObjectInput.put("value", resultMap.get("Vad2"));
}
}
}
String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString();
System.out.println(inputResult_String);
Map<String, Object> map = new HashMap<>();
map.put("inputResult", inputResult_String);
map.put("resultMap", resultMap);
return BaseResponse.okData(map);
} }
...@@ -3633,8 +3663,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -3633,8 +3663,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
sampleDistributionCheckinputMapper.selectList(checkinputQueryWrapper); sampleDistributionCheckinputMapper.selectList(checkinputQueryWrapper);
SampleDistributionCheckinput checkinput = null; SampleDistributionCheckinput checkinput = null;
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getUserId(), query.getTeamGroupId(), query.getIntputResult()); JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getUserId(), query.getTeamGroupId(), query.getIntputResult());
String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString(); String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString();
System.out.println(inputResult_String); System.out.println(inputResult_String);
if(checkinputList!= null && checkinputList.size() > 0 ){ if(checkinputList!= null && checkinputList.size() > 0 ){
checkinput = checkinputList.get(0); checkinput = checkinputList.get(0);
checkinput.setCheckUserId(loginUser.getId()) checkinput.setCheckUserId(loginUser.getId())
......
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