wangchuanjin 9 年 前
コミット
d876d9ed7e

+ 3 - 3
common/src/main.go

@@ -15,7 +15,7 @@ import (
 var N = 200
 
 //生enterprise表
-func main1() {
+func main() {
 	// 参数 mongodb(网站库) mongodb(公示库) elastic collection area index-db inde-type N
 	initConfig(os.Args[1], "web", "qfw")
 	if os.Args[4] == "enterprise" {
@@ -42,7 +42,7 @@ func main1() {
 	query := ecps_session.DB("qfw").C(os.Args[4]).Find(m).Iter()
 	arr := make([]map[string]interface{}, 0)
 	for tmp := make(map[string]interface{}); query.Next(tmp); i++ {
-		arr = append(arr, tmp)
+		arr = append(arr, elastic.ConverData(&tmp))
 		if i%N == 0 && i != 0 {
 			elastic.BulkSave(os.Args[6], os.Args[7], &arr, true)
 			arr = make([]map[string]interface{}, 0)
@@ -102,7 +102,7 @@ func main1() {
 	}
 
 }
-func main() {
+func main1() {
 	// 参数 mongodb(网站库) elastic collection query
 	initConfig(os.Args[1], "web", "qfw")
 	InitMongodbPool()

+ 1 - 3
common/src/qfw/util/elastic/elasticutil.go

@@ -604,6 +604,7 @@ func ConverData(ent *map[string]interface{}) map[string]interface{} {
 	tmp2["OpLocDistrictName"] = getLoc(tmpLoc, &LocCity)
 
 	tmp2["RecCap"] = tmp["RecCap"]
+	tmp2["RegCap"] = tmp["RegCap"]
 	tmp2["excDirect"] = tmp["excDirect"]
 	tmp2["IndustryPhy"] = tmp["IndustryPhy"]
 	tmp2["IndustryPhyName"] = tmp["IndustryPhyName"]
@@ -623,9 +624,6 @@ func ConverData(ent *map[string]interface{}) map[string]interface{} {
 	if tmp["Nb_email"] != nil {
 		tmp2["Nb_email"] = tmp["Nb_email"]
 	}
-	if tmp["Nb_email"] != nil {
-		tmp2["Nb_email"] = tmp["Nb_email"]
-	}
 	if tmp["Nb_tel"] != nil {
 		tmp2["Nb_tel"] = tmp["Nb_tel"]
 	}

+ 6 - 0
core/src/web/staticres/css/entcommunity.css

@@ -492,6 +492,11 @@ a:focus, a:hover{
 	margin-left: 10px;
 	font-size: 14px !important;
 }
+.ent-exception{
+	padding: 0px 6px;
+	border: 1px solid #FF5A5F;
+	color: #FF5A5F;
+}
 /********************企业画像**********************/
 .entinfo-basicinfo .b-com-content{
 	padding-top: 60px !important;
@@ -543,6 +548,7 @@ a:focus, a:hover{
 	font-size: 14px;
 	font-weight: normal;
 	float: right;
+	margin-left: 5px;
 }
 .entinfo-basicinfo .entinfo-round>div:first-child>div:nth-child(n+1)>span:first-child{
 	width: 80px;

+ 3 - 0
core/src/web/staticres/js/entportrait.js

@@ -277,6 +277,9 @@ $(function(){
 	$("#thinkAgain").click(function(){
 		TipAssembly.triangleHide();
 	});
+	if($("#entinfo-opState").length > 0){
+		$("#entinfo-status").prepend($("#entinfo-opState").clone());
+	}
 });
 function afterReLoadTop(flag,result){
 	//关系网如果没有数据,选项卡不可点

+ 5 - 11
core/src/web/templates/enterprise/detail.html

@@ -29,7 +29,7 @@
 			<div class="b-com-first">
 				<font class="b-com-title">{{if .T.res.EntName}}{{.T.res.EntName}}{{end}}</font>
 				{{if .T.res.OpState}}
-				<span class="{{if eq .T.res.OpState "07" "08" "11"}}ent-status-r{{else}}ent-status-g{{end}}">
+				<span id="entinfo-opState" class="{{if eq .T.res.OpState "07" "08" "11"}}ent-status-r{{else}}ent-status-g{{end}}">
 				<script>
 					var OpState = {{.T.res.OpState}};
 					var OpStateName = {{.T.res.OpStateName}};
@@ -195,18 +195,12 @@
 						<div>
 							<span>
 								<div>
-									{{if .T.res.OpStateName}}
-									<span class="{{if eq .T.res.OpStateName "注销" "吊销"}}ent-status-r{{else}}ent-status-g{{end}}">
-									<script>
-										var OpStateName = {{.T.res.OpStateName}};
-										if(OpStateName.length > 2){
-											OpStateName = OpStateName.substring(0,2);
-										}
-										document.write(OpStateName);
-									</script>
+									<span id="entinfo-status" class="entinfo-status">
+										{{if .T.res.excDirect}}{{if gt (len .T.res.excDirect) 0}}
+										<span class="ent-exception">经营异常</span>
+										{{end}}{{end}}
 									</span>
 									<br>
-									{{end}}
 									{{if .T.res.EntName}}
 									<script>
 										var entName = {{.T.res.EntName}};

+ 3 - 0
core/src/web/templates/search/enterpriseList.html

@@ -81,6 +81,9 @@
 									</script>
 									</span>
 									{{end}}
+									{{if $v.excDirect}}{{if gt (len $v.excDirect) 0}}
+									<span class="margin-l-5 ent-exception">经营异常</span>
+									{{end}}{{end}}
 									{{ if index $v "s_action"}}
 										{{ if eq (index $v "s_action") "01"}}
 											<span class="glyphicon qyrz   margin-l-10 jhtb"></span><span class="lineb " ><small>&nbsp;已认证企业&nbsp;</small></span>