lyhzzz 1 год назад
Родитель
Сommit
3ff2c8ec83

+ 1 - 1
src/main/java/com/fdkankan/sale/entity/RepairInvoice.java

@@ -136,6 +136,6 @@ public class RepairInvoice implements Serializable {
     private String getAddress;
 
     @TableField(exist = false)
-    private Integer needInvoice;
+    private Integer invoiceStatus;
 
 }

+ 4 - 0
src/main/java/com/fdkankan/sale/service/impl/RepairInvoiceServiceImpl.java

@@ -65,6 +65,10 @@ public class RepairInvoiceServiceImpl extends ServiceImpl<IRepairInvoiceMapper,
         if(repair == null){
             throw new BusinessException(ResultCode.ORDER_PAY_NOT_EXITS);
         }
+        if(param.getInvoiceStatus() == 2){  //无需发票
+            repairService.updateRepairInvoiceStatus(repair.getRepairId(),2);
+            return;
+        }
         RepairInvoice repairInvoice = this.getByRepairId(param.getRepairId());
         if(repairInvoice ==null){
             repairInvoice = new RepairInvoice();