|
@ -19,6 +19,7 @@ package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
|
|
import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
@ -3615,16 +3616,31 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 根据项目来源id, 删除项目主表,项目分类关系表 |
|
|
|
|
|
* @param originId |
|
|
|
|
|
* @param origin |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Override |
|
|
@Override |
|
|
public Integer deleteByOriginId(String originId, String origin) { |
|
|
public Integer deleteByOriginId(String originId, String origin) { |
|
|
LambdaUpdateWrapper<ProjectEntity> wrapper = new LambdaUpdateWrapper(); |
|
|
LambdaQueryWrapper<ProjectEntity> queryWrapper = new LambdaQueryWrapper(); |
|
|
wrapper.eq(ProjectEntity::getOriginId, originId) |
|
|
queryWrapper.eq(ProjectEntity::getOriginId, originId) |
|
|
.eq(ProjectEntity::getOrigin,origin) |
|
|
.eq(ProjectEntity::getOrigin, origin); |
|
|
.set(ProjectEntity::getUpdatedTime,new Date()) |
|
|
ProjectEntity projectEntity = baseDao.selectOne(queryWrapper); |
|
|
.set(ProjectEntity::getUpdatedBy,loginUserUtil.getLoginUserId()) |
|
|
if (null != projectEntity) { |
|
|
.set(ProjectEntity::getDelFlag,NumConstant.ONE_STR); |
|
|
Date nowTime = new Date(); |
|
|
return baseDao.update(null, wrapper); |
|
|
LambdaUpdateWrapper<ProjectEntity> wrapper = new LambdaUpdateWrapper(); |
|
|
|
|
|
wrapper.eq(ProjectEntity::getId, projectEntity.getId()) |
|
|
|
|
|
.set(ProjectEntity::getUpdatedTime, nowTime) |
|
|
|
|
|
.set(ProjectEntity::getUpdatedBy, loginUserUtil.getLoginUserId()) |
|
|
|
|
|
.set(ProjectEntity::getDelFlag, NumConstant.ONE_STR); |
|
|
|
|
|
baseDao.update(null, wrapper); |
|
|
|
|
|
projectCategoryService.delByProjectId(projectEntity.getId(), loginUserUtil.getLoginUserId(), nowTime); |
|
|
|
|
|
return 1; |
|
|
|
|
|
} |
|
|
|
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|