w 库存管理-抄码商品对照表
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
package com.mhd.wms.application.service.CopyCodeReference;
|
||||
|
||||
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
import com.mhd.wms.domain.copyCodeReference.service.CopyCodeReferenceDomainService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CopyCodeReferenceApplicationService {
|
||||
@Autowired
|
||||
private CopyCodeReferenceDomainService copyCodeReferenceDomainService;
|
||||
|
||||
|
||||
public List<CopyCodeReferencePO> queryList(CopyCodeReferenceDO copyCodeReferenceDO) {
|
||||
List<CopyCodeReferencePO> list = copyCodeReferenceDomainService.queryList(copyCodeReferenceDO);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.mhd.wms.domain.copyCodeReference.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ICopyCodeReferenceService extends IService<CopyCodeReferenceDO> {
|
||||
|
||||
|
||||
List<CopyCodeReferencePO> queryList(CopyCodeReferenceDO copyCodeReferenceDO);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.mhd.wms.domain.copyCodeReference.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface CopyCodeReferenceMapper extends BaseMapper<CopyCodeReferenceDO> {
|
||||
List<CopyCodeReferencePO> queryList(CopyCodeReferenceDO copyCodeReferenceDO);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.mhd.wms.domain.copyCodeReference.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.facade.ICopyCodeReferenceService;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.mapper.CopyCodeReferenceMapper;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.entity.InMaterialDetailSerialNumber;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.facade.IInMaterialDetailSerialNumberService;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.mapper.InMaterialDetailSerialNumberMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CopyCodeReferenceImpl extends ServiceImpl<CopyCodeReferenceMapper, CopyCodeReferenceDO> implements ICopyCodeReferenceService {
|
||||
|
||||
@Autowired
|
||||
CopyCodeReferenceMapper copyCodeReferenceMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<CopyCodeReferencePO> queryList(CopyCodeReferenceDO copyCodeReferenceDO) {
|
||||
List<CopyCodeReferencePO> l = copyCodeReferenceMapper.queryList(copyCodeReferenceDO);
|
||||
// log.info()
|
||||
return copyCodeReferenceMapper.queryList(copyCodeReferenceDO);
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.wms.domain.copyCodeReference.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "抄码商品对照", description = "抄码商品对照")
|
||||
public class CopyCodeReferencePO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("序号")
|
||||
private Integer serialNumber;
|
||||
|
||||
@ApiModelProperty("仓库")
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("LOT编码")
|
||||
@Excel(name = "LOT编码")
|
||||
private String lotNumber;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("托盘号")
|
||||
@Excel(name = "托盘号")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
@Excel(name = "数量")
|
||||
private BigDecimal inventoryQuantity;
|
||||
|
||||
@ApiModelProperty("净重(KG)")
|
||||
@Excel(name = "净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("托盘号")
|
||||
@Excel(name = "托盘号")
|
||||
private String boxPalletNo;
|
||||
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.mhd.wms.domain.copyCodeReference.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class CopyCodeReferenceDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("货主ID")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("托盘号")
|
||||
private String containerCode;
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.wms.domain.copyCodeReference.service;
|
||||
|
||||
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.facade.ICopyCodeReferenceService;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CopyCodeReferenceDomainService {
|
||||
@Autowired
|
||||
private ICopyCodeReferenceService copyCodeReferenceService;
|
||||
|
||||
|
||||
public List<CopyCodeReferencePO> queryList(CopyCodeReferenceDO copyCodeReferenceDO) {
|
||||
return copyCodeReferenceService.queryList(copyCodeReferenceDO);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.mhd.wms.interfaces.assember.copyCodeReference;
|
||||
|
||||
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
import com.mhd.wms.interfaces.dto.copyCodeReference.CopyCodeReferenceDTO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class CopyCodeReferenceAssembler {
|
||||
|
||||
public CopyCodeReferenceDO toDO(CopyCodeReferenceDTO copyCodeReferenceDTO){
|
||||
if(copyCodeReferenceDTO == null){
|
||||
return null;
|
||||
}
|
||||
CopyCodeReferenceDO copyCodeReferenceDO = new CopyCodeReferenceDO();
|
||||
BeanUtils.copyProperties(copyCodeReferenceDTO,copyCodeReferenceDO);
|
||||
return copyCodeReferenceDO;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.mhd.wms.interfaces.dto.copyCodeReference;
|
||||
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "潮妈商品对照表请求DTO")
|
||||
public class CopyCodeReferenceDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("货主ID")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("托盘号")
|
||||
private String containerCode;
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.mhd.wms.interfaces.facadeApi.copyCodeReference;
|
||||
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.wms.application.service.CopyCodeReference.CopyCodeReferenceApplicationService;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO;
|
||||
import com.mhd.wms.domain.copyCodeReference.repository.todo.CopyCodeReferenceDO;
|
||||
import com.mhd.wms.interfaces.assember.copyCodeReference.CopyCodeReferenceAssembler;
|
||||
import com.mhd.wms.interfaces.dto.copyCodeReference.CopyCodeReferenceDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/copyCodeRederenceApi")
|
||||
public class CopyCodeReferenceApi extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CopyCodeReferenceApplicationService copyCodeReferenceApplicationService;
|
||||
|
||||
@Resource
|
||||
private CopyCodeReferenceAssembler copyCodeReferenceAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询列表
|
||||
*/
|
||||
@ApiOperation("查询抄码商品对照表列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CopyCodeReferenceDTO dto) {
|
||||
CopyCodeReferenceDO copyCodeReferenceDO = copyCodeReferenceAssembler.toDO(dto);
|
||||
startPage();
|
||||
List<CopyCodeReferencePO> list = copyCodeReferenceApplicationService.queryList(copyCodeReferenceDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.wms.domain.copyCodeReference.repository.mapper.CopyCodeReferenceMapper">
|
||||
|
||||
<resultMap id="CopyCodeReferencePOMap" type="com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO">
|
||||
<result property="serialNumber" column="serial_number"/>
|
||||
<result property="warehouseName" column="warehouse_name"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="inOrderNumber" column="in_order_number"/>
|
||||
<result property="lotNumber" column="lot_number"/>
|
||||
<result property="batchNumber" column="batch_number"/>
|
||||
<result property="containerCode" column="container_code"/>
|
||||
<result property="inventoryQuantity" column="inventory_quantity"/>
|
||||
<result property="shipperName" column="shipper_name"/>
|
||||
<result property="boxPalletNo" column="box_pallet_no"/>
|
||||
<result property="netWeight" column="net_weight"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询列表:条件是 material_base_info.copy_code = 1 -->
|
||||
<select id="queryList" resultMap="CopyCodeReferencePOMap">
|
||||
SELECT
|
||||
mi.warehouse_name,
|
||||
mbi.material_code,
|
||||
mbi.material_name,
|
||||
mi.in_order_number,
|
||||
mi.batch_number,
|
||||
mi.container_code,
|
||||
mi.inventory_quantity,
|
||||
mi.net_weight,
|
||||
mi.shipper_name,
|
||||
mi.lot_number,
|
||||
mi.box_pallet_no
|
||||
FROM material_inventory mi
|
||||
LEFT JOIN material_base_info mbi ON mi.material_base_info_id = mbi.material_base_info_id
|
||||
LEFT JOIN shelf_material_detail ssd ON mi.material_detail_id = ssd.material_detail_id
|
||||
LEFT JOIN warehouse w ON mi.warehouse_id = w.warehouse_id
|
||||
WHERE mi.del_flag = 1
|
||||
AND mbi.copy_code = 1
|
||||
<if test="shipperId != null">
|
||||
AND mi.shipper_id = #{shipperId}
|
||||
</if>
|
||||
<if test="warehouseId != null">
|
||||
AND mi.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
AND mbi.material_code = #{materialCode}
|
||||
</if>
|
||||
<if test="batchNumber != null and batchNumber != ''">
|
||||
AND mi.batch_number = #{batchNumber}
|
||||
</if>
|
||||
<if test="containerCode != null and containerCode != ''">
|
||||
AND mi.container_code = #{containerCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user