コード例 #1
0
        /// <summary>
        /// 资产借用
        /// </summary>
        /// <param name="item"></param>
        public void AddAssetsBorrow(BorrowAttribute item)
        {
            _borrowRep.Add(item);
            var details = new List <BorrowDetailAttribute>();
            var assets  = _assetsService.Get(item.AssetsNums);

            foreach (var asset in assets)
            {
                details.Add(new BorrowDetailAttribute
                {
                    BorrowFormNo = item.EntityId,
                    AssetsNo     = asset.AssetsNum,
                    BorrowCounts = asset.Counts
                });
            }
            _borrowDetailRep.Add(details);
            //设置资产使用人
            _assetsMainRep.UpdateUsePeople(item.BorrowPerson, item.AssetsNums);
        }
コード例 #2
0
 public void AddAssetsBorrowDetail(BorrowDetailAttribute item)
 {
     _assetsBorrowDetailRep.Add(item);
 }