变更产值

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 <!-- SELECT-->
b.name, <!-- b.name,-->
b.specification, <!-- b.specification,-->
b.unit, <!-- 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, <!-- (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, <!-- a.unit_price,-->
DATE_FORMAT(b.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 <!-- RIGHT JOIN mat_material_receive_item as b on b.`name` = a.`name` and b.specification = a.specification-->
WHERE <!-- WHERE-->
b.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 <!-- GROUP BY yf,b.name,b.specification-->
SELECT
a.NAME,
a.specification,
a.unit,
sum(a.quantity),
DATE_FORMAT( a.create_time, '%Y-%m' ) AS yf
FROM
bus_bidding_limit_list AS a
<where>
a.project_id = #{projectId}
<if test="planMonth != null and planMonth!='' ">
and DATE_FORMAT(b.create_time,'%Y-%m') = #{planMonth}
</if>
</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">