|
@@ -64,7 +64,7 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
* @pram waterAmount 购水金额
|
|
* @pram waterAmount 购水金额
|
|
*/
|
|
*/
|
|
public PayfeeResult payFeeCounter( String id,Integer payway,BigDecimal transAmount, Integer balancetype,BigDecimal debt,
|
|
public PayfeeResult payFeeCounter( String id,Integer payway,BigDecimal transAmount, Integer balancetype,BigDecimal debt,
|
|
- BigDecimal ycremaining,Integer amount, BigDecimal waterAmount){
|
|
|
|
|
|
+ BigDecimal ycremaining,Integer amount,BigDecimal price){
|
|
//实收金额不可为负数
|
|
//实收金额不可为负数
|
|
if(transAmount.compareTo(BigDecimal.ZERO)!=1){
|
|
if(transAmount.compareTo(BigDecimal.ZERO)!=1){
|
|
throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
@@ -82,9 +82,9 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
throw new ServiceException(ResultStatus.PAYFEE_REMAINING_BELOW_ZERO);
|
|
throw new ServiceException(ResultStatus.PAYFEE_REMAINING_BELOW_ZERO);
|
|
}
|
|
}
|
|
//购水金额不能为负数
|
|
//购水金额不能为负数
|
|
- if(waterAmount.compareTo(BigDecimal.ZERO) != 1){
|
|
|
|
|
|
+ /* if(waterAmount.compareTo(BigDecimal.ZERO) != 1){
|
|
throw new ServiceException(ResultStatus.PAYFEE_WATERAMOUNT_BELOW_ZERO);
|
|
throw new ServiceException(ResultStatus.PAYFEE_WATERAMOUNT_BELOW_ZERO);
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
//String result=""; //执行结果描述
|
|
//String result=""; //执行结果描述
|
|
String result="实收金额:"+String.format("%.2f",transAmount)+"元";
|
|
String result="实收金额:"+String.format("%.2f",transAmount)+"元";
|
|
BigDecimal fees=BigDecimal.ZERO; //抵扣金额
|
|
BigDecimal fees=BigDecimal.ZERO; //抵扣金额
|
|
@@ -104,6 +104,10 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
//查询欠费信息
|
|
//查询欠费信息
|
|
List<PayReceivable> payReceivableList =payFeeMapper.getReceivable(loginUser.getSiteId(),loginUser.getCustomerId(),payCustomRechargeDto.getAccountId(),null);
|
|
List<PayReceivable> payReceivableList =payFeeMapper.getReceivable(loginUser.getSiteId(),loginUser.getCustomerId(),payCustomRechargeDto.getAccountId(),null);
|
|
|
|
|
|
|
|
+
|
|
|
|
+ //购水金额 = 单价*水量
|
|
|
|
+ BigDecimal waterAmount = price.multiply(new BigDecimal(amount));
|
|
|
|
+
|
|
if(payReceivableList.size() == 0 && debt.compareTo(BigDecimal.ZERO) ==0){ //没有应收信息走仅充值
|
|
if(payReceivableList.size() == 0 && debt.compareTo(BigDecimal.ZERO) ==0){ //没有应收信息走仅充值
|
|
return rechargefeeCounter(id, transAmount, payway,balancetype,waterAmount);
|
|
return rechargefeeCounter(id, transAmount, payway,balancetype,waterAmount);
|
|
}else{
|
|
}else{
|