diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java index 08f1f59..12d4155 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.tc.entity.AssetCurrent; import com.ruoyi.tc.entity.AssetLc; import com.ruoyi.tc.entity.AssetTask; @@ -33,6 +34,7 @@ import java.time.LocalDateTime; */ @Api(tags = "任务主表") @RestController +@Transactional(rollbackFor = Exception.class) @RequestMapping("/unit/assetTask") public class AssetTaskController extends BaseController { /** @@ -74,6 +76,9 @@ public class AssetTaskController extends BaseController { @Resource private AssetLcService assetLcService; + + @Resource + private AssetCurrentService assetCurrentService; /** * 分页查询 * @@ -184,12 +189,15 @@ public class AssetTaskController extends BaseController { assetSupplyChainCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId()); unitOtherConcatCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId()); assetBasicNetworkCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId()); + AssetCurrent ac = new AssetCurrent(); if (StringUtils.isBlank(assetCurrent.getBfyy())) { //待审批 assetCurrent.setStatus(0); } else { //已报废 assetCurrent.setStatus(5); + assetCurrent.setXtzt("5"); + } StringBuilder a = new StringBuilder(); if (!assetCurrent.getGlymList().isEmpty()) { @@ -208,6 +216,8 @@ public class AssetTaskController extends BaseController { } assetCurrent.setGlIp(b.toString()); // assetCurrent.setCurrentId(null); + BeanUtils.copyProperties(assetCurrent,ac); + assetCurrentService.updateById(ac); assetCurrentCpService.save(assetCurrent); //新增新监管业务形态 if (assetCurrent.getXjgywxt() != null) { @@ -266,12 +276,12 @@ public class AssetTaskController extends BaseController { assetLc.setTaskId(assetCurrent.getTaskId()); assetLc.setAssetName(assetCurrent.getXtmc()); //当审核状态为审核不通过 单位端重新提交 - if (assetCurrent.getStatus().equals(4)) { - assetLc.setTaskId(assetCurrent.getTaskId()); - assetLc.setXfTime(LocalDateTime.now()); - assetLc.setAssetName("单位重新核查提交时间" + assetCurrent.getXtmc()); - assetLcService.insert(assetLc); - } +// if (assetCurrent.getStatus().equals(4)) { +// assetLc.setTaskId(assetCurrent.getTaskId()); +// assetLc.setXfTime(LocalDateTime.now()); +// assetLc.setAssetName("单位重新核查提交时间" + assetCurrent.getXtmc()); +// assetLcService.insert(assetLc); +// } StringBuilder a = new StringBuilder(); if (!assetCurrent.getGlymList().isEmpty()) { 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 89cb3c4..c75ac69 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 @@ -34,7 +34,7 @@ import java.util.List; */ @Api(tags = "单位表控制层") @RestController -@PreAuthorize("@ss.hasAnyRoles('admin,common')") +//@PreAuthorize("@ss.hasAnyRoles('admin,common')") @RequestMapping("/tc/unit") public class UnitController { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java index b036b5f..23304dc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java @@ -18,7 +18,11 @@ public class AssetCurrentShRequest { @ApiModelProperty("任务id") private Integer taskId; - + /** + * 系统名称 + */ + @ApiModelProperty("系统名称") + private String xtmc; /** * 资产id diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java index ea0dc47..cba8fcd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java @@ -58,4 +58,11 @@ public class AssetTaskPageRequest { @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime endTime; + + + /** + * 单位名称 + */ + @ApiModelProperty("单位名称") + private String dwmc; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java index ae266d4..8737b2f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java @@ -20,4 +20,11 @@ public class AssetdwHcRequest { private String dwmc; + /** + * 任务id + */ + @ApiModelProperty("任务id") + private Integer taskId; + + } 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 c1735ff..1dc9425 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 @@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.AssetBasicNetwork; +import org.apache.ibatis.annotations.Param; import java.io.Serializable; import java.util.List; @@ -22,5 +23,12 @@ public interface AssetBasicNetWorkMapper extends BaseMapper { */ void deleteByAssetIds(Long id); + + /** + * 删除 + * @param idList + */ + void deleteIdList(@Param("idList") List idList); + } 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 cb55133..5b372d6 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 @@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.AssetBusinessForm; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -16,5 +17,12 @@ public interface AssetBusinessFormMapper extends BaseMapper { * 逻辑删除 */ void deleteByAssetIds(Long id); + + + /** + * 删除 + * @param idList + */ + void deleteIdList(@Param("idList") List idList); } 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 e6b3946..e76bc97 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 @@ -33,5 +33,13 @@ public interface AssetCurrentMapper extends BaseMapper { * 逻辑删除 */ void deleteByUnitIds(Long id); + + + + /** + * 删除 + * @param idList + */ + void deleteIdList(@Param("idList") List idList); } 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 3fc7a0f..9272637 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 @@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.AssetSupplyChain; +import org.apache.ibatis.annotations.Param; import java.io.Serializable; import java.util.List; @@ -28,5 +29,13 @@ public interface AssetSupplyChainMapper extends BaseMapper { * 根据现有资产id查找最新一条的系统运营单位 */ AssetSupplyChain getYydw(Long id); + + + + /** + * 删除 + * @param idList + */ + void deleteIdList(@Param("idList") List idList); } 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 eff1c21..6faff43 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 @@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.UnitOtherConcat; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -20,4 +21,11 @@ public interface UnitOtherConcatMapper extends BaseMapper * 根据assetId逻辑删除 */ void deleteByAssetIds(Long id); + + + /** + * 删除 + * @param idList + */ + void deleteIdList(@Param("idList") List idList); } 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 628d994..4aca3dd 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 @@ -23,4 +23,13 @@ public interface AssetBasicNetworkService extends IService { * 逻辑删除 */ void deleteByAssetIds(Long id); + + + + + /** + * 删除 + * @param netWorkidList + */ + void deleteIdList(List netWorkidList); } 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 0f15800..ecebb79 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 @@ -17,5 +17,12 @@ public interface AssetBusinessFormService extends IService { * 逻辑删除 */ void deleteByAssetIds(Long id); + + + /** + * 删除 + * @param bussinessidList + */ + void deleteIdList(List bussinessidList); } 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 936a1a8..ef7d486 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 @@ -21,10 +21,10 @@ public interface AssetCurrentService extends IService { * 分页查询所有数据 * * @param page 分页对象 - * @param as 查询实体 + * @param as 查询实体 * @return 所有数据 */ - Page page(Page page, AssetCurrentPageRequest as ); + Page page(Page page, AssetCurrentPageRequest as); /** * 查询所有数据 @@ -32,7 +32,7 @@ public interface AssetCurrentService extends IService { * @param as 查询实体 * @return 所有数据 */ - List page(AssetCurrentPageRequest as ); + List page(AssetCurrentPageRequest as); /** * 通过主键查询单条数据 @@ -46,5 +46,11 @@ public interface AssetCurrentService extends IService { * 逻辑删除 */ void deleteByUnitIds(Long id); + + /** + * 删除 + * @param idList + */ + void deleteIdList(List idList); } 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 14cf3b8..2ad13ff 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 @@ -27,4 +27,12 @@ public interface AssetSupplyChainService extends IService { * 根据现有资产id查找最新一条的系统运营单位 */ AssetSupplyChain getYydw(Long id); + + + + /** + * 删除 + * @param SupplyChainidList + */ + void deleteIdList(List SupplyChainidList); } 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 df14955..c6319bf 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 @@ -22,4 +22,11 @@ public interface UnitOtherConcatService extends IService { * 根据unitId逻辑删除 */ void deleteByUnitIds(Long id); + + + /** + * 删除 + * @param UnitOtherConcatidList + */ + void deleteIdList(List UnitOtherConcatidList); } 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 2c01a16..350f74d 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 @@ -32,4 +32,9 @@ public class AssetBasicNetworkServiceImpl extends ServiceImpl netWorkidList) { + baseMapper.deleteIdList(netWorkidList); + } } 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 2c70fb8..9433eb2 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 @@ -24,5 +24,10 @@ public class AssetBusinessFormServiceImpl extends ServiceImpl idList) { + baseMapper.deleteIdList(idList); + } } 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 fc200cd..d03aa56 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 @@ -95,5 +95,10 @@ public class AssetCurrentServiceImpl extends ServiceImpl idList) { + baseMapper.deleteIdList(idList); + } } 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 b596ddd..779f53d 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 @@ -41,4 +41,9 @@ public class AssetSupplyChainServiceImpl extends ServiceImpl SupplyChainidList) { + baseMapper.deleteIdList(SupplyChainidList); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java index 5dd04cf..13c031b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.tc.service.impl; +import cn.hutool.core.collection.CollectionUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.utils.bean.BeanUtils; @@ -13,11 +14,13 @@ import com.ruoyi.tc.entity.response.AssetdwHcResponse; import com.ruoyi.tc.mapper.AssetTaskMapper; import com.ruoyi.tc.service.*; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.List; import java.util.stream.Collectors; @@ -67,7 +70,8 @@ public class AssetTaskServiceImpl extends ServiceImpl bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId()); if (bussList != null) { for (AssetBusinessFormCpPo assetBusinessFormCpResponse : bussList) { - assetCurrentResponse.getXjgywxt().setBusinessId(assetBusinessFormCpResponse.getBusinessId()); - assetCurrentResponse.getXjgywxt().setAssetId(assetCurrentResponse.getId()); - assetCurrentResponse.getXjgywxt().setTaskId(id); - assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt()); + if (assetCurrentResponse.getXjgywxt() != null) { + assetCurrentResponse.getXjgywxt().setAssetId(assetBusinessFormCpResponse.getAssetId()); + assetCurrentResponse.getXjgywxt().setTaskId(id); + assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt()); + } } assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList); } @@ -217,7 +223,12 @@ public class AssetTaskServiceImpl extends ServiceImpl zcHc(Page assetTask, AssestTaskXqRequest pageRequest) { assetTask.setOptimizeCountSql(false); - return assetTaskDao.zcHc(assetTask, pageRequest); + Page result = assetTaskDao.zcHc(assetTask, pageRequest); + // 确保 records 不为 null + if (result.getRecords() == null) { + result.setRecords(new ArrayList<>()); // 设置为空数组 + } + return result; } @Override @@ -227,11 +238,11 @@ public class AssetTaskServiceImpl extends ServiceImpl item.getStatus() == 3); boolean hasExpired = list.stream().anyMatch(item -> item.getDeadstatus() == 6); boolean hasRejected = list.stream().anyMatch(item -> item.getStatus() == 4); + boolean hased = list.stream().anyMatch(item -> item.getStatus() == 5); LocalDateTime finishTime = null; if (hasPendingApproval) { // 资产状态存在待审批,任务状态为进行中 @@ -260,7 +272,20 @@ public class AssetTaskServiceImpl extends ServiceImpl currentNewList = currentList.stream() .map(cpPo -> { @@ -290,7 +318,10 @@ public class AssetTaskServiceImpl extends ServiceImpl bussinessNewList = bussinessList.stream() .map(cpPo -> { @@ -306,7 +337,10 @@ public class AssetTaskServiceImpl extends ServiceImpl netWorkNewList = netWorkList.stream() .map(cpPo -> { @@ -322,10 +356,14 @@ public class AssetTaskServiceImpl extends ServiceImpl SupplyChainNewList = SupplyChainList.stream() .map(cpPo -> { AssetSupplyChain supplyChain = new AssetSupplyChain(); + supplyChain.setId(null); BeanUtils.copyProperties(cpPo, supplyChain); // 复制属性 return supplyChain; // 返回新对象 }) @@ -337,7 +375,9 @@ public class AssetTaskServiceImpl extends ServiceImpl UnitOtherConcatNewList = UnitOtherConcatList.stream() .map(cpPo -> { UnitOtherConcat unitOtherConcat = new UnitOtherConcat(); @@ -345,7 +385,6 @@ public class AssetTaskServiceImpl extends ServiceImpl UnitOtherConcatidList) { + baseMapper.deleteIdList(UnitOtherConcatidList); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml index 456d959..005d903 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml @@ -4,6 +4,13 @@ update asset_basic_network set del_flag = '2' where asset_id = #{id} + + DELETE FROM asset_basic_network + WHERE asset_id IN + + #{id} + + select * from asset_current - del_flag = '0' and isbf = '0' + del_flag = '0' and xtmc like concat('%',#{req.xtmc},'%') diff --git a/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml index 7714b58..c2605fd 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml @@ -4,6 +4,13 @@ update asset_supply_chain set del_flag = '2' where asset_id = #{id} + + DELETE FROM asset_supply_chain + WHERE asset_id IN + + #{id} + + SELECT a.* FROM unit_info a + WHERE NOT EXISTS ( + SELECT 1 + FROM asset_task - a.nick_name NOT IN (SELECT dwmc FROM asset_task where task_status=1) and - a.del_flag = '0' + task_status = 1 AND FIND_IN_SET(a.nick_name, dwmc) + ) AND a.del_flag = '0' and a.nick_name IN (SELECT dwmc FROM asset_current) and a.nick_name like concat('%',#{req.nickName},'%') @@ -126,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.user_name like concat('%',#{req.userName},'%') + update unit_info set del_flag = '2' where id = #{id} diff --git a/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml b/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml index d6de253..f17ea45 100644 --- a/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml +++ b/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml @@ -10,4 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update unit_other_contact set del_flag = '2' where asset_id = #{id} + + DELETE FROM unit_other_contact + WHERE asset_id IN + + #{id} + + \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index dad24b0..34a0d7e 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -115,7 +115,7 @@ public class SecurityConfig // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() - .antMatchers("/unit/assetTask/**","/tc/**","/unit/assetLc/**").permitAll() +// .antMatchers("/unit/assetTask/**","/tc/**","/unit/assetLc/**","/tc/unit/**").permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated(); })