public virtual void DeleteCycleCountResult(CycleCountResult entity)
 {
     Delete(entity);
 }
 public virtual void CreateCycleCountResult(CycleCountResult entity)
 {
     Create(entity);
 }
 public virtual void UpdateCycleCountResult(CycleCountResult entity)
 {
     Update(entity);
 }
 public virtual void DeleteCycleCountResult(CycleCountResult entity)
 {
     entityDao.DeleteCycleCountResult(entity);
 }
 public virtual void UpdateCycleCountResult(CycleCountResult entity)
 {
     entityDao.UpdateCycleCountResult(entity);
 }
 public virtual void CreateCycleCountResult(CycleCountResult entity)
 {
     entityDao.CreateCycleCountResult(entity);
 }
Ejemplo n.º 7
0
        public IList<InventoryTransaction> InventoryAdjust(CycleCountResult cycleCountResult, User user)
        {
            #region ���¿��
            IList<InventoryTransaction> inventoryTransactionList = RecordInventory(
                cycleCountResult.Item,
                cycleCountResult.CycleCount.Location,
                cycleCountResult.HuId != null ? cycleCountResult.HuId : null,
                cycleCountResult.HuId != null ? cycleCountResult.LotNo : null,
                cycleCountResult.DiffQty,
                false,
                null,
                BusinessConstants.CODE_MASTER_LOCATION_TRANSACTION_TYPE_VALUE_CYC_CNT,
                null,
                //true,
                user,
                false,
                false,
                null
                );
            #endregion

            #region ��¼�������
            foreach (InventoryTransaction inventoryTransaction in inventoryTransactionList)
            {
                this.locationTransactionMgr.RecordLocationTransaction(inventoryTransaction, BusinessConstants.CODE_MASTER_LOCATION_TRANSACTION_TYPE_VALUE_CYC_CNT, user, cycleCountResult.CycleCount.Code);

                if (cycleCountResult.StorageBin != null)
                {
                    LocationLotDetail locationLotDetail = this.locationLotDetailMgr.LoadLocationLotDetail(inventoryTransaction.LocationLotDetailId);
                    if (locationLotDetail.StorageBin == null || locationLotDetail.StorageBin.Code != cycleCountResult.StorageBin)
                    {
                        locationLotDetail.NewStorageBin = this.storageBinMgr.LoadStorageBin(cycleCountResult.StorageBin);
                        this.InventoryPut(locationLotDetail, user);
                    }
                }
            }
            #endregion

            #region ��������״̬
            if (cycleCountResult.HuId != null && cycleCountResult.HuId.Trim() != string.Empty && cycleCountResult.DiffQty < 0)
            {
                Hu hu = this.huMgr.LoadHu(cycleCountResult.HuId);
                hu.Location = null;
                hu.StorageBin = null;
                hu.Status = BusinessConstants.CODE_MASTER_HU_STATUS_VALUE_INPROCESS;

                this.huMgr.UpdateHu(hu);
            }
            #endregion

            return inventoryTransactionList;
        }
Ejemplo n.º 8
0
        public IList<InventoryTransaction> InventoryAdjust(CycleCountResult cycleCountResult, User user)
        {
            #region 更新库存
            IList<InventoryTransaction> inventoryTransactionList = RecordInventory(
                cycleCountResult.Item,
                cycleCountResult.CycleCount.Location,
                cycleCountResult.HuId != null ? cycleCountResult.HuId : null,
                cycleCountResult.LotNo,
                cycleCountResult.DiffQty,
                false,
                null,
                BusinessConstants.CODE_MASTER_LOCATION_TRANSACTION_TYPE_VALUE_CYC_CNT,
                null,
                //true,
                user,
                false,
                false
                );
            #endregion

            #region 记录库存事务
            foreach (InventoryTransaction inventoryTransaction in inventoryTransactionList)
            {
                this.locationTransactionMgrE.RecordLocationTransaction(inventoryTransaction, BusinessConstants.CODE_MASTER_LOCATION_TRANSACTION_TYPE_VALUE_CYC_CNT, user, cycleCountResult.CycleCount.Code);

                if (cycleCountResult.StorageBin != null)
                {
                    LocationLotDetail locationLotDetail = this.locationLotDetailMgrE.LoadLocationLotDetail(inventoryTransaction.LocationLotDetailId);
                    if (locationLotDetail.StorageBin == null || locationLotDetail.StorageBin.Code != cycleCountResult.StorageBin)
                    {
                        locationLotDetail.NewStorageBin = this.storageBinMgrE.LoadStorageBin(cycleCountResult.StorageBin);
                        this.InventoryPut(locationLotDetail, user);
                    }
                }
            }
            #endregion

            return inventoryTransactionList;
        }