mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
排单查询的过滤参数
This commit is contained in:
-52
@@ -1,12 +1,6 @@
|
|||||||
package com.cf.imes.module.executor.controller.admin.plan;
|
package com.cf.imes.module.executor.controller.admin.plan;
|
||||||
|
|
||||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
|
|
||||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
|
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
|
||||||
import com.cf.imes.module.executor.service.order.OrderInputProcessor;
|
|
||||||
import com.cf.imes.module.executor.util.RandomUtils;
|
|
||||||
import com.cf.imes.module.executor.util.deviseData.Detail;
|
|
||||||
import com.cf.imes.module.executor.util.deviseData.IBoardProdInfo;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -14,23 +8,18 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
import javax.servlet.http.*;
|
import javax.servlet.http.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import com.cf.imes.framework.common.pojo.PageParam;
|
import com.cf.imes.framework.common.pojo.PageParam;
|
||||||
import com.cf.imes.framework.common.pojo.PageResult;
|
import com.cf.imes.framework.common.pojo.PageResult;
|
||||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
import com.cf.imes.framework.excel.core.util.ExcelUtils;
|
import com.cf.imes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
||||||
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
import com.cf.imes.module.executor.controller.admin.plan.vo.*;
|
import com.cf.imes.module.executor.controller.admin.plan.vo.*;
|
||||||
import com.cf.imes.module.executor.service.plan.PlanService;
|
import com.cf.imes.module.executor.service.plan.PlanService;
|
||||||
|
|
||||||
@@ -43,9 +32,6 @@ public class PlanController {
|
|||||||
@Resource
|
@Resource
|
||||||
private PlanService planService;
|
private PlanService planService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private OrderInputProcessor orderInputProcessor;
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建排单")
|
@Operation(summary = "创建排单")
|
||||||
@PreAuthorize("@ss.hasPermission('executor:plan:create')")
|
@PreAuthorize("@ss.hasPermission('executor:plan:create')")
|
||||||
@@ -156,42 +142,4 @@ public class PlanController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("test")
|
|
||||||
@Operation(summary = "test")
|
|
||||||
public Boolean test() {
|
|
||||||
ArrayList<Detail> details = new ArrayList<>();
|
|
||||||
for (int i = 0; i < 20; i++) {
|
|
||||||
Detail detail = RandomUtils.randomPojo(Detail.class);
|
|
||||||
IBoardProdInfo iBoardProdInfo = detail.getIBoardProdInfo();
|
|
||||||
iBoardProdInfo.setRawGoodsId(999L);
|
|
||||||
iBoardProdInfo.setGoodsName("abc");
|
|
||||||
iBoardProdInfo.setMaterial("ccc");
|
|
||||||
iBoardProdInfo.setColor("blue");
|
|
||||||
iBoardProdInfo.setBrand("xxx");
|
|
||||||
iBoardProdInfo.setSpec("xxxx");
|
|
||||||
iBoardProdInfo.setGoodType(1);
|
|
||||||
iBoardProdInfo.setWidth((float) 0.0);
|
|
||||||
iBoardProdInfo.setHeight((float) 0.0);
|
|
||||||
iBoardProdInfo.setThickness(5.0);
|
|
||||||
iBoardProdInfo.setSplitWidth(1);
|
|
||||||
iBoardProdInfo.setSplitHeight(1);
|
|
||||||
iBoardProdInfo.setSplitThickness(2);
|
|
||||||
iBoardProdInfo.setSealUp((float) 0.0);
|
|
||||||
iBoardProdInfo.setSealLeft((float) 0.0);
|
|
||||||
iBoardProdInfo.setSealRight((float) 0.0);
|
|
||||||
iBoardProdInfo.setSealDown((float) 0.0);
|
|
||||||
iBoardProdInfo.setTexture(1);
|
|
||||||
iBoardProdInfo.setOpenDoorType(1);
|
|
||||||
iBoardProdInfo.setTypographicFace(1);
|
|
||||||
detail.setMultiNum(23);
|
|
||||||
detail.setDepth(10.0);
|
|
||||||
detail.setHeight(9.0);
|
|
||||||
detail.getContourDetail().forEach(e->e.setTypographicFace(1));
|
|
||||||
detail.getSideModelDetail().forEach(e->e.setTypographicFace(1));
|
|
||||||
details.add(detail);
|
|
||||||
}
|
|
||||||
orderInputProcessor.input(details, 999L);
|
|
||||||
return Boolean.TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
@@ -3,11 +3,13 @@ package com.cf.imes.module.executor.controller.admin.plan.vo;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Beal
|
* @author Beal
|
||||||
*/
|
*/
|
||||||
|
@Valid
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "")
|
@Schema(description = "")
|
||||||
public class GetSourceDataReq {
|
public class GetSourceDataReq {
|
||||||
@@ -20,9 +22,11 @@ public class GetSourceDataReq {
|
|||||||
private Long dataSourceId;
|
private Long dataSourceId;
|
||||||
|
|
||||||
@Schema(description = "排单id")
|
@Schema(description = "排单id")
|
||||||
|
@NotNull(message = "排单id不能空")
|
||||||
private Long planId;
|
private Long planId;
|
||||||
|
|
||||||
@Schema(description = "包裹id")
|
@Schema(description = "包裹id")
|
||||||
|
@NotNull(message = "包裹id不能空")
|
||||||
private Long packageId;
|
private Long packageId;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -220,7 +220,11 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
List<PlateDO> plateDOS = plateMapper.selectList(new LambdaQueryWrapperX<PlateDO>().in(PlateDO::getGoodsId, goodsDOS.stream().map(GoodsDO::getGoodsId).collect(Collectors.toSet())));
|
List<PlateDO> plateDOS = plateMapper.selectList(new LambdaQueryWrapperX<PlateDO>().in(PlateDO::getGoodsId, goodsDOS.stream().map(GoodsDO::getGoodsId).collect(Collectors.toSet())));
|
||||||
PageResult<PlanRespVO> planRespVOPageResult = BeanUtils.toBean(planDOPageResult, PlanRespVO.class);
|
PageResult<PlanRespVO> planRespVOPageResult = BeanUtils.toBean(planDOPageResult, PlanRespVO.class);
|
||||||
planRespVOPageResult.getList().forEach(e -> {
|
planRespVOPageResult.getList().forEach(e -> {
|
||||||
e.setMachineName(machines.stream().filter(f -> Objects.equals(f.getId(), e.getMachineId())).map(CuttingRespDTO::getName).findAny().orElse(null));
|
e.setMachineName(machines.stream()
|
||||||
|
.filter(f -> Objects.equals(f.getId(), e.getMachineId()))
|
||||||
|
.map(CuttingRespDTO::getName)
|
||||||
|
.findAny()
|
||||||
|
.orElse(null));
|
||||||
e.setPlateInfoList(goodsDOS.stream()
|
e.setPlateInfoList(goodsDOS.stream()
|
||||||
.filter(f -> Objects.equals(f.getOrderId(), e.getId()))
|
.filter(f -> Objects.equals(f.getOrderId(), e.getId()))
|
||||||
.map(p -> PlateInfoVO.builder()
|
.map(p -> PlateInfoVO.builder()
|
||||||
@@ -244,17 +248,16 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
QueryWrapperX<OrderDO> queryWrapperX = new QueryWrapperX<>();
|
QueryWrapperX<OrderDO> queryWrapperX = new QueryWrapperX<>();
|
||||||
queryWrapperX
|
queryWrapperX
|
||||||
.isNull("opi.id")
|
.isNull("opi.id")
|
||||||
.eqIfPresent("customer", pageReqVO.getConsignee())
|
.eqIfPresent("a.customer", pageReqVO.getConsignee())
|
||||||
.eqIfPresent("custom_order_no", pageReqVO.getDefaultId())
|
.eqIfPresent("a.custom_order_no", pageReqVO.getDefaultId())
|
||||||
.eqIfPresent("address", pageReqVO.getConsigneeAddress())
|
.eqIfPresent("a.address", pageReqVO.getConsigneeAddress())
|
||||||
.eqIfPresent("custom_order_no", pageReqVO.getDefaultId())
|
|
||||||
.betweenIfPresent("a.create_time", pageReqVO.getCreateTime())
|
.betweenIfPresent("a.create_time", pageReqVO.getCreateTime())
|
||||||
.eqIfPresent("op.is_special_shaped", pageReqVO.getSpecialShaped())
|
.eqIfPresent("op.is_special_shaped", pageReqVO.getSpecialShaped())
|
||||||
.eqIfPresent("op.is_sculpt", pageReqVO.getSculpt())
|
.eqIfPresent("op.is_sculpt", pageReqVO.getSculpt())
|
||||||
.eqIfPresent("op.is_door", pageReqVO.getIsDoor())
|
.eqIfPresent("op.is_door", pageReqVO.getIsDoor())
|
||||||
.betweenIfPresent("op.height", new BigDecimal[]{pageReqVO.getLongMinRang(), pageReqVO.getLongMaxRang()})
|
.betweenIfPresent("op.height", new BigDecimal[]{pageReqVO.getLongMinRang(), pageReqVO.getLongMaxRang()})
|
||||||
.betweenIfPresent("op.width", new BigDecimal[]{pageReqVO.getWidthMinRang(), pageReqVO.getWidthMaxRang()} )
|
.betweenIfPresent("op.width", new BigDecimal[]{pageReqVO.getWidthMinRang(), pageReqVO.getWidthMaxRang()})
|
||||||
;
|
.orderByDesc("a.create_time");
|
||||||
List<Integer> filterTypes = new ArrayList<>();
|
List<Integer> filterTypes = new ArrayList<>();
|
||||||
if (Objects.nonNull(pageReqVO.getHoleThrough()) && pageReqVO.getHoleThrough()) {
|
if (Objects.nonNull(pageReqVO.getHoleThrough()) && pageReqVO.getHoleThrough()) {
|
||||||
filterTypes.add(1);
|
filterTypes.add(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user