|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.jeeplus.business.project.domain.JyProject;
|
|
import com.jeeplus.business.project.domain.JyProject;
|
|
import com.jeeplus.business.project.domain.JyProjectOutinstance;
|
|
import com.jeeplus.business.project.domain.JyProjectOutinstance;
|
|
@@ -401,34 +402,37 @@ public class SignetService {
|
|
public SignetDTO findById(String id) {
|
|
public SignetDTO findById(String id) {
|
|
SignetDTO signetDTO = new SignetDTO();
|
|
SignetDTO signetDTO = new SignetDTO();
|
|
SignetDTO dto = signetMapper.findById(id);
|
|
SignetDTO dto = signetMapper.findById(id);
|
|
- BeanUtils.copyProperties(dto, signetDTO);
|
|
|
|
- //查询项目信息
|
|
|
|
- if (StringUtils.isNotBlank(dto.getProjectId())){
|
|
|
|
- String[] split = dto.getProjectId().split(",");
|
|
|
|
- ArrayList<JyProject> signetDTOS = new ArrayList<>();
|
|
|
|
- for (String s : split) {
|
|
|
|
- JyProject jyProject=jyProjectMapper.getById(s);
|
|
|
|
- signetDTOS.add(jyProject);
|
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(dto)){
|
|
|
|
+ BeanUtils.copyProperties(dto, signetDTO);
|
|
|
|
+ //查询项目信息
|
|
|
|
+ if (StringUtils.isNotBlank(dto.getProjectId())){
|
|
|
|
+ String[] split = dto.getProjectId().split(",");
|
|
|
|
+ ArrayList<JyProject> signetDTOS = new ArrayList<>();
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ JyProject jyProject=jyProjectMapper.getById(s);
|
|
|
|
+ signetDTOS.add(jyProject);
|
|
|
|
+ }
|
|
|
|
+ signetDTO.setProjectList(signetDTOS);
|
|
}
|
|
}
|
|
- signetDTO.setProjectList(signetDTOS);
|
|
|
|
- }
|
|
|
|
- List<String> stringList = new ArrayList<>();
|
|
|
|
- if (StringUtils.isNotBlank(dto.getType())){
|
|
|
|
- stringList.add(dto.getFirstType());
|
|
|
|
- stringList.add(dto.getType());
|
|
|
|
- }else {
|
|
|
|
- stringList.add(dto.getFirstType());
|
|
|
|
- }
|
|
|
|
- signetDTO.setTypes(stringList);
|
|
|
|
- signetDTO.setCreateById(dto.getCreateById());
|
|
|
|
- // 查询附件信息
|
|
|
|
- List<WorkAttachmentInfo> files = jyWorkContractInfoMapper.findDtos(id);
|
|
|
|
- if (CollectionUtils.isNotEmpty(files)) {
|
|
|
|
- for (WorkAttachmentInfo i : files) {
|
|
|
|
- i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
|
|
|
|
|
|
+ List<String> stringList = new ArrayList<>();
|
|
|
|
+ if (StringUtils.isNotBlank(dto.getType())){
|
|
|
|
+ stringList.add(dto.getFirstType());
|
|
|
|
+ stringList.add(dto.getType());
|
|
|
|
+ }else {
|
|
|
|
+ stringList.add(dto.getFirstType());
|
|
|
|
+ }
|
|
|
|
+ signetDTO.setTypes(stringList);
|
|
|
|
+ signetDTO.setCreateById(dto.getCreateById());
|
|
|
|
+ // 查询附件信息
|
|
|
|
+ List<WorkAttachmentInfo> files = jyWorkContractInfoMapper.findDtos(id);
|
|
|
|
+ if (CollectionUtils.isNotEmpty(files)) {
|
|
|
|
+ for (WorkAttachmentInfo i : files) {
|
|
|
|
+ i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
|
|
|
|
+ }
|
|
|
|
+ signetDTO.setFiles(files);
|
|
}
|
|
}
|
|
- signetDTO.setFiles(files);
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
return signetDTO;
|
|
return signetDTO;
|
|
}
|
|
}
|
|
|
|
|