|
|
@ -650,11 +650,26 @@ public class ScmVehicleExamineService extends MybatisBaseService<ScmVehicleExami |
|
|
|
int price = Integer.valueOf(outsourcingApplicationDetailsVo.getPurchasePrice());//采购价格
|
|
|
|
Integer num = outsourcingApplicationDetailsVo.getNum();//采购数量
|
|
|
|
int deposit = Integer.valueOf(outsourcingApplicationDetailsVo.getDeposit());//订金
|
|
|
|
String depositUseRuleKey = outsourcingApplicationDetailsVo.getDepositUseRuleKey(); |
|
|
|
if (depositUseRuleKey.equals("001")) { |
|
|
|
if (deposit > 0) { |
|
|
|
finPaymentrecordDto.setCost(price - deposit / num);//付款金额
|
|
|
|
finPaymentrecordDto.setPayRemark("订金使用规则为" + outsourcingApplicationDetailsVo.getDepositUseRuleValue() + "," + "金额为" + (price - deposit / num)); |
|
|
|
} else { |
|
|
|
finPaymentrecordDto.setCost(price);//付款金额
|
|
|
|
finPaymentrecordDto.setPayRemark("订金使用规则为" + outsourcingApplicationDetailsVo.getDepositUseRuleValue() + "," + "金额为" + price); |
|
|
|
} |
|
|
|
} else if (depositUseRuleKey.equals("002")) { |
|
|
|
int i = baseMapper.selectCountByBusSid(scmVehicleExamine.getBusinessSid()); |
|
|
|
if (i > 1) { |
|
|
|
finPaymentrecordDto.setCost(price);//付款金额
|
|
|
|
finPaymentrecordDto.setPayRemark("订金使用规则为" + outsourcingApplicationDetailsVo.getDepositUseRuleValue() + "," + "金额为" + price); |
|
|
|
} else if (i == 1) { |
|
|
|
finPaymentrecordDto.setCost(price - deposit); |
|
|
|
finPaymentrecordDto.setPayRemark("订金使用规则为" + outsourcingApplicationDetailsVo.getDepositUseRuleValue() + "," + "金额为" + (price - deposit)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
finPaymentrecordDto.setBusSid(scmVehicleExamine.getBusinessSid());//外采申请sid
|
|
|
|
BaseManufacturerAllVo baseManufacturerAllVo = baseManufacturerFeign.details(outsourcingApplicationDetailsVo.getPurchasingUnitSid()).getData(); |
|
|
|
if (baseManufacturerAllVo != null) { |
|
|
|