浏览代码

脚本待审

shenzekai 2 年之前
父节点
当前提交
9703fdfb1e

+ 1 - 0
db/logistics.go

@@ -95,6 +95,7 @@ func GetTaskLogisticsList(ctx context.Context, projectID string, pageSize, pageN
 		field := conditionType2.Field(i)
 		tag := field.Tag.Get("condition")
 		value := conditionValue2.FieldByName(field.Name)
+		fmt.Printf("过滤展示 %+v %+v \n", value, tag)
 		if !util.IsBlank(value) && tag == "platform_nickname" { // input:1		taskIdsbase:1,2,3    string
 			db1 = db1.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
 		}

+ 122 - 0
db/script.go

@@ -0,0 +1,122 @@
+package db
+
+import (
+	"context"
+	"fmt"
+	"reflect"
+	"youngee_b_api/model/common_model"
+	"youngee_b_api/model/gorm_model"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/pack"
+	"youngee_b_api/util"
+
+	"github.com/issue9/conv"
+	"github.com/sirupsen/logrus"
+)
+
+// 查询上传脚本的task list
+func GetTaskScriptList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskScriptInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{})
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "script_status" {
+			fmt.Printf("script %+v", value.Interface() == int64(2))
+			if value.Interface() == int64(2) {
+				db = db.Where("script_status>=? AND script_status < ?", 2, 5)
+			} else {
+				db = db.Where("script_status =? ", 5)
+			}
+			continue
+		}
+		if !util.IsBlank(value) && tag != "platform_nickname" {
+			db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+		} else if tag == "platform_nickname" {
+			continue
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []int
+	taskMap := make(map[int]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YounggeeScriptInfo{})
+
+	// 根据Project条件过滤
+	conditionType2 := reflect.TypeOf(conditions).Elem()
+	conditionValue2 := reflect.ValueOf(conditions).Elem()
+	for i := 0; i < conditionType2.NumField(); i++ {
+		field := conditionType2.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue2.FieldByName(field.Name)
+		if !util.IsBlank(value) && tag == "platform_nickname" { // input:1		taskIdsbase:1,2,3    string
+			fmt.Printf("Test %s = ?\n", tag)
+			db1 = db1.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+		}
+	}
+	var ScriptInfos []gorm_model.YounggeeScriptInfo
+	db1 = db1.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id IN ? AND is_submit=? AND is_review=?", taskIds, 1, 0).Find(&ScriptInfos)
+	ScriptMap := make(map[int]gorm_model.YounggeeScriptInfo)
+	for _, ScriptInfo := range ScriptInfos {
+		ScriptMap[conv.MustInt(ScriptInfo.TaskID)] = ScriptInfo
+	}
+	// 查询总数
+	var totalScript int64
+	if err := db1.Count(&totalScript).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	var misNum int64
+	if totalScript > totalTask {
+		misNum = totalScript - totalTask
+	} else {
+		misNum = totalTask - totalScript
+	}
+	logrus.Println("totalScript,totalTalent,misNum:", totalScript, totalTask, misNum)
+
+	// 查询该页数据
+	limit := pageSize + misNum
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskScripts []*http_model.TaskScript
+	var taskScripts []*http_model.TaskScriptInfo
+	for _, taskId := range taskIds {
+		TaskScript := new(http_model.TaskScript)
+		TaskScript.Talent = taskMap[taskId]
+		TaskScript.Script = ScriptMap[taskId]
+		TaskScripts = append(TaskScripts, TaskScript)
+	}
+
+	taskScripts = pack.TaskScriptToTaskInfo(TaskScripts)
+
+	for _, v := range taskScripts {
+		fmt.Println("taskScript: \n", *v)
+	}
+	// return fulltaskScript, total, nil
+	return taskScripts, totalTask, nil
+}

+ 70 - 0
handler/revise_opinion.go

