Commit 7754d13252320cb3f36b92f6b76bc0bd3a548b7c

Authored by 杨鸣坤
1 parent 70fb645e

楚江ERP:合同列表审核按钮展示逻辑调整

... ... @@ -156,12 +156,18 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut
156 156 private String standardApprovedName;
157 157
158 158 /**
159   - * 是否展示审核按钮(非持久化字段)
  159 + * 是否展示正式合同审核按钮(非持久化字段)
160 160 */
161   - @ApiModelProperty(value = "是否展示审核按钮")
  161 + @ApiModelProperty(value = "是否展示正式合同审核按钮")
162 162 private Boolean showExamine;
163 163
164 164 /**
  165 + * 是否展示标准合同审核按钮(非持久化字段)
  166 + */
  167 + @ApiModelProperty(value = "是否展示标准合同审核按钮")
  168 + private Boolean standardShowExamine;
  169 +
  170 + /**
165 171 * 发货状态
166 172 */
167 173 @ApiModelProperty(value = "发货状态")
... ...
... ... @@ -294,9 +294,15 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto {
294 294 private BigDecimal totalAmountIncludingTax;
295 295
296 296 /**
297   - * 是否展示审核按钮(非持久化字段)
  297 + * 是否展示正式合同审核按钮(非持久化字段)
298 298 */
299 299 @TableField(exist = false)
300 300 private Boolean showExamine;
301 301
  302 +
  303 + /**
  304 + * 是否展示标准合同审核按钮(非持久化字段)
  305 + */
  306 + @TableField(exist = false)
  307 + private Boolean standardShowExamine;
302 308 }
... ...
... ... @@ -80,11 +80,17 @@ public class ContractDistributorStandardServiceImpl extends
80 80 return PageResultUtil.convert(new PageInfo<>(datas));
81 81 }
82 82
83   - Set<String> ids = flowTaskList.stream()
  83 + Set<String> formalContractIds = flowTaskList.stream()
  84 + .filter(flowTaskDto -> FORMAL_FLAG.equals(flowTaskDto.getMode()))
  85 + .map(FlowTaskDto::getBusinessId)
  86 + .collect(Collectors.toSet());
  87 + Set<String> standardContractIds = flowTaskList.stream()
  88 + .filter(flowTaskDto -> STANDARD_FLAG.equals(flowTaskDto.getMode()))
84 89 .map(FlowTaskDto::getBusinessId)
85 90 .collect(Collectors.toSet());
86 91 for (ContractDistributorStandard standard : datas) {
87   - standard.setShowExamine(ids.contains(standard.getId()));
  92 + standard.setShowExamine(formalContractIds.contains(standard.getId()));
  93 + standard.setStandardShowExamine(standardContractIds.contains(standard.getId()));
88 94 }
89 95
90 96 return PageResultUtil.convert(new PageInfo<>(datas));
... ...