# REST API : ECO
### รายชื่อ ECO
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=get_region
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=get_user_admin
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=get_solution
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=get_province
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=data_geography
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=get_project_list
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=choose_eco
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=get_solution
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=get_csc
1. act: get_region (0.5 Manday)
#### Request Example
``` json
{
"shop_id": 228
}
```
#### Response Example
> Reponse type : Json Array Of Object
``` json
"list": [
{
"name": "Central"
},
{
"name": "CPAC-BIM"
},
{
"name": "CPAC-CS"
},
{
"name": "North"
},
{
"name": "Northeast"
},
{
"name": "South"
}
]
```
2. act: get_user_admin (0.5 Manday)
#### Request Example
``` json
{
"shop_id": 228
"search": ""
}
```
#### Response Example
> Reponse type : Json Array Of Object
``` json
"list": [
{
"id": "8206",
"name": "system_admin228"
}
]
```
3. act: get_solution (0.5 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"user_id": 8208
}
```
#### Response Example
> Reponse type : Json Array Of Object
``` json
"list": [
{
"active": "1",
"group_id": null,
"icon": null,
"id": "141",
"last_update": "2022-08-19 05:59:01",
"link": null,
"name": "BU01-Smart Industrial Solution (factory & warehouse)",
"roof_netsuite_display": null,
"roof_netsuite_internalid": null,
"roof_netsuite_name": null,
"service_id": null,
"shop_id": "228",
"shortname": "BU01",
"status_chain": "1",
"type_data": "1"
}
]
```
4. act: get_province (0.5 Manday)
#### Request Example
``` json
{
"search": 23
}
```
#### Response Example
``` json
"list": [
{
"PROVINCE_ID": "1",
"PROVINCE_NAME": "กระบี่"
},
{
"PROVINCE_ID": "2"
"PROVINCE_NAME": "กรุงเทพมหานคร"
}
]
```
5. act: data_geography (0.5 Manday)
#### Request
``` json
"NO request"
```
#### Response :
``` json
"list" : [
{
"geo_id": "1",
"geo_name": "เหนือ"
},
{
"geo_id": "2",
"geo_name": "นครหลวง"
},
{
"geo_id": "3",
"geo_name": "อีสาน"
},
{
"geo_id": "4",
"geo_name": "ตะวันตก"
},
{
"geo_id": "5",
"geo_name": "ตะวันออก"
},
{
"geo_id": "6",
"geo_name": "ใต้"
}
]
```
6. act: get_project_list (3 Manday)
#### Request
``` json
{
"search": "",
"page": 1,
"total_pages": "",
"admin_eco": "",
"intendant": "",
"solution": "",
"region": "",
"grade": "",
"area": "",
"csc": "",
"shop_id": 228,
"choose": "",
"project_id": 0,
"status": "",
"price": 0,
"popup_stauts": 0,
"sub_solution_id": "",
"cwork": 0,
"zone": "",
"module_id": "",
"total": 0,
"solution_id": ""
}
```
#### Response
``` json
{
"added_date": "16/08/2565 10:40",
"admin_eco": "hasowner",
"csc": "CSC 1 - กรุงเทพและปริมณฑล",
"evaluation": "88",
"grade": "A",
"id": "1324",
"name": "Mentoss",
"price": 0,
"profile_img": "https://merudy.s3.ap-southeast-1.amazonaws.com/eco_portal/vendor/profile/202103220637073728.jpeg",
"province_id": [
{
"PROVINCE_NAME": "กระบี่",
"PROVINCE_NAME_ENG": "Krabi",
"province_id": "1",
"type": "1"
}
],
"region": "Central",
"shop_id": "228",
"solution": [
"Digital Platform"
],
"starmark": "1",
"status": "3",
"status2": "3",
"status2_under": "InActive",
"status_comment": "cdc",
"status_question": "0",
"sub_solution": [],
"type_id": "12",
"type_name": "Developer",
"username": "hasosr",
"vendor_type": "0"
}
```
7. act: choose_eco ()
#### Request
``` json
{
"shop_id": 228,
"project_id": 0
}
```
#### Response
``` json
[]
```
:::warning
:pushpin: ไม่เจอข้อมูลบในเส้น API
:::
8. act: get_solution
#### Request
``` json
{
"id": ""
}
```
#### Response
``` json
[]
```
:::warning
:pushpin: ไม่เจอข้อมูลบในเส้น API
:::
9. act: get_solution ()
#### Request Example
``` json
{
"id":
}
```
#### Response Example
``` json
[]
```
:::warning
:pushpin: มี 2 เส้นแต่เส้นที่ 2 ไม่เจอข้อมูลในเส้น API
:::
#### = รวม 5.5 Manday :fire:
---
### ข้อมูล ECO
#### ข้อมูลเพิ่มเติม
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=get_vendor_view
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=list_portfolio
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=list_questionnaire
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=get_m_solution_list
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=list_solution_data
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=list_evaluate_attitude
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=list_evaluate_professional
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=get_evaluate_data
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=get_solution_all
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1324/?act=data_one_trust
1. act: get_vendor_view (3 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"vendor_id": 1324
}
```
#### Response Example
``` json
{
"address": "5/219",
"admin_eco": "8207",
"admin_eco_name": "hasowner",
"admin_email": "duckkiegander@gmail.com",
"admin_phone": "0123456789",
"before_status": "1",
"boq": "0",
"capital": "2",
"capital_name": "1-2 ล้านบาท",
"company": "",
"company_id": null,
"csc": "CSC 1",
"csc_name": "CSC 1 - กรุงเทพและปริมณฑล",
"design": "0",
"email": "mentoss@gmail.com",
"experience": "3",
"experience_name": "2-3 ปี",
"file_banned": [],
"file_upload": [
{
"filename": "eco_vendor2 prd.xlsx",
"id": "87",
"link": "https://merudy.s3.ap-southeast-1.amazonaws.com/eco_portal/vendor/files/eco_vendor2 prd.xlsx",
"name": "eco_vendor2 prd.xlsx"
},
{
"filename": "a1eb33a073313fcda107949767c27c3e77dd0c62_hq.jpg",
"id": "88",
"link": "https://merudy.s3.ap-southeast-1.amazonaws.com/eco_portal/vendor/files/a1eb33a073313fcda107949767c27c3e77dd0c62_hq.jpg",
"name": "a1eb33a073313fcda107949767c27c3e77dd0c62_hq.jpg"
}
],
"gender": "0",
"grade": "A",
"id": "1324",
"join_scg": "0",
"line_id": "mentoss47",
"machine": "",
"month_qualify": null,
"name": "Mentoss",
"nickname": "Mentoss",
"note": "test comment",
"phone": "0834239493",
"phone_extension": "",
"pic": "https://merudy.s3.ap-southeast-1.amazonaws.com/eco_portal/vendor/profile/202103220637073728.jpeg",
"prefix_name": "นาย",
"province_id": [
{
"PROVINCE_NAME": "กรุงเทพมหานคร",
"PROVINCE_NAME_ENG": "Krung Thep Maha Nakhon",
"province_id": "2",
"type": "1"
},
{
"PROVINCE_NAME": "กาญจนบุรี",
"PROVINCE_NAME_ENG": "Kanchanaburi",
"province_id": "3",
"type": "1"
},
{
"PROVINCE_NAME": "กาฬสินธุ์",
"PROVINCE_NAME_ENG": "Kalasin",
"province_id": "4",
"type": "1"
},
{
"PROVINCE_NAME": "กำแพงเพชร",
"PROVINCE_NAME_ENG": "Kamphaeng phet",
"province_id": "5",
"type": "1"
},
{
"PROVINCE_NAME": "กระบี่",
"PROVINCE_NAME_ENG": "Krabi",
"province_id": "1",
"type": "1"
}
],
"qualify": null,
"region": "Central",
"register_date": "22/03/2564",
"segment": [
{
"fullname": "Residential",
"icon": "icon-house-status",
"id": "969",
"name": "R",
"segment_id": "1"
}
],
"size": "",
"solution": [
"Digital Platform"
],
"solutionAndsub": {
"solution": [
{
"id": "199",
"name": "Digital Platform"
}
],
"subsolution": []
},
"solution_all": [
{
"solution_id": "199",
"solution_name": "Digital Platform",
"subso_id": "",
"subsolution_name": ""
}
],
"staff": "1",
"staff_name": "0-5",
"staff_type": "0",
"status": "3",
"status2": "InActive",
"status_comment": "cdc",
"subsegment": [
{
"id": "1303",
"name": "บ้านเดี่ยวสร้างเอง",
"subseg_id": "2",
}
],
"tax_no": "",
"type_cusname": "Developer",
"type_id": "12",
"typeget_work": "เอกชน",
"vendor_code": "CT-2021-00002",
"vendor_type": "0",
"viewpoint": null,
"worktype": [
{
"id": "1551",
"name": "Architecture - งานสถาปัตย์",
"note": null,
"work_type_id": "18",
},
{
"id": "1552",
"name": "Floor - งานพื้นโครงสร้าง/พื้นตกแต่ง",
"note": null,
"work_type_id": "2"
},
{
"id": "1548",
"name": "MEP System - งานระบบ Mechanical Electrical and Pumping",
"note": null,
"work_type_id": "35"
},
{
"id": "1549",
"name": "Piling - งานเสาเข็ม",
"note": null,
"work_type_id": "3"
}
]
}
```
2. act: list_portfolio (3 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"vendor_id": 1324,
"status_project_id": 0,
"status_reject": 0
}
```
#### Response Example
``` json
{
"count": 2,
"list": [
{
"details": "ความสามารถตรงกับโครงการ,x ccdcd",
"img_portfolio": [],
"portfolio_id": "135",
"project_code": "CE202102-01",
"project_name": "ทดสอบสร้างหน่วยงาน LP",
"remarks": null,
"solution": [
{
"solution_id": "145",
"solution_name": "BU05-Farm Solution",
"sub_name": []
}
],
"status": "cwork",
"status_project": "กำลังดำเนินการ"
},
{
"details": "Status InActive",
"img_portfolio": [],
"portfolio_id": "168",
"project_code": "CE202110-0046",
"project_name": "Central 001",
"remarks": null,
"solution": [
{
"solution_id": "142",
"solution_name": "BU02-Housing and Low-rise Building Solution",
"sub_name": []
}
],
"status": "cwork",
"status_project": "ปิดโครงการ"
}
]
}
```
3. act: list_questionnaire (3 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"type": "",
"chain": "",
"csc": "",
"status": "",
}
```
#### Response Example
``` json
{
"list": [
{
"created_at": "22/08/2565 00:02",
"created_by": "hasmanager",
"csc": [
{
"csc": "Central"
},
{
"csc": "CPAC-BIM"
},
{
"csc": "CPAC-CS"
},
{
"csc": "North"
},
{
"csc": "Northeast"
},
{
"csc": "South"
},
],
"id": "145",
"questionnaire_name": "ทดสอบผลงานแบบร้อยละ",
"questionnaire_type": "ประเมินผลงาน",
"status": "1",
"updated_at": "22/08/2565 00:02",
}
]
}
```
4. act: get_m_solution_list (1 Manday)
#### Request Example
``` json
{
"shop_id": 228
}
```
#### Response Example
``` json
{
"list": [
{
"id": "141",
"name": "BU01-Smart Industrial Solution (factory & warehouse)"
},
{
"id": "142",
"name": "BU02-Housing and Low-rise Building Solution"
},
{
"id": "143",
"name": "BU03-Lifetime Solution"
}
]
}
```
5. act: list_solution_data (4 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"vendor_id": 1324,
"search": ""
}
```
#### Response Example
``` json
{
"admin_eco": null,
"count": 2,
"list": [
{
"assessor": null,
"count_file": 0,
"date_solution": "-",
"draf": null,
"eva_num": null,
"file_solution": [],
"grade": null,
"ontime": "0",
"portfolio_id": "135",
"position": "",
"project": "ทดสอบสร้างหน่วยงาน LP",
"questionnaire_id": null,
"questionnaire_name": null,
"score": null,
"solution": [],
"status": "ยังไม่ประเมิน",
"status_project": "กำลังดำเนินการ"
},
{
"assessor": null,
"count_file": 0,
"date_solution": "-",
"draf": null,
"eva_num": null,
"file_solution": [],
"grade": null,
"ontime": "0",
"portfolio_id": "168",
"position": "",
"project": "Central 001",
"questionnaire_id": null,
"questionnaire_name": null,
"score": null,
"solution": [],
"status": "ยังไม่ประเมิน",
"status_project": "ปิดโครงการ"
}
]
}
```
6. act: list_evaluate_attitude (3 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"vendor_id": 1324,
"search": ""
}
```
#### Response Example
``` json
{
"data_new": null,
"data_old": {
"create_at": "22/03/2564 13:37",
"csc": "Central",
"q_type_name": "ทัศนคติ",
"questionnaire_name": "แบบประเมินทัศนคติ Ver.1",
"status": "ผ่านเกณฑ์",
"updated_at": "22/03/2564 13:37",
"user_created": "hasowner",
"vendor_id": "1324"
}
}
```
7. act: list_evaluate_professional (2 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"vendor_id": 1324,
"search": ""
}
```
#### Response Example
``` json
{
"list": [
null
]
}
```
:::warning
:rocket: ไม่พบข้อมูล Response
:::
8. act: get_evaluate_data (3 Manday)
#### Request Example
``` json
{
"shop_id": 228,
"vendor_id": 1324
}
```
#### Response Example
``` json
{
"count_all": 1,
"data_attitude": [
{
"count_attitude": 1,
"status": "ผ่านเกณฑ์"
}
],
"data_professional": [
{
"count_professional": 0,
"status": "รอประเมิน"
}
],
"data_solution": [
{
"count_solution": 0,
"status": "A"
}
]
}
```
9. act: get_solution_all (1 Manday)
#### Request Example
``` json
{
"shop_id": 228
}
```
#### Response Example
``` json
{
"list": [
{
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)",
"sub_solution": [
"active": "1",
"chain_status": "1",
"code_scghome": null,
"id": "1863",
"last_update": "2022-08-22 05:00:02",
"link": null,
"name": "Slab on Ground - พื้นวางบนดิน",
"roof_netsuite_class_installation": null,
"roof_netsuite_class_survey": null,
"roof_netsuite_department": null,
"shop_id": "228",
"shortname": "FLR01000",
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)"
]
}
]
}
```
10. act: data_one_trust (1 Manday)
#### Request Example
``` json
{
"vendor_id": 1324
}
```
#### Response Example
``` json
{
null
}
```
#### การประเมิน ECO
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=data_evaluation
1. act : data_evaluation (1 Manday)
#### Request Example
```json
{
"shop_id": 228,
"vendor_id": 1801
}
```
#### Reponse Example
```json
{
"list": [
{
"answer_id": "1",
"answer_name": "สนใจ จะได้เป็นช่องทางเรียนรู้สิ่งใหม่ๆ",
"group": "1",
"id": "3212",
"question_id": "1",
"question_name": "มีความสนใจร่วมงานกับ CPAC เพื่อยกระดับวิธีการทำงานหรือไม่ (สนใจไหม เพราะอะไร)",
"score": "10",
"updated_at": "2022-08-15 15:34:18"
},
{
"answer_id": "4",
"answer_name": "เป็นช่องทางให้คำปรึกษา/ความรู้ เพื่อพัฒนาการทำงาน",
"group": "1",
"id": "3213",
"question_id": "2",
"question_name": "มีความคิดเห็นอย่างไรที่ CPAC มาให้บริการงานก่อสร้าง",
"score": "10",
"updated_at": "2022-08-15 15:34:18"
}
]
}
```
#### UpSkill
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=list_upskill
1. act : list_upskill (1.5 Manday)
#### Request Example
```json
{
"shop_id": 228,
"vendor_id": 1801
}
```
#### Reponse Example
```json
{
"affiliation": "",
"date_upskill": "15/08/22",
"date_upskill_full": "2022-08-15",
"img_upskill": [
{
"file_name": "sub-buzz-4928-1522231735-1.jpeg",
"img_id": "298",
"link": "https://merudy.s3.ap-southeast-1.amazonaws.com/eco_portal/vendor/files_solution/sub-buzz-4928-1522231735-1.jpeg"
}
],
"learn_solution": "Online",
"learning_id": "3",
"lecturer_name": "เก่งจริงๆเลยนะตัวแค่เนี้ย",
"man_hour": "4",
"participants": "20",
"skill_name": "ทดสอบคนเก่ง",
"solution": [
{
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)",
"sub_name": [
{
"subsolution_id": "1865",
"subsolution_name": "Solar Floating - แผงพลังงานแสงอาทิตย์ลอยน้ำ"
},
{
"subsolution_id": "1866",
"subsolution_name": "Window & Door - หน้าต่างและประตู"
},
{
"subsolution_id": "1867",
"subsolution_name": "Metal Sheet - หลังคาเมทัลชีท(แผ่นเหล็กรีดลอน)"
}
],
"subsolution_id": "1866",
"subsolution_name": "Window & Door - หน้าต่างและประตู",
}
],
"status": "1",
"status_edit": 0,
"status_skill": "1",
"status_skill_txt": "ผ่าน",
"status_txt": "Yes",
"upskill_id": "196"
}
```
#### คอมเมนต์
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=list_upskill
1. act : list_comment_data (1 Manday)
#### Request Example
```json
{
"shop_id": 228,
"vendor_id": 1801,
"user_id": 8208,
"score": ""
}
```
#### Response Example
```json
{
null
}
```
#### = รวม 27.5 Manday
___
### แก้ไข ECO
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=genCodevendor
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_region
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_work_type
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_solution_all
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_province
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_staff
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_work_exp
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_capital
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_user_admin
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=data_company
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_customer_type
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_vendor_view
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_subsegment
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_solution_all
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_csc
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/1801/?act=get_sub_solution
1. act : genCodevendor (0.5 Manday)
#### Request Example
```json
{
"shop_id": 228
}
```
#### Reponse Example
```json
{
"CT-2022-00244"
}
```
2. act : get_region (0.5 Manday)
#### Request Example
```json
{
"shop_id": 228
}
```
#### Reponse Example
```json
{
"list": [
{
"name": "Central"
},
{
"name": "CPAC-BIM"
},
{
"name": "CPAC-CS"
},
{
"name": "North"
},
{
"name": "Northeast"
},
{
"name": "South"
}
]
}
```
3. act : get_work_type (0.5 Manday)
#### Request Example
```json
{
"shop_id": 228,
"search": ""
}
```
#### Reponse Example
```json
{
"list": [
{
"code": "",
"created_at": null,
"detail": null,
"id": "37",
"name": "Air Conditioning & Ventilation System - งานระบบปรับอากาศและระบายอากาศ",
"shop_id": "228",
"status": "1",
"updated_at": null
},
{
"code": "ARC",
"created_at": null,
"detail": null,
"id": "18",
"name": "Architecture - งานสถาปัตย์",
"shop_id": "228",
"status": "1",
"updated_at": null
}
]
}
```
4. act : get_solution_all (0.5 Manday)
#### Request Example
```json
{
"shop_id": 228
}
```
#### Reponse Example
```json
{
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)",
"sub_solution": [
{
"active": "1",
"chain_status": "1",
"code_scghome": null,
"id": "1863",
"last_update": "2022-08-22 12:00:01",
"link": null,
"name": "Slab on Ground - พื้นวางบนดิน",
"roof_netsuite_class_installation": null,
"roof_netsuite_class_survey": null,
"roof_netsuite_department": null,
"shop_id": "228",
"shortname": "FLR01000",
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)"
}
]
}
```
5. act : get_province (0.5 Manday)
#### Request Example
```json
{
"search": ""
}
```
#### Reponse Example
```json
{
"list": [
{
"PROVINCE_ID": "1",
"PROVINCE_NAME": "กระบี่"
},
{
"PROVINCE_ID": "2",
"PROVINCE_NAME": "กรุงเทพมหานคร"
},
{
"PROVINCE_ID": "3",
"PROVINCE_NAME": "กาญจนบุรี"
}
]
}
```
6. act : get_staff (0.5 Manday)
#### Request Example
**Method** : GET
```json
{
}
```
#### Reponse Example
```json
{
"list": [
{
"id": "1",
"name": "0-5",
"created_at": null,
"updated_at": null
},
{
"id": "2",
"name": "5-10",
"created_at": null,
"updated_at": null
},
{
"id": "3",
"name": "10-20",
"created_at": null,
"updated_at": null
},
{
"id": "4",
"name": "20-30",
"created_at": null,
"updated_at": null
},
{
"id": "5",
"name": ">30",
"created_at": null,
"updated_at": null
}
]
}
```
7. act : get_work_exp (0.5 Manday)
#### Request Example
**Method** : GET
```json
{
}
```
#### Reponse Example
```json
{
"list": [
{
"id": "1",
"name": "< 1 ปี",
"created_at": null,
"updated_at": null
},
{
"id": "2",
"name": "1-2 ปี",
"created_at": null,
"updated_at": null
},
{
"id": "3",
"name": "2-3 ปี",
"created_at": null,
"updated_at": null
},
{
"id": "4",
"name": "3-5 ปี",
"created_at": null,
"updated_at": null
},
{
"id": "5",
"name": ">5 ปี",
"created_at": null,
"updated_at": null
}
]
}
```
8. act : get_capital (0.5 Manday)
#### Request Example
**Method** : GET
```json
{
}
```
#### Reponse Example
```json
{
"list": [
{
"id": "1",
"name": "< 1 ล้านบาท",
"created_at": null,
"updated_at": null
},
{
"id": "2",
"name": "1-2 ล้านบาท",
"created_at": null,
"updated_at": null
},
{
"id": "3",
"name": "2-3 ล้านบาท",
"created_at": null,
"updated_at": null
},
{
"id": "4",
"name": "3-5 ล้านบาท",
"created_at": null,
"updated_at": null
},
{
"id": "5",
"name": ">5 ล้านบาท",
"created_at": null,
"updated_at": null
}
]
}
```
8. act : get_user_admin (0.5 Manday)
#### Request Example
**Method** : POST
```json
{
"shop_id": 228,
"search": ""
}
```
#### Reponse Example
```json
{
"list": [
{
"id": "8206",
"name": "system_admin228"
},
{
"id": "8207",
"name": "hasowner"
},
{
"id": "8208",
"name": "hasmanager"
}
]
}
```
9. act : data_company (0.5 Manday)
#### Request Example
**Method** : POST
```json
{
"shop_id": 228
}
```
#### Reponse Example
```json
{
"list": [
{
"id": "1326",
"geo_name": "ชื่อบริษัทจ้า",
"vendor_name": "ชื่อจ้า"
},
{
"id": "1350",
"geo_name": "หจก.อวยชัยก่อสร้างกำแพงเพชร",
"vendor_name": "สุมิตตรา ศิลาหลัก"
},
{
"id": "1351",
"geo_name": "หจก.ภูมืรักษ์กำแพงเพชรก่อสร้าง",
"vendor_name": "มัทริยา มีอุสาห์"
},
{
"id": "1353",
"geo_name": "หจก.ส.เสนา การโยธา",
"vendor_name": "กนิษฐา เชื้อจิ๋ว"
}
]
}
```
10. act : get_customer_type (0.5 Manday)
#### Request Example
**Method** : GET
```json
{
}
```
#### Reponse Example
```json
{
"list": [
{
"id": "11",
"name": "Main contractor "
},
{
"id": "12",
"name": "Developer"
},
{
"id": "13",
"name": "Material Provider "
},
{
"id": "14",
"name": "Technical Support "
}
]
}
```
11. act : get_vendor_view (2 Manday)
#### Request Example
**Method** : GET
```json
{
"shop_id": 228,
"vendor_id": 1801
}
```
#### Reponse Example
```json
{
"list": {
"address": "414/8 ถนนจรัญสนิทวงศ์ แขวงวัดท่าพระ เขตบางกอกใหญ่ 10600",
"admin_eco": "8209",
"admin_eco_name": "hasosr",
"admin_email": "panpanut.h@merudy.com",
"admin_phone": "0123456789",
"before_status": "2",
"boq": "0",
"capital": "5",
"capital_name": ">5 ล้านบาท",
"company": "",
"company_id": null,
"csc": "CPAC-CS",
"csc_name": "CPAC-CS",
"design": "1",
"email": "",
"experience": "4",
"experience_name": "3-5 ปี",
"file_banned": [],
"file_upload": [],
"gender": "1",
"grade": null,
"id": "1801",
"join_scg": "0",
"line_id": "",
"machine": "",
"month_qualify": null,
"name": "สดใส สุดสวย",
"nickname": "สวย",
"note": "",
"phone": "0852613154",
"phone_extension": "",
"pic": "https://merudy.s3.ap-southeast-1.amazonaws.com/eco_portal/vendor/profile/202208150817508324.jpeg",
"prefix_name": "นางสาว",
"province_id": [
{
"province_id": "2",
"type": "1",
"PROVINCE_NAME": "กรุงเทพมหานคร",
"PROVINCE_NAME_ENG": "Krung Thep Maha Nakhon"
},
{
"province_id": "6",
"type": "1",
"PROVINCE_NAME": "ขอนแก่น",
"PROVINCE_NAME_ENG": "Khon kean"
},
{
"province_id": "14",
"type": "1",
"PROVINCE_NAME": "เชียงใหม่",
"PROVINCE_NAME_ENG": "Chiang mai"
}
],
"qualify": null,
"region": "CPAC-CS",
"register_date": "22/08/2565",
"segment": [
{
"id": "1971",
"segment_id": "1",
"name": "R",
"fullname": "Residential",
"icon": "icon-house-status"
},
{
"id": "1969",
"segment_id": "2",
"name": "C",
"fullname": "Commercial",
"icon": "icon-house-city"
}
],
"size": "",
"solution": [
[
"BU01-Smart Industrial Solution (factory & warehouse)- Slab on Ground - พื้นวางบนดิน"
],
[
"BU01-Smart Industrial Solution (factory & warehouse)- Slab on Beam - พื้นวางบนคาน"
]
],
"solutionAndsub": {
"solution": [
{
"id": "141",
"name": "BU01-Smart Industrial Solution (factory & warehouse)"
}
],
"subsolution": [
{
"solution_id": "141",
"subso_id": "1863",
"name": "Slab on Ground - พื้นวางบนดิน"
},
{
"solution_id": "141",
"subso_id": "1864",
"name": "Slab on Beam - พื้นวางบนคาน"
}
]
},
"solution_all": [
{
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)",
"subso_id": "1863",
"subsolution_name": "Slab on Ground - พื้นวางบนดิน",
}
],
"staff": null,
"staff_name": "50",
"staff_type": "1",
"status": "2",
"status2": "",
"status_comment": null,
"subsegment": [
{
"id": "2347",
"name": "อาคารพาณิชย์",
"subseg_id": "5"
}
],
"tax_no": "",
"type_cusname": "Developer",
"type_id": "12",
"typeget_work": "เอกชน",
"vendor_code": "CT-2022-00227",
"vendor_type": "0",
"viewpoint": null,
"worktype": [
{
"id": "2564",
"name": "Architecture - งานสถาปัตย์",
"note": null,
"work_type_id": "18"
}
]
}
}
```
12. act : get_subsegment (0.5 Manday)
#### Request Example
**Method** : POST
```json
{
"shop_id": 228,
"search": "",
"segment": {
"segment_id": 1
}
}
```
#### Reponse Example
```json
{
"created_at": null,
"id": "1",
"name": "หมู่บ้าน",
"segment": "1",
"shop_id": "228",
"status": "1",
"updated_at": null
}
```
13. act : get_solution_all (0.5 Manday)
#### Request Example
**Method** : POST
```json
{
"shop_id": 228,
}
```
#### Reponse Example
```json
{
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)",
"sub_solution": [
{
"active": "1",
"chain_status": "1",
"code_scghome": null,
"id": "1863",
"last_update": "2022-08-23 05:00:02",
"link": null,
"name": "Slab on Ground - พื้นวางบนดิน",
"roof_netsuite_class_installation": null,
"roof_netsuite_class_survey": null,
"roof_netsuite_department": null,
"shop_id": "228",
"shortname": "FLR01000",
"solution_id": "141",
"solution_name": "BU01-Smart Industrial Solution (factory & warehouse)"
}
]
}
```
14. act : get_csc (0 Manday) *Reuse function*
#### Request Example
**Method** : POST
```json
{
"shop_id": 228,
"region": "CPAC-CS"
}
```
#### Reponse Example
```json
{
"csc_name": "CPAC-CS",
"name": "CPAC-CS"
}
```
15. act : get_sub_solution (0 Manday) *Reuse function*
#### Request Example
**Method** : POST
```json
{
"shop_id": 228,
"solution_id": 0
}
```
#### Reponse Example
```json
{
null
}
```
:::warning
:rocket: ไม่เจอ Response
:::
#### = รวม 9 Manday
___
## สร้าง ECO
- [ ] https://server.merudy.com/eco/rudy-shop/public/th/vender/?act=insert_eco_data
1. act : insert_eco_data (3 Manday)
#### Request Example
```json
{
{
"shop_id": 228,
"customer_type": 12,
"profile_img": "FILE IMAGE",
"vendor_type": 0,
"gender": 0,
"grade": "",
"prefix_name": "นาย",
"name": "ทดสอบนะจ๊ะ",
"nickname": "เดฟ",
"region": "Central",
"company": "",
"csc": "CSC 1",
"tel": "123-409-5678",
"ext": 12,
"tax_no": 1234123414344,
"email": "test@gmail.com",
"line_id": 1212312121,
"address": "123/321",
"note": "",
"segment": [
{
"segment_id": 1
}
],
"subsegment": [
{
"subseg_id": 1,
"subseg_note": ""
}
],
"province1": [
{
"province_id": 2,
"type": 1
}
],
"boq": 0,
"design": 0,
"join_scg": 0,
"typeget_work": "เอกชน",
"staff": 30,
"capital": 1,
"experience": 1,
"machine": "",
"size": "",
"register_date": "23/08/2565",
"admin_eco": 8208,
"solution": [
{
"solution_id": 141,
"solution_note": ""
}
],
"subsolution": [
{
"solution_id": 141,
"subso_id": 1863,
"subso_note": "",
"status": 1
},
{
"solution_id": 141,
"subso_id": 1864,
"subso_note": "",
"status": 1
},
{
"solution_id": 141,
"subso_id": 1865,
"subso_note": "",
"status": 1
}
],
"worktype": [
{
"worktype_id": 18,
"worktype_note": "",
}
],
"username": "hasmanager",
"viewpoint": "feelgood",
"qualify": 1,
"month_qualify": "Mar",
"company_id": 1326,
"staff_type": 1
}
}
```
#### Reponse Example
```json
{
"added_date": "2022-08-23 11:59:43",
"admin_eco": "8208",
"company": "",
"csc": "CSC 1",
"grade": "",
"id": "1819",
"name": "ทดสอบนะจ๊ะ",
"pic": "202208230459436137.webp",
"region": "Central",
"shop_id": "228",
"status_maomao": "0",
"status_question": "0",
"type_id": "12",
"vendor_type": "0",
}
```
### = รวม 3 Manday