1
llj
2 天以前 033d6d49fbb0a924653c7fd3ef3700a24f37ee59
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -3005,18 +3005,18 @@
            try
            {
                //判断所扫条码是否存在条码档案当中
                ds = oCN.RunProcReturn(@"select 1 from Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
                if (ds.Tables[0].Rows.Count == 0)
                {
                    //条码档案中没有本次扫描的条码,则根据规则解析生成条码
                //ds = oCN.RunProcReturn(@"select 1 from Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
                //if (ds.Tables[0].Rows.Count == 0)
                //{
                //    //条码档案中没有本次扫描的条码,则根据规则解析生成条码
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "该条码不存在:" + HBarCode;
                    objJsonResult.data = "";
                    return objJsonResult;
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "该条码不存在:" + HBarCode;
                //    objJsonResult.data = "";
                //    return objJsonResult;
                }
                //}
                //条码档案中已有本次扫描的条码,查询配件信息(扫描条码信息写入临时表)
                ds = oCN.RunProcReturn(@"exec h_p_Gy_BarCodeBillBomBindByHProcExch_XW '" + HBillNo + "','" + HBarCode + "','" + HBarCode_P + "','" + HProcID + "','" + HOrgID + "'", "h_p_Gy_BarCodeBillBomBindByHProcExch_XW");
@@ -3681,34 +3681,34 @@
        #region 蓝牙测试数据接口
        [Route("Cj_SingleStation/BluetoothTestDataSave")]
        [HttpGet]
        public object BluetoothTestDataSave(string HBarCode_SN, string HBluetooth_Mac, string HResult)
        public object BluetoothTestDataSave(string lotSn, string testData)
        {
            try
            {
                //判断有没有过打印记录(条码档案中存不存在蓝牙mac地址)
                ds = oCN.RunProcReturn("select 1 from Gy_BarCodeBill with(nolock) where HBarCode = '" + HBluetooth_Mac + "'", "Gy_BarCodeBill");
                ds = oCN.RunProcReturn("select 1 from Gy_BarCodeBill with(nolock) where HBarCode = '" + lotSn + "'", "Gy_BarCodeBill");
                if (ds.Tables[0].Rows.Count < 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "上传的HBarCode_SN:" + HBarCode_SN + ",没有标签打印记录,请先打印蓝牙mac标签:" + HBluetooth_Mac;
                    objJsonResult.Message = "上传的lotSn:" + lotSn + ",没有标签打印记录,请先打印蓝牙mac标签" ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql = string.Format($@"insert into Gy_BluetoothTestData(HBarCode_SN,HBluetooth_Mac,HResult,HResult) values ('{HBarCode_SN}','{HBluetooth_Mac}','{HResult}',getdate() ");
                string sql = string.Format($@"insert into Gy_BluetoothTestData(HBluetooth_Mac,HResult,HMakeDate) values ('{lotSn}','{testData}',getdate() ) ");
                oCN.RunProc(sql);//插入蓝牙测试数据
                objJsonResult.code = "1";
                objJsonResult.code = "success";
                objJsonResult.count = 1;
                objJsonResult.Message = "蓝牙测试数据结束成功!HBarCode_SN:" + HBarCode_SN + " ,HBluetooth_Mac:" + HBluetooth_Mac;
                objJsonResult.Message = "蓝牙测试数据接收成功!lotSn:" + lotSn;
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.code = "error";
                objJsonResult.count = 0;
                objJsonResult.Message = "发生异常!" + e.ToString();
                objJsonResult.data = null;