|
|
@ -38,6 +38,7 @@ import com.yxt.anrui.buscenter.api.bussalesorderdeposit.BusSalesOrderDepositDeta |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderdeposit.BusSalesOrderDepositDto; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderdeposit.app.*; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPrice; |
|
|
|
import com.yxt.anrui.buscenter.api.common.BusSalesOrderConstantUtils; |
|
|
|
import com.yxt.anrui.buscenter.biz.busdeposit.BusDepositService; |
|
|
|
import com.yxt.anrui.buscenter.biz.busdepositfictitious.BusDepositFictitiousService; |
|
|
|
import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService; |
|
|
@ -203,7 +204,7 @@ public class BusSalesOrderDepositService extends MybatisBaseService<BusSalesOrde |
|
|
|
//先计算需补交订金是多少
|
|
|
|
//总的结转金额
|
|
|
|
BigDecimal makeUpDecimal = new BigDecimal("0"); |
|
|
|
if ("02".equals(dto.getDepositTypeKey())) { |
|
|
|
if (BusSalesOrderConstantUtils.DepositType.DEPOSIT_CARRY_FORWARD.getCode().equals(dto.getDepositTypeKey())) { |
|
|
|
List<AppBusSalesOrderDepositListDto> listVos = dto.getVirtualOrderList(); |
|
|
|
listVos.removeAll(Collections.singleton(null)); |
|
|
|
if (!listVos.isEmpty()) { |
|
|
@ -262,7 +263,7 @@ public class BusSalesOrderDepositService extends MybatisBaseService<BusSalesOrde |
|
|
|
BeanUtil.copyProperties(dto, busSalesOrderDeposit, "sid"); |
|
|
|
//计算需补交订金
|
|
|
|
if (StringUtils.isNotBlank(dto.getDepositAll())) { |
|
|
|
if ("02".equals(dto.getDepositTypeKey())) { |
|
|
|
if (BusSalesOrderConstantUtils.DepositType.DEPOSIT_CARRY_FORWARD.getCode().equals(dto.getDepositTypeKey())) { |
|
|
|
BigDecimal bigDecimalAll = new BigDecimal(dto.getDepositAll()); |
|
|
|
busSalesOrderDeposit.setMakeUpDeposit(bigDecimalAll.subtract(makeUpDecimal)); |
|
|
|
} |
|
|
@ -274,13 +275,13 @@ public class BusSalesOrderDepositService extends MybatisBaseService<BusSalesOrde |
|
|
|
BeanUtil.copyProperties(dto, busSalesOrderDeposit, "sid"); |
|
|
|
//计算需补交订金
|
|
|
|
if (StringUtils.isNotBlank(dto.getDepositAll())) { |
|
|
|
if ("02".equals(dto.getDepositTypeKey())) { |
|
|
|
if (BusSalesOrderConstantUtils.DepositType.DEPOSIT_CARRY_FORWARD.getCode().equals(dto.getDepositTypeKey())) { |
|
|
|
BigDecimal bigDecimalAll = new BigDecimal(dto.getDepositAll()); |
|
|
|
busSalesOrderDeposit.setMakeUpDeposit(bigDecimalAll.subtract(makeUpDecimal)); |
|
|
|
} |
|
|
|
} |
|
|
|
baseMapper.updateById(busSalesOrderDeposit); |
|
|
|
if ("01".equals(dto.getDepositTypeKey())) { |
|
|
|
if (BusSalesOrderConstantUtils.DepositType.CASH_DEPOSIT.getCode().equals(dto.getDepositTypeKey())) { |
|
|
|
//将需补交订金设置为null
|
|
|
|
baseMapper.updateMakeUpDeposit(depositSid); |
|
|
|
|
|
|
@ -305,7 +306,7 @@ public class BusSalesOrderDepositService extends MybatisBaseService<BusSalesOrde |
|
|
|
busDepositFictitiousService.deleteByDepositSid(depositSid); |
|
|
|
} |
|
|
|
//若缴纳方式为订金结转
|
|
|
|
if ("02".equals(dto.getDepositTypeKey())) { |
|
|
|
if (BusSalesOrderConstantUtils.DepositType.DEPOSIT_CARRY_FORWARD.getCode().equals(dto.getDepositTypeKey())) { |
|
|
|
List<AppBusSalesOrderDepositListDto> listVos = dto.getVirtualOrderList(); |
|
|
|
listVos.removeAll(Collections.singleton(null)); |
|
|
|
BigDecimal bigDecimalAll = new BigDecimal("0"); |
|
|
|