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

dongdingding
dongdingding 3 days ago
parent 9a8d188aca
commit e3dd7aeadf

@ -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);
}
}

@ -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());
}
/**

@ -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);
}
}

@ -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);
}
}
}

@ -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);
}
}

@ -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());

@ -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<AssetAppCpPo> {
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId);
/**
* idid
*
* @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<AssetAppCpPo> {
* @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} ")

@ -47,4 +47,16 @@ public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkC
@Select("select * from asset_basic_network_cp where task_id=#{taskId}")
List<AssetBasicNetworkCpPo> findByTaskId(int taskId);
/**
* idid
*
* @param assetId id
*/
@Delete("delete from asset_basic_network_cp where asset_id=#{assetId}")
void deletByAssetId(@Param("assetId") Long assetId);
}

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

@ -62,5 +62,14 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
@Select(" select * from asset_current_cp where id = #{id} ")
AssetCurrentCpPo findDwmc(Long id);
/**
* idid
*
* @param assetId id
*/
@Delete("delete from asset_current_cp where id=#{assetId} ")
void deletByAssetId(@Param("assetId") Long assetId);
}

@ -26,6 +26,13 @@ public interface AssetEmailCpMapper extends BaseMapper<AssetEmailCpPo> {
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId);
/**
* idid
*
* @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<AssetEmailCpPo> {
List<AssetEmailCpPo> 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);
/**

@ -29,6 +29,13 @@ public interface AssetMiniProgramsCpMapper extends BaseMapper<AssetMiniProgramsC
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId);
/**
* idid
*
* @param assetId id
*/
@Delete("delete from asset_mini_programs_cp where asset_id=#{assetId} ")
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid
@ -40,18 +47,15 @@ public interface AssetMiniProgramsCpMapper extends BaseMapper<AssetMiniProgramsC
List<AssetMiniProgramsCpPo> 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<AssetMiniProgramsC
AssetMiniProgramsCpPo findByassetIdandTaskId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId);
/**
* id
*

@ -1,8 +1,6 @@
package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsCpPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
@ -29,6 +27,15 @@ public interface AssetOfficialAccountCpMapper extends BaseMapper<AssetOfficialAc
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") Integer taskId);
/**
* idid
*
* @param assetId id
*/
@Delete("delete from asset_official_account_cp where asset_id=#{assetId} ")
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid
*
@ -39,18 +46,15 @@ public interface AssetOfficialAccountCpMapper extends BaseMapper<AssetOfficialAc
List<AssetOfficialAccountCpPo> 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);
/**

@ -37,7 +37,13 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpP
@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);
/**
* idid
*
* @param assetId id
*/
@Delete("delete from asset_supply_chain_cp where asset_id=#{assetId} ")
void deletByAssetId(@Param("assetId")Long assetId);
/**

@ -35,7 +35,13 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
@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);
/**
* idid
*
* @param assetId id
*/
@Delete("delete from unit_other_contact_cp where asset_id=#{assetId} ")
void deletByAssetId(@Param("assetId") Long assetId);
/**
* taskid

@ -25,6 +25,14 @@ public interface AssetAppCpService extends IService<AssetAppCpPo> {
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
/**
* taskid
*

@ -40,4 +40,14 @@ public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCp
* @return
*/
List<AssetBasicNetworkCpPo> findByTaskId(int taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
}

@ -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<AssetBusinessFormCp
/**
* idid
*
* @param assetId id
* @return
*/
List<AssetBusinessFormCpPo> findByassetId(Long assetId);
/**
* idid
*
@ -31,7 +30,12 @@ public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCp
*/
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
/**
* taskid

@ -64,5 +64,14 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
* @return
*/
AssetCurrentCpPo findDwmc(Long id);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
}

