2
3
Преглед на файлове

Merge branch 'develop' of http://code.dashoo.cn/dashoo/supplier_system into develop

王宇昕 преди 5 години
родител
ревизия
ac6acd512a
променени са 22 файла, в които са добавени 1909 реда и са изтрити 248 реда
  1. 69 0
      src/dashoo.cn/backend/api/business/oilsupplier/basisbuild/oilbasisbuild.go
  2. 209 0
      src/dashoo.cn/backend/api/business/oilsupplier/basisbuild/oilbasisbuildService.go
  3. 4 0
      src/dashoo.cn/backend/api/business/workflow/ActivitiService.go
  4. 1 1
      src/dashoo.cn/backend/api/conf/app.conf
  5. 1 1
      src/dashoo.cn/backend/api/controllers/oilcontract/contractEvaluationItems.go
  6. 4 6
      src/dashoo.cn/backend/api/controllers/oilcontract/contractReview.go
  7. 486 3
      src/dashoo.cn/backend/api/controllers/oilsupplier/basisbuild.go
  8. 94 124
      src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go
  9. 5 0
      src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go
  10. 85 92
      src/dashoo.cn/backend/api/controllers/oilsupplier/technologyservice.go
  11. BIN
      src/dashoo.cn/doc/资质对比导出模板.xlsx
  12. 32 0
      src/dashoo.cn/frontend_web/src/api/oilsupplier/basisbuild.js
  13. 31 4
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/index.vue
  14. 284 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/tmpclasscheck.vue
  15. 562 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/tmpsuppliercheck.vue
  16. 5 5
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/index.vue
  17. 1 3
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/tmpsuppliercheck.vue
  18. 10 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/basislist.vue
  19. 10 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/goodslist.vue
  20. 10 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/techlist.vue
  21. 5 5
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/index.vue
  22. 1 3
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/tmpsuppliercheck.vue

+ 69 - 0
src/dashoo.cn/backend/api/business/oilsupplier/basisbuild/oilbasisbuild.go

@@ -69,4 +69,73 @@ type OilBasisBuildF struct {
 	F23               string    `xorm:"default '' VARCHAR(2)"`
 	F24               string    `xorm:"default '' VARCHAR(2)"`
 	F25               string    `xorm:"default '' VARCHAR(2)"`
+}
+
+type OilBasisBuildTmp struct {
+	Code             string `xorm:"default '' VARCHAR(50) 'code'"`
+	Name             string `xorm:"default '' VARCHAR(50) 'name'"`
+	Id                int       `xorm:"not null pk autoincr INT(10)"`
+	F01               string    `xorm:"default '' VARCHAR(2)"`
+	F02               string    `xorm:"default '' VARCHAR(2)"`
+	F03               string    `xorm:"default '' VARCHAR(2)"`
+	F04               string    `xorm:"default '' VARCHAR(2)"`
+	F05               string    `xorm:"default '' VARCHAR(2)"`
+	F06               string    `xorm:"default '' VARCHAR(2)"`
+	F07               string    `xorm:"default '' VARCHAR(2)"`
+	F08               string    `xorm:"default '' VARCHAR(2)"`
+	F09               string    `xorm:"default '' VARCHAR(2)"`
+	F10               string    `xorm:"default '' VARCHAR(2)"`
+	F11               string    `xorm:"default '' VARCHAR(2)"`
+	F12               string    `xorm:"default '' VARCHAR(2)"`
+	F13               string    `xorm:"default '' VARCHAR(2)"`
+	F14               string    `xorm:"default '' VARCHAR(2)"`
+	F15               string    `xorm:"default '' VARCHAR(2)"`
+	F16               string    `xorm:"default '' VARCHAR(2)"`
+	F17               string    `xorm:"default '' VARCHAR(2)"`
+	F18               string    `xorm:"default '' VARCHAR(2)"`
+	F19               string    `xorm:"default '' VARCHAR(2)"`
+	F20               string    `xorm:"default '' VARCHAR(2)"`
+	F21               string    `xorm:"default '' VARCHAR(2)"`
+	F22               string    `xorm:"default '' VARCHAR(2)"`
+	F23               string    `xorm:"default '' VARCHAR(2)"`
+	F24               string    `xorm:"default '' VARCHAR(2)"`
+	F25               string    `xorm:"default '' VARCHAR(2)"`
+
+
+	TmpF01               string    `json:"tmpF01"`
+	TmpF02               string    `json:"tmpF02"`
+	TmpF03               string    `json:"tmpF03"`
+	TmpF04               string    `json:"tmpF04"`
+	TmpF05               string    `json:"tmpF05"`
+	TmpF06               string    `json:"tmpF06"`
+	TmpF07               string    `json:"tmpF07"`
+	TmpF08               string    `json:"tmpF08"`
+	TmpF09               string    `json:"tmpF09"`
+	TmpF10               string    `json:"tmpF10"`
+	TmpF11               string    `json:"tmpF11"`
+	TmpF12               string    `json:"tmpF12"`
+	TmpF13               string    `json:"tmpF13"`
+	TmpF14               string    `json:"tmpF14"`
+	TmpF15               string    `json:"tmpF15"`
+	TmpF16               string    `json:"tmpF16"`
+	TmpF17               string    `json:"tmpF17"`
+	TmpF18               string    `json:"tmpF18"`
+	TmpF19               string    `json:"tmpF19"`
+	TmpF20               string    `json:"tmpF20"`
+	TmpF21               string    `json:"tmpF21"`
+	TmpF22               string    `json:"tmpF22"`
+	TmpF23               string    `json:"tmpF23"`
+	TmpF24               string    `json:"tmpF24"`
+	TmpF25               string    `json:"tmpF25"`
+	TmpName              string    `json:"tmpName"`
+	Checked		 		 int    `json:"checked"`
+
+	Remark            string    `xorm:"comment('备注') VARCHAR(500)"`
+	DeletionStateCode int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	CreateOn          time.Time `xorm:"DATETIME"`
+	CreateUserId      int       `xorm:"INT(10)"`
+	CreateBy          string    `xorm:"VARCHAR(50)"`
+	ModifiedOn        time.Time `xorm:"DATETIME"`
+	ModifiedUserId    int       `xorm:"INT(10)"`
+	ModifiedBy        string    `xorm:"VARCHAR(50)"`
 }

+ 209 - 0
src/dashoo.cn/backend/api/business/oilsupplier/basisbuild/oilbasisbuildService.go

