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

dongdingding
dongdingding 5 days ago
parent 4b9d4a5622
commit eb539c561b

@ -651,9 +651,28 @@ public class AssetCurrentController extends BaseController {
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat()); unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
} }
}); });
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
List<AssetTask> dwmcList = assetTaskService.findByDwmc(assetCurrent.getDwmc());
if (dwmcList.isEmpty()) {
delete(assetCurrent);
}else{
delete(assetCurrent);
for (AssetTask s:dwmcList){
}
}
return success(); 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);
}
/** /**
* *
* *

@ -35,7 +35,7 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
* @param taskId id * @param taskId id
*/ */
@Delete("delete from asset_business_form_cp where asset_id=#{assetId} and task_id =#{taskId} ") @Delete("delete from asset_business_form_cp where asset_id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")int taskId); void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")Integer taskId);

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

@ -35,7 +35,7 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpP
* @param taskId id * @param taskId id
*/ */
@Delete("delete from asset_supply_chain_cp where asset_id=#{assetId} and task_id =#{taskId} ") @Delete("delete from asset_supply_chain_cp where asset_id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")int taskId); void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")Integer taskId);

@ -289,5 +289,17 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
* @return * @return
*/ */
List<AssetdwHcBlResponse> dwHcBl(@Param("req") AssetdwHcRequest req); List<AssetdwHcBlResponse> dwHcBl(@Param("req") AssetdwHcRequest req);
/**
*
*
* @param dwmc
* @return
*/
List<AssetTask> findByDwmc(@Param("dwmc") String dwmc);
} }

@ -33,7 +33,7 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
* @param taskId id * @param taskId id
*/ */
@Delete("delete from unit_other_contact_cp where asset_id=#{assetId} and task_id =#{taskId} ") @Delete("delete from unit_other_contact_cp where asset_id=#{assetId} and task_id =#{taskId} ")
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")int taskId); void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId")Integer taskId);

@ -30,7 +30,7 @@ public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCp
* @param assetId id * @param assetId id
* @param taskId id * @param taskId id
*/ */
void deletByAssetIdandTaskId(Long assetId, int taskId); void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/** /**

@ -29,7 +29,7 @@ public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCp
* @param assetId id * @param assetId id
* @param taskId id * @param taskId id
*/ */
void deletByAssetIdandTaskId(Long assetId, int taskId); void deletByAssetIdandTaskId(Long assetId, Integer taskId);

@ -22,7 +22,7 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
* @param assetId id * @param assetId id
* @param taskId id * @param taskId id
*/ */
void deletByAssetIdandTaskId(Long assetId, int taskId); void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/** /**
@ -54,5 +54,13 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
*/ */
AssetCurrentCpPo findByassetIdandTaskId(Integer assetId, Integer taskId); AssetCurrentCpPo findByassetIdandTaskId(Integer assetId, Integer taskId);
/**
* id
* @param id
* @return
*/
Integer findByAssetId(Long id);
} }

@ -40,6 +40,6 @@ public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpPo
* @param assetId id * @param assetId id
* @param taskId id * @param taskId id
*/ */
void deletByAssetIdandTaskId(Long assetId, int taskId); void deletByAssetIdandTaskId(Long assetId, Integer taskId);
} }

@ -178,4 +178,13 @@ public interface AssetTaskService extends IService<AssetTask> {
* @return * @return
*/ */
List<AssetdwHcBlResponse> dwHcBl(AssetdwHcRequest req); List<AssetdwHcBlResponse> dwHcBl(AssetdwHcRequest req);
/**
*
*
* @param dwmc
* @return
*/
List<AssetTask> findByDwmc(String dwmc);
} }

@ -29,7 +29,7 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpPo>
* @param assetId id * @param assetId id
* @param taskId id * @param taskId id
*/ */
void deletByAssetIdandTaskId(Long assetId, int taskId); void deletByAssetIdandTaskId(Long assetId, Integer taskId);

@ -27,7 +27,7 @@ public class AssetBasicNetworkCpServiceImpl extends ServiceImpl<AssetBasicNetWor
} }
@Override @Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) { public void deletByAssetIdandTaskId(Long assetId, Integer taskId) {
assetBasicNetWorkCpMapper.deletByAssetIdandTaskId(assetId, taskId); assetBasicNetWorkCpMapper.deletByAssetIdandTaskId(assetId, taskId);
} }

@ -27,7 +27,7 @@ public class AssetBusinessFormCpServiceImpl extends ServiceImpl<AssetBusinessFor
} }
@Override @Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) { public void deletByAssetIdandTaskId(Long assetId, Integer taskId) {
assetBusinessFormCpMapper.deletByAssetIdandTaskId(assetId,taskId); assetBusinessFormCpMapper.deletByAssetIdandTaskId(assetId,taskId);
} }

@ -25,7 +25,7 @@ public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper,
@Override @Override
public void deletByAssetIdandTaskId(Long assetId,int taskId) { public void deletByAssetIdandTaskId(Long assetId,Integer taskId) {
assetCurrentCpMapper.deletByAssetIdandTaskId(assetId,taskId); assetCurrentCpMapper.deletByAssetIdandTaskId(assetId,taskId);
} }

@ -32,7 +32,7 @@ public class AssetSupplyChainCpServiceImpl extends ServiceImpl<AssetSupplyChainC
} }
@Override @Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) { public void deletByAssetIdandTaskId(Long assetId, Integer taskId) {
assetSupplyChainCpMapper.deletByAssetIdandTaskId(assetId,taskId); assetSupplyChainCpMapper.deletByAssetIdandTaskId(assetId,taskId);
} }
} }

@ -820,6 +820,11 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
return assetTaskDao.dwHcBl(req); return assetTaskDao.dwHcBl(req);
} }
@Override
public List<AssetTask> findByDwmc(String dwmc) {
return assetTaskDao.findByDwmc(dwmc);
}
//创建任务流程 //创建任务流程
private void getTaskStatus(AssetCurrentShRequest req) { private void getTaskStatus(AssetCurrentShRequest req) {
AssetLc assetLc = new AssetLc(); AssetLc assetLc = new AssetLc();

@ -26,7 +26,7 @@ public class UnitOtherConcatCpServiceImpl extends ServiceImpl<UnitOtherConcatCpM
} }
@Override @Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) { public void deletByAssetIdandTaskId(Long assetId, Integer taskId) {
unitOtherConcatCpMapper.deletByAssetIdandTaskId(assetId,taskId); unitOtherConcatCpMapper.deletByAssetIdandTaskId(assetId,taskId);
} }

@ -936,6 +936,9 @@
taskStatus taskStatus
)f group by taskStatus )f group by taskStatus
</select> </select>
<select id="findByDwmc" resultType="com.ruoyi.tc.entity.AssetTask" parameterType="java.lang.String">
select * from asset_task where dwmc like concat('%', #{dwmc}, '%') and task_status=1
</select>
<update id="xcxsh" <update id="xcxsh"
parameterType="com.ruoyi.tc.entity.request.AssetCurrentShRequest"> parameterType="com.ruoyi.tc.entity.request.AssetCurrentShRequest">
update asset_mini_programs_cp update asset_mini_programs_cp

Loading…
Cancel
Save