|
|
@ -18,15 +18,19 @@ import com.tduck.cloud.common.util.AddressUtils; |
|
|
|
import com.tduck.cloud.common.util.AsyncProcessUtils; |
|
|
|
import com.tduck.cloud.common.util.RedisUtils; |
|
|
|
import com.tduck.cloud.common.util.Result; |
|
|
|
import com.tduck.cloud.project.entity.PrUserProjectResultExtEntity; |
|
|
|
import com.tduck.cloud.project.entity.UserProjectItemEntity; |
|
|
|
import com.tduck.cloud.project.entity.UserProjectResultEntity; |
|
|
|
import com.tduck.cloud.project.entity.enums.ProjectItemTypeEnum; |
|
|
|
import com.tduck.cloud.project.entity.struct.UploadResultStruct; |
|
|
|
import com.tduck.cloud.project.mapper.PrUserProjectResultExtDao; |
|
|
|
import com.tduck.cloud.project.mapper.UserProjectResultMapper; |
|
|
|
import com.tduck.cloud.project.request.QueryProjectResultRequest; |
|
|
|
import com.tduck.cloud.project.service.PrUserProjectResultExtService; |
|
|
|
import com.tduck.cloud.project.service.UserProjectItemService; |
|
|
|
import com.tduck.cloud.project.service.UserProjectResultService; |
|
|
|
import com.tduck.cloud.project.vo.ExportProjectResultVO; |
|
|
|
import com.tduck.cloud.project.vo.PrUserProjectResultExtDTO; |
|
|
|
import com.tduck.cloud.storage.cloud.OssStorageFactory; |
|
|
|
import com.tduck.cloud.storage.util.StorageUtils; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
@ -52,6 +56,8 @@ public class UserProjectResultServiceImpl extends ServiceImpl<UserProjectResultM |
|
|
|
|
|
|
|
private final UserProjectItemService userProjectItemService; |
|
|
|
private final RedisUtils redisUtils; |
|
|
|
private final PrUserProjectResultExtService prUserProjectResultExtService; |
|
|
|
private final PrUserProjectResultExtDao prUserProjectResultExtDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* 需要处理类型 |
|
|
@ -66,7 +72,17 @@ public class UserProjectResultServiceImpl extends ServiceImpl<UserProjectResultM |
|
|
|
entity.setSerialNumber(redisUtils.incr(StrUtil.format(PROJECT_RESULT_NUMBER, projectKey), CommonConstants.ConstantNumber.ONE)); |
|
|
|
entity.setSubmitAddress(AddressUtils.getRealAddressByIP(entity.getSubmitRequestIp())); |
|
|
|
this.save(entity); |
|
|
|
|
|
|
|
//填写问卷人员信息表新增数据
|
|
|
|
PrUserProjectResultExtEntity extEntity = new PrUserProjectResultExtEntity(); |
|
|
|
extEntity.setProjectKey(entity.getProjectKey()); |
|
|
|
extEntity.setUserProjectResult(entity.getId()); |
|
|
|
extEntity.setClientType(entity.getClientType()); |
|
|
|
extEntity.setUserId(entity.getUserId()); |
|
|
|
extEntity.setRealName(entity.getRealName()); |
|
|
|
extEntity.setOrgId(entity.getOrgId()); |
|
|
|
extEntity.setOrgName(entity.getOrgName()); |
|
|
|
extEntity.setOrgType(entity.getOrgType()); |
|
|
|
prUserProjectResultExtService.save(extEntity); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -87,7 +103,18 @@ public class UserProjectResultServiceImpl extends ServiceImpl<UserProjectResultM |
|
|
|
lambdaQueryWrapper.apply(StrUtil.format("original_data ->'$.{}' {} {} ", item, queryComparison.getKey(), value)); |
|
|
|
}); |
|
|
|
} |
|
|
|
return this.page(request.toMybatisPage(), lambdaQueryWrapper); |
|
|
|
Page page = this.page(request.toMybatisPage(), lambdaQueryWrapper); |
|
|
|
List<UserProjectResultEntity> resultEntity = (List<UserProjectResultEntity>) page.getRecords(); |
|
|
|
List<PrUserProjectResultExtDTO> extList = prUserProjectResultExtDao.selectResultExtList(request.getProjectKey()); |
|
|
|
resultEntity.forEach(re -> extList.stream().filter(l -> re.getId().equals(l.getUserProjectResult())).forEach(s -> { |
|
|
|
re.setClientType(s.getClientType()); |
|
|
|
re.setRealName(s.getRealName()); |
|
|
|
re.setOrgId(s.getOrgId()); |
|
|
|
re.setOrgName(s.getOrgName()); |
|
|
|
re.setOrgType(s.getOrgType()); |
|
|
|
})); |
|
|
|
page.setRecords(resultEntity); |
|
|
|
return page; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|