# Conflicts:
#	ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java
#	ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java
#	ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java
#	ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java
#	ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java
dongdingding
dongdingding 3 days ago
commit 10ca39cbb3

@ -2,6 +2,7 @@ package com.ruoyi.tc.controller;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
@ -10,17 +11,15 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tc.entity.AssetApp;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetAppJyPo;
import com.ruoyi.tc.entity.*;
import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.request.Acomma;
import com.ruoyi.tc.entity.request.AssetAppPageRequest;
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
import com.ruoyi.tc.entity.request.AssetAuditRequest;
import com.ruoyi.tc.service.AssetAppCpService;
import com.ruoyi.tc.service.AssetAppJyService;
import com.ruoyi.tc.service.AssetAppService;
import com.ruoyi.tc.service.AssetTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -31,8 +30,12 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static com.ruoyi.common.core.domain.AjaxResult.success;
/**
* (asset_app)
*
@ -57,6 +60,8 @@ public class AssetAppController extends BaseController {
@Resource
private AssetAppCpService assetAppCpService;
@Resource
private UnitService unitService;
/**
*
*
@ -79,7 +84,6 @@ public class AssetAppController extends BaseController {
return success(assetAppService.page(page, req));
}
//=================================================
/**
*
*/
@ -87,8 +91,20 @@ public class AssetAppController extends BaseController {
@PreAuthorize("@ss.hasAnyRoles('unit')")
@PostMapping("/unitEdit")
public AjaxResult unitEdit(@RequestBody @Valid AssetAppJyPo assetAppJyPo) {
AssetAppJyPo one = assetAppJyService.lambdaQuery().eq(AssetAppJyPo::getAppName, assetAppJyPo.getAppName())
.eq(AssetAppJyPo::getSsdw, assetAppJyPo.getSsdw()).isNull(AssetAppJyPo::getTaskId).one();
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetAppJyPo.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetApp> 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();
assetAppJyPo.setAuditState("1");
assetAppJyPo.setAuditYy(null);
if (one != null) {
@ -161,7 +177,7 @@ public class AssetAppController extends BaseController {
.isNotNull(AssetAppJyPo::getTaskId)
.ne(AssetAppJyPo::getStatus, 5)
.eq(AssetAppJyPo::getAssetId, byId.getAssetId()).one();
if (one != null) {
if(one!=null){
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long appId = one.getAppId();

@ -145,10 +145,16 @@ public class AssetCurrentController extends BaseController {
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@Transactional(rollbackFor = Exception.class)
public AjaxResult insert(@RequestBody @Valid AssetCurrent assetCurrent) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrent.getDwmc()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetCurrent> list1 = assetCurrentService.lambdaQuery().eq(AssetCurrent::getXtmc, assetCurrent.getXtmc()).eq(AssetCurrent::getDwmc, assetCurrent.getDwmc()).list();
if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
StringBuilder a = new StringBuilder();
if (assetCurrent.getGlymList() != null) {
assetCurrent.getGlymList().forEach(x -> {
@ -239,9 +245,7 @@ public class AssetCurrentController extends BaseController {
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
}
}
return
success();
return success();
}
//=================================================
@ -253,6 +257,17 @@ public class AssetCurrentController extends BaseController {
@PreAuthorize("@ss.hasAnyRoles('unit')")
@PostMapping("/unitEdit")
public AjaxResult unitEdit(@RequestBody @Valid AssetCurrentJyPo assetCurrentJyPo) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrentJyPo.getDwmc()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetCurrent> 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);
@ -522,6 +537,15 @@ public class AssetCurrentController extends BaseController {
}
}
}
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrent.getDwmc()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetCurrent> 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();
@ -544,10 +568,7 @@ public class AssetCurrentController extends BaseController {
});
}
assetCurrent.setGlIp(b.toString());
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrent.getDwmc()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
assetCurrentService.updateById(assetCurrent);

@ -10,14 +10,18 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tc.entity.AssetApp;
import com.ruoyi.tc.entity.AssetEmail;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetEmailJyPo;
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
import com.ruoyi.tc.entity.request.AssetAuditRequest;
import com.ruoyi.tc.entity.request.AssetEmailPageRequest;
import com.ruoyi.tc.service.*;
import com.ruoyi.tc.service.AssetEmailJyService;
import com.ruoyi.tc.service.AssetEmailService;
import com.ruoyi.tc.service.UnitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -46,6 +50,9 @@ public class AssetEmailController extends BaseController {
@Resource
private AssetEmailService assetEmailService;
@Resource
private UnitService unitService;
@Resource
private AssetEmailJyService assetEmailJyService;
@ -83,6 +90,18 @@ public class AssetEmailController extends BaseController {
@PreAuthorize("@ss.hasAnyRoles('unit')")
@PostMapping("/unitEdit")
public AjaxResult unitEdit(@RequestBody @Valid AssetEmailJyPo assetEmailJyPo) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetEmailJyPo.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetEmail> 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();
assetEmailJyPo.setAuditState("1");

@ -10,14 +10,23 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.AssetEmail;
import com.ruoyi.tc.entity.AssetMiniPrograms;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetAppJyPo;
import com.ruoyi.tc.entity.po.AssetEmailJyPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo;
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
import com.ruoyi.tc.entity.request.AssetAuditRequest;
import com.ruoyi.tc.entity.request.AssetMiniProgramsPageRequest;
import com.ruoyi.tc.service.*;
import com.ruoyi.tc.service.AssetMiniProgramsJyService;
import com.ruoyi.tc.service.AssetMiniProgramsService;
import com.ruoyi.tc.service.UnitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -54,6 +63,9 @@ public class AssetMiniProgramsController extends BaseController {
private AssetTaskService assetTaskService;
@Resource
private AssetMiniProgramsCpService assetMiniProgramsCpService;
@Resource
private UnitService unitService;
/**
*
*
@ -84,6 +96,18 @@ public class AssetMiniProgramsController extends BaseController {
@PreAuthorize("@ss.hasAnyRoles('unit')")
@PostMapping("/unitEdit")
public AjaxResult unitEdit(@RequestBody @Valid AssetMiniProgramsJyPo assetMiniProgramsJyPo) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetMiniProgramsJyPo.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetMiniPrograms> 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())
.eq(AssetMiniProgramsJyPo::getXcxmc,assetMiniProgramsJyPo.getXcxmc()).isNull(AssetMiniProgramsJyPo::getTaskId).one();
assetMiniProgramsJyPo.setAuditState("1");

@ -9,8 +9,13 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tc.entity.AssetEmail;
import com.ruoyi.tc.entity.AssetMiniPrograms;
import com.ruoyi.tc.entity.AssetOfficialAccount;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetAppJyPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountJyPo;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
@ -18,6 +23,9 @@ import com.ruoyi.tc.entity.request.AssetAuditRequest;
import com.ruoyi.tc.entity.request.AssetOfficialAccountMenu;
import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest;
import com.ruoyi.tc.service.*;
import com.ruoyi.tc.service.AssetOfficialAccountJyService;
import com.ruoyi.tc.service.AssetOfficialAccountService;
import com.ruoyi.tc.service.UnitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -53,6 +61,9 @@ public class AssetOfficialAccountController {
@Resource
private AssetOfficialAccountJyService assetOfficialAccountJyService;
@Resource
private UnitService unitService;
@Resource
private AssetTaskService assetTaskService;
@Resource
@ -120,6 +131,18 @@ public class AssetOfficialAccountController {
@PostMapping("/unitEdit")
public AjaxResult unitEdit(@RequestBody @Valid AssetOfficialAccountJyPo ao) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, ao.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetOfficialAccount> 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()) {
StringBuilder a = new StringBuilder();
StringBuilder b = new StringBuilder();

@ -37,6 +37,9 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
@Resource
private AssetTaskService assetTaskService;
/**
*
*
@ -91,11 +94,16 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
*/
@Override
public Boolean add(AssetApp assetApp) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw())
.eq(Unit::getDelFlag, 0).list();
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetApp> list1 = lambdaQuery().eq(AssetApp::getSsdw, assetApp.getSsdw())
.eq(AssetApp::getAppName, assetApp.getAppName()).list();
if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
save(assetApp);
AssetAppCpPo a = new AssetAppCpPo();
BeanUtil.copyProperties(assetApp, a);
@ -119,10 +127,16 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
public Boolean edit(AssetApp assetApp) {
AssetApp byId = getById(assetApp.getId());
List<Unit> list1 = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list1 == null || list1.isEmpty()) {
List<Unit> list2 = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list2 == null || list2.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetApp> list1 = lambdaQuery().eq(AssetApp::getSsdw, assetApp.getSsdw())
.eq(AssetApp::getAppName, assetApp.getAppName()).list();
if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
updateById(assetApp);

@ -39,6 +39,7 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
@Resource
private AssetTaskService assetTaskService;
/**
*
*
@ -93,11 +94,18 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
*/
@Override
public Boolean add(AssetEmail assetEmail) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetEmail.getSsdw())
.eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetEmail> list1 = lambdaQuery().eq(AssetEmail::getSsdw, assetEmail.getSsdw())
.eq(AssetEmail::getDzyxhz, assetEmail.getDzyxhz()).list();
if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
save(assetEmail);
AssetEmailCpPo a = new AssetEmailCpPo();
BeanUtil.copyProperties(assetEmail, a);
@ -123,7 +131,11 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
if (list1 == null || list1.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetEmail> list3 = lambdaQuery().eq(AssetEmail::getSsdw, assetEmail.getSsdw())
.eq(AssetEmail::getDzyxhz, assetEmail.getDzyxhz()).list();
if (list3 != null&& !list3.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
updateById(assetEmail);

@ -85,11 +85,16 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
*/
@Override
public Boolean add(AssetMiniPrograms assetMiniPrograms) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetMiniPrograms.getSsdw())
.eq(Unit::getDelFlag, 0).list();
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetMiniPrograms.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetMiniPrograms> list1 = lambdaQuery().eq(AssetMiniPrograms::getSsdw, assetMiniPrograms.getSsdw())
.eq(AssetMiniPrograms::getXcxmc, assetMiniPrograms.getXcxmc()).list();
if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
save(assetMiniPrograms);
AssetMiniProgramsCpPo assetMiniProgramsCpPo = new AssetMiniProgramsCpPo();
BeanUtil.copyProperties(assetMiniPrograms, assetMiniProgramsCpPo);
@ -111,11 +116,17 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
@Override
public Boolean edit(AssetMiniPrograms assetMiniPrograms) {
List<Unit> list1 = unitService.lambdaQuery().eq(Unit::getNickName, assetMiniPrograms.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list1 == null || list1.isEmpty()) {
List<Unit> list3 = unitService.lambdaQuery().eq(Unit::getNickName, assetMiniPrograms.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list3 == null || list3.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
List<AssetMiniPrograms> list1 = lambdaQuery().eq(AssetMiniPrograms::getSsdw, assetMiniPrograms.getSsdw())
.eq(AssetMiniPrograms::getXcxmc, assetMiniPrograms.getXcxmc()).list();
if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
updateById(assetMiniPrograms);
List<AssetMiniProgramsCpPo> list = assetMiniProgramsCpService.lambdaQuery()
.eq(AssetMiniProgramsCpPo::getAssetId, assetMiniPrograms.getId()).list();

@ -88,6 +88,17 @@ 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())
.eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list();
if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
}
if (assetOfficialAccount.getCdList() != null && !assetOfficialAccount.getCdList().isEmpty()) {
StringBuilder a = new StringBuilder();
StringBuilder b = new StringBuilder();
@ -135,6 +146,18 @@ 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();

Loading…
Cancel
Save