educode_sales 0.9.47 → 0.9.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f238eee39f7340e6339b2b26e6140ac62ce0da5da1f009dbcdc0a146b1566b8
4
- data.tar.gz: 3fc72b20f031ecaa646083fcc34ca6d4a5702dd2cc770dc7ef83229f9f718674
3
+ metadata.gz: d4f2290fab449d9d2d89dfe4bfcd53904620bbd2148eac5c5b8d7836c453929a
4
+ data.tar.gz: af6f9ed2d1aaa95fc752f36929673464a69ccda4d8629dc15751572ca477391d
5
5
  SHA512:
6
- metadata.gz: 3bb437ceeb215fae404672b90276d28c7d454d85815cf846d2c9f7ec9cdd5c32041ba3c4ef1f2f67edbc23192d091351d98009b0f649d174990c7cdd7de73d91
7
- data.tar.gz: 641baf6fd5b3e9576401d7c0fc142d829237d01b4f3fc9bdc2bd43c91d0921935f51433b13fee229570be5a74b6112516dd5d2adc80851c0344e6e50a32a5eaa
6
+ metadata.gz: f0bb000ce973b2a6cf8b1d2aeafb74e109b034954dbb754e9b1e612ed9f59d621ed77ff94d671b18e675770d426298df25bcc8683210237dec10ce5d958c8bd5
7
+ data.tar.gz: 9ebb366971b1b98eafff7415dcc7f6cb65df46d5068d6711ab14492298226b71c3c9b34c9b1dc9d42ecddf61f1cad1eb43374232ab73bc3d2ecd6d9381b47504
@@ -3,13 +3,13 @@ json.data do
3
3
  json.id d.id
4
4
  json.number d.number
5
5
  json.name d.name
6
- json.department d.department.name
7
- json.school d.department.school.name
8
- json.school_id d.department.school.id
6
+ json.department d.department&.name
7
+ json.school d.department&.school&.name
8
+ json.school_id d.department&.school_id
9
9
  follow_ups_count = d['follow_ups_count'] || 0
10
10
  json.follow_ups_count follow_ups_count
11
11
  json.follow_up_id d.last_follow_up_id
12
- json.clazz d.last_follow_up&.clazz&.name || ""
12
+ json.clazz d.clazz&.name || ""
13
13
  json.stage d.last_follow_up&.stage&.name
14
14
  json.invitation_at d.last_follow_up&.invitation_at.to_s
15
15
  json.reception_at d.last_follow_up&.reception_at.to_s
@@ -27,17 +27,22 @@ json.data do
27
27
  json.divide_rate d.divide_rate
28
28
  json.divide_money d.divide_amount
29
29
  json.budget_amount d.budget_amount
30
- json.area d.department.school.province
31
- school_property = d.department.school.school_property
32
- property = []
30
+ json.area d.department&.school&.province
31
+ # school_property = d.department&.school&.school_property
32
+ # property = []
33
33
 
34
- if school_property.present?
35
- property << '本科地方院校' if school_property.regular_college || school_property.project_985 || school_property.project_211
36
- property << '高职' if school_property.junior_college || school_property.secondary_school
37
- property << '本科军校' if school_property.military_school
38
- property << '企业' if school_property.enterprise
34
+ # if school_property.present?
35
+ # property << '本科地方院校' if school_property.regular_college || school_property.project_985 || school_property.project_211
36
+ # property << '高职' if school_property.junior_college || school_property.secondary_school
37
+ # property << '本科军校' if school_property.military_school
38
+ # property << '企业' if school_property.enterprise
39
+ # end
40
+ # json.property property.join("、")
41
+ if d.department&.school
42
+ json.property d.department.school.school_tags.where(for_missions: true).pluck(:name).join("、")
43
+ else
44
+ json.property ''
39
45
  end
40
- json.property property.join("、")
41
46
  json.sale_way d.last_follow_up&.place&.name.present? ? '渠道' : '直销'
42
47
  json.actual_amount d.last_follow_up&.actual_amount.to_f.round(2)
43
48
  json.return_money d.return_money
@@ -5,9 +5,9 @@ json.data do
5
5
  json.id d.id
6
6
  json.number d.number
7
7
  json.name d.name
8
- json.department d.department.name
9
- json.school d.department.school.name
10
- json.school_id d.department.school.id
8
+ json.department d.department&.name
9
+ json.school d.department&.school&.name
10
+ json.school_id d.department&.school_id
11
11
  follow_ups_count = d['follow_ups_counts'] || 0
12
12
  json.follow_ups_count follow_ups_count
13
13
  follow_count += follow_ups_count
@@ -27,7 +27,7 @@ json.data do
27
27
  json.divide_rate d.divide_rate
28
28
  json.divide_money d.divide_amount.to_f.round(2)
29
29
  json.budget_amount d.budget_amount.to_f.round(2) #d.follow_ups.where(stage_id: @budget_stage_ids).order("created_at desc").first&.total_amount&.round(2) || 0
30
- json.area d.department.school.province
30
+ json.area d.department&.school&.province
31
31
  # school_property = d.department.school.school_property
32
32
  # property = []
33
33
 
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.9.47'
2
+ VERSION = '0.9.48'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: educode_sales
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.47
4
+ version: 0.9.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460