编辑同步任务

dongdingding
杜函宇 5 days ago
parent f53e09d53c
commit 4b9d4a5622

@ -50,6 +50,7 @@ public class AssetCurrentController extends BaseController {
@Resource
private AssetSupplyChainService assetSupplyChainService;
@Resource
private AssetBasicNetworkService assetBasicNetworkService;
@ -569,6 +570,7 @@ public class AssetCurrentController extends BaseController {
}
//================================
//根据未修改之前的单位名称去寻找正在进行中的任务,报废的任务,单位自编辑的任务
List<AssetCurrentCpPo> list1 = assetCurrentCpService.lambdaQuery().eq(AssetCurrentCpPo::getId, assetCurrent.getId()).list();
list1.forEach(x -> {

@ -6,12 +6,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.tc.entity.AssetApp;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.request.AssetAppPageRequest;
import com.ruoyi.tc.mapper.AssetAppMapper;
import com.ruoyi.tc.service.AssetAppCpService;
import com.ruoyi.tc.service.AssetAppService;
import com.ruoyi.tc.service.AssetTaskService;
import com.ruoyi.tc.service.UnitService;
import org.springframework.stereotype.Service;
@ -32,6 +34,8 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
@Resource
private AssetAppCpService assetAppCpService;
@Resource
private AssetTaskService assetTaskService;
/**
*
*
@ -112,7 +116,15 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
*/
@Override
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()) {
throw new ServiceException("请选择已有单位!");
}
updateById(assetApp);
List<AssetAppCpPo> list = assetAppCpService.lambdaQuery()
.eq(AssetAppCpPo::getAssetId, assetApp.getId()).list();
list.forEach(x -> {

@ -6,12 +6,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.tc.entity.AssetEmail;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetEmailCpPo;
import com.ruoyi.tc.entity.request.AssetEmailPageRequest;
import com.ruoyi.tc.mapper.AssetEmailMapper;
import com.ruoyi.tc.service.AssetEmailCpService;
import com.ruoyi.tc.service.AssetEmailService;
import com.ruoyi.tc.service.AssetTaskService;
import com.ruoyi.tc.service.UnitService;
import org.springframework.stereotype.Service;
@ -32,6 +34,8 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
@Resource
private AssetEmailCpService assetEmailCpService;
@Resource
private AssetTaskService assetTaskService;
/**
*
@ -112,7 +116,15 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
*/
@Override
public Boolean edit(AssetEmail assetEmail) {
List<Unit> list1 = unitService.lambdaQuery().eq(Unit::getNickName, assetEmail.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list1 == null || list1.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
updateById(assetEmail);
List<AssetEmailCpPo> list = assetEmailCpService.lambdaQuery()
.eq(AssetEmailCpPo::getAssetId, assetEmail.getId()).list();
list.forEach(x -> {

@ -106,6 +106,12 @@ 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()) {
throw new ServiceException("请选择已有单位!");
}
updateById(assetMiniPrograms);
List<AssetMiniProgramsCpPo> list = assetMiniProgramsCpService.lambdaQuery()
.eq(AssetMiniProgramsCpPo::getAssetId, assetMiniPrograms.getId()).list();

@ -108,6 +108,12 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
*/
@Override
public Boolean edit(AssetOfficialAccount assetOfficialAccount) {
List<Unit> list1 = unitService.lambdaQuery().eq(Unit::getNickName, assetOfficialAccount.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list1 == null || list1.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
updateById(assetOfficialAccount);
List<AssetOfficialAccountCpPo> list = assetOfficialAccountCpService.lambdaQuery()
.eq(AssetOfficialAccountCpPo::getAssetId, assetOfficialAccount.getId()).list();

Loading…
Cancel
Save