Эх сурвалжийг харах

feat:注册资本 币种调整

wangshan 1 жил өмнө
parent
commit
c791ddcaa9

+ 14 - 1
src/jfw/modules/bigmember/src/entity/portrait.go

@@ -238,17 +238,30 @@ func (this *Portrait) GetEntInfo(entId string) (map[string]interface{}, error) {
 		"legal_person":  1, //法人姓名
 		"company_phone": 1, //公司电话
 		"company_name":  1, //公司名称
+		"currency":      1, //注册资本币种
 	})
 	if entinfo == nil || len(*entinfo) == 0 {
 		return nil, errors.New("未查询到企业相关信息")
 	}
+	unit := "万元"
+	if qutil.InterfaceToStr((*entinfo)["currency"]) != "人民币" {
+		unit = fmt.Sprintf("%s%s", "万", qutil.InterfaceToStr((*entinfo)["currency"]))
+	}
+	//switch qutil.InterfaceToStr((*entinfo)["currency"]) {
+	//case "美元":
+	//	unit = "万美元"
+	//case "港币":
+	//	unit = "万港币"
+	//case "澳币":
+	//	unit = "万澳币"
+	//}
 	rData := map[string]interface{}{
 		"type":   (*entinfo)["company_type"],
 		"status": (*entinfo)["company_status"],
 		//"authority":    (*entinfo)["authority"],
 		"creditNo":     (*entinfo)["credit_no"],
 		"taxCode":      (*entinfo)["tax_code"],
-		"capital":      (*entinfo)["capital"],
+		"capital":      fmt.Sprintf("%v%s", (*entinfo)["capital"], unit),
 		"employeeNo":   (*entinfo)["employee_no"],
 		"address":      (*entinfo)["company_address"],
 		"scope":        (*entinfo)["business_scope"],

+ 7 - 2
src/jfw/modules/publicapply/src/enterpriseSearch/entity/entQuery.go

@@ -40,7 +40,7 @@ const (
 	entSearchCacheKey = "entSearchIndexCache_%v"
 
 	index, itype  = "qyxy", "qyxy"
-	entQuery      = `{"query":{"bool":{"must":[%s],"must_not":[%s]}},"_source":["_id","company_name","company_status","legal_person","capital","company_address","company_shortname","company_phone","establish_date","nseo_id"],"sort":[{"capital":{"order":"desc"}}]}`
+	entQuery      = `{"query":{"bool":{"must":[%s],"must_not":[%s]}},"_source":["_id","company_name","company_status","legal_person","capital","company_address","company_shortname","company_phone","establish_date","nseo_id","currency"],"sort":[{"capital":{"order":"desc"}}]}`
 	entQueryCount = `{"query":{"bool":{"must":[%s],"must_not":[%s]}}}`
 )
 
@@ -311,7 +311,12 @@ func formatData(list *[]map[string]interface{}, isFree bool) *[]map[string]inter
 			if establish_date := qutil.Int64All((*list)[index]["establish_date"]); establish_date > 0 {
 				(*list)[index]["establishStamp"] = establish_date
 			}
-
+			//注册资本 币种
+			unit := "万元"
+			if qutil.InterfaceToStr((*list)[index]["currency"]) != "人民币" {
+				unit = fmt.Sprintf("%s%s", "万", qutil.InterfaceToStr((*list)[index]["currency"]))
+			}
+			(*list)[index]["capital"] = fmt.Sprintf("%v%s", (*list)[index]["capital"], unit)
 			//清除多余字段
 			for _, key := range delStr {
 				delete((*list)[index], key)