统计功能更新
parent
768070aead
commit
f9979fb038
|
|
@ -101,6 +101,20 @@ public class OrderEndService extends BaseService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void queryList(String supermarketId,String tm,String customerId,String stm,String etm) {
|
||||||
|
|
||||||
|
|
||||||
|
// 获取历史数据
|
||||||
|
List<Record> tempList = OrderTempService.me.getOrderTempGroupBy(supermarketId,tm,customerId,stm,etm);
|
||||||
|
|
||||||
|
if (CollectionUtils.isEmpty(tempList)) {
|
||||||
|
log.info("数据结果为空");
|
||||||
|
throw new IllegalArgumentException("数据结果为空");
|
||||||
|
}
|
||||||
|
processing(tm,customerId,tempList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void queryList(String tm,String customerId) {
|
public void queryList(String tm,String customerId) {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -455,14 +455,27 @@ public class OrderTempService extends BaseService {
|
||||||
* @return 销售订单数据
|
* @return 销售订单数据
|
||||||
*/
|
*/
|
||||||
public List<Record> getOrderTempGroupBy(String tm,String customerId) {
|
public List<Record> getOrderTempGroupBy(String tm,String customerId) {
|
||||||
|
return getOrderTempGroupBy(tm,customerId,null,null,null);
|
||||||
|
}
|
||||||
|
public List<Record> getOrderTempGroupBy(String tm,String customerId,String supermarketId,String stm,String etm) {
|
||||||
List<Object> paraList = new ArrayList<>();
|
List<Object> paraList = new ArrayList<>();
|
||||||
|
|
||||||
String findSql = "";
|
String findSql = "";
|
||||||
|
|
||||||
if (customerId != null) {
|
if (supermarketId != null) {
|
||||||
|
findSql = " AND SUPERMARKET_ID = ? \n";
|
||||||
|
paraList.add(supermarketId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supermarketId != null) {
|
||||||
findSql = " AND CUSTOMER_ID = ? \n";
|
findSql = " AND CUSTOMER_ID = ? \n";
|
||||||
paraList.add(customerId);
|
paraList.add(customerId);
|
||||||
}
|
}
|
||||||
|
if (stm != null && etm != null) {
|
||||||
|
findSql = " AND CREATE_TIME BETWEEN ? AND ? \n";
|
||||||
|
paraList.add(stm + STM_SUFFIX);
|
||||||
|
paraList.add(etm + ETM_SUFFIX);
|
||||||
|
}
|
||||||
if (tm != null) {
|
if (tm != null) {
|
||||||
findSql = " AND CREATE_TIME BETWEEN ? AND ? \n";
|
findSql = " AND CREATE_TIME BETWEEN ? AND ? \n";
|
||||||
paraList.add(tm + STM_SUFFIX);
|
paraList.add(tm + STM_SUFFIX);
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,10 @@ public class OrderTempController extends BaseController {
|
||||||
|
|
||||||
String tm = get("tm");
|
String tm = get("tm");
|
||||||
String customerId = get("customerId");
|
String customerId = get("customerId");
|
||||||
OrderEndService.me.queryList(tm, customerId); // 通过接口更新
|
String supermarketId = get("supermarketId");
|
||||||
|
String stm = get("stm");
|
||||||
|
String etm = get("etm");
|
||||||
|
OrderEndService.me.queryList(supermarketId,tm, customerId,stm,etm); // 通过接口更新
|
||||||
renderJson();
|
renderJson();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue