/// <summary> /// 厂家 出库 /// </summary> private void GI(string data) { tbDocno.Text = GetDocNo(); //出库 string sql = "update pacsd_pm_box set final_move_type = '261',final_move_code = 'MOVE0501',final_line_to = :final_line_to," + " final_doc_no = :final_doc_no,last_doc_no = final_doc_no,operation_window = 'LINE',box_case_status = :box_case_status,box_status = :box_status, " + " update_date = to_char(sysdate,'yyyyMMdd'),update_time = to_char(sysdate,'hh24miss'),update_user = :update_user,update_ip = :update_ip,final_vend_to = :final_vend_to" + " where box_label = '" + data + "' " + " and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' "; OracleParameter[] cmdParam = new OracleParameter[] { new OracleParameter(":final_line_to", OracleType.VarChar, 50), new OracleParameter(":final_doc_no", OracleType.VarChar, 50), new OracleParameter(":update_user", OracleType.VarChar, 50), new OracleParameter(":update_ip", OracleType.VarChar, 50), new OracleParameter(":box_case_status", OracleType.VarChar, 50), new OracleParameter(":box_status", OracleType.VarChar, 50), new OracleParameter(":final_vend_to", OracleType.VarChar, 50) //add by dyz@2014/10/5 [6] }; cmdParam[0].Value = lineCode; cmdParam[1].Value = docno; cmdParam[2].Value = PaCSGlobal.LoginUserInfo.Id; cmdParam[3].Value = PaCSGlobal.GetClientIp(); DataTable dtStatus = TonerGlobal.GetCommInfoByCode("MOVE0501"); if (dtStatus.Rows.Count > 0) { cmdParam[4].Value = dtStatus.Rows[0]["BOX_CASE_STATUS"].ToString(); cmdParam[5].Value = dtStatus.Rows[0]["BOX_STATUS"].ToString(); } else { cmdParam[4].Value = ""; cmdParam[5].Value = ""; } cmdParam[6].Value = PaCSGlobal.LoginUserInfo.Venderid; int i = OracleHelper.ExecuteNonQuery(sql, cmdParam); //插入prog表 TonerGlobal.InsertIntoProg(data); lbStatus.Text = "【" + data + "】:出库到Line成功"; panelStatus.BackColor = Color.GreenYellow; //提示成功语音 PaCSGlobal.PlayWavOk(); //刷新列表 TonerGlobal.SetGridView(GetData(docno), gridView1, gridControl1); }
/// <summary> /// 厂家 废弃 /// </summary> private void Dispose(string data) { string sql = "update pacsd_pm_box set final_move_type = '551',final_move_code = 'MOVE0601',final_doc_no = :final_doc_no," + " last_doc_no = final_doc_no,operation_window = 'SCRAP',box_case_status = :box_case_status,box_status = :box_status," + " update_date = to_char(sysdate,'yyyyMMdd'),update_time = to_char(sysdate,'hh24miss'),update_user = :update_user,update_ip = :update_ip " + " where box_label = '" + data + "' " + " and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' "; OracleParameter[] cmdParam = new OracleParameter[] { new OracleParameter(":final_doc_no", OracleType.VarChar, 50), new OracleParameter(":update_user", OracleType.VarChar, 50), new OracleParameter(":update_ip", OracleType.VarChar, 50), new OracleParameter(":box_case_status", OracleType.VarChar, 50), new OracleParameter(":box_status", OracleType.VarChar, 50) }; cmdParam[0].Value = TonerGlobal.GenerateDocNo(); cmdParam[1].Value = PaCSGlobal.LoginUserInfo.Id; cmdParam[2].Value = PaCSGlobal.GetClientIp(); DataTable dtStatus = TonerGlobal.GetCommInfoByCode("MOVE0601"); if (dtStatus.Rows.Count > 0) { cmdParam[3].Value = dtStatus.Rows[0]["BOX_CASE_STATUS"].ToString(); cmdParam[4].Value = dtStatus.Rows[0]["BOX_STATUS"].ToString(); } else { cmdParam[3].Value = ""; cmdParam[4].Value = ""; } int i = OracleHelper.ExecuteNonQuery(sql, cmdParam); //插入prog表 TonerGlobal.InsertIntoProg(data); //提示成功语音 PaCSGlobal.PlayWavOk(); XtraMessageBox.Show("废弃成功!", "提示"); }
/// <summary> /// 厂家 入库 /// </summary> private void GR(string data) { tbDocno.Text = GetDocNo(); string moveType = ""; string moveCode = ""; string stockCode = ""; string bufferCode = ""; switch (PaCSGlobal.LoginUserInfo.Venderid) { case "C660": moveType = "311"; //SSSDP入库到Buffer moveCode = "MOVE0302"; stockCode = "SSDP_STOCK"; bufferCode = (cmbLoc.SelectedItem as ComboxData).Value; //楼层 break; case "C6H0": moveType = "311"; //SSSDP入库到Buffer moveCode = "MOVE0302"; stockCode = "SESC_STOCK"; bufferCode = (cmbLoc.SelectedItem as ComboxData).Value; //楼层 break; case "O-0192": moveType = "311"; //SSSDP入库到Buffer moveCode = "MOVE0302"; stockCode = "EVA_6TH_STOCK"; bufferCode = (cmbLoc.SelectedItem as ComboxData).Value; //楼层 break; case "L107LO": moveType = "551"; //厂家入库Stock moveCode = "MOVE0303"; stockCode = (cmbLoc.SelectedItem as ComboxData).Value; break; case "C660_SVC": moveType = "551"; //厂家入库Stock moveCode = "MOVE0303"; stockCode = (cmbLoc.SelectedItem as ComboxData).Value; break; default: moveType = "352"; //厂家入库Stock moveCode = "MOVE0301"; stockCode = (cmbLoc.SelectedItem as ComboxData).Value; break; } string sql = "update pacsd_pm_box set final_move_type = '" + moveType + "',final_move_code = '" + moveCode + "',final_buffer_to = :final_buffer_to,final_stock_to = :final_stock_to," + " final_doc_no = :final_doc_no,last_doc_no = final_doc_no,operation_window = 'GRCJ',box_case_status = :box_case_status,box_status = :box_status," + " update_date = to_char(sysdate,'yyyyMMdd'),update_time = to_char(sysdate,'hh24miss'),update_user = :update_user,update_ip = :update_ip,final_vend_to = :final_vend_to " + " where box_label = '" + data + "' " + " and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' "; OracleParameter[] cmdParam = new OracleParameter[] { new OracleParameter(":final_doc_no", OracleType.VarChar, 50), new OracleParameter(":update_user", OracleType.VarChar, 50), new OracleParameter(":update_ip", OracleType.VarChar, 50), new OracleParameter(":box_case_status", OracleType.VarChar, 50), new OracleParameter(":box_status", OracleType.VarChar, 50), new OracleParameter(":final_buffer_to", OracleType.VarChar, 50), new OracleParameter(":final_stock_to", OracleType.VarChar, 50), new OracleParameter(":final_vend_to", OracleType.VarChar, 50) //add by dyz@2014/10/5 [7] }; cmdParam[0].Value = docno; cmdParam[1].Value = PaCSGlobal.LoginUserInfo.Id; cmdParam[2].Value = PaCSGlobal.GetClientIp(); DataTable dtStatus = TonerGlobal.GetCommInfoByCode(moveCode); if (dtStatus.Rows.Count > 0) { cmdParam[3].Value = dtStatus.Rows[0]["BOX_CASE_STATUS"].ToString(); cmdParam[4].Value = dtStatus.Rows[0]["BOX_STATUS"].ToString(); } else { cmdParam[3].Value = ""; cmdParam[4].Value = ""; } cmdParam[5].Value = bufferCode; cmdParam[6].Value = stockCode; cmdParam[7].Value = PaCSGlobal.LoginUserInfo.Venderid; int i = OracleHelper.ExecuteNonQuery(sql, cmdParam); //插入prog表 TonerGlobal.InsertIntoProg(data); lbStatus.Text = "【" + data + "】:入库成功"; panelStatus.BackColor = Color.GreenYellow; //提示成功语音 PaCSGlobal.PlayWavOk(); //刷新列表 TonerGlobal.SetGridView(GetData(docno), gridView1, gridControl1); }
/// <summary> /// 原材料仓库 入库 /// </summary> private void GR(string data) { //判断状态 tbDocno.Text = GetDocNo(); string lotNo = ""; string boxNo = ""; string qty = ""; if (PaCSGlobal.LoginUserInfo.Fct_code.Equals("C660A")) { lotNo = data.Substring(15, 6); boxNo = data.Substring(21, 4); qty = data.Substring(25, 6); } else if (PaCSGlobal.LoginUserInfo.Fct_code.Equals("C6H0A")) { //SESC lotNo = data.Substring(15, 10); boxNo = data.Substring(11, 4); qty = data.Substring(25, 6); } string sql = "insert into pacsd_pm_box(BOX_LABEL,ITEM,MAKE_VEND_CODE,LOT_NO,BOX_NO,QTY," + " FINAL_MOVE_CODE,FINAL_MOVE_TYPE,FINAL_VEND_FROM,FINAL_VEND_TO,FINAL_DOC_NO," + " CREATE_USER,CREATE_IP,BOX_CASE_STATUS,BOX_STATUS,OPERATION_WINDOW,update_date,update_time,update_user,update_ip,fct_code) " + " values(:BOX_LABEL,:ITEM,:MAKE_VEND_CODE,:LOT_NO,:BOX_NO,:QTY," + " :FINAL_MOVE_CODE,'101',:FINAL_VEND_FROM,:FINAL_VEND_TO,:FINAL_DOC_NO," + " :CREATE_USER,:CREATE_IP,:BOX_CASE_STATUS,:BOX_STATUS,'GREJH',to_char(sysdate,'yyyyMMdd'),to_char(sysdate,'hh24miss'),:update_user,:update_ip,:fct_code) "; OracleParameter[] cmdParam = new OracleParameter[] { new OracleParameter(":BOX_LABEL", OracleType.VarChar, 50), new OracleParameter(":ITEM", OracleType.VarChar, 50), new OracleParameter(":MAKE_VEND_CODE", OracleType.VarChar, 50), new OracleParameter(":LOT_NO", OracleType.VarChar, 50), new OracleParameter(":BOX_NO", OracleType.VarChar, 50), new OracleParameter(":QTY", OracleType.VarChar, 50), new OracleParameter(":FINAL_MOVE_CODE", OracleType.VarChar, 50), new OracleParameter(":FINAL_VEND_FROM", OracleType.VarChar, 50), new OracleParameter(":FINAL_VEND_TO", OracleType.VarChar, 50), new OracleParameter(":FINAL_DOC_NO", OracleType.VarChar, 50), new OracleParameter(":CREATE_USER", OracleType.VarChar, 20), new OracleParameter(":CREATE_IP", OracleType.VarChar, 20), new OracleParameter(":BOX_CASE_STATUS", OracleType.VarChar, 20), new OracleParameter(":BOX_STATUS", OracleType.VarChar, 20), new OracleParameter(":update_user", OracleType.VarChar, 20), new OracleParameter(":update_ip", OracleType.VarChar, 20), new OracleParameter(":fct_code", OracleType.VarChar, 20) }; cmdParam[0].Value = data; cmdParam[1].Value = item; cmdParam[2].Value = vendor; cmdParam[3].Value = lotNo; cmdParam[4].Value = boxNo; cmdParam[5].Value = qty; cmdParam[6].Value = "MOVE0101"; cmdParam[7].Value = vendor; cmdParam[8].Value = vend_to; cmdParam[9].Value = docno; cmdParam[10].Value = PaCSGlobal.LoginUserInfo.Id; cmdParam[11].Value = PaCSGlobal.GetClientIp(); DataTable dtStatus = TonerGlobal.GetCommInfoByCode("MOVE0101"); if (dtStatus.Rows.Count > 0) { cmdParam[12].Value = dtStatus.Rows[0]["BOX_CASE_STATUS"].ToString(); cmdParam[13].Value = dtStatus.Rows[0]["BOX_STATUS"].ToString(); } else { cmdParam[12].Value = ""; cmdParam[13].Value = ""; } cmdParam[14].Value = PaCSGlobal.LoginUserInfo.Id; cmdParam[15].Value = PaCSGlobal.GetClientIp(); cmdParam[16].Value = PaCSGlobal.LoginUserInfo.Fct_code; int i = OracleHelper.ExecuteNonQuery(sql, cmdParam); //插入prog表 TonerGlobal.InsertIntoProg(data); lbStatus.Text = "【" + data + "】:入库成功"; panelStatus.BackColor = Color.GreenYellow; //提示成功语音 PaCSGlobal.PlayWavOk(); //刷新列表 TonerGlobal.SetGridView(GetData(docno), gridView1, gridControl1); }
/// <summary> /// 厂家 出库 /// </summary> private void GI(string data) { string moveCode = ""; switch (GIType) { case 0: moveCode = "MOVE0401"; //buffer break; case 1: moveCode = "MOVE0402"; //其他厂家 break; } tbDocno.Text = GetDocNo(); string stock_block = GIType == 0 ? "" : "final_stock_to = null,";//final_stock_to = decode(GIType,0,final_stock_to,null) //出库 string sql = "update pacsd_pm_box set final_move_type = '" + destMoveType + "',final_move_code = '" + moveCode + "',final_vend_to = :final_vend_to, final_vend_from = final_vend_to," + stock_block + " final_buffer_to = :final_buffer_to,final_doc_no = :final_doc_no,last_doc_no = final_doc_no,operation_window = 'GICJ',box_case_status = :box_case_status,box_status = :box_status, " + " update_date = to_char(sysdate,'yyyyMMdd'),update_time = to_char(sysdate,'hh24miss'),update_user = :update_user,update_ip = :update_ip" + " where box_label = '" + data + "' " + " and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' "; OracleParameter[] cmdParam = new OracleParameter[] { new OracleParameter(":final_vend_to", OracleType.VarChar, 50), new OracleParameter(":final_doc_no", OracleType.VarChar, 50), new OracleParameter(":update_user", OracleType.VarChar, 50), new OracleParameter(":update_ip", OracleType.VarChar, 50), new OracleParameter(":box_case_status", OracleType.VarChar, 50), new OracleParameter(":box_status", OracleType.VarChar, 50), new OracleParameter(":final_buffer_to", OracleType.VarChar, 50) }; cmdParam[0].Value = GIType == 0 ? PaCSGlobal.LoginUserInfo.Venderid : destCode; cmdParam[1].Value = docno; cmdParam[2].Value = PaCSGlobal.LoginUserInfo.Id; cmdParam[3].Value = PaCSGlobal.GetClientIp(); DataTable dtStatus = TonerGlobal.GetCommInfoByCode(moveCode); if (dtStatus.Rows.Count > 0) { cmdParam[4].Value = dtStatus.Rows[0]["BOX_CASE_STATUS"].ToString(); cmdParam[5].Value = dtStatus.Rows[0]["BOX_STATUS"].ToString(); } else { cmdParam[4].Value = ""; cmdParam[5].Value = ""; } cmdParam[6].Value = GIType == 0 ? destCode : ""; int i = OracleHelper.ExecuteNonQuery(sql, cmdParam); //插出prog表 TonerGlobal.InsertIntoProg(data); lbStatus.Text = "【" + data + "】:出库成功"; panelStatus.BackColor = Color.GreenYellow; //提示成功语音 PaCSGlobal.PlayWavOk(); //刷新列表 TonerGlobal.SetGridView(GetData(docno), gridView1, gridControl1); }