123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using EMIS.ViewModel.Cultureplan;
- using EMIS.Entities;
- using EMIS.ViewModel.CacheManage;
- namespace EMIS.ViewModel.TeachingMaterial
- {
- [Serializable]
- public class InventoryView
- {
- /// <summary>
- /// 教材ID
- /// </summary>
- [DisplayName("教材ID")]
- public Guid TeachingMaterialPoolID { get; set; }
- /// <summary>
- /// 库存ID
- /// </summary>
- [DisplayName("库存ID")]
- public Guid TeachingMateriaInventoryID { get; set; }
- /// <summary>
- /// 出库ID
- /// </summary>
- [DisplayName("出库ID")]
- public Guid StockOutID { get; set; }
- /// <summary>
- /// 入库ID
- /// </summary>
- [DisplayName("入库ID")]
- public Guid StockInID { get; set; }
- /// <summary>
- /// 教材编号
- /// </summary>
- /// [Required]
- [DisplayName("教材编号")]
- [Required]
- public string TeachingMaterialCode { get; set; }
- /// <summary>
- /// 教材名称
- /// </summary>
- [DisplayName("教材名称")]
- [Required]
- public string TeachingMaterialName { get; set; }
- /// <summary>
- /// 书库编号
- /// </summary>
- public string LibraryCode { get; set; }
- /// <summary>
- /// 书库名称
- /// </summary>
- public string LibraryName { get; set; }
- /// <summary>
- /// 教材名称
- /// </summary>
- [DisplayName("教材简称")]
- [Required]
- public string TeachingMaterialShorName { get; set; }
- /// <summary>
- /// 学年学期
- /// </summary>
- [DisplayName("学年学期")]
- public string SchoolYearName { get; set; }
- /// <summary>
- /// 学年学期ID
- /// </summary>
- [DisplayName("学年学期ID")]
- public Guid SchoolYearID { get; set; }
- /// <summary>
- /// 课程ID
- /// </summary>
- [DisplayName("课程")]
- public HashSet<EM_Coursematerial> CoursematerialEntityList { get; set; }
- /// <summary>
- /// 课程名称
- /// </summary>
- [DisplayName("课程名称")]
- [Required]
- public string CoursematerialName
- {
- get
- {
- return string.Join(",", CoursematerialEntityList.Select(x => x.CourseName));
- }
- }
- /// <summary>
- /// 课程代码
- /// </summary>
- [DisplayName("课程代码")]
- public string CoursematerialCode
- {
- get
- {
- return string.Join(",", CoursematerialEntityList.Select(x => x.CourseCode));
- }
- }
- /// <summary>
- /// ISBN
- /// </summary>
- [DisplayName("ISBN")]
- [Required]
- public string ISBN { get; set; }
- /// <summary>
- ///教材类型
- /// </summary>
- [DisplayName("教材类型")]
- [Required]
- public int? TeachingMaterialTypeID { get; set; }
- /// <summary>
- ///教材类型
- /// </summary>
- [DisplayName("教材类型")]
- public string TeachingMaterialTypeName
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMaterialType.ToString())
- .Where(x => x.Value == TeachingMaterialTypeID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 获奖级别
- /// </summary>
- [DisplayName("获奖级别")]
- [Required]
- public int? WnningLevel { get; set; }
- /// <summary>
- /// 获奖级别
- /// </summary>
- [DisplayName("获奖级别")]
- public string WnningLevelName { get; set; }
- /// <summary>
- /// 版本时间
- /// </summary>
- [DisplayName("版本时间")]
- [Required]
- public string PublishTime { get; set; }
- /// <summary>
- /// 出版单位ID
- /// </summary>
- [DisplayName("出版单位ID")]
- public Guid? PublishID { get; set; }
- /// <summary>
- /// 出版单位
- /// </summary>
- [DisplayName("出版单位")]
- public string PublishName { get; set; }
- /// <summary>
- /// 作者
- /// </summary>
- [DisplayName("作者")]
- [Required]
- public string Author { get; set; }
- /// <summary>
- /// 单价
- /// </summary>
- [DisplayName("单价")]
- [Required]
- public decimal? Price { get; set; }
- /// <summary>
- /// 是否过期
- /// </summary>
- [DisplayName("是否过期")]
- [Required]
- public bool IsLate { get; set; }
- /// <summary>
- /// 是否过期
- /// </summary>
- public string IsLateName { get; set; }
- /// <summary>
- /// 备注
- /// </summary>
- [DisplayName("备注")]
- public string Desc { get; set; }
- /// <summary>
- /// 创建时间
- /// </summary>
- [DisplayName("创建时间")]
- public DateTime? CreateTime { get; set; }
- /// <summary>
- /// 创建人
- /// </summary>
- [DisplayName("创建人")]
- public string CreateUserName { get; set; }
- /// <summary>
- /// 修改时间
- /// </summary>
- [DisplayName("修改时间")]
- public DateTime? ModifyTime { get; set; }
- /// <summary>
- /// 修改人
- /// </summary>
- [DisplayName("修改人")]
- public string ModifyUserName { get; set; }
- /// <summary>
- /// 征订数量(用于教师征订)
- /// </summary>
- [DisplayName("征订数量")]
- public int? OrderQty { get; set; }
- /// <summary>
- /// 课程级别(用于学生征订)
- /// </summary>
- [DisplayName("课程级别")]
- public string CourseLevelName { get; set; }
- /// <summary>
- /// 课程科类(用于学生征订)
- /// </summary>
- [DisplayName("课程科类")]
- public string CourseScienceName { get; set; }
- /// <summary>
- /// 最小库存量
- /// </summary>
- [DisplayName("最小库存量")]
- public int? MinInventory { get; set; }
- /// <summary>
- /// 当前库存量
- /// </summary>
- [DisplayName("当前库存量")]
- public int? PresentInventory { get; set; }
- /// <summary>
- /// 库存编号
- /// </summary>
- [DisplayName("库存编号(出库入库编号)")]
- public string InventoryCode { get; set; }
- /// <summary>
- /// 折扣率
- /// </summary>
- [DisplayName("折扣率")]
- [Required]
- [RegularExpression(@"[\d]?(\.[\d]{0,2})?", ErrorMessage = "必须填写小数值")]
- public decimal? Discount { get; set; }
- /// <summary>
- /// 折合价
- /// </summary>
- [DisplayName("折合价")]
- public decimal? DiscountPrice { get; set; }
- /// <summary>
- /// 码洋
- /// </summary>
- [DisplayName("码洋")]
- public decimal? Total { get; set; }
- /// <summary>
- /// 实洋
- /// </summary>
- [DisplayName("实洋")]
- public decimal? TotalDollar { get; set; }
- /// <summary>
- /// 入库数量
- /// </summary>
- [DisplayName("入库数量")]
- public int? StockInQty { get; set; }
- /// <summary>
- /// 出库数量
- /// </summary>
- [DisplayName("出库数量")]
- public int? StockOutQty { get; set; }
- /// <summary>
- /// 下半年出库数量
- /// </summary>
- [DisplayName("下半年出库数量")]
- public int? TopStockOutQty { get; set; }
- /// <summary>
- /// 下半年入库数量
- /// </summary>
- [DisplayName("下半年入库数量")]
- public int? TopStockInQty { get; set; }
- /// <summary>
- /// 原库存量
- /// </summary>
- [DisplayName("原库存量")]
- public int? InventoryCollectQty { get; set; }
- /// <summary>
- /// 原库存数量
- /// </summary>
- [DisplayName("原库存数量")]
- public int? InventoryCollectQtyStr
- {
- get
- {
- if (InventoryCollectQty < 0 || InventoryCollectQty == null)
- {
- return 0;
- }
- return InventoryCollectQty == null ? 0 : InventoryCollectQty;
- }
- }
- }
- }
|