mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
分页打包数据对应修正-新增排单:板材分组接口新增
This commit is contained in:
+2
@@ -25,6 +25,8 @@ public class PackPageReqVO extends PageParam {
|
||||
@Schema(description = "自定义单号")
|
||||
private String customOrderNo;
|
||||
|
||||
@Schema(description = "经销商")
|
||||
private String dealer;
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
+2
-1
@@ -36,7 +36,7 @@ public interface OrderPackageMapper extends BaseMapperX<OrderPackageDO> {
|
||||
|
||||
|
||||
|
||||
List<PackRespVO> selectPackPage(@Param("orderIds") List<Long> orderIds);
|
||||
List<PackRespVO> selectPackPage(@Param("orderIds") List<Long> orderIds,@Param("organId") Long organId);
|
||||
|
||||
|
||||
IPage<PlateDetailsRespVO> selectMissingBoard( @Param("page") IPage page, @Param("orderNo") Long orderNo, @Param("organId") Long organId);
|
||||
@@ -72,4 +72,5 @@ public interface OrderPackageMapper extends BaseMapperX<OrderPackageDO> {
|
||||
void updatePackStatus(Long packageId);
|
||||
|
||||
|
||||
List<PackRespVO> selectPackPieceCount(@Param("orderIds") List<Long> orderIds, @Param("organId") Long organId);
|
||||
}
|
||||
|
||||
+6
-2
@@ -83,14 +83,18 @@ public class PackServiceImpl implements PackService {
|
||||
// 查询打包首页分页数据信息,总的板件数量信息
|
||||
IPage<PackRespVO> packRespVOS = productionStatusMapper.selectOrderPlate(page,orderIds,getUserOrganId());
|
||||
|
||||
List<PackRespVO> respVOS = orderPackageMapper.selectPackPage(orderIds);
|
||||
// 查询当前生产的包裹数量
|
||||
List<PackRespVO> respVOS = orderPackageMapper.selectPackPage(orderIds,getUserOrganId());
|
||||
|
||||
// 查询当前生产单已经打包的板材数量
|
||||
List<PackRespVO> plateNum = orderPackageMapper.selectPackPieceCount(orderIds, getUserOrganId());
|
||||
|
||||
for (PackRespVO record : packRespVOS.getRecords()) {
|
||||
|
||||
// 已打包数
|
||||
record.setPackCount(respVOS.stream().filter(f -> Objects.equals(f.getId(), record.getId())).mapToLong(PackRespVO::getPackCount).sum());
|
||||
// 已打包片数
|
||||
record.setPackPieceCount(respVOS.stream().filter(f -> Objects.equals(f.getId(), record.getId())).mapToLong(PackRespVO::getPackPieceCount).sum());
|
||||
record.setPackPieceCount(plateNum.stream().filter(f -> Objects.equals(f.getId(), record.getId())).mapToLong(PackRespVO::getPackPieceCount).sum());
|
||||
// 待处理量
|
||||
record.setPendingNum(record.getTotalPieceCount() - record.getPackPieceCount());
|
||||
}
|
||||
|
||||
+33
-7
@@ -17,15 +17,15 @@
|
||||
|
||||
select
|
||||
op.order_id as id,
|
||||
count(distinct op.id) as packCount ,
|
||||
count(distinct oi.plate_id) as packPieceCount
|
||||
count(distinct op.id) as packCount
|
||||
|
||||
from order_package op
|
||||
join order_item oi on op.order_id = oi.order_id and op.organ_id = oi.organ_id
|
||||
where op.status <> 0
|
||||
and oi.package_id != 0
|
||||
and oi.plate_id != 0
|
||||
and op.order_id in
|
||||
join order_item oi on op.id = oi.package_id and op.organ_id = oi.organ_id
|
||||
where
|
||||
op.status <> 0
|
||||
and oi.package_id != 0
|
||||
and op.organ_id = #{organId}
|
||||
and op.order_id in
|
||||
<foreach item="id" collection="orderIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@@ -34,6 +34,32 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPackPieceCount"
|
||||
parameterType="java.util.List"
|
||||
resultMap="PackMap">
|
||||
|
||||
select
|
||||
op.order_id as id,
|
||||
count(distinct oi.plate_id ) as packPieceCount
|
||||
|
||||
from order_package op
|
||||
join order_item oi on op.id = oi.package_id and op.organ_id = oi.organ_id
|
||||
|
||||
where op.status <> 0
|
||||
and oi.package_id !=0
|
||||
and plate_id != 0
|
||||
and op.organ_id =#{organId}
|
||||
and op.order_id in
|
||||
<foreach item="id" collection="orderIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
group by op.order_id;
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+4
-2
@@ -85,9 +85,7 @@
|
||||
o.organ_id = #{organId} and oi.plate_id != 0 and
|
||||
o.id in
|
||||
<foreach item="id" collection="orderIds" open="(" separator="," close=")">
|
||||
<if test="id !=null">
|
||||
#{id}
|
||||
</if>
|
||||
</foreach>
|
||||
|
||||
group by orderNo,customOrderNo,dealer,createTime,deliveryDate,customer,phoneNumber,address,salesman,splitter,status
|
||||
@@ -169,6 +167,10 @@
|
||||
and address like concat('%', #{pageReqVO.address},'%')
|
||||
</if>
|
||||
|
||||
<if test="pageReqVO.dealer !=null">
|
||||
and dealer like concat('%', #{pageReqVO.dealer},'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user