@ -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<AssetEmailCpPo> {
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
/**
* taskid
*

@ -24,6 +24,17 @@ public interface AssetMiniProgramsCpService extends IService<AssetMiniProgramsCp
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
/**
* taskid
*

@ -23,6 +23,16 @@ public interface AssetOfficialAccountCpService extends IService<AssetOfficialAcc
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
/**
* taskid
*

@ -42,4 +42,13 @@ public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpPo
*/
void deletByAssetIdandTaskId(Long assetId, Integer taskId);
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
}

@ -33,6 +33,15 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpPo>
/**
* idid
*
* @param assetId id
*/
void deletByAssetId(Long assetId);
/**
* taskid
*

@ -32,6 +32,11 @@ public class AssetAppCpServiceImpl extends ServiceImpl<AssetAppCpMapper, AssetAp
}
@Override
public void deletByAssetId(Long assetId) {
assetAppCpMapper.deletByAssetId(assetId);
}
@Override
public List<AssetAppCpPo> findByTaskId(int taskId) {
return assetAppCpMapper.findByTaskId(taskId);

@ -147,14 +147,17 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> 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;
}

@ -36,5 +36,10 @@ public class AssetBasicNetworkCpServiceImpl extends ServiceImpl<AssetBasicNetWor
return assetBasicNetWorkCpMapper.findByTaskId(taskId);
}
@Override
public void deletByAssetId(Long assetId) {
assetBasicNetWorkCpMapper.deletByAssetId(assetId);
}
}

@ -31,6 +31,11 @@ public class AssetBusinessFormCpServiceImpl extends ServiceImpl<AssetBusinessFor
assetBusinessFormCpMapper.deletByAssetIdandTaskId(assetId,taskId);
}
@Override
public void deletByAssetId(Long assetId) {
assetBusinessFormCpMapper.deletByAssetId(assetId);
}
@Override
public List<AssetBusinessFormCpPo> findByTaskId(int taskId) {
return assetBusinessFormCpMapper.findByTaskId(taskId);

@ -51,6 +51,11 @@ public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper,
return baseMapper.findDwmc(id);
}
@Override
public void deletByAssetId(Long assetId) {
baseMapper.deletByAssetId(assetId);
}
}

@ -35,6 +35,11 @@ public class AssetEmailCpServiceImpl extends ServiceImpl<AssetEmailCpMapper, Ass
}
@Override
public void deletByAssetId(Long assetId) {
assetEmailCpMapper.deletByAssetId(assetId);
}
@Override
public List<AssetEmailCpPo> findByTaskId(int taskId) {
return assetEmailCpMapper.findByTaskId(taskId);

@ -148,14 +148,17 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetEmail.getDzyxhz());
if (assetTask != null) {
assetEmailCpService.deletByAssetIdandTaskId(assetEmail.getId(), null);
assetEmailCpService.deletByAssetId(assetEmail.getId());
} else {
//根据资产id查询旧资产
AssetEmailCpPo assetEmailCpPo = assetEmailCpService.findDwmc(assetEmail.getId());
assetEmailCpPo.setDzyxhz(assetEmail.getDzyxhz());
assetEmailCpPo.setTaskId(assetTask.getId());
//修改
assetEmailCpService.updateById(assetEmailCpPo);
if (assetEmailCpPo!=null){
assetEmailCpPo.setDzyxhz(assetEmail.getDzyxhz());
assetEmailCpPo.setTaskId(assetTask.getId());
//修改
assetEmailCpService.updateById(assetEmailCpPo);
}
}
return true;
}

@ -27,6 +27,11 @@ public class AssetMiniProgramsCpServiceImpl extends ServiceImpl<AssetMiniProgram
}
@Override
public void deletByAssetId(Long assetId) {
assetMiniProgramsCpMapper.deletByAssetId(assetId);
}
@Override
public List<AssetMiniProgramsCpPo> findByTaskId(int taskId) {
return assetMiniProgramsCpMapper.findByTaskId(taskId);

@ -137,14 +137,18 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetMiniPrograms.getXcxmc());
if (assetTask != null) {
assetMiniProgramsCpService.deletByAssetIdandTaskId(assetMiniPrograms.getId(), null);
assetMiniProgramsCpService.deletByAssetId(assetMiniPrograms.getId());
} else {
//根据资产id查询旧资产
AssetMiniProgramsCpPo assetMiniProgramsCpPo = assetMiniProgramsCpService.findDwmc(assetMiniPrograms.getId());
assetMiniProgramsCpPo.setXcxmc(assetMiniPrograms.getXcxmc());
assetMiniProgramsCpPo.setTaskId(assetTask.getId());
if (assetMiniProgramsCpPo!=null){
assetMiniProgramsCpPo.setXcxmc(assetMiniPrograms.getXcxmc());
assetMiniProgramsCpPo.setTaskId(assetTask.getId());
assetMiniProgramsCpService.updateById(assetMiniProgramsCpPo);
}
//修改
assetMiniProgramsCpService.updateById(assetMiniProgramsCpPo);
}
return true;
}

@ -36,6 +36,11 @@ public class AssetOfficialAccountCpServiceImpl extends ServiceImpl<AssetOfficial
}
@Override
public void deletByAssetId(Long assetId) {
assetOfficialAccountCpMapper.deletByAssetId(assetId);
}
@Override
public List<AssetOfficialAccountCpPo> findByTaskId(int taskId) {
return assetOfficialAccountCpMapper.findByTaskId(taskId);

@ -183,14 +183,17 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetOfficialAccount.getGzhmc());
if (assetTask != null) {
assetOfficialAccountCpService.deletByAssetIdandTaskId(assetOfficialAccount.getId(), null);
assetOfficialAccountCpService.deletByAssetId(assetOfficialAccount.getId());
} else {
//根据资产id查询旧资产
AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findDwmc(assetOfficialAccount.getId());
assetOfficialAccountCpPo.setGzhmc(assetOfficialAccount.getGzhmc());
assetOfficialAccountCpPo.setTaskId(assetTask.getId());
//修改
assetOfficialAccountCpService.updateById(assetOfficialAccountCpPo);
if (assetOfficialAccountCpPo!=null){
assetOfficialAccountCpPo.setGzhmc(assetOfficialAccount.getGzhmc());
assetOfficialAccountCpPo.setTaskId(assetTask.getId());
//修改
assetOfficialAccountCpService.updateById(assetOfficialAccountCpPo);
}
}
return true;
}

@ -35,4 +35,9 @@ public class AssetSupplyChainCpServiceImpl extends ServiceImpl<AssetSupplyChainC
public void deletByAssetIdandTaskId(Long assetId, Integer taskId) {
assetSupplyChainCpMapper.deletByAssetIdandTaskId(assetId,taskId);
}
@Override
public void deletByAssetId(Long assetId) {
assetSupplyChainCpMapper.deletByAssetId(assetId);
}
}

@ -404,9 +404,15 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
String[] s3 = byId.getCdlx().split("\\|");
for (int i = 0; i < s1.length; i++) {
AssetOfficialAccountMenu as = new AssetOfficialAccountMenu();
as.setCdmc(s1[i]);
as.setCdlj(s2[i]);
as.setCdlx(s3[i]);
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);
@ -589,7 +595,6 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
//创建任务流程
ifCq(req, assetTask);
getTaskStatus(req);
if (req.getBtgyy()!=null){
assetTaskDao.appsh(req);
}else{

@ -30,6 +30,11 @@ public class UnitOtherConcatCpServiceImpl extends ServiceImpl<UnitOtherConcatCpM
unitOtherConcatCpMapper.deletByAssetIdandTaskId(assetId,taskId);
}
@Override
public void deletByAssetId(Long assetId) {
unitOtherConcatCpMapper.deletByAssetId(assetId);
}
@Override
public List<UnitOtherConcatCpPo> findByTaskId(int taskId) {
return unitOtherConcatCpMapper.findByTaskId(taskId);

Loading…
Cancel
Save