浏览代码

判断技术服务类03

yuedefeng 5 年之前
父节点
当前提交
51d6247da9
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      src/dashoo.cn/backend/api/business/tmpzcgf/tmpzcgfSession.go

+ 8 - 8
src/dashoo.cn/backend/api/business/tmpzcgf/tmpzcgfSession.go

@@ -169,7 +169,7 @@ func (s *TmpzcgtSession) UpdateSupplierTypeCodeAndInFlag() error {
 
 func (s *TmpzcgtSession) InsterAnnual() error {
 	sql := "INSERT INTO OilAnnualAudit (Status,SupplierTypeName, SupplierName, CreateOn, CreateBy, RecUnitId, ApplyTime, AccessCardNo, OldId) " +
-		"SELECT '11' as Status ,(CASE 准入类别 WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' END ) SupplierTypeName, " +
+		"SELECT '11' as Status ,(CASE 准入类别 WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' WHEN '技术服务类' THEN '03' END ) SupplierTypeName, " +
 		"企业名称 AS SupplierName, 申请日期 AS CreateOn, 录入员 AS CreateBy, 推荐单位编码 AS RecUnitId, 年审日期 AS ApplyTime, 准入证号 AS AccessCardNo, id AS oldId " +
 		"FROM tmp_nianshen"
 
@@ -272,7 +272,7 @@ func (s *TmpzcgtSession) InsertCertSub() error {
 
 		")SELECT " +
 		"t.`ID` AS OldId , '1' AS AppendStatus, '1' AS `Type`, '导入1' AS CreateBy, t.企业名称 As Remark, " +
-		"(CASE t.`准入类别` WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' END) AS SupplierTypeCode," +
+		"(CASE t.`准入类别` WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' WHEN '技术服务类' THEN '03' END) AS SupplierTypeCode," +
 		"REPLACE(SUBSTRING_INDEX (SUBSTRING_INDEX(SUBSTRING_INDEX(t.`准入范围`,';', b.help_topic_id + 1), ';', -1),' ' ,1),'BM','') AS `code`, " +
 		"SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(t.`准入范围`,';', b.help_topic_id + 1), ';', -1),' ' ,-1)AS `name` " +
 		"FROM tmp_zcgf t " +
@@ -325,7 +325,7 @@ func (s *TmpzcgtSession) UpdateCertSub03classId(where string) error {
 
 func (s *TmpzcgtSession) InsertOilSupplierCertAppend() error {
 	//sql := " INSERT INTO OilSupplierCertAppend (OldId,CreateOn,AppendType,SupplierName,CreateBy,RecUnitId,ApplyDate) " +
-	//"select Max(id) as OldId,申请日期 as CreateOn, (case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' end) AppendType, "+
+	//"select Max(id) as OldId,申请日期 as CreateOn, (case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' WHEN '技术服务类' THEN '03' end) AppendType, "+
 	//	"企业名称 as SupplierName, 录入员 as CreateBy, 推荐单位编码 as RecUnitId, 申请日期 as ApplyDate "+
 	//	"from tmp_zengxiang "+
 	//	"group by id,申请日期,企业名称,录入员,推荐单位编码,申请日期,准入类别"
@@ -344,7 +344,7 @@ func (s *TmpzcgtSession) InsertOilSupplierCertAppend() error {
 			end := strconv.Itoa(200)
 			sql := "INSERT INTO OilSupplierCertAppend " +
 				"(Status,CreateOn,SupplierName,AppendType,CreateBy,ApplyDate,OldId) " +
-				"SELECT '11' as Status, a.`申请日期` AS CreateOn, a.`企业名称` AS SupplierName, (CASE 准入类别 WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' END) AppendType, " +
+				"SELECT '11' as Status, a.`申请日期` AS CreateOn, a.`企业名称` AS SupplierName, (CASE 准入类别 WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' WHEN '技术服务类' THEN '03' END) AppendType, " +
 				"'导入' AS CreateBy,a.`申请日期` AS ApplyDate, MAX(a.id) AS OldId " +
 				"FROM tmp_zengxiang a WHERE 企业名称 != '' GROUP BY a.`申请日期`, a.`企业名称`, a.`准入类别` ORDER BY a.`申请日期`, a.`准入类别`, a.`准入类别` " +
 				"limit " + start + "," +  end
@@ -360,7 +360,7 @@ func (s *TmpzcgtSession) InsertOilInfoChange() error {
 		"Address,ZipCode,QualitySystemCert,ProductQualityCert,MaunLicense,QualifCert,QualifCertLevel,SafetyLicense,TechServiceLic,TJInNotify, " +
 		"SpecIndustryCert,LegalPerson,CategoryCode,CategoryName,RegCapital,Currency,ContactName,CompanyType,DepositBank,BankAccount,EMail, " +
 		"BankCreditRating,Mobile,Telphone,Fax,CompanyTel,QQ,CompanyUrl,Remark,CreateOn,CreateBy,HouseNo) " +
-		"select '11' as Status, 准入证号 as AccessCardNo, 企业名称 as SupplierName, 曾用名 as OldSupplierName, 准入类别 as SupplierTypeName,(case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' end) SupplierTypeCode, " +
+		"select '11' as Status, 准入证号 as AccessCardNo, 企业名称 as SupplierName, 曾用名 as OldSupplierName, 准入类别 as SupplierTypeName,(case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' WHEN '技术服务类' THEN '03' end) SupplierTypeCode, " +
 		"中石油供应商证书号 as OilCertificateNo, 级别 as Grade, 经营方式 as OperType, 国家 as Country, 所代理制造商名称 as MaunAgent, 施工队伍名称 as ConstructTeam, 工商注册号 as CommercialNo, 组织机构代码 as OrganCode, " +
 		"税务登记证国税编号 as CountryTaxNo, 税务登记证地税编号 as LocalTaxNo, 单位地址 as Address, 邮编 AS ZipCode, 质量管理体系认证情况及认证机构 AS QualitySystemCert, 产品质量认证情况及认证机构 AS ProductQualityCert, " +
 		"生产制造许可证获证情况及编号 AS MaunLicense, 企业资质证书编号 AS QualifCert, 企业资质证书级别 AS QualifCertLevel, 安全生产许可证 AS SafetyLicense, 技术服务类准入许可证 AS TechServiceLic, 外地企业进津备案通知书 AS TJInNotify, " +
@@ -373,7 +373,7 @@ func (s *TmpzcgtSession) InsertOilInfoChange() error {
 
 func (s *TmpzcgtSession) InsertOilSupplierCertSub() error {
 	sql := "insert into OilSupplierCertSub (ModifiedBy,Type, OldId, SupplierTypeCode, Code, Name, Remark, CreateOn, CreateBy) " +
-		"select 企业名称 as ModifiedBy,'3' as Type, id as OldId, ( case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' end ) SupplierTypeCode, 物资编码 as Code, 产品名称 as Name, 备注 as Remark, 申请日期 as CreateOn, 录入员 as CreateBy " +
+		"select 企业名称 as ModifiedBy,'3' as Type, id as OldId, ( case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' WHEN '技术服务类' THEN '03' end ) SupplierTypeCode, 物资编码 as Code, 产品名称 as Name, 备注 as Remark, 申请日期 as CreateOn, 录入员 as CreateBy " +
 		"ORDER BY a.`申请日期`, a.`准入类别`, a.`准入类别` " +
 		"from tmp_zengxiang "
 	_, err := s.DBE.Query(sql)
@@ -393,7 +393,7 @@ func (s *TmpzcgtSession) InsertOilSupplierCertSub() error {
 			start := strconv.Itoa(i * 200)
 			end := strconv.Itoa(200)
 			sql := "insert into OilSupplierCertSub (ModifiedBy,Type, OldId, SupplierTypeCode, Code, Name, Remark, CreateOn, CreateBy) " +
-				"select 企业名称 as ModifiedBy,'3' as Type, id as OldId, ( case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' end ) SupplierTypeCode, 物资编码 as Code, 产品名称 as Name, 备注 as Remark, 申请日期 as CreateOn, 录入员 as CreateBy " +
+				"select 企业名称 as ModifiedBy,'3' as Type, id as OldId, ( case 准入类别 when '物资类' then '01' when '基建类' then '02' when '服务类' then '03' WHEN '技术服务类' THEN '03' end ) SupplierTypeCode, 物资编码 as Code, 产品名称 as Name, 备注 as Remark, 申请日期 as CreateOn, 录入员 as CreateBy " +
 				"from tmp_zengxiang " +
 				"limit " + start + "," +  end
 			_, err = s.DBE.Query(sql)
@@ -440,7 +440,7 @@ func (s *TmpzcgtSession) UpdateCertSubIsType2(where string) error {
 func (s *TmpzcgtSession) InsertFileName() error {
 	sql := "INSERT INTO `OilSupplierFile` (SupplierId, SupplierCertSubId, Remark, NeedFileType, OtherRemark, SupplierTypeCode,CreateBy) " +
 		"SELECT 0 AS SupplierId, 0 AS SupplierCertSubId, z.企业名称 AS Remark ,f.类别 AS NeedFileType, f.说明 AS OtherRemark, " +
-		"( CASE 准入类别 WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' else '000' END ) SupplierTypeCode, " +
+		"( CASE 准入类别 WHEN '物资类' THEN '01' WHEN '基建类' THEN '02' WHEN '服务类' THEN '03' WHEN '技术服务类' THEN '03' else '000' END ) SupplierTypeCode, " +
 		"'导入' AS CreateBy " +
 		"FROM `tmp_file` f " +
 		"LEFT JOIN `tmp_zcgf` z ON (f.ID_GF = z.ID) " +