wtt
7 小时以前 6daa91098fe4a1a9109f460ace857b9c341de4a9
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
2个文件已修改
60 ■■■■ 已修改文件
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -171,6 +171,7 @@
                long HMainSourceEntryID = mainList[0].HICMOEntryID;
                string HMainSourceBillNo = mainList[0].HICMOBillNo;
                //判断生产质量汇报单是否存在
                ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain WITH(NOLOCK) where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Sc_QualityReportBillMain");
                if (ds.Tables[0].Rows.Count != 0) {
                    objJsonResult.code = "0";
@@ -544,7 +545,7 @@
                List<Model.ClsSc_AssemblyBillSub> sub = new List<Model.ClsSc_AssemblyBillSub>();
                sub = JsonConvert.DeserializeObject<List<Model.ClsSc_AssemblyBillSub>>(sSubStr);
                //条码上道工序是否过站
                ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + omodel.HBarCode_P + "'," + omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
                if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
                {
@@ -563,6 +564,7 @@
                    return objJsonResult;
                }
                //判断条码是否已经出站
                ds = oCN.RunProcReturn("select  * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 产品条码='" + omodel.HBarCode_P + "' and HProcExchInterID="+ omodel .HProcExchInterID+ " and HProcExchEntryID="+ omodel.HProcExchEntryID + " and HProcID="+ omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
                if (ds.Tables[0].Rows.Count > 0)
@@ -705,11 +707,13 @@
                int HTemporaryAreaID = 0;//暂放区
                int HShiftsID = 0;
                //获取当前班次
                DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HDeptID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo");
                if (set.Tables[0].Rows.Count > 0)
                {
                    HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString());
                }
                //判断当天当前的流转卡是否有出站单
                ds = oCN.RunProcReturn("select  * from Sc_StationOutBillMain a WITH(NOLOCK) left join  Sc_StationOutBillSub_SN sn WITH(NOLOCK) on a.HInterID=sn.HInterID where a.HInterID=" + HInterID + " and HBillNo='" + HBillNo + "' and CONVERT(varchar(10),HDate,20) ='" + DateTime.Now.ToString("yyyy-MM-dd") + "' ", "Sc_StationOutBillMain");
                if (ds.Tables[0].Rows.Count == 0)
@@ -1164,6 +1168,7 @@
                ds = oCN.RunProcReturn("select * from gy_czygl WITH(NOLOCK) where czymc='" + user + "'", "gy_czygl");
                string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString();
                //查询流转卡所有工序信息
                ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange WITH(NOLOCK) where 条码='" + HBarCode + "' ", "h_v_Gy_BarCodeBillHICOMProcessExchange");
                if (ds.Tables[0].Rows.Count == 0)
@@ -1638,7 +1643,7 @@
                    Model.Sc_AssemblyBill_BindSourceTemp temp = new Model.Sc_AssemblyBill_BindSourceTemp();
                    temp = JsonConvert.DeserializeObject<Model.Sc_AssemblyBill_BindSourceTemp>(sSubStr);
                    //工序返修记录单 配件表
                    ds = oCN.RunProcReturn("select * from Sc_SourceLineRepairBillSub_Mater where HInterID=" + model.HInterID+ " order by HEntryID  desc", "Sc_SourceLineRepairBillSub_Mater");
                    oCN.RunProc($@"insert into Sc_SourceLineRepairBillSub_Mater
@@ -1652,7 +1657,7 @@
                    oCN.RunProc("update Sc_AssemblyBillSub set HBarCode='" + temp.HBarCode + "' where HInterID=" + temp.HInterID + " and HEntryID=" + temp.HEntryID);
                    //oCN.RunProc("exec h_p_AssemblyBill_Temp '" + temp.HProcExchBillNo + "'," + model.HProcess + "," + temp.HMaterID + ",'" + temp.HBatchNo + "'");
                }
                else if (HResult == "NG"|| HResult == "OK") {
                else if (HResult == "NG"|| HResult == "OK") {
                    Model.ClsSc_SourceLineRepairBillMain model = new Model.ClsSc_SourceLineRepairBillMain();
                    model = JsonConvert.DeserializeObject<Model.ClsSc_SourceLineRepairBillMain>(sMainStr);
@@ -2164,6 +2169,7 @@
                List<object> columnNameList = new List<object>();
                //查询配件清单信息
                string sql = @"exec h_p_GZ_BarCodeBillList '" + HMaterNumber + "','" + HBatchNo + "','" + sWhere + "'";
                ds = oCN.RunProcReturn(sql, "h_p_GZ_BarCodeBillList");
WebAPI/Controllers/WebAPIController.cs
@@ -19298,12 +19298,12 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 300 * from h_v_Sc_ProcessExchangeBillList where 1=1  order by 单据号 desc,hsubid", "h_v_Sc_ProcessExchangeBillList");
                    ds = oCN.RunProcReturn("select top 300 * from h_v_Sc_ProcessExchangeBillList_PDA where 1=1  order by 单据号 desc,hsubid", "h_v_Sc_ProcessExchangeBillList_PDA");
                } 
                else
                {
                    string sql = "select * from h_v_Sc_ProcessExchangeBillList  where 1=1 " + sWhere + " order by 单据号 desc,hsubid ";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList");
                    string sql = "select * from h_v_Sc_ProcessExchangeBillList_PDA  where 1=1 " + sWhere + " order by 单据号 desc,hsubid ";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList_PDA");
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
@@ -20967,6 +20967,33 @@
                return objJsonResult;
            }
        }
        //获取所有模块页面
        [Route("Web/ModePageList")]
        [HttpGet]
        public object ModePageList()
        {
            try
            {
                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where isnull(Hurl,'')  like'%html%'  Order by HItemID ", "Gy_Menu");     //获取Gy_Menu_1中的所有菜单信息,用于为menuInitList列表充
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "查询成功!";
                objJsonResult.data = ds;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询失败!";
                objJsonResult.data = e.ToString();
                return objJsonResult;
            }
        }
        #endregion
        #region 保存自定义数据
@@ -21066,7 +21093,7 @@
        //快捷方式自定义菜单:获取树组件数据
        [Route("Web/Xt_UserFastMenu_Display")]
        [HttpGet]
        public object Xt_UserFastMenu_Display(string HMakeName, string HType)
        public object Xt_UserFastMenu_Display(string HMakeName, string HType,string HModelAtributos)
        {
            try
            {
@@ -21091,7 +21118,7 @@
                    menuInit.HSelected = false;
                    //判断用户是否选中显示该菜单
                    String sql = "Select * from Xt_UserFastMenu where HSubFuncID = '" + ds.Tables[0].Rows[i]["HItemID"] + "' and HUserID='" + HMakeName + "'";
                    String sql = "Select * from Xt_UserFastMenu where HSubFuncID = '" + ds.Tables[0].Rows[i]["HItemID"] + "' and HUserID='" + HMakeName + "' and HModelAtributos='" + HModelAtributos + "'";
                    ds1 = oCn.RunProcReturn(sql, "Xt_UserFastMenu");
                    if (ds1.Tables[0].Rows.Count > 0)                           //对于Gy_Menu_1表中的菜单节点,通过检索在Gy_MenuDefineSet表中对应用户是否存在该节点的信息,判断该用户是否选中该节点需要加载显示在侧菜单栏
                    {
@@ -21159,6 +21186,7 @@
                string HMakeName = sArray[1].ToString();
                string saveData = sArray[0].ToString();
                string HTypes = sArray[2].ToString();
                string HModelAtributos = sArray[3].ToString();
                List<SaveDefineMenu> saveDataList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SaveDefineMenu>>(saveData);
                //声明数据库操作工具
@@ -21168,7 +21196,7 @@
                oCN.BeginTran();
                //删除当前用户的自定义数据
                string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "' and HType = '" + HTypes + "'";
                string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "' and HType = '" + HTypes + "' and HModelAtributos = '" + HModelAtributos + "'";
                oCN.RunProc(sql);
                //插入当前用户最新的自定义数据
@@ -21187,7 +21215,7 @@
                            string HCaption = ds.Tables[0].Rows[0]["HName"].ToString();
                            string HType = ds.Tables[0].Rows[0]["HType"].ToString();
                            sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "')";
                            sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType,HModelAtributos) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "','"+ HModelAtributos + "')";
                            oCN.RunProc(sql);
                        }
                    }
@@ -21217,17 +21245,17 @@
        //快捷方式自定义菜单:获取树组件数据
        [Route("Web/Xt_UserFastMenu_Init")]
        [HttpGet]
        public object Xt_UserFastMenu_Init(string HMakeName, string HType)
        public object Xt_UserFastMenu_Init(string HMakeName, string HType,string HModelAtributos)
        {
            try
            {
                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID";
                string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "'  and a.HModelAtributos = '" + HModelAtributos + "' Order by a.HItemID";
                ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu");     //获取Xt_UserFastMenu中该用户设置的自定义菜单信息,用于在前端加载
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID";
                    sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID  where a.HUserID = 'admin' and b.HType = '" + HType + "' and a.HModelAtributos = '" + HModelAtributos + "' Order by a.HItemID";
                    ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu");     //获取Xt_UserFastMenu中该用户设置的自定义菜单信息,用于在前端加载
                }