ソースを参照

后端: 资质配置的物资类 编码 字段按右侧模糊匹配查询

baichengfei 4 年 前
コミット
bba18cb739

+ 58 - 65
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -85,7 +85,7 @@ func (this *OilGoodsAptitudeController) GetEntityList() {
 		where = where + " and Edition = '" + Edition + "'"
 	}
 	if Code != "" {
-		where = where + " and Code like '%" + Code + "%'"
+		where = where + " and Code like '" + Code + "%'"
 	}
 
 	if Name != "" {
@@ -1074,7 +1074,7 @@ func (this *OilGoodsAptitudeController) UpdateCodeEntity() {
 	var model1 goodsaptitude.OilGoodsAptitude
 	colsGoods := []string{"GoodsLevel"}
 	model1.GoodsLevel = goodsLevel.GoodsLevel
-	svc.UpdateEntityBywheretbl(OilGoodsAptitudeName, &model1 , colsGoods, "ClassId = " + id)
+	svc.UpdateEntityBywheretbl(OilGoodsAptitudeName, &model1, colsGoods, "ClassId = "+id)
 
 	if err == nil {
 		errinfo.Message = "修改成功!"
@@ -1147,7 +1147,7 @@ func (this *OilGoodsAptitudeController) DeleteList() {
 	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
 	idArr := strings.Split(Ids, ",")
 	for _, id := range idArr {
-		err := svc.DeleteEntityBytbl("OilSupplierCertSub", " SubClassId = " + id)
+		err := svc.DeleteEntityBytbl("OilSupplierCertSub", " SubClassId = "+id)
 		if err == nil {
 			errinfo.Message = "删除成功"
 			errinfo.Code = 0
@@ -1184,7 +1184,7 @@ func (this *OilGoodsAptitudeController) Changelist() {
 	cols := []string{"CertSubStatus"}
 	model.CertSubStatus = "2"
 	for _, id := range idArr {
-		err := svc.UpdateEntityBywheretbl("OilSupplierCertSub", &model, cols, " SubClassId = " + id)
+		err := svc.UpdateEntityBywheretbl("OilSupplierCertSub", &model, cols, " SubClassId = "+id)
 		if err == nil {
 			errinfo.Message = "变更成功"
 			errinfo.Code = 0
@@ -1208,9 +1208,9 @@ func (this *OilGoodsAptitudeController) GoodsParentList() {
 	Level := this.GetString("level")
 	SupplierId := this.GetString("SupplierId")
 	if SupplierId != "" {
-		svc :=supplier.GetOilSupplierService(utils.DBE)
+		svc := supplier.GetOilSupplierService(utils.DBE)
 		var supplier supplier.OilSupplier
-		svc.GetEntityByWhere(OilSupplierName, "Id = " + SupplierId, &supplier)
+		svc.GetEntityByWhere(OilSupplierName, "Id = "+SupplierId, &supplier)
 		Level = supplier.Grade
 	}
 	if Name != "" {
@@ -1220,7 +1220,7 @@ func (this *OilGoodsAptitudeController) GoodsParentList() {
 			where1 += " and (goods.GoodsLevel is null or goods.GoodsLevel = " + Level + ") "
 		}
 
-			sqlStr := "SELECT class.Id, Code, Name, concat(Code, '  ', Name) as CodeName, ParentId,goods.GoodsLevel FROM OilGoodsAptitudeClass class left join OilGoodsAptitude goods on goods.ClassId = class.Id " +
+		sqlStr := "SELECT class.Id, Code, Name, concat(Code, '  ', Name) as CodeName, ParentId,goods.GoodsLevel FROM OilGoodsAptitudeClass class left join OilGoodsAptitude goods on goods.ClassId = class.Id " +
 			"WHERE " + where1 + " AND class.Edition='1' AND class.DeletionStateCode = 0 ORDER BY Code"
 		list, _ := svc.DBE.QueryString(sqlStr)
 		/*
@@ -1260,7 +1260,7 @@ func (this *OilGoodsAptitudeController) GoodsChildLisByParentId() {
 	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
 	if SupplierId != "" {
 		var supplier supplier.OilSupplier
-		svc.GetEntityByWhere(OilSupplierName, "Id = " + SupplierId, &supplier)
+		svc.GetEntityByWhere(OilSupplierName, "Id = "+SupplierId, &supplier)
 		GoodsLevel = supplier.Grade
 	}
 	where := ""
@@ -1334,22 +1334,21 @@ func (this *OilGoodsAptitudeController) ExportExcelAll() {
 
 	intsix := svc.GetNumOfPass("0")
 	intStr := strconv.FormatInt(intsix, 10)
-	alluse ,_ := strconv.Atoi(intStr)
+	alluse, _ := strconv.Atoi(intStr)
 	for i := 0; i < alluse+12; i++ {
 		row.Cells[i].Merge(0, 1)
 	}
 	intsix1 := svc.GetNumOfPass("2")
 	intStr1 := strconv.FormatInt(intsix1, 10)
-	traker ,_ := strconv.Atoi(intStr1)
-	row.Cells[alluse+12].Merge(traker-1,0)
+	traker, _ := strconv.Atoi(intStr1)
+	row.Cells[alluse+12].Merge(traker-1, 0)
 	row.Cells[alluse+12].Value = "贸易产品"
 	intsix2 := svc.GetNumOfPass("1")
 	intStr2 := strconv.FormatInt(intsix2, 10)
-	maker ,_ := strconv.Atoi(intStr2)
-	row.Cells[alluse+12+traker].Merge(maker-1,0)
+	maker, _ := strconv.Atoi(intStr2)
+	row.Cells[alluse+12+traker].Merge(maker-1, 0)
 	row.Cells[alluse+12+traker].Value = "制造产品"
 
-
 	for _, item := range list {
 		var enumModel goodsaptitude.OilGoodsAptitudeView
 		tmpModel := &item
@@ -1886,7 +1885,6 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 			mergerCertSkipField = paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MergerCertSkipFieldName")
 		}
 
-
 		// 准入项
 		//for idx, supplierCertSub := range supplierCertSubList {
 
@@ -1934,7 +1932,7 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 						whereg := "ClassId = " + strconv.Itoa(goodsaptitudeClass.Id)
 						supsvc.GetEntity(&goodsAptitude, whereg)
 						if goodsAptitude.GoodsLevel != supplierCertSub.GoodsLevel {
-							if goodsAptitude.GoodsLevel == "1" && supplier.Grade == "2"  {
+							if goodsAptitude.GoodsLevel == "1" && supplier.Grade == "2" {
 								supsvc.InsertEntityBytbl(TmpOilSupplierCertSubName, supplierCertSub)
 							} else {
 								var entity suppliercertsub.OilSupplierCertSub
@@ -2269,7 +2267,7 @@ func (this *OilGoodsAptitudeController) GetDelCertSubList() {
 	a := 0
 	for _, item := range list {
 		sql := "SELECT CONCAT_WS(',',IF(ifnull(F01, '') = '', '', F01),IF(ifnull(F02, '') = '', '', F02),IF(ifnull(F03, '') = '', '', F03),IF(ifnull(F04, '') = '', '', F04),IF(ifnull(F05, '') = '', '', F05),IF(ifnull(F06, '') = '', '', F06),IF(ifnull(F07, '') = '', '', F07),IF(ifnull(F08, '') = '', '', F08),IF(ifnull(F09, '') = '', '', F09),IF(ifnull(F10, '') = '', '', F10),IF(ifnull(F11, '') = '', '', F11),IF(ifnull(F12, '') = '', '', F12),IF(ifnull(F13, '') = '', '', F13),IF(ifnull(F14, '') = '', '', F14),IF(ifnull(F15, '') = '', '', F15),IF(ifnull(F16, '') = '', '', F16),IF(ifnull(F17, '') = '', '', F17),IF(ifnull(F18, '') = '', '', F18),IF(ifnull(F19, '') = '', '', F19),IF(ifnull(F20, '') = '', '', F20),IF(ifnull(F21, '') = '', '', F21),IF(ifnull(F22, '') = '', '', F22),IF(ifnull(F23, '') = '', '', F23),IF(ifnull(F24, '') = '', '', F24),IF(ifnull(F25, '') = '', '', F25),IF(ifnull(F26, '') = '', '', F26),IF(ifnull(F27, '') = '', '', F27),IF(ifnull(F28, '') = '', '', F28),IF(ifnull(F29, '') = '', '', F29),IF(ifnull(F30, '') = '', '', F30),IF(ifnull(F31, '') = '', '', F31),IF(ifnull(F32, '') = '', '', F32),IF(ifnull(F33, '') = '', '', F33),IF(ifnull(F34, '') = '', '', F34),IF(ifnull(F35, '') = '', '', F35),IF(ifnull(F36, '') = '', '', F36),IF(ifnull(F37, '') = '', '', F37),IF(ifnull(F38, '') = '', '', F38),IF(ifnull(F39, '') = '', '', F39),IF(ifnull(F40, '') = '', '', F40),IF(ifnull(F41, '') = '', '', F41),IF(ifnull(F42, '') = '', '', F42),IF(ifnull(F43, '') = '', '', F43),IF(ifnull(F44, '') = '', '', F44),IF(ifnull(F45, '') = '', '', F45),IF(ifnull(F46, '') = '', '', F46)) AS Codes FROM tmp_OilGoodsAptitude a LEFT JOIN tmp_OilGoodsAptitudeClass class ON a.ClassId = class.Id"
-		sql += " where class.Code = '"+ item.Code + "'"
+		sql += " where class.Code = '" + item.Code + "'"
 		model, _ := svc.DBE.QueryString(sql)
 		if model != nil {
 			code := strings.Split(model[0]["Codes"], ",")
@@ -2287,16 +2285,16 @@ func (this *OilGoodsAptitudeController) GetDelCertSubList() {
 				} else if i > 10 {
 					if value == "1" && strings.Index(item.HeaderCodes, "F"+strconv.Itoa(i)) < 0 {
 						list[a].Checked = 1
-						sql1 := "select Name from Base_TableHeader where Code = 'F"+strconv.Itoa(i)+"' and CategoryCode = '01'"
+						sql1 := "select Name from Base_TableHeader where Code = 'F" + strconv.Itoa(i) + "' and CategoryCode = '01'"
 						model1, _ := svc.DBE.QueryString(sql1)
-						list[a].HeaderName += model1[0]["Name"]+ " "
+						list[a].HeaderName += model1[0]["Name"] + " "
 					}
 				} else {
 					if value == "1" && strings.Index(item.HeaderCodes, "F0"+strconv.Itoa(i)) < 0 {
 						list[a].Checked = 1
-						sql1 := "select Name from Base_TableHeader where Code = 'F0"+strconv.Itoa(i)+"' and CategoryCode = '01'"
+						sql1 := "select Name from Base_TableHeader where Code = 'F0" + strconv.Itoa(i) + "' and CategoryCode = '01'"
 						model1, _ := svc.DBE.QueryString(sql1)
-						list[a].HeaderName += model1[0]["Name"]+ " "
+						list[a].HeaderName += model1[0]["Name"] + " "
 					}
 				}
 				i += 1
@@ -2354,7 +2352,7 @@ func (this *OilGoodsAptitudeController) DelTmpSupplierCertSub() {
 		svc1.GetEntitysByWhere(OilSupplierCertSubName, where, &supplierCertSubList)
 		for _, item := range supplierCertSubList {
 			sql := "SELECT CONCAT_WS(',',IF(ifnull(F01, '') = '', '', F01),IF(ifnull(F02, '') = '', '', F02),IF(ifnull(F03, '') = '', '', F03),IF(ifnull(F04, '') = '', '', F04),IF(ifnull(F05, '') = '', '', F05),IF(ifnull(F06, '') = '', '', F06),IF(ifnull(F07, '') = '', '', F07),IF(ifnull(F08, '') = '', '', F08),IF(ifnull(F09, '') = '', '', F09),IF(ifnull(F10, '') = '', '', F10),IF(ifnull(F11, '') = '', '', F11),IF(ifnull(F12, '') = '', '', F12),IF(ifnull(F13, '') = '', '', F13),IF(ifnull(F14, '') = '', '', F14),IF(ifnull(F15, '') = '', '', F15),IF(ifnull(F16, '') = '', '', F16),IF(ifnull(F17, '') = '', '', F17),IF(ifnull(F18, '') = '', '', F18),IF(ifnull(F19, '') = '', '', F19),IF(ifnull(F20, '') = '', '', F20),IF(ifnull(F21, '') = '', '', F21),IF(ifnull(F22, '') = '', '', F22),IF(ifnull(F23, '') = '', '', F23),IF(ifnull(F24, '') = '', '', F24),IF(ifnull(F25, '') = '', '', F25),IF(ifnull(F26, '') = '', '', F26),IF(ifnull(F27, '') = '', '', F27),IF(ifnull(F28, '') = '', '', F28),IF(ifnull(F29, '') = '', '', F29),IF(ifnull(F30, '') = '', '', F30),IF(ifnull(F31, '') = '', '', F31),IF(ifnull(F32, '') = '', '', F32),IF(ifnull(F33, '') = '', '', F33),IF(ifnull(F34, '') = '', '', F34),IF(ifnull(F35, '') = '', '', F35),IF(ifnull(F36, '') = '', '', F36),IF(ifnull(F37, '') = '', '', F37),IF(ifnull(F38, '') = '', '', F38),IF(ifnull(F39, '') = '', '', F39),IF(ifnull(F40, '') = '', '', F40),IF(ifnull(F41, '') = '', '', F41),IF(ifnull(F42, '') = '', '', F42),IF(ifnull(F43, '') = '', '', F43),IF(ifnull(F44, '') = '', '', F44),IF(ifnull(F45, '') = '', '', F45),IF(ifnull(F46, '') = '', '', F46)) AS Codes FROM OilGoodsAptitude a LEFT JOIN OilGoodsAptitudeClass class ON a.ClassId = class.Id"
-			sql += " where class.Code = '"+ item.Code + "'"
+			sql += " where class.Code = '" + item.Code + "'"
 			model, err := svc1.DBE.QueryString(sql)
 			if len(model) == 0 {
 				where := "Id = " + strconv.Itoa(item.Id)
@@ -2438,7 +2436,6 @@ func (this *OilGoodsAptitudeController) DelTmpSupplierCertSub() {
 	}
 }
 
-
 // @Title 新导入资质后,比对不合格的准入用户
 // @Description 对比列表
 // @Success 200 {object} []supplier.OilSupplierSelect
@@ -2496,11 +2493,11 @@ func (this *OilGoodsAptitudeController) GetCompareTmpSupplier() {
 		where = where + " and Name like '%" + Name + "%'"
 	}
 
-	if Conditions == "2"{
+	if Conditions == "2" {
 		where = where + " and NoSubCnt > 0"
-	} else if Conditions == "3"{
+	} else if Conditions == "3" {
 		where = where + " and Checked = '0'"
-	} else if Conditions == "4"{
+	} else if Conditions == "4" {
 		where = where + " and Checked = '1"
 	}
 
@@ -2549,7 +2546,6 @@ func (this *OilGoodsAptitudeController) GetCompareTmpSupplier() {
 	this.ServeJSON()
 }
 
-
 // @Title 确认更新后的待删除准入范围列表
 // @Description get compare tmp supplier
 // @Success 200 {object} []supplier.OilSupplierSelect
@@ -2666,7 +2662,7 @@ func (this *OilGoodsAptitudeController) ExeclExport() {
 	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
 	var list2 []supplier.OilSupplierContrast
 	where := " 1=1"
-	svc.GetMyPagingEntitiesWithOrderBytbl("OilSupplierContrast", 0,0, "Id", false, &list2, where)
+	svc.GetMyPagingEntitiesWithOrderBytbl("OilSupplierContrast", 0, 0, "Id", false, &list2, where)
 
 	fileName := "资质导入对比表.xlsx"
 	Url := utils.Cfg.MustValue("workflow", "ContrastExcel")
@@ -2830,18 +2826,16 @@ func (this *OilGoodsAptitudeController) OilCompare() {
 		session.Close()
 	}()
 
-
 	var Comparelist []suppliercertsub.OilCompare
 	var Comparelistnow []suppliercertsub.OilCompare
 	var Compare suppliercertsub.OilCompare
 	var CompanyName string
 
-
 	for i := 2; i < len(sheet.Rows); i++ {
-		if inputcode != "" && inputcode != sheet.Rows[i].Cells[0].Value{
+		if inputcode != "" && inputcode != sheet.Rows[i].Cells[0].Value {
 			continue
 		}
-		if inputname !="" && inputname != sheet.Rows[i].Cells[4].Value {
+		if inputname != "" && inputname != sheet.Rows[i].Cells[4].Value {
 			continue
 		}
 		var List []supplier.OilSupplier
@@ -2888,11 +2882,11 @@ func (this *OilGoodsAptitudeController) OilCompare() {
 			}
 		}
 		if Compare.Diff == "0" {
-			Comparelistnow = append(Comparelistnow,Compare)
+			Comparelistnow = append(Comparelistnow, Compare)
 		}
 	}
-	for _,nowlist := range Comparelistnow {
-		Comparelist = append(Comparelist,nowlist)
+	for _, nowlist := range Comparelistnow {
+		Comparelist = append(Comparelist, nowlist)
 	}
 
 	os.Remove(filePath)
@@ -2918,12 +2912,12 @@ func (this *OilGoodsAptitudeController) PdfExport() {
 	svc := supplierdataentry.GetSupplierDataEntryService(utils.DBE)
 	where1 := "1=1"
 	where1 += " AND Id = '" + Id + "'"
-	where2 := "SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"'"
+	where2 := "SupplierId = '" + Id + "' and SupplierTypecode='" + SupplierTypeCode + "'"
 	svc.GetEntityByWhere(OilSupplierName, where1, &model1)
 	svc.GetEntityByWhere(OilSupplierCertName, where2, &model2)
 
 	var tabledata []supplierdataentry.SupplierCertSubEntry
-	where3:="SupplierId = '" + Id + "' and SupplierTypecode='"+ SupplierTypeCode +"' and Type in ('1','3')"//准入状态的准入项
+	where3 := "SupplierId = '" + Id + "' and SupplierTypecode='" + SupplierTypeCode + "' and Type in ('1','3')" //准入状态的准入项
 	svc.GetEntitysByOrderbyWhere(TmpOilSupplierCertSubName, where3, "1", &tabledata)
 
 	datamap := structToMapDemo(model1.OilSupplier)
@@ -2951,28 +2945,28 @@ func (this *OilGoodsAptitudeController) PdfExport() {
 		datamap["HseTraining"] = "否"
 	}
 	if model1.OperType != "" {
-		if model1.OperType == "1" || model1.OperType == "制造商"{
+		if model1.OperType == "1" || model1.OperType == "制造商" {
 			datamap["OperType"] = "√制造商 □代理商 □贸易商"
-		}else if model1.OperType == "2" || model1.OperType == "代理商"{
+		} else if model1.OperType == "2" || model1.OperType == "代理商" {
 			datamap["OperType"] = "□制造商 √代理商 □贸易商"
-		}else if model1.OperType == "3" || model1.OperType == "代理商"{
+		} else if model1.OperType == "3" || model1.OperType == "代理商" {
 			datamap["OperType"] = "□制造商 □代理商 √贸易商"
-		}else {
+		} else {
 			datamap["OperType"] = "□制造商 □代理商 □贸易商"
 		}
 	}
 	if model1.SpecTypeCode != "" {
-		if model1.SpecTypeCode == "1"{
+		if model1.SpecTypeCode == "1" {
 			datamap["SpecTypeCode"] = "√一般外部 □多元企业"
-		}else if model1.SpecTypeCode == "2"{
+		} else if model1.SpecTypeCode == "2" {
 			datamap["SpecTypeCode"] = "□一般外部 √多元企业"
-		}else {
+		} else {
 			datamap["SpecTypeCode"] = "□一般外部 □多元企业"
 		}
 	}
-	if model1.Grade == "1"{
+	if model1.Grade == "1" {
 		datamap["Grade"] = "一级"
-	}else if model1.SpecTypeCode == "2"{
+	} else if model1.SpecTypeCode == "2" {
 		datamap["Grade"] = "二级"
 	}
 	datamap["Fax"] = model1.Fax
@@ -2995,7 +2989,7 @@ func (this *OilGoodsAptitudeController) PdfExport() {
 	datamap["LegalPerson"] = model1.LegalPerson
 	datamap["CompanyType"] = model1.CompanyType
 	datamap["ContactName"] = model1.ContactName
-	datamap["RegCapital"] = strconv.FormatFloat(model1.RegCapital,'f',2,64)+"万元"+model1.Currency
+	datamap["RegCapital"] = strconv.FormatFloat(model1.RegCapital, 'f', 2, 64) + "万元" + model1.Currency
 	datamap["DepositBank"] = model1.DepositBank
 	datamap["BankAccount"] = model1.BankAccount
 	datamap["Mobile"] = model1.Mobile
@@ -3012,7 +3006,7 @@ func (this *OilGoodsAptitudeController) PdfExport() {
 
 	if len(tabledata) != 0 {
 		var Name string
-		Name = "\n待删除准入范围:"+ tabledata[0].Code
+		Name = "\n待删除准入范围:" + tabledata[0].Code
 		Name = Name + " " + tabledata[0].Name
 		var i int
 		for i = 1; i < len(tabledata); i++ {
@@ -3024,14 +3018,13 @@ func (this *OilGoodsAptitudeController) PdfExport() {
 		//	Name += "(准入范围未完全显示,请到系统查看详情)"
 		//}
 
-		datamap["Name"] =datamap["Name"].(string) + Name
+		datamap["Name"] = datamap["Name"].(string) + Name
 	} else {
-		datamap["Name"] =datamap["Name"].(string)
+		datamap["Name"] = datamap["Name"].(string)
 	}
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
 
-
 	retDocUrl := svcActiviti.FillWordTemplate(datamap, Url, fileName)
 	var datainfo ErrorDataInfo
 	datainfo.Code = 0
@@ -3053,7 +3046,7 @@ func (this *OilGoodsAptitudeController) DeleteUpdate() {
 		svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
 		var list1 []goodsaptitude.GoodsBusiness1
 		svc.GetEntityJoin(OilGoodsAptitudeName, OilGoodsAptitudeClassName, &list1)
-		for _,item := range list1{
+		for _, item := range list1 {
 			var subDelete suppliercertsub.OilSupplierCertSub1
 			cols := []string{"SubClassId", "GoodsLevel", "Name"}
 			subDelete.GoodsLevel = item.GoodsLevel
@@ -3061,17 +3054,17 @@ func (this *OilGoodsAptitudeController) DeleteUpdate() {
 			subDelete.SubClassId = item.Id
 			if item.GoodsLevel == "2" {
 				// 1降2修改
-				err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "SupplierTypeCode = '01' and Code = '" + item.Code + "'")
+				err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "SupplierTypeCode = '01' and Code = '"+item.Code+"'")
 			} else {
-				err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "SupplierTypeCode = '01' and (GoodsLevel = '1' or GoodsLevel is null) and Code = '" + item.Code + "'")
+				err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "SupplierTypeCode = '01' and (GoodsLevel = '1' or GoodsLevel is null) and Code = '"+item.Code+"'")
 				//2升1删除
-				err = svc.DeleteTable (OilSupplierCertSubName, "SupplierTypeCode = '01' and GoodsLevel = '2' and Code = '" + item.Code + "'")
+				err = svc.DeleteTable(OilSupplierCertSubName, "SupplierTypeCode = '01' and GoodsLevel = '2' and Code = '"+item.Code+"'")
 			}
 		}
 		var list []goodsaptitude.Ids
 		svc.DeleteTableBySelect(OilSupplierCertSubName, OilGoodsAptitudeClassName, "a.SupplierTypeCode='01' AND b.Id IS NULL", &list, "Code")
-		for _,id := range list{
-			err = svc.DeleteTable(OilSupplierCertSubName, "Id = " + strconv.Itoa(id.Id))
+		for _, id := range list {
+			err = svc.DeleteTable(OilSupplierCertSubName, "Id = "+strconv.Itoa(id.Id))
 		}
 	}()
 	errinfo.Message = "更新中,请勿重复更新!"
@@ -3093,12 +3086,12 @@ func (this *OilGoodsAptitudeController) Suspend() {
 		svc.GetEntitysByWhere("OilSupplierContrast", "Checked = '0'", &list)
 		paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
 		DueTimeStr := paramSvc.GetBaseparameterMessage("GFZT", "paramset", "Suspend")
-		for _,item := range list{
+		for _, item := range list {
 			var sub []suppliercertsub.OilSupplierCertSub
-			svc.GetEntitysByWhere("OilSupplierCertSub", "SupplierTypeCode = '01' and SupplierId = " + strconv.Itoa(item.Id), &sub)
+			svc.GetEntitysByWhere("OilSupplierCertSub", "SupplierTypeCode = '01' and SupplierId = "+strconv.Itoa(item.Id), &sub)
 			for _, itemSub := range sub {
 				sql := "SELECT CONCAT_WS(',',IF(ifnull(F01, '') = '', '', F01),IF(ifnull(F02, '') = '', '', F02),IF(ifnull(F03, '') = '', '', F03),IF(ifnull(F04, '') = '', '', F04),IF(ifnull(F05, '') = '', '', F05),IF(ifnull(F06, '') = '', '', F06),IF(ifnull(F07, '') = '', '', F07),IF(ifnull(F08, '') = '', '', F08),IF(ifnull(F09, '') = '', '', F09),IF(ifnull(F10, '') = '', '', F10),IF(ifnull(F11, '') = '', '', F11),IF(ifnull(F12, '') = '', '', F12),IF(ifnull(F13, '') = '', '', F13),IF(ifnull(F14, '') = '', '', F14),IF(ifnull(F15, '') = '', '', F15),IF(ifnull(F16, '') = '', '', F16),IF(ifnull(F17, '') = '', '', F17),IF(ifnull(F18, '') = '', '', F18),IF(ifnull(F19, '') = '', '', F19),IF(ifnull(F20, '') = '', '', F20),IF(ifnull(F21, '') = '', '', F21),IF(ifnull(F22, '') = '', '', F22),IF(ifnull(F23, '') = '', '', F23),IF(ifnull(F24, '') = '', '', F24),IF(ifnull(F25, '') = '', '', F25),IF(ifnull(F26, '') = '', '', F26),IF(ifnull(F27, '') = '', '', F27),IF(ifnull(F28, '') = '', '', F28),IF(ifnull(F29, '') = '', '', F29),IF(ifnull(F30, '') = '', '', F30),IF(ifnull(F31, '') = '', '', F31),IF(ifnull(F32, '') = '', '', F32),IF(ifnull(F33, '') = '', '', F33),IF(ifnull(F34, '') = '', '', F34),IF(ifnull(F35, '') = '', '', F35),IF(ifnull(F36, '') = '', '', F36),IF(ifnull(F37, '') = '', '', F37),IF(ifnull(F38, '') = '', '', F38),IF(ifnull(F39, '') = '', '', F39),IF(ifnull(F40, '') = '', '', F40),IF(ifnull(F41, '') = '', '', F41),IF(ifnull(F42, '') = '', '', F42),IF(ifnull(F43, '') = '', '', F43),IF(ifnull(F44, '') = '', '', F44),IF(ifnull(F45, '') = '', '', F45),IF(ifnull(F46, '') = '', '', F46)) AS Codes,a.GoodsLevel,class.Name  FROM OilGoodsAptitude a LEFT JOIN OilGoodsAptitudeClass class ON a.ClassId = class.Id"
-				sql += " where class.Code = '"+ itemSub.Code + "'"
+				sql += " where class.Code = '" + itemSub.Code + "'"
 				model, _ := svc.DBE.QueryString(sql)
 				var subDelete suppliercertsub.OilSupplierCertSub1
 				if model != nil {
@@ -3106,14 +3099,14 @@ func (this *OilGoodsAptitudeController) Suspend() {
 					cols := []string{"DueTime", "CertSubStatus"}
 					subDelete.CertSubStatus = "2"
 					currentTime := time.Now()
-					days,_ := strconv.Atoi(DueTimeStr)
+					days, _ := strconv.Atoi(DueTimeStr)
 					subDelete.DueTime = currentTime.AddDate(0, 0, days)
 					i := 1
 					//暂停
 					for _, value := range code {
 						if i == 36 || i == 37 || i == 1 {
 							if (code[0] == "1" && strings.Index(item.HeaderCodes, "F01") < 0) && (code[35] == "1" && strings.Index(item.HeaderCodes, "F36") < 0) && (code[36] == "1" && strings.Index(item.HeaderCodes, "F37") < 0) {
-								err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
+								err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
 								var model1 supplierpausereason.OilSupplierPauseReason
 								model1.SupplierId = item.Id
 								model1.CertSubId = itemSub.Id
@@ -3128,7 +3121,7 @@ func (this *OilGoodsAptitudeController) Suspend() {
 							}
 						} else if i > 10 {
 							if value == "1" && strings.Index(item.HeaderCodes, "F"+strconv.Itoa(i)) < 0 {
-								err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
+								err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
 								var model1 supplierpausereason.OilSupplierPauseReason
 								model1.SupplierId = item.Id
 								model1.CertSubId = itemSub.Id
@@ -3143,7 +3136,7 @@ func (this *OilGoodsAptitudeController) Suspend() {
 							}
 						} else {
 							if value == "1" && strings.Index(item.HeaderCodes, "F0"+strconv.Itoa(i)) < 0 {
-								err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
+								err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
 								var model1 supplierpausereason.OilSupplierPauseReason
 								model1.SupplierId = item.Id
 								model1.CertSubId = itemSub.Id
@@ -3167,4 +3160,4 @@ func (this *OilGoodsAptitudeController) Suspend() {
 	errinfo.Code = 0
 	this.Data["json"] = &errinfo
 	this.ServeJSON()
-}
+}