Przeglądaj źródła

后端: 日常合同评价的新增和更新方法兼容业务处室提交的日常评价;待办任务处理业务处室提交的日常评价

baichengfei 4 lat temu
rodzic
commit
f850104959

+ 52 - 47
src/dashoo.cn/backend/api/business/oilcontract/contractReview/contractReview.go

@@ -1,7 +1,9 @@
 package contractReview
 package contractReview
+
 import (
 import (
 	"time"
 	"time"
 )
 )
+
 type OilContractReview struct {
 type OilContractReview struct {
 	Id                int       `json:"Id" xorm:"not null pk autoincr INT(11) 'Id'"`
 	Id                int       `json:"Id" xorm:"not null pk autoincr INT(11) 'Id'"`
 	ContractId        int       `json:"ContractId" xorm:"not null comment('合同表Id') INT(11) 'ContractId'"`
 	ContractId        int       `json:"ContractId" xorm:"not null comment('合同表Id') INT(11) 'ContractId'"`
@@ -18,6 +20,7 @@ type OilContractReview struct {
 	ProfessionalAudit int       `json:"ProfessionalAudit" xorm:"comment('业务处室专业审批人id') INT(11) 'ProfessionalAudit'"`
 	ProfessionalAudit int       `json:"ProfessionalAudit" xorm:"comment('业务处室专业审批人id') INT(11) 'ProfessionalAudit'"`
 	AuditIndex        int       `json:"AuditIndex" xorm:"default 0 comment('审批次数') INT(11) 'AuditIndex'"`
 	AuditIndex        int       `json:"AuditIndex" xorm:"default 0 comment('审批次数') INT(11) 'AuditIndex'"`
 	IsFinal           int       `json:"IsFinal" xorm:"comment('是否最终评价(履行完成) 0否1是')  INT(11) 'IsFinal'"`
 	IsFinal           int       `json:"IsFinal" xorm:"comment('是否最终评价(履行完成) 0否1是')  INT(11) 'IsFinal'"`
+	IsBusiness        int       `json:"IsBusiness" xorm:"comment('二级单位提交0, 业务处室提交1')  INT(11) 'IsBusiness'"`
 	CreateOn          time.Time `json:"CreateOn" xorm:"DATETIME 'CreateOn'"`
 	CreateOn          time.Time `json:"CreateOn" xorm:"DATETIME 'CreateOn'"`
 	CreateUserId      int       `json:"CreateUserId" xorm:"INT(11) 'CreateUserId'"`
 	CreateUserId      int       `json:"CreateUserId" xorm:"INT(11) 'CreateUserId'"`
 	CreateBy          string    `json:"CreateBy" xorm:"VARCHAR(50) 'CreateBy'"`
 	CreateBy          string    `json:"CreateBy" xorm:"VARCHAR(50) 'CreateBy'"`
@@ -43,6 +46,7 @@ type OilContractReviewListVo struct {
 	ProfessionalAudit int       `json:"ProfessionalAudit"`
 	ProfessionalAudit int       `json:"ProfessionalAudit"`
 	AuditIndex        int       `json:"AuditIndex"`
 	AuditIndex        int       `json:"AuditIndex"`
 	IsFinal           string    `json:"IsFinal"`
 	IsFinal           string    `json:"IsFinal"`
+	IsBusiness        string    `json:"IsBusiness"`
 	CreateOn          time.Time `json:"CreateOn"`
 	CreateOn          time.Time `json:"CreateOn"`
 	CreateUserId      int       `json:"CreateUserId"`
 	CreateUserId      int       `json:"CreateUserId"`
 	CreateBy          string    `json:"CreateBy"`
 	CreateBy          string    `json:"CreateBy"`
@@ -50,59 +54,60 @@ type OilContractReviewListVo struct {
 	ModifiedUserId    int       `json:"ModifiedUserId"`
 	ModifiedUserId    int       `json:"ModifiedUserId"`
 	ModifiedBy        string    `json:"ModifiedBy"`
 	ModifiedBy        string    `json:"ModifiedBy"`
 
 
-	SupplierName         string    `json:"SupplierName"`   // 供应商名称
-	ProjectName          string    `json:"ProjectName"`    // 项目名称
-	ContractNo           string    `json:"ContractNo"`     // 合同编号
-	SupplierId           int       `json:"SupplierId"`
-	ProjectPlace         string    `json:"ProjectPlace"`
-	ProjectOwner         string    `json:"ProjectOwner"`
-	Telephone            string    `json:"Telephone"`
-	ProjectType          string    `json:"ProjectType"`
-	ContractClass        string    `json:"ContractClass"`
-	ContractMode         string    `json:"ContractMode"`
-	Amount               string    `json:"Amount"`
-	ContractPeriod       string    `json:"ContractPeriod"`
-	OpenDate             time.Time `json:"OpenDate"`
-	PlanFinishDate       time.Time `json:"PlanFinishDate"`
-	SettleStatus         string    `json:"SettleStatus"`
-	Remark               string    `json:"Remark"`
+	SupplierName   string    `json:"SupplierName"` // 供应商名称
+	ProjectName    string    `json:"ProjectName"`  // 项目名称
+	ContractNo     string    `json:"ContractNo"`   // 合同编号
+	SupplierId     int       `json:"SupplierId"`
+	ProjectPlace   string    `json:"ProjectPlace"`
+	ProjectOwner   string    `json:"ProjectOwner"`
+	Telephone      string    `json:"Telephone"`
+	ProjectType    string    `json:"ProjectType"`
+	ContractClass  string    `json:"ContractClass"`
+	ContractMode   string    `json:"ContractMode"`
+	Amount         string    `json:"Amount"`
+	ContractPeriod string    `json:"ContractPeriod"`
+	OpenDate       time.Time `json:"OpenDate"`
+	PlanFinishDate time.Time `json:"PlanFinishDate"`
+	SettleStatus   string    `json:"SettleStatus"`
+	Remark         string    `json:"Remark"`
 }
 }
 type OilContractReviewVo struct {
 type OilContractReviewVo struct {
-	Items []*OilContractEvaluationItemsVo
-	Id             int       `json:"Id" xorm:"not null pk INT(11) 'Id'"`
-	ContractId     int       `json:"ContractId" xorm:"not null comment('合同表Id') INT(11) 'ContractId'"`
-	IsFinal        int       `json:"IsFinal" xorm:"not null comment('是否最终评价(履行完成) 0否1是') INT(11) 'IsFinal'"`
-	Status         string    `xorm:"not null default '0' VARCHAR(10)"`
-	WorkflowId     string    `json:"WorkflowId" xorm:"default '0' comment('工作流的ID') VARCHAR(50) 'WorkflowId'"`
-	BusinessKey    string    `json:"BusinessKey" xorm:"comment('流程序号') VARCHAR(255) 'BusinessKey'"`
-	ProcessKey     string    `json:"ProcessKey" xorm:"comment('工作流名称') VARCHAR(255) 'ProcessKey'"`
-	BackRemark     string    `json:"BackRemark" xorm:"comment('退回原因') VARCHAR(255) 'BackRemark'"`
+	Items             []*OilContractEvaluationItemsVo
+	Id                int       `json:"Id" xorm:"not null pk INT(11) 'Id'"`
+	ContractId        int       `json:"ContractId" xorm:"not null comment('合同表Id') INT(11) 'ContractId'"`
+	IsFinal           int       `json:"IsFinal" xorm:"not null comment('是否最终评价(履行完成) 0否1是') INT(11) 'IsFinal'"`
+	IsBusiness        int       `json:"IsBusiness"`
+	Status            string    `xorm:"not null default '0' VARCHAR(10)"`
+	WorkflowId        string    `json:"WorkflowId" xorm:"default '0' comment('工作流的ID') VARCHAR(50) 'WorkflowId'"`
+	BusinessKey       string    `json:"BusinessKey" xorm:"comment('流程序号') VARCHAR(255) 'BusinessKey'"`
+	ProcessKey        string    `json:"ProcessKey" xorm:"comment('工作流名称') VARCHAR(255) 'ProcessKey'"`
+	BackRemark        string    `json:"BackRemark" xorm:"comment('退回原因') VARCHAR(255) 'BackRemark'"`
 	FirstAudit        int       `xorm:"default 0 comment('初审') INT(10)"`
 	FirstAudit        int       `xorm:"default 0 comment('初审') INT(10)"`
 	SecondAudit       int       `xorm:"default 0 comment('复审') INT(10)"`
 	SecondAudit       int       `xorm:"default 0 comment('复审') INT(10)"`
 	ThirdAudit        int       `xorm:"default 0 comment('专业科室审批') INT(10)"`
 	ThirdAudit        int       `xorm:"default 0 comment('专业科室审批') INT(10)"`
 	ProfessionalAudit int       `xorm:"default 0 comment('业务处室专业审批') INT(10)"`
 	ProfessionalAudit int       `xorm:"default 0 comment('业务处室专业审批') INT(10)"`
 	FourthAudit       int       `xorm:"default 0 comment('集中审批') INT(10)"`
 	FourthAudit       int       `xorm:"default 0 comment('集中审批') INT(10)"`
 	AuditIndex        int       `xorm:"default 0 comment('审批次数') INT(11)"`
 	AuditIndex        int       `xorm:"default 0 comment('审批次数') INT(11)"`
-	CreateOn       time.Time `json:"CreateOn" xorm:"DATETIME 'CreateOn'"`
-	CreateUserId   int       `json:"CreateUserId" xorm:"INT(11) 'CreateUserId'"`
-	CreateBy       string    `json:"CreateBy" xorm:"VARCHAR(50) 'CreateBy'"`
-	ModifiedOn     time.Time `json:"ModifiedOn" xorm:"DATETIME 'ModifiedOn'"`
-	ModifiedUserId int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
-	ModifiedBy     string    `json:"ModifiedBy" xorm:"VARCHAR(50) 'ModifiedBy'"`
+	CreateOn          time.Time `json:"CreateOn" xorm:"DATETIME 'CreateOn'"`
+	CreateUserId      int       `json:"CreateUserId" xorm:"INT(11) 'CreateUserId'"`
+	CreateBy          string    `json:"CreateBy" xorm:"VARCHAR(50) 'CreateBy'"`
+	ModifiedOn        time.Time `json:"ModifiedOn" xorm:"DATETIME 'ModifiedOn'"`
+	ModifiedUserId    int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
+	ModifiedBy        string    `json:"ModifiedBy" xorm:"VARCHAR(50) 'ModifiedBy'"`
+}
+type OilContractEvaluationItemsVo struct {
+	Id             int    `json:"Id" xorm:"not null pk autoincr comment('ID') INT(11) 'Id'"`
+	ItemId         int    `json:"ItemId" xorm:"not null default 0 comment('节点ID') INT(11) 'ItemId'"`
+	Type           int    `json:"Type" xorm:"default 1 comment('项类型 1分值 2布尔') INT(11) 'Type'"`
+	Category       int    `json:"Category" xorm:"default 0 comment('项类型 1分值 2布尔') INT(11) 'Category'"`
+	ContractId     int    `json:"ContractId" xorm:"default 0 comment('合同表ID') INT(11) 'ContractId'"`
+	ContractWorkId int    `json:"ContractId" xorm:"default 0 comment('ReviewWork表ID') INT(11) 'ContractWorkId'"`
+	ParentId       int    `json:"ParentId" xorm:"not null default 0 comment('上级节点ID') INT(11) 'ParentId'"`
+	SequenceNo     string `json:"SequenceNo" xorm:"default '0' comment('序号') VARCHAR(50) 'SequenceNo'"`
+	Content        string `json:"content" xorm:"comment('评价内容') VARCHAR(1000) 'content'"`
+	NormalScore    string `json:"NormalScore" xorm:"comment('标准分值') DECIMAL(11,2) 'NormalScore'"`
+	Score          string `json:"Score" xorm:"comment('实得分数') DECIMAL(11,2) 'Score'"`
+	Value          int    `json:"Value" xorm:"not null default 0 comment('布尔专用') INT(11) 'Value'"`
+	LevelCode      int    `json:"LevelCode" xorm:"not null default 0 comment('级别') INT(11) 'LevelCode'"`
+	Remark         string `json:"Remark" xorm:"comment('备注') VARCHAR(500) 'Remark'"`
 }
 }
-type OilContractEvaluationItemsVo struct{
-	Id             int       `json:"Id" xorm:"not null pk autoincr comment('ID') INT(11) 'Id'"`
-	ItemId         int       `json:"ItemId" xorm:"not null default 0 comment('节点ID') INT(11) 'ItemId'"`
-	Type           int       `json:"Type" xorm:"default 1 comment('项类型 1分值 2布尔') INT(11) 'Type'"`
-	Category       int      `json:"Category" xorm:"default 0 comment('项类型 1分值 2布尔') INT(11) 'Category'"`
-	ContractId     int       `json:"ContractId" xorm:"default 0 comment('合同表ID') INT(11) 'ContractId'"`
-	ContractWorkId int       `json:"ContractId" xorm:"default 0 comment('ReviewWork表ID') INT(11) 'ContractWorkId'"`
-	ParentId       int       `json:"ParentId" xorm:"not null default 0 comment('上级节点ID') INT(11) 'ParentId'"`
-	SequenceNo     string    `json:"SequenceNo" xorm:"default '0' comment('序号') VARCHAR(50) 'SequenceNo'"`
-	Content        string    `json:"content" xorm:"comment('评价内容') VARCHAR(1000) 'content'"`
-	NormalScore    string    `json:"NormalScore" xorm:"comment('标准分值') DECIMAL(11,2) 'NormalScore'"`
-	Score          string    `json:"Score" xorm:"comment('实得分数') DECIMAL(11,2) 'Score'"`
-	Value          int       `json:"Value" xorm:"not null default 0 comment('布尔专用') INT(11) 'Value'"`
-	LevelCode      int       `json:"LevelCode" xorm:"not null default 0 comment('级别') INT(11) 'LevelCode'"`
-	Remark         string    `json:"Remark" xorm:"comment('备注') VARCHAR(500) 'Remark'"`
-}

+ 6 - 5
src/dashoo.cn/backend/api/business/todolist/todolist.go

@@ -2,7 +2,7 @@ package todolist
 
 
 type TodoList struct {
 type TodoList struct {
 	Id               int    `xorm:"int(11)"`
 	Id               int    `xorm:"int(11)"`
-	SupplierId       string `xorm:"VARCHAR(30)`
+	SupplierId       string `xorm:"VARCHAR(30)"`
 	CertId           string `xorm:"VARCHAR(30)"`
 	CertId           string `xorm:"VARCHAR(30)"`
 	QualId           string `xorm:"VARCHAR(30)"`
 	QualId           string `xorm:"VARCHAR(30)"`
 	BusinessKey      string `xorm:"VARCHAR(30)"`
 	BusinessKey      string `xorm:"VARCHAR(30)"`
@@ -25,8 +25,9 @@ const (
 	INFOCHANGE  string = "4" // 信息变更
 	INFOCHANGE  string = "4" // 信息变更
 	REGISTER    string = "5" // 注册
 	REGISTER    string = "5" // 注册
 	// STORAGE string = "7" // 入库
 	// STORAGE string = "7" // 入库
-	INVOICE string = "8" //待开发票
-	INCOME  string = "9" // 收入业务
-	DAILY  string = "10" // 合同日常
-	ANNUAL  string = "11" // 合同年审
+	INVOICE        string = "8"  //待开发票
+	INCOME         string = "9"  // 收入业务
+	DAILY          string = "10" // 合同日常
+	ANNUAL         string = "11" // 合同年审
+	DAILY_BUSINESS string = "12" // 合同日常(业务处室发起)
 )
 )

+ 8 - 7
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -69,7 +69,7 @@ type AposeVM struct {
 
 
 type DeleteProcessVM struct {
 type DeleteProcessVM struct {
 	ProcessInstanceId string `json:"processInstanceId"`
 	ProcessInstanceId string `json:"processInstanceId"`
-	DeleteReason  string `json:"deleteReason"`
+	DeleteReason      string `json:"deleteReason"`
 }
 }
 
 
 type WordTemplateVM struct {
 type WordTemplateVM struct {
@@ -78,10 +78,10 @@ type WordTemplateVM struct {
 	FileName    string                 `json:"fileName"`
 	FileName    string                 `json:"fileName"`
 }
 }
 type excelTemplateVM struct {
 type excelTemplateVM struct {
-	Datas       map[string]interface{} `json:"datas"`
-	TemplateUrl string                 `json:"templateUrl"`
-	FileName    string                 `json:"fileName"`
-	ContractClass string               `json:"contractClass"`
+	Datas         map[string]interface{} `json:"datas"`
+	TemplateUrl   string                 `json:"templateUrl"`
+	FileName      string                 `json:"fileName"`
+	ContractClass string                 `json:"contractClass"`
 }
 }
 type excelContrastVM struct {
 type excelContrastVM struct {
 	Datas       map[string]interface{} `json:"datas"`
 	Datas       map[string]interface{} `json:"datas"`
@@ -125,6 +125,8 @@ const (
 	OIL_DAILY_CONTRACT_EVALUATION string = "oil_daily_contract_evaluation"
 	OIL_DAILY_CONTRACT_EVALUATION string = "oil_daily_contract_evaluation"
 	//合同年度评审流程
 	//合同年度评审流程
 	OIL_ANNUAL_CONTRACT_EVALUATION string = "oil_annual_contract_evaluation"
 	OIL_ANNUAL_CONTRACT_EVALUATION string = "oil_annual_contract_evaluation"
+	//合同日常评审流程(专业处室发起)
+	OIL_DAILY_CONTRACT_EVA_BY_BUSINESS string = "oil_daily_contract_eva_by_business"
 
 
 	// 企业注册
 	// 企业注册
 	OIL_REGISTER_APPLY string = "oil_register_apply"
 	OIL_REGISTER_APPLY string = "oil_register_apply"
@@ -135,7 +137,6 @@ const (
 	// 目录管理审批流程
 	// 目录管理审批流程
 	OIL_Catalog string = "oil_catalog"
 	OIL_Catalog string = "oil_catalog"
 
 
-
 	/*//企业用户 2 一级物资准入流程图  4 战略合作准入 6外部市场准入
 	/*//企业用户 2 一级物资准入流程图  4 战略合作准入 6外部市场准入
 		OIL_FIRST_ENUSER_SUPPLIER_APPLY string = "oil_first_enuser_supplier_apply"
 		OIL_FIRST_ENUSER_SUPPLIER_APPLY string = "oil_first_enuser_supplier_apply"
 		//企业用户准入流程图 1评审准入 5内部多元准入
 		//企业用户准入流程图 1评审准入 5内部多元准入
@@ -188,7 +189,7 @@ const (
 	// 待交费 TODO 待确认
 	// 待交费 TODO 待确认
 	PAYING_FEE string = "PAYING_FEE"
 	PAYING_FEE string = "PAYING_FEE"
 	// 企业法规处审核
 	// 企业法规处审核
-	PROF_REGULATION string = "PROF_REGULATION"
+	PROF_REGULATION         string = "PROF_REGULATION"
 	PROF_REGULATION_STORAGE string = "PROF_REGULATION_STORAGE"
 	PROF_REGULATION_STORAGE string = "PROF_REGULATION_STORAGE"
 	// 企业用户注册
 	// 企业用户注册
 	COMPONY_AUDIT string = "COMPONY_AUDIT"
 	COMPONY_AUDIT string = "COMPONY_AUDIT"

+ 221 - 54
src/dashoo.cn/backend/api/controllers/oilcontract/contractReview.go

@@ -183,6 +183,7 @@ func (this *OilContractReviewController) AddEntity() {
 	itemSvc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
 	itemSvc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
 	var reviewMode contractReview.OilContractReview
 	var reviewMode contractReview.OilContractReview
 	reviewMode.IsFinal = modeVO.IsFinal
 	reviewMode.IsFinal = modeVO.IsFinal
+	reviewMode.IsBusiness = modeVO.IsBusiness
 	reviewMode.ContractId = modeVO.ContractId
 	reviewMode.ContractId = modeVO.ContractId
 	reviewMode.Status = "0"
 	reviewMode.Status = "0"
 	reviewMode.Unit = this.User.Unit
 	reviewMode.Unit = this.User.Unit
@@ -194,6 +195,7 @@ func (this *OilContractReviewController) AddEntity() {
 
 
 	var items2 []contractEvaluationItems.OilContractEvaluationItems
 	var items2 []contractEvaluationItems.OilContractEvaluationItems
 	var items3 []contractEvaluationItems.OilContractEvaluationItems
 	var items3 []contractEvaluationItems.OilContractEvaluationItems
+	var items4 []contractEvaluationItems.OilContractEvaluationItems // 业务处室发起评价
 
 
 	// 新增配置项
 	// 新增配置项
 	for i, v := range modeVO.Items {
 	for i, v := range modeVO.Items {
@@ -230,14 +232,44 @@ func (this *OilContractReviewController) AddEntity() {
 		temp3.Content = v.Content
 		temp3.Content = v.Content
 		items3 = append(items3, temp3)
 		items3 = append(items3, temp3)
 
 
+		// 保存专业处室发起评价
+		var temp4 contractEvaluationItems.OilContractEvaluationItems
+		temp4.ContentReviewId = reviewMode.Id
+		temp4.Type = v.Category
+		temp4.Category = 2
+		temp4.ItemId = v.Id
+		temp4.ParentId = v.ParentId
+		temp4.SequenceNo = v.SequenceNo
+		temp4.Content = v.Content
+		temp4.NormalScore = v.NormalScore
+		temp4.Score = v.Score
+		temp4.Value = v.Value
+		temp4.LevelCode = v.LevelCode
+		temp4.Remark = v.Remark
+		temp4.Content = v.Content
+		items4 = append(items4, temp4)
+
+	}
+	errBool := true
+	if modeVO.IsBusiness == 0 {
+		_, err2 := itemSvc.DBE.Insert(items2)
+
+		// 专业处室评价默认二级
+		_, err3 := itemSvc.DBE.Insert(items3)
+		if err2 == nil && err3 == nil {
+			errBool = false
+		}
 	}
 	}
-	_, err2 := itemSvc.DBE.Insert(items2)
 
 
-	// 专业处室评价默认二级
-	_, err3 := itemSvc.DBE.Insert(items3)
+	if modeVO.IsBusiness == 1 {
+		_, err4 := itemSvc.DBE.Insert(items4)
+		if err4 == nil {
+			errBool = false
+		}
+	}
 
 
 	var errinfo ErrorDataInfo
 	var errinfo ErrorDataInfo
-	if err == nil && err2 == nil && err3 == nil {
+	if err == nil && errBool == false {
 		//新增
 		//新增
 		errinfo.Message = "添加成功!"
 		errinfo.Message = "添加成功!"
 		errinfo.Code = 0
 		errinfo.Code = 0
@@ -568,61 +600,100 @@ func (this *OilContractReviewController) UpdateEntity() {
 	}
 	}
 	err := svc.UpdateEntityBytbl(OilContractReviewName, id, &reviewMode, cols)
 	err := svc.UpdateEntityBytbl(OilContractReviewName, id, &reviewMode, cols)
 
 
-	where := "ContentReviewId=" + id + " AND Category = 0 "
-	// 清除掉之前的
-	itemSvc.DeleteEntityBytbl(OilContractEvaluationItemsName, where)
-
-	var items []contractEvaluationItems.OilContractEvaluationItems
-	// 新增配置项
-	for i, v := range modeVO.Items {
-		fmt.Print(i)
-		var temp contractEvaluationItems.OilContractEvaluationItems
-		temp.ContentReviewId, _ = strconv.Atoi(id)
-		temp.Type = v.Category //v.Type
-		temp.ItemId = v.Id
-		temp.Category = 0
-		temp.ParentId = v.ParentId
-		temp.SequenceNo = v.SequenceNo
-		temp.Content = v.Content
-		temp.NormalScore = v.NormalScore
-		temp.Score = v.Score
-		temp.Value = v.Value
-		temp.LevelCode = v.LevelCode
-		temp.Remark = v.Remark
-		temp.Content = v.Content
-		items = append(items, temp)
-	}
+	errBool := true
+	if modeVO.IsBusiness == 0 {
+		where := "ContentReviewId=" + id + " AND Category = 0 "
+		// 清除掉之前的
+		itemSvc.DeleteEntityBytbl(OilContractEvaluationItemsName, where)
+
+		var items []contractEvaluationItems.OilContractEvaluationItems
+		// 新增配置项
+		for i, v := range modeVO.Items {
+			fmt.Print(i)
+			var temp contractEvaluationItems.OilContractEvaluationItems
+			temp.ContentReviewId, _ = strconv.Atoi(id)
+			temp.Type = v.Category //v.Type
+			temp.ItemId = v.Id
+			temp.Category = 0
+			temp.ParentId = v.ParentId
+			temp.SequenceNo = v.SequenceNo
+			temp.Content = v.Content
+			temp.NormalScore = v.NormalScore
+			temp.Score = v.Score
+			temp.Value = v.Value
+			temp.LevelCode = v.LevelCode
+			temp.Remark = v.Remark
+			temp.Content = v.Content
+			items = append(items, temp)
+		}
 
 
-	_, err2 := itemSvc.DBE.Insert(items)
+		_, err2 := itemSvc.DBE.Insert(items)
+
+		where2 := "ContentReviewId=" + id + " AND Category = 1 "
+		// 清除掉之前的
+		itemSvc.DeleteEntityBytbl(OilContractEvaluationItemsName, where2)
+
+		var items2 []contractEvaluationItems.OilContractEvaluationItems
+		// 新增配置项
+		for i, v := range modeVO.Items {
+			fmt.Print(i)
+			var temp2 contractEvaluationItems.OilContractEvaluationItems
+			temp2.ContentReviewId, _ = strconv.Atoi(id)
+			temp2.Type = v.Category //v.Type
+			temp2.ItemId = v.Id
+			temp2.Category = 1
+			temp2.ParentId = v.ParentId
+			temp2.SequenceNo = v.SequenceNo
+			temp2.Content = v.Content
+			temp2.NormalScore = v.NormalScore
+			temp2.Score = v.Score
+			temp2.Value = v.Value
+			temp2.LevelCode = v.LevelCode
+			temp2.Remark = v.Remark
+			temp2.Content = v.Content
+			items2 = append(items2, temp2)
+		}
 
 
-	where2 := "ContentReviewId=" + id + " AND Category = 1 "
-	// 清除掉之前的
-	itemSvc.DeleteEntityBytbl(OilContractEvaluationItemsName, where2)
+		_, err3 := itemSvc.DBE.Insert(items2)
 
 
-	var items2 []contractEvaluationItems.OilContractEvaluationItems
-	// 新增配置项
-	for i, v := range modeVO.Items {
-		fmt.Print(i)
-		var temp2 contractEvaluationItems.OilContractEvaluationItems
-		temp2.ContentReviewId, _ = strconv.Atoi(id)
-		temp2.Type = v.Category //v.Type
-		temp2.ItemId = v.Id
-		temp2.Category = 1
-		temp2.ParentId = v.ParentId
-		temp2.SequenceNo = v.SequenceNo
-		temp2.Content = v.Content
-		temp2.NormalScore = v.NormalScore
-		temp2.Score = v.Score
-		temp2.Value = v.Value
-		temp2.LevelCode = v.LevelCode
-		temp2.Remark = v.Remark
-		temp2.Content = v.Content
-		items2 = append(items2, temp2)
+		if err2 == nil && err3 == nil {
+			errBool = false
+		}
 	}
 	}
 
 
-	_, err3 := itemSvc.DBE.Insert(items2)
+	if modeVO.IsBusiness == 1 {
+		where3 := "ContentReviewId=" + id + " AND Category = 2 "
+		// 清除掉之前的
+		itemSvc.DeleteEntityBytbl(OilContractEvaluationItemsName, where3)
+
+		var items3 []contractEvaluationItems.OilContractEvaluationItems
+		// 新增配置项
+		for i, v := range modeVO.Items {
+			fmt.Print(i)
+			var temp3 contractEvaluationItems.OilContractEvaluationItems
+			temp3.ContentReviewId, _ = strconv.Atoi(id)
+			temp3.Type = v.Category //v.Type
+			temp3.ItemId = v.Id
+			temp3.Category = 2
+			temp3.ParentId = v.ParentId
+			temp3.SequenceNo = v.SequenceNo
+			temp3.Content = v.Content
+			temp3.NormalScore = v.NormalScore
+			temp3.Score = v.Score
+			temp3.Value = v.Value
+			temp3.LevelCode = v.LevelCode
+			temp3.Remark = v.Remark
+			temp3.Content = v.Content
+			items3 = append(items3, temp3)
+		}
+
+		_, err4 := itemSvc.DBE.Insert(items3)
+		if err4 == nil {
+			errBool = false
+		}
+	}
 
 
-	if err == nil && err2 == nil && err3 == nil {
+	if err == nil && errBool == false {
 		errinfo.Message = "修改成功!"
 		errinfo.Message = "修改成功!"
 		errinfo.Code = 0
 		errinfo.Code = 0
 		this.Data["json"] = &errinfo
 		this.Data["json"] = &errinfo
@@ -835,7 +906,11 @@ func (this *OilContractReviewController) CommonAuditEntity() {
 
 
 			svcActiviti := workflow.GetActivitiService(utils.DBE)
 			svcActiviti := workflow.GetActivitiService(utils.DBE)
 			var ActiComplete workflow.ActiCompleteVM
 			var ActiComplete workflow.ActiCompleteVM
-			ActiComplete.ProcessKey = workflow.OIL_DAILY_CONTRACT_EVALUATION
+			if contractReviewEntity.IsBusiness == 1 {
+				ActiComplete.ProcessKey = workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS // 业务处室分办提交的日常评价
+			} else {
+				ActiComplete.ProcessKey = workflow.OIL_DAILY_CONTRACT_EVALUATION // 二级单位提交的日常评价
+			}
 			ActiComplete.BusinessKey = contractReviewEntity.BusinessKey
 			ActiComplete.BusinessKey = contractReviewEntity.BusinessKey
 			ActiComplete.UserId = this.User.Id //审批人员
 			ActiComplete.UserId = this.User.Id //审批人员
 			ActiComplete.Result = result       //前台审批[同意、不同意]
 			ActiComplete.Result = result       //前台审批[同意、不同意]
@@ -925,3 +1000,95 @@ func (this *OilContractReviewController) BusinessOfficeSeparateAuditEntity() {
 		}
 		}
 	}
 	}
 }
 }
+
+// @Title 业务处室提交评价审核
+// @Description 业务处室提交评价审核
+// @Success 200 {object} controllers.Request
+// @router /business-submit-review/:id [post]
+func (this *OilContractReviewController) BusinessSubmitEvaEntity() {
+	Id := this.Ctx.Input.Param(":id")
+	ProfessionalAudit := this.GetString("ProfessionalAudit")
+	AuditRemark := this.GetString("AuditRemark")
+
+	userId := this.User.Id
+	var baseUserInfo userRole.Base_User
+	userService := userRole.GetUserService(utils.DBE)
+	userService.GetEntityById(userId, &baseUserInfo)
+	unitId := baseUserInfo.UnitId
+
+	var errInfo ErrorDataInfo
+	defer func() { //finally处理失败的异常
+		if err := recover(); err != nil {
+			errInfo.Message = err.(string)
+			errInfo.Code = -1
+			this.Data["json"] = &errInfo
+			this.ServeJSON()
+		} else {
+			//返回正确结果
+			errInfo.Message = "审核提交成功,请耐心等待批处理结果"
+			errInfo.Code = 0
+			this.Data["json"] = &errInfo
+			this.ServeJSON()
+		}
+	}()
+
+	if ProfessionalAudit == "" {
+		errInfo.Message = "请选择审批人"
+		errInfo.Code = -1
+		this.Data["json"] = &errInfo
+		this.ServeJSON()
+	}
+	//取出日常评审主表信息
+	conRev := contractReview.GetOilContractReviewService(utils.DBE)
+	var contractReviewEntity contractReview.OilContractReview
+	conRev.GetEntityById(Id, &contractReviewEntity)
+
+	//取出合同表
+	contractSvc := contract.GetOilContractService(utils.DBE)
+	var contractEntity contract.OilContract
+	contractSvc.GetEntityById(contractReviewEntity.ContractId, &contractEntity)
+
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	//启动工作流
+	businessKey := contractReviewEntity.BusinessKey
+	processInstanceId := contractReviewEntity.WorkflowId
+	// 如果被驳回,不再新启工作流
+	if processInstanceId == "" {
+		//启动工作流
+		businessKey = Id + "-" + strconv.Itoa(contractReviewEntity.AuditIndex)
+		processInstanceId = svcActiviti.StartProcess2(workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS, businessKey, this.User.Id, "1", contractEntity.ContractClass, contractEntity.SupplierName)
+		if len(processInstanceId) <= 0 {
+			panic("工作流启动失败!")
+		}
+		contractReviewEntity.AuditIndex += 1
+	}
+	// 将启动和工作流,选择的初审和复审人员保存下来
+	cols := []string{
+		"Id",
+		"WorkflowId",
+		"BusinessKey",
+		"ProcessKey",
+		"CommitComId",
+		"AuditIndex",
+		"ProfessionalAudit",
+	}
+	contractReviewEntity.ProcessKey = workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS
+	contractReviewEntity.BusinessKey = businessKey
+	contractReviewEntity.WorkflowId = processInstanceId
+	contractReviewEntity.CommitComId = strconv.Itoa(unitId)
+	contractReviewEntity.ProfessionalAudit, _ = strconv.Atoi(ProfessionalAudit)
+	conRev.UpdateEntityByIdCols(Id, contractReviewEntity, cols)
+
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS
+	ActiComplete.BusinessKey = contractReviewEntity.BusinessKey
+	ActiComplete.UserId = this.User.Id // 当前审批操作人员
+	ActiComplete.Result = "1"          //业务处室分办提交给处室审核
+	ActiComplete.UserNames = ProfessionalAudit
+	ActiComplete.Remarks = AuditRemark
+	ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
+	receiveVal := svcActiviti.TaskComplete(ActiComplete)
+	if receiveVal != "true" {
+		panic("工作流异常,请联系管理员!" + receiveVal)
+	}
+}

+ 43 - 21
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -60,6 +60,8 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		wfNames = workflow.OIL_DAILY_CONTRACT_EVALUATION
 		wfNames = workflow.OIL_DAILY_CONTRACT_EVALUATION
 	} else if stype == "11" {
 	} else if stype == "11" {
 		wfNames = workflow.OIL_ANNUAL_CONTRACT_EVALUATION
 		wfNames = workflow.OIL_ANNUAL_CONTRACT_EVALUATION
+	} else if stype == "12" {
+		wfNames = workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS
 	}
 	}
 	var todoliststemp []todolist.TodoList
 	var todoliststemp []todolist.TodoList
 
 
@@ -71,15 +73,15 @@ func (this *TodoListController) GetMyTaskEntityList() {
 	myTasksRetWithTimes = pagingResult.TaskList
 	myTasksRetWithTimes = pagingResult.TaskList
 
 
 	var jzpsCount int64 = 0 // 准入集中评审的数量
 	var jzpsCount int64 = 0 // 准入集中评审的数量
-	for _,item := range myTasksRetWithTimes {
+	for _, item := range myTasksRetWithTimes {
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0]
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0]
 		if (item.TaskName == "集中评审") && (wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY) {
 		if (item.TaskName == "集中评审") && (wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY) {
-			jzpsCount ++
+			jzpsCount++
 		}
 		}
 	}
 	}
 	pagingResult.Total = pagingResult.Total - jzpsCount
 	pagingResult.Total = pagingResult.Total - jzpsCount
 	//取出各种类型的ID
 	//取出各种类型的ID
-	for _,item := range myTasksRetWithTimes {
+	for _, item := range myTasksRetWithTimes {
 		idx := strings.Index(item.BusinessKey, "-")
 		idx := strings.Index(item.BusinessKey, "-")
 		id := item.BusinessKey
 		id := item.BusinessKey
 		if idx >= 0 {
 		if idx >= 0 {
@@ -98,9 +100,9 @@ func (this *TodoListController) GetMyTaskEntityList() {
 			where = where + " and b.Id = '" + id + "'"
 			where = where + " and b.Id = '" + id + "'"
 			var todo todolist.TodoList
 			var todo todolist.TodoList
 			svc := supplier.GetOilSupplierService(utils.DBE)
 			svc := supplier.GetOilSupplierService(utils.DBE)
-			has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName,  &todo, where)
+			has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
 			if has {
 			if has {
-				todo.Type  = todolist.SUPPLIER
+				todo.Type = todolist.SUPPLIER
 				todo.UserName = this.User.Realname
 				todo.UserName = this.User.Realname
 				todo.CreateTime = item.CreateTime
 				todo.CreateTime = item.CreateTime
 				todo.TaskName = item.TaskName
 				todo.TaskName = item.TaskName
@@ -113,7 +115,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
 			var todo todolist.TodoList
 			var todo todolist.TodoList
 			var certAppend suppliercertappend.OilSupplierCertAppend
 			var certAppend suppliercertappend.OilSupplierCertAppend
 			svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 			svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-			has :=svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName,  &todo, where)
+			has := svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
 			svcapp.GetEntityById(id, &certAppend)
 			svcapp.GetEntityById(id, &certAppend)
 			if has {
 			if has {
 				todo.Id = certAppend.Id
 				todo.Id = certAppend.Id
@@ -160,7 +162,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
 				todo.SupplierName = listInfo.SupplierName
 				todo.SupplierName = listInfo.SupplierName
 				todo.UserName = this.User.Realname
 				todo.UserName = this.User.Realname
 				todo.TaskName = item.TaskName
 				todo.TaskName = item.TaskName
-				todo.SupplierTypeCode = todolist.INFOCHANGE// listInfo.SupplierTypeName
+				todo.SupplierTypeCode = todolist.INFOCHANGE // listInfo.SupplierTypeName
 				todo.Status = listInfo.Status
 				todo.Status = listInfo.Status
 				todo.CreateTime = item.CreateTime
 				todo.CreateTime = item.CreateTime
 				todoliststemp = append(todoliststemp, todo)
 				todoliststemp = append(todoliststemp, todo)
@@ -207,7 +209,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
 			has = regsvc.GetEntityById(id, &listinfo)
 			has = regsvc.GetEntityById(id, &listinfo)
 			if has {
 			if has {
 				var list oilcatalog.OilCatalog
 				var list oilcatalog.OilCatalog
-				regsvc.GetEntity(&list, "SubId=" + strconv.Itoa(listinfo.Id))
+				regsvc.GetEntity(&list, "SubId="+strconv.Itoa(listinfo.Id))
 				todo.Id = listinfo.Id
 				todo.Id = listinfo.Id
 				todo.Type = todolist.INCOME
 				todo.Type = todolist.INCOME
 				todo.SupplierName = list.CompanyName
 				todo.SupplierName = list.CompanyName
@@ -215,7 +217,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
 				todo.TaskName = item.TaskName
 				todo.TaskName = item.TaskName
 				if listinfo.Type == "6" {
 				if listinfo.Type == "6" {
 					todo.SupplierTypeCode = todolist.INCOME + "-6"
 					todo.SupplierTypeCode = todolist.INCOME + "-6"
-				} else if  listinfo.Type == "7" {
+				} else if listinfo.Type == "7" {
 					todo.SupplierTypeCode = todolist.INCOME + "-7"
 					todo.SupplierTypeCode = todolist.INCOME + "-7"
 				}
 				}
 				todo.Status = listinfo.Status
 				todo.Status = listinfo.Status
@@ -260,6 +262,26 @@ func (this *TodoListController) GetMyTaskEntityList() {
 				todo.Status = contractSumEntity.Status
 				todo.Status = contractSumEntity.Status
 				todoliststemp = append(todoliststemp, todo)
 				todoliststemp = append(todoliststemp, todo)
 			}
 			}
+		} else if wfName == workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS {
+			// 专业处室提交的合同日常评审
+			var todo todolist.TodoList
+			conRev := contractReview.GetOilContractReviewService(utils.DBE)
+			var contractReviewEntity contractReview.OilContractReview
+			has = conRev.GetEntityById(id, &contractReviewEntity)
+			contractSvc := contract.GetOilContractService(utils.DBE)
+			var contractEntity contract.OilContract
+			contractSvc.GetEntityById(contractReviewEntity.ContractId, &contractEntity)
+			if has {
+				todo.Id = contractReviewEntity.Id
+				todo.Type = todolist.DAILY_BUSINESS
+				todo.TaskName = item.TaskName
+				todo.UserName = this.User.Realname
+				todo.CreateTime = item.CreateTime
+				todo.SupplierTypeCode = contractEntity.ContractClass
+				todo.SupplierName = contractEntity.SupplierName
+				todo.Status = contractReviewEntity.Status
+				todoliststemp = append(todoliststemp, todo)
+			}
 		}
 		}
 	}
 	}
 
 
@@ -270,12 +292,12 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		var minDate time.Time
 		var minDate time.Time
 		var maxDate time.Time
 		var maxDate time.Time
 		if len(dates) == 2 {
 		if len(dates) == 2 {
-			minDate,_ = utils.TimeParse(dates[0], "2006-01-02 15:04")
-			maxDate,_ = utils.TimeParse(dates[1], "2006-01-02 15:04")
+			minDate, _ = utils.TimeParse(dates[0], "2006-01-02 15:04")
+			maxDate, _ = utils.TimeParse(dates[1], "2006-01-02 15:04")
 		}
 		}
 		for i := 0; i < len(todoliststemp); i++ {
 		for i := 0; i < len(todoliststemp); i++ {
-			fmt.Println(minDate.Unix()*1000, "==",maxDate.Unix()*1000)
-			fmt.Println(todoliststemp[i].CreateTime, "==",todoliststemp[i].CreateTime)
+			fmt.Println(minDate.Unix()*1000, "==", maxDate.Unix()*1000)
+			fmt.Println(todoliststemp[i].CreateTime, "==", todoliststemp[i].CreateTime)
 			if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {
 			if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {
 				todolists = append(todolists, todoliststemp[i])
 				todolists = append(todolists, todoliststemp[i])
 			}
 			}
@@ -339,7 +361,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 	myTasksRetWithTimes = pagingResult.TaskList
 	myTasksRetWithTimes = pagingResult.TaskList
 
 
 	//取出各种类型的ID
 	//取出各种类型的ID
-	for _,item := range myTasksRetWithTimes {
+	for _, item := range myTasksRetWithTimes {
 		idx := strings.Index(item.BusinessKey, "-")
 		idx := strings.Index(item.BusinessKey, "-")
 		id := item.BusinessKey
 		id := item.BusinessKey
 		if idx >= 0 {
 		if idx >= 0 {
@@ -354,9 +376,9 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 			where = where + " and b.Id = '" + id + "'"
 			where = where + " and b.Id = '" + id + "'"
 			var todo todolist.TodoList
 			var todo todolist.TodoList
 			svc := supplier.GetOilSupplierService(utils.DBE)
 			svc := supplier.GetOilSupplierService(utils.DBE)
-			has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName,  &todo, where)
+			has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
 			if has {
 			if has {
-				todo.Type  = todolist.SUPPLIER
+				todo.Type = todolist.SUPPLIER
 				todo.UserName = this.User.Realname
 				todo.UserName = this.User.Realname
 				todo.CreateTime = item.CreateTime
 				todo.CreateTime = item.CreateTime
 				todo.TaskName = item.TaskName
 				todo.TaskName = item.TaskName
@@ -369,7 +391,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 			where = where + " and b.Id = '" + id + "'"
 			where = where + " and b.Id = '" + id + "'"
 			var todo todolist.TodoList
 			var todo todolist.TodoList
 			svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 			svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-			has :=svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName,  &todo, where)
+			has := svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
 			if has {
 			if has {
 				todo.TaskName = item.TaskName
 				todo.TaskName = item.TaskName
 				todo.Type = todolist.CERTAPPEND
 				todo.Type = todolist.CERTAPPEND
@@ -463,7 +485,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 			has = regsvc.GetEntityById(id, &listinfo)
 			has = regsvc.GetEntityById(id, &listinfo)
 			if has {
 			if has {
 				var list oilcatalog.OilCatalog
 				var list oilcatalog.OilCatalog
-				regsvc.GetEntity(&list, "SubId=" + strconv.Itoa(listinfo.Id))
+				regsvc.GetEntity(&list, "SubId="+strconv.Itoa(listinfo.Id))
 				todo.Id = listinfo.Id
 				todo.Id = listinfo.Id
 				todo.Type = todolist.INCOME
 				todo.Type = todolist.INCOME
 				todo.SupplierName = list.CompanyName
 				todo.SupplierName = list.CompanyName
@@ -471,7 +493,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 				todo.TaskName = item.TaskName
 				todo.TaskName = item.TaskName
 				if listinfo.Type == "6" {
 				if listinfo.Type == "6" {
 					todo.SupplierTypeCode = todolist.INCOME + "-6"
 					todo.SupplierTypeCode = todolist.INCOME + "-6"
-				} else if  listinfo.Type == "7" {
+				} else if listinfo.Type == "7" {
 					todo.SupplierTypeCode = todolist.INCOME + "-7"
 					todo.SupplierTypeCode = todolist.INCOME + "-7"
 				}
 				}
 				todo.Status = listinfo.Status
 				todo.Status = listinfo.Status
@@ -526,8 +548,8 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		var minDate time.Time
 		var minDate time.Time
 		var maxDate time.Time
 		var maxDate time.Time
 		if len(dates) == 2 {
 		if len(dates) == 2 {
-			minDate,_ = utils.TimeParse(dates[0], "2006-01-02 15:04")
-			maxDate,_ = utils.TimeParse(dates[1], "2006-01-02 15:04")
+			minDate, _ = utils.TimeParse(dates[0], "2006-01-02 15:04")
+			maxDate, _ = utils.TimeParse(dates[1], "2006-01-02 15:04")
 		}
 		}
 		for i := 0; i < len(todoliststemp); i++ {
 		for i := 0; i < len(todoliststemp); i++ {
 			if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {
 			if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {