wtt
2025-02-10 c5eecec4c618a9f0a981fdb99c5f6875973969c8
WebAPI/Controllers/LMESController.cs
@@ -1777,6 +1777,39 @@
        #endregion
        #region  工艺路线批改小时产能
        [Route("Gy_RoutingBill/BulkWorkQty")]
        [HttpGet]
        public object BulkWorkQty(string HMaterNumber1, string HMaterNumber2,string HProcID, string HWorkQty)
        {
            try
            {
                oCN.BeginTran();
                string sql = $"update b set b.HWorkQty = {HWorkQty} from Gy_RoutingBillMain a left join Gy_RoutingBillSub b on a.HInterID = b.HInterID left join Gy_Material m on a.HMaterID = m.HItemID where m.HNumber between '{HMaterNumber1}' and '{HMaterNumber2}' and b.HProcID = {HProcID} and a.HCloseMan = ''";
                //执行更新上班工时语句
                oCN.RunProc(sql);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "批改成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        /// <summary>
@@ -3832,7 +3865,7 @@
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已反关闭!不需要再反关闭!";
                            objJsonResult.Message = "单据未手动关闭!需要先关闭";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
@@ -3856,6 +3889,17 @@
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //获取系统参数设置失效时间
                    string Ret = "";
                    if (oSystemParameter.ShowBill(ref Ret))
                    {
                        //判断客户
                        if (oSystemParameter.omodel.WMS_CampanyName == "添康科技") //系统参数
                        {
                            //刷新失效时间
                            oCN.RunProc("update Gy_RoutingBillMain set HEndDate = '9999-12-31',HBeginDate = CONVERT(date, GETDATE()) where HInterID = " + HInterID);
                        }
                    }
                }
                oCN.Commit();//提交事务