Commit e30e27c4 by wang

^

parent c99a95bb
......@@ -62,6 +62,7 @@ func (this *ServiceSupplier)MappingHandle(MappingType int) {
panic(err)//获取csv报错,终止程序
}
for groupName,data:=range res{
groupName=strings.Replace(groupName,"?"," ",10)
//组装 purchaseNames(里面包含供应商采购商中文 名称)
purchaseNames:=make([]interface{},0)
for _,OldSupplier:=range data{
......@@ -76,8 +77,8 @@ func (this *ServiceSupplier)MappingHandle(MappingType int) {
NewMapping:=SupplierMappingEntity{
OldSupplierCode:OldSupplier["canal"],
SupplierCode:dbSuplierInfo.SupplierCode,
OldSupplierName:strings.Replace(OldSupplier["oldName"],"?"," ",10),
SupplierName:strings.Replace(dbSuplierInfo.SupplierName,"?"," ",10),
OldSupplierName:groupName,
SupplierName:groupName,
SupplierId:int(dbSuplierInfo.SupplierId),
Source:MappingType,
}
......@@ -136,7 +137,7 @@ func (this *ServiceSupplier) GetStatus2SupplierInfo(supplierName string,purchase
poolSupplierEntity:=PoolSupplierEntity{}
poolSupplierEntity.Status=2
poolSupplierEntity.IsType=0
poolSupplierEntity.SupplierName=strings.Replace(supplierName,"?"," ",10)
poolSupplierEntity.SupplierName=supplierName
_,err:= dbSpu.Table("lie_supplier_channel").Insert(&poolSupplierEntity)
if(err!=nil){
syncLog.SyncInsertLog("mapping_insert","[插入映射-新增标准]出错:"+"供应商标准名称:"+supplierName+err.Error(),syncLog.LogLevelFatal)
......
......@@ -7,6 +7,7 @@ import (
syncLog "go_supplier_task/pkg/logger/sync"
"go_supplier_task/pkg/mysql"
"sort"
"strings"
)
var SupplierEerrKey="mergerSupplierErr"
......@@ -33,6 +34,7 @@ func (this *ServiceSupplier)MergerCriteria() {
//数据整理 groupName 标准名称;supplierDataList 供应商列表
for groupName,supplierDataList:=range res{//groupName 标准名称
groupName=strings.Replace(groupName,"?"," ",10)
PoolSupplierEntitys := make([]PoolSupplierEntity, 0)
for _,oneSuplier:=range supplierDataList{
poolSupplierEntity:=PoolSupplierEntity{}
......@@ -119,7 +121,6 @@ func (this *ServiceSupplier) onlyOpenHandle(groupName string,PoolSupplierEntity
return true,onlyOpenSupplier
}
}else{
return false,oneSupplierEntity
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment