From edbfa6b1a3a45e79cb17b06f3798535c3b1ba395 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 18 十一月 2026 09:12:39 +0800
Subject: [PATCH] 修改了增值税城建税
---
ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 107 insertions(+), 3 deletions(-)
diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml
index e292570..f9c8be8 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml
@@ -33,6 +33,7 @@
<result property="deptmentname" column="DeptmentName"/>
<result property="opochecker" column="OPOchecker"/>
<result property="finvicepresident" column="FinVicePresident"/>
+ <result property="financechecher" column="FinanceChecher"/>
<result property="president" column="president"/>
<result property="busvicepresident" column="BusVicePresident"/>
<result property="officedirector" column="OfficeDirector"/>
@@ -50,6 +51,10 @@
<result property="uploadtime" column="uploadtime"/>
<result property="flowlevel" column="FlowLevel"/>
<result property="pretaxcost" column="PretaxCost"/>
+ <result property="vatCost" column="vat_cost"/>
+ <result property="cityTaxCost" column="city_tax_cost"/>
+ <result property="laborPretaxCost" column="labor_pretax_cost"/>
+ <result property="taxVersion" column="tax_version"/>
<result property="taxedcost" column="TaxedCost"/>
<result property="backflowlevel" column="backFlowLevel"/>
<result property="zffs" column="zffs"/>
@@ -57,13 +62,23 @@
<result property="bh" column="bh"/>
<result property="checkstatus" column="checkstatus"/>
<result property="performancetype" column="performancetype"/>
-
+ <result property="istax" column="istax"/>
+ <result property="fundtaxtime" column="fundtaxtime"/>
+ <result property="applyTime" column="apply_time"/>
+ <result property="applyTime" column="apply_time"/>
+ <result property="uploadStates" column="upload_states"/>
+ <result property="notes" column="notes"/>
+ <result property="jxrq" column="jxrq"/>
+ <result property="fundTaxId" column="fund_tax_id"/>
+ <result property="taxcost" column="TaxCost"/>
+ <result property="summaryId" column="summary_id"/>
</resultMap>
<sql id="selectServiceFundVo">
select ID,
InfoID,
DonorNo,
+ summary_id,
DonorName,
del_flag,
create_by,
@@ -76,6 +91,10 @@
UnitNo,
UnitUserNo,
PretaxCost,
+ vat_cost,
+ city_tax_cost,
+ labor_pretax_cost,
+ tax_version,
TaxedCost,
Phone,
AnnexBankCard,
@@ -113,7 +132,15 @@
riqi,
bh,
checkstatus,
- performancetype
+ performancetype,
+ istax,
+ apply_time,
+ fundtaxtime,
+ upload_states,
+ jxrq,
+ notes,
+ TaxCost,
+ fund_tax_id
from service_fund
</sql>
@@ -123,8 +150,13 @@
where del_flag = '0'
<if test="donorno != null and donorno != ''">and DonorNo = #{donorno}</if>
+ <!-- 2026-10-22锛氭姤閿�鍗曞垪琛ㄦ敮鎸佹寜"鎹愮尞鑰呭鍚�"妯$硦绛涢�夛紙浠呭湪浼犲�兼椂鐢熸晥锛屼笉褰卞搷鍏跺畠璋冪敤鏂癸級 -->
+ <if test="donorname != null and donorname != ''">and DonorName like concat('%', #{donorname}, '%')</if>
+ <if test="fundTaxId != null ">and fund_tax_id = #{fundTaxId}</if>
<if test="userno != null and userno != ''">and UserNo = #{userno}</if>
<if test="username != null and username != ''">and UserName like concat('%', #{username}, '%')</if>
+ <!-- 2026-11-10锛氫笟鍔$粍闀跨湅鏈粍锛堢敵璇蜂汉鎵�灞炰笟鍔$粍缂栧彿 = 鐧诲綍浜洪儴闂↖D锛� -->
+ <if test="deptmentno != null and deptmentno != ''">and DeptmentNo = #{deptmentno}</if>
<if test="applytype != null and applytype != ''">and ApplyType = #{applytype}</if>
<if test="deptmentname != null and deptmentname != ''">and DeptmentName like concat('%', #{deptmentname},
'%')
@@ -135,6 +167,8 @@
<if test="createBy != null and createBy != '' ">and create_by = #{createBy}</if>
<if test="infoid != null ">and InfoID = #{infoid}</if>
<if test="donorno != null and donorno != '' ">and DonorNo = #{donorno}</if>
+ <if test="jxrq != null ">and jxrq = #{jxrq}</if>
+ order by apply_time desc
</select>
<select id="getInfoByInfoId" resultType="com.ruoyi.project.domain.ServiceFund">
@@ -151,6 +185,7 @@
SELECT
`service_fund`.`ID` AS `id`,
`service_fund`.`InfoID` AS `infoid`,
+ `service_fund`.`summary_id` AS `summaryId`,
`service_fund`.`DonorNo` AS `donorno`,
`service_fund`.`DonorName` AS `donorname`,
`service_fund`.`UserNo` AS `userno`,
@@ -193,6 +228,8 @@
`service_fund`.`uploadtime` AS `uploadtime`,
`service_fund`.`PretaxCost` AS `pretaxcost`,
`service_fund`.`TaxedCost` AS `taxedcost`,
+ `service_fund`.`jxrq` AS `jxrq`,
+ `service_fund`.`fund_tax_id` AS `fundTaxId`,
`service_funddetail`.`ID` AS `fdid`,
`service_funddetail`.`fundID` AS `fundid`,
`service_funddetail`.`BeneficiaryName` AS `beneficiaryname`,
@@ -247,4 +284,71 @@
resultType="com.ruoyi.project.domain.vo.SpFinancialExpensesFundOut">
call SP_FINANCIAL_EXPENSES(#{PAUSERNO,mode=IN,jdbcType=VARCHAR},#{PAFUNDTYPE,mode=IN,jdbcType=INTEGER},#{PAAPPLICANT,mode=IN,jdbcType=VARCHAR},#{PAAPPLICATIONBEGTIME,mode=IN,jdbcType=VARCHAR},#{PAAPPLICATIONENDTIME,mode=IN,jdbcType=VARCHAR},#{PADEPARTMENT,mode=IN,jdbcType=VARCHAR},#{CHECKFLAG,mode=IN,jdbcType=INTEGER},#{APPLYTYPE,mode=IN,jdbcType=INTEGER},#{CHECKSTATUS,mode=IN,jdbcType=INTEGER},#{donorname,mode=IN,jdbcType=VARCHAR})
</select>
-</mapper>
\ No newline at end of file
+
+ <select id="getExpertfeeList" statementType="CALLABLE"
+ resultType="com.ruoyi.project.domain.vo.SpFinancialExpensesFundOut">
+ call SP_SELECT_EXPERTFEE(#{PAAPPLYTYPE,mode=IN,jdbcType=INTEGER},#{PFUNDTAXID,mode=IN,jdbcType=INTEGER},#{DONORNAME,mode=IN,jdbcType=VARCHAR},#{PADEPARTID,mode=IN,jdbcType=INTEGER},#{PAUSERNAME,mode=IN,jdbcType=VARCHAR})
+ </select>
+
+ <update id="updateFundTaxIdById">
+ update service_fund
+ <set>
+ fund_tax_id = #{fundTaxId},
+ fundtaxtime = null
+ </set>
+ where id = #{id}
+ </update>
+ <update id="updateFundIsTexById">
+ update service_fund
+ <set>
+ istax = #{isTax},
+ fundtaxtime = null
+ </set>
+ where id = #{id}
+ </update>
+
+ <!--
+ 涓撳璐规眹鎬诲崟鎵撳嵃锛氭寜銆屼笌瑙嗗浘 v_expertfee_expert 瀹屽叏鐩稿悓鐨勫垎缁勩�嶆眹鎬诲鍊肩◣ / 鍩庡缓绋� / 鍔冲姟绋庡墠銆�
+ 瑙嗗浘鐨� TaxAmount 宸插惈澧炲�肩◣+鍩庡缓绋庯紙2026-11-12 涓氬姟鏂逛慨鏀癸級锛屼唬鐮侀噷鍐嶆媶鍑哄姵鍔′釜绋庛��
+ 鍒嗙粍閿敤 CONCAT_WS 鐢熸垚锛屽繀椤讳笌 Java 鐨� expertGroupKey 椤哄簭涓�鑷达細
+ BeneficiaryName | IDCardNo | BankCardNo | DepositBank | UnitName
+ -->
+ <select id="selectTaxSumByBeneficiary" resultType="com.ruoyi.project.domain.vo.FundTaxAmountSum">
+ SELECT CONCAT_WS('|',
+ IFNULL(d.BeneficiaryName, ''),
+ IFNULL(d.IDCardNo, ''),
+ IFNULL(d.BankCardNo, ''),
+ IFNULL(d.DepositBank, ''),
+ IFNULL(d.UnitName, '')) AS groupKey,
+ SUM(IFNULL(d.vat_amount, 0)) AS vatAmount,
+ SUM(IFNULL(d.city_tax_amount, 0)) AS cityTaxAmount,
+ SUM(IFNULL(d.labor_pretax_amount, IFNULL(d.Amount, 0))) AS laborPretaxAmount
+ FROM service_funddetail d,
+ service_fund f
+ WHERE f.ID = d.fundID
+ AND f.fund_tax_id = #{fundTaxId}
+ AND f.istax = 1
+ AND d.del_flag = 0
+ GROUP BY groupKey
+ </select>
+
+ <!--
+ 涓撳璐规眹鎬诲崟鎵撳嵃锛氭寜銆屼笌瑙嗗浘 v_expertfee_donor 瀹屽叏鐩稿悓鐨勫垎缁勩�嶆眹鎬汇��
+ 娉ㄦ剰锛氳鍥鹃噷鐨� DonorName / InfoID 鍙栬嚜 service_fund锛堜笉鏄槑缁嗚〃锛夛紝
+ 鍒嗙粍閿� = f.DonorName | f.InfoID锛屼笌 Java 鐨� donorGroupKey 涓�鑷�
+ -->
+ <select id="selectTaxSumByDonor" resultType="com.ruoyi.project.domain.vo.FundTaxAmountSum">
+ SELECT CONCAT_WS('|', IFNULL(f.DonorName, ''), IFNULL(f.InfoID, '')) AS groupKey,
+ SUM(IFNULL(d.vat_amount, 0)) AS vatAmount,
+ SUM(IFNULL(d.city_tax_amount, 0)) AS cityTaxAmount,
+ SUM(IFNULL(d.labor_pretax_amount, IFNULL(d.Amount, 0))) AS laborPretaxAmount
+ FROM service_funddetail d,
+ service_fund f
+ WHERE f.ID = d.fundID
+ AND f.fund_tax_id = #{fundTaxId}
+ AND f.istax = 1
+ AND d.del_flag = 0
+ GROUP BY groupKey
+ </select>
+
+</mapper>
--
Gitblit v1.9.3