WH01243 1 سال پیش
والد
کامیت
4e96fb1cbd
1فایلهای تغییر یافته به همراه7 افزوده شده و 10 حذف شده
  1. 7 10
      api/internal/service/employService.go

+ 7 - 10
api/internal/service/employService.go

@@ -92,7 +92,6 @@ func (e *EmPloyService) EmployOperate(in *types.EmployOperateReq) (bool, string)
 				} else {
 					//收录新增
 					data := map[string]interface{}{}
-					data["source"] = source
 					if in.EmployType == 1 || in.EmployType == 4 {
 						data = infoFind(id, v1)
 					} else if in.EmployType == 2 {
@@ -102,6 +101,7 @@ func (e *EmPloyService) EmployOperate(in *types.EmployOperateReq) (bool, string)
 						data = customFind(id, in.EmployType)
 						data["jybx_url"] = "/swordfish/page_big_pc/unit_portrayal/" + v1
 					}
+					data["source"] = source
 					data["position_id"] = in.PositionId
 					data["ent_id"] = in.EntId
 					data["ent_dept_id"] = in.EntDeptId
@@ -199,12 +199,9 @@ func infoFind(id string, v1 string) map[string]interface{} {
 		data["winner"] = obj["s_winner"]
 		data["jybx_url"] = "/article/content/" + v1 + ".html"
 		//类型处理
-		/*if subtype == "拟建" {
-			data["type"] = 1
-			data["type"] = 2
-		} else */
+		pushTime := time.Unix(common.Int64All(obj["publishtime"]), 0).Format(date.Date_Full_Layout)
 		if subtype == "拟建" {
-			data = niJianHandle(id, data, v1)
+			data = niJianHandle(id, data, v1, pushTime)
 			data["type"] = 1
 		} else {
 			if toptype == "采购意向" || toptype == "预告" || toptype == "招标" {
@@ -225,8 +222,8 @@ func infoFind(id string, v1 string) map[string]interface{} {
 				data["annex"] = 1
 			}
 		}
-		data["publishtime"] = time.Unix(common.Int64All(obj["publishtime"]), 0).Format(date.Date_Full_Layout)
-		data["show_time"] = time.Unix(common.Int64All(obj["publishtime"]), 0).Format(date.Date_Full_Layout)
+		data["publishtime"] = pushTime
+		data["show_time"] = pushTime
 		data["projectname"] = obj["projectname"]
 		procurementlist, _ := obj["procurementlist"].([]interface{})
 		for _, vs := range procurementlist { //1.采购意向清单数据集打码处理
@@ -471,7 +468,7 @@ func (e *EmPloyService) DistributePerson(in *types.EmployDistributeReq) bool {
 	})
 }
 
-func niJianHandle(infoId string, data map[string]interface{}, v1 string) map[string]interface{} {
+func niJianHandle(infoId string, data map[string]interface{}, v1, pushTime string) map[string]interface{} {
 	project, _ := MC.MgoProject.FindOne("projectset_proposed", map[string]interface{}{
 		"ids": infoId,
 	})
@@ -519,7 +516,7 @@ func niJianHandle(infoId string, data map[string]interface{}, v1 string) map[str
 		data["project_stage"] = project_stage
 		data["project_category"] = category
 		data["project_investment"] = total_investment
-		lastTimeStr := common.If(lasttime == 0, nil, time.Unix(lasttime, 0).Format(date.Date_Full_Layout))
+		lastTimeStr := common.If(lasttime == 0, pushTime, time.Unix(lasttime, 0).Format(date.Date_Full_Layout))
 		data["project_evolve"] = lastTimeStr
 		data["show_time"] = lastTimeStr
 		data["publishtime"] = lastTimeStr