Merge branch 'master-fwq-退费统计' into master-prod-new
| | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <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> |
| | | |
| | |
| | | <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" > |
| | |
| | | |
| | | <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> |
| | |
| | | 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) { |
| | |
| | | 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); |
| | |
| | | refundRecord.setOperatorNo(employee.getEmployeeNo()); |
| | | refundRecord.setOperatorName(employee.getCnName()); |
| | | refundRecord.setRefundIntegral(orderRefundDto.getRefundIntegral()); |
| | | refundRecord.setRefundStatistics(orderRefundDto.getRefundStatistics()); |
| | | |
| | | refundRecord.setRefundOperationType(orderRefundDto.getRefundOperationType()); |
| | | /////退款的备注 |
| | |
| | | |
| | | orderPartRefundDto.setOrdersTotalDto(ordersTotalDto);//填充主订单信息 |
| | | |
| | | |
| | | orderPartRefundDto.setRefundStatistics(refundRecord.getRefundStatistics()); |
| | | //填充操作人,用户的基本信息 |
| | | orderPartRefundDto.setOrdersTotalDto(ordersTotalDto); |
| | | orderPartRefundDto.setOperatorId(cancelOrder.getOperatorId()); |