|
@ -553,7 +553,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
* @param size 分页大小
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONArray getHDoctorPrescriptionExpressage(String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
|
|
|
public JSONArray getHDoctorPrescriptionExpressage(String teamCode,String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
|
|
|
|
|
|
StringBuffer pre_sql = new StringBuffer("SELECT " +
|
|
|
" p.`name`, " +
|
|
@ -570,7 +570,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
" JOIN wlyy_prescription_expressage e ON pr.code = e.prescription_code " +
|
|
|
" WHERE 1=1 " );
|
|
|
List<Object> params = new ArrayList<>();
|
|
|
setExpressageSql(pre_sql,params,type, doctor, nameKey, startDate, endDate, hospital, state, page, size);
|
|
|
setExpressageSql(pre_sql,params,teamCode,type, doctor, nameKey, startDate, endDate, hospital, state, page, size);
|
|
|
List<Map<String,Object>> rs = jdbcTemplate.queryForList(pre_sql.toString(),params.toArray());
|
|
|
//通过缓存查找药品和疾病
|
|
|
for(Map<String,Object> map :rs){
|
|
@ -580,7 +580,8 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
}
|
|
|
return new JSONArray(rs);
|
|
|
}
|
|
|
public void setExpressageSql(StringBuffer pre_sql,List<Object> param,String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
|
|
|
public void setExpressageSql(StringBuffer pre_sql,List<Object> param,String teamCode,String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
|
|
|
|
|
|
if(StringUtils.isNotBlank(type)){
|
|
|
if("1".equals(type)){
|
|
|
pre_sql.append(" AND e.expressage_Code = ?");
|
|
@ -590,6 +591,10 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
param.add(doctor);
|
|
|
}
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(teamCode)){
|
|
|
pre_sql.append(" AND p.admin_team_id = ? ");
|
|
|
param.add(teamCode);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(nameKey)){
|
|
|
pre_sql.append(" AND p.name LIKE ? ");
|
|
|
param.add("%"+nameKey+"%");
|