Browse Source

1.扫描

training
0.0 2 years ago
parent
commit
f1b2fac504
  1. 18
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseScanRecordVO.java
  2. 37
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseStockMapper.xml
  3. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseStockServiceImpl.java
  4. 49
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseStockRecordWrapper.java

18
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseScanRecordVO.java

@ -26,6 +26,12 @@ public class WarehouseScanRecordVO extends WarehouseScanRecordEntity {
* 操作人
*/
@ApiModelProperty(value = "操作人")
private Long operatorId;
/**
* 操作人(Name)
*/
@ApiModelProperty(value = "操作人(Name)")
private String operatorName;
/**
@ -33,4 +39,16 @@ public class WarehouseScanRecordVO extends WarehouseScanRecordEntity {
*/
@ApiModelProperty(value = "扫描相亲")
private String scanNodeMsg;
/**
* 二级扫描类型(扫描详情)
*/
@ApiModelProperty(value = "扫描详情")
private String scanNodeType;
// /**
// * 二级扫描类型(name)
// */
// @ApiModelProperty(value = "二级扫描类型(name)")
// private String scanNodeTypeName;
}

37
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseStockMapper.xml

@ -46,9 +46,42 @@
<select id="selectWarehouseStockPage" resultType="com.logpm.warehouse.vo.WarehouseScanRecordVO">
select * from view_scan_record
select * from view_scan_record vsr
<where>
is_deleted =0
is_deleted =0
<if test="param.nodeName != null and param.nodeName != '' ">
and vsr.nodeName like concat('%',#{param.nodeName},'%')
</if>
<if test="param.scanNodeType != null and param.scanNodeType != '' ">
and vsr.scanNodeType like concat('%',#{param.scanNodeType},'%')
</if>
<if test="param.orderCode != null and param.orderCode != '' ">
and vsr.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.orderPackageCode != null and param.orderPackageCode != '' ">
and vsr.order_package_code like concat('%',#{param.orderPackageCode},'%')
</if>
<if test="param.serviceNumber != null and param.serviceNumber != '' ">
and vsr.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.brandName != null and param.brandName != '' ">
and vsr.brand_name like concat('%',#{param.brandName},'%')
</if>
<if test="param.materialCode != null and param.materialCode != '' ">
and vsr.material_code like concat('%',#{param.materialCode},'%')
</if>
<if test="param.materialName != null and param.materialName != '' ">
and vsr.material_name like concat('%',#{param.materialName},'%')
</if>
<if test="param.firsts != null and param.firsts != '' ">
and vsr.firsts like concat('%',#{param.firsts},'%')
</if>
<if test="param.second != null and param.second != '' ">
and vsr.second like concat('%',#{param.second},'%')
</if>
<if test="param.thirdProduct != null and param.thirdProduct != '' ">
and vsr.third_product like concat('%',#{param.thirdProduct},'%')
</if>
</where>
</select>

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseStockServiceImpl.java

@ -22,11 +22,13 @@ import com.logpm.warehouse.vo.WarehouseStockVO;
import com.logpm.warehouse.excel.WarehouseStockExcel;
import com.logpm.warehouse.mapper.WarehouseStockMapper;
import com.logpm.warehouse.service.IWarehouseStockService;
import org.springblade.core.tool.utils.SpringUtil;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
import org.springblade.system.feign.IUserClient;
/**
* 备货扫描记录 服务实现类
@ -39,7 +41,13 @@ public class WarehouseStockServiceImpl extends BaseServiceImpl<WarehouseStockMap
@Override
public IPage<WarehouseScanRecordVO> selectWarehouseStockPage(IPage<WarehouseScanRecordVO> page, WarehouseStockVO WarehouseStock) {
return page.setRecords(baseMapper.selectWarehouseStockPage(page, WarehouseStock));
List<WarehouseScanRecordVO> warehouseScanRecordVOS = baseMapper.selectWarehouseStockPage(page, WarehouseStock);
IUserClient userCliient = SpringUtil.getBean(IUserClient.class);
for (WarehouseScanRecordVO warehouseScanRecordVO : warehouseScanRecordVOS) {
warehouseScanRecordVO.setOperatorName(userCliient.userInfoById(warehouseScanRecordVO.getOperatorId()).getData().getName());
warehouseScanRecordVO.getNodeName().equals("上下架");
}
return page.setRecords(warehouseScanRecordVOS);
}

49
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseStockRecordWrapper.java

@ -0,0 +1,49 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* ReWarehouse and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* ReWarehouses of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* ReWarehouses in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the Warehouse.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.warehouse.wrapper;
import com.logpm.warehouse.entity.WarehouseStockEntity;
import com.logpm.warehouse.vo.WarehouseScanRecordVO;
import com.logpm.warehouse.vo.WarehouseStockVO;
import lombok.extern.log4j.Log4j2;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import java.util.Objects;
/**
* 备货扫描记录 包装类,返回视图层所需的字段
*
* @author lmy
* @since 2023-08-24
*/
@Log4j2
public class WarehouseStockRecordWrapper extends BaseEntityWrapper<WarehouseScanRecordVO, WarehouseScanRecordVO> {
public static WarehouseStockRecordWrapper build() {
return new WarehouseStockRecordWrapper();
}
@Override
public WarehouseScanRecordVO entityVO(WarehouseScanRecordVO WarehouseStock) {
log.info("WarehouseStock>>>>>>>>>>>{}",WarehouseStock);
return WarehouseStock;
}
}
Loading…
Cancel
Save