杜函宇 1 month ago
commit 70dec97f5a

@ -222,22 +222,7 @@ public class AssetAppController extends BaseController {
@Log(title = "编辑app数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AssetApp assetApp) {
//根据资产id查询资产子表,判断是否有此资产进行中的任务,如果资产状态是已关停与修改的数据不符,则修改任务中的资产状态
AssetAppCpPo assetAppCpPo = assetAppCpService.findDwmc(assetApp.getId());
if (assetAppCpPo != null) {
//查询任务是否为进行中
AssetTask assetTask = assetTaskService.findByTaskId(assetAppCpPo.getTaskId());
if (assetTask.getTaskStatus().equals(1)) {
if (assetAppCpPo.getStatus()==5 ) {
//修改任务中资产状态
assetAppCpPo.setStatus(0);
assetAppCpPo.setBtgyy(null);
assetTask.setTaskStatus(1);
assetTaskService.update(assetTask);
assetAppCpService.updateById(assetAppCpPo);
}
}
}
return success(assetAppService.edit(assetApp));
}

@ -516,21 +516,24 @@ public class AssetCurrentController extends BaseController {
@PutMapping
public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) {
//根据资产id查询资产子表,判断是否有此资产进行中的任务,如果资产状态是已关停与修改的数据不符,则修改任务中的资产状态
AssetCurrentCpPo currentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId());
List<AssetCurrentCpPo> currentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId());
if (currentCpPo != null) {
for (AssetCurrentCpPo s:currentCpPo) {
//查询任务是否为进行中
AssetTask assetTask = assetTaskService.findByTaskId(currentCpPo.getTaskId());
if (assetTask.getTaskStatus().equals(1)) {
if (currentCpPo.getStatus() == 5) {
AssetTask assetTask = assetTaskService.findByTaskId(s.getTaskId());
if (assetTask.getTaskStatus().equals(1)){
if (s.getStatus()==5 ){
//修改任务中资产状态
currentCpPo.setStatus(0);
currentCpPo.setBtgyy(null);
s.setStatus(0);
s.setBtgyy(null);
assetTask.setTaskStatus(1);
assetTaskService.update(assetTask);
assetCurrentCpService.updateById(currentCpPo);
assetCurrentCpService.updateById(s);
}
}
}
}
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrent.getDwmc()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
@ -679,17 +682,20 @@ public class AssetCurrentController extends BaseController {
});
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetCurrent.getDwmc());
if (assetTask != null) {
if (assetTask == null) {
delete(assetCurrent);
} else {
//根据资产id查询旧资产
AssetCurrentCpPo assetCurrentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId());
if (assetCurrentCpPo != null) {
assetCurrentCpPo.setDwmc(assetCurrent.getDwmc());
assetCurrentCpPo.setTaskId(assetTask.getId());
List<AssetCurrentCpPo> assetCurrentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId());
for (AssetCurrentCpPo s:assetCurrentCpPo){
if (s!=null){
s.setDwmc(assetCurrent.getDwmc());
s.setTaskId(assetTask.getId());
//修改
assetCurrentCpService.updateById(assetCurrentCpPo);
assetCurrentCpService.updateById(s);
}
}
}

