yangle
2024-05-23 cd7b75dedc645d1656828fd6047afa72ddc9ca16
当前工单根据 条码流转卡 查询
3个文件已修改
83 ■■■■ 已修改文件
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -3224,19 +3224,30 @@
        #region  å½“前工单(扫码汇报) æ¡ç æŸ¥è¯¢
        [Route("Cj_StationOutBill_CurrentWork/SNHBardCodeList")]
        [HttpGet]
        public object SNHBardCodeList(string HBarCode, string user, int HOrgID)
        public object SNHBardCodeList(string HBarCode, string HProcID, int HOrgID)
        {
            try
            {
                DataSet dataSet = null;
                var num = 0;
                ds = oCN.RunProcReturn(@"select HSourceInterID,HSourceBillNo from Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    string HSourceInterID = ds.Tables[0].Rows[0]["HSourceInterID"].ToString();
                    string HSourceBillNo = ds.Tables[0].Rows[0]["HSourceBillNo"].ToString();
                    num = 1;
                    dataSet = ds;
                }
                    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 HInterID,HBillNo from Sc_ProcessExchangeBillMain WITH(NOLOCK) where HBillNo='" + HBarCode + "'", "Sc_ProcessExchangeBillMain");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    num = 2;
                    dataSet = ds;
                }
                if (num == 1)
                {
                    string HSourceInterID = dataSet.Tables[0].Rows[0]["HSourceInterID"].ToString();
                    string HSourceBillNo = dataSet.Tables[0].Rows[0]["HSourceBillNo"].ToString();
                    ds = oCN.RunProcReturn("select  * from h_v_Sc_ProcessExchangeBillList where hmainid=" + HSourceInterID + " and å•据号='" + HSourceBillNo + "' and HProcID=" + HProcID, "h_v_Sc_ProcessExchangeBillList");
@@ -3253,7 +3264,30 @@
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else {
                else if (num == 2)
                {
                    string HSourceInterID = dataSet.Tables[0].Rows[0]["HInterID"].ToString();
                    string HSourceBillNo = dataSet.Tables[0].Rows[0]["HBillNo"].ToString();
                    ds = oCN.RunProcReturn("select  * from h_v_Sc_ProcessExchangeBillList where hmainid=" + HSourceInterID + " and å•据号='" + HSourceBillNo + "' and HProcID=" + HProcID, "h_v_Sc_ProcessExchangeBillList");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "条码:" + HBarCode + ",流转卡:" + HSourceBillNo + ",与当前流转卡,所对应的工序不存在!";
                        objJsonResult.data = ds.Tables[0];
                        return objJsonResult;
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条码查无数据!";
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -694,10 +694,10 @@
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else if (ds.Tables[0].Rows.Count ==1)
                else if (ds.Tables.Count ==1)
                {
                    objJsonResult.code = ds.Tables[0].Rows[0][0].ToString();
                    objJsonResult.count = 1;
                    objJsonResult.count = 0;
                    objJsonResult.Message = ds.Tables[0].Rows[0][1].ToString();
                    objJsonResult.data = ds;
                    return objJsonResult;
WebAPI/Controllers/Éú²ú¹ÜÀí/ÖÊÁ¿»ã±¨µ¥/Sc_QualityReportBillController.cs
@@ -87,12 +87,25 @@
                }
                else
                {
                    ds = oCN.RunProcReturn
                        ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID" +
                        ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID " +
                        " from Sc_ICMOBillStatus_Tmp a " +
                        " left join Gy_Material m on a.HMaterID=m.HItemID " +
                        " Where a.HInterID=" + HInterID + " and a.HBillType="+ HBillType, "Sc_ICMOBillStatus_Tmp");
                    if (HBillType == "3772")
                    {
                        ds = oCN.RunProcReturn
                     ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID" +
                     ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID" +
                     ",a.HSourceBillNo,a.HSourceInterID,a.HSourceEntryID,a.HDatePlanQty " +
                     " from Sc_ICMOBillStatus_Tmp a " +
                     " left join Gy_Material m on a.HMaterID=m.HItemID " +
                     " Where a.HInterID=" + HInterID + " and a.HBillType=" + HBillType, "Sc_ICMOBillStatus_Tmp");
                    }
                    else {
                        ds = oCN.RunProcReturn
                         ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID" +
                         ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID " +
                         " from Sc_ICMOBillStatus_Tmp a " +
                         " left join Gy_Material m on a.HMaterID=m.HItemID " +
                         " Where a.HInterID=" + HInterID + " and a.HBillType=" + HBillType, "Sc_ICMOBillStatus_Tmp");
                    }
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
@@ -617,7 +630,7 @@
        #region æäº¤ä¿å­˜ï¼Œå­˜ä¸»å­è¡¨åŠæ˜Žç»†è¡¨
        [Route("Sc_QualityReportBill/set_SaveBill")]
        [HttpGet]
        public object set_SaveBill(long HInterID,string HChecker)
        public object set_SaveBill(long HInterID,string HBillNo, string HChecker)
        {
            try
            {
@@ -625,7 +638,7 @@
                bool bResult2 = false;
                oCN.BeginTran();
                //保存前控制=========================================              
                ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_BeforeSaveCtrl " + HInterID, "h_p_Sc_QualityReportBill_BeforeSaveCtrl");
                ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_BeforeSaveCtrl " + HInterID+",'"+ HBillNo + "','',1", "h_p_Sc_QualityReportBill_BeforeSaveCtrl");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
@@ -658,7 +671,7 @@
                    return objJsonResult;
                }
                //保存后控制=========================================              
                ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_AfterSaveCtrl " + HInterID, "h_p_Sc_QualityReportBill_AfterSaveCtrl");
                ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_AfterSaveCtrl " + HInterID + ",'" + HBillNo + "',1", "h_p_Sc_QualityReportBill_AfterSaveCtrl");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {