结算接口修改
This commit is contained in:
parent
204924c35d
commit
953c7dcd8f
|
|
@ -75,7 +75,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
||||||
public List<SltAgreementInfo> getSltAgreementInfo4Project(SltAgreementInfo bean) {
|
public List<SltAgreementInfo> getSltAgreementInfo4Project(SltAgreementInfo bean) {
|
||||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||||
List<SltAgreementInfo> list = sltAgreementInfoMapper.getSltAgreementInfo4Project(bean);
|
List<SltAgreementInfo> list = sltAgreementInfoMapper.getSltAgreementInfo4Project(bean);
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
/* if (CollectionUtils.isNotEmpty(list)) {
|
||||||
// 创建一个集合来保存需要移除的元素
|
// 创建一个集合来保存需要移除的元素
|
||||||
List<SltAgreementInfo> toRemove = new ArrayList<>();
|
List<SltAgreementInfo> toRemove = new ArrayList<>();
|
||||||
for (SltAgreementInfo info : list) {
|
for (SltAgreementInfo info : list) {
|
||||||
|
|
@ -89,7 +89,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
||||||
}
|
}
|
||||||
// 遍历结束后统一移除元素
|
// 遍历结束后统一移除元素
|
||||||
list.removeAll(toRemove);
|
list.removeAll(toRemove);
|
||||||
}
|
}*/
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,6 +256,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="getLeaseList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
|
<select id="getLeaseList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
|
||||||
|
SELECT
|
||||||
|
res.agreementId,
|
||||||
|
res.unitName,
|
||||||
|
res.projectName,
|
||||||
|
res.companyId,
|
||||||
|
res.typeId,
|
||||||
|
res.typeName,
|
||||||
|
res.modelName,
|
||||||
|
res.mtUnitName,
|
||||||
|
res.leasePrice,
|
||||||
|
SUM(res.num) as num,
|
||||||
|
res.startTime,
|
||||||
|
res.endTime,
|
||||||
|
res.leaseDays
|
||||||
|
FROM
|
||||||
|
(
|
||||||
select sai.id,
|
select sai.id,
|
||||||
sai.agreement_id as agreementId,
|
sai.agreement_id as agreementId,
|
||||||
bui.unit_name as unitName,
|
bui.unit_name as unitName,
|
||||||
|
|
@ -278,6 +294,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
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 sai.agreement_id = #{agreementId}
|
where sai.agreement_id = #{agreementId}
|
||||||
|
) res
|
||||||
|
GROUP BY res.typeId,res.startTime,res.endTime
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRepairDetailsList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
|
<select id="getRepairDetailsList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
|
||||||
|
|
@ -337,7 +355,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
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 rc.type_id = mt.type_id
|
left join ma_type mt on rc.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 rc.status in ('0','1') and rc.repair_type = '1'
|
where rc.status in ('0','1') and rc.repair_type = '3'
|
||||||
<if test="taskList != null and taskList.size() > 0">
|
<if test="taskList != null and taskList.size() > 0">
|
||||||
and rc.task_id in
|
and rc.task_id in
|
||||||
<foreach item="task" collection="taskList" open="(" separator="," close=")">
|
<foreach item="task" collection="taskList" open="(" separator="," close=")">
|
||||||
|
|
@ -347,6 +365,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLoseList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
|
<select id="getLoseList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
res.agreementId,
|
||||||
|
res.unitName,
|
||||||
|
res.projectName,
|
||||||
|
res.companyId,
|
||||||
|
res.typeId,
|
||||||
|
res.typeName,
|
||||||
|
res.modelName,
|
||||||
|
res.mtUnitName,
|
||||||
|
res.buyPrice,
|
||||||
|
SUM(res.num) as num,
|
||||||
|
res.startTime,
|
||||||
|
res.endTime,
|
||||||
|
res.leaseDays
|
||||||
|
FROM
|
||||||
|
(
|
||||||
select sai.id,
|
select sai.id,
|
||||||
sai.agreement_id as agreementId,
|
sai.agreement_id as agreementId,
|
||||||
bui.unit_name as unitName,
|
bui.unit_name as unitName,
|
||||||
|
|
@ -357,7 +392,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
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,
|
||||||
sai.buy_price as buyPrice,
|
mt.buy_price as buyPrice,
|
||||||
sai.num as num,
|
sai.num as num,
|
||||||
sai.start_time as startTime,
|
sai.start_time as startTime,
|
||||||
sai.end_time as endTime,
|
sai.end_time as endTime,
|
||||||
|
|
@ -369,6 +404,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
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 sai.agreement_id = #{agreementId} and sai.end_time is null
|
where sai.agreement_id = #{agreementId} and sai.end_time is null
|
||||||
|
) res
|
||||||
|
GROUP BY res.typeId
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCost" resultType="java.lang.String">
|
<select id="getCost" resultType="java.lang.String">
|
||||||
|
|
@ -701,6 +738,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_type_manage mt ON mt4.type_id = mt.type_id
|
LEFT JOIN ma_type_manage mt ON mt4.type_id = mt.type_id
|
||||||
WHERE
|
WHERE
|
||||||
mt.user_id = #{userId}
|
mt.user_id = #{userId}
|
||||||
LIMIT 1
|
GROUP BY sai.agreement_id
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue