You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using Admin.Core.IRepository;
|
|
using Admin.Core.IService;
|
|
using Admin.Core.Model;
|
|
using log4net;
|
|
using Microsoft.Extensions.Logging;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Admin.Core.Service
|
|
{
|
|
public class DetailElectricalinspectionServices : BaseServices<DetailElectricalinspection>, IDetailElectricalinspectionService
|
|
{
|
|
private IBaseRepository<DetailElectricalinspection> _dal;
|
|
|
|
private static readonly log4net.ILog _logger = LogManager.GetLogger(typeof(DetailElectricalinspectionServices));
|
|
|
|
public DetailElectricalinspectionServices(IBaseRepository<DetailElectricalinspection> dal)
|
|
{
|
|
this._dal = dal;
|
|
base.BaseDal = dal;
|
|
}
|
|
|
|
public bool InsertRangeDetailElectricalinspection(List<DetailElectricalinspection> detailElectricalinspections)
|
|
{
|
|
bool result = false;
|
|
|
|
try
|
|
{
|
|
var r = _dal.AddAsync(detailElectricalinspections).Result;
|
|
if (r>0)
|
|
{
|
|
result = true;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.Error($"电检明细数据保存异常:{ex.Message}");
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
}
|