select stock_id, list_id, vehicle_id, location_id, goods_id, goods_name, goods_unit, provider_id, provider_name, remain_num, origin_num, batch_no, inv_age, goods_status, stock_status, create_time, create_user, last_update_time, last_update_user, remark ,
ware_date, storage_mode,storage_id, area_id, goods_type_id, occupy_num, packing_num, production_date from app_stock
update app_stock set stock_status = #{stockStatus} where UPPER(vehicle_id) = UPPER(#{vehicleId})
insert into app_stock
stock_id,
list_id,
vehicle_id,
location_id,
goods_id,
goods_name,
goods_unit,
provider_id,
provider_name,
remain_num,
origin_num,
batch_no,
inv_age,
goods_status,
stock_status,
create_time,
create_user,
last_update_time,
last_update_user,
remark,
ware_date,
storage_mode,
storage_id,
area_id,
goods_type_id,
occupy_num,
packing_num,
production_date,
#{stockId},
#{listId},
#{vehicleId},
#{locationId},
#{goodsId},
#{goodsName},
#{goodsUnit},
#{providerId},
#{providerName},
#{remainNum},
#{originNum},
#{batchNo},
#{invAge},
#{goodsStatus},
#{stockStatus},
#{createTime},
#{createUser},
#{lastUpdateTime},
#{lastUpdateUser},
#{remark},
#{wareDate},
#{storageMode},
#{storageId},
#{areaId},
#{goodsTypeId},
#{occupyNum},
#{packingNum},
#{productionDate},
update app_stock
vehicle_id = #{vehicleId},
list_id = #{listId},
location_id = #{locationId},
goods_id = #{goodsId},
goods_name = #{goodsName},
goods_unit = #{goodsUnit},
provider_id = #{providerId},
provider_name = #{providerName},
remain_num = #{remainNum},
origin_num = #{originNum},
batch_no = #{batchNo},
inv_age = #{invAge},
goods_status = #{goodsStatus},
stock_status = #{stockStatus},
create_time = #{createTime},
create_user = #{createUser},
last_update_time = #{lastUpdateTime},
last_update_user = #{lastUpdateUser},
remark = #{remark},
ware_date = #{wareDate},
storage_mode = #{storageMode},
storage_id = #{storageId},
area_id = #{areaId},
goods_type_id = #{goodsTypeId},
occupy_num = #{occupyNum},
packing_num = #{packingNum},
production_date = #{productionDate},
where stock_id = #{stockId}
update app_stock set location_id = #{newLocation} where location_id = #{oldLocation}
update app_stock set location_id = #{location} where vehicle_id = #{vehicleId}
delete from app_stock where stock_id = #{stockId}
delete from app_stock where stock_id in
#{stockId}