|
@@ -92,7 +92,7 @@ public class AfterSalesFlow extends FlowDelegate {
|
|
|
BigDecimal multiply = contractProduct.getPrice().multiply(afterSales.getQuantity());
|
|
|
|
|
|
|
|
|
- if (ObjectUtil.equals(afterSales, 30) || ObjectUtil.equals(afterSales, 40)) {
|
|
|
+ if (ObjectUtil.equals(afterSales.getType(), "30") || ObjectUtil.equals(afterSales.getType(), "40")) {
|
|
|
|
|
|
AccountPayment accountPayment = new AccountPayment();
|
|
|
|
|
@@ -105,7 +105,7 @@ public class AfterSalesFlow extends FlowDelegate {
|
|
|
accountPayment.setPaymentTime(new Date());
|
|
|
accountPayment.setCurrency("CNY");
|
|
|
accountPayment.setStatus(PaymentStatusEnum.UNDER_REVIEW.getKey());
|
|
|
- accountPayment.setType(40);
|
|
|
+ accountPayment.setType("40");
|
|
|
accountPayment.setPaymentRemark(afterSales.getRemark());
|
|
|
accountPayment.setIncomeAmount(multiply);
|
|
|
accountPayment.setName(afterSales.getAccountName());
|
|
@@ -118,11 +118,12 @@ public class AfterSalesFlow extends FlowDelegate {
|
|
|
accountPaymentService.save(accountPayment);
|
|
|
}
|
|
|
|
|
|
- if (ObjectUtil.equals(afterSales, 30) || ObjectUtil.equals(afterSales, 40)) {
|
|
|
+ if (ObjectUtil.equals(afterSales.getType(), "10") || ObjectUtil.equals(afterSales.getType(), "20")) {
|
|
|
Contract contract = contractService.getById(contractProduct.getContractId());
|
|
|
Assert.notEmpty(contract, "查询不到合同信息!");
|
|
|
contract.setId(null);
|
|
|
contract.setAmount(BigDecimal.ZERO);
|
|
|
+ contract.setCode(codingRuleService.createCode(CodingRuleEnum.CONTRACT.getKey(), contract.getBuyCorporationId()));
|
|
|
contractService.save(contract);
|
|
|
|
|
|
ContractProduct contractProduct1 = contractProductService.getById(contractProductId);
|