he2802 %!s(int64=3) %!d(string=hai) anos
pai
achega
81c629149b

+ 7 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderInvoiceServiceImpl.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.order.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
@@ -115,6 +116,12 @@ public class OrderInvoiceServiceImpl extends ServiceImpl<OrderInvoiceMapper, Ord
                 throw new CustomException("已开票或已退票状态无法修改审核状态");
             }
         }
+        if(bo.getPeriodStatus()==3){
+            //已上传发票或有快递单号则为已开票
+            if(Validator.isNotEmpty(bo.getInvoiceImg())||Validator.isNotEmpty(bo.getTrackingNum())){
+                bo.setInvoiceStatus(2);
+            }
+        }
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);
     }