Kaynağa Gözat

后:对比列表

dubch 5 yıl önce
ebeveyn
işleme
15e301e9c4

+ 3 - 0
src/dashoo.cn/backend/api/business/oilsupplier/goodsaptitude/oilgoodsaptitudeService.go

@@ -370,6 +370,9 @@ func (s *OilGoodsAptitudeService) GetPagingTmpCheckedEntities(entitiesPtr interf
 			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,
+			COUNT(sub.Id) AS subCnt,
+			COUNT(sub.SubClassId > 0 or null) AS noSubCnt,
+			min(sub.SubClassId) as MinClassId,
 			(
 			((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.F36)='1' AND LOCATE('F36',  group_concat(DISTINCT header.Code)) > 0) or (max(goods.F36) is null) or (max(goods.F36) = ''), TRUE, FALSE)) or

+ 4 - 2
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -276,12 +276,14 @@ type OilSupplierContrast struct {
 	InStyle          string    //准入方式
 	Remark           string
 
-	SubCnt           string
+	SubCnt           int
+	NoSubCnt           int
 	HeaderCodes           string
 	SubNames           string
 	CertSubCodes           string
 	SubClassIds           string
-	Checked           string
+	Checked           string   // 0没问题 1缺资质 2准入范围找不到
+	MinClassId           string   // subclassid的最小值
 }
 
 //type NeedFileTypeStruct struct {

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsub.go

