From 6b74e1dcf5642c8f56975471e27780d695953989 Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期日, 26 四月 2026 15:48:01 +0800
Subject: [PATCH] 同步代码
---
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/Queue.cs | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/Queue.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/Queue.cs"
index 7ca7cb4..7b1c821 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/Queue.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/Queue.cs"
@@ -1,4 +1,5 @@
-锘縰sing StackExchange.Profiling.Internal;
+锘縰sing Mapster;
+using StackExchange.Profiling.Internal;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -8,7 +9,10 @@
using System.Threading.Tasks;
using WIDESEA_Common.MES;
using WIDESEA_Core;
+using WIDESEA_Core.Enums;
using WIDESEA_DTO;
+using WIDESEA_Model.Models;
+using WIDESEA_StorageBasicRepository;
namespace WIDESEA_StoragIntegrationServices
{
@@ -27,6 +31,12 @@
//鏌ユ壘瀵瑰簲鐨凱VI鐮佽溅韬俊鎭�
var carinfo = _carBodyInfoRepository.QueryFirst(x => x.RFID == json.PVI);
if (carinfo == null) throw new Exception($"{json.PVI}杞﹁韩淇℃伅鏈壘鍒�");
+
+ Dt_CarBodyInfo_hty carInfo_Hty = carinfo.Adapt<Dt_CarBodyInfo_hty>();
+ carInfo_Hty.FinishTime = DateTime.Now;
+ carInfo_Hty.FinishType = (int)OperateTypeEnum.鑷姩瀹屾垚;
+ carInfo_Hty.sourceID = carinfo.Id;
+
VINRespon respon = new VINRespon();
if (!string.IsNullOrEmpty(carinfo.VIN))
{
@@ -37,6 +47,10 @@
SkyLight = carinfo.skylightCharacteristic,
VechicleModel = carinfo.vehicleCharacteristic,
};
+
+ _carBodyInfo_HtyRepository.AddData(carInfo_Hty);
+ _carBodyInfoRepository.DeleteData(carinfo);
+
return content.OK(data: respon);
}
@@ -49,7 +63,7 @@
//杩囩偣淇℃伅
WebResponseContent content1 = _mesService.PassPoint(json);
- if (!content1.Status) throw new Exception($"杩囩偣澶辫触锛歿content1.msg},璇锋眰淇℃伅:{{json.ToJson()");
+ if (!content1.Status) throw new Exception($"杩囩偣澶辫触锛歿content1.msg},璇锋眰淇℃伅:{json.ToJson()}");
//鑾峰彇VIN鍙�
WebResponseContent responseContent = _mesService.getCharacteristic(json);
@@ -64,10 +78,24 @@
VechicleModel = carinfo.vehicleCharacteristic,
};
+ var mesLock = _mesLockInfoRepository.QueryFirst(x => x.carBodyID == carinfo.Id);
+
+ _unitOfWorkManage.BeginTran();
+ //鍒犻櫎杞﹁韩淇℃伅
+ carInfo_Hty.VIN = respon.VIN;
+ _carBodyInfo_HtyRepository.AddData(carInfo_Hty);
+ _carBodyInfoRepository.DeleteData(carinfo);
+ if (mesLock != null)
+ {
+ mesLock.LockStatue = 2;
+ _mesLockInfoRepository.UpdateData(mesLock);
+ }
+ _unitOfWorkManage.CommitTran();
content.OK(data: respon);
}
catch (Exception ex)
{
+ _unitOfWorkManage.RollbackTran();
content.Error(ex.Message);
}
return content;
--
Gitblit v1.9.3