浏览代码

代码更新

oyq28 1 年之前
父节点
当前提交
80d24cbf11
共有 2 个文件被更改,包括 12 次插入3 次删除
  1. 1 1
      IMCS_CCS/Entitys/RequestData.cs
  2. 11 2
      IMCS_CCS/Service/Impl/HttpRequestService.cs

+ 1 - 1
IMCS_CCS/Entitys/RequestData.cs

@@ -100,7 +100,7 @@ namespace IMCS.CCS.Models
         /// <summary>
         /// 小类:配方号
         /// </summary>
-        public string SmallTypeNo { get; set; }
+        public byte SmallTypeNo { get; set; }
 
         /// <summary>
         /// 订单号

+ 11 - 2
IMCS_CCS/Service/Impl/HttpRequestService.cs

@@ -19,6 +19,7 @@ using FTP;
 using HslCommunication;
 using System.Text.RegularExpressions;
 using System.IO;
+using System.Text;
 
 namespace IMCS.CCS.Services
 {
@@ -1685,7 +1686,9 @@ namespace IMCS.CCS.Services
                 List<CcsAction> actions = _ccsActionService.GetList(actionQuery);
                 CcsAction actionInfo = actions[0];
                 string TypeNo = string.IsNullOrEmpty(req.data.TypeNo) ? "C" : req.data.TypeNo;
-                string SmallTypeNo = string.IsNullOrEmpty(req.data.SmallTypeNo) ? "1" :  req.data.SmallTypeNo;
+                //string SmallTypeNo = string.IsNullOrEmpty(req.data.SmallTypeNo) ? "1" :  req.data.SmallTypeNo;
+                //string SmallTypeNo = string.IsNullOrEmpty(req.data.SmallTypeNo) ? "1" : req.data.SmallTypeNo;
+                byte  SmallTypeNo = req.data.SmallTypeNo;
                 string OrderNo = req.data.OrderNo;
                 string TaskNo = req.data.TaskNo;
                 string ProductNo = req.data.TaskNo;
@@ -1720,7 +1723,13 @@ namespace IMCS.CCS.Services
                             s7.Write(actionAddress.Address, ToolUtils.ReturnBtyesWtitString(TypeNo));
                         }else if (actionAddress.Sort == 2)
                         {
-                            s7.Write(actionAddress.Address, ToolUtils.ReturnBtyesWtitString(SmallTypeNo));
+                            //byte writeSmallTypeNo = 0;
+                            //foreach (byte smallTypeNoByte in SmallTypeNoBytes)
+                            //{
+                            //    writeSmallTypeNo += smallTypeNoByte;
+                            //}
+                            s7.Write(actionAddress.Address, SmallTypeNo);
+                            //s7.Write(actionAddress.Address, int.Parse(SmallTypeNo));
                         }
                         else if (actionAddress.Sort == 3)
                         {