变更产值

This commit is contained in:
2025-08-23 10:32:14 +08:00
parent a2b33f3b53
commit c2ce524ef3

View File

@ -6,22 +6,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="purchaseValueAA" resultType="org.dromara.out.domain.BusProcurement"> <select id="purchaseValueAA" resultType="org.dromara.out.domain.BusProcurement">
<!-- SELECT-->
<!-- b.name,-->
<!-- b.specification,-->
<!-- b.unit,-->
<!-- (SELECT SUM(accepted_quantity) FROM mat_material_receive_item WHERE project_id = #{projectId} and name = b.name and specification = b.specification) as acceptedQuantity,-->
<!-- a.unit_price,-->
<!-- DATE_FORMAT(b.create_time,'%Y-%m') as yf-->
<!-- FROM-->
<!-- bus_bidding_limit_list as a-->
<!-- RIGHT JOIN mat_material_receive_item as b on b.`name` = a.`name` and b.specification = a.specification-->
<!-- WHERE-->
<!-- b.project_id = #{projectId}-->
<!-- <if test="planMonth != null and planMonth!=''">-->
<!-- and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth}-->
<!-- </if>-->
<!-- GROUP BY yf,b.name,b.specification-->
SELECT SELECT
b.name, a.NAME,
b.specification, a.specification,
b.unit, a.unit,
(SELECT SUM(accepted_quantity) FROM mat_material_receive_item WHERE project_id = #{projectId} and name = b.name and specification = b.specification) as acceptedQuantity, sum(a.quantity),
a.unit_price, DATE_FORMAT( a.create_time, '%Y-%m' ) AS yf
DATE_FORMAT(b.create_time,'%Y-%m') as yf
FROM FROM
bus_bidding_limit_list as a bus_bidding_limit_list AS a
RIGHT JOIN mat_material_receive_item as b on b.`name` = a.`name` and b.specification = a.specification <where>
WHERE a.project_id = #{projectId}
b.project_id = #{projectId}
<if test="planMonth != null and planMonth!='' "> <if test="planMonth != null and planMonth!='' ">
and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth} and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth}
</if> </if>
GROUP BY yf,b.name,b.specification </where>
GROUP BY
yf,
a.NAME,
a.specification
</select> </select>
<select id="purchaseValueBB" resultType="org.dromara.out.domain.BusProcurement"> <select id="purchaseValueBB" resultType="org.dromara.out.domain.BusProcurement">