ruby新建web项目步骤,使用mysql数据库

时间:2022-03-14 19:10:55

1.创建一个项目 指定数据库

rails new demo02 -d mysql

2.修改 config/database.yml 修改数据库密码

default: &default
adapter: mysql2 encoding: utf8 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> username: root password: 111 host: localhost development: <<: *default database: AirQueen_development

3. 创建数据库(会创建2个库 airQueen_developmen  airqueen_developmen_test )

rails db:create

4. 执行数据迁移

rails db:migrate

5. 安装bundler

gem install bundler

6. 执行bundle update

------------------------------------------------

创建控制器  包含index动作

rails g controller work_pros index

创建模型层

rails generate model vehicle type:string color:string price:decimal{10.2}

-------------------------------------------------------------------------

创建资源 user  shop   在shops表中添加user_name 关联字段

rails g scaffold user name age shop_id:integer

rails db:migrate  (执行迁移创建表)

rails g scaffold shop name price:integer shop_id:integer num:integer user_name

rails db:migrate

-------------------------------------------------------------------

关联查询

select u.*,s.price from users u join shops s on  u.name=s.user_name

使用find_by_sql()

@shops = User.find_by_sql("select u.*,s.price,s.name sname from users u join shops s on

u.name=s.user_name where u.name='lmg02'")

根据名字关联查询【使用find_by_sql()】

@name = params[:name]

@shops = User.find_by_sql("select u.*,s.price,s.name sname from users u join shops s on

u.name=s.user_name where u.name='#{@name}'")

--------------------------------------------------------------

同时保存2张表数据

def create

linkman = params[:linkman]

tel = params[:linkman_tel]

unit = params[:unit_address]

@SRegionCode = SRegionCode.new(params_s_region_code)

respond_to do |format|

if @SRegionCode.save

@info = SRegionCodeInfo.new(:linkman => linkman, :linkman_tel => tel, :unit_address

=> unit, :s_region_code_id => @SRegionCode.id)

@info.save

format.html {redirect_to "/s_region_code"}

format.json {render json: {status: "success", location: @SRegionCode}}

else

format.html {render :new}

format.json {render json: {status: "false", location: @SRegionCode.errors}}

end

end

end

step1:

创建关联的表 model  d_power_cut_audit_logs【关联字段d_power_cut_record_id:integer】

rails g model d_power_cut_audit_log audit_cause note d_power_cut_record_id:integer

--------------------------------------------------------------------

audit_cause = params[:audit_des]

note = params[:note]

#保存关联数据到另一张表

@power_cut_audit_log=DPowerCutAuditLog.new(:audit_cause => audit_cause, :note =>

note, :d_power_cut_record_id => @powerCutRecord.id)

@power_cut_audit_log.save

#按条件查询

@unit_yw   = params[:unit_yw]             # 按运维单位

@station_name   = params[:station_name]   # 按站点

@job_status   = params[:job_status]       # 按工单状态

@origin   = params[:origin]               # 按来源

@audit_des   = params[:audit_des]         # 按回退原因

#按运维单位搜索

scope :by_unit_yw, ->(unit_yw) {

where(:unit_yw => unit_yw) if unit_yw.present?

}

#按站点搜索

scope :by_station_name, ->(station_name) {

where(:station_name => station_name) if work_type.present?

}

#按工单状态搜索

scope :by_job_status, ->(job_status) {

where(:job_status => job_status) if job_status.present?

}

#按来源搜索

scope :by_origin, ->(origin) {

where(:origin => origin) if origin.present?

}

#按回退原因搜索

scope :by_audit_des, ->(audit_des) {

where(:audit_des => audit_des) if audit_des.present?

}

#按创建时间

scope :by_created_at, ->(created_at,end_at) {

where(:created_at => (created_at..end_at)) if created_at.present? && end_at.present?

}

scope :by_time, ->(created_time,end_time) {

where(created_at: (created_time)..end_time) if created_time.present? &&

end_time.present?

}

#获取创建开始时间

@created_at=params[:created_at].to_s + " 00:00:00" if params[:created_at].present?

#获取结束时间

@end_at=params[:end_at].to_s + " 23:59:59" if params[:end_at].present?

------------------------------------------------------------

【将前端查询的条件封装为一个json---详见:d_power_cut_record.rb】

模型层DPowerCutRecord

def self.status

@str = []

%w(待分配 待处理 待审核 完成).each_with_index do |statu,index|

hande_no = %w(waitting no_handle no_audit finish )[index]

@str << {value: statu, text: hande_no }

end

return @str

end

json中添加

json.status DPowerCutRecord.status

-----------------------------------------------------------------

【转换日期格式】

json.powerCutRecords @powerCutRecords do |p|

#json.id  p.id

#json.station_name  p.station_name

# json.unit_yw  p.unit_yw

json.begin_time p.begin_time.strftime("%Y/%m/%d %H:%M:%S")

json.end_time p.end_time.strftime("%Y/%m/%d %H:%M:%S")

#json.time_range  p.time_range

json.created_at  p.created_at.strftime("%Y/%m/%d %H:%M:%S")

#json.exception_name  p.exception_name

# json.origin  p.origin

# json.handle_man  p.handle_man

# json.audit_des  p.audit_des

# json.job_status  p.job_status

# json.img_path  p.img_path

end

【转换日期格式---项目中的写法】

方式2:(项目中的写法 d_alarms /index.json.jbuilder)

json.first_alarm_time alarm.first_alarm_time.present? ? alarm.first_alarm_time.strftime

("%Y-%m-%d %H:%M:%S") : ''

json.last_alarm_time alarm.last_alarm_time.present? ? alarm.last_alarm_time.strftime("%Y-

%m-%d %H:%M:%S") : ''

【CRT中:调用model类方法查询】

DPowerCutRecord.where(:d_station_id => ["1","2","1001"]).by_unit_yw("")

--------------------------------------------------

Last login: Fri Aug 25 09:21:15 2017 from 172.168.10.84

dingfj@envsafe-server:~$ cd ../envsafe/AirQueen

dingfj@envsafe-server:/home/envsafe/AirQueen$ sudo su envsafe

[sudo] dingfj 的密码:

envsafe@envsafe-server:~/AirQueen$ rails c

--------------》修改文件后需要退出重新进入

exit 退出

rails c

1.创建一个项目 指定数据库rails new demo02 -d mysql 
2.修改 config/database.yml 修改数据库密码
3. 创建数据库(会创建2个库 demo02_developem  demo02_test )rails db:create

4. 安装bundlergem install bundler
5. 执行bundle update

创建控制器  包含index动作rails g controller work_pros index

创建模型层rails generate model vehicle type:string color:string price:decimal{10.2}
-------------------------------------------------------------------------创建资源 user  shop   在shops表中添加user_name 关联字段
rails g scaffold user name age shop_id:integer   rails db:migrate  (执行迁移创建表)
rails g scaffold shop name price:integer shop_id:integer num:integer user_namerails db:migrate

-------------------------------------------------------------------关联查询select u.*,s.price from users u join shops s on  u.name=s.user_name使用find_by_sql()@shops = User.find_by_sql("select u.*,s.price,s.name sname from users u join shops s on  
u.name=s.user_name where u.name='lmg02'")

根据名字关联查询【使用find_by_sql()】@name = params[:name]@shops = User.find_by_sql("select u.*,s.price,s.name sname from users u join shops s on  
u.name=s.user_name where u.name='#{@name}'")
--------------------------------------------------------------同时保存2张表数据 def create    linkman = params[:linkman]    tel = params[:linkman_tel]    unit = params[:unit_address]    @SRegionCode = SRegionCode.new(params_s_region_code)    respond_to do |format|      if @SRegionCode.save        @info = SRegionCodeInfo.new(:linkman => linkman, :linkman_tel => tel, :unit_address 
=> unit, :s_region_code_id => @SRegionCode.id)        @info.save        format.html {redirect_to "/s_region_code"}        format.json {render json: {status: "success", location: @SRegionCode}}      else        format.html {render :new}        format.json {render json: {status: "false", location: @SRegionCode.errors}}      end    end  end    step1:  创建关联的表 model  d_power_cut_audit_logs【关联字段d_power_cut_record_id:integer】  rails g model d_power_cut_audit_log audit_cause note d_power_cut_record_id:integer    -------------------------------------------------------------------- audit_cause = params[:audit_des] note = params[:note]
 #保存关联数据到另一张表        @power_cut_audit_log=DPowerCutAuditLog.new(:audit_cause => audit_cause, :note => 
note, :d_power_cut_record_id => @powerCutRecord.id)        @power_cut_audit_log.save

#按条件查询     @unit_yw   = params[:unit_yw]             # 按运维单位     @station_name   = params[:station_name]   # 按站点     @job_status   = params[:job_status]       # 按工单状态
     @origin   = params[:origin]               # 按来源     @audit_des   = params[:audit_des]         # 按回退原因   #按运维单位搜索scope :by_unit_yw, ->(unit_yw) {  where(:unit_yw => unit_yw) if unit_yw.present?}
#按站点搜索 scope :by_station_name, ->(station_name) {  where(:station_name => station_name) if work_type.present?}
#按工单状态搜索  scope :by_job_status, ->(job_status) {  where(:job_status => job_status) if job_status.present?}
#按来源搜索 scope :by_origin, ->(origin) {  where(:origin => origin) if origin.present?}
#按回退原因搜索 scope :by_audit_des, ->(audit_des) {  where(:audit_des => audit_des) if audit_des.present?}
#按创建时间scope :by_created_at, ->(created_at,end_at) {  where(:created_at => (created_at..end_at)) if created_at.present? && end_at.present?}
scope :by_time, ->(created_time,end_time) {where(created_at: (created_time)..end_time) if created_time.present? && 
end_time.present?}

#获取创建开始时间@created_at=params[:created_at].to_s + " 00:00:00" if params[:created_at].present?#获取结束时间@end_at=params[:end_at].to_s + " 23:59:59" if params[:end_at].present?
------------------------------------------------------------【将前端查询的条件封装为一个json---详见:d_power_cut_record.rb】模型层DPowerCutRecorddef self.status  @str = []   %w(待分配 待处理 待审核 完成).each_with_index do |statu,index|      hande_no = %w(waitting no_handle no_audit finish )[index]      @str << {value: statu, text: hande_no }   end   return @strend
json中添加json.status DPowerCutRecord.status
-----------------------------------------------------------------【转换日期格式】
json.powerCutRecords @powerCutRecords do |p|

#json.id  p.id
    #json.station_name  p.station_name   # json.unit_yw  p.unit_yw    json.begin_time p.begin_time.strftime("%Y/%m/%d %H:%M:%S")    json.end_time p.end_time.strftime("%Y/%m/%d %H:%M:%S")    #json.time_range  p.time_range
    json.created_at  p.created_at.strftime("%Y/%m/%d %H:%M:%S")   #json.exception_name  p.exception_name   # json.origin  p.origin   # json.handle_man  p.handle_man   # json.audit_des  p.audit_des   # json.job_status  p.job_status   # json.img_path  p.img_path
end
【转换日期格式---项目中的写法】方式2:(项目中的写法 d_alarms /index.json.jbuilder)json.first_alarm_time alarm.first_alarm_time.present? ? alarm.first_alarm_time.strftime
("%Y-%m-%d %H:%M:%S") : ''json.last_alarm_time alarm.last_alarm_time.present? ? alarm.last_alarm_time.strftime("%Y-
%m-%d %H:%M:%S") : ''

【CRT中:调用model类方法查询】 DPowerCutRecord.where(:d_station_id => ["1","2","1001"]).by_unit_yw("") -------------------------------------------------- Last login: Fri Aug 25 09:21:15 2017 from 172.168.10.84dingfj@envsafe-server:~$ cd ../envsafe/AirQueendingfj@envsafe-server:/home/envsafe/AirQueen$ sudo su envsafe [sudo] dingfj 的密码: envsafe@envsafe-server:~/AirQueen$ rails c
--------------》修改文件后需要退出重新进入exit 退出rails c

#封装 按回退原因 搜素信息def self.audits  @str = []   %w(停电时间超出证明范围 停电时间填写有误 停电站点与凭证中的站点名称不符 间断停电时间请分
开录入 其他).each_with_index do |statu,index|      hande_no = %w(out_range info_wrong no_match sep_entry other )[index]      @str << {value: statu, text: hande_no }   end   return @strend
#封装 按来源 搜素信息def self.origins  @str = []   %w(地方站报送 其它报送 市站盖章 地方供电局证明 公司盖章 其他).each_with_index do |
statu,index|      hande_no = %w(local_submit other_submit city_stamp local_prove company_seal other )
[index]      @str << {value: statu, text: hande_no }   end   return @strend
------------------------------------------------

-------------------------报错信息------------------------------------Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.6ms)
NoMethodError (undefined method `[]' for nil:NilClass):  app/controllers/ops_audit_controller.rb:28:in `update'

Parameters: {"audit_if"=>"Y", "audit_des"=>"", "id"=>"27"}  DTaskForm Load (0.5ms)  SELECT  `d_task_forms`.* FROM `d_task_forms` WHERE 
`d_task_forms`.`id` = 27 LIMIT 1当前用户的SessionCode: WViY6LkSdLPq9TO9qY8DCg  DLoginMsg Load (0.5ms)  SELECT  `d_login_msgs`.* FROM `d_login_msgs` WHERE 
`d_login_msgs`.`session` = 'WViY6LkSdLPq9TO9qY8DCg' LIMIT 1当前用户信息: #<DLoginMsg:0xb3351e8>当前用户的SessionCode: WViY6LkSdLPq9TO9qY8DCgCompleted 400 Bad Request in 6ms (ActiveRecord: 1.0ms)
ActionController::ParameterMissing (param is missing or the value is empty: d_task_form):  app/controllers/ops_audit_controller.rb:72:in `ops_audit_params'  app/controllers/ops_audit_controller.rb:42:in `block in update'  app/controllers/ops_audit_controller.rb:41:in `update

--------------批量审核-------------------batch_audit?batch_audit_ids=["2065","2398"]

batch_audit_ops_audit_index POST   /ops_audit/batch_audit(.:format)            
           ops_audit#batch_audit                         ops_audit_index GET    /ops_audit(.:format)                        
           ops_audit#index                                         POST   /ops_audit(.:format)                        
           ops_audit#create                           new_ops_audit GET    /ops_audit/new(.:format)                    
           ops_audit#new                          edit_ops_audit GET    /ops_audit/:id/edit(.:format)               
           ops_audit#edit                               ops_audit GET    /ops_audit/:id(.:format)                    
           ops_audit#show                                         PATCH  /ops_audit/:id(.:format)                    
           ops_audit#update                                         PUT    /ops_audit/:id(.:format)                    
           ops_audit#update                                         DELETE /ops_audit/:id(.:format)                    
           ops_audit#destroy

Started POST "/ops_audit/batch_audit.json" for 172.168.10.84 at 2017-09-01 16:37:51 +0800Cannot render console from 172.168.10.84! Allowed networks: 127.0.0.1, ::1, 
127.0.0.0/127.255.255.255Processing by OpsAuditController#batch_audit as JSON  Parameters: {"batch_audit_ids"=>"28,27,26"}当前用户的SessionCode: V_gaUK87N85ouf1kK924Ww  DLoginMsg Load (0.5ms)  SELECT  `d_login_msgs`.* FROM `d_login_msgs` WHERE 
`d_login_msgs`.`session` = 'V_gaUK87N85ouf1kK924Ww' LIMIT 1当前用户信息: #<DLoginMsg:0xb3489230>当前用户的SessionCode: V_gaUK87N85ouf1kK924Ww  DTaskForm Load (0.4ms)  SELECT `d_task_forms`.* FROM `d_task_forms` WHERE 
`d_task_forms`.`id` = 28   (0.2ms)  BEGIN  SQL (0.4ms)  UPDATE `d_task_forms` SET `job_status` = 'audit', `audit_time` = '2017-09-01 
16:37:51', `audit_if` = 'Y', `updated_at` = '2017-09-01 16:37:51' WHERE `d_task_forms`.`id` 
= 28   (69.1ms)  COMMIT   (0.2ms)  BEGIN  SQL (0.3ms)  INSERT INTO `d_fault_job_details` (`job_status`, `handle_man`, `begin_time`, 
`end_time`, `handle_status`, `d_task_form_id`, `created_at`, `updated_at`) VALUES ('audit', 
'zs11', '2017-09-01 16:37:51', '2017-09-01 16:37:51', '完成', 28, '2017-09-01 16:37:51', 
'2017-09-01 16:37:51')   (25.3ms)  COMMITCompleted 200 OK in 128ms (Views: 1.3ms | ActiveRecord: 96.4ms)---------------------按数据查询------------------------- #按站点id查询    scope :by_station_id, ->(station_ids){        where(d_station_id: station_ids) if station_ids.present?    }
 #按创建时间查询    scope :by_time, ->(created_time,end_time) {        where(created_at: (created_time)..end_time) if created_time.present? && 
end_time.present?    }-----------------------------------------------------------------------【关联表数据的保存】#保存工单日志 (通过不通过均保存日志信息)    #@d_fault_job_detail=DFaultJobDetail.new(:job_status => 
@ops_audit.job_status,:handle_man => handle_man,:begin_time => Time.now,:end_time 
=>Time.now,:handle_status =>handle_status,:d_task_form_id =>@ops_audit.id)    @d_fault_job_detail=@ops_audit.d_fault_job_details.new(:job_status => 
@ops_audit.job_status,:handle_man => handle_man,:begin_time => Time.now,:end_time 
=>Time.now,:handle_status =>handle_status)    @d_fault_job_detail.save-------------------------【关联查询省份信
息】--------------------------------------------------- area = ops.s_administrative_area province = area.zone_name == "北京市" ? area.zone_name : area.parent.zone_name json.id ops.id json.procince province   ----------------审核查询条件------------------ http://172.168.10.7:3030/ops_audit_manages/plan_audit.json?
handle_station=1001&week_time=2017-08-28%2000:00:00&edit_status=W      Started GET "/ops_audit_manages/plan_audit.json?plan_audit_params%5B0%5D%5Bparam%5D
%5Bweek_time%5D=2017-09-04&plan_audit_params%5B0%5D%5Bparam%5D%5Bhandle_station%5D%5B
%5D=1001&plan_audit_params%5B1%5D%5Bparam%5D%5Bweek_time%5D=2017-09-11&plan_audit_params
%5B1%5D%5Bparam%5D%5Bhandle_station%5D%5B%5D=1001&edit_status=W" for 172.168.10.84 at 2017
-09-15 17:24:13 +0800Cannot render console from 172.168.10.84! Allowed networks: 127.0.0.1, ::1, 
127.0.0.0/127.255.255.255Processing by OpsAuditManagesController#plan_audit as JSON  Parameters: {"plan_audit_params"=>{"0"=>{"param"=>{"week_time"=>"2017-09-04", 
"handle_station"=>["1001"]}}, "1"=>{"param"=>{"week_time"=>"2017-09-11", 
"handle_station"=>["1001"]}}}, "edit_status"=>"W"}当前用户的SessionCode: bnCFWOZa-VzuTq4S36iXxw  DLoginMsg Load (0.6ms)  SELECT  `d_login_msgs`.* FROM `d_login_msgs` WHERE 
`d_login_msgs`.`session` = 'bnCFWOZa-VzuTq4S36iXxw' LIMIT 1当前用户信息: #<DLoginMsg:0xac03e2f4>当前用户的SessionCode: bnCFWOZa-VzuTq4S36iXxwCompleted 500 Internal Server Error in 4ms (ActiveRecord: 0.6ms)
TypeError (no implicit conversion of String into Integer):  app/controllers/ops_audit_manages_controller.rb:24:in `[]'  app/controllers/ops_audit_manages_controller.rb:24:in `block in plan_audit'  app/controllers/ops_audit_manages_controller.rb:23:in `plan_audit'

Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-
4.2.6/lib/action_dispatch/middleware/templates/rescues/_source.erb (4.7ms)  Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-
4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (1.0ms)  Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-
4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb 
(1.3ms)  Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-
4.2.6/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb (38.0ms)^Cenvsafe@envsafe-server:~/AirQueen/log$ no implicit conversion of String into Integer^C  -------------------封装参数---------- Parameters: {"plan_details_params"=>{"params"=>{"0"=>{"id"=>"26", "job_time"=>"2017-09-
12"},                                                  "1"=>{"id"=>"27", "job_time"=>"2017-09-
12"}}},  "id"=>"8"}  plan_details_params=params[:plan_details_params][:params]  #获取到参数  plan_details_params.each do |params|  @ops_plan_detail=@ops_plan.d_ops_plan_details.find_by(:d_work_pro_id =>params[1]['id'])  @ops_plan_detail.job_time=params[1]['job_time']   Parameters: {"plan_audit_params"=>{"0"=>{"param"=>{"week_time"=>"2017-09-04", 
"handle_station"=>["1001"]}},                                     "1"=>{"param"=>{"week_time"=>"2017-09-11", 
"handle_station"=>["1001"]}}}, "edit_status"=>"W"}  plan_audit_params = params[:plan_audit_params]  #是一个数组      edit_if = params[:edit_status]  #审核内容      plan_audit_params.each do |param|  week_time = param['param']['week_time']  d_station_id = param['param']['handle_station']  @ops_plans = DOpsPlanManage.where(d_station_id: d_station_id, week_begin_time: 
week_time)  -----each后-----》 ["0", {"param"=>{"week_time"=>"2017-09-04", "handle_station"=>["1001"]}}]    ------------图片上传--------------------------- Started POST "/power_cut_records" for 172.168.10.84 at 2017-09-19 18:09:32 +0800Cannot render console from 172.168.10.84! Allowed networks: 127.0.0.1, ::1, 
127.0.0.0/127.255.255.255Processing by PowerCutRecordsController#create as HTML  Parameters: {"utf8"=>"✓", "d_power_cut_record"=>{"station_name"=>"平顶山市-高压开关厂", 
"d_station_id"=>"1831", "begin_time"=>"2017-09-19 06:40", "end_time"=>"2017-09-20 06:02", 
"time_range"=>"5", "exception_name"=>"", "exception_device_type"=>"on", 
"handle_man"=>"lmg", "origin"=>"其他"}, 
"image_file"=>#<ActionDispatch::Http::UploadedFile:0xc999bb4 
@tempfile=#<Tempfile:/tmp/RackMultipart20170919-2211-p7gtz3.png>, @original_filename="商丘
运维模块图0906.png", @content_type="image/png", @headers="Content-Disposition: form-data; 
name=\"image_file\"; filename=\"\xE5\x95\x86\xE4\xB8\x98\xE8\xBF\x90\xE7\xBB
\xB4\xE6\xA8\xA1\xE5\x9D\x97\xE5\x9B\xBE0906.png\"\r\nContent-Type: image/png\r\n">}Can't verify CSRF token authenticityCompleted 422 Unprocessable Entity in 1ms (ActiveRecord: 0.0ms)   #上传图片 多个图片    def upload_img(tasks,id)      picture = "img#{Time.now.strftime('%Y%m%d%H%M%S')}.jpg"      tasks.each_value do |task|        handle_type = task['handle_type']        image_file = task['image_file']        Rails.logger.info ">>>>>#{handle_type}"        png      = Base64.decode64(image_file['data:image/jpeg;base64,'.length .. -1])        #向dir目录写入文件        File.open(Rails.root.join("public","task_app_images", picture ), 'wb') { |f| 
f.write(png) }        #创建或者修改上传图片记录        if @handle = DFaultHandle.find_by(:d_task_form_id =>id,:handle_type 
=>handle_type).blank?          @handle = DFaultHandle.create(:handle_man =>@current_user.login_name,:handle_type 
=> handle_type,:handle_time =>Time.now,:d_task_form_id => id,:img_one => 
"task_app_images/#{picture}")        else          @handle = DFaultHandle.find_by(:d_task_form_id =>id,:handle_type=> handle_type)          @handle.update(:img_one => "task_app_images/#{picture}",:handle_time =>Time.now)        end    end  ---------------------------------------------------- #只保存图片到本地文件  def save    if filename=uploadFile(params[:file]['file'])      redirect_to :action => "index"    end    end
  def uploadFile(file)    if !file.original_filename.empty?    @filename=getFileName(file.original_filename)    File.open("d:/#{@filename}", "wb") do |f|    f.write(file.read)    end    return @filename  end  end
  def getFileName(filename)    if !filename.nil?    return filename  end  end
