mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、禅道bug#1589修复;2、订单详情、未排已排订单、添加小板、生产优化等板件列表字段补充;
This commit is contained in:
+2
-13
@@ -11,6 +11,7 @@ import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
|||||||
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.controller.admin.plan.bo.OrderRoomBodyList;
|
import com.cf.imes.module.executor.controller.admin.plan.bo.OrderRoomBodyList;
|
||||||
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.controller.admin.plate.vo.OrderViewPlatePageRespVO;
|
||||||
import com.cf.imes.module.executor.service.plan.PlanService;
|
import com.cf.imes.module.executor.service.plan.PlanService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
@@ -78,7 +79,7 @@ public class PlanController {
|
|||||||
@GetMapping("getPlateByPlanId")
|
@GetMapping("getPlateByPlanId")
|
||||||
@Operation(summary = "根据排单id获取小板分页")
|
@Operation(summary = "根据排单id获取小板分页")
|
||||||
@PreAuthorize("@ss.hasAnyPermissions('placeorder:query','producePlan:query')")
|
@PreAuthorize("@ss.hasAnyPermissions('placeorder:query','producePlan:query')")
|
||||||
public CommonResult<PageResult<PlateResList>> getPlateByPlanId(@Valid GetPlateByPlanIdVO vo) {
|
public CommonResult<PageResult<OrderViewPlatePageRespVO>> getPlateByPlanId(@Valid GetPlateByPlanIdVO vo) {
|
||||||
return success(planService.getPlateByPlanId(vo));
|
return success(planService.getPlateByPlanId(vo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,18 +151,6 @@ public class PlanController {
|
|||||||
BeanUtils.toBean(list, PlanRespVO.class));
|
BeanUtils.toBean(list, PlanRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-plate-excel")
|
|
||||||
@Operation(summary = "导出板材 Excel")
|
|
||||||
@PreAuthorize("@ss.hasPermission('executor:plan:export')")
|
|
||||||
@OperateLog(type = EXPORT)
|
|
||||||
public void exportPlateExcel(@Valid GetPlateByPlanIdVO vo,
|
|
||||||
HttpServletResponse response) throws IOException {
|
|
||||||
PageResult<PlateResList> plateByPlanId = planService.getPlateByPlanId(vo);
|
|
||||||
// 导出 Excel
|
|
||||||
ExcelUtils.write(response, "排单板材.xls", "数据", PlateResList.class,
|
|
||||||
BeanUtils.toBean(plateByPlanId.getList(), PlateResList.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("getPlateList")
|
@GetMapping("getPlateList")
|
||||||
|
|||||||
+25
-6
@@ -1,13 +1,10 @@
|
|||||||
package com.cf.imes.module.executor.controller.admin.plan.vo;
|
package com.cf.imes.module.executor.controller.admin.plan.vo;
|
||||||
|
|
||||||
|
|
||||||
import com.cf.imes.module.executor.controller.admin.plan.bo.ProcessGroupList;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 订单板件 Response VO")
|
@Schema(description = "管理后台 - 订单板件 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -215,8 +212,30 @@ public class PlateDetailRespVO {
|
|||||||
@Schema(description = "是否侧面二维刀路")
|
@Schema(description = "是否侧面二维刀路")
|
||||||
private Boolean isSide2v;
|
private Boolean isSide2v;
|
||||||
|
|
||||||
|
@Schema(description = "部件名称")
|
||||||
|
private String componentName;
|
||||||
|
|
||||||
// 加工组ID和名称
|
@Schema(description = "是否双面造型")
|
||||||
@Schema(description = "加工组名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
private Boolean doubleSideModel;
|
||||||
private List<ProcessGroupList> processGroupLists;
|
|
||||||
|
@Schema(description = "是否双面排孔")
|
||||||
|
private Boolean doubleSideHole;
|
||||||
|
|
||||||
|
@Schema(description = "是否正面造型")
|
||||||
|
private Boolean frontModel;
|
||||||
|
|
||||||
|
@Schema(description = "是否侧面造型")
|
||||||
|
private Boolean backModel;
|
||||||
|
|
||||||
|
@Schema(description = "是否正面排孔")
|
||||||
|
private Boolean frontHole;
|
||||||
|
|
||||||
|
@Schema(description = "是否反面排孔")
|
||||||
|
private Boolean backHole;
|
||||||
|
|
||||||
|
@Schema(description = "是否侧面造型")
|
||||||
|
private Boolean sideModel;
|
||||||
|
|
||||||
|
@Schema(description = "是否侧面排孔")
|
||||||
|
private Boolean sideHole;
|
||||||
}
|
}
|
||||||
|
|||||||
+27
@@ -79,4 +79,31 @@ public class PlateResList {
|
|||||||
@Schema(description = "开料序")
|
@Schema(description = "开料序")
|
||||||
private Integer placeId;
|
private Integer placeId;
|
||||||
|
|
||||||
|
@Schema(description = "部件名称")
|
||||||
|
private String componentName;
|
||||||
|
|
||||||
|
@Schema(description = "是否双面造型")
|
||||||
|
private Boolean doubleSideModel;
|
||||||
|
|
||||||
|
@Schema(description = "是否双面排孔")
|
||||||
|
private Boolean doubleSideHole;
|
||||||
|
|
||||||
|
@Schema(description = "是否正面造型")
|
||||||
|
private Boolean frontModel;
|
||||||
|
|
||||||
|
@Schema(description = "是否侧面造型")
|
||||||
|
private Boolean backModel;
|
||||||
|
|
||||||
|
@Schema(description = "是否正面排孔")
|
||||||
|
private Boolean frontHole;
|
||||||
|
|
||||||
|
@Schema(description = "是否反面排孔")
|
||||||
|
private Boolean backHole;
|
||||||
|
|
||||||
|
@Schema(description = "是否侧面造型")
|
||||||
|
private Boolean sideModel;
|
||||||
|
|
||||||
|
@Schema(description = "是否侧面排孔")
|
||||||
|
private Boolean sideHole;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -8,7 +8,6 @@ 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 com.cf.imes.module.executor.controller.admin.order.vo.order.OrderCadViewPlatePageReqVO;
|
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderCadViewPlatePageReqVO;
|
||||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrdersViewCadViewInfoRespVO;
|
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrdersViewCadViewInfoRespVO;
|
||||||
import com.cf.imes.module.executor.controller.admin.plan.vo.PlateDetailRespVO;
|
|
||||||
import com.cf.imes.module.executor.controller.admin.plate.vo.*;
|
import com.cf.imes.module.executor.controller.admin.plate.vo.*;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
|
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.plate.PlateGoodDO;
|
import com.cf.imes.module.executor.dal.dataobject.plate.PlateGoodDO;
|
||||||
@@ -77,11 +76,10 @@ public class PlateController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/orders/noplan")
|
@PostMapping("/orders/noplan")
|
||||||
@Operation(summary = "获取未排单的订单板件")
|
@Operation(summary = "获取未排单的订单板件")
|
||||||
@PreAuthorize("@ss.hasAnyPermissions('manage:un-order-plan:insert-plate','manage:order-plan:insert-plate')")
|
@PreAuthorize("@ss.hasAnyPermissions('manage:un-order-plan:insert-plate','manage:order-plan:insert-plate')")
|
||||||
public CommonResult<List<PlateDetailRespVO>> getOrdersNoPlanPlate(@Valid @RequestBody NoPlanPlatePageReqVO reqVO) {
|
public CommonResult<NoPlanPlateRespVO> getOrdersNoPlanPlate(@Valid @RequestBody NoPlanPlatePageReqVO reqVO) {
|
||||||
return success(plateService.getOrdersNoPlanPlate(reqVO));
|
return success(plateService.getOrdersNoPlanPlate(reqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
package com.cf.imes.module.executor.controller.admin.plate.vo;
|
||||||
|
|
||||||
|
import com.cf.imes.module.executor.controller.admin.plan.vo.PlateDetailRespVO;
|
||||||
|
import com.cf.imes.module.executor.dal.dataobject.ordermodel.OrderModelDO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author Gqr
|
||||||
|
* @since 2026/6/2 15:13
|
||||||
|
*/
|
||||||
|
@Schema(description = "未排单板件信息和造型信息")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class NoPlanPlateRespVO {
|
||||||
|
@Schema(description = "小板列表")
|
||||||
|
private List<PlateDetailRespVO> plateList;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "小板造型列表")
|
||||||
|
private List<OrderModelDO> plateModels;
|
||||||
|
}
|
||||||
+15
@@ -25,6 +25,9 @@ public class OrderViewPlatePageRespVO {
|
|||||||
@Schema(description = "板件id")
|
@Schema(description = "板件id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "订单id")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
@Schema(description = "板件编号")
|
@Schema(description = "板件编号")
|
||||||
private String plateNo;
|
private String plateNo;
|
||||||
|
|
||||||
@@ -34,6 +37,9 @@ public class OrderViewPlatePageRespVO {
|
|||||||
@Schema(description = "板件名称")
|
@Schema(description = "板件名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "板材名称")
|
||||||
|
private String goodsName;
|
||||||
|
|
||||||
@Schema(description = "板件宽度")
|
@Schema(description = "板件宽度")
|
||||||
private BigDecimal width;
|
private BigDecimal width;
|
||||||
|
|
||||||
@@ -43,6 +49,12 @@ public class OrderViewPlatePageRespVO {
|
|||||||
@Schema(description = "板件厚度")
|
@Schema(description = "板件厚度")
|
||||||
private BigDecimal thickness;
|
private BigDecimal thickness;
|
||||||
|
|
||||||
|
@Schema(description = "开料长")
|
||||||
|
private BigDecimal splitHeight;
|
||||||
|
|
||||||
|
@Schema(description = "开料宽")
|
||||||
|
private BigDecimal splitWidth;
|
||||||
|
|
||||||
@Schema(description = "板件CAD图纸ID")
|
@Schema(description = "板件CAD图纸ID")
|
||||||
private Integer cadViewId;
|
private Integer cadViewId;
|
||||||
|
|
||||||
@@ -135,4 +147,7 @@ public class OrderViewPlatePageRespVO {
|
|||||||
|
|
||||||
@Schema(description = "是否侧面二维刀路")
|
@Schema(description = "是否侧面二维刀路")
|
||||||
private Boolean isSide2v;
|
private Boolean isSide2v;
|
||||||
|
|
||||||
|
@Schema(description = "品牌")
|
||||||
|
private String brand;
|
||||||
}
|
}
|
||||||
|
|||||||
+20
@@ -17,6 +17,11 @@ public class OrdersViewPlatesPageDO {
|
|||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 板编号
|
* 板编号
|
||||||
*/
|
*/
|
||||||
@@ -27,6 +32,11 @@ public class OrdersViewPlatesPageDO {
|
|||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 板材名称
|
||||||
|
*/
|
||||||
|
private String goodsName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 板件宽度
|
* 板件宽度
|
||||||
*/
|
*/
|
||||||
@@ -42,6 +52,16 @@ public class OrdersViewPlatesPageDO {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal thickness;
|
private BigDecimal thickness;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开料长
|
||||||
|
*/
|
||||||
|
private BigDecimal splitHeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开料宽
|
||||||
|
*/
|
||||||
|
private BigDecimal splitWidth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 板件CAD图纸ID
|
* 板件CAD图纸ID
|
||||||
*/
|
*/
|
||||||
|
|||||||
+50
-2
@@ -1,10 +1,8 @@
|
|||||||
package com.cf.imes.module.executor.dal.dataobject.plate;
|
package com.cf.imes.module.executor.dal.dataobject.plate;
|
||||||
|
|
||||||
import com.cf.imes.module.executor.controller.admin.plan.bo.ProcessGroupList;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 板件明细
|
* 板件明细
|
||||||
@@ -70,6 +68,11 @@ public class PlateDetailDO {
|
|||||||
*/
|
*/
|
||||||
private String customPlateNo;
|
private String customPlateNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cad设计板编号
|
||||||
|
*/
|
||||||
|
private String customNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 板名称
|
* 板名称
|
||||||
*/
|
*/
|
||||||
@@ -245,6 +248,11 @@ public class PlateDetailDO {
|
|||||||
*/
|
*/
|
||||||
private String processGroupName;
|
private String processGroupName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部件名称
|
||||||
|
*/
|
||||||
|
private String componentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开门类型,0 无 1 左 2 右 3 上 4 下
|
* 开门类型,0 无 1 左 2 右 3 上 4 下
|
||||||
*/
|
*/
|
||||||
@@ -279,4 +287,44 @@ public class PlateDetailDO {
|
|||||||
* 造型数据
|
* 造型数据
|
||||||
*/
|
*/
|
||||||
private String modelData;
|
private String modelData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否双面造型
|
||||||
|
*/
|
||||||
|
private Boolean doubleSideModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否双面排孔
|
||||||
|
*/
|
||||||
|
private Boolean doubleSideHole;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否正面造型
|
||||||
|
*/
|
||||||
|
private Boolean frontModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否侧面造型
|
||||||
|
*/
|
||||||
|
private Boolean backModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正面排孔
|
||||||
|
*/
|
||||||
|
private Boolean frontHole;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 反面排孔
|
||||||
|
*/
|
||||||
|
private Boolean backHole;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否侧面造型
|
||||||
|
*/
|
||||||
|
private Boolean sideModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否侧面排孔
|
||||||
|
*/
|
||||||
|
private Boolean sideHole;
|
||||||
}
|
}
|
||||||
+4
-2
@@ -216,7 +216,8 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
|||||||
@Param("bodyIds") Set<Long> bodyIds,
|
@Param("bodyIds") Set<Long> bodyIds,
|
||||||
@Param("groupIds") Set<Long> groupId,
|
@Param("groupIds") Set<Long> groupId,
|
||||||
@Param("componentIds") Set<Long> componentIds,
|
@Param("componentIds") Set<Long> componentIds,
|
||||||
@Param("cadView") boolean cadView);
|
@Param("cadView") boolean cadView,
|
||||||
|
@Param("deleted") Boolean deleted);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询订单板件id
|
* 分页查询订单板件id
|
||||||
@@ -252,7 +253,8 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
|||||||
@Param("groupIds") Set<Long> groupIds,
|
@Param("groupIds") Set<Long> groupIds,
|
||||||
@Param("componentIds") Set<Long> componentIds,
|
@Param("componentIds") Set<Long> componentIds,
|
||||||
@Param("name") String name,
|
@Param("name") String name,
|
||||||
@Param("cadView") boolean cadView);
|
@Param("cadView") boolean cadView,
|
||||||
|
@Param("deleted") Boolean deleted);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询订单板件id
|
* 分页查询订单板件id
|
||||||
|
|||||||
-4
@@ -64,12 +64,8 @@ public interface PlanItemMapper extends BaseMapperX<PlanItemDO> {
|
|||||||
|
|
||||||
List<PlateInfoVO> selectOrderPlanPlateList(@Param("planIds") List<Long> planIds, @Param("organId") Long organId);
|
List<PlateInfoVO> selectOrderPlanPlateList(@Param("planIds") List<Long> planIds, @Param("organId") Long organId);
|
||||||
|
|
||||||
List<PlateResList> selectPlateListByPlateIds(@Param(Constants.WRAPPER) Wrapper<PlanItemDO> wrapper,@Param("pageNo") Integer pageNo,@Param("pageSize") Integer pageSize);
|
|
||||||
|
|
||||||
List<PlateResList> selectPlateListByPlanId(@Param("planId") Long planId, @Param("organId") Long organId);
|
List<PlateResList> selectPlateListByPlanId(@Param("planId") Long planId, @Param("organId") Long organId);
|
||||||
|
|
||||||
Long selectPlateCountByPlateIds(@Param(Constants.WRAPPER) Wrapper<PlanItemDO> wrapper);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单、房间、柜体下未排单大板
|
* 查询订单、房间、柜体下未排单大板
|
||||||
*
|
*
|
||||||
|
|||||||
+8
@@ -437,4 +437,12 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Long> selectPlanAllCuttedOrderIdList(@Param("planId") Long planId);
|
List<Long> selectPlanAllCuttedOrderIdList(@Param("planId") Long planId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询排单板件信息
|
||||||
|
*
|
||||||
|
* @param planIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
IPage<OrdersViewPlatesPageDO> selectPlanPlateInfoPage(@Param("page") IPage<OrdersViewPlatesPageDO> page, @Param("planIds") List<Long> planIds);
|
||||||
}
|
}
|
||||||
+2
-2
@@ -692,7 +692,7 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
|
|
||||||
// 查询所有板件的视图所需信息
|
// 查询所有板件的视图所需信息
|
||||||
PageDTO<OrdersViewPlatesPageDO> page1 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
PageDTO<OrdersViewPlatesPageDO> page1 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
||||||
IPage<OrdersViewPlatesPageDO> viewPlatesPage = orderItemMapper.selectOrdersViewPlatesPage(page1, orderIds, null, null, queryComponentIds, true);
|
IPage<OrdersViewPlatesPageDO> viewPlatesPage = orderItemMapper.selectOrdersViewPlatesPage(page1, orderIds, null, null, queryComponentIds, true, false);
|
||||||
List<OrdersViewPlatesPageDO> plateRecords = viewPlatesPage.getRecords();
|
List<OrdersViewPlatesPageDO> plateRecords = viewPlatesPage.getRecords();
|
||||||
|
|
||||||
List<OrderViewPlatePageRespVO> plateResultList = new ArrayList<>();
|
List<OrderViewPlatePageRespVO> plateResultList = new ArrayList<>();
|
||||||
@@ -708,7 +708,7 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
|
|
||||||
// 查询所有配件的视图所需信息
|
// 查询所有配件的视图所需信息
|
||||||
PageDTO<OrdersViewPartsPageDO> page2 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
PageDTO<OrdersViewPartsPageDO> page2 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
||||||
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page2, orderIds, null, null, queryComponentIds, null, true);
|
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page2, orderIds, null, null, queryComponentIds, null, true, false);
|
||||||
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
||||||
|
|
||||||
List<OrderViewPartPageRespVO> partResultList = new ArrayList<>();
|
List<OrderViewPartPageRespVO> partResultList = new ArrayList<>();
|
||||||
|
|||||||
+15
-5
@@ -378,7 +378,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
|
|
||||||
AssertUtils.notEmpty(plateDetailRespVOS, ORDER_PLAN_PLATE_ERROR);
|
AssertUtils.notEmpty(plateDetailRespVOS, ORDER_PLAN_PLATE_ERROR);
|
||||||
|
|
||||||
List<PlateDetailDO> resultPlateList = mergeGroupName(plateDetailRespVOS);
|
List<PlateDetailDO> resultPlateList = mergeGroupAndComponentName(plateDetailRespVOS);
|
||||||
|
|
||||||
List<OrderDO> orderDOS = orderMapper.selectBatchIds(orderIds);
|
List<OrderDO> orderDOS = orderMapper.selectBatchIds(orderIds);
|
||||||
|
|
||||||
@@ -780,7 +780,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
|
|
||||||
AssertUtils.notEmpty(plateDetailRespVOS, ORDER_PLATE_EMPTY);
|
AssertUtils.notEmpty(plateDetailRespVOS, ORDER_PLATE_EMPTY);
|
||||||
|
|
||||||
List<PlateDetailDO> resultPlateList = mergeGroupName(plateDetailRespVOS);
|
List<PlateDetailDO> resultPlateList = mergeGroupAndComponentName(plateDetailRespVOS);
|
||||||
|
|
||||||
List<OrderModelDO> models =
|
List<OrderModelDO> models =
|
||||||
resultPlateList.stream()
|
resultPlateList.stream()
|
||||||
@@ -801,11 +801,11 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合并加工组名称
|
* 合并加工组、部件名称
|
||||||
*
|
*
|
||||||
* @param list
|
* @param list
|
||||||
*/
|
*/
|
||||||
public List<PlateDetailDO> mergeGroupName(List<PlateDetailDO> list) {
|
public List<PlateDetailDO> mergeGroupAndComponentName(List<PlateDetailDO> list) {
|
||||||
|
|
||||||
if (list == null || list.isEmpty()) {
|
if (list == null || list.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
@@ -814,6 +814,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
// plateId -> (groupName + 代表对象)
|
// plateId -> (groupName + 代表对象)
|
||||||
Map<Long, PlateDetailDO> resultMap = new LinkedHashMap<>();
|
Map<Long, PlateDetailDO> resultMap = new LinkedHashMap<>();
|
||||||
Map<Long, Set<String>> groupNameMap = new HashMap<>();
|
Map<Long, Set<String>> groupNameMap = new HashMap<>();
|
||||||
|
Map<Long, Set<String>> componentNameMap = new HashMap<>();
|
||||||
|
|
||||||
for (PlateDetailDO item : list) {
|
for (PlateDetailDO item : list) {
|
||||||
|
|
||||||
@@ -825,11 +826,16 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
// 保留第一条作为代表对象(或你也可以自定义取最新)
|
// 保留第一条作为代表对象(或你也可以自定义取最新)
|
||||||
resultMap.putIfAbsent(plateId, item);
|
resultMap.putIfAbsent(plateId, item);
|
||||||
|
|
||||||
if (item.getProcessGroupName() != null) {
|
if (StringUtils.isNotBlank(item.getProcessGroupName())) {
|
||||||
groupNameMap
|
groupNameMap
|
||||||
.computeIfAbsent(plateId, k -> new LinkedHashSet<>())
|
.computeIfAbsent(plateId, k -> new LinkedHashSet<>())
|
||||||
.add(item.getProcessGroupName());
|
.add(item.getProcessGroupName());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(item.getComponentName())) {
|
||||||
|
componentNameMap
|
||||||
|
.computeIfAbsent(plateId, k -> new LinkedHashSet<>())
|
||||||
|
.add(item.getComponentName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组装最终结果
|
// 组装最终结果
|
||||||
@@ -844,6 +850,10 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
if (groupNames != null && !groupNames.isEmpty()) {
|
if (groupNames != null && !groupNames.isEmpty()) {
|
||||||
item.setProcessGroupName(String.join(",", groupNames));
|
item.setProcessGroupName(String.join(",", groupNames));
|
||||||
}
|
}
|
||||||
|
Set<String> componentNames = componentNameMap.get(plateId);
|
||||||
|
if (CollUtil.isNotEmpty(componentNames)) {
|
||||||
|
item.setComponentName(String.join(",", componentNames));
|
||||||
|
}
|
||||||
|
|
||||||
result.add(item);
|
result.add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -582,10 +582,11 @@ public class OrderComponentServiceImpl implements OrderComponentService {
|
|||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
// 2、把下级部件id作为查询条件
|
// 2、把下级部件id作为查询条件
|
||||||
|
Boolean deleted = pageReqVO.getDeleted();
|
||||||
List<OrderComponentDO> orderComponentDOS = orderComponentMapper.selectList(new LambdaQueryWrapperX<OrderComponentDO>()
|
List<OrderComponentDO> orderComponentDOS = orderComponentMapper.selectList(new LambdaQueryWrapperX<OrderComponentDO>()
|
||||||
.in(OrderComponentDO::getTopId, topIds)
|
.in(OrderComponentDO::getTopId, topIds)
|
||||||
.eq(OrderComponentDO::getOrderId, orderId)
|
.eq(OrderComponentDO::getOrderId, orderId)
|
||||||
.eqIfPresent(OrderComponentDO::getDeleted, pageReqVO.getDeleted())
|
.eqIfPresent(OrderComponentDO::getDeleted, deleted)
|
||||||
.select(OrderComponentDO::getId, OrderComponentDO::getCadViewFileId, OrderComponentDO::getPid));
|
.select(OrderComponentDO::getId, OrderComponentDO::getCadViewFileId, OrderComponentDO::getPid));
|
||||||
Set<Long> queryComponentIds = new HashSet<>();
|
Set<Long> queryComponentIds = new HashSet<>();
|
||||||
if (CollUtil.isNotEmpty(orderComponentDOS)) {
|
if (CollUtil.isNotEmpty(orderComponentDOS)) {
|
||||||
@@ -604,7 +605,7 @@ public class OrderComponentServiceImpl implements OrderComponentService {
|
|||||||
// 查询所有板件的视图所需信息
|
// 查询所有板件的视图所需信息
|
||||||
PageDTO<OrdersViewPlatesPageDO> page1 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
PageDTO<OrdersViewPlatesPageDO> page1 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
||||||
IPage<OrdersViewPlatesPageDO> viewPlatesPage = orderItemMapper.selectOrdersViewPlatesPage(page1, List.of(orderId), null,
|
IPage<OrdersViewPlatesPageDO> viewPlatesPage = orderItemMapper.selectOrdersViewPlatesPage(page1, List.of(orderId), null,
|
||||||
null, queryComponentIds, true);
|
null, queryComponentIds, true, deleted);
|
||||||
List<OrdersViewPlatesPageDO> plateRecords = viewPlatesPage.getRecords();
|
List<OrdersViewPlatesPageDO> plateRecords = viewPlatesPage.getRecords();
|
||||||
|
|
||||||
List<OrderViewPlatePageRespVO> plateResult = new ArrayList<>();
|
List<OrderViewPlatePageRespVO> plateResult = new ArrayList<>();
|
||||||
@@ -621,7 +622,7 @@ public class OrderComponentServiceImpl implements OrderComponentService {
|
|||||||
// 查询所有配件的视图所需信息
|
// 查询所有配件的视图所需信息
|
||||||
PageDTO<OrdersViewPartsPageDO> page2 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
PageDTO<OrdersViewPartsPageDO> page2 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
||||||
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page2, List.of(orderId), null,
|
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page2, List.of(orderId), null,
|
||||||
null, queryComponentIds, null, true);
|
null, queryComponentIds, null, true, deleted);
|
||||||
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
||||||
|
|
||||||
List<OrderViewPartPageRespVO> partResult = new ArrayList<>();
|
List<OrderViewPartPageRespVO> partResult = new ArrayList<>();
|
||||||
|
|||||||
+8
-2
@@ -5,6 +5,7 @@ import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
|
|||||||
import com.cf.imes.module.executor.controller.admin.plan.bo.OrderRoomBodyList;
|
import com.cf.imes.module.executor.controller.admin.plan.bo.OrderRoomBodyList;
|
||||||
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.controller.admin.plate.vo.OrderViewPlatePageRespVO;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -71,8 +72,13 @@ public interface PlanService {
|
|||||||
*/
|
*/
|
||||||
PageResult<OrderGoodsResp> getOrderGoodsPage(OrderPageReqVOCopy pageReqVO);
|
PageResult<OrderGoodsResp> getOrderGoodsPage(OrderPageReqVOCopy pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
PageResult<PlateResList> getPlateByPlanId(GetPlateByPlanIdVO vo);
|
* 查询排单板件分页
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageResult<OrderViewPlatePageRespVO> getPlateByPlanId(GetPlateByPlanIdVO vo);
|
||||||
|
|
||||||
PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO);
|
PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
|||||||
+174
-36
@@ -1,5 +1,6 @@
|
|||||||
package com.cf.imes.module.executor.service.plan;
|
package com.cf.imes.module.executor.service.plan;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import co.elastic.clients.elasticsearch.ElasticsearchClient;
|
import co.elastic.clients.elasticsearch.ElasticsearchClient;
|
||||||
@@ -29,19 +30,25 @@ import com.cf.imes.module.executor.controller.admin.plan.bo.OrderRoomBodyList;
|
|||||||
import com.cf.imes.module.executor.controller.admin.plan.saveOptimize.RemainBoardInfo;
|
import com.cf.imes.module.executor.controller.admin.plan.saveOptimize.RemainBoardInfo;
|
||||||
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.controller.admin.plate.vo.OrderPlateIds;
|
import com.cf.imes.module.executor.controller.admin.plate.vo.OrderPlateIds;
|
||||||
|
import com.cf.imes.module.executor.controller.admin.plate.vo.OrderViewPlatePageRespVO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
|
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.goods.OptimizeBoardModelDO;
|
import com.cf.imes.module.executor.dal.dataobject.goods.OptimizeBoardModelDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.goods.PlanActualGoodsModelDO;
|
import com.cf.imes.module.executor.dal.dataobject.goods.PlanActualGoodsModelDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
|
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
|
||||||
|
import com.cf.imes.module.executor.dal.dataobject.orderGroup.OrderGroupDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO;
|
import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO;
|
||||||
|
import com.cf.imes.module.executor.dal.dataobject.orderItem.OrdersViewPlatesPageDO;
|
||||||
|
import com.cf.imes.module.executor.dal.dataobject.ordercomponent.OrderComponentDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.plan.PlanDO;
|
import com.cf.imes.module.executor.dal.dataobject.plan.PlanDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.planitem.PlanItemDO;
|
import com.cf.imes.module.executor.dal.dataobject.planitem.PlanItemDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
|
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
|
||||||
import com.cf.imes.module.executor.dal.mysql.goods.GoodsMapper;
|
import com.cf.imes.module.executor.dal.mysql.goods.GoodsMapper;
|
||||||
import com.cf.imes.module.executor.dal.mysql.order.OrderMapper;
|
import com.cf.imes.module.executor.dal.mysql.order.OrderMapper;
|
||||||
import com.cf.imes.module.executor.dal.mysql.orderBody.OrderBodyMapper;
|
import com.cf.imes.module.executor.dal.mysql.orderBody.OrderBodyMapper;
|
||||||
|
import com.cf.imes.module.executor.dal.mysql.orderGroup.OrderGroupMapper;
|
||||||
import com.cf.imes.module.executor.dal.mysql.orderItem.OrderItemMapper;
|
import com.cf.imes.module.executor.dal.mysql.orderItem.OrderItemMapper;
|
||||||
|
import com.cf.imes.module.executor.dal.mysql.ordercomponent.OrderComponentMapper;
|
||||||
import com.cf.imes.module.executor.dal.mysql.plan.PlanMapper;
|
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.planitem.PlanItemMapper;
|
||||||
import com.cf.imes.module.executor.dal.mysql.plate.PlateMapper;
|
import com.cf.imes.module.executor.dal.mysql.plate.PlateMapper;
|
||||||
@@ -51,6 +58,7 @@ import com.cf.imes.module.executor.enums.OrderPlanQueryTypeEnum;
|
|||||||
import com.cf.imes.module.executor.enums.OrderStatusEnum;
|
import com.cf.imes.module.executor.enums.OrderStatusEnum;
|
||||||
import com.cf.imes.module.executor.util.elasticsearch.EsUtils;
|
import com.cf.imes.module.executor.util.elasticsearch.EsUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.aop.framework.AopContext;
|
import org.springframework.aop.framework.AopContext;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -61,11 +69,11 @@ import jakarta.annotation.Resource;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.DATA_DATA_ERROR;
|
import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.DATA_DATA_ERROR;
|
||||||
import static com.cf.imes.framework.common.util.json.JsonUtils.parseArray;
|
import static com.cf.imes.framework.common.util.json.JsonUtils.parseArray;
|
||||||
import static com.cf.imes.framework.common.util.string.SearchUtil.insertSeparator;
|
|
||||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
|
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
|
||||||
import static com.cf.imes.module.executor.enums.EsIndexEnum.*;
|
import static com.cf.imes.module.executor.enums.EsIndexEnum.*;
|
||||||
@@ -113,6 +121,12 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
@Resource
|
@Resource
|
||||||
private EsUtils esUtils;
|
private EsUtils esUtils;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OrderGroupMapper orderGroupMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OrderComponentMapper orderComponentMapper;
|
||||||
|
|
||||||
|
|
||||||
// 重复使用的常量
|
// 重复使用的常量
|
||||||
private static final String FIELD_ORDER_ID = "o.id";
|
private static final String FIELD_ORDER_ID = "o.id";
|
||||||
@@ -623,57 +637,181 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<PlateResList> getPlateByPlanId(GetPlateByPlanIdVO vo) {
|
public PageResult<OrderViewPlatePageRespVO> getPlateByPlanId(GetPlateByPlanIdVO vo) {
|
||||||
if(vo.getPlanIds().isEmpty()){
|
List<Long> planIds = vo.getPlanIds();
|
||||||
|
if (CollUtil.isEmpty(planIds)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Long> planIds = vo.getPlanIds();
|
|
||||||
|
|
||||||
List<PlanDO> planDOS = planMapper.selectBatchIds(planIds);
|
List<PlanDO> planDOS = planMapper.selectBatchIds(planIds);
|
||||||
|
|
||||||
if(planDOS.size() != planIds.size()){
|
if (planDOS.size() != planIds.size()) {
|
||||||
planDOS.forEach(f->{
|
planDOS.forEach(f -> {
|
||||||
if(!planIds.contains(f.getId())){
|
if (!planIds.contains(f.getId())) {
|
||||||
throw new ServiceException(PLAN_NOT_DATA_EXISTS,f.getId());
|
throw new ServiceException(PLAN_NOT_DATA_EXISTS, f.getId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryWrapperX<PlanItemDO> queryWrapperX = new QueryWrapperX<>();
|
// todo 当前默认单排单查询
|
||||||
|
Set<Long> orderIdSet = planDOS.stream()
|
||||||
|
.map(PlanDO::getOrderNos)
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.flatMap(orderNos -> JSON.parseArray(orderNos)
|
||||||
|
.toJavaList(Long.class)
|
||||||
|
.stream())
|
||||||
|
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||||
|
|
||||||
String filterTypes = "";
|
|
||||||
if (Objects.nonNull(vo.getHoleThrough()) && vo.getHoleThrough()) {
|
|
||||||
filterTypes += PlanFilterTypeEnum.DIGGINGTHROUGHTHESHAPE.getType().toString();
|
|
||||||
}
|
|
||||||
if (Objects.nonNull(vo.getBurrow()) && vo.getBurrow()) {
|
|
||||||
filterTypes += PlanFilterTypeEnum.THEREAREPERFORATEDHOLES.getType().toString();
|
|
||||||
}
|
|
||||||
if (Objects.nonNull(vo.getTwoDimensionalToolPath()) && vo.getTwoDimensionalToolPath()) {
|
|
||||||
filterTypes += PlanFilterTypeEnum.TWODIMENSIONALCUTTINGPATH.getType().toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
queryWrapperX.eq("op.organ_id",getUserOrganId())
|
// 分页查询排单板件
|
||||||
.in(FIELD_PLAN_ID, vo.getPlanIds())
|
PageDTO<OrdersViewPlatesPageDO> page = new PageDTO<>(vo.getPageNo(), vo.getPageSize());
|
||||||
.eqIfPresent("op.is_door", vo.getIsDoor())
|
IPage<OrdersViewPlatesPageDO> ordersViewPlatesPageDOIPage = plateMapper.selectPlanPlateInfoPage(page, planIds);
|
||||||
.eqIfPresent(FIELD_OP_IS_SPECIAL_SHAPED, vo.getRectangle() != null ? false: null)
|
|
||||||
.eqIfPresent(FIELD_OP_IS_SPECIAL_SHAPED, vo.getSpecialShaped())
|
|
||||||
.eqIfPresent("op.is_sculpt", vo.getSculpt())
|
|
||||||
.betweenIfPresent("op.width", new BigDecimal[]{vo.getWidthMinRang(), vo.getWidthMaxRang()})
|
|
||||||
.betweenIfPresent("op.height", new BigDecimal[]{vo.getLongMinRang(), vo.getLongMaxRang()})
|
|
||||||
.likeIfPresent("op.filter_type", insertSeparator(filterTypes));
|
|
||||||
|
|
||||||
Integer pageNo = (vo.getPageNo() - 1) * vo.getPageSize();
|
long total = ordersViewPlatesPageDOIPage.getTotal();
|
||||||
|
if (total == 0) {
|
||||||
List<PlateResList> pageResult = planItemMapper.selectPlateListByPlateIds(queryWrapperX,pageNo,vo.getPageSize());
|
|
||||||
|
|
||||||
if (CollUtil.isEmpty(pageResult)) {
|
|
||||||
return new PageResult<>();
|
return new PageResult<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Long sum = planItemMapper.selectPlateCountByPlateIds(queryWrapperX);
|
List<OrdersViewPlatesPageDO> ordersViewPlatesPageDOIPageRecords = ordersViewPlatesPageDOIPage.getRecords();
|
||||||
|
List<Long> plateIds = ordersViewPlatesPageDOIPageRecords.stream().map(OrdersViewPlatesPageDO::getId).toList();
|
||||||
|
|
||||||
return new PageResult<>(pageResult, sum);
|
// 查询关联关系
|
||||||
|
List<OrderItemDO> orderItemRelation = orderItemMapper.selectList(new LambdaQueryWrapperX<OrderItemDO>()
|
||||||
|
.in(OrderItemDO::getOrderId, orderIdSet)
|
||||||
|
.in(OrderItemDO::getPlateId, plateIds)
|
||||||
|
.select(OrderItemDO::getPlateId, OrderItemDO::getRoomId, OrderItemDO::getBodyId, OrderItemDO::getGroupId, OrderItemDO::getCompId)
|
||||||
|
);
|
||||||
|
|
||||||
|
// 暂存plateId:set<groupId>
|
||||||
|
Map<Long, Set<Long>> plateGroupMap = new HashMap<>();
|
||||||
|
// 暂存plateId:set<compId>
|
||||||
|
Map<Long, Set<Long>> plateCompMap = new HashMap<>();
|
||||||
|
// 暂存plateId:bodyId
|
||||||
|
Map<Long, Long> plateBodyMap = new HashMap<>();
|
||||||
|
|
||||||
|
Map<Long, OrdersViewPlatesPageDO> plateMap =
|
||||||
|
ordersViewPlatesPageDOIPageRecords.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
OrdersViewPlatesPageDO::getId,
|
||||||
|
Function.identity(),
|
||||||
|
(a, b) -> a
|
||||||
|
));
|
||||||
|
|
||||||
|
for (OrderItemDO item : orderItemRelation) {
|
||||||
|
|
||||||
|
Long plateId = item.getPlateId();
|
||||||
|
|
||||||
|
// 累计plateId下group_id
|
||||||
|
if (item.getGroupId() != null) {
|
||||||
|
plateGroupMap
|
||||||
|
.computeIfAbsent(plateId, k -> new HashSet<>())
|
||||||
|
.add(item.getGroupId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 累计plateId下comp_id
|
||||||
|
if (item.getCompId() != null) {
|
||||||
|
plateCompMap
|
||||||
|
.computeIfAbsent(plateId, k -> new HashSet<>())
|
||||||
|
.add(item.getCompId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 记录plateId下body_id
|
||||||
|
if (item.getBodyId() != null) {
|
||||||
|
plateBodyMap
|
||||||
|
.computeIfAbsent(plateId, k -> item.getBodyId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询加工组
|
||||||
|
Set<Long> allGroupIds = plateGroupMap.values()
|
||||||
|
.stream()
|
||||||
|
.flatMap(Set::stream)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
Map<Long, String> groupNameMap = Collections.emptyMap();
|
||||||
|
|
||||||
|
if (!allGroupIds.isEmpty()) {
|
||||||
|
groupNameMap = orderGroupMapper.selectByIds(allGroupIds)
|
||||||
|
.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
OrderGroupDO::getId,
|
||||||
|
OrderGroupDO::getName,
|
||||||
|
(a, b) -> a
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询部件
|
||||||
|
Set<Long> allCompIds = plateCompMap.values()
|
||||||
|
.stream()
|
||||||
|
.flatMap(Set::stream)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
Map<Long, String> compNameMap = Collections.emptyMap();
|
||||||
|
|
||||||
|
if (!allCompIds.isEmpty()) {
|
||||||
|
compNameMap = orderComponentMapper.selectByIds(allCompIds)
|
||||||
|
.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
OrderComponentDO::getId,
|
||||||
|
OrderComponentDO::getName,
|
||||||
|
(a, b) -> a
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询房间
|
||||||
|
Set<Long> allBodyIds = plateBodyMap.values()
|
||||||
|
.stream()
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
Map<Long, OrderBodyDO> bodyMap = Collections.emptyMap();
|
||||||
|
|
||||||
|
if (!allBodyIds.isEmpty()) {
|
||||||
|
bodyMap = orderBodyMapper.selectByIds(allBodyIds)
|
||||||
|
.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
OrderBodyDO::getId,
|
||||||
|
Function.identity(),
|
||||||
|
(a, b) -> a
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<OrderViewPlatePageRespVO> records = new ArrayList<>();
|
||||||
|
for (Map.Entry<Long, OrdersViewPlatesPageDO> entry : plateMap.entrySet()) {
|
||||||
|
|
||||||
|
Long plateId = entry.getKey();
|
||||||
|
OrdersViewPlatesPageDO plate = entry.getValue();
|
||||||
|
|
||||||
|
OrderViewPlatePageRespVO plateRespVO = BeanUtil.copyProperties(plate, OrderViewPlatePageRespVO.class);
|
||||||
|
|
||||||
|
// 用逗号拼接加工组名称
|
||||||
|
Set<Long> plateGroupIds = plateGroupMap.getOrDefault(plateId, Collections.emptySet());
|
||||||
|
List<String> groupNames = plateGroupIds.stream()
|
||||||
|
.map(groupNameMap::get)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
plateRespVO.setProcessGroupName(String.join(",", groupNames));
|
||||||
|
|
||||||
|
// 用逗号拼接部件组名称
|
||||||
|
Set<Long> plateCompIds = plateCompMap.getOrDefault(plateId, Collections.emptySet());
|
||||||
|
List<String> compNames = plateCompIds.stream()
|
||||||
|
.map(compNameMap::get)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
plateRespVO.setComponentName(String.join(",", compNames));
|
||||||
|
|
||||||
|
// 匹配房间名、柜体名
|
||||||
|
Long bodyId = plateBodyMap.get(plateId);
|
||||||
|
OrderBodyDO orderBodyDO = bodyMap.get(bodyId);
|
||||||
|
if(ObjectUtil.isNotNull(orderBodyDO)) {
|
||||||
|
plateRespVO.setBodyName(orderBodyDO.getName());
|
||||||
|
plateRespVO.setRoomName(orderBodyDO.getRoomName());
|
||||||
|
}
|
||||||
|
|
||||||
|
records.add(plateRespVO);
|
||||||
|
}
|
||||||
|
return new PageResult<>(records, total);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -4,7 +4,6 @@ import com.cf.imes.framework.common.pojo.PageResult;
|
|||||||
import com.cf.imes.module.executor.controller.admin.goods.vo.GoodsSaveReqVO;
|
import com.cf.imes.module.executor.controller.admin.goods.vo.GoodsSaveReqVO;
|
||||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderCadViewPlatePageReqVO;
|
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderCadViewPlatePageReqVO;
|
||||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrdersViewCadViewInfoRespVO;
|
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrdersViewCadViewInfoRespVO;
|
||||||
import com.cf.imes.module.executor.controller.admin.plan.vo.PlateDetailRespVO;
|
|
||||||
import com.cf.imes.module.executor.controller.admin.plate.vo.*;
|
import com.cf.imes.module.executor.controller.admin.plate.vo.*;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
|
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.plate.PlateGoodDO;
|
import com.cf.imes.module.executor.dal.dataobject.plate.PlateGoodDO;
|
||||||
@@ -76,7 +75,7 @@ public interface PlateService {
|
|||||||
* @param reqVO
|
* @param reqVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PlateDetailRespVO> getOrdersNoPlanPlate(NoPlanPlatePageReqVO reqVO);
|
NoPlanPlateRespVO getOrdersNoPlanPlate(NoPlanPlatePageReqVO reqVO);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+41
-8
@@ -9,6 +9,7 @@ import co.elastic.clients.elasticsearch._types.FieldValue;
|
|||||||
import co.elastic.clients.elasticsearch.core.SearchRequest;
|
import co.elastic.clients.elasticsearch.core.SearchRequest;
|
||||||
import co.elastic.clients.elasticsearch.core.SearchResponse;
|
import co.elastic.clients.elasticsearch.core.SearchResponse;
|
||||||
import co.elastic.clients.elasticsearch.core.search.Hit;
|
import co.elastic.clients.elasticsearch.core.search.Hit;
|
||||||
|
import com.alibaba.cloud.commons.lang.StringUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||||
@@ -19,6 +20,7 @@ import com.cf.imes.framework.common.exception.ServiceException;
|
|||||||
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.util.Assert.AssertUtils;
|
import com.cf.imes.framework.common.util.Assert.AssertUtils;
|
||||||
|
import com.cf.imes.framework.common.util.json.JsonUtils;
|
||||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||||
import com.cf.imes.framework.id.core.util.SnowflakeIdWorker3rd;
|
import com.cf.imes.framework.id.core.util.SnowflakeIdWorker3rd;
|
||||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
@@ -346,7 +348,7 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PlateDetailRespVO> getOrdersNoPlanPlate(NoPlanPlatePageReqVO pageReqVO) {
|
public NoPlanPlateRespVO getOrdersNoPlanPlate(NoPlanPlatePageReqVO pageReqVO) {
|
||||||
// 置空内部条件
|
// 置空内部条件
|
||||||
pageReqVO.setMaterialList(null);
|
pageReqVO.setMaterialList(null);
|
||||||
pageReqVO.setColorList(null);
|
pageReqVO.setColorList(null);
|
||||||
@@ -398,9 +400,21 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
// 查询订单未排单小板
|
// 查询订单未排单小板
|
||||||
List<PlateDetailDO> plateDetailDOS = plateMapper.selectNoPlanPlateWithFilter(pageReqVO, organId);
|
List<PlateDetailDO> plateDetailDOS = plateMapper.selectNoPlanPlateWithFilter(pageReqVO, organId);
|
||||||
// 合并加工组
|
// 合并加工组
|
||||||
List<PlateDetailDO> resultPlateList = mergeGroupName(plateDetailDOS);
|
List<PlateDetailDO> resultPlateList = mergeGroupAndComponentName(plateDetailDOS);
|
||||||
|
|
||||||
return BeanUtil.copyToList(resultPlateList, PlateDetailRespVO.class);
|
List<OrderModelDO> models =
|
||||||
|
resultPlateList.stream()
|
||||||
|
.map(PlateDetailDO::getModelData)
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.map(json -> JsonUtils.parseObject(json, OrderModelDO.class))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
AssertUtils.notEmpty(models, ORDER_PLAN_PLATE_MODEL_DATE_ERROR);
|
||||||
|
|
||||||
|
return NoPlanPlateRespVO.builder()
|
||||||
|
.plateList(BeanUtil.copyToList(resultPlateList, PlateDetailRespVO.class))
|
||||||
|
.plateModels(models)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -408,7 +422,12 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
*
|
*
|
||||||
* @param list
|
* @param list
|
||||||
*/
|
*/
|
||||||
public List<PlateDetailDO> mergeGroupName(List<PlateDetailDO> list) {
|
/**
|
||||||
|
* 合并加工组、部件名称
|
||||||
|
*
|
||||||
|
* @param list
|
||||||
|
*/
|
||||||
|
public List<PlateDetailDO> mergeGroupAndComponentName(List<PlateDetailDO> list) {
|
||||||
|
|
||||||
if (list == null || list.isEmpty()) {
|
if (list == null || list.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
@@ -417,6 +436,7 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
// plateId -> (groupName + 代表对象)
|
// plateId -> (groupName + 代表对象)
|
||||||
Map<Long, PlateDetailDO> resultMap = new LinkedHashMap<>();
|
Map<Long, PlateDetailDO> resultMap = new LinkedHashMap<>();
|
||||||
Map<Long, Set<String>> groupNameMap = new HashMap<>();
|
Map<Long, Set<String>> groupNameMap = new HashMap<>();
|
||||||
|
Map<Long, Set<String>> componentNameMap = new HashMap<>();
|
||||||
|
|
||||||
for (PlateDetailDO item : list) {
|
for (PlateDetailDO item : list) {
|
||||||
|
|
||||||
@@ -428,11 +448,16 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
// 保留第一条作为代表对象(或你也可以自定义取最新)
|
// 保留第一条作为代表对象(或你也可以自定义取最新)
|
||||||
resultMap.putIfAbsent(plateId, item);
|
resultMap.putIfAbsent(plateId, item);
|
||||||
|
|
||||||
if (item.getProcessGroupName() != null) {
|
if (StringUtils.isNotBlank(item.getProcessGroupName())) {
|
||||||
groupNameMap
|
groupNameMap
|
||||||
.computeIfAbsent(plateId, k -> new LinkedHashSet<>())
|
.computeIfAbsent(plateId, k -> new LinkedHashSet<>())
|
||||||
.add(item.getProcessGroupName());
|
.add(item.getProcessGroupName());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(item.getComponentName())) {
|
||||||
|
componentNameMap
|
||||||
|
.computeIfAbsent(plateId, k -> new LinkedHashSet<>())
|
||||||
|
.add(item.getComponentName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组装最终结果
|
// 组装最终结果
|
||||||
@@ -447,6 +472,10 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
if (groupNames != null && !groupNames.isEmpty()) {
|
if (groupNames != null && !groupNames.isEmpty()) {
|
||||||
item.setProcessGroupName(String.join(",", groupNames));
|
item.setProcessGroupName(String.join(",", groupNames));
|
||||||
}
|
}
|
||||||
|
Set<String> componentNames = componentNameMap.get(plateId);
|
||||||
|
if (CollUtil.isNotEmpty(componentNames)) {
|
||||||
|
item.setComponentName(String.join(",", componentNames));
|
||||||
|
}
|
||||||
|
|
||||||
result.add(item);
|
result.add(item);
|
||||||
}
|
}
|
||||||
@@ -1238,9 +1267,11 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
.filter(item -> item.getCadViewFileId() != null)
|
.filter(item -> item.getCadViewFileId() != null)
|
||||||
.collect(Collectors.toMap(OrderBodyDO::getId, OrderBodyDO::getCadViewFileId));
|
.collect(Collectors.toMap(OrderBodyDO::getId, OrderBodyDO::getCadViewFileId));
|
||||||
|
|
||||||
|
Boolean deleted = reqVO.getDeleted();
|
||||||
|
|
||||||
// 查询所有板件的视图所需信息
|
// 查询所有板件的视图所需信息
|
||||||
PageDTO<OrdersViewPlatesPageDO> page1 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
PageDTO<OrdersViewPlatesPageDO> page1 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
||||||
IPage<OrdersViewPlatesPageDO> viewPlatesPage = orderItemMapper.selectOrdersViewPlatesPage(page1, List.of(orderId), bodyIds, reqVO.getGroupIds(), null, true);
|
IPage<OrdersViewPlatesPageDO> viewPlatesPage = orderItemMapper.selectOrdersViewPlatesPage(page1, List.of(orderId), bodyIds, reqVO.getGroupIds(), null, true, deleted);
|
||||||
|
|
||||||
List<OrdersViewPlatesPageDO> plateRecords = viewPlatesPage.getRecords();
|
List<OrdersViewPlatesPageDO> plateRecords = viewPlatesPage.getRecords();
|
||||||
|
|
||||||
@@ -1251,7 +1282,7 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
|
|
||||||
// 查询所有配件的视图所需信息
|
// 查询所有配件的视图所需信息
|
||||||
PageDTO<OrdersViewPartsPageDO> page2 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
PageDTO<OrdersViewPartsPageDO> page2 = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
||||||
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page2, List.of(orderId), bodyIds, reqVO.getGroupIds(), null, null, true);
|
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page2, List.of(orderId), bodyIds, reqVO.getGroupIds(), null, null, true, deleted);
|
||||||
|
|
||||||
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
||||||
|
|
||||||
@@ -1288,9 +1319,11 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
.filter(item -> item.getCadViewFileId() != null)
|
.filter(item -> item.getCadViewFileId() != null)
|
||||||
.collect(Collectors.toMap(OrderBodyDO::getId, OrderBodyDO::getCadViewFileId));
|
.collect(Collectors.toMap(OrderBodyDO::getId, OrderBodyDO::getCadViewFileId));
|
||||||
|
|
||||||
|
Boolean deleted = reqVO.getDeleted();
|
||||||
|
|
||||||
// 查询所有配件的视图所需信息
|
// 查询所有配件的视图所需信息
|
||||||
PageDTO<OrdersViewPartsPageDO> page = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
PageDTO<OrdersViewPartsPageDO> page = new PageDTO<>(1, PageParam.PAGE_SIZE_NONE);
|
||||||
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page, List.of(orderId), bodyIds, reqVO.getGroupIds(), null, reqVO.getName(), true);
|
IPage<OrdersViewPartsPageDO> viewPartsPage = orderItemMapper.selectOrdersViewPartsPage(page, List.of(orderId), bodyIds, reqVO.getGroupIds(), null, reqVO.getName(), true, deleted);
|
||||||
|
|
||||||
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
List<OrdersViewPartsPageDO> partRecords = viewPartsPage.getRecords();
|
||||||
|
|
||||||
|
|||||||
+19
-10
@@ -497,7 +497,14 @@
|
|||||||
<if test="componentIds != null and componentIds.size() > 0">
|
<if test="componentIds != null and componentIds.size() > 0">
|
||||||
, MIN(comp_id) AS comp_id
|
, MIN(comp_id) AS comp_id
|
||||||
</if>
|
</if>
|
||||||
FROM order_item
|
<choose>
|
||||||
|
<when test="deleted">
|
||||||
|
FROM order_item_temp
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
FROM order_item
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
WHERE plate_id != 0
|
WHERE plate_id != 0
|
||||||
<if test="bodyIds != null and bodyIds.size() > 0">
|
<if test="bodyIds != null and bodyIds.size() > 0">
|
||||||
AND body_id IN
|
AND body_id IN
|
||||||
@@ -527,7 +534,7 @@
|
|||||||
) i
|
) i
|
||||||
INNER JOIN order_plate p ON p.id = i.plate_id
|
INNER JOIN order_plate p ON p.id = i.plate_id
|
||||||
INNER JOIN order_goods g ON g.id = p.goods_id
|
INNER JOIN order_goods g ON g.id = p.goods_id
|
||||||
WHERE p.deleted = false
|
WHERE p.deleted = #{deleted}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOrdersViewPlateIdsPage" resultType="java.lang.Long">
|
<select id="selectOrdersViewPlateIdsPage" resultType="java.lang.Long">
|
||||||
@@ -579,15 +586,11 @@
|
|||||||
op.color,
|
op.color,
|
||||||
op.model,
|
op.model,
|
||||||
op.spec,
|
op.spec,
|
||||||
i.num,
|
|
||||||
op.unit,
|
op.unit,
|
||||||
op.factory,
|
op.factory,
|
||||||
i.body_id,
|
i.body_id,
|
||||||
i.cad_view_id,
|
i.cad_view_id,
|
||||||
op.remark,
|
op.remark
|
||||||
op.width,
|
|
||||||
op.length,
|
|
||||||
op.thickness
|
|
||||||
<if test="componentIds != null and componentIds.size() > 0">
|
<if test="componentIds != null and componentIds.size() > 0">
|
||||||
, i.comp_id
|
, i.comp_id
|
||||||
</if>
|
</if>
|
||||||
@@ -595,12 +598,18 @@
|
|||||||
SELECT
|
SELECT
|
||||||
parts_id,
|
parts_id,
|
||||||
cad_view_id,
|
cad_view_id,
|
||||||
MIN(body_id) AS body_id,
|
MIN(body_id) AS body_id
|
||||||
SUM(num) AS num
|
|
||||||
<if test="componentIds != null and componentIds.size() > 0">
|
<if test="componentIds != null and componentIds.size() > 0">
|
||||||
, MIN(comp_id) AS comp_id
|
, MIN(comp_id) AS comp_id
|
||||||
</if>
|
</if>
|
||||||
FROM order_item
|
<choose>
|
||||||
|
<when test="deleted">
|
||||||
|
FROM order_item_temp
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
FROM order_item
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
WHERE plate_id = 0
|
WHERE plate_id = 0
|
||||||
<if test="orderIds != null and orderIds.size() > 0">
|
<if test="orderIds != null and orderIds.size() > 0">
|
||||||
AND order_id IN
|
AND order_id IN
|
||||||
|
|||||||
-88
@@ -233,54 +233,6 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectPlateListByPlateIds"
|
|
||||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateResList">
|
|
||||||
|
|
||||||
|
|
||||||
select distinct op.id as plateId,
|
|
||||||
op.order_id,
|
|
||||||
op.plate_no ,
|
|
||||||
op.goods_id as id,
|
|
||||||
op.custom_plate_no,
|
|
||||||
op.name as plateName,
|
|
||||||
op.is_special_shaped,
|
|
||||||
op.is_sculpt,
|
|
||||||
op.area,
|
|
||||||
op.seal_left,
|
|
||||||
op.seal_right,
|
|
||||||
op.seal_up,
|
|
||||||
op.seal_down,
|
|
||||||
og.material,
|
|
||||||
og.color,
|
|
||||||
op.width,
|
|
||||||
op.height,
|
|
||||||
op.thickness,
|
|
||||||
op.texture,
|
|
||||||
op.is_row_hole,
|
|
||||||
op.remark,
|
|
||||||
op.plan_id,
|
|
||||||
oi.room_id,
|
|
||||||
oi.body_id,
|
|
||||||
ob.name as bodyName,
|
|
||||||
ob.room_name as roomName,
|
|
||||||
op.is_side_sculpt as isSideSculpt,
|
|
||||||
op.is_2v as is2v,
|
|
||||||
op.is_side_2v as isSide2v
|
|
||||||
|
|
||||||
from order_plate op
|
|
||||||
join order_goods og on op.organ_id = og.organ_id and op.order_id = og.order_id and op.goods_id = og.id
|
|
||||||
join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id
|
|
||||||
join order_body ob on op.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id
|
|
||||||
|
|
||||||
${ew.customSqlSegment}
|
|
||||||
|
|
||||||
limit #{pageNo},#{pageSize};
|
|
||||||
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectPlateListByPlanId"
|
<select id="selectPlateListByPlanId"
|
||||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateResList">
|
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateResList">
|
||||||
|
|
||||||
@@ -321,27 +273,6 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectPlateCountByPlateIds" resultType="java.lang.Long">
|
|
||||||
|
|
||||||
|
|
||||||
select count(distinct op.id)
|
|
||||||
|
|
||||||
from order_plate op
|
|
||||||
join order_goods og on op.organ_id = og.organ_id and op.order_id = og.order_id and op.goods_id = og.id
|
|
||||||
join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id
|
|
||||||
join order_body ob on op.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id
|
|
||||||
|
|
||||||
${ew.customSqlSegment}
|
|
||||||
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<resultMap id="OrderGoodsMap" type="com.cf.imes.module.executor.controller.admin.plan.vo.OrderGoodsResp">
|
<resultMap id="OrderGoodsMap" type="com.cf.imes.module.executor.controller.admin.plan.vo.OrderGoodsResp">
|
||||||
|
|
||||||
<result property="goodsName" column="goodsName"/>
|
<result property="goodsName" column="goodsName"/>
|
||||||
@@ -519,8 +450,6 @@
|
|||||||
|
|
||||||
<select id="selectPlanPlateDetailList" resultMap="PlateDetailMap">
|
<select id="selectPlanPlateDetailList" resultMap="PlateDetailMap">
|
||||||
SELECT
|
SELECT
|
||||||
og.name AS processGroupName,
|
|
||||||
|
|
||||||
ogs.goods_id as plateGoodsId,
|
ogs.goods_id as plateGoodsId,
|
||||||
ogs.goods_name as goodsName,
|
ogs.goods_name as goodsName,
|
||||||
ogs.color as color,
|
ogs.color as color,
|
||||||
@@ -564,23 +493,6 @@
|
|||||||
AND op.order_id = ogs.order_id
|
AND op.order_id = ogs.order_id
|
||||||
AND op.goods_id = ogs.id
|
AND op.goods_id = ogs.id
|
||||||
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT group_id, plate_id
|
|
||||||
FROM order_item
|
|
||||||
WHERE plate_id != 0
|
|
||||||
and source_id = 0
|
|
||||||
and order_id in
|
|
||||||
<foreach collection="orderIds" item="orderIds" open="(" close=")" separator=",">
|
|
||||||
#{orderIds}
|
|
||||||
</foreach>
|
|
||||||
and organ_id = #{organId}
|
|
||||||
group by group_id, plate_id
|
|
||||||
) oi
|
|
||||||
ON op.id = oi.plate_id
|
|
||||||
|
|
||||||
LEFT JOIN order_group og
|
|
||||||
ON og.id = oi.group_id
|
|
||||||
|
|
||||||
WHERE op.organ_id = #{organId}
|
WHERE op.organ_id = #{organId}
|
||||||
and op.order_id in
|
and op.order_id in
|
||||||
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
||||||
|
|||||||
+94
-9
@@ -424,6 +424,7 @@
|
|||||||
<select id="selectNoPlanPlate" resultMap="PlateDetialMap">
|
<select id="selectNoPlanPlate" resultMap="PlateDetialMap">
|
||||||
SELECT
|
SELECT
|
||||||
og.name AS processGroupName,
|
og.name AS processGroupName,
|
||||||
|
oc.name AS componentName,
|
||||||
|
|
||||||
ogs.goods_id as plateGoodsId,
|
ogs.goods_id as plateGoodsId,
|
||||||
ogs.goods_name as goodsName,
|
ogs.goods_name as goodsName,
|
||||||
@@ -455,11 +456,21 @@
|
|||||||
op.open_door_type as openDoorType,
|
op.open_door_type as openDoorType,
|
||||||
op.offset_x as offsetX,
|
op.offset_x as offsetX,
|
||||||
op.offset_y as offsetY,
|
op.offset_y as offsetY,
|
||||||
op.is_special_shaped as isSpecialShaped,
|
(op.unregular_point_count > 0 ) AS isSpecialShaped,
|
||||||
op.is_sculpt as isSculpt,
|
op.is_sculpt as isSculpt,
|
||||||
|
op.is_side_sculpt AS sideModel,
|
||||||
op.is_row_hole as hasHole,
|
op.is_row_hole as hasHole,
|
||||||
op.remark as remark,
|
op.remark as remark,
|
||||||
op.model_data as modelData
|
op.model_data as modelData,
|
||||||
|
op.is_2v as is2v,
|
||||||
|
op.is_side_2v as isSide2v,
|
||||||
|
(op.front_model_count > 0 AND op.back_model_count > 0) AS doubleSideModel,
|
||||||
|
(op.front_hole_count > 0 AND op.back_hole_count > 0) AS doubleSideHole,
|
||||||
|
(op.front_model_count > 0) AS frontModel,
|
||||||
|
(op.back_model_count > 0) AS backModel,
|
||||||
|
(op.front_hole_count > 0) AS frontHole,
|
||||||
|
(op.back_hole_count > 0) AS backHole,
|
||||||
|
(op.side_hole_count > 0) AS sideHole
|
||||||
|
|
||||||
FROM order_plate op
|
FROM order_plate op
|
||||||
|
|
||||||
@@ -469,7 +480,9 @@
|
|||||||
AND op.goods_id = ogs.id
|
AND op.goods_id = ogs.id
|
||||||
|
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT group_id, plate_id
|
SELECT plate_id,
|
||||||
|
group_id,
|
||||||
|
comp_id
|
||||||
FROM order_item
|
FROM order_item
|
||||||
WHERE plate_id != 0
|
WHERE plate_id != 0
|
||||||
and source_id = 0
|
and source_id = 0
|
||||||
@@ -478,13 +491,16 @@
|
|||||||
#{orderIds}
|
#{orderIds}
|
||||||
</foreach>
|
</foreach>
|
||||||
and organ_id = #{organId}
|
and organ_id = #{organId}
|
||||||
group by group_id, plate_id
|
GROUP BY plate_id, group_id, comp_id
|
||||||
) oi
|
) oi
|
||||||
ON op.id = oi.plate_id
|
ON op.id = oi.plate_id
|
||||||
|
|
||||||
LEFT JOIN order_group og
|
LEFT JOIN order_group og
|
||||||
ON og.id = oi.group_id
|
ON og.id = oi.group_id
|
||||||
|
|
||||||
|
LEFT JOIN order_component oc
|
||||||
|
ON oc.id = oi.comp_id
|
||||||
|
|
||||||
WHERE op.organ_id = #{organId}
|
WHERE op.organ_id = #{organId}
|
||||||
and op.order_id in
|
and op.order_id in
|
||||||
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
||||||
@@ -502,6 +518,7 @@
|
|||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
og.name AS processGroupName,
|
og.name AS processGroupName,
|
||||||
|
oc.name AS componentName,
|
||||||
|
|
||||||
ogs.goods_id as plateGoodsId,
|
ogs.goods_id as plateGoodsId,
|
||||||
ogs.goods_name as goodsName,
|
ogs.goods_name as goodsName,
|
||||||
@@ -514,6 +531,7 @@
|
|||||||
op.name as name,
|
op.name as name,
|
||||||
op.plate_no as plateNo,
|
op.plate_no as plateNo,
|
||||||
op.custom_plate_no as customPlateNo,
|
op.custom_plate_no as customPlateNo,
|
||||||
|
p.cad_plate_no AS customNumber,
|
||||||
op.type as type,
|
op.type as type,
|
||||||
op.goods_id as goodsId,
|
op.goods_id as goodsId,
|
||||||
op.width,
|
op.width,
|
||||||
@@ -534,11 +552,20 @@
|
|||||||
op.open_door_type as openDoorType,
|
op.open_door_type as openDoorType,
|
||||||
op.offset_x as offsetX,
|
op.offset_x as offsetX,
|
||||||
op.offset_y as offsetY,
|
op.offset_y as offsetY,
|
||||||
op.is_special_shaped as isSpecialShaped,
|
(op.unregular_point_count > 0 ) AS isSpecialShaped,
|
||||||
op.is_sculpt as isSculpt,
|
op.is_sculpt as isSculpt,
|
||||||
op.is_row_hole as hasHole,
|
op.is_row_hole as hasHole,
|
||||||
op.remark as remark,
|
op.remark as remark,
|
||||||
op.model_data as modelData
|
op.model_data as modelData,
|
||||||
|
op.is_2v as is2v,
|
||||||
|
op.is_side_2v as isSide2v,
|
||||||
|
(op.front_model_count > 0 AND op.back_model_count > 0) AS doubleSideModel,
|
||||||
|
(op.front_hole_count > 0 AND op.back_hole_count > 0) AS doubleSideHole,
|
||||||
|
(op.front_model_count > 0) AS frontModel,
|
||||||
|
(op.back_model_count > 0) AS backModel,
|
||||||
|
(op.front_hole_count > 0) AS frontHole,
|
||||||
|
(op.back_hole_count > 0) AS backHole,
|
||||||
|
(op.side_hole_count > 0) AS sideHole
|
||||||
|
|
||||||
FROM order_plate op
|
FROM order_plate op
|
||||||
|
|
||||||
@@ -548,7 +575,9 @@
|
|||||||
AND op.goods_id = ogs.id
|
AND op.goods_id = ogs.id
|
||||||
|
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT group_id, plate_id
|
SELECT plate_id,
|
||||||
|
group_id,
|
||||||
|
comp_id
|
||||||
FROM order_item
|
FROM order_item
|
||||||
WHERE plate_id != 0
|
WHERE plate_id != 0
|
||||||
AND source_id = 0
|
AND source_id = 0
|
||||||
@@ -561,7 +590,7 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
GROUP BY group_id, plate_id
|
GROUP BY plate_id, group_id, comp_id
|
||||||
) oi
|
) oi
|
||||||
ON op.id = oi.plate_id
|
ON op.id = oi.plate_id
|
||||||
|
|
||||||
@@ -569,6 +598,10 @@
|
|||||||
ON og.id = oi.group_id
|
ON og.id = oi.group_id
|
||||||
AND og.organ_id = #{organId}
|
AND og.organ_id = #{organId}
|
||||||
|
|
||||||
|
LEFT JOIN order_component oc
|
||||||
|
ON oc.id = oi.comp_id
|
||||||
|
AND oc.organ_id = #{organId}
|
||||||
|
|
||||||
JOIN orders o
|
JOIN orders o
|
||||||
ON o.id = op.order_id
|
ON o.id = op.order_id
|
||||||
AND o.organ_id = #{organId}
|
AND o.organ_id = #{organId}
|
||||||
@@ -1462,9 +1495,12 @@
|
|||||||
(p.front_hole_count > 0) AS frontHole,
|
(p.front_hole_count > 0) AS frontHole,
|
||||||
(p.back_hole_count > 0) AS backHole,
|
(p.back_hole_count > 0) AS backHole,
|
||||||
(p.side_hole_count > 0) AS sideHole,
|
(p.side_hole_count > 0) AS sideHole,
|
||||||
|
p.split_height,
|
||||||
|
p.split_width,
|
||||||
og.material,
|
og.material,
|
||||||
og.color,
|
og.color,
|
||||||
og.brand
|
og.brand,
|
||||||
|
og.goods_name
|
||||||
FROM order_plate p
|
FROM order_plate p
|
||||||
INNER JOIN order_goods og ON p.order_id = og.order_id and og.organ_id = p.organ_id AND p.goods_id = og.id
|
INNER JOIN order_goods og ON p.order_id = og.order_id and og.organ_id = p.organ_id AND p.goods_id = og.id
|
||||||
WHERE p.id IN
|
WHERE p.id IN
|
||||||
@@ -1533,6 +1569,55 @@
|
|||||||
AND o.deleted = false
|
AND o.deleted = false
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPlanPlateInfoPage"
|
||||||
|
resultType="com.cf.imes.module.executor.dal.dataobject.orderItem.OrdersViewPlatesPageDO">
|
||||||
|
SELECT
|
||||||
|
p.id,
|
||||||
|
p.order_id,
|
||||||
|
p.plate_no,
|
||||||
|
p.name,
|
||||||
|
p.width,
|
||||||
|
p.height,
|
||||||
|
p.thickness,
|
||||||
|
p.custom_plate_no,
|
||||||
|
p.cad_plate_no AS customNumber,
|
||||||
|
p.remark,
|
||||||
|
p.seal_left,
|
||||||
|
p.seal_down,
|
||||||
|
p.seal_right,
|
||||||
|
p.seal_up,
|
||||||
|
p.area,
|
||||||
|
p.texture,
|
||||||
|
(p.unregular_point_count > 0 ) AS isSpecialShaped,
|
||||||
|
p.is_sculpt ,
|
||||||
|
p.is_side_sculpt AS sideModel,
|
||||||
|
p.is_row_hole,
|
||||||
|
p.hole_face,
|
||||||
|
p.open_door_type,
|
||||||
|
p.is_2v as is2v,
|
||||||
|
p.is_side_2v as isSide2v,
|
||||||
|
(p.front_model_count > 0 AND p.back_model_count > 0) AS doubleSideModel,
|
||||||
|
(p.front_hole_count > 0 AND p.back_hole_count > 0) AS doubleSideHole,
|
||||||
|
(p.front_model_count > 0) AS frontModel,
|
||||||
|
(p.back_model_count > 0) AS backModel,
|
||||||
|
(p.front_hole_count > 0) AS frontHole,
|
||||||
|
(p.back_hole_count > 0) AS backHole,
|
||||||
|
(p.side_hole_count > 0) AS sideHole,
|
||||||
|
p.split_height,
|
||||||
|
p.split_width,
|
||||||
|
og.material,
|
||||||
|
og.color,
|
||||||
|
og.brand,
|
||||||
|
og.goods_name
|
||||||
|
FROM order_plate p
|
||||||
|
INNER JOIN order_goods og ON p.order_id = og.order_id and og.organ_id = p.organ_id AND p.goods_id = og.id
|
||||||
|
WHERE p.plan_id IN
|
||||||
|
<foreach item="planId" collection="planIds" open="(" separator="," close=")">
|
||||||
|
#{planId}
|
||||||
|
</foreach>
|
||||||
|
and p.deleted = false
|
||||||
|
</select>
|
||||||
|
|
||||||
<resultMap id="orderItemMap" type="com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO">
|
<resultMap id="orderItemMap" type="com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO">
|
||||||
<result property="packageNo" column="packageId"/>
|
<result property="packageNo" column="packageId"/>
|
||||||
<result property="roomName" column="roomName"/>
|
<result property="roomName" column="roomName"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user