1
zrg
2024-09-13 73b70e9ebabbb3d9d81081f8c95de21373083d4b
WebAPI/Controllers/WebAPIController.cs
@@ -81,6 +81,27 @@
            }
        }
        /// <summary>
        /// 根据时间获取产量汇报单集合
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetICMOBillWorkQtyStatus_Tmp")]
        [HttpGet]
        public object GetICMOBillWorkQtyStatus_Tmp()
        {
            DataSet ds = new DataSet();
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            ds = oCN.RunProcReturn("exec h_p_Sc_TodayWorkQtySumReport", "h_p_Sc_TodayWorkQtySumReport");
            objjson.code = "1";
            objjson.count = 1;
            objjson.Message = "Sucess!";
            objjson.data = ds.Tables[0];
            return objjson;
        }
        [Route("Web/GetMAXNumPDA")]
        [HttpGet]
        public object GetMAXNumPDA(string HBillType)
@@ -7767,6 +7788,19 @@
            }
        }
        /// <summary>
        /// 工艺品参数分类获取信息
        /// </summary>
        /// <returns></returns>
        [Route("GetGy_TechnologyTypeDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetGy_TechnologyType(string HID)
        {
            var model = LuBaoSevice.GetGy_TechnologyType(HID);
            return model;
        }
        #endregion
        #region  客户分类  设置列表/保存/编辑/删除方法
@@ -11296,10 +11330,44 @@
                return objjson; ;
            }
        }
        #endregion
        /// <summary>
        /// 获取基本信息
        /// </summary>
        /// <returns></returns>
        [Route("Web/BaseInfo")]
        [HttpGet]
        public object GetBaseInfo()
        {
            try
            {
                ds = oCN.RunProcReturn("select * from xt_BaseInfo", "xt_BaseInfo");
                if (ds is null)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo;
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "获取成功!";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }catch(Exception e)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + e.Message;
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
        /// 获取职务列表
@@ -12900,6 +12968,14 @@
                    objjson.data = null;
                    return objjson;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "该设备有多个计划单,手动选着" ;
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "1";
@@ -12941,25 +13017,36 @@
                switch (Type)
                {
                    case "DJ":
                        HView = "h_v_QJ_GetDotCheckItemList";
                        HView = "h_v_Sc_MouldDotCheckPlanBillList";
                        break;
                    case "BY":
                        HView = "h_v_Sc_MouldMaintainPlanBillList";
                        break;
                    default:
                        objjson.code = "0";
                        objjson.count = 0;
                        objjson.Message = "设备模块类型错误!";
                        objjson.Message = "模具模块类型错误!";
                        objjson.data = null;
                        return objjson;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID);
                string sql = string.Format(@"Exec h_p_Sb_GetCheckItem_PDA '" + MouldProjectID + "','" + Type + "','" + HDate + "'");
                string sql = string.Format(@"Exec h_p_Sb_GetCheckItemMouldFile_PDA '" + MouldProjectID + "','" + Type + "','" + HDate + "'");
                ds = oCN.RunProcReturn(sql, HView);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败,查无数据" + DBUtility.ClsPub.sErrInfo;
                    objjson.data = null;
                    return objjson;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "该模具有多个计划单,手动选着";
                    objjson.data = null;
                    return objjson;
                }
@@ -13059,6 +13146,9 @@
                    case "YS":
                        HView = "h_v_Sb_EquipRepairCheckBillList";
                        break;
                    case "QD":
                        HView = "h_v_Sb_EquipRepairSignBillList";
                        break;
                    default:
                        objjson.code = "0";
                        objjson.count = 0;