@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property= "inventoryCheckId" column= "inventory_check_id" />
<result property= "inventoryCheckId" column= "inventory_check_id" />
<result property= "materialId" column= "material_id" />
<result property= "materialId" column= "material_id" />
<result property= "locationCode" column= "location_code" />
<result property= "locationCode" column= "location_code" />
<result property= "materialBa tch" column= "material_batch " />
<result property= "materialBa rcode" column= "material_barcode " />
<result property= "stockType" column= "stock_type" />
<result property= "stockType" column= "stock_type" />
<result property= "stockId" column= "stock_id" />
<result property= "stockId" column= "stock_id" />
<result property= "stockAmount" column= "stock_amount" />
<result property= "stockAmount" column= "stock_amount" />
@ -26,10 +26,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property= "materialCode" column= "material_code" />
<result property= "materialCode" column= "material_code" />
<result property= "materialName" column= "material_name" />
<result property= "materialName" column= "material_name" />
<result property= "materialSpec" column= "material_spec" />
<result property= "poNo" column= "po_no" />
<result property= "saleorderCode" column= "saleorder_code" />
<result property= "materialBatch" column= "material_batch" />
</resultMap>
</resultMap>
<sql id= "selectWmsInventoryCheckDetailVo" >
<sql id= "selectWmsInventoryCheckDetailVo" >
select inventory_check_detail_id, inventory_check_id, material_id, location_code, material_batch, stock_type, stock_id, stock_amount, real_amount, check_status, inventory_time, erp_status, erp_amount, remark, create_by, create_date, update_by, update_date from wms_inventory_check_detail
select inventory_check_detail_id, inventory_check_id, material_id, location_code, material_barcode , stock_type, stock_id, stock_amount, real_amount, check_status, inventory_time, erp_status, erp_amount, remark, create_by, create_date, update_by, update_date from wms_inventory_check_detail
</sql>
</sql>
<select id= "selectWmsInventoryCheckDetailList" parameterType= "WmsInventoryCheckDetail" resultMap= "WmsInventoryCheckDetailResult" >
<select id= "selectWmsInventoryCheckDetailList" parameterType= "WmsInventoryCheckDetail" resultMap= "WmsInventoryCheckDetailResult" >
@ -38,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "inventoryCheckId != null " > and inventory_check_id = #{inventoryCheckId}</if>
<if test= "inventoryCheckId != null " > and inventory_check_id = #{inventoryCheckId}</if>
<if test= "materialId != null " > and material_id = #{materialId}</if>
<if test= "materialId != null " > and material_id = #{materialId}</if>
<if test= "locationCode != null and locationCode != ''" > and location_code = #{locationCode}</if>
<if test= "locationCode != null and locationCode != ''" > and location_code = #{locationCode}</if>
<if test= "materialBa tch != null and materialBatch != ''"> and material_batch = #{materialBatch }</if>
<if test= "materialBa rcode != null and materialBarcode != ''"> and material_barcode = #{materialBarcode }</if>
<if test= "stockType != null and stockType != ''" > and stock_type = #{stockType}</if>
<if test= "stockType != null and stockType != ''" > and stock_type = #{stockType}</if>
<if test= "stockAmount != null " > and stock_amount = #{stockAmount}</if>
<if test= "stockAmount != null " > and stock_amount = #{stockAmount}</if>
<if test= "realAmount != null " > and real_amount = #{realAmount}</if>
<if test= "realAmount != null " > and real_amount = #{realAmount}</if>
@ -61,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "inventoryCheckId != null" > inventory_check_id,</if>
<if test= "inventoryCheckId != null" > inventory_check_id,</if>
<if test= "materialId != null" > material_id,</if>
<if test= "materialId != null" > material_id,</if>
<if test= "locationCode != null and locationCode != ''" > location_code,</if>
<if test= "locationCode != null and locationCode != ''" > location_code,</if>
<if test= "materialBa tch != null and materialBatch != ''"> material_batch ,</if>
<if test= "materialBa rcode != null and materialBarcode != ''"> material_barcode ,</if>
<if test= "stockType != null" > stock_type,</if>
<if test= "stockType != null" > stock_type,</if>
<if test= "stockId != null" > stock_id,</if>
<if test= "stockId != null" > stock_id,</if>
<if test= "stockAmount != null" > stock_amount,</if>
<if test= "stockAmount != null" > stock_amount,</if>
@ -80,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "inventoryCheckId != null" > #{inventoryCheckId},</if>
<if test= "inventoryCheckId != null" > #{inventoryCheckId},</if>
<if test= "materialId != null" > #{materialId},</if>
<if test= "materialId != null" > #{materialId},</if>
<if test= "locationCode != null and locationCode != ''" > #{locationCode},</if>
<if test= "locationCode != null and locationCode != ''" > #{locationCode},</if>
<if test= "materialBa tch != null and materialBatch != ''"> #{materialBatch },</if>
<if test= "materialBa rcode != null and materialBarcode != ''"> #{materialBarcode },</if>
<if test= "stockType != null" > #{stockType},</if>
<if test= "stockType != null" > #{stockType},</if>
<if test= "stockId != null" > #{stockId},</if>
<if test= "stockId != null" > #{stockId},</if>
<if test= "stockAmount != null" > #{stockAmount},</if>
<if test= "stockAmount != null" > #{stockAmount},</if>
@ -103,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "inventoryCheckId != null" > inventory_check_id = #{inventoryCheckId},</if>
<if test= "inventoryCheckId != null" > inventory_check_id = #{inventoryCheckId},</if>
<if test= "materialId != null" > material_id = #{materialId},</if>
<if test= "materialId != null" > material_id = #{materialId},</if>
<if test= "locationCode != null and locationCode != ''" > location_code = #{locationCode},</if>
<if test= "locationCode != null and locationCode != ''" > location_code = #{locationCode},</if>
<if test= "materialBa tch != null and materialBatch != ''"> material_batch = #{materialBatch },</if>
<if test= "materialBa rcode != null and materialBarcode != ''"> material_barcode = #{materialBarcode },</if>
<if test= "stockType != null" > stock_type = #{stockType},</if>
<if test= "stockType != null" > stock_type = #{stockType},</if>
<if test= "stockId != null" > stock_id = #{stockId},</if>
<if test= "stockId != null" > stock_id = #{stockId},</if>
<if test= "stockAmount != null" > stock_amount = #{stockAmount},</if>
<if test= "stockAmount != null" > stock_amount = #{stockAmount},</if>
@ -145,10 +149,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id= "selectWmsInventoryCheckDetailJoinVo" >
<sql id= "selectWmsInventoryCheckDetailJoinVo" >
select wicd.inventory_check_detail_id, wicd.inventory_check_id, wicd.material_id, wicd.material_batch ,
select wicd.inventory_check_detail_id, wicd.inventory_check_id, wicd.material_id, wicd.material_barcode ,
wicd.stock_type, wicd.stock_id, wicd.stock_amount, wicd.real_amount, wicd.check_status, wicd.inventory_time, wicd.location_code,
wicd.stock_type, wicd.stock_id, wicd.stock_amount, wicd.real_amount, wicd.check_status, wicd.inventory_time, wicd.location_code,
mbmi.material_code,mbmi.material_name
mbmi.material_code,mbmi.material_name,mbmi.material_spec,mbbi.po_no,mbbi.saleorder_code,mbbi.batch_code as material_batch
from wms_inventory_check_detail wicd left join mes_base_material_info mbmi on wicd.material_id = mbmi.material_id
from wms_inventory_check_detail wicd left join mes_base_material_info mbmi on wicd.material_id = mbmi.material_id
left join mes_base_barcode_info mbbi on wicd.material_barcode = mbbi.barcode_info
</sql>
</sql>
<select id= "selectWmsInventoryCheckDetailJoinList" parameterType= "WmsInventoryCheckDetail" resultMap= "WmsInventoryCheckDetailResult" >
<select id= "selectWmsInventoryCheckDetailJoinList" parameterType= "WmsInventoryCheckDetail" resultMap= "WmsInventoryCheckDetailResult" >
@ -157,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "inventoryCheckId != null " > and wicd.inventory_check_id = #{inventoryCheckId}</if>
<if test= "inventoryCheckId != null " > and wicd.inventory_check_id = #{inventoryCheckId}</if>
<if test= "materialId != null " > and wicd.material_id = #{materialId}</if>
<if test= "materialId != null " > and wicd.material_id = #{materialId}</if>
<if test= "locationCode != null and locationCode != ''" > and wicd.location_code = #{locationCode}</if>
<if test= "locationCode != null and locationCode != ''" > and wicd.location_code = #{locationCode}</if>
<if test= "materialBa tch != null and materialBatch != ''"> and wicd.material_batch = #{materialBatch }</if>
<if test= "materialBa rcode != null and materialBarcode != ''"> and wicd.material_barcode = #{materialBarcode }</if>
<if test= "stockType != null and stockType != ''" > and wicd.stock_type = #{stockType}</if>
<if test= "stockType != null and stockType != ''" > and wicd.stock_type = #{stockType}</if>
<if test= "checkStatus != null and checkStatus != ''" > and wicd.check_status = #{checkStatus}</if>
<if test= "checkStatus != null and checkStatus != ''" > and wicd.check_status = #{checkStatus}</if>
<if test= "checkStatusStr != null and checkStatusStr!= ''" > and wicd.check_status in (${checkStatusStr})</if>
<if test= "checkStatusStr != null and checkStatusStr!= ''" > and wicd.check_status in (${checkStatusStr})</if>