Bläddra i källkod

前后:对比列表

dubch 5 år sedan
förälder
incheckning
52496f2b01

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

@@ -513,7 +513,6 @@ func (s *OilGoodsAptitudeService) GetPagingTmpSubEntities(pageIndex, itemsPerPag
 	sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 
 	sqlCount := "SELECT count(*) as total 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_OilGoodsAptitudeClass class ON a.Code=class.Code LEFT JOIN tmp_OilGoodsAptitude goods ON class.Id=goods.ClassId  where (" + having + ")"
-	sqlCount += " where (" + having + ")"
 
 	var totalResult TotalResult
 	s.DBE.SQL(sql).Find(entitiesPtr)
@@ -547,7 +546,6 @@ func (s *OilGoodsAptitudeService) GetPagingSubEntities(pageIndex, itemsPerPage i
 	}
 
 	sqlCount := "SELECT count(*) as total FROM OilSupplierCertSub a LEFT JOIN OilSupplierFile files ON a.SupplierId=files.SupplierId LEFT JOIN Base_TableHeader header ON files.NeedFileType=header.Name LEFT JOIN OilGoodsAptitudeClass class ON a.Code=class.Code LEFT JOIN OilGoodsAptitude goods ON class.Id=goods.ClassId where (" + having + ")"
-	sqlCount += " where (" + having + ")"
 
 	var totalResult TotalResult
 	s.DBE.SQL(sql).Find(entitiesPtr)

+ 26 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -1503,6 +1503,32 @@ func (this *OilGoodsAptitudeController) TruncateImport() {
 
 }
 
+// @Title get 清空导入的信息
+// @Description get SampleType by token
+// @Success 200 {object} sampletype.SampleType
+// @router /create-contrast [get]
+func (this *OilGoodsAptitudeController) CreateContrast() {
+	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
+	svc.TruncateTable("OilSupplierContrast")
+	// 插入对比列表
+	var list1 []supplier.OilSupplier
+	svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, 0, 0, "Id", false, &list1, " 1=1")
+	for _, item := range list1 {
+		var list []supplier.OilSupplierContrast
+		where := "  b.SupplierTypeCode='01' and a.Id = " + strconv.Itoa(item.Id)
+		svc.GetPagingTmpCheckedEntities(&list, where)
+		if list != nil {
+			svc.InsertEntityBytbl("OilSupplierContrast", list[0])
+		}
+	}
+	var errorinfo ErrorInfo
+	errorinfo.Code = 0
+	errorinfo.Message = "成功!"
+	this.Data["json"] = &errorinfo
+	this.ServeJSON()
+
+}
+
 // @Title 将导入的数据 导入到正式表
 // @Description 确认更新
 // @Success 200 {object} sampletype.SampleType

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

@@ -513,10 +513,10 @@
 
 <style>
 .el-table .blue-row {
-  background: deepskyblue;
+  background: lightblue;
 }
 
 .el-table .yellow-row {
-  background: yellow;
+  background: lightyellow;
 }
 </style>