Jelajahi Sumber

新增字段CommitComId

baichengfei 5 tahun lalu
induk
melakukan
8aeea83194

+ 25 - 25
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercert.go

@@ -56,7 +56,7 @@ type OilSupplierCert struct {
 	FirstAudit        int       `xorm:"default 0 comment('初审') INT(10)"`
 	SecondAudit       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)"`
 	AuditIndex        int       `xorm:"default 0 comment('审批次数') INT(11)"`
 	BackRemark        string    `xorm:"default '' comment('退回原因') VARCHAR(255)"`
@@ -124,7 +124,7 @@ type Del_OilSupplierCert struct {
 	FirstAudit        int       `xorm:"default 0 comment('初审') INT(10)"`
 	SecondAudit       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)"`
 	AuditIndex        int       `xorm:"default 0 comment('审批次数') INT(11)"`
 	BackRemark        string    `xorm:"default '' comment('退回原因') VARCHAR(255)"`
@@ -149,33 +149,33 @@ type OilSupplierVM struct {
 }
 
 const (
-	DRAFT_STATUS        string = "0"  //草稿状态
-	FIRST_TRIAL_STATUS  string = "1"  //二级单位初审
-	SECOND_TRIAL_STATUS string = "2"  //二级单位复审
-	THIRD_TRIAL_STATUS  string = "3"  //专业处接收
-	PROF_AUDIT_STATUS   string = "4"  //业务处室专业审批
-	CENT_AUDIT_STATUS   string = "5"  // 集中审批
-	PAYING_AUDIT_STATUS string = "6"  //待交费
-	STOREING_STATUS     string = "7"  //待入库
-	STORE_STATUS        string = "8"  //已入库
-	FEN_TRIAL_STATUS    string = "10" //二级单位分办
+	DRAFT_STATUS           string = "0"   //草稿状态
+	FIRST_TRIAL_STATUS     string = "1"   //二级单位初审
+	SECOND_TRIAL_STATUS    string = "2"   //二级单位复审
+	THIRD_TRIAL_STATUS     string = "3"   //专业处接收
+	PROF_AUDIT_STATUS      string = "4"   //业务处室专业审批
+	CENT_AUDIT_STATUS      string = "5"   // 集中审批
+	PAYING_AUDIT_STATUS    string = "6"   //待交费
+	STOREING_STATUS        string = "7"   //待入库
+	STORE_STATUS           string = "8"   //已入库
+	FEN_TRIAL_STATUS       string = "10"  //二级单位分办
 	NO_FEN_TRIAL_STATUS    string = "-10" //二级单位分办未通过
-	NOPASS_STATUS       string = "-1" // 初审未通过
-	NO_SECOND_TRIAL_STATUS   string = "-2" // 复审未通过
-	NO_THIRD_TRIAL_STATUS    string = "-3" // 专业处接收未通过
-	NO_PROF_AUDIT_STATUS     string = "-4" // 专业处室未通过
-	NO_CENT_AUDIT_STATUS    string = "-5" // 集中评审未通过
-	ALL_PASE_STATUS    string = "11" //审核完成
+	NOPASS_STATUS          string = "-1"  // 初审未通过
+	NO_SECOND_TRIAL_STATUS string = "-2"  // 复审未通过
+	NO_THIRD_TRIAL_STATUS  string = "-3"  // 专业处接收未通过
+	NO_PROF_AUDIT_STATUS   string = "-4"  // 专业处室未通过
+	NO_CENT_AUDIT_STATUS   string = "-5"  // 集中评审未通过
+	ALL_PASE_STATUS        string = "11"  //审核完成
 
 	DOOGS_TYPECODE string = "01" // 物资类
 	BASIS_TYPECODE string = "02" // 基建类
-	TECH_TYPECODE string = "03" // 技术服务类
+	TECH_TYPECODE  string = "03" // 技术服务类
 
-	PINGSHEN string = "1" // 评审准入
-	YIJIWUZI string = "2" // 一级物资备案准入
-	ERJIWUZI string = "3" // 二级物资准入
-	ZHANLUEHEZUO string = "4" // 战略合作准入
-	NEIBUDUOYUAN string = "5" // 内部多元准入
-	WAIBUSHICHANG string = "6" // 外部市场准入 //选择项已暂停使用
+	PINGSHEN      string = "1" // 评审准入
+	YIJIWUZI      string = "2" // 一级物资备案准入
+	ERJIWUZI      string = "3" // 二级物资准入
+	ZHANLUEHEZUO  string = "4" // 战略合作准入
+	NEIBUDUOYUAN  string = "5" // 内部多元准入
+	WAIBUSHICHANG string = "6" // 招标准入(旧:外部市场准入 //选择项已暂停使用 )
 
 )

