1
zrg
2025-03-19 d762be6327c842ec49f3fb15999be3b1f129c003
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -1775,6 +1775,7 @@
                string fProWorkShopId = omdelMian.HWorkShopID.ToString();
                var fPrdOrgId = omdelMian.HProdORGID;
                string sqlName = "";//AIS20210811135644
                string WMS_CampanyName = "";    //客户名称
                //客户制定
                string sErr = "";
                if (oSystemParameter.ShowBill(ref sErr))
@@ -1794,6 +1795,7 @@
                    else if (oSystemParameter.omodel.WMS_CampanyName == "宝工")
                    {
                        sqlName = "AIS20250102123554";
                        WMS_CampanyName = "宝工";
                    }
                    else
                    {
@@ -1801,8 +1803,11 @@
                    }
                }
                if (HTLType == "缺料")
                if (WMS_CampanyName == "宝工")
                {
                    objJsonResult = (json)JIT_MOMaterLack(fProWorkShopId, fPrdOrgId, user, sqlName);
                }
                else if (HTLType == "缺料")
                {
                    objJsonResult = (json)JIT_QL(fProWorkShopId, fPrdOrgId, user, sqlName);
                }
@@ -2733,6 +2738,51 @@
                return objJsonResult;
            }
        }
        /// <summary>
        /// é€šè¿‡æ¬ æ–™è¡¨   ç®—提料 å®å·¥
        /// </summary>
        /// <returns></returns>
        public object JIT_MOMaterLack(string HWorkShopID, int? HProdORGID, string user, string sqlName)
        {
            try
            {
                ds = oCN.RunProcReturn("exec h_p_JIT_PODemandPlanBill_MOMaterLack " + HWorkShopID.ToString() + ",'" + user + "'," + HProdORGID.ToString(), "h_p_JIT_PODemandPlanBill_MOMaterLack");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "提料运算发生错误!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);    //运算成功
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "提料运算失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç”Ÿäº§æ—¥è®¡åˆ’平台 é”å®š
@@ -3334,6 +3384,17 @@
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_FuHeFenXiReport", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> columnNameList = new List<object>();
                string sql = "exec h_p_JIT_FuHeFenXiReport   '" + sWhere + "','" + user + "'";