yangle
2023-11-07 0f72c941f402f624cc6b5d364724d08d6f60dfc3
工厂日历 产线查询
斯莫尔单品过站 不良采集 优化
不良类型查询
4个文件已修改
189 ■■■■■ 已修改文件
Model/生产管理/ClsSc_QualityReportBillSub.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MateOutController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/Éú²ú¹ÜÀí/ClsSc_QualityReportBillSub.cs
@@ -9,6 +9,7 @@
        public string HBillNo_bak;
        public Int64 HMaterID;
        public Int64 HUnitID;
        public Int64 HProcID;
        public Int64 HEmpID;
        public Int64 HSourceID;
        public Int64 HProcExchInterID;
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -281,5 +281,62 @@
            }
        }
        #endregion
        #region ä¸è‰¯ç±»åž‹  æŸ¥è¯¢
        [Route("Gy_BadReason/Gy_BadTypeList")]
        [HttpGet]
        public object Gy_BadTypeList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_BadReason", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_BadReasonList " + sWhere + " order by ä¸è‰¯åŽŸå› ä»£ç  ", "h_v_IF_BadReasonList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_BadReasonList where 1 = 1";
                    string sql = sql1 + sWhere + " order by ä¸è‰¯åŽŸå› ä»£ç  ";
                    ds = oCN.RunProcReturn(sql, "h_v_IF_BadReasonList");
                }
                //添加列名
                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 = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -197,6 +197,18 @@
,0,0,'','',0,0
,0,'{HResult}',{oSub.HProcExchInterID},{oSub.HProcExchEntryID},'{oSub.HProcExchBillNo}')");
            //修改条码表的状态
            oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'");
            //修改出站单的 ä¸è‰¯ æŠ¥åºŸæ•°é‡
            if (HResult == "不良") {
                oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1  where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID);
            }
            else if (HResult == "报废")
            {
                oCN.RunProc("update Sc_StationOutBillMain set HWasterQty+=1  where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID);
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
@@ -204,5 +216,120 @@
            return objJsonResult;
        }
        #endregion
        #region  å·¥åºå•品过站 æµè½¬å¡æŸ¥è¯¢å…³é”®ä»¶æ¸…单
        [Route("Cj_SingleStation/HBardCodeBomList")]
        [HttpGet]
        public object HBardCodeBomList(string HBarCode, string user)
        {
            try
            {
                ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange where æ¡ç ='" + HBarCode + "'", "h_v_Gy_BarCodeBillHICOMProcessExchange");
                if (ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条码查无数据!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "";
                    objJsonResult.data = ds.Tables[0];
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºå•品返修台 èŽ·å–è¡¨æ ¼æ•°æ®
        [Route("Cj_SingleStation/ProcessItemRepair")]
        [HttpGet]
        public object ProcessItemRepair( string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = @"select * from h_v_Cj_BarCodeProcessItemRepair  where  1=1 " + sWhere + " order by æ—¥æœŸ desc, HInterID desc, HEntryID desc";
                ds = oCN.RunProcReturn(sql, "h_v_Cj_BarCodeProcessItemRepair");
                //添加列名
                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 = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºå•品返修台--配件更换 æŸ¥è¯¢æ›´æ¢è®°å½•
        [Route("Cj_SingleStation/Sc_SourceLineRepairBillSub_MaterList")]
        [HttpGet]
        public object Sc_SourceLineRepairBillSub_MaterList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = @"select * from Sc_SourceLineRepairBillSub_Mater  where  1=1 " + sWhere + " order by   HInterID asc, HEntryID asc";
                ds = oCN.RunProcReturn(sql, "Sc_SourceLineRepairBillSub_Mater");
                //添加列名
                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 = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/MateOutController.cs
@@ -2196,11 +2196,11 @@
        #region  äº§çº¿æŸ¥è¯¢
        [Route("MaterOutEntryReport/Gy_SourceList")]
        [HttpGet]
        public object Gy_SourceList(string HOrgid)
        public object Gy_SourceList(string HOrgid,string sWhere)
        {
            try
            {
                string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " order by hnumber");
                string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " "+ sWhere + " order by hnumber");
                ds = oCN.RunProcReturn(sql1, "Gy_Source");