Преглед на файлове

扩展团组下单前信息功能及数据模型

在 `Program.cs` 中初始化了 `Sys_FormTemp`、`Grp_OrderPreInfo` 和 `Grp_OrderPreItem` 类型,扩展了数据库表结构。
在 `GroupsController.cs` 中新增了 `GroupOrderPreInfoRepository` 字段及 API 方法,支持通过 ID 获取团组前期信息。
在 `PersonnelModuleController.cs` 中添加了库存调整选项,增强物资选择功能。
新增 DTO 类 `GroupOrderPreInfoDtos`,简化数据模型并定义相关字段。
在 `GroupOrderPreInfoRepository.cs` 中实现获取模板信息和团组下单前信息列表的方法,增强数据访问层功能。
LEIYI преди 3 месеца
родител
ревизия
6d6d826bca

+ 4 - 1
OASystem/EntitySync/Program.cs

@@ -150,5 +150,8 @@ db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
     //typeof(Grp_RestaurantInfo),
     //ypeof(Grp_EnterExitCostQuote), //团组 - 出入境费用报价表
     //ypeof(Grp_EnterExitCostQuoteItem), //团组 - 出入境费用报价表
-});
+    typeof(Sys_FormTemp), //表单模板
+    typeof(Grp_OrderPreInfo), //团组下单前信息
+    typeof(Grp_OrderPreItem), //团组下单前信息Item
+}); 
 Console.WriteLine("数据库结构同步完成!");

+ 22 - 1
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -108,6 +108,7 @@ namespace OASystem.API.Controllers
         private readonly EnterExitCostDraftRepository _enterExitCostDraftRep;
         private readonly RestaurantRepository _restaurantRep;
         private readonly EnterExitCostQuoteRepository _enterExitCostQuoteRep;
+        private readonly GroupOrderPreInfoRepository _grpOrderPreInfoRep;
 
         /// <summary>
         /// 构造函数
@@ -191,7 +192,8 @@ namespace OASystem.API.Controllers
             TableOperationRecordRepository tableorRep,
             EnterExitCostDraftRepository enterExitCostDraftRep,
             RestaurantRepository restaurantRep,
-            EnterExitCostQuoteRepository enterExitCostQuoteRep
+            EnterExitCostQuoteRepository enterExitCostQuoteRep,
+            GroupOrderPreInfoRepository grpOrderPreInfoRep
             )
         {
             _logger = logger;
@@ -249,6 +251,7 @@ namespace OASystem.API.Controllers
             _enterExitCostDraftRep = enterExitCostDraftRep;
             _restaurantRep = restaurantRep;
             _enterExitCostQuoteRep = enterExitCostQuoteRep;
+            _grpOrderPreInfoRep = grpOrderPreInfoRep;
 
         }
 
@@ -381,6 +384,24 @@ namespace OASystem.API.Controllers
             return Ok(JsonView(false, "添加失败!"));
         }
 
+        #endregion
+
+
+        #region 团组前期信息
+        /// <summary>
+        ///  团组前期信息Info
+        /// </summary>
+        /// <param name="id">Id</param>
+        /// <returns></returns>
+        [HttpGet("{id}")]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> GroupOrderPreInfo(int id)
+        {
+
+            return Ok(await _grpOrderPreInfoRep.InfoAsync(id));
+        }
+
+
         #endregion
 
         #region 团组基本信息

+ 1 - 0
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -1732,6 +1732,7 @@ namespace OASystem.API.Controllers
 
             countyDatas.Insert(0, new { id = 0, name = "其他物资(公司内部物资)"});
             countyDatas.Insert(0, new { id = -1, name = "拜访客户所使用的物资" });
+            countyDatas.Insert(0, new { id = -2, name = "库存调整" });
             var total = countyDatas.Count;
             countyDatas = countyDatas.WhereIF(!string.IsNullOrEmpty(dto.Search), x => x.name.Contains(dto.Search)).ToList();
             countyDatas = countyDatas

