|
@@ -10,6 +10,7 @@ import com.usoftchina.saas.commons.exception.BizExceptionCode;
|
|
|
import com.usoftchina.saas.commons.po.BillCodeSeq;
|
|
import com.usoftchina.saas.commons.po.BillCodeSeq;
|
|
|
import com.usoftchina.saas.commons.po.Status;
|
|
import com.usoftchina.saas.commons.po.Status;
|
|
|
import com.usoftchina.saas.context.BaseContextHolder;
|
|
import com.usoftchina.saas.context.BaseContextHolder;
|
|
|
|
|
+import com.usoftchina.saas.document.mapper.BankinformationMapper;
|
|
|
import com.usoftchina.saas.exception.BizException;
|
|
import com.usoftchina.saas.exception.BizException;
|
|
|
import com.usoftchina.saas.money.mapper.*;
|
|
import com.usoftchina.saas.money.mapper.*;
|
|
|
import com.usoftchina.saas.money.po.*;
|
|
import com.usoftchina.saas.money.po.*;
|
|
@@ -122,6 +123,16 @@ public class OthspendingsServiceImpl implements OthspendingsService {
|
|
|
}else {
|
|
}else {
|
|
|
othspendingsMapper.updateByPrimaryKeySelective(othspendings);
|
|
othspendingsMapper.updateByPrimaryKeySelective(othspendings);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ Double amount = banksubledgerMapper.selectThisamount(othspendings.getOs_bankcode());
|
|
|
|
|
+ //取从表金额
|
|
|
|
|
+ List<Othspendingsdetail> othspendingsdetailList = othsp.getItems();
|
|
|
|
|
+ Iterator isList = othspendingsdetailList.iterator();
|
|
|
|
|
+ while (isList.hasNext()){
|
|
|
|
|
+ Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isList.next();
|
|
|
|
|
+ banksubledgerMapper.updateBankcode(amount, othspendingsdetail.getOsd_nowbalance(),
|
|
|
|
|
+ othspendings.getOs_bankcode(), "+");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -135,6 +146,17 @@ public class OthspendingsServiceImpl implements OthspendingsService {
|
|
|
//删除中间表
|
|
//删除中间表
|
|
|
othspendings = othspendingsMapper.selectByPrimaryKey(id);
|
|
othspendings = othspendingsMapper.selectByPrimaryKey(id);
|
|
|
banksubledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他收入单");
|
|
banksubledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他收入单");
|
|
|
|
|
+
|
|
|
|
|
+ //资金
|
|
|
|
|
+ Double amount = banksubledgerMapper.selectThisamount(othspendings.getOs_bankcode());
|
|
|
|
|
+ //取从表金额
|
|
|
|
|
+ List<Othspendingsdetail> othspendingsdetailList = othspendingsdetailMapper.selectByPrimaryKey(id);
|
|
|
|
|
+ Iterator isList = othspendingsdetailList.iterator();
|
|
|
|
|
+ while (isList.hasNext()){
|
|
|
|
|
+ Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isList.next();
|
|
|
|
|
+ banksubledgerMapper.updateBankcode(amount, othspendingsdetail.getOsd_nowbalance(),
|
|
|
|
|
+ othspendings.getOs_bankcode(), "-");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -157,7 +179,8 @@ public class OthspendingsServiceImpl implements OthspendingsService {
|
|
|
othspendings.setOs_statuscode(Status.AUDITED.name());
|
|
othspendings.setOs_statuscode(Status.AUDITED.name());
|
|
|
Othsp othsp = this.select(Math.toIntExact(othspendings.getId()));
|
|
Othsp othsp = this.select(Math.toIntExact(othspendings.getId()));
|
|
|
this.changBankUntil(othsp);
|
|
this.changBankUntil(othsp);
|
|
|
- othspendingsMapper.updateByPrimaryKeySelective(othspendings);
|
|
|
|
|
|
|
+ this.insert(othsp);
|
|
|
|
|
+// othspendingsMapper.updateByPrimaryKeySelective(othspendings);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|