dongyongwei 4 gadi atpakaļ
vecāks
revīzija
43873ecea2
14 mainītis faili ar 532 papildinājumiem un 215 dzēšanām
  1. 17 23
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeBusinessController.java
  2. 35 22
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeBusinessDetailController.java
  3. 25 5
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeBusinessDetailFormulaController.java
  4. 57 9
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeController.java
  5. 109 11
      ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/domain/TWarehouseFeeAgreementType.java
  6. 11 0
      ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/domain/TWarehouseFeeAgreementTypeBusiness.java
  7. 84 56
      ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/domain/TWarehouseFeeAgreementTypeBusinessDetail.java
  8. 1 1
      ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/mapper/TWarehouseFeeAgreementTypeMapper.java
  9. 1 1
      ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/service/ITWarehouseFeeAgreementTypeService.java
  10. 1 1
      ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/service/impl/TWarehouseFeeAgreementTypeServiceImpl.java
  11. 21 11
      ruoyi-warehouse/src/main/resources/mapper/feeagreement/TWarehouseFeeAgreementTypeBusinessDetailMapper.xml
  12. 76 45
      ruoyi-warehouse/src/main/resources/mapper/feeagreement/TWarehouseFeeAgreementTypeBusinessMapper.xml
  13. 37 3
      ruoyi-warehouse/src/main/resources/mapper/feeagreement/TWarehouseFeeAgreementTypeMapper.xml
  14. 57 27
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehouseAgreementMapper.xml

+ 17 - 23
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeBusinessController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.web.controller.warehouse.feeagreement;
 
 import java.util.List;
+
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -22,24 +23,21 @@ import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
  * 费用协议从表Controller
- * 
+ *
  * @author dongyongwei
  * @date 2021-07-30
  */
 @RestController
 @RequestMapping("/feeagreement/WarehouseFeeAgreementTypeBusiness")
