From 36304ec32986dc5873992a84391769c0d4be1f3e Mon Sep 17 00:00:00 2001
From: fwq <582742538@qq.com>
Date: 星期一, 04 三月 2024 10:22:07 +0800
Subject: [PATCH] Merge branch 'master-fwq-退费统计' into master-prod-new

---
 phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java |    3 ++-
 phi_platform_common/src/main/resources/mapper/platform/RefundRecordMapper.xml              |   10 +++++-----
 phi_platform_user/src/main/java/com/hx/phip/controller/refund/OrderRefundController.java   |    7 +++++++
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/phi_platform_common/src/main/resources/mapper/platform/RefundRecordMapper.xml b/phi_platform_common/src/main/resources/mapper/platform/RefundRecordMapper.xml
index 848a6d2..aa5d636 100644
--- a/phi_platform_common/src/main/resources/mapper/platform/RefundRecordMapper.xml
+++ b/phi_platform_common/src/main/resources/mapper/platform/RefundRecordMapper.xml
@@ -8,7 +8,7 @@
 	<!-- 鏁翠釜瀹炰綋绫讳慨鏀癸紝琛ㄥ瓧娈�=瀹炰綋绫诲瓧娈�-->
 	<sql id="Update_Column_All">
 		<trim prefixOverrides=",">
-			,code = #{code},sealStatus = #{sealStatus},refundOperationType = #{refundOperationType},refundType = #{refundType},refundStatus = #{refundStatus},refundShopId = #{refundShopId},refundShopNo = #{refundShopNo},refundShopName = #{refundShopName},refundTotal = #{refundTotal},refundIntegral = #{refundIntegral},realRefundTotal = #{realRefundTotal},realRefundIntegral = #{realRefundIntegral},deductionTotal = #{deductionTotal},cashTotal = #{cashTotal},cashPurenessTotal = #{cashPurenessTotal},rechargeTotal = #{rechargeTotal},incrementTotal = #{incrementTotal},payee = #{payee},openBank = #{openBank},openBranch = #{openBranch},account = #{account},confirmStatus = #{confirmStatus},confirmId = #{confirmId},confirmNo = #{confirmNo},confirmName = #{confirmName},confirmRoleNo = #{confirmRoleNo},confirmRoleName = #{confirmRoleName},confirmCancel = #{confirmCancel},confirmCancelId = #{confirmCancelId},confirmCancelNo = #{confirmCancelNo},confirmCancelName = #{confirmCancelName},confirmCancelRoleNo = #{confirmCancelRoleNo},confirmCancelRoleName = #{confirmCancelRoleName},refundReason = #{refundReason},remarks = #{remarks},sourceType = #{sourceType},sourceAssistantType = #{sourceAssistantType},orderId = #{orderId},userId = #{userId},operatorType = #{operatorType},operatorId = #{operatorId},operatorNo = #{operatorNo},operatorName = #{operatorName},operatorAppId = #{operatorAppId},operatorAppCode = #{operatorAppCode},operatorAppName = #{operatorAppName},invalidTime = #{invalidTime},invalidType = #{invalidType},invalidId = #{invalidId},invalidNo = #{invalidNo},invalidName = #{invalidName},invalidRoleNo = #{invalidRoleNo},invalidRoleName = #{invalidRoleName},invalidAppId = #{invalidAppId},invalidAppCode = #{invalidAppCode},invalidAppName = #{invalidAppName},invalidRemarks = #{invalidRemarks},addTime = #{addTime},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
+			,code = #{code},sealStatus = #{sealStatus},refundOperationType = #{refundOperationType},refundType = #{refundType},refundStatus = #{refundStatus},refundStatistics = #{refundStatistics},refundShopId = #{refundShopId},refundShopNo = #{refundShopNo},refundShopName = #{refundShopName},refundTotal = #{refundTotal},refundIntegral = #{refundIntegral},realRefundTotal = #{realRefundTotal},realRefundIntegral = #{realRefundIntegral},deductionTotal = #{deductionTotal},cashTotal = #{cashTotal},cashPurenessTotal = #{cashPurenessTotal},rechargeTotal = #{rechargeTotal},incrementTotal = #{incrementTotal},payee = #{payee},openBank = #{openBank},openBranch = #{openBranch},account = #{account},confirmStatus = #{confirmStatus},confirmId = #{confirmId},confirmNo = #{confirmNo},confirmName = #{confirmName},confirmRoleNo = #{confirmRoleNo},confirmRoleName = #{confirmRoleName},confirmCancel = #{confirmCancel},confirmCancelId = #{confirmCancelId},confirmCancelNo = #{confirmCancelNo},confirmCancelName = #{confirmCancelName},confirmCancelRoleNo = #{confirmCancelRoleNo},confirmCancelRoleName = #{confirmCancelRoleName},refundReason = #{refundReason},remarks = #{remarks},sourceType = #{sourceType},sourceAssistantType = #{sourceAssistantType},orderId = #{orderId},userId = #{userId},operatorType = #{operatorType},operatorId = #{operatorId},operatorNo = #{operatorNo},operatorName = #{operatorName},operatorAppId = #{operatorAppId},operatorAppCode = #{operatorAppCode},operatorAppName = #{operatorAppName},invalidTime = #{invalidTime},invalidType = #{invalidType},invalidId = #{invalidId},invalidNo = #{invalidNo},invalidName = #{invalidName},invalidRoleNo = #{invalidRoleNo},invalidRoleName = #{invalidRoleName},invalidAppId = #{invalidAppId},invalidAppCode = #{invalidAppCode},invalidAppName = #{invalidAppName},invalidRemarks = #{invalidRemarks},addTime = #{addTime},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
 		</trim>
 	</sql>
 	 
@@ -19,11 +19,11 @@
 	    <selectKey keyProperty="id" resultType="String" order="BEFORE">
                select replace(uuid(),'-','') from dual
         </selectKey>
-        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
+        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundStatistics},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
 	</insert>
 
 	<insert id="insertById" parameterType="com.hx.phiappt.model.refund.RefundRecord">
-        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
+        insert into refund_record (id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime)  values (#{id},#{code},#{sealStatus},#{refundOperationType},#{refundType},#{refundStatus},#{refundStatistics},#{refundShopId},#{refundShopNo},#{refundShopName},#{refundTotal},#{refundIntegral},#{realRefundTotal},#{realRefundIntegral},#{deductionTotal},#{cashTotal},#{cashPurenessTotal},#{rechargeTotal},#{incrementTotal},#{payee},#{openBank},#{openBranch},#{account},#{confirmStatus},#{confirmId},#{confirmNo},#{confirmName},#{confirmRoleNo},#{confirmRoleName},#{confirmCancel},#{confirmCancelId},#{confirmCancelNo},#{confirmCancelName},#{confirmCancelRoleNo},#{confirmCancelRoleName},#{refundReason},#{remarks},#{sourceType},#{sourceAssistantType},#{orderId},#{userId},#{operatorType},#{operatorId},#{operatorNo},#{operatorName},#{operatorAppId},#{operatorAppCode},#{operatorAppName},#{invalidTime},#{invalidType},#{invalidId},#{invalidNo},#{invalidName},#{invalidRoleNo},#{invalidRoleName},#{invalidAppId},#{invalidAppCode},#{invalidAppName},#{invalidRemarks},#{addTime},#{isDel},#{createTime},#{editTime})
     </insert>
 
 	<select id="selectList" resultType="com.hx.phiappt.model.refund.RefundRecord" parameterType="com.hx.mybatisTool.SqlSentence" >
@@ -55,14 +55,14 @@
 
 	<select id="selectOneByKey" resultType="com.hx.phiappt.model.refund.RefundRecord" parameterType="java.lang.Object" >
 		select 
-			id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
+			id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
 		from refund_record
 		WHERE id = #{value}
 	</select>
 
 	<select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.refund.RefundRecord" parameterType="java.lang.Object" >
 		select 
-			id,code,sealStatus,refundOperationType,refundType,refundStatus,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
+			id,code,sealStatus,refundOperationType,refundType,refundStatus,refundStatistics,refundShopId,refundShopNo,refundShopName,refundTotal,refundIntegral,realRefundTotal,realRefundIntegral,deductionTotal,cashTotal,cashPurenessTotal,rechargeTotal,incrementTotal,payee,openBank,openBranch,account,confirmStatus,confirmId,confirmNo,confirmName,confirmRoleNo,confirmRoleName,confirmCancel,confirmCancelId,confirmCancelNo,confirmCancelName,confirmCancelRoleNo,confirmCancelRoleName,refundReason,remarks,sourceType,sourceAssistantType,orderId,userId,operatorType,operatorId,operatorNo,operatorName,operatorAppId,operatorAppCode,operatorAppName,invalidTime,invalidType,invalidId,invalidNo,invalidName,invalidRoleNo,invalidRoleName,invalidAppId,invalidAppCode,invalidAppName,invalidRemarks,addTime,isDel,createTime,editTime
 		from refund_record
 		WHERE id = #{value}
 	</select>
diff --git a/phi_platform_user/src/main/java/com/hx/phip/controller/refund/OrderRefundController.java b/phi_platform_user/src/main/java/com/hx/phip/controller/refund/OrderRefundController.java
index f105982..cc41ce1 100644
--- a/phi_platform_user/src/main/java/com/hx/phip/controller/refund/OrderRefundController.java
+++ b/phi_platform_user/src/main/java/com/hx/phip/controller/refund/OrderRefundController.java
@@ -184,6 +184,9 @@
         if(orderRefundDto.getIsRefund() == null){
             throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"鏄惁鑷姩鐢熸垚閫�娆惧崟涓嶈兘涓虹┖");
         }