@@ -52,6 +52,7 @@ type OilSupplierCertSub1 struct {
 	HeaderCodes           string
 	Checked           int
 	HeaderName           string
+	MinClassId           string
 }
 
 type Del_OilSupplierCertSub struct {

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

@@ -587,6 +587,7 @@ func (s *TmpzcgtSession) UpdateOilSupplierCertAppendSub() error {
 			", a.`Type`=3 WHERE a.SupplierCertId=" + strconv.Itoa(certAppend.SupplierCertId) +
 			" AND"  + code + ") and a.SupplierCertAppendId=0"
 		_, err = s.DBE.Query(sql)
+		s.DBE.Query("commit;")
 	}
 	s.DBE.Query("SET unique_checks=1;")
 	s.DBE.Query("SET autocommit=1;")

+ 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/1,03cbc09423fef5
+ContrastExcel=http://weed1.labsop.cn:9390/5,03cc0d8cade7ce
 
 [bank]
 callbackHost=http://localhost:10091/api

+ 32 - 30
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -1580,10 +1580,11 @@ func (this *OilGoodsAptitudeController) InsertGoodsAptitude() {
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 	}
+	// TODO 更新certsub表的subclassid
 
 	svc1 := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
 	var list2 []supplier.OilSupplierContrast
-	where := " Checked = '0' and SupplierTypeCode = '01'"
+	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 {
@@ -2045,39 +2046,40 @@ func (this *OilGoodsAptitudeController) GetDelCertSubList() {
 	a := 0
 	for _, item := range list {
 		sql := "SELECT CONCAT_WS(',',IF(ifnull(F01, '') = '', '', F01),IF(ifnull(F02, '') = '', '', F02),IF(ifnull(F03, '') = '', '', F03),IF(ifnull(F04, '') = '', '', F04),IF(ifnull(F05, '') = '', '', F05),IF(ifnull(F06, '') = '', '', F06),IF(ifnull(F07, '') = '', '', F07),IF(ifnull(F08, '') = '', '', F08),IF(ifnull(F09, '') = '', '', F09),IF(ifnull(F10, '') = '', '', F10),IF(ifnull(F11, '') = '', '', F11),IF(ifnull(F12, '') = '', '', F12),IF(ifnull(F13, '') = '', '', F13),IF(ifnull(F14, '') = '', '', F14),IF(ifnull(F15, '') = '', '', F15),IF(ifnull(F16, '') = '', '', F16),IF(ifnull(F17, '') = '', '', F17),IF(ifnull(F18, '') = '', '', F18),IF(ifnull(F19, '') = '', '', F19),IF(ifnull(F20, '') = '', '', F20),IF(ifnull(F21, '') = '', '', F21),IF(ifnull(F22, '') = '', '', F22),IF(ifnull(F23, '') = '', '', F23),IF(ifnull(F24, '') = '', '', F24),IF(ifnull(F25, '') = '', '', F25),IF(ifnull(F26, '') = '', '', F26),IF(ifnull(F27, '') = '', '', F27),IF(ifnull(F28, '') = '', '', F28),IF(ifnull(F29, '') = '', '', F29),IF(ifnull(F30, '') = '', '', F30),IF(ifnull(F31, '') = '', '', F31),IF(ifnull(F32, '') = '', '', F32),IF(ifnull(F33, '') = '', '', F33),IF(ifnull(F34, '') = '', '', F34),IF(ifnull(F35, '') = '', '', F35),IF(ifnull(F36, '') = '', '', F36),IF(ifnull(F37, '') = '', '', F37),IF(ifnull(F38, '') = '', '', F38),IF(ifnull(F39, '') = '', '', F39),IF(ifnull(F40, '') = '', '', F40),IF(ifnull(F41, '') = '', '', F41),IF(ifnull(F42, '') = '', '', F42),IF(ifnull(F43, '') = '', '', F43),IF(ifnull(F44, '') = '', '', F44),IF(ifnull(F45, '') = '', '', F45),IF(ifnull(F46, '') = '', '', F46)) AS Codes FROM tmp_OilGoodsAptitude a LEFT JOIN tmp_OilGoodsAptitudeClass class ON a.ClassId = class.Id"
-		sql += " where class.Code = '"+ item.Code + "'"
+		sql += " where class.Code = '"+ item.Code + "' and class.Name = '" + item.Name + "'"
 		model, _ := svc.DBE.QueryString(sql)
-		if model == nil {
-			continue
-		}
-		code := strings.Split(model[0]["Codes"], ",")
-		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) {
-					list[a].Checked = 1
-					sql1 := "select Name from Base_TableHeader where Code = 'F01' and CategoryCode = '01'"
-					model1, _ := svc.DBE.QueryString(sql1)
-					if strings.Index(list[a].HeaderName, model1[0]["Name"]) == -1 {
-						list[a].HeaderName += model1[0]["Name"] + " "
+		if model != nil {
+			code := strings.Split(model[0]["Codes"], ",")
+			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) {
+						list[a].Checked = 1
+						sql1 := "select Name from Base_TableHeader where Code = 'F01' and CategoryCode = '01'"
+						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 = '01'"
+						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 = '01'"
+						model1, _ := svc.DBE.QueryString(sql1)
+						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 = '01'"
-					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 = '01'"
-					model1, _ := svc.DBE.QueryString(sql1)
-					list[a].HeaderName += model1[0]["Name"]+ " "
-				}
+				i += 1
 			}
-			i += 1
+		} else {
+			list[a].MinClassId = "0"
 		}
 		a += 1
 	}

+ 18 - 15
src/dashoo.cn/backend/api/controllers/tmpzcgf/tmpzcgf.go

@@ -423,7 +423,8 @@ func (this *TmpzcgfController) UpdateCertSubclassID() {
 	svc.DBE.Query("SET unique_checks=0;")
 	svc.DBE.Query("SET autocommit=0;")
 	for _, item := range goodsAptitudeClassList {
-		sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id)  + " WHERE SupplierTypeCode = '01' and Code = '" + item.Code + "'"
+		sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id)  +
+			" WHERE SupplierTypeCode = '01' and Code = '" + item.Code + "'"
 		svc.DBE.Query(sql)
 		svc.DBE.Query("COMMIT;")
 	}
@@ -432,7 +433,8 @@ func (this *TmpzcgfController) UpdateCertSubclassID() {
 	where1 := "1=1"
 	svc.GetEntities(&basisBuildList, where1)
 	for _, item := range basisBuildList {
-		sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id)  + " WHERE SupplierTypeCode = '02' and Code = '" + item.Code + "'"
+		sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id)  +
+			" WHERE SupplierTypeCode = '02' and Code = '" + item.Code + "'"
 		svc.DBE.Query(sql)
 		svc.DBE.Query("COMMIT;")
 	}
@@ -441,7 +443,8 @@ func (this *TmpzcgfController) UpdateCertSubclassID() {
 	where2 := "1=1"
 	svc.GetEntities(&technologyServiceClassList, where2)
 	for _, item := range technologyServiceClassList {
-		sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id)  + " WHERE SupplierTypeCode = '03' and Code = '" + item.Code + "'"
+		sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id)  +
+			" WHERE SupplierTypeCode = '03' and Code = '" + item.Code + "'"
 		svc.DBE.Query(sql)
 		svc.DBE.Query("COMMIT;")
 	}