-public class TWarehouseFeeAgreementTypeBusinessController extends BaseController
-{
+public class TWarehouseFeeAgreementTypeBusinessController extends BaseController {
     @Autowired
     private ITWarehouseFeeAgreementTypeBusinessService tWarehouseFeeAgreementTypeBusinessService;
 
     /**
      * 查询费用协议从表列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusiness:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness)
-    {
+    public TableDataInfo list(TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness) {
         startPage();
         List<TWarehouseFeeAgreementTypeBusiness> list = tWarehouseFeeAgreementTypeBusinessService.selectTWarehouseFeeAgreementTypeBusinessList(tWarehouseFeeAgreementTypeBusiness);
         return getDataTable(list);
@@ -48,11 +46,9 @@ public class TWarehouseFeeAgreementTypeBusinessController extends BaseController
     /**
      * 导出费用协议从表列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusiness:export')")
     @Log(title = "费用协议从表", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness)
-    {
+    public AjaxResult export(TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness) {
         List<TWarehouseFeeAgreementTypeBusiness> list = tWarehouseFeeAgreementTypeBusinessService.selectTWarehouseFeeAgreementTypeBusinessList(tWarehouseFeeAgreementTypeBusiness);
         ExcelUtil<TWarehouseFeeAgreementTypeBusiness> util = new ExcelUtil<TWarehouseFeeAgreementTypeBusiness>(TWarehouseFeeAgreementTypeBusiness.class);
         return util.exportExcel(list, "WarehouseFeeAgreementTypeBusiness");
@@ -61,43 +57,41 @@ public class TWarehouseFeeAgreementTypeBusinessController extends BaseController
     /**
      * 获取费用协议从表详细信息
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusiness:query')")
     @GetMapping(value = "/{fId}")
-    public AjaxResult getInfo(@PathVariable("fId") Long fId)
-    {
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
         return AjaxResult.success(tWarehouseFeeAgreementTypeBusinessService.selectTWarehouseFeeAgreementTypeBusinessById(fId));
     }
 
     /**
      * 新增费用协议从表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusiness:add')")
     @Log(title = "费用协议从表", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness)
-    {
+    public AjaxResult add(@RequestBody TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness) {
         return toAjax(tWarehouseFeeAgreementTypeBusinessService.insertTWarehouseFeeAgreementTypeBusiness(tWarehouseFeeAgreementTypeBusiness));
     }
 
     /**
      * 修改费用协议从表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusiness:edit')")
     @Log(title = "费用协议从表", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness)
-    {
+    public AjaxResult edit(@RequestBody TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness) {
         return toAjax(tWarehouseFeeAgreementTypeBusinessService.updateTWarehouseFeeAgreementTypeBusiness(tWarehouseFeeAgreementTypeBusiness));
     }
 
     /**
      * 删除费用协议从表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusiness:remove')")
     @Log(title = "费用协议从表", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{fIds}")
-    public AjaxResult remove(@PathVariable Long[] fIds)
-    {
-        return toAjax(tWarehouseFeeAgreementTypeBusinessService.deleteTWarehouseFeeAgreementTypeBusinessByIds(fIds));
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        for (int i = 0; i < fIds.length; i++) {
+            Long fId = fIds[i];
+            TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness = tWarehouseFeeAgreementTypeBusinessService.selectTWarehouseFeeAgreementTypeBusinessById(fId);
+            tWarehouseFeeAgreementTypeBusiness.setfDelFlag(1);
+            tWarehouseFeeAgreementTypeBusinessService.updateTWarehouseFeeAgreementTypeBusiness(tWarehouseFeeAgreementTypeBusiness);
+        }
+        return AjaxResult.success();
     }
 }

+ 35 - 22
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeBusinessDetailController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.web.controller.warehouse.feeagreement;
 
 import java.util.List;
+
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -22,24 +23,21 @@ import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
  * 费用协议从从表Controller
- * 
+ *
  * @author dongyongwei
  * @date 2021-08-02
  */
 @RestController
 @RequestMapping("/feeagreement/WarehouseFeeAgreementTypeBusinessDetail")
-public class TWarehouseFeeAgreementTypeBusinessDetailController extends BaseController
-{
+public class TWarehouseFeeAgreementTypeBusinessDetailController extends BaseController {
     @Autowired
     private ITWarehouseFeeAgreementTypeBusinessDetailService tWarehouseFeeAgreementTypeBusinessDetailService;
 
     /**
      * 查询费用协议从从表列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetail:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail)
-    {
+    public TableDataInfo list(TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail) {
         startPage();
         List<TWarehouseFeeAgreementTypeBusinessDetail> list = tWarehouseFeeAgreementTypeBusinessDetailService.selectTWarehouseFeeAgreementTypeBusinessDetailList(tWarehouseFeeAgreementTypeBusinessDetail);
         return getDataTable(list);
@@ -48,11 +46,9 @@ public class TWarehouseFeeAgreementTypeBusinessDetailController extends BaseCont
     /**
      * 导出费用协议从从表列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetail:export')")
     @Log(title = "费用协议从从表", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail)
-    {
+    public AjaxResult export(TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail) {
         List<TWarehouseFeeAgreementTypeBusinessDetail> list = tWarehouseFeeAgreementTypeBusinessDetailService.selectTWarehouseFeeAgreementTypeBusinessDetailList(tWarehouseFeeAgreementTypeBusinessDetail);
         ExcelUtil<TWarehouseFeeAgreementTypeBusinessDetail> util = new ExcelUtil<TWarehouseFeeAgreementTypeBusinessDetail>(TWarehouseFeeAgreementTypeBusinessDetail.class);
         return util.exportExcel(list, "WarehouseFeeAgreementTypeBusinessDetail");
@@ -61,43 +57,60 @@ public class TWarehouseFeeAgreementTypeBusinessDetailController extends BaseCont
     /**
      * 获取费用协议从从表详细信息
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetail:query')")
     @GetMapping(value = "/{fId}")
-    public AjaxResult getInfo(@PathVariable("fId") Long fId)
-    {
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
         return AjaxResult.success(tWarehouseFeeAgreementTypeBusinessDetailService.selectTWarehouseFeeAgreementTypeBusinessDetailById(fId));
     }
 
     /**
      * 新增费用协议从从表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetail:add')")
     @Log(title = "费用协议从从表", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail)
-    {
+    public AjaxResult add(@RequestBody TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail) {
         return toAjax(tWarehouseFeeAgreementTypeBusinessDetailService.insertTWarehouseFeeAgreementTypeBusinessDetail(tWarehouseFeeAgreementTypeBusinessDetail));
     }
 
     /**
+     * 新增费用协议从从表
+     */
+    @Log(title = "费用协议从从表", businessType = BusinessType.INSERT)
+    @PostMapping("/saveAndUpdateBatchTWarehouseFeeAgreementTypeBusinessDetail")
+    public AjaxResult saveAndUpdateBatchTWarehouseFeeAgreementTypeBusinessDetailc(@RequestBody List<TWarehouseFeeAgreementTypeBusinessDetail> tWarehouseFeeAgreementTypeBusinessDetailList) {
+        if (tWarehouseFeeAgreementTypeBusinessDetailList.size() > 0) {
+            for (int i = 0; i < tWarehouseFeeAgreementTypeBusinessDetailList.size(); i++) {
+                TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail = tWarehouseFeeAgreementTypeBusinessDetailList.get(i);
+                Long fId = tWarehouseFeeAgreementTypeBusinessDetail.getfId();
+                if (fId == null) {
+                    //add
+                    tWarehouseFeeAgreementTypeBusinessDetailService.insertTWarehouseFeeAgreementTypeBusinessDetail(tWarehouseFeeAgreementTypeBusinessDetail);
+                } else {
+                    //update
+                    tWarehouseFeeAgreementTypeBusinessDetailService.updateTWarehouseFeeAgreementTypeBusinessDetail(tWarehouseFeeAgreementTypeBusinessDetail);
+                }
+            }
+            return AjaxResult.success();
+        } else {
+            return AjaxResult.error("没有接收到数据");
+        }
+    }
+
+
+    /**
      * 修改费用协议从从表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetail:edit')")
     @Log(title = "费用协议从从表", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail)
-    {
+    public AjaxResult edit(@RequestBody TWarehouseFeeAgreementTypeBusinessDetail tWarehouseFeeAgreementTypeBusinessDetail) {
         return toAjax(tWarehouseFeeAgreementTypeBusinessDetailService.updateTWarehouseFeeAgreementTypeBusinessDetail(tWarehouseFeeAgreementTypeBusinessDetail));
     }
 
     /**
      * 删除费用协议从从表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetail:remove')")
     @Log(title = "费用协议从从表", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{fIds}")
-    public AjaxResult remove(@PathVariable Long[] fIds)
-    {
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
         return toAjax(tWarehouseFeeAgreementTypeBusinessDetailService.deleteTWarehouseFeeAgreementTypeBusinessDetailByIds(fIds));
     }
 }

+ 25 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeBusinessDetailFormulaController.java

@@ -36,7 +36,6 @@ public class TWarehouseFeeAgreementTypeBusinessDetailFormulaController extends B
     /**
      * 查询费用协议从从从列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetailFormula:list')")
     @GetMapping("/list")
     public TableDataInfo list(TWarehouseFeeAgreementTypeBusinessDetailFormula tWarehouseFeeAgreementTypeBusinessDetailFormula)
     {
@@ -48,7 +47,6 @@ public class TWarehouseFeeAgreementTypeBusinessDetailFormulaController extends B
     /**
      * 导出费用协议从从从列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetailFormula:export')")
     @Log(title = "费用协议从从从", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TWarehouseFeeAgreementTypeBusinessDetailFormula tWarehouseFeeAgreementTypeBusinessDetailFormula)
@@ -61,7 +59,6 @@ public class TWarehouseFeeAgreementTypeBusinessDetailFormulaController extends B
     /**
      * 获取费用协议从从从详细信息
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetailFormula:query')")
     @GetMapping(value = "/{fId}")
     public AjaxResult getInfo(@PathVariable("fId") Long fId)
     {
@@ -71,7 +68,6 @@ public class TWarehouseFeeAgreementTypeBusinessDetailFormulaController extends B
     /**
      * 新增费用协议从从从
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetailFormula:add')")
     @Log(title = "费用协议从从从", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TWarehouseFeeAgreementTypeBusinessDetailFormula tWarehouseFeeAgreementTypeBusinessDetailFormula)
@@ -80,9 +76,33 @@ public class TWarehouseFeeAgreementTypeBusinessDetailFormulaController extends B
     }
 
     /**
+     * 新增费用协议从从从
+     */
+    @Log(title = "费用协议从从从", businessType = BusinessType.INSERT)
+    @PostMapping("/saveAndUpdateBatch")
+    public AjaxResult saveAndUpdateBatch(@RequestBody List<TWarehouseFeeAgreementTypeBusinessDetailFormula> tWarehouseFeeAgreementTypeBusinessDetailFormulaList)
+    {
+        if(tWarehouseFeeAgreementTypeBusinessDetailFormulaList.size()>0){
+            for (int i = 0; i < tWarehouseFeeAgreementTypeBusinessDetailFormulaList.size(); i++) {
+                TWarehouseFeeAgreementTypeBusinessDetailFormula tWarehouseFeeAgreementTypeBusinessDetailFormula =tWarehouseFeeAgreementTypeBusinessDetailFormulaList.get(i);
+                Long fId = tWarehouseFeeAgreementTypeBusinessDetailFormula.getfId();
+                if(fId == null){
+                    //insert
+                    tWarehouseFeeAgreementTypeBusinessDetailFormulaService.insertTWarehouseFeeAgreementTypeBusinessDetailFormula(tWarehouseFeeAgreementTypeBusinessDetailFormula);
+                }else{
+                    //update
+                    tWarehouseFeeAgreementTypeBusinessDetailFormulaService.updateTWarehouseFeeAgreementTypeBusinessDetailFormula(tWarehouseFeeAgreementTypeBusinessDetailFormula);
+                }
+            }
+            return AjaxResult.success();
+        }else{
+            return AjaxResult.error("没有接受到数据");
+        }
+    }
+
+    /**
      * 修改费用协议从从从
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementTypeBusinessDetailFormula:edit')")
     @Log(title = "费用协议从从从", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TWarehouseFeeAgreementTypeBusinessDetailFormula tWarehouseFeeAgreementTypeBusinessDetailFormula)

+ 57 - 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/feeagreement/TWarehouseFeeAgreementTypeController.java

@@ -1,6 +1,9 @@
 package com.ruoyi.web.controller.warehouse.feeagreement;
 
 import java.util.List;
+
+import com.ruoyi.feeagreement.domain.TWarehouseFeeAgreementTypeBusiness;
+import com.ruoyi.feeagreement.service.ITWarehouseFeeAgreementTypeBusinessService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -24,7 +27,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
  * 费用协议主表Controller
  * 
  * @author dongyongwei
- * @date 2021-07-30
+ * @date 2021-08-04
  */
 @RestController
 @RequestMapping("/feeagreement/WarehouseFeeAgreementType")
@@ -33,10 +36,12 @@ public class TWarehouseFeeAgreementTypeController extends BaseController
     @Autowired
     private ITWarehouseFeeAgreementTypeService tWarehouseFeeAgreementTypeService;
 
+    @Autowired
+    private ITWarehouseFeeAgreementTypeBusinessService tWarehouseFeeAgreementTypeBusinessService;
+
     /**
      * 查询费用协议主表列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementType:list')")
     @GetMapping("/list")
     public TableDataInfo list(TWarehouseFeeAgreementType tWarehouseFeeAgreementType)
     {
@@ -48,7 +53,6 @@ public class TWarehouseFeeAgreementTypeController extends BaseController
     /**
      * 导出费用协议主表列表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementType:export')")
     @Log(title = "费用协议主表", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TWarehouseFeeAgreementType tWarehouseFeeAgreementType)
@@ -61,17 +65,22 @@ public class TWarehouseFeeAgreementTypeController extends BaseController
     /**
      * 获取费用协议主表详细信息
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementType:query')")
     @GetMapping(value = "/{fId}")
     public AjaxResult getInfo(@PathVariable("fId") Long fId)
     {
-        return AjaxResult.success(tWarehouseFeeAgreementTypeService.selectTWarehouseFeeAgreementTypeById(fId));
+        TWarehouseFeeAgreementType tWarehouseFeeAgreementType = tWarehouseFeeAgreementTypeService.selectTWarehouseFeeAgreementTypeById(fId);
+        TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusinessQuery = new TWarehouseFeeAgreementTypeBusiness();
+        tWarehouseFeeAgreementTypeBusinessQuery.setfWarehouseFeeAgreementTypeFId(fId);
+        List<TWarehouseFeeAgreementTypeBusiness> tWarehouseFeeAgreementTypeBusinessList = tWarehouseFeeAgreementTypeBusinessService.selectTWarehouseFeeAgreementTypeBusinessList(tWarehouseFeeAgreementTypeBusinessQuery);
+        if(tWarehouseFeeAgreementTypeBusinessList.size()>0){
+            tWarehouseFeeAgreementType.settWarehouseFeeAgreementTypeBusinessList(tWarehouseFeeAgreementTypeBusinessList);
+        }
+        return AjaxResult.success(tWarehouseFeeAgreementType);
     }
 
     /**
      * 新增费用协议主表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementType:add')")
     @Log(title = "费用协议主表", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TWarehouseFeeAgreementType tWarehouseFeeAgreementType)
@@ -80,9 +89,43 @@ public class TWarehouseFeeAgreementTypeController extends BaseController
     }
 
     /**
+     * 新增费用协议主表
+     */
+    @Log(title = "费用协议主表", businessType = BusinessType.INSERT)
+    @PostMapping("/saveAndUpdateTWarehouseFeeAgreementType")
+    public AjaxResult saveAndUpdateTWarehouseFeeAgreementType(@RequestBody TWarehouseFeeAgreementType tWarehouseFeeAgreementType)
+    {
+        //fId存在就更新,不存在就新增
+        Long fId =tWarehouseFeeAgreementType.getfId();
+        Long fIdReturn = 0L;
+        if(fId == null){
+            tWarehouseFeeAgreementTypeService.insertTWarehouseFeeAgreementType(tWarehouseFeeAgreementType);
+        }else{
+            tWarehouseFeeAgreementTypeService.updateTWarehouseFeeAgreementType(tWarehouseFeeAgreementType);
+        }
+        fIdReturn = tWarehouseFeeAgreementType.getfId();
+        List<TWarehouseFeeAgreementTypeBusiness> tWarehouseFeeAgreementTypeBusinessList = tWarehouseFeeAgreementType.gettWarehouseFeeAgreementTypeBusinessList();
+        if(tWarehouseFeeAgreementTypeBusinessList!= null){
+            for (int i = 0; i < tWarehouseFeeAgreementTypeBusinessList.size(); i++) {
+                TWarehouseFeeAgreementTypeBusiness tWarehouseFeeAgreementTypeBusiness = tWarehouseFeeAgreementTypeBusinessList.get(i);
+                tWarehouseFeeAgreementTypeBusiness.setfWarehouseFeeAgreementTypeFId(fIdReturn);
+                if(tWarehouseFeeAgreementTypeBusiness.getfId()!=null){
+                    //update
+                    tWarehouseFeeAgreementTypeBusinessService.updateTWarehouseFeeAgreementTypeBusiness(tWarehouseFeeAgreementTypeBusiness);
+                }else{
+                    //insert
+                    tWarehouseFeeAgreementTypeBusinessService.insertTWarehouseFeeAgreementTypeBusiness(tWarehouseFeeAgreementTypeBusiness);
+                }
+            }
+        }
+        return AjaxResult.success(fIdReturn);
+    }
+
+
+
+    /**
      * 修改费用协议主表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementType:edit')")
     @Log(title = "费用协议主表", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TWarehouseFeeAgreementType tWarehouseFeeAgreementType)
@@ -93,11 +136,16 @@ public class TWarehouseFeeAgreementTypeController extends BaseController
     /**
      * 删除费用协议主表
      */
-    @PreAuthorize("@ss.hasPermi('feeagreement:WarehouseFeeAgreementType:remove')")
     @Log(title = "费用协议主表", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{fIds}")
     public AjaxResult remove(@PathVariable Long[] fIds)
     {
-        return toAjax(tWarehouseFeeAgreementTypeService.deleteTWarehouseFeeAgreementTypeByIds(fIds));
+        for (int i = 0; i < fIds.length; i++) {
+            Long fId =fIds[i];
+            TWarehouseFeeAgreementType tWarehouseFeeAgreementType = tWarehouseFeeAgreementTypeService.selectTWarehouseFeeAgreementTypeById(fId);
+            tWarehouseFeeAgreementType.setfDelFlag(1);
+            tWarehouseFeeAgreementTypeService.updateTWarehouseFeeAgreementType(tWarehouseFeeAgreementType);
+        }
+        return AjaxResult.success();
     }
 }

+ 109 - 11
ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/domain/TWarehouseFeeAgreementType.java

@@ -1,6 +1,8 @@
 package com.ruoyi.feeagreement.domain;
 
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -11,7 +13,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * 费用协议主表对象 t_warehouse_fee_agreement_type
  * 
  * @author dongyongwei
- * @date 2021-07-30
+ * @date 2021-08-04
  */
 public class TWarehouseFeeAgreementType extends BaseEntity
 {
@@ -20,13 +22,30 @@ public class TWarehouseFeeAgreementType extends BaseEntity
     /** ID */
     private Long fId;
 
+    /** 费用协议名称 */
+    @Excel(name = "费用协议名称")
+    private String fName;
+
     /** 客户名称 */
-    @Excel(name = "客户名称")
+    @Excel(name = "客户ID")
     private Long fCorpId;
 
-    /** 客户名称 **/
+    /** 客户名称名字 */
     private String fCorpName;
 
+    /** 分类名称 */
+    private String fTFeeAgreementTypeName;
+
+    List<TWarehouseFeeAgreementTypeBusiness> tWarehouseFeeAgreementTypeBusinessList;
+
+    public List<TWarehouseFeeAgreementTypeBusiness> gettWarehouseFeeAgreementTypeBusinessList() {
+        return tWarehouseFeeAgreementTypeBusinessList;
+    }
+
+    public void settWarehouseFeeAgreementTypeBusinessList(List<TWarehouseFeeAgreementTypeBusiness> tWarehouseFeeAgreementTypeBusinessList) {
+        this.tWarehouseFeeAgreementTypeBusinessList = tWarehouseFeeAgreementTypeBusinessList;
+    }
+
     public String getfCorpName() {
         return fCorpName;
     }
@@ -35,13 +54,6 @@ public class TWarehouseFeeAgreementType extends BaseEntity
         this.fCorpName = fCorpName;
     }
 
-    /** 分类类型ID */
-    @Excel(name = "分类类型ID")
-    private Long fTFeeAgreementTypeFId;
-
-    /** 分类类型名称 */
-    private String fTFeeAgreementTypeName;
-
     public String getfTFeeAgreementTypeName() {
         return fTFeeAgreementTypeName;
     }
@@ -50,6 +62,10 @@ public class TWarehouseFeeAgreementType extends BaseEntity
         this.fTFeeAgreementTypeName = fTFeeAgreementTypeName;
     }
 
+    /** 分类类型ID */
+    @Excel(name = "分类类型ID")
+    private Long fTFeeAgreementTypeFId;
+
     /** 有效期起 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "有效期起", width = 30, dateFormat = "yyyy-MM-dd")
@@ -86,7 +102,49 @@ public class TWarehouseFeeAgreementType extends BaseEntity
     @Excel(name = "删除状态", readConverterExp = "0=正常,1=停用")
     private Integer fDelFlag;
 
-    public void setfId(Long fId) 
+    /** 是否有效 */
+    @Excel(name = "是否有效")
+    private String fIsValid;
+
+    private String fIsValidName;
+
+    /** 是否提交 */
+    @Excel(name = "是否提交")
+    private String fIsCommit;
+
+    private String fIsCommitName;
+
+    /** 是否标准 */
+    @Excel(name = "是否标准")
+    private String fIsStandard;
+
+    private String fIsStandardName;
+
+    public String getfIsValidName() {
+        return fIsValidName;
+    }
+
+    public void setfIsValidName(String fIsValidName) {
+        this.fIsValidName = fIsValidName;
+    }
+
+    public String getfIsCommitName() {
+        return fIsCommitName;
+    }
+
+    public void setfIsCommitName(String fIsCommitName) {
+        this.fIsCommitName = fIsCommitName;
+    }
+
+    public String getfIsStandardName() {
+        return fIsStandardName;
+    }
+
+    public void setfIsStandardName(String fIsStandardName) {
+        this.fIsStandardName = fIsStandardName;
+    }
+
+    public void setfId(Long fId)
     {
         this.fId = fId;
     }
@@ -95,6 +153,15 @@ public class TWarehouseFeeAgreementType extends BaseEntity
     {
         return fId;
     }
+    public void setfName(String fName) 
+    {
+        this.fName = fName;
+    }
+
+    public String getfName() 
+    {
+        return fName;
+    }
     public void setfCorpId(Long fCorpId) 
     {
         this.fCorpId = fCorpId;
@@ -185,11 +252,39 @@ public class TWarehouseFeeAgreementType extends BaseEntity
     {
         return fDelFlag;
     }
+    public void setfIsValid(String fIsValid) 
+    {
+        this.fIsValid = fIsValid;
+    }
+
+    public String getfIsValid() 
+    {
+        return fIsValid;
+    }
+    public void setfIsCommit(String fIsCommit) 
+    {
+        this.fIsCommit = fIsCommit;
+    }
+
+    public String getfIsCommit() 
+    {
+        return fIsCommit;
+    }
+    public void setfIsStandard(String fIsStandard) 
+    {
+        this.fIsStandard = fIsStandard;
+    }
+
+    public String getfIsStandard() 
+    {
+        return fIsStandard;
+    }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("fId", getfId())
+            .append("fName", getfName())
             .append("fCorpId", getfCorpId())
             .append("fTFeeAgreementTypeFId", getfTFeeAgreementTypeFId())
             .append("fBegindate", getfBegindate())
@@ -200,6 +295,9 @@ public class TWarehouseFeeAgreementType extends BaseEntity
             .append("fUpdateBy", getfUpdateBy())
             .append("fUpdateTime", getfUpdateTime())
             .append("fDelFlag", getfDelFlag())
+            .append("fIsValid", getfIsValid())
+            .append("fIsCommit", getfIsCommit())
+            .append("fIsStandard", getfIsStandard())
             .toString();
     }
 }

+ 11 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/domain/TWarehouseFeeAgreementTypeBusiness.java

@@ -36,6 +36,17 @@ public class TWarehouseFeeAgreementTypeBusiness extends BaseEntity
     @Excel(name = "费目")
     private Long fFeeItem;
 
+    /** 费目名称 */
+    private String fFeeItemName;
+
+    public String getfFeeItemName() {
+        return fFeeItemName;
+    }
+
+    public void setfFeeItemName(String fFeeItemName) {
+        this.fFeeItemName = fFeeItemName;
+    }
+
     /** 计算方法 */
     @Excel(name = "计算方法")
     private String fComputingMethod;

+ 84 - 56
ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/domain/TWarehouseFeeAgreementTypeBusinessDetail.java

@@ -10,9 +10,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
  * 费用协议从从表对象 t_warehouse_fee_agreement_type_business_detail
- * 
+ *
  * @author dongyongwei
- * @date 2021-08-02
+ * @date 2021-08-04
  */
 public class TWarehouseFeeAgreementTypeBusinessDetail extends BaseEntity
 {
@@ -79,6 +79,14 @@ public class TWarehouseFeeAgreementTypeBusinessDetail extends BaseEntity
     @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fCreateTime;
 
+    /** 费率 */
+    @Excel(name = "费率")
+    private BigDecimal fRate;
+
+    /** 最大金额 */
+    @Excel(name = "最大金额")
+    private BigDecimal fMaxAmount;
+
     /** 创建人ID */
     @Excel(name = "创建人ID")
     private Long fCreateBy;
@@ -87,156 +95,174 @@ public class TWarehouseFeeAgreementTypeBusinessDetail extends BaseEntity
     @Excel(name = "备注")
     private String fRemark;
 
-    public void setfId(Long fId) 
+    public void setfId(Long fId)
     {
         this.fId = fId;
     }
 
-    public Long getfId() 
+    public Long getfId()
     {
         return fId;
     }
-    public void setfWarehouseFeeAgreementTypeFId(Long fWarehouseFeeAgreementTypeFId) 
+    public void setfWarehouseFeeAgreementTypeFId(Long fWarehouseFeeAgreementTypeFId)
     {
         this.fWarehouseFeeAgreementTypeFId = fWarehouseFeeAgreementTypeFId;
     }
 
-    public Long getfWarehouseFeeAgreementTypeFId() 
+    public Long getfWarehouseFeeAgreementTypeFId()
     {
         return fWarehouseFeeAgreementTypeFId;
     }
-    public void setfWarehouseFeeAgreementTypeBusinessFId(Long fWarehouseFeeAgreementTypeBusinessFId) 
+    public void setfWarehouseFeeAgreementTypeBusinessFId(Long fWarehouseFeeAgreementTypeBusinessFId)
     {
         this.fWarehouseFeeAgreementTypeBusinessFId = fWarehouseFeeAgreementTypeBusinessFId;
     }
 
-    public Long getfWarehouseFeeAgreementTypeBusinessFId() 
+    public Long getfWarehouseFeeAgreementTypeBusinessFId()
     {
         return fWarehouseFeeAgreementTypeBusinessFId;
     }
-    public void setfFeeUnitId(Long fFeeUnitId) 
+    public void setfFeeUnitId(Long fFeeUnitId)
     {
         this.fFeeUnitId = fFeeUnitId;
     }
 
-    public Long getfFeeUnitId() 
+    public Long getfFeeUnitId()
     {
         return fFeeUnitId;
     }
-    public void setfFreeNum(Long fFreeNum) 
+    public void setfFreeNum(Long fFreeNum)
     {
         this.fFreeNum = fFreeNum;
     }
 
-    public Long getfFreeNum() 
+    public Long getfFreeNum()
     {
         return fFreeNum;
     }
-    public void setfSize(Long fSize) 
+    public void setfSize(Long fSize)
     {
         this.fSize = fSize;
     }
 
-    public Long getfSize() 
+    public Long getfSize()
     {
         return fSize;
     }
-    public void setfBoxModel(Long fBoxModel) 
+    public void setfBoxModel(Long fBoxModel)
     {
         this.fBoxModel = fBoxModel;
     }
 
-    public Long getfBoxModel() 
+    public Long getfBoxModel()
     {
         return fBoxModel;
     }
-    public void setfNum(Long fNum) 
+    public void setfNum(Long fNum)
     {
         this.fNum = fNum;
     }
 
-    public Long getfNum() 
+    public Long getfNum()
     {
         return fNum;
     }
-    public void setfPrice(BigDecimal fPrice) 
+    public void setfPrice(BigDecimal fPrice)
     {
         this.fPrice = fPrice;
     }
 
-    public BigDecimal getfPrice() 
+    public BigDecimal getfPrice()
     {
         return fPrice;
     }
-    public void setfCurrency(String fCurrency) 
+    public void setfCurrency(String fCurrency)
     {
         this.fCurrency = fCurrency;
     }
 
-    public String getfCurrency() 
+    public String getfCurrency()
     {
         return fCurrency;
     }
-    public void setfIsContract(String fIsContract) 
+    public void setfIsContract(String fIsContract)
     {
         this.fIsContract = fIsContract;
     }
 
-    public String getfIsContract() 
+    public String getfIsContract()
     {
         return fIsContract;
     }
-    public void setfDelFlag(Integer fDelFlag) 
+    public void setfDelFlag(Integer fDelFlag)
     {
         this.fDelFlag = fDelFlag;
     }
 
-    public Integer getfDelFlag() 
+    public Integer getfDelFlag()
     {
         return fDelFlag;
     }
-    public void setfUpdateTime(Date fUpdateTime) 
+    public void setfUpdateTime(Date fUpdateTime)
     {
         this.fUpdateTime = fUpdateTime;
     }
 
-    public Date getfUpdateTime() 
+    public Date getfUpdateTime()
     {
         return fUpdateTime;
     }
-    public void setfUpdateBy(Long fUpdateBy) 
+    public void setfUpdateBy(Long fUpdateBy)
     {
         this.fUpdateBy = fUpdateBy;
     }
 
-    public Long getfUpdateBy() 
+    public Long getfUpdateBy()
     {
         return fUpdateBy;
     }
-    public void setfCreateTime(Date fCreateTime) 
+    public void setfCreateTime(Date fCreateTime)
     {
         this.fCreateTime = fCreateTime;
     }
 
-    public Date getfCreateTime() 
+    public Date getfCreateTime()
     {
         return fCreateTime;
     }
-    public void setfCreateBy(Long fCreateBy) 
+    public void setfRate(BigDecimal fRate)
+    {
+        this.fRate = fRate;
+    }
+
+    public BigDecimal getfRate()
+    {
+        return fRate;
+    }
+    public void setfMaxAmount(BigDecimal fMaxAmount)
+    {
+        this.fMaxAmount = fMaxAmount;
+    }
+
+    public BigDecimal getfMaxAmount()
+    {
+        return fMaxAmount;
+    }
+    public void setfCreateBy(Long fCreateBy)
     {
         this.fCreateBy = fCreateBy;
     }
 
-    public Long getfCreateBy() 
+    public Long getfCreateBy()
     {
         return fCreateBy;
     }
-    public void setfRemark(String fRemark) 
+    public void setfRemark(String fRemark)
     {
         this.fRemark = fRemark;
     }
 
-    public String getfRemark() 
+    public String getfRemark()
     {
         return fRemark;
     }
@@ -244,23 +270,25 @@ public class TWarehouseFeeAgreementTypeBusinessDetail extends BaseEntity
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("fId", getfId())
-            .append("fWarehouseFeeAgreementTypeFId", getfWarehouseFeeAgreementTypeFId())
-            .append("fWarehouseFeeAgreementTypeBusinessFId", getfWarehouseFeeAgreementTypeBusinessFId())
-            .append("fFeeUnitId", getfFeeUnitId())
-            .append("fFreeNum", getfFreeNum())
-            .append("fSize", getfSize())
-            .append("fBoxModel", getfBoxModel())
-            .append("fNum", getfNum())
-            .append("fPrice", getfPrice())
-            .append("fCurrency", getfCurrency())
-            .append("fIsContract", getfIsContract())
-            .append("fDelFlag", getfDelFlag())
-            .append("fUpdateTime", getfUpdateTime())
-            .append("fUpdateBy", getfUpdateBy())
-            .append("fCreateTime", getfCreateTime())
-            .append("fCreateBy", getfCreateBy())
-            .append("fRemark", getfRemark())
-            .toString();
-    }
-}
+                .append("fId", getfId())
+                .append("fWarehouseFeeAgreementTypeFId", getfWarehouseFeeAgreementTypeFId())
+                .append("fWarehouseFeeAgreementTypeBusinessFId", getfWarehouseFeeAgreementTypeBusinessFId())
+                .append("fFeeUnitId", getfFeeUnitId())
+                .append("fFreeNum", getfFreeNum())
+                .append("fSize", getfSize())
+                .append("fBoxModel", getfBoxModel())
+                .append("fNum", getfNum())
+                .append("fPrice", getfPrice())
+                .append("fCurrency", getfCurrency())
+                .append("fIsContract", getfIsContract())
+                .append("fDelFlag", getfDelFlag())
+                .append("fUpdateTime", getfUpdateTime())
+                .append("fUpdateBy", getfUpdateBy())
+                .append("fCreateTime", getfCreateTime())
+                .append("fRate", getfRate())
+                .append("fMaxAmount", getfMaxAmount())
+                .append("fCreateBy", getfCreateBy())
+                .append("fRemark", getfRemark())
+                .toString();
+    }
+}

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/mapper/TWarehouseFeeAgreementTypeMapper.java

