|
|
@ -9,6 +9,10 @@ import com.ruoyi.common.exception.ServiceException;
|
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.tc.entity.*;
|
|
|
|
import com.ruoyi.tc.entity.*;
|
|
|
|
|
|
|
|
import com.ruoyi.tc.entity.po.AssetBasicNetworkCpPo;
|
|
|
|
|
|
|
|
import com.ruoyi.tc.entity.po.AssetCurrentCpPo;
|
|
|
|
|
|
|
|
import com.ruoyi.tc.entity.po.AssetSupplyChainCpPo;
|
|
|
|
|
|
|
|
import com.ruoyi.tc.entity.po.UnitOtherConcatCpPo;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetCurrentPageRequest;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetCurrentPageRequest;
|
|
|
|
import com.ruoyi.tc.service.*;
|
|
|
|
import com.ruoyi.tc.service.*;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
@ -52,6 +56,30 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private UnitOtherConcatService unitOtherConcatService;
|
|
|
|
private UnitOtherConcatService unitOtherConcatService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private AssetTaskService assetTaskService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private AssetCurrentCpService assetCurrentCpService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private AssetBusinessFormCpService assetBusinessFormCpService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private AssetSupplyChainCpService assetSupplyChainCpService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private AssetBasicNetworkCpService assetBasicNetworkCpService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private UnitOtherConcatCpService unitOtherConcatCpService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 分页查询所有数据
|
|
|
|
* 分页查询所有数据
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -160,6 +188,51 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
//新增其他联系人
|
|
|
|
//新增其他联系人
|
|
|
|
unitOtherConcatService.saveBatch(assetCurrent.getOtherConcat());
|
|
|
|
unitOtherConcatService.saveBatch(assetCurrent.getOtherConcat());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 单位有进行中的任务时,管理端新增该单位下的资产则需同步至当前进行中的任务中。
|
|
|
|
|
|
|
|
//获取新增资产id
|
|
|
|
|
|
|
|
Long id = assetCurrent.getId();
|
|
|
|
|
|
|
|
List<AssetTask> assetTasks = assetTaskService.taskList(assetCurrent.getDwmc());
|
|
|
|
|
|
|
|
if (assetTasks != null) {
|
|
|
|
|
|
|
|
for (AssetTask assetTask : assetTasks) {
|
|
|
|
|
|
|
|
//新增资产复制主表
|
|
|
|
|
|
|
|
AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo();
|
|
|
|
|
|
|
|
BeanUtil.copyProperties(assetCurrent, assetCurrentCpPo);
|
|
|
|
|
|
|
|
assetCurrentCpPo.setTaskId(assetTask.getId());
|
|
|
|
|
|
|
|
assetCurrentCpService.save(assetCurrentCpPo);
|
|
|
|
|
|
|
|
//新增新监管业务形态
|
|
|
|
|
|
|
|
//根据资产id查询新监管业务形态主表id
|
|
|
|
|
|
|
|
if (assetCurrent.getXjgywxt() != null) {
|
|
|
|
|
|
|
|
assetCurrentCpPo.getXjgywxt().setAssetId(id);
|
|
|
|
|
|
|
|
assetCurrentCpPo.getXjgywxt().setTaskId(assetTask.getId());
|
|
|
|
|
|
|
|
assetBusinessFormCpService.save(assetCurrentCpPo.getXjgywxt());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!assetCurrent.getGylxxList().isEmpty()) {
|
|
|
|
|
|
|
|
for (AssetSupplyChainCpPo items : assetCurrentCpPo.getGylxxList()) {
|
|
|
|
|
|
|
|
items.setAssetId(id);
|
|
|
|
|
|
|
|
items.setTaskId(assetTask.getId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//新增供应链
|
|
|
|
|
|
|
|
assetSupplyChainCpService.saveBatch(assetCurrentCpPo.getGylxxList());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!assetCurrent.getJcwlList().isEmpty()) {
|
|
|
|
|
|
|
|
for (AssetBasicNetworkCpPo items : assetCurrentCpPo.getJcwlList()) {
|
|
|
|
|
|
|
|
items.setAssetId(assetCurrent.getId());
|
|
|
|
|
|
|
|
items.setTaskId(assetTask.getId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//新增基础网络
|
|
|
|
|
|
|
|
assetBasicNetworkCpService.saveBatch(assetCurrentCpPo.getJcwlList());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!assetCurrent.getOtherConcat().isEmpty()) {
|
|
|
|
|
|
|
|
for (UnitOtherConcatCpPo items : assetCurrentCpPo.getOtherConcat()) {
|
|
|
|
|
|
|
|
items.setAssetId(assetCurrent.getId());
|
|
|
|
|
|
|
|
items.setTaskId(assetTask.getId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//新增其他联系人
|
|
|
|
|
|
|
|
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|