|
@@ -67,6 +67,43 @@ func (s *SupplierfileService) GetGoodsNeedFileList(classid string,IsManuf ...str
|
|
|
return needList
|
|
return needList
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func (s *SupplierfileService) GetGoodsNeedFileListNew(classid string,IsManuf ...string) (needList []FileList) {
|
|
|
|
|
+ search := ""
|
|
|
|
|
+ if len(IsManuf) == 0 {
|
|
|
|
|
+ search = ""
|
|
|
|
|
+ } else {
|
|
|
|
|
+ search = IsManuf[0]
|
|
|
|
|
+ }
|
|
|
|
|
+ var entity goodsaptitude.OilGoodsAptitude
|
|
|
|
|
+ sql := "select max(F01) as F01,max(F02) as F02,max(F03) as F03,max(F04) as F04,max(F05) as F05,max(F06) as F06,max(F07) as F07,max(F08) as F08,max(F09) as F09,max(F10) as F10,"
|
|
|
|
|
+ sql += "max(F11) as F11,max(F12) as F12,max(F13) as F13,max(F14) as F14,max(F15) as F15,max(F16) as F16,max(F17) as F17,max(F18) as F18,max(F19) as F19,max(F20) as F20,"
|
|
|
|
|
+ sql += "max(F21) as F21,max(F22) as F22,max(F23) as F23,max(F24) as F24,max(F25) as F25,max(F26) as F26,max(F27) as F27,max(F28) as F28,max(F29) as F29,max(F30) as F30,"
|
|
|
|
|
+ sql += "max(F31) as F31,max(F32) as F32,max(F33) as F33,max(F34) as F34,max(F35) as F35,max(F36) as F36,max(F37) as F37,max(F38) as F38,max(F39) as F39,max(F40) as F40,"
|
|
|
|
|
+ sql += "max(F41) as F41,max(F42) as F42,max(F43) as F43,max(F44) as F44,max(F45) as F45,max(F46) as F46"
|
|
|
|
|
+ sql += " from OilGoodsAptitude where ClassId in (" + classid + ")"
|
|
|
|
|
+ s.DBE.Sql(sql).Get(&entity)
|
|
|
|
|
+
|
|
|
|
|
+ tbHeaderSvc := tableheader.GetTableHeaderService(s.DBE)
|
|
|
|
|
+ var headerList []tableheader.BaseTableheader
|
|
|
|
|
+ tbHeaderSvc.ListGoodTableHeader(&headerList)
|
|
|
|
|
+ for _, header := range headerList {
|
|
|
|
|
+ curCertConfig := reflect.ValueOf(entity)
|
|
|
|
|
+ setValue := curCertConfig.FieldByName(header.Code).String()
|
|
|
|
|
+ //if setValue != "" && setValue != "0" {
|
|
|
|
|
+ if setValue == "1" {
|
|
|
|
|
+ if search != "" {
|
|
|
|
|
+ if header.IsManuf == search || header.IsManuf == "0" {
|
|
|
|
|
+ needList = append(needList, FileList{FileName: header.Name})
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ needList = append(needList, FileList{FileName: header.Name})
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return needList
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
func (s *SupplierfileService) GetBasicNeedFileList(classid string) (needList []FileList) {
|
|
func (s *SupplierfileService) GetBasicNeedFileList(classid string) (needList []FileList) {
|
|
|
var entity basisbuild.OilBasisBuild
|
|
var entity basisbuild.OilBasisBuild
|
|
|
sql := "select * from OilBasisBuild where Id in (" + classid + ")"
|
|
sql := "select * from OilBasisBuild where Id in (" + classid + ")"
|
|
@@ -87,6 +124,29 @@ func (s *SupplierfileService) GetBasicNeedFileList(classid string) (needList []F
|
|
|
return needList
|
|
return needList
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func (s *SupplierfileService) GetBasicNeedFileListNew(classid string) (needList []FileList) {
|
|
|
|
|
+ var entity basisbuild.OilBasisBuild
|
|
|
|
|
+ sql := "select max(F01) as F01,max(F02) as F02,max(F03) as F03,max(F04) as F04,max(F05) as F05,max(F06) as F06,max(F07) as F07,max(F08) as F08,max(F09) as F09,max(F10) as F10,"
|
|
|
|
|
+ sql += "max(F11) as F11,max(F12) as F12,max(F13) as F13,max(F14) as F14,max(F15) as F15,max(F16) as F16,max(F17) as F17,max(F18) as F18,max(F19) as F19,max(F20) as F20,"
|
|
|
|
|
+ sql += "max(F21) as F21,max(F22) as F22,max(F23) as F23,max(F24) as F24,max(F25) as F25"
|
|
|
|
|
+ sql += " from OilBasisBuild where Id in (" + classid + ")"
|
|
|
|
|
+ s.DBE.Sql(sql).Get(&entity)
|
|
|
|
|
+
|
|
|
|
|
+ tbHeaderSvc := tableheader.GetTableHeaderService(s.DBE)
|
|
|
|
|
+ var headerList []tableheader.BaseTableheader
|
|
|
|
|
+ tbHeaderSvc.ListBbTableHeader(&headerList)
|
|
|
|
|
+ for _, header := range headerList {
|
|
|
|
|
+ curCertConfig := reflect.ValueOf(entity)
|
|
|
|
|
+ setValue := curCertConfig.FieldByName(header.Code).String()
|
|
|
|
|
+ //if setValue != "" && setValue != "0" {
|
|
|
|
|
+ if setValue == "1" {
|
|
|
|
|
+ needList = append(needList, FileList{FileName: header.Name})
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return needList
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
func (s *SupplierfileService) GetTechNeedFileList(classid string) (needList []FileList) {
|
|
func (s *SupplierfileService) GetTechNeedFileList(classid string) (needList []FileList) {
|
|
|
var entity technologyservice.OilTechnologyService
|
|
var entity technologyservice.OilTechnologyService
|
|
|
sql := "select * from OilTechnologyService where ClassId in (" + classid + ")"
|
|
sql := "select * from OilTechnologyService where ClassId in (" + classid + ")"
|
|
@@ -106,6 +166,32 @@ func (s *SupplierfileService) GetTechNeedFileList(classid string) (needList []Fi
|
|
|
|
|
|
|
|
return needList
|
|
return needList
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+func (s *SupplierfileService) GetTechNeedFileListNew(classid string) (needList []FileList) {
|
|
|
|
|
+ var entity technologyservice.OilTechnologyService
|
|
|
|
|
+ sql := "select max(F01) as F01,max(F02) as F02,max(F03) as F03,max(F04) as F04,max(F05) as F05,max(F06) as F06,max(F07) as F07,max(F08) as F08,max(F09) as F09,max(F10) as F10,"
|
|
|
|
|
+ sql += "max(F11) as F11,max(F12) as F12,max(F13) as F13,max(F14) as F14,max(F15) as F15,max(F16) as F16,max(F17) as F17,max(F18) as F18,max(F19) as F19,max(F20) as F20,"
|
|
|
|
|
+ sql += "max(F21) as F21,max(F22) as F22,max(F23) as F23,max(F24) as F24,max(F25) as F25,max(F26) as F26,max(F27) as F27,max(F28) as F28,max(F29) as F29,max(F30) as F30,"
|
|
|
|
|
+ sql += "max(F31) as F31,max(F32) as F32,max(F33) as F33,max(F34) as F34,max(F35) as F35,max(F36) as F36,max(F37) as F37,max(F38) as F38,max(F39) as F39,max(F40) as F40,"
|
|
|
|
|
+ sql += "max(F41) as F41,max(F42) as F42,max(F43) as F43,max(F44) as F44,max(F45) as F45,max(F46) as F46,max(F47) as F47,max(F48) as F48,max(F49) as F49,max(F50) as F50,"
|
|
|
|
|
+ sql += "max(F51) as F51,max(F52) as F52"
|
|
|
|
|
+ sql += " from OilTechnologyService where ClassId in (" + classid + ")"
|
|
|
|
|
+ s.DBE.Sql(sql).Get(&entity)
|
|
|
|
|
+
|
|
|
|
|
+ tbHeaderSvc := tableheader.GetTableHeaderService(s.DBE)
|
|
|
|
|
+ var headerList []tableheader.BaseTableheader
|
|
|
|
|
+ tbHeaderSvc.ListTsTableHeader(&headerList)
|
|
|
|
|
+ for _, header := range headerList {
|
|
|
|
|
+ curCertConfig := reflect.ValueOf(entity)
|
|
|
|
|
+ setValue := curCertConfig.FieldByName(header.Code).String()
|
|
|
|
|
+ //if setValue != "" && setValue != "0" {
|
|
|
|
|
+ if setValue == "1" {
|
|
|
|
|
+ needList = append(needList, FileList{FileName: header.Name})
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return needList
|
|
|
|
|
+}
|
|
|
//查看是否为制造商
|
|
//查看是否为制造商
|
|
|
func (s *SupplierfileService) CheckIsManuf(id string) (IsManufacturer string) {
|
|
func (s *SupplierfileService) CheckIsManuf(id string) (IsManufacturer string) {
|
|
|
var entity suppliercertsub.OilSupplierCertSub
|
|
var entity suppliercertsub.OilSupplierCertSub
|