@@ -2,6 +2,7 @@ package basisbuild
 
 import (
 	. "dashoo.cn/backend/api/mydb"
+	"dashoo.cn/utils"
 	"github.com/go-xorm/xorm"
 	"strconv"
 	. "dashoo.cn/utils/db"
@@ -11,6 +12,10 @@ type OilBasisBuildService struct {
 	MyServiceBase
 }
 
+type TotalResult struct {
+	Total int64 `xorm:"INT(11) 'total'"`
+}
+
 func GetOilBasisBuildService(xormEngine *xorm.Engine) *OilBasisBuildService {
 	s := new(OilBasisBuildService)
 	s.DBE = xormEngine
@@ -72,4 +77,208 @@ func (s *OilBasisBuildService) DeleteTable(tableName, where string) error {
 	}
 	_,err := s.DBE.Query(sql)
 	return err
+}
+
+func (s *OilBasisBuildService) TruncateTable(tableName string) error {
+	sql := "TRUNCATE TABLE " + tableName
+	_,err := s.DBE.Query(sql)
+	return err
+}
+
+func (s *OilBasisBuildService) GetTableTotal(where string, entitiesPtr interface{}) (total int64) {
+
+	sql := "SELECT * FROM OilSupplierCertSub where (" + where + ")"
+	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub where (" + where + ")"
+
+	s.DBE.SQL(sql).Find(entitiesPtr)
+	//s.DBE.SQL(sqlCount).Get(&totalResult)
+	//total = totalResult.Total
+	var resultsSlice []map[string][]byte
+	resultsSlice, _ = s.DBE.Query(sqlCount)
+
+	if len(resultsSlice) > 0 {
+		results := resultsSlice[0]
+		for _, value := range results {
+			total, _ = strconv.ParseInt(string(value), 10, 64)
+			break
+		}
+	}
+
+	return total
+}
+
+func (s *OilBasisBuildService) GetNoSubCntTotal(where string) (total int64) {
+
+	sqlCount := "select count(a.`Name`) as total from OilSupplierCertSub a left join Tmp_OilTechnologyServiceClass b on b.`Name` = a.`Name` LEFT JOIN Tmp_OilTechnologyService c ON c.ClassId = b.Id where (" + where + ")"
+
+	var totalResult TotalResult
+	s.DBE.SQL(sqlCount).Get(&totalResult)
+	total = totalResult.Total
+
+	return total
+}
+
+func (s *OilBasisBuildService) GetPClassEntities(pageIndex, itemsPerPage int64, orderby string,
+	asc bool, entitiesPtr interface{}, having string, Conditions string) (total int64) {
+
+	var sql string
+	sql = `SELECT a.*,tmpa.F01 AS tmpF01,tmpa.F02 AS tmpF02,tmpa.F03 AS tmpF03,tmpa.F04 AS tmpF04,tmpa.F05 AS tmpF05,tmpa.F06 AS tmpF06,tmpa.F07 AS tmpF07,
+		 tmpa.F08 AS tmpF08,tmpa.F09 AS tmpF09,tmpa.F10 AS tmpF10,tmpa.F11 AS tmpF11,tmpa.F12 AS tmpF12,tmpa.F13 AS tmpF13,tmpa.F14 AS tmpF14,
+		 tmpa.F15 AS tmpF15,tmpa.F16 AS tmpF16,tmpa.F17 AS tmpF17,tmpa.F18 AS tmpF18,tmpa.F19 AS tmpF19,tmpa.F20 AS tmpF20,tmpa.F21 AS tmpF21,
+		 tmpa.F22 AS tmpF22,tmpa.F23 AS tmpF23,tmpa.F24 AS tmpF24,tmpa.F25 AS tmpF25,tmpa.Name AS tmpName,
+		if( ((tmpa.F01 is null && a.F01 = 1) or (tmpa.F01 = 1 && (a.F01 is null or a.F01 = 0))) or ((tmpa.F02 is null && a.F02 = 1) or (tmpa.F02 = 1 && (a.F02 is null or a.F02 = 0))) or ((tmpa.F03 is null && a.F03 = 1) or (tmpa.F03 = 1 && (a.F03 is null or a.F03 = 0))) or ((tmpa.F04 is null && a.F04 = 1) or (tmpa.F04 = 1 && (a.F04 is null or a.F04 = 0))) or ((tmpa.F05 is null && a.F05 = 1) or (tmpa.F05 = 1 && (a.F05 is null or a.F05 = 0))) or ((tmpa.F06 is null && a.F06 = 1) or (tmpa.F06 = 1 && (a.F06 is null or a.F06 = 0))) or ((tmpa.F07 is null && a.F07 = 1) or (tmpa.F07 = 1 && (a.F07 is null or a.F07 = 0))) or ((tmpa.F08 is null && a.F08 = 1) or (tmpa.F08 = 1 && (a.F08 is null or a.F08 = 0))) or ((tmpa.F09 is null && a.F09 = 1) or (tmpa.F09 = 1 && (a.F09 is null or a.F09 = 0))) or ((tmpa.F10 is null && a.F10 = 1) or (tmpa.F10 = 1 && (a.F10 is null or a.F10 = 0)))
+			or ((tmpa.F11 is null && a.F11 = 1) or (tmpa.F11 = 1 && (a.F11 is null or a.F11 = 0))) or ((tmpa.F12 is null && a.F12 = 1) or (tmpa.F12 = 1 && (a.F12 is null or a.F12 = 0))) or ((tmpa.F13 is null && a.F13 = 1) or (tmpa.F13 = 1 && (a.F13 is null or a.F13 = 0))) or ((tmpa.F14 is null && a.F14 = 1) or (tmpa.F14 = 1 && (a.F14 is null or a.F14 = 0))) or ((tmpa.F15 is null && a.F15 = 1) or (tmpa.F15 = 1 && (a.F15 is null or a.F15 = 0))) or ((tmpa.F16 is null && a.F16 = 1) or (tmpa.F16 = 1 && (a.F16 is null or a.F16 = 0))) or ((tmpa.F17 is null && a.F17 = 1) or (tmpa.F17 = 1 && (a.F17 is null or a.F17 = 0))) or ((tmpa.F18 is null && a.F18 = 1) or (tmpa.F18 = 1 && (a.F18 is null or a.F18 = 0))) or ((tmpa.F19 is null && a.F19 = 1) or (tmpa.F19 = 1 && (a.F19 is null or a.F19 = 0))) or ((tmpa.F20 is null && a.F20 = 1) or (tmpa.F20 = 1 && (a.F20 is null or a.F20 = 0)))
+			or ((tmpa.F21 is null && a.F21 = 1) or (tmpa.F21 = 1 && (a.F21 is null or a.F21 = 0))) or ((tmpa.F22 is null && a.F22 = 1) or (tmpa.F22 = 1 && (a.F22 is null or a.F22 = 0))) or ((tmpa.F23 is null && a.F23 = 1) or (tmpa.F23 = 1 && (a.F23 is null or a.F23 = 0))) or ((tmpa.F24 is null && a.F24 = 1) or (tmpa.F24 = 1 && (a.F24 is null or a.F24 = 0))) or ((tmpa.F25 is null && a.F25 = 1) or (tmpa.F25 = 1 && (a.F25 is null or a.F25 = 0))) 
+		,true, false) as checked`
+
+	if Conditions == "5" {
+		sql += " FROM Tmp_OilBasisBuild a LEFT JOIN OilBasisBuild tmpa ON tmpa.Name = a.Name where (" + having + ")"
+	} else {
+		sql += " FROM OilBasisBuild a LEFT JOIN Tmp_OilBasisBuild tmpa ON tmpa.Name = a.Name where (" + having + ")"
+	}
+	if asc {
+		sql += ` order by b.` + orderby + ` ASC `
+	} else {
+		sql += ` order by b.` + orderby + ` DESC `
+	}
+	sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
+
+	sqlCount := "SELECT count(*) FROM OilBasisBuild a LEFT JOIN Tmp_OilBasisBuild tmpa ON tmpa.Name = a.Name where (" + having + ") "
+	if Conditions == "5" {
+		sqlCount = "SELECT count(*) FROM Tmp_OilBasisBuild a LEFT JOIN OilBasisBuild tmpa ON tmpa.Name = a.Name where (" + having + ") "
+	}
+
+	//var totalResult TotalResult
+	s.DBE.SQL(sql).Find(entitiesPtr)
+	//s.DBE.SQL(sqlCount).Get(&totalResult)
+	//total = totalResult.Total
+	var resultsSlice []map[string][]byte
+	resultsSlice, _ = s.DBE.Query(sqlCount)
+
+	if len(resultsSlice) > 0 {
+		results := resultsSlice[0]
+		for _, value := range results {
+			total, _ = strconv.ParseInt(string(value), 10, 64)
+			break
+		}
+	}
+
+	return total
+}
+
+func (s *OilBasisBuildService) GetPagingTmpCheckedEntities(entitiesPtr interface{}, where string) (total int64) {
+
+	var sql string
+	sql = `SELECT 
+			 a.Id,a.SupplierName,
+			 b.SupplierTypeCode, b.SupplierTypeName,
+			 b.AccessCardNo, a.DepositBank,a.HseTraining,
+			 a.CompanyType,a.SetupTime,a.Address,a.Province,a.City,a.Street,
+			a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.InFlag,
+			a.ContactName,a.CommercialNo,a.LinkAddress,a.LinkProvince,
+			a.LinkCity,a.LinkStreet,a.BusinessScope,b.InStyle, b.Id CertId,
+			group_concat(DISTINCT header.Code) AS HeaderCodes,
+			min(sub.SubClassId) as MinClassId,
+		CONCAT(
+		   if((max(goods.F01)='1' AND LOCATE('F01', group_concat(DISTINCT header.Code)) > 0) or (max(goods.F01) is null) or (max(goods.F01) = ''), '', '营业执照,')  , 
+		   if((max(goods.F02)='1' AND LOCATE('F02',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F02) is null) or (max(goods.F02) = ''), '', '企业信用信息截屏,') ,
+		   if((max(goods.F03)='1' AND LOCATE('F03',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F03) is null) or (max(goods.F03) = ''), '', '诚信合规承诺书,') ,
+		   if((max(goods.F04)='1' AND LOCATE('F04',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F04) is null) or (max(goods.F04) = ''), '', '银行开户许可证或基本存款账户信息,') ,
+		   if((max(goods.F05)='1' AND LOCATE('F05',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F05) is null) or (max(goods.F05) = ''), '', '质量管理体系认证证书,') ,
+		   if((max(goods.F06)='1' AND LOCATE('F06',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F06) is null) or (max(goods.F06) = ''), '', '环境管理体系认证证书,') ,
+		   if((max(goods.F07)='1' AND LOCATE('F07',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F07) is null) or (max(goods.F07) = ''), '', '职业健康安全管理体系认证证书,') ,
+		   if((max(goods.F08)='1' AND LOCATE('F08',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F08) is null) or (max(goods.F08) = ''), '', '排污许可证,') ,
+		   if((max(goods.F09)='1' AND LOCATE('F09',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F09) is null) or (max(goods.F09) = ''), '', '安全生产许可证,') ,
+		   if((max(goods.F10)='1' AND LOCATE('F10',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F10) is null) or (max(goods.F10) = ''), '', '危险废弃物经营许可证(危险废弃物处置),') ,
+		   if((max(goods.F11)='1' AND LOCATE('F11',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F11) is null) or (max(goods.F11) = ''), '', '海洋石油作业安全生产许可证,') ,
+		   if((max(goods.F12)='1' AND LOCATE('F12',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F12) is null) or (max(goods.F12) = ''), '', '辐射安全许可证,') ,
+		   if((max(goods.F13)='1' AND LOCATE('F13',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F13) is null) or (max(goods.F13) = ''), '', '石油工程技术服务企业资质证书,') ,
+		   if((max(goods.F14)='1' AND LOCATE('F14',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F14) is null) or (max(goods.F14) = ''), '', '检验检测机构资质认定证书(气体检测),') ,
+		   if((max(goods.F15)='1' AND LOCATE('F15',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F15) is null) or (max(goods.F15) = ''), '', '工业清洗企业资质证书,') ,
+		   if((max(goods.F16)='1' AND LOCATE('F16',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F16) is null) or (max(goods.F16) = ''), '', '建设项目环境影响评价资格证书,') ,
+		   if((max(goods.F17)='1' AND LOCATE('F17',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F17) is null) or (max(goods.F17) = ''), '', '消防设施维护保养资质证书,') ,
+		   if((max(goods.F18)='1' AND LOCATE('F18',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F18) is null) or (max(goods.F18) = ''), '', '安全评价机构资质证书,') ,
+		   if((max(goods.F19)='1' AND LOCATE('F19',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F19) is null) or (max(goods.F19) = ''), '', '工程造价咨询企业甲级资质证书,') ,
+		   if((max(goods.F20)='1' AND LOCATE('F20',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F20) is null) or (max(goods.F20) = ''), '', '工程监督资质证书,') ,
+		   if((max(goods.F21)='1' AND LOCATE('F21',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F21) is null) or (max(goods.F21) = ''), '', '计量标准考核证书,') ,
+		   if((max(goods.F22)='1' AND LOCATE('F22',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F22) is null) or (max(goods.F22) = ''), '', '房屋预售资格证,') ,
+		   if((max(goods.F23)='1' AND LOCATE('F23',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F23) is null) or (max(goods.F23) = ''), '', '保安服务许可证,') ,
+		   if((max(goods.F24)='1' AND LOCATE('F24',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F24) is null) or (max(goods.F24) = ''), '', '道路运输经营许可证,') ,
+		   if((max(goods.F25)='1' AND LOCATE('F25',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F25) is null) or (max(goods.F25) = ''), '', '机动车维修经营许可证,') 
+		   ) AS ZzName,
+			(
+			((if((max(goods.F01)='1' AND LOCATE('F01', group_concat(DISTINCT header.Code)) > 0) or (max(goods.F01) is null) or (max(goods.F01) = ''), TRUE, FALSE)) or 
+			(if((max(goods.F41)='1' AND LOCATE('F41',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F41) is null) or (max(goods.F41) = ''), TRUE, FALSE)) or
+			(if((max(goods.F42)='1' AND LOCATE('F42',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F42) is null) or (max(goods.F42) = ''), TRUE, FALSE))) AND 
+			if((max(goods.F02)='1' AND LOCATE('F02',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F02) is null) or (max(goods.F02) = ''), TRUE, FALSE) AND
+			if((max(goods.F03)='1' AND LOCATE('F03',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F03) is null) or (max(goods.F03) = ''), TRUE, FALSE) AND
+			if((max(goods.F04)='1' AND LOCATE('F04',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F04) is null) or (max(goods.F04) = ''), TRUE, FALSE) AND
+			if((max(goods.F05)='1' AND LOCATE('F05',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F05) is null) or (max(goods.F05) = ''), TRUE, FALSE) AND
+			if((max(goods.F06)='1' AND LOCATE('F06',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F06) is null) or (max(goods.F06) = ''), TRUE, FALSE) AND
+			if((max(goods.F07)='1' AND LOCATE('F07',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F07) is null) or (max(goods.F07) = ''), TRUE, FALSE) AND
+			if((max(goods.F08)='1' AND LOCATE('F08',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F08) is null) or (max(goods.F08) = ''), TRUE, FALSE) AND
+			if((max(goods.F09)='1' AND LOCATE('F09',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F09) is null) or (max(goods.F09) = ''), TRUE, FALSE) AND
+			if((max(goods.F10)='1' AND LOCATE('F10',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F10) is null) or (max(goods.F10) = ''), TRUE, FALSE) AND
+			if((max(goods.F11)='1' AND LOCATE('F11',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F11) is null) or (max(goods.F11) = ''), TRUE, FALSE) AND
+			if((max(goods.F12)='1' AND LOCATE('F12',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F12) is null) or (max(goods.F12) = ''), TRUE, FALSE) AND
+			if((max(goods.F13)='1' AND LOCATE('F13',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F13) is null) or (max(goods.F13) = ''), TRUE, FALSE) AND
+			if((max(goods.F14)='1' AND LOCATE('F14',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F14) is null) or (max(goods.F14) = ''), TRUE, FALSE) AND
+			if((max(goods.F15)='1' AND LOCATE('F15',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F15) is null) or (max(goods.F15) = ''), TRUE, FALSE) AND
+			if((max(goods.F16)='1' AND LOCATE('F16',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F16) is null) or (max(goods.F16) = ''), TRUE, FALSE) AND
+			if((max(goods.F17)='1' AND LOCATE('F17',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F17) is null) or (max(goods.F17) = ''), TRUE, FALSE) AND
+			if((max(goods.F18)='1' AND LOCATE('F18',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F18) is null) or (max(goods.F18) = ''), TRUE, FALSE) AND
+			if((max(goods.F19)='1' AND LOCATE('F19',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F19) is null) or (max(goods.F19) = ''), TRUE, FALSE) AND
+			if((max(goods.F20)='1' AND LOCATE('F20',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F20) is null) or (max(goods.F20) = ''), TRUE, FALSE) AND
+			if((max(goods.F21)='1' AND LOCATE('F21',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F21) is null) or (max(goods.F21) = ''), TRUE, FALSE) AND
+			if((max(goods.F22)='1' AND LOCATE('F22',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F22) is null) or (max(goods.F22) = ''), TRUE, FALSE) AND
+			if((max(goods.F23)='1' AND LOCATE('F23',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F23) is null) or (max(goods.F23) = ''), TRUE, FALSE) AND
+			if((max(goods.F24)='1' AND LOCATE('F24',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F24) is null) or (max(goods.F24) = ''), TRUE, FALSE) AND
+			if((max(goods.F25)='1' AND LOCATE('F25',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F25) is null) or (max(goods.F25) = ''), TRUE, FALSE)
+			) AS checked
+			
+			 FROM OilSupplier a
+			 LEFT JOIN OilSupplierCert b ON a.Id=b.SupplierId
+			 LEFT JOIN OilSupplierCertSub sub ON b.Id=sub.SupplierCertId
+			 LEFT JOIN OilSupplierFile files ON a.Id=files.SupplierId
+			 LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name and header.CategoryCode = '03'
+			 LEFT JOIN Tmp_OilBasisBuild goods ON sub.Name=goods.Name
+			 WHERE`
+	sql += where
+	sql += ` GROUP BY a.Id, b.Id `
+
+	var totalResult TotalResult
+	s.DBE.SQL(sql).Find(entitiesPtr)
+	//s.DBE.SQL(sqlCount).Get(&totalResult)
+	total = totalResult.Total
+
+	return total
+}
+
+func (s *OilBasisBuildService) GetPagingTmpSubEntities(pageIndex, itemsPerPage int64, orderby string,
+	asc bool, entitiesPtr interface{}, having string) (total int64) {
+
+	var sql string
+	sql = `SELECT 
+		 a.*,group_concat(DISTINCT header.Code) AS HeaderCodes
+		 FROM OilSupplierCertSub a
+		 LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId
+		 LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name
+		 LEFT JOIN Tmp_OilBasisBuild goods ON a.Name=goods.Name`
+	sql += " where (" + having + ")"
+	sql += ` GROUP BY a.Id `
+	if asc {
+		sql += ` order by ` + orderby + ` ASC `
+	} else {
+		sql += ` order by ` + orderby + ` DESC `
+	}
+	sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
+
+	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub a LEFT JOIN Tmp_OilBasisBuild goods ON a.Name=goods.Name where (" + having + ") "
+
+	var totalResult TotalResult
+	s.DBE.SQL(sql).Find(entitiesPtr)
+	s.DBE.SQL(sqlCount).Get(&totalResult)
+	total = totalResult.Total
+
+	return total
 }

+ 4 - 0
src/dashoo.cn/backend/api/business/workflow/ActivitiService.go

@@ -652,6 +652,10 @@ func (this *ActivitiService) ContrastExcel(datas map[string]interface{}, templat
 	defer raw.Close()
 
 	file, err := os.Create(_dir)
+	if err != nil {
+		fmt.Println("文件创建失败", err)
+	}
+
 	defer file.Close()
 	writer := bufio.NewWriter(file)
 	defer writer.Flush()

+ 1 - 1
src/dashoo.cn/backend/api/conf/app.conf

@@ -80,7 +80,7 @@ OriginUrl=http://localhost:8081/api
 AposeUrl=http://localhost:8081/api/apose
 BaseUrl=http://localhost:8081/api/acti
 
-ContrastExcel=http://weed1.labsop.cn:9390/2,03cdc4f3a28a95
+ContrastExcel=http://weed1.labsop.cn:9390/1,03eb5b7a97b8b0
 
 [bank]
 callbackHost=http://localhost:10091/api

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilcontract/contractEvaluationItems.go

@@ -120,7 +120,7 @@ func (this *OilContractEvaluationItemsController) GetTreeList() {
 	where := " ParentId = 0 "
 	Id      := this.GetString("ContentReviewId")     // 评价主表ID
 	Category:= this.GetString("Category","0")   // 类型  0 二级部门创建  1 专业处创建
-	Type    := this.GetString("Type","0")       //  项类型 1分值 2布尔
+	Type    := this.GetString("Type","1")       //  项类型 1分值 2布尔
 	if Id != "" {
 		where = where + " and ContentReviewId = '" + Id + "'"
 	}

+ 4 - 6
src/dashoo.cn/backend/api/controllers/oilcontract/contractReview.go

@@ -509,8 +509,8 @@ func (this *OilContractReviewController) UpdateEntity() {
 		var temp1 evaluationItems.OilEvaluationItems
 		svc.GetEntityById(v.ItemId, &temp1)
 		temp.ContentReviewId ,_ = strconv.Atoi(id)
-		temp.Type     = temp1.Category
-		temp.ItemId   = v.ItemId
+		temp.Type     = v.Category   //v.Type
+		temp.ItemId   = v.Id
 		temp.Category = 0
 		temp.ParentId = v.ParentId
 		temp.SequenceNo = v.SequenceNo
@@ -536,10 +536,8 @@ func (this *OilContractReviewController) UpdateEntity() {
 		fmt.Print(i)
 		var temp2 contractEvaluationItems.OilContractEvaluationItems
 		temp2.ContentReviewId ,_ = strconv.Atoi(id)
-		var temp1 evaluationItems.OilEvaluationItems
-		svc.GetEntityById(v.ItemId, &temp1)
-		temp2.Type     = temp1.Category
-		temp2.ItemId   = v.ItemId
+		temp2.Type     = v.Category //v.Type
+		temp2.ItemId   = v.Id
 		temp2.Category = 1
 		temp2.ParentId = v.ParentId
 		temp2.SequenceNo = v.SequenceNo

+ 486 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/basisbuild.go

@@ -23,11 +23,11 @@ import (
 	//"dashoo.cn/backend/api/business/items"
 	"dashoo.cn/backend/api/business/oilsupplier/basisbuild"
 	"dashoo.cn/backend/api/business/oilsupplier/goodsaptitude"
-	"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
-	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
-	"dashoo.cn/business2/parameter"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
+	"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
 	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business2/parameter"
 	"dashoo.cn/utils"
 	. "github.com/linxGnu/goseaweedfs"
 )
@@ -1244,4 +1244,487 @@ func (this *OilBasisBuildController) PdfExport() {
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 
+}
+
+// @Title 导出到execl
+// @Description 导出到execl
+// @Success	200	{object} controllers.Request
+// @router /exportexecl [post]
+func (this *OilBasisBuildController) ExeclExport() {
+	// 填物资类信息表首页信息
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	svc := basisbuild.GetOilBasisBuildService(utils.DBE)
+	var list2 []supplier.OilSupplierContrast
+	where := " 1=1"
+	svc.GetMyPagingEntitiesWithOrderBytbl("OilSupplierBasContrast", 0,0, "Id", false, &list2, where)
+
+	fileName := "资质导入对比表.xlsx"
+	Url := utils.Cfg.MustValue("workflow", "ContrastExcel")
+
+	var datamap = make(map[string]interface{})
+	datamap["data"] = list2
+	retDocUrl := svcActiviti.ContrastExcel(datamap, Url, fileName)
+	var datainfo ErrorDataInfo
+	datainfo.Code = 0
+	datainfo.Item = retDocUrl
+	datainfo.Message = "打印成功"
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+
+}
+
+// @Title 新导入资质后,比对不合格的准入用户
+// @Description 对比列表
+// @Success 200 {object} []supplier.OilSupplierSelect
+// @router /get-compare-tmp-supplier [get]
+func (this *OilBasisBuildController) GetCompareTmpSupplier() {
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	SupplierName := this.GetString("SupplierName")
+	AccessCardNo := this.GetString("AccessCardNo")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
+	Code := this.GetString("Code")
+	Name := this.GetString("Name")
+	Conditions := this.GetString("Conditions")
+	IsDelete := this.GetString("IsDelete")
+	CreateOn := this.GetString("CreateOn")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+	if SupplierName != "" {
+		where = where + " and SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if AccessCardNo != "" {
+		where = where + " and AccessCardNo like '%" + AccessCardNo + "%'"
+	}
+
+	if SupplierTypeCode != "" {
+		where = where + " and SupplierTypeCode = '" + SupplierTypeCode + "'"
+	}
+
+	if Code != "" {
+		where = where + " and Code like '%" + Code + "%'"
+	}
+
+	if Name != "" {
+		where = where + " and Name like '%" + Name + "%'"
+	}
+
+	if Conditions == "2"{
+		where = where + " and MinClassId = '0'"
+	} else if Conditions == "3"{
+		where = where + " and Checked = '0'"
+	} else if Conditions == "4"{
+		where = where + " and Checked = '1"
+	}
+
+	if IsDelete != "" {
+		where = where + " and IsDelete like '%" + IsDelete + "%'"
+	}
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+	if CreateBy != "" {
+		where = where + " and CreateBy like '%" + CreateBy + "%'"
+	}
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+	svc := basisbuild.GetOilBasisBuildService(utils.DBE)
+	var list2 []supplier.OilSupplierContrast
+
+	total := svc.GetMyPagingEntitiesWithOrderBytbl("OilSupplierBasContrast", page.CurrentPage, page.Size, orderby, asc, &list2, where)
+	var datainfo DataInfo
+	datainfo.Items = list2
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []goodsaptitude.OilGoodsAptitude
+// @router /comparelist [get]
+func (this *OilBasisBuildController) GetCompareList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Code"
+	asc := true
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	Conditions := this.GetString("Conditions")
+	if Conditions == "1" {
+		// 匹配上
+		where += " and a.Name = tmpa.Name"
+	} else if Conditions == "4" {
+		// 旧表有新表没
+		where += " and tmpa.Name is null"
+	} else if Conditions == "5" {
+		// 新表有,旧表没
+		where += " and tmpa.Name is null"
+	} else if Conditions == "6" {
+		// 资质+级别匹配
+		where += " and a.Name = tmpa.Name and (a.F01 = tmpa.F01 or (tmpa.F01 = '' && a.F01 is null)) and (a.F02 = tmpa.F02 or (tmpa.F02 = '' && a.F02 is null)) and (a.F03 = tmpa.F03 or (tmpa.F03 = '' && a.F03 is null)) and (a.F04 = tmpa.F04 or (tmpa.F04 = '' && a.F04 is null)) and (a.F05 = tmpa.F05 or (tmpa.F05 = '' && a.F05 is null)) and (a.F06 = tmpa.F06 or (tmpa.F06 = '' && a.F06 is null)) and (a.F07 = tmpa.F07 or (tmpa.F07 = '' && a.F07 is null)) and (a.F08 = tmpa.F08 or (tmpa.F08 = '' && a.F08 is null)) and (a.F09 = tmpa.F09 or (tmpa.F09 = '' && a.F09 is null)) and (a.F10 = tmpa.F10 or (tmpa.F10 = '' && a.F10 is null))" +
+			" and (a.F11 = tmpa.F11 or (tmpa.F11 = '' && a.F11 is null)) and (a.F12 = tmpa.F12 or (tmpa.F12 = '' && a.F12 is null)) and (a.F13 = tmpa.F13 or (tmpa.F13 = '' && a.F13 is null)) and (a.F14 = tmpa.F14 or (tmpa.F14 = '' && a.F14 is null)) and (a.F15 = tmpa.F15 or (tmpa.F15 = '' && a.F15 is null)) and (a.F16 = tmpa.F16 or (tmpa.F16 = '' && a.F16 is null)) and (a.F17 = tmpa.F17 or (tmpa.F17 = '' && a.F17 is null)) and (a.F18 = tmpa.F18 or (tmpa.F18 = '' && a.F18 is null)) and (a.F19 = tmpa.F19 or (tmpa.F19 = '' && a.F19 is null)) and (a.F20 = tmpa.F20 or (tmpa.F20 = '' && a.F20 is null))" +
+			" and (a.F21 = tmpa.F21 or (tmpa.F21 = '' && a.F21 is null)) and (a.F22 = tmpa.F22 or (tmpa.F22 = '' && a.F22 is null)) and (a.F23 = tmpa.F23 or (tmpa.F23 = '' && a.F23 is null)) and (a.F24 = tmpa.F24 or (tmpa.F24 = '' && a.F24 is null)) and (a.F25 = tmpa.F25 or (tmpa.F25 = '' && a.F25 is null))"
+	}
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		} else {
+			asc = false
+		}
+	}
+	CreateOn := this.GetString("CreateOn")
+	Code := this.GetString("Code")
+	Name := this.GetString("Name")
+	BigClassName := this.GetString("BigClassName")
+	BigClassCode := this.GetString("BigClassCode")
+	MiddleClassName := this.GetString("MiddleClassName")
+	SmallClassName := this.GetString("SmallClassName")
+	GoodsName := this.GetString("GoodsName")
+	GoodsLevel := this.GetString("GoodsLevel")
+	GoodsDesc := this.GetString("GoodsDesc")
+	Standard := this.GetString("Standard")
+	CompanyType := this.GetString("CompanyType")
+
+	if Code != "" {
+		where = where + " and b.Code like '%" + Code + "%'"
+	}
+
+	if Name != "" {
+		where = where + " and b.Name like '%" + Name + "%'"
+	}
+
+	if BigClassName != "" {
+		where = where + " and Name1 like '%" + BigClassName + "%'"
+	}
+
+	if BigClassCode != "" {
+		where = where + " and Code1 like '%" + BigClassCode + "%'"
+	}
+
+	if MiddleClassName != "" {
+		where = where + " and Name2 like '%" + MiddleClassName + "%'"
+	}
+
+	if SmallClassName != "" {
+		where = where + " and  Name3 like '%" + SmallClassName + "%'"
+	}
+
+	if GoodsName != "" {
+		where = where + " and Name4 like '%" + GoodsName + "%'"
+	}
+
+	if GoodsLevel != "" {
+		where = where + " and GoodsLevel like '%" + GoodsLevel + "%'"
+	}
+
+	if GoodsDesc != "" {
+		where = where + " and GoodsDesc like '%" + GoodsDesc + "%'"
+	}
+
+	if Standard != "" {
+		where = where + " and  Standard '%" + Standard + "%'"
+	}
+
+	if CompanyType != "" {
+		where = where + " and  CompanyType '%" + CompanyType + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := basisbuild.GetOilBasisBuildService(utils.DBE)
+	var list []basisbuild.OilBasisBuildTmp
+	total := svc.GetPClassEntities(page.CurrentPage, page.Size, orderby, asc, &list, where, Conditions)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title get 生成对比列表
+// @Description get SampleType by token
+// @Success 200 {object} sampletype.SampleType
+// @router /create-contrast [get]
+func (this *OilBasisBuildController) CreateContrast() {
+	go func() {
+		svc := basisbuild.GetOilBasisBuildService(utils.DBE)
+		svc.TruncateTable("OilSupplierBasContrast")
+		// 插入对比列表
+		var list1 []supplier.OilSupplier
+		svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, 0, 0, "Id", false, &list1, " 1=1")
+		svc.DBE.Query("SET unique_checks=0;")
+		svc.DBE.Query("SET autocommit=0;")
+		for _, item := range list1 {
+			var list []supplier.OilSupplierContrast
+			where := "  b.SupplierTypeCode='02' and a.Id = " + strconv.Itoa(item.Id)
+			svc.GetPagingTmpCheckedEntities(&list, where)
+			if list != nil {
+				var supplierCertSubList []suppliercertsub.OilSupplierCertSub
+				total := svc.GetTableTotal(" SupplierTypeCode='02' AND SupplierId = "+strconv.Itoa(item.Id), &supplierCertSubList)
+				total1 := svc.GetNoSubCntTotal("a.SupplierTypeCode = '02' and c.ClassId is null and a.SupplierId = " + strconv.Itoa(item.Id))
+				list[0].SubCnt = int(total)
+				list[0].NoSubCnt = int(total1)
+				list[0].SetupTime = time.Now()
+				svc.InsertEntityBytbl("OilSupplierBasContrast", list[0])
+				svc.DBE.Query("commit;")
+			}
+		}
+		svc.DBE.Query("SET unique_checks=1;")
+		svc.DBE.Query("SET autocommit=1;")
+	}()
+	var errorinfo ErrorInfo
+	errorinfo.Code = 0
+	errorinfo.Message = "成功!"
+	this.Data["json"] = &errorinfo
+	this.ServeJSON()
+}
+
+// @Title 查看对比列表的准入范围 2020-12-18
+// @Description get user by token
+// @Success 200 {object} []suppliercertsub.OilSupplierCertSub
+// @router /delcertsublist [get]
+func (this *OilBasisBuildController) GetDelCertSubList() {
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "a.Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	SupplierId := this.GetString("SupplierId")
+	SupplierCertId := this.GetString("SupplierCertId")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
+	Code := this.GetString("Code")
+	Name := this.GetString("Name")
+	Remark := this.GetString("Remark")
+	IsDelete := this.GetString("IsDelete")
+	CreateOn := this.GetString("CreateOn")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and a.Id like '%" + Id + "%'"
+	}
+
+	if SupplierId != "" {
+		where = where + " and a.SupplierId like '%" + SupplierId + "%'"
+	}
+
+	if SupplierCertId != "" {
+		where = where + " and a.SupplierCertId = '" + SupplierCertId + "'"
+	}
+
+	if SupplierTypeCode != "" {
+		where = where + " and a.SupplierTypeCode = '" + SupplierTypeCode + "'"
+	}
+
+	if Code != "" {
+		where = where + " and a.Code like '%" + Code + "%'"
+	}
+
+	if Name != "" {
+		where = where + " and a.Name like '%" + Name + "%'"
+	}
+
+	if Remark != "" {
+		where = where + " and a.Remark like '%" + Remark + "%'"
+	}
+
+	if IsDelete != "" {
+		where = where + " and a.IsDelete like '%" + IsDelete + "%'"
+	}
+
+	if CreateUserId != "" {
+		where = where + " and a.CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+	if CreateBy != "" {
+		where = where + " and a.CreateBy like '%" + CreateBy + "%'"
+	}
+
+	if ModifiedOn != "" {
+		where = where + " and a.ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+	if ModifiedUserId != "" {
+		where = where + " and a.ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+	if ModifiedBy != "" {
+		where = where + " and a.ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
+		}
+	}
+	where = where + " and a.Type in (1, 3)"
+	svc := basisbuild.GetOilBasisBuildService(utils.DBE)
+	var list []suppliercertsub.OilSupplierCertSub1
+	var co supplier.OilSupplierContrast
+	svc.GetEntityById(SupplierId, &co)
+	if co.IsDelete == 1 {
+		where += " and a.IsQuestion = 1"
+	}
+	total := svc.GetPagingTmpSubEntities(page.CurrentPage, page.Size, orderby, asc, &list, where)
+	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)) AS Codes FROM Tmp_OilBasisBuild"
+		sql += " where Name = '"+ item.Name + "'"
+		model, _ := svc.DBE.QueryString(sql)
+		if model != nil {
+			code := strings.Split(model[0]["Codes"], ",")
+			i := 1
+			for _, value := range code {
+				if i == 41 || i == 42 || i == 1 {
+					if (code[0] == "1" && strings.Index(item.HeaderCodes, "F01") < 0) && (code[40] == "1" && strings.Index(item.HeaderCodes, "F41") < 0) && (code[41] == "1" && strings.Index(item.HeaderCodes, "F42") < 0) {
+						list[a].Checked = 1
+						sql1 := "select Name from Base_TableHeader where Code = 'F01' and CategoryCode = '02'"
+						model1, _ := svc.DBE.QueryString(sql1)
+						if strings.Index(list[a].HeaderName, model1[0]["Name"]) == -1 {
+							list[a].HeaderName += model1[0]["Name"] + " "
+						}
+					}
+				} 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 = '02'"
+						model1, _ := svc.DBE.QueryString(sql1)
+						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 = '02'"
+						model1, _ := svc.DBE.QueryString(sql1)
+						list[a].HeaderName += model1[0]["Name"]+ " "
+					}
+				}
+				i += 1
+			}
+		} else {
+			list[a].MinClassId = "0"
+		}
+		a += 1
+	}
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 确认更新后的删除/暂停企业准入范围 2020-12-18
+// @Description 修改实体
+// @Success	200	{object} controllers.Request
+// @router /delete-suspend [post]
+func (this *OilBasisBuildController) DeleteSuspend() {
+	var errinfo ErrorInfo
+	var err error
+	var list []supplier.OilSupplierContrast
+	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
+	//svc.GetEntitysByWhere("OilSupplierContrast", "TwoOneCount = 0", &list)
+	svc.GetEntitysByWhere("OilSupplierBasContrast", "1=1", &list)
+	go func() {
+		for _,item := range list{
+			var sub []suppliercertsub.OilSupplierCertSub
+			svc.GetEntitysByWhere("OilSupplierCertSub", "SupplierTypeCode = '02' 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)) AS Codes,Code FROM Tmp_OilBasisBuild"
+				sql := "SELECT Code FROM Tmp_OilBasisBuild"
+				sql += " where Name = '"+ itemSub.Name + "'"
+				model, _ := svc.DBE.QueryString(sql)
+				var subDelete suppliercertsub.OilSupplierCertSub
+				if model != nil {
+					//code := strings.Split(model[0]["Codes"], ",")
+					cols := []string{"Code"}
+					subDelete.Code = model[0]["Code"]
+					// 修改
+					err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
+				} else {
+					// 删除
+					err = svc.DeleteEntityById(itemSub.Id, &subDelete)
+				}
+			}
+			err = svc.DeleteTable("OilSupplierBasContrast", "Id = " + strconv.Itoa(item.Id))
+		}
+		this.CreateContrast()
+	}()
+	errinfo.Message = "更新中,请勿重复更新!"
+	errinfo.Code = 0
+	this.Data["json"] = &errinfo
+	this.ServeJSON()
 }

