|
|
@@ -47,6 +47,7 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
|
|
|
bankinformation.setCompanyId(BaseContextHolder.getCompanyId());
|
|
|
bankinformation.setBk_income(new Double(0));
|
|
|
bankinformation.setBk_spending(new Double(0));
|
|
|
+ int bid = Math.toIntExact(bankinformation.getId());
|
|
|
|
|
|
String bktion = bankinformationMapper.selectBankcode(bankinformation.getBk_bankcode());
|
|
|
//先判断ID,再判断编号
|
|
|
@@ -58,6 +59,24 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
|
|
|
bankinformation.setBk_thisamount(bankinformation.getBk_beginamount());
|
|
|
bankinformationMapper.insertSelective(bankinformation);
|
|
|
}else {
|
|
|
+ //判断是否能修改期初金额
|
|
|
+ Double beginamount = bankinformationMapper.selectamount(bankinformation.getId());
|
|
|
+ Double fbeginamount = bankinformation.getBk_beginamount();
|
|
|
+ if (!(fbeginamount.equals(beginamount))){
|
|
|
+ DocBaseDTO docBaseDTO = getBaseDTOById(bid);
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("v_id",bid);
|
|
|
+ map.put("v_code", docBaseDTO.getCode());
|
|
|
+ map.put("v_type","bank");
|
|
|
+ map.put("v_companyid",BaseContextHolder.getCompanyId());
|
|
|
+ map.put("v_res","");
|
|
|
+ bankinformationMapper.check(map);
|
|
|
+ Object result = map.get("v_res");
|
|
|
+ if(!StringUtils.isEmpty(result)){
|
|
|
+ throw new BizException(BizExceptionCode.USING_EXISTS.getCode(),result.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Long id = bankinformationMapper.selectBankId(bankinformation.getBk_bankcode());
|
|
|
if (bktion != null){
|
|
|
if (id.equals(bankinformation.getId())){
|