|
@@ -170,8 +170,8 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
if (ClothOrderPayTimeType.take_cloth_pay.getCode().equals(orderCloth.getPayTimeType())) {//收衣付款
|
|
|
orderCloth.setOrderStatus(ClothOrderStatusType.WAIT_FACTORY.getCode());
|
|
|
} else {
|
|
|
- //取衣付款
|
|
|
- orderCloth.setOrderStatus(ClothOrderStatusType.WAITING_TO_SEND.getCode());
|
|
|
+ //取衣付款,不影响订单状态
|
|
|
+// orderCloth.setOrderStatus(ClothOrderStatusType.WAITING_FOR_HANG.getCode());
|
|
|
}
|
|
|
orderCloth.setRefundAmount(BigDecimal.ZERO);
|
|
|
orderCloth.setPayStatus(PayStatus.HAS_PAY.getCode());
|
|
@@ -220,8 +220,7 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
if (orderCloth.getRefundStatus() == OrderRefundStatus.REFUND_SUCCESS.getCode()) {//退款状态不正确,直接跳过
|
|
|
return R.ok();
|
|
|
}
|
|
|
-
|
|
|
- orderCloth.setOrderStatus(ClothOrderStatusType.CANCEL.getCode());
|
|
|
+ orderCloth.setOrderStatus(ClothOrderStatusType.REFUND_SUCCESS.getCode());
|
|
|
orderCloth.setRefundTime(DateUtils.getNowDate());
|
|
|
orderCloth.setRefundStatus(OrderRefundStatus.REFUND_SUCCESS.getCode());
|
|
|
updateById(orderCloth);
|
|
@@ -254,7 +253,6 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
if (orderCloth == null) {
|
|
|
throw new ServiceException("未查询到订单");
|
|
|
}
|
|
|
-
|
|
|
orderCloth.setRefundStatus(OrderRefundStatus.ERROR.getCode());
|
|
|
updateById(orderCloth);
|
|
|
return R.ok();
|
|
@@ -344,6 +342,7 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
orderCloth.setAppUserId(orderClothDTO.getAppUserId());
|
|
|
//新建为到店收衣方式
|
|
|
orderCloth.setTakeClothWay(TakeOrSendClothWay.TOSTORE.getCode());
|
|
|
+ orderCloth.setSendClothWay(TakeOrSendClothWay.TOSTORE.getCode());
|
|
|
//门店新建的订单
|
|
|
orderCloth.setOrderType(ClothOrderType.normal.getCode());
|
|
|
buildAppUserInfoOrder(orderCloth);
|
|
@@ -420,14 +419,23 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
if (Integer.parseInt(orderCloth.getRefundStatus()) > 0) {
|
|
|
throw new ServiceException("请勿重复申请");
|
|
|
}
|
|
|
- if (Integer.parseInt(orderCloth.getOrderStatus()) >= 6) {
|
|
|
- throw new ServiceException("订单已入厂状态不允许退款");
|
|
|
+ if (Integer.parseInt(orderCloth.getOrderStatus()) >= Integer.parseInt(ClothOrderStatusType.WASHING.getCode())) {
|
|
|
+ throw new ServiceException("订单已入厂,不允许退款");
|
|
|
+ }
|
|
|
+ //如果有某个衣服已经是已入厂的情况,也不允许退款
|
|
|
+ //todo
|
|
|
+ //如果用户是且未支付情况下,则直接撤销成功,不生成退款订单,否则要生成退款单
|
|
|
+ if (orderCloth.getPayStatus().equals(PayStatus.WAITING_TO_PAY.getCode())) {
|
|
|
+ orderCloth.setOrderStatus(ClothOrderStatusType.CANCEL.getCode());
|
|
|
+ orderCloth.buildUpdateData();
|
|
|
+ updateById(orderCloth);
|
|
|
+ return;
|
|
|
}
|
|
|
OrderClothRefund orderClothRefund = new OrderClothRefund();
|
|
|
BeanUtils.copyProperties(orderCloth, orderClothRefund);
|
|
|
orderClothRefund.setId(null);
|
|
|
orderClothRefund.setRefundNo(orderNoUtils.getClothOrderNo());
|
|
|
- orderClothRefund.setRefundAmount(orderCloth.getRefundAmount());
|
|
|
+ orderClothRefund.setRefundAmount(orderCloth.getPayAmount());
|
|
|
orderClothRefund.setRefundApplyTime(DateUtils.getNowDate());
|
|
|
orderClothRefund.setRefundReason(remark);
|
|
|
orderClothRefund.setRefundStatus(OrderRefundStatus.REFUND_APPLYING.getCode());
|
|
@@ -448,10 +456,12 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
orderClothItemService.updateById(orderClothItem);
|
|
|
});
|
|
|
|
|
|
- //执行退款逻辑
|
|
|
+ //如果是现金支付,执行退款逻辑
|
|
|
if (orderCloth.getPayType().equals(PayType.CASH.getCode())) {
|
|
|
refundSuccess(orderClothRefund.getRefundNo(), orderCloth.getOrderNo());
|
|
|
+ return;
|
|
|
}
|
|
|
+
|
|
|
if (orderCloth.getPayType().equals(PayType.BALANCE.getCode())) {
|
|
|
//充值卡支付退单
|
|
|
Boolean res = rechargePasswordCardService.orderRefundByBalance(orderClothRefund.getOrderNo(), orderClothRefund.getRefundAmount());
|
|
@@ -813,10 +823,10 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
orderClothItem.setIsCustomPrice(orderClothItemDTO.getIsCustomPrice());
|
|
|
orderClothItem.setSpecialPrice(buildOrderClothItemSpecialPrice(orderClothItemDTO, clothSpeedMap.get(orderClothItemDTO.getClothSpeedId())));
|
|
|
orderClothItem.setTotalPrice(orderClothItem.getPrice().add(orderClothItem.getSpecialPrice()));
|
|
|
- if (SysBoolType.YES.getCode().equals(orderClothItem.getIsHedging())) {
|
|
|
- orderClothItem.setTotalPrice(orderClothItem.getTotalPrice().add(orderClothItem.getHedgingPrice()
|
|
|
- .multiply(new BigDecimal(sysConfigService.selectConfigByKey(SysConfigKey.OrderClothHedgingRate.getCode())))));
|
|
|
- }
|
|
|
+// if (SysBoolType.YES.getCode().equals(orderClothItem.getIsHedging())) {
|
|
|
+// orderClothItem.setTotalPrice(orderClothItem.getTotalPrice().add(orderClothItem.getHedgingPrice()
|
|
|
+// .multiply(new BigDecimal(sysConfigService.selectConfigByKey(SysConfigKey.OrderClothHedgingRate.getCode())))));
|
|
|
+// }
|
|
|
orderClothItem.setPayPrice(orderClothItem.getTotalPrice());
|
|
|
orderClothItem.setRemark(orderClothItemDTO.getRemark());
|
|
|
orderClothItem.buildCreateData();
|
|
@@ -1140,197 +1150,28 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
return orderClothAppointmentVOList;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 财务统计-经营日报-衣服订单
|
|
|
- *
|
|
|
- * @param orderFinancialDayQueryDTO
|
|
|
- * @return
|
|
|
- */
|
|
|
@Override
|
|
|
- public OrderFinancialQueryVO listFinancialStatisticsByClothOrderDay(OrderFinancialDayQueryDTO orderFinancialDayQueryDTO) {
|
|
|
- OrderFinancialQueryVO orderFinancialQueryVO = new OrderFinancialQueryVO();
|
|
|
- OrderFinancialDayQueryDTO today = new OrderFinancialDayQueryDTO();
|
|
|
- today.setBeginCreateTime(DateUtils.getDate());
|
|
|
- today.setEndCreateTime(DateUtils.getDate());
|
|
|
- // 统计今日洗衣数据
|
|
|
- this.handleTodayDataByClothOrder(orderFinancialQueryVO, today);
|
|
|
- // 统计今日商品数据
|
|
|
- this.handleTodayDataByGoodsOrder(orderFinancialQueryVO, today);
|
|
|
- // 统计今日充值数据
|
|
|
- this.handleTodayDataByRechargeOrder(orderFinancialQueryVO, today);
|
|
|
- // 查询列表数据
|
|
|
- this.handleListDataByDay(orderFinancialQueryVO, orderFinancialDayQueryDTO);
|
|
|
- return orderFinancialQueryVO;
|
|
|
- }
|
|
|
-
|
|
|
- private void handleTodayDataByClothOrder(OrderFinancialQueryVO orderFinancialQueryVO, OrderFinancialDayQueryDTO today) {
|
|
|
- // 查询今日洗衣订单
|
|
|
- List<OrderClothFinancialVO> todayData = baseMapper.listFinancialStatisticsByClothOrderToday(today,
|
|
|
- SecurityUtils.getLoginUser().getOrgId(),
|
|
|
- SecurityUtils.getLoginUser().getSourceType());
|
|
|
- this.buildClothData(orderFinancialQueryVO, todayData);
|
|
|
- }
|
|
|
-
|
|
|
- private void buildClothData(OrderFinancialQueryVO orderFinancialQueryVO, List<OrderClothFinancialVO> data) {
|
|
|
- if (CollUtil.isEmpty(data)) {
|
|
|
- orderFinancialQueryVO.setTodayOrderAmount(BigDecimal.ZERO);
|
|
|
- orderFinancialQueryVO.setTodayOnlinePayAmount(BigDecimal.ZERO);
|
|
|
- orderFinancialQueryVO.setTodayCardAmount(BigDecimal.ZERO);
|
|
|
- orderFinancialQueryVO.setTodayCashAmount(BigDecimal.ZERO);
|
|
|
- orderFinancialQueryVO.setTodayCouponAmount(BigDecimal.ZERO);
|
|
|
- orderFinancialQueryVO.setTodayOrderClothCount(0);
|
|
|
- return;
|
|
|
- }
|
|
|
- // 今日订单金额
|
|
|
- orderFinancialQueryVO.setTodayOrderAmount(data.stream()
|
|
|
- .map(OrderClothFinancialVO::getOrderAmount)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- // 今日券消费
|
|
|
- orderFinancialQueryVO.setTodayCouponAmount(data.stream()
|
|
|
- .map(OrderClothFinancialVO::getCouponDeductAmount)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- // 今日现金消费
|
|
|
- orderFinancialQueryVO.setTodayCashAmount(data.stream()
|
|
|
- .filter(vo -> PayType.CASH.getCode().equals(vo.getPayType()))
|
|
|
- .map(OrderClothFinancialVO::getPayAmount)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- // 今日会员卡消费
|
|
|
- orderFinancialQueryVO.setTodayCardAmount(data.stream()
|
|
|
- .filter(vo -> PayType.BALANCE.getCode().equals(vo.getPayType()))
|
|
|
- .map(OrderClothFinancialVO::getPayAmount)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- // 今日支付宝/微信消费
|
|
|
- orderFinancialQueryVO.setTodayOnlinePayAmount(data.stream()
|
|
|
- .filter(vo -> PayType.WECHAT.getCode().equals(vo.getPayType()) || PayType.ALIPAY.getCode().equals(vo.getPayType()))
|
|
|
- .map(OrderClothFinancialVO::getPayAmount)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- // 今日收衣件数
|
|
|
- orderFinancialQueryVO.setTodayOrderClothCount(data.stream()
|
|
|
- .map(OrderClothFinancialVO::getOrderClothCount)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .reduce(0, Integer::sum));
|
|
|
- }
|
|
|
-
|
|
|
- private void handleTodayDataByRechargeOrder(OrderFinancialQueryVO orderFinancialQueryVO, OrderFinancialDayQueryDTO today) {
|
|
|
- orderRechargeService.listFinancialStatisticsByRechargeOrderToday(orderFinancialQueryVO, today);
|
|
|
- }
|
|
|
-
|
|
|
- private void handleTodayDataByGoodsOrder(OrderFinancialQueryVO orderFinancialQueryVO, OrderFinancialDayQueryDTO today) {
|
|
|
- // 查询今日商品订单
|
|
|
- orderGoodsService.listFinancialStatisticsByGoodsOrderToday(orderFinancialQueryVO, today);
|
|
|
- }
|
|
|
-
|
|
|
- private void handleListDataByDay(OrderFinancialQueryVO orderFinancialQueryVO, OrderFinancialDayQueryDTO orderFinancialDayQueryDTO) {
|
|
|
- // 查询洗衣列表数据
|
|
|
- List<OrderClothFinancialVO> clothFinancialVOS = baseMapper.listFinancialStatisticsByClothOrderDay(orderFinancialDayQueryDTO,
|
|
|
- SecurityUtils.getLoginUser().getOrgId(),
|
|
|
- SecurityUtils.getLoginUser().getSourceType());
|
|
|
- orderFinancialQueryVO.setOrderClothFinancialVOList(clothFinancialVOS);
|
|
|
- orderFinancialQueryVO.setClothTotal(baseMapper.countFinancialStatisticsByClothOrderDay(orderFinancialDayQueryDTO,
|
|
|
- SecurityUtils.getLoginUser().getOrgId(),
|
|
|
- SecurityUtils.getLoginUser().getSourceType()));
|
|
|
-
|
|
|
- // 查询商品列表数据
|
|
|
- List<OrderGoodsFinancialVO> goodsFinancialVOS = orderGoodsService.listFinancialStatisticsByGoodsOrderDay(orderFinancialDayQueryDTO);
|
|
|
- orderFinancialQueryVO.setGoodsOrderFinancialVOList(goodsFinancialVOS);
|
|
|
- orderFinancialQueryVO.setGoodsTotal(orderGoodsService.countFinancialStatisticsByGoodsOrderDay(orderFinancialDayQueryDTO));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 财务统计-经营月报-衣服订单
|
|
|
- *
|
|
|
- * @param orderFinancialMonthQueryDTO
|
|
|
- * @return
|
|
|
- */
|
|
|
- @Override
|
|
|
- public OrderFinancialQueryVO listFinancialStatisticsByClothOrderMonth(OrderFinancialMonthQueryDTO orderFinancialMonthQueryDTO) {
|
|
|
- OrderFinancialQueryVO orderFinancialQueryVO = new OrderFinancialQueryVO();
|
|
|
- // 统计本月洗衣数据
|
|
|
- this.handleMtdDataByClothOrder(orderFinancialQueryVO);
|
|
|
- // 统计本月商品数据
|
|
|
- this.handleMtdDataByGoodsOrder(orderFinancialQueryVO);
|
|
|
- // 统计本月充值数据
|
|
|
- this.handleMtdDataByRechargeOrder(orderFinancialQueryVO);
|
|
|
- // 查询列表数据
|
|
|
- this.handleListDataByMonth(orderFinancialQueryVO, orderFinancialMonthQueryDTO);
|
|
|
-
|
|
|
- return orderFinancialQueryVO;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 财务统计-工厂洗衣明细统计-衣服订单
|
|
|
- */
|
|
|
- @Override
|
|
|
- public OrderClothFactoryClothQueryVO listPayFinancialStatisticsByClothOrderFactory(OrderFinancialFactoryClothQueryDTO orderFinancialFactoryClothQueryDTO) {
|
|
|
- OrderClothFactoryClothQueryVO orderClothFactoryClothQueryVO = new OrderClothFactoryClothQueryVO();
|
|
|
- Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
|
|
- String sourceType = SecurityUtils.getLoginUser().getSourceType();
|
|
|
- // 设置查询条件
|
|
|
- LambdaQueryWrapper<OrderClothItem> queryWrapper = new QueryWrapper<OrderClothItem>().lambda()
|
|
|
- .eq(OrderClothItem::getOrgId, orgId)
|
|
|
- .eq(OrderClothItem::getSourceType, sourceType)
|
|
|
- .ne(OrderClothItem::getFlowStatus, ClothOrderFlowStatus.refund.getCode())
|
|
|
- .orderByDesc(BaseEntity::getCreateTime);
|
|
|
- if (orderFinancialFactoryClothQueryDTO.getBeginCreateTime() != null && orderFinancialFactoryClothQueryDTO.getEndCreateTime() != null) {
|
|
|
- queryWrapper.ge(BaseEntity::getCreateTime, orderFinancialFactoryClothQueryDTO.getBeginCreateTime());
|
|
|
- queryWrapper.lt(BaseEntity::getCreateTime, DateUtils.addDays(orderFinancialFactoryClothQueryDTO.getEndCreateTime(), 1));
|
|
|
- }
|
|
|
- if (orderFinancialFactoryClothQueryDTO.getFactoryId() != null) {
|
|
|
- queryWrapper.eq(OrderClothItem::getFactoryId, orderFinancialFactoryClothQueryDTO.getFactoryId());
|
|
|
- }
|
|
|
- queryWrapper.orderByDesc(BaseEntity::getCreateTime);
|
|
|
- // 设置统计明细 全量数据,不用加limit
|
|
|
- List<OrderClothItem> orderClothItemAll = orderClothItemService.list(queryWrapper);
|
|
|
- if (CollUtil.isNotEmpty(orderClothItemAll)) {
|
|
|
- // 设置 总计消费金额
|
|
|
- orderClothFactoryClothQueryVO.setTotalPayMoney(orderClothItemAll.stream()
|
|
|
- .map(OrderClothItem::getTotalPrice)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- // 设置 总件数
|
|
|
- orderClothFactoryClothQueryVO.setTotalOrderClothCount(orderClothItemAll.size());
|
|
|
- orderClothFactoryClothQueryVO.setTotal(orderClothItemAll.size());
|
|
|
- }
|
|
|
- // 设置列表分页
|
|
|
- queryWrapper.last("limit " + orderFinancialFactoryClothQueryDTO.getStartRow() + "," + orderFinancialFactoryClothQueryDTO.getPageSize());
|
|
|
- List<OrderClothItem> orderClothItems = orderClothItemService.list(queryWrapper);
|
|
|
- if (CollUtil.isEmpty(orderClothItems)) {
|
|
|
- return orderClothFactoryClothQueryVO;
|
|
|
- }
|
|
|
- List<OrderClothFactoryClothItemVO> orderClothFactoryClothItemVOList = new ArrayList<>();
|
|
|
- for (OrderClothItem orderClothItem : orderClothItems) {
|
|
|
- // 设置门店的工厂费率
|
|
|
- OrderClothFactoryClothItemVO vo = new OrderClothFactoryClothItemVO();
|
|
|
- BeanUtils.copyProperties(orderClothItem, vo);
|
|
|
- orderClothFactoryClothItemVOList.add(vo);
|
|
|
- }
|
|
|
- orderClothFactoryClothQueryVO.setOrderClothFactoryClothItemVOList(orderClothFactoryClothItemVOList);
|
|
|
- return orderClothFactoryClothQueryVO;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void checkAllOrderStatus(Long orderClothId) {
|
|
|
+ public void checkAllOrderStatus(Long orderClothId, String orderStatus) {
|
|
|
LambdaQueryWrapper<OrderCloth> queryWrapper = new QueryWrapper<OrderCloth>().lambda()
|
|
|
.eq(OrderCloth::getDelFlag, DeleteStatus.OK.getCode())
|
|
|
.eq(orderClothId != null, OrderCloth::getId, orderClothId)
|
|
|
.ne(OrderCloth::getRefundStatus, OrderRefundStatus.REFUND_SUCCESS.getCode());
|
|
|
//查询一个月内的数据
|
|
|
- queryWrapper.ge(BaseEntity::getCreateTime, DateUtils.addDays(new Date(), -20));
|
|
|
+ queryWrapper.ge(BaseEntity::getCreateTime, DateUtils.addDays(new Date(), -10));
|
|
|
// 1. 查询洗衣订单
|
|
|
List<String> orderStatuss = CollUtil.newArrayList(
|
|
|
ClothOrderStatusType.WAIT_FACTORY.getCode(),
|
|
|
ClothOrderStatusType.WASHING.getCode(),
|
|
|
- ClothOrderStatusType.HAS_WASH.getCode()
|
|
|
+ ClothOrderStatusType.HAS_WASH.getCode(),
|
|
|
+ ClothOrderStatusType.WAITING_FOR_HANG.getCode()
|
|
|
);
|
|
|
queryWrapper.in(OrderCloth::getOrderStatus, orderStatuss);
|
|
|
List<OrderCloth> orderCloths = baseMapper.selectList(queryWrapper);
|
|
|
for (OrderCloth orderCloth : orderCloths) {
|
|
|
- if (orderCloth.getOrderStatus().equals(ClothOrderStatusType.WAIT_FACTORY.getCode())) {
|
|
|
+ if (orderStatus == null) {
|
|
|
+ orderStatus = orderCloth.getOrderStatus();
|
|
|
+ }
|
|
|
+ if (orderStatus.equals(ClothOrderStatusType.WAIT_FACTORY.getCode())) {
|
|
|
//待入厂,判断所有的衣服和附件是否都已经入厂,如果都入厂,则改变状态
|
|
|
Boolean res = orderClothItemService.checkClothItemStatus(orderCloth.getId(), ClothOrderFlowStatus.inFactory.getCode());
|
|
|
if (res) {
|
|
@@ -1341,7 +1182,7 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
baseMapper.updateById(orderClothUpdate);
|
|
|
}
|
|
|
}
|
|
|
- if (orderCloth.getOrderStatus().equals(ClothOrderStatusType.WASHING.getCode())) {
|
|
|
+ if (orderStatus.equals(ClothOrderStatusType.WASHING.getCode())) {
|
|
|
//待入厂,判断所有的衣服和附件是否都已经入厂,如果都入厂,则改变状态
|
|
|
Boolean res = orderClothItemService.checkClothItemStatus(orderCloth.getId(), ClothOrderFlowStatus.outFactory.getCode());
|
|
|
if (res) {
|
|
@@ -1352,7 +1193,7 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
baseMapper.updateById(orderClothUpdate);
|
|
|
}
|
|
|
}
|
|
|
- if (orderCloth.getOrderStatus().equals(ClothOrderStatusType.HAS_WASH.getCode())) {
|
|
|
+ if (orderStatus.equals(ClothOrderStatusType.HAS_WASH.getCode())) {
|
|
|
//待入厂,判断所有的衣服和附件是否都已经入厂,如果都入厂,则改变状态
|
|
|
Boolean res = orderClothItemService.checkClothItemStatus(orderCloth.getId(), ClothOrderFlowStatus.hangering.getCode());
|
|
|
if (res) {
|
|
@@ -1363,37 +1204,18 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
|
|
|
baseMapper.updateById(orderClothUpdate);
|
|
|
}
|
|
|
}
|
|
|
+ if (orderStatus.equals(ClothOrderStatusType.WAITING_FOR_HANG.getCode())) {
|
|
|
+ //已到店,如果所有衣服已取完,则变成已完成
|
|
|
+ Boolean res = orderClothItemService.checkClothItemStatus(orderCloth.getId(), ClothOrderFlowStatus.hasTake.getCode());
|
|
|
+ if (res) {
|
|
|
+ OrderCloth orderClothUpdate = new OrderCloth();
|
|
|
+ orderClothUpdate.setId(orderCloth.getId());
|
|
|
+ orderClothUpdate.setOrderStatus(ClothOrderStatusType.FINISH.getCode());
|
|
|
+ orderClothUpdate.setUpdateTime(new Date());
|
|
|
+ baseMapper.updateById(orderClothUpdate);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void handleMtdDataByClothOrder(OrderFinancialQueryVO orderFinancialQueryVO) {
|
|
|
- List<OrderClothFinancialVO> MtdData = baseMapper.listFinancialStatisticsByClothOrderMTD(SecurityUtils.getLoginUser().getOrgId(), SecurityUtils.getLoginUser().getSourceType());
|
|
|
- this.buildClothData(orderFinancialQueryVO, MtdData);
|
|
|
- }
|
|
|
-
|
|
|
- private void handleMtdDataByGoodsOrder(OrderFinancialQueryVO orderFinancialQueryVO) {
|
|
|
- // 查询今日商品订单
|
|
|
- orderGoodsService.listFinancialStatisticsByGoodsOrderMTD(orderFinancialQueryVO);
|
|
|
- }
|
|
|
-
|
|
|
- private void handleMtdDataByRechargeOrder(OrderFinancialQueryVO orderFinancialQueryVO) {
|
|
|
- orderRechargeService.listFinancialStatisticsByRechargeOrderMTD(orderFinancialQueryVO);
|
|
|
- }
|
|
|
-
|
|
|
- private void handleListDataByMonth(OrderFinancialQueryVO orderFinancialQueryVO, OrderFinancialMonthQueryDTO orderFinancialMonthQueryDTO) {
|
|
|
- // 查询洗衣列表数据
|
|
|
- List<OrderClothFinancialVO> clothFinancialVOS = baseMapper.listFinancialStatisticsByClothOrderMonth(orderFinancialMonthQueryDTO,
|
|
|
- SecurityUtils.getLoginUser().getOrgId(),
|
|
|
- SecurityUtils.getLoginUser().getSourceType());
|
|
|
- orderFinancialQueryVO.setOrderClothFinancialVOList(clothFinancialVOS);
|
|
|
- orderFinancialQueryVO.setClothTotal(baseMapper.countFinancialStatisticsByClothOrderMonth(orderFinancialMonthQueryDTO,
|
|
|
- SecurityUtils.getLoginUser().getOrgId(),
|
|
|
- SecurityUtils.getLoginUser().getSourceType()));
|
|
|
-
|
|
|
- // 查询商品列表数据
|
|
|
- List<OrderGoodsFinancialVO> goodsFinancialVOS = orderGoodsService.listFinancialStatisticsByGoodsOrderMonth(orderFinancialMonthQueryDTO);
|
|
|
- orderFinancialQueryVO.setGoodsOrderFinancialVOList(goodsFinancialVOS);
|
|
|
- orderFinancialQueryVO.setGoodsTotal(orderGoodsService.countFinancialStatisticsByGoodsOrderMonth(orderFinancialMonthQueryDTO));
|
|
|
- }
|
|
|
-
|
|
|
}
|