|
|
@ -72,14 +72,6 @@ public class TRecordController extends BaseController
|
|
|
|
List<TRecordResp> list = tRecordService.selectTRecordListWithoutResult(tRecord);
|
|
|
|
List<TRecordResp> list = tRecordService.selectTRecordListWithoutResult(tRecord);
|
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
|
list.stream().forEach(tRecordResp -> {
|
|
|
|
list.stream().forEach(tRecordResp -> {
|
|
|
|
StringBuilder updateResult2 = new StringBuilder();
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(tRecordResp.getUpdateResult2())
|
|
|
|
|
|
|
|
&& null != JSON.parseObject(tRecordResp.getUpdateResult2())){
|
|
|
|
|
|
|
|
typeAppend(tRecordResp.getUpdateResult2(),updateResult2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(updateResult2.length() != 0){
|
|
|
|
|
|
|
|
tRecordResp.setUpdateResult2(updateResult2.toString());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
StringBuilder updateResult = new StringBuilder();
|
|
|
|
StringBuilder updateResult = new StringBuilder();
|
|
|
|
if(StringUtils.isNotEmpty(tRecordResp.getUpdateResult())
|
|
|
|
if(StringUtils.isNotEmpty(tRecordResp.getUpdateResult())
|
|
|
|
&& null != JSON.parseObject(tRecordResp.getUpdateResult())){
|
|
|
|
&& null != JSON.parseObject(tRecordResp.getUpdateResult())){
|
|
|
@ -88,14 +80,6 @@ public class TRecordController extends BaseController
|
|
|
|
if(updateResult.length() != 0){
|
|
|
|
if(updateResult.length() != 0){
|
|
|
|
tRecordResp.setUpdateResult(updateResult.toString());
|
|
|
|
tRecordResp.setUpdateResult(updateResult.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StringBuilder aiResult2 = new StringBuilder();
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(tRecordResp.getAiResult2())
|
|
|
|
|
|
|
|
&& null != JSON.parseObject(tRecordResp.getAiResult2())){
|
|
|
|
|
|
|
|
typeAppend(tRecordResp.getAiResult2(),aiResult2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(aiResult2.length() != 0){
|
|
|
|
|
|
|
|
tRecordResp.setAiResult2(aiResult2.toString());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
StringBuilder aiResult = new StringBuilder();
|
|
|
|
StringBuilder aiResult = new StringBuilder();
|
|
|
|
if(StringUtils.isNotEmpty(tRecordResp.getAiResult())
|
|
|
|
if(StringUtils.isNotEmpty(tRecordResp.getAiResult())
|
|
|
|
&& null != JSON.parseObject(tRecordResp.getAiResult())){
|
|
|
|
&& null != JSON.parseObject(tRecordResp.getAiResult())){
|
|
|
@ -209,14 +193,15 @@ public class TRecordController extends BaseController
|
|
|
|
public void typeAppend(String type,StringBuilder resultBuilder){
|
|
|
|
public void typeAppend(String type,StringBuilder resultBuilder){
|
|
|
|
//获取json字符data中的数据
|
|
|
|
//获取json字符data中的数据
|
|
|
|
String dataString = JSON.parseObject(type).getString("data");
|
|
|
|
String dataString = JSON.parseObject(type).getString("data");
|
|
|
|
if(StringUtils.isNotEmpty(dataString) && null != JSON.parseObject(dataString)){
|
|
|
|
try{
|
|
|
|
JSONObject dataObject = JSON.parseObject(dataString);
|
|
|
|
if(StringUtils.isNotEmpty(dataString) && !JSON.parseObject(dataString,Map.class).isEmpty()){
|
|
|
|
|
|
|
|
Map<String,JSONObject> mapData = JSON.parseObject(dataString,Map.class);
|
|
|
|
//如果包含舌质
|
|
|
|
//如果包含舌质
|
|
|
|
if(StringUtils.isNotEmpty(dataObject.getString("shezhi"))
|
|
|
|
if(mapData.containsKey("shezhi")
|
|
|
|
&& null != JSON.parseObject(dataObject.getString("shezhi"))){
|
|
|
|
&& null != mapData.get("shezhi")){
|
|
|
|
resultBuilder.append("舌质");
|
|
|
|
resultBuilder.append("舌质");
|
|
|
|
resultAppend(dataObject.getString("shezhi"),resultBuilder);
|
|
|
|
resultAppend(mapData.get("shezhi").toString(),resultBuilder);
|
|
|
|
JSONObject shezhiObject = JSON.parseObject(dataObject.getString("shezhi"));
|
|
|
|
JSONObject shezhiObject = mapData.get("shezhi");
|
|
|
|
if(StringUtils.isNotEmpty(shezhiObject.getString("sz_color"))
|
|
|
|
if(StringUtils.isNotEmpty(shezhiObject.getString("sz_color"))
|
|
|
|
&& null != JSON.parseObject(shezhiObject.getString("sz_color"))){
|
|
|
|
&& null != JSON.parseObject(shezhiObject.getString("sz_color"))){
|
|
|
|
resultAppend(shezhiObject.getString("sz_color"),resultBuilder);
|
|
|
|
resultAppend(shezhiObject.getString("sz_color"),resultBuilder);
|
|
|
@ -235,27 +220,31 @@ public class TRecordController extends BaseController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//如果包含舌苔
|
|
|
|
//如果包含舌苔
|
|
|
|
if(StringUtils.isNotEmpty(dataObject.getString("shetai"))
|
|
|
|
if(mapData.containsKey("shetai")
|
|
|
|
&& null != JSON.parseObject(dataObject.getString("shetai"))){
|
|
|
|
&& null != mapData.get("shetai")){
|
|
|
|
resultBuilder.append("\n\n舌苔");
|
|
|
|
resultBuilder.append("\n\n舌苔");
|
|
|
|
JSONObject shetaiObject = JSON.parseObject(dataObject.getString("shetai"));
|
|
|
|
JSONObject shetaiObject = mapData.get("shetai");
|
|
|
|
if(StringUtils.isNotEmpty(shetaiObject.getString("st_color"))
|
|
|
|
if(StringUtils.isNotEmpty(shetaiObject.getString("st_color"))
|
|
|
|
&& null != JSON.parseObject(shetaiObject.getString("st_color"))){
|
|
|
|
&& null != JSON.parseObject(shetaiObject.getString("st_color"))){
|
|
|
|
resultAppend(shetaiObject.getString("st_color"),resultBuilder);
|
|
|
|
resultAppend(shetaiObject.getString("st_color"),resultBuilder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
resultAppend(dataObject.getString("shetai"),resultBuilder);
|
|
|
|
resultAppend(mapData.get("shetai").toString(),resultBuilder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//如果包含舌下脉络
|
|
|
|
//如果包含舌下脉络
|
|
|
|
if(StringUtils.isNotEmpty(dataObject.getString("shexia"))
|
|
|
|
if(mapData.containsKey("shexia")
|
|
|
|
&& null != JSON.parseObject(dataObject.getString("shexia"))){
|
|
|
|
&& null != mapData.get("shexia")){
|
|
|
|
resultBuilder.append("\n\n舌下脉络");
|
|
|
|
resultBuilder.append("\n\n舌下脉络");
|
|
|
|
JSONObject shexiaObject = JSON.parseObject(dataObject.getString("shexia"));
|
|
|
|
JSONObject shexiaObject = mapData.get("shexia");
|
|
|
|
if(StringUtils.isNotEmpty(shexiaObject.getString("sx_vein_color"))
|
|
|
|
if(StringUtils.isNotEmpty(shexiaObject.getString("sx_vein_color"))
|
|
|
|
|
|
|
|
&& shexiaObject.getString("sx_vein_color").contains("{")
|
|
|
|
&& null != JSON.parseObject(shexiaObject.getString("sx_vein_color"))){
|
|
|
|
&& null != JSON.parseObject(shexiaObject.getString("sx_vein_color"))){
|
|
|
|
resultAppend(shexiaObject.getString("sx_vein_color"),resultBuilder);
|
|
|
|
resultAppend(shexiaObject.getString("sx_vein_color"),resultBuilder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
resultAppend(dataObject.getString("shexia"),resultBuilder);
|
|
|
|
resultAppend(mapData.get("shexia").toString(),resultBuilder);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
|
|
|
logger.error("方法:/system/record/export报错,json字符串:"+type,e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -389,16 +378,19 @@ public class TRecordController extends BaseController
|
|
|
|
resultBuilder.append("\n黄度平均值:"+(StringUtils.isNotEmpty(valObject.getString("v")) ? valObject.getString("v") : ""));
|
|
|
|
resultBuilder.append("\n黄度平均值:"+(StringUtils.isNotEmpty(valObject.getString("v")) ? valObject.getString("v") : ""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtils.isNotEmpty(typeObject.getString("sx_vein_width"))
|
|
|
|
if(StringUtils.isNotEmpty(typeObject.getString("sx_vein_width"))
|
|
|
|
|
|
|
|
&& typeObject.getString("sx_vein_width").contains("{")
|
|
|
|
&& null != JSON.parseObject(typeObject.getString("sx_vein_width"))){
|
|
|
|
&& null != JSON.parseObject(typeObject.getString("sx_vein_width"))){
|
|
|
|
JSONObject valObject = JSON.parseObject(typeObject.getString("sx_vein_width"));
|
|
|
|
JSONObject valObject = JSON.parseObject(typeObject.getString("sx_vein_width"));
|
|
|
|
resultBuilder.append("\n脉络粗细:"+(StringUtils.isNotEmpty(valObject.getString("quantification")) ? valObject.getString("quantification") : ""));
|
|
|
|
resultBuilder.append("\n脉络粗细:"+(StringUtils.isNotEmpty(valObject.getString("quantification")) ? valObject.getString("quantification") : ""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtils.isNotEmpty(typeObject.getString("sx_vein_length"))
|
|
|
|
if(StringUtils.isNotEmpty(typeObject.getString("sx_vein_length"))
|
|
|
|
|
|
|
|
&& typeObject.getString("sx_vein_length").contains("{")
|
|
|
|
&& null != JSON.parseObject(typeObject.getString("sx_vein_length"))){
|
|
|
|
&& null != JSON.parseObject(typeObject.getString("sx_vein_length"))){
|
|
|
|
JSONObject valObject = JSON.parseObject(typeObject.getString("sx_vein_length"));
|
|
|
|
JSONObject valObject = JSON.parseObject(typeObject.getString("sx_vein_length"));
|
|
|
|
resultBuilder.append("\n脉络长度:"+(StringUtils.isNotEmpty(valObject.getString("quantification")) ? valObject.getString("quantification") : ""));
|
|
|
|
resultBuilder.append("\n脉络长度:"+(StringUtils.isNotEmpty(valObject.getString("quantification")) ? valObject.getString("quantification") : ""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(StringUtils.isNotEmpty(typeObject.getString("sx_vein_type"))
|
|
|
|
if(StringUtils.isNotEmpty(typeObject.getString("sx_vein_type"))
|
|
|
|
|
|
|
|
&& typeObject.getString("sx_vein_type").contains("{")
|
|
|
|
&& null != JSON.parseObject(typeObject.getString("sx_vein_type"))){
|
|
|
|
&& null != JSON.parseObject(typeObject.getString("sx_vein_type"))){
|
|
|
|
JSONObject valObject = JSON.parseObject(typeObject.getString("sx_vein_type"));
|
|
|
|
JSONObject valObject = JSON.parseObject(typeObject.getString("sx_vein_type"));
|
|
|
|
resultBuilder.append("\n脉络形态:"+(StringUtils.isNotEmpty(valObject.getString("v")) ? valObject.getString("v") : ""));
|
|
|
|
resultBuilder.append("\n脉络形态:"+(StringUtils.isNotEmpty(valObject.getString("v")) ? valObject.getString("v") : ""));
|
|
|
|