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