From ded9c653b4bd5f45cb23124068687135c29e6915 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 12 一月 2026 15:06:11 +0800
Subject: [PATCH] 多个功能优化,逻辑修改等
---
项目代码/WCS/WCSServices/WIDESEAWCS_PackInfoService/PackaxisService.cs | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/PackaxisService.cs"
similarity index 90%
rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs"
rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/PackaxisService.cs"
index 0088e12..47edd25 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/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);
--
Gitblit v1.9.3