+ 17 - 0
OASystem/OASystem.Domain/Dtos/Groups/GroupOrderPreInfoDtos.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.Groups
+{
+    public class GroupOrderPreInfoDtos
+    {
+    }
+
+    public class GroupOrderPreInfoDto
+    {
+        public int MyProperty { get; set; }
+    }
+}

+ 6 - 299
OASystem/OASystem.Domain/Entities/Groups/Grp_OrderPreInfo.cs

@@ -12,6 +12,12 @@ namespace OASystem.Domain.Entities.Groups
     [SqlSugar.SugarTable("Grp_OrderPreInfo", "团组下单前信息")]
     public class Grp_OrderPreInfo:EntityBase
     {
+        /// <summary>
+        /// 名称
+        /// </summary>
+        [SugarColumn(ColumnName = "Name", ColumnDescription = "Name", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
+        public string Name { get; set; }
+
         /// <summary>
         /// 正式团组Id
         /// </summary>
@@ -24,304 +30,5 @@ namespace OASystem.Domain.Entities.Groups
         [SugarColumn(ColumnName = "Type", ColumnDescription = "团组下单类型", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "int")]
         public int Type { get; set; }
 
-        /// <summary>
-        /// 团组单位
-        /// </summary>
-        [SugarColumn(ColumnName = "Unit", ColumnDescription = "团组单位", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
-        public string Unit { get; set; }
-
-        /// <summary>
-        /// 团组单位备注
-        /// </summary>
-        [SugarColumn(ColumnName = "UnitRmk", ColumnDescription = "团组单位备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string UnitRmk { get; set; }
-
-        /// <summary>
-        /// 出访国家(地、区)
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitCountry", ColumnDescription = "出访国家(地、区)", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
-        public string VisitCountry { get; set; }
-
-        /// <summary>
-        /// 出访国家(地、区)备注
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitCountryRmk", ColumnDescription = "出访国家(地、区)备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string VisitCountryRmk { get; set; }
-
-        /// <summary>
-        /// 涉及城市
-        /// </summary>
-        [SugarColumn(ColumnName = "Urban", ColumnDescription = "涉及城市", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
-        public string Urban { get; set; }
-
-        /// <summary>
-        /// 涉及城市备注
-        /// </summary>
-        [SugarColumn(ColumnName = "UrbanRmk", ColumnDescription = "涉及城市备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string UrbanRmk { get; set; }
-
-        /// <summary>
-        /// 计划出访时间(天数)
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitDays", ColumnDescription = "计划出访时间(天数)", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "int")]
-        public int VisitDays { get; set; }
-
-        /// <summary>
-        /// 计划出访时间(天数)备注
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitDaysRmk", ColumnDescription = "计划出访时间(天数)备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string VisitDaysRmk { get; set; }
-
-        /// <summary>
-        /// 计划出访人数
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitPNum", ColumnDescription = "计划出访人数", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "int")]
-        public int VisitPNum { get; set; }
-
-        /// <summary>
-        /// 计划出访人数备注
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitPNumRmk", ColumnDescription = "计划出访人数备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string VisitPNumRmk { get; set; }
-
-        /// <summary>
-        /// 航班信息
-        /// </summary>
-        [SugarColumn(ColumnName = "AirInfo", ColumnDescription = "航班信息", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
-        public string AirInfo { get; set; }
-
-        /// <summary>
-        /// 航班信息备注
-        /// </summary>
-        [SugarColumn(ColumnName = "AirInfoRmk", ColumnDescription = "航班信息备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string AirInfoRmk { get; set; }
-        
-        /// <summary>
-        /// 行李尺寸
-        /// </summary>
-        [SugarColumn(ColumnName = "LugSize", ColumnDescription = "行李尺寸", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
-        public string LugSize { get; set; }
-
-        /// <summary>
-        /// 行李尺寸备注
-        /// </summary>
-        [SugarColumn(ColumnName = "LugSizeRmk", ColumnDescription = "行李尺寸备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string LugSizeRmk { get; set; }
-
-        /// <summary>
-        /// 酒店地址
-        /// </summary>
-        [SugarColumn(ColumnName = "HotelAddr", ColumnDescription = "酒店地址", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
-        public string HotelAddr { get; set; }
-
-        /// <summary>
-        /// 酒店地址备注
-        /// </summary>
-        [SugarColumn(ColumnName = "HotelAddrRmk", ColumnDescription = "酒店地址备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string HotelAddrRmk { get; set; }
-
-        /// <summary>
-        /// 车型有无要求
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCarTypeReq", ColumnDescription = "有无车型要求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsCarTypeReq { get; set; } = false;
-
-        /// <summary>
-        /// 车型有无要求备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCarTypeReqRmk", ColumnDescription = "有无车型要求备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsCarTypeReqRmk { get; set; }
-
-        /// <summary>
-        /// 有无司导性别要求
-        /// </summary>
-        [SugarColumn(ColumnName = "IsGuideSexReq", ColumnDescription = "有无司导性别要求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsGuideSexReq { get; set; } = false;
-
-        /// <summary>
-        /// 有无司导性别要求备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsGuideSexReqRmk", ColumnDescription = "有无司导性别要求备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsGuideSexReqRmk { get; set; }
-
-        /// <summary>
-        /// 其他增加信息
-        /// </summary>
-        [SugarColumn(ColumnName = "OtherInfoReq", ColumnDescription = "其他增加信息", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(120)")]
-        public string OtherInfoReq { get; set; }
-
-        /// <summary>
-        /// 其他增加信息备注
-        /// </summary>
-        [SugarColumn(ColumnName = "OtherInfoRmk", ColumnDescription = "其他增加信息备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string OtherInfoRmk { get; set; }
-
-        /// <summary>
-        /// 客户自有公务信息(地址、联系人)
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCustBiz", ColumnDescription = "客户自有公务信息(地址、联系人)", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsCustBiz { get; set; } = false;
-
-        /// <summary>
-        /// 客户自有公务信息(地址、联系人)备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCustBizRmk", ColumnDescription = "客户自有公务信息(地址、联系人)备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsCustBizRmk { get; set; }
-
-        /// <summary>
-        /// 是否已提供名单
-        /// </summary>
-        [SugarColumn(ColumnName = "IsListProvided", ColumnDescription = "是否已提供名单", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsListProvided { get; set; } = false;
-
-        /// <summary>
-        /// 是否已提供名单备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsListProvidedRmk", ColumnDescription = "是否已提供名单备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsListProvidedRmk { get; set; }
-
-        /// <summary>
-        /// 航班选座需求
-        /// </summary>
-        [SugarColumn(ColumnName = "IsNeedSeat", ColumnDescription = "航班选座需求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsNeedSeat { get; set; } = false;
-
-        /// <summary>
-        /// 航班选座需求备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsNeedSeatRmk", ColumnDescription = "航班选座需求备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsNeedSeatRmk { get; set; }
-
-        /// <summary>
-        /// 酒店特殊需求
-        /// </summary>
-        [SugarColumn(ColumnName = "IsSpecialReq", ColumnDescription = "酒店特殊需求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsSpecialReq { get; set; } = false;
-
-        /// <summary>
-        /// 酒店特殊需求备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsSpecialReqRmk", ColumnDescription = "酒店特殊需求 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsSpecialReqRmk { get; set; }
-
-        /// <summary>
-        /// 餐和超支需求(餐是否需要我们安排,超支怎么处理)
-        /// </summary>
-        [SugarColumn(ColumnName = "IsMealPlanOver", ColumnDescription = "餐和超支需求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsMealPlanOver { get; set; } = false;
-
-        /// <summary>
-        /// 餐和超支需求备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsMealPlanOverRmk", ColumnDescription = "餐和超支需求 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsMealPlanOverRmk { get; set; }
-
-        /// <summary>
-        /// 超时和超支(超时和超支,客人现付还是境外签单回来结算)
-        /// </summary>
-        [SugarColumn(ColumnName = "OverTimeOverBudgetBil", ColumnDescription = "超时和超支", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string OverTimeOverBudgetBil { get; set; }
-
-        /// <summary>
-        /// 超时和超支 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "OverTimeOverBudgetBilRmk", ColumnDescription = "超时和超支 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string OverTimeOverBudgetBilRmk { get; set; }
-
-        /// <summary>
-        /// 物资需求(物资(含wifi,备用金)要求及时间)要求及时间
-        /// </summary>
-        [SugarColumn(ColumnName = "MatReqTime", ColumnDescription = "物资需求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string MatReqTime { get; set; }
-
-        /// <summary>
-        /// 物资需求(物资(含wifi,备用金)要求及时间) 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "MatReqTimelRmk", ColumnDescription = "物资需求 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string MatReqTimelRmk { get; set; }
-
-        /// <summary>
-        /// 景点需求(景点有无特别想去的,是否要安排讲解)
-        /// </summary>
-        [SugarColumn(ColumnName = "IsSpotLectReq", ColumnDescription = "景点需求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsSpotLectReq { get; set; } = false;
-
-        /// <summary>
-        /// 景点需求(景点有无特别想去的,是否要安排讲解) 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsSpotLectReqRmk", ColumnDescription = "景点需求 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsSpotLectReqRmk { get; set; }
-
-        /// <summary>
-        /// 出访任务内容
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitTaskContent", ColumnDescription = "出访任务内容", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool VisitTaskContent { get; set; } = false;
-
-        /// <summary>
-        /// 出访任务内容 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "VisitTaskContentReqRmk", ColumnDescription = "出访任务内容 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string VisitTaskContentReqRmk { get; set; }
-
-        /// <summary>
-        /// 出访背景
-        /// </summary>
-        [SugarColumn(ColumnName = "IsVisitBack", ColumnDescription = "出访背景", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsVisitBack { get; set; }
-
-        /// <summary>
-        /// 出访背景 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsVisitBackRmk", ColumnDescription = "出访背景 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsVisitBackRmk { get; set; }
-
-        /// <summary>
-        /// 客户自有参考材料
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCustRefMat", ColumnDescription = "客户自有参考材料", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsCustRefMat { get; set; }
-
-        /// <summary>
-        /// 客户自有参考材料 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCustRefMatRmk", ColumnDescription = "客户自有参考材料 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsCustRefMatRmk { get; set; }
-
-        /// <summary>
-        /// 客户自有项目(公务)资源
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCustProjRes", ColumnDescription = "客户自有项目(公务)资源", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsCustProjRes { get; set; }
-
-        /// <summary>
-        /// 客户自有项目(公务)资源 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsCustProjResRmk", ColumnDescription = "客户自有项目(公务)资源 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsCustProjResRmk { get; set; }
-
-        /// <summary>
-        /// 其他特殊要求
-        /// </summary>
-        [SugarColumn(ColumnName = "IsOtherSpecialReq", ColumnDescription = "其他特殊要求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsOtherSpecialReq { get; set; }
-
-        /// <summary>
-        /// 其他特殊要求 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsOtherSpecialReqRmk", ColumnDescription = "其他特殊要求 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsOtherSpecialReqRmk { get; set; }
-
-        /// <summary>
-        /// 公务需求(客人有无自己安排的公务(如有的话需要提供地址,涉及到是否市外用车))
-        /// </summary>
-        [SugarColumn(ColumnName = "IsGuestOwnBiz", ColumnDescription = "公务需求", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "bit")]
-        public bool IsGuestOwnBiz { get; set; }
-
-        /// <summary>
-        /// 公务需求(客人有无自己安排的公务(如有的话需要提供地址,涉及到是否市外用车)) 备注
-        /// </summary>
-        [SugarColumn(ColumnName = "IsGuestOwnBizRmk", ColumnDescription = "公务需求 备注", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
-        public string IsGuestOwnBizRmk { get; set; }
     }
 }

+ 34 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_OrderPreItem.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Groups
+{
+    /// <summary>
+    /// 团组下单前信息Item
+    /// </summary>
+    [SugarTable("Grp_OrderPreItem", "团组下单前信息Item")]
+    public class Grp_OrderPreItem : EntityBase
+    {
+        /// <summary>
+        /// 团组下单前信息Id
+        /// </summary>
+        [SugarColumn(ColumnName = "ParentId", ColumnDescription = "团组下单前信息Id", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "int")]
+        public int ParentId { get; set; }
+
+        /// <summary>
+        /// Temp字段Id
+        /// </summary>
+        [SugarColumn(ColumnName = "FormTempId", ColumnDescription = "Temp字段Id", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "int")]
+        public int FormTempId { get; set; }
+
+        /// <summary>
+        /// 存储值
+        /// </summary>
+        [SugarColumn(ColumnName = "Value", ColumnDescription = "存储值", IsNullable = true, DefaultValue = "NULL", ColumnDataType = "varchar(300)")]
+        public string Value { get; set; }
+
+    }
+}

+ 52 - 0
OASystem/OASystem.Domain/Entities/System/Sys_FormTemp.cs

@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.System
+{
+    /// <summary>
+    /// 表单模板
+    /// </summary>
+    [SugarTable("Sys_FormTemp", "表单模板")]
+    public class Sys_FormTemp : EntityBase
+    {
+        /// <summary>
+        /// 模板Id(datasetType Id)
+        /// </summary>
+        [SugarColumn(ColumnName = "TempId", ColumnDescription = "模板Id", IsNullable = true, ColumnDataType = "int")]
+        public int TempId { get; set; }
+
+        /// <summary>
+        /// 字段NameId(datasetType Id)
+        /// </summary>
+        [SugarColumn(ColumnName = "FieldNameId", ColumnDescription = "字段Id(datasetType Id)", IsNullable = true, ColumnDataType = "int")]
+        public int FieldNameId { get; set; }
+
+        /// <summary>
+        /// 字段TypeId(datasetType Id)
+        /// </summary>
+        [SugarColumn(ColumnName = "FieldTypeId", ColumnDescription = "字段TypeId(datasetType Id)", IsNullable = true, ColumnDataType = "int")]
+        public int FieldTypeId { get; set; }
+
+        /// <summary>
+        /// 是否必填
+        /// </summary>
+        [SugarColumn(ColumnName = "IsRequired", ColumnDescription = "是否必填", IsNullable = true, ColumnDataType = "bit")]
+        public bool IsRequired { get; set; } = false;
+
+        /// <summary>
+        /// 是否备注
+        /// </summary>
+        [SugarColumn(ColumnName = "IsRemark", ColumnDescription = "是否备注", IsNullable = true, ColumnDataType = "bit")]
+        public bool IsRemark { get; set; } = false;
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        [SugarColumn(ColumnName = "Index", ColumnDescription = "排序", IsNullable = true, ColumnDataType = "int")]
+        public int Index { get; set; }
+
+    }
+}

+ 67 - 0
OASystem/OASystem.Domain/ViewModels/Groups/OrderPreInfoView.cs

@@ -0,0 +1,67 @@
+using OASystem.Domain.Entities.Groups;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.ViewModels.Groups
+{
+    public class OrderPreInfoView : Grp_OrderPreInfo
+    {
+    }
+
+    public class GrpOrderPreInfoView
+    {
+        public int Id { get; set; }
+
+        public int TempId { get; set; }
+
+        public int Name { get; set; }
+
+        public int GroupId { get; set; }
+
+        public GrpOrderPreItemView[] Items { get; set; }
+
+    }
+
+    public class GrpOrderPreItemView
+    {
+        public int Id { get; set; }
+        public int ParentId { get; set; }
+        public string FieldName { get; set; }
+        public string FieldTypeName { get; set; }
+        public string OriginVal { get; set; }
+        public object NewValue
+        {
+            get
+            {
+                if (FieldTypeName.Equals("文本") || FieldTypeName.Equals("下拉选择框"))
+                {
+                    if (!string.IsNullOrEmpty(OriginVal)) return OriginVal;
+                    return "";
+                }
+                else if (FieldTypeName.Equals("下拉选择框") || FieldTypeName.Equals("复选框") || FieldTypeName.Equals("数字"))
+                {
+                    if (!string.IsNullOrEmpty(OriginVal))
+                    {
+                        if (int.TryParse(OriginVal, out int val)) return val;
+                    }
+                    return 0;
+                }
+                else if (FieldTypeName.Equals("单选按钮"))
+                {
+                    if (!string.IsNullOrEmpty(OriginVal))
+                    {
+                        if (OriginVal.ToUpper().Equals("TRUE")) return true;
+                    }
+                    return false;
+                }
+                return null;
+            }
+        }
+        public bool IsRequired { get; set; }
+        public bool IsRemark { get; set; }
+        public int Index { get; set; }
+    }
+}

+ 71 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/GroupOrderPreInfoRepository.cs

@@ -0,0 +1,71 @@
+using AutoMapper;
+using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.ViewModels.Groups;
+using Org.BouncyCastle.Utilities;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Infrastructure.Repositories.Groups
+{
+    /// <summary>
+    /// 团组下单前信息
+    /// </summary>
+    public class GroupOrderPreInfoRepository : BaseRepository<Grp_OrderPreInfo, OrderPreInfoView>
+    {
+        private readonly IMapper _mapper;
+        public GroupOrderPreInfoRepository(SqlSugarClient sqlSugar, IMapper mapper) : base(sqlSugar)
+        {
+            _mapper = mapper;
+        }
+
+        /// <summary>
+        /// 获取模板信息
+        /// </summary>
+        /// <param name="tempId"></param>
+        /// <returns></returns>
+        public async Task<GrpOrderPreItemView[]> TempInfoById(int tempId = 1404)
+        {
+            var tempInfos = await _sqlSugar.Queryable<Sys_FormTemp, Sys_SetData, Sys_SetData>((ft, sd1, sd2) =>
+                new JoinQueryInfos(
+                    JoinType.Left, ft.FieldNameId == sd1.Id,
+                    JoinType.Left, ft.FieldTypeId == sd2.Id
+                    ))
+                .Where((ft, sd1, sd2) => ft.IsDel == 0 && ft.TempId == tempId)
+                .OrderBy((ft, sd1, sd2) => ft.Index)
+                .Select((ft, sd1, sd2) => new GrpOrderPreItemView()
+                {
+                    FieldName = sd1.Name,
+                    FieldTypeName = sd2.Name,
+                    IsRequired = ft.IsRequired,
+                    IsRemark = ft.IsRemark,
+                    Index = ft.Index
+                })
+                .ToArrayAsync();
+            return tempInfos;
+        }
+
+        /// <summary>
+        /// 获取团组下单前信息列表
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        public async Task<JsonView> InfoAsync(int id)
+        {
+            var jw = new JsonView() { Code = StatusCodes.Status200OK,Msg = "操作成功!" };
+            var view = new GrpOrderPreInfoView();
+            var info  = await _sqlSugar.Queryable<Grp_OrderPreInfo>().FirstAsync(x => x.IsDel == 0 && x.Id == id);
+
+            if (info == null)
+            {
+                view.TempId = 1404;
+                view.Items = await TempInfoById(view.TempId);
+            }
+
+            jw.Data = view;
+            return jw;
+        }
+    }
+}

+ 2 - 0
OASystem/OASystem.Infrastructure/Repositories/PersonnelModule/GoodsRepository.cs

@@ -29,6 +29,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
         private JsonView _jv;
         private string _url;
         private string _excelPath;
+        
         public GoodsRepository(SqlSugarClient sqlSugar, IMapper mapper) : base(sqlSugar)
         {
             _mapper = mapper;
@@ -77,6 +78,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
 
             groupData.Insert(0, new { id = 0, groupName = "其他物资(公司内部物资)" });
             groupData.Insert(0, new { id = -1, groupName = "拜访客户所使用的物资" });
+            groupData.Insert(0, new { id = -2, groupName = "库存调整" });
 
             var userData = await _sqlSugar.Queryable<Sys_Users>()
                 .Where(x => x.IsDel == 0)