Browse Source

正式发票导出

LAPTOP-FO2T5SIU\35838 8 months ago
parent
commit
9c9dd657b9

+ 13 - 0
pro-base/src/main/java/com/idea/invoice/controller/InvoiceManageController.java

@@ -62,6 +62,19 @@ public class InvoiceManageController extends BaseController {
         return new TableSplitResult<>(page.getPageNum(), page.getTotal(), page.getList());
     }
 
+    /**
+     * 正式发票列表
+     * @param model
+     * @param dt
+     * @return
+     */
+    @PostMapping(value = "formalInvoiceListAll", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object formalInvoiceListAll(InvoiceManageDto model, DateTrans dt) {
+        List<InvoiceManageDto> list = modelService.formalInvoiceListAll(model, dt);
+        return list;
+    }
+
     /**
      * 新增预收款发票
      *

+ 27 - 0
pro-base/src/main/java/com/idea/invoice/service/InvoiceManageService.java

@@ -236,6 +236,33 @@ public class InvoiceManageService implements BaseService<InvoiceManage, InvoiceM
         return new PageInfo<>(list);
     }
 
+    /**
+     * 正式发票管理 全部数据
+     * @param model
+     * @param dt
+     * @return
+     */
+    public List<InvoiceManageDto> formalInvoiceListAll(InvoiceManageDto model, DateTrans dt) {
+        model.setType("2");
+        List<InvoiceManageDto> list = extendMapper.listByModel(model);
+        for (InvoiceManageDto invoiceManage : list) {
+            String money = "";
+            // 房款
+            if (invoiceManage.getPaymentType().equals("1")) {
+                money = payLogService.getMoneyByContractId(invoiceManage.getContractId(), 1);
+                invoiceManage.setReceivableMoney(invoiceManage.getBuyerMoney());
+            }
+            // 专项维修资金
+            if (invoiceManage.getPaymentType().equals("2")) {
+                money = payLogService.getMoneyByContractId(invoiceManage.getContractId(), 2);
+                invoiceManage.setReceivableMoney(invoiceManage.getMaintenanceTotalPrice());
+            }
+            invoiceManage.setReceivedMoney(new BigDecimal(money));
+        }
+        return list;
+    }
+
+
     /**
      * 根据合同id查询
      *