结算修改
This commit is contained in:
parent
a065b8ecde
commit
3cef269a7a
|
|
@ -751,7 +751,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
if (null == bean.getLeasePrice()) {
|
||||
bean.setLeasePrice(BigDecimal.valueOf(0.00));
|
||||
}else{
|
||||
bean.setLeasePrice(bean.getLeasePrice().setScale(2, RoundingMode.HALF_UP));
|
||||
bean.setLeasePrice(bean.getLeasePrice().setScale(3, RoundingMode.DOWN));
|
||||
}
|
||||
|
||||
if (null == bean.getNum()) {
|
||||
|
|
@ -1290,7 +1290,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
BigDecimal leasePrice = bean.getLeasePrice();
|
||||
BigDecimal num = bean.getNum();
|
||||
BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays());
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
|
||||
// BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.HALF_UP);
|
||||
if(costs!=null){
|
||||
totalCostLease = totalCostLease.add(costs);
|
||||
}
|
||||
|
|
@ -1450,7 +1451,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
BigDecimal leasePrice = bean.getLeasePrice();
|
||||
BigDecimal num = bean.getNum();
|
||||
BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays());
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.HALF_UP);
|
||||
|
||||
totalCostLease = totalCostLease.add(costs);
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
if (leaseDays.compareTo(BigDecimal.ZERO) < 0) {
|
||||
leaseDays = BigDecimal.ZERO;
|
||||
}
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.DOWN);
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.HALF_UP);
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
return leaseList;
|
||||
|
|
@ -834,7 +834,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
id = sltInfoVo.getId();
|
||||
sltInfoVo.setUpdateTime(DateUtils.getNowDate());
|
||||
}
|
||||
if (!sltInfoVo.getLeaseList().isEmpty()) {
|
||||
if (sltInfoVo !=null) {
|
||||
List<SltAgreementInfo> filteredLeaseList = getLeaseList(info).stream()
|
||||
.filter(lease -> lease.getAgreementId().equals(sltInfoVo.getAgreementId()))
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -842,7 +842,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
sltAgreementInfoMapper.insertSltAgreementDetailLease(filteredLeaseList, id);
|
||||
}
|
||||
}
|
||||
if (!sltInfoVo.getRepairList().isEmpty()) {
|
||||
if (sltInfoVo !=null) {
|
||||
List<SltAgreementInfo> filteredRepairList = getRepairList(info).stream()
|
||||
.filter(lease -> lease.getAgreementId().equals(sltInfoVo.getAgreementId()))
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -850,7 +850,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
sltAgreementInfoMapper.insertSltAgreementDetailRepair(filteredRepairList, id);
|
||||
}
|
||||
}
|
||||
if (!sltInfoVo.getScrapList().isEmpty()) {
|
||||
if (sltInfoVo !=null) {
|
||||
List<SltAgreementInfo> filteredScrapList = getScrapList(info).stream()
|
||||
.filter(lease -> lease.getAgreementId().equals(sltInfoVo.getAgreementId()))
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -858,7 +858,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
sltAgreementInfoMapper.insertSltAgreementDetailScrap(filteredScrapList, id);
|
||||
}
|
||||
}
|
||||
if (!sltInfoVo.getLoseList().isEmpty()) {
|
||||
if (sltInfoVo !=null) {
|
||||
List<SltAgreementInfo> filteredLoseList = getLoseList(info).stream()
|
||||
.filter(lease -> lease.getAgreementId().equals(sltInfoVo.getAgreementId()))
|
||||
.collect(Collectors.toList());
|
||||
|
|
|
|||
Loading…
Reference in New Issue