diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java index 6834f6b..a5dc704 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java @@ -94,7 +94,7 @@ public class AssetCurrentController extends BaseController { @ApiOperation(value = "新增数据") @PostMapping @Transactional(rollbackFor = Exception.class) - public AjaxResult insert(@RequestBody @Valid AssetCurrent assetCurrent) { + public AjaxResult insert(@RequestBody AssetCurrent assetCurrent) { assetCurrentService.save(assetCurrent); //新增新监管业务形态 if (assetCurrent.getXjgywxt() != null) { @@ -166,17 +166,17 @@ public class AssetCurrentController extends BaseController { /** * 删除数据 * - * @param idList 主键结合 + * @param id 主键 * @return 删除结果 */ @ApiOperation(value = "删除数据") - @DeleteMapping - public AjaxResult delete(@RequestParam("idList") List idList) { - assetSupplyChainService.deleteByAssetIds(idList); - assetBasicNetworkService.deleteByAssetIds(idList); - assetBusinessFormService.deleteByAssetIds(idList); - unitOtherConcatService.deleteByAssetIds(idList); - assetCurrentService.deleteByUnitIds(idList); + @DeleteMapping("/{id}") + public AjaxResult delete(@PathVariable Long id) { + assetSupplyChainService.deleteByAssetIds(id); + assetBasicNetworkService.deleteByAssetIds(id); + assetBusinessFormService.deleteByAssetIds(id); + unitOtherConcatService.deleteByAssetIds(id); + assetCurrentService.deleteByUnitIds(id); return success(); } @@ -207,6 +207,14 @@ public class AssetCurrentController extends BaseController { AssetSupplyChain jsdw = assetSupplyChainService.getJsdw(x.getId()); BeanUtil.copyProperties(jsdw, assetExport); + //查找对应的系统运营单位 + AssetSupplyChain yydw = assetSupplyChainService.getYydw(x.getId()); + assetExport.setGyszcdz1(yydw.getGyszcdz()); + assetExport.setLxr1(yydw.getLxr()); + assetExport.setLxdh1(yydw.getLxdh()); + assetExport.setSfwtc1(yydw.getSfwtc()); + assetExport.setName1(yydw.getName()); + assetExport.setTyshxydm1(yydw.getTyshxydm()); List byList = assetBasicNetworkService.getByAssetId(x.getId()); for (AssetBasicNetwork items : byList) { if (items.getType() == 1) { @@ -257,6 +265,17 @@ public class AssetCurrentController extends BaseController { s1.setType(5); s1.setAssetId(as.getId()); assetSupplyChainService.save(s1); + //新增系统运营单位 + AssetSupplyChain b6 = new AssetSupplyChain(); + b6.setGyszcdz(items.getGyszcdz1()); + b6.setLxr(items.getLxr1()); + b6.setLxdh(items.getLxdh1()); + b6.setSfwtc(items.getSfwtc1()); + b6.setName(items.getName1()); + b6.setTyshxydm(items.getTyshxydm1()); + b6.setType(7); + b6.setAssetId(as.getId()); + assetSupplyChainService.save(b6); //新增服务器信息 AssetBasicNetwork a1 = new AssetBasicNetwork(); BeanUtil.copyProperties(items, a1); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java index 79aaf76..5c3014e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java @@ -129,7 +129,7 @@ public class UnitController { @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping @Transactional(rollbackFor = Exception.class) - public AjaxResult edit(@Valid @RequestBody Unit x) { + public AjaxResult edit(@RequestBody Unit x) { Unit byId = unitService.getById(x.getId()); if (!byId.getUserName().equals(x.getUserName()) || !byId.getNickName().equals(x.getNickName())) { throw new ServiceException("不允许修改单位名称和统一信用代码!"); @@ -155,14 +155,14 @@ public class UnitController { */ @ApiOperation(value = "删除单位") @Log(title = "删除单位", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable List ids) { - List userNames = unitService.selectByIds(ids); + @DeleteMapping("/{id}") + public AjaxResult remove(@PathVariable Long id) { + List userNames = unitService.selectByIds(id); //逻辑删除单位和用户 unitService.deleteUsers(userNames); - unitService.deleteUnits(ids); - unitOtherConcatService.deleteByUnitIds(ids); - examineInfoService.deleteByUnitIds(ids); + unitService.deleteUnits(id); + unitOtherConcatService.deleteByUnitIds(id); + examineInfoService.deleteByUnitIds(id); return AjaxResult.success(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java index 8d818f2..8503759 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java @@ -109,6 +109,7 @@ public class AssetCurrent extends BaseClass implements Serializable { /** * 关联ip(多个用,分隔) */ +// @Excel(name ="关联资产(多个资产用逗号隔开,例如{\"ipv4\"",sort = 7,width = 60) @Excel(name ="关联资产(多个资产用逗号隔开,例如\n{\"ipv4\":[\"1.1.1.1:8080\",\"2.2.2.2:8080\"],\"ipv6\":\n[\"fe80::ec3e:9cff:fe25:687b\",\"de71::ec3e:9cff:fe25:687b\"]})",sort = 7,width = 60) @Size(max= 500,message="关联ip长度不能超过500") @ApiModelProperty("关联ip(多个用,分隔)") @@ -130,6 +131,7 @@ public class AssetCurrent extends BaseClass implements Serializable { * 是否关基系统(字典) */ @NotNull +// @Excel(name = "是否关基系统",dictType = "is_no",comboReadDict = true,sort = 10) @Excel(name = "*是否关基系统",dictType = "is_no",comboReadDict = true,sort = 10) @ApiModelProperty("是否关基系统(字典)") private String gjxt; @@ -173,6 +175,7 @@ public class AssetCurrent extends BaseClass implements Serializable { /** * 系统状态(字典) */ +// @Excel(name = "系统状态",dictType = "zc_xtzt",comboReadDict = true,sort = 36) @Excel(name = "*系统状态",dictType = "zc_xtzt",comboReadDict = true,sort = 36) @NotNull @ApiModelProperty("系统状态(字典)") @@ -232,6 +235,7 @@ public class AssetCurrent extends BaseClass implements Serializable { /** * 系统特征(,分隔) */ +// @Excel(width = 60,name = "系统特征(多选,多个特征用逗号隔开。选项为",sort = 52) @Excel(width = 60,name = "系统特征(多选,多个特征用逗号隔开。选项为:党政机关门户网站、重点新闻网站,大型网络平台,系统业务覆盖单个地市级行政区30%以上人口的工作、生活,系统业务覆盖10万人以上用水、用电、用气、用油、取暖或交通出行,存储超过5万人以上个人敏感信息,存储超过100万条以上地理、人口、资源等国家基础数据)",sort = 52) @ApiModelProperty("系统特征(,分隔)") private String xttz; @@ -274,7 +278,7 @@ public class AssetCurrent extends BaseClass implements Serializable { /** * 云服务商名称 */ - @Excel(name = "云服务商名称(“是否部署云平台”选择“是”必须填写,选择\n“否”则无需填写)",sort = 57,width = 45) + @Excel(name = "云服务商名称(“是否部署云平台”选择“是”必须填写,选择“否”则无需填写)",sort = 57,width = 45) @Size(max= 100,message="云服务商名称长度不能超过100") @ApiModelProperty("云服务商名称") private String yfwsmc; @@ -483,6 +487,7 @@ public class AssetCurrent extends BaseClass implements Serializable { /** * ICP备案信息-ICP备案编号 */ +// @Excel(name = "ICP备案编号",sort = 25,width = 46) @Excel(name = "ICP备案编号(ICP备案状态选择为是则必填)",sort = 25,width = 46) @NotBlank @Size(max= 50,message="ICP备案信息-ICP备案编号长度不能超过50") @@ -669,6 +674,7 @@ public class AssetCurrent extends BaseClass implements Serializable { /** * 等保信息-是否有第三方测评 */ +// @Excel(name = "是否有第三方测评",width = 45,dictType = "is_no",comboReadDict = true,sort = 45) @ApiModelProperty("等保信息-是否有第三方测评") @NotNull @Excel(name = "是否有第三方测评(是否是等保系统选择是则必填)",width = 45,dictType = "is_no",comboReadDict = true,sort = 45) @@ -793,18 +799,6 @@ public class AssetCurrent extends BaseClass implements Serializable { @ApiModelProperty("密评信息-密评得分") private String mpMpdf; -// /** -// * 供应链信息(id集合逗号分隔) -// */ -// @Size(max= 255,message="供应链信息长度不能超过255") -// @ApiModelProperty("供应链信息(id集合逗号分隔)") -// private String gylxx; -// /** -// * 基础网络(id集合逗号分隔) -// */ -// @Size(max= 255,message="基础网络长度不能超过255") -// @ApiModelProperty("基础网络(id集合逗号分隔)") -// private String jcwl; /** * 供应链信息列表 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java index b35a14f..11373b9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java @@ -43,6 +43,37 @@ public class AssetExport extends AssetCurrent{ @Excel(name = "*系统建设单位注册地址是否为太仓",width=26,sort = 70,dictType = "is_no",comboReadDict = true) private String sfwtc; + /** + * 名称 + */ + @Excel(name = "*系统运营单位名称",width=26,sort = 71) + private String name1; + /** + * 统一信用代码 + */ + @Excel(name = "*系统运营单位统一信用代码",width=26,sort = 72) + private String tyshxydm1; + /** + * 联系人 + */ + @Excel(name = "*系统运营单位联系人",width=26,sort = 73) + private String lxr1; + /** + * 联系电话 + */ + @Excel(name = "*系统运营单位联系电话",width=26,sort = 74) + private String lxdh1; + /** + * 供应商注册地址 + */ + @Excel(name = "*系统运营单位供应商注册地址",width=26,sort = 75) + private String gyszcdz1; + /** + * 注册地是否为太仓 + */ + @Excel(name = "*系统运营单位注册地址是否为太仓",width=26,sort = 76,dictType = "is_no",comboReadDict = true) + private String sfwtc1; + /** * 设备类型 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java index 69993d4..ad852d0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java @@ -32,9 +32,9 @@ public class AssetSupplyChain extends BaseClass implements Serializable { @ApiModelProperty("资产id") private Long assetId; /** - * 1.测评单位2.硬件供应商单位3.机房运维单位4.系统设计单位5.系统建设单位6.安全服务单位 + * 1.测评单位2.硬件供应商单位3.机房运维单位4.系统设计单位5.系统建设单位6.安全服务单位 7系统运营单位 */ - @ApiModelProperty("1.测评单位2.硬件供应商单位3.机房运维单位4.系统设计单位5.系统建设单位6.安全服务单位") + @ApiModelProperty("1.测评单位2.硬件供应商单位3.机房运维单位4.系统设计单位5.系统建设单位6.安全服务单位 7系统运营单位") private Integer type; /** * 名称 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java index cb98f92..962c1b4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java @@ -25,7 +25,7 @@ public class AssetCurrentPageRequest { * 系统类型(字典) */ @ApiModelProperty("系统类型(字典)") - private Integer xtlx; + private String xtlx; /** * 单位名称 @@ -37,7 +37,7 @@ public class AssetCurrentPageRequest { * 系统状态(字典) */ @ApiModelProperty("系统状态(字典)") - private Integer xtzt; + private String xtzt; /** * 开始时间 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java index 4c8a9f6..c49ff5d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java @@ -17,8 +17,8 @@ public class UnitRequest { @ApiModelProperty("单位名称") private String nickName; - @ApiModelProperty("单位类型,传字典数字") - private Integer dwlx; + @ApiModelProperty("单位类型,传字典") + private String dwlx; @ApiModelProperty("页码") private Long current=1L; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java index 45290f6..c1735ff 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java @@ -20,7 +20,7 @@ public interface AssetBasicNetWorkMapper extends BaseMapper { /** * 逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java index a482d28..cb55133 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java @@ -15,6 +15,6 @@ public interface AssetBusinessFormMapper extends BaseMapper { /** * 逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java index b47dcc5..54111fc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java @@ -31,6 +31,6 @@ public interface AssetCurrentMapper extends BaseMapper { /** * 逻辑删除 */ - void deleteByUnitIds(List idList); + void deleteByUnitIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java index 088f4cc..3fc7a0f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java @@ -22,6 +22,11 @@ public interface AssetSupplyChainMapper extends BaseMapper { /** * 逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); + + /** + * 根据现有资产id查找最新一条的系统运营单位 + */ + AssetSupplyChain getYydw(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/ExamineInfoMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/ExamineInfoMapper.java index 7fbce20..ae97d18 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/ExamineInfoMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/ExamineInfoMapper.java @@ -17,7 +17,7 @@ public interface ExamineInfoMapper extends BaseMapper { /** * 逻辑删除 */ - void deleteByUnitIds(List idList); + void deleteByUnitIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitMapper.java index 64bd1c7..13c1ab2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitMapper.java @@ -34,12 +34,12 @@ public interface UnitMapper extends BaseMapper { /** * 根据id列表查询单位 */ - List selectByIds(List ids); + List selectByIds(Long id); /** * 逻辑删除单位 */ - void deleteUnits(List ids); + void deleteUnits(Long id); /** * 逻辑删除用户 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java index fb495e5..eff1c21 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java @@ -14,10 +14,10 @@ public interface UnitOtherConcatMapper extends BaseMapper /** * 根据unitId逻辑删除 */ - void deleteByUnitIds(List idList); + void deleteByUnitIds(Long id); /** * 根据assetId逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java index 2cb8706..628d994 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java @@ -22,5 +22,5 @@ public interface AssetBasicNetworkService extends IService { /** * 逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java index 81a2548..0f15800 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java @@ -16,6 +16,6 @@ public interface AssetBusinessFormService extends IService { /** * 逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java index 2289e57..aa95b58 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java @@ -44,6 +44,6 @@ public interface AssetCurrentService extends IService { /** * 逻辑删除 */ - void deleteByUnitIds(List idList); + void deleteByUnitIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java index 04d346c..14cf3b8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java @@ -21,5 +21,10 @@ public interface AssetSupplyChainService extends IService { /** * 逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); + + /** + * 根据现有资产id查找最新一条的系统运营单位 + */ + AssetSupplyChain getYydw(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/ExamineInfoService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/ExamineInfoService.java index 56c5279..160441a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/ExamineInfoService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/ExamineInfoService.java @@ -16,5 +16,5 @@ public interface ExamineInfoService extends IService { /** * 逻辑删除 */ - void deleteByUnitIds(List idList); + void deleteByUnitIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java index 398790c..df14955 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java @@ -16,10 +16,10 @@ public interface UnitOtherConcatService extends IService { /** * 根据assetId逻辑删除 */ - void deleteByAssetIds(List idList); + void deleteByAssetIds(Long id); /** * 根据unitId逻辑删除 */ - void deleteByUnitIds(List ids); + void deleteByUnitIds(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitService.java index 931b773..1488ea2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitService.java @@ -45,7 +45,7 @@ public interface UnitService extends IService { /** * 根据id列表查询单位 */ - List selectByIds(List ids); + List selectByIds(Long id); /** * 逻辑删除用户 @@ -54,5 +54,5 @@ public interface UnitService extends IService { /** * 逻辑删除单位 */ - void deleteUnits(List ids); + void deleteUnits(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java index 7a98cd9..2c01a16 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java @@ -29,7 +29,7 @@ public class AssetBasicNetworkServiceImpl extends ServiceImpl idList) { - baseMapper.deleteByAssetIds(idList); + public void deleteByAssetIds(Long id) { + baseMapper.deleteByAssetIds(id); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java index 347569a..2c70fb8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java @@ -21,8 +21,8 @@ public class AssetBusinessFormServiceImpl extends ServiceImpl idList) { - baseMapper.deleteByAssetIds(idList); + public void deleteByAssetIds(Long id) { + baseMapper.deleteByAssetIds(id); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java index 77bd3bd..38a3e4e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java @@ -75,8 +75,8 @@ public class AssetCurrentServiceImpl extends ServiceImpl idList) { - baseMapper.deleteByUnitIds(idList); + public void deleteByUnitIds(Long id) { + baseMapper.deleteByUnitIds(id); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java index 0b84dac..b596ddd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java @@ -30,7 +30,15 @@ public class AssetSupplyChainServiceImpl extends ServiceImpl idList) { - baseMapper.deleteByAssetIds(idList); + public void deleteByAssetIds(Long id) { + baseMapper.deleteByAssetIds(id); + } + + /** + * 根据现有资产id查找最新一条的系统运营单位 + */ + @Override + public AssetSupplyChain getYydw(Long id) { + return baseMapper.getYydw(id); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/ExamineInfoServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/ExamineInfoServiceImpl.java index 21f3ffd..81ed28e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/ExamineInfoServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/ExamineInfoServiceImpl.java @@ -24,7 +24,7 @@ public class ExamineInfoServiceImpl extends ServiceImpl idList) { - baseMapper.deleteByUnitIds(idList); + public void deleteByUnitIds(Long id) { + baseMapper.deleteByUnitIds(id); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java index 0484e5f..75bbe1d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java @@ -20,14 +20,14 @@ public class UnitOtherConcatServiceImpl extends ServiceImpl idList) { - baseMapper.deleteByAssetIds(idList); + public void deleteByAssetIds(Long id) { + baseMapper.deleteByAssetIds(id); } /** * 根据unitId逻辑删除 */ @Override - public void deleteByUnitIds(List ids) { - baseMapper.deleteByUnitIds(ids); + public void deleteByUnitIds(Long id) { + baseMapper.deleteByUnitIds(id); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitServiceImpl.java index 78c7b6e..72d7292 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitServiceImpl.java @@ -81,8 +81,8 @@ public class UnitServiceImpl extends ServiceImpl implements Un * 根据id列表查询单位 */ @Override - public List selectByIds(List ids) { - return baseMapper.selectByIds(ids); + public List selectByIds(Long id) { + return baseMapper.selectByIds(id); } /** * 逻辑删除用户 @@ -96,8 +96,8 @@ public class UnitServiceImpl extends ServiceImpl implements Un * 逻辑删除单位 */ @Override - public void deleteUnits(List ids) { - baseMapper.deleteUnits(ids); + public void deleteUnits(Long id) { + baseMapper.deleteUnits(id); } } diff --git a/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml index 49dc501..456d959 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml @@ -2,10 +2,7 @@ - update asset_basic_network set del_flag = '2' where asset_id in - - #{id} - + update asset_basic_network set del_flag = '2' where asset_id = #{id} - update asset_current set del_flag = '2' where id in - - #{id} - + update asset_current + set del_flag = '2' + where id = #{id} \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml index 4bef4ba..7714b58 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml @@ -2,10 +2,7 @@ - update asset_supply_chain set del_flag = '2' where asset_id in - - #{id} - + update asset_supply_chain set del_flag = '2' where asset_id = #{id} + diff --git a/ruoyi-admin/src/main/resources/mapper/ExamineInfoMapper.xml b/ruoyi-admin/src/main/resources/mapper/ExamineInfoMapper.xml index 1e089f3..1eaf8ff 100644 --- a/ruoyi-admin/src/main/resources/mapper/ExamineInfoMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/ExamineInfoMapper.xml @@ -2,10 +2,7 @@ - update asset_examine_info set del_flag = '2' where unit_id in - - #{id} - + update asset_examine_info set del_flag = '2' where unit_id = #{id} diff --git a/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml b/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml index 1ae924b..366d03d 100644 --- a/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml @@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -107,16 +107,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - update unit_info set del_flag = '2' where id in - - #{ids} - + update unit_info set del_flag = '2' where id = #{id} update sys_user set del_flag = '2' where user_name in diff --git a/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml b/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml index 842e451..1433925 100644 --- a/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml +++ b/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml @@ -5,15 +5,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - update asset_supply_chain set del_flag = '2' where unit_id in - - #{id} - + update asset_supply_chain set del_flag = '2' where unit_id = #{id} - update asset_supply_chain set del_flag = '2' where asset_id in - - #{id} - + update asset_supply_chain set del_flag = '2' where asset_id = #{id} \ No newline at end of file