Merge remote-tracking branch 'origin/master' into refund
This commit is contained in:
commit
24ed9cc666
|
|
@ -661,11 +661,21 @@ public class OrderController extends BaseController {
|
|||
orderDetail.setOrderStatus(OrderStatus.SERVER.code());
|
||||
response.setServingOrderNum(orderDetailService.countOrderDetailList(orderDetail));
|
||||
// 统计待确认单量
|
||||
orderDetail.setOrderStatus(OrderStatus.FINISH_CHECK.code());
|
||||
orderDetail.setOrderStatus(null);
|
||||
orderDetail.setWorkFinishTimeExisted(true);
|
||||
orderDetail.setDrawCashStatusList(new ArrayList<Integer>(){{
|
||||
add(0);
|
||||
add(1);
|
||||
}});
|
||||
response.setWaitSureOrderNum(orderDetailService.countOrderDetailList(orderDetail));
|
||||
// 统计已完成子单量
|
||||
orderDetail.setOrderStatus(OrderStatus.FINISH.code());
|
||||
orderDetail.setDrawCashStatusList(new ArrayList<Integer>(){{
|
||||
add(2);
|
||||
}});
|
||||
response.setFinishedOrderNum(orderDetailService.countOrderDetailList(orderDetail));
|
||||
orderDetail.setWorkFinishTimeExisted(false);
|
||||
orderDetail.setDrawCashStatusList(null);
|
||||
// 统计已完成主单量
|
||||
orderMaster.setOrderStatus(OrderStatus.FINISH.code());
|
||||
response.setFinishedMasterOrderNum(orderMasterService.countOrderMasterList(orderMaster));
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ public class OrderDetail extends BaseEntity {
|
|||
*/
|
||||
private Integer drawCashStatus;
|
||||
|
||||
private List<Integer> drawCashStatusList;
|
||||
|
||||
/**
|
||||
* 发起提现时间 draw_cash_time
|
||||
*/
|
||||
|
|
@ -128,4 +130,6 @@ public class OrderDetail extends BaseEntity {
|
|||
private BigDecimal financialMasterMoney;
|
||||
private BigDecimal financialDetailMoney;
|
||||
private BigDecimal changeMoney;
|
||||
|
||||
private boolean workFinishTimeExisted;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,6 +140,15 @@
|
|||
<if test="drawCashStatus != null">
|
||||
AND od.draw_cash_status = ${drawCashStatus}
|
||||
</if>
|
||||
<if test="drawCashStatusList != null and drawCashStatusList.size() > 0">
|
||||
AND od.draw_cash_status in
|
||||
<foreach collection="drawCashStatusList" item="drawCashStatus" open="(" separator="," close=")">
|
||||
#{drawCashStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="workFinishTimeExisted">
|
||||
AND od.work_finish_time is not null
|
||||
</if>
|
||||
</where>
|
||||
order by od.create_time
|
||||
<trim suffixOverrides=",">
|
||||
|
|
@ -193,6 +202,15 @@
|
|||
<if test="shelveStatus != null">
|
||||
AND od.shelve_status = ${shelveStatus}
|
||||
</if>
|
||||
<if test="workFinishTimeExisted">
|
||||
AND od.work_finish_time is not null
|
||||
</if>
|
||||
<if test="drawCashStatusList != null and drawCashStatusList.size() > 0">
|
||||
AND od.draw_cash_status in
|
||||
<foreach collection="drawCashStatusList" item="drawCashStatus" open="(" separator="," close=")">
|
||||
#{drawCashStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by od.create_time
|
||||
<trim suffixOverrides=",">
|
||||
|
|
|
|||
|
|
@ -181,6 +181,10 @@ public class OrderServiceImpl implements OrderService {
|
|||
try {
|
||||
List<OrderDetail> ods = orderDetailService.selectByOrderMasterId(om.getId());
|
||||
Set<Integer> statusSet = ods.stream().map(OrderDetail::getOrderStatus).collect(Collectors.toSet());
|
||||
// 没有子单,未派单的情况不刷新主单状态
|
||||
if(CollectionUtils.isEmpty(statusSet)){
|
||||
break;
|
||||
}
|
||||
boolean allFinish = true;
|
||||
for (Integer integer : statusSet) {
|
||||
if (integer < 5) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue