diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java index 4b93d72..77dfb41 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java @@ -94,12 +94,6 @@ public class AssetAppController extends BaseController { throw new ServiceException("请选择已有单位!"); } - List list1 = assetAppService.lambdaQuery().eq(AssetApp::getSsdw, assetAppJyPo.getSsdw()) - .eq(AssetApp::getAppName, assetAppJyPo.getAppName()).list(); - if (list1 != null&& !list1.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } - AssetAppJyPo one = assetAppJyService.lambdaQuery().eq(AssetAppJyPo::getAppName,assetAppJyPo.getAppName()) .eq(AssetAppJyPo::getSsdw,assetAppJyPo.getSsdw()).isNull(AssetAppJyPo::getTaskId).one(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java index 307da13..3367725 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java @@ -262,12 +262,6 @@ public class AssetCurrentController extends BaseController { throw new ServiceException("请选择已有单位!"); } - List list1 = assetCurrentService.lambdaQuery().eq(AssetCurrent::getXtmc, assetCurrentJyPo.getXtmc()).eq(AssetCurrent::getDwmc, assetCurrentJyPo.getDwmc()).list(); - if (list1 != null&& !list1.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } - - AssetCurrentJyPo one = assetCurrentJyService.lambdaQuery().eq(AssetCurrentJyPo::getXtmc, assetCurrentJyPo.getXtmc()).eq(AssetCurrentJyPo::getDwmc, assetCurrentJyPo.getDwmc()).isNull(AssetCurrentJyPo::getTaskId).one(); assetCurrentJyPo.setAuditState("1"); assetCurrentJyPo.setAuditYy(null); @@ -541,11 +535,6 @@ public class AssetCurrentController extends BaseController { if (list == null || list.isEmpty()) { throw new ServiceException("请选择已有单位!"); } - - List list3 = assetCurrentService.lambdaQuery().eq(AssetCurrent::getXtmc, assetCurrent.getXtmc()).eq(AssetCurrent::getDwmc, assetCurrent.getDwmc()).list(); - if (list3 != null&& !list3.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } //保存未修改之前的单位名称 // AssetCurrent byId = assetCurrentService.getById(assetCurrent.getId()); StringBuilder a = new StringBuilder(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java index 47c8767..df29ce4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java @@ -96,11 +96,7 @@ public class AssetEmailController extends BaseController { throw new ServiceException("请选择已有单位!"); } - List list1 = assetEmailService.lambdaQuery().eq(AssetEmail::getSsdw, assetEmailJyPo.getSsdw()) - .eq(AssetEmail::getDzyxhz, assetEmailJyPo.getDzyxhz()).list(); - if (list1 != null&& !list1.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } + AssetEmailJyPo one = assetEmailJyService.lambdaQuery().eq(AssetEmailJyPo::getSsdw,assetEmailJyPo.getSsdw()) .eq(AssetEmailJyPo::getDzyxhz,assetEmailJyPo.getDzyxhz()).isNull(AssetEmailJyPo::getTaskId).one(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java index 261f5ed..e9e05a3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java @@ -101,11 +101,7 @@ public class AssetMiniProgramsController extends BaseController { throw new ServiceException("请选择已有单位!"); } - List list1 = assetMiniProgramsService.lambdaQuery().eq(AssetMiniPrograms::getSsdw, assetMiniProgramsJyPo.getSsdw()) - .eq(AssetMiniPrograms::getXcxmc, assetMiniProgramsJyPo.getXcxmc()).list(); - if (list1 != null&& !list1.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } + AssetMiniProgramsJyPo one = assetMiniProgramsJyService.lambdaQuery().eq(AssetMiniProgramsJyPo::getSsdw,assetMiniProgramsJyPo.getSsdw()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java index 75d9e64..b834fad 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java @@ -136,11 +136,7 @@ public class AssetOfficialAccountController { throw new ServiceException("请选择已有单位!"); } - List list1 = assetOfficialAccountService.lambdaQuery().eq(AssetOfficialAccount::getSsdw, ao.getSsdw()) - .eq(AssetOfficialAccount::getGzhmc, ao.getGzhmc()).list(); - if (list1 != null&& !list1.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } + if (ao.getCdList() != null && !ao.getCdList().isEmpty()) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java index f384683..ef3b3ce 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java @@ -132,11 +132,7 @@ public class AssetAppServiceImpl extends ServiceImpl i throw new ServiceException("请选择已有单位!"); } - List list1 = lambdaQuery().eq(AssetApp::getSsdw, assetApp.getSsdw()) - .eq(AssetApp::getAppName, assetApp.getAppName()).list(); - if (list1 != null&& !list1.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } + updateById(assetApp); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java index 82bad36..959a0f2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java @@ -131,11 +131,7 @@ public class AssetEmailServiceImpl extends ServiceImpl list3 = lambdaQuery().eq(AssetEmail::getSsdw, assetEmail.getSsdw()) - .eq(AssetEmail::getDzyxhz, assetEmail.getDzyxhz()).list(); - if (list3 != null&& !list3.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } + updateById(assetEmail); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java index e55ea6d..eb905f7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java @@ -121,11 +121,7 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl list1 = lambdaQuery().eq(AssetMiniPrograms::getSsdw, assetMiniPrograms.getSsdw()) - .eq(AssetMiniPrograms::getXcxmc, assetMiniPrograms.getXcxmc()).list(); - if (list1 != null&& !list1.isEmpty()){ - throw new ServiceException("不允许新增重复资产!"); - } + updateById(assetMiniPrograms); List list = assetMiniProgramsCpService.lambdaQuery() diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java index d4862e3..ca3299b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java @@ -151,11 +151,7 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl 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()) {