Forráskód Böngészése

test:提交单元测试

fuwencai 2 éve
szülő
commit
8fa9bc8733
4 módosított fájl, 1103 hozzáadás és 22 törlés
  1. 1 1
      service/InstitutionService_test.go
  2. 21 20
      service/claim_test.go
  3. 885 1
      service/coverage.html
  4. 196 0
      service/test_cover.out

+ 1 - 1
service/InstitutionService_test.go

@@ -24,7 +24,7 @@ func init() {
 		Address:      "192.168.3.217:4000",
 		UserName:     "root",
 		PassWord:     "=PDT49#80Z!RVv52_z",
-		DBName:       "medical_fileld_data",
+		DBName:       "medical_field_data",
 		MaxOpenConns: 5,
 		MaxIdleConns: 5,
 	}

+ 21 - 20
service/claim_test.go

@@ -22,11 +22,11 @@ func TestEntClaimService_Claim(t *testing.T) {
 		wantErr bool
 	}{
 		{"认领医疗机构-新增 ", args{
-			data: &entity.EntClaim{UserId: -1, AppId: "10000", EntId: "d8f48ada3c357d0812df188cc14ed527", EntName: "邢台太行医用材料有限公司", Status: entity.StatusClaimed, Type: entity.TypeInstitution, CreateTime: time.Now().Format("2006-01-02 15:04:05")},
+			data: &entity.EntClaim{UserId: -1, AppId: "10000", EntId: "25caa43ce64036dfd1f55635e06394a6", EntName: "汉川市人民医院", Status: entity.StatusClaimed, Type: entity.TypeInstitution, CreateTime: time.Now().Format("2006-01-02 15:04:05")},
 		}, true, false,
 		},
 		{"认领医疗机构-重复认领", args{
-			data: &entity.EntClaim{UserId: -1, AppId: "10000", EntId: "d8f48ada3c357d0812df188cc14ed527", EntName: "邢台太行医用材料有限公司", Status: entity.StatusClaimed, Type: entity.TypeInstitution, CreateTime: time.Now().Format("2006-01-02 15:04:05")},
+			data: &entity.EntClaim{UserId: -1, AppId: "10000", EntId: "25caa43ce64036dfd1f55635e06394a6", EntName: "汉川市人民医院", Status: entity.StatusClaimed, Type: entity.TypeInstitution, CreateTime: time.Now().Format("2006-01-02 15:04:05")},
 		}, false, true,
 		},
 		{"认领经销商-新增 ", args{
@@ -134,7 +134,7 @@ func TestEntClaimService_IsClaimed(t *testing.T) {
 		args args
 		want bool
 	}{
-		{"是否认领", args{userId: -1, typeCode: 1, entId: "b4eb554e9e7368c17761d4f722e7cf5e", appId: "10000"}, true},
+		{"是否认领", args{userId: -1, typeCode: 1, entId: "5a8f3bde5e75b16a98715041ba687705", appId: "10000"}, true},
 		{"是否认领", args{userId: -1, typeCode: 1, entId: "9999", appId: "10000"}, false},
 	}
 	for _, tt := range tests {
@@ -166,13 +166,13 @@ func TestEntClaimService_GetCompanyByIds(t *testing.T) {
 		wantNil bool
 	}{
 		{
-			"获取企业基本信息根据id批量", args{ids: []string{"6e7fa9b7f0a88110a827e8ba18ffb152", "9205b21e2142e19b1cd200688225fa5a", "eefad51cf48aa3e27c72c41d0ebe8f08"}}, false,
+			"获取经销商基本信息根据id批量", args{ids: []string{"6e7fa9b7f0a88110a827e8ba18ffb152", "9205b21e2142e19b1cd200688225fa5a", "eefad51cf48aa3e27c72c41d0ebe8f08"}}, false,
 		},
 		{
-			"获取企业基本信息根据id批量-2", args{ids: []string{"6e7fa9b7f0a88110a827e8ba18ffb152", "eefad51cf48aa3e27c72c41d0ebe8f08"}}, false,
+			"获取经销商基本信息根据id批量-2", args{ids: []string{"6e7fa9b7f0a88110a827e8ba18ffb152", "eefad51cf48aa3e27c72c41d0ebe8f08"}}, false,
 		},
 		{
-			"获取企业基本信息根据id批量-空id列表", args{ids: []string{}}, true,
+			"获取经销商基本信息根据id批量-空id列表", args{ids: []string{}}, true,
 		},
 	}
 	for _, tt := range tests {
@@ -185,6 +185,8 @@ func TestEntClaimService_GetCompanyByIds(t *testing.T) {
 		})
 	}
 }
+
+// 获取医疗机构信息
 func TestEntClaimService_GetInstitutionByIds(t *testing.T) {
 	type args struct {
 		ids []string
@@ -195,10 +197,10 @@ func TestEntClaimService_GetInstitutionByIds(t *testing.T) {
 		wantNil bool
 	}{
 		{
-			"获取企业基本信息根据id批量", args{ids: []string{"6e7fa9b7f0a88110a827e8ba18ffb152", "9205b21e2142e19b1cd200688225fa5a", "eefad51cf48aa3e27c72c41d0ebe8f08"}}, false,
+			"获取企业基本信息根据id批量", args{ids: []string{"25caa43ce64036dfd1f55635e06394a6", "e61c4a5ea7c5e25b93ef6a1d8cc60a77", "f638adc3eafa7e1c00418cfcae001ba1"}}, false,
 		},
 		{
-			"获取企业基本信息根据id批量-2", args{ids: []string{"6e7fa9b7f0a88110a827e8ba18ffb152", "eefad51cf48aa3e27c72c41d0ebe8f08"}}, false,
+			"获取企业基本信息根据id批量-2", args{ids: []string{"674aa8f11b17e9877e32d5190f509fcb", "955102b26e8790c71bab4f0c28c7f135"}}, false,
 		},
 		{
 			"获取企业基本信息根据id批量-空id列表", args{ids: []string{}}, true,
@@ -207,7 +209,6 @@ func TestEntClaimService_GetInstitutionByIds(t *testing.T) {
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			got := EntClaimSrv.GetInstitutionByIds(tt.args.ids)
-			t.Log(got)
 			if (got == nil || len(*got) == 0) != tt.wantNil {
 				t.Errorf("InstitutionList() got = %v, want %v,%v", got == nil, tt.wantNil, got)
 			}
@@ -228,7 +229,7 @@ func TestEntClaimService_UnclaimedByEnt(t *testing.T) {
 		want      bool
 		wantIDGt0 bool
 	}{
-		{"根据企业id取消认领-机构", args{userId: -1, entId: "b4eb554e9e7368c17761d4f722e7cf5e", type_: entity.TypeInstitution}, true, true},
+		{"根据企业id取消认领-机构", args{userId: -1, entId: "5a8f3bde5e75b16a98715041ba687705", type_: entity.TypeInstitution}, true, true},
 		{"根据企业id取消认领-机构-无效的企业id", args{userId: -1, entId: "aaa", type_: entity.TypeInstitution}, false, false},
 		{"根据企业id取消认领-经销商", args{userId: -1, entId: "b4eb554e9e7368c17761d4f722e7cf5e", type_: entity.TypeDistributor}, true, true},
 		{"根据企业id取消认领-经销商-无效的经销商", args{userId: -1, entId: "aaa", type_: entity.TypeDistributor}, false, false},
@@ -259,16 +260,16 @@ func setupClaim() {
 		"appid", "user_id", "ent_id", "ent_name", "status", "type", "create_time",
 	}
 	values := []interface{}{
-		"10000", -1, "b4eb554e9e7368c17761d4f722e7cf5e", "深圳市南科征途有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "1e1b0912a9a76c432278195f4dc31f9c", "常州美杰医疗用品有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "78b9349b7e44267d1f636ad8eeb1d58a", "深圳联开生物医疗科技有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "9205b21e2142e19b1cd200688225fa5a", "湖北温氏中医药科技有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "f07dd989c6a04bac2646c88a3e921e1d", "武汉协卓卫生用品有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "8ee6d4de90526ac7f6407c1fef21d44b", "烟台开发区宝威生物技术有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "b93a9f0faf1481049fd36e3eb484d052", "黄骅市德坤生物科技有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "eefad51cf48aa3e27c72c41d0ebe8f08", "武汉市江汉医疗制药设备有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "be23b68d98c14847d341f84f6c5da4f3", "洪泽县晨光医疗器械有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
-		"10000", -1, "b4eb554e9e7368c17761d4f722e7cf5e", "深圳市华晨阳科技有限公司", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "5a8f3bde5e75b16a98715041ba687705", "铜仁市人民医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "236fa712a8b570e7c9e9d628bb95813d", "陆川县中西医结合骨科医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "541896669ed7556349f4ccf1e25f47de", "宁都县人民医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "8e6f00ca09c2f09f61ab256486914cf4", "建德市第四人民医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "fdfa636b529b74fbb54ab2ce107c2955", "沛县妇幼保健所", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "d71e1763b7043f66ea123227a319f3f4", "雄县医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "3bd7316889f815d4c5e9c556abd30f61", "福清市中医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "13fdffebb300b8c79b04e99c02dfe649", "北京大学国际医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "bfdd21d94184ff6049c4e15139ab08ed", "苏州吴中经济开发区惠民门诊部", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
+		"10000", -1, "99578a0cbe978160a77110dec3955e78", "武汉紫荆医院", entity.StatusClaimed, entity.TypeInstitution, time.Now().Format("2006-01-02 15:04:05"),
 		"10000", -1, "b4eb554e9e7368c17761d4f722e7cf5e", "深圳市南科征途有限公司", entity.StatusClaimed, entity.TypeDistributor, time.Now().Format("2006-01-02 15:04:05"),
 		"10000", -1, "1e1b0912a9a76c432278195f4dc31f9c", "常州美杰医疗用品有限公司", entity.StatusClaimed, entity.TypeDistributor, time.Now().Format("2006-01-02 15:04:05"),
 		"10000", -1, "78b9349b7e44267d1f636ad8eeb1d58a", "深圳联开生物医疗科技有限公司", entity.StatusClaimed, entity.TypeDistributor, time.Now().Format("2006-01-02 15:04:05"),

+ 885 - 1
service/coverage.html

@@ -3,7 +3,7 @@
 <html>
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-		<title>Go Coverage Report</title>
+		<title>service: Go Coverage Report</title>
 		<style>
 			body {
 				background: black;
@@ -55,6 +55,14 @@
 			<div id="nav">
 				<select id="files">
 				
+				<option value="file0">bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go (77.4%)</option>
+				
+				<option value="file1">bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go (89.2%)</option>
+				
+				<option value="file2">bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go (100.0%)</option>
+				
+				<option value="file3">bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go (21.8%)</option>
+				
 				</select>
 			</div>
 			<div id="legend">
@@ -76,6 +84,882 @@
 		</div>
 		<div id="content">
 		
+		<pre class="file" id="file0" style="display: none">package service
+
+import (
+        "app.yhyue.com/moapp/jybase/date"
+        "app.yhyue.com/moapp/jybase/go-xweb/log"
+        "app.yhyue.com/moapp/jybase/mysql"
+        "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
+        "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
+        "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/resource"
+        "context"
+        "database/sql"
+        "fmt"
+)
+
+type AuthService struct {
+        GoodsCode   string
+        GoodsSpecId int64
+        BasesqlConn *mysql.Mysql
+}
+
+//认证信息保存
+func (b AuthService) UserAuthInfoSave(in *medical.UserInfo) (bool, string) <span class="cov10" title="4">{
+        //先判断用户是否存在
+        user := b.BasesqlConn.FindOne(entity.DOMAIN_CAPITAL_RETENTION, map[string]interface{}{
+                "user_id": in.UserId, "appid": in.Appid,
+        }, "id", "")
+        if user != nil </span><span class="cov8" title="3">{
+                if in.OperationType == "add" </span><span class="cov1" title="1">{
+                        return false, "用户已验证"
+                }</span>
+        } else<span class="cov1" title="1"> {
+                if in.OperationType == "update" </span><span class="cov0" title="0">{
+                        return false, "用户未认证,不可修改"
+                }</span>
+        }
+
+        <span class="cov8" title="3">if in.OperationType == "update" </span><span class="cov5" title="2">{
+                //修改处理
+                data := map[string]interface{}{
+                        "name":       in.Name,
+                        "phone":      in.Phone,
+                        "position":   in.Position,
+                        "department": in.Department,
+                        "mail":       in.Mail,
+                        "ent_name":   in.EntName,
+                        "source":     entity.MEDICALDOMAIN,
+                }
+                ok1 := b.BasesqlConn.Update(entity.DOMAIN_CAPITAL_RETENTION, map[string]interface{}{"user_id": in.UserId, "appid": in.Appid, "source": entity.MEDICALDOMAIN}, data)
+                if ok1 </span><span class="cov5" title="2">{
+                        return true, ""
+                }</span> else<span class="cov0" title="0"> {
+                        log.Println(fmt.Sprintf("认证修改失败:入参:%v:%v,", in.UserId, data))
+                        return false, "修改失败"
+                }</span>
+        } else<span class="cov1" title="1"> {
+                //新增处理
+                data := map[string]interface{}{
+                        "name":        in.Name,
+                        "phone":       in.Phone,
+                        "position":    in.Position,
+                        "department":  in.Department,
+                        "mail":        in.Mail,
+                        "ent_name":    in.EntName,
+                        "user_id":     in.UserId,
+                        "create_time": date.NowFormat(date.Date_Full_Layout),
+                        "appid":       in.Appid,
+                        "source":      entity.MEDICALDOMAIN,
+                }
+                msg := ""
+                ok := b.BasesqlConn.ExecTx("认证信息保存", func(tx *sql.Tx) bool </span><span class="cov1" title="1">{
+                        ok1 := b.BasesqlConn.InsertByTx(tx, entity.DOMAIN_CAPITAL_RETENTION, data)
+                        if ok1 &lt;= 0 </span><span class="cov0" title="0">{
+                                log.Println(fmt.Sprintf("认证失败:参数:%v", data))
+                                msg = "认证信息保存失败"
+                                return false
+                        }</span>
+                        //开通权益
+                        <span class="cov1" title="1">req := &amp;resource.PowerReq{
+                                Appid:       in.Appid,
+                                GoodsCode:   b.GoodsCode,
+                                GoodsSpecId: b.GoodsSpecId,
+                                EntId:       0,
+                                UserId:      in.UserId,
+                                BuyNum:      1,
+                                Type:        int64(1),
+                        }
+                        resq, err := entity.ResourceLib.PowerHandle(context.Background(), req)
+                        if err != nil || resq.Status != 1 </span><span class="cov1" title="1">{
+                                log.Println("权益开通调用失败:", req, resq)
+                                msg = "权益开通调用失败"
+                                return false
+                        }</span>
+                        <span class="cov0" title="0">return ok1 &gt; 0</span>
+                })
+                <span class="cov1" title="1">return ok, msg</span>
+        }
+}
+
+//认证信息查询
+func (b AuthService) UserAuthInfo(in *medical.CommonReq) *map[string]interface{} <span class="cov5" title="2">{
+        //先判断用户是否存在
+        user := b.BasesqlConn.FindOne(entity.DOMAIN_CAPITAL_RETENTION, map[string]interface{}{
+                "user_id": in.UserId, "appid": in.Appid, "source": entity.MEDICALDOMAIN,
+        }, "*", "")
+        return user
+}</span>
+</pre>
+		
+		<pre class="file" id="file1" style="display: none">package service
+
+import (
+        quitl "app.yhyue.com/moapp/jybase/common"
+        elastic "app.yhyue.com/moapp/jybase/esv1"
+        "app.yhyue.com/moapp/jybase/mysql"
+        "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
+        "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
+        "fmt"
+        "log"
+        "strings"
+)
+
+type InstitutionService struct {
+        Bidfield   string
+        BasesqlCon *mysql.Mysql
+        MysqlConn  *mysql.Mysql
+}
+
+// GetFilterItem 医疗机构搜索条件
+func (b InstitutionService) GetFilterItem() (levelList, typeList *[]map[string]interface{}) <span class="cov1" title="1">{
+        //机构类型
+        levelSql := fmt.Sprintf("select  * from %s where  name!='%s'", entity.CODE_MEDICAL_INSTITUTION_LEVEL, "其它")
+        levelList = b.MysqlConn.SelectBySql(levelSql)
+        //医院等级
+        typeSql := fmt.Sprintf("select  * from %s where  name!='%s' and  level=1", entity.CODE_MEDICAL_INSTITUTION_TYPE, "其它")
+        typeList = b.MysqlConn.SelectBySql(typeSql)
+        return
+}</span>
+
+// Institution 医疗机构搜索条件
+func (b InstitutionService) Institution(in *medical.SearchInstitutionReq) (dataList []map[string]interface{}) <span class="cov1" title="1">{
+        //先查询医疗机构
+        //医疗机构查询拼接
+        query := `{"query":{"bool":{"must":[%s],"must_not": [{"term": {"p_miname": ""}}],"should":[%s],"minimum_should_match": %d}},"sort":{"id":{"order":"desc"}}, "from": %d,"size": %d}`
+        shouldQuery := `{"bool":{"should":[%s],"minimum_should_match": %d}}`
+        multi_match := `{"multi_match": {"query": %s,"type": "phrase", "fields": [%s]}}`
+        musts := []string{}
+        var query_bool_must_and = `{"bool": {"must": [%s]%s}}`
+        shoulds := []string{}
+        bools := []string{}
+        //省份处理
+        cityArr := []string{}
+        areaArr := []string{}
+        if in.AreaCode != "" </span><span class="cov1" title="1">{
+                areaCode := quitl.ObjToMap(in.AreaCode)
+                for k, v := range *areaCode </span><span class="cov3" title="2">{
+                        if len(quitl.ObjArrToStringArr(v.([]interface{}))) == 0 </span><span class="cov1" title="1">{
+                                areaArr = append(areaArr, k)
+                        }</span> else<span class="cov1" title="1"> {
+                                cityArr = append(cityArr, quitl.ObjArrToStringArr(v.([]interface{}))...)
+                        }</span>
+                }
+        }
+
+        //省份处理
+        <span class="cov1" title="1">if len(areaArr) &gt; 0 </span><span class="cov1" title="1">{
+                areaQuery := entity.SplicingArr("area", areaArr)
+                shoulds = append(shoulds, areaQuery)
+        }</span>
+        //城市处理
+        <span class="cov1" title="1">if len(cityArr) &gt; 0 </span><span class="cov1" title="1">{
+                cityQuery := entity.SplicingArr("city", cityArr)
+                shoulds = append(shoulds, cityQuery)
+        }</span>
+        //医疗等级处理
+        <span class="cov1" title="1">if in.LevelCode != "" </span><span class="cov1" title="1">{
+                levelQuery := entity.SplicingString("level_code", in.LevelCode)
+                musts = append(musts, levelQuery)
+        }</span>
+        //机构类型处理
+        <span class="cov1" title="1">if in.MiTypeCode != "" </span><span class="cov1" title="1">{
+                miTyprQuery := entity.SplicingString("mi_type_code", in.MiTypeCode)
+                musts = append(musts, miTyprQuery)
+        }</span>
+        //经营性质处理
+        <span class="cov1" title="1">if in.BusinessTypeCode != "" </span><span class="cov1" title="1">{
+                businessTypeQuery := entity.SplicingString("business_type", in.BusinessTypeCode)
+                musts = append(musts, businessTypeQuery)
+        }</span>
+        //机构名称处理
+        <span class="cov1" title="1">if in.CompanyName != "" </span><span class="cov1" title="1">{
+                /*companyNameQuery := entity.SplicingString("p_miname", in.CompanyName)
+                musts = append(musts, companyNameQuery)*/
+                musts = append(musts, fmt.Sprintf(multi_match, "\""+in.CompanyName+"\"", "\"p_miname\""))
+        }</span>
+        //业务范围处理
+        <span class="cov1" title="1">boolsNum, bools := BusinessScopehandle(in.SdequipmentCode, multi_match, `"sdequipment"`, query_bool_must_and, bools)
+        shouldNumber := 0
+        if len(shoulds) &gt; 0 </span><span class="cov1" title="1">{
+                shouldNumber = 1
+        }</span>
+        <span class="cov1" title="1">shouldStr := fmt.Sprintf(shouldQuery, strings.Join(shoulds, ","), shouldNumber)
+        musts = append(musts, shouldStr)
+        queryStr := fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","), boolsNum, 0, in.ResourceUseCount)
+        //医疗机构查找
+        companyList := elastic.Get(entity.INSTITUTION_INDEX, entity.INSTITUTION_TYPE, queryStr)
+        log.Println(queryStr)
+        //再根据医疗机构名称查找项目金额总数
+        companyName := ""
+        companyMap := make(map[string]map[string]interface{})
+        if len(*companyList) &gt; 0 &amp;&amp; companyList != nil </span><span class="cov1" title="1">{
+                //认领数据查询
+                companyIdMap := b.ClaimCompanyData(in.Appid, in.NewUserId, entity.TypeInstitution)
+                for key, value := range *companyList </span><span class="cov10" title="14">{
+                        if key &gt; 0 </span><span class="cov9" title="13">{
+                                companyName += `,`
+                        }</span>
+                        <span class="cov10" title="14">companyName += `"` + fmt.Sprint(value["mi_name"]) + `"`
+                        value["project_money"] = float64(0.00)
+                        value["project_count"] = 0
+                        if companyIdMap[fmt.Sprint(value["company_id"])] == nil </span><span class="cov10" title="14">{
+                                value["isClaim"] = false
+                        }</span> else<span class="cov0" title="0"> {
+                                value["isClaim"] = true
+                        }</span>
+                        <span class="cov10" title="14">companyMap[fmt.Sprint(value["mi_name"])] = value</span>
+                }
+
+        } else<span class="cov0" title="0"> {
+                return
+        }</span>
+        <span class="cov1" title="1">orderField := "_count"
+        orderType := "desc"
+        //排序处理
+        if in.Sort == 1 </span><span class="cov0" title="0">{
+                orderField = "count"
+        }</span>
+        <span class="cov1" title="1">aggStr := fmt.Sprintf(`{"query":{"bool":{"must":[{"terms":{"buyer":[%s]}},{"terms":{"bidstatus":["中标","成交","合同"]}},{"term":{"bid_field":"%s"}}],"minimum_should_match":0}},"aggs":{"group_field":{"terms":{"field":"buyer","order":[{"%s":"%s"}]},"aggs":{"count":{"sum":{"field":"bidamount"}}}}},"size":0}`, companyName, b.Bidfield, orderField, orderType)
+        log.Println(aggStr)
+        countList := entity.GetAggs(entity.PROJECTSET_INDEX, entity.PROJECTSET_TYPE, aggStr)
+        //
+        if len(countList) &gt; 0 &amp;&amp; countList != nil </span><span class="cov1" title="1">{
+                for _, value := range countList </span><span class="cov3" title="2">{
+                        if companyMap[value.CompanyName] != nil </span><span class="cov3" title="2">{
+                                companyMap[value.CompanyName]["project_money"] = value.ProjectMoney
+                                companyMap[value.CompanyName]["project_count"] = value.ProjectCount
+                                dataList = append(dataList, companyMap[value.CompanyName])
+                                delete(companyMap, value.CompanyName)
+                        }</span>
+                }
+                <span class="cov1" title="1">for _, value := range companyMap </span><span class="cov9" title="12">{
+                        dataList = append(dataList, value)
+                }</span>
+        } else<span class="cov0" title="0"> {
+                dataList = *companyList
+
+        }</span>
+        <span class="cov1" title="1">return</span>
+}
+
+// Distributor 经销商搜索
+func (b InstitutionService) Distributor(in *medical.SearchDistributorReq) (dataList []map[string]interface{}) <span class="cov1" title="1">{
+        //先查询医疗机构
+        //医疗机构查询拼接
+        query := `{"query":{"bool":{"must":[%s],"must_not": [{"term": {"p_supplier": ""}}],"should":[%s],"minimum_should_match": %d}}, "sort":{"id":{"order":"desc"}},"from": %d,"size": %d}`
+        shouldQuery := `{"bool":{"should":[%s],"minimum_should_match": %d}}`
+        multi_match := `{"multi_match": {"query": %s,"type": "phrase", "fields": [%s]}}`
+        var query_bool_must_and = `{"bool": {"must": [%s]%s}}`
+        musts := []string{}
+        shoulds := []string{}
+        bools := []string{}
+        //省份处理
+        cityArr := []string{}
+        areaArr := []string{}
+        if in.AreaCode != "" </span><span class="cov1" title="1">{
+                areaCode := quitl.ObjToMap(in.AreaCode)
+                for k, v := range *areaCode </span><span class="cov3" title="2">{
+                        if len(quitl.ObjArrToStringArr(v.([]interface{}))) == 0 </span><span class="cov1" title="1">{
+                                areaArr = append(areaArr, k)
+                        }</span> else<span class="cov1" title="1"> {
+                                cityArr = append(cityArr, quitl.ObjArrToStringArr(v.([]interface{}))...)
+                        }</span>
+                }
+        }
+        //省份处理
+        <span class="cov1" title="1">if len(areaArr) &gt; 0 </span><span class="cov1" title="1">{
+                areaQuery := entity.SplicingArr("area", areaArr)
+                shoulds = append(shoulds, areaQuery)
+        }</span>
+        //城市处理
+        <span class="cov1" title="1">if len(cityArr) &gt; 0 </span><span class="cov1" title="1">{
+                cityQuery := entity.SplicingArr("city", cityArr)
+                shoulds = append(shoulds, cityQuery)
+        }</span>
+        //业务范围处理
+        <span class="cov1" title="1">boolsNum, bools := BusinessScopehandle(in.BusinessScope, multi_match, `"productlist.name"`, query_bool_must_and, bools)
+        //品牌处理
+        if in.Brand != "" </span><span class="cov0" title="0">{
+                brandQuery := entity.SplicingString("productlist.brand", in.Brand)
+                musts = append(musts, brandQuery)
+        }</span>
+        //产品型号处理
+        <span class="cov1" title="1">if in.ProductModel != "" </span><span class="cov0" title="0">{
+                productModelQuery := entity.SplicingString("productlist.model", in.ProductModel)
+                musts = append(musts, productModelQuery)
+        }</span>
+        //机构名称处理
+        <span class="cov1" title="1">if in.CompanyName != "" </span><span class="cov1" title="1">{
+                musts = append(musts, fmt.Sprintf(multi_match, "\""+in.CompanyName+"\"", "\"p_supplier\""))
+        }</span>
+        <span class="cov1" title="1">shouldNumber := 0
+        if len(shoulds) &gt; 0 </span><span class="cov1" title="1">{
+                shouldNumber = 1
+        }</span>
+        <span class="cov1" title="1">shouldStr := fmt.Sprintf(shouldQuery, strings.Join(shoulds, ","), shouldNumber)
+        musts = append(musts, shouldStr)
+        queryStr := fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","), boolsNum, 0, in.ResourceUseCount)
+        //医疗机构查找
+        companyList := elastic.Get(entity.SUPPLIER_PRODUCT_INDEX, entity.SUPPLIER_PRODUCT_TYPE, queryStr)
+        log.Println(queryStr)
+        //再根据医疗机构名称查找项目金额总数
+        companyIds := ""
+        companyMap := make(map[string]map[string]interface{})
+        if len(*companyList) &gt; 0 &amp;&amp; companyList != nil </span><span class="cov1" title="1">{
+                //认领数据查询
+                companyIdMap := b.ClaimCompanyData(in.Appid, in.NewUserId, entity.TypeDistributor)
+                for key, value := range *companyList </span><span class="cov7" title="7">{
+                        if key &gt; 0 </span><span class="cov7" title="6">{
+                                companyIds += `,`
+                        }</span>
+                        <span class="cov7" title="7">companyIds += `"` + fmt.Sprint(value["company_id"]) + `"`
+                        value["project_money"] = float64(0.00)
+                        value["project_count"] = 0
+                        if companyIdMap[fmt.Sprint(value["company_id"])] == nil </span><span class="cov7" title="7">{
+                                value["isClaim"] = false
+                        }</span> else<span class="cov0" title="0"> {
+                                value["isClaim"] = true
+                        }</span>
+                        <span class="cov7" title="7">companyMap[fmt.Sprint(value["company_id"])] = value</span>
+                }
+        } else<span class="cov0" title="0"> {
+                return
+        }</span>
+        //排序处理
+        <span class="cov1" title="1">orderField := "_count"
+        orderType := "desc"
+        if in.Sort == 1 </span><span class="cov0" title="0">{
+                orderField = "count"
+        }</span>
+        <span class="cov1" title="1">aggStr := fmt.Sprintf(`{"query":{"bool":{"must":[{"terms":{"entidlist":[%s]}},{"terms":{"bidstatus":["中标","成交","合同"]}},{"term":{"bid_field":"%s"}}],"minimum_should_match":0}},"aggs":{"group_field":{"terms":{"field":"entidlist","order":[{"%s":"%s"}]},"aggs":{"count":{"sum":{"field":"bidamount"}}}}},"size":0}`, companyIds, b.Bidfield, orderField, orderType)
+        log.Println(aggStr)
+        countList := entity.GetAggs(entity.PROJECTSET_INDEX, entity.PROJECTSET_TYPE, aggStr)
+        if len(countList) &gt; 0 &amp;&amp; countList != nil </span><span class="cov0" title="0">{
+                for _, value := range countList </span><span class="cov0" title="0">{
+                        if companyMap[value.CompanyName] != nil </span><span class="cov0" title="0">{
+                                companyMap[value.CompanyName]["project_money"] = value.ProjectMoney
+                                companyMap[value.CompanyName]["project_count"] = value.ProjectCount
+                                dataList = append(dataList, companyMap[value.CompanyName])
+                                delete(companyMap, value.CompanyName)
+                        }</span>
+                }
+                <span class="cov0" title="0">for _, value := range companyMap </span><span class="cov0" title="0">{
+                        dataList = append(dataList, value)
+                }</span>
+        } else<span class="cov1" title="1"> {
+                dataList = *companyList
+        }</span>
+        <span class="cov1" title="1">return</span>
+}
+
+//  ClaimCompanyData 已认领企业查询处理
+//  @Description:
+//  @param appId 用户标识
+//  @param newUserId 用户标识
+//  @param claimType 数据类型
+//  @return map[string]map[string]interface{} 认领的企业信息
+//
+func (b InstitutionService) ClaimCompanyData(appId string, newUserId, claimType int64) map[string]map[string]interface{} <span class="cov5" title="4">{
+        claimList := b.BasesqlCon.Find(entity.TableDomainEntClaim, map[string]interface{}{
+                "user_id": newUserId,
+                "status":  1,
+                "type":    claimType,
+                "appid":   appId,
+        }, "ent_id", "", -1, -1)
+        companyIdMap := make(map[string]map[string]interface{})
+        if claimList == nil || len(*claimList) == 0 </span><span class="cov4" title="3">{
+                return companyIdMap
+        }</span>
+        <span class="cov1" title="1">for _, m := range *claimList </span><span class="cov1" title="1">{
+                companyIdMap[quitl.InterfaceToStr(m["ent_id"])] = m
+        }</span>
+        <span class="cov1" title="1">return companyIdMap</span>
+}
+
+// BusinessScopehandle 业务范围处理
+func BusinessScopehandle(BusinessScope []*medical.Business_Scope, multi_match, findfields, query_bool_must_and string, bools []string) (int, []string) <span class="cov3" title="2">{
+        boolsNum := 0
+        if len(BusinessScope) &gt; 0 </span><span class="cov3" title="2">{
+                boolsNum = 1
+
+                multi_match = fmt.Sprintf(multi_match, "%s", findfields)
+                for _, v := range BusinessScope </span><span class="cov4" title="3">{
+                        businessShoulds := []string{}
+                        businessMust_not := []string{}
+                        //关键词
+                        for _, keyV := range v.Key </span><span class="cov4" title="3">{
+                                businessShoulds = append(businessShoulds, fmt.Sprintf(multi_match, "\""+keyV+"\""))
+                        }</span>
+                        //附加词
+                        <span class="cov4" title="3">for _, AppendV := range v.Appendkey </span><span class="cov1" title="1">{
+                                businessShoulds = append(businessShoulds, fmt.Sprintf(multi_match, "\""+AppendV+"\""))
+                        }</span>
+                        //排除词
+                        <span class="cov4" title="3">for _, notV := range v.Notkey </span><span class="cov7" title="6">{
+                                businessMust_not = append(businessMust_not, fmt.Sprintf(multi_match, "\""+notV+"\""))
+                        }</span>
+                        //添加
+                        <span class="cov4" title="3">if len(businessShoulds) &gt; 0 </span><span class="cov4" title="3">{
+                                notStr := ""
+                                if len(businessShoulds) &gt; 0 </span><span class="cov4" title="3">{
+                                        notStr = fmt.Sprintf(`,"must_not":[%s]`, strings.Join(businessMust_not, ","))
+                                }</span>
+                                <span class="cov4" title="3">bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(businessShoulds, ","), notStr))</span>
+                        }
+                }
+        }
+        <span class="cov3" title="2">return boolsNum, bools</span>
+}
+</pre>
+		
+		<pre class="file" id="file2" style="display: none">package service
+
+import (
+        "app.yhyue.com/moapp/jybase/common"
+        "app.yhyue.com/moapp/jybase/date"
+        "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
+        "fmt"
+        "github.com/zeromicro/go-zero/core/logx"
+        "strings"
+)
+
+// EntClaimService 企业认领
+type EntClaimService struct {
+        *entity.Conn
+}
+
+// NewEntClaimSrv 创建一个EntClaimSrv实例
+func NewEntClaimSrv(conn *entity.Conn) *EntClaimService <span class="cov1" title="1">{
+        return &amp;EntClaimService{
+                conn,
+        }
+}</span>
+
+// Claim 认领
+func (e *EntClaimService) Claim(data *entity.EntClaim) (int64, error) <span class="cov7" title="4">{
+        if e.IsClaimed(data.UserId, data.AppId, data.EntId, data.Type) </span><span class="cov4" title="2">{
+                return 0, entity.RepeatErr
+        }</span>
+        <span class="cov4" title="2">return e.BaseMysql.Insert(entity.TableDomainEntClaim, common.StructToMapMore(data)), nil</span>
+}
+
+// UnclaimedByEnt 根据企业id取消认领
+func (e EntClaimService) UnclaimedByEnt(userId int, entId string, type_ int) (bool, int) <span class="cov7" title="4">{
+
+        query := map[string]interface{}{
+                "user_id": userId,
+                "status":  entity.StatusClaimed,
+                "ent_id":  entId,
+                "type":    type_,
+        }
+        // 1. 查询该条数据
+        rs := e.BaseMysql.FindOne(entity.TableDomainEntClaim, query, "id", "")
+        if rs == nil || len(*rs) == 0 </span><span class="cov4" title="2">{
+                logx.Errorf("取消认领:无效的企业id %v", entId)
+                return false, 0
+        }</span>
+        <span class="cov4" title="2">query2 := map[string]interface{}{
+                "id": (*rs)["id"],
+        }
+        // 2. 取消认领
+        update := map[string]interface{}{
+                "status":      entity.StatusUnClaimed,
+                "update_time": date.NowFormat(date.Date_Full_Layout),
+        }
+        return e.BaseMysql.Update(entity.TableDomainEntClaim, query2, update), common.IntAll((*rs)["id"])</span>
+}
+
+// IsClaimed 是否认领
+func (e *EntClaimService) IsClaimed(userId int, appId string, entId string, typeCode int) bool <span class="cov10" title="6">{
+        query := map[string]interface{}{
+                "appId":   appId,
+                "user_id": userId,
+                "type":    typeCode,
+                "ent_id":  entId,
+                "status":  entity.StatusClaimed,
+        }
+        return e.BaseMysql.Count(entity.TableDomainEntClaim, query) &gt; 0
+}</span>
+
+// DistributorList 关注的经销商列表
+func (e *EntClaimService) DistributorList(userId int, appId string, page int, pageSize int) (*[]map[string]interface{}, int) <span class="cov4" title="2">{
+
+        query := map[string]interface{}{
+                "user_id": userId,
+                "appid":   appId,
+                "type":    entity.TypeDistributor,
+                "status":  entity.StatusClaimed,
+        }
+        field := "id,appid,user_id,ent_id,ent_name,create_time"
+        order := "create_time desc"
+        total := e.BaseMysql.Count(entity.TableDomainEntClaim, query)
+        if total == 0 </span><span class="cov1" title="1">{
+                return nil, 0
+        }</span>
+        <span class="cov1" title="1">return e.BaseMysql.Find(entity.TableDomainEntClaim, query, field, order, (page-1)*pageSize, pageSize), int(total)</span>
+}
+
+// InstitutionList  我关注的医疗机构列表
+func (e *EntClaimService) InstitutionList(userId int, appId string, page int, pageSize int) (*[]map[string]interface{}, int) <span class="cov4" title="2">{
+        query := map[string]interface{}{
+                "user_id": userId,
+                "appid":   appId,
+                "type":    entity.TypeInstitution,
+                "status":  entity.StatusClaimed,
+        }
+        field := "id,appid,user_id,ent_id,ent_name,create_time"
+        order := "create_time desc"
+        total := e.BaseMysql.Count(entity.TableDomainEntClaim, query)
+        if total == 0 </span><span class="cov1" title="1">{
+                return nil, 0
+        }</span>
+        <span class="cov1" title="1">return e.BaseMysql.Find(entity.TableDomainEntClaim, query, field, order, (page-1)*pageSize, pageSize), int(total)</span>
+}
+
+// GetCompanyByIds   批量获取经销商详细信息
+func (e EntClaimService) GetCompanyByIds(ids []string) *[]map[string]interface{} <span class="cov6" title="3">{
+        if len(ids) == 0 </span><span class="cov1" title="1">{
+                return &amp;[]map[string]interface{}{}
+        }</span>
+        <span class="cov4" title="2">q := "select a.company_id,a.company_name,a.establish_date,a.company_address,a.capital,a.company_phone,b.area,b.city from %v a left join %v b on a.area_code=b.code  where a.company_id in (\"%v\")  "
+        query := fmt.Sprintf(q, entity.TableCompanyBasInfo, entity.TableCodeArea, strings.Join(ids, "\" , \""))
+        return e.GlobalCommonData.SelectBySql(query)</span>
+}
+
+// GetInstitutionByIds  批量获取机构详细信息
+func (e EntClaimService) GetInstitutionByIds(ids []string) *[]map[string]interface{} <span class="cov6" title="3">{
+        if len(ids) == 0 </span><span class="cov1" title="1">{
+                return &amp;[]map[string]interface{}{}
+        }</span>
+        <span class="cov4" title="2">q := "select a.company_id,a.mi_name,a.establish_date,b.area,b.city from %v.%v a left join %v.%v b on a.area_code=b.code  where a.company_id in (\"%v\")  "
+        query := fmt.Sprintf(q, entity.DbMedical, entity.TableInstitutionBaseInfo, entity.DbGlobal, entity.TableCodeArea, strings.Join(ids, "\" , \""))
+        return e.Mysql.SelectBySql(query)</span>
+}
+</pre>
+		
+		<pre class="file" id="file3" style="display: none">// @Description   画像相关
+package service
+
+import (
+        "errors"
+        "fmt"
+        "log"
+        "regexp"
+        "strings"
+        "time"
+
+        . "app.yhyue.com/moapp/jybase/common"
+        "app.yhyue.com/moapp/jybase/encrypt"
+        elastic "app.yhyue.com/moapp/jybase/esv1"
+        "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
+)
+
+//画像
+type PortraitService struct {
+        *entity.Conn
+}
+
+var ClearHtml = regexp.MustCompile("&lt;[^&gt;]*&gt;")
+
+// @description           生成结构体
+// @param                     conn 数据库实例
+// @return                    Portrait 画像实例
+func NewPortrait(conn *entity.Conn) *PortraitService <span class="cov1" title="1">{
+        return &amp;PortraitService{
+                conn,
+        }
+}</span>
+
+// @description           获取画像内容
+// @param                     companyId 机构id
+// @param                     user_id   base_user_id
+// @return                    PortraitInfo 画像信息
+// @return                    error 错误信息
+func (this *PortraitService) Info(companyId string, user_id int64) (*entity.PortraitInfo, error) <span class="cov10" title="3">{
+        //判断是否存在companyid
+        if companyId == "" || user_id == 0 </span><span class="cov10" title="3">{
+                return nil, errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        //获取信息
+        <span class="cov0" title="0">data := this.Mysql.SelectBySql(fmt.Sprintf(`SELECT a.sdequipment_code,a.area_code,a.beds,a.visit_perday,a.doctorsnum,a.address,a.website,a.business_type,replace(a.equipment,",","、") equipment, replace(e.equipment,",","、") sdleveltypeequip ,a.mi_name,a.establish_date,b.name LEVEL,c.name miType,d.class FROM %s a 
+                                                                                                        LEFT JOIN %s b ON a.level_code=b.code 
+                                                                                                        LEFT JOIN %s c ON c.code =a.mi_type_code
+                                                                                                        LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT departname_class1 SEPARATOR  '、') class,company_id FROM %s WHERE company_id=?)  AS d ON d.company_id =a.company_id
+                                                                                                        left join %s e on e.code =a.sdequipment_code
+                                                                                                        WHERE  a.company_id=?`, entity.Institution_baseinfo, entity.Code_level, entity.Code_type, entity.Institution_department, entity.Code_sdleveltypeequip), companyId, companyId)
+        if data == nil || len(*data) == 0 </span><span class="cov0" title="0">{
+                return nil, errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        //获取area_code 省份,城市,区县
+        <span class="cov0" title="0">area, city, district := "", "", ""
+        rdata := (*data)[0]
+        adata := this.GlobalCommonData.SelectBySql(fmt.Sprintf(`select area,city,district from %s where code =? limit 1`, entity.Code_area), ObjToString(rdata["area_code"]))
+        if adata != nil &amp;&amp; len(*adata) &gt; 0 </span><span class="cov0" title="0">{
+                area = ObjToString((*adata)[0]["area"])
+                city = ObjToString((*adata)[0]["city"])
+                district = ObjToString((*adata)[0]["district"])
+        }</span>
+        //医疗设备如果基本信息表中没有,则根据sdequipment_code、code联合查询得到equipment
+        <span class="cov0" title="0">equipment := ObjToString(rdata["equipment"])
+        sdleveltypeequip := ObjToString(rdata["sdleveltypeequip"])
+        if equipment == "" &amp;&amp; sdleveltypeequip != "" </span><span class="cov0" title="0">{
+                equipment = ObjToString(rdata["sdleveltypeequip"])
+        }</span>
+        //医疗画像结果
+        <span class="cov0" title="0">portraitInfo := &amp;entity.PortraitInfo{
+                Beds:          Int64All(rdata["beds"]),
+                VisitPerday:   Int64All(rdata["visit_perday"]),      // 门诊量/日
+                Doctorsnum:    Int64All(rdata["doctorsnum"]),        //医生人数
+                Address:       ObjToString(rdata["address"]),        //医疗机构地址
+                Website:       ObjToString(rdata["website"]),        //医疗机构网站
+                Area:          area,                                 //省
+                City:          city,                                 //市
+                District:      district,                             //区
+                BusinessType:  Int64All(rdata["business_type"]),     //医疗机构经营方式(0:公立、1:民营、2:其它)
+                Level:         ObjToString(rdata["level"]),          //医疗机构等级
+                MiType:        ObjToString(rdata["miType"]),         //医疗机构类型
+                Equipment:     equipment,                            //医院设备
+                Departnames:   ObjToString(rdata["class"]),          //医院科室
+                Follow:        this.IsFollow(companyId, user_id, 1), //是否关注 0-未关注 1已关注
+                CompanyName:   ObjToString(rdata["mi_name"]),        //医疗机构名称
+                EstablishDate: ObjToString(rdata["establish_date"]), //成立日期
+        }
+        return portraitInfo, nil</span>
+}
+
+// @description           获取医疗机构画像相关招标动态
+// @param                     companyName 机构名称
+// @param                     pageSize 条数
+// @param                     pageNum 页码
+// @param                     isExport 是否用于数据导出
+// @return                    GetNewMsgList 招标动态
+// @return                    count 招标数量
+// @return                    error 错误信息
+func (this *PortraitService) List(companyName string, pageSize, pageNum int64, isExport bool) (*[]*entity.GetNewMsgList, int64, error) <span class="cov1" title="1">{
+        //判断是否存在companyid
+        if companyName == "" </span><span class="cov0" title="0">{
+                return nil, 0, errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        <span class="cov1" title="1">var total int64
+        mustQueryArr := this.CommonPare(companyName)
+        log.Println("~~~~,", mustQueryArr)
+        //仅第一页查询总量(非数据导出)
+
+        if pageNum == 1 </span><span class="cov1" title="1">{
+                total = elastic.Count(entity.BiddingIndex, entity.BiddingIndex, fmt.Sprintf(entity.NewMustSearch, strings.Join(mustQueryArr, ","), ""))
+                if total &lt;= 0 </span><span class="cov1" title="1">{
+                        return nil, 0, errors.New(entity.NO_DATA_ERROR_MSG)
+                }</span>
+        }
+        <span class="cov0" title="0">start, limit := (pageNum-1)*pageSize, pageSize
+        fields := `"title","area","subtype","_id","projectname","publishtime"`
+        if isExport </span><span class="cov0" title="0">{
+                start, limit = 0, entity.DataExportNumLimit
+                fields = `"_id","title"`
+        }</span>
+        <span class="cov0" title="0">list := &amp;[]*entity.GetNewMsgList{}
+        //列表查询
+        if total &lt;= entity.DataExportBatchSearchLimit </span><span class="cov0" title="0">{
+                listQuery := fmt.Sprintf(entity.NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(entity.ListSearchLimit, fields, "publishtime", start, limit))
+                log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
+                newData := elastic.Get(entity.BiddingIndex, entity.BiddingType, listQuery)
+                if newData == nil || len(*newData) == 0 </span><span class="cov0" title="0">{
+                        return nil, 0, errors.New(entity.NO_DATA_ERROR_MSG)
+                }</span>
+                <span class="cov0" title="0">log.Println("newdata:", newData)
+                for k, v := range *newData </span><span class="cov0" title="0">{
+                        if len(v) &gt; 0 </span><span class="cov0" title="0">{
+                                if v["_id"] != nil </span><span class="cov0" title="0">{
+                                        (*newData)[k]["id"] = EncodeId(v["_id"].(string))
+                                        delete((*newData)[k], "_id") //删除未加密id
+                                }</span>
+                                <span class="cov0" title="0">title := ObjToString(ObjToString(v["title"]))
+                                if title == "" </span><span class="cov0" title="0">{
+                                        title = ObjToString(v["projectname"])
+                                }</span>
+                                <span class="cov0" title="0">(*newData)[k]["title"] = ClearHtml.ReplaceAllString(title, "")</span>
+                        }
+                        <span class="cov0" title="0">*list = append(*list, &amp;entity.GetNewMsgList{
+                                Area:      ObjToString(v["area"]),
+                                Bidstatus: ObjToString(v["subtype"]),           //信息类型
+                                Firsttime: Int64All(v["publishtime"]),          //时间
+                                Id:        ObjToString((*newData)[k]["id"]),    //加密信息id
+                                Title:     ObjToString((*newData)[k]["title"]), //标题
+                        })
+                        log.Println("~~list:", list)</span>
+                }
+                <span class="cov0" title="0">return list, total, nil</span>
+        }
+        <span class="cov0" title="0">return nil, 0, errors.New(entity.NO_DATA_ERROR_MSG)</span>
+}
+
+//医疗机构画像查询语句拼接
+func (this *PortraitService) CommonPare(companyName string) (mustQueryArr []string) <span class="cov1" title="1">{
+        sTime, eTime := this.PareTimeSelect()
+        mustQueryArr = append(mustQueryArr, fmt.Sprintf(`{"term":{"buyer":"%s"}}`, companyName))
+        mustQueryArr = append(mustQueryArr, fmt.Sprintf(`{"term":{"bid_field":"%s"}}`, entity.BidField))
+        mustQueryArr = append(mustQueryArr, fmt.Sprintf(`{"range":{"publishtime":{"gte":"%d","lte":"%d"}}}`, sTime.Unix(), eTime.Unix()))
+
+        return
+}</span>
+
+//PareTimeSelect 默认2年
+func (this *PortraitService) PareTimeSelect() (st, et time.Time) <span class="cov1" title="1">{
+        now := time.Now()
+        sYear := now.Year() - 2
+        eYear := now.Year()
+        //返回默认时间
+        sTimeStamp := time.Date(sYear, 1, 1, 0, 0, 0, 0, time.Local)
+        eTimeStamp := time.Date(eYear+1, 1, 1, 0, 0, -1, 0, time.Local)
+        if eYear == now.Year() </span><span class="cov1" title="1">{
+                eTimeStamp = time.Date(eYear, now.Month(), now.Day(), now.Hour(), now.Minute(), 0, 0, time.Local)
+        }</span>
+        <span class="cov1" title="1">return sTimeStamp, eTimeStamp</span>
+}
+
+//短地址加密
+func EncodeId(sid string) string <span class="cov0" title="0">{
+        if sid == "" || sid == "-" </span><span class="cov0" title="0">{ //不存在的id为-
+                return ""
+        }</span>
+        <span class="cov0" title="0">return encrypt.EncodeArticleId2ByCheck(sid)</span>
+}
+
+// @description           判断用户是否关注该项目
+// @param                     companyId 机构id
+// @param                     user_id base_user_id
+// @param                     types 类型 1医疗机构 2经销商
+// @return                    int64 是否关注 1关注 0未关注
+func (this *PortraitService) IsFollow(companyId string, user_id, types int64) int64 <span class="cov0" title="0">{
+        if this.BaseMysql.CountBySql(fmt.Sprintf(`select count(1) from %s where user_id =? and ent_id =? and type =?`, entity.Domain_ent_claim), user_id, companyId, types) &gt; 0 </span><span class="cov0" title="0">{
+                return 1
+        }</span>
+        <span class="cov0" title="0">return 0</span>
+}
+
+// @description           获取医疗机构画像相关招标动态导出的加密戳 用于数据导出支付页面
+// @param                     mongoUid mongodb用户id
+// @param                     companyName 机构名称
+// @param                     ids 选中的招标信息 多个,隔开 全部则传空字符串
+// @return                    string 生成的数据导出加密戳
+// @return                    error 错误信息
+func (this *PortraitService) Export(mongoUid, companyName, ids string) (string, error) <span class="cov0" title="0">{
+        //判断是否存在companyid
+        if companyName == "" </span><span class="cov0" title="0">{
+                return "", errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        <span class="cov0" title="0">sTime, eTime := this.PareTimeSelect()
+        idsArr := []string{}
+        if ids == "" </span><span class="cov0" title="0">{
+                //获取全部id
+                list, _, err := this.List(companyName, -1, -1, true)
+                if err != nil || list == nil || len(*list) == 0 </span><span class="cov0" title="0">{
+                        return "", errors.New(entity.NO_DATA_ERROR_MSG)
+                }</span>
+                <span class="cov0" title="0">for k, v := range *list </span><span class="cov0" title="0">{
+                        ids += v.Id
+                        if k != len(*list)-1 </span><span class="cov0" title="0">{
+                                ids += ","
+                        }</span>
+                }
+        }
+        <span class="cov0" title="0">for _, v := range strings.Split(ids, ",") </span><span class="cov0" title="0">{
+                id := encrypt.DecodeArticleId2ByCheck(v) //解密id
+                if len(id) &gt; 0 </span><span class="cov0" title="0">{
+                        //
+                        idsArr = append(idsArr, id[0])
+                }</span>
+        }
+        //
+        <span class="cov0" title="0">saveMap := map[string]interface{}{
+                "s_userid":    mongoUid,
+                "comeinfrom":  "medicalPortrait", //来源
+                "comeintime":  time.Now().Unix(),
+                "selectIds":   idsArr,
+                "area":        []string{},
+                "publishtime": fmt.Sprintf("%d_%d", sTime.Unix(), eTime.Unix()),
+                "industry":    []string{},
+                "keywords":    []string{},
+                "selectType":  "",
+                "buyer":       []string{companyName},
+        }
+
+        if _id := this.MgoJy.Save("export_search", saveMap); _id != "" </span><span class="cov0" title="0">{
+                return encrypt.SE.Encode2Hex(_id), nil
+        }</span>
+        <span class="cov0" title="0">return "", errors.New(entity.NO_DATA_ERROR_MSG)</span>
+}
+
+// @description          经销商画像基本信息
+// @param                     companyId 经销商id
+// @param                     user_id   base_user_id
+// @return                    distributorInfo 经销商画像信息
+// @return                    error 错误信息
+func (this *PortraitService) DistributorInfo(companyId string, user_id int64) (*entity.DistributorInfo, error) <span class="cov0" title="0">{
+        if companyId == "" || user_id == 0 </span><span class="cov0" title="0">{
+                return nil, errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        //查找基本信息
+        <span class="cov0" title="0">rdata := this.GlobalCommonData.SelectBySql(fmt.Sprintf(`select company_name,company_code,cancel_date,company_phone,operation_startdate,operation_enddate,credit_no,real_capital,org_code,tax_code,establish_date,legal_person,company_type,employee_no,company_address,business_scope
+                                                                                                                        from %s where company_id =?`, entity.Company_baseinfo), companyId)
+        if rdata == nil || len(*rdata) == 0 </span><span class="cov0" title="0">{
+                return nil, errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        <span class="cov0" title="0">data := (*rdata)[0]
+        distributorInfo := &amp;entity.DistributorInfo{
+                //TODO 还没判断是否关注
+                LegalPerson: ObjToString(data["legal_person"]), //法定代表人
+                //TODO 经营状态不知道咋看
+                // CompanyStatus       //经营状态
+                CreditNo:           ObjToString(data["credit_no"]),           //统一信用代码
+                EstablishDate:      ObjToString(data["establish_date"]),      //成立日期
+                OrgCode:            ObjToString(data["org_code"]),            //组织机构代码
+                Capital:            ObjToString(data["real_capital"]),        //注册资本
+                TaxCode:            ObjToString(data["tax_code"]),            //纳税人识别号
+                OperationStartdate: ObjToString(data["operation_startdate"]), //营业期限开始
+                OperationEnddate:   ObjToString(data["operation_enddate"]),   //营业期限至 结束
+                CompanyCode:        ObjToString(data["company_code"]),        //工商注册号
+                CompanyType:        ObjToString(data["company_type"]),        //公司类型
+                EmployeeNo:         ObjToString(data["employee_no"]),         //人员规模
+                CompanyPhone:       ObjToString(data["company_phone"]),       //联系方式
+                CompanyAddress:     ObjToString(data["business_scope"]),      //注册地址
+                BusinessScope:      ObjToString(data["cancel_date"]),         //经营范围
+                ConpanyName:        ObjToString(data["company_name"]),        //企业名称
+        }
+        return distributorInfo, nil</span>
+}
+
+// @description          经销商画像-医械产品
+// @param                     companyId 经销商id
+// @param                     user_id   base_user_id
+// @return                    distributorInfo 经销商画像信息
+// @return                    error 错误信息
+func (this *PortraitService) MedicalProdcutList(companyId string, user_id int64) (*[]entity.MedicalEquipment, error) <span class="cov0" title="0">{
+        if companyId == "" || user_id == 0 </span><span class="cov0" title="0">{
+                return nil, errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        //查找基本信息
+        <span class="cov0" title="0">rdata := this.GlobalCommonData.SelectBySql(fmt.Sprintf(`SELECT product_name,regno,approve_date,validity_date,manage_type,regist_type
+                                                                                                                        from %s where company_id =? order by id desc`, entity.Product_baseinfo), companyId)
+        if rdata == nil || len(*rdata) == 0 </span><span class="cov0" title="0">{
+                return nil, errors.New(entity.NO_DATA_ERROR_MSG)
+        }</span>
+        <span class="cov0" title="0">list := &amp;[]entity.MedicalEquipment{}
+        for _, v := range *rdata </span><span class="cov0" title="0">{
+                *list = append(*list, entity.MedicalEquipment{
+                        ProductName:  ObjToString(v["product_name"]),  //产品名称
+                        Regno:        ObjToString(v["regno"]),         //注册/备案证编号
+                        ApproveDate:  ObjToString(v["approve_date"]),  //批准日期|备案日期
+                        ValidityDate: ObjToString(v["validity_date"]), //有效期至
+                        ManageType:   ObjToString(v["manage_type"]),   //管理类别
+                        RegistType:   Int64All(v["regist_type"]),      //1-注册产品 2-备案产品
+                })
+        }</span>
+        <span class="cov0" title="0">return list, nil</span>
+}
+</pre>
+		
 		</div>
 	</body>
 	<script>

+ 196 - 0
service/test_cover.out

@@ -1 +1,197 @@
 mode: count
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:22.76,27.17 2 4
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:37.2,37.34 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:27.17,28.32 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:28.32,30.4 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:31.8,32.35 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:32.35,34.4 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:37.34,49.10 3 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:49.10,51.4 1 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:51.9,54.4 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:55.8,70.74 3 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:95.3,95.17 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:70.74,72.16 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:78.4,88.38 3 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:93.4,93.18 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:72.16,76.5 3 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:88.38,92.5 3 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/AuthService.go:100.82,106.2 2 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:21.93,29.2 5 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:32.111,45.23 10 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:57.2,57.22 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:62.2,62.22 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:67.2,67.24 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:72.2,72.25 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:77.2,77.31 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:82.2,82.26 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:88.2,90.22 3 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:93.2,102.49 8 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:123.2,126.18 3 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:129.2,133.44 4 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:149.2,149.8 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:45.23,47.31 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:47.31,48.60 1 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:48.60,50.5 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:50.10,52.5 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:57.22,60.3 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:62.22,65.3 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:67.24,70.3 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:72.25,75.3 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:77.31,80.3 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:82.26,86.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:90.22,92.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:102.49,105.40 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:105.40,106.15 1 14
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:109.4,112.60 4 14
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:117.4,117.52 1 14
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:106.15,108.5 1 13
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:112.60,114.5 1 14
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:114.10,116.5 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:120.8,122.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:126.18,128.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:133.44,134.35 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:142.3,142.36 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:134.35,135.44 1 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:135.44,140.5 4 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:142.36,144.4 1 12
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:145.8,148.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:153.111,166.23 10 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:177.2,177.22 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:182.2,182.22 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:187.2,189.20 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:194.2,194.27 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:199.2,199.26 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:202.2,203.22 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:206.2,215.49 8 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:236.2,238.18 3 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:241.2,244.44 4 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:259.2,259.8 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:166.23,168.31 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:168.31,169.60 1 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:169.60,171.5 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:171.10,173.5 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:177.22,180.3 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:182.22,185.3 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:189.20,192.3 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:194.27,197.3 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:199.26,201.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:203.22,205.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:215.49,218.40 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:218.40,219.15 1 7
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:222.4,225.60 4 7
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:230.4,230.55 1 7
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:219.15,221.5 1 6
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:225.60,227.5 1 7
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:227.10,229.5 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:232.8,234.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:238.18,240.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:244.44,245.35 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:253.3,253.36 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:245.35,246.44 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:246.44,251.5 4 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:253.36,255.4 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:256.8,258.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:269.122,277.46 3 4
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:280.2,280.31 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:283.2,283.21 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:277.46,279.3 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:280.31,282.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:287.152,289.28 2 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:318.2,318.24 1 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:289.28,293.35 3 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:293.35,297.31 3 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:301.4,301.40 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:305.4,305.34 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:309.4,309.32 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:297.31,299.5 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:301.40,303.5 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:305.34,307.5 1 6
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:309.32,311.33 2 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:314.5,314.104 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/InstitutionService.go:311.33,313.6 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:18.57,22.2 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:25.71,26.65 1 4
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:29.2,29.90 1 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:26.65,28.3 1 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:33.90,43.32 3 4
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:47.2,55.99 3 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:43.32,46.3 2 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:59.96,68.2 2 6
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:71.126,82.16 5 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:85.2,85.115 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:82.16,84.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:89.126,99.16 5 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:102.2,102.115 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:99.16,101.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:106.82,107.19 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:110.2,112.46 3 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:107.19,109.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:116.86,117.19 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:120.2,122.35 3 2
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/claim.go:117.19,119.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:28.54,32.2 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:39.98,41.37 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:45.2,51.36 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:55.2,58.37 4 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:64.2,66.47 3 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:70.2,88.26 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:41.37,43.3 1 3
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:51.36,53.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:58.37,62.3 3 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:66.47,68.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:99.136,101.23 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:104.2,109.18 4 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:115.2,117.14 3 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:121.2,123.48 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:154.2,154.53 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:101.23,103.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:109.18,111.17 2 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:111.17,113.4 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:117.14,120.3 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:123.48,127.43 4 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:130.3,131.30 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:152.3,152.26 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:127.43,129.4 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:131.30,132.18 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:143.4,150.32 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:132.18,133.24 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:137.5,138.20 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:141.5,141.67 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:133.24,136.6 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:138.20,140.6 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:158.85,165.2 5 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:168.66,175.25 6 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:178.2,178.31 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:175.25,177.3 1 1
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:182.34,183.29 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:186.2,186.45 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:183.29,185.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:194.85,195.170 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:198.2,198.10 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:195.170,197.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:207.88,209.23 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:212.2,214.15 3 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:227.2,227.44 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:235.2,248.65 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:251.2,251.49 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:209.23,211.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:214.15,217.51 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:220.3,220.27 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:217.51,219.4 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:220.27,222.25 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:222.25,224.5 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:227.44,229.18 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:229.18,232.4 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:248.65,250.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:259.112,260.37 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:264.2,266.38 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:269.2,290.29 3 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:260.37,262.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:266.38,268.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:298.118,299.37 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:303.2,305.38 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:308.2,309.27 2 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:319.2,319.18 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:299.37,301.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:305.38,307.3 1 0
+bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/service/portrait.go:309.27,318.3 1 0