|
|
|
@ -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)表控制层
|
|
|
|
@ -146,16 +147,20 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
StringBuilder a = new StringBuilder();
|
|
|
|
|
if (assetCurrent.getGlymList() != null) {
|
|
|
|
|
assetCurrent.getGlymList().forEach(x -> {
|
|
|
|
|
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 -> {
|
|
|
|
|
assetCurrent.getGlIpList().forEach(x -> {
|
|
|
|
|
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
|
b.append(x.getKey());
|
|
|
|
|
b.append(",");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
assetCurrent.setGlIp(b.toString());
|
|
|
|
@ -186,6 +191,7 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
//新增其他联系人
|
|
|
|
|
unitOtherConcatService.saveBatch(assetCurrent.getOtherConcat());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 单位有进行中的任务时,管理端新增该单位下的资产则需同步至当前进行中的任务中。
|
|
|
|
|
//获取新增资产id
|
|
|
|
|
Long id = assetCurrent.getId();
|
|
|
|
@ -228,9 +234,13 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return success();
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
success();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//=================================================
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 单位自编辑进行校验
|
|
|
|
|
*/
|
|
|
|
@ -444,16 +454,20 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
StringBuilder a = new StringBuilder();
|
|
|
|
|
if (assetCurrent.getGlymList() != null) {
|
|
|
|
|
assetCurrent.getGlymList().forEach(x -> {
|
|
|
|
|
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 -> {
|
|
|
|
|
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);
|
|
|
|
|