结算明细修改

This commit is contained in:
bonus 2025-12-04 12:18:03 +08:00
parent eb9f571239
commit fed0467d2a
1 changed files with 71 additions and 68 deletions

View File

@ -358,6 +358,7 @@
<if test="settlementType != null and settlementType != 0">
and mt.jiju_type = #{settlementType}
</if>
GROUP BY sai.id
) res
GROUP BY res.unitName,res.typeId,res.startTime,res.endTime
ORDER BY res.unitName
@ -482,6 +483,7 @@
<if test="settlementType != null and settlementType != 0">
and mt.jiju_type = #{settlementType}
</if>
GROUP BY sai.id
) res
GROUP BY res.unitName,res.typeId
ORDER BY
@ -1283,40 +1285,40 @@
</select>
<select id="getLostReportList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
<!-- select sai.id,-->
<!-- sai.agreement_id as agreementId,-->
<!-- bai.agreement_code as agreementCode,-->
<!-- bui.unit_name as unitName,-->
<!-- bp.pro_name as projectName,-->
<!-- sai.type_id as typeId,-->
<!-- sai.ma_id as maId,-->
<!-- mt1.type_name as typeName,-->
<!-- mt.type_name as modelName,-->
<!-- mt.unit_name as mtUnitName,-->
<!-- ROUND(mt.buy_price, 2) as buyPrice,-->
<!-- sum(sai.num) as num,-->
<!-- ROUND(mt.buy_price * sum(sai.num), 2) as loseCost-->
<!-- from-->
<!-- slt_agreement_info sai-->
<!-- LEFT JOIN bm_agreement_info bai on sai.agreement_id = bai.agreement_id-->
<!-- LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id-->
<!-- LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id-->
<!-- left join ma_type mt on sai.type_id = mt.type_id-->
<!-- left join ma_type mt1 on mt.parent_id = mt1.type_id-->
<!-- <where>-->
<!-- sai.source = '1' and sai.status = 0-->
<!-- <if test="settlementType != null and settlementType != 0">-->
<!-- and mt.jiju_type = #{settlementType}-->
<!-- </if>-->
<!-- <if test="startTime != null and endTime != null">-->
<!-- and sai.start_time between #{startTime} and #{endTime}-->
<!-- </if>-->
<!-- <if test="agreementCode != null and agreementCode != ''">-->
<!-- and bai.agreement_code like concat('%',#{agreementCode},'%')-->
<!-- </if>-->
<!-- </where>-->
<!-- GROUP BY-->
<!-- sai.agreement_id,mt.type_id-->
<!-- select sai.id,-->
<!-- sai.agreement_id as agreementId,-->
<!-- bai.agreement_code as agreementCode,-->
<!-- bui.unit_name as unitName,-->
<!-- bp.pro_name as projectName,-->
<!-- sai.type_id as typeId,-->
<!-- sai.ma_id as maId,-->
<!-- mt1.type_name as typeName,-->
<!-- mt.type_name as modelName,-->
<!-- mt.unit_name as mtUnitName,-->
<!-- ROUND(mt.buy_price, 2) as buyPrice,-->
<!-- sum(sai.num) as num,-->
<!-- ROUND(mt.buy_price * sum(sai.num), 2) as loseCost-->
<!-- from-->
<!-- slt_agreement_info sai-->
<!-- LEFT JOIN bm_agreement_info bai on sai.agreement_id = bai.agreement_id-->
<!-- LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id-->
<!-- LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id-->
<!-- left join ma_type mt on sai.type_id = mt.type_id-->
<!-- left join ma_type mt1 on mt.parent_id = mt1.type_id-->
<!-- <where>-->
<!-- sai.source = '1' and sai.status = 0-->
<!-- <if test="settlementType != null and settlementType != 0">-->
<!-- and mt.jiju_type = #{settlementType}-->
<!-- </if>-->
<!-- <if test="startTime != null and endTime != null">-->
<!-- and sai.start_time between #{startTime} and #{endTime}-->
<!-- </if>-->
<!-- <if test="agreementCode != null and agreementCode != ''">-->
<!-- and bai.agreement_code like concat('%',#{agreementCode},'%')-->
<!-- </if>-->
<!-- </where>-->
<!-- GROUP BY-->
<!-- sai.agreement_id,mt.type_id-->
@ -1400,40 +1402,40 @@
</select>
<select id="getLostReportListExport" resultType="com.bonus.material.settlement.domain.vo.SltAgreementInfoLose">
<!-- select sai.id,-->
<!-- sai.agreement_id as agreementId,-->
<!-- bai.agreement_code as agreementCode,-->
<!-- bui.unit_name as unitName,-->
<!-- bp.pro_name as projectName,-->
<!-- sai.type_id as typeId,-->
<!-- sai.ma_id as maId,-->
<!-- mt1.type_name as typeName,-->
<!-- mt.type_name as modelName,-->
<!-- mt.unit_name as mtUnitName,-->
<!-- ROUND(mt.buy_price, 2) as buyPrice,-->
<!-- sum(sai.num) as num,-->
<!-- ROUND(mt.buy_price * sum(sai.num), 2) as loseCost-->
<!-- from-->
<!-- slt_agreement_info sai-->
<!-- LEFT JOIN bm_agreement_info bai on sai.agreement_id = bai.agreement_id-->
<!-- LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id-->
<!-- LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id-->
<!-- left join ma_type mt on sai.type_id = mt.type_id-->
<!-- left join ma_type mt1 on mt.parent_id = mt1.type_id-->
<!-- <where>-->
<!-- sai.source = '1'-->
<!-- <if test="settlementType != null and settlementType != 0">-->
<!-- and mt.jiju_type = #{settlementType}-->
<!-- </if>-->
<!-- <if test="startTime != null and endTime != null">-->
<!-- and sai.create_time between #{startTime} and #{endTime}-->
<!-- </if>-->
<!-- <if test="agreementCode != null and agreementCode != ''">-->
<!-- and bai.agreement_code like concat('%',#{agreementCode},'%')-->
<!-- </if>-->
<!-- </where>-->
<!-- GROUP BY-->
<!-- sai.agreement_id,mt.type_id-->
<!-- select sai.id,-->
<!-- sai.agreement_id as agreementId,-->
<!-- bai.agreement_code as agreementCode,-->
<!-- bui.unit_name as unitName,-->
<!-- bp.pro_name as projectName,-->
<!-- sai.type_id as typeId,-->
<!-- sai.ma_id as maId,-->
<!-- mt1.type_name as typeName,-->
<!-- mt.type_name as modelName,-->
<!-- mt.unit_name as mtUnitName,-->
<!-- ROUND(mt.buy_price, 2) as buyPrice,-->
<!-- sum(sai.num) as num,-->
<!-- ROUND(mt.buy_price * sum(sai.num), 2) as loseCost-->
<!-- from-->
<!-- slt_agreement_info sai-->
<!-- LEFT JOIN bm_agreement_info bai on sai.agreement_id = bai.agreement_id-->
<!-- LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id-->
<!-- LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id-->
<!-- left join ma_type mt on sai.type_id = mt.type_id-->
<!-- left join ma_type mt1 on mt.parent_id = mt1.type_id-->
<!-- <where>-->
<!-- sai.source = '1'-->
<!-- <if test="settlementType != null and settlementType != 0">-->
<!-- and mt.jiju_type = #{settlementType}-->
<!-- </if>-->
<!-- <if test="startTime != null and endTime != null">-->
<!-- and sai.create_time between #{startTime} and #{endTime}-->
<!-- </if>-->
<!-- <if test="agreementCode != null and agreementCode != ''">-->
<!-- and bai.agreement_code like concat('%',#{agreementCode},'%')-->
<!-- </if>-->
<!-- </where>-->
<!-- GROUP BY-->
<!-- sai.agreement_id,mt.type_id-->
SELECT
res.agreementId,
@ -1958,6 +1960,7 @@
where
bai.project_id = #{projectId} and bai.project_unit_id = #{unitId}
AND bu.type_id =1731
</select>
<select id="getSltLoseList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">