diff --git a/app/assets/stylesheets/style.css b/app/assets/stylesheets/style.css index 559bf44..ba9192a 100644 --- a/app/assets/stylesheets/style.css +++ b/app/assets/stylesheets/style.css @@ -256,4 +256,5 @@ hr } .container ul.nav>.nav-item:first-child{ padding-left: 80px; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/app/controllers/api/batch_line_items_controller.rb b/app/controllers/api/batch_line_items_controller.rb index 91926df..c82695d 100644 --- a/app/controllers/api/batch_line_items_controller.rb +++ b/app/controllers/api/batch_line_items_controller.rb @@ -16,6 +16,7 @@ class Api::BatchLineItemsController < ApplicationController user_id=find_user.id end if !encrypt_key.nil? + serial_no=BatchLineItem.generate_serial_no(user_id.to_s) str="manufacture_uid="+manufacture_uid.to_s+"&serial_no="+serial_no.to_s digest_data= Digest::MD5.hexdigest(str) @@ -24,8 +25,7 @@ class Api::BatchLineItemsController < ApplicationController wristband_code=hex_str[0..15] check_manufacture = BatchLineItem.find_by_manufacture_uid_and_wristband_code(manufacture_uid,wristband_code) - if check_manufacture.nil? - serial_no=BatchLineItem.generate_serial_no(user_id.to_s) + if check_manufacture.nil? batchLineItem=BatchLineItem.new batchLineItem.wristband_code=wristband_code diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 9978892..bf3e8ba 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -39,7 +39,7 @@