private void button1_Click_1(object sender, EventArgs e) { if (dataGridView1.SelectedRows != null && dataGridView1.SelectedRows.Count > 0) { MessageBox.Show(jobid + errorCode); if (errorCode == "SrmActuator001")//空出 { AtsCellService.UpdateAtsCell1(source, 50); } else if (errorCode == "SrmActuator006")//重入 { AtsCellService.UpdateAtsCell1(target, 50); INF_JOBDOWNLOAD load2 = new INF_JOBDOWNLOAD(); load2.JOBTYPE = decimal.Parse(dataGridView1.SelectedRows[0].Cells[1].Value.ToString()); load2.PLANQTY = decimal.Parse(dataGridView1.SelectedRows[0].Cells[5].Value.ToString()); load2.SOURCE = target; load2.TARGET = AtsCellInService.getCellNo(target, AtsCellService.GetAtsCell(target).LANEWAYNO); if (load2.TARGET != null) { InfJobDownLoadService.InsertEntity(load2); } } InfFeedBackService.UpdateErrorJob(jobid); INF_JOBDOWNLOAD load1 = new INF_JOBDOWNLOAD(); load1.JOBID = jobid; load1.JOBTYPE = 97; InfJobDownLoadService.InsertCancelTask(load1); search(); } else { MessageBox.Show("请选择需要取消的任务"); } }
private void button3_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count < 1) { MessageBox.Show("请选择一行进行操作"); } else { String code = dataGridView1.SelectedRows[0].Cells[2].Value.ToString(); AtsCellService.UpdateAtsCell1(code, 40); bindData(); } }
private void button1_Click(object sender, EventArgs e) { if (cbAdress.SelectedIndex == -1) { MessageBox.Show("请选择出库口"); return; } if (tbChooseName.Tag == null) { MessageBox.Show("请选择出库品牌"); return; } INF_JOBDOWNLOAD job = new INF_JOBDOWNLOAD(); job.TARGET = address[cbAdress.SelectedIndex]; job.SOURCE = ((List <String>)tbChooseName.Tag)[2].ToString(); job.BARCODE = AtsCellInfoService.GetCellInfo(job.SOURCE).PALLETNO; job.PLANQTY = int.Parse(((List <String>)tbChooseName.Tag)[1].ToString()); job.JOBTYPE = 50;//搬运任务 job.PRIORITY = 50; job.CREATEDATE = DateTime.Now; job.BRANDID = ((List <String>)tbChooseName.Tag)[0].ToString(); job.TUTYPE = 4; job.INPUTTYPE = 10; using (TransactionScope ts = new TransactionScope()) { InfJobDownLoadService.InsertEntity(job); T_WMS_ATSCELL_CJ_HIS his = new T_WMS_ATSCELL_CJ_HIS(); his.CELLNO = job.SOURCE; his.QTY = job.PLANQTY; his.INBOUNDTIME = AtsCellInfoService.GetCellInfo(his.CELLNO).CREATETIME; his.CIGARETTECODE = job.BRANDID; his.CIGARETTENAME = ItemService.GetItemByCode(his.CIGARETTECODE).ITEMNAME; his.INBOUNDID = AtsCellInfoService.GetCellInfo(his.CELLNO).INBOUNDID; his.BARCODE = ItemService.GetItemByCode(his.CIGARETTECODE).BIGBOX_BAR; AtsCellCJService.InsertEntity(his); AtsCellService.UpdateAtsCell(job.SOURCE, 30);//更新cellno状态 ts.Complete(); } MessageBox.Show("出库完成"); }
public void bindData() { dataGridView1.DataSource = AtsCellService.GetAtsCellList(comboBox1.SelectedIndex + 1 + "", comboBox2.SelectedIndex + 1, comboBox3.SelectedIndex + 1); }
public void search() { dataGridView1.AutoGenerateColumns = false; dataGridView1.DataSource = AtsCellService.GetUseRate(); }
private void button2_Click(object sender, EventArgs e) { if (jobid != null && jobid != "0") { //InBound.INF_JOBFEEDBACK request = new InBound.INF_JOBFEEDBACK(); ////request.ID = Guid.NewGuid().ToString("N"); //request.JOBID = jobid; //request.FEEDBACKSTATUS = 99; //request.ERRORCODE = "OK"; //request.ENTERDATE = DateTime.Now; //// request.STATUS = 0; //InfFeedBackService.InsertEntity(request); //T_WMS_ATSCELLINFO cellInfo = AtsCellInfoService.CheckPalletExist(temptask.BARCODE);//检查托盘号是否存在 //T_WMS_ATSCELLINFO_DETAIL detail = AtsCellInfoDetailService.GetDetail(cellInfo.CELLNO); //if (detail.REQUESTQTY == detail.QTY) //&& (cellInfo.DISMANTLE==0) //{ // INF_JOBDOWNLOAD task1 = new INF_JOBDOWNLOAD(); // task1.JOBID = dataEntity.ExecuteStoreQuery<decimal>("select s_inf_jobdownload.nextval from dual").First() + ""; // task1.ID = task1.JOBID; // task1.BRANDID = temptask.BRANDID; // task1.BARCODE = cellInfo.PALLETNO; // task1.SOURCE = temptask.EQUIPMENTID; // task1.PLANQTY = 1; // task1.INPUTTYPE = 10; // task1.JOBTYPE = 100;//空托盘回收任务 // task1.TARGET = "1422";//空托盘指定地址 // task1.TUTYPE = 2; // task1.CREATEDATE = DateTime.Now; // task1.PRIORITY = 50; // dataEntity.INF_JOBDOWNLOAD.AddObject(task1); //} // INF_EQUIPMENTREQUEST request = InfEquipmentRequestService.GetEquipMentRequest(jobid); INF_JOBDOWNLOAD download = InfJobDownLoadService.GetDetail(jobid); T_WMS_ATSCELLINFO cellInfo = AtsCellInfoService.GetCellInfoByBarCode(download.BARCODE); T_WMS_ATSCELLINFO_DETAIL detail = AtsCellInfoDetailService.GetDetail(cellInfo.CELLNO); using (TransactionScope ts = new TransactionScope()) { if (detail.REQUESTQTY != detail.QTY) { INF_JOBDOWNLOAD task1 = new INF_JOBDOWNLOAD(); // task1.JOBID = dataEntity.ExecuteStoreQuery<decimal>("select s_inf_jobdownload.nextval from dual").First() + ""; // task1.ID = task.JOBID; task1.BRANDID = detail.BARCODE; task1.BARCODE = cellInfo.PALLETNO; task1.SOURCE = "1415"; task1.PLANQTY = detail.QTY - detail.REQUESTQTY; task1.INPUTTYPE = 10; task1.JOBTYPE = 40;//返库任务 task1.TARGET = AtsCellInService.getCellNoCode(download.BRANDID + ""); task1.TUTYPE = 4; task1.PRIORITY = 50; task1.STATUS = 0; task1.CREATEDATE = DateTime.Now; InfJobDownLoadService.InsertEntity(task1); T_WMS_ATSCELLINFO info = new T_WMS_ATSCELLINFO(); info.PALLETNO = cellInfo.PALLETNO; // info.DISMANTLE = 1; info.CELLNO = task1.TARGET; info.STATUS = 10;//组盘 info.CREATETIME = cellInfo.CREATETIME; info.INBOUNDID = cellInfo.INBOUNDID; //task.TUTYPE = 4; info.DISMANTLE = 0; AtsCellInfoService.InsertAtsCellInfo(info); T_WMS_ATSCELLINFO_DETAIL details = new T_WMS_ATSCELLINFO_DETAIL(); details.BARCODE = detail.BARCODE; T_WMS_ITEM item = ItemService.GetItemByBarCode(details.BARCODE); details.CIGARETTECODE = item.ITEMNO; details.CIGARETTENAME = item.ITEMNAME; details.QTY = task1.PLANQTY; details.CELLNO = info.CELLNO; AtsCellInfoDetailService.InsertAtsCellInfo(details); } AtsCellService.UpdateAtsCell(detail.CELLNO, 10); AtsCellInfoService.delete(detail.CELLNO); AtsCellInfoDetailService.delete(detail.CELLNO); InfJobDownLoadService.UpdateJopDownLoad(jobid, 3); // InfEquipmentRequestService.UpdateEquipMentRequest(jobid, 1); ts.Complete(); } search(); } else { MessageBox.Show("请选择记录"); } }
private void button1_Click(object sender, EventArgs e) { if (cbAddress.SelectedIndex == -1) { MessageBox.Show("请选择入口地址"); return; } if (tbChooseName.Tag == null) { MessageBox.Show("请选择品牌"); return; } if (tbRfid.Text == "") { MessageBox.Show("请输入Rfid"); return; } INF_JOBDOWNLOAD job = new INF_JOBDOWNLOAD(); job.SOURCE = address[cbAddress.SelectedIndex]; job.TARGET = AtsCellInService.getCellNoCode(tbChooseName.Tag.ToString());//储位地址 if (job.TARGET == "") { MessageBox.Show("获取储位信息失败"); return; } job.PLANQTY = int.Parse(tbNum.Text); job.JOBTYPE = 30;//成品入库 job.PRIORITY = 50; job.CREATEDATE = DateTime.Now; job.BRANDID = tbChooseName.Tag.ToString(); job.TUTYPE = 4; job.INPUTTYPE = 10; String palletNo = RefRFIDPalletService.GetSeq() + "";// RefRFIDPalletService.GetPallet(tbRfid.Text); job.BARCODE = palletNo; if (palletNo == "E") { MessageBox.Show("该托盘已在使用,请确认Rfid是否输入正确"); return; } if (cbcDuo.Checked) { job.CDTYPE = 10; } else { job.CDTYPE = 0; } // InfJobDownLoadService.InsertEntity(job); using (TransactionScope ts = new TransactionScope()) { InfJobDownLoadService.InsertEntity(job); //InBoundLineService.Update(entity.INBOUNDDETAILID, 0, num ?? 0); AtsCellService.UpdateAtsCell(job.TARGET, 30);//更新cellno状态 T_WMS_ATSCELLINFO info = new T_WMS_ATSCELLINFO(); info.PALLETNO = palletNo; info.DISMANTLE = 1; info.CELLNO = job.TARGET; info.STATUS = 10;//组盘 info.CREATETIME = DateTime.Now; //info.INBOUNDID = inboundid; if (cbcDuo.Checked) { info.DISMANTLE = 10; } else { info.DISMANTLE = 0; } AtsCellInfoService.InsertAtsCellInfo(info); T_WMS_ATSCELLINFO_DETAIL detail = new T_WMS_ATSCELLINFO_DETAIL(); detail.BARCODE = tbChooseName.Tag.ToString(); detail.CIGARETTECODE = ItemService.GetItemByBarCode(detail.BARCODE).ITEMNO; detail.CIGARETTENAME = tbChooseName.Text; detail.QTY = decimal.Parse(tbNum.Text); detail.CELLNO = info.CELLNO; AtsCellInfoDetailService.InsertAtsCellInfo(detail); ts.Complete(); WriteLog.GetLog().Write("储位明细信息状态:10 储位号:" + job.TARGET); } //MessageBox.Show("入库完成"); //InfJobDownLoadService.InsertEntity(job); //using (TransactionScope ts = new TransactionScope()) //{ // InfJobDownLoadService.InsertEntity(job); // //InBoundLineService.Update(entity.INBOUNDDETAILID, 0, num ?? 0); // AtsCellService.UpdateAtsCell(job.TARGET,30);//更新cellno状态 // T_WMS_ATSCELLINFO info = new T_WMS_ATSCELLINFO(); // info.PALLETNO = palletNo; // info.DISMANTLE = 1; // info.CELLNO = job.TARGET; // info.STATUS = 10;//组盘 // info.CREATETIME = DateTime.Now; // //info.INBOUNDID = inboundid; // if (cbcDuo.Checked) // { // info.DISMANTLE = 10; // } // else // { // info.DISMANTLE = 0; // } // AtsCellInfoService.InsertAtsCellInfo(info); // T_WMS_ATSCELLINFO_DETAIL detail = new T_WMS_ATSCELLINFO_DETAIL(); // detail.CIGARETTECODE = tbChooseName.Tag.ToString(); // detail.CIGARETTENAME = tbChooseName.Text; // detail.QTY = decimal.Parse(tbNum.Text); // detail.PALLETNO = info.PALLETNO; // AtsCellInfoDetailService.InsertAtsCellInfo(detail); // ts.Complete(); //} MessageBox.Show("任务已下达"); updateListBox(job.JOBID + "号任务已下达;入口地址:" + job.SOURCE); WriteLog.GetLog().Write(job.JOBID + "号任务已下达;入口地址:" + job.SOURCE); tbChooseName.Text = ""; tbChooseName.Tag = null; }
private void button1_Click(object sender, EventArgs e) { if (cbAddress.SelectedIndex == -1) { MessageBox.Show("请选择入口地址"); return; } if (tbChooseName.Tag == null) { MessageBox.Show("请选择品牌"); return; } if (tbRfid.Text == "") { MessageBox.Show("请输入Rfid"); return; } decimal fullCount = ItemService.GetItemByCode(cigaretteCode).FULLCOUNT ?? 0; if (decimal.Parse(tbNum.Text) > fullCount) { MessageBox.Show("入库数量不能大于满托盘数量"); return; } using (TransactionScope ts = new TransactionScope()) { INF_JOBDOWNLOAD job = new INF_JOBDOWNLOAD(); job.SOURCE = address[cbAddress.SelectedIndex]; job.TARGET = AtsCellInService.getCellNoCode(cigaretteCode);//储位地址 if (job.TARGET == "") { MessageBox.Show("获取储位信息失败,请联系管理员"); return; } job.PLANQTY = int.Parse(tbNum.Text); job.JOBTYPE = 42;//返库 job.PRIORITY = 50; job.CREATEDATE = DateTime.Now; job.BRANDID = tbChooseName.Tag.ToString(); job.TUTYPE = 4; job.INPUTTYPE = 10; job.TASKNO = taskNo; //job.EXTATTR1 = dataGridView1.SelectedRows[0].Cells[4].Value.ToString(); String palletNo = RefRFIDPalletService.GetPallet(tbRfid.Text); if (palletNo == "E") { MessageBox.Show("该托盘已在使用,请确认Rfid是否输入正确"); return; } job.BARCODE = palletNo; if (cbcDuo.Checked) { job.CDTYPE = 10; } else { job.CDTYPE = 0; } InfJobDownLoadService.InsertEntity(job); AtsCellService.UpdateAtsCell(job.TARGET, 30); T_WMS_ATSCELLINFO info = new T_WMS_ATSCELLINFO(); info.PALLETNO = job.BARCODE; info.CELLNO = job.TARGET; info.STATUS = 10;//组盘 info.CREATETIME = DateTime.Now; info.DISMANTLE = job.CDTYPE; AtsCellInfoService.InsertAtsCellInfo(info); AtsCellOutService.UpdateObjectThd(taskNo, job.PLANQTY ?? 0); T_WMS_ATSCELLINFO_DETAIL detail = new T_WMS_ATSCELLINFO_DETAIL(); detail.BARCODE = job.BRANDID; T_WMS_ITEM item = ItemService.GetItemByBarCode(detail.BARCODE); detail.CIGARETTECODE = item.ITEMNO; detail.CIGARETTENAME = item.ITEMNAME; detail.QTY = job.PLANQTY; detail.CELLNO = info.CELLNO; AtsCellInfoDetailService.InsertAtsCellInfo(detail); ts.Complete(); MessageBox.Show("入库任务下达完成"); } search(); tbChooseName.Text = ""; tbChooseName.Tag = null; }