@@ -0,0 +1,70 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"youngee_b_api/model/http_model"
+)
+
+//
+//func WrapReviseOptionHandler(ctx *gin.Context) {
+//	handler := newReviseOptionHandler(ctx)
+//	baseRun(handler)
+//}
+
+func newReviseOptionHandler(ctx *gin.Context) *ReviseOptionHandler {
+	return &ReviseOptionHandler{
+		req:  http_model.NewReviseOptionRequest(),
+		resp: http_model.NewReviseOptionResponse(),
+		ctx:  ctx,
+	}
+}
+
+type ReviseOptionHandler struct {
+	req  *http_model.ReviseOptionRequest
+	resp *http_model.CommonResponse
+	ctx  *gin.Context
+}
+
+func (h *ReviseOptionHandler) getRequest() interface{} {
+	return h.req
+}
+func (h *ReviseOptionHandler) getContext() *gin.Context {
+	return h.ctx
+}
+func (h *ReviseOptionHandler) getResponse() interface{} {
+	return h.resp
+}
+
+/***
+func (h *ReviseOptionHandler) run() {
+	data := http_model.ReviseOptionRequest{}
+	data = *h.req
+	isRefuse := data.IsRefuse
+	if isRefuse== 0 {
+		fmt.Println("Create in")
+		res, err := service.Project.Create(h.ctx, data)
+		if err != nil {
+			logrus.Errorf("[ReviseOptionHandler] call Create err:%+v\n", err)
+			util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
+			log.Info("CreateProject fail,req:%+v", h.req)
+			return
+		}
+		h.resp.Message = "成功添加修改意见"
+		h.resp.Data = res
+	} else {
+		res, err := service.Logistics.Update(h.ctx, data)
+		if err != nil {
+			logrus.Errorf("[ReviseOptionHandler] call Create err:%+v\n", err)
+			util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
+			log.Info("CreateProject fail,req:%+v", h.req)
+			return
+		}
+		h.resp.Message = "成功修改物流信息"
+		h.resp.Data = res
+	}
+
+}
+func (h *ReviseOptionHandler) checkParam() error {
+	return nil
+}
+***/

+ 77 - 0
handler/task_script_list.go

@@ -0,0 +1,77 @@
+package handler
+
+import (
+	"errors"
+	"fmt"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/pack"
+	"youngee_b_api/service"
+	"youngee_b_api/util"
+
+	"github.com/gin-gonic/gin"
+	"github.com/issue9/conv"
+	"github.com/sirupsen/logrus"
+)
+
+func WrapTaskScriptListHandler(ctx *gin.Context) {
+	handler := newTaskScriptListHandler(ctx)
+	baseRun(handler)
+}
+
+func newTaskScriptListHandler(ctx *gin.Context) *TaskScriptListHandler {
+	return &TaskScriptListHandler{
+		req:  http_model.NewTaskScriptListRequest(),
+		resp: http_model.NewTaskScriptListResponse(),
+		ctx:  ctx,
+	}
+}
+
+type TaskScriptListHandler struct {
+	req  *http_model.TaskScriptListRequest
+	resp *http_model.CommonResponse
+	ctx  *gin.Context
+}
+
+func (h *TaskScriptListHandler) getRequest() interface{} {
+	return h.req
+}
+func (h *TaskScriptListHandler) getContext() *gin.Context {
+	return h.ctx
+}
+func (h *TaskScriptListHandler) getResponse() interface{} {
+	return h.resp
+}
+func (h *TaskScriptListHandler) run() {
+	conditions := pack.HttpTaskScriptListRequestToCondition(h.req)
+	data, err := service.Project.GetTaskScriptList(h.ctx, h.req.ProjectId, h.req.PageSize, h.req.PageNum, conditions)
+	if err != nil {
+		logrus.WithContext(h.ctx).Errorf("[TaskLogisticsListHandler] error GetProjectTaskList, err:%+v", err)
+		util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, consts.DefaultToast)
+		return
+	}
+	h.resp.Data = data
+}
+func (h *TaskScriptListHandler) checkParam() error {
+	var errs []error
+	if h.req.PageNum < 0 || h.req.PageSize <= 0 {
+		errs = append(errs, errors.New("page param error"))
+	}
+	h.req.PageNum--
+	h.req.ProjectId = util.IsNull(h.req.ProjectId)
+	if _, err := conv.Int64(h.req.ProjectId); err != nil {
+		errs = append(errs, err)
+	}
+	h.req.StrategyId = util.IsNull(h.req.StrategyId)
+	if _, err := conv.Int64(h.req.StrategyId); err != nil {
+		errs = append(errs, err)
+	}
+	h.req.ScriptStatus = util.IsNull(h.req.ScriptStatus)
+	if _, err := conv.Int64(h.req.ScriptStatus); err != nil {
+		errs = append(errs, err)
+	}
+	if len(errs) != 0 {
+		return fmt.Errorf("check param errs:%+v", errs)
+	}
+	return nil
+}

