diff --git a/business/jxstore/report/report.go b/business/jxstore/report/report.go index 8fbb9d562..65af0a03f 100644 --- a/business/jxstore/report/report.go +++ b/business/jxstore/report/report.go @@ -448,7 +448,10 @@ func RefreshStoreManageState(ctx *jxcontext.Context) { } storeDetail, _ := dao.GetStoreDetail(db, storeMap.StoreID, vendorID, storeMap.VendorOrgCode) storeManage := buildStoreManageState(ctx, db, storeMap, storeDetail, messageFlag) - dao.CreateEntity(db, storeManage) + if storeManageStates, err := dao.GetStoreManageStateSimple(db, []int{storeDetail.ID}, nil, vendorID); err == nil && len(storeManageStates) > 0 { + storeManage.ID = storeManageStates[0].ID + dao.CreateEntity(db, storeManage) + } return retVal, err }, createList) tasksch.HandleTask(task3, task, true).Run()