结算功能完善
This commit is contained in:
parent
84e3e319fa
commit
a2baadf840
|
|
@ -112,7 +112,10 @@ public class RepairServiceImpl implements RepairService {
|
||||||
partDetails.setCreateBy(loginUser.getUserid());
|
partDetails.setCreateBy(loginUser.getUserid());
|
||||||
partDetails.setCompanyId(bean.getCompanyId());
|
partDetails.setCompanyId(bean.getCompanyId());
|
||||||
mapper.addPart(partDetails);
|
mapper.addPart(partDetails);
|
||||||
|
bean.setPartPrice(partDetails.getPartCost());
|
||||||
partNum += partDetails.getPartNum();
|
partNum += partDetails.getPartNum();
|
||||||
|
bean.setRepairContent(partDetails.getRepairContent());
|
||||||
|
bean.setPartType(partDetails.getPartType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bean.setPartNum(partNum);
|
bean.setPartNum(partNum);
|
||||||
|
|
@ -136,13 +139,14 @@ public class RepairServiceImpl implements RepairService {
|
||||||
for (RepairPartDetails partDetails : partList) {
|
for (RepairPartDetails partDetails : partList) {
|
||||||
|
|
||||||
if (sfPart.equals(partDetails.getPartType())) {
|
if (sfPart.equals(partDetails.getPartType())) {
|
||||||
if (StringUtils.isEmpty(partDetails.getPartCost())) {
|
if (StringUtils.isBlank(partDetails.getPartCost())) {
|
||||||
partDetails.setPartCost("0");
|
partDetails.setPartCost("0");
|
||||||
}
|
}
|
||||||
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());
|
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());
|
||||||
sfCosts = sfCosts.add(partCost);
|
BigDecimal partNumber = new BigDecimal(partDetails.getPartNum());
|
||||||
|
sfCosts = sfCosts.add(partCost.multiply(partNumber));
|
||||||
} else if (bsfPart.equals(partDetails.getPartType())) {
|
} else if (bsfPart.equals(partDetails.getPartType())) {
|
||||||
if (StringUtils.isEmpty(partDetails.getPartCost())) {
|
if (StringUtils.isBlank(partDetails.getPartCost())) {
|
||||||
partDetails.setPartCost("0");
|
partDetails.setPartCost("0");
|
||||||
}
|
}
|
||||||
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());
|
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
||||||
//租赁费用列表
|
//租赁费用列表
|
||||||
for (AgreementInfo agreementInfo : list) {
|
for (AgreementInfo agreementInfo : list) {
|
||||||
// 如果选择了最新月份则需要查数据
|
// 如果选择了最新月份则需要查数据
|
||||||
if (agreementInfo.getStartTime() != null && agreementInfo.getEndTime() != null && DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
|
if (StringUtils.isNotBlank(agreementInfo.getStartTime()) && StringUtils.isNotBlank(agreementInfo.getEndTime()) && DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
|
||||||
List<SltAgreementInfo> listMonth = getLeaseListMonth(agreementInfo, num);
|
List<SltAgreementInfo> listMonth = getLeaseListMonth(agreementInfo, num);
|
||||||
leaseListMonth.addAll(listMonth);
|
leaseListMonth.addAll(listMonth);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
end_time = #{endTime},
|
end_time = #{endTime},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where agreement_id = #{agreementId} and type_id = #{typeId}
|
where id = #{id}
|
||||||
<if test="maId != null and maId != ''">
|
|
||||||
and ma_id = #{maId}
|
|
||||||
</if>
|
|
||||||
</update>
|
</update>
|
||||||
<update id="updateInfoOneStatus">
|
<update id="updateInfoOneStatus">
|
||||||
UPDATE slt_agreement_info sai
|
UPDATE slt_agreement_info sai
|
||||||
|
|
@ -207,8 +204,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
rc.repair_num as num,
|
rc.repair_num as num,
|
||||||
rc.costs as costs,
|
rc.costs as costs,
|
||||||
rc.out_source_costs as outSourceCosts,
|
rc.out_source_costs as outSourceCosts,
|
||||||
ROUND(rc.repair_num * rc.costs, 2) AS partAllCosts,
|
rc.costs AS partAllCosts,
|
||||||
ROUND(rc.repair_num * rc.costs + IFNULL(rc.out_source_costs ,0), 2) AS allCosts,
|
ROUND(rc.costs + IFNULL(rc.out_source_costs ,0), 2) AS allCosts,
|
||||||
mpt.pa_name partModelName,
|
mpt.pa_name partModelName,
|
||||||
mpt2.pa_name partName,
|
mpt2.pa_name partName,
|
||||||
case rc.part_type when '0' then '不收费' when '1' then '收费' else '' end as partType,
|
case rc.part_type when '0' then '不收费' when '1' then '收费' else '' end as partType,
|
||||||
|
|
@ -249,8 +246,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from scrap_apply_details sad
|
from scrap_apply_details sad
|
||||||
left join tm_task_agreement tta on sad.task_id = tta.task_id
|
left join tm_task_agreement tta on sad.task_id = tta.task_id
|
||||||
LEFT JOIN bm_agreement_info bai on tta.agreement_id = bai.agreement_id
|
LEFT JOIN bm_agreement_info bai on tta.agreement_id = bai.agreement_id
|
||||||
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
|
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
|
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
|
||||||
left join ma_type mt on sad.type_id = mt.type_id
|
left join ma_type mt on sad.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
|
||||||
left join ma_machine mm on mm.ma_id = sad.ma_id
|
left join ma_machine mm on mm.ma_id = sad.ma_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue