main
杜函宇 2 weeks ago
parent 578f116668
commit 285e716e75

@ -30,6 +30,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* (AssetCurrent)
@ -89,7 +90,7 @@ public class AssetCurrentController extends BaseController {
private AssetBusinessFormJyService assetBusinessFormJyService;
@Resource
private AssetSupplyChainJyService assetSupplyChainJyService ;
private AssetSupplyChainJyService assetSupplyChainJyService;
@Resource
private UnitOtherConcatJyservice unitOtherConcatJyservice;
@ -146,16 +147,20 @@ public class AssetCurrentController extends BaseController {
StringBuilder a = new StringBuilder();
if (assetCurrent.getGlymList() != null) {
assetCurrent.getGlymList().forEach(x -> {
a.append(x.getKey());
a.append(",");
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
a.append(x.getKey());
a.append(",");
}
});
}
assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder();
if (assetCurrent.getGlIpList() != null) {
assetCurrent.getGlymList().forEach(x -> {
b.append(x.getKey());
b.append(",");
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
b.append(x.getKey());
b.append(",");
}
});
}
assetCurrent.setGlIp(b.toString());
@ -186,11 +191,12 @@ public class AssetCurrentController extends BaseController {
//新增其他联系人
unitOtherConcatService.saveBatch(assetCurrent.getOtherConcat());
}
// 单位有进行中的任务时,管理端新增该单位下的资产则需同步至当前进行中的任务中。
//获取新增资产id
Long id = assetCurrent.getId();
Integer i = unitService.selectTaskId(assetCurrent.getDwmc(), "0");
if(i!=null){
if (i != null) {
//新增资产复制主表
AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo();
BeanUtil.copyProperties(assetCurrent, assetCurrentCpPo);
@ -228,9 +234,13 @@ public class AssetCurrentController extends BaseController {
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
}
}
return success();
return
success();
}
//=================================================
/**
*
*/
@ -347,12 +357,12 @@ public class AssetCurrentController extends BaseController {
@GetMapping("/lookInfo/{id}")
public AjaxResult lookInfo(@PathVariable Long id) {
AssetCurrentCpPo byId = assetCurrentCpService.getById(id);
byId.setGylxxList(assetSupplyChainCpService.lambdaQuery().eq(AssetSupplyChainCpPo::getAssetId ,byId.getId()).isNull(AssetSupplyChainCpPo::getTaskId).list());
byId.setGylxxList(assetSupplyChainCpService.lambdaQuery().eq(AssetSupplyChainCpPo::getAssetId, byId.getId()).isNull(AssetSupplyChainCpPo::getTaskId).list());
byId.setJcwlList(assetBasicNetworkCpService.lambdaQuery().eq(AssetBasicNetworkCpPo::getAssetId, byId.getId()).isNull(AssetBasicNetworkCpPo::getTaskId).list());
byId.setXjgywxt(assetBusinessFormCpService.lambdaQuery().eq(AssetBusinessFormCpPo::getAssetId, byId.getId()).isNull(AssetBusinessFormCpPo::getTaskId).one());
byId.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpPo::getAssetId, byId.getId()).isNull(UnitOtherConcatCpPo::getTaskId).list());
List<Acomma> a1 = new ArrayList<>();
if(byId.getGlym()!=null){
if (byId.getGlym() != null) {
Arrays.asList(byId.getGlym().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
@ -361,7 +371,7 @@ public class AssetCurrentController extends BaseController {
byId.setGlymList(a1);
}
List<Acomma> a2 = new ArrayList<>();
if(byId.getGlIp()!=null){
if (byId.getGlIp() != null) {
Arrays.asList(byId.getGlIp().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
@ -444,16 +454,20 @@ public class AssetCurrentController extends BaseController {
StringBuilder a = new StringBuilder();
if (assetCurrent.getGlymList() != null) {
assetCurrent.getGlymList().forEach(x -> {
a.append(x.getKey());
a.append(",");
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
a.append(x.getKey());
a.append(",");
}
});
}
assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder();
if (assetCurrent.getGlIpList() != null) {
assetCurrent.getGlymList().forEach(x -> {
b.append(x.getKey());
b.append(",");
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
b.append(x.getKey());
b.append(",");
}
});
}
assetCurrent.setGlIp(b.toString());
@ -704,8 +718,9 @@ public class AssetCurrentController extends BaseController {
AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo();
BeanUtil.copyProperties(as, assetCurrentCpPo);
assetCurrentCpPo.setTaskId(i);
assetCurrentCpPo.setStatus(0);
AssetCurrentCpPo two = assetCurrentCpService.lambdaQuery().eq(AssetCurrentCpPo::getXtmc, as.getXtmc())
.eq(AssetCurrentCpPo::getDwmc, as.getDwmc()).one();
.eq(AssetCurrentCpPo::getDwmc, as.getDwmc()).isNotNull(AssetCurrentCpPo::getTaskId).one();
if (two != null) {
assetCurrentCpPo.setId(two.getId());
assetCurrentCpService.updateById(assetCurrentCpPo);

@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
@ -308,16 +309,20 @@ public class AssetTaskController extends BaseController {
StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
assetCurrent.getGlymList().forEach(x -> {
a.append(x);
a.append(",");
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
a.append(x.getKey());
a.append(",");
}
});
}
assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) {
assetCurrent.getGlymList().forEach(x -> {
b.append(x);
b.append(",");
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
b.append(x.getKey());
b.append(",");
}
});
}
assetCurrent.setGlIp(b.toString());

@ -7,6 +7,7 @@ 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.AssetEmailCpPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo;
import com.ruoyi.tc.entity.request.AssetAppPageRequest;
import com.ruoyi.tc.mapper.AssetAppMapper;
import com.ruoyi.tc.service.AssetAppCpService;
@ -107,11 +108,15 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
@Override
public Boolean edit(AssetApp assetApp) {
updateById(assetApp);
AssetAppCpPo one = assetAppCpService.lambdaQuery().eq(AssetAppCpPo::getAssetId, assetApp.getId()).one();
AssetAppCpPo one = assetAppCpService.lambdaQuery()
.eq(AssetAppCpPo::getAssetId, assetApp.getId())
.isNotNull(AssetAppCpPo::getTaskId)
.one();
if (one != null) {
BeanUtil.copyProperties(assetApp, one);
one.setTaskId(unitService.selectTaskId(assetApp.getSsdw(), "4"));
one.setAssetId(assetApp.getId());
one.setStatus(0);
return assetAppCpService.updateById(one);
}else {
return true;

@ -107,11 +107,13 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
@Override
public Boolean edit(AssetEmail assetEmail) {
updateById(assetEmail);
AssetEmailCpPo one = assetEmailCpService.lambdaQuery().eq(AssetEmailCpPo::getAssetId, assetEmail.getId()).one();
AssetEmailCpPo one = assetEmailCpService.lambdaQuery().eq(AssetEmailCpPo::getAssetId, assetEmail.getId())
.isNotNull(AssetEmailCpPo::getTaskId).one();
if (one != null) {
BeanUtil.copyProperties(assetEmail, one);
one.setTaskId(unitService.selectTaskId(assetEmail.getSsdw(), "3"));
one.setAssetId(assetEmail.getId());
one.setStatus(0);
return assetEmailCpService.updateById(one);
}else {
return true;

@ -99,11 +99,13 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
@Override
public Boolean edit(AssetMiniPrograms assetMiniPrograms) {
updateById(assetMiniPrograms);
AssetMiniProgramsCpPo one = assetMiniProgramsCpService.lambdaQuery().eq(AssetMiniProgramsCpPo::getAssetId, assetMiniPrograms.getId()).one();
AssetMiniProgramsCpPo one = assetMiniProgramsCpService.lambdaQuery().eq(AssetMiniProgramsCpPo::getAssetId, assetMiniPrograms.getId())
.isNotNull(AssetMiniProgramsCpPo::getTaskId).one();
if (one!=null){
BeanUtil.copyProperties(assetMiniPrograms,one);
one.setTaskId(unitService.selectTaskId(assetMiniPrograms.getSsdw(),"1"));
one.setAssetId(assetMiniPrograms.getId());
one.setStatus(0);
return assetMiniProgramsCpService.updateById(one);
}else{
return true;

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.request.AssetOfficialAccountPageRequest;
import com.ruoyi.tc.mapper.AssetOfficialAccountMapper;
@ -102,11 +103,15 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
@Override
public Boolean edit(AssetOfficialAccount assetOfficialAccount) {
updateById(assetOfficialAccount);
AssetOfficialAccountCpPo one = assetOfficialAccountCpService.lambdaQuery().eq(AssetOfficialAccountCpPo::getAssetId, assetOfficialAccount.getId()).one();
AssetOfficialAccountCpPo one = assetOfficialAccountCpService.lambdaQuery()
.eq(AssetOfficialAccountCpPo::getAssetId, assetOfficialAccount.getId())
.isNotNull(AssetOfficialAccountCpPo::getTaskId)
.one();
if (one != null) {
BeanUtil.copyProperties(assetOfficialAccount, one);
one.setTaskId(unitService.selectTaskId(assetOfficialAccount.getSsdw(), "2"));
one.setAssetId(assetOfficialAccount.getId());
one.setStatus(0);
return assetOfficialAccountCpService.updateById(one);
}else {
return true;

@ -364,19 +364,23 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
byId.setXjgywxt(assetBusinessFormCpService.lambdaQuery().eq(AssetBusinessFormCpPo::getAssetId, assetId).eq(AssetBusinessFormCpPo::getDelFlag, "0").eq(AssetBusinessFormCpPo::getTaskId, taskId).one());
byId.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpPo::getAssetId, assetId).eq(UnitOtherConcatCpPo::getDelFlag, "0").eq(UnitOtherConcatCpPo::getTaskId, taskId).list());
List<Acomma> a1 = new ArrayList<>();
Arrays.asList(byId.getGlym().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
a1.add(acomma);
});
byId.setGlymList(a1);
if (byId.getGlym() != null) {
Arrays.asList(byId.getGlym().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
a1.add(acomma);
});
byId.setGlymList(a1);
}
List<Acomma> a2 = new ArrayList<>();
Arrays.asList(byId.getGlIp().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
a2.add(acomma);
});
byId.setGlIpList(a2);
if (byId.getGlIp() != null) {
Arrays.asList(byId.getGlIp().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
a2.add(acomma);
});
byId.setGlIpList(a2);
}
return byId;

@ -123,4 +123,12 @@ server:
min-spare-threads: 50
max-connections: 10000
accept-count: 1000
isTime: true
isTime: true
# token配置
token:
# 令牌自定义标识
header: Authorization
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 480
Loading…
Cancel
Save