yusijie
2025-07-09 5505d694e0e7e33f0a312a0e077d49fa25ab00e3
车间定位库存查询;车间下架扫源单查库存位置;添康三周排产
5个文件已修改
214 ■■■■■ 已修改文件
WebAPI/Controllers/MateOutController.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBill_TKController.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MateOutController.cs
@@ -1116,6 +1116,55 @@
            }
        }
        //刷新表体 è½¦é—´å®šä½  è¿”回车间即时库存库存信息网页PDA版
        [Route("KF_ICInventory_WorkShopByMaterID/GetWorkShopICInventory")]
        [HttpGet]
        public object GetWorkShopICInventory(string HBarCode, long sHWHID, long sHSPID, long HOWNERID, string sWhere)
        {
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                List<object> columnNameList = new List<object>();
                DataSet ds = oCN.RunProcReturn("exec h_p_KF_ICInventory_WorkShopByMaterIDList '" + HBarCode + "'," + sHWHID + "," + sHSPID + "," + HOWNERID + ",'" + sWhere + "'", "h_p_KF_ICInventory_WorkShopByMaterIDList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                    //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        [Route("MateOutBill/Delete_Json")]
        [HttpGet]
        public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType)
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -1981,13 +1981,13 @@
                        sqlName = "AIS20210811135644";
                    }
                    if (WMS_CampanyName == "宝工")
                    if (WMS_CampanyName == "宝工" || WMS_CampanyName == "添康科技")
                    {
                        objJsonResult = (json)JIT_MOMaterLack(fProWorkShopId, fPrdOrgId, user);
                    }
                    else if (HTLType == "缺料")
                    {
                        if (WMS_CampanyName == "帅威" || WMS_CampanyName == "凯贝奈特" || WMS_CampanyName == "添康科技")
                        if (WMS_CampanyName == "帅威" || WMS_CampanyName == "凯贝奈特" /*|| WMS_CampanyName == "添康科技"*/)
                        {
                            objJsonResult = (json)JIT_QL(fProWorkShopId, fPrdOrgId, user, sqlName);
                        }
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBill_TKController.cs
@@ -243,7 +243,20 @@
                    LogService.Write($"========================1.排产主表处理用时:" + sw.Elapsed);
                    int SumDay = 180; //动态六月之差 DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days;
                    int SumDay = 0; //动态六月之差 DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days;
                    // ç»Ÿè®¡æ€»å¤©æ•°
                    HashSet<DateTime> uniqueDates = new HashSet<DateTime>();
                    foreach (var key in list[i].Keys)
                    {
                        if (DateTime.TryParseExact(key, "yyyy-M-d", CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime date))
                        {
                            uniqueDates.Add(date);
                        }
                    }
                    SumDay = uniqueDates.Count;
                    LogService.CustomWriteLog("2.3:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
                    for (int j = 0; j < SumDay; j++)
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -4409,7 +4409,7 @@
        /// å°è½¦é”å®šå•新增上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveTrolleyPositionBill_Json2")]
        [Route("WEBSController/set_SaveTrolleyPositionBill_Json")]
        [HttpPost]
        public object set_SaveTrolleyPositionBill_Json([FromBody] JObject msg)
        {
@@ -8570,7 +8570,7 @@
        #endregion
        #region ä¸Šæž¶ã€ä¸‹æž¶å•模块调用方法     20250520
        #region ä¸Šæž¶ã€ä¸‹æž¶å•、小车锁定模块调用方法     20250520
        #region ä¸‹æž¶å•扫码模块  æ‰«ææºå•条码调用方法
        /// <summary>
@@ -8767,6 +8767,147 @@
        }
        #endregion
        #region ä¸‹æž¶å•模块,扫源单条码查询物料库存信息
        /// <summary>
        /// èŽ·å–å•æ®åˆ—è¡¨ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/MaterialLowerBill_MaterInv")]
        [HttpGet]
        public object MaterialLowerBill_MaterInv(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_Kf_MaterialInventory " + HInterID + "," + HBillType + "," + HStockOrgID, "h_p_Kf_MaterialInventory");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å°è½¦æ‰«ç ç»‘定时,判断其是否已绑定库位信息
        [Route("WEBSController/CarIsused")]
        [HttpGet]
        public object CarIsused(string HCarBarCode)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from h_v_Gy_MouldIsUsed where å°è½¦æ¡ç ='" + HCarBarCode + "'" , "h_v_Gy_MouldIsUsed");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "小车条码:" + HCarBarCode + ",不在系统中,请核对!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询小车在库状态失败err!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å°è½¦ç»‘定机台时,判断所扫机台(设备)条码是否存在于设备档案
        [Route("WEBSController/IsExistEquip")]
        [HttpGet]
        public object IsExistEquip(string HEquipBarCode)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from h_v_Gy_EquipIsExist where æœºå°æ¡ç ='" + HEquipBarCode + "'", "h_v_Gy_EquipIsExist");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "机台条码:" + HEquipBarCode + ",不在系统中,请核对!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询机台信息失败err!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
WebAPI/WebAPI.csproj
@@ -449,6 +449,7 @@
    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckRuleBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckPlanBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_DayPlanPlatFormBill_TKController.cs" />
    <Compile Include="Controllers\XSGL\Crm_ComplainVisitBillController.cs" />
    <Compile Include="Controllers\XSGL\Xs_SellOutBillList_SecController.cs" />
    <Compile Include="Controllers\XSGL\Xs_SeQuotationBillController.cs" />