master
tianxinlei 2026-05-26 15:10:37 +08:00
parent 0324c89274
commit 446d02f0cc
2 changed files with 10 additions and 8 deletions

View File

@ -11,6 +11,7 @@ import com.zcloud.safetyDutyList.domain.model.tasklist.TaskDetailE;
import com.zcloud.safetyDutyList.dto.clientobject.tasklist.*; import com.zcloud.safetyDutyList.dto.clientobject.tasklist.*;
import com.zcloud.safetyDutyList.dto.tasklist.FeedbackListQry; import com.zcloud.safetyDutyList.dto.tasklist.FeedbackListQry;
import com.zcloud.safetyDutyList.dto.tasklist.FeedbackPeriodGroupQry; import com.zcloud.safetyDutyList.dto.tasklist.FeedbackPeriodGroupQry;
import jodd.util.StringUtil;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -66,13 +67,15 @@ public class FeedbackQueryExe {
if (feedbackList == null || feedbackList.isEmpty()) { if (feedbackList == null || feedbackList.isEmpty()) {
return MultiResponse.of(new ArrayList<>()); return MultiResponse.of(new ArrayList<>());
} }
List<FeedbackCO> coList = feedbackList.stream() List<FeedbackCO> coList = new ArrayList<>();
.filter(f -> qry.getFeedbackPeriodFlag().equals(f.getFeedbackPeriodFlag())) for (FeedbackE feedbackE : feedbackList) {
.map(f -> { if (!StringUtil.isEmpty(qry.getFeedbackPeriodFlag()) && !qry.getFeedbackPeriodFlag().equals(feedbackE.getFeedbackPeriodFlag())) {
continue;
}
FeedbackCO co = new FeedbackCO(); FeedbackCO co = new FeedbackCO();
BeanUtils.copyProperties(f, co); BeanUtils.copyProperties(feedbackE, co);
return co; coList.add(co);
}).collect(Collectors.toList()); }
return MultiResponse.of(coList); return MultiResponse.of(coList);
} }

View File

@ -16,6 +16,5 @@ public class FeedbackListQry {
@NotEmpty(message = "任务ID不能为空") @NotEmpty(message = "任务ID不能为空")
private String taskDetailId; private String taskDetailId;
@ApiModelProperty(value = "周期标识", required = true) @ApiModelProperty(value = "周期标识", required = true)
@NotEmpty(message = "周期标识不能为空")
private String feedbackPeriodFlag; private String feedbackPeriodFlag;
} }