|
|
@@ -8,7 +8,6 @@ import (
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplierpausereason"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/tableheader"
|
|
|
- "dashoo.cn/backend/api/business/oilsupplier/technologyserviceclass"
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
"github.com/tealeg/xlsx"
|
|
|
@@ -1705,17 +1704,17 @@ func (this *OilGoodsAptitudeController) CreateContrast() {
|
|
|
svc.GetPagingTmpCheckedEntities(&list, where)
|
|
|
if list != nil {
|
|
|
var supplierCertSubList []suppliercertsub.OilSupplierCertSub
|
|
|
- total := svc.GetTableTotal(" SupplierTypeCode='01' AND SupplierId = " + strconv.Itoa(item.Id))
|
|
|
- total1 := svc.GetNoSubCntTotal("a.SupplierTypeCode = '03' and b.`Name` is null and a.SupplierId = " + strconv.Itoa(item.Id))
|
|
|
+ total := svc.GetTableTotal(" SupplierTypeCode='01' AND SupplierId = " + strconv.Itoa(item.Id), &supplierCertSubList)
|
|
|
+ total1 := svc.GetNoSubCntTotal("a.SupplierTypeCode = '01' and b.`Name` is null and a.SupplierId = " + strconv.Itoa(item.Id))
|
|
|
list[0].SubCnt = int(total)
|
|
|
list[0].MinClassId = "0"
|
|
|
list[0].NoSubCnt = int(total1)
|
|
|
for _, sub := range supplierCertSubList {
|
|
|
- var technologyClassList technologyserviceclass.OilTechnologyServiceClass
|
|
|
- where2 := "Name = '"+ sub.Name + "'"
|
|
|
- svc.GetEntityByWhere(OilTechnologyServiceClassName, where2, &technologyClassList)
|
|
|
- if technologyClassList.Id > 0{
|
|
|
- list[0].MinClassId = strconv.Itoa(technologyClassList.Id)
|
|
|
+ var goodsList goodsaptitudeclass.OilGoodsAptitudeClass
|
|
|
+ where2 := "Code = '"+ sub.Code + "'"
|
|
|
+ svc.GetEntityByWhere(OilGoodsAptitudeClassName, where2, &goodsList)
|
|
|
+ if goodsList.Id > 0{
|
|
|
+ list[0].MinClassId = strconv.Itoa(goodsList.Id)
|
|
|
} else {
|
|
|
list[0].MinClassId = "0"
|
|
|
break
|