| | |
| | | omodel = JsonConvert.DeserializeObject<StationBill>(sMainStr); |
| | | |
| | | //判断是否有对应流转卡信息并获取 |
| | | ds = oCN.RunProcReturn(@"exec h_p_Sc_ProcessExchangeBillList '" + barCode_SN + "'," + omodel.HProcID, "h_p_Sc_ProcessExchangeBillList"); |
| | | ds = oCN.RunProcReturn(@"exec h_p_Sc_ProcessExchangeBillList_XW '" + barCode_SN + "'," + omodel.HProcID, "h_p_Sc_ProcessExchangeBillList"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-039]条码:" + barCode_SN + ",已存在!"; |
| | | objJsonResult.Message = "[0000-2-039]条码:" + barCode_SN + ",已出站!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | double HProcPriceRate = 0;//工价系数 |
| | | int HTemporaryAreaID = 0;//暂放区 |
| | | int HShiftsID = 0; |
| | | |
| | | string HBatchNo = omodel.HBatchNo; |
| | | //获取当前班次 |
| | | //DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HDeptID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo"); |
| | | //if (set.Tables[0].Rows.Count > 0) |
| | |
| | | |
| | | ds = oCN.RunProcReturn("select * from Sc_StationOutBillSub_SN WITH(NOLOCK) where HInterID='" + omodel.HInterID + "' order by HEntryID desc", "Sc_StationOutBillSub_SN"); |
| | | |
| | | oCN.RunProc($@"insert into Sc_StationOutBillSub_SN(HInterID,HBillNo_bak,HEntryID,HBarCode,HBarCodeQty,HMakeTime,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney) |
| | | values({HInterID}, '{HBillNo}', {(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)}, '{barCode_SN}', 1, GETDATE(), '', " + HProcExchInterID + "," + HProcExchEntryID + ", '" + HProcExchBillNo + "', '', 0, 0)"); |
| | | oCN.RunProc($@"insert into Sc_StationOutBillSub_SN(HInterID,HBillNo_bak,HEntryID,HBarCode,HBarCodeQty,HMakeTime,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HBatchNo) |
| | | values({HInterID}, '{HBillNo}', {(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)}, '{barCode_SN}', 1, GETDATE(), '', " + HProcExchInterID + "," + HProcExchEntryID + ", '" + HProcExchBillNo + $"', '', 0, 0,'{HBatchNo}')"); |
| | | |
| | | //把条码写入日志里面 |
| | | LogService.CustomWriteLog("条码:" + barCode_SN + ",工序:" + HProcID + ",出站时间:" + DateTime.Now, "TM" + DateTime.Now.ToString("yyyy-MM-dd")); |
| | |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select Top 1000 * from h_v_MES_StationOutBillList where 1 = 1 "; |
| | | string sql1 = "select Top 1000 * from h_v_Sc_SingleStationOutBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_SingleStationOutBillList"); |
| | | } |