管理端可在资产管理模块编辑资产所属单位信息,并同步至任务中

duhanyu
dongdingding 1 month ago
parent c4b3f52ecc
commit 36e24cc5cd

@ -1,5 +1,6 @@
package com.ruoyi.tc.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
@ -236,10 +238,40 @@ public class AssetTaskController extends BaseController {
return AjaxResult.success(assetTaskService.taskSh(taskId, assetId));
}
/**
*
*
* @param id id
* @return
*/
@ApiOperation(value = "历史详情信息", response = AssetHistoryResponse.class)
@GetMapping("/history")
public AjaxResult webHistory(@RequestParam("id") Long id, @RequestParam("type") Integer type) {
AssetHistoryResponse assetHistoryResponse = new AssetHistoryResponse();
if (type == 0) {
//web
assetHistoryResponse.setAssetCurrentHistory(assetTaskService.webHistory(id));
} else if (type == 1) {
//小程序资产
assetHistoryResponse.setAssetMiniProgramsHistory(assetTaskService.miniHistory(id));
} else if (type == 2) {
//公众号资产
assetHistoryResponse.setAssetOfficialAccountHistory(assetTaskService.officeHistory(id));
} else if (type == 3) {
//电子邮件资产
assetHistoryResponse.setAssetEmailHistory(assetTaskService.emailHistory(id));
} else if (type == 4) {
//移动应用程序资产
assetHistoryResponse.setAssetAppHistory(assetTaskService.appHistory(id));
}
return AjaxResult.success(assetHistoryResponse);
}
/**
*
*
* @param taskId id
* @param assetId id
* @return
*/
@ -250,6 +282,7 @@ public class AssetTaskController extends BaseController {
return AjaxResult.success(assetTaskService.minitaskSh(taskId, assetId));
}
/**
*
*
@ -279,6 +312,7 @@ public class AssetTaskController extends BaseController {
return AjaxResult.success(assetTaskService.emailtaskSh(taskId, assetId));
}
/**
*
*
@ -293,6 +327,7 @@ public class AssetTaskController extends BaseController {
return AjaxResult.success(assetTaskService.apptaskSh(taskId, assetId));
}
/**
*
*
@ -340,7 +375,7 @@ public class AssetTaskController extends BaseController {
}
StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlymList())) {
assetCurrent.getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
a.append(x.getKey());
@ -350,7 +385,7 @@ public class AssetTaskController extends BaseController {
}
assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlIpList())) {
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
b.append(x.getKey());
@ -402,7 +437,7 @@ public class AssetTaskController extends BaseController {
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
//新增历史记录
StringBuilder c = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlymList())) {
assetCurrent.getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
c.append(x.getKey());
@ -412,7 +447,7 @@ public class AssetTaskController extends BaseController {
}
assetCurrent.setGlym(a.toString());
StringBuilder d = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlIpList())) {
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
d.append(x.getKey());
@ -435,6 +470,7 @@ public class AssetTaskController extends BaseController {
AssetBusinessFormHistory assetBusinessFormHistory = new AssetBusinessFormHistory();
assetBusinessFormHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(assetCurrent.getXjgywxt(), assetBusinessFormHistory);
assetBusinessFormHistory.setBusinessId(null);
assetBusinessFormHistoryService.save(assetBusinessFormHistory);
}
@ -450,6 +486,7 @@ public class AssetTaskController extends BaseController {
AssetSupplyChainHistory assetSupplyChainHistory = new AssetSupplyChainHistory();
assetSupplyChainHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetSupplyChainHistory); // 复制属性
assetSupplyChainHistory.setSupplyId(null);
return assetSupplyChainHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
@ -467,6 +504,7 @@ public class AssetTaskController extends BaseController {
AssetBasicNetworkHistory assetBasicNetworkHistory = new AssetBasicNetworkHistory();
assetBasicNetworkHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetBasicNetworkHistory); // 复制属性
assetBasicNetworkHistory.setNetworkId(null);
return assetBasicNetworkHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
@ -483,6 +521,7 @@ public class AssetTaskController extends BaseController {
UnitOtherConcatHistory unitOtherConcatHistory = new UnitOtherConcatHistory();
unitOtherConcatHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, unitOtherConcatHistory); // 复制属性
unitOtherConcatHistory.setUnitId(null);
return unitOtherConcatHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
@ -520,7 +559,7 @@ public class AssetTaskController extends BaseController {
// }
StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlymList())) {
assetCurrent.getGlymList().forEach(x -> {
a.append(x);
a.append(",");
@ -528,7 +567,7 @@ public class AssetTaskController extends BaseController {
}
assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlIpList())) {
assetCurrent.getGlymList().forEach(x -> {
b.append(x);
b.append(",");
@ -550,7 +589,7 @@ public class AssetTaskController extends BaseController {
assetCurrent.getXjgywxt().setTaskId(assetCurrent.getTaskId());
assetBusinessFormJyService.save(assetCurrent.getXjgywxt());
}
if (!assetCurrent.getGylxxList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGylxxList())) {
for (AssetSupplyChainJyPo items : assetCurrent.getGylxxList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
@ -558,7 +597,7 @@ public class AssetTaskController extends BaseController {
//新增供应链
assetSupplyChainJyService.saveBatch(assetCurrent.getGylxxList());
}
if (!assetCurrent.getJcwlList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getJcwlList())) {
for (AssetBasicNetworkJyPo items : assetCurrent.getJcwlList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
@ -580,7 +619,7 @@ public class AssetTaskController extends BaseController {
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
//新增历史记录
StringBuilder c = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlymList())) {
assetCurrent.getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
c.append(x.getKey());
@ -590,7 +629,7 @@ public class AssetTaskController extends BaseController {
}
assetCurrent.setGlym(a.toString());
StringBuilder d = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) {
if (CollectionUtil.isNotEmpty(assetCurrent.getGlIpList())) {
assetCurrent.getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
d.append(x.getKey());
@ -604,6 +643,7 @@ public class AssetTaskController extends BaseController {
// 设置更新时间
assetCurrent.setUpdateTime(date);
BeanUtils.copyProperties(assetCurrent, assetCurrentHistory);
assetCurrentHistory.setCurrentId(null);
assetCurrentHistoryService.save(assetCurrentHistory);
//新增新监管业务形态历史表
@ -613,6 +653,7 @@ public class AssetTaskController extends BaseController {
AssetBusinessFormHistory assetBusinessFormHistory = new AssetBusinessFormHistory();
assetBusinessFormHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(assetCurrent.getXjgywxt(), assetBusinessFormHistory);
assetBusinessFormHistory.setBusinessId(null);
assetBusinessFormHistoryService.save(assetBusinessFormHistory);
}
@ -628,6 +669,7 @@ public class AssetTaskController extends BaseController {
AssetSupplyChainHistory assetSupplyChainHistory = new AssetSupplyChainHistory();
assetSupplyChainHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetSupplyChainHistory); // 复制属性
assetSupplyChainHistory.setSupplyId(null);
return assetSupplyChainHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
@ -645,6 +687,7 @@ public class AssetTaskController extends BaseController {
AssetBasicNetworkHistory assetBasicNetworkHistory = new AssetBasicNetworkHistory();
assetBasicNetworkHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, assetBasicNetworkHistory); // 复制属性
assetBasicNetworkHistory.setNetworkId(null);
return assetBasicNetworkHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
@ -661,6 +704,7 @@ public class AssetTaskController extends BaseController {
UnitOtherConcatHistory unitOtherConcatHistory = new UnitOtherConcatHistory();
unitOtherConcatHistory.setCopyId(assetCurrent.getCurrentId());
BeanUtils.copyProperties(cpPo, unitOtherConcatHistory); // 复制属性
unitOtherConcatHistory.setConcatId(null);
return unitOtherConcatHistory; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
@ -678,7 +722,7 @@ public class AssetTaskController extends BaseController {
*/
@ApiOperation(value = "管理端审核")
@PostMapping("/sh")
public AjaxResult sh(@RequestBody @Validated AssetCurrentShRequest req) {
public AjaxResult sh(@RequestBody @Validated AssetCurrentShRequest req) throws ParseException {
return AjaxResult.success(assetTaskService.sh(req));
}
@ -749,6 +793,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(assetMiniProgramsCpPo, assetMiniProgramsHistory);
assetMiniProgramsHistory.setMiniId(null);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
return success();
}
@ -808,6 +853,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(assetOfficialAccountCpPo, assetOfficialAccountHistory);
assetOfficialAccountHistory.setAccountId(null);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
return success();
}
@ -848,6 +894,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(assetAppCpPo, assetAppHistory);
assetAppHistory.setAppId(null);
assetAppHistoryService.save(assetAppHistory);
return success();
}
@ -888,6 +935,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(assetEmailCpPo, assetEmailHistory);
assetEmailHistory.setEmailId(null);
assetEmailHistoryService.save(assetEmailHistory);
return success();
}
@ -920,6 +968,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(assetMiniProgramsJyPo, assetMiniProgramsHistory);
assetMiniProgramsHistory.setMiniId(null);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
return success();
}
@ -971,6 +1020,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(assetOfficialAccountJyPo, assetOfficialAccountHistory);
assetOfficialAccountHistory.setAccountId(null);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
return success();
}
@ -1004,6 +1054,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(assetAppJyPo, assetAppHistory);
assetAppHistory.setAppId(null);
assetAppHistoryService.save(assetAppHistory);
return success();
}
@ -1037,6 +1088,7 @@ public class AssetTaskController extends BaseController {
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(assetEmailJyPo, assetEmailHistory);
assetEmailHistory.setEmailId(null);
assetEmailHistoryService.save(assetEmailHistory);
return success();
}
@ -1083,29 +1135,28 @@ public class AssetTaskController extends BaseController {
@ApiOperation(value = "资产提交记录", response = AssetzcTjResponse.class)
@PostMapping("/zcTj")
public AjaxResult zcTj(@RequestBody AssetzcTjRequest req) {
AssetzcTjResponse assetzcTjResponse = new AssetzcTjResponse();
List<AssetzcTjResponse> list = null;
if (req.getType() == 0) {
//web
AssetCurrentHistory assetCurrentHistory = assetCurrentHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetCurrentHistory(assetCurrentHistory);
list = assetCurrentHistoryService.findByTaskIdandAssetId(req);
} else if (req.getType() == 1) {
//小程序资产
AssetMiniProgramsHistory assetMiniProgramsHistory = assetMiniProgramsHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetMiniProgramsHistory(assetMiniProgramsHistory);
list = assetMiniProgramsHistoryService.findByTaskIdandAssetId(req);
} else if (req.getType() == 2) {
//公众号资产
AssetOfficialAccountHistory assetOfficialAccountHistory = assetOfficialAccountHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetOfficialAccountHistory(assetOfficialAccountHistory);
list = assetOfficialAccountHistoryService.findByTaskIdandAssetId(req);
} else if (req.getType() == 3) {
//电子邮件资产
AssetEmailHistory assetEmailHistory = assetEmailHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetEmailHistory(assetEmailHistory);
list = assetEmailHistoryService.findByTaskIdandAssetId(req);
} else if (req.getType() == 4) {
//移动应用程序资产
AssetAppHistory assetAppHistory = assetAppHistoryService.findByTaskIdandAssetId(req);
assetzcTjResponse.setAssetAppHistory(assetAppHistory);
list = assetAppHistoryService.findByTaskIdandAssetId(req);
}
return AjaxResult.success(assetzcTjResponse);
return AjaxResult.success(list);
}
}

