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:
-34
@@ -1,34 +0,0 @@
|
||||
package com.cf.imes.module.executor.controller.admin.manage.pack.prePack;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "预打包的优化结构")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PrePackData {
|
||||
|
||||
|
||||
@Schema(description = "包裹编号")
|
||||
private String name;
|
||||
|
||||
|
||||
@Schema(description = "点的位置信息")
|
||||
private Double pointX;
|
||||
private Double pointY;
|
||||
|
||||
@Schema(description = "板材编号")
|
||||
private String plateNo;
|
||||
|
||||
@Schema(description = "板材宽度")
|
||||
private Long plateWidth;
|
||||
|
||||
@Schema(description = "板材高度")
|
||||
private Long plateHeight;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+15
@@ -35,6 +35,7 @@ import com.cf.imes.module.executor.util.fileConversion.admin.files.xml.XmlTypeRe
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -576,4 +577,18 @@ public class OrderController {
|
||||
return success(orderService.getOrderNear(pageParam));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getAllData")
|
||||
@Operation(summary = "获取生产单的所有数据")
|
||||
public CommonResult<OrderAllData> getOrderAllData(@Schema(description = "生产单id") @RequestParam(required = false) Long orderId,
|
||||
@Schema(description = "排单id") @RequestParam(required = false) Long planId) {
|
||||
|
||||
return CommonResult.success(orderService.getOrderAllData(orderId,planId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "标签对应的订单单头数据源信息")
|
||||
@Data
|
||||
public class LabelOrderData {
|
||||
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
|
||||
@Schema(description = "客户地址")
|
||||
private String address;
|
||||
|
||||
|
||||
@Schema(description = "客户电话")
|
||||
private String phoneNumber;
|
||||
|
||||
|
||||
@Schema(description = "经销商")
|
||||
private String dealer;
|
||||
|
||||
|
||||
@Schema(description = "经销商电话")
|
||||
private String dealerPhoneNumber;
|
||||
|
||||
|
||||
@Schema(description = "业务员")
|
||||
private String salesman;
|
||||
|
||||
|
||||
@Schema(description = "拆单员")
|
||||
private String splitter;
|
||||
|
||||
|
||||
@Schema(description = "生产单日期")
|
||||
private LocalDateTime orderDate;
|
||||
|
||||
|
||||
@Schema(description = "交付日期")
|
||||
private LocalDateTime deliveryDate;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Schema(description = "标签对应的订单包裹数据源信息")
|
||||
@Data
|
||||
public class LabelOrderPackData {
|
||||
|
||||
|
||||
@Schema(description = "生产单id")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "包裹号-包裹编号")
|
||||
private List<String> packageNo;
|
||||
|
||||
|
||||
@Schema(description = "包裹ID")
|
||||
private List<Long> packageId;
|
||||
|
||||
|
||||
@Schema(description = "包裹数量")
|
||||
private Integer packNum;
|
||||
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "标签对应的五金包裹数据源信息")
|
||||
@Data
|
||||
public class LabelOrderPartsData {
|
||||
|
||||
|
||||
@Schema(description = "配件ID")
|
||||
private Long partsId;
|
||||
|
||||
|
||||
@Schema(description = "生产单号")
|
||||
private Long orderNo;
|
||||
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String partsName;
|
||||
|
||||
|
||||
@Schema(description = "型号")
|
||||
private String model;
|
||||
|
||||
|
||||
@Schema(description = "厂家")
|
||||
private String factory;
|
||||
|
||||
|
||||
@Schema(description = "品牌")
|
||||
private String brand;
|
||||
|
||||
|
||||
@Schema(description = "规格")
|
||||
private String spec;
|
||||
|
||||
|
||||
@Schema(description = "数量")
|
||||
private String count;
|
||||
|
||||
|
||||
@Schema(description = "配件单位")
|
||||
private String partsUnit;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "标签对应的板材包裹数据源信息")
|
||||
@Data
|
||||
public class LabelOrderPlateData {
|
||||
|
||||
|
||||
@Schema(description = "板件ID")
|
||||
private Long plateId;
|
||||
|
||||
|
||||
@Schema(description = "房间ID")
|
||||
private Long roomGroupNo;
|
||||
|
||||
|
||||
@Schema(description = "房间名称")
|
||||
private String roomName;
|
||||
|
||||
|
||||
@Schema(description = "柜体ID")
|
||||
private Long bodyGroupNo;
|
||||
|
||||
|
||||
@Schema(description = "柜体名称")
|
||||
private String bodyName;
|
||||
|
||||
|
||||
@Schema(description = "生产单号")
|
||||
private Long orderId;
|
||||
|
||||
|
||||
@Schema(description = "板编号")
|
||||
private String plateNo;
|
||||
|
||||
|
||||
@Schema(description = "自定义板编号")
|
||||
private String customPlateNo;
|
||||
|
||||
|
||||
@Schema(description = "板名称")
|
||||
private String plateName;
|
||||
|
||||
|
||||
@Schema(description = "板颜色")
|
||||
private String plateColor;
|
||||
|
||||
|
||||
@Schema(description = "板材质")
|
||||
private String plateMaterial;
|
||||
|
||||
|
||||
@Schema(description = "板长")
|
||||
private Double plateLength;
|
||||
|
||||
|
||||
@Schema(description = "板宽")
|
||||
private Double plateWidth;
|
||||
|
||||
|
||||
@Schema(description = "板厚")
|
||||
private Double plateThickness;
|
||||
|
||||
|
||||
@Schema(description = "拆单宽度")
|
||||
private BigDecimal splitWidth;
|
||||
|
||||
|
||||
@Schema(description = "拆单高度")
|
||||
private BigDecimal splitHeight;
|
||||
|
||||
|
||||
@Schema(description = "拆单厚度")
|
||||
private BigDecimal splitThickness;
|
||||
|
||||
|
||||
@Schema(description = "左封边厚度")
|
||||
private BigDecimal sealLeft;
|
||||
|
||||
|
||||
@Schema(description = "右封边厚度")
|
||||
private BigDecimal sealRight;
|
||||
|
||||
|
||||
@Schema(description = "上封边厚度")
|
||||
private BigDecimal sealUp;
|
||||
|
||||
|
||||
@Schema(description = "下封边厚度")
|
||||
private BigDecimal sealDown;
|
||||
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String plateRemark;
|
||||
|
||||
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "生产单日期")
|
||||
private LocalDateTime orderDate;
|
||||
|
||||
|
||||
@Schema(description = "交付日期")
|
||||
private LocalDateTime deliveryDate;
|
||||
|
||||
|
||||
@Schema(description = "包裹号")
|
||||
private Long packageNo;
|
||||
|
||||
|
||||
@Schema(description = "包序号")
|
||||
private String packageSerialNo;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
|
||||
import com.cf.imes.module.executor.dal.dataobject.ordermodel.OrderModelDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.plan.PlanDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderAllData {
|
||||
|
||||
|
||||
@Schema(description = "排单数据")
|
||||
private PlanDO plan;
|
||||
|
||||
|
||||
@Schema(description = "生产单信息")
|
||||
private List<LabelOrderData> orderList;
|
||||
|
||||
|
||||
@Schema(description = "小板信息")
|
||||
private List<LabelOrderPlateData> plateDataList;
|
||||
|
||||
|
||||
@Schema(description = "小板造型列表")
|
||||
private List<OrderModelDO> plateModels;
|
||||
|
||||
|
||||
@Schema(description = "配件信息")
|
||||
private List<LabelOrderPartsData> partsDataList;
|
||||
|
||||
|
||||
@Schema(description = "包裹信息")
|
||||
private List<LabelOrderPackData> packDataList;
|
||||
|
||||
|
||||
}
|
||||
+6
-1
@@ -33,12 +33,15 @@ public class OrderSource {
|
||||
@Schema(description = "优化后的大板数据")
|
||||
private List<OptimizeBoardModelDO> optimizeBoardModelDOS;
|
||||
|
||||
@Schema(description = "优化后的余料板数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@Schema(description = "优化后的余料板数据")
|
||||
private List<OptimizeRemainPlate> optimizeRemainPlates;
|
||||
|
||||
|
||||
@Schema(description = "机台数据")
|
||||
private MachineDTO machineDTO;
|
||||
|
||||
|
||||
@Schema(description = "排单数据")
|
||||
private PlanDO plan;
|
||||
|
||||
@@ -50,9 +53,11 @@ public class OrderSource {
|
||||
@Schema(description = "大板板材列表-原板材的信息数据")
|
||||
private List<GoodsReqVO> goodsList;
|
||||
|
||||
|
||||
@Schema(description = "小板列表")
|
||||
private List<PlateDetailRespVO> plateList;
|
||||
|
||||
|
||||
@Schema(description = "小板造型列表")
|
||||
private List<OrderModelDO> plateModels;
|
||||
|
||||
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
package com.cf.imes.module.executor.controller.admin.plan.saveOptimize;
|
||||
|
||||
|
||||
import com.cf.imes.module.executor.controller.admin.plan.bo.OrderIds;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 未排单的大板的数据信息")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class NotPlanGoodsReqVO {
|
||||
|
||||
|
||||
// @Schema(description = "生产单ids")
|
||||
// private List<Long> orderIds;
|
||||
//
|
||||
// @Schema(description = "生产单的大板ids")
|
||||
// private List<Long> goodsIds;
|
||||
//
|
||||
//
|
||||
// @Schema(description = "板材库对应的大板ids")
|
||||
// private List<Long> plateGoodsIds;
|
||||
|
||||
|
||||
@Schema(description = "生产单和大板的信息")
|
||||
private List<OrderIds> orderIdList;
|
||||
|
||||
|
||||
@Schema(description = "排单类型:1 混单排单,2 生产单排单", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer type;
|
||||
|
||||
|
||||
@Schema(description = "混单过滤条件")
|
||||
private List<Information> filter;
|
||||
|
||||
|
||||
@Valid
|
||||
@Data
|
||||
public static class Information {
|
||||
|
||||
@Schema(description = "材质")
|
||||
private Boolean material;
|
||||
|
||||
@Schema(description = "颜色")
|
||||
private Boolean color;
|
||||
|
||||
@Schema(description = "长*宽")
|
||||
private Boolean spec;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-87
@@ -1,87 +0,0 @@
|
||||
package com.cf.imes.module.executor.controller.admin.plan.saveOptimize;
|
||||
|
||||
|
||||
import com.cf.imes.module.executor.controller.admin.plan.bo.OrderIds;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class NotPlanGoodsRespVO {
|
||||
|
||||
|
||||
// @Schema(description = "生产单ids")
|
||||
// private List<Long> orderIds;
|
||||
//
|
||||
//
|
||||
// @Schema(description = "生产单的大板ids")
|
||||
// private List<Long> goodsIds;
|
||||
//
|
||||
//
|
||||
// @Schema(description = "板材库对应的大板ids")
|
||||
// private List<Long> plateGoodsIds;
|
||||
|
||||
|
||||
@Schema(description = "生产单和大板的信息")
|
||||
private List<OrderIds> orderIdList;
|
||||
|
||||
|
||||
|
||||
// @Schema(description = "余料板ID")
|
||||
// private List<Long> remainPlateIds;
|
||||
|
||||
|
||||
@Schema(description = "商品ID-板材库对应的大板ID")
|
||||
private String goodsId;
|
||||
|
||||
|
||||
@Schema(description = "商品名称")
|
||||
private String goodsName;
|
||||
|
||||
|
||||
@Schema(description = "商品材质")
|
||||
private String material;
|
||||
|
||||
|
||||
@Schema(description = "商品颜色")
|
||||
private String color;
|
||||
|
||||
|
||||
@Schema(description = "商品纹路")
|
||||
private Boolean texture;
|
||||
|
||||
|
||||
// @Schema(description = "宽")
|
||||
// private BigDecimal width;
|
||||
//
|
||||
//
|
||||
// @Schema(description = "高")
|
||||
// private BigDecimal height;
|
||||
//
|
||||
//
|
||||
@Schema(description = "厚")
|
||||
private BigDecimal thickness;
|
||||
|
||||
|
||||
// @Schema(description = "面积")
|
||||
// private BigDecimal area;
|
||||
|
||||
|
||||
@Schema(description = "小板数量")
|
||||
private Integer plateNum;
|
||||
|
||||
|
||||
@Schema(description = "大板数量")
|
||||
private Integer goodsNum;
|
||||
|
||||
|
||||
@Schema(description = "尺寸规格")
|
||||
private String spec;
|
||||
|
||||
|
||||
}
|
||||
+4
@@ -15,6 +15,7 @@ import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackPageReqVO
|
||||
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.query.vo.productionStatus.OrderPlatePageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderData;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderCountProducePeriodRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderOverdueRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
|
||||
@@ -299,4 +300,7 @@ public interface OrderMapper extends BaseMapperX<OrderDO> {
|
||||
|
||||
IPage<PackRespVO> selectOrderIdList(@Param("page") IPage page, @Param("pageReqVO") PackPageReqVO pageReqVO, @Param("organId") Long organId);
|
||||
|
||||
|
||||
List<LabelOrderData> selectLabelOrderData(@Param("orderIds") List<Long> orderIds,@Param("organId") Long organId);
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -7,6 +7,7 @@ import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPartsData;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsPrintRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.PartGoodsRespVO;
|
||||
@@ -125,4 +126,8 @@ public interface OrderPartsMapper extends BaseMapperX<OrderPartsDO> {
|
||||
|
||||
|
||||
void updateParts(@Param("partsId") Long partsId,@Param("orderId") Long orderId,@Param("organId") Long organId);
|
||||
|
||||
|
||||
List<LabelOrderPartsData> selectLabelOrderPartsData(@Param("orderIds") List<Long> orderIds, @Param("organId") Long organId);
|
||||
|
||||
}
|
||||
+6
@@ -11,6 +11,7 @@ import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPackData;
|
||||
import com.cf.imes.module.executor.dal.dataobject.pack.OrderPackageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -92,4 +93,9 @@ public interface OrderPackageMapper extends BaseMapperX<OrderPackageDO> {
|
||||
.eqIfPresent(OrderPackageDO::getOrderId, orderId)
|
||||
.eq(OrderPackageDO::getStatus,OrderPackageStatusEnum.PACKAGED.getStatus()));
|
||||
}
|
||||
|
||||
|
||||
List<LabelOrderPackData> selectLabelOrderPackData(@Param("packIds") List<Long> packIds,@Param("organId") Long organId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPlateData;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.*;
|
||||
import com.cf.imes.module.executor.controller.admin.plate.vo.OrderPlateIds;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
@@ -90,4 +91,7 @@ public interface PlanItemMapper extends BaseMapperX<PlanItemDO> {
|
||||
.select(PlanItemDO::getGoodsId));
|
||||
}
|
||||
|
||||
List<LabelOrderPlateData> selectLabelOrderPlateDataByPlanId(@Param("planId") Long planId, @Param("organId") Long organId);
|
||||
|
||||
|
||||
}
|
||||
+4
@@ -13,6 +13,7 @@ import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PlateDetailsRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.process.vo.PlateDetails;
|
||||
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPlateData;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.saveOptimize.PrintOrderPackReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.NotPlanOrderPlateRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.PlateDetailRespVO;
|
||||
@@ -318,4 +319,7 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
||||
List<PlateDetailsRespVO> selectOrderPackPlateList(@Param("orderIds") List<Long> orderIds, @Param("organId") Long organId);
|
||||
|
||||
IPage<PackageDetailsRespVO> selectPackPlateList(@Param("page") IPage page, @Param("packageId") Long packageId, @Param("organId") Long organId);
|
||||
|
||||
List<LabelOrderPlateData> selectLabelOrderPlateDataByOrderId(@Param("orderId") Long orderId,@Param("organId") Long organId);
|
||||
|
||||
}
|
||||
+1
@@ -637,6 +637,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
// 查询生产单对应的包裹信息
|
||||
List<PrintOrderPackReqVO> printOrderPackReqVOS = plateMapper.selectPlanPackList(ids,getUserOrganId());
|
||||
|
||||
|
||||
if(CollUtil.isNotEmpty(printOrderPackReqVOS)) {
|
||||
for (Long orderId : orderIds) {
|
||||
// 统计每个订单的包装数量
|
||||
|
||||
+3
@@ -179,4 +179,7 @@ public interface OrderService {
|
||||
* @param importAsyncReqVO
|
||||
*/
|
||||
void orderImportAsync(OrderImportAsyncReqVO importAsyncReqVO, MultipartFile file);
|
||||
|
||||
OrderAllData getOrderAllData(Long orderId, Long planId);
|
||||
|
||||
}
|
||||
+90
-4
@@ -40,6 +40,7 @@ import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderParts.OrderPartsDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderParts.PartsDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.ordermodel.OrderModelDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.pack.OrderPackageDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.plan.PlanDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.plate.PlateGoodDO;
|
||||
@@ -54,6 +55,7 @@ import com.cf.imes.module.executor.dal.mysql.orderParts.PartsMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.pack.OrderPackageMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.pack.OrderPrepackagedMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.plan.PlanMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.planItem.PlanItemMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.plate.PlateGoodMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.plate.PlateMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.rawgoods.RawGoodsMapper;
|
||||
@@ -62,11 +64,13 @@ import com.cf.imes.module.executor.enums.DataTypeEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderDeletedEnum;
|
||||
import com.cf.imes.module.executor.enums.OrderStatusEnum;
|
||||
import com.cf.imes.module.executor.service.customplateno.CustomPlateNoGenerateService;
|
||||
import com.cf.imes.module.executor.service.optimizeplan.OptimizePlanService;
|
||||
import com.cf.imes.module.executor.service.orderImport.OrderImportHandler;
|
||||
import com.cf.imes.module.executor.service.orderImport.factory.OrderImportHandlerFactory;
|
||||
import com.cf.imes.module.executor.service.plan.PlanService;
|
||||
import com.cf.imes.module.executor.util.deviseData.structure.FieldConstants;
|
||||
import com.cf.imes.module.executor.util.deviseData.structure.PlateDetail;
|
||||
import com.cf.imes.module.executor.util.elasticsearch.EsUtils;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.api.webcad.ApiDataTypeVo;
|
||||
import org.springframework.aop.framework.AopContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -82,11 +86,7 @@ import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.URLEncoder;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
@@ -1432,4 +1432,90 @@ public class OrderServiceImpl implements OrderService {
|
||||
}
|
||||
|
||||
|
||||
@Resource
|
||||
private PlanItemMapper planItemMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private EsUtils esUtils;
|
||||
|
||||
|
||||
@Override
|
||||
public OrderAllData getOrderAllData(Long orderId, Long planId) {
|
||||
|
||||
|
||||
Long organId = getUserOrganId();
|
||||
|
||||
List<Long> orderIds = new ArrayList<>();
|
||||
|
||||
OrderAllData orderAllData = new OrderAllData();
|
||||
|
||||
List<LabelOrderPlateData> labelOrderPlateData;
|
||||
|
||||
if(planId != null){
|
||||
|
||||
PlanDO planDO = planMapper.selectById(planId);
|
||||
AssertUtils.notEmpty(planDO,PLAN_NOT_EXISTS);
|
||||
|
||||
orderAllData.setPlan(planDO);
|
||||
|
||||
String orderNos = Optional.ofNullable(planDO.getOrderNos()).orElse("[]");
|
||||
|
||||
orderIds.addAll(JSON.parseArray(orderNos).toJavaList(Long.class).stream().distinct().toList());
|
||||
|
||||
// 板材信息
|
||||
labelOrderPlateData = planItemMapper.selectLabelOrderPlateDataByPlanId(planId,organId);
|
||||
|
||||
}else {
|
||||
|
||||
orderIds.add(orderId);
|
||||
|
||||
// 板材信息
|
||||
labelOrderPlateData = plateMapper.selectLabelOrderPlateDataByOrderId(orderId,organId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 生产单信息
|
||||
List<LabelOrderData> labelOrderData = orderMapper.selectLabelOrderData(orderIds, organId);
|
||||
|
||||
List<Long> packIds = labelOrderPlateData.stream().map(LabelOrderPlateData::getPackageNo).distinct().toList();
|
||||
|
||||
List<Long> plateIdList = labelOrderPlateData.stream().map(LabelOrderPlateData::getPlateId).distinct().toList();
|
||||
|
||||
|
||||
// 小板造型信息
|
||||
List<OrderModelDO> orderModelDOS = esUtils.getEsDocument("orderId","plateId", orderIds,plateIdList, plateIdList.size(), OptimizePlanService.ORDER_PLATE_MODEL, OrderModelDO.class);
|
||||
|
||||
// 配件信息
|
||||
List<LabelOrderPartsData> labelOrderPartsData = orderPartsMapper.selectLabelOrderPartsData(orderIds, organId);
|
||||
|
||||
// 包裹信息
|
||||
List<LabelOrderPackData> labelOrderPackData = orderPackageMapper.selectLabelOrderPackData(packIds, organId);
|
||||
|
||||
labelOrderPackData.forEach(f-> f.setPackNum(f.getPackageId().size()));
|
||||
|
||||
List<OrderPackageDO> packageDOS = orderPackageMapper.selectBatchIds(packIds);
|
||||
|
||||
labelOrderPlateData.forEach(f->{
|
||||
|
||||
f.setOrderDate(labelOrderData.stream().filter(o->o.getOrderNo().equals(f.getOrderId())).findFirst().orElse(new LabelOrderData()).getOrderDate());
|
||||
f.setDeliveryDate(labelOrderData.stream().filter(o->o.getOrderNo().equals(f.getOrderId())).findFirst().orElse(new LabelOrderData()).getDeliveryDate());
|
||||
f.setPackageSerialNo(packageDOS.stream().filter(o->o.getId().equals(f.getPackageNo())).findFirst().orElse(new OrderPackageDO()).getPackageNo());
|
||||
|
||||
});
|
||||
|
||||
|
||||
orderAllData.setOrderList(labelOrderData);
|
||||
orderAllData.setPackDataList(labelOrderPackData);
|
||||
orderAllData.setPlateDataList(labelOrderPlateData);
|
||||
orderAllData.setPartsDataList(labelOrderPartsData);
|
||||
orderAllData.setPlateModels(orderModelDOS);
|
||||
|
||||
|
||||
return orderAllData;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+1
-1
@@ -471,7 +471,7 @@ public class PlanServiceImpl implements PlanService {
|
||||
|
||||
|
||||
// 根据排单ID查询ES中的优化数据
|
||||
List<OptimizeBoardModelDO> optimizeBoardModelDOS = esUtils.getEsDocument(FIELD_PLANID, planIds, 999, ORDER_REMAIN_PLATE_MODEL, OptimizeBoardModelDO.class);
|
||||
List<OptimizeBoardModelDO> optimizeBoardModelDOS = esUtils.getEsDocument(FIELD_PLANID, planIds, 500, ORDER_REMAIN_PLATE_MODEL, OptimizeBoardModelDO.class);
|
||||
|
||||
|
||||
// 获取排单对应的生产单的信息
|
||||
|
||||
+33
@@ -252,6 +252,39 @@ public class EsUtils {
|
||||
|
||||
|
||||
|
||||
public <T> List<T> getEsDocument(String filedName1,String filedName2, List<Long> value1,List<Long> value2,Integer size, String index, Class<T> targetClass) {
|
||||
|
||||
List<FieldValue> fieldValues1 = value1.stream().map(FieldValue::of).toList();
|
||||
List<FieldValue> fieldValues2 = value2.stream().map(FieldValue::of).toList();
|
||||
SearchRequest.Builder builder = new SearchRequest.Builder();
|
||||
builder.index(index);
|
||||
builder.size(size);
|
||||
|
||||
builder.query(q->q.bool(b->b.filter(f->{
|
||||
f.terms(t->t.field(filedName1).terms(e->e.value(fieldValues1)));
|
||||
f.terms(t->t.field(filedName2).terms(e->e.value(fieldValues2)));
|
||||
return f;
|
||||
})));
|
||||
|
||||
|
||||
try {
|
||||
SearchResponse<T> search = elasticsearchClient.search(builder.build(), targetClass);
|
||||
List<Hit<T>> hits = search.hits().hits();
|
||||
if (CollUtil.isNotEmpty(hits)) {
|
||||
return hits.stream().map(Hit::source).toList();
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}catch (JsonpMappingException e){
|
||||
log.error(e.getMessage());
|
||||
throw new ServiceException(ORDER_DATA_ERROR);
|
||||
}catch (IOException | ElasticsearchException e) {
|
||||
log.error(e.getMessage());
|
||||
throw new ServiceException(DATA_DATA_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ES 文档删除
|
||||
public void deleteEsDocument(String filedName,Long value, String index) {
|
||||
|
||||
+30
@@ -604,4 +604,34 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectLabelOrderData"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderData">
|
||||
|
||||
|
||||
|
||||
select distinct
|
||||
id as orderNo,
|
||||
custom_order_no as customOrderNo,
|
||||
dealer as dealer,
|
||||
dealer_phone_number as dealerPhoneNumber,
|
||||
customer as customer,
|
||||
phone_number as phoneNumber,
|
||||
address as address,
|
||||
salesman as salesman,
|
||||
splitter as splitter,
|
||||
order_date as orderDate,
|
||||
delivery_date as deliveryDate
|
||||
|
||||
from orders
|
||||
|
||||
where organ_id =#{organId}
|
||||
and deleted = false
|
||||
and id in
|
||||
<foreach collection="orderIds" item="orderIds" open="(" close=")" separator=",">
|
||||
#{orderIds}
|
||||
</foreach>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+29
-2
@@ -190,8 +190,8 @@
|
||||
op.category as category,
|
||||
op.subparts as subparts
|
||||
from order_parts op
|
||||
left join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.parts_id
|
||||
left join order_body ob on oi.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id
|
||||
join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.parts_id
|
||||
join order_body ob on oi.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id
|
||||
|
||||
where op.organ_id = #{organId}
|
||||
and op.deleted = false
|
||||
@@ -375,8 +375,35 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectLabelOrderPartsData"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPartsData">
|
||||
|
||||
|
||||
select distinct
|
||||
|
||||
op.id as partsId,
|
||||
op.order_id as orderNo,
|
||||
op.name as partsName,
|
||||
op.model as model,
|
||||
op.factory as factory,
|
||||
op.brand as brand,
|
||||
op.spec as spec,
|
||||
op.unit as partsUnit,
|
||||
count(oi.num) as `count`
|
||||
|
||||
from order_parts op
|
||||
join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.parts_id
|
||||
|
||||
where op.organ_id = #{organId}
|
||||
and op.deleted = false
|
||||
and op.order_id in
|
||||
<foreach item="orderIds" collection="orderIds" open="(" separator="," close=")">
|
||||
#{orderIds}
|
||||
</foreach>
|
||||
|
||||
group by op.id,op.order_id,op.name,op.model,op.factory,op.brand,op.spec,op.unit
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<update id="deleteOrderParts"
|
||||
|
||||
+38
@@ -149,4 +149,42 @@
|
||||
where organ_id = #{organId} and deleted = false and order_id = #{orderId}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="OrderPackDataMap" type="com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPackData">
|
||||
|
||||
<result property="orderNo" column="orderNo"/>
|
||||
|
||||
<collection property="packageNo" ofType="java.lang.String" column="packageNo"/>
|
||||
<collection property="packageId" ofType="java.lang.Long" column="packageId"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<select id="selectLabelOrderPackData"
|
||||
parameterType="java.lang.Long"
|
||||
resultMap="OrderPackDataMap">
|
||||
|
||||
|
||||
select distinct
|
||||
order_id as orderNo,
|
||||
id as packageId,
|
||||
package_no as packageNo
|
||||
|
||||
from order_package
|
||||
|
||||
where organ_id = #{organId}
|
||||
and deleted = false
|
||||
and id in
|
||||
<foreach item="packIds" collection="packIds" open="(" separator="," close=")">
|
||||
#{packIds}
|
||||
</foreach>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+44
@@ -453,4 +453,48 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectLabelOrderPlateDataByPlanId"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPlateData">
|
||||
|
||||
|
||||
|
||||
select distinct
|
||||
|
||||
oi.body_id as bodyGroupNo,
|
||||
oi.room_id as roomGroupNo,
|
||||
ob.name as bodyName,
|
||||
ob.room_name as roomName,
|
||||
oi.package_id as packageNo,
|
||||
ogs.color as plateColor,
|
||||
ogs.material as plateMaterial,
|
||||
op.id as plateId,
|
||||
op.order_id as orderId,
|
||||
op.name as plateName,
|
||||
op.plate_no as plateNo,
|
||||
op.custom_plate_no as customPlateNo,
|
||||
op.width as plateWidth,
|
||||
op.height as plateLength,
|
||||
op.thickness as plateThickness,
|
||||
op.split_width as splitWidth,
|
||||
op.split_height as splitHeight,
|
||||
op.split_thickness as splitThickness,
|
||||
op.seal_left as sealLeft,
|
||||
op.seal_right as sealRight,
|
||||
op.seal_up as sealUp,
|
||||
op.seal_down as sealDown,
|
||||
op.remark as plateRemark
|
||||
|
||||
from order_plan_item opi
|
||||
join order_plate op on opi.organ_id = op.organ_id and opi.order_id = op.order_id and opi.plate_id = op.id
|
||||
left join order_goods ogs on opi.organ_id = ogs.organ_id and opi.order_id = ogs.order_id and opi.goods_id = ogs.id
|
||||
left join order_item oi on opi.organ_id = oi.organ_id and opi.order_id = oi.order_id and opi.plate_id = oi.plate_id
|
||||
left join order_body ob on oi.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id
|
||||
|
||||
where opi.organ_id = #{organId} and opi.plan_id = #{planId}
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
+45
-68
@@ -730,75 +730,10 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="selectOrderPlateListByBody" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO">
|
||||
select distinct
|
||||
op.id,
|
||||
op.name,
|
||||
op.goods_id,
|
||||
ogs.goods_name,
|
||||
op.front_hole_count,
|
||||
op.back_hole_count,
|
||||
op.side_hole_count,
|
||||
op.unregular_point_count,
|
||||
op.front_model_count,
|
||||
op.back_model_count,
|
||||
op.hole_arrange,
|
||||
op.hole_face,
|
||||
op.texture,
|
||||
op.type,
|
||||
op.open_door_type,
|
||||
op.filter_type,
|
||||
op.seal_left,
|
||||
op.seal_right,
|
||||
op.seal_up,
|
||||
op.seal_down,
|
||||
op.offset_x,
|
||||
op.offset_y,
|
||||
op.is_arc_across,
|
||||
op.is_door,
|
||||
op.is_cancel,
|
||||
op.remark,
|
||||
op.plate_no,
|
||||
op.split_height,
|
||||
op.split_width,
|
||||
op.split_thickness,
|
||||
op.module_type_id,
|
||||
op.height,
|
||||
op.width,
|
||||
op.thickness,
|
||||
op.area,
|
||||
op.is_special_shaped,
|
||||
op.is_sculpt,
|
||||
ogs.price,
|
||||
ogs.brand,
|
||||
ogs.height as goods_height,
|
||||
ogs.width as goods_width,
|
||||
ogs.thickness as goods_thickness,
|
||||
ogs.color,
|
||||
ogs.material,
|
||||
ogs.spec,
|
||||
bdy.id as body_id,
|
||||
bdy.`name` as body_name,
|
||||
bdy.room_id,
|
||||
bdy.room_name
|
||||
from order_plate op
|
||||
left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id
|
||||
left join order_item its on op.organ_id = its.organ_id and op.order_id = its.order_id and op.id = its.plate_id
|
||||
left join order_body bdy on its.organ_id = bdy.organ_id and its.order_id = bdy.order_id and its.body_id = bdy.id
|
||||
where op.organ_id = #{organId}
|
||||
and op.deleted = #{deleted}
|
||||
and op.order_id = #{orderId}
|
||||
<if test="roomId != null">
|
||||
and its.room_id = #{roomId}
|
||||
</if>
|
||||
<if test="bodyId != null">
|
||||
and its.body_id = #{bodyId}
|
||||
</if>
|
||||
<if test="bodyId == null">
|
||||
and its.id = #{plateId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectOrderPlateListSummary" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateGoodsRespVO">
|
||||
|
||||
@@ -1034,6 +969,48 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectLabelOrderPlateDataByOrderId"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPlateData">
|
||||
|
||||
|
||||
select distinct
|
||||
|
||||
oi.body_id as bodyGroupNo,
|
||||
oi.room_id as roomGroupNo,
|
||||
ob.name as bodyName,
|
||||
ob.room_name as roomName,
|
||||
oi.package_id as packageNo,
|
||||
ogs.color as plateColor,
|
||||
ogs.material as plateMaterial,
|
||||
op.id as plateId,
|
||||
op.order_id as orderId,
|
||||
op.name as plateName,
|
||||
op.plate_no as plateNo,
|
||||
op.custom_plate_no as customPlateNo,
|
||||
op.width as plateWidth,
|
||||
op.height as plateLength,
|
||||
op.thickness as plateThickness,
|
||||
op.split_width as splitWidth,
|
||||
op.split_height as splitHeight,
|
||||
op.split_thickness as splitThickness,
|
||||
op.seal_left as sealLeft,
|
||||
op.seal_right as sealRight,
|
||||
op.seal_up as sealUp,
|
||||
op.seal_down as sealDown,
|
||||
op.remark as plateRemark
|
||||
|
||||
from order_plate op
|
||||
left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id
|
||||
left join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id
|
||||
left join order_body ob on oi.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id
|
||||
|
||||
where op.organ_id = #{organId}
|
||||
and op.deleted = false
|
||||
and op.order_id = #{orderId}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="orderItemMap" type="com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO">
|
||||
<result property="orderId" column="orderId"/>
|
||||
<result property="roomName" column="roomName"/>
|
||||
|
||||
Reference in New Issue
Block a user