|
@@ -53,11 +53,6 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@Override
|
|
@Override
|
|
|
public boolean save(Bankinformation bankinformation){
|
|
public boolean save(Bankinformation bankinformation){
|
|
|
- //判断账户名称是否存在
|
|
|
|
|
- if (bankinformationMapper.getBankNameSame(bankinformation.getBk_bankname(), BaseContextHolder.getCompanyId()) > 0){
|
|
|
|
|
- throw new BizException(BIZ_SAME.getCode(),BIZ_SAME.getMessage());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
bankinformation.setCompanyId(BaseContextHolder.getCompanyId());
|
|
bankinformation.setCompanyId(BaseContextHolder.getCompanyId());
|
|
|
bankinformation.setBk_income(new Double(0));
|
|
bankinformation.setBk_income(new Double(0));
|
|
|
bankinformation.setBk_spending(new Double(0));
|
|
bankinformation.setBk_spending(new Double(0));
|
|
@@ -108,6 +103,16 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //判断账户名称是否存在
|
|
|
|
|
+ if (bankinformationMapper.getBankNameSame(bankinformation.getBk_bankname(), BaseContextHolder.getCompanyId()) > 1){
|
|
|
|
|
+ throw new BizException(BIZ_SAME.getCode(),BIZ_SAME.getMessage());
|
|
|
|
|
+ }else if (bankinformationMapper.getBankNameSame(bankinformation.getBk_bankname(), BaseContextHolder.getCompanyId()) == 1){
|
|
|
|
|
+ if (bankinformationMapper.getBankNameSameById(bankinformation.getBk_bankname(), docBaseDTO.getId(),
|
|
|
|
|
+ BaseContextHolder.getCompanyId()) == 1){
|
|
|
|
|
+ throw new BizException(BIZ_SAME.getCode(),BIZ_SAME.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// Long id = bankinformationMapper.selectBankId(bankinformation.getBk_bankcode(), BaseContextHolder.getCompanyId());
|
|
// Long id = bankinformationMapper.selectBankId(bankinformation.getBk_bankcode(), BaseContextHolder.getCompanyId());
|
|
|
if (bktion > 0){
|
|
if (bktion > 0){
|
|
|
bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
|
|
bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
|