|
@ -452,14 +452,14 @@ public class PrescriptionService extends BaseService {
|
|
|
" p.create_time," +
|
|
|
" GROUP_CONCAT(d.health_problem) AS health_problem," +
|
|
|
" GROUP_CONCAT(d.health_problem_name) AS health_problem_name," +
|
|
|
" a.total_amount" +
|
|
|
" FORMAT(a.total_amount/100,1) AS total_amount" +
|
|
|
" FROM" +
|
|
|
" wlyy_prescription p" +
|
|
|
" LEFT JOIN wlyy_prescription_diagnosis d ON p. CODE = d.prescription_code" +
|
|
|
" LEFT JOIN wlyy_prescription_pay a ON p. CODE = a.prescription_code" +
|
|
|
" WHERE" +
|
|
|
" IF (" +
|
|
|
" p. STATUS > 50," +
|
|
|
" p. STATUS > 50 AND a.trade_status IS NOT NULL, " +
|
|
|
" a.trade_status = 1," +
|
|
|
" 1 = 1" +
|
|
|
")";
|
|
@ -526,7 +526,7 @@ public class PrescriptionService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
DecimalFormat df = new DecimalFormat("#.0");
|
|
|
jsonObject.put("totalAmount",totalAmount>0?df.format(totalAmount/100.0):0.0);
|
|
|
jsonObject.put("totalAmount",totalAmount>0?df.format(totalAmount):0.0);
|
|
|
sql += " limit ?,?";
|
|
|
resultList = jdbcTemplate.queryForList(sql,new Object[]{start,pageSize});
|
|
|
jsonObject.put("list",resultList);
|
|
@ -550,13 +550,13 @@ public class PrescriptionService extends BaseService {
|
|
|
" p.create_time," +
|
|
|
" GROUP_CONCAT(d.health_problem) AS health_problem," +
|
|
|
" GROUP_CONCAT(d.health_problem_name) AS health_problem_name,"+
|
|
|
" a.total_amount"+
|
|
|
" FORMAT(a.total_amount/100,1) AS total_amount"+
|
|
|
" FROM" +
|
|
|
" wlyy_prescription p" +
|
|
|
" LEFT JOIN wlyy_prescription_diagnosis d ON p. CODE = d.prescription_code" +
|
|
|
" LEFT JOIN wlyy_prescription_pay a ON p.code = a.prescription_code" +
|
|
|
" WHERE" +
|
|
|
" IF(p.status>50,a.trade_status=1,1=1) " ;
|
|
|
" IF(p.status>50 AND a.trade_status IS NOT NULL,a.trade_status=1,1=1) " ;
|
|
|
//判断关键字
|
|
|
if (StringUtils.isNotBlank(keyWord)){
|
|
|
sql += " AND (p.patient_name like '%"+keyWord+"%' or p.doctor_name like '%"+keyWord+"%')";
|
|
@ -571,7 +571,7 @@ public class PrescriptionService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
DecimalFormat df = new DecimalFormat("#.0");
|
|
|
jsonObject.put("totalAmount",totalAmount>0?df.format(totalAmount/100.0):0.0);
|
|
|
jsonObject.put("totalAmount",totalAmount>0?df.format(totalAmount):0.0);
|
|
|
sql+=" limit ?,?";
|
|
|
int start = (pageNo-1)*pageSize;
|
|
|
resultList = jdbcTemplate.queryForList(sql,new Object[]{start,pageSize});
|