+ 9 - 9
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertListener.go

@@ -17,11 +17,11 @@ type OilSupplierCertListenerController struct {
 }
 
 type ListenerApproveInfo struct {
-	Users string	`json:"users"`
+	Users string `json:"users"`
 }
 
 type ListenerApproveParams struct {
-	BusinessKey string	`json:"businessKey"`
+	BusinessKey string `json:"businessKey"`
 }
 
 // @Title 获取二级单位分办人员列表 --回调
@@ -225,7 +225,7 @@ func (this *OilSupplierCertListenerController) CheckNeedConcentrateAudit() {
 	result := 0
 	isConcentrateAudit := "false"
 	unConcentrateAudit := "false"
-	for _, eachItem := range concentrateInStyleList{
+	for _, eachItem := range concentrateInStyleList {
 		if eachItem == supplierCertEntity.InStyle {
 			// 需要集中评审
 			isConcentrateAudit = "true"
@@ -233,7 +233,7 @@ func (this *OilSupplierCertListenerController) CheckNeedConcentrateAudit() {
 			break
 		}
 	}
-	for _, eachItem := range unConcentrateInStyleList{
+	for _, eachItem := range unConcentrateInStyleList {
 		if eachItem == supplierCertEntity.InStyle {
 			// 不需要集中评审
 			unConcentrateAudit = "true"
@@ -242,7 +242,7 @@ func (this *OilSupplierCertListenerController) CheckNeedConcentrateAudit() {
 		}
 	}
 
-	if isConcentrateAudit == unConcentrateAudit{
+	if isConcentrateAudit == unConcentrateAudit {
 		// 准入类型评审方式错误!请联系管理员
 		result = 0
 	}
@@ -285,7 +285,7 @@ func (this *OilSupplierCertListenerController) CheckNeedPay() {
 	result := 0
 	isPay := "false"
 	unPay := "false"
-	for _, eachItem := range isPayList{
+	for _, eachItem := range isPayList {
 		if eachItem == supplierCertEntity.InStyle {
 			// 需要付费
 			isPay = "true"
@@ -293,7 +293,7 @@ func (this *OilSupplierCertListenerController) CheckNeedPay() {
 			break
 		}
 	}
-	for _, eachItem := range unPayList{
+	for _, eachItem := range unPayList {
 		if eachItem == supplierCertEntity.InStyle {
 			// 不需要付费
 			unPay = "true"
@@ -301,7 +301,7 @@ func (this *OilSupplierCertListenerController) CheckNeedPay() {
 			break
 		}
 	}
-	if isPay == unPay{
+	if isPay == unPay {
 		// 准入类型是否付费有误!请联系管理员
 		result = 0
 	}
@@ -329,7 +329,7 @@ func (this *OilSupplierCertListenerController) GetPrePayer() {
 	supplierCertEntity.Status = suppliercert.PAYING_AUDIT_STATUS //待缴费
 	certSrv.UpdateEntityByIdCols(supplierCertId, supplierCertEntity, cols)
 
-	//创建人即为交费的人员
+	//创建人即为交费的人员 TODO 取值可能有问题
 	approverIds := supplierCertEntity.CommitComId
 	this.Data["json"] = approverIds
 	this.ServeJSON()

+ 147 - 53
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -114,16 +114,16 @@ func (this *OilSupplierCertAppendController) GetList() {
 	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 	var registerUser register.OilCorporateInfo
 	sql := " UserName='" + this.User.Username + "'"
-	svc.GetEntity(&registerUser,sql)
+	svc.GetEntity(&registerUser, sql)
 	//企业用户必须加创建人条件
 	if this.User.IsCompanyUser == 1 {
-		where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='"+registerUser.CommercialNo+"')"
+		where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='" + registerUser.CommercialNo + "')"
 	} else {
 		//超级管理员和有查看所有数据权限的用户不加条件
 		svcPerm := permission.GetPermissionService(utils.DBE)
 		isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.append.AllRecord")
 		if !svcPerm.IsAdmin(this.User.Id) && !isauth {
-			where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='"+registerUser.CommercialNo+"')"
+			where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='" + registerUser.CommercialNo + "')"
 		}
 	}
 	var list []suppliercertappend.OilSupplierCertAppend
@@ -164,17 +164,17 @@ func (this *OilSupplierCertAppendController) GetSupplier() {
 	where := "1=1 "
 	if SuppTypeCode != "" {
 		where = " WHERE b.Id is NOT NULL AND a.SupplierTypeCode = '" + SuppTypeCode + "' and a.InFlag='1'"
-	}else {
+	} else {
 		where = " WHERE b.Id is NOT NULL AND a.InFlag='1'"
 	}
 	var registerUser register.OilCorporateInfo
 	sql := " UserName='" + this.User.Username + "'"
-	svc.GetEntity(&registerUser,sql)
+	svc.GetEntity(&registerUser, sql)
 	//企业用户必须加创建人条件
 	if this.User.IsCompanyUser == 1 {
-		where = where + " and (b.CreateUserId = '" + this.User.Id + "' or b.CommercialNo='"+registerUser.CommercialNo+"')"
-	//if this.User.IsCompanyUser == 1 {
-	//	where = where + " and b.CreateUserId = '" + this.User.Id + "'"
+		where = where + " and (b.CreateUserId = '" + this.User.Id + "' or b.CommercialNo='" + registerUser.CommercialNo + "')"
+		//if this.User.IsCompanyUser == 1 {
+		//	where = where + " and b.CreateUserId = '" + this.User.Id + "'"
 	}
 
 	sqlStr := "SELECT b.Id AS SupplierId, a.Id AS SupplierCertId, b.SupplierName AS SupplierName FROM OilSupplierCert AS a LEFT JOIN OilSupplier AS b ON a.SupplierId = b.Id "
@@ -196,9 +196,9 @@ func (this *OilSupplierCertAppendController) AddAppend() {
 	var cermodel suppliercert.OilSupplierCert
 	var model suppliercertappend.OilSupplierCertAppend
 	json.Unmarshal(jsonblob, &model)
-	where := " Id = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierTypeCode = '"+ model.AppendType +"'"
+	where := " Id = " + utils.ToStr(model.SupplierCertId) + " and SupplierTypeCode = '" + model.AppendType + "'"
 	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-	where_app := " SupplierCertId = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierId = "+ utils.ToStr(model.SupplierId)+ " and AppendType = '"+ model.AppendType +"'"
+	where_app := " SupplierCertId = " + utils.ToStr(model.SupplierCertId) + " and SupplierId = " + utils.ToStr(model.SupplierId) + " and AppendType = '" + model.AppendType + "'"
 	//where_app += " and Status < 11"
 	orderby := "ApplyDate DESC"
 	var modeltmp []suppliercertappend.OilSupplierCertAppend
@@ -252,7 +252,7 @@ func (this *OilSupplierCertAppendController) AddAppend() {
 	_, err := svc.InsertEntityBytbl(OilSupplierCertAppendName, &model)
 	//查询准入范围
 	var certsublist []suppliercertsub.OilSupplierCertSub
-	suwhere := " SupplierCertId = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierTypeCode = "+ model.AppendType
+	suwhere := " SupplierCertId = " + utils.ToStr(model.SupplierCertId) + " and SupplierTypeCode = " + model.AppendType
 	svc.GetEntitysByWhere(OilSupplierCertSubName, suwhere, &certsublist)
 	if err == nil {
 		errinfo.Message = "操作成功!"
@@ -353,9 +353,9 @@ func (this *OilSupplierCertAppendController) DeleteEntity() {
 	where := "SupplierCertAppendId = " + Id
 	//删除资质表信息
 	var submodel []suppliercertsub.OilSupplierCertSub
-	svc.GetEntitysByWhere(OilSupplierCertSubName,where,&submodel)
+	svc.GetEntitysByWhere(OilSupplierCertSubName, where, &submodel)
 	if len(submodel) > 0 {
-		filewhere := " SupplierId = "+ utils.ToStr(submodel[0].SupplierId) + " and SupType = 2 and SupplierTypeCode = '"+ submodel[0].SupplierTypeCode +"'"
+		filewhere := " SupplierId = " + utils.ToStr(submodel[0].SupplierId) + " and SupType = 2 and SupplierTypeCode = '" + submodel[0].SupplierTypeCode + "'"
 		err = svcSub.DeleteEntityBytbl(OilSupplierFileName, filewhere)
 		if err != nil {
 			//回滚操作
@@ -471,15 +471,15 @@ func (this *OilSupplierCertAppendController) GetMyTaskEntityList() {
 	appendIdList = strings.Trim(appendIdList, ",")
 	appendIdarr := strings.Split(appendIdList, ",")
 	for i, item := range appendIdarr {
-		idx := strings.Index(item,"-")
-		if (idx >= 0 ) {
+		idx := strings.Index(item, "-")
+		if idx >= 0 {
 			appendIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
 	appendIdList = strings.Join(appendIdarr, ",")
 	var list []suppliercertappend.OilSupplierCertAppend
 	var total int64 = 0
-	if (appendIdList != "") {
+	if appendIdList != "" {
 		where += " and Id in (" + appendIdList + ")"
 		svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 		total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
@@ -536,7 +536,6 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 		firstAudit = strings.Trim(userIds, ",")
 	}
 
-
 	//取出审批列表
 	certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
@@ -576,7 +575,7 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 	result := strconv.Itoa(this.User.IsCompanyUser)
 	if supplierCertAppendEntity.WorkFlowId == "0" || len(supplierCertAppendEntity.WorkFlowId) <= 0 {
 		//启动工作流
-		businessKey = certappendId + "-" +  strconv.Itoa(supplierCertAppendEntity.AuditIndex)
+		businessKey = certappendId + "-" + strconv.Itoa(supplierCertAppendEntity.AuditIndex)
 		processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
 	}
 	var ActiComplete workflow.ActiCompleteVM
@@ -630,7 +629,7 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 	model.WorkFlowId = processInstanceId
 	if this.User.IsCompanyUser == 1 {
 		model.Status = suppliercert.FEN_TRIAL_STATUS //分办
-	}else if this.User.IsCompanyUser == 0 {
+	} else if this.User.IsCompanyUser == 0 {
 		model.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
 	}
 	model.FirstAudit, _ = strconv.Atoi(firstAudit)
@@ -653,6 +652,103 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 	certSrv.UpdateEntityByIdCols(certappendId, model, cols)
 }
 
+// @Title 企业用户提交审批----启动工作流
+// @Description 企业用户提交按钮
+// @Success	200	{object} controllers.Request
+// @router /company-audit/:id [post]
+func (this *OilSupplierCertAppendController) companySubmitAuditEntity() {
+	certId := this.Ctx.Input.Param(":id")
+	unitId := this.GetString("UnitId") // 分办单位id
+	AuditRemark := this.GetString("AuditRemark")
+}
+
+// @Title 二级分办单位提交审批----启动工作流
+// @Description 二级分办单位提交审批按钮
+// @Success	200	{object} controllers.Request
+// @router /unit-audit/:id [post]
+func (this *OilSupplierCertAppendController) separateUnitSubmitAuditEntity() {
+	certAppendId := this.Ctx.Input.Param(":id")
+	firstAudit := this.GetString("firstAudit")
+	secondAudit := this.GetString("SecondAudit")
+	thirdAudit := this.GetString("ThirdAudit")
+	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()
+		}
+	}()
+
+	certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
+	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
+	certSrv.GetEntityById(certAppendId, &supplierCertAppendEntity)
+	var supplierEntity supplier.OilSupplier
+	certSrv.GetEntityById(supplierCertAppendEntity.SupplierId, &supplierEntity)
+
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	//启动工作流
+	businessKey := certAppendId + "-" + strconv.Itoa(supplierCertAppendEntity.AuditIndex)
+	processInstanceId := supplierCertAppendEntity.WorkFlowId
+	// 如果被驳回,不再新启工作流
+	if processInstanceId == "" {
+		processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_APPEND_APPLY, businessKey, this.User.Id, "1", supplierCertAppendEntity.AppendType, supplierEntity.SupplierName)
+		if len(processInstanceId) <= 0 {
+			panic("工作流启动失败!")
+		}
+	}
+
+	// 将启动和工作流,选择的初审和复审人员保存下来
+	cols := []string{
+		"Id",
+		"FirstAudit",
+		"SecondAudit",
+		"thirdAudit",
+		"WorkFlowId",
+		"BusinessKey",
+		"ProcessKey",
+		"CommitComId",
+		"AuditIndex",
+	}
+	supplierCertAppendEntity.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
+	supplierCertAppendEntity.BusinessKey = businessKey
+	supplierCertAppendEntity.WorkFlowId = processInstanceId
+	supplierCertAppendEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
+	supplierCertAppendEntity.SecondAudit, _ = strconv.Atoi(secondAudit)
+	supplierCertAppendEntity.ThirdAudit, _ = strconv.Atoi(thirdAudit)
+	supplierCertAppendEntity.CommitComId = strconv.Itoa(unitId)
+	supplierCertAppendEntity.AuditIndex += 1
+	certSrv.UpdateEntityByIdCols(certAppendId, supplierCertAppendEntity, cols)
+
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
+	ActiComplete.BusinessKey = supplierCertAppendEntity.BusinessKey
+	ActiComplete.UserId = this.User.Id // 当前审批操作人员
+	//ActiComplete.UserNames = secondAudit // 当前审批操作人员
+	ActiComplete.Result = "2" //分办提交给二级单位初审
+	ActiComplete.Remarks = auditRemark
+	ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
+	receiveVal := svcActiviti.TaskComplete(ActiComplete)
+	if receiveVal != "true" {
+		panic("工作流异常,请联系管理员!" + receiveVal)
+	}
+}
+
 // @Title 审批
 // @Description 审批
 // @Param 	body body suppliercert.OilSupplierCert
@@ -702,8 +798,8 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 		step = 2
 		if dataother.SuccessStatus == 1 {
 			supplierCertAppendEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
-			supplierCertAppendEntity.SecondAudit,_ = strconv.Atoi(secondAudit)
-			supplierCertAppendEntity.ThirdAudit,_ = strconv.Atoi(thirdAudit)
+			supplierCertAppendEntity.SecondAudit, _ = strconv.Atoi(secondAudit)
+			supplierCertAppendEntity.ThirdAudit, _ = strconv.Atoi(thirdAudit)
 			cols := []string{
 				"Id",
 				"FirstAudit",
@@ -853,18 +949,18 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 
 					wheresup := " SupplierCertAppendId=" + strconv.Itoa(supplierCertAppendEntity.Id) + " and Type='2'"
 					var sup []suppliercertsub.OilSupplierCertSub
-					total := svc.GetPagingEntitiesWithOrder(1,10,"Id",true,&sup,wheresup)
+					total := svc.GetPagingEntitiesWithOrder(1, 10, "Id", true, &sup, wheresup)
 
 					dictSvc := items.GetItemsService(utils.DBE)
 					appendAmt := dictSvc.GetKeyValueItems("SupplierAppend")
-					appendi,_ := strconv.Atoi(appendAmt[0].Value)
+					appendi, _ := strconv.Atoi(appendAmt[0].Value)
 					if supplierCertAppendEntity.AppendType == suppliercert.DOOGS_TYPECODE && total <= int64(appendi) { // 物资类 小于等于50条不交费
 						status = suppliercert.ALL_PASE_STATUS
 					} else {
 						paysvc := paymentinfo.GetPaymentService(utils.DBE)
 						var Amount float64
 						asvc := oilcostmanage.GetOilCostManageService(utils.DBE)
-						Amount = asvc.GetAmount("APPEND",supplierCertAppendEntity.AppendType)
+						Amount = asvc.GetAmount("APPEND", supplierCertAppendEntity.AppendType)
 						var payinfo paymentinfo.OilPaymentInfo
 						payinfo.SrcId = supplierCertAppendEntity.Id
 						payinfo.SupplierId = supplierCertAppendEntity.SupplierId
@@ -874,24 +970,24 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 						payinfo.PayType = "3"
 						payinfo.IsPay = "0"
 						payinfo.IsInvoice = "0"
-						payinfo.Amount = strconv.FormatFloat(Amount,'E',-1,64)
+						payinfo.Amount = strconv.FormatFloat(Amount, 'E', -1, 64)
 						payinfo.CreateUserId = supplierCertAppendEntity.CreateUserId
 						payinfo.CreateBy = supplierCertAppendEntity.CreateBy
 						payinfo.CreateOn = time.Now()
 						paysvc.InsertEntity(&payinfo)
 						//发短信
 						toMobile := supplierEntity.Mobile
-						bFlag:=""
-						if supplierCertAppendEntity.AppendType == "01"{
-							bFlag="物资类"
-						}else if supplierCertAppendEntity.AppendType == "02"{
-							bFlag="基建类"
-						}else{
-							bFlag="服务类"
+						bFlag := ""
+						if supplierCertAppendEntity.AppendType == "01" {
+							bFlag = "物资类"
+						} else if supplierCertAppendEntity.AppendType == "02" {
+							bFlag = "基建类"
+						} else {
+							bFlag = "服务类"
 						}
-						msg:= "您的"+ bFlag + "增项审核通过,请及时确认信息并交费!"
+						msg := "您的" + bFlag + "增项审核通过,请及时确认信息并交费!"
 						msgService := msg2.GetMsgService(utils.DBE)
-						msgService.HandleMsg(toMobile,msg,"4-1",supplierCertAppendEntity.CreateBy,supplierEntity.ContactName,strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
+						msgService.HandleMsg(toMobile, msg, "4-1", supplierCertAppendEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
 					}
 
 					//var model suppliercertsub.OilSupplierCertSub
@@ -905,7 +1001,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 					//	"ModifiedUserId",
 					//	"ModifiedBy",
 					//}
-   					//svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &model, colssup, wheresup)
+					//svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &model, colssup, wheresup)
 
 					//paysvc.AddPaymentinfo(supplierCertAppendEntity.SupplierId, supplierCertAppendEntity.Id, Amount, "3")
 				} else {
@@ -913,7 +1009,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 				}
 				//  信息变更
 				var infoitems []suppliercertappendsub.OilAppendChangeItem
-				where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) +" and InfoId = " +utils.ToStr(supplierCertAppendEntity.Id)
+				where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and InfoId = " + utils.ToStr(supplierCertAppendEntity.Id)
 				svc.GetEntities(&infoitems, where)
 				this.updatesupplier(OilSupplierName, supplierCertAppendEntity.SupplierId, infoitems)
 				// 更新资质
@@ -949,7 +1045,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 				appsvc.UpdateEntityBywheretbl(OilSupplierCertAppendName, &appendmodel, []string{"Status"}, appdwhere)
 				//  信息变更
 				var infoitems []suppliercertappendsub.OilAppendChangeItem
-				where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) +" and InfoId = " +utils.ToStr(supplierCertAppendEntity.Id)
+				where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and InfoId = " + utils.ToStr(supplierCertAppendEntity.Id)
 				svc.GetEntities(&infoitems, where)
 				this.updatesupplier(OilSupplierName, supplierCertAppendEntity.SupplierId, infoitems)
 				// 更新资质
@@ -994,7 +1090,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 				supplierCertAppendEntity.Status = backstatus
 				supplierCertAppendEntity.Step = step
 				supplierCertAppendEntity.AuditIndex = supplierCertAppendEntity.AuditIndex + 1
-			}else {
+			} else {
 				supplierCertAppendEntity.Status = backstatus
 				supplierCertAppendEntity.Step = 1
 				supplierCertAppendEntity.AuditIndex = supplierCertAppendEntity.AuditIndex + 1
@@ -1004,27 +1100,27 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 				"Step",
 				"AuditIndex",
 			}
-			_,err := svc.UpdateEntityByIdCols(appendId, supplierCertAppendEntity, cols)
+			_, err := svc.UpdateEntityByIdCols(appendId, supplierCertAppendEntity, cols)
 
 			toMobile := supplierEntity.Mobile
-			bFlag:=""
-			if supplierCertAppendEntity.AppendType == "01"{
-				bFlag="物资类"
-			}else if supplierCertAppendEntity.AppendType == "02"{
-				bFlag="基建类"
-			}else{
-				bFlag="服务类"
+			bFlag := ""
+			if supplierCertAppendEntity.AppendType == "01" {
+				bFlag = "物资类"
+			} else if supplierCertAppendEntity.AppendType == "02" {
+				bFlag = "基建类"
+			} else {
+				bFlag = "服务类"
 			}
-			msg:= "您的"+ bFlag + "增项审核未通过,请及时查看!"
+			msg := "您的" + bFlag + "增项审核未通过,请及时查看!"
 			msgService := msg2.GetMsgService(utils.DBE)
-			msgService.HandleMsg(toMobile,msg,"5-1",supplierCertAppendEntity.CreateBy,supplierEntity.ContactName,strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
+			msgService.HandleMsg(toMobile, msg, "5-1", supplierCertAppendEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
 
 			if err == nil {
 				errinfo.Message = "提交成功!"
 				errinfo.Code = 0
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
-			}else {
+			} else {
 				errinfo.Message = "提交失败!"
 				errinfo.Code = -1
 				this.Data["json"] = &errinfo
@@ -1041,7 +1137,6 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 	}
 }
 
-
 //更新供方信息表
 func (this *OilSupplierCertAppendController) updatesupplier(supname string, suppid int, infoitems []suppliercertappendsub.OilAppendChangeItem) error {
 	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
@@ -1053,7 +1148,7 @@ func (this *OilSupplierCertAppendController) updatesupplier(supname string, supp
 			where := " Id = " + utils.ToStr(suppid)
 			var sql string
 			if infoitems[i].SelectItem == "SetupTime" {
-				sql = `UPDATE ` + supname + ` set ` + infoitems[i].SelectItem + ` = '` + infoitems[i].ChangeInfo[0: 10] + `' where ` + where
+				sql = `UPDATE ` + supname + ` set ` + infoitems[i].SelectItem + ` = '` + infoitems[i].ChangeInfo[0:10] + `' where ` + where
 			} else {
 				sql = `UPDATE ` + supname + ` set ` + infoitems[i].SelectItem + ` = '` + infoitems[i].ChangeInfo + `' where ` + where
 			}
@@ -1169,7 +1264,6 @@ func (this *OilSupplierCertAppendController) DeleteNewFile() {
 	where1 := "Id=" + Id
 	err = svc.DeleteEntityBytbl(OilSupplierFileName, where1)
 
-
 	if err == nil {
 		errinfo.Message = "删除成功"
 		errinfo.Code = 0
@@ -1181,4 +1275,4 @@ func (this *OilSupplierCertAppendController) DeleteNewFile() {
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 	}
-}
+}

+ 0 - 1
src/dashoo.cn/frontend_web/package.json

@@ -20,7 +20,6 @@
     "@nuxtjs/axios": "^4.4.0",
     "axios": "^0.16.2",
     "chart.js": "^2.7.0",
-    "chromedriver": "^84.0.1",
     "cross-env": "^5.1.1",
     "echarts": "^3.8.5",
     "element-ui": "2.8.2",