+ 1 - 0
model/common_model/talent_condition.go

@@ -3,6 +3,7 @@ package common_model
 type TalentConditions struct {
 	ProjectId        int64  `condition:"project_id"`        // 项目ID
 	LogisticsStatus  int64  `condition:"logistics_status"`  // 物流状态
+	ScriptStatus     int64  `condition:"script_status"`     // 脚本状态
 	StrategyId       int64  `condition:"strategy_id"`       // 策略ID
 	TaskId           string `condition:"task_id"`           // 任务ID
 	PlatformNickname string `condition:"platform_nickname"` // 账号昵称

+ 6 - 2
model/gorm_model/project_task.go

@@ -23,14 +23,18 @@ type YoungeeTaskInfo struct {
 	ServiceCharge          float64   `gorm:"column:service_charge"`                                 // 服务费
 	ServiceRate            int       `gorm:"column:service_rate"`                                   // 服务费率,千分之
 	TaskStatus             int       `gorm:"column:task_status;default:1;NOT NULL"`                 // 任务状态 1待选 2已选 3落选
-	TaskStage              int       `gorm:"column:task_stage;NOT NULL"`                            // 任务阶段
+	TaskStage              int       `gorm:"column:task_stage;NOT NULL"`                            // 任务阶段,详情见info_task_stage表
 	CreateDate             time.Time `gorm:"column:create_date;NOT NULL"` // 创建时间
 	SelectDate             time.Time `gorm:"column:select_date"`                                    // 反选时间
+	DeliveryDate           time.Time `gorm:"column:delivery_date"`                                  // 发货时间
 	CompleteStatus         int       `gorm:"column:complete_status;default:1;NOT NULL"`             // 结束方式 1未结束 2正常结束 3反选失败 4被解约
 	CompleteDate           time.Time `gorm:"column:complete_date"`                                  // 结束时间
-	LogisticsStatus        int       `gorm:"column:logistics_status"`                               // 发货状态 1 待发货 2已发货 3 已签收
+	LogisticsStatus        int       `gorm:"column:logistics_status;default:1"`                     // 发货状态 1 待发货 2已发货 3 已签收
+	ScriptStatus           uint      `gorm:"column:script_status;default:1"`                        // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	SketchStatus           int       `gorm:"column:sketch_status"`                                  // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
 }
 
+
 func (m *YoungeeTaskInfo) TableName() string {
 	return "youngee_task_info"
 }

+ 24 - 0
model/gorm_model/script.go

@@ -0,0 +1,24 @@
+package gorm_model
+
+import (
+	"time"
+)
+
+type YounggeeScriptInfo struct {
+	ScriptID      int       `gorm:"column:script_id;primary_key;AUTO_INCREMENT"` // 脚本id
+	TaskID        int       `gorm:"column:task_id;NOT NULL"`                     // 任务id
+	Title         string    `gorm:"column:title;NOT NULL"`                       // 脚本标题
+	Content       string    `gorm:"column:content;NOT NULL"`                     // 脚本内容
+	ReviseOpinion string    `gorm:"column:revise_opinion"`                       // 审核意见
+	IsSubmit      int       `gorm:"column:is_submit;NOT NULL"`                   // 是否提交
+	IsReview      int       `gorm:"column:is_review;default:0;NOT NULL"`         // 是否审核
+	IsOk          int       `gorm:"column:is_ok;NOT NULL"`                       // 是否合格
+	CreateAt      time.Time `gorm:"column:create_at"`                            // 创建时间
+	SubmitAt      time.Time `gorm:"column:submit_at"`                            // 提交时间
+	AgreeAt       time.Time `gorm:"column:agree_at"`                             // 同意时间
+	RejectAt      time.Time `gorm:"column:reject_at"`                            // 驳回时间
+}
+
+func (m *YounggeeScriptInfo) TableName() string {
+	return "younggee_script_info"
+}

+ 19 - 0
model/gorm_model/sketch.go

@@ -0,0 +1,19 @@
+package gorm_model
+
+import "time"
+
+type YounggeeSketchInfo struct {
+	SketchID      int       `gorm:"column:sketch_id;primary_key;AUTO_INCREMENT"` // 初稿id
+	TaskID        int       `gorm:"column:task_id;NOT NULL"`                     // 任务id
+	ReviseOpinion string    `gorm:"column:revise_opinion"`
+	CreateAt      time.Time `gorm:"column:create_at;NOT NULL"`
+	AgreeAt       time.Time `gorm:"column:agree_at"`
+	RejectAt      time.Time `gorm:"column:reject_at"`
+	IsSubmit      int       `gorm:"column:is_submit;NOT NULL"`           // 是否提交
+	IsReview      int       `gorm:"column:is_review;default:0;NOT NULL"` // 是否审核
+	IsOk          int       `gorm:"column:is_ok;NOT NULL"`               // 是否合格
+}
+
+func (m *YounggeeSketchInfo) TableName() string {
+	return "younggee_sketch_info"
+}

+ 21 - 0
model/http_model/revise_option.go

@@ -0,0 +1,21 @@
+package http_model
+
+type ReviseOptionRequest struct {
+	StrategyID  int64  `json:"strategy_id"`  //招募策略id
+	ScriptID    int64  `json:"logistics_id"` // 脚本-id
+	CompanyName string `json:"company_name"` // 实物商品-物流公司名称
+	IsRefuse    int64  `json:"is_refuse"`    //是否打回修改
+}
+
+type ReviseOptionData struct {
+	ScriptID int64 `json:"logistics_id"` // 脚本ID
+}
+
+func NewReviseOptionRequest() *ReviseOptionRequest {
+	return new(ReviseOptionRequest)
+}
+func NewReviseOptionResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(ReviseOptionData)
+	return resp
+}