+ 94 - 124
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -6,7 +6,6 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/oilsupplier/supplierdataentry"
 	"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
-	"dashoo.cn/backend/api/business/oilsupplier/supplierpausereason"
 	"dashoo.cn/backend/api/business/oilsupplier/tableheader"
 	"encoding/json"
 	"fmt"
@@ -1795,11 +1794,6 @@ func (this *OilGoodsAptitudeController) InsertGoodsAptitude() {
 	}
 	// TODO 更新certsub表的subclassid
 
-	svc1 := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
-	var list2 []supplier.OilSupplierContrast
-	where := " (Checked = '0' or MinClassId = '0') and SupplierTypeCode = '01'"
-	svc1.GetMyPagingEntitiesWithOrderBytbl("OilSupplierContrast", 0, 0, "Id", false, &list2, where)
-	err = svc.TruncateTable("OilSupplierContrastNew")
 	if err != nil {
 		session.Rollback()
 		errinfo.Code = -1
@@ -1807,16 +1801,6 @@ func (this *OilGoodsAptitudeController) InsertGoodsAptitude() {
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 	}
-	for _, item := range list2 {
-		_, err := svc.InsertEntityBytbl("OilSupplierContrastNew", item)
-		if err != nil {
-			session.Rollback()
-			errinfo.Code = -1
-			errinfo.Message = "更新失败!"
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-		}
-	}
 
 	session.Commit()
 	errinfo.Code = 0
@@ -3047,117 +3031,103 @@ func (this *OilGoodsAptitudeController) DeleteSuspend() {
 	var list []supplier.OilSupplierContrast
 	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
 	//svc.GetEntitysByWhere("OilSupplierContrast", "TwoOneCount = 0", &list)
-	svc.GetEntitysByWhere("OilSupplierContrast", "1=1", &list)
-	for _,item := range list{
-		var sub []suppliercertsub.OilSupplierCertSub
-		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 + "'"
-			model, _ := svc.DBE.QueryString(sql)
-			var subDelete suppliercertsub.OilSupplierCertSub1
-			if model != nil {
-				code := strings.Split(model[0]["Codes"], ",")
-				cols := []string{"GoodsLevel", "Name"}
-				subDelete.GoodsLevel = model[0]["GoodsLevel"]
-				subDelete.Name = model[0]["Name"]
-
-				//2升1不变
-				if model[0]["GoodsLevel"] == "1" && itemSub.GoodsLevel == "2" {
-					colsC := []string{"IsDelete"}
-					colsS := []string{"IsQuestion"}
-					item.IsDelete = 1
-					itemSub.IsQuestion = 1
-					svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &itemSub, colsS, "Id = "+strconv.Itoa(itemSub.Id))
-					svc.UpdateEntityBywheretbl("OilSupplierContrast",  &item, colsC, "Id = "+strconv.Itoa(item.Id))
-					continue
-				}
+	go func() {
+		svc.GetEntitysByWhere("OilSupplierContrast", "1=1", &list)
+		for _,item := range list{
+			var sub []suppliercertsub.OilSupplierCertSub
+			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 := "SELECT a.GoodsLevel,class.Name  FROM OilGoodsAptitude a LEFT JOIN OilGoodsAptitudeClass class ON a.ClassId = class.Id"
+				sql += " where class.Code = '"+ itemSub.Code + "'"
+				model, _ := svc.DBE.QueryString(sql)
+				var subDelete suppliercertsub.OilSupplierCertSub1
+				if model != nil {
+					//2升1删除
+					if model[0]["GoodsLevel"] == "1" && itemSub.GoodsLevel == "2" {
+						err = svc.DeleteTable ("OilSupplierCertSub", "Id = " + strconv.Itoa(itemSub.Id))
+					}
 
-				// 1降2修改
-				if item.OneTwoCount > 0 {
-					err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
-				}
-				cols = append(cols, "DueTime")
-				cols = append(cols, "CertSubStatus")
-				subDelete.CertSubStatus = "2"
-				//subDelete.DueTime = "2021-06-06 00:00:00"
-				paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
-				DueTimeStr := paramSvc.GetBaseparameterMessage("GFZT", "paramset", "Suspend")
-				//fmt.Println("返回的时间", DueTimeStr)
-				//local, _ := time.LoadLocation("Local")
-				//theTime, _ := time.ParseInLocation("2006-01-02", DueTimeStr, local)
-				currentTime := time.Now()
-				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))
-							var model1 supplierpausereason.OilSupplierPauseReason
-							model1.SupplierId = item.Id
-							model1.CertSubId = itemSub.Id
-							model1.CertSubStatus = "2"
-							model1.SupplierCertId = itemSub.SupplierCertId
-							model1.BackReason = "老数据导入缺资质"
-							model1.CreateOn = time.Now()
-							model1.CreateBy = this.User.Realname
-							model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-							svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
-							break
-						}
-					} 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))
-							var model1 supplierpausereason.OilSupplierPauseReason
-							model1.SupplierId = item.Id
-							model1.CertSubId = itemSub.Id
-							model1.CertSubStatus = "2"
-							model1.SupplierCertId = itemSub.SupplierCertId
-							model1.BackReason = "老数据导入缺资质"
-							model1.CreateOn = time.Now()
-							model1.CreateBy = this.User.Realname
-							model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-							svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
-							break
-						}
-					} else {
-						if value == "1" && strings.Index(item.HeaderCodes, "F0"+strconv.Itoa(i)) < 0 {
-							err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
-							var model1 supplierpausereason.OilSupplierPauseReason
-							model1.SupplierId = item.Id
-							model1.CertSubId = itemSub.Id
-							model1.CertSubStatus = "2"
-							model1.SupplierCertId = itemSub.SupplierCertId
-							model1.BackReason = "老数据导入缺资质"
-							model1.CreateOn = time.Now()
-							model1.CreateBy = this.User.Realname
-							model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-							svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
-							break
-						}
+					//code := strings.Split(model[0]["Codes"], ",")
+					cols := []string{"GoodsLevel", "Name"}
+					subDelete.GoodsLevel = model[0]["GoodsLevel"]
+					subDelete.Name = model[0]["Name"]
+					// 1降2修改
+					if model[0]["GoodsLevel"] == "2" && itemSub.GoodsLevel == "1" {
+						err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
 					}
-					i += 1
+					//cols = append(cols, "DueTime")
+					//cols = append(cols, "CertSubStatus")
+					//subDelete.CertSubStatus = "2"
+					//paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+					//DueTimeStr := paramSvc.GetBaseparameterMessage("GFZT", "paramset", "Suspend")
+					//currentTime := time.Now()
+					//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))
+					//			var model1 supplierpausereason.OilSupplierPauseReason
+					//			model1.SupplierId = item.Id
+					//			model1.CertSubId = itemSub.Id
+					//			model1.CertSubStatus = "2"
+					//			model1.SupplierCertId = itemSub.SupplierCertId
+					//			model1.BackReason = "老数据导入缺资质"
+					//			model1.CreateOn = time.Now()
+					//			model1.CreateBy = this.User.Realname
+					//			model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					//			svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
+					//			break
+					//		}
+					//	} 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))
+					//			var model1 supplierpausereason.OilSupplierPauseReason
+					//			model1.SupplierId = item.Id
+					//			model1.CertSubId = itemSub.Id
+					//			model1.CertSubStatus = "2"
+					//			model1.SupplierCertId = itemSub.SupplierCertId
+					//			model1.BackReason = "老数据导入缺资质"
+					//			model1.CreateOn = time.Now()
+					//			model1.CreateBy = this.User.Realname
+					//			model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					//			svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
+					//			break
+					//		}
+					//	} else {
+					//		if value == "1" && strings.Index(item.HeaderCodes, "F0"+strconv.Itoa(i)) < 0 {
+					//			err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
+					//			var model1 supplierpausereason.OilSupplierPauseReason
+					//			model1.SupplierId = item.Id
+					//			model1.CertSubId = itemSub.Id
+					//			model1.CertSubStatus = "2"
+					//			model1.SupplierCertId = itemSub.SupplierCertId
+					//			model1.BackReason = "老数据导入缺资质"
+					//			model1.CreateOn = time.Now()
+					//			model1.CreateBy = this.User.Realname
+					//			model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					//			svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
+					//			break
+					//		}
+					//	}
+					//	i += 1
+					//}
+				} else {
+					// 删除
+					err = svc.DeleteTable ("OilSupplierCertSub", "Id = " + strconv.Itoa(itemSub.Id))
 				}
