| | |
| | | using Tiger.IBusiness.MES.WorkAction; |
| | | using Tiger.Model; |
| | | using Tiger.Model.Entitys.MES.Position; |
| | | using static Tiger.Model.WMS_ITEM_PKG; |
| | | using Tiger.Model.Minsun; |
| | | |
| | | namespace Tiger.Business.MES.WorkAction |
| | | { |
| | |
| | | PKG_QTY = dtl.PKG_QTY, |
| | | LABEL_CODE = LabelDic[dtl.PKG_LEVEL]?.LABEL_CODE, |
| | | IsFinished = true, |
| | | Package = new() |
| | | { |
| | | AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG, |
| | | AUTH_PROD = CurPosition.CurLine.LINE_CODE, |
| | | SN = pInput.PkgSN, |
| | | PKG_TYPE = dtl.PkgType.PKG_NAME, |
| | | ITEM_CODE = CurPosition.CurWipSNs.First().ITEM_CODE, |
| | | QTY = CurPosition.CurWipSNs.First().QTY, |
| | | UNIT = dtl.PkgType.PKG_NAME, |
| | | WORK_ORDER = CurPosition.CurWipSNs.First().WORK_ORDER, |
| | | BATCH_NO = CurPosition.CurWipSNs.First().BATCH_NO, |
| | | ROT_CODE = CurPosition.CurWipSNs.First().ROT_CODE, |
| | | NODE_ID = CurPosition.CurWipSNs.First().NODE_ID, |
| | | NODE_NAME = CurPosition.CurWipSNs.First().NODE_NAME, |
| | | FTY_CODE = CurPosition.CurWipSNs.First().FTY_CODE, |
| | | WS_CODE = CurPosition.CurWipSNs.First().WS_CODE, |
| | | LINE_CODE = CurPosition.CurWipSNs.First().LINE_CODE, |
| | | POST_CODE = CurPosition.CurWipSNs.First().POST_CODE, |
| | | OPER_CODE = CurPosition.CurWipSNs.First().OPER_CODE, |
| | | SEGMENT = CurPosition.CurWipSNs.First().SEGMENT, |
| | | } |
| | | }; |
| | | |
| | | CurPkgItem.Package = Biz.Db.Queryable<MES_WIP_PKG>().Where(q => q.SN == pInput.PkgSN && q.AUTH_ORG == CurPosition.WorkBatch.WO.AUTH_ORG).First() ?? new() |
| | | { |
| | | AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG, |
| | | AUTH_PROD = CurPosition.CurLine.LINE_CODE, |
| | | SN = pInput.PkgSN, |
| | | }; |
| | | CurPkgItem.Package.WIP_ID = CurPosition.CurWipSNs.Count == 1 ? CurPosition.CurWipSNs.First().ID : null; |
| | | CurPkgItem.Package.PKG_TYPE = dtl.PkgType.PKG_NAME; |
| | | CurPkgItem.Package.ITEM_CODE = CurPosition.CurWipSNs.First().ITEM_CODE; |
| | | CurPkgItem.Package.QTY = CurPosition.CurWipSNs.First().QTY; |
| | | CurPkgItem.Package.UNIT = dtl.PkgType.PKG_NAME; |
| | | CurPkgItem.Package.WORK_ORDER = CurPosition.CurWipSNs.First().WORK_ORDER; |
| | | CurPkgItem.Package.BATCH_NO = CurPosition.CurWipSNs.First().BATCH_NO; |
| | | CurPkgItem.Package.ROT_CODE = CurPosition.CurWipSNs.First().ROT_CODE; |
| | | CurPkgItem.Package.NODE_ID = CurPosition.CurWipSNs.First().NODE_ID; |
| | | CurPkgItem.Package.NODE_NAME = CurPosition.CurWipSNs.First().NODE_NAME; |
| | | CurPkgItem.Package.FTY_CODE = CurPosition.CurWipSNs.First().FTY_CODE; |
| | | CurPkgItem.Package.WS_CODE = CurPosition.CurWipSNs.First().WS_CODE; |
| | | CurPkgItem.Package.LINE_CODE = CurPosition.CurWipSNs.First().LINE_CODE; |
| | | CurPkgItem.Package.POST_CODE = CurPosition.CurWipSNs.First().POST_CODE; |
| | | CurPkgItem.Package.OPER_CODE = CurPosition.CurWipSNs.First().OPER_CODE; |
| | | CurPkgItem.Package.SEGMENT = CurPosition.CurWipSNs.First().SEGMENT; |
| | | FinishLevel++; |
| | | action = SavePkgData(input, action); |
| | | } |
| | |
| | | { |
| | | AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG, |
| | | AUTH_PROD = CurPosition.CurLine.LINE_CODE, |
| | | WIP_ID = wipSn.ID, |
| | | HIS_ID = CurPosition.CurWipSNHiss.First(q => q.SN == wipSn.SN).ID, |
| | | SN = wipSn.SN, |
| | | STATUS = wipSn.STATUS, |
| | |
| | | POST_CODE = wipSn.POST_CODE, |
| | | OPER_CODE = wipSn.OPER_CODE, |
| | | SEGMENT = wipSn.SEGMENT, |
| | | FLOW_SN = wipSn.FLOW_SN, |
| | | TRAY_SN = wipSn.TRAY_SN, |
| | | INNER_SN = wipSn.INNER_SN, |
| | | CARTON_SN = wipSn.CARTON_SN, |
| | | PALLET_SN = wipSn.PALLET_SN, |
| | | OPERATION_TIME = DateTime.Now, |
| | | SFTS_CODE = wipSn.SFTS_CODE, |
| | | SFT_CODE = wipSn.SFT_CODE, |
| | |
| | | //包装信息保存到在制品信息表 |
| | | db.Updateable<MES_WIP_DATA>() |
| | | .SetColumns(q => q.TRAY_SN == CurPkg.Item.Package.SN) |
| | | .SetColumns(q => q.CONTAINER_SN == q.CARTON_SN) |
| | | .SetColumns(q => q.INNER_SN == q.CARTON_SN) |
| | | .SetColumns(q => q.CARTON_SN == CurPkg.Item.Package.SN) |
| | | .Where(q => q.WORK_ORDER == pkg.WORK_ORDER && q.SN == pkg.SN) |
| | | .ExecuteCommand(); |