@@ -868,18 +871,18 @@ func (this *TmpzcgfController) ClearAll() {
 func (this *TmpzcgfController) InsertAll() {
 	go func() {
 		//清空所有资质
-		//this.ClearAll()
-		//
-		//this.InsertSupplier()
-		//this.InsertSupplierCert()
-		//this.UpdateCertTypeAndInflag()
-		//this.UpdateSupplierId()
-		//this.InsertFileName()
-		//this.InsertCertSub() // 准入
-		//this.UpdateOilSupplierCertSub()
-		//this.InsertOilSupplierCertAppend()
-		//this.UpdateOilSupplierCertAppend()
-		//this.UpdateOilSupplierCertAppendSub() // 更新增项的准入范围
+		this.ClearAll()
+
+		this.InsertSupplier()
+		this.InsertSupplierCert()
+		this.UpdateCertTypeAndInflag()
+		this.UpdateSupplierId()
+		this.InsertFileName()
+		this.InsertCertSub() // 准入
+		this.UpdateOilSupplierCertSub()
+		this.InsertOilSupplierCertAppend()
+		this.UpdateOilSupplierCertAppend()
+		this.UpdateOilSupplierCertAppendSub() // 更新增项的准入范围
 		this.UpdateCertSubclassID()
 		//this.CapacityExpansion() // 编码扩充 --弃用
 		//历史数据导入-由于运行到此处中断,上面的代码临时注释

+ 18 - 16
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/tmpsuppliercheck.vue

@@ -12,18 +12,11 @@
           <el-form-item label="企业名称">
             <el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入内容"></el-input>
           </el-form-item>
-
           <el-form-item>
-            <el-dropdown split-button type="primary" size="mini" @click="initDatas($event)" @command="searchCommand">
-              查询
-              <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item command="search">高级查询</el-dropdown-item>
-                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
+            <el-button type="primary" size="mini" style="margin-left: 8px" @click="initDatas($event)">查询</el-button>
           </el-form-item>
           <el-form-item>
-            <el-button type="warning" size="mini" @click="exportExcel">导出</el-button>
+            <el-button type="warning" size="mini" @click="exportExcel" :loading="loadingExcel">导出</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -58,6 +51,8 @@
         <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="是否缺资质" width="130px" prop="Checked" sortable align="center">
           <template slot-scope="scope" >
             <span style="font-family:'黑体';font-size:13px">{{stringChecked(scope.row.Checked)}}</span>
@@ -164,6 +159,7 @@
         loading: false,
         dialogVisibleCertsSub: false,
         certsubListLoading: false,
+        loadingExcel: false,
         searchForm: {
           AccessCardNo: '',
           SupplierName: '',
@@ -266,8 +262,9 @@
 
     methods: {
       tableRowClassName({row, rowIndex}) {
-        // console.log(row, 'row')
-        console.log(row.Checked, 'row')
+        if (row.MinClassId === '0'){
+          return 'green-row'
+        }
         if (row.Checked === "1") {
           return 'blue-row'
         } else{
@@ -275,8 +272,9 @@
         }
       },
       subRowClassName({row, rowIndex}) {
-        // console.log(row, 'row')
-        console.log(row.Checked, 'row')
+        if (row.MinClassId === '0'){
+          return 'green-row'
+        }
         if (row.Checked === 1) {
           return 'yellow-row'
         } else{
@@ -485,8 +483,8 @@
         })
       },
       exportExcel () {
-        console.log('111111导出')
-        this.loading = true
+        this.loadingExcel = true
+        console.log('111111导出', this.loadingExcel)
         api.execlexport(this.$axios)
           .then(res => {
             // response
@@ -503,11 +501,11 @@
               } else {
                 location.href = 'http://' + docurl
               }
+              this.loadingExcel = false
             }
           }).catch(err => {
           console.error(err)
         })
-        this.loading = false
       },
     }
 
@@ -519,6 +517,10 @@
   background: lightblue;
 }
 
+.el-table .green-row {
+  background: pink;
+}
+
 .el-table .yellow-row {
   background: lightyellow;
 }