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 insert into wms_inventory_check_detail 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, #{inventoryCheckId}, #{materialId}, #{locationCode}, #{materialBarcode}, #{stockType}, #{stockId}, #{stockAmount}, #{realAmount}, #{checkStatus}, #{inventoryTime}, #{erpStatus}, #{erpAmount}, #{remark}, #{createBy}, #{createDate}, #{updateBy}, #{updateDate}, update wms_inventory_check_detail inventory_check_id = #{inventoryCheckId}, material_id = #{materialId}, location_code = #{locationCode}, material_barcode = #{materialBarcode}, stock_type = #{stockType}, stock_id = #{stockId}, stock_amount = #{stockAmount}, real_amount = #{realAmount}, check_status = #{checkStatus}, inventory_time = #{inventoryTime}, erp_status = #{erpStatus}, erp_amount = #{erpAmount}, remark = #{remark}, create_by = #{createBy}, create_date = #{createDate}, update_by = #{updateBy}, update_date = #{updateDate}, where inventory_check_detail_id = #{inventoryCheckDetailId} delete from wms_inventory_check_detail where inventory_check_detail_id = #{inventoryCheckDetailId} delete from wms_inventory_check_detail where inventory_check_detail_id in #{inventoryCheckDetailId} 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, 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 left join mes_base_barcode_info mbbi on wicd.material_barcode = mbbi.barcode_info