服务订单管理查询接口对接
This commit is contained in:
parent
19161fda7f
commit
043d8cf9f9
|
|
@ -112,6 +112,10 @@ public class OrderDetailController extends BaseController {
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo list(OrderDetail orderDetail) {
|
public TableDataInfo list(OrderDetail orderDetail) {
|
||||||
|
if (orderDetail.getSearchAfterList() !=null && orderDetail.getSearchAfterList()) {
|
||||||
|
return this.afterServiceList(orderDetail);
|
||||||
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotEmpty(orderDetail.getWorkerName()) || StringUtils.isNotEmpty(orderDetail.getWorkerPhone())){
|
if(StringUtils.isNotEmpty(orderDetail.getWorkerName()) || StringUtils.isNotEmpty(orderDetail.getWorkerPhone())){
|
||||||
Worker param = new Worker();
|
Worker param = new Worker();
|
||||||
param.setName(orderDetail.getWorkerName());
|
param.setName(orderDetail.getWorkerName());
|
||||||
|
|
@ -150,7 +154,7 @@ public class OrderDetailController extends BaseController {
|
||||||
List<FinancialMaster> financialMasters = financialMasterService.selectByOrderMasterIds(orderMasterIds);
|
List<FinancialMaster> financialMasters = financialMasterService.selectByOrderMasterIds(orderMasterIds);
|
||||||
Map<Long, FinancialMaster> financialMasterMap = financialMasters
|
Map<Long, FinancialMaster> financialMasterMap = financialMasters
|
||||||
.stream().collect(Collectors.toMap(FinancialMaster::getOrderMasterId, x -> x, (x, y) -> y));
|
.stream().collect(Collectors.toMap(FinancialMaster::getOrderMasterId, x -> x, (x, y) -> y));
|
||||||
|
|
||||||
Set<Long> orderDetailIds = orderDetails.stream().map(OrderDetail::getId).collect(Collectors.toSet());
|
Set<Long> orderDetailIds = orderDetails.stream().map(OrderDetail::getId).collect(Collectors.toSet());
|
||||||
Map<Long, FinancialDetail> financialDetailMap = financialDetailService.selectByOrderDetailIds(orderDetailIds)
|
Map<Long, FinancialDetail> financialDetailMap = financialDetailService.selectByOrderDetailIds(orderDetailIds)
|
||||||
.stream().collect(Collectors.toMap(FinancialDetail::getOrderDetailId, x -> x, (x, y) -> y));
|
.stream().collect(Collectors.toMap(FinancialDetail::getOrderDetailId, x -> x, (x, y) -> y));
|
||||||
|
|
@ -599,6 +603,7 @@ public class OrderDetailController extends BaseController {
|
||||||
orderListResponse.setOrderDetailCode(detail.getCode());
|
orderListResponse.setOrderDetailCode(detail.getCode());
|
||||||
orderListResponse.setOrderMasterId(detail.getOrderMasterId());
|
orderListResponse.setOrderMasterId(detail.getOrderMasterId());
|
||||||
orderListResponse.setOrderMasterCode(detail.getOrderMasterCode());
|
orderListResponse.setOrderMasterCode(detail.getOrderMasterCode());
|
||||||
|
orderListResponse.setGoods(goods);
|
||||||
orderListResponse.setGoodsName(goods.getGoodsName());
|
orderListResponse.setGoodsName(goods.getGoodsName());
|
||||||
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
||||||
orderListResponse.setDiscountMoney(financialDetail.getDiscountMoney());
|
orderListResponse.setDiscountMoney(financialDetail.getDiscountMoney());
|
||||||
|
|
@ -995,4 +1000,57 @@ public class OrderDetailController extends BaseController {
|
||||||
int i = orderDetailService.insertOrderAddSubtract(body);
|
int i = orderDetailService.insertOrderAddSubtract(body);
|
||||||
return AjaxResult.success(i);
|
return AjaxResult.success(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/differentStatus/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult differentStatusOrderCount(OrderDetail orderDetail) {
|
||||||
|
return AjaxResult.success(orderDetailService.differentStatusOrderCount(orderDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult OrderDetailCount(OrderDetail orderDetail) {
|
||||||
|
if(StringUtils.isNotEmpty(orderDetail.getWorkerName()) || StringUtils.isNotEmpty(orderDetail.getWorkerPhone())){
|
||||||
|
Worker param = new Worker();
|
||||||
|
param.setName(orderDetail.getWorkerName());
|
||||||
|
param.setPhone(orderDetail.getWorkerPhone());
|
||||||
|
List<Worker> workList = workerService.getWorkList(param);
|
||||||
|
List<Long> ids = workList.stream().map(Worker::getWorkerId).collect(Collectors.toList());
|
||||||
|
orderDetail.setWorkerIds(ids);
|
||||||
|
if(CollectionUtils.isEmpty(ids)){
|
||||||
|
return AjaxResult.success(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(orderDetail.getSysPayStatus() != null){
|
||||||
|
FinancialMaster param = new FinancialMaster();
|
||||||
|
param.setPayStatus(orderDetail.getSysPayStatus());
|
||||||
|
List<FinancialMaster> financialMasters = financialMasterService.selectFinancialMasterList(param);
|
||||||
|
List<Long> masterIds = financialMasters.stream().map(FinancialMaster::getOrderMasterId).collect(Collectors.toList());
|
||||||
|
orderDetail.setMasterIds(masterIds);
|
||||||
|
if(CollectionUtils.isEmpty(masterIds)){
|
||||||
|
return AjaxResult.success(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.getSysUser().getDept().getParentId() != 101) {
|
||||||
|
orderDetail.setDeptId(this.getSysUser().getDept().getParentId());
|
||||||
|
}
|
||||||
|
return AjaxResult.success(orderDetailService.countOrderDetailList(orderDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/after/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult AfterDetailOrderCount(OrderDetail orderDetail) {
|
||||||
|
AfterServiceRecord afterServiceRecord = new AfterServiceRecord();
|
||||||
|
afterServiceRecord.setExcludeAfterServiceFinished(Boolean.TRUE);
|
||||||
|
List<AfterServiceRecord> afterServiceRecordList = afterServiceRecordService.selectAfterServiceRecordList(afterServiceRecord);
|
||||||
|
// 踢重后的子单ids
|
||||||
|
List<Long> detailIds = afterServiceRecordList.stream().map(AfterServiceRecord::getOrderDetailId).distinct().collect(Collectors.toList());
|
||||||
|
String ids = StringUtils.join(detailIds, ",");
|
||||||
|
if (StringUtils.isNotEmpty(ids)) {
|
||||||
|
orderDetail.setOrderDetailIds(ids);
|
||||||
|
} else {
|
||||||
|
orderDetail.setOrderDetailIds("0");
|
||||||
|
}
|
||||||
|
return AjaxResult.success(orderDetailService.countOrderDetailList(orderDetail));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.ghy.web.pojo.vo;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ghy.goods.domain.Goods;
|
||||||
import com.ghy.goods.domain.GoodsArea;
|
import com.ghy.goods.domain.GoodsArea;
|
||||||
import com.ghy.order.domain.AfterServiceRecord;
|
import com.ghy.order.domain.AfterServiceRecord;
|
||||||
import com.ghy.payment.domain.FinancialChangeRecord;
|
import com.ghy.payment.domain.FinancialChangeRecord;
|
||||||
|
|
@ -149,4 +150,6 @@ public class OrderListResponse {
|
||||||
private Integer timeoutFineTimes;
|
private Integer timeoutFineTimes;
|
||||||
|
|
||||||
private String orderMode;
|
private String orderMode;
|
||||||
|
|
||||||
|
private Goods goods;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,12 @@
|
||||||
.long-input {
|
.long-input {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.active-condition-btn {
|
||||||
|
background-color: #1c84c6;
|
||||||
|
border-color: #1c84c6;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="gray-bg">
|
<body class="gray-bg">
|
||||||
|
|
@ -62,55 +68,62 @@
|
||||||
<input type="hidden" id="deptId" name="deptId">
|
<input type="hidden" id="deptId" name="deptId">
|
||||||
<input type="hidden" id="parentId" name="parentId">
|
<input type="hidden" id="parentId" name="parentId">
|
||||||
<input type="hidden" id="orderStatus" name="orderStatus"/>
|
<input type="hidden" id="orderStatus" name="orderStatus"/>
|
||||||
<div>
|
<div class="condition-btn">
|
||||||
<select id="allOrServing">
|
<select id="allOrServing">
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="">在途</option>
|
<option value="">在途</option>
|
||||||
</select>
|
</select>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {sysPayStatus: 0})">
|
||||||
待付款
|
待付款
|
||||||
|
(<span id="nonPaidOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1})">
|
||||||
已发布
|
已接单
|
||||||
|
(<span id="acceptedOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 2})">
|
||||||
未约时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline">
|
|
||||||
未排班
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(2)">
|
|
||||||
待上门
|
待上门
|
||||||
|
(<span id="waitForDoorOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(3)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 3})">
|
||||||
进行中
|
进行中
|
||||||
|
(<span id="servingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(4)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 4})">
|
||||||
确认审核
|
确认审核
|
||||||
|
(<span class="confirmingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(5)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 5})">
|
||||||
完成
|
完成
|
||||||
|
(<span id="finishedOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(6)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 6})">
|
||||||
关闭
|
关闭
|
||||||
|
(<span id="canceledOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderToday(this)">
|
||||||
今日待上门
|
今日待上门
|
||||||
|
(<span id="todayOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderTomorrow(this)">
|
||||||
明日待上门
|
明日待上门
|
||||||
|
(<span id="tomorrowOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {searchAfterList: true})">
|
||||||
售后
|
售后
|
||||||
|
(<span id="afterServiceOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
急报中
|
急报中
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
退单
|
退单
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
售后纠纷
|
售后纠纷
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board">
|
<div class="flex-board">
|
||||||
|
|
@ -127,36 +140,36 @@
|
||||||
创建时间:
|
创建时间:
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
<input id="createTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
至
|
至
|
||||||
<div class="input-group date m-r">
|
<div class="input-group date m-r">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
<input id="createTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board m-t">
|
<div class="flex-board m-t">
|
||||||
服务时间:
|
服务时间:
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
<input id="workBeginTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
至
|
至
|
||||||
<div class="input-group date m-r">
|
<div class="input-group date m-r">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
<input id="workBeginTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board m-t">
|
<div class="flex-board m-t">
|
||||||
完成时间:
|
完成时间:
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
<input id="workFinishTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
至
|
至
|
||||||
<div class="input-group date m-r">
|
<div class="input-group date m-r">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
<input id="workFinishTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board m-t">
|
<div class="flex-board m-t">
|
||||||
|
|
@ -168,35 +181,35 @@
|
||||||
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<!-- <div class="flex-board-no-wrap m-t">-->
|
||||||
<label class="form-control-label">后台人员:</label>
|
<!-- <label class="form-control-label">后台人员:</label>-->
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<!-- <input type="text" class="form-control normal-input m-r">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">商家名称:</label>
|
<label class="form-control-label">商家名称:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="storeName" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">商家电话:</label>
|
<label class="form-control-label">商家电话:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="storePhone" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">接单师傅名称:</label>
|
<label class="form-control-label">接单师傅名称:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="workerName" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">接单师傅电话:</label>
|
<label class="form-control-label">接单师傅电话:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="workerPhone" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">师傅类型:</label>
|
|
||||||
<select class="form-control normal-select-input m-r">
|
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="">大师傅</option>
|
|
||||||
<option value="">小师傅</option>
|
|
||||||
</select>
|
|
||||||
<input type="text" class="form-control normal-input m-r" placeholder="师傅姓名电话">
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="flex-board-no-wrap m-t">-->
|
||||||
|
<!-- <label class="form-control-label">师傅类型:</label>-->
|
||||||
|
<!-- <select class="form-control normal-select-input m-r">-->
|
||||||
|
<!-- <option value="">全部</option>-->
|
||||||
|
<!-- <option value="">大师傅</option>-->
|
||||||
|
<!-- <option value="">小师傅</option>-->
|
||||||
|
<!-- </select>-->
|
||||||
|
<!-- <input type="text" class="form-control normal-input m-r" placeholder="师傅姓名电话">-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">订单模式:</label>
|
<label class="form-control-label">订单模式:</label>
|
||||||
<select id="orderMode" class="form-control normal-select-input m-r" onchange="changeOrderMode(this.options[this.options.selectedIndex].value)">
|
<select id="orderMode" class="form-control normal-select-input m-r" onchange="changeOrderMode(this.options[this.options.selectedIndex].value)">
|
||||||
|
|
@ -225,48 +238,59 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">订单查询:</label>
|
<label class="form-control-label">订单查询:</label>
|
||||||
<input type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
<input id="keyWords" type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
||||||
</div>
|
</div>
|
||||||
<div class="m-t">
|
<div class="m-t">
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="searchByForm()"><i
|
||||||
class="fa fa-search"></i> 搜索</a>
|
class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetForm()"><i
|
||||||
class="fa fa-refresh"></i> 重置</a>
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-t">
|
<div class="m-t condition-btn">
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(0)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 0})">
|
||||||
新订单
|
新订单
|
||||||
|
(<span id="newOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 0})">
|
||||||
接单超时
|
接单超时
|
||||||
|
(<span id="newOrderTimeoutNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 1})">
|
||||||
约单超时
|
约单超时
|
||||||
|
(<span class="acceptedTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 1})">
|
||||||
排单超时
|
排单超时
|
||||||
|
(<span class="acceptedTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
无法排单
|
无法排单
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 2})">
|
||||||
待上门超时
|
待上门超时
|
||||||
|
(<span id="waitForDoorTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 3})">
|
||||||
进行超时
|
进行超时
|
||||||
|
(<span id="servingTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
售后超时
|
售后超时
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
客诉中
|
客诉中
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 4})">
|
||||||
审核中
|
审核中
|
||||||
|
(<span class="confirmingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
一票价未改价
|
一票价未改价
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -304,6 +328,7 @@
|
||||||
|
|
||||||
var editFlag = [[${@permission.hasPermi('order:order:edit')}]];
|
var editFlag = [[${@permission.hasPermi('order:order:edit')}]];
|
||||||
var prefix = ctx + "order/detail";
|
var prefix = ctx + "order/detail";
|
||||||
|
var customParams = {};
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
var panehHidden = false;
|
var panehHidden = false;
|
||||||
|
|
@ -367,6 +392,110 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
changeOrderMode();
|
changeOrderMode();
|
||||||
|
|
||||||
|
<!-- 不同状态订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#newOrderNum').text(result.data.newOrderNum);
|
||||||
|
$('#acceptedOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
$('#canceledOrderNum').text(result.data.canceledOrderNum);
|
||||||
|
$('.confirmingOrderNum').text(result.data.confirmingOrderNum);
|
||||||
|
$('#finishedOrderNum').text(result.data.finishedOrderNum);
|
||||||
|
$('#servingOrderNum').text(result.data.servingOrderNum);
|
||||||
|
$('#waitForDoorOrderNum').text(result.data.waitForDoorOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 不同状态超时订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
data: {timeout: 1},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#newTimeoutOrderNum').text(result.data.newOrderNum);
|
||||||
|
$('.acceptedTimeoutOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
$('#servingTimeoutOrderNum').text(result.data.servingOrderNum);
|
||||||
|
$('#waitForDoorTimeoutOrderNum').text(result.data.waitForDoorOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 待付款订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {sysPayStatus: 0},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#nonPaidOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 今日和明日单数量统计-->
|
||||||
|
var date = new Date();
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#todayOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#tomorrowOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 售后订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/after/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#afterServiceOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeOrderMode(orderMode) {
|
function changeOrderMode(orderMode) {
|
||||||
|
|
@ -433,6 +562,7 @@
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/list",
|
url: prefix + "/list",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
|
queryParams: queryParams,
|
||||||
sortName: "createTime",
|
sortName: "createTime",
|
||||||
sortOrder: "desc",
|
sortOrder: "desc",
|
||||||
modalName: "订单",
|
modalName: "订单",
|
||||||
|
|
@ -544,6 +674,12 @@
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function queryParams(params) {
|
||||||
|
var search = $.table.queryParams(params);
|
||||||
|
Object.assign(search, customParams)
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
function detail(id) {
|
function detail(id) {
|
||||||
var url = "order/goods?orderId=" + id;
|
var url = "order/goods?orderId=" + id;
|
||||||
$.modal.open("商品信息", url);
|
$.modal.open("商品信息", url);
|
||||||
|
|
@ -563,8 +699,66 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchByOrderStatus(orderStatus) {
|
function changeConditionBtnChosenStyle(e) {
|
||||||
$('#orderStatus').val(orderStatus);
|
$('.condition-btn .btn').removeClass('active-condition-btn');
|
||||||
|
if (e) {
|
||||||
|
$(e).addClass('active-condition-btn');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectConditionBtn(e, params = {}) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
searchOrderList(params)
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderToday(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderTomorrow(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchOrderList(params) {
|
||||||
|
customParams = params;
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchByForm() {
|
||||||
|
let params = {
|
||||||
|
createTimeStart: $('#createTimeStart').val() ? $('#createTimeStart').val() + " 00:00:00" : undefined,
|
||||||
|
createTimeEnd: $('#createTimeEnd').val() ? $('#createTimeEnd').val() + " 23:59:59" : undefined,
|
||||||
|
workBeginTimeStart: $('#workBeginTimeStart').val(),
|
||||||
|
workBeginTimeEnd: $('#workBeginTimeEnd').val() ? $('#workBeginTimeEnd').val() + " 23:59:59" : undefined,
|
||||||
|
workFinishTimeStart: $('#workFinishTimeStart').val(),
|
||||||
|
workFinishTimeEnd: $('#workFinishTimeEnd').val() ? $('#workFinishTimeEnd').val() + " 23:59:59" : undefined,
|
||||||
|
storeName: $('#storeName').val(),
|
||||||
|
storePhone: $('#storePhone').val(),
|
||||||
|
workerName: $('#workerName').val(),
|
||||||
|
workerPhone: $('#workerPhone').val(),
|
||||||
|
keyWords: $('#keyWords').val()
|
||||||
|
}
|
||||||
|
|
||||||
|
customParams = Object.assign(customParams, params);
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetForm() {
|
||||||
|
$.form.reset();
|
||||||
|
customParams = {};
|
||||||
|
changeConditionBtnChosenStyle();
|
||||||
$.table.search();
|
$.table.search();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,11 +118,11 @@
|
||||||
明日待上门
|
明日待上门
|
||||||
(<span id="tomorrowOrderNum">0</span>)
|
(<span id="tomorrowOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
售后
|
售后
|
||||||
(<span>0</span>)
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
急报中
|
急报中
|
||||||
(<span>0</span>)
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -153,7 +153,7 @@
|
||||||
<div class="m-t">
|
<div class="m-t">
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||||
class="fa fa-search"></i> 搜索</a>
|
class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetForm()"><i
|
||||||
class="fa fa-refresh"></i> 重置</a>
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -555,6 +555,13 @@
|
||||||
$.table.search();
|
$.table.search();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetForm() {
|
||||||
|
$.form.reset();
|
||||||
|
customParams = {};
|
||||||
|
changeConditionBtnChosenStyle();
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
function showPayQrcode(id) {
|
function showPayQrcode(id) {
|
||||||
var url = "payQrcode/" + id;
|
var url = "payQrcode/" + id;
|
||||||
<!-- $.modal.open("支付二维码", url, 290, 360);-->
|
<!-- $.modal.open("支付二维码", url, 290, 360);-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ghy.order.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 订单通用统计实体
|
||||||
|
* @author: yangdanqi
|
||||||
|
* @date: 2023/6/14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderCount {
|
||||||
|
private Integer newOrderNum;
|
||||||
|
|
||||||
|
private Integer acceptedOrderNum;
|
||||||
|
|
||||||
|
private Integer waitForDoorOrderNum;
|
||||||
|
|
||||||
|
private Integer servingOrderNum;
|
||||||
|
|
||||||
|
private Integer confirmingOrderNum;
|
||||||
|
|
||||||
|
private Integer finishedOrderNum;
|
||||||
|
|
||||||
|
private Integer canceledOrderNum;
|
||||||
|
}
|
||||||
|
|
@ -8,8 +8,10 @@ import com.ghy.common.enums.PayTypeEnum;
|
||||||
import com.ghy.goods.domain.Goods;
|
import com.ghy.goods.domain.Goods;
|
||||||
import com.ghy.worker.domain.Worker;
|
import com.ghy.worker.domain.Worker;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -45,11 +47,11 @@ public class OrderDetail extends BaseEntity {
|
||||||
|
|
||||||
@Excel(name = "消费者电话", cellType = Excel.ColumnType.STRING)
|
@Excel(name = "消费者电话", cellType = Excel.ColumnType.STRING)
|
||||||
private String customerPhone;
|
private String customerPhone;
|
||||||
|
|
||||||
private String addressPhone;
|
private String addressPhone;
|
||||||
|
|
||||||
private String addressName;
|
private String addressName;
|
||||||
|
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@Excel(name = "订单类型", cellType = Excel.ColumnType.NUMERIC)
|
@Excel(name = "订单类型", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
|
@ -179,4 +181,19 @@ public class OrderDetail extends BaseEntity {
|
||||||
|
|
||||||
private List<Long> masterIds;
|
private List<Long> masterIds;
|
||||||
|
|
||||||
|
private Boolean searchAfterList;
|
||||||
|
|
||||||
|
private Date workBeginTimeStart;
|
||||||
|
|
||||||
|
private Date workBeginTimeEnd;
|
||||||
|
|
||||||
|
private Date workFinishTimeStart;
|
||||||
|
|
||||||
|
private Date workFinishTimeEnd;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTimeStart;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ghy.order.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 子单统计实体
|
||||||
|
* @author: yangdanqi
|
||||||
|
* @date: 2023/6/14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderDetailCount extends OrderCount {
|
||||||
|
}
|
||||||
|
|
@ -8,16 +8,5 @@ import lombok.Data;
|
||||||
* @date: 2023/6/7
|
* @date: 2023/6/7
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class OrderMasterCount {
|
public class OrderMasterCount extends OrderCount {
|
||||||
private Integer acceptedOrderNum;
|
|
||||||
|
|
||||||
private Integer waitForDoorOrderNum;
|
|
||||||
|
|
||||||
private Integer servingOrderNum;
|
|
||||||
|
|
||||||
private Integer confirmingOrderNum;
|
|
||||||
|
|
||||||
private Integer finishedOrderNum;
|
|
||||||
|
|
||||||
private Integer canceledOrderNum;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ghy.order.mapper;
|
package com.ghy.order.mapper;
|
||||||
|
|
||||||
import com.ghy.order.domain.OrderDetail;
|
import com.ghy.order.domain.OrderDetail;
|
||||||
|
import com.ghy.order.domain.OrderDetailCount;
|
||||||
import com.ghy.order.domain.OrderStatusCount;
|
import com.ghy.order.domain.OrderStatusCount;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
@ -114,4 +115,6 @@ public interface OrderDetailMapper {
|
||||||
@Param("drawCashTime") Date drawCashTime, @Param("arrivalTime") Date arrivalTime);
|
@Param("drawCashTime") Date drawCashTime, @Param("arrivalTime") Date arrivalTime);
|
||||||
|
|
||||||
int deleteByMaster(Long masterId);
|
int deleteByMaster(Long masterId);
|
||||||
|
|
||||||
|
OrderDetailCount differentStatusOrderCount(OrderDetail orderDetail);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.ghy.order.service;
|
package com.ghy.order.service;
|
||||||
|
|
||||||
import com.ghy.common.enums.OrderStatus;
|
import com.ghy.common.enums.OrderStatus;
|
||||||
import com.ghy.order.domain.OrderAddSubtract;
|
import com.ghy.order.domain.*;
|
||||||
import com.ghy.order.domain.OrderDetail;
|
|
||||||
import com.ghy.order.domain.OrderStatusCount;
|
|
||||||
import com.ghy.payment.domain.FinancialChangeRecord;
|
import com.ghy.payment.domain.FinancialChangeRecord;
|
||||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||||
|
|
||||||
|
|
@ -186,4 +184,6 @@ public interface OrderDetailService {
|
||||||
* @return 1
|
* @return 1
|
||||||
*/
|
*/
|
||||||
int insertOrderAddSubtract(OrderAddSubtract body);
|
int insertOrderAddSubtract(OrderAddSubtract body);
|
||||||
|
|
||||||
|
OrderDetailCount differentStatusOrderCount(OrderDetail orderDetail);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -849,4 +849,9 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
insert.setPayType(body.getPayType());
|
insert.setPayType(body.getPayType());
|
||||||
return orderAddSubtractMapper.insert(insert);
|
return orderAddSubtractMapper.insert(insert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrderDetailCount differentStatusOrderCount(OrderDetail orderDetail) {
|
||||||
|
return orderDetailMapper.differentStatusOrderCount(orderDetail);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,24 @@
|
||||||
<if test="expectTimeEnd != null">
|
<if test="expectTimeEnd != null">
|
||||||
AND od.expect_time_end <= #{expectTimeEnd}
|
AND od.expect_time_end <= #{expectTimeEnd}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="createTimeStart != null">
|
||||||
|
AND od.create_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null">
|
||||||
|
AND od.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="workFinishTimeStart != null">
|
||||||
|
AND od.work_finish_time >= #{workFinishTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="workFinishTimeEnd != null">
|
||||||
|
AND od.work_finish_time <= #{workFinishTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="workBeginTimeStart != null">
|
||||||
|
AND od.work_begin_time >= #{workBeginTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="workBeginTimeEnd != null">
|
||||||
|
AND od.work_begin_time <= #{workBeginTimeEnd}
|
||||||
|
</if>
|
||||||
<if test="orderDetailIds != null">
|
<if test="orderDetailIds != null">
|
||||||
AND od.id in ( ${orderDetailIds} )
|
AND od.id in ( ${orderDetailIds} )
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -248,6 +266,18 @@
|
||||||
#{drawCashStatus}
|
#{drawCashStatus}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="timeout != null">
|
||||||
|
AND od.timeout_ = #{timeout}
|
||||||
|
</if>
|
||||||
|
<if test="masterIds != null and masterIds.size() > 0">
|
||||||
|
AND od.order_master_id in
|
||||||
|
<foreach collection="masterIds" item="masterId" open="(" separator="," close=")">
|
||||||
|
#{masterId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="orderDetailIds != null">
|
||||||
|
AND od.id in ( ${orderDetailIds} )
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by od.create_time
|
order by od.create_time
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
|
|
@ -412,4 +442,20 @@
|
||||||
update_time = NOW()
|
update_time = NOW()
|
||||||
WHERE draw_cash_id = #{drawCashId}
|
WHERE draw_cash_id = #{drawCashId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="differentStatusOrderCount" resultType="com.ghy.order.domain.OrderDetailCount" parameterType="com.ghy.order.domain.OrderDetail">
|
||||||
|
select
|
||||||
|
count(case when od.order_status = 0 then 1 else null end) as newOrderNum,
|
||||||
|
count(case when od.order_status = 1 then 1 else null end) as acceptedOrderNum,
|
||||||
|
count(case when od.order_status = 2 then 1 else null end) as waitForDoorOrderNum,
|
||||||
|
count(case when od.order_status = 3 then 1 else null end) as servingOrderNum,
|
||||||
|
count(case when od.order_status = 4 then 1 else null end) as confirmingOrderNum,
|
||||||
|
count(case when od.order_status = 5 then 1 else null end) as finishedOrderNum,
|
||||||
|
count(case when od.order_status = 6 then 1 else null end) as canceledOrderNum
|
||||||
|
from order_detail od
|
||||||
|
where 1 = 1
|
||||||
|
<if test="timeout != null">
|
||||||
|
AND od.timeout_ = #{timeout}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue