mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
Merge branch 'main' of ssh://192.168.1.205:9922/cf_devdept2/cf_imes_server
This commit is contained in:
-6
@@ -120,10 +120,4 @@ public class PlateController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/selectPlate")
|
||||
@Operation(summary = "查看工序对应的板件信息")
|
||||
public CommonResult<List<BodyPlateDetailVO> > selectPlate(@Valid ProcessPlateReqVO reqVO){
|
||||
return success(plateService.selectPlate(reqVO));
|
||||
}
|
||||
|
||||
}
|
||||
-5
@@ -25,11 +25,6 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
||||
|
||||
List<OrderPartsRespVO> selectPartsDetailByOrderId(@Param("orderId")Long orderId, @Param("roomId")Long roomId , @Param("bodyId")Long bodyId );
|
||||
|
||||
default List<OrderItemDO> selectByOrderId(Long orderId) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderItemDO>()
|
||||
.eqIfPresent(OrderItemDO::getOrderId,orderId));
|
||||
|
||||
}
|
||||
|
||||
List<OrderPlatesDetailRespVO> selectPartsByOrderId(@Param("orderId") Long orderId);
|
||||
}
|
||||
+3
-4
@@ -3,17 +3,16 @@ package com.cf.imes.module.executor.dal.mysql.processStepItem;
|
||||
|
||||
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.plate.vo.BodyPlateDetailVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.ordermodel.OrderModelDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.processStepItem.OrderProcessStepItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProcessStepItemMapper extends BaseMapperX<OrderProcessStepItemDO> {
|
||||
|
||||
default List<OrderProcessStepItemDO> selectBodyIds(Long stepItemId) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderProcessStepItemDO>()
|
||||
.eqIfPresent(OrderProcessStepItemDO::getId,stepItemId));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -89,8 +89,7 @@ public interface PlateService {
|
||||
*/
|
||||
void updatePlateByRawGoodsId(List<GoodsSaveReqVO> createReqVOS);
|
||||
|
||||
|
||||
List<BodyPlateDetailVO> getPlateModelByPlateId(List<Long> bodyIds);
|
||||
|
||||
// 查看工序对应的板件信息
|
||||
List<BodyPlateDetailVO> selectPlate(ProcessPlateReqVO reqVO);
|
||||
}
|
||||
-19
@@ -195,25 +195,6 @@ public class PlateServiceImpl implements PlateService {
|
||||
|
||||
|
||||
|
||||
// 查看工序对应的板件信息
|
||||
@Override
|
||||
public List<BodyPlateDetailVO> selectPlate(ProcessPlateReqVO reqVO) {
|
||||
|
||||
if(reqVO.getProcessType() == 7){
|
||||
// 等于 7(组件加工) ,根据明细ID查询对应的柜体ID,再传入方法查询对应的板材信息
|
||||
List<OrderProcessStepItemDO> orderProcessStepItemNDOS = processStepItemMapper.selectBodyIds(reqVO.getStepItemId());
|
||||
List<Long> bodyIds = orderProcessStepItemNDOS.stream().map(item -> item.getBodyId()).collect(Collectors.toList());
|
||||
return getPlateModelByPlateId(bodyIds);
|
||||
|
||||
}
|
||||
|
||||
// 不等于 7(组件加工) ,直接根据订单号查询所有的柜体id,再传入方法查询对应的板材信息
|
||||
List<OrderItemDO> orderItemDOS = orderItemMapper.selectByOrderId(reqVO.getOrderId());
|
||||
List<Long> bodyIds = orderItemDOS.stream().map(item -> item.getBodyId()).collect(Collectors.toList());
|
||||
|
||||
return getPlateModelByPlateId(bodyIds);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private List<OrderModelDO> buildRespByPlateIds(Collection<Long> plateIds, String index) {
|
||||
|
||||
+4
-4
@@ -88,10 +88,10 @@ public class PackController {
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getOrderPlate")
|
||||
@Operation(summary = "查看生产订单对应的板材信息")
|
||||
@Parameter(name = "orderId", description = "生产单Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
// @GetMapping("/getOrderPlate")
|
||||
// @Operation(summary = "查看生产订单对应的板材信息")
|
||||
// @Parameter(name = "orderId", description = "生产单Id", required = true)
|
||||
// @PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<OrderPlateDetailsRespVO> getOrderPlateList(@Valid @RequestParam("orderId") Long orderId) {
|
||||
|
||||
return success(packService.getOrderPlateList(orderId));
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ import lombok.ToString;
|
||||
public class PackPageReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "生产状态(2:生产中,4:打包完成,默认生产中)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Long status;
|
||||
@Schema(description = "生产状态(已完成,未完成)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Boolean status;
|
||||
|
||||
|
||||
@Schema(description = "订单号")
|
||||
|
||||
+23
-6
@@ -5,8 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 生产单表 order_{N} Response VO")
|
||||
@@ -18,6 +17,10 @@ public class PackRespVO {
|
||||
private Long id;
|
||||
|
||||
|
||||
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
|
||||
private Long packId;
|
||||
|
||||
|
||||
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
|
||||
private String customOrderNo;
|
||||
|
||||
@@ -31,7 +34,7 @@ public class PackRespVO {
|
||||
|
||||
|
||||
@Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED,example = "0")
|
||||
private Long status;
|
||||
private Boolean status;
|
||||
|
||||
|
||||
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED,example = "张三")
|
||||
@@ -59,16 +62,30 @@ public class PackRespVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "已打包数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@Schema(description = "已打包数-包裹数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packCount;
|
||||
|
||||
|
||||
@Schema(description = "已打包片数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "已打包片数-已处理量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packPieceCount;
|
||||
|
||||
|
||||
@Schema(description = "总片数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "总片数-板件总数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long totalPieceCount;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "待处理量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long pendingNum;
|
||||
|
||||
|
||||
// @Schema(description = "当前包裹的板件数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
// private Long currentPackNum;
|
||||
|
||||
@Schema(description = "生产单对应的板件信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
List<PlateDetailsRespVO> plateDetailsRespVO;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -20,6 +20,13 @@ public class PlateDetailsRespVO {
|
||||
@ExcelProperty("柜体名称")
|
||||
private String cabinetName;
|
||||
|
||||
@Schema(description = "房间ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String roomId;
|
||||
|
||||
@Schema(description = "柜体ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String bodyId;
|
||||
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("板编号")
|
||||
private String plateNo;
|
||||
|
||||
+11
-2
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 生产单工序 process")
|
||||
@Tag(name = "管理后台 - 生产单工序")
|
||||
@RestController
|
||||
@RequestMapping("/manage/process")
|
||||
@Validated
|
||||
@@ -75,9 +75,18 @@ public class ProductionProcessController {
|
||||
|
||||
|
||||
|
||||
@GetMapping("/selectPlate")
|
||||
@Operation(summary = "查看工序对应的板件信息")
|
||||
public CommonResult<List<OrderPlateReqVO> > selectPlate(@Valid ProcessPlateReqVO reqVO){
|
||||
return success(productionProcessService.selectPlate(reqVO));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/selectBodyName")
|
||||
@Operation(summary = "查询生产单对应的柜体名称")
|
||||
public CommonResult<List<OrderBodyRespVo>> selectBodyName(OrderBodyReqVO reqVO){
|
||||
public CommonResult<List<OrderBodyRespVo>> selectBodyName(@Valid OrderBodyReqVO reqVO){
|
||||
return success(productionProcessService.selectBodyName(reqVO));
|
||||
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 查询生产单对应的板件信息 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderPlateReqVO {
|
||||
|
||||
|
||||
// @Schema(description = "柜体名称")
|
||||
// private List<String> bodyName;
|
||||
//
|
||||
//
|
||||
// @Schema(description = "柜体ID")
|
||||
// private List<Long> bodyIds;
|
||||
|
||||
|
||||
@Schema(description = "柜体ID和名称")
|
||||
List<OrderBodyRespVo> orderBodyRespVoList;
|
||||
|
||||
|
||||
@Schema(description = "板件信息")
|
||||
List<PlateDetails> plateDetails;
|
||||
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PlateDetails {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "板编号")
|
||||
private Long plateId;
|
||||
|
||||
@Schema(description = "板号")
|
||||
private Long plateNo;
|
||||
|
||||
@Schema(description = "长")
|
||||
private Long length;
|
||||
|
||||
@Schema(description = "宽")
|
||||
private Long width;
|
||||
|
||||
@Schema(description = "厚")
|
||||
private Long thickness;
|
||||
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.cf.imes.module.manage.controller.admin.process.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 查询板件")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class ProcessPlateReqVO {
|
||||
|
||||
|
||||
@Schema(description = "工序类型",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long processType;
|
||||
|
||||
|
||||
@Schema(description = "生产单号",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
|
||||
|
||||
@Schema(description = "工序明细ID",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long stepItemId;
|
||||
|
||||
|
||||
@Schema(description = "柜体ID")
|
||||
private Long bodyId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.cf.imes.module.manage.dal.mysql.pack;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.OtherPackReqVO;
|
||||
@@ -38,7 +39,7 @@ public interface OrderPackageMapper extends BaseMapperX<OrderPackageDO> {
|
||||
|
||||
|
||||
|
||||
List<PackRespVO> selectPackPage(@Param("collect") List<Long> collect);
|
||||
List<PackRespVO> selectPackPage(/*@Param("page") IPage page,*/@Param("collect") List<Long> collect);
|
||||
|
||||
|
||||
List<PlateDetailsRespVO> selectMissingBoard(Long orderNo);
|
||||
|
||||
+1
-4
@@ -43,9 +43,6 @@ public interface ProcessStepItemMapper extends BaseMapperX<OrderProcessStepItemN
|
||||
|
||||
|
||||
|
||||
default List<OrderProcessStepItemNDO> selectBodyIds(Long stepItemId) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderProcessStepItemNDO>()
|
||||
.eqIfPresent(OrderProcessStepItemNDO::getId,stepItemId));
|
||||
List<OrderPlateReqVO> selectBodyIds(@Param("stepItemId") Long stepItemId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+3
-5
@@ -6,6 +6,8 @@ import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.grouping.vo.OrderPlateListRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.OrderPlateReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessPlateReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlateRespVO;
|
||||
@@ -76,11 +78,7 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
||||
|
||||
|
||||
|
||||
default List<OrderItemDO> selectByOrderId(Long orderId) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderItemDO>()
|
||||
.eqIfPresent(OrderItemDO::getOrderId,orderId));
|
||||
|
||||
}
|
||||
List<OrderPlateReqVO> selectByOrderId(ProcessPlateReqVO reqVO);
|
||||
|
||||
|
||||
OrderPlateDetailsRespVO selectOrderPlateDetails(@Param("orderId") Long orderId);
|
||||
|
||||
+9
-6
@@ -1,6 +1,9 @@
|
||||
package com.cf.imes.module.manage.service.pack;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||
import com.cf.imes.framework.common.enums.OrderPackageStatusEnum;
|
||||
import com.cf.imes.framework.common.enums.OrderPackageTypeEnum;
|
||||
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
|
||||
@@ -61,28 +64,28 @@ public class PackServiceImpl implements PackService {
|
||||
@Override
|
||||
public PageResult<PackRespVO> getPackPage(PackPageReqVO pageReqVO) {
|
||||
|
||||
// PageDTO<PackRespVO> page = new PageDTO<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
|
||||
// 根据生产状态查询生产单号
|
||||
List<Long> collect = productionStatusMapper.selectPackPage(pageReqVO).stream().map(OrderDO::getId).collect(Collectors.toList());
|
||||
|
||||
PageHelper.startPage(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
|
||||
// 查询包裹的已打包数和已打片数
|
||||
List<PackRespVO> packRespVOS = orderPackageMapper.selectPackPage(collect);
|
||||
|
||||
// 查询打包首页分页数据信息和总片数
|
||||
List<PackRespVO> packRespVOS1 = productionStatusMapper.selectOrderPlate(collect);
|
||||
// 查询打包首页分页数据信息,包裹数,板件数量信息
|
||||
List<PackRespVO> packRespVOS = productionStatusMapper.selectOrderPlate(collect);
|
||||
|
||||
PageInfo<PackRespVO> pageInfo = new PageInfo<>(packRespVOS);
|
||||
pageInfo.setList(packRespVOS1);
|
||||
|
||||
// 转换成 PageResult 分页类型
|
||||
PageResult<PackRespVO> priceRateReqVOPageResult = PageHelperUtil.convertToPageResult(pageInfo);
|
||||
|
||||
|
||||
return priceRateReqVOPageResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查看生产订单对应的包裹信息
|
||||
@Override
|
||||
public List<OrderPackageDO> getOrderPack(PackageDetailsReqVO reqVO) {
|
||||
|
||||
+4
@@ -31,4 +31,8 @@ public interface ProductionProcessService {
|
||||
|
||||
// 查询生产单对应的柜体名称
|
||||
List<OrderBodyRespVo> selectBodyName(OrderBodyReqVO reqVO);
|
||||
|
||||
|
||||
List<OrderPlateReqVO> selectPlate(ProcessPlateReqVO reqVO);
|
||||
|
||||
}
|
||||
|
||||
+19
@@ -201,6 +201,25 @@ public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<OrderPlateReqVO> selectPlate(ProcessPlateReqVO reqVO) {
|
||||
|
||||
|
||||
if(reqVO.getProcessType() == 7){
|
||||
// 等于 7(组件加工) ,根据明细ID查询对应的柜体ID,再传入方法查询对应的板材信息
|
||||
List<OrderPlateReqVO> plateDetails = processStepItemMapper.selectBodyIds(reqVO.getStepItemId());
|
||||
|
||||
return plateDetails;
|
||||
|
||||
}
|
||||
|
||||
// 不等于 7(组件加工) ,直接根据订单号查询所有的柜体id,再传入方法查询对应的板材信息
|
||||
return orderItemMapper.selectByOrderId(reqVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+39
@@ -48,6 +48,45 @@
|
||||
|
||||
|
||||
|
||||
<resultMap id="PlateMap" type="com.cf.imes.module.manage.controller.admin.process.vo.OrderPlateReqVO">
|
||||
|
||||
|
||||
<collection property="orderBodyRespVoList" ofType="com.cf.imes.module.manage.controller.admin.process.vo.OrderBodyRespVo">
|
||||
<result property="id" column="bodyId"/>
|
||||
<result property="name" column="bodyName"/>
|
||||
|
||||
</collection>
|
||||
<collection property="plateDetails" ofType="com.cf.imes.module.manage.controller.admin.process.vo.PlateDetails">
|
||||
|
||||
<result property="plateId" column="plateId"/>
|
||||
<result property="plateNo" column="plateNo"/>
|
||||
<result property="width" column="width"/>
|
||||
<result property="length" column="length"/>
|
||||
<result property="thickness" column="thickness"/>
|
||||
</collection>
|
||||
|
||||
</resultMap>
|
||||
<select id="selectBodyIds"
|
||||
resultMap="PlateMap"
|
||||
parameterType="java.lang.Long">
|
||||
|
||||
|
||||
select
|
||||
oi.body_id as bodyId,
|
||||
ob.name as bodyName,
|
||||
op.id as plateId,
|
||||
op.plate_no as plateNo,
|
||||
op.width as width,
|
||||
op.height as length,
|
||||
op.thickness as thickness
|
||||
from order_process_step_item opsi
|
||||
join order_item oi on opsi.body_id = oi.body_id
|
||||
join order_body ob on oi.body_id = ob.id
|
||||
join order_plate op on oi.plate_id = op.id
|
||||
where opsi.id = #{stepItemId}
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
+50
@@ -457,4 +457,54 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="PlateDetialsMap" type="com.cf.imes.module.manage.controller.admin.process.vo.OrderPlateReqVO">
|
||||
|
||||
<collection property="orderBodyRespVoList" ofType="com.cf.imes.module.manage.controller.admin.process.vo.OrderBodyRespVo">
|
||||
<result property="id" column="bodyId"/>
|
||||
<result property="name" column="bodyName"/>
|
||||
|
||||
</collection>
|
||||
<collection property="plateDetails" ofType="com.cf.imes.module.manage.controller.admin.process.vo.PlateDetails">
|
||||
|
||||
<result property="plateId" column="plateId"/>
|
||||
<result property="plateNo" column="plateNo"/>
|
||||
<result property="width" column="width"/>
|
||||
<result property="length" column="length"/>
|
||||
<result property="thickness" column="thickness"/>
|
||||
</collection>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByOrderId"
|
||||
resultMap="PlateDetialsMap"
|
||||
parameterType="com.cf.imes.module.manage.controller.admin.process.vo.ProcessPlateReqVO">
|
||||
|
||||
|
||||
select
|
||||
oi.body_id as bodyId,
|
||||
ob.name as bodyName,
|
||||
op.id as plateId,
|
||||
op.plate_no as plateNo,
|
||||
op.width as width,
|
||||
op.height as length,
|
||||
op.thickness as thickness
|
||||
from order_item oi
|
||||
join order_plate op on oi.plate_id = op.id
|
||||
join order_body ob on oi.body_id = ob.id
|
||||
|
||||
<where>
|
||||
<if test="orderId != null">
|
||||
and oi.order_id = #{orderId}
|
||||
</if>
|
||||
|
||||
<if test="bodyId != null">
|
||||
and oi.body_id = #{bodyId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
+97
-10
@@ -45,15 +45,64 @@
|
||||
<result property="salesman" column="salesman"/>
|
||||
<result property="splitter" column="splitter"/>
|
||||
<result property="createTime" column="createTime"/>
|
||||
<result property="totalPieceCount" column="num"/>
|
||||
<result property="packId" column="packId"/>
|
||||
|
||||
<result property="packCount" column="packNum"/>
|
||||
<result property="totalPieceCount" column="plateNum"/>
|
||||
<result property="packPieceCount" column="plateProcessedNum"/>
|
||||
|
||||
<collection property="plateDetailsRespVO" ofType="com.cf.imes.module.manage.controller.admin.pack.vo.PlateDetailsRespVO">
|
||||
|
||||
<result property="roomId" column="roomId"/>
|
||||
<result property="bodyId" column="bodyId"/>
|
||||
<result property="roomName" column="roomName"/>
|
||||
<result property="cabinetName" column="bodyName"/>
|
||||
<result property="plateNo" column="plateId"/>
|
||||
<result property="plateName" column="plateName"/>
|
||||
<result property="material" column="plateMaterial"/>
|
||||
<result property="color" column="plateColor"/>
|
||||
<result property="width" column="plateWidth"/>
|
||||
<result property="height" column="plateHeight"/>
|
||||
<result property="thickness" column="plateThickness"/>
|
||||
<result property="area" column="plateArea"/>
|
||||
<result property="texture" column="texture"/>
|
||||
<result property="specialShaped" column="specialShaped"/>
|
||||
<result property="profiling" column="profiling"/>
|
||||
<result property="rowHole" column="rowHole"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="processGroup" column="name"/>
|
||||
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectOrderPlate" resultType="com.cf.imes.module.manage.controller.admin.pack.vo.PackRespVO"
|
||||
<select id="selectOrderPlate"
|
||||
parameterType="java.util.List"
|
||||
resultMap="PackMap">
|
||||
|
||||
SELECT
|
||||
oi.num as num,
|
||||
<!-- SELECT-->
|
||||
<!-- oi.num as num,-->
|
||||
<!-- o.id as orderNo,-->
|
||||
<!-- o.custom_order_no as customOrderNo,-->
|
||||
<!-- o.dealer as dealer,-->
|
||||
<!-- o.create_time as createTime,-->
|
||||
<!-- o.delivery_date as deliveryDate,-->
|
||||
<!-- o.customer as customer,-->
|
||||
<!-- o.phone_number as phoneNumber,-->
|
||||
<!-- o.address as address,-->
|
||||
<!-- o.salesman as salesman,-->
|
||||
<!-- o.splitter as splitter,-->
|
||||
<!-- o.status as status-->
|
||||
|
||||
<!-- FROM `order` o-->
|
||||
<!-- join order_item oi on o.id = oi.order_id-->
|
||||
<!-- WHERE o.id in-->
|
||||
<!-- <foreach item="id" collection="collect" open="(" separator="," close=")">-->
|
||||
<!-- #{id}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- group by num,orderNo,customOrderNo,dealer,createTime,deliveryDate,customer,phoneNumber,address,salesman,splitter,status;-->
|
||||
|
||||
|
||||
SELECT distinct
|
||||
o.id as orderNo,
|
||||
o.custom_order_no as customOrderNo,
|
||||
o.dealer as dealer,
|
||||
@@ -64,15 +113,53 @@
|
||||
o.address as address,
|
||||
o.salesman as salesman,
|
||||
o.splitter as splitter,
|
||||
o.status as status
|
||||
o.status as status,
|
||||
oi.package_id as packId,
|
||||
count(distinct
|
||||
case
|
||||
when oi.package_id!=0 then oi.package_id end
|
||||
) as packNum,
|
||||
count(distinct case
|
||||
when oi.package_id !=0 and oi.parts_id = 0 then oi.plate_id end )as plateProcessedNum,
|
||||
count(distinct
|
||||
case
|
||||
when oi.plate_id !=0 then oi.plate_id end
|
||||
)as plateNum,
|
||||
|
||||
ob.room_id as roomId,
|
||||
ob.id as bodyId,
|
||||
og.name as name,
|
||||
ob.room_name as roomName,
|
||||
ob.name as bodyName,
|
||||
|
||||
op.name as plateName,
|
||||
ogs.material as plateMaterial,
|
||||
ogs.color as plateColor,
|
||||
ogs.height as plateHeight,
|
||||
ogs.width as plateWidth,
|
||||
ogs.thickness as plateThickness,
|
||||
op.area as plateArea,
|
||||
op.texture as texture ,
|
||||
op.remark as remark,
|
||||
|
||||
CASE WHEN op.unregular_point_count = 0 THEN '否' ELSE '是' END AS specialShaped,
|
||||
CASE WHEN front_model_count = 0 or op.back_hole_count or op.side_hole_count THEN '否' ELSE '是' END AS profiling,
|
||||
CASE WHEN front_hole_count = 0 or op.back_model_count THEN '否' ELSE '是' END AS rowHole
|
||||
|
||||
FROM `order` o
|
||||
join order_item oi on o.id = oi.order_id
|
||||
WHERE o.id in
|
||||
<foreach item="id" collection="collect" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
group by num,orderNo,customOrderNo,dealer,createTime,deliveryDate,customer,phoneNumber,address,salesman,splitter,status;
|
||||
join order_plate op on oi.plate_id = op.id
|
||||
join order_goods ogs on op.goods_id = ogs.id
|
||||
join order_body ob on oi.body_id = ob.id
|
||||
join order_group og on ob.id = og.body_id
|
||||
|
||||
|
||||
WHERE o.id in
|
||||
<foreach item="id" collection="collect" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
group by orderNo,op.id,oi.package_id,name,roomId,bodyId,roomName,bodyName,plateName,plateMaterial,plateColor,plateHeight,plateWidth,plateThickness,plateArea,texture,remark;
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user