select raw_instock_id, task_code, warehouse_id, location_code, po_no, operation_type, instock_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time from wms_raw_instock insert into wms_raw_instock task_code, warehouse_id, location_code, po_no, operation_type, instock_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, #{taskCode}, #{warehouseId}, #{locationCode}, #{poNo}, #{operationType}, #{instockType}, #{applyReason}, #{auditReason}, #{auditStatus}, #{executeStatus}, #{applyBy}, #{applyDate}, #{auditBy}, #{auditDate}, #{updateBy}, #{updateDate}, #{beginTime}, #{endTime}, update wms_raw_instock task_code = #{taskCode}, warehouse_id = #{warehouseId}, location_code = #{locationCode}, po_no = #{poNo}, operation_type = #{operationType}, instock_type = #{instockType}, apply_reason = #{applyReason}, audit_reason = #{auditReason}, audit_status = #{auditStatus}, execute_status = #{executeStatus}, apply_by = #{applyBy}, apply_date = #{applyDate}, audit_by = #{auditBy}, audit_date = #{auditDate}, update_by = #{updateBy}, update_date = #{updateDate}, begin_time = #{beginTime}, end_time = #{endTime}, where raw_instock_id = #{rawInstockId} delete from wms_raw_instock where raw_instock_id = #{rawInstockId} delete from wms_raw_instock where raw_instock_id in #{rawInstockId} delete from wms_raw_instock_detail where raw_instock_id in #{rawInstockId} delete from wms_raw_instock_detail where raw_instock_id = #{rawInstockId} insert into wms_raw_instock_detail( raw_instock_detail_id, raw_instock_id, location_code, material_barcode, material_id, po_no, instock_batch, material_production_Date, plan_amount,instock_amount, execute_status, erp_status, instock_person, instock_time, instock_way, machine_name, quality_status, stack_amount, create_by, create_date, update_by, update_date, active_flag, po_line) values ( #{item.rawInstockDetailId}, #{item.rawInstockId}, #{item.locationCode}, #{item.materialBarcode}, #{item.materialId}, #{item.poNo}, #{item.instockBatch}, #{item.materialProductionDate}, #{item.planAmount},#{item.instockAmount}, #{item.executeStatus}, #{item.erpStatus}, #{item.instockPerson}, #{item.instockTime}, #{item.instockWay}, #{item.machineName}, #{item.qualityStatus}, #{item.stackAmount}, #{item.createBy}, #{item.createDate}, #{item.updateBy}, #{item.updateDate}, #{item.activeFlag}, #{item.poLine})