public void CloseVehicleInFactoryDetail(VehicleInFactoryDetail vehicleInFactoryDetail) { vehicleInFactoryDetail.CloseDate = DateTime.Now; vehicleInFactoryDetail.CloseUserId = SecurityContextHolder.Get().Id; vehicleInFactoryDetail.CloseUserName = SecurityContextHolder.Get().FullName; vehicleInFactoryDetail.IsClose = true; genericMgr.Update(vehicleInFactoryDetail); TryCloseVehicleInFactory(vehicleInFactoryDetail.OrderNo); }
public void AddVehicleInFactory(string ipNo, IList<VehicleInFactoryDetail> vehicleInFactoryDetailList) { if (vehicleInFactoryDetailList == null) { vehicleInFactoryDetailList = new List<VehicleInFactoryDetail>(); } IList<IpMaster> ipMasterList = genericMgr.FindAll<IpMaster>("from IpMaster as i where i.IpNo = ? and i.Status in (?,?)", new object[] { ipNo, (int)com.Sconit.CodeMaster.IpStatus.Submit, (int)com.Sconit.CodeMaster.IpStatus.InProcess }); if (ipMasterList == null || ipMasterList.Count() == 0) { throw new BusinessException("没有找到对应的送货单号{0}", ipNo); } IpMaster ipMaster = ipMasterList[0]; VehicleInFactoryDetail vehicleInFactoryDetail = new VehicleInFactoryDetail(); vehicleInFactoryDetail.IpNo = ipNo; vehicleInFactoryDetailList.Add(vehicleInFactoryDetail); }