@ -43,7 +43,7 @@ import java.util.stream.Collectors;
*/
@Api(tags = "单位表控制层")
@RestController
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
//@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@RequestMapping("/tc/unit")
public class UnitController {
@Resource
@ -440,10 +440,9 @@ public class UnitController {
*/
@ApiOperation(value = "单位列表过滤", response = Unit.class)
@GetMapping("/dwList")
public AjaxResult dwList(UnitRequest unit) {
Page<Unit> page = new Page<>();
page.setSize(unit.getSize());
page.setCurrent(unit.getCurrent());
return AjaxResult.success(unitService.dwList(page, unit));
public AjaxResult dwList(Page<Unit>page, UnitRequest request) {
return AjaxResult.success(unitService.dwList(page,request));
}
}

@ -1,14 +1,17 @@
package com.ruoyi.tc.entity.history;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.tc.baseClass.BaseClass;
import com.ruoyi.tc.entity.request.AssetOfficialAccountMenu;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* (asset_official_account_history)
@ -189,4 +192,12 @@ public class AssetOfficialAccountHistory extends BaseClass implements Serializab
@ApiModelProperty("单位自己编辑的 不通过原因")
private String auditYy;
/**
*
*/
@TableField(exist = false)
@ApiModelProperty("菜单类型")
private List<AssetOfficialAccountMenu> cdList;
}

@ -12,6 +12,7 @@ import lombok.Data;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@ -112,11 +113,11 @@ public class AssetCurrentCpPo extends BaseClass implements Serializable {
@ApiModelProperty("关联域名list")
@TableField(exist = false)
private List<Acomma> glymList;
private List<Acomma> glymList = new ArrayList<>();
@ApiModelProperty("关联iplist")
@TableField(exist = false)
private List<Acomma> glIpList;
private List<Acomma> glIpList = new ArrayList<>();
/**

@ -3,15 +3,18 @@ package com.ruoyi.tc.entity.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
*
*
* @author du
* @since 2024/11/13 16:52
*/
@Data
public class UnitRequest {
public class UnitRequest implements Serializable {
private static final long serialVersionUID = 7435831888175099189L;
// @ApiModelProperty("1 查询已有资产的单位")
// private String isSearch;
@ -28,10 +31,10 @@ public class UnitRequest {
private String dwlx;
@ApiModelProperty("页码")
private Long current=1L;
private Long current = 1L;
@ApiModelProperty("页数")
private Long size=10L;
private Long size = 10L;
/**
*

@ -0,0 +1,35 @@
package com.ruoyi.tc.entity.response;
import com.ruoyi.tc.entity.history.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dong
* @since 2025/1/14 10:58
*/
@Data
@ApiModel("历史详情信息")
public class AssetHistoryResponse {
@ApiModelProperty("APP历史详情")
private AssetAppHistory assetAppHistory;
@ApiModelProperty("web历史详情")
private AssetCurrentHistory assetCurrentHistory;
@ApiModelProperty("gzh历史详情")
private AssetOfficialAccountHistory assetOfficialAccountHistory;
@ApiModelProperty("小程序历史详情")
private AssetMiniProgramsHistory assetMiniProgramsHistory;
@ApiModelProperty("邮件历史详情")
private AssetEmailHistory assetEmailHistory;
}

@ -1,9 +1,15 @@
package com.ruoyi.tc.entity.response;
import com.ruoyi.tc.entity.history.*;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.Date;
/**
* @author dong
@ -13,17 +19,20 @@ import lombok.Data;
@Api("资产提交响应类")
public class AssetzcTjResponse {
@ApiModelProperty("web资产历史类")
private AssetCurrentHistory assetCurrentHistory;
@ApiModelProperty("系统名称")
private String xtmc;
@ApiModelProperty("提交时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@ApiModelProperty("小程序资产历史类")
private AssetMiniProgramsHistory assetMiniProgramsHistory;
@ApiModelProperty("提交状态")
private Integer status;
@ApiModelProperty("公众号资产历史类")
private AssetOfficialAccountHistory assetOfficialAccountHistory;
@ApiModelProperty("历史id")
private Long id;
@ApiModelProperty("电子邮件资产历史类")
private AssetEmailHistory assetEmailHistory;
@ApiModelProperty("资产移动应用程序历史类")
private AssetAppHistory assetAppHistory;
}

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import java.util.List;
/**
* (asset_app_history)
@ -21,5 +24,5 @@ public interface AssetAppHistoryService extends IService<AssetAppHistory> {
* @param req
* @return
*/
AssetAppHistory findByTaskIdandAssetId(AssetzcTjRequest req);
List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -3,6 +3,9 @@ package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import java.util.List;
/**
* (asset_current_history)
@ -18,7 +21,7 @@ public interface AssetCurrentHistoryService extends IService<AssetCurrentHistory
* @param req
* @return
*/
AssetCurrentHistory findByTaskIdandAssetId(AssetzcTjRequest req);
List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import java.util.List;
/**
* (asset_email_history)
@ -20,5 +23,5 @@ public interface AssetEmailHistoryService extends IService<AssetEmailHistory> {
* @param req
* @return
*/
AssetEmailHistory findByTaskIdandAssetId(AssetzcTjRequest req);
List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -3,6 +3,9 @@ package com.ruoyi.tc.historyService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import java.util.List;
/**
* (asset_mini_programs_history)
@ -19,5 +22,5 @@ public interface AssetMiniProgramsHistoryService extends IService<AssetMiniProgr
* @param req
* @return
*/
AssetMiniProgramsHistory findByTaskIdandAssetId(AssetzcTjRequest req);
List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import java.util.List;
/**
* (asset_official_account_history)
@ -22,7 +25,7 @@ public interface AssetOfficialAccountHistoryService extends IService<AssetOffici
* @param req
* @return
*/
AssetOfficialAccountHistory findByTaskIdandAssetId(AssetzcTjRequest req);
List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -3,11 +3,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import com.ruoyi.tc.historyService.AssetAppHistoryService;
import com.ruoyi.tc.mapper.history.AssetAppHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (asset_app_history)
@ -22,7 +24,7 @@ public class AssetAppHistoryServiceImpl extends ServiceImpl<AssetAppHistoryMappe
private AssetAppHistoryMapper assetAppHistoryMapper;
@Override
public AssetAppHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
public List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetAppHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -3,11 +3,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import com.ruoyi.tc.historyService.AssetCurrentHistoryService;
import com.ruoyi.tc.mapper.history.AssetCurrentHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (asset_current_history)
@ -23,7 +25,7 @@ public class AssetCurrentHistoryServiceImpl extends ServiceImpl<AssetCurrentHist
private AssetCurrentHistoryMapper assetCurrentHistoryMapper;
@Override
public AssetCurrentHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
public List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetCurrentHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -3,11 +3,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import com.ruoyi.tc.historyService.AssetEmailHistoryService;
import com.ruoyi.tc.mapper.history.AssetEmailHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (asset_email_history)
@ -21,7 +23,7 @@ public class AssetEmailHistoryServiceImpl extends ServiceImpl<AssetEmailHistoryM
private AssetEmailHistoryMapper assetEmailHistoryMapper;
@Override
public AssetEmailHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
public List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetEmailHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -3,11 +3,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import com.ruoyi.tc.historyService.AssetMiniProgramsHistoryService;
import com.ruoyi.tc.mapper.history.AssetMiniProgramsHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (asset_mini_programs_history)
@ -20,7 +22,7 @@ public class AssetMiniProgramsHistoryServiceImpl extends ServiceImpl<AssetMiniPr
@Resource
private AssetMiniProgramsHistoryMapper assetMiniProgramsHistoryMapper;
@Override
public AssetMiniProgramsHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
public List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetMiniProgramsHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -3,11 +3,13 @@ package com.ruoyi.tc.historyService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import com.ruoyi.tc.historyService.AssetOfficialAccountHistoryService;
import com.ruoyi.tc.mapper.history.AssetOfficialAccountHistoryMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (asset_official_account_history)
@ -20,7 +22,7 @@ public class AssetOfficialAccountHistoryServiceImpl extends ServiceImpl<AssetOff
@Resource
private AssetOfficialAccountHistoryMapper assetOfficialAccountHistoryMapper;
@Override
public AssetOfficialAccountHistory findByTaskIdandAssetId(AssetzcTjRequest req) {
public List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req) {
return assetOfficialAccountHistoryMapper.findByTaskIdandAssetId(req);
}
}

@ -17,14 +17,14 @@ import java.util.List;
public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkCpPo> {
/**
* idid
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select a.* from asset_basic_network a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId} ")
List<AssetBasicNetworkCpPo> findByassetId(String taskId);
@Select("select * from asset_basic_network where asset_id=#{assetId} ")
List<AssetBasicNetworkCpPo> findByassetId(Long assetId);
/**
@ -36,16 +36,16 @@ public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkC
@Delete("delete from asset_basic_network_cp where asset_id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") int taskId);
/**
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from asset_basic_network_cp where asset_id=#{assetId}")
AssetBasicNetworkCpPo findByTaskId(int assetId);
@Select("select * from asset_basic_network_cp where asset_id=#{assetId} and task_id =#{taskId}")
List<AssetBasicNetworkCpPo> findByTaskId(@Param("assetId") int assetId, @Param("taskId") int taskId);
/**

@ -18,13 +18,15 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
/**
* idid
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from asset_business_form where asset_id =#{assetId}")
List<AssetBusinessFormCpPo> findByassetId(Long assetId);
@Select("select a.* from asset_business_form a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId} ")
List<AssetBusinessFormCpPo> findByassetId(String taskId);
/**
@ -45,14 +47,15 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
@Delete("delete from asset_business_form_cp where asset_id=#{assetId} ")
void deletByAssetId(@Param("assetId") Long assetId);
/**
* id
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from asset_business_form_cp where asset_id=#{assetId}")
AssetBusinessFormCpPo findByTaskId(int assetId);
@Select("select * from asset_business_form_cp where asset_id=#{assetId} and task_id =#{taskId}")
List<AssetBusinessFormCpPo> findByTaskId(@Param("assetId") int assetId, @Param("taskId") int taskId);
}

@ -26,15 +26,16 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
@Delete("delete from asset_current_cp where id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId);
/**
* id
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from asset_current_cp where id=#{assetId}")
AssetCurrentCpPo findByTaskId(int assetId);
@Select("select * from asset_current_cp where id=#{assetId} and task_id =#{taskId}")
AssetCurrentCpPo findByTaskId(@Param("assetId") int assetId, @Param("taskId") int taskId);
/**

@ -41,7 +41,7 @@ public interface AssetEmailCpMapper extends BaseMapper<AssetEmailCpPo> {
* @return
*/
@Select("select * from asset_email_cp where asset_id=#{assetId}")
AssetEmailCpPo findByTaskId(@Param("taskId") int assetId);
AssetEmailCpPo findByTaskId(@Param("assetId") int assetId);
/**

@ -1,7 +1,6 @@
package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.po.AssetBasicNetworkCpPo;
import com.ruoyi.tc.entity.po.AssetSupplyChainCpPo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
@ -19,13 +18,14 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpP
/**
* idid
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from asset_supply_chain where asset_id=#{assetId}")
List<AssetSupplyChainCpPo> findByassetId(Long assetId);
@Select("select a.* from asset_supply_chain a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId}")
List<AssetSupplyChainCpPo> findByassetId(String taskId);
/**
@ -35,7 +35,7 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpP
* @param taskId id
*/
@Delete("delete from asset_supply_chain_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
@ -43,16 +43,17 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpP
* @param assetId id
*/
@Delete("delete from asset_supply_chain_cp where asset_id=#{assetId} ")
void deletByAssetId(@Param("assetId")Long assetId);
void deletByAssetId(@Param("assetId") Long assetId);
/**
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from asset_supply_chain_cp where asset_id=#{assetId}")
AssetSupplyChainCpPo findByTaskId(int assetId);
@Select("select * from asset_supply_chain_cp where asset_id=#{assetId} and task_id=#{taskId}")
List<AssetSupplyChainCpPo> findByTaskId(@Param("assetId") int assetId,@Param("taskId") int taskId);
}

@ -17,13 +17,13 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
/**
* idid
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from unit_other_contact where asset_id =#{assetId}")
List<UnitOtherConcatCpPo> findByassetId(Long assetId);
@Select("select a.* from unit_other_contact a left join asset_current_cp b on a.asset_id =b.id where b.task_id =#{taskId}")
List<UnitOtherConcatCpPo> findByassetId( String taskId);
/**
@ -44,11 +44,12 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
void deletByAssetId(@Param("assetId") Long assetId);
/**
* id
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
@Select("select * from unit_other_contact_cp where asset_id=#{assetId}")
UnitOtherConcatCpPo findByTaskId(int assetId);
@Select("select * from unit_other_contact_cp where asset_id=#{assetId} and task_id =#{taskId}")
List<UnitOtherConcatCpPo> findByTaskId(@Param("assetId") int assetId, @Param("taskId")int taskId);
}

@ -3,8 +3,11 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetAppHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* (asset_app_history)访
*
@ -20,8 +23,8 @@ 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);
@Select("select app_name as xtmc,update_time as updateTime,status, app_id as id from asset_app_history where task_id= #{req.taskId} and asset_id =#{req.assetId} and status!=0")
List<AssetzcTjResponse> findByTaskIdandAssetId(AssetzcTjRequest req);
}

@ -3,9 +3,12 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetCurrentHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* (asset_current_history)访
*
@ -22,7 +25,7 @@ public interface AssetCurrentHistoryMapper extends BaseMapper<AssetCurrentHistor
* @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);
@Select("select xtmc,update_time as updateTime,status,current_id as id from asset_current_history where task_id= #{req.taskId} and id =#{req.assetId} and status!=0")
List<AssetzcTjResponse> findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -3,9 +3,12 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* (asset_email_cp)访
*
@ -21,7 +24,7 @@ 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);
@Select("select dzyxhz as xtmc, update_time as updateTime,status,email_id as id from asset_email_history where task_id= #{req.taskId} and asset_id =#{req.assetId} and status!=0")
List<AssetzcTjResponse> findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -3,9 +3,12 @@ package com.ruoyi.tc.mapper.history;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetMiniProgramsHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* (asset_mini_programs_history)访
*
@ -21,7 +24,7 @@ public interface AssetMiniProgramsHistoryMapper extends BaseMapper<AssetMiniProg
* @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);
@Select("select xcxmc as xtmc,update_time as updateTime,status,mini_id as id from asset_mini_programs_history where task_id= #{req.taskId} and asset_id =#{req.assetId} and status!=0")
List<AssetzcTjResponse> findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetOfficialAccountHistory;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -26,7 +27,7 @@ public interface AssetOfficialAccountHistoryMapper extends BaseMapper<AssetOffic
* @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);
@Select("select gzhmc as xtmc,update_time as updateTime,status,account_id as id from asset_official_account_history where task_id= #{req.taskId} and asset_id =#{req.assetId} and status!=0")
List<AssetzcTjResponse> findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

@ -2,7 +2,6 @@ package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.po.AssetBasicNetworkCpPo;
import com.ruoyi.tc.entity.po.AssetBusinessFormCpPo;
import java.util.List;
@ -15,13 +14,12 @@ import java.util.List;
public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCpPo> {
/**
* idid
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
List<AssetBasicNetworkCpPo> findByassetId(Long assetId);
List<AssetBasicNetworkCpPo> findByassetId(String taskId);
/**
@ -30,24 +28,23 @@ public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCp
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
AssetBasicNetworkCpPo findByTaskId(int assetId);
List<AssetBasicNetworkCpPo> findByTaskId(int assetId, int taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
}

@ -14,12 +14,12 @@ import java.util.List;
public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCpPo> {
/**
* idid
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
List<AssetBusinessFormCpPo> findByassetId(Long assetId);
List<AssetBusinessFormCpPo> findByassetId(String taskId);
/**
@ -41,9 +41,10 @@ public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCp
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
AssetBusinessFormCpPo findByTaskId(int assetId);
List<AssetBusinessFormCpPo> findByTaskId(int assetId, int taskId);
}

@ -1,10 +1,7 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.po.AssetCurrentCpPo;
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
import java.util.List;
@ -30,9 +27,10 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
* id
*
* @param assetId id
* @param taskId id
* @return
*/
AssetCurrentCpPo findByTaskId(int assetId);
AssetCurrentCpPo findByTaskId(int assetId, int taskId);
/**
@ -56,7 +54,6 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
AssetCurrentCpPo findByassetIdandTaskId(Integer assetId, Integer taskId);
/**
* id
*
@ -66,7 +63,6 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
List<AssetCurrentCpPo> findDwmc(Long id);
/**
* idid
*

@ -1,7 +1,6 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.po.AssetBasicNetworkCpPo;
import com.ruoyi.tc.entity.po.AssetSupplyChainCpPo;
import java.util.List;
@ -15,23 +14,22 @@ import java.util.List;
public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpPo> {
/**
* idid
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
List<AssetSupplyChainCpPo> findByassetId(Long assetId);
List<AssetSupplyChainCpPo> findByassetId(String taskId);
/**
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
AssetSupplyChainCpPo findByTaskId(int assetId);
List<AssetSupplyChainCpPo> findByTaskId(int assetId, int taskId);
/**
@ -43,7 +41,6 @@ public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpPo
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*

@ -3,6 +3,7 @@ package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.history.*;
import com.ruoyi.tc.entity.po.*;
import com.ruoyi.tc.entity.request.AssestTaskXqRequest;
import com.ruoyi.tc.entity.request.AssetCurrentShRequest;
@ -12,8 +13,8 @@ import com.ruoyi.tc.entity.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetTaskResponse;
import com.ruoyi.tc.entity.response.AssetdwHcBlResponse;
import com.ruoyi.tc.entity.response.AssetdwHcResponse;
import io.swagger.models.auth.In;
import java.text.ParseException;
import java.util.List;
/**
@ -76,6 +77,15 @@ public interface AssetTaskService extends IService<AssetTask> {
AssetCurrentCpPo taskSh(int taskId, int assetId);
/**
* web
*
* @param id id
* @return
*/
AssetCurrentHistory webHistory(Long id);
/**
*
*
@ -86,6 +96,15 @@ public interface AssetTaskService extends IService<AssetTask> {
AssetMiniProgramsCpPo minitaskSh(int taskId, int assetId);
/**
*
*
* @param id id
* @return
*/
AssetMiniProgramsHistory miniHistory(Long id);
/**
*
*
@ -95,6 +114,14 @@ public interface AssetTaskService extends IService<AssetTask> {
*/
AssetOfficialAccountCpPo officetaskSh(int taskId, int assetId);
/**
*
*
* @param id id
* @return
*/
AssetOfficialAccountHistory officeHistory(Long id);
/**
*
@ -105,6 +132,16 @@ public interface AssetTaskService extends IService<AssetTask> {
*/
AssetEmailCpPo emailtaskSh(int taskId, int assetId);
/**
*
*
* @param id id
* @return
*/
AssetEmailHistory emailHistory(Long id);
/**
*
*
@ -114,6 +151,16 @@ public interface AssetTaskService extends IService<AssetTask> {
*/
AssetAppCpPo apptaskSh(int taskId, int assetId);
/**
*
*
* @param id id
* @return
*/
AssetAppHistory appHistory(Long id);
/**
*
*
@ -130,7 +177,7 @@ public interface AssetTaskService extends IService<AssetTask> {
* @param req
* @return
*/
int sh(AssetCurrentShRequest req);
int sh(AssetCurrentShRequest req) throws ParseException;
/**
@ -187,10 +234,11 @@ public interface AssetTaskService extends IService<AssetTask> {
* @param dwmc
* @return
*/
AssetTask findByDwmc(String dwmc);
AssetTask findByDwmc(String dwmc);
/**
* id
*
* @param taskId
* @return
*/

@ -1,14 +1,13 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.po.AssetSupplyChainCpPo;
import com.ruoyi.tc.entity.po.UnitOtherConcatCpPo;
import com.ruoyi.tc.entity.po.UnitOtherConcatJyPo;
import java.util.List;
/**
* (unit_other_contact_cp)
*
* @author du
* @since 2024/11/13 14:55
*/
@ -17,10 +16,10 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpPo>
/**
* idid
*
* @param assetId id
* @param taskId id
* @return
*/
List<UnitOtherConcatCpPo> findByassetId(Long assetId);
List<UnitOtherConcatCpPo> findByassetId(String taskId);
/**
@ -32,7 +31,6 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpPo>
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*
@ -41,12 +39,12 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpPo>
void deletByAssetId(Long assetId);
/**
* assetId
*
* @param assetId id
* @param taskId id
* @return
*/
UnitOtherConcatCpPo findByTaskId(int assetId);
List<UnitOtherConcatCpPo> findByTaskId(int assetId, int taskId);
}

@ -68,7 +68,7 @@ public interface UnitService extends IService<Unit> {
* @param unit
* @return
*/
Page<Unit> dwList(Page<Unit> page, UnitRequest unit);
Page<Unit> dwList(Page<Unit>page,UnitRequest request);
/**
*

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

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

@ -31,8 +31,8 @@ public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper,
}
@Override
public AssetCurrentCpPo findByTaskId(int assetId) {
return assetCurrentCpMapper.findByTaskId(assetId);
public AssetCurrentCpPo findByTaskId(int assetId,int taskId) {
return assetCurrentCpMapper.findByTaskId(assetId,taskId);
}
@Override

@ -22,13 +22,13 @@ public class AssetSupplyChainCpServiceImpl extends ServiceImpl<AssetSupplyChainC
@Resource
private AssetSupplyChainCpMapper assetSupplyChainCpMapper;
@Override
public List<AssetSupplyChainCpPo> findByassetId(Long assetId) {
return assetSupplyChainCpMapper.findByassetId(assetId);
public List<AssetSupplyChainCpPo> findByassetId(String taskId) {
return assetSupplyChainCpMapper.findByassetId(taskId);
}
@Override
public AssetSupplyChainCpPo findByTaskId(int assetId) {
return assetSupplyChainCpMapper.findByTaskId(assetId);
public List<AssetSupplyChainCpPo> findByTaskId(int assetId,int taskId) {
return assetSupplyChainCpMapper.findByTaskId(assetId,taskId);
}
@Override

@ -1,5 +1,6 @@
package com.ruoyi.tc.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -15,7 +16,6 @@ import com.ruoyi.tc.entity.response.AssetdwHcResponse;
import com.ruoyi.tc.historyService.*;
import com.ruoyi.tc.mapper.AssetTaskMapper;
import com.ruoyi.tc.service.*;
import lombok.SneakyThrows;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -169,41 +169,6 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
*/
@Override
public void insert(AssetTask assetTask) {
int a = 0;
//遍历单位
String[] taskParts = assetTask.getDwmc().split(",");
int current = 0;
int xcx = 0;
int gzh = 0;
int email = 0;
int app = 0;
int totalCount = 0;
for (String part : taskParts) {
//根据单位查询所有资产
//web
// 遍历资产类型字段
String[] uParts = assetTask.getType().split(",");
for (String qq : uParts) {
if (qq.equals("0")) {
current = assetCurrentService.findBydwmc(part);
totalCount += current;
} else if (qq.equals("1")) {
xcx = assetMiniProgramsService.findBydwmc(part);
totalCount += xcx;
} else if (qq.equals("2")) {
gzh = assetOfficialAccountService.findBydwmc(part);
totalCount += gzh;
} else if (qq.equals("3")) {
email = assetEmailService.findBydwmc(part);
totalCount += email;
} else if (qq.equals("4")) {
app = assetAppService.findBydwmc(part);
totalCount += app;
}
}
assetTask.setTotalCount(totalCount);
}
//任务新增
assetTaskDao.insert(assetTask);
int id = assetTask.getId();
@ -226,55 +191,18 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
assetCurrentResponse.setTaskId(id);
}
assetCurrentCpService.saveBatch(list);
List<AssetBusinessFormCpPo> assetBusinessFormCpResponseList = new ArrayList<>();
for (AssetCurrentCpPo assetCurrentResponse : list) {
//新增新监管业务形态
//根据资产id查询新监管业务形态主表id
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId());
if (bussList != null) {
for (AssetBusinessFormCpPo assetBusinessFormCpResponse : bussList) {
if (assetCurrentResponse.getXjgywxt() != null) {
assetCurrentResponse.getXjgywxt().setAssetId(assetBusinessFormCpResponse.getAssetId());
assetCurrentResponse.getXjgywxt().setTaskId(id);
assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt());
}
}
assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList);
}
//根据资产id查询供应链主表id-
List<AssetSupplyChainCpPo> supplyChainList = assetSupplyChainCpService.findByassetId(assetCurrentResponse.getId());
if (supplyChainList != null) {
for (AssetSupplyChainCpPo items : supplyChainList) {
items.setAssetId(assetCurrentResponse.getId());
items.setSupplyId(items.getSupplyId());
items.setTaskId(id);
//新增供应链
}
assetSupplyChainCpService.saveBatch(supplyChainList);
}
List<AssetBasicNetworkCpPo> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetCurrentResponse.getId());
if (BasicNetworkCpList != null) {
for (AssetBasicNetworkCpPo items : BasicNetworkCpList) {
//根据资产id查询基础网络主表id
items.setAssetId(assetCurrentResponse.getId());
items.setNetworkId(items.getNetworkId());
items.setTaskId(id);
//新增基础网络
}
assetBasicNetworkCpService.saveBatch(BasicNetworkCpList);
}
List<UnitOtherConcatCpPo> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetCurrentResponse.getId());
if (unitOtherConcatList != null) {
for (UnitOtherConcatCpPo items : unitOtherConcatList) {
//根据资产id查询其他联系人主表id
items.setAssetId(assetCurrentResponse.getId());
items.setConcatId(items.getConcatId());
items.setTaskId(id);
//新增其他联系人
}
unitOtherConcatCpService.saveBatch(unitOtherConcatList);
}
}
//新增新监管业务形态
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetTask.getTaskId());
assetBusinessFormCpService.saveBatch(bussList);
//新增供应链
List<AssetSupplyChainCpPo> supplyChainList = assetSupplyChainCpService.findByassetId(assetTask.getTaskId());
assetSupplyChainCpService.saveBatch(supplyChainList);
//新增基础网络
List<AssetBasicNetworkCpPo> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetTask.getTaskId());
assetBasicNetworkCpService.saveBatch(BasicNetworkCpList);
//新增其他联系人
List<UnitOtherConcatCpPo> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetTask.getTaskId());
unitOtherConcatCpService.saveBatch(unitOtherConcatList);
}
} else if (assetPart.equals("1")) {
//遍历小程序资产单位
@ -285,16 +213,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
queryWrapper.eq("ssdw", part);
queryWrapper.eq("del_flag", 0);
List<AssetMiniPrograms> list = assetMiniProgramsService.lambdaQuery().eq(AssetMiniPrograms::getSsdw, part).eq(AssetMiniPrograms::getDelFlag, 0).list();
List<AssetMiniProgramsCpPo> miniProgramsNewList = list.stream()
.map(cpPo -> {
AssetMiniProgramsCpPo assetMiniProgramsCpPo = new AssetMiniProgramsCpPo();
assetMiniProgramsCpPo.setTaskId(id);
assetMiniProgramsCpPo.setStatus(0);
assetMiniProgramsCpPo.setAssetId(cpPo.getId());
BeanUtils.copyProperties(cpPo, assetMiniProgramsCpPo); // 复制属性
return assetMiniProgramsCpPo; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
List<AssetMiniProgramsCpPo> miniProgramsNewList = list.stream().map(cpPo -> {
AssetMiniProgramsCpPo assetMiniProgramsCpPo = new AssetMiniProgramsCpPo();
assetMiniProgramsCpPo.setTaskId(id);
assetMiniProgramsCpPo.setStatus(0);
assetMiniProgramsCpPo.setAssetId(cpPo.getId());
BeanUtils.copyProperties(cpPo, assetMiniProgramsCpPo); // 复制属性
return assetMiniProgramsCpPo; // 返回新对象
}).collect(Collectors.toList()); // 收集到列表中
assetMiniProgramsCpService.saveBatch(miniProgramsNewList);
}
} else if (assetPart.equals("2")) {
@ -306,16 +232,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
queryWrapper.eq("ssdw", part);
queryWrapper.eq("del_flag", 0);
List<AssetOfficialAccount> list = assetOfficialAccountService.lambdaQuery().eq(AssetOfficialAccount::getSsdw, part).eq(AssetOfficialAccount::getDelFlag, 0).list();
List<AssetOfficialAccountCpPo> officialAccountProgramsNewList = list.stream()
.map(cpPo -> {
AssetOfficialAccountCpPo assetOfficialAccountCpPo = new AssetOfficialAccountCpPo();
assetOfficialAccountCpPo.setTaskId(id);
assetOfficialAccountCpPo.setStatus(0);
assetOfficialAccountCpPo.setAssetId(cpPo.getId());
BeanUtils.copyProperties(cpPo, assetOfficialAccountCpPo); // 复制属性
return assetOfficialAccountCpPo; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
List<AssetOfficialAccountCpPo> officialAccountProgramsNewList = list.stream().map(cpPo -> {
AssetOfficialAccountCpPo assetOfficialAccountCpPo = new AssetOfficialAccountCpPo();
assetOfficialAccountCpPo.setTaskId(id);
assetOfficialAccountCpPo.setStatus(0);
assetOfficialAccountCpPo.setAssetId(cpPo.getId());
BeanUtils.copyProperties(cpPo, assetOfficialAccountCpPo); // 复制属性
return assetOfficialAccountCpPo; // 返回新对象
}).collect(Collectors.toList()); // 收集到列表中
assetOfficialAccountCpService.saveBatch(officialAccountProgramsNewList);
}
} else if (assetPart.equals("3")) {
@ -328,16 +252,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
queryWrapper.eq("del_flag", 0);
List<AssetEmail> list = assetEmailService.lambdaQuery().eq(AssetEmail::getSsdw, part).eq(AssetEmail::getDelFlag, 0).list();
;
List<AssetEmailCpPo> emailCpNewList = list.stream()
.map(cpPo -> {
AssetEmailCpPo emailCpPo = new AssetEmailCpPo();
emailCpPo.setTaskId(id);
emailCpPo.setAssetId(cpPo.getId());
emailCpPo.setStatus(0);
BeanUtils.copyProperties(cpPo, emailCpPo); // 复制属性
return emailCpPo; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
List<AssetEmailCpPo> emailCpNewList = list.stream().map(cpPo -> {
AssetEmailCpPo emailCpPo = new AssetEmailCpPo();
emailCpPo.setTaskId(id);
emailCpPo.setAssetId(cpPo.getId());
emailCpPo.setStatus(0);
BeanUtils.copyProperties(cpPo, emailCpPo); // 复制属性
return emailCpPo; // 返回新对象
}).collect(Collectors.toList()); // 收集到列表中
assetEmailCpService.saveBatch(emailCpNewList);
}
} else if (assetPart.equals("4")) {
@ -349,16 +271,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
queryWrapper.eq("ssdw", part);
queryWrapper.eq("del_flag", 0);
List<AssetApp> list = assetAppService.lambdaQuery().eq(AssetApp::getSsdw, part).eq(AssetApp::getDelFlag, 0).list();
List<AssetAppCpPo> appCpNewList = list.stream()
.map(cpPo -> {
AssetAppCpPo appCpPo = new AssetAppCpPo();
appCpPo.setTaskId(id);
appCpPo.setAssetId(cpPo.getId());
appCpPo.setStatus(0);
BeanUtils.copyProperties(cpPo, appCpPo); // 复制属性
return appCpPo; // 返回新对象
})
.collect(Collectors.toList()); // 收集到列表中
List<AssetAppCpPo> appCpNewList = list.stream().map(cpPo -> {
AssetAppCpPo appCpPo = new AssetAppCpPo();
appCpPo.setTaskId(id);
appCpPo.setAssetId(cpPo.getId());
appCpPo.setStatus(0);
BeanUtils.copyProperties(cpPo, appCpPo); // 复制属性
return appCpPo; // 返回新对象
}).collect(Collectors.toList()); // 收集到列表中
assetAppCpService.saveBatch(appCpNewList);
}
}
@ -420,6 +340,36 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
}
@Override
public AssetCurrentHistory webHistory(Long id) {
QueryWrapper<AssetCurrentHistory> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("current_id", id);
AssetCurrentHistory byId = assetCurrentHistoryService.getOne(queryWrapper);
byId.setGylxxList(assetSupplyChainCpService.lambdaQuery().eq(AssetSupplyChainCpPo::getAssetId, byId.getId()).eq(AssetSupplyChainCpPo::getDelFlag, "0").eq(AssetSupplyChainCpPo::getTaskId, byId.getTaskId()).list());
byId.setJcwlList(assetBasicNetworkCpService.lambdaQuery().eq(AssetBasicNetworkCpPo::getAssetId, byId.getId()).eq(AssetBasicNetworkCpPo::getDelFlag, "0").eq(AssetBasicNetworkCpPo::getTaskId, byId.getTaskId()).list());
byId.setXjgywxt(assetBusinessFormCpService.lambdaQuery().eq(AssetBusinessFormCpPo::getAssetId, byId.getId()).eq(AssetBusinessFormCpPo::getDelFlag, "0").eq(AssetBusinessFormCpPo::getTaskId, byId.getTaskId()).one());
byId.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpPo::getAssetId, byId.getId()).eq(UnitOtherConcatCpPo::getDelFlag, "0").eq(UnitOtherConcatCpPo::getTaskId, byId.getTaskId()).list());
List<Acomma> a1 = new ArrayList<>();
if (byId.getGlym() != null) {
Arrays.asList(byId.getGlym().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
a1.add(acomma);
});
byId.setGlymList(a1);
}
List<Acomma> a2 = new ArrayList<>();
if (byId.getGlIp() != null) {
Arrays.asList(byId.getGlIp().split(",")).forEach(x -> {
Acomma acomma = new Acomma();
acomma.setKey(x);
a2.add(acomma);
});
byId.setGlIpList(a2);
}
return byId;
}
@Override
public AssetMiniProgramsCpPo minitaskSh(int taskId, int assetId) {
QueryWrapper<AssetMiniProgramsCpPo> queryWrapper = new QueryWrapper<>();
@ -428,6 +378,13 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return assetMiniProgramsCpService.getOne(queryWrapper);
}
@Override
public AssetMiniProgramsHistory miniHistory(Long id) {
QueryWrapper<AssetMiniProgramsHistory> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("mini_id", id);
return assetMiniProgramsHistoryService.getOne(queryWrapper);
}
@Override
public AssetOfficialAccountCpPo officetaskSh(int taskId, int assetId) {
QueryWrapper<AssetOfficialAccountCpPo> queryWrapper = new QueryWrapper<>();
@ -456,6 +413,32 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return byId;
}
@Override
public AssetOfficialAccountHistory officeHistory(Long id) {
QueryWrapper<AssetOfficialAccountHistory> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("account_id", id);
AssetOfficialAccountHistory byId = assetOfficialAccountHistoryService.getOne(queryWrapper);
List<AssetOfficialAccountMenu> a1 = new ArrayList<>();
String[] s1 = byId.getCdmc().split("\\|");
String[] s2 = byId.getCdlj().split("\\|");
String[] s3 = byId.getCdlx().split("\\|");
for (int i = 0; i < s1.length; i++) {
AssetOfficialAccountMenu as = new AssetOfficialAccountMenu();
if (s1[i] != null && !Objects.equals(s1[i], "")) {
as.setCdmc(s1[i]);
}
if (s2[i] != null && !Objects.equals(s2[i], "")) {
as.setCdlj(s2[i]);
}
if (s3[i] != null && !Objects.equals(s3[i], "")) {
as.setCdlx(s3[i]);
}
a1.add(as);
}
byId.setCdList(a1);
return byId;
}
@Override
public AssetEmailCpPo emailtaskSh(int taskId, int assetId) {
QueryWrapper<AssetEmailCpPo> queryWrapper = new QueryWrapper<>();
@ -464,6 +447,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return assetEmailCpService.getOne(queryWrapper);
}
@Override
public AssetEmailHistory emailHistory(Long id) {
QueryWrapper<AssetEmailHistory> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("eamil_id", id);
return assetEmailHistoryService.getOne(queryWrapper);
}
@Override
public AssetAppCpPo apptaskSh(int taskId, int assetId) {
QueryWrapper<AssetAppCpPo> queryWrapper = new QueryWrapper<>();
@ -472,6 +463,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return assetAppCpService.getOne(queryWrapper);
}
@Override
public AssetAppHistory appHistory(Long id) {
QueryWrapper<AssetAppHistory> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("app_id", id);
return assetAppHistoryService.getOne(queryWrapper);
}
@Override
public Page<AssestTaskXqresponse> zcHc(Page<AssestTaskXqresponse> assetTask, AssestTaskXqRequest pageRequest) {
assetTask.setOptimizeCountSql(false);
@ -494,9 +493,9 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return result;
}
@SneakyThrows
@Override
public int sh(AssetCurrentShRequest req) {
public int sh(AssetCurrentShRequest req) throws ParseException {
//根据taskid获取当前任务的count数量
AssetTask assetTask = assetTaskDao.getByTaskId(req.getTaskId());
// 获取当前时间
@ -511,8 +510,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.sh(req);
//修改子表和新增历史表
updateZiandHistory(req, date);
// //修改子表和新增历史表
// updateZiandHistory(req, date);
} else {
//修改子表和新增历史表
updateZiandHistory(req, date);
@ -527,8 +526,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.xcxsh(req);
//修改子表和新增历史表
updateMinZiandHistory(req, date);
// //修改子表和新增历史表
// updateMinZiandHistory(req, date);
} else {
//修改子表和新增历史表
updateMinZiandHistory(req, date);
@ -544,8 +543,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.gzhsh(req);
//修改子表和历史表新增
updateGzhZiandHistory(req, date);
// //修改子表和历史表新增
// updateGzhZiandHistory(req, date);
} else {
//修改子表和历史表新增
updateGzhZiandHistory(req, date);
@ -561,8 +560,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.emailsh(req);
//修改子表和历史表新增
updateEmailZiandHistory(req, date);
// //修改子表和历史表新增
// updateEmailZiandHistory(req, date);
} else {
//修改子表和历史表新增
updateEmailZiandHistory(req, date);
@ -578,8 +577,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
getTaskStatus(req);
if (req.getBtgyy() != null) {
assetTaskDao.appsh(req);
//修改子表和历史表新增
updateAppZiandHistory(req, date);
// //修改子表和历史表新增
// updateAppZiandHistory(req, date);
} else {
//修改子表和历史表新增
updateAppZiandHistory(req, date);
@ -591,35 +590,35 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
AssetTask finalTask = assetTaskDao.getByTaskId(req.getTaskId());
LocalDateTime finishTime = null;
//根据任务id查询是否进行中
Integer jxz=assetTaskDao.getJxz(req.getTaskId());
if(jxz>0){
//进行中
finalTask.setTaskStatus(1);
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
}else{
//根据任务id查询是否超期
String ifcq=assetTaskDao.getifcq(req.getTaskId());
String taskDeadline = finalTask.getTaskDeadline(); // 定义日期格式,确保格式与字符串一致
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 根据你的时间格式调整
// 将字符串转换为日期对象
Date ifcqDate = dateFormat.parse(ifcq);
Date taskDeadlineDate = dateFormat.parse(taskDeadline);
// 比较两个日期
if (ifcqDate.before(taskDeadlineDate)) {
//超期完成
finalTask.setTaskStatus(3);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
} else if (ifcqDate.after(taskDeadlineDate)) {
//正常完成
finalTask.setTaskStatus(2);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
}
}
Integer jxz = assetTaskDao.getJxz(req.getTaskId());
if (jxz > 0) {
//进行中
finalTask.setTaskStatus(1);
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
} else {
//根据任务id查询是否超期
String ifcq = assetTaskDao.getifcq(req.getTaskId());
String taskDeadline = finalTask.getTaskDeadline(); // 定义日期格式,确保格式与字符串一致
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 根据你的时间格式调整
// 将字符串转换为日期对象
Date ifcqDate = dateFormat.parse(ifcq);
Date taskDeadlineDate = dateFormat.parse(taskDeadline);
// 比较两个日期
if (ifcqDate.before(taskDeadlineDate)) {
//超期完成
finalTask.setTaskStatus(3);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
} else if (ifcqDate.after(taskDeadlineDate)) {
//正常完成
finalTask.setTaskStatus(2);
finishTime = LocalDateTime.now();
finalTask.setTaskFinishTime(finishTime);
assetTaskService.update(finalTask);
}
}
return 0;
}
@ -631,6 +630,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//新增历史记录表
AssetAppHistory assetAppHistory = new AssetAppHistory();
BeanUtils.copyProperties(req.getAssetAppCpPo(), assetAppHistory);
assetAppHistory.setAppId(null);
assetAppHistoryService.save(assetAppHistory);
}
@ -641,6 +641,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//新增历史记录表
AssetEmailHistory assetEmailHistory = new AssetEmailHistory();
BeanUtils.copyProperties(req.getAssetEmailCpPo(), assetEmailHistory);
assetEmailHistory.setEmailId(null);
assetEmailHistoryService.save(assetEmailHistory);
}
@ -664,6 +665,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//新增历史记录表
AssetOfficialAccountHistory assetOfficialAccountHistory = new AssetOfficialAccountHistory();
BeanUtils.copyProperties(req.getAssetOfficialAccountCpPo(), assetOfficialAccountHistory);
assetOfficialAccountHistory.setAccountId(null);
assetOfficialAccountHistoryService.save(assetOfficialAccountHistory);
}
@ -674,6 +676,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//新增历史记录表
AssetMiniProgramsHistory assetMiniProgramsHistory = new AssetMiniProgramsHistory();
BeanUtils.copyProperties(req.getAssetMiniProgramsCpPo(), assetMiniProgramsHistory);
assetMiniProgramsHistory.setMiniId(null);
assetMiniProgramsHistoryService.save(assetMiniProgramsHistory);
}
@ -685,7 +688,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
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()) {
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlymList())) {
req.getAssetCurrentCpPo().getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
a.append(x.getKey());
@ -695,7 +698,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
}
req.getAssetCurrentCpPo().setGlym(a.toString());
StringBuilder b = new StringBuilder();
if (!req.getAssetCurrentCpPo().getGlIpList().isEmpty()) {
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlIpList())) {
req.getAssetCurrentCpPo().getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
b.append(x.getKey());
@ -749,7 +752,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
private void saveHistory(AssetCurrentShRequest req, StringBuilder a, StringBuilder b, Date date, AssetCurrentHistory assetCurrentHistory) {
//新增历史记录
StringBuilder c = new StringBuilder();
if (!req.getAssetCurrentCpPo().getGlymList().isEmpty()) {
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlymList())) {
req.getAssetCurrentCpPo().getGlymList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
c.append(x.getKey());
@ -759,7 +762,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
}
req.getAssetCurrentCpPo().setGlym(a.toString());
StringBuilder d = new StringBuilder();
if (!req.getAssetCurrentCpPo().getGlIpList().isEmpty()) {
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlIpList())) {
req.getAssetCurrentCpPo().getGlIpList().forEach(x -> {
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
d.append(x.getKey());
@ -773,6 +776,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
// 设置更新时间
req.getAssetCurrentCpPo().setUpdateTime(date);
BeanUtils.copyProperties(req.getAssetCurrentCpPo(), assetCurrentHistory);
assetCurrentHistory.setCurrentId(null);
assetCurrentHistoryService.save(assetCurrentHistory);
//新增新监管业务形态历史表
@ -782,6 +786,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
AssetBusinessFormHistory assetBusinessFormHistory = new AssetBusinessFormHistory();
assetBusinessFormHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(req.getAssetCurrentCpPo().getXjgywxt(), assetBusinessFormHistory);
assetBusinessFormHistory.setBusinessId(null);
assetBusinessFormHistoryService.save(assetBusinessFormHistory);
}
@ -792,14 +797,13 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
}
//新增供应链历史表
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()); // 收集到列表中
List<AssetSupplyChainHistory> assetSupplyChainHistoryList = req.getAssetCurrentCpPo().getGylxxList().stream().map(cpPo -> {
AssetSupplyChainHistory assetSupplyChainHistory = new AssetSupplyChainHistory();
assetSupplyChainHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(cpPo, assetSupplyChainHistory); // 复制属性
assetSupplyChainHistory.setSupplyId(null);
return assetSupplyChainHistory; // 返回新对象
}).collect(Collectors.toList()); // 收集到列表中
assetSupplyChainHistoryService.saveBatch(assetSupplyChainHistoryList);
}
if (!req.getAssetCurrentCpPo().getJcwlList().isEmpty()) {
@ -809,14 +813,13 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
}
//新增基础网络历史表
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()); // 收集到列表中
List<AssetBasicNetworkHistory> assetSupplyChainHistoryList = req.getAssetCurrentCpPo().getJcwlList().stream().map(cpPo -> {
AssetBasicNetworkHistory assetBasicNetworkHistory = new AssetBasicNetworkHistory();
assetBasicNetworkHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(cpPo, assetBasicNetworkHistory); // 复制属性
assetBasicNetworkHistory.setNetworkId(null);
return assetBasicNetworkHistory; // 返回新对象
}).collect(Collectors.toList()); // 收集到列表中
assetBasicNetworkHistoryService.saveBatch(assetSupplyChainHistoryList);
}
if (!req.getAssetCurrentCpPo().getOtherConcat().isEmpty()) {
@ -825,14 +828,13 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
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()); // 收集到列表中
List<UnitOtherConcatHistory> unitOtherConcatHistoryList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
UnitOtherConcatHistory unitOtherConcatHistory = new UnitOtherConcatHistory();
unitOtherConcatHistory.setCopyId(req.getAssetCurrentCpPo().getCurrentId());
BeanUtils.copyProperties(cpPo, unitOtherConcatHistory); // 复制属性
unitOtherConcatHistory.setUnitId(null);
return unitOtherConcatHistory; // 返回新对象
}).collect(Collectors.toList()); // 收集到列表中
unitOtherConcatHistoryService.saveBatch(unitOtherConcatHistoryList);
}
}
@ -862,6 +864,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//将子表数据复制到主表中
AssetOfficialAccount assetOfficialAccount = new AssetOfficialAccount();
BeanUtils.copyProperties(assetOfficialAccountCpPo, assetOfficialAccount); // 复制属性
assetOfficialAccount.setId(null);
assetOfficialAccountService.save(assetOfficialAccount);
}
@ -950,7 +953,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//web
private void taskSaveOrDelete(AssetCurrentShRequest req) {
// 根据资产id查询五张数据
AssetCurrentCpPo currentCpPo = assetCurrentCpService.findByTaskId(req.getAssetId());
AssetCurrentCpPo currentCpPo = assetCurrentCpService.findByTaskId(req.getAssetId(), req.getTaskId());
//删除主表原有数据
if (currentCpPo != null) {
assetCurrentService.deleteIdList(currentCpPo.getId());
@ -962,47 +965,64 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
}
//AssetBusinessFormCpPo
AssetBusinessFormCpPo businessFormCpPo = assetBusinessFormCpService.findByTaskId(req.getAssetId());
List<AssetBusinessFormCpPo> businessFormCpPo = assetBusinessFormCpService.findByTaskId(req.getAssetId(), req.getTaskId());
List<Long> businessList = businessFormCpPo.stream().map(AssetBusinessFormCpPo::getAssetId).collect(Collectors.toList());
//删除原有数据
if (businessFormCpPo != null) {
assetBusinessFormService.deleteIdList(Collections.singletonList(businessFormCpPo.getAssetId()));
if (CollectionUtil.isNotEmpty(businessList)) {
assetBusinessFormService.deleteIdList(businessList);
//将子表数据复制到主表中
AssetBusinessForm businessForm = new AssetBusinessForm();
BeanUtils.copyProperties(businessFormCpPo, businessForm); // 复制属性
businessForm.setId(null);
assetBusinessFormService.save(businessForm);
List<AssetBusinessForm> businessFormCpPoList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
AssetBusinessForm assetBusinessForm = new AssetBusinessForm();
BeanUtils.copyProperties(cpPo, assetBusinessForm); // 复制属性
assetBusinessForm.setId(null);
return assetBusinessForm; // 返回新对象
}).collect(Collectors.toList());
assetBusinessFormService.saveBatch(businessFormCpPoList);
}
//AssetBasicNetworkCpPo
AssetBasicNetworkCpPo networkCpPo = assetBasicNetworkCpService.findByTaskId(req.getAssetId());
List<AssetBasicNetworkCpPo> networkCpPo = assetBasicNetworkCpService.findByTaskId(req.getAssetId(), req.getTaskId());
List<Long> netWorkList = networkCpPo.stream().map(AssetBasicNetworkCpPo::getAssetId).collect(Collectors.toList());
//删除原有数据
if (networkCpPo != null) {
assetBasicNetworkService.deleteIdList(Collections.singletonList(networkCpPo.getAssetId()));
AssetBasicNetwork network = new AssetBasicNetwork();
BeanUtils.copyProperties(networkCpPo, network);
network.setId(null);
assetBasicNetworkService.save(network);
if (CollectionUtil.isNotEmpty(netWorkList)) {
assetBasicNetworkService.deleteIdList(netWorkList);
List<AssetBasicNetwork> networksCpPoList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
AssetBasicNetwork assetBasicNetwork = new AssetBasicNetwork();
BeanUtils.copyProperties(cpPo, assetBasicNetwork); // 复制属性
assetBasicNetwork.setId(null);
return assetBasicNetwork; // 返回新对象
}).collect(Collectors.toList());
assetBasicNetworkService.saveBatch(networksCpPoList);
}
//AssetSupplyChainCpPo
AssetSupplyChainCpPo supplyChainCpPo = assetSupplyChainCpService.findByTaskId(req.getAssetId());
List<AssetSupplyChainCpPo> supplyChainCpPo = assetSupplyChainCpService.findByTaskId(req.getAssetId(), req.getTaskId());
List<Long> supplyList = supplyChainCpPo.stream().map(AssetSupplyChainCpPo::getAssetId).collect(Collectors.toList());
//删除原有数据
if (supplyChainCpPo != null) {
assetSupplyChainService.deleteIdList(Collections.singletonList(supplyChainCpPo.getAssetId()));
AssetSupplyChain supplyChain = new AssetSupplyChain();
BeanUtils.copyProperties(supplyChainCpPo, supplyChain);
supplyChain.setId(null);
assetSupplyChainService.save(supplyChain);
if (CollectionUtil.isNotEmpty(supplyList)) {
assetSupplyChainService.deleteIdList(supplyList);
List<AssetSupplyChain> supplyChainList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
AssetSupplyChain assetSupplyChain = new AssetSupplyChain();
BeanUtils.copyProperties(cpPo, assetSupplyChain); // 复制属性
assetSupplyChain.setId(null);
return assetSupplyChain; // 返回新对象
}).collect(Collectors.toList());
assetSupplyChainService.saveBatch(supplyChainList);
}
//UnitOtherConcatCpPo
UnitOtherConcatCpPo unitOtherConcatCpPo = unitOtherConcatCpService.findByTaskId(req.getAssetId());
List<UnitOtherConcatCpPo> unitOtherConcatCpPo = unitOtherConcatCpService.findByTaskId(req.getAssetId(), req.getTaskId());
List<Long> unitList = unitOtherConcatCpPo.stream().map(UnitOtherConcatCpPo::getAssetId).collect(Collectors.toList());
//删除原有数据
if (unitOtherConcatCpPo != null) {
unitOtherConcatService.deleteIdList(Collections.singletonList(unitOtherConcatCpPo.getAssetId()));
UnitOtherConcat unitOtherConcat = new UnitOtherConcat();
BeanUtils.copyProperties(unitOtherConcatCpPo, unitOtherConcat); // 复制属性
unitOtherConcat.setConcatId(null);
unitOtherConcatService.save(unitOtherConcat);
if (CollectionUtil.isNotEmpty(unitList)) {
unitOtherConcatService.deleteIdList(unitList);
List<UnitOtherConcat> unitOtherConcatList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
UnitOtherConcat unitOtherConcat = new UnitOtherConcat();
BeanUtils.copyProperties(cpPo, unitOtherConcat); // 复制属性
unitOtherConcat.setConcatId(null);
return unitOtherConcat; // 返回新对象
}).collect(Collectors.toList());
unitOtherConcatService.saveBatch(unitOtherConcatList);
}
}

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