@ -7,15 +7,11 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tc.entity.*;
import com.ruoyi.tc.entity.history.*;
import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.request.AssestTaskXqRequest;
import com.ruoyi.tc.entity.request.AssetCurrentShRequest;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.request.AssetdwHcRequest;
import com.ruoyi.tc.entity.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse;
import com.ruoyi.tc.entity.response.AssetdwHcBlResponse;
import com.ruoyi.tc.entity.response.AssetdwHcResponse;
import com.ruoyi.tc.entity.request.*;
import com.ruoyi.tc.entity.response.*;
import com.ruoyi.tc.historyService.*;
import com.ruoyi.tc.mapper.AssetTaskMapper;
import com.ruoyi.tc.service.*;
import io.swagger.annotations.Api;
@ -28,9 +24,12 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
/**
* (AssetTask)
@ -125,6 +124,39 @@ public class AssetTaskController extends BaseController {
@Resource
private AssetTaskMapper assetTaskDao;
@Resource
private AssetCurrentHistoryService assetCurrentHistoryService;
@Resource
private AssetAppHistoryService assetAppHistoryService;
@Resource
private AssetBasicNetworkHistoryService assetBasicNetworkHistoryService;
@Resource
private AssetBusinessFormHistoryService assetBusinessFormHistoryService;
@Resource
private AssetEmailHistoryService assetEmailHistoryService;
@Resource
private AssetMiniProgramsHistoryService assetMiniProgramsHistoryService;
@Resource
private AssetOfficialAccountHistoryService assetOfficialAccountHistoryService;
@Resource
private AssetSupplyChainHistoryService assetSupplyChainHistoryService;
@Resource
private UnitOtherConcatHistoryService unitOtherConcatHistoryService;
/**
*
*
@ -364,6 +396,98 @@ public class AssetTaskController extends BaseController {
//新增其他联系人
unitOtherConcatCpService.saveBatch(assetCurrent.getOtherConcat());
}
// 获取当前时间
LocalDateTime localDateTime = LocalDateTime.now();
// 转换为 Date
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
//新增历史记录
StringBuilder c = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
assetCurrent.getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
c.append(x.getKey());
c.append(",");
}
});
}
assetCurrent.setGlym(a.toString());
StringBuilder d = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) {
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
d.append(x.getKey());
d.append(",");
}
});
}
assetCurrent.setGlIp(b.toString());
assetCurrent.setStatus(assetCurrent.getStatus());
AssetCurrentHistory assetCurrentHistory = new AssetCurrentHistory();
// 设置更新时间
assetCurrent.setUpdateTime(date);
BeanUtils.copyProperties(assetCurrent, assetCurrentHistory);
assetCurrentHistoryService.save(assetCurrentHistory);
//新增新监管业务形态历史表
if (assetCurrent.getXjgywxt() != null) {
assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId());
assetCurrent.getXjgywxt().setTaskId(assetCurrent.getTaskId());
AssetBusinessFormHistory assetBusinessFormHistory = new AssetBusinessFormHistory();
assetBusinessFormHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(assetCurrent.getXjgywxt(), assetBusinessFormHistory);
assetBusinessFormHistoryService.save(assetBusinessFormHistory);
}
if (!assetCurrent.getGylxxList().isEmpty()) {
for (AssetSupplyChainCpPo items : assetCurrent.getGylxxList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增供应链历史表
List<AssetSupplyChainHistory> assetSupplyChainHistoryList = assetCurrent.getGylxxList().stream()
.map(cpPo -> {
AssetSupplyChainHistory assetSupplyChainHistory = new AssetSupplyChainHistory();
assetSupplyChainHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetSupplyChainHistory); // 复制属性
return assetSupplyChainHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetSupplyChainHistoryService.saveBatch(assetSupplyChainHistoryList);
}
if (!assetCurrent.getJcwlList().isEmpty()) {
for (AssetBasicNetworkCpPo items : assetCurrent.getJcwlList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增基础网络历史表
List<AssetBasicNetworkHistory> assetSupplyChainHistoryList = assetCurrent.getJcwlList().stream()
.map(cpPo -> {
AssetBasicNetworkHistory assetBasicNetworkHistory = new AssetBasicNetworkHistory();
assetBasicNetworkHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetBasicNetworkHistory); // 复制属性
return assetBasicNetworkHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetBasicNetworkHistoryService.saveBatch(assetSupplyChainHistoryList);
}
if (!assetCurrent.getOtherConcat().isEmpty()) {
for (UnitOtherConcatCpPo items : assetCurrent.getOtherConcat()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增其他联系人
List<UnitOtherConcatHistory> unitOtherConcatHistoryList = assetCurrent.getOtherConcat().stream()
.map(cpPo -> {
UnitOtherConcatHistory unitOtherConcatHistory = new UnitOtherConcatHistory();
unitOtherConcatHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, unitOtherConcatHistory); // 复制属性
return unitOtherConcatHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
unitOtherConcatHistoryService.saveBatch(unitOtherConcatHistoryList);
}
return success();
}
@ -450,7 +574,98 @@ public class AssetTaskController extends BaseController {
//新增其他联系人
unitOtherConcatJyservice.saveBatch(assetCurrent.getOtherConcat());
}
// 获取当前时间
LocalDateTime localDateTime = LocalDateTime.now();
// 转换为 Date
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
//新增历史记录
StringBuilder c = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
assetCurrent.getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
c.append(x.getKey());
c.append(",");
}
});
}
assetCurrent.setGlym(a.toString());
StringBuilder d = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) {
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
d.append(x.getKey());
d.append(",");
}
});
}
assetCurrent.setGlIp(b.toString());
assetCurrent.setStatus(assetCurrent.getStatus());
AssetCurrentHistory assetCurrentHistory = new AssetCurrentHistory();
// 设置更新时间
assetCurrent.setUpdateTime(date);
BeanUtils.copyProperties(assetCurrent, assetCurrentHistory);
assetCurrentHistoryService.save(assetCurrentHistory);
//新增新监管业务形态历史表
if (assetCurrent.getXjgywxt() != null) {
assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId());
assetCurrent.getXjgywxt().setTaskId(assetCurrent.getTaskId());
AssetBusinessFormHistory assetBusinessFormHistory = new AssetBusinessFormHistory();
assetBusinessFormHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(assetCurrent.getXjgywxt(), assetBusinessFormHistory);
assetBusinessFormHistoryService.save(assetBusinessFormHistory);
}
if (!assetCurrent.getGylxxList().isEmpty()) {
for (AssetSupplyChainJyPo items : assetCurrent.getGylxxList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增供应链历史表
List<AssetSupplyChainHistory> assetSupplyChainHistoryList = assetCurrent.getGylxxList().stream()
.map(cpPo -> {
AssetSupplyChainHistory assetSupplyChainHistory = new AssetSupplyChainHistory();
assetSupplyChainHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetSupplyChainHistory); // 复制属性
return assetSupplyChainHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetSupplyChainHistoryService.saveBatch(assetSupplyChainHistoryList);
}
if (!assetCurrent.getJcwlList().isEmpty()) {
for (AssetBasicNetworkJyPo items : assetCurrent.getJcwlList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增基础网络历史表
List<AssetBasicNetworkHistory> assetSupplyChainHistoryList = assetCurrent.getJcwlList().stream()
.map(cpPo -> {
AssetBasicNetworkHistory assetBasicNetworkHistory = new AssetBasicNetworkHistory();
assetBasicNetworkHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetBasicNetworkHistory); // 复制属性
return assetBasicNetworkHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetBasicNetworkHistoryService.saveBatch(assetSupplyChainHistoryList);
}
if (!assetCurrent.getOtherConcat().isEmpty()) {
for (UnitOtherConcatJyPo items : assetCurrent.getOtherConcat()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增其他联系人
List<UnitOtherConcatHistory> unitOtherConcatHistoryList = assetCurrent.getOtherConcat().stream()
.map(cpPo -> {
UnitOtherConcatHistory unitOtherConcatHistory = new UnitOtherConcatHistory();
unitOtherConcatHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, unitOtherConcatHistory); // 复制属性
return unitOtherConcatHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
unitOtherConcatHistoryService.saveBatch(unitOtherConcatHistoryList);
}
return success();
}
@ -531,6 +746,10 @@ public class AssetTaskController extends BaseController {
assetTaskService.updateYgtByTaskId(assetMiniProgramsCpPo.getTaskId(), ygt);
}
assetMiniProgramsCpService.save(assetMiniProgramsCpPo);
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(assetMiniProgramsCpPo, assetMiniProgramsHistory);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
return success();
}
@ -552,13 +771,13 @@ public class AssetTaskController extends BaseController {
StringBuilder b = new StringBuilder();
StringBuilder c = new StringBuilder();
assetOfficialAccountCpPo.getCdList().forEach(x -> {
if(!Objects.equals(x.getCdmc(), "") &&x.getCdmc()!=null){
if (!Objects.equals(x.getCdmc(), "") && x.getCdmc() != null) {
a.append(x.getCdmc()).append("|");
}
if(!Objects.equals(x.getCdlj(), "") &&x.getCdlj()!=null){
if (!Objects.equals(x.getCdlj(), "") && x.getCdlj() != null) {
b.append(x.getCdlj()).append("|");
}
if(!Objects.equals(x.getCdlx(), "") &&x.getCdlx()!=null){
if (!Objects.equals(x.getCdlx(), "") && x.getCdlx() != null) {
c.append(x.getCdlx()).append("|");
}
});
@ -586,6 +805,10 @@ public class AssetTaskController extends BaseController {
}
assetOfficialAccountCpService.save(assetOfficialAccountCpPo);
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(assetOfficialAccountCpPo, assetOfficialAccountHistory);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
return success();
}
@ -622,6 +845,10 @@ public class AssetTaskController extends BaseController {
}
assetAppCpService.save(assetAppCpPo);
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(assetAppCpPo, assetAppHistory);
assetAppHistoryService.save(assetAppHistory);
return success();
}
@ -657,8 +884,11 @@ public class AssetTaskController extends BaseController {
assetTaskService.updateYgtByTaskId(assetEmailCpPo.getTaskId(), ygt);
}
assetEmailCpService.save(assetEmailCpPo);
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(assetEmailCpPo, assetEmailHistory);
assetEmailHistoryService.save(assetEmailHistory);
return success();
}
@ -687,6 +917,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc);
}
assetMiniProgramsJyService.save(assetMiniProgramsJyPo);
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(assetMiniProgramsJyPo, assetMiniProgramsHistory);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
return success();
}
@ -707,13 +941,13 @@ public class AssetTaskController extends BaseController {
StringBuilder b = new StringBuilder();
StringBuilder c = new StringBuilder();
assetOfficialAccountJyPo.getCdList().forEach(x -> {
if(!Objects.equals(x.getCdmc(), "") &&x.getCdmc()!=null){
if (!Objects.equals(x.getCdmc(), "") && x.getCdmc() != null) {
a.append(x.getCdmc()).append("|");
}
if(!Objects.equals(x.getCdlj(), "") &&x.getCdlj()!=null){
if (!Objects.equals(x.getCdlj(), "") && x.getCdlj() != null) {
b.append(x.getCdlj()).append("|");
}
if(!Objects.equals(x.getCdlx(), "") &&x.getCdlx()!=null){
if (!Objects.equals(x.getCdlx(), "") && x.getCdlx() != null) {
c.append(x.getCdlx()).append("|");
}
});
@ -734,6 +968,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc);
}
assetOfficialAccountJyService.save(assetOfficialAccountJyPo);
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(assetOfficialAccountJyPo, assetOfficialAccountHistory);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
return success();
}
@ -763,6 +1001,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc);
}
assetAppJyService.save(assetAppJyPo);
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(assetAppJyPo, assetAppHistory);
assetAppHistoryService.save(assetAppHistory);
return success();
}
@ -792,6 +1034,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc);
}
assetEmailJyService.save(assetEmailJyPo);
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(assetEmailJyPo, assetEmailHistory);
assetEmailHistoryService.save(assetEmailHistory);
return success();
}
@ -828,5 +1074,39 @@ public class AssetTaskController extends BaseController {
return AjaxResult.success(assetTaskService.dwHcBl(req));
}
/**
*
*
* @param req
* @return
*/
@ApiOperation(value = "资产提交记录", response = AssetzcTjResponse.class)
@PostMapping("/zcTj")
public AjaxResult zcTj(@RequestBody AssetzcTjRequest req) {
AssetzcTjResponse assetzcTjResponse = new AssetzcTjResponse();
if (req.getType() == 0) {
//web
AssetCurrentHistory assetCurrentHistory = assetCurrentHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetCurrentHistory(assetCurrentHistory);
} else if (req.getType() == 1) {
//小程序资产
AssetMiniProgramsHistory assetMiniProgramsHistory = assetMiniProgramsHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetMiniProgramsHistory(assetMiniProgramsHistory);
} else if (req.getType() == 2) {
//公众号资产
AssetOfficialAccountHistory assetOfficialAccountHistory = assetOfficialAccountHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetOfficialAccountHistory(assetOfficialAccountHistory);
} else if (req.getType() == 3) {
//电子邮件资产
AssetEmailHistory assetEmailHistory = assetEmailHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetEmailHistory(assetEmailHistory);
} else if (req.getType() == 4) {
//移动应用程序资产
AssetAppHistory assetAppHistory = assetAppHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetAppHistory(assetAppHistory);
}
return AjaxResult.success(assetzcTjResponse);
}
}

@ -27,6 +27,8 @@ public class AssetBasicNetworkHistory extends BaseClass implements Serializable
private Long networkId;
@ApiModelProperty("主表id")
private Long copyId;
/**
* id

@ -408,4 +408,8 @@ public class AssetBusinessFormHistory extends BaseClass implements Serializable
@ApiModelProperty("任务id")
private Integer taskId;
@ApiModelProperty("主表id")
private Long copyId;
}

@ -28,6 +28,8 @@ public class AssetSupplyChainHistory extends BaseClass implements Serializable {
@ApiModelProperty("主表id")
private Long copyId;
/**
* id

@ -22,12 +22,13 @@ import java.io.Serializable;
public class UnitOtherConcatHistory extends BaseClass implements Serializable {
@ApiModelProperty("主表id")
@TableId(type = IdType.AUTO,value = "concat_id")
@TableId(type = IdType.AUTO, value = "concat_id")
private Long concatId;
@ApiModelProperty("主表id")
private Long copyId;
@ApiModelProperty("单位id")
private Long unitId;

@ -0,0 +1,36 @@
package com.ruoyi.tc.entity.request;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dong
* @since 2025/1/13 16:43
*/
@Data
@Api("资产提交记录")
public class AssetzcTjRequest {
/**
* id
*/
@ApiModelProperty("任务id")
private Integer taskId;
/**
*
*/
@ApiModelProperty("0:web资产1:小程序资产2公众号资产3电子邮件资产4移动应用程序资产")
private Integer type;
/**
* id
*/
@ApiModelProperty("资产id")
private Integer assetId;
}

@ -0,0 +1,29 @@
package com.ruoyi.tc.entity.response;
import com.ruoyi.tc.entity.history.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dong
* @since 2025/1/13 16:49
*/
@Data
@Api("资产提交响应类")
public class AssetzcTjResponse {
@ApiModelProperty("web资产历史类")
private AssetCurrentHistory assetCurrentHistory;
@ApiModelProperty("小程序资产历史类")
private AssetMiniProgramsHistory assetMiniProgramsHistory;
@ApiModelProperty("公众号资产历史类")
private AssetOfficialAccountHistory assetOfficialAccountHistory;
@ApiModelProperty("电子邮件资产历史类")
private AssetEmailHistory assetEmailHistory;
@ApiModelProperty("资产移动应用程序历史类")
private AssetAppHistory assetAppHistory;
}

