Merge remote-tracking branch 'origin/master' into refund

This commit is contained in:
HH 2023-03-29 00:19:19 +08:00
commit 24ed9cc666
4 changed files with 37 additions and 1 deletions

View File

@ -661,11 +661,21 @@ public class OrderController extends BaseController {
orderDetail.setOrderStatus(OrderStatus.SERVER.code()); orderDetail.setOrderStatus(OrderStatus.SERVER.code());
response.setServingOrderNum(orderDetailService.countOrderDetailList(orderDetail)); 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)); response.setWaitSureOrderNum(orderDetailService.countOrderDetailList(orderDetail));
// 统计已完成子单量 // 统计已完成子单量
orderDetail.setOrderStatus(OrderStatus.FINISH.code()); orderDetail.setOrderStatus(OrderStatus.FINISH.code());
orderDetail.setDrawCashStatusList(new ArrayList<Integer>(){{
add(2);
}});
response.setFinishedOrderNum(orderDetailService.countOrderDetailList(orderDetail)); response.setFinishedOrderNum(orderDetailService.countOrderDetailList(orderDetail));
orderDetail.setWorkFinishTimeExisted(false);
orderDetail.setDrawCashStatusList(null);
// 统计已完成主单量 // 统计已完成主单量
orderMaster.setOrderStatus(OrderStatus.FINISH.code()); orderMaster.setOrderStatus(OrderStatus.FINISH.code());
response.setFinishedMasterOrderNum(orderMasterService.countOrderMasterList(orderMaster)); response.setFinishedMasterOrderNum(orderMasterService.countOrderMasterList(orderMaster));

View File

@ -107,6 +107,8 @@ public class OrderDetail extends BaseEntity {
*/ */
private Integer drawCashStatus; private Integer drawCashStatus;
private List<Integer> drawCashStatusList;
/** /**
* 发起提现时间 draw_cash_time * 发起提现时间 draw_cash_time
*/ */
@ -128,4 +130,6 @@ public class OrderDetail extends BaseEntity {
private BigDecimal financialMasterMoney; private BigDecimal financialMasterMoney;
private BigDecimal financialDetailMoney; private BigDecimal financialDetailMoney;
private BigDecimal changeMoney; private BigDecimal changeMoney;
private boolean workFinishTimeExisted;
} }

View File

@ -140,6 +140,15 @@
<if test="drawCashStatus != null"> <if test="drawCashStatus != null">
AND od.draw_cash_status = ${drawCashStatus} AND od.draw_cash_status = ${drawCashStatus}
</if> </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> </where>
order by od.create_time order by od.create_time
<trim suffixOverrides=","> <trim suffixOverrides=",">
@ -193,6 +202,15 @@
<if test="shelveStatus != null"> <if test="shelveStatus != null">
AND od.shelve_status = ${shelveStatus} AND od.shelve_status = ${shelveStatus}
</if> </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> </where>
order by od.create_time order by od.create_time
<trim suffixOverrides=","> <trim suffixOverrides=",">

View File

@ -181,6 +181,10 @@ public class OrderServiceImpl implements OrderService {
try { try {
List<OrderDetail> ods = orderDetailService.selectByOrderMasterId(om.getId()); List<OrderDetail> ods = orderDetailService.selectByOrderMasterId(om.getId());
Set<Integer> statusSet = ods.stream().map(OrderDetail::getOrderStatus).collect(Collectors.toSet()); Set<Integer> statusSet = ods.stream().map(OrderDetail::getOrderStatus).collect(Collectors.toSet());
// 没有子单,未派单的情况不刷新主单状态
if(CollectionUtils.isEmpty(statusSet)){
break;
}
boolean allFinish = true; boolean allFinish = true;
for (Integer integer : statusSet) { for (Integer integer : statusSet) {
if (integer < 5) { if (integer < 5) {