杜函宇 1 month ago
commit 70dec97f5a

@ -222,22 +222,7 @@ public class AssetAppController extends BaseController {
@Log(title = "编辑app数据", businessType = BusinessType.UPDATE) @Log(title = "编辑app数据", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody AssetApp assetApp) { 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)); return success(assetAppService.edit(assetApp));
} }

@ -516,20 +516,23 @@ public class AssetCurrentController extends BaseController {
@PutMapping @PutMapping
public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) { public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) {
//根据资产id查询资产子表,判断是否有此资产进行中的任务,如果资产状态是已关停与修改的数据不符,则修改任务中的资产状态 //根据资产id查询资产子表,判断是否有此资产进行中的任务,如果资产状态是已关停与修改的数据不符,则修改任务中的资产状态
AssetCurrentCpPo currentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId()); List<AssetCurrentCpPo> currentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId());
if (currentCpPo != null) { if (currentCpPo != null) {
//查询任务是否为进行中 for (AssetCurrentCpPo s:currentCpPo) {
AssetTask assetTask = assetTaskService.findByTaskId(currentCpPo.getTaskId()); //查询任务是否为进行中
if (assetTask.getTaskStatus().equals(1)) { AssetTask assetTask = assetTaskService.findByTaskId(s.getTaskId());
if (currentCpPo.getStatus() == 5) { if (assetTask.getTaskStatus().equals(1)){
//修改任务中资产状态 if (s.getStatus()==5 ){
currentCpPo.setStatus(0); //修改任务中资产状态
currentCpPo.setBtgyy(null); s.setStatus(0);
assetTask.setTaskStatus(1); s.setBtgyy(null);
assetTaskService.update(assetTask); assetTask.setTaskStatus(1);
assetCurrentCpService.updateById(currentCpPo); assetTaskService.update(assetTask);
assetCurrentCpService.updateById(s);
}
} }
} }
} }
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrent.getDwmc()).eq(Unit::getDelFlag, 0).list(); List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrent.getDwmc()).eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) { if (list == null || list.isEmpty()) {
@ -679,17 +682,20 @@ public class AssetCurrentController extends BaseController {
}); });
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除 //根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetCurrent.getDwmc()); AssetTask assetTask = assetTaskService.findByDwmc(assetCurrent.getDwmc());
if (assetTask != null) { if (assetTask == null) {
delete(assetCurrent); delete(assetCurrent);
} else { } else {
//根据资产id查询旧资产 //根据资产id查询旧资产
AssetCurrentCpPo assetCurrentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId()); List<AssetCurrentCpPo> assetCurrentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId());
if (assetCurrentCpPo != null) { for (AssetCurrentCpPo s:assetCurrentCpPo){
assetCurrentCpPo.setDwmc(assetCurrent.getDwmc()); if (s!=null){
assetCurrentCpPo.setTaskId(assetTask.getId()); 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.bean.BeanUtils;
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.history.*;
import com.ruoyi.tc.entity.po.*; import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.request.AssestTaskXqRequest; import com.ruoyi.tc.entity.request.*;
import com.ruoyi.tc.entity.request.AssetCurrentShRequest; import com.ruoyi.tc.entity.response.*;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest; import com.ruoyi.tc.historyService.*;
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.mapper.AssetTaskMapper; import com.ruoyi.tc.mapper.AssetTaskMapper;
import com.ruoyi.tc.service.*; import com.ruoyi.tc.service.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -28,9 +24,12 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors;
/** /**
* (AssetTask) * (AssetTask)
@ -125,6 +124,39 @@ public class AssetTaskController extends BaseController {
@Resource @Resource
private AssetTaskMapper assetTaskDao; 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()); 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(); return success();
} }
@ -376,7 +500,7 @@ public class AssetTaskController extends BaseController {
@ApiOperation(value = "单位端校验提交") @ApiOperation(value = "单位端校验提交")
@PostMapping("/jyTj") @PostMapping("/jyTj")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult tj(@RequestBody @Validated AssetCurrentJyPo assetCurrent) { public AjaxResult tj(@RequestBody @Validated AssetCurrentJyPo assetCurrent) {
//根据资产id和任务id删除五张表数据 //根据资产id和任务id删除五张表数据
assetCurrentCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId()); assetCurrentCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
assetBusinessFormCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId()); assetBusinessFormCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
@ -450,7 +574,98 @@ public class AssetTaskController extends BaseController {
//新增其他联系人 //新增其他联系人
unitOtherConcatJyservice.saveBatch(assetCurrent.getOtherConcat()); 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(); return success();
} }
@ -492,7 +707,7 @@ public class AssetTaskController extends BaseController {
public void export(HttpServletResponse response, AssetdwHcRequest req) { public void export(HttpServletResponse response, AssetdwHcRequest req) {
List<AssetdwHcResponse> list = assetTaskService.export(req); List<AssetdwHcResponse> list = assetTaskService.export(req);
list.forEach(x -> { list.forEach(x -> {
String formattedRatio = x.getCheckedRatio() + "%"; String formattedRatio = x.getCheckedRatio() + "%";
x.setCheckedRatio(formattedRatio); x.setCheckedRatio(formattedRatio);
}); });
ExcelUtil<AssetdwHcResponse> util = new ExcelUtil<AssetdwHcResponse>(AssetdwHcResponse.class); ExcelUtil<AssetdwHcResponse> util = new ExcelUtil<AssetdwHcResponse>(AssetdwHcResponse.class);
@ -531,6 +746,10 @@ public class AssetTaskController extends BaseController {
assetTaskService.updateYgtByTaskId(assetMiniProgramsCpPo.getTaskId(), ygt); assetTaskService.updateYgtByTaskId(assetMiniProgramsCpPo.getTaskId(), ygt);
} }
assetMiniProgramsCpService.save(assetMiniProgramsCpPo); assetMiniProgramsCpService.save(assetMiniProgramsCpPo);
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(assetMiniProgramsCpPo, assetMiniProgramsHistory);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
return success(); return success();
} }
@ -552,13 +771,13 @@ public class AssetTaskController extends BaseController {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
StringBuilder c = new StringBuilder(); StringBuilder c = new StringBuilder();
assetOfficialAccountCpPo.getCdList().forEach(x -> { 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("|"); 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("|"); 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("|"); c.append(x.getCdlx()).append("|");
} }
}); });
@ -586,6 +805,10 @@ public class AssetTaskController extends BaseController {
} }
assetOfficialAccountCpService.save(assetOfficialAccountCpPo); assetOfficialAccountCpService.save(assetOfficialAccountCpPo);
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(assetOfficialAccountCpPo, assetOfficialAccountHistory);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
return success(); return success();
} }
@ -622,6 +845,10 @@ public class AssetTaskController extends BaseController {
} }
assetAppCpService.save(assetAppCpPo); assetAppCpService.save(assetAppCpPo);
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(assetAppCpPo, assetAppHistory);
assetAppHistoryService.save(assetAppHistory);
return success(); return success();
} }
@ -657,8 +884,11 @@ public class AssetTaskController extends BaseController {
assetTaskService.updateYgtByTaskId(assetEmailCpPo.getTaskId(), ygt); assetTaskService.updateYgtByTaskId(assetEmailCpPo.getTaskId(), ygt);
} }
assetEmailCpService.save(assetEmailCpPo); assetEmailCpService.save(assetEmailCpPo);
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(assetEmailCpPo, assetEmailHistory);
assetEmailHistoryService.save(assetEmailHistory);
return success(); return success();
} }
@ -687,6 +917,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc); assetLcService.insert(assetLc);
} }
assetMiniProgramsJyService.save(assetMiniProgramsJyPo); assetMiniProgramsJyService.save(assetMiniProgramsJyPo);
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(assetMiniProgramsJyPo, assetMiniProgramsHistory);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
return success(); return success();
} }
@ -700,20 +934,20 @@ public class AssetTaskController extends BaseController {
@ApiOperation(value = "公众号单位端校验提交") @ApiOperation(value = "公众号单位端校验提交")
@PostMapping("/gzhjyTj") @PostMapping("/gzhjyTj")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult gzhjyTj(@RequestBody @Validated AssetOfficialAccountJyPo assetOfficialAccountJyPo) { public AjaxResult gzhjyTj(@RequestBody @Validated AssetOfficialAccountJyPo assetOfficialAccountJyPo) {
assetOfficialAccountCpService.deletByAssetIdandTaskId(assetOfficialAccountJyPo.getAssetId(), assetOfficialAccountJyPo.getTaskId()); assetOfficialAccountCpService.deletByAssetIdandTaskId(assetOfficialAccountJyPo.getAssetId(), assetOfficialAccountJyPo.getTaskId());
if (assetOfficialAccountJyPo.getCdList() != null && !assetOfficialAccountJyPo.getCdList().isEmpty()) { if (assetOfficialAccountJyPo.getCdList() != null && !assetOfficialAccountJyPo.getCdList().isEmpty()) {
StringBuilder a = new StringBuilder(); StringBuilder a = new StringBuilder();
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
StringBuilder c = new StringBuilder(); StringBuilder c = new StringBuilder();
assetOfficialAccountJyPo.getCdList().forEach(x -> { 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("|"); 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("|"); 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("|"); c.append(x.getCdlx()).append("|");
} }
}); });
@ -734,6 +968,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc); assetLcService.insert(assetLc);
} }
assetOfficialAccountJyService.save(assetOfficialAccountJyPo); assetOfficialAccountJyService.save(assetOfficialAccountJyPo);
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(assetOfficialAccountJyPo, assetOfficialAccountHistory);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
return success(); return success();
} }
@ -747,7 +985,7 @@ public class AssetTaskController extends BaseController {
@ApiOperation(value = "资产移动应用程序单位端校验提交") @ApiOperation(value = "资产移动应用程序单位端校验提交")
@PostMapping("/appjyTj") @PostMapping("/appjyTj")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult appjyTj(@RequestBody @Validated AssetAppJyPo assetAppJyPo) { public AjaxResult appjyTj(@RequestBody @Validated AssetAppJyPo assetAppJyPo) {
//根据资产id和任务id删除数据 //根据资产id和任务id删除数据
assetAppCpService.deletByAssetIdandTaskId(assetAppJyPo.getAssetId(), assetAppJyPo.getTaskId()); assetAppCpService.deletByAssetIdandTaskId(assetAppJyPo.getAssetId(), assetAppJyPo.getTaskId());
//新增流程节点时间 //新增流程节点时间
@ -763,6 +1001,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc); assetLcService.insert(assetLc);
} }
assetAppJyService.save(assetAppJyPo); assetAppJyService.save(assetAppJyPo);
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(assetAppJyPo, assetAppHistory);
assetAppHistoryService.save(assetAppHistory);
return success(); return success();
} }
@ -792,6 +1034,10 @@ public class AssetTaskController extends BaseController {
assetLcService.insert(assetLc); assetLcService.insert(assetLc);
} }
assetEmailJyService.save(assetEmailJyPo); assetEmailJyService.save(assetEmailJyPo);
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(assetEmailJyPo, assetEmailHistory);
assetEmailHistoryService.save(assetEmailHistory);
return success(); return success();
} }
@ -828,5 +1074,39 @@ public class AssetTaskController extends BaseController {
return AjaxResult.success(assetTaskService.dwHcBl(req)); 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; private Long networkId;
@ApiModelProperty("主表id")
private Long copyId;
/** /**
* id * id

@ -408,4 +408,8 @@ public class AssetBusinessFormHistory extends BaseClass implements Serializable
@ApiModelProperty("任务id") @ApiModelProperty("任务id")
private Integer taskId; 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 * id

@ -22,12 +22,13 @@ import java.io.Serializable;
public class UnitOtherConcatHistory extends BaseClass implements Serializable { public class UnitOtherConcatHistory extends BaseClass implements Serializable {
@ApiModelProperty("主表id") @ApiModelProperty("主表id")
@TableId(type = IdType.AUTO,value = "concat_id") @TableId(type = IdType.AUTO, value = "concat_id")
private Long concatId; private Long concatId;
@ApiModelProperty("主表id")
private Long copyId;
@ApiModelProperty("单位id") @ApiModelProperty("单位id")
private Long unitId; 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.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetAppHistory; import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
/** /**
* (asset_app_history) * (asset_app_history)
@ -10,4 +12,14 @@ import com.ruoyi.tc.entity.history.AssetAppHistory;
* @since 2024-11-28 17:13:07 * @since 2024-11-28 17:13:07
*/ */
public interface AssetAppHistoryService extends IService<AssetAppHistory> { 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.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetCurrentHistory; import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.po.AssetCurrentCpPo; import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import java.util.List;
/** /**
* (asset_current_history) * (asset_current_history)
@ -14,5 +12,13 @@ import java.util.List;
*/ */
public interface AssetCurrentHistoryService extends IService<AssetCurrentHistory> { public interface AssetCurrentHistoryService extends IService<AssetCurrentHistory> {
/**
* web
*
* @param req
* @return
*/
AssetCurrentHistory findByTaskIdandAssetId(AssetzcTjRequest req);
} }

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

@ -1,7 +1,9 @@
package com.ruoyi.tc.historyService; package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService; 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.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
/** /**
* (asset_official_account_history) * (asset_official_account_history)
@ -10,4 +12,18 @@ import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
* @since 2024-11-28 17:13:07 * @since 2024-11-28 17:13:07
*/ */
public interface AssetOfficialAccountHistoryService extends IService<AssetOfficialAccountHistory> { 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetAppHistory; import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetAppHistoryService; import com.ruoyi.tc.historyService.AssetAppHistoryService;
import com.ruoyi.tc.mapper.history.AssetAppHistoryMapper; import com.ruoyi.tc.mapper.history.AssetAppHistoryMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (asset_app_history) * (asset_app_history)
* *
@ -15,5 +18,11 @@ import org.springframework.stereotype.Service;
@Service @Service
public class AssetAppHistoryServiceImpl extends ServiceImpl<AssetAppHistoryMapper, AssetAppHistory> implements AssetAppHistoryService { 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetCurrentHistory; import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetCurrentHistoryService; import com.ruoyi.tc.historyService.AssetCurrentHistoryService;
import com.ruoyi.tc.mapper.history.AssetCurrentHistoryMapper; import com.ruoyi.tc.mapper.history.AssetCurrentHistoryMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (asset_current_history) * (asset_current_history)
* *
@ -14,5 +17,14 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class AssetCurrentHistoryServiceImpl extends ServiceImpl<AssetCurrentHistoryMapper, AssetCurrentHistory> implements AssetCurrentHistoryService { 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetEmailHistory; import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetEmailHistoryService; import com.ruoyi.tc.historyService.AssetEmailHistoryService;
import com.ruoyi.tc.mapper.history.AssetEmailHistoryMapper; import com.ruoyi.tc.mapper.history.AssetEmailHistoryMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (asset_email_history) * (asset_email_history)
* *
@ -14,4 +17,11 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class AssetEmailHistoryServiceImpl extends ServiceImpl<AssetEmailHistoryMapper, AssetEmailHistory> implements AssetEmailHistoryService { 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory; import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetMiniProgramsHistoryService; import com.ruoyi.tc.historyService.AssetMiniProgramsHistoryService;
import com.ruoyi.tc.mapper.history.AssetMiniProgramsHistoryMapper; import com.ruoyi.tc.mapper.history.AssetMiniProgramsHistoryMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (asset_mini_programs_history) * (asset_mini_programs_history)
* *
@ -14,4 +17,10 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class AssetMiniProgramsHistoryServiceImpl extends ServiceImpl<AssetMiniProgramsHistoryMapper, AssetMiniProgramsHistory> implements AssetMiniProgramsHistoryService { 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory; import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.historyService.AssetOfficialAccountHistoryService; import com.ruoyi.tc.historyService.AssetOfficialAccountHistoryService;
import com.ruoyi.tc.mapper.history.AssetOfficialAccountHistoryMapper; import com.ruoyi.tc.mapper.history.AssetOfficialAccountHistoryMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (asset_official_account_history) * (asset_official_account_history)
* *
@ -14,4 +17,10 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class AssetOfficialAccountHistoryServiceImpl extends ServiceImpl<AssetOfficialAccountHistoryMapper, AssetOfficialAccountHistory> implements AssetOfficialAccountHistoryService { 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); void deletByAssetId(@Param("assetId") Long assetId);
/** /**
* taskid * assetId
* *
* @param taskId id * @param assetId id
* @return * @return
*/ */
@Select("select * from asset_app_cp where task_id=#{taskId}") @Select("select * from asset_app_cp where asset_id=#{assetId}")
List<AssetAppCpPo> findByTaskId(@Param("taskId") int taskId); 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} ") @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); void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") int taskId);
/** /**
* taskid * assetId
* *
* @param taskId id * @param assetId id
* @return * @return
*/ */
@Select("select * from asset_basic_network_cp where task_id=#{taskId}") @Select("select * from asset_basic_network_cp where asset_id=#{assetId}")
List<AssetBasicNetworkCpPo> findByTaskId(int taskId); AssetBasicNetworkCpPo findByTaskId(int assetId);

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

@ -28,13 +28,13 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
/** /**
* taskid * id
* *
* @param taskId id * @param assetId id
* @return * @return
*/ */
@Select("select * from asset_current_cp where task_id=#{taskId}") @Select("select * from asset_current_cp where id=#{assetId}")
List<AssetCurrentCpPo> findByTaskId(int taskId); AssetCurrentCpPo findByTaskId(int assetId);
/** /**
@ -60,7 +60,7 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
@Select(" select * from asset_current_cp where id = #{id} ") @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); void deletByAssetId(@Param("assetId") Long assetId);
/** /**
* taskid * assetId
* *
* @param taskId id * @param assetId id
* @return * @return
*/ */
@Select("select * from asset_email_cp where task_id=#{taskId}") @Select("select * from asset_email_cp where asset_id=#{assetId}")
List<AssetEmailCpPo> findByTaskId(@Param("taskId") int taskId); AssetEmailCpPo findByTaskId(@Param("taskId") int assetId);
/** /**

@ -38,13 +38,13 @@ public interface AssetMiniProgramsCpMapper extends BaseMapper<AssetMiniProgramsC
void deletByAssetId(@Param("assetId") Long assetId); void deletByAssetId(@Param("assetId") Long assetId);
/** /**
* taskid * assetId
* *
* @param taskId id * @param assetId id
* @return * @return
*/ */
@Select("select * from asset_mini_programs_cp where task_id=#{taskId}") @Select("select * from asset_mini_programs_cp where asset_id=#{assetId}")
List<AssetMiniProgramsCpPo> findByTaskId(@Param("taskId") int taskId); 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.Select;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
import java.util.List;
/** /**
* (asset_official_account_cp)访 * (asset_official_account_cp)访
* *
@ -37,13 +35,13 @@ public interface AssetOfficialAccountCpMapper extends BaseMapper<AssetOfficialAc
/** /**
* taskid * assetId
* *
* @param taskId id * @param assetId id
* @return * @return
*/ */
@Select("select * from asset_official_account_cp where task_id=#{taskId}") @Select("select * from asset_official_account_cp where asset_id=#{assetId}")
List<AssetOfficialAccountCpPo> findByTaskId(@Param("taskId") int taskId); 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 * @return
*/ */
@Select("select * from asset_supply_chain_cp where task_id=#{taskId}") @Select("select * from asset_supply_chain_cp where asset_id=#{assetId}")
List<AssetSupplyChainCpPo> findByTaskId(int taskId); AssetSupplyChainCpPo findByTaskId(int assetId);
} }

@ -274,6 +274,20 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
*/ */
AssetTask getByTaskId(@Param("taskId") int taskId); 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 * @param taskId id
*/ */
@Delete("delete from unit_other_contact_cp where asset_id=#{assetId} and task_id =#{taskId} ") @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 * idid
@ -44,11 +44,11 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
void deletByAssetId(@Param("assetId") Long assetId); void deletByAssetId(@Param("assetId") Long assetId);
/** /**
* taskid * id
* *
* @param taskId id * @param assetId id
* @return * @return
*/ */
@Select("select * from unit_other_contact_cp where task_id=#{taskId}") @Select("select * from unit_other_contact_cp where asset_id=#{assetId}")
List<UnitOtherConcatCpPo> findByTaskId(int taskId); UnitOtherConcatCpPo findByTaskId(int assetId);
} }

@ -2,6 +2,8 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetAppHistory; import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import org.apache.ibatis.annotations.Select;
/** /**
* (asset_app_history)访 * (asset_app_history)访
@ -10,5 +12,16 @@ import com.ruoyi.tc.entity.history.AssetAppHistory;
* @since 2024-11-15 10:03:56 * @since 2024-11-15 10:03:56
*/ */
public interface AssetAppHistoryMapper extends BaseMapper<AssetAppHistory> { 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.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetCurrentHistory; 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)访 * (asset_current_history)访
@ -10,5 +13,16 @@ import com.ruoyi.tc.entity.history.AssetCurrentHistory;
* @since 2024-11-15 10:03:56 * @since 2024-11-15 10:03:56
*/ */
public interface AssetCurrentHistoryMapper extends BaseMapper<AssetCurrentHistory> { 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.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetEmailHistory; 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)访 * (asset_email_cp)访
@ -10,5 +13,15 @@ import com.ruoyi.tc.entity.history.AssetEmailHistory;
* @since 2024-11-15 10:03:56 * @since 2024-11-15 10:03:56
*/ */
public interface AssetEmailHistoryMapper extends BaseMapper<AssetEmailHistory> { 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.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory; 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)访 * (asset_mini_programs_history)访
@ -10,5 +13,15 @@ import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
* @since 2024-11-15 10:03:56 * @since 2024-11-15 10:03:56
*/ */
public interface AssetMiniProgramsHistoryMapper extends BaseMapper<AssetMiniProgramsHistory> { 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.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory; import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo; 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.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -17,5 +18,15 @@ import java.util.List;
* @since 2024-11-15 10:03:56 * @since 2024-11-15 10:03:56
*/ */
public interface AssetOfficialAccountHistoryMapper extends BaseMapper<AssetOfficialAccountHistory> { 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 * @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 * @return
*/ */
List<AssetBasicNetworkCpPo> findByTaskId(int taskId); AssetBasicNetworkCpPo findByTaskId(int assetId);

@ -38,12 +38,12 @@ public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCp
void deletByAssetId(Long assetId); void deletByAssetId(Long assetId);
/** /**
* taskid * assetId
* *
* @param taskId id * @param assetId id
* @return * @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 * @return
*/ */
List<AssetCurrentCpPo> findByTaskId(int taskId); AssetCurrentCpPo findByTaskId(int assetId);
/** /**
@ -63,7 +63,7 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
* @param id * @param id
* @return * @return
*/ */
AssetCurrentCpPo findDwmc(Long id); List<AssetCurrentCpPo> findDwmc(Long id);

@ -52,7 +52,7 @@ public interface AssetCurrentService extends IService<AssetCurrent> {
* *
* @param idList * @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 * @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 * @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 * @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 * @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 * @return
*/ */
List<UnitOtherConcatCpPo> findByTaskId(int taskId); UnitOtherConcatCpPo findByTaskId(int assetId);
} }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -235,7 +235,7 @@
and b.xtlx = #{req.xtlx} and b.xtlx = #{req.xtlx}
</if> </if>
<if test="req.xtmc!=null and req.xtmc!='' "> <if test="req.xtmc!=null and req.xtmc!='' ">
and b.xtmc = #{req.xtmc} and b.xtmc like concat('%',#{req.xtmc},'%')
</if> </if>
</where> </where>
order by FIELD(status,1,4,3,0,5), b.update_time order by FIELD(status,1,4,3,0,5), b.update_time
@ -472,7 +472,7 @@
and b.status =#{req.status} and b.status =#{req.status}
</if> </if>
<if test="req.xtmc!=null and req.xtmc!='' "> <if test="req.xtmc!=null and req.xtmc!='' ">
and b.xcxmc = #{req.xtmc} and b.xcxmc like concat('%',#{req.xtmc},'%')
</if> </if>
</where> </where>
@ -504,7 +504,7 @@
and b.status =#{req.status} and b.status =#{req.status}
</if> </if>
<if test="req.xtmc!=null and req.xtmc!='' "> <if test="req.xtmc!=null and req.xtmc!='' ">
and b.gzhmc = #{req.xtmc} and b.gzhmc like concat('%',#{req.xtmc},'%')
</if> </if>
</where> </where>
order by FIELD(status,1,4,3,0,5), b.update_time order by FIELD(status,1,4,3,0,5), b.update_time
@ -535,7 +535,7 @@
and b.status =#{req.status} and b.status =#{req.status}
</if> </if>
<if test="req.xtmc!=null and req.xtmc!='' "> <if test="req.xtmc!=null and req.xtmc!='' ">
and b.dzyxhz = #{req.xtmc} and b.dzyxhz like concat('%',#{req.xtmc},'%')
</if> </if>
</where> </where>
order by FIELD(status,1,4,3,0,5), b.update_time order by FIELD(status,1,4,3,0,5), b.update_time
@ -566,14 +566,12 @@
and b.status =#{req.status} and b.status =#{req.status}
</if> </if>
<if test="req.xtmc!=null and req.xtmc!='' "> <if test="req.xtmc!=null and req.xtmc!='' ">
and b.app_name = #{req.xtmc} and b.app_name like concat('%',#{req.xtmc},'%')
</if> </if>
</where> </where>
order by FIELD(status,1,4,3,0,5), b.update_time order by FIELD(status,1,4,3,0,5), b.update_time
</select> </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" <select id="export" resultType="com.ruoyi.tc.entity.response.AssetdwHcResponse"
parameterType="com.ruoyi.tc.entity.request.AssetdwHcRequest"> parameterType="com.ruoyi.tc.entity.request.AssetdwHcRequest">
SELECT SELECT
@ -920,9 +918,59 @@
<select id="findByDwmc" resultType="com.ruoyi.tc.entity.AssetTask" parameterType="java.lang.String"> <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 * from asset_task where dwmc like concat('%', #{dwmc}, '%') and task_status=1
</select> </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 * from asset_task where id =#{taskId}
</select> </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" <update id="xcxsh"
parameterType="com.ruoyi.tc.entity.request.AssetCurrentShRequest"> parameterType="com.ruoyi.tc.entity.request.AssetCurrentShRequest">
update asset_mini_programs_cp update asset_mini_programs_cp

Loading…
Cancel
Save