+ 73 - 0
model/http_model/task_script.go

@@ -0,0 +1,73 @@
+package http_model
+
+import (
+	"time"
+	"youngee_b_api/model/gorm_model"
+)
+
+type TaskScriptListRequest struct {
+	PageSize         int64  `json:"page_size"`
+	PageNum          int64  `json:"page_num"`
+	ProjectId        string `json:"project_id"`        // 项目ID
+	TaskId           string `json:"task_id"`           // 任务ID
+	StrategyId       string `json:"strategy_id"`       // 策略ID
+	ScriptStatus     string `json:"script_status"`     // 稿件状态
+	PlatformNickname string `json:"platform_nickname"` // 账号昵称
+}
+
+type TaskScriptPreview struct {
+	TaskID            string `json:"task_id"`             // 任务ID
+	PlatformNickname  string `json:"platform_nickname"`   // 账号昵称
+	FansCount         string `json:"fans_count"`          // 粉丝数
+	RecruitStrategyID string `json:"recruit_strategy_id"` //招募策略ID
+	StrategyID        string `json:"strategy_id"`         // 报名选择的招募策略id
+	Submit            string `json:"script_upload_time"`  //创建时间
+	Title             string `json:"title"`               //脚本标题
+	Content           string `json:"content"`             //脚本内容
+	ReviseOpinion     string `json:"revise_opinion"`      //审稿意见
+
+}
+
+type TaskScriptInfo struct {
+	TaskID            int       `json:"task_id"`           // 任务ID
+	PlatformNickname  string    `json:"platform_nickname"` // 账号昵称
+	FansCount         string    `json:"fans_count"`        // 粉丝数
+	RecruitStrategyID int       `json:"recruit_strategy_id"`
+	StrategyID        int       `json:"strategy_id"`    // 报名选择的招募策略id
+	ScriptId          int       `json:"script_id"`      //脚本ID
+	Title             string    `json:"title"`          //脚本标题
+	Content           string    `json:"content"`        //脚本内容
+	ReviseOpinion     string    `json:"revise_opinion"` //审稿意见
+	CreateAt          time.Time `json:"create_at"`      //创建时间
+	SubmitAt          time.Time `json:"submit_at"`      // 提交时间
+	AgreeAt           time.Time `json:"agree_at"`       //同意时间
+	RejectAt          time.Time `json:"reject_at"`      //拒绝时间
+	IsReview          int       `json:"is_review"`      //是否审核
+}
+
+type TaskScript struct {
+	Talent gorm_model.YoungeeTaskInfo
+	Script gorm_model.YounggeeScriptInfo
+	//Account   gorm_model.YoungeePlatformAccountInfo
+}
+
+type TaskSketch struct {
+	Talent gorm_model.YoungeeTaskInfo
+	Sketch gorm_model.YounggeeSketchInfo
+	//Account   gorm_model.YoungeePlatformAccountInfo
+}
+
+type TaskScriptListData struct {
+	TaskScriptPreview []*TaskScriptPreview `json:"project_script_pre_view"`
+	Total             string               `json:"total"`
+}
+
+func NewTaskScriptListRequest() *TaskScriptListRequest {
+	return new(TaskScriptListRequest)
+}
+
+func NewTaskScriptListResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(ProjectTaskListData)
+	return resp
+}

