|
|
|
@ -88,12 +88,14 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean add(AssetOfficialAccount assetOfficialAccount) {
|
|
|
|
|
List<Unit> list3 = unitService.lambdaQuery().eq(Unit::getNickName, assetOfficialAccount.getSsdw()).eq(Unit::getDelFlag, 0).list();
|
|
|
|
|
if (list3 == null || list3.isEmpty()) {
|
|
|
|
|
throw new ServiceException("请选择已有单位!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<AssetOfficialAccount> list1 = lambdaQuery().eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
|
|
|
|
|
// List<Unit> list3 = unitService.lambdaQuery()
|
|
|
|
|
// .eq(Unit::getNickName, assetOfficialAccount.getSsdw()).eq(Unit::getDelFlag, 0).list();
|
|
|
|
|
// if (list3 == null || list3.isEmpty()) {
|
|
|
|
|
// throw new ServiceException("请选择已有单位!");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
List<AssetOfficialAccount> list1 = lambdaQuery()
|
|
|
|
|
.eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
|
|
|
|
|
.eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list();
|
|
|
|
|
if (list1 != null&& !list1.isEmpty()){
|
|
|
|
|
throw new ServiceException("不允许新增重复资产!");
|
|
|
|
@ -145,15 +147,12 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean edit(AssetOfficialAccount assetOfficialAccount) {
|
|
|
|
|
|
|
|
|
|
List<Unit> list3 = unitService.lambdaQuery().eq(Unit::getNickName, assetOfficialAccount.getSsdw()).eq(Unit::getDelFlag, 0).list();
|
|
|
|
|
if (list3 == null || list3.isEmpty()) {
|
|
|
|
|
throw new ServiceException("请选择已有单位!");
|
|
|
|
|
List<AssetOfficialAccount> list4= lambdaQuery()
|
|
|
|
|
.eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
|
|
|
|
|
.eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list();
|
|
|
|
|
if (list4 != null&& !list4.isEmpty()){
|
|
|
|
|
throw new ServiceException("不允许新增重复资产!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (assetOfficialAccount.getCdList() != null && !assetOfficialAccount.getCdList().isEmpty()) {
|
|
|
|
|
StringBuilder a = new StringBuilder();
|
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
|