Browse Source

add:导出word

zoie 1 year ago
parent
commit
bcb3204209
8 changed files with 902 additions and 55 deletions
  1. 10 0
      Nats/NatsServer/NatsERP_user.go
  2. 2 2
      conf/app.conf
  3. 2 2
      conf/config.go
  4. 809 50
      controllers/Project.go
  5. 2 0
      go.mod
  6. 43 0
      go.sum
  7. 32 1
      models/Project/Project.go
  8. 2 0
      routers/router.go

+ 10 - 0
Nats/NatsServer/NatsERP_user.go

@@ -32,6 +32,16 @@ func Read_User_List_All() (user []userlibs.User, err error) {
 	return user, nil
 
 }
+func Read_User_List_T_uuid(T_name string, T_uuid_list []string, page, page_z int) (user []userlibs.User, cnt int64, err error) {
+	nats := natslibs.NewNats(Nats.Nats)
+	user, cnt, err = nats.Read_User_List_T_uuid(T_name, T_uuid_list, page, page_z)
+	if err != nil {
+		logs.Error(lib.FuncName(), err)
+		return user, cnt, err
+	}
+	return user, cnt, nil
+
+}
 
 func Read_Power_List_All() (power []powerlibs.Power_R, err error) {
 	nats := natslibs.NewNats(Nats.Nats)

+ 2 - 2
conf/app.conf

@@ -33,5 +33,5 @@ Qiniu_SecretKey = KFhkYxTAJ2ZPN3ZS3euTsfWk8-C92rKgkhAMkDRN
 Qiniu_BUCKET = baozhida-erp
 Qiniu_Url = https://erposs.baozhida.cn/
 
-MyProjectUrl = ""
-ProjectApprovalUrl = ""
+MyProjectNewsUrl = "/myProject"
+ProjectApprovalNewsUrl = "/project"

+ 2 - 2
conf/config.go

@@ -24,5 +24,5 @@ var Redis_dbNum, _ = beego.AppConfig.String("Redis_dbNum")
 var FilterExcludeURL, _ = beego.AppConfig.String("FilterExcludeURL")
 var FilterOnlyLoginCheckURL, _ = beego.AppConfig.String("FilterOnlyLoginCheckURL")
 
-var MyProjectUrl, _ = beego.AppConfig.String("MyProjectUrl")
-var ProjectApprovalUrl, _ = beego.AppConfig.String("ProjectApprovalUrl")
+var MyProjectNewsUrl, _ = beego.AppConfig.String("MyProjectNewsUrl")
+var ProjectApprovalNewsUrl, _ = beego.AppConfig.String("ProjectApprovalNewsUrl")

+ 809 - 50
controllers/Project.go

@@ -1,16 +1,25 @@
 package controllers
 
 import (
+	"ERP_project/Nats"
 	"ERP_project/Nats/NatsServer"
 	"ERP_project/conf"
+	"ERP_project/logs"
 	"ERP_project/models/Account"
 	"ERP_project/models/Project"
+	"baliance.com/gooxml/color"
+	"baliance.com/gooxml/document"
+	"baliance.com/gooxml/measurement"
+	"baliance.com/gooxml/schema/soo/wml"
 	"fmt"
+	natslibs "git.baozhida.cn/ERP_libs/Nats"
 	userlibs "git.baozhida.cn/ERP_libs/User"
 	"git.baozhida.cn/ERP_libs/lib"
 	"github.com/beego/beego/v2/adapter/orm"
 	beego "github.com/beego/beego/v2/server/web"
 	"math"
+	"os"
+	"strings"
 )
 
 type ProjectController struct {
@@ -66,11 +75,13 @@ func (c *ProjectController) Project_List() {
 		page_z = conf.Page_size
 	}
 
+	T_uuid := c.GetString("T_uuid")
+
 	userList, _ := NatsServer.Read_User_List_All()
 	Account.Read_User_All_Map(userList)
 
 	ProjectDao := Project.NewProject(orm.NewOrm())
-	R_List, R_cnt := ProjectDao.Read_Project_List("", c.User.T_uuid, page, page_z)
+	R_List, R_cnt := ProjectDao.Read_Project_List(T_uuid, c.User.T_uuid, page, page_z)
 
 	var r_jsons lib.R_JSONS
 	r_jsons.Num = R_cnt
@@ -138,6 +149,729 @@ func (c *ProjectController) Project_Get() {
 	return
 }
 
+// 导出单个项目
+func (c *ProjectController) Project_Word() {
+	os.Remove("/Users/zoie/work/bzd_project/ERP/ERP_project/ofile/simple.docx")
+
+	// 查询
+	T_id, _ := c.GetInt("T_id")
+
+	o := orm.NewOrm()
+	ProjectDao := Project.NewProject(o)
+	project, err := ProjectDao.Read_Project_ById(T_id)
+	if err != nil {
+		c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
+		c.ServeJSON()
+		return
+	}
+	userList, _ := NatsServer.Read_User_List_All()
+	Account.Read_User_All_Map(userList)
+	detail := Project.ProjectToProject_Detail(project)
+
+	doc := document.New()
+
+	para := doc.AddParagraph()
+	run := para.AddRun()
+	run.Properties().SetSize(18)
+	run.AddText("")
+
+	para = doc.AddParagraph()
+	run = para.AddRun()
+	run.Properties().SetSize(18)
+	run.AddText("")
+
+	// Construct our header
+	para = doc.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetBold(true)
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(18)
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	run.AddText("贵州宝智达网络科技有限公司")
+
+	para = doc.AddParagraph()
+	run = para.AddRun()
+	run.Properties().SetBold(true)
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(18)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run.AddText("研发立项申请书")
+
+	for i := 0; i < 5; i++ {
+		para = doc.AddParagraph()
+		run = para.AddRun()
+		run.Properties().SetSize(18)
+		run.AddText("")
+	}
+	// --------------------项目名称
+	para = doc.AddParagraph()
+	para.Properties().SetFirstLineIndent(1 * measurement.Inch)
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	run.AddText("项目名称:")
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	run.AddText(detail.T_name)
+	run.Properties().SetUnderline(wml.ST_UnderlineSingle, color.Black)
+
+	para = doc.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	para.Properties().SetFirstLineIndent(1 * measurement.Inch)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	run.AddText("项目负责人:")
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	run.AddText(detail.T_user_name)
+	run.Properties().SetUnderline(wml.ST_UnderlineSingle, color.Black)
+
+	para = doc.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	para.Properties().SetFirstLineIndent(1 * measurement.Inch)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	run.AddText("项目立项日期:")
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	date := strings.Split(detail.T_set_up_date, "-")
+	if len(date) == 3 {
+		run.AddText(fmt.Sprintf("%s年%s月%s日", date[0], date[1], date[2]))
+		run.Properties().SetUnderline(wml.ST_UnderlineSingle, color.Black)
+	}
+
+	para = doc.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	para.Properties().SetFirstLineIndent(1 * measurement.Inch)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	run.AddText("项目结束日期:")
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(14)
+	date = strings.Split(detail.T_end_date, "-")
+	if len(date) == 3 {
+		run.AddText(fmt.Sprintf("%s年%s月%s日", date[0], date[1], date[2]))
+		run.Properties().SetUnderline(wml.ST_UnderlineSingle, color.Black)
+	}
+
+	// 分页
+	para = doc.AddParagraph()
+	para.Properties().AddSection(wml.ST_SectionMarkNextPage)
+
+	table := doc.AddTable()
+
+	table.Properties().SetLayout(wml.ST_TblLayoutTypeFixed)
+	table.Properties().SetWidthPercent(100)
+	look := table.Properties().TableLook()
+	look.SetFirstColumn(true)
+	look.SetFirstRow(true)
+	look.SetHorizontalBanding(true)
+
+	// width of the page
+	// with thick borers
+	borders := table.Properties().Borders()
+	borders.SetBottom(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetLeft(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetRight(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetTop(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetInsideHorizontal(wml.ST_BorderSingle, color.Auto, measurement.Zero)
+	borders.SetInsideVertical(wml.ST_BorderSingle, color.Auto, measurement.Zero)
+
+	row := table.AddRow()
+	row.Properties().SetHeight(0.4*measurement.Inch, wml.ST_HeightRuleExact)
+
+	cell := row.AddCell()
+	cell.Properties().SetWidth(0.4 * measurement.Inch)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("序号")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidth(1.25 * measurement.Inch)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("功能与指标")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidth(1.25 * measurement.Inch)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("计划时间(工作日)")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidth(1.25 * measurement.Inch)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("是否完成(原因)")
+
+	for i, r := range detail.T_Detail {
+		row = table.AddRow()
+		row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+
+		cell = row.AddCell()
+		cell.Properties().SetWidth(0.4 * measurement.Inch)
+		para = cell.AddParagraph()
+		cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+		para.Properties().SetAlignment(wml.ST_JcCenter)
+		run = para.AddRun()
+		run.Properties().SetFontFamily("宋体")
+		run.Properties().SetSize(11)
+		run.AddText(fmt.Sprintf("%d", i+1))
+
+		cell = row.AddCell()
+		cell.Properties().SetWidth(1.25 * measurement.Inch)
+
+		para = cell.AddParagraph()
+		cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+		para.Properties().SetAlignment(wml.ST_JcLeft)
+		run = para.AddRun()
+		run.Properties().SetFontFamily("宋体")
+		run.Properties().SetSize(11)
+		run.AddText(r.T_function)
+
+		cell = row.AddCell()
+		cell.Properties().SetWidth(1.25 * measurement.Inch)
+		para = cell.AddParagraph()
+		cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+		para.Properties().SetAlignment(wml.ST_JcCenter)
+		run = para.AddRun()
+		run.Properties().SetFontFamily("宋体")
+		run.Properties().SetSize(11)
+		run.AddText(fmt.Sprintf("%g", r.T_planned_time))
+
+		cell = row.AddCell()
+		cell.Properties().SetWidth(1.25 * measurement.Inch)
+		para = cell.AddParagraph()
+		cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+		para.Properties().SetAlignment(wml.ST_JcLeft)
+		run = para.AddRun()
+		run.Properties().SetFontFamily("宋体")
+		run.Properties().SetSize(11)
+		run.AddText(r.T_finish)
+	}
+
+	// 分页
+	para = doc.AddParagraph()
+	para.Properties().AddSection(wml.ST_SectionMarkNextPage)
+
+	table = doc.AddTable()
+	table.Properties().SetWidthPercent(110)
+	table.Properties().SetAlignment(wml.ST_JcTableCenter)
+	table.Properties().SetLayout(wml.ST_TblLayoutTypeAutofit)
+	look = table.Properties().TableLook()
+	look.SetFirstColumn(true)
+	look.SetFirstRow(true)
+	look.SetHorizontalBanding(true)
+
+	borders = table.Properties().Borders()
+	borders.SetBottom(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetLeft(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetRight(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetTop(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetInsideHorizontal(wml.ST_BorderSingle, color.Auto, measurement.Zero)
+	borders.SetInsideVertical(wml.ST_BorderSingle, color.Auto, measurement.Zero)
+
+	//-----------------项目名称
+	row = table.AddRow()
+	row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("项目名称")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(75)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(detail.T_name)
+
+	//------------------项目简介
+	row = table.AddRow()
+	row.Properties().SetHeight(5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("项目简介")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(75)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(detail.T_description)
+
+	// -----------------绩效统计
+	row = table.AddRow()
+	row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+
+	cell = row.AddCell()
+	cell.Properties().SetVerticalMerge(wml.ST_MergeRestart)
+	cell.Properties().SetWidthPercent(25)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	//row.Properties().SetHeight(0.3*measurement.Inch, wml.ST_HeightRuleExact)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("绩效统计")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(40)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("计划完成周期(工作日)")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(35)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(fmt.Sprintf("%g", detail.T_planning_cycle))
+
+	row = table.AddRow()
+	row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+
+	cell = row.AddCell()
+	cell.Properties().SetVerticalMerge(wml.ST_MergeContinue)
+	cell.AddParagraph().AddRun().AddText("")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(40)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("实际完成周期(工作日)")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(35)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(fmt.Sprintf("%g", detail.T_reality_cycle))
+
+	row = table.AddRow()
+	row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+
+	cell = row.AddCell()
+	cell.Properties().SetVerticalMerge(wml.ST_MergeContinue)
+	cell.AddParagraph().AddRun().AddText("")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(40)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("提前完成天数(工作日)")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(35)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(fmt.Sprintf("%g", detail.T_advance_day))
+
+	row = table.AddRow()
+	row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+
+	cell = row.AddCell()
+	cell.Properties().SetVerticalMerge(wml.ST_MergeContinue)
+	cell.AddParagraph().AddRun().AddText("")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(23)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("奖励金额(元)")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(15)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(fmt.Sprintf("%g", detail.T_bonus))
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(22)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("绩效总金额(元)")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(15)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(fmt.Sprintf("%g", detail.T_Perf))
+
+	// -----------------绩效统计
+	row = table.AddRow()
+	row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+
+	cell = row.AddCell()
+	cell.Properties().SetVerticalMerge(wml.ST_MergeRestart)
+	cell.Properties().SetWidthPercent(25)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	//row.Properties().SetHeight(0.3*measurement.Inch, wml.ST_HeightRuleExact)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("项目验收")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("验收时间")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(fmt.Sprintf("测试人"))
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText(fmt.Sprintf("验收人"))
+
+	row = table.AddRow()
+	row.Properties().SetHeight(0.5*measurement.Inch, wml.ST_HeightRuleAtLeast)
+
+	cell = row.AddCell()
+	cell.Properties().SetVerticalMerge(wml.ST_MergeContinue)
+	cell.AddParagraph().AddRun().AddText("")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	cell.AddParagraph().AddRun().AddText("")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	cell.AddParagraph().AddRun().AddText("")
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(25)
+	cell.AddParagraph().AddRun().AddText("")
+
+	// 分页
+	para = doc.AddParagraph()
+	para.Properties().AddSection(wml.ST_SectionMarkNextPage)
+
+	table = doc.AddTable()
+	table.Properties().SetWidthPercent(110)
+	table.Properties().SetAlignment(wml.ST_JcTableCenter)
+	table.Properties().SetLayout(wml.ST_TblLayoutTypeAutofit)
+	look = table.Properties().TableLook()
+	look.SetFirstColumn(true)
+	look.SetFirstRow(true)
+	look.SetHorizontalBanding(true)
+
+	borders = table.Properties().Borders()
+	borders.SetBottom(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetLeft(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetRight(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetTop(wml.ST_BorderSingle, color.Auto, 1.5*measurement.Point)
+	borders.SetInsideHorizontal(wml.ST_BorderSingle, color.Auto, measurement.Zero)
+	borders.SetInsideVertical(wml.ST_BorderSingle, color.Auto, measurement.Zero)
+
+	row = table.AddRow()
+	row.Properties().SetHeight(1.8*measurement.Inch, wml.ST_HeightRuleExact)
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(30)
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("部门负责人")
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("审核意见")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(70)
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("推荐项目经理为:")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("其他意见或建议:")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("部门负责人(签字/日期):")
+
+	row = table.AddRow()
+	row.Properties().SetHeight(2.5*measurement.Inch, wml.ST_HeightRuleExact)
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(30)
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("技术总监")
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("审核意见")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(70)
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("是否同意立项:□同意  □不同意")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("是否同意推荐的项目经理:□同意  □不同意")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("其他意见或建议:")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("技术总监(签字/日期):")
+
+	row = table.AddRow()
+	row.Properties().SetHeight(2.5*measurement.Inch, wml.ST_HeightRuleExact)
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(30)
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("总经理")
+	para = cell.AddParagraph()
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("审核意见")
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(70)
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("是否同意立项:□同意  □不同意")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("是否同意推荐的项目经理:□同意  □不同意")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("其他意见或建议:")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(18*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	para = cell.AddParagraph()
+	para.Properties().SetAlignment(wml.ST_JcLeft)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("总经理(签字/日期):")
+
+	row = table.AddRow()
+	row.Properties().SetHeight(2*measurement.Inch, wml.ST_HeightRuleExact)
+
+	cell = row.AddCell()
+	cell.Properties().SetWidthPercent(100)
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("最终审批意见为")
+	run = para.AddRun()
+	run.AddText("           ")
+	run.Properties().SetUnderline(wml.ST_UnderlineSingle, color.Black)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("(同意/不同意)立项,研发项目正式启动。")
+	para = cell.AddParagraph()
+	para.Properties().Spacing().SetLineSpacing(20*measurement.Point, wml.ST_LineSpacingRuleAuto)
+	cell.Properties().SetVerticalAlignment(wml.ST_VerticalJcCenter)
+	para.Properties().SetAlignment(wml.ST_JcCenter)
+	run = para.AddRun()
+	run.Properties().SetFontFamily("宋体")
+	run.Properties().SetSize(11)
+	run.AddText("日期:")
+
+	filename := fmt.Sprintf("研发立项书-%s-%s(%s)", detail.T_name, detail.T_user_name, lib.GetRandstring(6, "0123456789", 0))
+	// 保存文件
+	if err = doc.SaveToFile("ofile/" + filename + ".docx"); err != nil {
+		fmt.Println(err)
+	}
+
+	// 上传 OSS
+	nats := natslibs.NewNats(Nats.Nats)
+	url, is := nats.Qiniu_UploadFile(lib.GetCurrentDirectory()+"/ofile/"+filename+".docx", "ofile/"+filename+".docx")
+	if !is {
+		c.Data["json"] = lib.JSONS{Code: 202, Msg: "oss!"}
+		c.ServeJSON()
+		return
+	}
+	//删除目录
+	err = os.Remove("ofile/" + filename + ".docx")
+	if err != nil {
+		logs.Error(lib.FuncName(), err)
+	}
+
+	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: url}
+	c.ServeJSON()
+	return
+}
+
+func createParaRun(doc *document.Document, s string) document.Run {
+	para := doc.AddParagraph()
+	run := para.AddRun()
+	run.AddText(s)
+	return run
+}
+
 func (c *ProjectController) Project_Add() {
 
 	T_name := c.GetString("T_name")
@@ -214,7 +948,7 @@ func (c *ProjectController) Project_Add() {
 	//}
 
 	//o.Commit()
-	NatsServer.AddNews(T_approver, fmt.Sprintf("您有一条%s的立项申请待审批", c.User.T_name), conf.ProjectApprovalUrl)
+	NatsServer.AddNews(T_approver, fmt.Sprintf("【立项申请】您有一条%s的立项申请待审批", c.User.T_name), conf.ProjectApprovalNewsUrl)
 
 	NatsServer.AddUserLogs(c.User.T_uuid, "项目", "添加", var_)
 
@@ -226,7 +960,7 @@ func (c *ProjectController) Project_Add() {
 func (c *ProjectController) Project_Approval() {
 
 	T_id, _ := c.GetInt("T_id")
-	T_state, _ := c.GetInt("T_state")
+	T_State, _ := c.GetInt("T_State")
 
 	o := orm.NewOrm()
 	ProjectDao := Project.NewProject(o)
@@ -237,22 +971,27 @@ func (c *ProjectController) Project_Approval() {
 		c.ServeJSON()
 		return
 	}
+	if project.T_State == T_State {
+		c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
+		c.ServeJSON()
+		return
+	}
 	// 1 待审核  2 进行中  3 已完成 4 已发绩效
-	project.T_State = T_state
+	project.T_State = T_State
 	_, err = ProjectDao.Update_Project(project, "T_State")
 	if err != nil {
 		c.Data["json"] = lib.JSONS{Code: 203, Msg: "添加失败"}
 		c.ServeJSON()
 		return
 	}
-	if T_state == Project.HaveInHand {
-		NatsServer.AddNews(project.T_uid, fmt.Sprintf("您提交的项目(%s)【进行中】", project.T_name), conf.MyProjectUrl)
+	if T_State == Project.HaveInHand {
+		NatsServer.AddNews(project.T_uid, fmt.Sprintf("【项目审核】您提交的项目(%s)正在进行中", project.T_name), conf.MyProjectNewsUrl)
 	}
-	if T_state == Project.Completed {
-		NatsServer.AddNews(project.T_uid, fmt.Sprintf("您提交的项目(%s)已完成", project.T_name), conf.MyProjectUrl)
+	if T_State == Project.Completed {
+		NatsServer.AddNews(project.T_uid, fmt.Sprintf("【项目审核】您提交的项目(%s)已完成", project.T_name), conf.MyProjectNewsUrl)
 	}
-	if T_state == Project.PayPerf {
-		NatsServer.AddNews(project.T_uid, fmt.Sprintf("您提交的项目(%s)已发绩效", project.T_name), conf.MyProjectUrl)
+	if T_State == Project.PayPerf {
+		NatsServer.AddNews(project.T_uid, fmt.Sprintf("【项目审核】您提交的项目(%s)已发绩效", project.T_name), conf.MyProjectNewsUrl)
 	}
 	NatsServer.AddUserLogs(c.User.T_uuid, "项目", "审核", project)
 
@@ -268,10 +1007,12 @@ func (c *ProjectController) Project_Edit() {
 	T_description := c.GetString("T_description")
 	T_planning_cycle, _ := c.GetFloat("T_planning_cycle")
 	T_reality_cycle, _ := c.GetFloat("T_reality_cycle")
+	T_advance_day, _ := c.GetFloat("T_advance_day")
 	T_bonus, _ := c.GetFloat("T_bonus")
 	T_Perf, _ := c.GetFloat("T_Perf")
 	T_remark := c.GetString("T_remark")
 	T_detail := c.GetString("T_detail")
+	T_approver := c.GetString("T_approver")
 
 	o := orm.NewOrm()
 	//o.Begin()
@@ -316,6 +1057,10 @@ func (c *ProjectController) Project_Edit() {
 		project.T_reality_cycle = float32(T_reality_cycle)
 		clos = append(clos, "T_reality_cycle")
 	}
+	if T_advance_day > 0 {
+		project.T_advance_day = float32(T_advance_day)
+		clos = append(clos, "T_advance_day")
+	}
 	if T_bonus > 0 {
 		project.T_bonus = float32(T_bonus)
 		clos = append(clos, "T_bonus")
@@ -334,11 +1079,17 @@ func (c *ProjectController) Project_Edit() {
 		project.T_detail = T_detail
 		clos = append(clos, "T_detail")
 	}
+	if len(T_approver) > 0 {
+		project.T_approver = T_approver
+		clos = append(clos, "T_approver")
+	}
 
-	// 1 待审核  2 进行中  3 已完成 4 已发绩效 项目状态为未通过,修改之后将状态更改待提交
-	if project.T_State == 2 && c.User.T_uuid == project.T_uid {
-		project.T_State = 1
-		NatsServer.AddNews(project.T_approver, fmt.Sprintf("您有一条【%s】的立项申请待审批", c.User.T_name), conf.ProjectApprovalUrl)
+	// 1 待审核  2 进行中  3 已完成 4 已发绩效
+	// 用户自己修改 项目状态为未通过,修改之后将状态更改待提交
+	// 部门负责人修改 项目状态不变,修改之后将状态更改待提交
+	if project.T_State == 3 && c.User.T_uuid == project.T_uid {
+		project.T_State = 2
+		NatsServer.AddNews(project.T_uid, fmt.Sprintf("【项目审核】您提交的项目(%s)正在进行中", project.T_name), conf.ProjectApprovalNewsUrl)
 	}
 
 	_, err = ProjectDao.Update_Project(project, clos...)
@@ -349,42 +1100,6 @@ func (c *ProjectController) Project_Edit() {
 		return
 	}
 
-	//if len(T_detail) > 0 {
-	//	err = ProjectDetailDao.Delete_ProjectDetail_ByT_project_id(project.Id)
-	//	if err != nil {
-	//		o.Rollback()
-	//		c.Data["json"] = lib.JSONS{Code: 203, Msg: "修改失败"}
-	//		c.ServeJSON()
-	//		return
-	//	}
-	//}
-	//
-	//detailList := lib.SplitString(T_detail, "|")
-	//for _, v := range detailList {
-	//	T_function := strings.Split(v, ",")[0]
-	//	T_planned_time := strings.Split(v, ",")[1]
-	//	T_finish := strings.Split(v, ",")[2]
-	//	temp, _ := strconv.ParseFloat(T_planned_time, 64)
-	//	T_planned_time64, _ := decimal.NewFromFloat(temp).Round(2).Float64()
-	//
-	//	detail := Project.ProjectDetail{
-	//		T_project_id:   project.Id,
-	//		T_function:     T_function,
-	//		T_planned_time: float32(T_planned_time64),
-	//		T_finish:       T_finish,
-	//	}
-	//	_, err = ProjectDetailDao.Add_ProjectDetail(detail)
-	//	if err != nil {
-	//		o.Rollback()
-	//		c.Data["json"] = lib.JSONS{Code: 203, Msg: "添加失败"}
-	//		c.ServeJSON()
-	//		return
-	//	}
-	//
-	//}
-	//
-	//o.Commit()
-
 	NatsServer.AddUserLogs(c.User.T_uuid, "项目", "修改", project)
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: project.Id}
@@ -439,3 +1154,47 @@ func (c *ProjectController) Project_Del() {
 	c.ServeJSON()
 	return
 }
+func (c *ProjectController) User_List() {
+	var r_jsons lib.R_JSONS
+	T_Finance, _ := c.GetInt("T_Finance")
+	// 分页参数 初始化
+	page, _ := c.GetInt("page")
+	if page < 1 {
+		page = 1
+	}
+	page_z, _ := c.GetInt("page_z")
+	if page_z < 1 {
+		page_z = conf.Page_size
+	}
+
+	T_name := c.GetString("T_name")
+
+	ProjectDao := Project.NewProject(orm.NewOrm())
+	t_uuid := c.User.T_uuid
+	if T_Finance == 1 {
+		t_uuid = ""
+	}
+
+	uuidList := ProjectDao.Read_T_uuid_List(t_uuid)
+	if len(uuidList) == 0 {
+		c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
+		c.ServeJSON()
+		return
+	}
+
+	R_List, R_cnt, err := NatsServer.Read_User_List_T_uuid(T_name, uuidList, page, page_z)
+	if err != nil {
+		c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败"}
+		c.ServeJSON()
+		return
+	}
+
+	r_jsons.Num = R_cnt
+	r_jsons.Data = R_List
+	r_jsons.Page = page
+	r_jsons.Page_size = int(math.Ceil(float64(R_cnt) / float64(page_z)))
+
+	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
+	c.ServeJSON()
+	return
+}

+ 2 - 0
go.mod

@@ -17,6 +17,7 @@ require (
 )
 
 require (
+	baliance.com/gooxml v1.0.1 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cespare/xxhash/v2 v2.1.2 // indirect
 	github.com/golang/protobuf v1.5.2 // indirect
@@ -31,6 +32,7 @@ require (
 	github.com/nats-io/jwt/v2 v2.3.0 // indirect
 	github.com/nats-io/nkeys v0.3.0 // indirect
 	github.com/nats-io/nuid v1.0.1 // indirect
+	github.com/nguyenthenguyen/docx v0.0.0-20220721043308-1903da0ef37d // indirect
 	github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/prometheus/client_golang v1.14.0 // indirect

+ 43 - 0
go.sum

@@ -1,3 +1,5 @@
+baliance.com/gooxml v1.0.1 h1:fG5lmxmjEVFfbKQ2NuyCuU3hMuuOb5avh5a38SZNO1o=
+baliance.com/gooxml v1.0.1/go.mod h1:+gpUgmkAF4zCtwOFPNRLDAvpVRWoKs5EeQTSv/HYFnw=
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
@@ -33,7 +35,17 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/ErmaiSoft/GoOpenXml v0.0.0-20210204025835-ab4edcaefc12 h1:Cfq3XwslipWMsd4SqoFzA4tsmQZ76s+GyOAU8XhJjL8=
+github.com/ErmaiSoft/GoOpenXml v0.0.0-20210204025835-ab4edcaefc12/go.mod h1:sgRi6JfCV/TloI2BQsoQXCfBHl4XRQo13JSqsZxaHY4=
 github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
+github.com/adrg/strutil v0.1.0/go.mod h1:pXRr2+IyX5AEPAF5icj/EeTaiflPSD2hvGjnguilZgE=
+github.com/adrg/strutil v0.2.2/go.mod h1:EF2fjOFlGTepljfI+FzgTG13oXthR7ZAil9/aginnNQ=
+github.com/adrg/strutil v0.3.0/go.mod h1:Jz0wzBVE6Uiy9wxo62YEqEY1Nwto3QlLl1Il5gkLKWU=
+github.com/adrg/sysfont v0.1.1/go.mod h1:19nTHzfIn/HbngFMet+yNAvwSQYtOJYMI7vWexLWyNw=
+github.com/adrg/sysfont v0.1.2/go.mod h1:6d3l7/BSjX9VaeXWJt9fcrftFaD/t7l11xgSywCPZGk=
+github.com/adrg/xdg v0.2.1/go.mod h1:ZuOshBmzV4Ta+s23hdfFZnBsdzmoR3US0d7ErpqSbTQ=
+github.com/adrg/xdg v0.3.0/go.mod h1:7I2hH/IT30IsupOpKZ5ue7/qNi3CoKzD6tL3HwpaRMQ=
+github.com/adrg/xdg v0.3.4/go.mod h1:61xAR2VZcggl2St4O9ohF5qCKe08+JDmE4VNzPFQvOQ=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
@@ -51,6 +63,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
 github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
 github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -134,6 +147,7 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw
 github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
 github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
 github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
 github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -161,6 +175,7 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
 github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
 github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/gorilla/i18n v0.0.0-20150820051429-8b358169da46/go.mod h1:2Yoiy15Cf7Q3NFwfaJquh7Mk1uGI09ytcD7CUhn8j7s=
 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
@@ -180,6 +195,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
 github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw=
 github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4=
 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -209,6 +225,7 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb
 github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
+github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
 github.com/mssola/user_agent v0.6.0 h1:uwPR4rtWlCHRFyyP9u2KOV0u8iQXmS7Z7feTrstQwk4=
 github.com/mssola/user_agent v0.6.0/go.mod h1:TTPno8LPY3wAIEKRpAtkdMT0f8SE24pLRGPahjCH4uw=
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -222,6 +239,8 @@ github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8=
 github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
 github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
 github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
+github.com/nguyenthenguyen/docx v0.0.0-20220721043308-1903da0ef37d h1:VcuXKGe6o4MSs/ymxb0p6YDsMkFvUSeCND8lN5eaTFY=
+github.com/nguyenthenguyen/docx v0.0.0-20220721043308-1903da0ef37d/go.mod h1:BZyH8oba3hE/BTt2FfBDGPOHhXiKs9RFmUvvXRdzrhM=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
@@ -294,7 +313,9 @@ github.com/signintech/gopdf v0.16.1 h1:p+JjxLsz4ploSmFAruCbYM3c7Hp+jEL3DWZm5SO8b
 github.com/signintech/gopdf v0.16.1/go.mod h1:wrLtZoWaRNrS4hphED0oflFoa6IWkOu6M3nJjm4VbO4=
 github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=
 github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
 github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -303,12 +324,25 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
 github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
+github.com/trimmer-io/go-xmp v1.0.0/go.mod h1:Aaptr9sp1lLv7UnCAdQ+gSHZyY2miYaKmcNVj7HRBwA=
 github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
+github.com/unidoc/freetype v0.0.0-20220130190903-3efbeefd0c90/go.mod h1:mJ/Q7JnqEoWtajJVrV6S1InbRv0K/fJerPB5SQs32KI=
+github.com/unidoc/garabic v0.0.0-20220702200334-8c7cb25baa11/go.mod h1:SX63w9Ww4+Z7E96B01OuG59SleQUb+m+dmapZ8o1Jac=
+github.com/unidoc/pkcs7 v0.0.0-20200411230602-d883fd70d1df/go.mod h1:UEzOZUEpJfDpywVJMUT8QiugqEZC29pDq7kdIZhWCr8=
+github.com/unidoc/pkcs7 v0.1.0/go.mod h1:UEzOZUEpJfDpywVJMUT8QiugqEZC29pDq7kdIZhWCr8=
+github.com/unidoc/timestamp v0.0.0-20200412005513-91597fd3793a/go.mod h1:j+qMWZVpZFTvDey3zxUkSgPJZEX33tDgU/QIA0IzCUw=
+github.com/unidoc/unichart v0.1.0/go.mod h1:9sJXeqxIIsU2D07tmhpDMoND0mBFRGfKBJnXZMsJnzk=
+github.com/unidoc/unioffice v1.23.0 h1:7vXDvQRy3ciBTWFMkAF0vWuy+WORtZ1LwStRzaX+f1Y=
+github.com/unidoc/unioffice v1.23.0/go.mod h1:FoBsxjI/Lqy+2xrQiJMN6/bGdEWlPcYywiZ3aX5Vob0=
+github.com/unidoc/unipdf/v3 v3.37.0/go.mod h1:obDrJyvay9tDiCMKUhzqffm0ZEwtQGWJTcY2QLx1U8w=
+github.com/unidoc/unitype v0.2.1/go.mod h1:mafyug7zYmDOusqa7G0dJV45qp4b6TDAN+pHN7ZUIBU=
+github.com/unidoc/unitype v0.4.0/go.mod h1:HV5zuUeqMKA4QgYQq3KDlJY/P96XF90BQB+6czK6LVA=
 github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=
 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
 github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
@@ -336,6 +370,7 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
 golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
@@ -353,6 +388,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH
 golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
 golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
 golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
+golang.org/x/image v0.0.0-20220722155232-062f8c9fd539/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
 golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 h1:Lj6HJGCSn5AjxRAH2+r35Mir4icalbqku+CLUtjnvXY=
 golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -455,6 +492,7 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -472,7 +510,10 @@ golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
 golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -485,6 +526,7 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
 golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
 golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -536,6 +578,7 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
 google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
 google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
 google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=

+ 32 - 1
models/Project/Project.go

@@ -6,6 +6,7 @@ import (
 	"fmt"
 	"git.baozhida.cn/ERP_libs/lib"
 	orm2 "github.com/beego/beego/v2/client/orm"
+	"strconv"
 	"strings"
 	"time"
 
@@ -32,6 +33,7 @@ type Project struct {
 	T_description    string  `orm:"type(text);null"`        // 项目简介
 	T_planning_cycle float32 `orm:"digits(12);decimals(2)"` // 计划完成周期
 	T_reality_cycle  float32 `orm:"digits(12);decimals(2)"` // 实际完成周期
+	T_advance_day    float32 `orm:"digits(12);decimals(2)"` // 提前完成天数
 	T_bonus          float32 `orm:"digits(12);decimals(2)"` // 奖励金额
 	T_Perf           float32 `orm:"digits(12);decimals(2)"` // 绩效总金额
 	T_detail         string  `orm:"type(text);null"`        // 明细
@@ -71,6 +73,7 @@ type Project_R struct {
 	T_description    string  // 项目简介
 	T_planning_cycle float32 // 计划完成周期
 	T_reality_cycle  float32 // 实际完成周期
+	T_advance_day    float32 // 提前完成天数
 	T_bonus          float32 // 奖励金额
 	T_Perf           float32 // 绩效总金额
 	T_remark         string  // 备注
@@ -82,7 +85,7 @@ type Project_R struct {
 type ProjectDetail_R struct {
 	T_function     string  // 功能与指标
 	T_planned_time float32 // 计划时间(工作日)
-	T_finish       string  // 是否完成 0 未完成 1 已完成
+	T_finish       string  // 是否完成
 }
 type Project_Detail struct {
 	Id               int
@@ -95,6 +98,7 @@ type Project_Detail struct {
 	T_description    string  // 项目简介
 	T_planning_cycle float32 // 计划完成周期
 	T_reality_cycle  float32 // 实际完成周期
+	T_advance_day    float32 // 提前完成天数
 	T_bonus          float32 // 奖励金额
 	T_Perf           float32 // 绩效总金额
 	T_remark         string  // 备注
@@ -129,6 +133,7 @@ func ProjectToProject_R(t Project) (r Project_R) {
 	r.T_description = t.T_description
 	r.T_planning_cycle = t.T_planning_cycle
 	r.T_reality_cycle = t.T_reality_cycle
+	r.T_advance_day = t.T_advance_day
 	r.T_bonus = t.T_bonus
 	r.T_Perf = t.T_Perf
 	r.T_remark = t.T_remark
@@ -150,6 +155,7 @@ func ProjectToProject_Detail(t Project) (r Project_Detail) {
 	r.T_description = t.T_description
 	r.T_planning_cycle = t.T_planning_cycle
 	r.T_reality_cycle = t.T_reality_cycle
+	r.T_advance_day = t.T_advance_day
 	r.T_bonus = t.T_bonus
 	r.T_Perf = t.T_Perf
 	r.T_remark = t.T_remark
@@ -259,6 +265,7 @@ func (dao *ProjectDaoImpl) Read_Project_List(T_uid, T_approver string, page, pag
 	}
 
 	cond := orm.NewCondition()
+	cond = cond.And("T_State__gt", Delete)
 	if len(T_uid) > 0 {
 		cond = cond.And("T_uid", T_uid)
 	}
@@ -333,3 +340,27 @@ func (dao *ProjectDaoImpl) Read_Project_Finance_List(T_uuid string, page, page_z
 	return r, cnt
 
 }
+
+func (dao *ProjectDaoImpl) Read_T_uuid_List(T_approver string) (lists []string) {
+
+	o := orm.NewOrm()
+	var pl_lists orm2.ParamsList
+	sql := "SELECT DISTINCT t_uid FROM project"
+	if len(T_approver) > 0 {
+		sql += " WHERE t_approver = '" + T_approver + "'"
+	} else {
+		sql += " WHERE t__state in ('" + strconv.Itoa(Completed) + "','" + strconv.Itoa(PayPerf) + "')"
+
+	}
+	sql += " LIMIT 0,1000"
+	_, err := o.Raw(sql).ValuesFlat(&pl_lists)
+	if err != nil {
+		logs.Error(lib.FuncName(), err)
+		return
+	}
+	for _, v := range pl_lists {
+		lists = append(lists, v.(string))
+	}
+	return lists
+
+}

+ 2 - 0
routers/router.go

@@ -20,7 +20,9 @@ func init() {
 		beego.NSRouter("/Edit", &controllers.ProjectController{}, "*:Project_Edit"),                 // 修改项目
 		beego.NSRouter("/Approval", &controllers.ProjectController{}, "*:Project_Approval"),         // 项目审批
 		beego.NSRouter("/Del", &controllers.ProjectController{}, "*:Project_Del"),                   // 删除项目
+		beego.NSRouter("/Word", &controllers.ProjectController{}, "*:Project_Word"),                 // 删除项目
 	)
+	beego.Router("/User/List", &controllers.ProjectController{}, "*:User_List")
 
 	beego.AddNamespace(ns)
 }