统计功能更新

dev
徐杰盟 2024-03-06 16:22:19 +08:00
parent 768070aead
commit f9979fb038
3 changed files with 34 additions and 4 deletions

View File

@ -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) {

View File

@ -455,14 +455,27 @@ public class OrderTempService extends BaseService {
* @return
*/
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<>();
String findSql = "";
if (customerId != null) {
if (supermarketId != null) {
findSql = " AND SUPERMARKET_ID = ? \n";
paraList.add(supermarketId);
}
if (supermarketId != null) {
findSql = " AND CUSTOMER_ID = ? \n";
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) {
findSql = " AND CREATE_TIME BETWEEN ? AND ? \n";
paraList.add(tm + STM_SUFFIX);

View File

@ -116,9 +116,12 @@ public class OrderTempController extends BaseController {
public void updateOrderEnd() {
String tm = get("tm");
String customerId = get("customerId");
OrderEndService.me.queryList(tm, customerId); // 通过接口更新
String tm = get("tm");
String customerId = get("customerId");
String supermarketId = get("supermarketId");
String stm = get("stm");
String etm = get("etm");
OrderEndService.me.queryList(supermarketId,tm, customerId,stm,etm); // 通过接口更新
renderJson();
}
}