From 1188199541d698a5776791274e753c8658d73a9d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 15 12月 2024 13:29:42 +0800
Subject: [PATCH] 222
---
CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs | 42 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs b/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs
index a1b91dc..2551277 100644
--- a/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs
+++ b/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs
@@ -1,4 +1,6 @@
锘縰sing Admin.NET.Application;
+using iWareCC.SrmService;
+using iWareCC.StationService;
using iWareCommon.Common.Globle;
using iWareCommon.Utils;
using iWareModel;
@@ -24,6 +26,43 @@
{
/// <summary>
+ /// 鐢熸垚鏈�鏂扮殑浠诲姟鍙�
+ /// </summary>
+ /// <param name="wmsDB"></param>
+ /// <param name="rbTaskTypeEnum"></param>
+ /// <param name="plcTaskNo"></param>
+ /// <returns></returns>
+ public static string GetNewTaskNo(WmsDBModel wmsDB, RbTaskTypeEnum rbTaskTypeEnum, string plcTaskNo)
+ {
+ //鍒ゆ柇濡傛灉浠诲姟鍙疯窡涓婁竴涓换鍔″彿閲嶅锛屽氨鑷姩鍑忓幓1
+ var lastTask = wmsDB.wms_rbline_task.Where(x => x.RbTaskType == (int)rbTaskTypeEnum).OrderByDescending(x => x.Id).FirstOrDefault();
+ if (lastTask != null && lastTask.TaskNo == plcTaskNo)
+ {
+ plcTaskNo = (Convert.ToInt32(plcTaskNo) - 1).ToString();
+ }
+ else
+ {
+
+ }
+ return plcTaskNo;
+ }
+
+ /// <summary>
+ /// 鍐欏叆 鎶ヨ淇℃伅
+ /// </summary>
+ /// <param name="warningAddress"></param>
+ /// <returns></returns>
+ public static async Task<iWareCC.StationService.SdaResEntity> WriteBoolPlcDataForWarning(string warningAddress)
+ {
+ using (StationServiceClient client = new StationServiceClient())
+ {
+
+ var res = await client.WriteBoolPlcDataAsync((int)EDevice.Station, "3000|" + warningAddress, true);
+ return res;
+ }
+ }
+
+ /// <summary>
/// 澶勭悊 琛� mes_order_gather
/// </summary>
/// <param name="wmsDB"></param>
@@ -36,7 +75,8 @@
{
errMsg = "";
//澶勭悊琛� mes_order_gather
- if (package == null) {
+ if (package == null)
+ {
return true;
}
var isAddOrder = false;
--
Gitblit v1.9.3