@ -2,6 +2,8 @@ package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
/**
* (asset_app_history)
@ -10,4 +12,14 @@ import com.ruoyi.tc.entity.history.AssetAppHistory;
* @since 2024-11-28 17:13:07
*/
public interface AssetAppHistoryService extends IService<AssetAppHistory> {
/**
*
*
* @param req
* @return
*/
AssetAppHistory findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -2,9 +2,7 @@ package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.po.AssetCurrentCpPo;
import java.util.List;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
/**
* (asset_current_history)
@ -14,5 +12,13 @@ import java.util.List;
*/
public interface AssetCurrentHistoryService extends IService<AssetCurrentHistory> {
/**
* web
*
* @param req
* @return
*/
AssetCurrentHistory findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -1,7 +1,9 @@
package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
/**
* (asset_email_history)
@ -10,4 +12,13 @@ import com.ruoyi.tc.entity.history.AssetEmailHistory;
* @since 2024-11-28 17:13:07
*/
public interface AssetEmailHistoryService extends IService<AssetEmailHistory> {
/**
*
*
* @param req
* @return
*/
AssetEmailHistory findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -2,6 +2,7 @@ package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
/**
* (asset_mini_programs_history)
@ -10,4 +11,13 @@ import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
* @since 2024-11-28 17:13:07
*/
public interface AssetMiniProgramsHistoryService extends IService<AssetMiniProgramsHistory> {
/**
*
*
* @param req
* @return
*/
AssetMiniProgramsHistory findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -1,7 +1,9 @@
package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
/**
* (asset_official_account_history)
@ -10,4 +12,18 @@ import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
* @since 2024-11-28 17:13:07
*/
public interface AssetOfficialAccountHistoryService extends IService<AssetOfficialAccountHistory> {
/**
*
*
* @param req
* @return
*/
AssetOfficialAccountHistory findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -2,10 +2,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetAppHistoryService;
import com.ruoyi.tc.mapper.history.AssetAppHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (asset_app_history)
*
@ -15,5 +18,11 @@ import org.springframework.stereotype.Service;
@Service
public class AssetAppHistoryServiceImpl extends ServiceImpl<AssetAppHistoryMapper, AssetAppHistory> implements AssetAppHistoryService {
@Resource
private AssetAppHistoryMapper assetAppHistoryMapper;
@Override
public AssetAppHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetAppHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -2,10 +2,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetCurrentHistoryService;
import com.ruoyi.tc.mapper.history.AssetCurrentHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (asset_current_history)
*
@ -14,5 +17,14 @@ import org.springframework.stereotype.Service;
*/
@Service
public class AssetCurrentHistoryServiceImpl extends ServiceImpl<AssetCurrentHistoryMapper, AssetCurrentHistory> implements AssetCurrentHistoryService {
@Resource
private AssetCurrentHistoryMapper assetCurrentHistoryMapper;
@Override
public AssetCurrentHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetCurrentHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -2,10 +2,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetEmailHistoryService;
import com.ruoyi.tc.mapper.history.AssetEmailHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (asset_email_history)
*
@ -14,4 +17,11 @@ import org.springframework.stereotype.Service;
*/
@Service
public class AssetEmailHistoryServiceImpl extends ServiceImpl<AssetEmailHistoryMapper, AssetEmailHistory> implements AssetEmailHistoryService {
@Resource
private AssetEmailHistoryMapper assetEmailHistoryMapper;
@Override
public AssetEmailHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetEmailHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -2,10 +2,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetMiniProgramsHistoryService;
import com.ruoyi.tc.mapper.history.AssetMiniProgramsHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (asset_mini_programs_history)
*
@ -14,4 +17,10 @@ import org.springframework.stereotype.Service;
*/
@Service
public class AssetMiniProgramsHistoryServiceImpl extends ServiceImpl<AssetMiniProgramsHistoryMapper, AssetMiniProgramsHistory> implements AssetMiniProgramsHistoryService {
@Resource
private AssetMiniProgramsHistoryMapper assetMiniProgramsHistoryMapper;
@Override
public AssetMiniProgramsHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetMiniProgramsHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -2,10 +2,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetOfficialAccountHistoryService;
import com.ruoyi.tc.mapper.history.AssetOfficialAccountHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (asset_official_account_history)
*
@ -14,4 +17,10 @@ import org.springframework.stereotype.Service;
*/
@Service
public class AssetOfficialAccountHistoryServiceImpl extends ServiceImpl<AssetOfficialAccountHistoryMapper, AssetOfficialAccountHistory> implements AssetOfficialAccountHistoryService {
@Resource
private AssetOfficialAccountHistoryMapper assetOfficialAccountHistoryMapper;
@Override
public AssetOfficialAccountHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetOfficialAccountHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -37,13 +37,13 @@ public interface AssetAppCpMapper extends BaseMapper<AssetAppCpPo> {
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_app_cp where task_id=#{taskId}")
List<AssetAppCpPo> findByTaskId(@Param("taskId") int taskId);
@Select("select * from asset_app_cp where asset_id=#{assetId}")
AssetAppCpPo findByTaskId(@Param("assetId") int assetId);
/**

@ -36,16 +36,14 @@ public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkC
@Delete("delete from asset_basic_network_cp where asset_id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") int taskId);
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_basic_network_cp where task_id=#{taskId}")
List<AssetBasicNetworkCpPo> findByTaskId(int taskId);
@Select("select * from asset_basic_network_cp where asset_id=#{assetId}")
AssetBasicNetworkCpPo findByTaskId(int assetId);

@ -2,7 +2,6 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.po.AssetBusinessFormCpPo;
import com.ruoyi.tc.entity.po.AssetCurrentCpPo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -35,7 +34,7 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
* @param taskId id
*/
@Delete("delete from asset_business_form_cp where asset_id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")Integer taskId);
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId);
/**
@ -44,15 +43,16 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
* @param assetId id
*/
@Delete("delete from asset_business_form_cp where asset_id=#{assetId} ")
void deletByAssetId(@Param("assetId")Long assetId);
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid
* id
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_business_form_cp where task_id=#{taskId}")
List<AssetBusinessFormCpPo> findByTaskId(int taskId);
@Select("select * from asset_business_form_cp where asset_id=#{assetId}")
AssetBusinessFormCpPo findByTaskId(int assetId);
}

@ -28,13 +28,13 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
/**
* taskid
* id
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_current_cp where task_id=#{taskId}")
List<AssetCurrentCpPo> findByTaskId(int taskId);
@Select("select * from asset_current_cp where id=#{assetId}")
AssetCurrentCpPo findByTaskId(int assetId);
/**
@ -60,7 +60,7 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
@Select(" select * from asset_current_cp where id = #{id} ")
AssetCurrentCpPo findDwmc(Long id);
List<AssetCurrentCpPo> findDwmc(Long id);
/**

@ -50,9 +50,9 @@ public interface AssetCurrentMapper extends BaseMapper<AssetCurrent> {
/**
*
* @param idList
* @param id
*/
void deleteIdList(@Param("idList") List<Long> idList);
void deleteIdList(@Param("id") Long id);
/**
* ()

@ -35,13 +35,13 @@ public interface AssetEmailCpMapper extends BaseMapper<AssetEmailCpPo> {
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_email_cp where task_id=#{taskId}")
List<AssetEmailCpPo> findByTaskId(@Param("taskId") int taskId);
@Select("select * from asset_email_cp where asset_id=#{assetId}")
AssetEmailCpPo findByTaskId(@Param("taskId") int assetId);
/**

@ -38,13 +38,13 @@ public interface AssetMiniProgramsCpMapper extends BaseMapper<AssetMiniProgramsC
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_mini_programs_cp where task_id=#{taskId}")
List<AssetMiniProgramsCpPo> findByTaskId(@Param("taskId") int taskId);
@Select("select * from asset_mini_programs_cp where asset_id=#{assetId}")
AssetMiniProgramsCpPo findByTaskId(@Param("assetId") int assetId);
/**

@ -7,8 +7,6 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* (asset_official_account_cp)访
*
@ -37,13 +35,13 @@ public interface AssetOfficialAccountCpMapper extends BaseMapper<AssetOfficialAc
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_official_account_cp where task_id=#{taskId}")
List<AssetOfficialAccountCpPo> findByTaskId(@Param("taskId") int taskId);
@Select("select * from asset_official_account_cp where asset_id=#{assetId}")
AssetOfficialAccountCpPo findByTaskId(@Param("assetId") int assetId);
/**

@ -47,12 +47,12 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpP
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from asset_supply_chain_cp where task_id=#{taskId}")
List<AssetSupplyChainCpPo> findByTaskId(int taskId);
@Select("select * from asset_supply_chain_cp where asset_id=#{assetId}")
AssetSupplyChainCpPo findByTaskId(int assetId);
}

@ -274,6 +274,20 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
*/
AssetTask getByTaskId(@Param("taskId") int taskId);
/**
* taskid
* @param taskId
* @return
*/
Integer getJxz(@Param("taskId") int taskId);
/**
* taskid
* @param taskId
* @return
*/
String getifcq(@Param("taskId") int taskId);
/**
*

@ -33,7 +33,7 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
* @param taskId id
*/
@Delete("delete from unit_other_contact_cp where asset_id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")Integer taskId);
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId);
/**
* idid
@ -44,11 +44,11 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid
* id
*
* @param taskId id
* @param assetId id
* @return
*/
@Select("select * from unit_other_contact_cp where task_id=#{taskId}")
List<UnitOtherConcatCpPo> findByTaskId(int taskId);
@Select("select * from unit_other_contact_cp where asset_id=#{assetId}")
UnitOtherConcatCpPo findByTaskId(int assetId);
}

@ -2,6 +2,8 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import org.apache.ibatis.annotations.Select;
/**
* (asset_app_history)访
@ -10,5 +12,16 @@ import com.ruoyi.tc.entity.history.AssetAppHistory;
* @since 2024-11-15 10:03:56
*/
public interface AssetAppHistoryMapper extends BaseMapper<AssetAppHistory> {
/**
*
*
* @param req
* @return
*/
@Select("select * from asset_app_history where task_id= #{req.taskId} and asset_id =#{req.assetId}")
AssetAppHistory findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -2,6 +2,9 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* (asset_current_history)访
@ -10,5 +13,16 @@ import com.ruoyi.tc.entity.history.AssetCurrentHistory;
* @since 2024-11-15 10:03:56
*/
public interface AssetCurrentHistoryMapper extends BaseMapper<AssetCurrentHistory> {
/**
* web
*
* @param req
* @return
*/
@Select("select * from asset_mini_programs_history where task_id= #{req.taskId} and asset_id =#{req.assetId}")
AssetCurrentHistory findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -2,6 +2,9 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* (asset_email_cp)访
@ -10,5 +13,15 @@ import com.ruoyi.tc.entity.history.AssetEmailHistory;
* @since 2024-11-15 10:03:56
*/
public interface AssetEmailHistoryMapper extends BaseMapper<AssetEmailHistory> {
/**
*
*
* @param req
* @return
*/
@Select("select * from asset_email_history where task_id= #{req.taskId} and asset_id =#{req.assetId}")
AssetEmailHistory findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -2,6 +2,9 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* (asset_mini_programs_history)访
@ -10,5 +13,15 @@ import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
* @since 2024-11-15 10:03:56
*/
public interface AssetMiniProgramsHistoryMapper extends BaseMapper<AssetMiniProgramsHistory> {
/**
*
*
* @param req
* @return
*/
@Select("select * from asset_current_history where task_id= #{req.taskId} and asset_id =#{req.assetId}")
AssetMiniProgramsHistory findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -3,6 +3,7 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -17,5 +18,15 @@ import java.util.List;
* @since 2024-11-15 10:03:56
*/
public interface AssetOfficialAccountHistoryMapper extends BaseMapper<AssetOfficialAccountHistory> {
/**
*
*
* @param req
* @return
*/
@Select("select * from asset_official_account_history where task_id= #{req.taskId} and asset_id =#{req.assetId}")
AssetOfficialAccountHistory findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -34,12 +34,12 @@ public interface AssetAppCpService extends IService<AssetAppCpPo> {
/**
* taskid
* id
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetAppCpPo> findByTaskId(int taskId);
AssetAppCpPo findByTaskId(int assetId);
/**

@ -34,12 +34,12 @@ public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCp
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetBasicNetworkCpPo> findByTaskId(int taskId);
AssetBasicNetworkCpPo findByTaskId(int assetId);

@ -38,12 +38,12 @@ public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCp
void deletByAssetId(Long assetId);
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetBusinessFormCpPo> findByTaskId(int taskId);
AssetBusinessFormCpPo findByTaskId(int assetId);
}

@ -27,12 +27,12 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
/**
* taskid
* id
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetCurrentCpPo> findByTaskId(int taskId);
AssetCurrentCpPo findByTaskId(int assetId);
/**
@ -63,7 +63,7 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
* @param id
* @return
*/
AssetCurrentCpPo findDwmc(Long id);
List<AssetCurrentCpPo> findDwmc(Long id);

@ -52,7 +52,7 @@ public interface AssetCurrentService extends IService<AssetCurrent> {
*
* @param idList
*/
void deleteIdList(List<Long> idList);
void deleteIdList(Long idList);
/**
* ()

@ -33,12 +33,12 @@ public interface AssetEmailCpService extends IService<AssetEmailCpPo> {
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetEmailCpPo> findByTaskId(int taskId);
AssetEmailCpPo findByTaskId(int assetId);
/**

@ -36,12 +36,12 @@ public interface AssetMiniProgramsCpService extends IService<AssetMiniProgramsCp
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetMiniProgramsCpPo> findByTaskId(int taskId);
AssetMiniProgramsCpPo findByTaskId(int assetId);
/**

@ -34,12 +34,12 @@ public interface AssetOfficialAccountCpService extends IService<AssetOfficialAcc
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetOfficialAccountCpPo> findByTaskId(int taskId);
AssetOfficialAccountCpPo findByTaskId(int assetId);
/**
*

@ -24,12 +24,12 @@ public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpPo
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
List<AssetSupplyChainCpPo> findByTaskId(int taskId);
AssetSupplyChainCpPo findByTaskId(int assetId);

@ -43,10 +43,10 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpPo>
/**
* taskid
* assetId
*
* @param taskId id
* @param assetId id
* @return
*/
List<UnitOtherConcatCpPo> findByTaskId(int taskId);
UnitOtherConcatCpPo findByTaskId(int assetId);
}

@ -38,8 +38,8 @@ public class AssetAppCpServiceImpl extends ServiceImpl<AssetAppCpMapper, AssetAp
}
@Override
public List<AssetAppCpPo> findByTaskId(int taskId) {
return assetAppCpMapper.findByTaskId(taskId);
public AssetAppCpPo findByTaskId(int assetId) {
return assetAppCpMapper.findByTaskId(assetId);
}
@Override

@ -125,7 +125,6 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
*/
@Override
public Boolean edit(AssetApp assetApp) {
AssetApp byId = getById(assetApp.getId());
List<Unit> list2 = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list2 == null || list2.isEmpty()) {
@ -156,7 +155,7 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetApp.getAppName());
if (assetTask != null) {
if (assetTask == null) {
assetAppCpService.deletByAssetId(assetApp.getId());
} else {
//根据资产id查询旧资产

@ -32,8 +32,8 @@ public class AssetBasicNetworkCpServiceImpl extends ServiceImpl<AssetBasicNetWor
}
@Override
public List<AssetBasicNetworkCpPo> findByTaskId(int taskId) {
return assetBasicNetWorkCpMapper.findByTaskId(taskId);
public AssetBasicNetworkCpPo findByTaskId(int assetId) {
return assetBasicNetWorkCpMapper.findByTaskId(assetId);
}
@Override

@ -37,8 +37,8 @@ public class AssetBusinessFormCpServiceImpl extends ServiceImpl<AssetBusinessFor
}
@Override
public List<AssetBusinessFormCpPo> findByTaskId(int taskId) {
return assetBusinessFormCpMapper.findByTaskId(taskId);
public AssetBusinessFormCpPo findByTaskId(int assetId) {
return assetBusinessFormCpMapper.findByTaskId(assetId);
}
}

@ -31,8 +31,8 @@ public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper,
}
@Override
public List<AssetCurrentCpPo> findByTaskId(int taskId) {
return assetCurrentCpMapper.findByTaskId(taskId);
public AssetCurrentCpPo findByTaskId(int assetId) {
return assetCurrentCpMapper.findByTaskId(assetId);
}
@Override
@ -47,7 +47,7 @@ public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper,
@Override
public AssetCurrentCpPo findDwmc(Long id) {
public List<AssetCurrentCpPo> findDwmc(Long id) {
return baseMapper.findDwmc(id);
}

@ -102,8 +102,8 @@ public class AssetCurrentServiceImpl extends ServiceImpl<AssetCurrentMapper, Ass
}
@Override
public void deleteIdList(List<Long> idList) {
baseMapper.deleteIdList(idList);
public void deleteIdList(Long id) {
baseMapper.deleteIdList(id);
}
/**

@ -41,8 +41,8 @@ public class AssetEmailCpServiceImpl extends ServiceImpl<AssetEmailCpMapper, Ass
}
@Override
public List<AssetEmailCpPo> findByTaskId(int taskId) {
return assetEmailCpMapper.findByTaskId(taskId);
public AssetEmailCpPo findByTaskId(int assetId) {
return assetEmailCpMapper.findByTaskId(assetId);
}

@ -155,7 +155,7 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetEmail.getDzyxhz());
if (assetTask != null) {
if (assetTask == null) {
assetEmailCpService.deletByAssetId(assetEmail.getId());
} else {
//根据资产id查询旧资产

@ -33,8 +33,8 @@ public class AssetMiniProgramsCpServiceImpl extends ServiceImpl<AssetMiniProgram
}
@Override
public List<AssetMiniProgramsCpPo> findByTaskId(int taskId) {
return assetMiniProgramsCpMapper.findByTaskId(taskId);
public AssetMiniProgramsCpPo findByTaskId(int assetId) {
return assetMiniProgramsCpMapper.findByTaskId(assetId);
}
@Override

@ -143,7 +143,7 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
});
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetMiniPrograms.getXcxmc());
if (assetTask != null) {
if (assetTask == null) {
assetMiniProgramsCpService.deletByAssetId(assetMiniPrograms.getId());
} else {
//根据资产id查询旧资产

@ -42,8 +42,8 @@ public class AssetOfficialAccountCpServiceImpl extends ServiceImpl<AssetOfficial
}
@Override
public List<AssetOfficialAccountCpPo> findByTaskId(int taskId) {
return assetOfficialAccountCpMapper.findByTaskId(taskId);
public AssetOfficialAccountCpPo findByTaskId(int assetId) {
return assetOfficialAccountCpMapper.findByTaskId(assetId);
}
@Override

@ -200,7 +200,7 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetOfficialAccount.getGzhmc());
if (assetTask != null) {
if (assetTask == null) {
assetOfficialAccountCpService.deletByAssetId(assetOfficialAccount.getId());
} else {
//根据资产id查询旧资产

@ -27,8 +27,8 @@ public class AssetSupplyChainCpServiceImpl extends ServiceImpl<AssetSupplyChainC
}
@Override
public List<AssetSupplyChainCpPo> findByTaskId(int taskId) {
return assetSupplyChainCpMapper.findByTaskId(taskId);
public AssetSupplyChainCpPo findByTaskId(int assetId) {
return assetSupplyChainCpMapper.findByTaskId(assetId);
}
@Override

@ -1,22 +1,26 @@
package com.ruoyi.tc.service.impl;
import cn.hutool.core.collection.CollectionUtil;
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.common.utils.bean.BeanUtils;
import com.ruoyi.tc.entity.*;
import com.ruoyi.tc.entity.history.*;
import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.request.*;
import com.ruoyi.tc.entity.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetTaskResponse;
import com.ruoyi.tc.entity.response.AssetdwHcBlResponse;
import com.ruoyi.tc.entity.response.AssetdwHcResponse;
import com.ruoyi.tc.historyService.*;
import com.ruoyi.tc.mapper.AssetTaskMapper;
import com.ruoyi.tc.service.*;
import lombok.SneakyThrows;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
@ -101,6 +105,39 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
@Resource
private AssetTaskService assetTaskService;
@Resource
private AssetCurrentHistoryService assetCurrentHistoryService;
@Resource
private AssetAppHistoryService assetAppHistoryService;
@Resource
private AssetBasicNetworkHistoryService assetBasicNetworkHistoryService;
@Resource
private AssetBusinessFormHistoryService assetBusinessFormHistoryService;
@Resource
private AssetEmailHistoryService assetEmailHistoryService;
@Resource
private AssetMiniProgramsHistoryService assetMiniProgramsHistoryService;
@Resource
private AssetOfficialAccountHistoryService assetOfficialAccountHistoryService;
@Resource
private AssetSupplyChainHistoryService assetSupplyChainHistoryService;
@Resource
private UnitOtherConcatHistoryService unitOtherConcatHistoryService;
/**
* ID
*
@ -404,13 +441,13 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
String[] s3 = byId.getCdlx().split("\\|");
for (int i = 0; i < s1.length; i++) {
AssetOfficialAccountMenu as = new AssetOfficialAccountMenu();
if(s1[i]!=null&& !Objects.equals(s1[i], "")){
if (s1[i] != null && !Objects.equals(s1[i], "")) {
as.setCdmc(s1[i]);
}
if(s2[i]!=null&& !Objects.equals(s2[i], "")){
if (s2[i] != null && !Objects.equals(s2[i], "")) {
as.setCdlj(s2[i]);
}
if(s3[i]!=null&& !Objects.equals(s3[i], "")){
if (s3[i] != null && !Objects.equals(s3[i], "")) {
as.setCdlx(s3[i]);
}
a1.add(as);
@ -457,6 +494,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return result;
}
@SneakyThrows
@Override
public int sh(AssetCurrentShRequest req) {
//根据taskid获取当前任务的count数量
@ -471,9 +509,175 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
ifCq(req, assetTask);
//创建任务流程
getTaskStatus(req);
if (req.getBtgyy()!=null){
if (req.getBtgyy() != null) {
assetTaskDao.sh(req);
//修改子表和新增历史表
updateZiandHistory(req, date);
} else {
//修改子表和新增历史表
updateZiandHistory(req, date);
//同步主表
taskSaveOrDelete(req);
}
} else if (req.getType() == 1) {
//小程序资产
//创建任务流程
ifCq(req, assetTask);
// //创建任务流程
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.xcxsh(req);
//修改子表和新增历史表
updateMinZiandHistory(req, date);
} else {
//修改子表和新增历史表
updateMinZiandHistory(req, date);
//同步主表
syb(req);
}
} else if (req.getType() == 2) {
//公众号资产
//创建任务流程
ifCq(req, assetTask);
//创建任务流程
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.gzhsh(req);
//修改子表和历史表新增
updateGzhZiandHistory(req, date);
} else {
//修改子表和历史表新增
updateGzhZiandHistory(req, date);
//同步主表
syb(req);
}
} else if (req.getType() == 3) {
//电子邮件
//创建任务流程
ifCq(req, assetTask);
//创建任务流程
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.emailsh(req);
//修改子表和历史表新增
updateEmailZiandHistory(req, date);
} else {
//修改子表和历史表新增
updateEmailZiandHistory(req, date);
//同步主表
syb(req);
}
} else if (req.getType() == 4) {
//app
//创建任务流程
ifCq(req, assetTask);
//创建任务流程
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.appsh(req);
//修改子表和历史表新增
updateAppZiandHistory(req, date);
} else {
//修改子表和历史表新增
updateAppZiandHistory(req, date);
//同步主表
syb(req);
}
}
AssetTask finalTask = assetTaskDao.getByTaskId(req.getTaskId());
LocalDateTime finishTime = null;
//根据任务id查询是否进行中
Integer jxz=assetTaskDao.getJxz(req.getTaskId());
if(jxz>0){
//进行中
finalTask.setTaskStatus(1);
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
}else{
//根据任务id查询是否超期
String ifcq=assetTaskDao.getifcq(req.getTaskId());
String taskDeadline = finalTask.getTaskDeadline(); // 定义日期格式,确保格式与字符串一致
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 根据你的时间格式调整
// 将字符串转换为日期对象
Date ifcqDate = dateFormat.parse(ifcq);
Date taskDeadlineDate = dateFormat.parse(taskDeadline);
// 比较两个日期
if (ifcqDate.before(taskDeadlineDate)) {
//超期完成
finalTask.setTaskStatus(3);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
} else if (ifcqDate.after(taskDeadlineDate)) {
//正常完成
finalTask.setTaskStatus(2);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
}
}
return 0;
}
private void updateAppZiandHistory(AssetCurrentShRequest req, Date date) {
req.getAssetAppCpPo().setStatus(req.getStatus());
req.getAssetAppCpPo().setUpdateTime(date);
assetAppCpService.updateById(req.getAssetAppCpPo());
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(req.getAssetAppCpPo(), assetAppHistory);
assetAppHistoryService.save(assetAppHistory);
}
private void updateEmailZiandHistory(AssetCurrentShRequest req, Date date) {
req.getAssetEmailCpPo().setStatus(req.getStatus());
req.getAssetEmailCpPo().setUpdateTime(date);
assetEmailCpService.updateById(req.getAssetEmailCpPo());
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(req.getAssetEmailCpPo(), assetEmailHistory);
assetEmailHistoryService.save(assetEmailHistory);
}
private void updateGzhZiandHistory(AssetCurrentShRequest req, Date date) {
if (req.getAssetOfficialAccountCpPo().getCdList() != null && !req.getAssetOfficialAccountCpPo().getCdList().isEmpty()) {
StringBuilder a = new StringBuilder();
StringBuilder b = new StringBuilder();
StringBuilder c = new StringBuilder();
req.getAssetOfficialAccountCpPo().getCdList().forEach(x -> {
a.append(x.getCdmc()).append("|");
b.append(x.getCdlj()).append("|");
c.append(x.getCdlx()).append("|");
});
req.getAssetOfficialAccountCpPo().setCdmc(a.toString());
req.getAssetOfficialAccountCpPo().setCdlj(b.toString());
req.getAssetOfficialAccountCpPo().setCdlx(c.toString());
}
req.getAssetOfficialAccountCpPo().setStatus(req.getStatus());
req.getAssetOfficialAccountCpPo().setUpdateTime(date);
assetOfficialAccountCpService.updateById(req.getAssetOfficialAccountCpPo());
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(req.getAssetOfficialAccountCpPo(), assetOfficialAccountHistory);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
}
private void updateMinZiandHistory(AssetCurrentShRequest req, Date date) {
req.getAssetMiniProgramsCpPo().setStatus(req.getStatus());
req.getAssetMiniProgramsCpPo().setUpdateTime(date);
assetMiniProgramsCpService.updateById(req.getAssetMiniProgramsCpPo());
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(req.getAssetMiniProgramsCpPo(), assetMiniProgramsHistory);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
}
private void updateZiandHistory(AssetCurrentShRequest req, Date date) {
//根据资产id和任务id删除五张表数据
assetCurrentCpService.deletByAssetIdandTaskId(req.getAssetCurrentCpPo().getId(), req.getAssetCurrentCpPo().getTaskId());
assetBusinessFormCpService.deletByAssetIdandTaskId(req.getAssetCurrentCpPo().getId(), req.getAssetCurrentCpPo().getTaskId());
@ -504,6 +708,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
// 设置更新时间
req.getAssetCurrentCpPo().setUpdateTime(date);
AssetCurrentHistory assetCurrentHistory = new AssetCurrentHistory();
assetCurrentCpService.save(req.getAssetCurrentCpPo());
//新增新监管业务形态
if (req.getAssetCurrentCpPo().getXjgywxt() != null) {
@ -537,242 +742,163 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//新增其他联系人
unitOtherConcatCpService.saveBatch(req.getAssetCurrentCpPo().getOtherConcat());
}
}
} else if (req.getType() == 1) {
//小程序资产
//创建任务流程
ifCq(req, assetTask);
getTaskStatus(req);
if (req.getBtgyy()!=null){
assetTaskDao.xcxsh(req);
}else {
req.getAssetMiniProgramsCpPo().setStatus(req.getStatus());
req.getAssetMiniProgramsCpPo().setUpdateTime(date);
assetMiniProgramsCpService.updateById(req.getAssetMiniProgramsCpPo());
//新增历史记录
saveHistory(req, a, b, date, assetCurrentHistory);
}
} else if (req.getType() == 2) {
//公众号资产
//创建任务流程
ifCq(req, assetTask);
getTaskStatus(req);
if (req.getBtgyy()!=null){
assetTaskDao.gzhsh(req);
}else {
if (req.getAssetOfficialAccountCpPo().getCdList() != null && !req.getAssetOfficialAccountCpPo().getCdList().isEmpty()) {
StringBuilder a = new StringBuilder();
StringBuilder b = new StringBuilder();
private void saveHistory(AssetCurrentShRequest req, StringBuilder a, StringBuilder b, Date date, AssetCurrentHistory assetCurrentHistory) {
//新增历史记录
StringBuilder c = new StringBuilder();
req.getAssetOfficialAccountCpPo().getCdList().forEach(x -> {
a.append(x.getCdmc()).append("|");
b.append(x.getCdlj()).append("|");
c.append(x.getCdlx()).append("|");
});
req.getAssetOfficialAccountCpPo().setCdmc(a.toString());
req.getAssetOfficialAccountCpPo().setCdlj(b.toString());
req.getAssetOfficialAccountCpPo().setCdlx(c.toString());
}
req.getAssetOfficialAccountCpPo().setStatus(req.getStatus());
req.getAssetOfficialAccountCpPo().setUpdateTime(date);
assetOfficialAccountCpService.updateById(req.getAssetOfficialAccountCpPo());
if (!req.getAssetCurrentCpPo().getGlymList().isEmpty()) {
req.getAssetCurrentCpPo().getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
c.append(x.getKey());
c.append(",");
}
} else if (req.getType() == 3) {
//电子邮件
//创建任务流程
ifCq(req, assetTask);
getTaskStatus(req);
if (req.getBtgyy()!=null){
assetTaskDao.emailsh(req);
}else {
req.getAssetEmailCpPo().setStatus(req.getStatus());
req.getAssetEmailCpPo().setUpdateTime(date);
assetEmailCpService.updateById(req.getAssetEmailCpPo());
});
}
} else if (req.getType() == 4) {
//app
//创建任务流程
ifCq(req, assetTask);
getTaskStatus(req);
if (req.getBtgyy()!=null){
assetTaskDao.appsh(req);
}else{
req.getAssetAppCpPo().setStatus(req.getStatus());
req.getAssetAppCpPo().setUpdateTime(date);
assetAppCpService.updateById(req.getAssetAppCpPo());
req.getAssetCurrentCpPo().setGlym(a.toString());
StringBuilder d = new StringBuilder();
if (!req.getAssetCurrentCpPo().getGlIpList().isEmpty()) {
req.getAssetCurrentCpPo().getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
d.append(x.getKey());
d.append(",");
}
});
}
AssetTask finalTask = assetTaskDao.getByTaskId(req.getTaskId());
//判断当前任务资产是否全部审核完成
int deadlineCount = Optional.ofNullable(finalTask.getDeadlineCount()).orElse(0);
int count = Optional.ofNullable(finalTask.getCount()).orElse(0);
int totalCount = Optional.ofNullable(finalTask.getTotalCount()).orElse(0);
int ygt = Optional.ofNullable(finalTask.getYgt()).orElse(0);
LocalDateTime finishTime = null;
if (ygt + count >= totalCount && deadlineCount == 0) {
//关停和通过数量=全部数量并且超期完成数量为0 状态是正常完成 status=2
finalTask.setTaskStatus(2);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
//同步主表数据 web
taskSaveOrDelete(req);
syb(req);
req.getAssetCurrentCpPo().setGlIp(b.toString());
req.getAssetCurrentCpPo().setStatus(req.getStatus());
} else if (deadlineCount + count + ygt >= totalCount && deadlineCount != 0) {
//超期完成和通过数量=全部数量并且超期完成数量不为0 状态是超期完成 status=3
finalTask.setTaskStatus(3);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
// 设置更新时间
req.getAssetCurrentCpPo().setUpdateTime(date);
BeanUtils.copyProperties(req.getAssetCurrentCpPo(), assetCurrentHistory);
assetCurrentHistoryService.save(assetCurrentHistory);
//同步主表数据 web
taskSaveOrDelete(req);
syb(req);
} else if (req.getBtgyy() != null) {
//不通过 状态为1
finalTask.setTaskStatus(1);
String btgyy = req.getBtgyy();
assetTaskService.update(finalTask);
//修改不通过原因
if (req.getType() == 0) {
//根据任务id,资产id获取退回次数
AssetCurrentCpPo assetCurrentCpPo = assetCurrentCpService.findByassetIdandTaskId(req.getAssetId(), req.getTaskId());
//新增新监管业务形态历史表
if (req.getAssetCurrentCpPo().getXjgywxt() != null) {
req.getAssetCurrentCpPo().getXjgywxt().setAssetId(req.getAssetCurrentCpPo().getId());
req.getAssetCurrentCpPo().getXjgywxt().setTaskId(req.getAssetCurrentCpPo().getTaskId());
AssetBusinessFormHistory assetBusinessFormHistory = new AssetBusinessFormHistory();
assetBusinessFormHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(req.getAssetCurrentCpPo().getXjgywxt(), assetBusinessFormHistory);
assetBusinessFormHistoryService.save(assetBusinessFormHistory);
//获取退回次数
Integer thcs = 0;
if (assetCurrentCpPo.getCount() != null) {
thcs = assetCurrentCpPo.getCount();
}
int newThcs = thcs + 1;
assetCurrentCpService.updateByAssetId(req.getAssetId(), req.getTaskId(), btgyy, newThcs);
} else if (req.getType() == 1) {
//根据任务id,资产id获取退回次数
AssetMiniProgramsCpPo assetMiniProgramsCpPo = assetMiniProgramsCpService.findByassetIdandTaskId(req.getAssetId(), req.getTaskId());
//获取退回次数
Integer thcs = 0;
if (assetMiniProgramsCpPo.getCount() != null) {
thcs = assetMiniProgramsCpPo.getCount();
}
int newThcs = thcs + 1;
assetMiniProgramsCpService.updateByAssetId(req.getAssetId(), req.getTaskId(), btgyy, newThcs);
} else if (req.getType() == 2) {
//根据任务id,资产id获取退回次数
AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findByassetIdandTaskId(req.getAssetId(), req.getTaskId());
//获取退回次数
Integer thcs = 0;
if (assetOfficialAccountCpPo.getCount() != null) {
thcs = assetOfficialAccountCpPo.getCount();
}
if (!req.getAssetCurrentCpPo().getGylxxList().isEmpty()) {
for (AssetSupplyChainCpPo items : req.getAssetCurrentCpPo().getGylxxList()) {
items.setAssetId(req.getAssetCurrentCpPo().getId());
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
int newThcs = thcs + 1;
assetOfficialAccountCpService.updateByAssetId(req.getAssetId(), req.getTaskId(), btgyy, newThcs);
} else if (req.getType() == 3) {
//根据任务id,资产id获取退回次数
AssetEmailCpPo assetEmailCpPo = assetEmailCpService.findByassetIdandTaskId(req.getAssetId(), req.getTaskId());
//获取退回次数
Integer thcs = 0;
if (assetEmailCpPo.getCount() != null) {
thcs = assetEmailCpPo.getCount();
}
int newThcs = thcs + 1;
assetEmailCpService.updateByAssetId(req.getAssetId(), req.getTaskId(), btgyy, newThcs);
} else if (req.getType() == 4) {
//根据任务id,资产id获取退回次数
AssetAppCpPo assetAppCpPo = assetAppCpService.findByassetIdandTaskId(req.getAssetId(), req.getTaskId());
//获取退回次数
Integer thcs = 0;
if (assetAppCpPo.getCount() != null) {
thcs = assetAppCpPo.getCount();
}
int newThcs = thcs + 1;
assetAppCpService.updateByAssetId(req.getAssetId(), req.getTaskId(), btgyy, newThcs);
}
}
return 0;
//新增供应链历史表
List<AssetSupplyChainHistory> assetSupplyChainHistoryList = req.getAssetCurrentCpPo().getGylxxList().stream()
.map(cpPo -> {
AssetSupplyChainHistory assetSupplyChainHistory = new AssetSupplyChainHistory();
assetSupplyChainHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(cpPo, assetSupplyChainHistory); // 复制属性
return assetSupplyChainHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetSupplyChainHistoryService.saveBatch(assetSupplyChainHistoryList);
}
if (!req.getAssetCurrentCpPo().getJcwlList().isEmpty()) {
for (AssetBasicNetworkCpPo items : req.getAssetCurrentCpPo().getJcwlList()) {
items.setAssetId(req.getAssetCurrentCpPo().getId());
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
private void syb(AssetCurrentShRequest req) {
//app 小程序 邮件 公众号
List<AssetAppCpPo> appList = assetAppCpService.findByTaskId(req.getTaskId());
List<AssetEmailCpPo> emailCpPoListList = assetEmailCpService.findByTaskId(req.getTaskId());
List<AssetMiniProgramsCpPo> miniProgramsCpPoListList = assetMiniProgramsCpService.findByTaskId(req.getTaskId());
List<AssetOfficialAccountCpPo> officialAccountCpPoListList = assetOfficialAccountCpService.findByTaskId(req.getTaskId());
//app
List<Long> appidList = appList.stream()
.map(AssetAppCpPo::getAssetId)
.collect(Collectors.toList());
//删除原有数据
if (CollectionUtil.isNotEmpty(appidList)) {
assetAppService.deleteIdList(appidList);
}
//将子表数据复制到主表中
List<AssetApp> appNewList = appList.stream()
//新增基础网络历史表
List<AssetBasicNetworkHistory> assetSupplyChainHistoryList = req.getAssetCurrentCpPo().getJcwlList().stream()
.map(cpPo -> {
AssetApp current = new AssetApp();
BeanUtils.copyProperties(cpPo, current); // 复制属性
return current; // 返回新对象
AssetBasicNetworkHistory assetBasicNetworkHistory = new AssetBasicNetworkHistory();
assetBasicNetworkHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(cpPo, assetBasicNetworkHistory); // 复制属性
return assetBasicNetworkHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetAppService.saveBatch(appNewList);
//邮件
List<Long> emailidList = emailCpPoListList.stream()
.map(AssetEmailCpPo::getAssetId)
.collect(Collectors.toList());
//删除原有数据
if (CollectionUtil.isNotEmpty(emailidList)) {
assetEmailService.deleteIdList(emailidList);
assetBasicNetworkHistoryService.saveBatch(assetSupplyChainHistoryList);
}
//将子表数据复制到主表中
List<AssetEmail> emailNewList = emailCpPoListList.stream()
if (!req.getAssetCurrentCpPo().getOtherConcat().isEmpty()) {
for (UnitOtherConcatCpPo items : req.getAssetCurrentCpPo().getOtherConcat()) {
items.setAssetId(req.getAssetCurrentCpPo().getId());
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
}
//新增其他联系人
List<UnitOtherConcatHistory> unitOtherConcatHistoryList = req.getAssetCurrentCpPo().getOtherConcat().stream()
.map(cpPo -> {
AssetEmail current = new AssetEmail();
BeanUtils.copyProperties(cpPo, current); // 复制属性
return current; // 返回新对象
UnitOtherConcatHistory unitOtherConcatHistory = new UnitOtherConcatHistory();
unitOtherConcatHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(cpPo, unitOtherConcatHistory); // 复制属性
return unitOtherConcatHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetEmailService.saveBatch(emailNewList);
unitOtherConcatHistoryService.saveBatch(unitOtherConcatHistoryList);
}
}
private void syb(AssetCurrentShRequest req) {
if (req.getType() == 1) {
//小程序
List<Long> miniidList = miniProgramsCpPoListList.stream()
.map(AssetMiniProgramsCpPo::getAssetId)
.collect(Collectors.toList());
AssetMiniProgramsCpPo assetMiniProgramsCpPo = assetMiniProgramsCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (CollectionUtil.isNotEmpty(miniidList)) {
assetMiniProgramsService.deleteIdList(miniidList);
if (assetMiniProgramsCpPo != null) {
assetMiniProgramsService.deleteIdList(Collections.singletonList(assetMiniProgramsCpPo.getAssetId()));
//将子表数据复制到主表中
AssetMiniPrograms assetMiniPrograms = new AssetMiniPrograms();
BeanUtils.copyProperties(assetMiniProgramsCpPo, assetMiniPrograms); // 复制属性
assetMiniPrograms.setId(null);
assetMiniProgramsService.save(assetMiniPrograms);
}
}
if (req.getType() == 2) {
//公众号资产
AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (assetOfficialAccountCpPo != null) {
assetOfficialAccountService.deleteIdList(Collections.singletonList(assetOfficialAccountCpPo.getAssetId()));
//将子表数据复制到主表中
List<AssetMiniPrograms> miniNewList = miniProgramsCpPoListList.stream()
.map(cpPo -> {
AssetMiniPrograms current = new AssetMiniPrograms();
BeanUtils.copyProperties(cpPo, current); // 复制属性
return current; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetMiniProgramsService.saveBatch(miniNewList);
AssetOfficialAccount assetOfficialAccount = new AssetOfficialAccount();
BeanUtils.copyProperties(assetOfficialAccountCpPo, assetOfficialAccount); // 复制属性
assetOfficialAccountService.save(assetOfficialAccount);
}
//公众号
List<Long> officialidList = officialAccountCpPoListList.stream()
.map(AssetOfficialAccountCpPo::getAssetId)
.collect(Collectors.toList());
}
if (req.getType() == 3) {
//电子邮件资产
//根据assetId查询查询数据
AssetEmailCpPo assetEmailCpPo = assetEmailCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (CollectionUtil.isNotEmpty(officialidList)) {
assetOfficialAccountService.deleteIdList(officialidList);
if (assetEmailCpPo != null) {
assetEmailService.deleteIdList(Collections.singletonList(assetEmailCpPo.getAssetId()));
//将子表数据复制到主表中
AssetEmail assetEmail = new AssetEmail();
BeanUtils.copyProperties(assetEmailCpPo, assetEmail); // 复制属性
assetEmail.setId(null);
assetEmailService.save(assetEmail);
}
}
if (req.getType() == 4) {
//移动应用程序资产
//根据资产id查询
AssetAppCpPo assetAppCpPo = assetAppCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (assetAppCpPo != null) {
assetAppService.deleteIdList(Collections.singletonList(assetAppCpPo.getAssetId()));
//将子表数据复制到主表中
List<AssetOfficialAccount> officialNewList = officialAccountCpPoListList.stream()
.map(cpPo -> {
AssetOfficialAccount current = new AssetOfficialAccount();
BeanUtils.copyProperties(cpPo, current); // 复制属性
return current; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetOfficialAccountService.saveBatch(officialNewList);
AssetApp assetApp = new AssetApp();
BeanUtils.copyProperties(assetAppCpPo, assetApp); // 复制属性
assetApp.setId(null);
assetAppService.save(assetApp);
}
}
}
private void ifCq(AssetCurrentShRequest req, AssetTask assetTask) {
@ -823,99 +949,61 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//web
private void taskSaveOrDelete(AssetCurrentShRequest req) {
// 根据taskid查询五张数据
List<AssetCurrentCpPo> currentList = assetCurrentCpService.findByTaskId(req.getTaskId());
List<Long> idList = currentList.stream()
.map(AssetCurrentCpPo::getId)
.collect(Collectors.toList());
//删除原有数据
if (CollectionUtil.isNotEmpty(idList)) {
assetCurrentService.deleteIdList(idList);
}
// 根据资产id查询五张数据
AssetCurrentCpPo currentCpPo = assetCurrentCpService.findByTaskId(req.getAssetId());
//删除主表原有数据
if (currentCpPo != null) {
assetCurrentService.deleteIdList(currentCpPo.getId());
//将子表数据复制到主表中
List<AssetCurrent> currentNewList = currentList.stream()
.map(cpPo -> {
AssetCurrent current = new AssetCurrent();
BeanUtils.copyProperties(cpPo, current); // 复制属性
return current; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetCurrentService.saveBatch(currentNewList);
//AssetBusinessFormCpPo
List<AssetBusinessFormCpPo> bussinessList = assetBusinessFormCpService.findByTaskId(req.getTaskId());
List<Long> bussinessidList = bussinessList.stream()
.map(AssetBusinessFormCpPo::getAssetId)
.collect(Collectors.toList());
//删除原有数据
if (CollectionUtil.isNotEmpty(bussinessidList)) {
assetBusinessFormService.deleteIdList(bussinessidList);
BeanUtils.copyProperties(currentCpPo, current); // 复制属性
current.setId(null);
assetCurrentService.save(current);
}
//AssetBusinessFormCpPo
AssetBusinessFormCpPo businessFormCpPo = assetBusinessFormCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (businessFormCpPo != null) {
assetBusinessFormService.deleteIdList(Collections.singletonList(businessFormCpPo.getAssetId()));
//将子表数据复制到主表中
List<AssetBusinessForm> bussinessNewList = bussinessList.stream()
.map(cpPo -> {
AssetBusinessForm businessForm = new AssetBusinessForm();
BeanUtils.copyProperties(cpPo, businessForm); // 复制属性
return businessForm; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetBusinessFormService.saveBatch(bussinessNewList);
BeanUtils.copyProperties(businessFormCpPo, businessForm); // 复制属性
businessForm.setId(null);
assetBusinessFormService.save(businessForm);
}
//AssetBasicNetworkCpPo
List<AssetBasicNetworkCpPo> netWorkList = assetBasicNetworkCpService.findByTaskId(req.getTaskId());
List<Long> netWorkidList = netWorkList.stream()
.map(AssetBasicNetworkCpPo::getAssetId)
.collect(Collectors.toList());
AssetBasicNetworkCpPo networkCpPo = assetBasicNetworkCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (CollectionUtil.isNotEmpty(netWorkidList)) {
assetBasicNetworkService.deleteIdList(netWorkidList);
if (networkCpPo != null) {
assetBasicNetworkService.deleteIdList(Collections.singletonList(networkCpPo.getAssetId()));
AssetBasicNetwork network = new AssetBasicNetwork();
BeanUtils.copyProperties(networkCpPo, network);
network.setId(null);
assetBasicNetworkService.save(network);
}
//将子表数据复制到主表中
List<AssetBasicNetwork> netWorkNewList = netWorkList.stream()
.map(cpPo -> {
AssetBasicNetwork network = new AssetBasicNetwork();
BeanUtils.copyProperties(cpPo, network); // 复制属性
return network; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
assetBasicNetworkService.saveBatch(netWorkNewList);
//AssetSupplyChainCpPo
List<AssetSupplyChainCpPo> SupplyChainList = assetSupplyChainCpService.findByTaskId(req.getTaskId());
List<Long> SupplyChainidList = SupplyChainList.stream()
.map(AssetSupplyChainCpPo::getAssetId)
.collect(Collectors.toList());
AssetSupplyChainCpPo supplyChainCpPo = assetSupplyChainCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (CollectionUtil.isNotEmpty(SupplyChainidList)) {
assetSupplyChainService.deleteIdList(SupplyChainidList);
}
List<AssetSupplyChain> SupplyChainNewList = SupplyChainList.stream()
.map(cpPo -> {
if (supplyChainCpPo != null) {
assetSupplyChainService.deleteIdList(Collections.singletonList(supplyChainCpPo.getAssetId()));
AssetSupplyChain supplyChain = new AssetSupplyChain();
BeanUtils.copyProperties(supplyChainCpPo, supplyChain);
supplyChain.setId(null);
BeanUtils.copyProperties(cpPo, supplyChain); // 复制属性
return supplyChain; // 返回新对象
})
.collect(Collectors.toList());
assetSupplyChainService.saveBatch(SupplyChainNewList);
assetSupplyChainService.save(supplyChain);
}
//UnitOtherConcatCpPo
List<UnitOtherConcatCpPo> UnitOtherConcatList = unitOtherConcatCpService.findByTaskId(req.getTaskId());
List<Long> UnitOtherConcatidList = UnitOtherConcatList.stream()
.map(UnitOtherConcatCpPo::getAssetId)
.collect(Collectors.toList());
UnitOtherConcatCpPo unitOtherConcatCpPo = unitOtherConcatCpService.findByTaskId(req.getAssetId());
//删除原有数据
if (CollectionUtil.isNotEmpty(UnitOtherConcatidList)) {
unitOtherConcatService.deleteIdList(UnitOtherConcatidList);
}
List<UnitOtherConcat> UnitOtherConcatNewList = UnitOtherConcatList.stream()
.map(cpPo -> {
if (unitOtherConcatCpPo != null) {
unitOtherConcatService.deleteIdList(Collections.singletonList(unitOtherConcatCpPo.getAssetId()));
UnitOtherConcat unitOtherConcat = new UnitOtherConcat();
BeanUtils.copyProperties(cpPo, unitOtherConcat); // 复制属性
return unitOtherConcat; // 返回新对象
})
.collect(Collectors.toList());
unitOtherConcatService.saveBatch(UnitOtherConcatNewList);
BeanUtils.copyProperties(unitOtherConcatCpPo, unitOtherConcat); // 复制属性
unitOtherConcat.setConcatId(null);
unitOtherConcatService.save(unitOtherConcat);
}
}
@Override

@ -36,7 +36,7 @@ public class UnitOtherConcatCpServiceImpl extends ServiceImpl<UnitOtherConcatCpM
}
@Override
public List<UnitOtherConcatCpPo> findByTaskId(int taskId) {
return unitOtherConcatCpMapper.findByTaskId(taskId);
public UnitOtherConcatCpPo findByTaskId(int assetId) {
return unitOtherConcatCpMapper.findByTaskId(assetId);
}
}

@ -5,10 +5,8 @@
<mapper namespace="com.ruoyi.tc.mapper.AssetCurrentMapper">
<delete id="deleteIdList">
DELETE FROM asset_current
WHERE id IN
<foreach item="id" index="index" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
WHERE id =#{id}
</delete>

@ -235,7 +235,7 @@
and b.xtlx = #{req.xtlx}
</if>
<if test="req.xtmc!=null and req.xtmc!='' ">
and b.xtmc = #{req.xtmc}
and b.xtmc like concat('%',#{req.xtmc},'%')
</if>
</where>
order by FIELD(status,1,4,3,0,5), b.update_time
@ -472,7 +472,7 @@
and b.status =#{req.status}
</if>
<if test="req.xtmc!=null and req.xtmc!='' ">
and b.xcxmc = #{req.xtmc}
and b.xcxmc like concat('%',#{req.xtmc},'%')
</if>
</where>
@ -504,7 +504,7 @@
and b.status =#{req.status}
</if>
<if test="req.xtmc!=null and req.xtmc!='' ">
and b.gzhmc = #{req.xtmc}
and b.gzhmc like concat('%',#{req.xtmc},'%')
</if>
</where>
order by FIELD(status,1,4,3,0,5), b.update_time
@ -535,7 +535,7 @@
and b.status =#{req.status}
</if>
<if test="req.xtmc!=null and req.xtmc!='' ">
and b.dzyxhz = #{req.xtmc}
and b.dzyxhz like concat('%',#{req.xtmc},'%')
</if>
</where>
order by FIELD(status,1,4,3,0,5), b.update_time
@ -566,14 +566,12 @@
and b.status =#{req.status}
</if>
<if test="req.xtmc!=null and req.xtmc!='' ">
and b.app_name = #{req.xtmc}
and b.app_name like concat('%',#{req.xtmc},'%')
</if>
</where>
order by FIELD(status,1,4,3,0,5), b.update_time
</select>
<select id="getByTaskId" resultType="com.ruoyi.tc.entity.AssetTask" parameterType="int">
select * from asset_task where id=#{taskId}
</select>
<select id="export" resultType="com.ruoyi.tc.entity.response.AssetdwHcResponse"
parameterType="com.ruoyi.tc.entity.request.AssetdwHcRequest">
SELECT
@ -920,9 +918,59 @@
<select id="findByDwmc" resultType="com.ruoyi.tc.entity.AssetTask" parameterType="java.lang.String">
select * from asset_task where dwmc like concat('%', #{dwmc}, '%') and task_status=1
</select>
<select id="findBytaskId" resultType="com.ruoyi.tc.entity.AssetTask" parameterType="java.lang.Integer">
<select id="getByTaskId" resultType="com.ruoyi.tc.entity.AssetTask" parameterType="int">
select * from asset_task where id =#{taskId}
</select>
<select id="getJxz" resultType="java.lang.Integer" parameterType="int">
SELECT SUM(counts) AS total_count
FROM (
SELECT COUNT(*) AS counts FROM `asset_mini_programs_cp` WHERE task_id = #{taskId} AND `status` NOT IN (3, 5)
UNION ALL
SELECT COUNT(*) AS counts FROM `asset_official_account_cp` WHERE task_id = #{taskId} AND `status` NOT IN (3, 5)
UNION ALL
SELECT COUNT(*) AS counts FROM `asset_current_cp` WHERE task_id = #{taskId} AND `status` NOT IN (3, 5)
UNION ALL
SELECT COUNT(*) AS counts FROM `asset_email_cp` WHERE task_id = #{taskId} AND `status` NOT IN (3, 5)
UNION ALL
SELECT COUNT(*) AS counts FROM `asset_app_cp` WHERE task_id = #{taskId} AND `status` NOT IN (3, 5)
) AS combined_counts;
</select>
<select id="getifcq" resultType="java.lang.String" parameterType="int">
SELECT GREATEST(
COALESCE((SELECT update_time
FROM `asset_mini_programs_cp`
WHERE task_id = #{taskId}
AND `status` = 3
ORDER BY update_time DESC
LIMIT 1), '1970-01-01 00:00:00'),
COALESCE((SELECT update_time
FROM `asset_official_account_cp`
WHERE task_id = #{taskId}
AND `status` = 3
ORDER BY update_time DESC
LIMIT 1), '1970-01-01 00:00:00'),
COALESCE((SELECT update_time
FROM `asset_current_cp`
WHERE task_id = #{taskId}
AND `status` = 3
ORDER BY update_time DESC
LIMIT 1), '1970-01-01 00:00:00'),
COALESCE((SELECT update_time
FROM `asset_email_cp`
WHERE task_id = #{taskId}
AND `status` = 3
ORDER BY update_time DESC
LIMIT 1), '1970-01-01 00:00:00'),
COALESCE((SELECT update_time
FROM `asset_app_cp`
WHERE task_id = #{taskId}
AND `status` = 3
ORDER BY update_time DESC
LIMIT 1), '1970-01-01 00:00:00')
) AS latest_update_time;
</select>
<update id="xcxsh"
parameterType="com.ruoyi.tc.entity.request.AssetCurrentShRequest">
update asset_mini_programs_cp

Loading…
Cancel
Save