|
|
@@ -139,11 +139,14 @@ func (s *taskService) Export(req *model.ExportReq) (content *model.ExportContent
|
|
|
}
|
|
|
f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), data)
|
|
|
}
|
|
|
+ if value == "督办事项来源" {
|
|
|
+ f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), item.Source)
|
|
|
+ }
|
|
|
if value == "超期" {
|
|
|
data := ""
|
|
|
- if item.TaskStatus == "10" {
|
|
|
+ if gtime.Now().Format("Y-m-d H:i:s") <= item.TaskEndDate.Format("Y-m-d 23:59:59") {
|
|
|
data = "否"
|
|
|
- } else if item.TaskStatus == "20" {
|
|
|
+ } else {
|
|
|
data = "是"
|
|
|
}
|
|
|
f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), data)
|
|
|
@@ -157,7 +160,7 @@ func (s *taskService) Export(req *model.ExportReq) (content *model.ExportContent
|
|
|
if value == "负责人" {
|
|
|
f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), userMap[item.MainUserId])
|
|
|
}
|
|
|
- if value == "团队成员" {
|
|
|
+ if value == "协办人" {
|
|
|
names := ""
|
|
|
if item.OwnerUserId != "" {
|
|
|
ids := strings.Split(item.OwnerUserId, ",")
|
|
|
@@ -175,11 +178,11 @@ func (s *taskService) Export(req *model.ExportReq) (content *model.ExportContent
|
|
|
if value == "督办人" {
|
|
|
f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), userMap[item.SupervisorUserId])
|
|
|
}
|
|
|
- if value == "开始时间" {
|
|
|
- f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), item.TaskStartDate.Format("Y-m-d H:i:s"))
|
|
|
+ if value == "发布时间" {
|
|
|
+ f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), item.TaskStartDate.Format("Y-m-d"))
|
|
|
}
|
|
|
- if value == "结束时间" {
|
|
|
- f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), item.TaskEndDate.Format("Y-m-d H:i:s"))
|
|
|
+ if value == "要求完成时间" {
|
|
|
+ f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), item.TaskEndDate.Format("Y-m-d"))
|
|
|
}
|
|
|
if value == "创建时间" {
|
|
|
f.SetCellValue("Sheet1", service.Div(index+1)+strconv.Itoa(lineNum+2), item.CreatedTime.Format("Y-m-d H:i:s"))
|
|
|
@@ -216,10 +219,13 @@ func (s *taskService) Create(req *model.AddPlatTaskReq) (err error) {
|
|
|
if err = gconv.Struct(req, platTask); err != nil {
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ // 初始数据
|
|
|
platTask.IsOverdue = "10" // 是否超期(10否20是)
|
|
|
- if platTask.TaskStartDate == nil {
|
|
|
+ if platTask.TaskStartDate == nil || platTask.TaskStartDate.IsZero() {
|
|
|
platTask.TaskStartDate = gtime.Now()
|
|
|
}
|
|
|
+
|
|
|
// 填充创建信息
|
|
|
service.SetCreatedInfo(platTask, s.GetCxtUserId(), s.GetCxtUserName())
|
|
|
// 填充更新信息
|