提交 79b43390 作者: zhenjie

需求更新

上级 926ff8ff
...@@ -25,9 +25,18 @@ public class RequirementsInfoVO implements Serializable { ...@@ -25,9 +25,18 @@ public class RequirementsInfoVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class}) @NotNull(message = "id不能为空", groups = {Update.class})
private Integer id; private Integer id;
@ApiModelProperty(value = "省份编码", required = false)
@NotNull(message = "省份编码不能为空", groups = {Insert.class})
private Integer provinceCode;
@ApiModelProperty(value = "市编码", required = false)
private Integer cityCode;
@ApiModelProperty(value = "区编码", required = false)
private Integer districtCode;
@ApiModelProperty(value = "需求类型id") @ApiModelProperty(value = "需求类型id")
@NotNull(message = "需求类型id不能为空", groups = {Insert.class}) @NotNull(message = "需求类型id不能为空", groups = {Insert.class})
private Integer requirementTypeId; private Integer requirementTypeId;
@ApiModelProperty(value = "需求类型名称")
private String requirementTypeName;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
@NotNull(message = "用户id不能为空", groups = {Insert.class}) @NotNull(message = "用户id不能为空", groups = {Insert.class})
private Integer userAccountId; private Integer userAccountId;
......
...@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -75,6 +76,10 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -75,6 +76,10 @@ public class RequirementsServiceImpl implements RequirementsService {
industryCaseQO.buildCurrentPage(); industryCaseQO.buildCurrentPage();
List<RequirementsInfoDO> requirementsInfoDOList = requirementsDao.listPublishPage(industryCaseQO); List<RequirementsInfoDO> requirementsInfoDOList = requirementsDao.listPublishPage(industryCaseQO);
List<RequirementsInfoVO> requirementsInfoVOS = requirementsInfoDOList.stream().map(RequirementsInfoDO::buildRequirementsInfoVO).collect(Collectors.toList()); List<RequirementsInfoVO> requirementsInfoVOS = requirementsInfoDOList.stream().map(RequirementsInfoDO::buildRequirementsInfoVO).collect(Collectors.toList());
Map<Integer, String> collect = requirementsDao.listType().stream().collect(Collectors.toMap(RequirementsTypeDO::getId, d -> d.getTypeName()));
for (RequirementsInfoVO requirementsInfoVO : requirementsInfoVOS) {
requirementsInfoVO.setRequirementTypeName(collect.get(requirementsInfoVO.getRequirementTypeId()));
}
return ResultBody.success(PageResult.buildPage(pageNo, industryCaseQO.getPageSize(), count, requirementsInfoVOS)); return ResultBody.success(PageResult.buildPage(pageNo, industryCaseQO.getPageSize(), count, requirementsInfoVOS));
} }
} }
...@@ -297,6 +297,8 @@ public class TenderServiceImpl implements TenderService { ...@@ -297,6 +297,8 @@ public class TenderServiceImpl implements TenderService {
pageList.forEach(d->{ pageList.forEach(d->{
if(applyTenderInfoIds.contains(d.getId())){ if(applyTenderInfoIds.contains(d.getId())){
d.setApply(1); d.setApply(1);
}else {
d.setApply(0);
} }
}); });
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论