#保存到项目中  def upload    uploaded_io = params['file']    File.open(Rails.root.join('public', uploaded_io.original_filename), 'wb') do |file|      file.write(uploaded_io.read)    end    redirect_to :action => "index"  end      -------------------图片上传的参数----------------------------   Parameters: {"task"=>{"tasks"=>{"0"=>{"id"=>"151", "handle_type"=>"每周(次)巡检工作汇总表
", 
"image_file"=>"data:image/jpeg;base64,/9j/4QlRRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAA
AABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAcAAAAcgEyAAIAAAAUAAAAjodpAAQAAAABAAAApAAA
ANAACvyAAAAnEAAK/IAAACcQQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzADIwMTc6MDk6MjEgMTI6NTk6NTAAAAA
AA6ABAAMAAAAB//8AAKACAAQAAAABAAAAlqADAAQAAAABAAAAggAAAAAAAAAGAQMAAwAAAAEABgAAARoABQAAAAEAAA
EeARsABQAAAAEAAAEmASgAAwAAAAEAAgAAAgEABAAAAAEAAAEuAgIABAAAAAEAAAgbAAAAAAAAAEgAAAABAAAASAAAA
AH/2P/tAAxBZG9iZV9DTQAC/
+4ADkFkb2JlAGSAAAAAAf/bAIQADAgICAkIDAkJDBELCgsRFQ8MDA8VGBMTFRMTGBEMDAwMDAwRDAwMDAwMDAwMDAwM
DAwMDAwMDAwMDAwMDAwMDAENCwsNDg0QDg4QFA4ODhQUDg4ODhQRDAwMDAwREQwMDAwMDBEMDAwMDAwMDAwMDAwMDAw
MDAwMDAwMDAwMDAwM/8AAEQgAggCWAwEiAAIRAQMRAf/dAAQACv/EAT8AAAEFAQEBAQEBAAAAAAAAAAMAAQIEBQYHCA
kKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUDDDMBAAIRAwQhEjEFQVFhEyJxgTIGF
JGhsUIjJBVSwWIzNHKC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udEYjUmx0AAAAAAAAAAAAAAAAU2NsIFVudE
YjUHJjQFkAAAAAAAA4QklNA+0AAAAAABAASAAAAAEAAgBIAAAAAQACOEJJTQQmAAAAAAAOAAAAAAAAAAAAAD
+AAAA4QklNBA0AAAAAAAQAAAAeOEJJTQQZAAAAAAAEAAAAHjhCSU0D8wAAAAAACQAAAAAAAAAAAQA4QklNJxAAAAAAA
AoAAQAAAAAAAAACOEJJTQP1AAAAAABIAC9mZgABAGxmZgAGAAAAAAABAC9mZgABAKGZmgAGAAAAAAABADIAAAABAFoA
AAAGAAAAAAABADUAAAABAC0AAAAGAAAAAAABOEJJTQP4AAAAAABwAAD/////////////////////////////A
+gAAAAA/////////////////////////////wPoAAAAAP////////////////////////////8D6AAAAAD/////////
////////////////////A
+gAADhCSU0ECAAAAAAAEAAAAAEAAAJAAAACQAAAAAA4QklNBB4AAAAAAAQAAAAAOEJJTQQaAAAAAAM5AAAABgAAAAAA
AAAAAAAAggAAAJYAAAACAHcAeQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAlgAAAIIAAAAAAAAAAAA
AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAG51bGwAAAACAAAABmJvdW5kc09iamMAAAABAAAAAA
AAUmN0MQAAAAQAAAAAVG9wIGxvbmcAAAAAAAAAAExlZnRsb25nAAAAAAAAAABCdG9tbG9uZwAAAIIAAAAAUmdodGxvb
mcAAACWAAAABnNsaWNlc1ZsTHMAAAABT2JqYwAAAAEAAAAAAAVzbGljZQAAABIAAAAHc2xpY2VJRGxvbmcAAAAAAAAA
B2dyb3VwSURsb25nAAAAAAAAAAZvcmlnaW5lbnVtAAAADEVTbGljZU9yaWdpbgAAAA1hdXRvR2VuZXJhdGVkAAAAAFR
5cGVlbnVtAAAACkVTbGljZVR5cGUAAAAASW1nIAAAAAZib3VuZHNPYmpjAAAAAQAAAAAAAFJjdDEAAAAEAAAAAFRvcC
Bsb25nAAA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OmxpIHN
0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MEEyREZGODY4OTlFRTcxMTlDOUE4Mz
E3RjkzRkYzMzgiIHN0RXZ0OndoZW49IjIwMTctMDktMjFUMTI6NTk6NTArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlb
nQ9IkFkb2JlIFBob3Rvc2hvcCBDUzUgV2luZG93cyIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE
+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE
+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgPD94cGFja2V0IGVuZD0idyI/Pv/uAA5BZG9iZQBkQAAAAAH/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQECAgICAgICAgICAgMDAwMDAwMDAwMBAQEBAQEBAQEBAQICAQICAwMDAwMDAwMDAwMDAwM
DAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA//AABEIAIIAlgMBEQACEQEDEQH/3QAEABP/xAGiAAAABg
IDAQAAAAAAAAAAAAAHCAYFBAkDCgIBAAsBAAAGAwEBAQAAAAAAAAAAAAYFBAMHAggBCQAKCxAAAgEDBAEDAwIDAwMCB
gl1AQIDBBEFEgYhBxMiAAgxFEEyIxUJUUIWYSQzF1JxgRhikSVDobHwJjRyChnB0TUn4VM2gvGSokRUc0VGN0djKFVW
VxqywtLi8mSDdJOEZaOzw9PjKThm83UqOTpISUpYWVpnaGlqdnd4eXqFhoeIiYqUlZaXmJmapKWmp6ipqrS1tre4ubr
ExcbHyMnK1NXW19jZ2uTl5ufo6er09fb3+Pn6EQACAQMCBAQDBQQEBAYGBW0BAgMRBCESBTEGACITQVEHMmEUcQhCgS
ORFVKhY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yA
+2aywkA8P5dayOtjvr7eVB2JsXZ2/MXE9Pj947awu5KWmldZJqSPMY
+nrvs5pFVVeejaYxOQAC6G3Htcp1AN69X6WHvfXutcr5A/8Ab0bBf+JA60/9wIPaJv8Ackfl1UfF
+fWxr7W9W697917r3v3Xuve/de697917r//U3+Pfuvde9+691737r3XvfuvdUh/zlv8AizdJf9rLeH/urpvaS64L1Vu
PVqHxu/5kD07/AOI72t/7qqf2pT4F+zq3Q2e7de697917r3v3Xuve/de6pY/nIf8AHr9Hf
+HFu/8A91GP9pbngn29Vby6se+JH/ZM3R//AIjnbn/uGvt+L+zT7OtjgOjE
+79b61yvkD/29GwX/iQOtP8A3Ag9om/3JH5dVHxfn1sa
+1vVuve/de697917r3v3Xuve/de6/9Xf49+691737r3Xvfuvde9+691SH/OW/wCLN0l/2st4f
+6um9pLrgvVW49WofG7/mQPTv8A4jva3/uqp/alPgX7OrdDZ7t17r3v3Xuve/de697917qlj
+ch/wAev0d/4cW7/wD3UY/2lueCfb1VvLqx74kf9kzdH/8AiOduf+4a+34v7NPs62OA6MT7v1vrXK+QP/b0bBf
+JA60/wDcCD2ib/ckfl1UfF
+fWxr7W9W697917r3v3Xuve/de697917r/1t/j37r3Xvfuvde9+691737r3VIf85b/AIs3SX/ay3h/7q6b2kuuC9Vbj
1ah8bv+ZA9O/wDiO9rf+6qn9qU
+Bfs6t0Nnu3Xuve/de697917r3v3XuqWP5yH/AB6/R3/hxbv/APdRj/aW54J9vVW8urHviR/2TN0f/wCI525/7hr7fi
/s0+zrY4DoxPu/W+tcr5A/9vRsF/4kDrT/ANwIPaJv9yR
+XVR8X59bGvtb1br3v3Xuve/de697917r3v3Xuv/X3+Pfuvde9+691737r3XvfuvdUh/zlv8AizdJf9rLeH/urpvaS6
4L1VuPVqHxu/5kD07/AOI72t/7qqf2pT4F
+zq3Q2e7de697917r3v3XuqjfmD8xO4unPlf1b1rsrIYyk2RJj9nZDc2GqcRja2TdD7l3FkMfWw1WSqqWbI42Gmx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hp1vqZBT09MnjpoIaeO9/HBEkSXP1OmNVW597691m9+691737r3Xvfuvde9+691737r3X
//V3+Pfuvde9+691737r3Xvfuvde9+691737r3XvfuvdBh2X0v1Z3DipcP2Tsbb27KSRQEkyePheup2VWEclJkUVK6m
eItddEgAYA2491ZVbDCvXqV6qf7q/lFYmpaozXQu958RURs1RBtHery11GskamRExm4qdRX0s7zWEfmUpGAPVxf2ne2
HFD1XT0VHHds/PX4O18OH3dSbhrdoU0vgix28Ip937LrIYWEs64PdcDSz0RdQAZRKQo4C
+2w00OCMdayOkb8vfmevy7291XhIOvqza24tq1+ZqcosGTizFBl8jmoKGioqTb0cKLkGiHifV541kLFQoPPuskvihRp
p14mtOtir47bXymyuieo9rZynkpMzhevtr0mVoplKTUOQ/hVPLWUM6n9M9FPI0T/7Uh9rYwQig8adX4dDL7v17r3v3X
uve/de697917r3v3Xuve/de697917r/9bf49+691737r3Xvfuvde9+691737r3Xvfuvde9+691737r3XvfuvdQcljMb
maGpxeXx9DlcZWxGGsx2SpIK6hq4SQTFU0lVHLTzxEgHS6kce/de6BHa/xa+POy91ne
+2Oo9m4jdHnNVFlIMe0ho6kv5FqMdR1Ms2Pxk8bi6PTxRNGf0ke6CNAahRXrVB0Pnu/W
+ve/de697917r3v3Xuve/de697917r3v3Xuve/de6//X3+Pfuvde9+691737r3Xvfuvde9+691737r3Xvfuvde9+691
737r3Xvfuvde9+691737r3Xvfuvde9+691737r3Xvfuvde9+691737r3Xvfuvdf/Z"}}},                                         "job_status"=>"deal_with", "id"=>"280"}