|
@ -377,7 +377,7 @@ public class MedicineStockOutService extends BaseJpaService<Mediicinestockout, M
|
|
" t.update_user_name as updateUserName,\n" +
|
|
" t.update_user_name as updateUserName,\n" +
|
|
" t.up_num as upNum\n" +
|
|
" t.up_num as upNum\n" +
|
|
"FROM\n" +
|
|
"FROM\n" +
|
|
" t_mediicine_stockout AS t LEFT JOIN base_user bu ON t.replenish_er = bu.id LEFT JOIN t_mediicine_device tmd on t.replenish_equ = tmd.id where 1=1";
|
|
|
|
|
|
" t_mediicine_stockout AS t LEFT JOIN base_user bu ON t.replenish_er = bu.id LEFT JOIN t_mediicine_device tmd on t.replenish_equ = tmd.id where 1=1 ";
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(startTime)&& org.apache.commons.lang.StringUtils.isNotBlank(endTime)){
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(startTime)&& org.apache.commons.lang.StringUtils.isNotBlank(endTime)){
|
|
// conditionSql += " AND t.prescribe_time BETWEEN to_date('" + startTime +"','yyyy-mm-dd hh24:mi:ss') " +
|
|
// conditionSql += " AND t.prescribe_time BETWEEN to_date('" + startTime +"','yyyy-mm-dd hh24:mi:ss') " +
|
|
// " AND to_date('" + endTime + "','yyyy-mm-dd hh24:mi:ss')";
|
|
// " AND to_date('" + endTime + "','yyyy-mm-dd hh24:mi:ss')";
|
|
@ -388,7 +388,7 @@ public class MedicineStockOutService extends BaseJpaService<Mediicinestockout, M
|
|
conditionSql += " and t.receive_state = '" + receiveState + "'";
|
|
conditionSql += " and t.receive_state = '" + receiveState + "'";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(replenishEr)){
|
|
if (!StringUtils.isEmpty(replenishEr)){
|
|
conditionSql += " AND CONCAT(IFNULL(bu.name,''),IFNULL(bu.mobile,'') LIKE '%" + replenishEr + "%' ";
|
|
|
|
|
|
conditionSql += " AND (bu.name like '%"+replenishEr+"%' or bu.mobile LIKE '%"+replenishEr+"%') ";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(docNum)){
|
|
if (!StringUtils.isEmpty(docNum)){
|
|
conditionSql += " and t.doc_num like '%" + docNum + "%'";
|
|
conditionSql += " and t.doc_num like '%" + docNum + "%'";
|
|
@ -396,6 +396,7 @@ public class MedicineStockOutService extends BaseJpaService<Mediicinestockout, M
|
|
sql = sql + conditionSql +" order by t.receive_state asc,t.doc_time desc ";
|
|
sql = sql + conditionSql +" order by t.receive_state asc,t.doc_time desc ";
|
|
|
|
|
|
List<Map<String,Object>> list=null;
|
|
List<Map<String,Object>> list=null;
|
|
|
|
|
|
list = hibenateUtils.createSQLQuery(sql,page,size);
|
|
list = hibenateUtils.createSQLQuery(sql,page,size);
|
|
|
|
|
|
String countSql = " select " +
|
|
String countSql = " select " +
|