同步任务

main
杜函宇 1 week ago
parent dea635440c
commit 17648ac0fd

@ -156,6 +156,7 @@ public class AssetAppController extends BaseController {
//如果有任务也修改任务这边
AssetAppJyPo one = assetAppJyService.lambdaQuery()
.isNotNull(AssetAppJyPo::getTaskId)
.eq(AssetAppJyPo::getStatus,"1")
.eq(AssetAppJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer taskId = one.getTaskId();

@ -442,6 +442,7 @@ public class AssetCurrentController extends BaseController {
//如果有任务也修改任务这边
AssetCurrentCpPo one = assetCurrentCpService.lambdaQuery()
.isNotNull(AssetCurrentCpPo::getTaskId)
.eq(AssetCurrentCpPo::getStatus,"1")
.eq(AssetCurrentCpPo::getId, byId.getId()).one();
if(one!=null){
Integer taskId = one.getTaskId();
@ -453,22 +454,20 @@ public class AssetCurrentController extends BaseController {
one.setAuditYy(null);
assetCurrentCpService.updateById(one);
QueryWrapper<AssetSupplyChainCpPo> queryWrapper2 = new QueryWrapper<>();
queryWrapper2.eq("asset_id", one.getId());
queryWrapper2.isNull("task_id");
queryWrapper2.eq("task_id",taskId);
assetSupplyChainCpService.remove(queryWrapper2);
QueryWrapper<AssetBasicNetworkCpPo> queryWrapper3 = new QueryWrapper<>();
queryWrapper3.eq("asset_id", one.getId());
queryWrapper3.isNull("task_id");
queryWrapper3.eq("task_id",taskId);
assetBasicNetworkCpService.remove(queryWrapper3);
QueryWrapper<AssetBusinessFormCpPo> queryWrapper4 = new QueryWrapper<>();
queryWrapper4.eq("asset_id", one.getId());
queryWrapper4.isNull("task_id");
queryWrapper4.eq("task_id",taskId);
assetBusinessFormCpService.remove(queryWrapper4);
QueryWrapper<UnitOtherConcatCpPo> queryWrapper5 = new QueryWrapper<>();
queryWrapper5.isNull("task_id");
queryWrapper5.eq("task_id",taskId);
queryWrapper5.eq("asset_id", one.getId());
unitOtherConcatCpService.remove(queryWrapper5);
list.forEach(x -> {
@ -560,64 +559,69 @@ public class AssetCurrentController extends BaseController {
}
//================================
QueryWrapper<AssetCurrentCpPo> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("id", assetCurrent.getId());
assetCurrentCpService.remove(queryWrapper1);
Integer i = unitService.selectTaskId(assetCurrent.getDwmc(), "0");
AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo();
BeanUtil.copyProperties(assetCurrent, assetCurrentCpPo);
assetCurrentCpPo.setTaskId(i);
assetCurrentCpService.save(assetCurrentCpPo);
if(i!=null){
QueryWrapper<AssetSupplyChainCpPo> queryWrapper2 = new QueryWrapper<>();
queryWrapper2.eq("asset_id", assetCurrent.getId());
queryWrapper2.isNotNull("task_id");
assetSupplyChainCpService.remove(queryWrapper2);
QueryWrapper<AssetBasicNetworkCpPo> queryWrapper3 = new QueryWrapper<>();
queryWrapper3.isNotNull("task_id");
queryWrapper3.eq("asset_id", assetCurrent.getId());
assetBasicNetworkCpService.remove(queryWrapper3);
QueryWrapper<AssetBusinessFormCpPo> queryWrapper4 = new QueryWrapper<>();
queryWrapper4.isNotNull("task_id");
queryWrapper4.eq("asset_id", assetCurrent.getId());
assetBusinessFormCpService.remove(queryWrapper4);
QueryWrapper<UnitOtherConcatCpPo> queryWrapper5 = new QueryWrapper<>();
queryWrapper5.eq("asset_id", assetCurrent.getId());
queryWrapper5.isNotNull("task_id");
unitOtherConcatCpService.remove(queryWrapper5);
QueryWrapper<AssetCurrentCpPo> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("id", assetCurrent.getId());
queryWrapper1.eq("status","1");
queryWrapper1.eq("task_id",i);
assetCurrentCpService.remove(queryWrapper1);
if (assetCurrent.getXjgywxt() != null) {
assetCurrentCpPo.getXjgywxt().setAssetId(assetCurrent.getId());
assetCurrentCpPo.getXjgywxt().setTaskId(i);
assetBusinessFormCpService.save(assetCurrentCpPo.getXjgywxt());
}
if (assetCurrent.getGylxxList() != null) {
for (AssetSupplyChainCpPo items : assetCurrentCpPo.getGylxxList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(i);
AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo();
BeanUtil.copyProperties(assetCurrent, assetCurrentCpPo);
assetCurrentCpPo.setTaskId(i);
assetCurrentCpPo.setStatus(1);
assetCurrentCpService.save(assetCurrentCpPo);
QueryWrapper<AssetSupplyChainCpPo> queryWrapper2 = new QueryWrapper<>();
queryWrapper2.eq("asset_id", assetCurrent.getId());
queryWrapper2.eq("task_id",i);
assetSupplyChainCpService.remove(queryWrapper2);
QueryWrapper<AssetBasicNetworkCpPo> queryWrapper3 = new QueryWrapper<>();
queryWrapper3.eq("task_id",i);
queryWrapper3.eq("asset_id", assetCurrent.getId());
assetBasicNetworkCpService.remove(queryWrapper3);
QueryWrapper<AssetBusinessFormCpPo> queryWrapper4 = new QueryWrapper<>();
queryWrapper4.eq("task_id",i);
queryWrapper4.eq("asset_id", assetCurrent.getId());
assetBusinessFormCpService.remove(queryWrapper4);
QueryWrapper<UnitOtherConcatCpPo> queryWrapper5 = new QueryWrapper<>();
queryWrapper5.eq("asset_id", assetCurrent.getId());
queryWrapper5.eq("task_id",i);
unitOtherConcatCpService.remove(queryWrapper5);
if (assetCurrent.getXjgywxt() != null) {
assetCurrentCpPo.getXjgywxt().setAssetId(assetCurrent.getId());
assetCurrentCpPo.getXjgywxt().setTaskId(i);
assetBusinessFormCpService.save(assetCurrentCpPo.getXjgywxt());
}
//新增供应链
assetSupplyChainCpService.saveBatch(assetCurrentCpPo.getGylxxList());
}
if (assetCurrent.getJcwlList() != null) {
for (AssetBasicNetworkCpPo items : assetCurrentCpPo.getJcwlList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(i);
if (assetCurrent.getGylxxList() != null) {
for (AssetSupplyChainCpPo items : assetCurrentCpPo.getGylxxList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(i);
}
//新增供应链
assetSupplyChainCpService.saveBatch(assetCurrentCpPo.getGylxxList());
}
//新增基础网络
assetBasicNetworkCpService.saveBatch(assetCurrentCpPo.getJcwlList());
}
if (assetCurrent.getOtherConcat() != null) {
for (UnitOtherConcatCpPo items : assetCurrentCpPo.getOtherConcat()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(i);
if (assetCurrent.getJcwlList() != null) {
for (AssetBasicNetworkCpPo items : assetCurrentCpPo.getJcwlList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(i);
}
//新增基础网络
assetBasicNetworkCpService.saveBatch(assetCurrentCpPo.getJcwlList());
}
if (assetCurrent.getOtherConcat() != null) {
for (UnitOtherConcatCpPo items : assetCurrentCpPo.getOtherConcat()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(i);
}
//新增其他联系人
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
}
//新增其他联系人
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
}
}
return success();
}

@ -150,6 +150,7 @@ public class AssetEmailController extends BaseController {
//如果有任务也修改任务这边
AssetEmailJyPo one = assetEmailJyService.lambdaQuery()
.isNotNull(AssetEmailJyPo::getTaskId)
.eq(AssetEmailJyPo::getStatus,"1")
.eq(AssetEmailJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer taskId = one.getTaskId();

@ -12,6 +12,7 @@ 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.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetEmailJyPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo;
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
@ -151,6 +152,7 @@ public class AssetMiniProgramsController extends BaseController {
//如果有任务也修改任务这边
AssetMiniProgramsJyPo one = assetMiniProgramsJyService.lambdaQuery()
.isNotNull(AssetMiniProgramsJyPo::getTaskId)
.eq(AssetMiniProgramsJyPo::getStatus,"1")
.eq(AssetMiniProgramsJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer taskId = one.getTaskId();

@ -11,6 +11,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tc.entity.AssetMiniPrograms;
import com.ruoyi.tc.entity.AssetOfficialAccount;
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.request.AssetAuditPageRequest;
@ -165,6 +166,7 @@ public class AssetOfficialAccountController {
//如果有任务也修改任务这边
AssetOfficialAccountJyPo one = assetOfficialAccountJyService.lambdaQuery()
.isNotNull(AssetOfficialAccountJyPo::getTaskId)
.eq(AssetOfficialAccountJyPo::getStatus,"1")
.eq(AssetOfficialAccountJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer taskId = one.getTaskId();

@ -31,7 +31,7 @@ public class AssetCurrentJyPo extends BaseClass implements Serializable {
private static final long serialVersionUID = 1L;
AssetCurrentCpPo
/**
* id
*/
@TableId(type = IdType.AUTO,value = "current_id")

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.AssetApp;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetAppJyPo;
import com.ruoyi.tc.entity.po.AssetEmailCpPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo;
import com.ruoyi.tc.entity.request.AssetAppPageRequest;
@ -110,6 +111,7 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
updateById(assetApp);
AssetAppCpPo one = assetAppCpService.lambdaQuery()
.eq(AssetAppCpPo::getAssetId, assetApp.getId())
.eq(AssetAppCpPo::getStatus,"1")
.isNotNull(AssetAppCpPo::getTaskId)
.one();
if (one != null) {

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.AssetEmail;
import com.ruoyi.tc.entity.po.AssetEmailCpPo;
import com.ruoyi.tc.entity.po.AssetEmailJyPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsCpPo;
import com.ruoyi.tc.entity.request.AssetEmailPageRequest;
import com.ruoyi.tc.mapper.AssetEmailMapper;
@ -107,7 +108,9 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
@Override
public Boolean edit(AssetEmail assetEmail) {
updateById(assetEmail);
AssetEmailCpPo one = assetEmailCpService.lambdaQuery().eq(AssetEmailCpPo::getAssetId, assetEmail.getId())
AssetEmailCpPo one = assetEmailCpService.lambdaQuery()
.eq(AssetEmailCpPo::getAssetId, assetEmail.getId())
.eq(AssetEmailCpPo::getStatus,"1")
.isNotNull(AssetEmailCpPo::getTaskId).one();
if (one != null) {
BeanUtil.copyProperties(assetEmail, one);

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.AssetMiniPrograms;
import com.ruoyi.tc.entity.po.AssetMiniProgramsCpPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo;
import com.ruoyi.tc.entity.request.AssetMiniProgramsPageRequest;
import com.ruoyi.tc.mapper.AssetMiniProgramsMapper;
import com.ruoyi.tc.service.AssetMiniProgramsCpService;
@ -99,7 +100,9 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
@Override
public Boolean edit(AssetMiniPrograms assetMiniPrograms) {
updateById(assetMiniPrograms);
AssetMiniProgramsCpPo one = assetMiniProgramsCpService.lambdaQuery().eq(AssetMiniProgramsCpPo::getAssetId, assetMiniPrograms.getId())
AssetMiniProgramsCpPo one = assetMiniProgramsCpService.lambdaQuery()
.eq(AssetMiniProgramsCpPo::getAssetId, assetMiniPrograms.getId())
.eq(AssetMiniProgramsCpPo::getStatus,"1")
.isNotNull(AssetMiniProgramsCpPo::getTaskId).one();
if (one!=null){
BeanUtil.copyProperties(assetMiniPrograms,one);

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.AssetOfficialAccount;
import com.ruoyi.tc.entity.po.AssetEmailCpPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountJyPo;
import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest;
import com.ruoyi.tc.mapper.AssetOfficialAccountMapper;
import com.ruoyi.tc.service.AssetOfficialAccountCpService;
@ -105,6 +106,7 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
updateById(assetOfficialAccount);
AssetOfficialAccountCpPo one = assetOfficialAccountCpService.lambdaQuery()
.eq(AssetOfficialAccountCpPo::getAssetId, assetOfficialAccount.getId())
.eq(AssetOfficialAccountCpPo::getStatus,"1")
.isNotNull(AssetOfficialAccountCpPo::getTaskId)
.one();
if (one != null) {

@ -58,9 +58,9 @@ spring:
servlet:
multipart:
# 单个文件大小
max-file-size: 10MB
max-file-size: 30MB
# 设置总上传的文件大小
max-request-size: 20MB
max-request-size: 35MB
# 服务模块
devtools:
restart:

Loading…
Cancel
Save