id, index_name, index_type, index_description, index_value, index_unit, site_id, standard, status, date_create, date_update, create_by, update_by INSERT INTO sc_inspection_index ( id, index_name, index_type, index_description, index_value, index_unit, site_id, standard, status, date_create, date_update, create_by, update_by ) VALUES ( #{inspectionIndex.id,jdbcType=INTEGER}, #{inspectionIndex.indexName,jdbcType=VARCHAR}, #{inspectionIndex.indexType,jdbcType=INTEGER}, #{inspectionIndex.indexDescription,jdbcType=VARCHAR}, #{inspectionIndex.indexValue,jdbcType=VARCHAR}, #{inspectionIndex.indexUnit,jdbcType=VARCHAR}, #{inspectionIndex.siteId,jdbcType=INTEGER}, #{inspectionIndex.standard,jdbcType=INTEGER}, #{inspectionIndex.status,jdbcType=INTEGER}, #{inspectionIndex.dateCreate,jdbcType=TIMESTAMP}, #{inspectionIndex.dateUpdate,jdbcType=TIMESTAMP}, #{inspectionIndex.createBy,jdbcType=VARCHAR}, #{inspectionIndex.updateBy,jdbcType=VARCHAR} ) INSERT INTO sc_inspection_index id, index_name, index_type, index_description, index_value, index_unit, site_id, standard, status, date_create, date_update, create_by, update_by, VALUES #{inspectionIndex.id,jdbcType=INTEGER}, #{inspectionIndex.indexName,jdbcType=VARCHAR}, #{inspectionIndex.indexType,jdbcType=INTEGER}, #{inspectionIndex.indexDescription,jdbcType=VARCHAR}, #{inspectionIndex.indexValue,jdbcType=VARCHAR}, #{inspectionIndex.indexUnit,jdbcType=VARCHAR}, #{inspectionIndex.siteId,jdbcType=INTEGER}, #{inspectionIndex.standard,jdbcType=INTEGER}, #{inspectionIndex.status,jdbcType=INTEGER}, #{inspectionIndex.dateCreate,jdbcType=TIMESTAMP}, #{inspectionIndex.dateUpdate,jdbcType=TIMESTAMP}, #{inspectionIndex.createBy,jdbcType=VARCHAR}, #{inspectionIndex.updateBy,jdbcType=VARCHAR}, INSERT INTO sc_inspection_index ( id, index_name, index_type, index_description, index_value, index_unit, site_id, standard, status, date_create, date_update, create_by, update_by )VALUES ( #{inspectionIndex.id,jdbcType=INTEGER}, #{inspectionIndex.indexName,jdbcType=VARCHAR}, #{inspectionIndex.indexType,jdbcType=INTEGER}, #{inspectionIndex.indexDescription,jdbcType=VARCHAR}, #{inspectionIndex.indexValue,jdbcType=VARCHAR}, #{inspectionIndex.indexUnit,jdbcType=VARCHAR}, #{inspectionIndex.siteId,jdbcType=INTEGER}, #{inspectionIndex.standard,jdbcType=INTEGER}, #{inspectionIndex.status,jdbcType=INTEGER}, #{inspectionIndex.dateCreate,jdbcType=TIMESTAMP}, #{inspectionIndex.dateUpdate,jdbcType=TIMESTAMP}, #{inspectionIndex.createBy,jdbcType=VARCHAR}, #{inspectionIndex.updateBy,jdbcType=VARCHAR} ) UPDATE sc_inspection_index index_name= #{inspectionIndex.indexName,jdbcType=VARCHAR}, index_type= #{inspectionIndex.indexType,jdbcType=INTEGER}, index_description= #{inspectionIndex.indexDescription,jdbcType=VARCHAR}, index_value= #{inspectionIndex.indexValue,jdbcType=VARCHAR}, index_unit= #{inspectionIndex.indexUnit,jdbcType=VARCHAR}, site_id= #{inspectionIndex.siteId,jdbcType=INTEGER}, standard= #{inspectionIndex.standard,jdbcType=INTEGER}, status= #{inspectionIndex.status,jdbcType=INTEGER}, date_create= #{inspectionIndex.dateCreate,jdbcType=TIMESTAMP}, date_update= #{inspectionIndex.dateUpdate,jdbcType=TIMESTAMP}, create_by= #{inspectionIndex.createBy,jdbcType=VARCHAR}, update_by= #{inspectionIndex.updateBy,jdbcType=VARCHAR} WHERE id = #{inspectionIndex.id,jdbcType=INTEGER} update sc_inspection_index set status=0,date_update=now(),update_by=#{updateBy} where status = 1 and standard = #{id}