@@ -7,7 +7,7 @@ import com.ruoyi.feeagreement.domain.TWarehouseFeeAgreementType;
  * 费用协议主表Mapper接口
  * 
  * @author dongyongwei
- * @date 2021-07-30
+ * @date 2021-08-04
  */
 public interface TWarehouseFeeAgreementTypeMapper 
 {

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/service/ITWarehouseFeeAgreementTypeService.java

@@ -7,7 +7,7 @@ import com.ruoyi.feeagreement.domain.TWarehouseFeeAgreementType;
  * 费用协议主表Service接口
  * 
  * @author dongyongwei
- * @date 2021-07-30
+ * @date 2021-08-04
  */
 public interface ITWarehouseFeeAgreementTypeService 
 {

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/feeagreement/service/impl/TWarehouseFeeAgreementTypeServiceImpl.java

@@ -11,7 +11,7 @@ import com.ruoyi.feeagreement.service.ITWarehouseFeeAgreementTypeService;
  * 费用协议主表Service业务层处理
  * 
  * @author dongyongwei
- * @date 2021-07-30
+ * @date 2021-08-04
  */
 @Service
 public class TWarehouseFeeAgreementTypeServiceImpl implements ITWarehouseFeeAgreementTypeService 

+ 21 - 11
ruoyi-warehouse/src/main/resources/mapper/feeagreement/TWarehouseFeeAgreementTypeBusinessDetailMapper.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.feeagreement.mapper.TWarehouseFeeAgreementTypeBusinessDetailMapper">
-    
+
     <resultMap type="TWarehouseFeeAgreementTypeBusinessDetail" id="TWarehouseFeeAgreementTypeBusinessDetailResult">
         <result property="fId"    column="f_id"    />
         <result property="fWarehouseFeeAgreementTypeFId"    column="f_warehouse_fee_agreement_type_f_id"    />
@@ -20,17 +20,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="fUpdateTime"    column="f_update_time"    />
         <result property="fUpdateBy"    column="f_update_by"    />
         <result property="fCreateTime"    column="f_create_time"    />
+        <result property="fRate"    column="f_rate"    />
+        <result property="fMaxAmount"    column="f_max_amount"    />
         <result property="fCreateBy"    column="f_create_by"    />
         <result property="fRemark"    column="f_remark"    />
     </resultMap>
 
     <sql id="selectTWarehouseFeeAgreementTypeBusinessDetailVo">
-        select f_id, f_warehouse_fee_agreement_type_f_id, f_warehouse_fee_agreement_type_business_f_id, f_fee_unit_id, f_free_num, f_size, f_box_model, f_num, f_price, f_currency, f_is_contract, f_del_flag, f_update_time, f_update_by, f_create_time, f_create_by, f_remark from t_warehouse_fee_agreement_type_business_detail
+        select f_id, f_warehouse_fee_agreement_type_f_id, f_warehouse_fee_agreement_type_business_f_id, f_fee_unit_id, f_free_num, f_size, f_box_model, f_num, f_price, f_currency, f_is_contract, f_del_flag, f_update_time, f_update_by, f_create_time, f_rate, f_max_amount, f_create_by, f_remark from t_warehouse_fee_agreement_type_business_detail
     </sql>
 
     <select id="selectTWarehouseFeeAgreementTypeBusinessDetailList" parameterType="TWarehouseFeeAgreementTypeBusinessDetail" resultMap="TWarehouseFeeAgreementTypeBusinessDetailResult">
         <include refid="selectTWarehouseFeeAgreementTypeBusinessDetailVo"/>
-        <where>  
+        <where>
             <if test="fWarehouseFeeAgreementTypeFId != null "> and f_warehouse_fee_agreement_type_f_id = #{fWarehouseFeeAgreementTypeFId}</if>
             <if test="fWarehouseFeeAgreementTypeBusinessFId != null "> and f_warehouse_fee_agreement_type_business_f_id = #{fWarehouseFeeAgreementTypeBusinessFId}</if>
             <if test="fFeeUnitId != null "> and f_fee_unit_id = #{fFeeUnitId}</if>
@@ -45,16 +47,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fUpdateTime != null "> and f_update_time = #{fUpdateTime}</if>
             <if test="fUpdateBy != null "> and f_update_by = #{fUpdateBy}</if>
             <if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if>
+            <if test="fRate != null "> and f_rate = #{fRate}</if>
+            <if test="fMaxAmount != null "> and f_max_amount = #{fMaxAmount}</if>
             <if test="fCreateBy != null "> and f_create_by = #{fCreateBy}</if>
             <if test="fRemark != null  and fRemark != ''"> and f_remark = #{fRemark}</if>
         </where>
     </select>
-    
+
     <select id="selectTWarehouseFeeAgreementTypeBusinessDetailById" parameterType="Long" resultMap="TWarehouseFeeAgreementTypeBusinessDetailResult">
         <include refid="selectTWarehouseFeeAgreementTypeBusinessDetailVo"/>
         where f_id = #{fId}
     </select>
-        
+
     <insert id="insertTWarehouseFeeAgreementTypeBusinessDetail" parameterType="TWarehouseFeeAgreementTypeBusinessDetail" useGeneratedKeys="true" keyProperty="fId">
         insert into t_warehouse_fee_agreement_type_business_detail
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -72,9 +76,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fUpdateTime != null">f_update_time,</if>
             <if test="fUpdateBy != null">f_update_by,</if>
             <if test="fCreateTime != null">f_create_time,</if>
+            <if test="fRate != null">f_rate,</if>
+            <if test="fMaxAmount != null">f_max_amount,</if>
             <if test="fCreateBy != null">f_create_by,</if>
             <if test="fRemark != null">f_remark,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fWarehouseFeeAgreementTypeFId != null">#{fWarehouseFeeAgreementTypeFId},</if>
             <if test="fWarehouseFeeAgreementTypeBusinessFId != null">#{fWarehouseFeeAgreementTypeBusinessFId},</if>
@@ -90,9 +96,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fUpdateTime != null">#{fUpdateTime},</if>
             <if test="fUpdateBy != null">#{fUpdateBy},</if>
             <if test="fCreateTime != null">#{fCreateTime},</if>
+            <if test="fRate != null">#{fRate},</if>
+            <if test="fMaxAmount != null">#{fMaxAmount},</if>
             <if test="fCreateBy != null">#{fCreateBy},</if>
             <if test="fRemark != null">#{fRemark},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateTWarehouseFeeAgreementTypeBusinessDetail" parameterType="TWarehouseFeeAgreementTypeBusinessDetail">
@@ -112,6 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
             <if test="fUpdateBy != null">f_update_by = #{fUpdateBy},</if>
             <if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
+            <if test="fRate != null">f_rate = #{fRate},</if>
+            <if test="fMaxAmount != null">f_max_amount = #{fMaxAmount},</if>
             <if test="fCreateBy != null">f_create_by = #{fCreateBy},</if>
             <if test="fRemark != null">f_remark = #{fRemark},</if>
         </trim>
@@ -123,10 +133,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteTWarehouseFeeAgreementTypeBusinessDetailByIds" parameterType="String">
-        delete from t_warehouse_fee_agreement_type_business_detail where f_id in 
+        delete from t_warehouse_fee_agreement_type_business_detail where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">
             #{fId}
         </foreach>
     </delete>
-    
+
 </mapper>

+ 76 - 45
ruoyi-warehouse/src/main/resources/mapper/feeagreement/TWarehouseFeeAgreementTypeBusinessMapper.xml

@@ -1,55 +1,80 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.feeagreement.mapper.TWarehouseFeeAgreementTypeBusinessMapper">
-    
+
     <resultMap type="TWarehouseFeeAgreementTypeBusiness" id="TWarehouseFeeAgreementTypeBusinessResult">
-        <result property="fId"    column="f_id"    />
-        <result property="fWarehouseFeeAgreementTypeFId"    column="f_warehouse_fee_agreement_type_f_id"    />
-        <result property="fTFeeAgreementTypeFId"    column="f_t_fee_agreement_type_f_id"    />
-        <result property="fTFeeAgreementFTypeParentId"    column="f_t_fee_agreement_f_type_parent_id"    />
-        <result property="fFeeItem"    column="f_fee_item"    />
-        <result property="fComputingMethod"    column="f_computing_method"    />
-        <result property="fReceiptPaymentType"    column="f_receipt_payment_type"    />
-        <result property="fGetValue"    column="f_get_value"    />
-        <result property="fDelFlag"    column="f_del_flag"    />
-        <result property="fUpdateTime"    column="f_update_time"    />
-        <result property="fUpdateBy"    column="f_update_by"    />
-        <result property="fCreateTime"    column="f_create_time"    />
-        <result property="fCreateBy"    column="f_create_by"    />
-        <result property="fRemark"    column="f_remark"    />
+        <result property="fId" column="f_id"/>
+        <result property="fWarehouseFeeAgreementTypeFId" column="f_warehouse_fee_agreement_type_f_id"/>
+        <result property="fTFeeAgreementTypeFId" column="f_t_fee_agreement_type_f_id"/>
+        <result property="fTFeeAgreementFTypeParentId" column="f_t_fee_agreement_f_type_parent_id"/>
+        <result property="fFeeItem" column="f_fee_item"/>
+        <result property="fComputingMethod" column="f_computing_method"/>
+        <result property="fReceiptPaymentType" column="f_receipt_payment_type"/>
+        <result property="fGetValue" column="f_get_value"/>
+        <result property="fDelFlag" column="f_del_flag"/>
+        <result property="fUpdateTime" column="f_update_time"/>
+        <result property="fUpdateBy" column="f_update_by"/>
+        <result property="fCreateTime" column="f_create_time"/>
+        <result property="fFeeItemName" column="f_fee_item_name"/>
+        <result property="fCreateBy" column="f_create_by"/>
+        <result property="fRemark" column="f_remark"/>
     </resultMap>
 
     <sql id="selectTWarehouseFeeAgreementTypeBusinessVo">
-        select f_id, f_warehouse_fee_agreement_type_f_id, f_t_fee_agreement_type_f_id, f_t_fee_agreement_f_type_parent_id, f_fee_item, f_computing_method, f_receipt_payment_type, f_get_value, f_del_flag, f_update_time, f_update_by, f_create_time, f_create_by, f_remark from t_warehouse_fee_agreement_type_business
+        select b.f_id,
+               b.f_warehouse_fee_agreement_type_f_id,
+               b.f_t_fee_agreement_type_f_id,
+               b.f_t_fee_agreement_f_type_parent_id,
+               b.f_fee_item,
+               b.f_computing_method,
+               b.f_receipt_payment_type,
+               b.f_get_value,
+               b.f_del_flag,
+               b.f_update_time,
+               b.f_update_by,
+               b.f_create_time,
+               b.f_create_by,
+               b.f_remark,
+               f.f_name as f_fee_item_name
+        from t_warehouse_fee_agreement_type_business b
+                 left join t_fees f on f.f_id = b.f_fee_item
     </sql>
 
-    <select id="selectTWarehouseFeeAgreementTypeBusinessList" parameterType="TWarehouseFeeAgreementTypeBusiness" resultMap="TWarehouseFeeAgreementTypeBusinessResult">
+    <select id="selectTWarehouseFeeAgreementTypeBusinessList" parameterType="TWarehouseFeeAgreementTypeBusiness"
+            resultMap="TWarehouseFeeAgreementTypeBusinessResult">
         <include refid="selectTWarehouseFeeAgreementTypeBusinessVo"/>
-        <where>  
-            <if test="fWarehouseFeeAgreementTypeFId != null "> and f_warehouse_fee_agreement_type_f_id = #{fWarehouseFeeAgreementTypeFId}</if>
-            <if test="fTFeeAgreementTypeFId != null "> and f_t_fee_agreement_type_f_id = #{fTFeeAgreementTypeFId}</if>
-            <if test="fTFeeAgreementFTypeParentId != null "> and f_t_fee_agreement_f_type_parent_id = #{fTFeeAgreementFTypeParentId}</if>
-            <if test="fFeeItem != null "> and f_fee_item = #{fFeeItem}</if>
-            <if test="fComputingMethod != null "> and f_computing_method = #{fComputingMethod}</if>
-            <if test="fReceiptPaymentType != null "> and f_receipt_payment_type = #{fReceiptPaymentType}</if>
-            <if test="fGetValue != null "> and f_get_value = #{fGetValue}</if>
-            <if test="fDelFlag != null "> and f_del_flag = #{fDelFlag}</if>
-            <if test="fUpdateTime != null "> and f_update_time = #{fUpdateTime}</if>
-            <if test="fUpdateBy != null "> and f_update_by = #{fUpdateBy}</if>
-            <if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if>
-            <if test="fCreateBy != null "> and f_create_by = #{fCreateBy}</if>
-            <if test="fRemark != null  and fRemark != ''"> and f_remark = #{fRemark}</if>
+        <where>
+            <if test="fWarehouseFeeAgreementTypeFId != null ">and b.f_warehouse_fee_agreement_type_f_id =
+                #{fWarehouseFeeAgreementTypeFId}
+            </if>
+            <if test="fTFeeAgreementTypeFId != null ">and b.f_t_fee_agreement_type_f_id = #{fTFeeAgreementTypeFId}</if>
+            <if test="fTFeeAgreementFTypeParentId != null ">and b.f_t_fee_agreement_f_type_parent_id =
+                #{fTFeeAgreementFTypeParentId}
+            </if>
+            <if test="fFeeItem != null ">and b.f_fee_item = #{fFeeItem}</if>
+            <if test="fComputingMethod != null ">and b.f_computing_method = #{fComputingMethod}</if>
+            <if test="fReceiptPaymentType != null ">and b.f_receipt_payment_type = #{fReceiptPaymentType}</if>
+            <if test="fGetValue != null ">and b.f_get_value = #{fGetValue}</if>
+            <if test="fDelFlag != null ">and b.f_del_flag = #{fDelFlag}</if>
+            <if test="fUpdateTime != null ">and b.f_update_time = #{fUpdateTime}</if>
+            <if test="fUpdateBy != null ">and b.f_update_by = #{fUpdateBy}</if>
+            <if test="fCreateTime != null ">and b.f_create_time = #{fCreateTime}</if>
+            <if test="fCreateBy != null ">and b.f_create_by = #{fCreateBy}</if>
+            <if test="fRemark != null  and fRemark != ''">and b.f_remark = #{fRemark}</if>
+            and b.f_del_flag = 0
         </where>
     </select>
-    
-    <select id="selectTWarehouseFeeAgreementTypeBusinessById" parameterType="Long" resultMap="TWarehouseFeeAgreementTypeBusinessResult">
+
+    <select id="selectTWarehouseFeeAgreementTypeBusinessById" parameterType="Long"
+            resultMap="TWarehouseFeeAgreementTypeBusinessResult">
         <include refid="selectTWarehouseFeeAgreementTypeBusinessVo"/>
-        where f_id = #{fId}
+        where b.f_id = #{fId}
     </select>
-        
-    <insert id="insertTWarehouseFeeAgreementTypeBusiness" parameterType="TWarehouseFeeAgreementTypeBusiness" useGeneratedKeys="true" keyProperty="fId">
+
+    <insert id="insertTWarehouseFeeAgreementTypeBusiness" parameterType="TWarehouseFeeAgreementTypeBusiness"
+            useGeneratedKeys="true" keyProperty="fId">
         insert into t_warehouse_fee_agreement_type_business
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="fWarehouseFeeAgreementTypeFId != null">f_warehouse_fee_agreement_type_f_id,</if>
@@ -65,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateTime != null">f_create_time,</if>
             <if test="fCreateBy != null">f_create_by,</if>
             <if test="fRemark != null">f_remark,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fWarehouseFeeAgreementTypeFId != null">#{fWarehouseFeeAgreementTypeFId},</if>
             <if test="fTFeeAgreementTypeFId != null">#{fTFeeAgreementTypeFId},</if>
@@ -80,15 +105,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fCreateTime != null">#{fCreateTime},</if>
             <if test="fCreateBy != null">#{fCreateBy},</if>
             <if test="fRemark != null">#{fRemark},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateTWarehouseFeeAgreementTypeBusiness" parameterType="TWarehouseFeeAgreementTypeBusiness">
         update t_warehouse_fee_agreement_type_business
         <trim prefix="SET" suffixOverrides=",">
-            <if test="fWarehouseFeeAgreementTypeFId != null">f_warehouse_fee_agreement_type_f_id = #{fWarehouseFeeAgreementTypeFId},</if>
+            <if test="fWarehouseFeeAgreementTypeFId != null">f_warehouse_fee_agreement_type_f_id =
+                #{fWarehouseFeeAgreementTypeFId},
+            </if>
             <if test="fTFeeAgreementTypeFId != null">f_t_fee_agreement_type_f_id = #{fTFeeAgreementTypeFId},</if>
-            <if test="fTFeeAgreementFTypeParentId != null">f_t_fee_agreement_f_type_parent_id = #{fTFeeAgreementFTypeParentId},</if>
+            <if test="fTFeeAgreementFTypeParentId != null">f_t_fee_agreement_f_type_parent_id =
+                #{fTFeeAgreementFTypeParentId},
+            </if>
             <if test="fFeeItem != null">f_fee_item = #{fFeeItem},</if>
             <if test="fComputingMethod != null">f_computing_method = #{fComputingMethod},</if>
             <if test="fReceiptPaymentType != null">f_receipt_payment_type = #{fReceiptPaymentType},</if>
@@ -104,14 +133,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteTWarehouseFeeAgreementTypeBusinessById" parameterType="Long">
-        delete from t_warehouse_fee_agreement_type_business where f_id = #{fId}
+        delete
+        from t_warehouse_fee_agreement_type_business
+        where f_id = #{fId}
     </delete>
 
     <delete id="deleteTWarehouseFeeAgreementTypeBusinessByIds" parameterType="String">
-        delete from t_warehouse_fee_agreement_type_business where f_id in 
+        delete from t_warehouse_fee_agreement_type_business where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">
             #{fId}
         </foreach>
     </delete>
-    
+
 </mapper>

+ 37 - 3
ruoyi-warehouse/src/main/resources/mapper/feeagreement/TWarehouseFeeAgreementTypeMapper.xml

@@ -6,6 +6,7 @@
 
     <resultMap type="TWarehouseFeeAgreementType" id="TWarehouseFeeAgreementTypeResult">
         <result property="fId" column="f_id"/>
+        <result property="fName" column="f_name"/>
         <result property="fCorpId" column="f_corp_id"/>
         <result property="fTFeeAgreementTypeFId" column="f_t_fee_agreement_type_f_id"/>
         <result property="fBegindate" column="f_begindate"/>
@@ -16,12 +17,19 @@
         <result property="fUpdateBy" column="f_update_by"/>
         <result property="fUpdateTime" column="f_update_time"/>
         <result property="fDelFlag" column="f_del_flag"/>
+        <result property="fIsValid" column="f_is_valid"/>
+        <result property="fIsCommit" column="f_is_commit"/>
+        <result property="fIsStandard" column="f_is_standard"/>
+        <result property="fIsValidName" column="f_is_valid_name"/>
+        <result property="fIsCommitName" column="f_is_commit_name"/>
+        <result property="fIsStandardName" column="f_is_standard_name"/>
         <result property="fCorpName" column="f_corp_name"/>
         <result property="fTFeeAgreementTypeName" column="f_t_fee_agreement_type_name"/>
     </resultMap>
 
     <sql id="selectTWarehouseFeeAgreementTypeVo">
         select w.f_id,
+               w.f_name,
                w.f_corp_id,
                w.f_t_fee_agreement_type_f_id,
                w.f_begindate,
@@ -32,18 +40,28 @@
                w.f_update_by,
                w.f_update_time,
                w.f_del_flag,
-               c.f_name as f_corp_name,
-               f.f_name as f_t_fee_agreement_type_name
+               w.f_is_valid,
+               w.f_is_commit,
+               w.f_is_standard,
+               c.f_name            as f_corp_name,
+               f.f_name            as f_t_fee_agreement_type_name,
+               commit.dict_label   as f_is_commit_name,
+               standard.dict_label as f_is_standard_name,
+               valid.dict_label    as f_is_valid_name
         from t_warehouse_fee_agreement_type w
                  left join t_corps c on c.f_id = w.f_corp_id
                  left join t_fee_agreement_type f on f.f_id = w.f_t_fee_agreement_type_f_id
-
+                 left join sys_dict_data commit on commit.dict_type = 'sys_yes_no' and commit.dict_value = w.f_is_commit
+                 left join sys_dict_data standard
+                           on standard.dict_type = 'sys_yes_no' and standard.dict_value = w.f_is_standard
+                 left join sys_dict_data valid on valid.dict_type = 'sys_yes_no' and valid.dict_value = w.f_is_valid
     </sql>
 
     <select id="selectTWarehouseFeeAgreementTypeList" parameterType="TWarehouseFeeAgreementType"
             resultMap="TWarehouseFeeAgreementTypeResult">
         <include refid="selectTWarehouseFeeAgreementTypeVo"/>
         <where>
+            <if test="fName != null  and fName != ''">and w.f_name like concat('%', #{fName}, '%')</if>
             <if test="fCorpId != null ">and w.f_corp_id = #{fCorpId}</if>
             <if test="fTFeeAgreementTypeFId != null ">and w.f_t_fee_agreement_type_f_id = #{fTFeeAgreementTypeFId}</if>
             <if test="fBegindate != null ">and w.f_begindate = #{fBegindate}</if>
@@ -54,6 +72,10 @@
             <if test="fUpdateBy != null ">and w.f_update_by = #{fUpdateBy}</if>
             <if test="fUpdateTime != null ">and w.f_update_time = #{fUpdateTime}</if>
             <if test="fDelFlag != null ">and w.f_del_flag = #{fDelFlag}</if>
+            <if test="fIsValid != null  and fIsValid != ''">and w.f_is_valid = #{fIsValid}</if>
+            <if test="fIsCommit != null  and fIsCommit != ''">and w.f_is_commit = #{fIsCommit}</if>
+            <if test="fIsStandard != null  and fIsStandard != ''">and w.f_is_standard = #{fIsStandard}</if>
+            and w.f_del_flag = 0
         </where>
     </select>
 
@@ -66,6 +88,7 @@
             keyProperty="fId">
         insert into t_warehouse_fee_agreement_type
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fName != null">f_name,</if>
             <if test="fCorpId != null">f_corp_id,</if>
             <if test="fTFeeAgreementTypeFId != null">f_t_fee_agreement_type_f_id,</if>
             <if test="fBegindate != null">f_begindate,</if>
@@ -76,8 +99,12 @@
             <if test="fUpdateBy != null">f_update_by,</if>
             <if test="fUpdateTime != null">f_update_time,</if>
             <if test="fDelFlag != null">f_del_flag,</if>
+            <if test="fIsValid != null">f_is_valid,</if>
+            <if test="fIsCommit != null">f_is_commit,</if>
+            <if test="fIsStandard != null">f_is_standard,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fName != null">#{fName},</if>
             <if test="fCorpId != null">#{fCorpId},</if>
             <if test="fTFeeAgreementTypeFId != null">#{fTFeeAgreementTypeFId},</if>
             <if test="fBegindate != null">#{fBegindate},</if>
@@ -88,12 +115,16 @@
             <if test="fUpdateBy != null">#{fUpdateBy},</if>
             <if test="fUpdateTime != null">#{fUpdateTime},</if>
             <if test="fDelFlag != null">#{fDelFlag},</if>
+            <if test="fIsValid != null">#{fIsValid},</if>
+            <if test="fIsCommit != null">#{fIsCommit},</if>
+            <if test="fIsStandard != null">#{fIsStandard},</if>
         </trim>
     </insert>
 
     <update id="updateTWarehouseFeeAgreementType" parameterType="TWarehouseFeeAgreementType">
         update t_warehouse_fee_agreement_type
         <trim prefix="SET" suffixOverrides=",">
+            <if test="fName != null">f_name = #{fName},</if>
             <if test="fCorpId != null">f_corp_id = #{fCorpId},</if>
             <if test="fTFeeAgreementTypeFId != null">f_t_fee_agreement_type_f_id = #{fTFeeAgreementTypeFId},</if>
             <if test="fBegindate != null">f_begindate = #{fBegindate},</if>
@@ -104,6 +135,9 @@
             <if test="fUpdateBy != null">f_update_by = #{fUpdateBy},</if>
             <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
             <if test="fDelFlag != null">f_del_flag = #{fDelFlag},</if>
+            <if test="fIsValid != null">f_is_valid = #{fIsValid},</if>
+            <if test="fIsCommit != null">f_is_commit = #{fIsCommit},</if>
+            <if test="fIsStandard != null">f_is_standard = #{fIsStandard},</if>
         </trim>
         where f_id = #{fId}
     </update>

+ 57 - 27
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehouseAgreementMapper.xml

@@ -33,9 +33,32 @@
     </resultMap>
 
     <sql id="selectTWarehouseAgreementVo">
-        select f_id, f_billno,f_contractno, f_deptid, f_corpid,f_goodsid, f_stltypeid, f_feetypeid, t_packages, f_trademodeid,
-         f_freedays, f_begindate, f_enddate, f_billstatus,f_status, del_flag, create_by, create_time, update_by, update_time,
-          remark,f_task_type,f_dc,f_billtype,f_billtype_name from t_warehouse_agreement
+        select f_id,
+               f_billno,
+               f_contractno,
+               f_deptid,
+               f_corpid,
+               f_goodsid,
+               f_stltypeid,
+               f_feetypeid,
+               t_packages,
+               f_trademodeid,
+               f_freedays,
+               f_begindate,
+               f_enddate,
+               f_billstatus,
+               f_status,
+               del_flag,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark,
+               f_task_type,
+               f_dc,
+               f_billtype,
+               f_billtype_name
+        from t_warehouse_agreement
     </sql>
 
     <select id="selectTWarehouseAgreementList" parameterType="TWarehouseAgreement"
@@ -58,31 +81,33 @@
             <if test="fBillstatus != null  and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
             <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
             <if test="fBilltype != null  and fBilltype != ''">and f_billtype like concat('%', #{fBilltype}, '%')</if>
-            <if test="fBilltypeName != null  and fBilltypeName != ''">and f_billtype_name like concat('%', #{fBilltypeName}, '%')</if>
+            <if test="fBilltypeName != null  and fBilltypeName != ''">and f_billtype_name like concat('%',
+                #{fBilltypeName}, '%')
+            </if>
         </where>
     </select>
 
     <select id="selectTWarehouseAgreementList1" parameterType="TWarehouseAgreement"
-            resultType="Map" >
+            resultType="Map">
         SELECT DISTINCT
-                agre.f_id AS fId,
-                corp.f_name AS fCorpid,
-                agre.f_contractno AS fContractno,
-                goods.f_id AS fGoodsid,
-                goods.f_name AS fGoodsids,
-                agre.t_packages AS tPackages,
-                agre.f_begindate AS fBegindate,
-                agre.f_enddate AS fEnddate,
-                agre.f_feetypeid AS fFeetypeid,
-                agre.f_billstatus AS fBillstatus,
-                agre.f_status AS fStatus,
-                agre.f_task_type AS fTaskType,
-                agre.f_dc AS fDc,
-                agre.f_billtype_name AS fBilltypeName
-            FROM
-                t_warehouse_agreement agre
-                LEFT JOIN t_corps corp ON corp.f_id = agre.f_corpid
-                LEFT JOIN t_goods goods ON goods.f_id = agre.f_goodsid
+        agre.f_id AS fId,
+        corp.f_name AS fCorpid,
+        agre.f_contractno AS fContractno,
+        goods.f_id AS fGoodsid,
+        goods.f_name AS fGoodsids,
+        agre.t_packages AS tPackages,
+        agre.f_begindate AS fBegindate,
+        agre.f_enddate AS fEnddate,
+        agre.f_feetypeid AS fFeetypeid,
+        agre.f_billstatus AS fBillstatus,
+        agre.f_status AS fStatus,
+        agre.f_task_type AS fTaskType,
+        agre.f_dc AS fDc,
+        agre.f_billtype_name AS fBilltypeName
+        FROM
+        t_warehouse_agreement agre
+        LEFT JOIN t_corps corp ON corp.f_id = agre.f_corpid
+        LEFT JOIN t_goods goods ON goods.f_id = agre.f_goodsid
         <where>
             <if test="fBillno != null  and fBillno != ''">and agre.f_billno = #{fBillno}</if>
             <if test="fContractno != null  and fContractno != ''">and agre.f_contractno = #{fContractno}</if>
@@ -100,8 +125,11 @@
             <if test="fEnddate != null ">and agre.f_enddate = #{fEnddate}</if>
             <if test="fBillstatus != null  and fBillstatus != ''">and agre.f_billstatus = #{fBillstatus}</if>
             <if test="fStatus != null  and fStatus != ''">and agre.f_status = #{fStatus}</if>
-            <if test="fBilltype != null  and fBilltype != ''">and agre.f_billtype like concat('%', #{fBilltype}, '%')</if>
-            <if test="fBilltypeName != null  and fBilltypeName != ''">and agre.f_billtype_name like concat('%', #{fBilltypeName}, '%')</if>
+            <if test="fBilltype != null  and fBilltype != ''">and agre.f_billtype like concat('%', #{fBilltype}, '%')
+            </if>
+            <if test="fBilltypeName != null  and fBilltypeName != ''">and agre.f_billtype_name like concat('%',
+                #{fBilltypeName}, '%')
+            </if>
         </where>
     </select>
 
@@ -199,7 +227,9 @@
     </update>
 
     <delete id="deleteTWarehouseAgreementById" parameterType="Long">
-        delete from t_warehouse_agreement where f_id = #{fId}
+        delete
+        from t_warehouse_agreement
+        where f_id = #{fId}
     </delete>
 
     <delete id="deleteTWarehouseAgreementByIds" parameterType="String">
@@ -207,7 +237,7 @@
         w.*,
         wa.*
         from
-             t_warehouse_agreement  w
+        t_warehouse_agreement w
         LEFT JOIN t_warehouse_agreementitems wa ON wa.f_pid = w.f_id
         where w.f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">