Browse Source

[CODE]: 财务模块、协议模块 删除查询 是否有明细数据存在,1 有 0 无

maxianghua 4 years ago
parent
commit
fb2c6f3581

+ 7 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/agreement/TWarehouseAgreementStorageController.java

@@ -99,6 +99,13 @@ public class TWarehouseAgreementStorageController extends BaseController {
         return toAjax(tWarehouseAgreementService.deleteTWarehouseAgreementByIds(fIds));
     }
 
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementStorage:remove')")
+    @Log(title = "仓储费", businessType = BusinessType.DELETE)
+    @DeleteMapping("/queryRemove/{fId}")
+    public AjaxResult queryRemove(@PathVariable("fId") Long fId) {
+        return toAjax(tWarehouseAgreementService.queryRemove(fId));
+    }
+
     /**
      *  仓储费请核
      */

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/agreement/TWarehouseAgreementTaskController.java

@@ -99,6 +99,14 @@ public class TWarehouseAgreementTaskController extends BaseController {
         return toAjax(tWarehouseAgreementService.deleteTWarehouseAgreementByIds(fIds));
     }
 
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementTask:remove')")
+    @Log(title = "仓储费", businessType = BusinessType.DELETE)
+    @DeleteMapping("/queryRemove/{fId}")
+    public AjaxResult queryRemove(@PathVariable("fId") Long fId) {
+        return toAjax(tWarehouseAgreementService.queryRemove(fId));
+    }
+
+
     /**
      *  仓储费请核
      */

+ 7 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TChargeController.java

@@ -101,6 +101,13 @@ public class TChargeController extends BaseController {
         return toAjax(tFeeService.deleteTFeeByIds(fIds));
     }
 
+    @PreAuthorize("@ss.hasPermi('finance:charge:remove')")
+    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
+    @DeleteMapping("/queryRemove/{fId}")
+    public AjaxResult queryRemove(@PathVariable("fId") Long fId) {
+        return toAjax(tFeeService.queryRemove(fId));
+    }
+
     /**
      *  收费查询
      */

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

@@ -101,6 +101,13 @@ public class TContrastController extends BaseController {
         return toAjax(tFeeService.deleteTFeeByIds(fIds));
     }
 
+    @PreAuthorize("@ss.hasPermi('finance:contrast:remove')")
+    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
+    @DeleteMapping("/queryRemove/{fId}")
+    public AjaxResult queryRemove(@PathVariable("fId") Long fId) {
+        return toAjax(tFeeService.queryRemove(fId));
+    }
+
     /**
      *  收费查询
      */

+ 7 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TPaymentController.java

@@ -101,6 +101,13 @@ public class TPaymentController extends BaseController {
         return toAjax(tFeeService.deleteTFeeByIds(fIds));
     }
 
+    @PreAuthorize("@ss.hasPermi('finance:payment:remove')")
+    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
+    @DeleteMapping("/queryRemove/{fId}")
+    public AjaxResult queryRemove(@PathVariable("fId") Long fId) {
+        return toAjax(tFeeService.queryRemove(fId));
+    }
+
     /**
      *  付费查询
      */

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/ITFeeService.java

@@ -94,4 +94,6 @@ public interface ITFeeService {
     public AjaxResult confirm(String tfee, String tfeeDo ,LoginUser loginUser,String fBilltype);
 
     public AjaxResult revoke(String tfee, String tfeeDo ,LoginUser loginUser,String fBilltype);
+
+    public int queryRemove(Long fId);
 }

+ 14 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -407,6 +407,20 @@ public class TFeeServiceImpl implements ITFeeService {
         return AjaxResult.success();
     }
 
+    @Override
+    public int queryRemove(Long fId) {
+        TFee tFee=tFeeMapper.selectTFeeById(fId);
+        // 查询从表数据
+        TFeeDo tFeeDo = new TFeeDo();
+        tFeeDo.setfPid(tFee.getfId());
+        List<TFeeDo> tFeeDoList=  tFeeDoMapper.selectTFeeDoList(tFeeDo);
+        if(tFeeDoList!=null && tFeeDoList.size()>0){
+            return 1;
+        }else{
+            return 0;
+        }
+    }
+
     /**
      *  更新费用明细
      * @param fid

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseAgreementService.java

@@ -68,4 +68,6 @@ public interface ITWarehouseAgreementService {
      * @return 结果
      */
     public int deleteTWarehouseAgreementById(Long fId);
+
+    public int queryRemove(Long fId);
 }

+ 14 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseAgreementServiceImpl.java

@@ -343,6 +343,20 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
         return tWarehouseAgreementMapper.deleteTWarehouseAgreementById(fId);
     }
 
+    @Override
+    public int queryRemove(Long fId) {
+        // 查询协议主表数据
+        TWarehouseAgreement tWarehouseAgreement = tWarehouseAgreementMapper.selectTWarehouseAgreementById(fId);
+        TWarehouseAgreementitems tWarehouseAgreementitems = new TWarehouseAgreementitems();
+        tWarehouseAgreementitems.setfPid(tWarehouseAgreement.getfId());
+        List<TWarehouseAgreementitems> tWarehouseAgreementitemss = tWarehouseAgreementitemsMapper.selectTWarehouseAgreementitemsList(tWarehouseAgreementitems);
+        if (StringUtils.isNotEmpty(tWarehouseAgreementitemss)) {
+            return 1;
+        }else{
+            return 0;
+        }
+    }
+
 
     /**
      * 计算存储费用