-			} else {
-				// 删除
-				err = svc.DeleteEntityById(itemSub.Id, &subDelete)
 			}
+			//if item.TwoOneCount == 0 {
+			//	err = svc.DeleteTable("OilSupplierContrast", "Id = " + strconv.Itoa(item.Id))
+			//}
 		}
-		if item.TwoOneCount == 0 {
-			err = svc.DeleteTable("OilSupplierContrast", "Id = " + strconv.Itoa(item.Id))
-		}
-	}
-	if err == nil {
-		errinfo.Message = "修改成功!"
-		errinfo.Code = 0
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	} else {
-		errinfo.Message = "修改失败!"
-		errinfo.Code = -1
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	}
+		this.CreateContrast()
+	}()
+	errinfo.Message = "更新中,请勿重复更新!"
+	errinfo.Code = 0
+	this.Data["json"] = &errinfo
+	this.ServeJSON()
 }

+ 5 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -769,6 +769,7 @@ func (this *OilSupplierController) GetJoinStoreEntityList() {
 	RegCapital2 := this.GetString("RegCapital2")
 	BusinessScope := this.GetString("BusinessScope")
 	Code := this.GetString("Code")
+	InFlag := this.GetString("InFlag")
 
 	if SupplierName != "" {
 		where = where + " and a.SupplierName like '%" + SupplierName + "%'"
@@ -859,6 +860,10 @@ func (this *OilSupplierController) GetJoinStoreEntityList() {
 	if status != "" {
 		where = where + " and b.Status='" + status + "'"
 	}
+
+	if InFlag != "" {
+		where = where + " and b.InFlag='" + InFlag + "'"
+	}
 	if Code != "" {
 		where = where + " and c.Code like '" + Code + "%'"
 	}

+ 85 - 92
src/dashoo.cn/backend/api/controllers/oilsupplier/technologyservice.go

@@ -3,7 +3,6 @@ package oilsupplier
 import (
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
 	"dashoo.cn/backend/api/business/oilsupplier/supplierdataentry"
-	"dashoo.cn/backend/api/business/oilsupplier/supplierpausereason"
 	"dashoo.cn/backend/api/business/oilsupplier/tableheader"
 	"dashoo.cn/backend/api/business/oilsupplier/technologyserviceclass"
 	"dashoo.cn/backend/api/business/workflow"
@@ -1372,7 +1371,7 @@ func (this *OilTechnologyServiceController) InsertTechnology() {
 	session.Commit()
 
 	errinfo.Code = 0
-	errinfo.Message = "更新成功!"
+	errinfo.Message = "更新成功,即将操作企业准入范围!"
 	this.Data["json"] = &errinfo
 	this.ServeJSON()
 
@@ -2136,97 +2135,91 @@ func (this *OilTechnologyServiceController) DeleteSuspend() {
 	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
 	//svc.GetEntitysByWhere("OilSupplierContrast", "TwoOneCount = 0", &list)
 	svc.GetEntitysByWhere("OilSupplierTecContrast", "1=1", &list)
-	for _,item := range list{
-		var sub []suppliercertsub.OilSupplierCertSub
-		svc.GetEntitysByWhere("OilSupplierCertSub", "SupplierTypeCode = '03' 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),IF(ifnull(F47, '') = '', '', F47),IF(ifnull(F48, '') = '', '', F48),IF(ifnull(F49, '') = '', '', F49),IF(ifnull(F50, '') = '', '', F50),IF(ifnull(F51, '') = '', '', F51),IF(ifnull(F52, '') = '', '', F52)) AS Codes,Code FROM Tmp_OilTechnologyService a LEFT JOIN Tmp_OilTechnologyServiceClass class ON a.ClassId = class.Id"
-			sql += " where class.Name = '"+ itemSub.Name + "'"
-			model, _ := svc.DBE.QueryString(sql)
-			var subDelete suppliercertsub.OilSupplierCertSub
-			if model != nil {
-				code := strings.Split(model[0]["Codes"], ",")
-				cols := []string{"Code"}
-				subDelete.Code = model[0]["Code"]
-
-				// 修改
-				err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
-				cols = append(cols, "DueTime")
-				cols = append(cols, "CertSubStatus")
-				subDelete.CertSubStatus = "2"
-				//subDelete.DueTime = "2021-06-06 00:00:00"
-				paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
-				DueTimeStr := paramSvc.GetBaseparameterMessage("GFZT", "paramset", "Suspend")
-				currentTime := time.Now()
-				days,_ := strconv.Atoi(DueTimeStr)
-				subDelete.DueTime = currentTime.AddDate(0, 0, days)
-				i := 1
-				//暂停
-				for _, value := range code {
-					if i == 41 || i == 42 || i == 1 {
-						if (code[0] == "1" && strings.Index(item.HeaderCodes, "F01") < 0) && (code[40] == "1" && strings.Index(item.HeaderCodes, "F41") < 0) && (code[41] == "1" && strings.Index(item.HeaderCodes, "F42") < 0) {
-							err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
-							var model1 supplierpausereason.OilSupplierPauseReason
-							model1.SupplierId = item.Id
-							model1.CertSubId = itemSub.Id
-							model1.CertSubStatus = "2"
-							model1.SupplierCertId = itemSub.SupplierCertId
-							model1.BackReason = "老数据导入缺资质"
-							model1.CreateOn = time.Now()
-							model1.CreateBy = this.User.Realname
-							model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-							svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
-							break
-						}
-					} 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))
-							var model1 supplierpausereason.OilSupplierPauseReason
-							model1.SupplierId = item.Id
-							model1.CertSubId = itemSub.Id
-							model1.CertSubStatus = "2"
-							model1.SupplierCertId = itemSub.SupplierCertId
-							model1.BackReason = "老数据导入缺资质"
-							model1.CreateOn = time.Now()
-							model1.CreateBy = this.User.Realname
-							model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-							svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
-							break
-						}
-					} else {
-						if value == "1" && strings.Index(item.HeaderCodes, "F0"+strconv.Itoa(i)) < 0 {
-							err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
-							var model1 supplierpausereason.OilSupplierPauseReason
-							model1.SupplierId = item.Id
-							model1.CertSubId = itemSub.Id
-							model1.CertSubStatus = "2"
-							model1.SupplierCertId = itemSub.SupplierCertId
-							model1.BackReason = "老数据导入缺资质"
-							model1.CreateOn = time.Now()
-							model1.CreateBy = this.User.Realname
-							model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-							svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
-							break
-						}
-					}
-					i += 1
+	go func() {
+		for _,item := range list{
+			var sub []suppliercertsub.OilSupplierCertSub
+			svc.GetEntitysByWhere("OilSupplierCertSub", "SupplierTypeCode = '03' 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),IF(ifnull(F47, '') = '', '', F47),IF(ifnull(F48, '') = '', '', F48),IF(ifnull(F49, '') = '', '', F49),IF(ifnull(F50, '') = '', '', F50),IF(ifnull(F51, '') = '', '', F51),IF(ifnull(F52, '') = '', '', F52)) AS Codes,Code FROM Tmp_OilTechnologyService a LEFT JOIN Tmp_OilTechnologyServiceClass class ON a.ClassId = class.Id"
+				sql := "SELECT Code FROM Tmp_OilTechnologyService a LEFT JOIN Tmp_OilTechnologyServiceClass class ON a.ClassId = class.Id"
+				sql += " where class.Name = '"+ itemSub.Name + "'"
+				model, _ := svc.DBE.QueryString(sql)
+				var subDelete suppliercertsub.OilSupplierCertSub
+				if model != nil {
+					//code := strings.Split(model[0]["Codes"], ",")
+					cols := []string{"Code"}
+					subDelete.Code = model[0]["Code"]
+					err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = "+strconv.Itoa(itemSub.Id))
+					//cols = append(cols, "DueTime")
+					//cols = append(cols, "CertSubStatus")
+					//subDelete.CertSubStatus = "2"
+					//paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+					//DueTimeStr := paramSvc.GetBaseparameterMessage("GFZT", "paramset", "Suspend")
+					//currentTime := time.Now()
+					//days,_ := strconv.Atoi(DueTimeStr)
+					//subDelete.DueTime = currentTime.AddDate(0, 0, days)
+					//i := 1
+					////暂停
+					//for _, value := range code {
+					//	if i == 41 || i == 42 || i == 1 {
+					//		if (code[0] == "1" && strings.Index(item.HeaderCodes, "F01") < 0) && (code[40] == "1" && strings.Index(item.HeaderCodes, "F41") < 0) && (code[41] == "1" && strings.Index(item.HeaderCodes, "F42") < 0) {
+					//			err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
+					//			var model1 supplierpausereason.OilSupplierPauseReason
+					//			model1.SupplierId = item.Id
+					//			model1.CertSubId = itemSub.Id
+					//			model1.CertSubStatus = "2"
+					//			model1.SupplierCertId = itemSub.SupplierCertId
+					//			model1.BackReason = "老数据导入缺资质"
+					//			model1.CreateOn = time.Now()
+					//			model1.CreateBy = this.User.Realname
+					//			model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					//			svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
+					//			break
+					//		}
+					//	} 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))
+					//			var model1 supplierpausereason.OilSupplierPauseReason
+					//			model1.SupplierId = item.Id
+					//			model1.CertSubId = itemSub.Id
+					//			model1.CertSubStatus = "2"
+					//			model1.SupplierCertId = itemSub.SupplierCertId
+					//			model1.BackReason = "老数据导入缺资质"
+					//			model1.CreateOn = time.Now()
+					//			model1.CreateBy = this.User.Realname
+					//			model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					//			svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
+					//			break
+					//		}
+					//	} else {
+					//		if value == "1" && strings.Index(item.HeaderCodes, "F0"+strconv.Itoa(i)) < 0 {
+					//			err = svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &subDelete, cols, "Id = " + strconv.Itoa(itemSub.Id))
+					//			var model1 supplierpausereason.OilSupplierPauseReason
+					//			model1.SupplierId = item.Id
+					//			model1.CertSubId = itemSub.Id
+					//			model1.CertSubStatus = "2"
+					//			model1.SupplierCertId = itemSub.SupplierCertId
+					//			model1.BackReason = "老数据导入缺资质"
+					//			model1.CreateOn = time.Now()
+					//			model1.CreateBy = this.User.Realname
+					//			model1.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					//			svc.InsertEntityBytbl(OilSupplierPauseReasonName, &model1)
+					//			break
+					//		}
+					//	}
+					//	i += 1
+					//}
+				} else {
+					// 删除
+					//err = svc.DeleteEntityById(itemSub.Id, &subDelete)
 				}
-			} else {
-				// 删除
-				err = svc.DeleteEntityById(itemSub.Id, &subDelete)
 			}
+			//err = svc.DeleteTable("OilSupplierTecContrast", "Id = " + strconv.Itoa(item.Id))
 		}
-		err = svc.DeleteTable("OilSupplierTecContrast", "Id = " + strconv.Itoa(item.Id))
-	}
-	if err == nil {
-		errinfo.Message = "修改成功!"
-		errinfo.Code = 0
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	} else {
-		errinfo.Message = "修改失败!"
-		errinfo.Code = -1
-		this.Data["json"] = &errinfo
-		this.ServeJSON()
-	}
+		this.CreateContrast()
+	}()
+	errinfo.Message = "更新中,请勿重复更新!"
+	errinfo.Code = 0
+	this.Data["json"] = &errinfo
+	this.ServeJSON()
 }

BIN
src/dashoo.cn/doc/资质对比导出模板.xlsx


+ 32 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/basisbuild.js

@@ -111,5 +111,37 @@ export default {
       url: '/basisbuild/exportpdf/' + tbid + '/' + typecode,
       method: 'post'
     })
+  },
+  execlexport (myAxios) {
+    return myAxios({
+      url: '/basisbuild/exportexecl/',
+      method: 'post'
+    })
+  },
+  getCompareTmpSupplier (params, myAxios) {
+    return myAxios({
+      url: '/basisbuild/get-compare-tmp-supplier',
+      method: 'get',
+      params: params
+    })
+  },
+  getCompareList (CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/basisbuild/comparelist?CreateOn=' + CreateOn,
+      method: 'GET',
+      params: params
+    })
+  },
+  deleteSuspend (myAxios) {
+    return myAxios({
+      url: '/basisbuild/delete-suspend',
+      method: 'POST'
+    })
+  },
+  createContrast (myAxios) {
+    return myAxios({
+      url: '/basisbuild/create-contrast',
+      method: 'GET'
+    })
   }
 }