+ 62 - 0
pack/task_script_list.go

@@ -0,0 +1,62 @@
+package pack
+
+import (
+	"youngee_b_api/model/http_model"
+
+	"github.com/tidwall/gjson"
+
+	"github.com/issue9/conv"
+)
+
+func MGormTaskScriptInfoListToHttpTaskScriptPreviewList(gormTaskScriptInfos []*http_model.TaskScriptInfo) []*http_model.TaskScriptPreview {
+	var httpProjectPreviews []*http_model.TaskScriptPreview
+	for _, gormTaskScriptInfo := range gormTaskScriptInfos {
+		httpTaskScriptPreview := MGormTaskScriptInfoToHttpTaskScriptPreview(gormTaskScriptInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskScriptPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskScriptInfoToHttpTaskScriptPreview(TaskScriptInfo *http_model.TaskScriptInfo) *http_model.TaskScriptPreview {
+	//deliveryTime := conv.MustString(TaskScriptInfo.DeliveryTime)
+	//deliveryTime = deliveryTime[0:19]
+	return &http_model.TaskScriptPreview{
+		TaskID:            conv.MustString(TaskScriptInfo.TaskID),
+		PlatformNickname:  conv.MustString(TaskScriptInfo.PlatformNickname),
+		FansCount:         conv.MustString(TaskScriptInfo.FansCount),
+		RecruitStrategyID: conv.MustString(TaskScriptInfo.RecruitStrategyID),
+		StrategyID:        conv.MustString(TaskScriptInfo.StrategyID),
+		Title:             TaskScriptInfo.Title,
+		Content:           TaskScriptInfo.Content,
+		ReviseOpinion:     TaskScriptInfo.ReviseOpinion,
+		Submit:            conv.MustString(TaskScriptInfo.SubmitAt)[0:19],
+	}
+}
+
+func TaskScriptToTaskInfo(TaskScripts []*http_model.TaskScript) []*http_model.TaskScriptInfo {
+	var TaskScriptInfos []*http_model.TaskScriptInfo
+	for _, TaskScript := range TaskScripts {
+		TaskScript := GetScriptInfoStruct(TaskScript)
+		TaskScriptInfos = append(TaskScriptInfos, TaskScript)
+	}
+	return TaskScriptInfos
+}
+
+func GetScriptInfoStruct(TaskScript *http_model.TaskScript) *http_model.TaskScriptInfo {
+	TalentPlatformInfoSnap := TaskScript.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskScriptInfo{
+		TaskID:           TaskScript.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "PlatformInfo.platform_name")),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count")),
+		StrategyID:       TaskScript.Talent.StrategyID,
+		ScriptId:         TaskScript.Script.ScriptID,
+		Title:            TaskScript.Script.Title,
+		Content:          TaskScript.Script.Content,
+		ReviseOpinion:    TaskScript.Script.ReviseOpinion,
+		CreateAt:         TaskScript.Script.CreateAt,
+		SubmitAt:         TaskScript.Script.SubmitAt,
+		AgreeAt:          TaskScript.Script.AgreeAt,
+		RejectAt:         TaskScript.Script.RejectAt,
+		IsReview:         TaskScript.Script.IsReview,
+	}
+}

+ 19 - 0
pack/task_script_list_conditions.go

@@ -0,0 +1,19 @@
+package pack
+
+import (
+	"fmt"
+	"github.com/issue9/conv"
+	"youngee_b_api/model/common_model"
+	"youngee_b_api/model/http_model"
+)
+
+func HttpTaskScriptListRequestToCondition(req *http_model.TaskScriptListRequest) *common_model.TalentConditions {
+	fmt.Printf("%+v", req)
+	return &common_model.TalentConditions{
+		ProjectId:        conv.MustInt64(req.ProjectId),
+		ScriptStatus:     conv.MustInt64(req.ScriptStatus),
+		StrategyId:       conv.MustInt64(req.StrategyId),
+		TaskId:           conv.MustString(req.TaskId),
+		PlatformNickname: conv.MustString(req.PlatformNickname),
+	}
+}

+ 5 - 2
route/init.go

@@ -56,8 +56,11 @@ func InitRoute(r *gin.Engine) {
 		m.POST("/pay/projectpay", handler.WrapProjectPayHandler)
 		m.POST("/enterprise/balance", handler.WrapEnterpriseBalanceHandler)
 		//m.POST("/project/recruitstrategycalculate", handler.WrapRecruitStrategyNumberCalculate)
-		m.POST("/project/tasklogisticslist", handler.WrapTaskLogisticsListHandler)
-		m.POST("/project/createlogistics", handler.WrapCreateLogisticsHandler)
+		m.POST("/project/tasklogisticslist", handler.WrapTaskLogisticsListHandler) //物流信息查询
+		m.POST("/project/createlogistics", handler.WrapCreateLogisticsHandler)     //创建物流信息
 		m.POST("/project/signforreceipt", handler.WrapSignForReceiptHandler)
+		m.POST("/project/taskscriptlist", handler.WrapTaskScriptListHandler)
+		//m.POST("/project/reviseopinion", handler.WrapReviseOptionHandler) //审核意见提交
+		//m.POST("/project/tasksketchlist", handler.WrapTaskSketchListHandler)
 	}
 }