+        if(orderRefundDto.getRefundStatistics() == null){
+            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"閫�娆剧粺璁$被鍨嬩笉鑳戒负绌�!");
+        }
 
         OrdersTotal ordersTotal = ordersTotalService.selectOneByKey(orderRefundDto.getOrderId());
         if (ordersTotal == null) {
@@ -223,6 +226,10 @@
         if(orderRefundDto.getIsRefund()==null){
             throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"鏄惁鑷姩鐢熸垚閫�娆惧崟涓嶈兘涓虹┖");
         }
+        if(orderRefundDto.getRefundStatistics() == null){
+            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"閫�娆剧粺璁$被鍨嬩笉鑳戒负绌�!");
+        }
+
         SqlSentence sqlSentence = new SqlSentence();
         Map<String, Object> sqlMap = new HashMap<>();
         sqlSentence.setM(sqlMap);
diff --git a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
index 21d8d6e..f10a9df 100644
--- a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
+++ b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java
@@ -982,6 +982,7 @@
         refundRecord.setOperatorNo(employee.getEmployeeNo());
         refundRecord.setOperatorName(employee.getCnName());
         refundRecord.setRefundIntegral(orderRefundDto.getRefundIntegral());
+        refundRecord.setRefundStatistics(orderRefundDto.getRefundStatistics());
 
         refundRecord.setRefundOperationType(orderRefundDto.getRefundOperationType());
         /////閫�娆剧殑澶囨敞
@@ -1271,7 +1272,7 @@
 
         orderPartRefundDto.setOrdersTotalDto(ordersTotalDto);//濉厖涓昏鍗曚俊鎭�
 
-
+        orderPartRefundDto.setRefundStatistics(refundRecord.getRefundStatistics());
         //濉厖鎿嶄綔浜猴紝鐢ㄦ埛鐨勫熀鏈俊鎭�
         orderPartRefundDto.setOrdersTotalDto(ordersTotalDto);
         orderPartRefundDto.setOperatorId(cancelOrder.getOperatorId());

--
Gitblit v1.8.0