+ 31 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/index.vue

@@ -15,11 +15,11 @@
           </router-link>
           <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出
           </el-button>
-          <el-button type="primary" size="mini" style="margin-left:20px; margin-top: -4px;" @click="showimport">更新编码
+         <el-button type="warning" plain size="mini" style="margin-left:20px; margin-top: -4px;" @click="showimport">更新基建编码
           </el-button>
-          <router-link :to="'/oilsupplier/basisbuild/_opera/showdelcertsub'">
-            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">查看待删除准入项</el-button>
-          </router-link>
+<!--          <router-link :to="'/oilsupplier/basisbuild/_opera/showdelcertsub'">-->
+<!--            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">查看待删除准入项</el-button>-->
+<!--          </router-link>-->
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
           <el-form-item label="时间">
@@ -147,6 +147,10 @@
           </span>
           <span style="float: right;">
             <el-button type="primary" size="mini" style="margin-left:20px; margin-top: -4px;" @click="importExcel">导入</el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="contrastList()">查看企业对比
+            </el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="qualificaList()">查看资质对比
+            </el-button>
             <el-button type="warning" size="mini" style="margin-left:10px; margin-top: -4px;" @click="truncateimport()">清空所有导入
             </el-button>
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="confirmImport()">确认更新
@@ -195,6 +199,13 @@
       </el-card>
     </el-dialog>
 
