From de17f911865ad0c3a52754140828db92c9e62e46 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期一, 22 十二月 2025 15:57:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master
---
service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeManagementServiceImpl.java | 44 +++
service/src/main/java/com/ruoyi/cwgl/service/impl/PayableFeeManagementServiceImpl.java | 13 +
service/src/main/resources/mapper/cwgl/ReceivableFeeDetailMapper.xml | 4
service/src/main/java/com/ruoyi/cwgl/service/IReceivableFeeDetailService.java | 10
service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeDetailServiceImpl.java | 403 +++++++++++++++++----------------
common/src/main/java/com/ruoyi/common/enums/SystemDataNoEnum.java | 2
service/src/main/java/com/ruoyi/cwgl/mapper/ReceivableFeeDetailMapper.java | 198 ++++++++-------
7 files changed, 374 insertions(+), 300 deletions(-)
diff --git a/common/src/main/java/com/ruoyi/common/enums/SystemDataNoEnum.java b/common/src/main/java/com/ruoyi/common/enums/SystemDataNoEnum.java
index 80c02e0..460d2ff 100644
--- a/common/src/main/java/com/ruoyi/common/enums/SystemDataNoEnum.java
+++ b/common/src/main/java/com/ruoyi/common/enums/SystemDataNoEnum.java
@@ -21,6 +21,8 @@
DL("DL","DL","璋冨害缂栧彿"),
YF("YF","YF","搴斾粯缂栧彿"),
YS("YS","YS","搴旀敹缂栧彿"),
+ YSZD("YSZD","YSZD","搴旀敹璐﹀崟缂栧彿"),
+ YFZD("YFZD","YFZD","搴斾粯璐﹀崟缂栧彿"),
YFD("YFD","YFD","搴斾粯璇︽儏缂栧彿"),
YSD("YSD","YSD","搴旀敹璇︽儏缂栧彿"),
OF("OF","OF","鍏朵粬璐﹀崟缂栧彿"),
diff --git a/service/src/main/java/com/ruoyi/cwgl/mapper/ReceivableFeeDetailMapper.java b/service/src/main/java/com/ruoyi/cwgl/mapper/ReceivableFeeDetailMapper.java
index 741fac3..73948ff 100644
--- a/service/src/main/java/com/ruoyi/cwgl/mapper/ReceivableFeeDetailMapper.java
+++ b/service/src/main/java/com/ruoyi/cwgl/mapper/ReceivableFeeDetailMapper.java
@@ -1,95 +1,103 @@
-package com.ruoyi.cwgl.mapper;
-
-import java.util.List;
-import com.ruoyi.cwgl.domain.ReceivableFeeDetail;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-
-/**
- * 搴旀敹璐圭敤鏄庣粏Mapper鎺ュ彛
- *
- * @author ruoyi
- * @date 2025-12-17
- */
-public interface ReceivableFeeDetailMapper extends BaseMapper<ReceivableFeeDetail>
-{
- /**
- * 鏌ヨ搴旀敹璐圭敤鏄庣粏
- *
- * @param id 搴旀敹璐圭敤鏄庣粏ID
- * @return 搴旀敹璐圭敤鏄庣粏
- */
- public ReceivableFeeDetail selectReceivableFeeDetailById(Integer id);
-
- /**
- * 鏌ヨ搴旀敹璐圭敤鏄庣粏 璁板綍鏁�
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
- */
- public int selectReceivableFeeDetailCount(ReceivableFeeDetail receivableFeeDetail);
-
- /**
- * 鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
- */
- public List<ReceivableFeeDetail> selectReceivableFeeDetailList(ReceivableFeeDetail receivableFeeDetail);
-
- /**
- * 鏂板搴旀敹璐圭敤鏄庣粏
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- public int insertReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail);
-
- /**
- * 鏂板搴旀敹璐圭敤鏄庣粏[鎵归噺]
- *
- * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- public int insertReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails);
-
- /**
- * 淇敼搴旀敹璐圭敤鏄庣粏
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- public int updateReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail);
-
- /**
- * 淇敼搴旀敹璐圭敤鏄庣粏[鎵归噺]
- *
- * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- public int updateReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails);
-
- /**
- * 鍒犻櫎搴旀敹璐圭敤鏄庣粏
- *
- * @param id 搴旀敹璐圭敤鏄庣粏ID
- * @return 缁撴灉
- */
- public int deleteReceivableFeeDetailById(Integer id);
-
- /**
- * 鎵归噺鍒犻櫎搴旀敹璐圭敤鏄庣粏
- *
- * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
- * @return 缁撴灉
- */
- public int deleteReceivableFeeDetailByIds(Integer[] ids);
-
- /**
- * 鏍规嵁搴旀敹璐圭敤ID鏁扮粍鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
- *
- * @param receivableFeeIds 搴旀敹璐圭敤ID鏁扮粍
- * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
- */
- public List<ReceivableFeeDetail> selectReceivableFeeDetailByReceivableFeeIds(Integer[] receivableFeeIds);
-}
+package com.ruoyi.cwgl.mapper;
+
+import java.util.List;
+import com.ruoyi.cwgl.domain.ReceivableFeeDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+
+/**
+ * 搴旀敹璐圭敤鏄庣粏Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2025-12-17
+ */
+public interface ReceivableFeeDetailMapper extends BaseMapper<ReceivableFeeDetail>
+{
+ /**
+ * 鏌ヨ搴旀敹璐圭敤鏄庣粏
+ *
+ * @param id 搴旀敹璐圭敤鏄庣粏ID
+ * @return 搴旀敹璐圭敤鏄庣粏
+ */
+ public ReceivableFeeDetail selectReceivableFeeDetailById(Integer id);
+
+ /**
+ * 鏌ヨ搴旀敹璐圭敤鏄庣粏 璁板綍鏁�
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
+ */
+ public int selectReceivableFeeDetailCount(ReceivableFeeDetail receivableFeeDetail);
+
+ /**
+ * 鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
+ */
+ public List<ReceivableFeeDetail> selectReceivableFeeDetailList(ReceivableFeeDetail receivableFeeDetail);
+
+ /**
+ * 鏂板搴旀敹璐圭敤鏄庣粏
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ public int insertReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail);
+
+ /**
+ * 鏂板搴旀敹璐圭敤鏄庣粏[鎵归噺]
+ *
+ * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ public int insertReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails);
+
+ /**
+ * 淇敼搴旀敹璐圭敤鏄庣粏
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ public int updateReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail);
+
+ /**
+ * 淇敼搴旀敹璐圭敤鏄庣粏[鎵归噺]
+ *
+ * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ public int updateReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails);
+
+ /**
+ * 鍒犻櫎搴旀敹璐圭敤鏄庣粏
+ *
+ * @param id 搴旀敹璐圭敤鏄庣粏ID
+ * @return 缁撴灉
+ */
+ public int deleteReceivableFeeDetailById(Integer id);
+
+ /**
+ * 鎵归噺鍒犻櫎搴旀敹璐圭敤鏄庣粏
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
+ * @return 缁撴灉
+ */
+ public int deleteReceivableFeeDetailByIds(Integer[] ids);
+
+ /**
+ * 鏍规嵁搴旀敹璐圭敤ID鍒犻櫎搴旀敹璐圭敤鏄庣粏
+ *
+ * @param receivableFeeId 搴旀敹璐圭敤ID
+ * @return 缁撴灉
+ */
+ public int deleteReceivableFeeDetailByReceivableFeeId(Integer receivableFeeId);
+
+ /**
+ * 鏍规嵁搴旀敹璐圭敤ID鏁扮粍鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
+ *
+ * @param receivableFeeIds 搴旀敹璐圭敤ID鏁扮粍
+ * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
+ */
+ public List<ReceivableFeeDetail> selectReceivableFeeDetailByReceivableFeeIds(Integer[] receivableFeeIds);
+}
\ No newline at end of file
diff --git a/service/src/main/java/com/ruoyi/cwgl/service/IReceivableFeeDetailService.java b/service/src/main/java/com/ruoyi/cwgl/service/IReceivableFeeDetailService.java
index 4fdeb99..c4001c1 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/IReceivableFeeDetailService.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/IReceivableFeeDetailService.java
@@ -101,10 +101,18 @@
public int deleteReceivableFeeDetailById(Integer id);
/**
+ * 鏍规嵁搴旀敹璐圭敤ID鍒犻櫎搴旀敹璐圭敤鏄庣粏
+ *
+ * @param receivableFeeId 搴旀敹璐圭敤ID
+ * @return 缁撴灉
+ */
+ public int deleteReceivableFeeDetailByReceivableFeeId(Integer receivableFeeId);
+
+ /**
* 鏍规嵁搴旀敹璐圭敤ID鏁扮粍鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
*
* @param receivableFeeIds 搴旀敹璐圭敤ID鏁扮粍
* @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
*/
public List<ReceivableFeeDetail> selectReceivableFeeDetailByReceivableFeeIds(Integer[] receivableFeeIds);
-}
+}
\ No newline at end of file
diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/PayableFeeManagementServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/PayableFeeManagementServiceImpl.java
index b45b7d3..666403f 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/impl/PayableFeeManagementServiceImpl.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/PayableFeeManagementServiceImpl.java
@@ -17,6 +17,7 @@
import com.ruoyi.cwgl.mapper.PayableFeeManagementMapper;
import com.ruoyi.cwgl.domain.PayableFeeManagement;
+import com.ruoyi.cwgl.domain.PayableFeeDetail;
import com.ruoyi.cwgl.service.IPayableFeeManagementService;
import com.ruoyi.cwgl.service.IPayableFeeDetailService;
import com.ruoyi.common.core.text.Convert;
@@ -49,7 +50,15 @@
@Override
public PayableFeeManagement selectPayableFeeManagementById(Integer id)
{
- return payableFeeManagementMapper.selectPayableFeeManagementById(id);
+ PayableFeeManagement payableFeeManagement = payableFeeManagementMapper.selectPayableFeeManagementById(id);
+ if (payableFeeManagement != null) {
+ // 鏌ヨ瀵瑰簲鐨勮垂鐢ㄦ槑缁�
+ PayableFeeDetail detail = new PayableFeeDetail();
+ detail.setPayableFeeId(id);
+ List<PayableFeeDetail> detailList = payableFeeDetailService.selectPayableFeeDetailList(detail);
+ payableFeeManagement.setPayableFeeDetailList(detailList);
+ }
+ return payableFeeManagement;
}
/**
@@ -198,3 +207,5 @@
return payableFeeManagementMapper.deletePayableFeeManagementById(id);
}
}
+
+
diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeDetailServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeDetailServiceImpl.java
index c9886ff..115320a 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeDetailServiceImpl.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeDetailServiceImpl.java
@@ -1,195 +1,208 @@
-package com.ruoyi.cwgl.service.impl;
-
-import java.util.List;
-
-import com.ruoyi.common.utils.DateUtils;
-import javax.annotation.Resource;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.stereotype.Service;
-import org.springframework.scheduling.annotation.Async;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import com.ruoyi.common.utils.PageUtils;
-import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.annotation.DataSource;
-import com.ruoyi.common.enums.DataSourceType;
-import com.ruoyi.common.core.service.BaseService;
-
-import com.ruoyi.cwgl.mapper.ReceivableFeeDetailMapper;
-import com.ruoyi.cwgl.domain.ReceivableFeeDetail;
-import com.ruoyi.cwgl.service.IReceivableFeeDetailService;
-import com.ruoyi.common.core.text.Convert;
-
-/**
- * 搴旀敹璐圭敤鏄庣粏Service涓氬姟灞傚鐞�
- *
- * @author ruoyi
- * @date 2025-12-17
- */
-@Service
-@Transactional(rollbackFor = Exception.class)
-public class ReceivableFeeDetailServiceImpl extends BaseService<ReceivableFeeDetailMapper, ReceivableFeeDetail> implements IReceivableFeeDetailService
-{
- protected final Logger logger = LoggerFactory.getLogger(getClass());
- @Resource
- private ReceivableFeeDetailMapper receivableFeeDetailMapper;
-
-
- /**
- * 鏌ヨ搴旀敹璐圭敤鏄庣粏
- *
- * @param id 搴旀敹璐圭敤鏄庣粏ID
- * @return 搴旀敹璐圭敤鏄庣粏
- */
- @DataSource(DataSourceType.SLAVE)
- @Override
- public ReceivableFeeDetail selectReceivableFeeDetailById(Integer id)
- {
- return receivableFeeDetailMapper.selectReceivableFeeDetailById(id);
- }
-
- /**
- * 鏌ヨ搴旀敹璐圭敤鏄庣粏 璁板綍鏁�
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
- */
- @DataSource(DataSourceType.SLAVE)
- @Override
- public int selectReceivableFeeDetailCount(ReceivableFeeDetail receivableFeeDetail)
- {
- return receivableFeeDetailMapper.selectReceivableFeeDetailCount(receivableFeeDetail);
- }
-
- /**
- * 鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 搴旀敹璐圭敤鏄庣粏
- */
- @DataSource(DataSourceType.SLAVE)
- @Override
- public List<ReceivableFeeDetail> selectReceivableFeeDetailList(ReceivableFeeDetail receivableFeeDetail)
- {
- return receivableFeeDetailMapper.selectReceivableFeeDetailList(receivableFeeDetail);
- }
-
- /**
- * 鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃 寮傛 瀵煎嚭
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑
- * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
- */
- @DataSource(DataSourceType.SLAVE)
- @Async
- @Override
- public void export(ReceivableFeeDetail receivableFeeDetail,String exportKey) {
-
- super.export(ReceivableFeeDetail.class,exportKey,"receivableFeeDetailData",(pageNum)->{
- PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
- return selectReceivableFeeDetailList(receivableFeeDetail);
- });
- }
-
-
- /**
- * 鏂板搴旀敹璐圭敤鏄庣粏
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- @Override
- public int insertReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail)
- {
- receivableFeeDetail.setCreateTime(DateUtils.getNowDate());
- return receivableFeeDetailMapper.insertReceivableFeeDetail(receivableFeeDetail);
- }
-
- /**
- * 鏂板搴旀敹璐圭敤鏄庣粏[鎵归噺]
- *
- * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- @Override
- public int insertReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails)
- {
- int rows = receivableFeeDetailMapper.insertReceivableFeeDetailBatch(receivableFeeDetails);
- return rows;
- }
-
- /**
- * 淇敼搴旀敹璐圭敤鏄庣粏
- *
- * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- @Override
- public int updateReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail)
- {
- receivableFeeDetail.setUpdateTime(DateUtils.getNowDate());
- return receivableFeeDetailMapper.updateReceivableFeeDetail(receivableFeeDetail);
- }
-
- /**
- * 淇敼搴旀敹璐圭敤鏄庣粏[鎵归噺]
- *
- * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
- * @return 缁撴灉
- */
- @Override
- public int updateReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails){
- return receivableFeeDetailMapper.updateReceivableFeeDetailBatch(receivableFeeDetails);
- }
-
- /**
- * 鍒犻櫎搴旀敹璐圭敤鏄庣粏瀵硅薄
- *
- * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
- * @return 缁撴灉
- */
- @Override
- public int deleteReceivableFeeDetailByIds(String ids)
- {
- return deleteReceivableFeeDetailByIds(Convert.toIntArray(ids));
- }
-
- /**
- * 鍒犻櫎搴旀敹璐圭敤鏄庣粏瀵硅薄
- *
- *
- * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
- * @return 缁撴灉
- */
- @Override
- public int deleteReceivableFeeDetailByIds(Integer[] ids)
- {
- return receivableFeeDetailMapper.deleteReceivableFeeDetailByIds(ids);
- }
-
- /**
- * 鍒犻櫎搴旀敹璐圭敤鏄庣粏淇℃伅
- *
- * @param id 搴旀敹璐圭敤鏄庣粏ID
- * @return 缁撴灉
- */
- @Override
- public int deleteReceivableFeeDetailById(Integer id)
- {
- return receivableFeeDetailMapper.deleteReceivableFeeDetailById(id);
- }
-
- /**
- * 鏍规嵁搴旀敹璐圭敤ID鏁扮粍鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
- *
- * @param receivableFeeIds 搴旀敹璐圭敤ID鏁扮粍
- * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
- */
- @DataSource(DataSourceType.SLAVE)
- @Override
- public List<ReceivableFeeDetail> selectReceivableFeeDetailByReceivableFeeIds(Integer[] receivableFeeIds)
- {
- return receivableFeeDetailMapper.selectReceivableFeeDetailByReceivableFeeIds(receivableFeeIds);
- }
-}
+package com.ruoyi.cwgl.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.DateUtils;
+import javax.annotation.Resource;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.stereotype.Service;
+import org.springframework.scheduling.annotation.Async;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.ruoyi.common.utils.PageUtils;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
+import com.ruoyi.common.core.service.BaseService;
+
+import com.ruoyi.cwgl.mapper.ReceivableFeeDetailMapper;
+import com.ruoyi.cwgl.domain.ReceivableFeeDetail;
+import com.ruoyi.cwgl.service.IReceivableFeeDetailService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 搴旀敹璐圭敤鏄庣粏Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2025-12-17
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class ReceivableFeeDetailServiceImpl extends BaseService<ReceivableFeeDetailMapper, ReceivableFeeDetail> implements IReceivableFeeDetailService
+{
+ protected final Logger logger = LoggerFactory.getLogger(getClass());
+ @Resource
+ private ReceivableFeeDetailMapper receivableFeeDetailMapper;
+
+
+ /**
+ * 鏌ヨ搴旀敹璐圭敤鏄庣粏
+ *
+ * @param id 搴旀敹璐圭敤鏄庣粏ID
+ * @return 搴旀敹璐圭敤鏄庣粏
+ */
+ @DataSource(DataSourceType.SLAVE)
+ @Override
+ public ReceivableFeeDetail selectReceivableFeeDetailById(Integer id)
+ {
+ return receivableFeeDetailMapper.selectReceivableFeeDetailById(id);
+ }
+
+ /**
+ * 鏌ヨ搴旀敹璐圭敤鏄庣粏 璁板綍鏁�
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
+ */
+ @DataSource(DataSourceType.SLAVE)
+ @Override
+ public int selectReceivableFeeDetailCount(ReceivableFeeDetail receivableFeeDetail)
+ {
+ return receivableFeeDetailMapper.selectReceivableFeeDetailCount(receivableFeeDetail);
+ }
+
+ /**
+ * 鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 搴旀敹璐圭敤鏄庣粏
+ */
+ @DataSource(DataSourceType.SLAVE)
+ @Override
+ public List<ReceivableFeeDetail> selectReceivableFeeDetailList(ReceivableFeeDetail receivableFeeDetail)
+ {
+ return receivableFeeDetailMapper.selectReceivableFeeDetailList(receivableFeeDetail);
+ }
+
+ /**
+ * 鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃 寮傛 瀵煎嚭
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑
+ * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
+ */
+ @DataSource(DataSourceType.SLAVE)
+ @Async
+ @Override
+ public void export(ReceivableFeeDetail receivableFeeDetail,String exportKey) {
+
+ super.export(ReceivableFeeDetail.class,exportKey,"receivableFeeDetailData",(pageNum)->{
+ PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
+ return selectReceivableFeeDetailList(receivableFeeDetail);
+ });
+ }
+
+
+ /**
+ * 鏂板搴旀敹璐圭敤鏄庣粏
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail)
+ {
+ receivableFeeDetail.setCreateTime(DateUtils.getNowDate());
+ return receivableFeeDetailMapper.insertReceivableFeeDetail(receivableFeeDetail);
+ }
+
+ /**
+ * 鏂板搴旀敹璐圭敤鏄庣粏[鎵归噺]
+ *
+ * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails)
+ {
+ int rows = receivableFeeDetailMapper.insertReceivableFeeDetailBatch(receivableFeeDetails);
+ return rows;
+ }
+
+ /**
+ * 淇敼搴旀敹璐圭敤鏄庣粏
+ *
+ * @param receivableFeeDetail 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateReceivableFeeDetail(ReceivableFeeDetail receivableFeeDetail)
+ {
+ receivableFeeDetail.setUpdateTime(DateUtils.getNowDate());
+ return receivableFeeDetailMapper.updateReceivableFeeDetail(receivableFeeDetail);
+ }
+
+ /**
+ * 淇敼搴旀敹璐圭敤鏄庣粏[鎵归噺]
+ *
+ * @param receivableFeeDetails 搴旀敹璐圭敤鏄庣粏
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateReceivableFeeDetailBatch(List<ReceivableFeeDetail> receivableFeeDetails){
+ return receivableFeeDetailMapper.updateReceivableFeeDetailBatch(receivableFeeDetails);
+ }
+
+ /**
+ * 鍒犻櫎搴旀敹璐圭敤鏄庣粏瀵硅薄
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteReceivableFeeDetailByIds(String ids)
+ {
+ return deleteReceivableFeeDetailByIds(Convert.toIntArray(ids));
+ }
+
+ /**
+ * 鍒犻櫎搴旀敹璐圭敤鏄庣粏瀵硅薄
+ *
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteReceivableFeeDetailByIds(Integer[] ids)
+ {
+ return receivableFeeDetailMapper.deleteReceivableFeeDetailByIds(ids);
+ }
+
+ /**
+ * 鍒犻櫎搴旀敹璐圭敤鏄庣粏淇℃伅
+ *
+ * @param id 搴旀敹璐圭敤鏄庣粏ID
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteReceivableFeeDetailById(Integer id)
+ {
+ return receivableFeeDetailMapper.deleteReceivableFeeDetailById(id);
+ }
+
+ /**
+ * 鏍规嵁搴旀敹璐圭敤ID鍒犻櫎搴旀敹璐圭敤鏄庣粏
+ *
+ * @param receivableFeeId 搴旀敹璐圭敤ID
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteReceivableFeeDetailByReceivableFeeId(Integer receivableFeeId)
+ {
+ return receivableFeeDetailMapper.deleteReceivableFeeDetailByReceivableFeeId(receivableFeeId);
+ }
+
+ /**
+ * 鏍规嵁搴旀敹璐圭敤ID鏁扮粍鏌ヨ搴旀敹璐圭敤鏄庣粏鍒楄〃
+ *
+ * @param receivableFeeIds 搴旀敹璐圭敤ID鏁扮粍
+ * @return 搴旀敹璐圭敤鏄庣粏闆嗗悎
+ */
+ @DataSource(DataSourceType.SLAVE)
+ @Override
+ public List<ReceivableFeeDetail> selectReceivableFeeDetailByReceivableFeeIds(Integer[] receivableFeeIds)
+ {
+ return receivableFeeDetailMapper.selectReceivableFeeDetailByReceivableFeeIds(receivableFeeIds);
+ }
+}
+
\ No newline at end of file
diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeManagementServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeManagementServiceImpl.java
index a5ed886..130c9ee 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeManagementServiceImpl.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableFeeManagementServiceImpl.java
@@ -78,7 +78,15 @@
@Override
public ReceivableFeeManagement selectReceivableFeeManagementById(Integer id)
{
- return receivableFeeManagementMapper.selectReceivableFeeManagementById(id);
+ ReceivableFeeManagement receivableFeeManagement = receivableFeeManagementMapper.selectReceivableFeeManagementById(id);
+ if (receivableFeeManagement != null) {
+ // 鏌ヨ瀵瑰簲鐨勮垂鐢ㄦ槑缁�
+ ReceivableFeeDetail detail = new ReceivableFeeDetail();
+ detail.setReceivableFeeId(id);
+ List<ReceivableFeeDetail> detailList = receivableFeeDetailService.selectReceivableFeeDetailList(detail);
+ receivableFeeManagement.setReceivableFeeDetailList(detailList);
+ }
+ return receivableFeeManagement;
}
/**
@@ -183,7 +191,29 @@
public int updateReceivableFeeManagement(ReceivableFeeManagement receivableFeeManagement)
{
receivableFeeManagement.setUpdateTime(DateUtils.getNowDate());
- return receivableFeeManagementMapper.updateReceivableFeeManagement(receivableFeeManagement);
+
+ // 1. 鏇存柊涓昏〃淇℃伅
+ int result = receivableFeeManagementMapper.updateReceivableFeeManagement(receivableFeeManagement);
+
+ // 2. 鑾峰彇涓昏〃ID
+ Integer receivableFeeId = receivableFeeManagement.getId();
+
+ // 3. 鍒犻櫎璇ュ簲鏀惰垂鐢ㄤ笅鐨勬墍鏈夌幇鏈夋槑缁�
+ receivableFeeDetailService.deleteReceivableFeeDetailByReceivableFeeId(receivableFeeId);
+
+ // 4. 鎵归噺淇濆瓨鏂扮殑鏄庣粏鍒楄〃
+ if (receivableFeeManagement.getReceivableFeeDetailList() != null && !receivableFeeManagement.getReceivableFeeDetailList().isEmpty()) {
+ // 璁剧疆姣忎釜鏄庣粏鐨勫簲鏀惰垂鐢ㄧ鐞咺D
+ receivableFeeManagement.getReceivableFeeDetailList().forEach(detail -> {
+ detail.setReceivableFeeId(receivableFeeId);
+ detail.setUpdateTime(DateUtils.getNowDate()); // 璁剧疆鏇存柊鏃堕棿
+ });
+
+ // 璋冪敤鎵归噺鎻掑叆鏂规硶
+ receivableFeeDetailService.insertReceivableFeeDetailBatch(receivableFeeManagement.getReceivableFeeDetailList());
+ }
+
+ return result;
}
/**
@@ -272,9 +302,7 @@
BigDecimal exchangeRate = new BigDecimal(sysConfig.getConfigValue());
BigDecimal totalAmountHkd = totalReceivableAmount.divide(exchangeRate, 2, RoundingMode.HALF_UP);
- // 鏌ヨ搴旀敹璐圭敤鏄庣粏
- List<ReceivableFeeDetail> detailList = receivableFeeDetailService.selectReceivableFeeDetailByReceivableFeeIds(ids);
-
+
// 缁勮杩斿洖缁撴灉
ReceivableFeeStatisticsVo result = new ReceivableFeeStatisticsVo();
result.setDocumentCount(documentCount);
@@ -282,7 +310,6 @@
result.setTotalReceivableAmount(totalReceivableAmount);
result.setTotalAmountRmb(totalReceivableAmount);
result.setTotalAmountHkd(totalAmountHkd);
- result.setDetailList(detailList);
result.setIds(ids);
return result;
@@ -304,7 +331,7 @@
ReceivableBillManagement billManagement = new ReceivableBillManagement();
billManagement.setDocumentCount(statisticsVo.getDocumentCount());
billManagement.setExchangeRate(statisticsVo.getRate());
- billManagement.setStatus("DRAFT"); // 榛樿鑽夌鐘舵��
+ billManagement.setStatus("0"); // 榛樿鑽夌鐘舵��
billManagement.setCreateTime(DateUtils.getNowDate());
// 3. 鏍规嵁璐﹀崟绫诲瀷璁剧疆甯佺鍜屾�婚噾棰�
@@ -319,7 +346,8 @@
} else {
throw new IllegalArgumentException("鏃犳晥鐨勮处鍗曠被鍨嬶細" + billType);
}
-
+ String noByKey = systemDataNoService.getNoByKey(SystemDataNoEnum.YSZD);
+ billManagement.setSystemNo(noByKey);
// 4. 淇濆瓨涓昏处鍗曡褰�
int i = receivableBillManagementService.insertReceivableBillManagement(billManagement);
diff --git a/service/src/main/resources/mapper/cwgl/ReceivableFeeDetailMapper.xml b/service/src/main/resources/mapper/cwgl/ReceivableFeeDetailMapper.xml
index 92fb11c..831533d 100644
--- a/service/src/main/resources/mapper/cwgl/ReceivableFeeDetailMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/ReceivableFeeDetailMapper.xml
@@ -172,6 +172,10 @@
<delete id="deleteReceivableFeeDetailById" parameterType="Integer">
delete from receivable_fee_detail where id = #{id}
</delete>
+ <!--鏍规嵁搴旀敹璐圭敤ID鍒犻櫎鏄庣粏-->
+ <delete id="deleteReceivableFeeDetailByReceivableFeeId" parameterType="Integer">
+ delete from receivable_fee_detail where receivable_fee_id = #{receivableFeeId}
+ </delete>
<delete id="deleteReceivableFeeDetailByIds" parameterType="Integer">
delete from receivable_fee_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
--
Gitblit v1.8.0