38版本新增量化值

master
gongzhenkun 2 years ago
parent 48783ba096
commit c891a2be05

@ -49,6 +49,39 @@ import java.util.stream.Collectors;
@RequestMapping("/api/app") @RequestMapping("/api/app")
public class AppController extends BaseController public class AppController extends BaseController
{ {
/**
* 01.06barbase64
*/
private static final List<String> BAR_PROPERTY = new ArrayList<String>(){{
add("sz_pangshou");
add("st_houbo");
add("st_funi");
add("st_runzao");
add("st_cao");
}};
/**
*
*/
private static final List<String> jsonKeyList = new ArrayList<String>(){{
add("st_avg_yellow");
add("img_sz");
add("img_sz_yudian");
add("img_sz_yuban");
add("img_sz_liewen");
add("img_st");
add("img_sx");
add("img_sx_vein");
add("sz_avg_red");
add("sz_avg_purple");
add("sx_vein_avg_purple");
add("sz_pangshou");
add("st_houbo");
add("st_funi");
add("st_runzao");
add("st_cao");
}};
@Autowired @Autowired
private ITRecordService tRecordService; private ITRecordService tRecordService;
@ -692,19 +725,6 @@ public class AppController extends BaseController
public JSONObject removeBase64Image(JSONObject jsonObject,Long recordId) public JSONObject removeBase64Image(JSONObject jsonObject,Long recordId)
{ {
List<String> jsonKeyList = new ArrayList<String>(){{
add("st_avg_yellow");
add("img_sz");
add("img_sz_yudian");
add("img_sz_yuban");
add("img_sz_liewen");
add("img_st");
add("img_sx");
add("img_sx_vein");
add("sz_avg_red");
add("sz_avg_purple");
add("sx_vein_avg_purple");
}};
try { try {
doRemoveBase64Image(jsonObject.getJSONObject("data"), "data", jsonKeyList, recordId); doRemoveBase64Image(jsonObject.getJSONObject("data"), "data", jsonKeyList, recordId);
} }
@ -743,7 +763,7 @@ public class AppController extends BaseController
String imageKey = null; String imageKey = null;
if (entry.getValue() instanceof JSONObject) { if (entry.getValue() instanceof JSONObject) {
logger.info("entry key is {}", entry.getKey()); logger.info("entry key is {}", entry.getKey());
if (entry.getKey().contains("avg")) { if (entry.getKey().contains("avg") || BAR_PROPERTY.contains(entry.getKey())) {
imageStr = ((JSONObject) entry.getValue()).getString("bar"); imageStr = ((JSONObject) entry.getValue()).getString("bar");
imageKey = "bar"; imageKey = "bar";
} else { } else {

@ -69,13 +69,24 @@ public class TRecordServiceImpl implements ITRecordService
}}; }};
/** /**
* key * key
*/ */
private static final List<String> getQuantificationKeys = new ArrayList<String>(){{ private static final List<String> getQuantificationKeys = new ArrayList<String>(){{
add("sx_vein_width"); add("sx_vein_width");
add("sx_vein_length"); add("sx_vein_length");
}}; }};
/**
* keys
*/
private static final List<String> addQuantificationKeys = new ArrayList<String>(){{
add("sz_pangshou");
add("st_houbo");
add("st_funi");
add("st_runzao");
add("st_cao");
}};
@Autowired @Autowired
private TRecordMapper tRecordMapper; private TRecordMapper tRecordMapper;
@ -373,6 +384,11 @@ public class TRecordServiceImpl implements ITRecordService
if (!getQuantificationKeys.contains(listName) && "v".equals(entry.getKey())) { if (!getQuantificationKeys.contains(listName) && "v".equals(entry.getKey())) {
doSetHistoryData(historyDataMap, listName, entry.getValue()); doSetHistoryData(historyDataMap, listName, entry.getValue());
} }
// 追加量化值数据
if (addQuantificationKeys.contains(listName) && "quantification".equals(entry.getKey())) {
String newListName = listName + "_q";
doSetHistoryData(historyDataMap, newListName, entry.getValue());
}
} }
} }
} }

Loading…
Cancel
Save