+    <el-dialog title="企业对比列表"  width="95%" top="5vh" :visible.sync="contrastListvisible">
+      <tmp-supplier-check v-if="contrastListvisible"></tmp-supplier-check>
+    </el-dialog>
+    <el-dialog title="资质对比列表"  width="95%" top="5vh" :visible.sync="qualificaListvisible">
+      <tmp-class-check v-if="qualificaListvisible"></tmp-class-check>
+    </el-dialog>
+
     <el-dialog title="高级查询" :visible.sync="importDialogVisible" width="720px">
       <el-form ref="advancedsearchForm" label-width="110px">
         <el-row>
@@ -299,6 +310,8 @@
   import setapi from '@/api/oilsupplier/oilclassorgset'
   import axios from 'axios'
   import uploadajax from '@/assets/js/uploadajax.js'
+  import tmpSupplierCheck from "../basisbuild/tmpsuppliercheck"
+  import tmpClassCheck from "../basisbuild/tmpclasscheck"
 
   export default {
     computed: {
@@ -306,6 +319,10 @@
         authUser: 'authUser'
       })
     },
+    components: {
+      tmpSupplierCheck,
+      tmpClassCheck
+    },
     name: 'oilbasisbuild',
     data() {
       return {
@@ -318,6 +335,8 @@
         importDialogVisible: false,
         importloading: false,
         showimportvisible: false,
+        contrastListvisible: false,
+        qualificaListvisible: false,
         loading: false,
         deptsetVisible: false,
         dialogVisible: false,
@@ -539,6 +558,14 @@
           console.error(err)
         })
       },
+      contrastList () {
+        this.contrastListvisible = true
+        this.showimportvisible = false
+      },
+      qualificaList () {
+        this.qualificaListvisible = true
+        this.showimportvisible = false
+      },
       importExcel () {
         this.uploadshow = true
       },

+ 284 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/tmpclasscheck.vue

