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

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

@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.Optional; import java.util.Optional;
/** /**
@ -308,16 +309,20 @@ public class AssetTaskController extends BaseController {
StringBuilder a = new StringBuilder(); StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) { if (!assetCurrent.getGlymList().isEmpty()) {
assetCurrent.getGlymList().forEach(x -> { assetCurrent.getGlymList().forEach(x -> {
a.append(x); if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
a.append(x.getKey());
a.append(","); a.append(",");
}
}); });
} }
assetCurrent.setGlym(a.toString()); assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) { if (!assetCurrent.getGlIpList().isEmpty()) {
assetCurrent.getGlymList().forEach(x -> { assetCurrent.getGlIpList().forEach(x -> {
b.append(x); if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
b.append(x.getKey());
b.append(","); b.append(",");
}
}); });
} }
assetCurrent.setGlIp(b.toString()); 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.AssetApp;
import com.ruoyi.tc.entity.po.AssetAppCpPo; import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetEmailCpPo; 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.entity.request.AssetAppPageRequest;
import com.ruoyi.tc.mapper.AssetAppMapper; import com.ruoyi.tc.mapper.AssetAppMapper;
import com.ruoyi.tc.service.AssetAppCpService; import com.ruoyi.tc.service.AssetAppCpService;
@ -107,11 +108,15 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
@Override @Override
public Boolean edit(AssetApp assetApp) { public Boolean edit(AssetApp assetApp) {
updateById(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) { if (one != null) {
BeanUtil.copyProperties(assetApp, one); BeanUtil.copyProperties(assetApp, one);
one.setTaskId(unitService.selectTaskId(assetApp.getSsdw(), "4")); one.setTaskId(unitService.selectTaskId(assetApp.getSsdw(), "4"));
one.setAssetId(assetApp.getId()); one.setAssetId(assetApp.getId());
one.setStatus(0);
return assetAppCpService.updateById(one); return assetAppCpService.updateById(one);
}else { }else {
return true; return true;

@ -107,11 +107,13 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
@Override @Override
public Boolean edit(AssetEmail assetEmail) { public Boolean edit(AssetEmail assetEmail) {
updateById(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) { if (one != null) {
BeanUtil.copyProperties(assetEmail, one); BeanUtil.copyProperties(assetEmail, one);
one.setTaskId(unitService.selectTaskId(assetEmail.getSsdw(), "3")); one.setTaskId(unitService.selectTaskId(assetEmail.getSsdw(), "3"));
one.setAssetId(assetEmail.getId()); one.setAssetId(assetEmail.getId());
one.setStatus(0);
return assetEmailCpService.updateById(one); return assetEmailCpService.updateById(one);
}else { }else {
return true; return true;

@ -99,11 +99,13 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
@Override @Override
public Boolean edit(AssetMiniPrograms assetMiniPrograms) { public Boolean edit(AssetMiniPrograms assetMiniPrograms) {
updateById(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){ if (one!=null){
BeanUtil.copyProperties(assetMiniPrograms,one); BeanUtil.copyProperties(assetMiniPrograms,one);
one.setTaskId(unitService.selectTaskId(assetMiniPrograms.getSsdw(),"1")); one.setTaskId(unitService.selectTaskId(assetMiniPrograms.getSsdw(),"1"));
one.setAssetId(assetMiniPrograms.getId()); one.setAssetId(assetMiniPrograms.getId());
one.setStatus(0);
return assetMiniProgramsCpService.updateById(one); return assetMiniProgramsCpService.updateById(one);
}else{ }else{
return true; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.AssetOfficialAccount; 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.AssetOfficialAccountCpPo;
import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest; import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest;
import com.ruoyi.tc.mapper.AssetOfficialAccountMapper; import com.ruoyi.tc.mapper.AssetOfficialAccountMapper;
@ -102,11 +103,15 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
@Override @Override
public Boolean edit(AssetOfficialAccount assetOfficialAccount) { public Boolean edit(AssetOfficialAccount assetOfficialAccount) {
updateById(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) { if (one != null) {
BeanUtil.copyProperties(assetOfficialAccount, one); BeanUtil.copyProperties(assetOfficialAccount, one);
one.setTaskId(unitService.selectTaskId(assetOfficialAccount.getSsdw(), "2")); one.setTaskId(unitService.selectTaskId(assetOfficialAccount.getSsdw(), "2"));
one.setAssetId(assetOfficialAccount.getId()); one.setAssetId(assetOfficialAccount.getId());
one.setStatus(0);
return assetOfficialAccountCpService.updateById(one); return assetOfficialAccountCpService.updateById(one);
}else { }else {
return true; 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.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()); byId.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpPo::getAssetId, assetId).eq(UnitOtherConcatCpPo::getDelFlag, "0").eq(UnitOtherConcatCpPo::getTaskId, taskId).list());
List<Acomma> a1 = new ArrayList<>(); List<Acomma> a1 = new ArrayList<>();
if (byId.getGlym() != null) {
Arrays.asList(byId.getGlym().split(",")).forEach(x -> { Arrays.asList(byId.getGlym().split(",")).forEach(x -> {
Acomma acomma = new Acomma(); Acomma acomma = new Acomma();
acomma.setKey(x); acomma.setKey(x);
a1.add(acomma); a1.add(acomma);
}); });
byId.setGlymList(a1); byId.setGlymList(a1);
}
List<Acomma> a2 = new ArrayList<>(); List<Acomma> a2 = new ArrayList<>();
if (byId.getGlIp() != null) {
Arrays.asList(byId.getGlIp().split(",")).forEach(x -> { Arrays.asList(byId.getGlIp().split(",")).forEach(x -> {
Acomma acomma = new Acomma(); Acomma acomma = new Acomma();
acomma.setKey(x); acomma.setKey(x);
a2.add(acomma); a2.add(acomma);
}); });
byId.setGlIpList(a2); byId.setGlIpList(a2);
}
return byId; return byId;

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