yangdamao 1 år sedan
förälder
incheckning
3fe0e2e118

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/activity/service/impl/ActivityRecommendServiceImpl.java

@@ -131,7 +131,7 @@ public class ActivityRecommendServiceImpl extends ServiceImpl<ActivityRecommendM
         for (ActivityRecommendVo recommendVo : activityRecommendVos) {
             if (CollectionUtils.isNotEmpty(recommendVo.getGoodsList())){
                 recommendVo.getGoodsList().forEach(item -> {
-                    if (ObjectUtils.isNull(item.getSpecTemplateId())){
+                    if (ObjectUtils.isNotNull(item.getSpecTemplateId())){
                         List<GoodsSpecAttributeRelation> list = goodsSpecAttributeRelationService.list(new LambdaQueryWrapper<GoodsSpecAttributeRelation>()
                                 .eq(GoodsSpecAttributeRelation::getGoodsId, item.getGoodsId())
                                 .orderByAsc(GoodsSpecAttributeRelation::getCreateTime)

+ 3 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderHandleServiceImpl.java

@@ -153,7 +153,7 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
                 }
             }
             //退款
-            if (ObjectUtils.isNotNull(item.getRefundStatus()) && item.getRefundStatus() == 0 && item.getPayType() == 2) {
+            if (ObjectUtils.isNotNull(item.getRefundStatus()) && item.getRefundStatus() == 0) {
                 List<Order> orders = iOrderService.list(new LambdaQueryWrapper<Order>().eq(Order::getHandleOrderSn, item.getHandleOrderSn()));
                 List<OrderGoodsRefund> list1 = iOrderGoodsRefundService.list(new LambdaQueryWrapper<OrderGoodsRefund>()
                         .in(OrderGoodsRefund::getOrderSn, orders.stream().map(Order::getOrderSn).collect(Collectors.toList()))
@@ -500,7 +500,7 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
     public OrderHandleStatisticsVo statistics(OrderHandleQueryBo bo) {
         List<OrderHandleVo> orderHandleVos = baseMapper.selectOrderList(bo);
         BigDecimal payPrice = orderHandleVos.stream().filter(x -> ObjectUtils.isNotNull(x.getOrderPrice())).map(OrderHandleVo::getOrderPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
-        BigDecimal refundPrice = orderHandleVos.stream().filter(x -> ObjectUtils.isNotNull(x.getRefundPrice())).map(OrderHandleVo::getRefundPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
+        BigDecimal refundPrice = orderHandleVos.stream().filter(x -> ObjectUtils.isNotNull(x.getGoodsRefund())).map(OrderHandleVo::getGoodsRefund).reduce(BigDecimal.ZERO, BigDecimal::add);
         BigDecimal orderPrice = payPrice.subtract(refundPrice);
         Integer orderNum = orderHandleVos.size();
         Set<Long> userIds = new HashSet<>();
@@ -510,7 +510,7 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
                 list.forEach(x -> userIds.add(x.getUserId()));
             }
         });
-        Integer unCheckOrderNum = orderHandleVos.stream().filter(x -> ObjectUtils.isNotNull(x.getPayStatus()) && x.getPayStatus() == 0).collect(Collectors.toList()).size();
+        Integer unCheckOrderNum = orderHandleVos.stream().filter(x -> ObjectUtils.isNotNull(x.getPayStatus()) && x.getPayStatus() == 2).collect(Collectors.toList()).size();
         Integer unRefundNum = orderHandleVos.stream().filter(x -> ObjectUtils.isNotNull(x.getRefundStatus()) && x.getRefundStatus() == 0).collect(Collectors.toList()).size();
 
         OrderHandleStatisticsVo vo = new OrderHandleStatisticsVo();

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderServiceImpl.java

@@ -2592,7 +2592,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
     public boolean arrangeGrade(String goodsName, Long goodsId, Long orderGoodsId, Long gradeId, Long userId, String orderSn, Long businessId) {
         //查询该学员有没有有效期内同商品班级 有就不允许添加
        /* Integer classNum = baseMapper.selectUserClass(goodsId,userId);
-        if (classNum > 0){
+        if (classNum > 0){、。
             throw new CustomException("该学员已在此商品有效期内的班级,无法加入新的有效期班级,请查看该学员此商品下的班级");
         }*/
         OrderGoods orderGoods = iOrderGoodsService.getById(orderGoodsId);

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/CompanyOrderInvoiceVo.java

@@ -48,6 +48,9 @@ public class CompanyOrderInvoiceVo implements Serializable {
     @ApiModelProperty("收票姓名")
     private String consignee;
 
+    @ApiModelProperty("收票电话")
+    private String collectionTelephone;
+
     @ApiModelProperty("收票地址")
     private String shippingAddress;
 

+ 5 - 5
zhongzheng-system/src/main/resources/mapper/modules/order/OrderHandleMapper.xml

@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cet.education_name education_name,
         cpt.project_name project_name,
         cb.business_name business_name,
-        (select IFNULL(sum(og.goods_received),0) from order_goods og LEFT JOIN `order` o on o.order_sn = og.order_sn  where o.handle_order_sn = u.handle_order_sn and og.refund_status = 2) goods_refund
+        (select IFNULL(sum(og.goods_real_price),0) from order_goods og LEFT JOIN `order` o on o.order_sn = og.order_sn  where o.handle_order_sn = u.handle_order_sn and og.refund_status = 2) goods_refund
         FROM (SELECT
         oh.*
         FROM
@@ -103,6 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="invoiceStatus != null and invoiceStatus == 3">
                 AND oi.period_status = 2
             </if>
+            <if test="invoiceStatus != null and invoiceStatus == 4">
+                AND oi.invoice_status = 4
+            </if>
             AND (oi.wash_status is null or oi.wash_status = 1)
            ) > 0
         </if>
@@ -131,10 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 LEFT JOIN goods g ON og.goods_id = g.goods_id
         WHERE
             oh.handle_order_sn = #{handleOrderSn}
-            <if test="refundStatus != null and invoiceStatus == 0">
-                AND og.refund_status = 1
-            </if>
-            <if test="refundStatus != null and invoiceStatus == null">
+            <if test="refundStatus != null">
                 AND og.refund_status = #{refundStatus}
             </if>
     </select>

+ 2 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderInvoiceMapper.xml

@@ -162,6 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             oi.tax_registry_number,
             oi.invoice_remark as remark,
             oi.consignee,
+            oi.collection_telephone,
             oi.shipping_address,
             oi.email,
             oi.`status`,
@@ -180,7 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND oh.goods_type = #{goodsType}
             </if>
             <if test="educationTypeId != null and educationTypeId != ''">
-                AND oh.education_type_id = #{goodsType}
+                AND oh.education_type_id = #{educationTypeId}
             </if>
             <if test="businessId != null and businessId != ''">
                 AND oh.business_id = #{businessId}