|
|
@ -199,11 +199,11 @@ func (impl *HondaDemandServiceImplement) InsertOne(user *global.User, entity *mo |
|
|
|
if errList == nil { |
|
|
|
session.Begin() |
|
|
|
|
|
|
|
if len(infoList) > 100 { |
|
|
|
if len(infoList) > 20 { |
|
|
|
var _infoList []model.HondaDemandItemLst |
|
|
|
for k, v := range infoList { |
|
|
|
_infoList = append(_infoList, v) |
|
|
|
if (k > 0 && k%50 == 0) || k+1 == len(infoList) { |
|
|
|
if (k > 0 && k%20 == 0) || k+1 == len(infoList) { |
|
|
|
err = infoDao.Insert(&_infoList) |
|
|
|
if err != nil { |
|
|
|
session.Rollback() |
|
|
@ -359,6 +359,40 @@ func (impl *HondaDemandServiceImplement) AnalysisFile(info utils.ChannelsInfo) ( |
|
|
|
_ = errDao.InsertOne(&errData) |
|
|
|
return false, info |
|
|
|
} |
|
|
|
isTrue := false |
|
|
|
if v.ColorValue != familyInfo.ColorValue { |
|
|
|
errList = append(errList, model.HondaDemandErrorLst{ |
|
|
|
DemandId: entity.DemandId, |
|
|
|
Pos: v.Pos, |
|
|
|
ErrorType: "", |
|
|
|
ErrorInfo: "车型" + v.ProductFamilyId + ":颜色配置不一致;", |
|
|
|
ErrorStatus: "开", |
|
|
|
}) |
|
|
|
isTrue = true |
|
|
|
} |
|
|
|
if v.ModelValue != familyInfo.ModelValue { |
|
|
|
errList = append(errList, model.HondaDemandErrorLst{ |
|
|
|
DemandId: entity.DemandId, |
|
|
|
Pos: v.Pos, |
|
|
|
ErrorType: "", |
|
|
|
ErrorInfo: "车型" + v.ProductFamilyId + ":车型代码不一致;", |
|
|
|
ErrorStatus: "开", |
|
|
|
}) |
|
|
|
isTrue = true |
|
|
|
} |
|
|
|
if v.ConfigValue != familyInfo.ConfigValue { |
|
|
|
errList = append(errList, model.HondaDemandErrorLst{ |
|
|
|
DemandId: entity.DemandId, |
|
|
|
Pos: v.Pos, |
|
|
|
ErrorType: "", |
|
|
|
ErrorInfo: "车型" + v.ProductFamilyId + ":配置代码不一致;", |
|
|
|
ErrorStatus: "开", |
|
|
|
}) |
|
|
|
isTrue = true |
|
|
|
} |
|
|
|
if isTrue { |
|
|
|
continue |
|
|
|
} |
|
|
|
custOrder = append(custOrder, model.CustOrder{ |
|
|
|
CustOrderId: custOrderId, |
|
|
|
ProductFamilyId: v.ProductFamilyId, |
|
|
@ -792,6 +826,9 @@ func (impl *HondaDemandServiceImplement) bodyInfo(_strArr []string, dateStr stri |
|
|
|
}) |
|
|
|
} |
|
|
|
info.ProductFamilyId = _strArr[2] + "-" + _strArr[3] + "-" + _strArr[4] |
|
|
|
info.ConfigValue = _strArr[3] |
|
|
|
info.ColorValue = _strArr[4] |
|
|
|
info.ModelValue = _strArr[2] |
|
|
|
return dateStr, _errList |
|
|
|
} |
|
|
|
func (impl *HondaDemandServiceImplement) bodyRoArr(str string) []string { |
|
|
|