修改 wms 库存管理 页面查询和打印
This commit is contained in:
+2
-3
@@ -12,6 +12,8 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class CopyCodeReferenceApplicationService {
|
||||
@@ -34,9 +36,6 @@ public class CopyCodeReferenceApplicationService {
|
||||
|
||||
public List<CopyCodeReferencePO> queryWeightList(CopyCodeReferenceDTO dto) {
|
||||
List<CopyCodeReferencePO> list = copyCodeReferenceDomainService.queryWeightList(dto);
|
||||
for(int i = 0;i < list.size();i++) {
|
||||
list.get(i).setSerialNumber(i+1);
|
||||
}
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
+33
-1
@@ -14,13 +14,25 @@ import java.math.BigDecimal;
|
||||
public class CopyCodeReferencePO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("序号")
|
||||
private Integer serialNumber;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private String warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库")
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseName;
|
||||
|
||||
|
||||
@ApiModelProperty("物料基础信息ID")
|
||||
private Integer materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
@@ -29,6 +41,9 @@ public class CopyCodeReferencePO extends BaseVOEntity {
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("上架单物料明细ID")
|
||||
private Integer materialDetailId;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
@@ -53,6 +68,21 @@ public class CopyCodeReferencePO extends BaseVOEntity {
|
||||
@Excel(name = "净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("毛重(KG)")
|
||||
@Excel(name = "毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
private Integer materialStatusCode;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Integer organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Integer topOrganizationId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
@@ -65,5 +95,7 @@ public class CopyCodeReferencePO extends BaseVOEntity {
|
||||
@Excel(name = "物料状态")
|
||||
private String materialStatusName;
|
||||
|
||||
|
||||
@ApiModelProperty("物料状态")
|
||||
@Excel(name = "物料状态")
|
||||
private String materialInventoryId;
|
||||
}
|
||||
|
||||
@@ -3,72 +3,173 @@
|
||||
"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="materialStatusName" column="material_status_name"/>-->
|
||||
<!-- <result property="materialInventoryId" column="material_inventory_id"/>-->
|
||||
<!-- <result property="netWeight" column="net_weight"/>-->
|
||||
<!-- </resultMap>-->
|
||||
|
||||
|
||||
<resultMap id="CopyCodeReferencePOMap" type="com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO">
|
||||
<result property="serialNumber" column="serial_number"/>
|
||||
<result property="id" column="id"/>
|
||||
<result property="materialInventoryId" column="material_inventory_id"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
<result property="warehouseName" column="warehouse_name"/>
|
||||
<result property="materialBaseInfoId" column="material_base_info_id"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="materialDetailId" column="material_detail_id"/>
|
||||
<result property="inOrderNumber" column="in_order_number"/>
|
||||
<result property="lotNumber" column="lot_number"/>
|
||||
<result property="batchNumber" column="batch_number"/>
|
||||
<result property="boxPalletNo" column="box_pallet_no"/>
|
||||
<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="materialStatusName" column="material_status_name"/>
|
||||
<result property="netWeight" column="net_weight"/>
|
||||
<result property="grossWeight" column="gross_weight"/>
|
||||
<result property="materialStatusCode" column="material_status_code"/>
|
||||
<result property="materialStatusName" column="material_status_name"/>
|
||||
<result property="serialNumber" column="serial_number"/>
|
||||
<result property="organizationId" column="organization_id"/>
|
||||
<result property="topOrganizationId" column="top_organization_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createByName" column="create_by_name"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateByName" column="update_by_name"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</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,
|
||||
mi.material_status_name
|
||||
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>
|
||||
id,
|
||||
material_inventory_id,
|
||||
warehouse_id,
|
||||
warehouse_name,
|
||||
material_base_info_id,
|
||||
material_code,
|
||||
material_name,
|
||||
material_detail_id,
|
||||
in_order_number,
|
||||
lot_number,
|
||||
batch_number,
|
||||
box_pallet_no,
|
||||
container_code,
|
||||
inventory_quantity,
|
||||
net_weight,
|
||||
gross_weight,
|
||||
material_status_code,
|
||||
material_status_name,
|
||||
serial_number,
|
||||
organization_id,
|
||||
top_organization_id,
|
||||
create_by,
|
||||
create_by_name,
|
||||
create_time,
|
||||
update_by,
|
||||
update_by_name,
|
||||
update_time,
|
||||
del_flag
|
||||
FROM copy_code_reference
|
||||
WHERE del_flag = 1
|
||||
<if test="warehouseId != null">
|
||||
AND mi.warehouse_id = #{warehouseId}
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
AND mbi.material_code = #{materialCode}
|
||||
AND material_code = #{materialCode}
|
||||
</if>
|
||||
<!-- <if test="materialName != null and materialName != ''">-->
|
||||
<!-- AND material_name LIKE '%' || #{materialName} || '%'-->
|
||||
<!-- </if>-->
|
||||
<if test="batchNumber != null and batchNumber != ''">
|
||||
AND mi.batch_number = #{batchNumber}
|
||||
AND batch_number = #{batchNumber}
|
||||
</if>
|
||||
<if test="containerCode != null and containerCode != ''">
|
||||
AND mi.container_code = #{containerCode}
|
||||
</if>
|
||||
order by mi.create_time desc
|
||||
<!-- <if test="boxPalletNo != null and boxPalletNo != ''">-->
|
||||
<!-- AND box_pallet_no = #{boxPalletNo}-->
|
||||
<!-- </if>-->
|
||||
ORDER BY material_code, batch_number, box_pallet_no, serial_number
|
||||
</select>
|
||||
|
||||
<select id="queryWeightList" resultMap="CopyCodeReferencePOMap">
|
||||
SELECT
|
||||
mi.net_weight,
|
||||
mi.material_inventory_id
|
||||
FROM material_inventory mi
|
||||
LEFT JOIN material_base_info mbi ON mbi.material_base_info_id = mi.material_base_info_id AND mbi.del_flag = 1
|
||||
WHERE mi.del_flag = 1
|
||||
AND mbi.copy_code = 1
|
||||
AND mbi.material_code = #{materialCode}
|
||||
AND mi.batch_number = #{batchNumber}
|
||||
AND mi.box_pallet_no = #{boxPalletNo}
|
||||
id,
|
||||
material_inventory_id,
|
||||
material_code,
|
||||
batch_number,
|
||||
box_pallet_no,
|
||||
net_weight,
|
||||
serial_number
|
||||
FROM copy_code_reference
|
||||
WHERE del_flag = 1
|
||||
AND material_code = #{materialCode}
|
||||
AND batch_number = #{batchNumber}
|
||||
AND box_pallet_no = #{boxPalletNo}
|
||||
ORDER BY serial_number
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询列表:条件是 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,-->
|
||||
<!-- mi.material_status_name-->
|
||||
<!-- 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>-->
|
||||
<!-- order by mi.create_time desc-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="queryWeightList" resultMap="CopyCodeReferencePOMap">-->
|
||||
<!-- SELECT-->
|
||||
<!-- mi.net_weight,-->
|
||||
<!-- mi.material_inventory_id-->
|
||||
<!-- FROM material_inventory mi-->
|
||||
<!-- LEFT JOIN material_base_info mbi ON mbi.material_base_info_id = mi.material_base_info_id AND mbi.del_flag = 1-->
|
||||
<!-- WHERE mi.del_flag = 1-->
|
||||
<!-- AND mbi.copy_code = 1-->
|
||||
<!-- AND mbi.material_code = #{materialCode}-->
|
||||
<!-- AND mi.batch_number = #{batchNumber}-->
|
||||
<!-- AND mi.box_pallet_no = #{boxPalletNo}-->
|
||||
<!-- </select>-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,49 @@
|
||||
-- 创建抄码商品对照表
|
||||
CREATE TABLE COPY_CODE_REFERENCE (
|
||||
ID BIGINT PRIMARY KEY IDENTITY(1,1) COMMENT '主键ID',
|
||||
MATERIAL_INVENTORY_ID BIGINT COMMENT '物料库存ID',
|
||||
WAREHOUSE_ID BIGINT COMMENT '仓库ID',
|
||||
WAREHOUSE_NAME VARCHAR(100) COMMENT '仓库名称',
|
||||
MATERIAL_BASE_INFO_ID BIGINT COMMENT '物料基础信息ID',
|
||||
MATERIAL_CODE VARCHAR(100) COMMENT '物料编码',
|
||||
MATERIAL_NAME VARCHAR(200) COMMENT '物料名称',
|
||||
MATERIAL_DETAIL_ID BIGINT COMMENT '上架单物料明细ID',
|
||||
IN_ORDER_NUMBER VARCHAR(100) COMMENT '入库单号',
|
||||
LOT_NUMBER VARCHAR(100) COMMENT 'LOT编码',
|
||||
BATCH_NUMBER VARCHAR(100) COMMENT '批次号',
|
||||
BOX_PALLET_NO VARCHAR(100) COMMENT '托盘号',
|
||||
CONTAINER_CODE VARCHAR(100) COMMENT '容器编码',
|
||||
INVENTORY_QUANTITY DECIMAL(18,6) COMMENT '数量',
|
||||
NET_WEIGHT DECIMAL(18,6) COMMENT '净重(KG)',
|
||||
GROSS_WEIGHT DECIMAL(18,6) COMMENT '毛重(KG)',
|
||||
MATERIAL_STATUS_CODE VARCHAR(10) COMMENT '物料状态编码',
|
||||
MATERIAL_STATUS_NAME VARCHAR(50) COMMENT '物料状态名称',
|
||||
SERIAL_NUMBER INT COMMENT '打印序号',
|
||||
ORGANIZATION_ID BIGINT COMMENT '组织ID',
|
||||
TOP_ORGANIZATION_ID BIGINT COMMENT '一级组织ID',
|
||||
DEL_FLAG INT DEFAULT 1 COMMENT '删除标记: 0-删除 1-正常',
|
||||
CREATE_BY BIGINT COMMENT '创建者',
|
||||
CREATE_BY_NAME VARCHAR(50) COMMENT '创建者姓名',
|
||||
CREATE_TIME TIMESTAMP COMMENT '创建时间',
|
||||
UPDATE_BY BIGINT COMMENT '更新者',
|
||||
UPDATE_BY_NAME VARCHAR(50) COMMENT '更新者姓名',
|
||||
UPDATE_TIME TIMESTAMP COMMENT '更新时间'
|
||||
);
|
||||
|
||||
-- 创建索引
|
||||
CREATE INDEX IDX_COPY_CODE_MATERIAL ON COPY_CODE_REFERENCE(MATERIAL_CODE);
|
||||
CREATE INDEX IDX_COPY_CODE_BATCH ON COPY_CODE_REFERENCE(BATCH_NUMBER);
|
||||
CREATE INDEX IDX_COPY_CODE_PALLET ON COPY_CODE_REFERENCE(BOX_PALLET_NO);
|
||||
CREATE INDEX IDX_COPY_CODE_INVENTORY ON COPY_CODE_REFERENCE(MATERIAL_INVENTORY_ID);
|
||||
|
||||
|
||||
COMMENT ON TABLE COPY_CODE_REFERENCE IS '抄码商品对照表';
|
||||
|
||||
|
||||
|
||||
|
||||
alter table NGWL_TEST_WMS.MATERIAL_BASE_INFO
|
||||
add COPY_CODE TINYINT default 2;
|
||||
|
||||
comment
|
||||
on column NGWL_TEST_WMS.MATERIAL_BASE_INFO.COPY_CODE is '是否抄码: 1-是 2-否';
|
||||
Reference in New Issue
Block a user