|
|
@@ -164,7 +164,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
|
|
|
public void audit(Pay pay) {
|
|
|
Long companyId = BaseContextHolder.getCompanyId();
|
|
|
int id = Math.toIntExact(pay.getMain().getId());
|
|
|
- Paybalance paybalance = paybalanceMapper.selectByPrimaryKey(id);
|
|
|
+ Paybalance paybalance = paybalanceMapper.selectByPrimaryKey(Long.valueOf(id));
|
|
|
paybalance.setPb_status(Status.AUDITED.getDisplay());
|
|
|
paybalance.setPb_statuscode(Status.AUDITED.name());
|
|
|
paybalance.setCompanyId(companyId);
|
|
|
@@ -211,10 +211,10 @@ public class PaybalanceServiceImpl implements PaybalanceService {
|
|
|
* ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
|
|
|
*/
|
|
|
Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(paybalance.getPb_vendid());
|
|
|
- Double preamount = vendorData.getVe_preamount();
|
|
|
- Double beginapamount = vendorData.getVe_beginapamount();
|
|
|
- Double beginprepayamount= vendorData.getVe_beginprepayamount();
|
|
|
- Double payamount = vendorData.getVe_payamount();
|
|
|
+ Double preamount = vendorData.getVe_preamount()==null?new Double(0):vendorData.getVe_preamount();
|
|
|
+ Double beginapamount = vendorData.getVe_beginapamount()==null?new Double(0):vendorData.getVe_beginapamount();
|
|
|
+ Double beginprepayamount= vendorData.getVe_beginprepayamount()==null?new Double(0):vendorData.getVe_beginprepayamount();
|
|
|
+ Double payamount = vendorData.getVe_payamount()==null?new Double(0):vendorData.getVe_payamount();
|
|
|
|
|
|
Vendor vendor = new Vendor();
|
|
|
vendor.setId(Long.valueOf(String.valueOf(paybalance.getPb_vendid())));
|
|
|
@@ -264,7 +264,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
|
|
|
paybalanceMapper.updateByPrimaryKeySelective(paybalance);
|
|
|
|
|
|
//删除中间表
|
|
|
- paybalance = paybalanceMapper.selectByPrimaryKey(id);
|
|
|
+ paybalance = paybalanceMapper.selectByPrimaryKey(Long.valueOf(id));
|
|
|
subledgerMapper.deleteByPrimaryKey(paybalance.getPb_code(), paybalance.getPb_kind());
|
|
|
banksubledgerMapper.deleteByPrimaryKey(paybalance.getPb_code(), paybalance.getPb_kind());
|
|
|
|