@@ -0,0 +1,284 @@
+<template>
+  <div>
+    <el-card class="box-card" shadow="never" style="height: calc(100vh - 115px);position:relative">
+      <div slot="header">
+          <span>
+            <i class="icon icon-table2"></i> 资质对比表
+          </span>
+        <span style="float: right;">
+
+          </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="编码">
+            <el-input size="mini" v-model="searchForm.Code" style="width:100%" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="名称">
+            <el-input size="mini" v-model="searchForm.Name" style="width:100%" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="筛选条件">
+            <el-select placeholder="请选择" v-model="conditions" style="width: 100%" size="mini">
+              <el-option :key="1" label="名称匹配正确" :value="1"></el-option>
+              <el-option :key="4" label="完全不匹配" :value="4"></el-option>
+              <el-option :key="6" label="完全匹配正确" :value="6"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" size="mini" @click="importhandleSearch">查询</el-button>
+          </el-form-item>
+          <el-form-item>
+<!--            <el-button type="primary" size="mini" @click="deleteList" :disabled="isDisable" :loading="deleteloading">删除</el-button>-->
+<!--            <el-button type="primary" size="mini" @click="changeList" v-if="conditions == 2" :disabled="isDisableCh" :loading="changeloading">暂停</el-button>-->
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" size="mini" border height="calc(100vh - 360px)"
+                style="width: 100%" @sort-change="orderby" v-loading="loading">
+
+        <el-table-column v-for="column in tableColumns" :prop="column.prop" sortable :min-width="column.width"
+                         :label="column.label" :key="column.Id" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ transferStr(scope.row[column.prop]) }}
+          </template>
+        </el-table-column>
+        <!--动态显示的表头-->
+        <el-table-column v-for="column in dynamicTableColumns" :prop="column.prop" sortable :width="300"
+                         :key="column.Id" :label="column.label" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ transferStr(scope.row[column.prop]) }}
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+                     :page-sizes="[10, 50, 100, 200, 400]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+                     :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+
+  </div>
+</template>
+
+<script>
+  import api from '@/api/oilsupplier/basisbuild'
+  import setapi from '@/api/oilsupplier/oilclassorgset'
+  export default {
+    name: 'tmpClassCheck',
+    created () {
+      this.initTableHeader()
+      this.initDatas()
+    },
+    data () {
+      return {
+        entityList: [],
+        conditions: 1,
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        loading: false,
+        deleteloading: false,
+        changeloading: false,
+        searchForm: {
+          Name: '',
+          Code: '',
+          AccessCardNo: '',
+          SupplierName: '',
+          SupplierTypeCode: '',
+          InFlag: '',
+          LegalPerson: '',
+          ContactName: '',
+          CommercialNo: '',
+          RegCapital1: '',
+          RegCapital2: '',
+          CompanyType: '',
+          Province: '',
+          City: '',
+          Street: '',
+          Address: '',
+          LinkProvince: '',
+          LinkCity: '',
+          LinkStreet: '',
+          LinkAddress: '',
+          DepositBank: '',
+          BusinessScope: '',
+          OldSupplierName: '',
+          HseTraining: '',
+          // NeedFileType: [],
+          NeedFileType: '',
+          CerSubName: '',
+          FullName: '',
+          CheckUserName: '',
+          CheckUserId: ''
+        },
+        Id: '',
+        SupplierCertId: '',
+        SupplierTypeCode: '',
+        SupplierName: '',
+        searchFormSub: {
+          Code: '',
+          Name: ''
+        },
+        tableColumns: [{
+          prop: 'Code',
+          label: '编码',
+          width: 120,
+          sort: true
+        },
+
+          {
+            prop: 'Name',
+            label: '名称',
+            width: 260,
+            sort: true
+          },
+          {
+            prop: 'OrgName',
+            label: '部门名称',
+            width: 150,
+            sort: true
+          }
+        ],
+        dynamicTableColumns: [],
+        CreateOn: [],
+        deleteArr: [],
+        isDisable: true,
+        isDisableCh: true
+      }
+    },
+
+    methods: {
+      tableRowClassName({row, rowIndex}) {
+        if (row.checked === 1) {
+          return 'yellow-row'
+        }
+      },
+      hover({row, rowIndex}) {
+        if (row.checked === 1) {
+          return "background-color:lightyellow"
+        } else {
+          return "background-color:white"
+        }
+      },
+      // 列表排序功能
+      orderby (column) {
+        if (column.order === 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order === 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        // this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      transferStr (val) {
+        if (val === '01') {
+          return '物资类'
+        } else if (val === '02') {
+          return '基建类'
+        } else if (val === '03') {
+          return '服务类'
+        } else {
+          return val
+        }
+      },
+      transferStr2 (val) {
+        if (val === '1') {
+          return '是'
+        }
+        if (val === '0') {
+          return ''
+        } else {
+          return val
+        }
+      },
+      importhandleSearch () {
+        this.currentPage = 1
+        // this.importDialogVisible = false
+        this.initDatas()
+      },
+      handleCheckedCitiesChange(val, value) {
+        if (val) {
+          this.deleteArr.push(value)
+        } else {
+          let a = this.deleteArr.findIndex(item => item === val)
+          this.deleteArr.splice(a, 1)
+        }
+        console.log(val, this.deleteArr, 'value')
+        if (this.deleteArr.length > 0) {
+          this.isDisable = false
+          this.isDisableCh = false
+        } else {
+          this.isDisable = true
+          this.isDisableCh = true
+        }
+      },
+      initDatas () {
+        this.loading = true
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          Edition: '1',
+          Conditions: this.conditions
+        }
+        let myCreateOn = []
+        // 解析时间
+
+        if (this.CreateOn != null && this.CreateOn.length === 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        // 查询条件
+        Object.assign(params, this.searchForm)
+        // 访问接口
+        api.getCompareList(myCreateOn, params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+          this.isDisable = true
+          this.isDisableCh = true
+          this.loading = false
+          this.deleteArr = []
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      search () {
+        this.getCertSub()
+      },
+      initTableHeader () {
+        setapi.initTsTableHeader(this.$axios).then(res => {
+          this.dynamicTableColumns = res.data.items
+        })
+      },
+    }
+
+  }
+</script>
+<style>
+.el-table .yellow-row {
+  background: lightyellow;
+}
+</style>

+ 562 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/tmpsuppliercheck.vue

@@ -0,0 +1,562 @@
+<template>
+  <div>
+    <el-card class="box-card" shadow="never" style="height: calc(100vh - 115px);position:relative">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 企业对比表
+        </span>
+        <el-form :model="searchForm" ref="searchformRef" :inline="true" style="float: right;position:absolute;right:15px;top:10.5px" >
+          <el-form-item label="筛选条件">
+            <el-select placeholder="请选择" v-model="conditions" style="width: 100%" size="mini">
+              <el-option :key="1" label="全部" :value="1"></el-option>
+              <el-option :key="2" label="有差异" :value="2"></el-option>
+              <el-option :key="3" label="缺少资质" :value="3"></el-option>
+              <el-option :key="4" label="正常" :value="4"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="准入编码">
+            <el-input size="mini" v-model="searchForm.AccessCardNo" placeholder="请输入内容"></el-input>
+          </el-form-item>
+          <el-form-item label="企业名称">
+            <el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入内容"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" size="mini" style="margin-left: 8px" @click="search1">查询</el-button>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="warning" size="mini" @click="exportExcel" :loading="loadingExcel">导出</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!--内框表格显示-->
+      <el-table id="rebateSetTable1" :data="conList" size="mini" v-loading="loading" border height="calc(100vh - 243px)"
+                style="width: 100%" @sort-change="orderby" :row-class-name="tableRowClassName" :cell-style="hover">
+        <el-table-column label="操作" width="260px" align="center" fixed="right" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-button type="text" @click="opencertsub(scope.row)" title="查看准入范围" size="mini" icon="el-icon-document" width="120px">准入范围</el-button>
+          </template>
+        </el-table-column>
+        <!--内框表格剩余栏显示-->
+        <el-table-column label="状态" prop="InFlag" width="100px" align="center">
+          <template slot-scope="scope">
+            <el-alert v-if="scope.row.InFlag=='1'" :closable="false" style="background:rgba(255,255,255,0.2)" title="准入" type="success" ></el-alert>
+            <el-alert v-if="scope.row.InFlag=='2'" :closable="false" style="background:rgba(255,255,255,0.2)" title="暂停" type="warning" ></el-alert>
+            <el-alert v-if="scope.row.InFlag=='3'" :closable="false" style="background:rgba(255,255,255,0.2)" title="取消" type="error"></el-alert>
+          </template>
+        </el-table-column>
+        <el-table-column label="准入编码" width="100px" prop="AccessCardNo" sortable align="center">
+          <template slot-scope="scope" >
+            <span style="font-family:'黑体';font-size:13px">{{scope.row.AccessCardNo}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="企业名称" min-width="300px" prop="SupplierName" sortable align="center"></el-table-column>
+        <el-table-column label="准入类别" prop="SupplierTypeCode" align="center">
+          <template slot-scope="scope">
+            {{transferStr(scope.row.SupplierTypeCode)}}
+          </template>
+        </el-table-column>
+        <el-table-column label="法人代表"  width="100px" prop="LegalPerson" align="center"></el-table-column>
+        <el-table-column label="注册资金(万元)"  width="170px" prop="RegCapital" sortable align="center"></el-table-column>
+        <el-table-column label="移动电话"  width="120px" prop="Mobile" align="center"></el-table-column>
+        <el-table-column label="准入范围数量"  width="120px" prop="SubCnt" align="center"></el-table-column>
+        <el-table-column label="对不上数量"  width="120px" prop="NoSubCnt" align="center"></el-table-column>
+        <el-table-column label="1级降2级数量"  width="120px" prop="OneTwoCount" align="center"></el-table-column>
+        <el-table-column label="2级升1级数量"  width="120px" prop="TwoOneCount" align="center"></el-table-column>
+        <el-table-column label="是否缺资质" width="130px" prop="Checked" sortable align="center">
+          <template slot-scope="scope" >
+            <span style="font-family:'黑体';font-size:13px">{{stringChecked(scope.row.Checked)}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="缺少的资质"  width="120px" prop="ZzName" show-overflow-tooltip align="center"></el-table-column>
+      </el-table>
+
+      <!-- 分页 -->
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
+                     layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount"></el-pagination>
+    </el-card>
+    <el-dialog :visible.sync="dialogVisibleCertsSub" width="90%" append-to-body>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+          <span style="font-weight: bold">准入范围</span>
+          <span style="float: right;">
+                <el-form ref="form" :inline="true" style="margin-top: -10px">
+                  <el-form-item label="编码">
+                    <el-input size="mini" v-model="searchFormSub.Code" placeholder="请输入内容" style="width: 100%"></el-input>
+                  </el-form-item>
+                  <el-form-item label="名称">
+                    <el-input size="mini" v-model="searchFormSub.Name" placeholder="请输入内容" style="width: 100%"></el-input>
+                  </el-form-item>
+                  <el-form-item>
+                    <el-button type="primary" size="mini" style="margin-left: 8px" @click="search">查询</el-button>
+<!--                    <el-button type="primary" @click="toPdf" size="mini" style="margin-left: 25px">下载待删除准入范围</el-button>-->
+                  </el-form-item>
+                </el-form>
+              </span>
+        </div>
+        <el-table :data="certsubList" border size="mini" :row-class-name="subRowClassName" :cell-style="subRowHover" v-loading="certsubListLoading">
+<!--          <el-table-column label="操作" width="160px" align="center" fixed="right" show-overflow-tooltip>-->
+<!--            <template slot-scope="scope">-->
+<!--              <el-button type="text" style="color: #F56C6C" @click="delcertsubbyid(scope.row)" title="删除" size="mini" icon="el-icon-delete" width="90px">删除</el-button>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+          <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+          <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+          <el-table-column prop="HeaderName" label="缺少资质" show-overflow-tooltip></el-table-column>
+          <el-table-column prop="GoodsLevel" label="级别" width="80px" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span v-if="scope.row.GoodsLevel=='1'">一级</span>
+              <span v-if="scope.row.GoodsLevel=='2'">二级</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="是否为制造商" width="100" v-if="SupplierTypeCode == '01'">
+            <template slot-scope="scope">
+              <el-tag type="info" v-if="scope.row.IsManufacturer == 2">非制造商</el-tag>
+              <el-tag type="success" v-else-if="scope.row.IsManufacturer == 1">制造商</el-tag>
+              <span v-else>——</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态"
+                           align="center"
+                           width="100px">
+            <template slot-scope="scope">
+            <span v-if="scope.row.CertSubStatus=='1'"
+                  style="color:#67C23A">准入</span>
+              <span v-else-if="scope.row.CertSubStatus=='2'"
+                    style="color:#E6A23C">暂停</span>
+              <span v-else>——</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-pagination
+          @size-change="handleSizeChangeSub"
+          @current-change="handleCurrentChangeSub"
+          :current-page="currentPageSub"
+          :page-sizes="[10, 50, 100, 200, 400]"
+          :page-size="sizeSub"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="currentItemCountSub"
+        ></el-pagination>
+      </el-card>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import api from '@/api/oilsupplier/basisbuild'
+  import XLSX from "xlsx";
+  export default {
+    name: 'compareTmpSupplier',
+    created () {
+      // Object.assign(this.searchFormReset, this.searchForm)
+      this.initDatas()
+    },
+    data () {
+      return {
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        conditions: 1,
+        currentItemCount: 0,
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        conList: [],
+        loading: false,
+        dialogVisibleCertsSub: false,
+        certsubListLoading: false,
+        loadingExcel: false,
+        searchForm: {
+          AccessCardNo: '',
+          SupplierName: '',
+          SupplierTypeCode: '',
+          InFlag: '',
+          LegalPerson: '',
+          ContactName: '',
+          CommercialNo: '',
+          RegCapital1: '',
+          RegCapital2: '',
+          CompanyType: '',
+          Province: '',
+          City: '',
+          Street: '',
+          Address: '',
+          LinkProvince: '',
+          LinkCity: '',
+          LinkStreet: '',
+          LinkAddress: '',
+          DepositBank: '',
+          BusinessScope: '',
+          OldSupplierName: '',
+          HseTraining: '',
+          // NeedFileType: [],
+          NeedFileType: '',
+          CerSubName: '',
+          FullName: '',
+          CheckUserName: '',
+          CheckUserId: ''
+        },
+        SupplierId: '',
+        Id: '',
+        SupplierCertId: '',
+        SupplierTypeCode: '',
+        SupplierName: '',
+        searchFormSub: {
+          Code: '',
+          Name: ''
+        },
+        // 分页参数
+        sizeSub: 10,
+        currentPageSub: 1,
+        currentItemCountSub: 0,
+        certsubList: [],
+        showcolumn: [],
+        tableColumns: [
+
+          {
+            prop: 'InFlag',
+            label: '状态',
+            width: 120,
+            sort: true
+          },
+          {
+            prop: 'AccessCardNo',
+            label: '准入编码',
+            width: 150,
+            sort: true
+          },
+
+          {
+            prop: 'SupplierName',
+            label: '企业名称',
+            width: 120,
+            sort: true
+          },
+
+          {
+            prop: 'SupplierTypeCode',
+            label: '准入类别',
+            width: 150,
+            sort: true
+          },
+
+          {
+            prop: 'LegalPerson',
+            label: '法人代表',
+            width: 120,
+            sort: true
+          },
+
+          {
+            prop: 'RegCapital',
+            label: '注册资金',
+            width: 150,
+            sort: true
+          },
+
+          {
+            prop: 'Mobile',
+            label: '移动电话',
+            width: 120,
+            sort: true
+          }
+
+        ],
+        dynamicTableColumns: [],
+      }
+    },
+
+    methods: {
+      tableRowClassName({row, rowIndex}) {
+        if (row.NoSubCnt > 0){
+          return 'green-row'
+        }
+        if (row.Checked == "1") {
+          return 'blue-row'
+        } else{
+          return 'yellow-row'
+        }
+      },
+      subRowClassName({row, rowIndex}) {
+        if (row.MinClassId == '0'){
+          return 'green-row'
+        }
+        if (row.Checked == '1') {
+          return 'yellow-row'
+        } else{
+          return 'blue-row'
+        }
+      },
+      hover({row}) {
+        if (row.NoSubCnt > 0){
+          return "background-color:pink"
+        }
+        if (row.Checked == "1") {
+          return "background-color:lightblue"
+        } else{
+          return "background-color:lightyellow"
+        }
+      },
+      subRowHover({row}) {
+        if (row.MinClassId == '0'){
+          return "background-color:pink"
+        }
+        if (row.Checked == "1") {
+          return "background-color:lightyellow"
+        } else{
+          return "background-color:lightblue"
+        }
+      },
+      searchCommand (command) {
+        if (command === 'search') {
+          this.dialogVisible = true
+        } else if (command === 'clear') {
+          this.clearSearch()
+        }
+      },
+      // 列表排序功能
+      orderby (column) {
+        if (column.order === 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order === 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        // this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      transferStr (val) {
+        if (val === '01') {
+          return '物资类'
+        } else if (val === '02') {
+          return '基建类'
+        } else if (val === '03') {
+          return '服务类'
+        } else {
+          return val
+        }
+      },
+      stringChecked(val) {
+        if (val === '1') {
+          return '否'
+        }  else {
+          return '是'
+        }
+      },
+      initDatas () {
+        this.loading = true
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          Conditions: this.conditions,
+          Edition: '1'
+        }
+        let myCreateOn = []
+        // 解析时间
+
+        if (this.CreateOn != null && this.CreateOn.length === 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        // 查询条件
+        Object.assign(params, this.searchForm)
+        // 访问接口
+        api.getCompareTmpSupplier(params, this.$axios).then(res => {
+          this.conList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      opencertsub (row) {
+        this.currentPageSub = 1
+        this.certsubList = []
+        this.dialogVisibleCertsSub = true
+        this.Id = row.Id
+        this.SupplierCertId = row.CertId
+        this.SupplierTypeCode = row.SupplierTypeCode
+        this.SupplierName = row.SupplierName
+        this.getCertSub(row)
+      },
+      getCertSub (row) {
+        this.certsubListLoading = true
+        let _this = this
+        const params = {
+          SupplierCertId: this.SupplierCertId,
+          SupplierTypeCode: this.SupplierTypeCode,
+          _currentPage: this.currentPageSub,
+          _size: this.sizeSub
+        }
+        Object.assign(params, this.searchFormSub)
+        this.$axios.get('technologyservice/delcertsublist', {
+          params
+        })
+          .then(res => {
+            _this.certsubList = res.data.items
+            _this.currentItemCountSub = res.data.currentItemCount
+            this.certsubListLoading = false
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      // 分页方法
+      handleCurrentChangeSub (value) {
+        this.currentPageSub = value
+        this.getCertSub()
+      },
+      handleSizeChangeSub (value) {
+        this.sizeSub = value
+        this.currentPageSub = 1
+        this.getCertSub()
+      },
+      // 导出准入范围到pdf
+      toPdf () {
+        api.pdfexport(this.Id, this.SupplierTypeCode, this.$axios)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              // this.$message({
+              //   type: 'success'
+              //   message: res.data.message
+              // })
+              let docurl = res.data.item
+              let pdfurl
+              // 内网服务器专用
+              if (process.client && docurl.indexOf('upfile') === 0) {
+                const myDomain = window.location.host
+                // location.href = 'http://' + myDomain + '/' + docurl
+                pdfurl = 'http://' + process.env.LOCAL_IP + '/' + docurl
+                let requestParams = {
+                  pdfUrl: pdfurl,
+                  watermark: this.SupplierName
+                }
+                this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
+                  .then(function (res) {
+                    window.open('http://' + myDomain + '/' + res.data)
+                  })
+              } else {
+                // location.href = 'http://' + docurl
+                pdfurl = 'http://' + docurl
+                let requestParams = {
+                  pdfUrl: pdfurl,
+                  watermark: this.SupplierName
+                }
+                this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
+                  .then(function (res) {
+                    window.open('http://' + res.data)
+                  })
+              }
+            }
+          }).catch(err => {
+          console.error(err)
+        })
+      },
+      search () {
+        this.currentPageSub = 1
+        this.getCertSub()
+      },
+      search1 () {
+        this.currentPage = 1
+        this.initDatas()
+      },
+      delcertsubbyid (row) {
+        console.log(row)
+        this.$confirm('是否删除准入项?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            Id: row.Id
+          }
+          console.log(params)
+          api.delTmpSupplierCertSub(params, this.$axios).then(res => {
+            console.log(res)
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              this.getCertSub()
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        })
+      },
+      exportExcel () {
+        this.loadingExcel = true
+        console.log('111111导出', this.loadingExcel)
+        api.execlexport(this.$axios)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              // this.$message({
+              //    type: 'success'
+              //    message: res.data.message
+              // })
+              let docurl = res.data.item
+              // 内网服务器专用
+              if (process.client && docurl.indexOf('upfile') === 0) {
+                const myDomain = window.location.host
+                location.href = 'http://' + myDomain + '/' + docurl
+              } else {
+                location.href = 'http://' + docurl
+              }
+              this.loadingExcel = false
+            }
+          }).catch(err => {
+          console.error(err)
+        })
+      },
+    }
+
+  }
+</script>
+
+<style>
+.el-table .blue-row {
+  background: lightblue;
+}
+
+.el-table .green-row {
+  background: pink;
+}
+
+.el-table .yellow-row {
+  background: lightyellow;
+}
+</style>

+ 5 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/index.vue

@@ -871,10 +871,10 @@
         api.deleteSuspend(this.$axios).then(res => {
           // this.importloading = false
           if (res.data.code === 0) {
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
+            // this.$message({
+            //   type: 'success',
+            //   message: res.data.message
+            // })
           }
         })
         // })
@@ -913,7 +913,7 @@
             if (res.data.code === 0) {
               this.$message({
                 type: 'success',
-                message: res.data.message + ' 即将执行一键操作'
+                message: res.data.message
               })
               this.initDatas()
               this.deleteSuspend()

+ 1 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/tmpsuppliercheck.vue

@@ -68,9 +68,7 @@
             <span style="font-family:'黑体';font-size:13px">{{stringChecked(scope.row.Checked)}}</span>
           </template>
         </el-table-column>
-        <!--<el-table-column label="最后一次年审" width="100px" prop="AuditDate" align="center">-->
-        <!--<template slot-scope="scope">{{ jstimehandle(scope.row.AuditDate) }}</template>-->
-        <!--</el-table-column>-->
+        <el-table-column label="缺少的资质"  width="120px" prop="ZzName" show-overflow-tooltip align="center"></el-table-column>
       </el-table>
 
       <!-- 分页 -->

+ 10 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/basislist.vue

@@ -20,6 +20,14 @@
             <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
                             start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
           </el-form-item>
+          <el-form-item label="准入标识">
+            <el-select size="mini" style="width:100px" v-model="InFlag" placeholder="准入标识">
+              <el-option label="全部" value=""></el-option>
+              <el-option label="准入" value="1"></el-option>
+              <el-option label="暂停" value="2"></el-option>
+              <el-option label="取消" value="3"></el-option>
+            </el-select>
+          </el-form-item>
 
           <el-form-item>
             <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
@@ -332,6 +340,7 @@ import certApi from '@/api/oilsupplier/suppliercert'
         size: 10,
         currentPage: 1,
         currentItemCount: 0,
+        InFlag: '',
         // 列表排序
         Column: {
           Order: '',
@@ -763,6 +772,7 @@ import certApi from '@/api/oilsupplier/suppliercert'
           Order: this.Column.Order,
           Prop: this.Column.Prop,
           SupplierTypeCode: '02',
+          InFlag: this.InFlag,
           Status: '8'
         }
         let myCreateOn = []

+ 10 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/goodslist.vue

@@ -20,7 +20,14 @@
             <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
                             start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
           </el-form-item>
-
+          <el-form-item label="准入标识">
+            <el-select size="mini" style="width:100px" v-model="InFlag" placeholder="准入标识">
+              <el-option label="全部" value=""></el-option>
+              <el-option label="准入" value="1"></el-option>
+              <el-option label="暂停" value="2"></el-option>
+              <el-option label="取消" value="3"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
               查询
@@ -361,6 +368,7 @@
           Order: '',
           Prop: ''
         },
+        InFlag: '',
         // 查询时间
         CreateOn: [],
         // 查询项
@@ -638,6 +646,7 @@
           Order: this.Column.Order,
           Prop: this.Column.Prop,
           SupplierTypeCode: '01',
+          InFlag: this.InFlag,
           Status: '8'
         }
         let myCreateOn = []

+ 10 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/techlist.vue

@@ -20,6 +20,14 @@
             <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
                             start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
           </el-form-item>
+          <el-form-item label="准入标识">
+            <el-select size="mini" style="width:100px" v-model="InFlag" placeholder="准入标识">
+              <el-option label="全部" value=""></el-option>
+              <el-option label="准入" value="1"></el-option>
+              <el-option label="暂停" value="2"></el-option>
+              <el-option label="取消" value="3"></el-option>
+            </el-select>
+          </el-form-item>
 
           <el-form-item>
             <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
@@ -338,6 +346,7 @@ import certApi from '@/api/oilsupplier/suppliercert'
           Order: '',
           Prop: ''
         },
+        InFlag: '',
         // 查询时间
         CreateOn: [],
         // 查询项
@@ -765,6 +774,7 @@ import certApi from '@/api/oilsupplier/suppliercert'
           Order: this.Column.Order,
           Prop: this.Column.Prop,
           SupplierTypeCode: '03',
+          InFlag: this.InFlag,
           Status: '8'
         }
         let myCreateOn = []

+ 5 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/index.vue

@@ -802,10 +802,10 @@
       deleteSuspend () {
         api.deleteSuspend(this.$axios).then(res => {
           if (res.data.code === 0) {
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
+            // this.$message({
+            //   type: 'success',
+            //   message: res.data.message
+            // })
           }
         })
         // })
@@ -821,7 +821,7 @@
             if (res.data.code === 0) {
               this.$message({
                 type: 'success',
-                message: res.data.message + ' 即将执行一键操作'
+                message: res.data.message
               })
               this.initDatas()
               this.deleteSuspend()

+ 1 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/tmpsuppliercheck.vue

@@ -68,9 +68,7 @@
             <span style="font-family:'黑体';font-size:13px">{{stringChecked(scope.row.Checked)}}</span>
           </template>
         </el-table-column>
-        <!--<el-table-column label="最后一次年审" width="100px" prop="AuditDate" align="center">-->
-        <!--<template slot-scope="scope">{{ jstimehandle(scope.row.AuditDate) }}</template>-->
-        <!--</el-table-column>-->
+        <el-table-column label="缺少的资质"  width="120px" prop="ZzName" show-overflow-tooltip align="center"></el-table-column>
       </el-table>
 
       <!-- 分页 -->