select raw_material_id, raw_material_code, material_category, raw_material_colour, type_machine, raw_material_name, specification_model, inventory_unit, export_sales, purchasing_unit, purchase_price, limit_collection_amount, stock_unit_weight, safety_stock, purchase_lead_time, special_use, whether_stop, creater_name, limit_whether, dedicated_whether, minimum_batch_size, whether_semi_manufactures, customs_name, supplier_number, raw_material_diameter, supplier_code, supplier_name, warehouse_location, purchase_equivalent, maximum_purchase_quantity, cost_price, primary_supplier, sub_supplier, Maximum_inventory, detention_days, gp_Item_selection, creater_time, default_warehouse, hs_number, first_add_time, update_info_time from sys_raw_material
insert into sys_raw_material
raw_material_code,
material_category,
raw_material_colour,
type_machine,
raw_material_name,
specification_model,
inventory_unit,
export_sales,
purchasing_unit,
purchase_price,
limit_collection_amount,
stock_unit_weight,
safety_stock,
purchase_lead_time,
special_use,
whether_stop,
creater_name,
limit_whether,
dedicated_whether,
minimum_batch_size,
whether_semi_manufactures,
customs_name,
supplier_number,
raw_material_diameter,
supplier_code,
supplier_name,
warehouse_location,
purchase_equivalent,
maximum_purchase_quantity,
cost_price,
primary_supplier,
sub_supplier,
Maximum_inventory,
detention_days,
gp_Item_selection,
creater_time,
default_warehouse,
hs_number,
first_add_time
#{rawMaterialCode},
#{materialCategory},
#{rawMaterialColour},
#{typeMachine},
#{rawMaterialName},
#{specificationModel},
#{inventoryUnit},
#{exportSales},
#{purchasingUnit},
#{purchasePrice},
#{limitCollectionAmount},
#{stockUnitWeight},
#{safetyStock},
#{purchaseLeadTime},
#{specialUse},
#{whetherStop},
#{createrName},
#{limitWhether},
#{dedicatedWhether},
#{minimumBatchSize},
#{whetherSemiManufactures},
#{customsName},
#{supplierNumber},
#{rawMaterialDiameter},
#{supplierCode},
#{supplierName},
#{warehouseLocation},
#{purchaseEquivalent},
#{maximumPurchaseQuantity},
#{costPrice},
#{primarySupplier},
#{subSupplier},
#{maximumInventory},
#{detentionDays},
#{gpItemSelection},
#{createrTime},
#{defaultWarehouse},
#{hsNumber},
now(),
update sys_raw_material
raw_material_code = #{rawMaterialCode},
material_category = #{materialCategory},
raw_material_colour = #{rawMaterialColour},
type_machine = #{typeMachine},
raw_material_name = #{rawMaterialName},
specification_model = #{specificationModel},
inventory_unit = #{inventoryUnit},
export_sales = #{exportSales},
purchasing_unit = #{purchasingUnit},
purchase_price = #{purchasePrice},
limit_collection_amount = #{limitCollectionAmount},
stock_unit_weight = #{stockUnitWeight},
safety_stock = #{safetyStock},
purchase_lead_time = #{purchaseLeadTime},
special_use = #{specialUse},
whether_stop = #{whetherStop},
creater_name = #{createrName},
limit_whether = #{limitWhether},
dedicated_whether = #{dedicatedWhether},
minimum_batch_size = #{minimumBatchSize},
whether_semi_manufactures = #{whetherSemiManufactures},
customs_name = #{customsName},
supplier_number = #{supplierNumber},
raw_material_diameter = #{rawMaterialDiameter},
supplier_code = #{supplierCode},
supplier_name = #{supplierName},
warehouse_location = #{warehouseLocation},
purchase_equivalent = #{purchaseEquivalent},
maximum_purchase_quantity = #{maximumPurchaseQuantity},
cost_price = #{costPrice},
primary_supplier = #{primarySupplier},
sub_supplier = #{subSupplier},
Maximum_inventory = #{maximumInventory},
detention_days = #{detentionDays},
gp_Item_selection = #{gpItemSelection},
creater_time = #{createrTime},
default_warehouse = #{defaultWarehouse},
hs_number = #{hsNumber},
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
where raw_material_id = #{rawMaterialId}
delete from sys_raw_material where raw_material_id = #{rawMaterialId}
delete from sys_raw_material where raw_material_id in
#{rawMaterialId}