Compare commits
No commits in common. "a5d04d067d53f9f7d947a7e9c8879ab26a5aa17a" and "e3ff8ca9ff2d51ae3c5f55daea9c0d43c9670746" have entirely different histories.
a5d04d067d
...
e3ff8ca9ff
|
|
@ -26,7 +26,10 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -1100,7 +1103,7 @@ public class IncomingInspectionTaskControllerService {
|
|||
if (StrUtil.isNotBlank(data.getImageIds())) {
|
||||
dataVO.setImages(
|
||||
fileUploadRecordService.lambdaQuery()
|
||||
.in(FileUploadRecord::getId, Arrays.stream(StrUtil.splitToLong(data.getImageIds(), ",")).boxed().toList())
|
||||
.in(FileUploadRecord::getId, StrUtil.split(data.getImageIds(), ","))
|
||||
.list()
|
||||
.stream()
|
||||
.map(file -> new FileUploadVO()
|
||||
|
|
|
|||
|
|
@ -63,11 +63,6 @@ public class QmsSamplingPlanControllerService {
|
|||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void add(@Valid QmsSamplingPlanAddQO request) {
|
||||
VUtil.trueThrowBusinessError(samplingPlanService.lambdaQuery()
|
||||
.eq(QmsSamplingPlan::getPlanName, request.getPlanName())
|
||||
.exists()
|
||||
).throwMessage("方案名称已存在");
|
||||
|
||||
String operator = UserUtil.getUserName();
|
||||
Long operatorId = UserUtil.getUserId();
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
|
@ -193,12 +188,6 @@ public class QmsSamplingPlanControllerService {
|
|||
public void edit(@Valid QmsSamplingPlanEditQO request) {
|
||||
Long planId = request.getId();
|
||||
|
||||
VUtil.trueThrowBusinessError(samplingPlanService.lambdaQuery()
|
||||
.eq(QmsSamplingPlan::getPlanName, request.getPlanName())
|
||||
.ne(QmsSamplingPlan::getId, planId)
|
||||
.exists()
|
||||
).throwMessage("方案名称已存在");
|
||||
|
||||
// 0. 验证抽样方案是否存在
|
||||
QmsSamplingPlan existPlan = samplingPlanService.getById(planId);
|
||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(existPlan)).throwMessage("抽样方案不存在");
|
||||
|
|
@ -403,11 +392,10 @@ public class QmsSamplingPlanControllerService {
|
|||
Page<QmsSamplingPlan> page = new Page<>(request.getPage(), request.getPageSize());
|
||||
|
||||
var query = samplingPlanService.lambdaQuery()
|
||||
.eq(request.getPublishStatus() != null, QmsSamplingPlan::getPublishStatus, request.getPublishStatus())
|
||||
.ge(request.getStartDate() != null, QmsSamplingPlan::getCreateTime, request.getStartDate())
|
||||
.le(request.getEndDate() != null, QmsSamplingPlan::getCreateTime, request.getEndDate())
|
||||
.like(StrUtil.isNotBlank(request.getPlanCode()), QmsSamplingPlan::getPlanCode, request.getPlanCode())
|
||||
.like(StrUtil.isNotBlank(request.getPlanName()), QmsSamplingPlan::getPlanName, request.getPlanName())
|
||||
.ge(request.getStartDate() != null, QmsSamplingPlan::getCreateTime, request.getStartDate())
|
||||
.le(request.getEndDate() != null, QmsSamplingPlan::getCreateTime, request.getEndDate())
|
||||
.orderByAsc(QmsSamplingPlan::getPublishStatus)
|
||||
.orderByDesc(QmsSamplingPlan::getId);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import com.nflg.wms.common.pojo.vo.FileUploadVO;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -27,6 +26,5 @@ public class QmsIncomingInspectionTaskTodoCheckSubmitItemDataQO {
|
|||
/**
|
||||
* 图片列表
|
||||
*/
|
||||
@Valid
|
||||
private List<FileUploadVO> images;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,4 @@ public class QmsSamplingPlanSearchQO extends SearchBaseQO {
|
|||
* 方案名称
|
||||
*/
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 发布状态:0-未发布,1-已发布,2-已撤回
|
||||
*/
|
||||
private Short publishStatus;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue