阿伏兔 4 лет назад
Родитель
Сommit
a815b3db56

+ 9 - 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TFeeController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TChargeController.java

@@ -15,21 +15,21 @@ import org.springframework.web.bind.annotation.*;
 import java.util.List;
 
 /**
- * 财务数据主Controller
+ * 财务收费数据主Controller
  *
  * @author ruoyi
  * @date 2021-01-18
  */
 @RestController
-@RequestMapping("/warehouse/fee")
-public class TFeeController extends BaseController {
+@RequestMapping("/finance/charge")
+public class TChargeController extends BaseController {
     @Autowired
     private ITFeeService tFeeService;
 
     /**
      * 查询财务数据主列表
      */
-    @PreAuthorize("@ss.hasPermi('warehouse:fee:list')")
+    @PreAuthorize("@ss.hasPermi('finance:charge:list')")
     @GetMapping("/list")
     public TableDataInfo list(TFee tFee) {
         startPage();
@@ -40,7 +40,7 @@ public class TFeeController extends BaseController {
     /**
      * 导出财务数据主列表
      */
-    @PreAuthorize("@ss.hasPermi('warehouse:fee:export')")
+    @PreAuthorize("@ss.hasPermi('finance:charge:export')")
     @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TFee tFee) {
@@ -52,7 +52,7 @@ public class TFeeController extends BaseController {
     /**
      * 获取财务数据主详细信息
      */
-    @PreAuthorize("@ss.hasPermi('warehouse:fee:query')")
+    @PreAuthorize("@ss.hasPermi('finance:charge:query')")
     @GetMapping(value = "/{fId}")
     public AjaxResult getInfo(@PathVariable("fId") Long fId) {
         return AjaxResult.success(tFeeService.selectTFeeById(fId));
@@ -61,7 +61,7 @@ public class TFeeController extends BaseController {
     /**
      * 新增财务数据主
      */
-    @PreAuthorize("@ss.hasPermi('warehouse:fee:add')")
+    @PreAuthorize("@ss.hasPermi('finance:charge:add')")
     @Log(title = "财务数据主", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TFee tFee) {
@@ -71,7 +71,7 @@ public class TFeeController extends BaseController {
     /**
      * 修改财务数据主
      */
-    @PreAuthorize("@ss.hasPermi('warehouse:fee:edit')")
+    @PreAuthorize("@ss.hasPermi('finance:charge:edit')")
     @Log(title = "财务数据主", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TFee tFee) {
@@ -81,7 +81,7 @@ public class TFeeController extends BaseController {
     /**
      * 删除财务数据主
      */
-    @PreAuthorize("@ss.hasPermi('warehouse:fee:remove')")
+    @PreAuthorize("@ss.hasPermi('finance:charge:remove')")
     @Log(title = "财务数据主", businessType = BusinessType.DELETE)
     @DeleteMapping("/{fIds}")
     public AjaxResult remove(@PathVariable Long[] fIds) {

+ 91 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TContrastController.java

@@ -0,0 +1,91 @@
+package com.ruoyi.web.controller.warehouse.finance;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.finance.domain.TFee;
+import com.ruoyi.finance.service.ITFeeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 财务对账数据Controller
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+@RestController
+@RequestMapping("/finance/contrast")
+public class TContrastController extends BaseController {
+    @Autowired
+    private ITFeeService tFeeService;
+
+    /**
+     * 查询财务数据主列表
+     */
+    @PreAuthorize("@ss.hasPermi('finance:contrast:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TFee tFee) {
+        tFee.setfBilltype("DZ");
+        startPage();
+        List<TFee> list = tFeeService.selectTFeeList(tFee);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出财务数据主列表
+     */
+    @PreAuthorize("@ss.hasPermi('finance:contrast:export')")
+    @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TFee tFee) {
+        List<TFee> list = tFeeService.selectTFeeList(tFee);
+        ExcelUtil<TFee> util = new ExcelUtil<TFee>(TFee.class);
+        return util.exportExcel(list, "fee");
+    }
+
+    /**
+     * 获取财务数据主详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('finance:contrast:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(tFeeService.selectTFeeById(fId));
+    }
+
+    /**
+     * 新增财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('finance:contrast:add')")
+    @Log(title = "财务数据主", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TFee tFee) {
+        return toAjax(tFeeService.insertTFee(tFee));
+    }
+
+    /**
+     * 修改财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('finance:contrast:edit')")
+    @Log(title = "财务数据主", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TFee tFee) {
+        return toAjax(tFeeService.updateTFee(tFee));
+    }
+
+    /**
+     * 删除财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('finance:contrast:remove')")
+    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(tFeeService.deleteTFeeByIds(fIds));
+    }
+}