Commit 7ff53275 by kangxiaoshan

大后台

parent 6604155f
......@@ -1186,11 +1186,21 @@ public class ContractServiceImpl implements ContractService {
ContractChange contractChange = contractChangeRepository.findOne(Long.parseLong(id));
contractChange.setDelFlag(1);
contractChangeRepository.save(contractChange);
return contractChange;
}else{
ContractMoney contractMoney = contractMoneyRepository.findOne(Long.parseLong(id));
contractMoney.setDelFlag(1);
contractMoneyRepository.save(contractMoney);
if("pay".equals(contractMoney.getType())){
// 删除收款记录 修改相应收款金额
Contract contract = contractRepository.findByCode(contractMoney.getContractCode());
contract.setPayMoney(contract.getPayMoney()-contractMoney.getMoney());
contractRepository.save(contract);
}
return contractMoney;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment