| | |
| | | { |
| | | var cir = new LocCntrRel { S_LOC_CODE = loc, S_CNTR_CODE = cntrCode, S_SRC = deviceName }; |
| | | if (db.Insertable<LocCntrRel>(cir).ExecuteCommand() > 0) LogHelper.Info($"货位容器表绑定成功,货位号:{loc},托盘号:{cntrCode}"); |
| | | BindCntrItem(cntrCode, itemCode, batchNo, itemlayer); |
| | | var Con = db.Queryable<Container>().Where(a => a.S_CODE == cntrCode).First(); |
| | | if(Con == null) |
| | | { |
| | | if(db.Insertable<Container>(new Container |
| | | { |
| | | S_CODE = cntrCode, |
| | | N_TYPE = 1, |
| | | N_DETAIL_COUNT = 1 |
| | | }).ExecuteCommand() > 0) |
| | | { |
| | | LogHelper.Info($"容器表绑定成功,托盘号:{cntrCode}"); |
| | | } |
| | | } |
| | | if (!string.IsNullOrEmpty(itemCode)) |
| | | { |
| | | BindCntrItem(cntrCode, itemCode, batchNo, itemlayer); |
| | | } |
| | | } |
| | | } |
| | | }); |