+ 26 - 0
service/project.go

@@ -303,3 +303,29 @@ func (*project) ChangeTaskStatus(ctx *gin.Context, data http_model.ProjectChange
 	}
 	return nil
 }
+
+func (p *project) GetTaskScriptList(ctx *gin.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) (*http_model.TaskScriptListData, error) {
+	TaskScripts, total, err := db.GetTaskScriptList(ctx, projectID, pageSize, pageNum, conditions)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[project service] call GetTaskScriptList error,err:%+v", err)
+		return nil, err
+	}
+	TaskScriptListData := new(http_model.TaskScriptListData)
+	TaskScriptListData.TaskScriptPreview = pack.MGormTaskScriptInfoListToHttpTaskScriptPreviewList(TaskScripts)
+	TaskScriptListData.Total = conv.MustString(total)
+	return TaskScriptListData, nil
+}
+
+/*
+func (p *project) GetTaskSketchList(ctx *gin.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) (*http_model.TaskScript, error) {
+	TaskSketch, total, err := db.GetTaskSketchList(ctx, projectID, pageSize, pageNum, conditions)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[project service] call GetTaskScriptList error,err:%+v", err)
+		return nil, err
+	}
+	TaskSketchListData := new(http_model.TaskLogisticsListData)
+	TaskSketchListData.TaskLogisticsPreview = pack.MGormTaskLogisticsInfoListToHttpTaskLogisticsPreviewList(TaskLogisticss)
+	TaskSketchListData.Total = conv.MustString(total)
+	return TaskSketchListData, nil
+}
+*/