DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/WorkPieceInfoManager.cs
@@ -1295,7 +1295,14 @@ } else { //è¿éä¿®å¤OP10ãOP40 å 为PLCå æ¨ SPCæ¨åºã忍 产åä¸çº¿é®é¢ï¼å¯¼è´ 产åä¸çº¿æ´æ°æ°æ®æ¶ï¼æSPCæ°æ®è¦ççé®é¢ ãEditby shaocx,2024-08-27ã var isAlow = SystemBussinessHelper.IsAllowUpdateWorkPieceStateToWip(info, db, logMiddle); if (isAlow) { info.WorkPieceState = (int)WorkPieceState.WIP; } if (info.WorkingProcedurePlan.IndexOf(logMiddle.WorkingProcedure) + 4 <= info.WorkingProcedurePlan.Length) { info.WorkPieceCurrentPosition = info.WorkingProcedurePlan.Substring(info.WorkingProcedurePlan.IndexOf(logMiddle.WorkingProcedure), 8); DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,39 @@  using iWare_SCADA_Model; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWare_SCADA_BusinessLogical.Utils { /// <summary> /// ä¸å¡ç³»ç»å¸®å©ç±» /// </summary> public class SystemBussinessHelper { /// <summary> /// æ¯å¦å 许修æ¹WorkPieceState 为WIP /// </summary> /// <param name="info"></param> /// <param name="db"></param> /// <param name="logMiddle"></param> /// <returns></returns> public static bool IsAllowUpdateWorkPieceStateToWip(WorkPieceInfo info, DbModel db, WorkPieceLogMiddle logMiddle) { //è¿éä¿®å¤OP10ãOP40 å 为PLCå æ¨ SPCæ¨åºã忍 产åä¸çº¿é®é¢ï¼å¯¼è´ 产åä¸çº¿æ´æ°æ°æ®æ¶ï¼æSPCæ°æ®è¦ççé®é¢ ãEditby shaocx,2024-08-27ã if (logMiddle.WorkingProcedure == "OP10" || logMiddle.WorkingProcedure == "OP40") { var curPross = db.WorkPieceProcess.Where(x => x.WorkPieceID == info.WorkPieceID).OrderByDescending(x => x.Id).FirstOrDefault(); if (curPross != null && curPross.OperationType == OperationType.SPC.ToString()) { return false; } return true; } return true; } } } DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj
@@ -158,6 +158,7 @@ </Compile> <Compile Include="Utils\QualityStateHelper.cs" /> <Compile Include="Utils\MonitorHelper.cs" /> <Compile Include="Utils\SystemBussinessHelper.cs" /> <Compile Include="Utils\SystemHelper.cs" /> <Compile Include="Utils\ComboBoxHelper.cs" /> <Compile Include="Utils\ConfigHelper.cs" /> DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/WorkPieceProcess.cs
@@ -58,6 +58,9 @@ [StringLength(50)] public string UpdatedUserName { get; set; } /// <summary> /// æä½ç±»åï¼ä½¿ç¨æä¸¾ OperationType /// </summary> [StringLength(50)] public string OperationType { get; set; } [StringLength(255)]