id,
site_id,
name,
address,
contact_penson,
completion_date,
contact_phone,
access_unit_id,
province,
city,
region,
detail_address,
region_code,
door_no,
road_name,
stree_no,
buildl_no,
longitude,
latitude,
highly,
building_area,
building_category,
building_structure,
fire_rating,
risk_rating,
has_control_roon,
control_roon_loc,
building_usage,
building_usage_cla,
rights,
cover_area,
stand_bed_area,
under_floor_num,
under_floor_area,
floor_num,
floor_area,
asylum_floor_num,
asylum_floor_area,
asylum_floor_loc,
fire_lift_num,
fire_lift_loc,
check_in_func,
max_capacity,
has_auto_equipme,
equipment_status,
equipment_desc,
beside_buildind_desc,
geography,
status,
create_date,
create_by,
update_date,
update_by,
community,
unit
INSERT INTO sc_building (
id,
site_id,
name,
address,
contact_penson,
completion_date,
contact_phone,
access_unit_id,
province,
city,
region,
detail_address,
region_code,
door_no,
road_name,
stree_no,
buildl_no,
longitude,
latitude,
highly,
building_area,
building_category,
building_structure,
fire_rating,
risk_rating,
has_control_roon,
control_roon_loc,
building_usage,
building_usage_cla,
rights,
cover_area,
stand_bed_area,
under_floor_num,
under_floor_area,
floor_num,
floor_area,
asylum_floor_num,
asylum_floor_area,
asylum_floor_loc,
fire_lift_num,
fire_lift_loc,
check_in_func,
max_capacity,
has_auto_equipme,
equipment_status,
equipment_desc,
beside_buildind_desc,
geography,
status,
create_date,
create_by,
update_date,
update_by,
community,
unit
) VALUES (
#{building.id,jdbcType=INTEGER},
#{building.siteId,jdbcType=INTEGER},
#{building.name,jdbcType=VARCHAR},
#{building.address,jdbcType=VARCHAR},
#{building.contactPenson,jdbcType=VARCHAR},
#{building.completionDate,jdbcType=TIMESTAMP},
#{building.contactPhone,jdbcType=VARCHAR},
#{building.accessUnitId,jdbcType=INTEGER},
#{building.province,jdbcType=INTEGER},
#{building.city,jdbcType=INTEGER},
#{building.region,jdbcType=INTEGER},
#{building.detailAddress,jdbcType=VARCHAR},
#{building.regionCode,jdbcType=VARCHAR},
#{building.doorNo,jdbcType=VARCHAR},
#{building.roadName,jdbcType=VARCHAR},
#{building.streeNo,jdbcType=VARCHAR},
#{building.buildlNo,jdbcType=VARCHAR},
#{building.longitude,jdbcType=VARCHAR},
#{building.latitude,jdbcType=VARCHAR},
#{building.highly,jdbcType=VARCHAR},
#{building.buildingArea,jdbcType=VARCHAR},
#{building.buildingCategory,jdbcType=INTEGER},
#{building.buildingStructure,jdbcType=INTEGER},
#{building.fireRating,jdbcType=INTEGER},
#{building.riskRating,jdbcType=INTEGER},
#{building.hasControlRoon,jdbcType=INTEGER},
#{building.controlRoonLoc,jdbcType=VARCHAR},
#{building.buildingUsage,jdbcType=INTEGER},
#{building.buildingUsageCla,jdbcType=VARCHAR},
#{building.rights,jdbcType=INTEGER},
#{building.coverArea,jdbcType=VARCHAR},
#{building.standBedArea,jdbcType=VARCHAR},
#{building.underFloorNum,jdbcType=INTEGER},
#{building.underFloorArea,jdbcType=VARCHAR},
#{building.floorNum,jdbcType=INTEGER},
#{building.floorArea,jdbcType=VARCHAR},
#{building.asylumFloorNum,jdbcType=VARCHAR},
#{building.asylumFloorArea,jdbcType=VARCHAR},
#{building.asylumFloorLoc,jdbcType=VARCHAR},
#{building.fireLiftNum,jdbcType=VARCHAR},
#{building.fireLiftLoc,jdbcType=VARCHAR},
#{building.checkInFunc,jdbcType=VARCHAR},
#{building.maxCapacity,jdbcType=VARCHAR},
#{building.hasAutoEquipme,jdbcType=INTEGER},
#{building.equipmentStatus,jdbcType=VARCHAR},
#{building.equipmentDesc,jdbcType=VARCHAR},
#{building.besideBuildindDesc,jdbcType=VARCHAR},
#{building.geography,jdbcType=VARCHAR},
#{building.status,jdbcType=INTEGER},
#{building.createDate,jdbcType=TIMESTAMP},
#{building.createBy,jdbcType=VARCHAR},
#{building.updateDate,jdbcType=TIMESTAMP},
#{building.updateBy,jdbcType=VARCHAR},
#{building.community,jdbcType=VARCHAR},
#{building.unit,jdbcType=VARCHAR}
)
INSERT INTO sc_building
id,
site_id,
name,
address,
contact_penson,
completion_date,
contact_phone,
access_unit_id,
province,
city,
region,
detail_address,
region_code,
door_no,
road_name,
stree_no,
buildl_no,
longitude,
latitude,
highly,
building_area,
building_category,
building_structure,
fire_rating,
risk_rating,
has_control_roon,
control_roon_loc,
building_usage,
building_usage_cla,
rights,
cover_area,
stand_bed_area,
under_floor_num,
under_floor_area,
floor_num,
floor_area,
asylum_floor_num,
asylum_floor_area,
asylum_floor_loc,
fire_lift_num,
fire_lift_loc,
check_in_func,
max_capacity,
has_auto_equipme,
equipment_status,
equipment_desc,
beside_buildind_desc,
geography,
status,
create_date,
create_by,
update_date,
update_by,
community,
unit
VALUES
#{building.id,jdbcType=INTEGER},
#{building.siteId,jdbcType=INTEGER},
#{building.name,jdbcType=VARCHAR},
#{building.address,jdbcType=VARCHAR},
#{building.contactPenson,jdbcType=VARCHAR},
#{building.completionDate,jdbcType=TIMESTAMP},
#{building.contactPhone,jdbcType=VARCHAR},
#{building.accessUnitId,jdbcType=INTEGER},
#{building.province,jdbcType=INTEGER},
#{building.city,jdbcType=INTEGER},
#{building.region,jdbcType=INTEGER},
#{building.detailAddress,jdbcType=VARCHAR},
#{building.regionCode,jdbcType=VARCHAR},
#{building.doorNo,jdbcType=VARCHAR},
#{building.roadName,jdbcType=VARCHAR},
#{building.streeNo,jdbcType=VARCHAR},
#{building.buildlNo,jdbcType=VARCHAR},
#{building.longitude,jdbcType=VARCHAR},
#{building.latitude,jdbcType=VARCHAR},
#{building.highly,jdbcType=VARCHAR},
#{building.buildingArea,jdbcType=VARCHAR},
#{building.buildingCategory,jdbcType=INTEGER},
#{building.buildingStructure,jdbcType=INTEGER},
#{building.fireRating,jdbcType=INTEGER},
#{building.riskRating,jdbcType=INTEGER},
#{building.hasControlRoon,jdbcType=INTEGER},
#{building.controlRoonLoc,jdbcType=VARCHAR},
#{building.buildingUsage,jdbcType=INTEGER},
#{building.buildingUsageCla,jdbcType=VARCHAR},
#{building.rights,jdbcType=INTEGER},
#{building.coverArea,jdbcType=VARCHAR},
#{building.standBedArea,jdbcType=VARCHAR},
#{building.underFloorNum,jdbcType=INTEGER},
#{building.underFloorArea,jdbcType=VARCHAR},
#{building.floorNum,jdbcType=INTEGER},
#{building.floorArea,jdbcType=VARCHAR},
#{building.asylumFloorNum,jdbcType=VARCHAR},
#{building.asylumFloorArea,jdbcType=VARCHAR},
#{building.asylumFloorLoc,jdbcType=VARCHAR},
#{building.fireLiftNum,jdbcType=VARCHAR},
#{building.fireLiftLoc,jdbcType=VARCHAR},
#{building.checkInFunc,jdbcType=VARCHAR},
#{building.maxCapacity,jdbcType=VARCHAR},
#{building.hasAutoEquipme,jdbcType=INTEGER},
#{building.equipmentStatus,jdbcType=VARCHAR},
#{building.equipmentDesc,jdbcType=VARCHAR},
#{building.besideBuildindDesc,jdbcType=VARCHAR},
#{building.geography,jdbcType=VARCHAR},
#{building.status,jdbcType=INTEGER},
#{building.createDate,jdbcType=TIMESTAMP},
#{building.createBy,jdbcType=VARCHAR},
#{building.updateDate,jdbcType=TIMESTAMP},
#{building.updateBy,jdbcType=VARCHAR},
#{building.community,jdbcType=VARCHAR},
#{building.unit,jdbcType=VARCHAR}
INSERT INTO sc_building(
id,
site_id,
name,
address,
contact_penson,
completion_date,
contact_phone,
access_unit_id,
province,
city,
region,
detail_address,
region_code,
door_no,
road_name,
stree_no,
buildl_no,
longitude,
latitude,
highly,
building_area,
building_category,
building_structure,
fire_rating,
risk_rating,
has_control_roon,
control_roon_loc,
building_usage,
building_usage_cla,
rights,
cover_area,
stand_bed_area,
under_floor_num,
under_floor_area,
floor_num,
floor_area,
asylum_floor_num,
asylum_floor_area,
asylum_floor_loc,
fire_lift_num,
fire_lift_loc,
check_in_func,
max_capacity,
has_auto_equipme,
equipment_status,
equipment_desc,
beside_buildind_desc,
geography,
status,
create_date,
create_by,
update_date,
update_by,
community,
unit
)VALUES
(
#{building.id,jdbcType=INTEGER},
#{building.siteId,jdbcType=INTEGER},
#{building.name,jdbcType=VARCHAR},
#{building.address,jdbcType=VARCHAR},
#{building.contactPenson,jdbcType=VARCHAR},
#{building.completionDate,jdbcType=TIMESTAMP},
#{building.contactPhone,jdbcType=VARCHAR},
#{building.accessUnitId,jdbcType=INTEGER},
#{building.province,jdbcType=INTEGER},
#{building.city,jdbcType=INTEGER},
#{building.region,jdbcType=INTEGER},
#{building.detailAddress,jdbcType=VARCHAR},
#{building.regionCode,jdbcType=VARCHAR},
#{building.doorNo,jdbcType=VARCHAR},
#{building.roadName,jdbcType=VARCHAR},
#{building.streeNo,jdbcType=VARCHAR},
#{building.buildlNo,jdbcType=VARCHAR},
#{building.longitude,jdbcType=VARCHAR},
#{building.latitude,jdbcType=VARCHAR},
#{building.highly,jdbcType=VARCHAR},
#{building.buildingArea,jdbcType=VARCHAR},
#{building.buildingCategory,jdbcType=INTEGER},
#{building.buildingStructure,jdbcType=INTEGER},
#{building.fireRating,jdbcType=INTEGER},
#{building.riskRating,jdbcType=INTEGER},
#{building.hasControlRoon,jdbcType=INTEGER},
#{building.controlRoonLoc,jdbcType=VARCHAR},
#{building.buildingUsage,jdbcType=INTEGER},
#{building.buildingUsageCla,jdbcType=VARCHAR},
#{building.rights,jdbcType=INTEGER},
#{building.coverArea,jdbcType=VARCHAR},
#{building.standBedArea,jdbcType=VARCHAR},
#{building.underFloorNum,jdbcType=INTEGER},
#{building.underFloorArea,jdbcType=VARCHAR},
#{building.floorNum,jdbcType=INTEGER},
#{building.floorArea,jdbcType=VARCHAR},
#{building.asylumFloorNum,jdbcType=VARCHAR},
#{building.asylumFloorArea,jdbcType=VARCHAR},
#{building.asylumFloorLoc,jdbcType=VARCHAR},
#{building.fireLiftNum,jdbcType=VARCHAR},
#{building.fireLiftLoc,jdbcType=VARCHAR},
#{building.checkInFunc,jdbcType=VARCHAR},
#{building.maxCapacity,jdbcType=VARCHAR},
#{building.hasAutoEquipme,jdbcType=INTEGER},
#{building.equipmentStatus,jdbcType=VARCHAR},
#{building.equipmentDesc,jdbcType=VARCHAR},
#{building.besideBuildindDesc,jdbcType=VARCHAR},
#{building.geography,jdbcType=VARCHAR},
#{building.status,jdbcType=INTEGER},
#{building.createDate,jdbcType=TIMESTAMP},
#{building.createBy,jdbcType=VARCHAR},
#{building.updateDate,jdbcType=TIMESTAMP},
#{building.updateBy,jdbcType=VARCHAR},
#{building.community,jdbcType=VARCHAR},
#{building.unit,jdbcType=VARCHAR}
)
UPDATE sc_building
id = #{building.id,jdbcType=INTEGER},
site_id = #{building.siteId,jdbcType=INTEGER},
name = #{building.name,jdbcType=VARCHAR},
address = #{building.address,jdbcType=VARCHAR},
contact_penson = #{building.contactPenson,jdbcType=VARCHAR},
completion_date = #{building.completionDate,jdbcType=TIMESTAMP},
contact_phone = #{building.contactPhone,jdbcType=VARCHAR},
access_unit_id = #{building.accessUnitId,jdbcType=INTEGER},
province = #{building.province,jdbcType=INTEGER},
city = #{building.city,jdbcType=INTEGER},
region = #{building.region,jdbcType=INTEGER},
detail_address = #{building.detailAddress,jdbcType=VARCHAR},
region_code = #{building.regionCode,jdbcType=VARCHAR},
door_no = #{building.doorNo,jdbcType=VARCHAR},
road_name = #{building.roadName,jdbcType=VARCHAR},
stree_no = #{building.streeNo,jdbcType=VARCHAR},
buildl_no = #{building.buildlNo,jdbcType=VARCHAR},
longitude = #{building.longitude,jdbcType=VARCHAR},
latitude = #{building.latitude,jdbcType=VARCHAR},
highly = #{building.highly,jdbcType=VARCHAR},
building_area = #{building.buildingArea,jdbcType=VARCHAR},
building_category = #{building.buildingCategory,jdbcType=INTEGER},
building_structure = #{building.buildingStructure,jdbcType=INTEGER},
fire_rating = #{building.fireRating,jdbcType=INTEGER},
risk_rating = #{building.riskRating,jdbcType=INTEGER},
has_control_roon = #{building.hasControlRoon,jdbcType=INTEGER},
control_roon_loc = #{building.controlRoonLoc,jdbcType=VARCHAR},
building_usage = #{building.buildingUsage,jdbcType=INTEGER},
building_usage_cla = #{building.buildingUsageCla,jdbcType=VARCHAR},
rights = #{building.rights,jdbcType=INTEGER},
cover_area = #{building.coverArea,jdbcType=VARCHAR},
stand_bed_area = #{building.standBedArea,jdbcType=VARCHAR},
under_floor_num = #{building.underFloorNum,jdbcType=INTEGER},
under_floor_area = #{building.underFloorArea,jdbcType=VARCHAR},
floor_num = #{building.floorNum,jdbcType=INTEGER},
floor_area = #{building.floorArea,jdbcType=VARCHAR},
asylum_floor_num = #{building.asylumFloorNum,jdbcType=VARCHAR},
asylum_floor_area = #{building.asylumFloorArea,jdbcType=VARCHAR},
asylum_floor_loc = #{building.asylumFloorLoc,jdbcType=VARCHAR},
fire_lift_num = #{building.fireLiftNum,jdbcType=VARCHAR},
fire_lift_loc = #{building.fireLiftLoc,jdbcType=VARCHAR},
check_in_func = #{building.checkInFunc,jdbcType=VARCHAR},
max_capacity = #{building.maxCapacity,jdbcType=VARCHAR},
has_auto_equipme = #{building.hasAutoEquipme,jdbcType=INTEGER},
equipment_status = #{building.equipmentStatus,jdbcType=VARCHAR},
equipment_desc = #{building.equipmentDesc,jdbcType=VARCHAR},
beside_buildind_desc = #{building.besideBuildindDesc,jdbcType=VARCHAR},
geography = #{building.geography,jdbcType=VARCHAR},
status = #{building.status,jdbcType=INTEGER},
create_date = #{building.createDate,jdbcType=TIMESTAMP},
create_by = #{building.createBy,jdbcType=VARCHAR},
update_date = #{building.updateDate,jdbcType=TIMESTAMP},
update_by = #{building.updateBy,jdbcType=VARCHAR},
community = #{building.community,jdbcType=VARCHAR},
unit = #{building.unit,jdbcType=VARCHAR}
WHERE id = #{building.id,jdbcType=INTEGER}
update sc_building set status = 0,update_date=now(),update_by=#{updateBy} where status = 1 and site_id = #{siteId}
update sc_building_import set lat = #{param.lat,jdbcType=VARCHAR},
lng = #{param.lng,jdbcType=VARCHAR},
status = #{param.status,jdbcType=VARCHAR}
where 1 = 1
and building = #{param.building,jdbcType=VARCHAR}
and community = #{param.community,jdbcType=VARCHAR}
update t2_test set address = #{param.address,jdbcType=VARCHAR},
province = #{param.province,jdbcType=VARCHAR},
city = #{param.city,jdbcType=VARCHAR},
region = #{param.region,jdbcType=VARCHAR},
lat = #{param.lat,jdbcType=VARCHAR},
lag = #{param.lag,jdbcType=VARCHAR}
where name = #{param.name,jdbcType=VARCHAR}