根据委托id数组,查询委托表数据
This commit is contained in:
@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目委托信息controller
|
||||
@ -281,5 +282,18 @@ public class ProjectEntrustController{
|
||||
|
||||
return BaseResponse.success(projectEntrustService.deleteProjectEntrust(ebpProjectId,reason));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据委托id数组,查询委托表数据
|
||||
*
|
||||
* @param ids 委托单ids
|
||||
*
|
||||
* @return 返回结果
|
||||
*/
|
||||
@ApiOperation("根据委托id数组,查询委托表数据")
|
||||
@PostMapping("/getEntrustList")
|
||||
public BaseResponse<List<ProjectEntrustVO>> getEntrustList(@ApiParam(value = "委托单id数组", required = true) @RequestBody List<String> ids){
|
||||
return BaseResponse.success(projectEntrustService.getEntrustList(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ProjectEntrust;
|
||||
import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ProjectEntrustVO;
|
||||
import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ebpentity.PurpImplementSendVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对数据表 biz_project_entrust 操作的 service
|
||||
* @author daixc
|
||||
@ -100,4 +102,12 @@ public interface IProjectEntrustService extends IBaseService<ProjectEntrust>{
|
||||
* @return 返回结果
|
||||
*/
|
||||
boolean deleteProjectEntrust(Long ebpProjectId,String reason);
|
||||
|
||||
|
||||
/**
|
||||
* 根据委托单ids,批量查询委托单数据
|
||||
* @param ids 委托单ids
|
||||
* @return 返回结果
|
||||
*/
|
||||
List<ProjectEntrustVO> getEntrustList(List<String> ids);
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@ -547,6 +548,16 @@ public class ProjectEntrustServiceImpl extends BaseServiceImpl<ProjectEntrustMap
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<ProjectEntrustVO> getEntrustList(List<String> ids) {
|
||||
List<ProjectEntrust> list = this.list(new LambdaQueryWrapper<ProjectEntrust>().in(ProjectEntrust::getId, ids));
|
||||
List<ProjectEntrustVO> returnList = new ArrayList<>();
|
||||
list.forEach(p -> returnList.add(BeanUtil.toBean(p, ProjectEntrustVO.class)));
|
||||
return returnList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出始化项目辅助相关信息
|
||||
* @param projectEntrustVO 插入信息
|
||||
|
Reference in New Issue
Block a user