diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java index bcb3594..98d7b5e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java @@ -220,9 +220,12 @@ public class AssetAppController extends BaseController { //查询任务是否为进行中 AssetTask assetTask = assetTaskService.findByTaskId(assetAppCpPo.getTaskId()); if (assetTask.getTaskStatus().equals(1)) { - if (assetAppCpPo.getAppState().equals("7") || assetAppCpPo.getAppState() != assetApp.getAppState()) { + if (assetAppCpPo.getStatus()==5 ) { //修改任务中资产状态 - assetAppCpPo.setAppState(assetApp.getAppState()); + assetAppCpPo.setStatus(0); + assetAppCpPo.setBtgyy(null); + assetTask.setTaskStatus(1); + assetTaskService.update(assetTask); assetAppCpService.updateById(assetAppCpPo); } } 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 2203d5a..0d8b70b 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 @@ -512,9 +512,12 @@ public class AssetCurrentController extends BaseController { //查询任务是否为进行中 AssetTask assetTask = assetTaskService.findByTaskId(currentCpPo.getTaskId()); if (assetTask.getTaskStatus().equals(1)){ - if (currentCpPo.getXtzt().equals("5") ||assetCurrent.getXtzt()!=currentCpPo.getXtzt()){ + if (currentCpPo.getStatus()==5 ){ //修改任务中资产状态 - currentCpPo.setXtzt(assetCurrent.getXtzt()); + currentCpPo.setStatus(0); + currentCpPo.setBtgyy(null); + assetTask.setTaskStatus(1); + assetTaskService.update(assetTask); assetCurrentCpService.updateById(currentCpPo); } } @@ -671,21 +674,24 @@ public class AssetCurrentController extends BaseController { } else { //根据资产id查询旧资产 AssetCurrentCpPo assetCurrentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId()); - assetCurrentCpPo.setDwmc(assetCurrent.getDwmc()); - assetCurrentCpPo.setTaskId(assetTask.getId()); - //修改 - assetCurrentCpService.updateById(assetCurrentCpPo); + if (assetCurrentCpPo!=null){ + assetCurrentCpPo.setDwmc(assetCurrent.getDwmc()); + assetCurrentCpPo.setTaskId(assetTask.getId()); + //修改 + assetCurrentCpService.updateById(assetCurrentCpPo); + } + } return success(); } private void delete(AssetCurrent assetCurrent) { - assetCurrentCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null); - assetBasicNetworkCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null); - assetSupplyChainCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null); - unitOtherConcatCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null); - assetBusinessFormCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null); + assetCurrentCpService.deletByAssetId(assetCurrent.getId()); + assetBasicNetworkCpService.deletByAssetId(assetCurrent.getId()); + assetSupplyChainCpService.deletByAssetId(assetCurrent.getId()); + unitOtherConcatCpService.deletByAssetId(assetCurrent.getId()); + assetBusinessFormCpService.deletByAssetId(assetCurrent.getId()); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java index d80e254..be3d6c5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java @@ -215,9 +215,12 @@ public class AssetEmailController extends BaseController { //查询任务是否为进行中 AssetTask assetTask = assetTaskService.findByTaskId(assetEmailCpPo.getTaskId()); if (assetTask.getTaskStatus().equals(1)) { - if (assetEmailCpPo.getYjxtzc().equals("2") || assetEmailCpPo.getYjxtzc() != assetEmail.getYjxtzc()) { + if (assetEmailCpPo.getStatus()==5 ) { //修改任务中资产状态 - assetEmailCpPo.setYjxtzc(assetEmail.getYjxtzc()); + assetEmailCpPo.setStatus(0); + assetEmailCpPo.setBtgyy(null); + assetTask.setTaskStatus(1); + assetTaskService.update(assetTask); assetEmailCpService.updateById(assetEmailCpPo); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java index 40bd4ea..74caa23 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java @@ -218,10 +218,13 @@ public class AssetMiniProgramsController extends BaseController { //查询任务是否为进行中 AssetTask assetTask = assetTaskService.findByTaskId(assetMiniProgramsCpPo.getTaskId()); if (assetTask.getTaskStatus().equals(1)) { - if (assetMiniProgramsCpPo.getState().equals("7") || assetMiniProgramsCpPo.getState() != assetMiniProgramsCpPo.getState()) { + if (assetMiniProgramsCpPo.getStatus()==5) { //修改任务中资产状态 - assetMiniProgramsCpPo.setState(assetMiniProgramsCpPo.getState()); + assetMiniProgramsCpPo.setStatus(0); + assetMiniProgramsCpPo.setBtgyy(null); + assetTask.setTaskStatus(1); assetMiniProgramsCpService.updateById(assetMiniProgramsCpPo); + assetTaskService.update(assetTask); } } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java index a752b1c..bdc7510 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java @@ -280,9 +280,12 @@ public class AssetOfficialAccountController { //查询任务是否为进行中 AssetTask assetTask = assetTaskService.findByTaskId(assetOfficialAccountCpPo.getTaskId()); if (assetTask.getTaskStatus().equals(1)) { - if (assetOfficialAccountCpPo.getGzhzt().equals("7") || assetOfficialAccountCpPo.getGzhzt() != assetOfficialAccountCpPo.getGzhzt()) { + if (assetOfficialAccountCpPo.getStatus()==5 ) { //修改任务中资产状态 - assetOfficialAccountCpPo.setGzhzt(assetOfficialAccountCpPo.getGzhzt()); + assetOfficialAccountCpPo.setStatus(0); + assetOfficialAccountCpPo.setBtgyy(null); + assetTask.setTaskStatus(1); + assetTaskService.update(assetTask); assetOfficialAccountCpService.updateById(assetOfficialAccountCpPo); } } 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 e5fc1cc..1dfc045 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 @@ -552,9 +552,15 @@ public class AssetTaskController extends BaseController { StringBuilder b = new StringBuilder(); StringBuilder c = new StringBuilder(); assetOfficialAccountCpPo.getCdList().forEach(x -> { - a.append(x.getCdmc()).append("|"); - b.append(x.getCdlj()).append("|"); - c.append(x.getCdlx()).append("|"); + if(!Objects.equals(x.getCdmc(), "") &&x.getCdmc()!=null){ + a.append(x.getCdmc()).append("|"); + } + if(!Objects.equals(x.getCdlj(), "") &&x.getCdlj()!=null){ + b.append(x.getCdlj()).append("|"); + } + if(!Objects.equals(x.getCdlx(), "") &&x.getCdlx()!=null){ + c.append(x.getCdlx()).append("|"); + } }); assetOfficialAccountCpPo.setCdmc(a.toString()); assetOfficialAccountCpPo.setCdlj(b.toString()); @@ -701,9 +707,15 @@ public class AssetTaskController extends BaseController { StringBuilder b = new StringBuilder(); StringBuilder c = new StringBuilder(); assetOfficialAccountJyPo.getCdList().forEach(x -> { - a.append(x.getCdmc()).append("|"); - b.append(x.getCdlj()).append("|"); - c.append(x.getCdlx()).append("|"); + if(!Objects.equals(x.getCdmc(), "") &&x.getCdmc()!=null){ + a.append(x.getCdmc()).append("|"); + } + if(!Objects.equals(x.getCdlj(), "") &&x.getCdlj()!=null){ + b.append(x.getCdlj()).append("|"); + } + if(!Objects.equals(x.getCdlx(), "") &&x.getCdlx()!=null){ + c.append(x.getCdlx()).append("|"); + } }); assetOfficialAccountJyPo.setCdmc(a.toString()); assetOfficialAccountJyPo.setCdlj(b.toString()); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppCpMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppCpMapper.java index 4ab6975..8f4b67c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppCpMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppCpMapper.java @@ -1,10 +1,7 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.tc.entity.po.AssetAppCpPo; -import com.ruoyi.tc.entity.po.AssetCurrentCpPo; -import com.ruoyi.tc.entity.request.AssetAuditPageRequest; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -31,6 +28,14 @@ public interface AssetAppCpMapper extends BaseMapper { void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId); + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + @Delete("delete from asset_app_cp where asset_id=#{assetId} ") + void deletByAssetId(@Param("assetId") Long assetId); + /** * 根据taskid查询查询数据 * @@ -60,7 +65,7 @@ public interface AssetAppCpMapper extends BaseMapper { * @return */ @Select("select * from asset_app_cp where asset_id=#{assetId} and task_id =#{taskId} ") - AssetAppCpPo findByassetIdandTaskId(@Param("assetId") Integer assetId, @Param("taskId")Integer taskId); + AssetAppCpPo findByassetIdandTaskId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId); @Select(" select * from asset_app_cp where asset_id = #{id} ") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkCpMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkCpMapper.java index d52cf3f..8a31410 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkCpMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkCpMapper.java @@ -47,4 +47,16 @@ public interface AssetBasicNetWorkCpMapper extends BaseMapper findByTaskId(int taskId); + + + + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + + */ + @Delete("delete from asset_basic_network_cp where asset_id=#{assetId}") + void deletByAssetId(@Param("assetId") Long assetId); + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormCpMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormCpMapper.java index 8f29c34..318bf8b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormCpMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormCpMapper.java @@ -38,7 +38,13 @@ public interface AssetBusinessFormCpMapper extends BaseMapper { @Select(" select * from asset_current_cp where id = #{id} ") AssetCurrentCpPo findDwmc(Long id); + + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + @Delete("delete from asset_current_cp where id=#{assetId} ") + void deletByAssetId(@Param("assetId") Long assetId); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailCpMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailCpMapper.java index 2908fb8..05d40e6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailCpMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailCpMapper.java @@ -26,6 +26,13 @@ public interface AssetEmailCpMapper extends BaseMapper { void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId); + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + @Delete("delete from asset_email_cp where asset_id=#{assetId}") + void deletByAssetId(@Param("assetId") Long assetId); /** * 根据taskid查询查询数据 @@ -37,30 +44,26 @@ public interface AssetEmailCpMapper extends BaseMapper { List findByTaskId(@Param("taskId") int taskId); - /** * 修改不通过原因 * * @param assetId 资产id - * @param taskId 任务id - * @param btgyy 不通过原因 + * @param taskId 任务id + * @param btgyy 不通过原因 */ @Update("update asset_email_cp set btgyy=#{btgyy},count=#{newThcs} where asset_id=#{assetId} and task_id =#{taskId} ") - void updateByAssetId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId, @Param("btgyy")String btgyy,@Param("newThcs") Integer newThcs); - - + void updateByAssetId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId, @Param("btgyy") String btgyy, @Param("newThcs") Integer newThcs); /** * 根据任务id,资产id获取退回次数 * * @param assetId 资产id - * @param taskId 任务id + * @param taskId 任务id * @return */ @Select("select * from asset_email_cp where asset_id=#{assetId} and task_id =#{taskId} ") - AssetEmailCpPo findByassetIdandTaskId(@Param("assetId") Integer assetId, @Param("taskId")Integer taskId); - + AssetEmailCpPo findByassetIdandTaskId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId); /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsCpMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsCpMapper.java index 8e20c0e..e3414bf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsCpMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsCpMapper.java @@ -29,6 +29,13 @@ public interface AssetMiniProgramsCpMapper extends BaseMapper findByTaskId(@Param("taskId") int taskId); - /** * 修改不通过原因 * * @param assetId 资产id - * @param taskId 任务id - * @param btgyy 不通过原因 + * @param taskId 任务id + * @param btgyy 不通过原因 */ @Update("update asset_mini_programs_cp set btgyy=#{btgyy},count=#{newThcs} where asset_id=#{assetId} and task_id =#{taskId} ") - void updateByAssetId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId, @Param("btgyy")String btgyy,@Param("newThcs") Integer newThcs); - - + void updateByAssetId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId, @Param("btgyy") String btgyy, @Param("newThcs") Integer newThcs); /** @@ -64,8 +68,6 @@ public interface AssetMiniProgramsCpMapper extends BaseMapper findByTaskId(@Param("taskId") int taskId); - /** * 修改不通过原因 * * @param assetId 资产id - * @param taskId 任务id - * @param btgyy 不通过原因 + * @param taskId 任务id + * @param btgyy 不通过原因 */ @Update("update asset_official_account_cp set btgyy=#{btgyy},count=#{newThcs} where asset_id=#{assetId} and task_id =#{taskId} ") - void updateByAssetId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId, @Param("btgyy")String btgyy,@Param("newThcs") Integer newThcs); - - + void updateByAssetId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId, @Param("btgyy") String btgyy, @Param("newThcs") Integer newThcs); /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainCpMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainCpMapper.java index c98b9e8..e61f0d7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainCpMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainCpMapper.java @@ -37,7 +37,13 @@ public interface AssetSupplyChainCpMapper extends BaseMapper @Delete("delete from unit_other_contact_cp where asset_id=#{assetId} and task_id =#{taskId} ") void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")Integer taskId); - + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + @Delete("delete from unit_other_contact_cp where asset_id=#{assetId} ") + void deletByAssetId(@Param("assetId") Long assetId); /** * 根据taskid查询查询数据 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppCpService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppCpService.java index 1de12bb..e00b9c7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppCpService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppCpService.java @@ -25,6 +25,14 @@ public interface AssetAppCpService extends IService { void deletByAssetIdandTaskId(Long assetId, Integer taskId); + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + void deletByAssetId(Long assetId); + + /** * 根据taskid查询查询数据 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkCpService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkCpService.java index f1b6fee..f928b68 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkCpService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkCpService.java @@ -40,4 +40,14 @@ public interface AssetBasicNetworkCpService extends IService findByTaskId(int taskId); + + + + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + + */ + void deletByAssetId(Long assetId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormCpService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormCpService.java index 72350b9..a1149a0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormCpService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormCpService.java @@ -2,7 +2,6 @@ package com.ruoyi.tc.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.tc.entity.po.AssetBusinessFormCpPo; -import com.ruoyi.tc.entity.po.AssetCurrentCpPo; import java.util.List; @@ -16,13 +15,13 @@ public interface AssetBusinessFormCpService extends IService findByassetId(Long assetId); - /** * 根据资产id和任务id删除数据 * @@ -31,7 +30,12 @@ public interface AssetBusinessFormCpService extends IService { * @return */ AssetCurrentCpPo findDwmc(Long id); + + + + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + void deletByAssetId(Long assetId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailCpService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailCpService.java index 62dc3cb..947ab6d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailCpService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailCpService.java @@ -1,7 +1,6 @@ package com.ruoyi.tc.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.tc.entity.po.AssetCurrentCpPo; import com.ruoyi.tc.entity.po.AssetEmailCpPo; import java.util.List; @@ -24,6 +23,15 @@ public interface AssetEmailCpService extends IService { void deletByAssetIdandTaskId(Long assetId, Integer taskId); + + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + void deletByAssetId(Long assetId); + + /** * 根据taskid查询查询数据 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsCpService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsCpService.java index e280df0..318a8ce 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsCpService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsCpService.java @@ -24,6 +24,17 @@ public interface AssetMiniProgramsCpService extends IService + /** + * 根据资产id和任务id删除数据 + * + * @param assetId 资产id + */ + void deletByAssetId(Long assetId); + + + /** * 根据taskid查询查询数据 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppCpServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppCpServiceImpl.java index e7e4275..22f6145 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppCpServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppCpServiceImpl.java @@ -32,6 +32,11 @@ public class AssetAppCpServiceImpl extends ServiceImpl findByTaskId(int taskId) { return assetAppCpMapper.findByTaskId(taskId); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java index 8268472..9b37260 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java @@ -147,14 +147,17 @@ public class AssetAppServiceImpl extends ServiceImpl i //根据修改的单位名称查询任务表中是否有此单位的任务,如果有修改资产中的任务id,如果没有删除 AssetTask assetTask = assetTaskService.findByDwmc(assetApp.getAppName()); if (assetTask != null) { - assetAppCpService.deletByAssetIdandTaskId(assetApp.getId(), null); + assetAppCpService.deletByAssetId(assetApp.getId()); } else { //根据资产id查询旧资产 AssetAppCpPo assetAppCpPo = assetAppCpService.findDwmc(assetApp.getId()); - assetAppCpPo.setAppName(assetApp.getAppName()); - assetAppCpPo.setTaskId(assetTask.getId()); - //修改 - assetAppCpService.updateById(assetAppCpPo); + if (assetAppCpPo!=null){ + assetAppCpPo.setAppName(assetApp.getAppName()); + assetAppCpPo.setTaskId(assetTask.getId()); + //修改 + assetAppCpService.updateById(assetAppCpPo); + } + } return true; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkCpServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkCpServiceImpl.java index dc14d57..3b8edf5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkCpServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkCpServiceImpl.java @@ -36,5 +36,10 @@ public class AssetBasicNetworkCpServiceImpl extends ServiceImpl findByTaskId(int taskId) { return assetBusinessFormCpMapper.findByTaskId(taskId); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentCpServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentCpServiceImpl.java index f66bdcc..893931b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentCpServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentCpServiceImpl.java @@ -51,6 +51,11 @@ public class AssetCurrentCpServiceImpl extends ServiceImpl findByTaskId(int taskId) { return assetEmailCpMapper.findByTaskId(taskId); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java index 6178604..9b526eb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java @@ -148,14 +148,17 @@ public class AssetEmailServiceImpl extends ServiceImpl findByTaskId(int taskId) { return assetMiniProgramsCpMapper.findByTaskId(taskId); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java index bb08e31..542acd4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java @@ -137,14 +137,18 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl findByTaskId(int taskId) { return assetOfficialAccountCpMapper.findByTaskId(taskId); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java index 146a7e3..4526029 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java @@ -183,14 +183,17 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl findByTaskId(int taskId) { return unitOtherConcatCpMapper.findByTaskId(taskId);