| | |
| | | else |
| | | { |
| | | string cntrCode = Guid.NewGuid().ToString("N"); |
| | | string batch = workInfo.S_UsingNow == "Y" ? "即产" : "非即产"; |
| | | var cntrInfo = db.Queryable<LocCntrRel>().Where(a => a.S_LOC_CODE == deviceBit).First(); |
| | | if(cntrInfo == null) |
| | | { |
| | | LogHelper.Info($"{type}注塑机上未绑定托盘,自动绑定托盘"); |
| | | |
| | | TaskProcess.BindLocCntr(deviceBit, cntrCode, workInfo.S_ItemCode, "","","",workInfo.S_ItemName); |
| | | TaskProcess.BindLocCntr(deviceBit, cntrCode, workInfo.S_ItemCode, batch, "","",workInfo.S_ItemName); |
| | | } |
| | | else |
| | | { |
| | | cntrCode = cntrInfo.S_CNTR_CODE; |
| | | TaskProcess.BindCntrItem(cntrCode, workInfo.S_ItemCode, "", "",workInfo.S_ItemName); |
| | | TaskProcess.BindCntrItem(cntrCode, workInfo.S_ItemCode, batch, "",workInfo.S_ItemName); |
| | | } |
| | | //创建作业 |
| | | WMSHelper.CreateOpTask(deviceBit, "", "入库", taskType, cntrCode,"","",workInfo.S_WorkNo); |