wangxinhui
2026-01-12 ded9c653b4bd5f45cb23124068687135c29e6915
项目代码/WCS/WCSServices/WIDESEAWCS_PackInfoService/PackaxisService.cs
文件名从 项目代码/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs 修改
@@ -11,17 +11,16 @@
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_IPackInfoRepository;
using WIDESEAWCS_PackInfoRepository;
using Magicodes.ExporterAndImporter.Core.Models;
using Magicodes.ExporterAndImporter.Excel;
using WIDESEAWCS_Common.Utilities;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IPackInfoService;
namespace WIDESEAWCS_PackInfoService
{
    public class Dt_PackaxisService : ServiceBase<Dt_Packaxis, IDt_PackaxisRepository>, IDt_PackaxisService
    public class PackaxisService : ServiceBase<Dt_Packaxis, IPackaxisRepository>, IPackaxisService
    {
        public Dt_PackaxisService(IDt_PackaxisRepository BaseDal) : base(BaseDal)
        public PackaxisService(IPackaxisRepository BaseDal) : base(BaseDal)
        {
        }
        public override WebResponseContent Import(List<IFormFile> files)
@@ -71,7 +70,7 @@
                    string id = row["id"]?.ToString() ?? string.Empty;
                    string DeviceCode = row["DeviceCode"]?.ToString() ?? string.Empty;
                    string StationCode = row["StationCode"]?.ToString() ?? string.Empty;
                    string PackType = row["PackType"]?.ToString() ?? string.Empty;
                    int PackType = row["PackType"].ObjToInt();
                    string PackNum = row["PackNum"]?.ToString() ?? string.Empty;
                    string AxisX = row["AxisX"]?.ToString() ?? string.Empty;
                    string AxisXCount = row["AxisXCount"]?.ToString() ?? string.Empty;
@@ -82,13 +81,13 @@
                    string AxisZ = row["AxisZ"]?.ToString() ?? string.Empty;
                    string AxisZCount = row["AxisZCount"]?.ToString() ?? string.Empty;
                    string AxisZSpacing = row["AxisZSpacing"]?.ToString() ?? string.Empty;
                    var axis = BaseDal.QueryFirst(x => x.DeviceCode == DeviceCode && x.StationCode == Convert.ToInt32(StationCode) && x.PackType == PackType);
                    var axis = BaseDal.QueryFirst(x => x.DeviceCode == DeviceCode && x.StationCode == StationCode && x.PackType == PackType);
                    if(axis == null)
                    {
                        Dt_Packaxis packaxis = new Dt_Packaxis()
                        {
                            DeviceCode = DeviceCode,
                            StationCode = Convert.ToInt32(StationCode),
                            StationCode = StationCode,
                            PackType = PackType,
                            PackNum = Convert.ToInt32(PackNum),
                            AxisX = Convert.ToInt32(AxisX),
@@ -108,7 +107,7 @@
                    else
                    {
                        axis.DeviceCode = DeviceCode;
                        axis.StationCode = Convert.ToInt32(StationCode);
                        axis.StationCode = StationCode;
                        axis.PackType = PackType;
                        axis.PackNum = Convert.ToInt32(PackNum);
                        axis.AxisX = Convert.ToInt32(AxisX);