|
@ -222,7 +222,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
public JSONObject queryOrderListFullInfo(String content,String orderNum, String equNum, String contact,
|
|
public JSONObject queryOrderListFullInfo(String content,String orderNum, String equNum, String contact,
|
|
String startTime, String endTime, String sellState,
|
|
String startTime, String endTime, String sellState,
|
|
String orderState,String reviewerState, String dispensingWindow, String community,String town,
|
|
String orderState,String reviewerState, String dispensingWindow, String community,String town,
|
|
String userId, int page, int size, String wechatId) throws Exception {
|
|
|
|
|
|
String userId, int page, int size, String wechatId,String timeSort) throws Exception {
|
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
@ -349,7 +349,8 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
conditionSql += " and '," + belongCommunitys + ",' LIKE CONCAT('%,',t.belong_community,',%')\n";
|
|
conditionSql += " and '," + belongCommunitys + ",' LIKE CONCAT('%,',t.belong_community,',%')\n";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(content)) {
|
|
if (!StringUtils.isEmpty(content)) {
|
|
conditionSql += " and CONCAT(IFNULL(t.`prescribe_num`,''),IFNULL(t.`contact`,''),IFNULL(t.`shipping_equ`,'')) like '%" + content + "%'";
|
|
|
|
|
|
conditionSql += " and CONCAT(IFNULL(t.`prescribe_num`,''),IFNULL(t.`contact`,''),IFNULL(t.`shipping_equ`,'')," +
|
|
|
|
" IFNULL(t.`community`,'')) like '%" + content + "%'";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(community)) {
|
|
if (!StringUtils.isEmpty(community)) {
|
|
conditionSql += " and t.belong_community = '" + community + "'";
|
|
conditionSql += " and t.belong_community = '" + community + "'";
|
|
@ -382,7 +383,15 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
if (!StringUtils.isEmpty(dispensingWindow)) {
|
|
if (!StringUtils.isEmpty(dispensingWindow)) {
|
|
conditionSql += " and t.dispensing_window = '" + dispensingWindow + "'";
|
|
conditionSql += " and t.dispensing_window = '" + dispensingWindow + "'";
|
|
}
|
|
}
|
|
sencodSql = sencodSql + conditionSql + " order by t.sell_state asc,t.prescribe_time desc ";
|
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(timeSort)){
|
|
|
|
if ("1".equals(timeSort)){
|
|
|
|
sencodSql = sencodSql + conditionSql + " order by t.prescribe_time asc ";
|
|
|
|
}else {
|
|
|
|
sencodSql = sencodSql + conditionSql + " order by prescribe_time desc ";
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
sencodSql = sencodSql + conditionSql + " order by t.sell_state asc,t.prescribe_time desc ";
|
|
|
|
}
|
|
|
|
|
|
orderList = hibenateUtils.createSQLQuery(sencodSql, page, size);
|
|
orderList = hibenateUtils.createSQLQuery(sencodSql, page, size);
|
|
|
|
|