protected override bool AddLocalDataToDb(List <Jc_Ll_MInfo> addLocalItems)
        {
            addLocalItems.ForEach(o => o.Bz4 = "2");
            var accumulationMModels = ObjectConverter.CopyList <Jc_Ll_MInfo, Jc_Ll_MModel>(addLocalItems);

            return(accumulationRepository.BulkCopy("CF_Month", accumulationMModels, BuildDataColumn(columns)));
        }
Esempio n. 2
0
 protected override void AddItemsToDb(List <Jc_Ll_MInfo> addItems)
 {
     try
     {
         var accumulationMModels = ObjectConverter.CopyList <Jc_Ll_MInfo, Jc_Ll_MModel>(addItems);
         if (!accumulationRepository.BulkCopy("CF_Month", accumulationMModels, BuildDataColumn(columns)))
         {
             int isconn = accumulationRepository.GetTotalRecord("DataToDb_GetDbServerIsNormal");
             if (isconn <= 0)
             {
                 AddDataToLocal(addItems);
             }
         }
     }
     catch (Exception ex)
     {
         LogHelper.Error("累积量月数据入库失败:" + "\r\n" + ex.Message);
     }
 }