|
|
|
@ -49,6 +49,39 @@ import java.util.stream.Collectors;
|
|
|
|
|
@RequestMapping("/api/app")
|
|
|
|
|
public class AppController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* 01.06新需求,以下字段新增bar字段,需要把base64转为图片保存
|
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
private ITRecordService tRecordService;
|
|
|
|
|
|
|
|
|
@ -692,19 +725,6 @@ public class AppController extends BaseController
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
doRemoveBase64Image(jsonObject.getJSONObject("data"), "data", jsonKeyList, recordId);
|
|
|
|
|
}
|
|
|
|
@ -743,7 +763,7 @@ public class AppController extends BaseController
|
|
|
|
|
String imageKey = null;
|
|
|
|
|
if (entry.getValue() instanceof JSONObject) {
|
|
|
|
|
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");
|
|
|
|
|
imageKey = "bar";
|
|
|
|
|
} else {
|
|
|
|
|