|
@ -540,6 +540,35 @@ public class PrescriptionService extends BaseService {
|
|
|
jsonObject.put("totalAmount",totalAmount>0?df.format(totalAmount):0.0);
|
|
|
sql += " limit ?,?";
|
|
|
resultList = jdbcTemplate.queryForList(sql,new Object[]{start,pageSize});
|
|
|
//针对疾病去重,left join pay表之后会出现很多条数据--zd
|
|
|
for (Map<String,Object> map: resultList) {
|
|
|
//疾病代码和疾病名称
|
|
|
String healthProblems = String.valueOf(map.get("health_problem"));
|
|
|
String resultValue = "";
|
|
|
String resultNameValue = "";
|
|
|
if (StringUtils.isNotBlank(healthProblems) && healthProblems.contains(",")){
|
|
|
String[] healthProbleamStr = healthProblems.split(",");
|
|
|
for (String healthProblemValue : healthProbleamStr) {
|
|
|
if (!resultValue.contains(healthProblemValue)){
|
|
|
resultValue +=healthProblemValue+",";
|
|
|
if (gxy.equals(healthProblemValue)){
|
|
|
resultNameValue += "高血压病,";
|
|
|
}
|
|
|
if (tnb.equals(healthProblemValue)){
|
|
|
resultNameValue += "糖尿病,";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(resultValue) && resultValue.length()>1){
|
|
|
resultValue = resultValue.substring(0,resultValue.length()-1);
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(resultNameValue) && resultNameValue.length()>1){
|
|
|
resultNameValue = resultNameValue.substring(0,resultNameValue.length()-1);
|
|
|
}
|
|
|
map.put("health_problem",resultValue);
|
|
|
map.put("health_problem_name",resultNameValue);
|
|
|
}
|
|
|
}
|
|
|
jsonObject.put("list",resultList);
|
|
|
return jsonObject;
|
|
|
}
|