@ -126,8 +126,8 @@ public class UnitServiceImpl extends ServiceImpl<UnitMapper, Unit> implements Un
}
@Override
public Page<Unit> dwList(Page<Unit> page, UnitRequest unit) {
return baseMapper.dwList(page, unit);
public Page<Unit> dwList(Page<Unit>page,UnitRequest request) {
return baseMapper.dwList(page,request);
}
/**

@ -146,65 +146,44 @@
where id = #{id} and del_flag= '0'
</select>
<select id="dwList" resultType="com.ruoyi.tc.entity.Unit">
SELECT distinct a.*
SELECT DISTINCT a.*
FROM unit_info a
<if test="req.type!= null and req.type.indexOf('0') != -1">
INNER JOIN asset_current cr ON a.nick_name = cr.dwmc
</if>
<if test="req.type!= null and req.type.indexOf('1') != -1">
INNER JOIN asset_mini_programs pr ON a.nick_name = pr.ssdw
</if>
<if test="req.type!= null and req.type.indexOf('2') != -1">
INNER JOIN asset_official_account ac ON a.nick_name = ac.ssdw
</if>
<if test="req.type!= null and req.type.indexOf('3') != -1">
INNER JOIN asset_email em ON a.nick_name = em.ssdw
</if>
<if test="req.type!= null and req.type.indexOf('4') != -1">
INNER JOIN asset_app ap ON a.nick_name = ap.ssdw
</if>
<where>
NOT EXISTS (
SELECT 1
FROM asset_task b
where
b.task_status = 1 AND FIND_IN_SET(a.nick_name, b.dwmc)
<if test="req.type != null">
AND (
<foreach item="type" collection="req.type.split(',')" separator=" OR ">
FIND_IN_SET(#{type}, b.type)
</foreach>
)
</if>
) AND a.del_flag = 0
<if test="req.type!= null and req.type.indexOf('0') != -1">
and cr.del_flag=0
</if>
<if test="req.type!= null and req.type.indexOf('1') != -1">
and pr.del_flag=0
</if>
<if test="req.type!= null and req.type.indexOf('2') != -1">
and ac.del_flag=0
</if>
<if test="req.type!= null and req.type.indexOf('3') != -1">
and em.del_flag=0
</if>
<if test="req.type!= null and req.type.indexOf('4') != -1">
and ap.del_flag=0
</if>
<if test="req.nickName != null and req.nickName != '' ">
and a.nick_name like concat('%',#{req.nickName},'%')
</if>
<if test="req.dwlx != null">
and a.dwlx = #{req.dwlx}
</if>
<if test="req.userName != null and req.userName != '' ">
and a.user_name like concat('%',#{req.userName},'%')
</if>
</where>
LEFT JOIN (
<choose>
<when test="req.type != null">
<if test="req.type.indexOf('0') != -1">
SELECT dwmc AS nick_name FROM asset_current WHERE del_flag = 0
<if test="req.type.indexOf('1') != -1 or req.type.indexOf('2') != -1 or req.type.indexOf('3') != -1 or req.type.indexOf('4') != -1">
UNION ALL
</if>
</if>
<if test="req.type.indexOf('1') != -1">
SELECT ssdw AS nick_name FROM asset_mini_programs WHERE del_flag = 0
<if test="req.type.indexOf('2') != -1 or req.type.indexOf('3') != -1 or req.type.indexOf('4') != -1">
UNION ALL
</if>
</if>
<if test="req.type.indexOf('2') != -1">
SELECT ssdw AS nick_name FROM asset_official_account WHERE del_flag = 0
<if test="req.type.indexOf('3') != -1 or req.type.indexOf('4') != -1">
UNION ALL
</if>
</if>
<if test="req.type.indexOf('3') != -1">
SELECT ssdw AS nick_name FROM asset_email WHERE del_flag = 0
<if test="req.type.indexOf('4') != -1">
UNION ALL
</if>
</if>
<if test="req.type.indexOf('4') != -1">
SELECT ssdw AS nick_name FROM asset_app WHERE del_flag = 0
</if>
</when>
</choose>
) AS valid_nicknames ON a.nick_name = valid_nicknames.nick_name
LEFT JOIN asset_task b ON FIND_IN_SET(a.nick_name, b.dwmc) AND b.task_status = 1
WHERE valid_nicknames.nick_name IS NOT NULL
AND b.dwmc IS NULL
</select>
<select id="selectAllUnit" resultType="com.ruoyi.tc.entity.Unit">

Loading…
Cancel
Save