From 81cfbb34ad9092b19a2e3692786ee97f3646014b Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期一, 16 十二月 2024 21:30:46 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs | 36 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ApprovalService/ApprovalTaskService.cs | 12 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Log.cs | 10 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs | 26 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/433da193-e6b4-48ed-bdc6-2332b099c9c2.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5e0bd2ed-63f0-464e-b65d-6e328058f9ca.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPCheckModel.cs | 131 ++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderController.cs | 11 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/WIDESEAWCS_SystemRepository.csproj | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs | 3 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs | 3 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPReceiveModel.cs | 136 +++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPInboundModel.cs | 121 ++++ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 66 +- 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/776b31ca-b3d0-487d-8a56-85a65dead3f1.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 99 +++ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs | 8 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderController.cs | 22 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/WIDESEAWCS_IBasicInfoService.csproj | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs | 19 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/WIDESEA_CheckService.csproj | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs | 25 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPBaseModel.cs | 19 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/WIDESEAWCS_TaskInfoRepository.csproj | 1 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IApprovalService/IApprovalTaskService.cs | 10 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/System/VueDictionaryDTO.cs | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 43 + 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_User.cs | 60 -- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderResultService.cs | 6 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln | 40 - 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderResultService.cs | 6 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs | 9 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs | 46 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/WIDESEA_InboundService.csproj | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs | 24 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs | 37 + 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/48209466-174f-415e-a834-4bc50f2d98fd.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs | 64 ++ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Menu.cs | 6 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderService.cs | 20 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 11 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs | 20 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs | 14 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs | 19 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 26 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/WIDESEA_External.csproj | 5 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs | 244 ++++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpHelper.cs | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs | 5 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs | 3 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Role.cs | 4 /dev/null | 15 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderService.cs | 12 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/ISys_MenuService.cs | 5 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2890c663-d711-4602-bdad-56852b6a51bc.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/WIDESEAWCS_ISystemRepository.csproj | 18 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9b53cffc-065b-40ee-a779-a99d0cdd29b8.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/ISys_MenuRepository.cs | 3 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs | 68 ++ 64 files changed, 1,335 insertions(+), 285 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/48209466-174f-415e-a834-4bc50f2d98fd.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/48209466-174f-415e-a834-4bc50f2d98fd.vsidx" new file mode 100644 index 0000000..4b7898f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/48209466-174f-415e-a834-4bc50f2d98fd.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/System/VueDictionaryDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/System/VueDictionaryDTO.cs" index 419e3bf..0f4649c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/System/VueDictionaryDTO.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/System/VueDictionaryDTO.cs" @@ -12,6 +12,8 @@ public string Config { get; set; } - public object Data { get; set; } + public object Data { get; set; } + + public bool SaveCache { get; set; } = true; } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" index cc0b784..02a3436 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" @@ -7,11 +7,11 @@ </PropertyGroup> <ItemGroup> - <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> + <Folder Include="BasicInfo\" /> </ItemGroup> <ItemGroup> - <Folder Include="BasicInfo\" /> + <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> </ItemGroup> </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/WIDESEAWCS_IBasicInfoService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/WIDESEAWCS_IBasicInfoService.csproj" index ebf0d65..132c02c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/WIDESEAWCS_IBasicInfoService.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/WIDESEAWCS_IBasicInfoService.csproj" @@ -6,8 +6,4 @@ <Nullable>enable</Nullable> </PropertyGroup> - <ItemGroup> - <ProjectReference Include="..\WIDESEAWCS_BasicInfoRepository\WIDESEAWCS_BasicInfoRepository.csproj" /> - </ItemGroup> - </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/ISys_MenuRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/ISys_MenuRepository.cs" index 0cfc0d1..81d998c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/ISys_MenuRepository.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/ISys_MenuRepository.cs" @@ -3,6 +3,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_DTO.System; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Model.Models; @@ -11,7 +12,7 @@ { public interface ISys_MenuRepository : IRepository<Sys_Menu> { - List<Sys_Menu> GetAllMenu(); + List<MenuDTO> GetAllMenu(); object GetSuperAdminMenu(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/WIDESEAWCS_ISystemRepository.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/WIDESEAWCS_ISystemRepository.csproj" index c2103f2..c159328 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/WIDESEAWCS_ISystemRepository.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemRepository/WIDESEAWCS_ISystemRepository.csproj" @@ -1,13 +1,13 @@ -锘�<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> - </PropertyGroup> + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> - <ItemGroup> - <ProjectReference Include="..\WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj" /> - </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj" /> + </ItemGroup> </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/ISys_MenuService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/ISys_MenuService.cs" index 1309279..61e04e9 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/ISys_MenuService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/ISys_MenuService.cs" @@ -3,6 +3,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_DTO.System; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseServices; using WIDESEAWCS_Model.Models; @@ -14,9 +15,9 @@ object GetCurrentMenuActionList(); object GetMenuActionList(int roleId); - List<Sys_Menu> GetUserMenuList(int roleId); + List<MenuDTO> GetUserMenuList(int roleId); - List<Sys_Actions> GetActions(int menuId, List<Sys_Actions> menuActions, List<Permissions> permissions, int roleId); + List<ActionDTO> GetActions(int menuId, List<ActionDTO> menuActions, List<Permissions> permissions, int roleId); object GetMenu(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Log.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Log.cs" index 24e534c..0a149cb 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Log.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Log.cs" @@ -8,7 +8,7 @@ namespace WIDESEAWCS_Model.Models { - [MultiTenant] + [SugarTable, MultiTenant] public class Sys_Log { /// <summary> @@ -44,13 +44,13 @@ /// <summary> /// 璇锋眰鍙傛暟 /// </summary> - [SugarColumn(IsNullable = true, Length = 2000, ColumnDescription = "璇锋眰鍙傛暟")] + [SugarColumn(IsNullable = true, Length = int.MaxValue, ColumnDescription = "璇锋眰鍙傛暟")] public string RequestParam { get; set; } /// <summary> /// 鍝嶅簲鍙傛暟 /// </summary> - [SugarColumn(IsNullable = true, Length = 2000, ColumnDescription = "鍝嶅簲鍙傛暟")] + [SugarColumn(IsNullable = true, Length = int.MaxValue, ColumnDescription = "鍝嶅簲鍙傛暟")] public string ResponseParam { get; set; } /// <summary> @@ -75,12 +75,12 @@ /// 鐢ㄦ埛鍚嶇О /// </summary> [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鐢ㄦ埛鍚嶇О")] - public string UserName { get; set; } + public string? UserName { get; set; } /// <summary> /// 鐢ㄦ埛涓婚敭 /// </summary> [SugarColumn(IsNullable = true, ColumnDescription = "鐢ㄦ埛涓婚敭")] - public int? User_Id { get; set; } + public int? UserId { get; set; } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Menu.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Menu.cs" index 1953d3e..2ace81f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Menu.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Menu.cs" @@ -77,11 +77,5 @@ /// </summary> [SugarColumn(IsNullable = true, ColumnDescription = "鑿滃崟绫诲瀷")] public int? MenuType { get; set; } - - [Navigate(NavigateType.OneToMany, nameof(ParentId), nameof(MenuId)), SugarColumn(IsIgnore = true, IsNullable = true)] - public List<Sys_Menu> Menus { get; set; } - - [SugarColumn(IsIgnore = true)] - public List<Sys_Actions> Actions { get; set; } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Role.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Role.cs" index 8527cba..ecbc6ca 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Role.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_Role.cs" @@ -48,7 +48,7 @@ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "瑙掕壊鍚嶇О")] public string RoleName { get; set; } - [Navigate(NavigateType.OneToMany, nameof(ParentId), nameof(RoleId)), SugarColumn(IsIgnore = true, IsNullable = true)] - public List<Sys_Role> Roles { get; set; } + //[Navigate(NavigateType.OneToMany, nameof(ParentId), nameof(RoleId)), SugarColumn(IsIgnore = true, IsNullable = true)] + //public List<Sys_Role> Roles { get; set; } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_User.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_User.cs" index fec93b2..fd67fdd 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_User.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/Sys_User.cs" @@ -41,12 +41,6 @@ public string RoleName { get; set; } /// <summary> - /// 鐢佃瘽 - /// </summary> - [SugarColumn(Length = 11, IsNullable = true, ColumnDescription = "鐢佃瘽")] - public string PhoneNo { get; set; } - - /// <summary> /// 澶囨敞 /// </summary> [SugarColumn(Length = 200, IsNullable = true, ColumnDescription = "澶囨敞")] @@ -65,34 +59,10 @@ public string UserTrueName { get; set; } /// <summary> - /// 閮ㄩ棬 - /// </summary> - [SugarColumn(Length = 100, IsNullable = true, ColumnDescription = "閮ㄩ棬")] - public string DeptName { get; set; } - - /// <summary> - /// 閮ㄩ棬ID - /// </summary> - [SugarColumn(IsNullable = true, ColumnDescription = "閮ㄩ棬ID")] - public int? Dept_Id { get; set; } - - /// <summary> - /// 閭 - /// </summary> - [SugarColumn(Length = 100, IsNullable = true, ColumnDescription = "閭")] - public string Email { get; set; } - - /// <summary> /// 鏄惁鍙敤 /// </summary> [SugarColumn(IsNullable = false, ColumnDescription = "鏄惁鍙敤")] public byte Enable { get; set; } - - /// <summary> - /// 鎬у埆 - /// </summary> - [SugarColumn(IsNullable = true, ColumnDescription = "鎬у埆")] - public int? Gender { get; set; } /// <summary> /// 澶村儚 @@ -105,36 +75,6 @@ /// </summary> [SugarColumn(IsNullable = true, IsOnlyIgnoreInsert = true, ColumnDescription = "鏈�鍚庡瘑鐮佷慨鏀规椂闂�")] public DateTime? LastModifyPwdDate { get; set; } - - /// <summary> - /// 鍦板潃 - /// </summary> - [SugarColumn(Length = 200, IsNullable = true, ColumnDescription = "鍦板潃")] - public string Address { get; set; } - - /// <summary> - /// 瀹℃牳鏃堕棿 - /// </summary> - [SugarColumn(IsNullable = true, ColumnDescription = "瀹℃牳鏃堕棿")] - public DateTime? AuditDate { get; set; } - - /// <summary> - /// 瀹℃牳鐘舵�� - /// </summary> - [SugarColumn(IsNullable = true, ColumnDescription = "瀹℃牳鐘舵��")] - public int? AuditStatus { get; set; } - - /// <summary> - /// 瀹℃牳浜� - /// </summary> - [SugarColumn(Length = 100, IsNullable = true, ColumnDescription = "瀹℃牳浜�")] - public string Auditor { get; set; } - - /// <summary> - /// 浠ょ墝 - /// </summary> - [SugarColumn(Length = 500, IsNullable = true, ColumnDescription = "浠ょ墝")] - public string Token { get; set; } /// <summary> /// 绉熸埛ID diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" index 889e3a0..b342e89 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" @@ -22,6 +22,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEAWCS_Core.Attributes; using WIDESEAWCS_Core.DB.Models; namespace WIDESEAWCS_Model.Models diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj" index 80a43fc..be46766 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj" @@ -8,7 +8,7 @@ <ItemGroup> <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> - <PackageReference Include="WIDESEAWCS_Core" Version="1.0.5" /> + <PackageReference Include="WIDESEAWCS_Core" Version="1.0.7" /> </ItemGroup> <ItemGroup> @@ -16,7 +16,7 @@ </ItemGroup> <ItemGroup> - <Folder Include="Models\BasicInfo\" /> + <Folder Include="Models\BasicInfo\" /> </ItemGroup> </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln" index 8fc84ed..7be6dcb 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln" @@ -7,8 +7,6 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_Tasks", "WIDESEAWCS_Tasks\WIDESEAWCS_Tasks.csproj", "{294E4915-0241-4C8C-BA99-7588B945863A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_Model", "WIDESEAWCS_Model\WIDESEAWCS_Model.csproj", "{7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_DTO", "WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj", "{C2D3D138-9109-481B-8BEB-A27597890B2C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_Common", "WIDESEAWCS_Common\WIDESEAWCS_Common.csproj", "{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}" @@ -24,8 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "System", "System", "{6295C9FB-DAC4-4C07-97C5-C0332ABDD13D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TaskInfo", "TaskInfo", "{D9CF90D0-AFB3-42AA-A2F1-BEE741E0AC0D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_ISystemRepository", "WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj", "{F302E6D6-5A95-4D22-8DC2-21BE2CB30275}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_SystemRepository", "WIDESEAWCS_SystemRepository\WIDESEAWCS_SystemRepository.csproj", "{5777BDEC-4726-4425-85F2-A090524F692D}" EndProject @@ -50,13 +46,13 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BasicInfo", "BasicInfo", "{9CB2F821-BB23-48E5-88E8-C326477733C0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IBasicInfoRepository", "WIDESEAWCS_IBasicInfoRepository\WIDESEAWCS_IBasicInfoRepository.csproj", "{266D07B7-3648-4F3D-818A-89EDA7D84C58}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_BasicInfoRepository", "WIDESEAWCS_BasicInfoRepository\WIDESEAWCS_BasicInfoRepository.csproj", "{206FDF79-9BF3-433A-B7FF-627287BBD760}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IBasicInfoService", "WIDESEAWCS_IBasicInfoService\WIDESEAWCS_IBasicInfoService.csproj", "{8C2CC25B-DE5D-433E-A550-63864C7A716D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_BasicInfoService", "WIDESEAWCS_BasicInfoService\WIDESEAWCS_BasicInfoService.csproj", "{FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_Model", "WIDESEAWCS_Model\WIDESEAWCS_Model.csproj", "{9D2AC22C-9A86-41AE-AA02-553554A7B1D7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_ISystemRepository", "WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj", "{B778DFFD-A5BA-4CAF-805E-2630CF080CDC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -72,10 +68,6 @@ {294E4915-0241-4C8C-BA99-7588B945863A}.Debug|Any CPU.Build.0 = Debug|Any CPU {294E4915-0241-4C8C-BA99-7588B945863A}.Release|Any CPU.ActiveCfg = Release|Any CPU {294E4915-0241-4C8C-BA99-7588B945863A}.Release|Any CPU.Build.0 = Release|Any CPU - {7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}.Release|Any CPU.Build.0 = Release|Any CPU {C2D3D138-9109-481B-8BEB-A27597890B2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C2D3D138-9109-481B-8BEB-A27597890B2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2D3D138-9109-481B-8BEB-A27597890B2C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -84,10 +76,6 @@ {9FBC654C-51DE-422D-9E1E-6A38268DE1E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {9FBC654C-51DE-422D-9E1E-6A38268DE1E2}.Release|Any CPU.ActiveCfg = Release|Any CPU {9FBC654C-51DE-422D-9E1E-6A38268DE1E2}.Release|Any CPU.Build.0 = Release|Any CPU - {F302E6D6-5A95-4D22-8DC2-21BE2CB30275}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F302E6D6-5A95-4D22-8DC2-21BE2CB30275}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F302E6D6-5A95-4D22-8DC2-21BE2CB30275}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F302E6D6-5A95-4D22-8DC2-21BE2CB30275}.Release|Any CPU.Build.0 = Release|Any CPU {5777BDEC-4726-4425-85F2-A090524F692D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5777BDEC-4726-4425-85F2-A090524F692D}.Debug|Any CPU.Build.0 = Debug|Any CPU {5777BDEC-4726-4425-85F2-A090524F692D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -116,14 +104,6 @@ {83F18A31-5983-4587-A0B2-414BF70E50B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {83F18A31-5983-4587-A0B2-414BF70E50B5}.Release|Any CPU.ActiveCfg = Release|Any CPU {83F18A31-5983-4587-A0B2-414BF70E50B5}.Release|Any CPU.Build.0 = Release|Any CPU - {266D07B7-3648-4F3D-818A-89EDA7D84C58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {266D07B7-3648-4F3D-818A-89EDA7D84C58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {266D07B7-3648-4F3D-818A-89EDA7D84C58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {266D07B7-3648-4F3D-818A-89EDA7D84C58}.Release|Any CPU.Build.0 = Release|Any CPU - {206FDF79-9BF3-433A-B7FF-627287BBD760}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {206FDF79-9BF3-433A-B7FF-627287BBD760}.Debug|Any CPU.Build.0 = Debug|Any CPU - {206FDF79-9BF3-433A-B7FF-627287BBD760}.Release|Any CPU.ActiveCfg = Release|Any CPU - {206FDF79-9BF3-433A-B7FF-627287BBD760}.Release|Any CPU.Build.0 = Release|Any CPU {8C2CC25B-DE5D-433E-A550-63864C7A716D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8C2CC25B-DE5D-433E-A550-63864C7A716D}.Debug|Any CPU.Build.0 = Debug|Any CPU {8C2CC25B-DE5D-433E-A550-63864C7A716D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -132,6 +112,14 @@ {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}.Debug|Any CPU.Build.0 = Debug|Any CPU {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}.Release|Any CPU.ActiveCfg = Release|Any CPU {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}.Release|Any CPU.Build.0 = Release|Any CPU + {9D2AC22C-9A86-41AE-AA02-553554A7B1D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D2AC22C-9A86-41AE-AA02-553554A7B1D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D2AC22C-9A86-41AE-AA02-553554A7B1D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D2AC22C-9A86-41AE-AA02-553554A7B1D7}.Release|Any CPU.Build.0 = Release|Any CPU + {B778DFFD-A5BA-4CAF-805E-2630CF080CDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B778DFFD-A5BA-4CAF-805E-2630CF080CDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B778DFFD-A5BA-4CAF-805E-2630CF080CDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B778DFFD-A5BA-4CAF-805E-2630CF080CDC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -141,7 +129,6 @@ {684035E2-174F-47CE-AA5C-36624C7E26F3} = {4FF30CF7-DA79-4EDD-9A6E-0B0BEAD72A1A} {6295C9FB-DAC4-4C07-97C5-C0332ABDD13D} = {A12315CA-9D81-412C-A09B-B23D95CFFE16} {D9CF90D0-AFB3-42AA-A2F1-BEE741E0AC0D} = {A12315CA-9D81-412C-A09B-B23D95CFFE16} - {F302E6D6-5A95-4D22-8DC2-21BE2CB30275} = {93EFF637-042E-4DD0-A74B-7F0CF998CF96} {5777BDEC-4726-4425-85F2-A090524F692D} = {93EFF637-042E-4DD0-A74B-7F0CF998CF96} {09D05F35-CEA2-48D9-86D0-FB95982BA511} = {684035E2-174F-47CE-AA5C-36624C7E26F3} {35054AA5-CF40-4F38-9414-C76742C29382} = {684035E2-174F-47CE-AA5C-36624C7E26F3} @@ -151,10 +138,9 @@ {83F18A31-5983-4587-A0B2-414BF70E50B5} = {D9CF90D0-AFB3-42AA-A2F1-BEE741E0AC0D} {5CC8AEFF-2F75-4053-9569-73419839875A} = {4FF30CF7-DA79-4EDD-9A6E-0B0BEAD72A1A} {9CB2F821-BB23-48E5-88E8-C326477733C0} = {A12315CA-9D81-412C-A09B-B23D95CFFE16} - {266D07B7-3648-4F3D-818A-89EDA7D84C58} = {5CC8AEFF-2F75-4053-9569-73419839875A} - {206FDF79-9BF3-433A-B7FF-627287BBD760} = {5CC8AEFF-2F75-4053-9569-73419839875A} {8C2CC25B-DE5D-433E-A550-63864C7A716D} = {9CB2F821-BB23-48E5-88E8-C326477733C0} {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D} = {9CB2F821-BB23-48E5-88E8-C326477733C0} + {B778DFFD-A5BA-4CAF-805E-2630CF080CDC} = {93EFF637-042E-4DD0-A74B-7F0CF998CF96} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C9A356D5-D4FE-414B-B982-6C97792BE6C6} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs" index 4ecf724..12b9dc6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_MenuRepository.cs" @@ -1,10 +1,13 @@ -锘縰sing SqlSugar; +锘縰sing AutoMapper; +using SqlSugar; using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_DTO.System; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Core.Helper; @@ -16,14 +19,16 @@ { public class Sys_MenuRepository : RepositoryBase<Sys_Menu>, ISys_MenuRepository { - public Sys_MenuRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + private readonly IMapper _mapper; + public Sys_MenuRepository(IUnitOfWorkManage unitOfWorkManage, IMapper mapper) : base(unitOfWorkManage) { + _mapper = mapper; } - public List<Sys_Menu> GetAllMenu() + public List<MenuDTO> GetAllMenu() { - List<Sys_Menu> _menus = base.QueryData(x => x.Enable == 1 || x.Enable == 2).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList(); - + List<Sys_Menu> menus = base.QueryData(x => x.Enable == 1 || x.Enable == 2).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList(); + List<MenuDTO> _menus = _mapper.Map<List<MenuDTO>>(menus); _menus.ForEach(x => { x.MenuType ??= 0; @@ -31,11 +36,11 @@ { try { - x.Actions = x.Auth.DeserializeObject<List<Sys_Actions>>(); + x.Actions = x.Auth.DeserializeObject<List<ActionDTO>>(); } catch { } } - x.Actions ??= new List<Sys_Actions>(); + x.Actions ??= new List<ActionDTO>(); }); string test = _menus.Serialize(); return _menus; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/WIDESEAWCS_SystemRepository.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/WIDESEAWCS_SystemRepository.csproj" index e29c7fd..5d8ab69 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/WIDESEAWCS_SystemRepository.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/WIDESEAWCS_SystemRepository.csproj" @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <ProjectReference Include="..\WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj" /> + <ProjectReference Include="..\WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj" /> </ItemGroup> </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs" index ebb2da4..8814ec7 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs" @@ -7,6 +7,7 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; +using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Core.BaseServices; using WIDESEAWCS_Core.Caches; @@ -39,7 +40,7 @@ List<string> cacheDicNos = new List<string>(); foreach (string n in dicNos) { - string str = _cacheService.Get(n); + string? str = _cacheService.Get(n); if (!string.IsNullOrEmpty(str)) { VueDictionaryDTO? vueDictionary = JsonConvert.DeserializeObject<VueDictionaryDTO>(str); @@ -75,14 +76,15 @@ { Config = v.Config, DicNo = v.DicNo, - Data = BaseDal.QueryDynamicDataBySql(v.DBSql) + Data = BaseDal.QueryDynamicDataBySql(v.DBSql), + SaveCache = false, }); } } foreach (var item in selectDics) { - if (!_cacheService.Exists(item.DicNo)) + if (!_cacheService.Exists(item.DicNo) && item.SaveCache) { _cacheService.Add(item.DicNo, item.Serialize()); } @@ -90,25 +92,7 @@ vueDictionaryDTOs.AddRange(selectDics); } - //object GetSourceData(string dicNo, string dbSql, object data) - //{ - // if (string.IsNullOrEmpty(dbSql)) - // { - // return data; - // } - // return BaseDal.QueryObjectDataBySql(dbSql, null); - //} - //List<VueDictionaryDTO> vueDictionaryDTOs = dicConfig.Select(item => new VueDictionaryDTO - //{ - // DicNo = item.dicNo, - // Config = item.config, - // Data = GetSourceData(item.dicNo, item.dbSql, item.list) - //}).ToList(); - - return vueDictionaryDTOs; } - - } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs" index d6446e1..7f7dba0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs" @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_DTO.System; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Core.BaseServices; @@ -61,7 +62,7 @@ } - public List<Sys_Menu> GetUserMenuList(int roleId) + public List<MenuDTO> GetUserMenuList(int roleId) { if (App.User.IsRoleIdSuperAdmin(roleId)) { @@ -71,7 +72,7 @@ return BaseDal.GetAllMenu().Where(x => menuIds.Contains(x.MenuId)).ToList(); } - public List<Sys_Actions> GetActions(int menuId, List<Sys_Actions> menuActions, List<Permissions> permissions, int roleId) + public List<ActionDTO> GetActions(int menuId, List<ActionDTO> menuActions, List<Permissions> permissions, int roleId) { if (App.User.IsRoleIdSuperAdmin(roleId)) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs" index 88811c2..72c4335 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs" @@ -107,7 +107,7 @@ //鑾峰彇鐢ㄦ埛鏉冮檺 List<Permissions> permissions = _MenuRepository.GetPermissions(roleId); //鏉冮檺鐢ㄦ埛鏉冮檺鏌ヨ鎵�鏈夌殑鑿滃崟淇℃伅 - List<Sys_Menu> menus = _MenuService.GetUserMenuList(roleId); + List<MenuDTO> menus = _MenuService.GetUserMenuList(roleId); //鑾峰彇褰撳墠鐢ㄦ埛鏉冮檺濡�:(Add,Search)瀵瑰簲鐨勬樉绀烘枃鏈俊鎭:Add锛氭坊鍔狅紝Search:鏌ヨ var data = menus.Select(x => new { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" index 2c740c4..568c8ca 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" @@ -124,11 +124,11 @@ { s.UserName, s.UserTrueName, - s.Address, - s.PhoneNo, - s.Email, + //s.Address, + //s.PhoneNo, + //s.Email, s.Remark, - s.Gender, + //s.Gender, s.RoleName, s.HeadImageUrl, s.CreateDate diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/WIDESEAWCS_TaskInfoRepository.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/WIDESEAWCS_TaskInfoRepository.csproj" index 386fda8..d7cecfd 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/WIDESEAWCS_TaskInfoRepository.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/WIDESEAWCS_TaskInfoRepository.csproj" @@ -8,7 +8,6 @@ <ItemGroup> <ProjectReference Include="..\WIDESEAWCS_ITaskInfoRepository\WIDESEAWCS_ITaskInfoRepository.csproj" /> - <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> </ItemGroup> </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index 231fa5d..00161ac 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -468,20 +468,20 @@ BaseDal.UpdateData(task); _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"鍫嗗灈鏈哄叆搴撳畬鎴�"); - WMSTaskDTO taskDTO = new WMSTaskDTO() - { - TaskNum = Convert.ToInt32(DateTime.Now.ToString("HHmmss")), - Grade = 1, - PalletCode = task.PalletCode + "S", - RoadWay = "SC01", - SourceAddress = task.TargetAddress, - TargetAddress = "CLOutAreaA", - TaskState = (int)TaskOutStatusEnum.OutNew, - Id = 0, - TaskType = (int)TaskOutboundTypeEnum.Outbound - }; + //WMSTaskDTO taskDTO = new WMSTaskDTO() + //{ + // TaskNum = Convert.ToInt32(DateTime.Now.ToString("HHmmss")), + // Grade = 1, + // PalletCode = task.PalletCode + "S", + // RoadWay = "SC01", + // SourceAddress = task.TargetAddress, + // TargetAddress = "CLOutAreaA", + // TaskState = (int)TaskOutStatusEnum.OutNew, + // Id = 0, + // TaskType = (int)TaskOutboundTypeEnum.Outbound + //}; - content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); + //content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); } else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" index 1716df9..dced94b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" @@ -133,7 +133,7 @@ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { - if (OutTaskStationIsOccupied(task) != null) + if (OutTaskStationIsOccupied(task) != null || true) { return task; } @@ -203,41 +203,45 @@ stackerCraneTaskCommand.TrayType = 1; if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔� { - List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway); - if (routers.Count > 0) - { - stackerCraneTaskCommand.StartRow = Convert.ToInt16(routers.FirstOrDefault().SrmRow); - stackerCraneTaskCommand.StartColumn = Convert.ToInt16(routers.FirstOrDefault().SrmColumn); - stackerCraneTaskCommand.StartLayer = Convert.ToInt16(routers.FirstOrDefault().SrmLayer); + //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway); + //if (routers.Count > 0) + //{ + string[] startCodes = task.CurrentAddress.Split("-"); - string[] targetCodes = task.NextAddress.Split("-"); - if (targetCodes.Length == 3) - { - stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]); - stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]); - stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]); - } - else - { - //鏁版嵁閰嶇疆閿欒 - _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍏ュ簱浠诲姟缁堢偣閿欒锛岃捣鐐癸細銆恵task.NextAddress}銆�"); - return null; - } + stackerCraneTaskCommand.StartRow = Convert.ToInt16(startCodes[0]); + stackerCraneTaskCommand.StartColumn = Convert.ToInt16(startCodes[1]); + stackerCraneTaskCommand.StartLayer = Convert.ToInt16(startCodes[2]); + + string[] targetCodes = task.NextAddress.Split("-"); + if (targetCodes.Length == 3) + { + stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]); + stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]); + stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]); } else { - _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鍙栬揣绔欏彴淇℃伅"); + //鏁版嵁閰嶇疆閿欒 + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍏ュ簱浠诲姟缁堢偣閿欒锛岃捣鐐癸細銆恵task.NextAddress}銆�"); return null; } + //} + //else + //{ + // _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鍙栬揣绔欏彴淇℃伅"); + // return null; + //} } else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { - List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress); - if (routers.Count > 0) + //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress); + //if (routers.Count > 0) { - stackerCraneTaskCommand.EndRow = Convert.ToInt16(routers.FirstOrDefault().SrmRow); - stackerCraneTaskCommand.EndColumn = Convert.ToInt16(routers.FirstOrDefault().SrmColumn); - stackerCraneTaskCommand.EndLayer = Convert.ToInt16(routers.FirstOrDefault().SrmLayer); + string[] targetCodes = task.NextAddress.Split("-"); + + stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]); + stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]); + stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]); string[] sourceCodes = task.CurrentAddress.Split("-"); if (sourceCodes.Length == 3) @@ -253,11 +257,11 @@ return null; } } - else - { - _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鏀捐揣绔欏彴淇℃伅"); - return null; - } + //else + //{ + // _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鏀捐揣绔欏彴淇℃伅"); + // return null; + //} } else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2890c663-d711-4602-bdad-56852b6a51bc.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2890c663-d711-4602-bdad-56852b6a51bc.vsidx" new file mode 100644 index 0000000..d78ab29 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2890c663-d711-4602-bdad-56852b6a51bc.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/433da193-e6b4-48ed-bdc6-2332b099c9c2.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/433da193-e6b4-48ed-bdc6-2332b099c9c2.vsidx" new file mode 100644 index 0000000..d76b5c6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/433da193-e6b4-48ed-bdc6-2332b099c9c2.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5b6089c5-1619-43fe-9608-d5b598449936.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5b6089c5-1619-43fe-9608-d5b598449936.vsidx" deleted file mode 100644 index 14e5046..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5b6089c5-1619-43fe-9608-d5b598449936.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5e0bd2ed-63f0-464e-b65d-6e328058f9ca.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5e0bd2ed-63f0-464e-b65d-6e328058f9ca.vsidx" new file mode 100644 index 0000000..a2ea337 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5e0bd2ed-63f0-464e-b65d-6e328058f9ca.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/719780bf-fe87-4572-8100-bc81ec4f7f74.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/719780bf-fe87-4572-8100-bc81ec4f7f74.vsidx" deleted file mode 100644 index e04325d..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/719780bf-fe87-4572-8100-bc81ec4f7f74.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/776b31ca-b3d0-487d-8a56-85a65dead3f1.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/776b31ca-b3d0-487d-8a56-85a65dead3f1.vsidx" new file mode 100644 index 0000000..b538cb6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/776b31ca-b3d0-487d-8a56-85a65dead3f1.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7c6138bc-3140-4505-80bf-ce7e49063d2e.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7c6138bc-3140-4505-80bf-ce7e49063d2e.vsidx" deleted file mode 100644 index 8ded039..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7c6138bc-3140-4505-80bf-ce7e49063d2e.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7f936e8e-287c-47e4-a8cd-003d0971fc1d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7f936e8e-287c-47e4-a8cd-003d0971fc1d.vsidx" deleted file mode 100644 index 39f2368..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7f936e8e-287c-47e4-a8cd-003d0971fc1d.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8ec046b0-40f2-4e27-acac-8986b42cfae0.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8ec046b0-40f2-4e27-acac-8986b42cfae0.vsidx" deleted file mode 100644 index 24690f4..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8ec046b0-40f2-4e27-acac-8986b42cfae0.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/90452a76-738e-47ca-a3e0-da8f36d31ada.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/90452a76-738e-47ca-a3e0-da8f36d31ada.vsidx" deleted file mode 100644 index fa6e839..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/90452a76-738e-47ca-a3e0-da8f36d31ada.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/993667d3-2068-4ea5-8fda-e1b10b53b187.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/993667d3-2068-4ea5-8fda-e1b10b53b187.vsidx" deleted file mode 100644 index 939dcd0..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/993667d3-2068-4ea5-8fda-e1b10b53b187.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9b53cffc-065b-40ee-a779-a99d0cdd29b8.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9b53cffc-065b-40ee-a779-a99d0cdd29b8.vsidx" new file mode 100644 index 0000000..08bc741 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9b53cffc-065b-40ee-a779-a99d0cdd29b8.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9ec6694e-5882-4f4c-83dc-d548cd406f48.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9ec6694e-5882-4f4c-83dc-d548cd406f48.vsidx" deleted file mode 100644 index 60f4cd5..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9ec6694e-5882-4f4c-83dc-d548cd406f48.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b6698150-4fc6-4ad0-a0c8-f0d9b263a855.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b6698150-4fc6-4ad0-a0c8-f0d9b263a855.vsidx" deleted file mode 100644 index 882b66c..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b6698150-4fc6-4ad0-a0c8-f0d9b263a855.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c1efb1e4-a109-49ce-9975-1c6c4061c161.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c1efb1e4-a109-49ce-9975-1c6c4061c161.vsidx" deleted file mode 100644 index 0245253..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c1efb1e4-a109-49ce-9975-1c6c4061c161.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ApprovalService/ApprovalTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ApprovalService/ApprovalTaskService.cs" index 86b016e..797cf26 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ApprovalService/ApprovalTaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ApprovalService/ApprovalTaskService.cs" @@ -40,8 +40,11 @@ _userRepository = userRepository; } - - + /// <summary> + /// 瀹℃壒鍚屾剰 + /// </summary> + /// <param name="sourceKey">婧愪富閿�</param> + /// <returns></returns> public WebResponseContent AuditAgree(int sourceKey) { try @@ -149,6 +152,11 @@ } } + /// <summary> + /// 瀹℃壒椹冲洖 + /// </summary> + /// <param name="sourceKey">婧愪富閿�</param> + /// <returns></returns> public WebResponseContent AuditReject(int sourceKey) { try diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" index 1505e43..b48d9f6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" @@ -31,27 +31,11 @@ _unitOfWorkManage = unitOfWorkManage; } - public override PageGridData<Dt_LocationInfo> GetPageData(PageDataOptions options) - { - return base.GetPageData(options); - } - - public override WebResponseContent AddData(SaveModel saveModel) - { - Dt_LocationInfo locationInfo = saveModel.MainData.DicToModel<Dt_LocationInfo>(); - return base.AddData(locationInfo); - } - - public override WebResponseContent UpdateData(SaveModel saveModel) - { - return base.UpdateData(saveModel); - } - - public override WebResponseContent DeleteData(object[] keys) - { - return base.DeleteData(keys); - } - + /// <summary> + /// 鎵归噺鍚敤璐т綅 + /// </summary> + /// <param name="keys">璐т綅涓婚敭鏁扮粍</param> + /// <returns></returns> public WebResponseContent LocationEnableStatus(int[] keys) { List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); @@ -64,6 +48,11 @@ return WebResponseContent.Instance.OK(); } + /// <summary> + /// 鎵归噺绂佺敤璐т綅 + /// </summary> + /// <param name="keys">璐т綅涓婚敭鏁扮粍</param> + /// <returns></returns> public WebResponseContent LocationDisableStatus(int[] keys) { List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); @@ -76,16 +65,31 @@ return WebResponseContent.Instance.OK(); } + /// <summary> + /// 鍗曚釜鍚敤璐т綅 + /// </summary> + /// <param name="key">璐т綅涓婚敭</param> + /// <returns></returns> public WebResponseContent LocationEnableStatus(int key) { return LocationEnableStatus(new int[] { key }); } + /// <summary> + /// 鍗曚釜绂佺敤璐т綅 + /// </summary> + /// <param name="key">璐т綅涓婚敭</param> + /// <returns></returns> public WebResponseContent LocationDisableStatus(int key) { return LocationDisableStatus(new int[] { key }); } + /// <summary> + /// 鍒濆鍖栬揣浣� + /// </summary> + /// <param name="initializationLocationDTO"></param> + /// <returns></returns> public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO) { try diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs" index 170abbe..f8b4441 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs" @@ -19,19 +19,5 @@ public IMaterielInfoRepository Repository => BaseDal; - public override WebResponseContent AddData(SaveModel saveModel) - { - return base.AddData(saveModel); - } - - public override WebResponseContent UpdateData(SaveModel saveModel) - { - return base.UpdateData(saveModel); - } - - public override WebResponseContent DeleteData(object[] keys) - { - return base.DeleteData(keys); - } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs" index 2384e6a..f241f34 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs" @@ -22,22 +22,11 @@ public IWarehouseRepository Repository => BaseDal; - public override WebResponseContent AddData(SaveModel saveModel) - { - Dt_Warehouse warehouse = saveModel.MainData.DicToModel<Dt_Warehouse>(); - return base.AddData(warehouse); - } - - public override WebResponseContent UpdateData(SaveModel saveModel) - { - return base.UpdateData(saveModel); - } - - public override WebResponseContent DeleteData(object[] keys) - { - return base.DeleteData(keys); - } - + /// <summary> + /// 鎵归噺鍚敤浠撳簱 + /// </summary> + /// <param name="keys">浠撳簱涓婚敭鏁扮粍</param> + /// <returns></returns> public WebResponseContent WarehouseEnableStatus(int[] keys) { List<Dt_Warehouse> warehouses = Repository.QueryData(x => keys.Contains(x.WarehouseId)); @@ -50,6 +39,11 @@ return WebResponseContent.Instance.OK(); } + /// <summary> + /// 鎵归噺绂佺敤浠撳簱 + /// </summary> + /// <param name="keys">浠撳簱涓婚敭鏁扮粍</param> + /// <returns></returns> public WebResponseContent WarehouseDisableStatus(int[] keys) { List<Dt_Warehouse> warehouses = Repository.QueryData(x => keys.Contains(x.WarehouseId)); @@ -62,11 +56,21 @@ return WebResponseContent.Instance.OK(); } + /// <summary> + /// 鍗曚釜鍚敤浠撳簱 + /// </summary> + /// <param name="key">浠撳簱涓婚敭</param> + /// <returns></returns> public WebResponseContent WarehouseEnableStatus(int key) { return WarehouseEnableStatus(new int[] { key }); } + /// <summary> + /// 鍗曚釜绂佺敤浠撳簱 + /// </summary> + /// <param name="key">浠撳簱涓婚敭</param> + /// <returns></returns> public WebResponseContent WarehouseDisableStatus(int key) { return WarehouseDisableStatus(new int[] { key }); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" index 74092ce..0720420 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" @@ -14,6 +14,9 @@ { public class BasicService : IBasicService { + /// <summary> + /// + /// </summary> public ILocationInfoService LocationInfoService { get; } public IMaterielInfoService MaterielInfoService { get; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" index d7f434a..da611cd 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" @@ -27,6 +27,13 @@ private readonly static object _locker = new object(); static List<LocationCache> locationCaches = new List<LocationCache>(); + + /// <summary> + /// 璐т綅鍒嗛厤閫昏緫 + /// </summary> + /// <param name="roadwayNo">宸烽亾鍙�</param> + /// <param name="palletType">鎵樼洏绫诲瀷</param> + /// <returns></returns> public Dt_LocationInfo? AssignLocation(string roadwayNo, PalletTypeEnum palletType) { lock (_locker) @@ -141,6 +148,12 @@ return null; } + /// <summary> + /// 淇敼璐т綅鐘舵�佸強绫诲瀷 + /// </summary> + /// <param name="locationCode">璐т綅缂栧彿</param> + /// <param name="palletType">鎵樼洏绫诲瀷</param> + /// <param name="locationStatus">璐т綅鐘舵��</param> public void UpdateLocationStatus(string locationCode, PalletTypeEnum palletType, LocationStatusEnum locationStatus) { Dt_LocationInfo location = Repository.QueryFirst(x => x.LocationCode == locationCode); @@ -181,6 +194,12 @@ Repository.UpdateData(locations); } + /// <summary> + /// 淇敼璐т綅鐘舵�佸強绫诲瀷 + /// </summary> + /// <param name="location">璐т綅瀵硅薄</param> + /// <param name="palletType">鎵樼洏绫诲瀷</param> + /// <param name="locationStatus">璐т綅鐘舵��</param> public void UpdateLocationStatus(Dt_LocationInfo location, PalletTypeEnum palletType, LocationStatusEnum locationStatus) { List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => x.RoadwayNo == location.RoadwayNo); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" index c449ae2..e419149 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" @@ -17,16 +17,31 @@ { public partial class MaterielInfoService : ServiceBase<Dt_MaterielInfo, IMaterielInfoRepository>, IMaterielInfoService { + /// <summary> + /// 鍒ゆ柇鐗╂枡鏄惁瀛樺湪 + /// </summary> + /// <param name="materielCode">鐗╂枡缂栧彿</param> + /// <returns></returns> public bool ExsitMateriel(string materielCode) { return BaseDal.QueryFirst(x => x.MaterielCode == materielCode) != null; } + /// <summary> + /// 鍒ゆ柇鐗╂枡鏄惁瀛樺湪 + /// </summary> + /// <param name="materielCodes">鐗╂枡缂栧彿闆嗗悎</param> + /// <returns></returns> public bool ExsitMateriels(List<string> materielCodes) { - return BaseDal.QueryFirst(x => materielCodes.Contains(x.MaterielCode)) != null; + return BaseDal.QueryData(x => materielCodes.Contains(x.MaterielCode)).Count == materielCodes.Count; } + /// <summary> + /// 鑾峰彇鐗╂枡淇℃伅 + /// </summary> + /// <param name="materielCode">鐗╂枡缂栧彿</param> + /// <returns></returns> public Dt_MaterielInfo GetMaterielInfo(string materielCode) { return BaseDal.QueryFirst(x => x.MaterielCode == materielCode); @@ -35,13 +50,18 @@ /// <summary> /// 鏌ヨ鐗╂枡淇℃伅 /// </summary> - /// <param name="materielCodes"></param> + /// <param name="materielCodes">鐗╂枡缂栧彿</param> /// <returns></returns> public List<Dt_MaterielInfo> GetMaterielInfos(List<string> materielCodes) { return BaseDal.QueryData(x => materielCodes.Contains(x.MaterielCode)); } + /// <summary> + /// 鎺ユ敹ERP鐗╂枡淇℃伅 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> public WebResponseContent ReceiveMaterial(MaterielInfoDTO model) { try diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderResultService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderResultService.cs" index 79dda98..0c8493b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderResultService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderResultService.cs" @@ -23,6 +23,12 @@ _checkOrderRepository = checkOrderRepository; } + /// <summary> + /// 鎻愪氦璐ㄦ缁撴灉 + /// </summary> + /// <param name="checkOrderId">璐ㄦ鍗曚富閿�</param> + /// <param name="checkResult">璐ㄦ缁撴灉瀵硅薄</param> + /// <returns></returns> public WebResponseContent CommitCheckResult(int checkOrderId, Dt_CheckOrderResult checkResult) { try diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs" index 6e4dce7..568e071 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs" @@ -10,6 +10,8 @@ using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; using WIDESEA_Core.Helper; +using WIDESEA_External.ERPService; +using WIDESEA_External.Model; using WIDESEA_IApprovalRepository; using WIDESEA_ICheckRepository; using WIDESEA_ICheckService; @@ -26,8 +28,9 @@ private readonly IApprovalTaskRepository _approvalTaskRepository; private readonly ISys_UserRepository _userRepository; private readonly WebSocketServer _webSocketServer; + private readonly IInvokeERPService _invokeERPService; - public CheckOrderService(ICheckOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IApprovalFlowRepository approvalFlowRepository, IApprovalNodeRepository approvalNodeRepository, IApprovalTaskRepository approvalTaskRepository, ISys_UserRepository userRepository, WebSocketServer webSocketServer) : base(BaseDal) + public CheckOrderService(ICheckOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IApprovalFlowRepository approvalFlowRepository, IApprovalNodeRepository approvalNodeRepository, IApprovalTaskRepository approvalTaskRepository, ISys_UserRepository userRepository, WebSocketServer webSocketServer, IInvokeERPService invokeERPService) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManage; _approvalFlowRepository = approvalFlowRepository; @@ -35,6 +38,7 @@ _approvalTaskRepository = approvalTaskRepository; _userRepository = userRepository; _webSocketServer = webSocketServer; + _invokeERPService = invokeERPService; } public WebResponseContent CommitAudit(int checkOrderId) @@ -46,7 +50,7 @@ { return WebResponseContent.Instance.Error($"鏈壘鍒拌璐ㄦ鍗�"); } - if(checkOrder.CheckOrderStatus != CheckOrderStatusEnum.Checked.ObjToInt()) + if (checkOrder.CheckOrderStatus != CheckOrderStatusEnum.Checked.ObjToInt()) { return WebResponseContent.Instance.Error($"璇ヨ川妫�鍗曡繕鏈楠屽畬鎴�"); } @@ -121,5 +125,65 @@ return WebResponseContent.Instance.Error(ex.Message); } } + + public WebResponseContent FeedbackCheckResult(int id) + { + try + { + Dt_CheckOrder checkOrder = Db.Queryable<Dt_CheckOrder>().Where(x => x.CheckOrderId == id).Includes(x => x.Details).First(); + if (checkOrder == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌川妫�鍗曟嵁"); + } + if(checkOrder.AuditStatus != AuditStatusEnum.Agree.ObjToInt()) + { + return WebResponseContent.Instance.Error($"瀹℃壒鏈�氳繃"); + } + + List<ERPCheckResult> checkResults = new List<ERPCheckResult>(); + foreach (var item in checkOrder.Details) + { + ERPCheckResult checkResult = new ERPCheckResult() + { + DefectCode = item.DefectCode, + Note = item.Note, + Quantity = item.Quantity.ToString(), + Result = item.Result + }; + checkResults.Add(checkResult); + } + + ERPCheckModel model = new ERPCheckModel() + { + Code = checkOrder.CheckOrderNo, + CompanyId = "", + Result = checkOrder.Result, + CreatorCode = checkOrder.Creater, + DefectedNote = checkOrder.DefectedNote, + MaterialsCode = checkOrder.MaterielCode, + PlantsId = "", + QtyDefected = checkOrder.DefectedQuantity.GetValueOrDefault().ToString(), + QtyInspected = checkOrder.ReceivedQuantity.ToString(), + QtyQualified = checkOrder.QualifiedQuantity.GetValueOrDefault().ToString(), + QtyReturn = checkOrder.ReturnQuantity.GetValueOrDefault().ToString(), + QtyScrapped = checkOrder.ScrappedQuantity.GetValueOrDefault().ToString(), + ReceiptCode = checkOrder.ReceiveOrderNo, + ReceiveDate = "", + SerNo = checkOrder.ReceiveDetailRowNo.ToString(), + TestDate = "", + UniqueTag = checkOrder.CheckOrderId.ToString(), + Way = 1, + Details = checkResults + }; + + string response = _invokeERPService.InvokeCheckOrderApi(model); + + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/WIDESEA_CheckService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/WIDESEA_CheckService.csproj" index 96a5228..4b7900e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/WIDESEA_CheckService.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/WIDESEA_CheckService.csproj" @@ -7,6 +7,7 @@ </PropertyGroup> <ItemGroup> + <ProjectReference Include="..\WIDESEA_External\WIDESEA_External.csproj" /> <ProjectReference Include="..\WIDESEA_IApprovalRepository\WIDESEA_IApprovalRepository.csproj" /> <ProjectReference Include="..\WIDESEA_ICheckService\WIDESEA_ICheckService.csproj" /> <ProjectReference Include="..\WIDESEA_ISystemRepository\WIDESEA_ISystemRepository.csproj" /> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpHelper.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpHelper.cs" index 6c713cf..f49dc71 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpHelper.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpHelper.cs" @@ -102,6 +102,10 @@ { Console.WriteLine(e.Message); } + finally + { + + } return null; } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/ERPInvokeService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/ERPInvokeService.cs" deleted file mode 100644 index 48a6530..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/ERPInvokeService.cs" +++ /dev/null @@ -1,24 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using WIDESEA_Core; -using WIDESEA_Core.Attributes; -using WIDESEA_DTO; -using WIDESEA_IInboundService; - -namespace WIDESEA_External.ERPService -{ - /// <summary> - /// 缁橢RP璋冪敤鐨勬帴鍙� - /// </summary> - public class ERPInvokeService : IERPInvokeService - { - private readonly IInboundOrderService _inboundOrderService; - public ERPInvokeService(IInboundOrderService inboundOrderService) - { - _inboundOrderService = inboundOrderService; - } - } -} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" index f88f409..fef6edc 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" @@ -3,6 +3,8 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_Core.Helper; +using WIDESEA_External.Model; namespace WIDESEA_External.ERPService { @@ -11,5 +13,67 @@ /// </summary> public class InvokeERPService : IInvokeERPService { + string serviceIp = ""; + + /// <summary> + /// ERP鏀惰揣鍗曟帴鍙h皟鐢� + /// </summary> + /// <param name="receiveModel"></param> + /// <returns></returns> + public string InvokeMatReceiveApi(ERPReceiveModel receiveModel) + { + string serviceAddress = ""; + + ERPBaseModel<ERPReceiveModel> model = new ERPBaseModel<ERPReceiveModel>() + { + Data = receiveModel, + Desc = "鏀惰揣鍗�", + Type = "toTCWMSReceive", + SecurityCode = "" + }; + + string response = HttpHelper.Post(serviceIp + serviceAddress, model.Serialize()); + return response; + } + + /// <summary> + /// ERP鐗╂枡IQC妫�楠屽崟鎺ュ彛璋冪敤 + /// </summary> + /// <param name="checkModel"></param> + /// <returns></returns> + public string InvokeCheckOrderApi(ERPCheckModel checkModel) + { + string serviceAddress = ""; + ERPBaseModel<ERPCheckModel> model = new ERPBaseModel<ERPCheckModel>() + { + Data = checkModel, + Desc = "鏀惰揣鍗�", + Type = "toTCWMSIQCTest", + SecurityCode = "" + }; + + string response = HttpHelper.Post(serviceIp + serviceAddress, model.Serialize()); + return response; + } + + /// <summary> + /// ERP鐗╂枡鍏ュ簱鍗曟帴鍙h皟鐢� + /// </summary> + /// <param name="inboundModel"></param> + /// <returns></returns> + public string InvokeInboundOrderApi(ERPInboundModel inboundModel) + { + string serviceAddress = ""; + ERPBaseModel<ERPInboundModel> model = new ERPBaseModel<ERPInboundModel>() + { + Data = inboundModel, + Desc = "鏀惰揣鍗�", + Type = "toTCWMSMaterialWarehousing", + SecurityCode = "" + }; + + string response = HttpHelper.Post(serviceIp + serviceAddress, model.Serialize()); + return response; + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IERPInvokeService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IERPInvokeService.cs" deleted file mode 100644 index 5a34e9c..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IERPInvokeService.cs" +++ /dev/null @@ -1,17 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using WIDESEA_Core; -using WIDESEA_DTO; - -namespace WIDESEA_External.ERPService -{ - /// <summary> - /// 缁橢RP璋冪敤鐨勬帴鍙� - /// </summary> - public interface IERPInvokeService : IDependency - { - } -} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" new file mode 100644 index 0000000..9e80c13 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" @@ -0,0 +1,37 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core; +using WIDESEA_External.Model; + +namespace WIDESEA_External.ERPService +{ + /// <summary> + /// 璋冪敤ERP鎺ュ彛 + /// </summary> + public interface IInvokeERPService : IDependency + { + /// <summary> + /// ERP鏀惰揣鍗曟帴鍙h皟鐢� + /// </summary> + /// <param name="receiveModel"></param> + /// <returns></returns> + string InvokeMatReceiveApi(ERPReceiveModel receiveModel); + + /// <summary> + /// ERP鐗╂枡IQC妫�楠屽崟鎺ュ彛璋冪敤 + /// </summary> + /// <param name="checkModel"></param> + /// <returns></returns> + string InvokeCheckOrderApi(ERPCheckModel checkModel); + + /// <summary> + /// ERP鐗╂枡鍏ュ簱鍗曟帴鍙h皟鐢� + /// </summary> + /// <param name="inboundModel"></param> + /// <returns></returns> + string InvokeInboundOrderApi(ERPInboundModel inboundModel); + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/InvokeERPService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/InvokeERPService.cs" deleted file mode 100644 index 694a53e..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/InvokeERPService.cs" +++ /dev/null @@ -1,15 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WIDESEA_External.ERPService -{ - /// <summary> - /// 璋冪敤ERP鎺ュ彛 - /// </summary> - public interface IInvokeERPService - { - } -} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPBaseModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPBaseModel.cs" new file mode 100644 index 0000000..4a10e94 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPBaseModel.cs" @@ -0,0 +1,19 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_External.Model +{ + public class ERPBaseModel<T> + { + public string Type { get; set; } + + public string Desc { get; set; } + + public string SecurityCode { get; set; } + + public T Data { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPCheckModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPCheckModel.cs" new file mode 100644 index 0000000..a65a6dc --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPCheckModel.cs" @@ -0,0 +1,131 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_External.Model +{ + public class ERPCheckModel + { + /// <summary> + /// 鎿嶄綔绫诲瀷 + /// </summary> + public int Way { get; set; } + + /// <summary> + /// 涓婚敭鍊� + /// </summary> + public string UniqueTag { get; set; } + + /// <summary> + /// 妫�楠屽崟鍙� + /// </summary> + public string Code { get; set; } + + /// <summary> + /// 鍏徃浠e彿 + /// </summary> + public string CompanyId { get; set; } = "HATC"; + + /// <summary> + /// 宸ュ巶浠e彿 + /// </summary> + public string PlantsId { get; set; } = "HA020"; + + /// <summary> + /// 鏀惰揣鍗曞彿 + /// </summary> + public string ReceiptCode { get; set; } + + /// <summary> + /// 鏀惰揣鍗曟槑缁嗚鍙� + /// </summary> + public string SerNo { get; set; } + + /// <summary> + /// 鏀惰揣鍗曠墿鏂欐槑缁嗕唬鐮� + /// </summary> + public string MaterialsCode { get; set; } + + /// <summary> + /// 鏀惰揣鏃ユ湡 + /// </summary> + public string ReceiveDate { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + public string Note { get; set; } + + /// <summary> + /// 鍚堟牸鏁伴噺 + /// </summary> + public string QtyQualified { get; set; } + + /// <summary> + /// 鐗归噰鏁伴噺 + /// </summary> + public string QtyDefected { get; set; } + + /// <summary> + /// 閫�璐ф暟閲� + /// </summary> + public string QtyReturn { get; set; } + + /// <summary> + /// 鎶ュ簾鏁伴噺 + /// </summary> + public string QtyScrapped { get; set; } + + /// <summary> + /// 妫�楠屾�绘暟锛堟敹璐ф�绘暟锛� + /// </summary> + public string QtyInspected { get; set; } + + /// <summary> + /// 妫�楠屽垽鏂粨鏋� + /// </summary> + public string Result { get; set; } + + /// <summary> + /// 鐗归噰璇存槑 + /// </summary> + public string DefectedNote { get; set; } + + /// <summary> + /// 鍒涘缓浜轰唬鍙� + /// </summary> + public string CreatorCode { get; set; } + + /// <summary> + /// 妫�楠屾棩鏈� + /// </summary> + public string TestDate { get; set; } + + public List<ERPCheckResult> Details { get; set; } + } + + public class ERPCheckResult + { + /// <summary> + /// 缂洪櫡浠g爜 + /// </summary> + public string DefectCode { get; set; } + + /// <summary> + /// 缁撴灉 + /// </summary> + public string Result { get; set; } + + /// <summary> + /// 鏁伴噺 + /// </summary> + public string Quantity { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + public string Note { set; get; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPInboundModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPInboundModel.cs" new file mode 100644 index 0000000..1acd7db --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPInboundModel.cs" @@ -0,0 +1,121 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_External.Model +{ + public class ERPInboundModel + { + /// <summary> + /// 鎿嶄綔绫诲瀷 + /// </summary> + public int Way { get; set; } + + /// <summary> + /// 涓婚敭鍊� + /// </summary> + public string UniqueTag { get; set; } + + /// <summary> + /// 鍏ュ簱鍗曞彿 + /// </summary> + public string Code { get; set; } + + /// <summary> + /// 鍏ュ簱绫诲瀷 + /// </summary> + public string Type { get; set; } + + /// <summary> + /// 渚涘簲鍟嗕唬鍙� + /// </summary> + public string SuppliersId { get; set; } + + /// <summary> + /// 鍏徃浠e彿 + /// </summary> + public string CompanyId { get; set; } = "HATC"; + + /// <summary> + /// 宸ュ巶浠e彿 + /// </summary> + public string PlantsId { get; set; } = "HA020"; + + /// <summary> + /// 鍏ュ簱鏃ユ湡 + /// </summary> + public string StockDate { get; set; } + + /// <summary> + /// 浠撳簱浠e彿 + /// </summary> + public string WarehouseCode { get; set; } + + /// <summary> + /// 鍒涘缓浜轰唬鍙� + /// </summary> + public string CreatorCode { get; set; } + + /// <summary> + /// 鍒涘缓鏃ユ湡 + /// </summary> + public string EndDate { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + public string Note { get; set; } + + public List<ERPInboundDetailModel> Details { get; set; } + } + + public class ERPInboundDetailModel + { + /// <summary> + /// 鎺ユ敹鍗曞彿 + /// </summary> + public string ReceiptCode { get; set; } + + /// <summary> + /// 鎺ユ敹鍗曟槑缁嗚鍙� + /// </summary> + public string ReceiptSerNo { get; set; } + + /// <summary> + /// 鎺ユ敹鍗曟槑缁嗙墿鏂欎唬鐮� + /// </summary> + public string MaterialsCode { get; set; } + + /// <summary> + /// 鍌ㄥ尯浠e彿(浠撳簱浠e彿) + /// </summary> + public string LocationCode { get; set; } + + /// <summary> + /// 璐т綅 + /// </summary> + public string Rack { get; set; } + + /// <summary> + /// 鏁伴噺 + /// </summary> + public string Quantity { get; set; } + + /// <summary> + /// 娴峰叧鎺ユ敹鏁伴噺 + /// </summary> + public string QtyCustoms { get; set; } + + /// <summary> + /// 鍒堕�犳棩鏈� + /// </summary> + public string MfgDate { get; set; } + + /// <summary> + /// 杩囨湡鏃ユ湡 + /// </summary> + public string ExpiryDate { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPReceiveModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPReceiveModel.cs" new file mode 100644 index 0000000..2da8833 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/Model/ERPReceiveModel.cs" @@ -0,0 +1,136 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_External.Model +{ + public class ERPReceiveModel + { + /// <summary> + /// 鎿嶄綔绫诲瀷 + /// </summary> + public int Way { get; set; } + + /// <summary> + /// WMS涓诲仴鍊� + /// </summary> + public string UniqueTag { get; set; } + + /// <summary> + /// 鏀惰揣鍗曞彿 + /// </summary> + public string Code { get; set; } + + /// <summary> + /// 鍗曟嵁绫诲瀷 + /// </summary> + public string Type { get; set; } + + /// <summary> + /// 鍏徃浠e彿 + /// </summary> + public string CompanyId { get; set; } = "HATC"; + + /// <summary> + /// 宸ュ巶浠e彿 + /// </summary> + public string PlantsId { get; set; } = "HA020"; + + /// <summary> + /// 瀹㈡埛浠e彿 + /// </summary> + public string CustomerId { get; set; } = ""; + + /// <summary> + /// 渚涘簲鍟嗕唬鍙� + /// </summary> + public string SuppliersId { get; set; } = ""; + + /// <summary> + /// 鏀惰揣鏃ユ湡 + /// </summary> + public DateTime ReceiveDate { get; set; } + + /// <summary> + /// 閫佽揣鍗曞彿 + /// </summary> + public string DeliveryCode { get; set; } = "/"; + + /// <summary> + /// 浠撳簱浠e彿 + /// </summary> + public string WarehouseCode { get; set; } = ""; + + /// <summary> + /// 鍒涘缓浜轰唬鍙� + /// </summary> + public string CreatorId { get; set; } = ""; + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime EndDate { get; set; } + + public List<RecevieOrderDetailModel> Details { get; set; } + } + + public class RecevieOrderDetailModel + { + /// <summary> + /// 閲囪喘鍗曞彿 + /// </summary> + public string PurchaseOrderCode { get; set; } + + /// <summary> + /// 閲囪喘鏄庣粏琛屽彿 + /// </summary> + public int PurchaseOrderSerno { get; set; } + + /// <summary> + /// 鏀惰揣鏄庣粏琛屽彿 + /// </summary> + public int Serno { get; set; } + + /// <summary> + /// 鏉愭枡缂栫爜 + /// </summary> + public string MaterialsId { get; set; } + + /// <summary> + /// 鏀惰揣鏁伴噺 + /// </summary> + public float QtyReceived { get; set; } + + /// <summary> + /// 鏀惰揣鎵规 + /// </summary> + public string Lotno { get; set; } + + /// <summary> + /// 渚涘簲鍟嗘壒娆� + /// </summary> + public string Supplotno { get; set; } + + /// <summary> + /// 鏄惁瑕佹楠� + /// </summary> + public int IfInspection { get; set; } + + /// <summary> + /// 鍚◣浠锋牸 + /// </summary> + public double PriceInTax { get; set; } = 0; + + /// <summary> + /// 绋庣巼 + /// </summary> + public string Taxrate { get; set; } = ""; + + /// <summary> + /// 甯佸埆缂栫爜 + /// </summary> + public string Currcode { get; set; } = ""; + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/WIDESEA_External.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/WIDESEA_External.csproj" index ae35cbe..e096efb 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/WIDESEA_External.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/WIDESEA_External.csproj" @@ -8,11 +8,6 @@ <ItemGroup> <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" /> - <ProjectReference Include="..\WIDESEA_InboundService\WIDESEA_InboundService.csproj" /> - </ItemGroup> - - <ItemGroup> - <Folder Include="Model\" /> </ItemGroup> </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IApprovalService/IApprovalTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IApprovalService/IApprovalTaskService.cs" index 085929d..0e4278d 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IApprovalService/IApprovalTaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IApprovalService/IApprovalTaskService.cs" @@ -14,8 +14,18 @@ { IApprovalTaskRepository Repository { get; } + /// <summary> + /// 瀹℃壒鍚屾剰 + /// </summary> + /// <param name="sourceKey">婧愪富閿�</param> + /// <returns></returns> WebResponseContent AuditAgree(int sourceKey); + /// <summary> + /// 瀹℃壒椹冲洖 + /// </summary> + /// <param name="sourceKey">婧愪富閿�</param> + /// <returns></returns> WebResponseContent AuditReject(int sourceKey); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" index 69697c9..5257bf4 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" @@ -17,20 +17,63 @@ { ILocationInfoRepository Repository { get; } + /// <summary> + /// 鎵归噺鍚敤璐т綅 + /// </summary> + /// <param name="keys">璐т綅涓婚敭鏁扮粍</param> + /// <returns></returns> WebResponseContent LocationEnableStatus(int[] keys); + /// <summary> + /// 鎵归噺绂佺敤璐т綅 + /// </summary> + /// <param name="keys">璐т綅涓婚敭鏁扮粍</param> + /// <returns></returns> WebResponseContent LocationDisableStatus(int[] keys); + /// <summary> + /// 鍗曚釜鍚敤璐т綅 + /// </summary> + /// <param name="key">璐т綅涓婚敭</param> + /// <returns></returns> WebResponseContent LocationEnableStatus(int key); + /// <summary> + /// 鍗曚釜绂佺敤璐т綅 + /// </summary> + /// <param name="key">璐т綅涓婚敭</param> + /// <returns></returns> WebResponseContent LocationDisableStatus(int key); + /// <summary> + /// 鍒濆鍖栬揣浣� + /// </summary> + /// <param name="initializationLocationDTO"></param> + /// <returns></returns> WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO); + /// <summary> + /// 璐т綅鍒嗛厤閫昏緫 + /// </summary> + /// <param name="roadwayNo">宸烽亾鍙�</param> + /// <param name="palletType">鎵樼洏绫诲瀷</param> + /// <returns></returns> Dt_LocationInfo? AssignLocation(string roadwayNo, PalletTypeEnum palletType); + /// <summary> + /// 淇敼璐т綅鐘舵�佸強绫诲瀷 + /// </summary> + /// <param name="locationCode">璐т綅缂栧彿</param> + /// <param name="palletType">鎵樼洏绫诲瀷</param> + /// <param name="locationStatus">璐т綅鐘舵��</param> void UpdateLocationStatus(string locationCode, PalletTypeEnum palletType, LocationStatusEnum locationStatus); + /// <summary> + /// 淇敼璐т綅鐘舵�佸強绫诲瀷 + /// </summary> + /// <param name="location">璐т綅瀵硅薄</param> + /// <param name="palletType">鎵樼洏绫诲瀷</param> + /// <param name="locationStatus">璐т綅鐘舵��</param> void UpdateLocationStatus(Dt_LocationInfo location, PalletTypeEnum palletType, LocationStatusEnum locationStatus); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" index 9553997..222b217 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" @@ -15,14 +15,39 @@ { IMaterielInfoRepository Repository { get; } + /// <summary> + /// 鍒ゆ柇鐗╂枡鏄惁瀛樺湪 + /// </summary> + /// <param name="materielCode">鐗╂枡缂栧彿</param> + /// <returns></returns> bool ExsitMateriel(string materielCode); + /// <summary> + /// 鍒ゆ柇鐗╂枡鏄惁瀛樺湪 + /// </summary> + /// <param name="materielCodes">鐗╂枡缂栧彿闆嗗悎</param> + /// <returns></returns> bool ExsitMateriels(List<string> materielCodes); + /// <summary> + /// 鑾峰彇鐗╂枡淇℃伅 + /// </summary> + /// <param name="materielCode">鐗╂枡缂栧彿</param> + /// <returns></returns> Dt_MaterielInfo GetMaterielInfo(string materielCode); + /// <summary> + /// 鏌ヨ鐗╂枡淇℃伅 + /// </summary> + /// <param name="materielCodes"></param> + /// <returns></returns> List<Dt_MaterielInfo> GetMaterielInfos(List<string> materielCodes); + /// <summary> + /// 鎺ユ敹ERP鐗╂枡淇℃伅 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> WebResponseContent ReceiveMaterial(MaterielInfoDTO model); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs" index b6b11cc..b004d66 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs" @@ -14,12 +14,32 @@ { IWarehouseRepository Repository { get; } + /// <summary> + /// 鎵归噺鍚敤浠撳簱 + /// </summary> + /// <param name="keys">浠撳簱涓婚敭鏁扮粍</param> + /// <returns></returns> WebResponseContent WarehouseEnableStatus(int[] keys); + /// <summary> + /// 鎵归噺绂佺敤浠撳簱 + /// </summary> + /// <param name="keys">浠撳簱涓婚敭鏁扮粍</param> + /// <returns></returns> WebResponseContent WarehouseDisableStatus(int[] keys); + /// <summary> + /// 鍗曚釜鍚敤浠撳簱 + /// </summary> + /// <param name="key">浠撳簱涓婚敭</param> + /// <returns></returns> WebResponseContent WarehouseEnableStatus(int key); + /// <summary> + /// 鍗曚釜绂佺敤浠撳簱 + /// </summary> + /// <param name="key">浠撳簱涓婚敭</param> + /// <returns></returns> WebResponseContent WarehouseDisableStatus(int key); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderResultService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderResultService.cs" index 069e1b5..5bab769 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderResultService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderResultService.cs" @@ -11,6 +11,12 @@ { public interface ICheckOrderResultService : IService<Dt_CheckOrderResult> { + /// <summary> + /// 鎻愪氦璐ㄦ缁撴灉 + /// </summary> + /// <param name="checkOrderId">璐ㄦ鍗曚富閿�</param> + /// <param name="checkResult">璐ㄦ缁撴灉瀵硅薄</param> + /// <returns></returns> WebResponseContent CommitCheckResult(int checkOrderId, Dt_CheckOrderResult checkResult); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderService.cs" index 51a9bec..f444624 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ICheckService/ICheckOrderService.cs" @@ -11,6 +11,18 @@ { public interface ICheckOrderService : IService<Dt_CheckOrder> { + /// <summary> + /// 璐ㄦ瀹屾垚鍚庢彁浜ゅ鎵� + /// </summary> + /// <param name="checkOrderId"></param> + /// <returns></returns> WebResponseContent CommitAudit(int checkOrderId); + + /// <summary> + /// 璐ㄦ缁撴灉瀹℃壒瀹屾垚鍚庡洖浼燛RP + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + WebResponseContent FeedbackCheckResult(int id); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" index 6dc6490..a23bac9 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" @@ -20,5 +20,7 @@ WebResponseContent MaterielGroup(int inboundOrderId, string palletCode, string serNum); WebResponseContent MaterielGroup(int inboundOrderId, string palletCode, List<string> serNums); + + WebResponseContent FeedbackInboundOrder(int id); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderService.cs" index 9cacb55..cc5da6a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderService.cs" @@ -11,7 +11,27 @@ { public interface IReceiveOrderService : IService<Dt_ReceiveOrder> { + /// <summary> + /// 鏍规嵁鏀惰揣鍗曞垱寤哄叆搴撳崟 + /// </summary> + /// <param name="receiveOrderId"></param> + /// <returns></returns> WebResponseContent CreateInboundOrder(int receiveOrderId); + + /// <summary> + /// 鏀惰揣瀹屾垚鍥炰紶ERP + /// </summary> + /// <param name="orderId"></param> + /// <returns></returns> + WebResponseContent FeedbackReceiveOrder(int orderId); WebResponseContent GetReceiveOrders(SaveModel saveModel); + + /// <summary> + /// + /// </summary> + /// <param name="purchaseOrderId"></param> + /// <param name="lotNo"></param> + /// <returns></returns> + WebResponseContent ReceiveAllOrder(int purchaseOrderId, string lotNo); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" index 986adc1..f21b03a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" @@ -21,6 +21,8 @@ using WIDESEA_DTO; using WIDESEA_DTO.Basic; using WIDESEA_DTO.Inbound; +using WIDESEA_External.ERPService; +using WIDESEA_External.Model; using WIDESEA_IBasicRepository; using WIDESEA_IBasicService; using WIDESEA_IInboundRepository; @@ -42,10 +44,11 @@ private readonly IBasicRepository _basicRepository; private readonly IStockRepository _stockRepository; private readonly IRecordService _recordService; + private readonly IInvokeERPService _invokeERPService; public IInboundOrderRepository Repository => BaseDal; - public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IInboundRepository inboundRepository, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService) : base(BaseDal) + public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IInboundRepository inboundRepository, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService, IInvokeERPService invokeERPService) : base(BaseDal) { _mapper = mapper; _unitOfWorkManage = unitOfWorkManage; @@ -53,6 +56,7 @@ _basicRepository = basicRepository; _stockRepository = stockRepository; _recordService = recordService; + _invokeERPService = invokeERPService; } public WebResponseContent GetInboundOrders(SaveModel saveModel) { @@ -152,7 +156,10 @@ SerialNumber = model.SerialNumber, StockQuantity = model.Quantity, OutboundQuantity = 0, - Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() + Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(), + ProductionDate = model.ProductionDate, + EffectiveDate = model.EffectiveDate, + InboundOrderRowNo = notGroupDetail.RowNo, }; _stockRepository.StockInfoRepository.Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand(); @@ -265,7 +272,10 @@ SerialNumber = model.SerialNumber, StockQuantity = model.Quantity, OutboundQuantity = 0, - Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() + Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(), + ProductionDate = model.ProductionDate, + EffectiveDate = model.EffectiveDate, + InboundOrderRowNo = notGroupDetail.RowNo, }; if (stockInfo.Id > 0) @@ -306,5 +316,88 @@ return WebResponseContent.Instance.Error(ex.Message); } } + + public WebResponseContent FeedbackInboundOrder(int id) + { + try + { + Dt_InboundOrder inboundOrder = Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == id).Includes(x => x.Details).First(); + if (inboundOrder == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟淇℃伅"); + } + if (inboundOrder.Details == null || inboundOrder.Details.Count == 0) + { + return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟鏄庣粏淇℃伅"); + } + if (inboundOrder.OrderStatus != InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt()) + { + return WebResponseContent.Instance.Error($"鍏ュ簱鍗曟嵁鏈畬鎴�"); + } + if (inboundOrder.Details.FirstOrDefault(x => x.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt()) != null) + { + return WebResponseContent.Instance.Error($"鍏ュ簱鏄庣粏鏈畬鎴�"); + } + + List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => x.Details.Any(v => v.OrderNo == inboundOrder.InboundOrderNo)).Includes(x => x.Details).ToList(); + List<Dt_Warehouse> warehouses = Db.Queryable<Dt_Warehouse>().ToList(); + + List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>(); + foreach (var item in inboundOrder.Details) + { + Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(v => v.InboundOrderRowNo == item.RowNo && v.MaterielCode == item.MaterielCode)); + if (stockInfo == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒板簱瀛樹俊鎭�"); + } + + Dt_Warehouse? warehouse = warehouses.FirstOrDefault(x => x.WarehouseId == stockInfo.WarehouseId); + if (warehouse == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); + } + + ERPInboundDetailModel detailModel = new ERPInboundDetailModel() + { + ExpiryDate = stockInfo.Details.FirstOrDefault()?.EffectiveDate ?? "", + LocationCode = warehouse.WarehouseCode, + MaterialsCode = item.MaterielCode, + MfgDate = stockInfo.Details.FirstOrDefault()?.ProductionDate ?? "", + QtyCustoms = "0", + Quantity = stockInfo.Details.Sum(x => x.StockQuantity).ToString(), + Rack = stockInfo.LocationCode, + ReceiptCode = inboundOrder.UpperOrderNo, + ReceiptSerNo = item.RowNo.ToString() + }; + detailModels.Add(detailModel); + } + Dt_Warehouse? warehouse2 = warehouses.FirstOrDefault(x => x.WarehouseId == inboundOrder.WarehouseId); + if (warehouse2 == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); + } + ERPInboundModel model = new ERPInboundModel() + { + Code = inboundOrder.InboundOrderNo, + CreatorCode = inboundOrder.Creater, + EndDate = inboundOrder.CreateDate.ToString(), + StockDate = inboundOrder.CreateDate.ToString(), + SuppliersId = inboundOrder.SupplierId, + Type = "S", + UniqueTag = inboundOrder.Id.ToString(), + WarehouseCode = warehouse2.WarehouseCode, + Way = 1, + Details = detailModels + }; + + string response = _invokeERPService.InvokeInboundOrderApi(model); + + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs" index c32b46a..71cd415 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs" @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_Common.CommonEnum; using WIDESEA_Common.OrderEnum; using WIDESEA_Core; using WIDESEA_Core.BaseRepository; @@ -134,7 +135,7 @@ _inboundRepository.ReceiveOrderRepository.UpdateData(receiveOrder); _inboundRepository.PurchaseOrderDetailRepository.UpdateData(purchaseOrderDetail); - if (materielInfo.IsCheck == WIDESEA_Common.CommonEnum.WhetherEnum.True) + if (materielInfo.IsCheck == WhetherEnum.True) { Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail); checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs" index 75675e0..f2a2084 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs" @@ -1,4 +1,5 @@ -锘縰sing MailKit.Search; +锘縰sing AutoMapper; +using MailKit.Search; using System; using System.Collections.Generic; using System.Linq; @@ -7,8 +8,13 @@ using WIDESEA_Common.CommonEnum; using WIDESEA_Common.OrderEnum; using WIDESEA_Core; +using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; using WIDESEA_Core.Helper; +using WIDESEA_DTO.Basic; +using WIDESEA_External.ERPService; +using WIDESEA_External.Model; +using WIDESEA_IBasicRepository; using WIDESEA_ICheckRepository; using WIDESEA_IInboundRepository; using WIDESEA_IInboundService; @@ -18,13 +24,21 @@ { public class ReceiveOrderService : ServiceBase<Dt_ReceiveOrder, IReceiveOrderRepository>, IReceiveOrderService { + private readonly IUnitOfWorkManage _unitOfWorkManage; + private readonly IMapper _mapper; private readonly ICheckOrderRepository _checkOrderRepository; private readonly IInboundRepository _inboundRepository; + private readonly IBasicRepository _basicRepository; + private readonly IInvokeERPService _invokeERPService; - public ReceiveOrderService(IReceiveOrderRepository BaseDal, ICheckOrderRepository checkOrderRepository, IInboundRepository inboundRepository) : base(BaseDal) + public ReceiveOrderService(IReceiveOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IMapper mapper, ICheckOrderRepository checkOrderRepository, IInboundRepository inboundRepository, IBasicRepository basicRepository, IInvokeERPService invokeERPService) : base(BaseDal) { + _mapper = mapper; + _unitOfWorkManage = unitOfWorkManage; _checkOrderRepository = checkOrderRepository; _inboundRepository = inboundRepository; + _basicRepository = basicRepository; + _invokeERPService = invokeERPService; } public override WebResponseContent AddData(SaveModel saveModel) @@ -64,6 +78,74 @@ } return base.AddData(saveModel); + } + + public WebResponseContent FeedbackReceiveOrder(int orderId) + { + try + { + Dt_ReceiveOrder receiveOrder = BaseDal.Db.Queryable<Dt_ReceiveOrder>().Where(x => x.ReceiveOrderId == orderId).Includes(x => x.Details).First(); + if (receiveOrder == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒版敹璐у崟"); + } + if (receiveOrder.Details == null || receiveOrder.Details.Count == 0) + { + return WebResponseContent.Instance.Error($"鏈壘鍒版敹璐у崟鏄庣粏"); + } + + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == receiveOrder.WarehouseId); + if (warehouse == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); + } + + List<RecevieOrderDetailModel> recevieOrderDetails = new List<RecevieOrderDetailModel>(); + foreach (var item in receiveOrder.Details) + { + RecevieOrderDetailModel recevieOrderDetail = new RecevieOrderDetailModel() + { + Currcode = "", + IfInspection = item.IfInspection, + Lotno = item.LotNo, + MaterialsId = item.MaterielCode, + PriceInTax = 0, + PurchaseOrderCode = item.PurchaseOrderNo, + PurchaseOrderSerno = item.PurchaseOrderDetailRowNo, + QtyReceived = item.ReceivedQuantity, + Serno = item.RowNo, + Supplotno = "", + Taxrate = "" + }; + recevieOrderDetails.Add(recevieOrderDetail); + } + + ERPReceiveModel receiveModel = new ERPReceiveModel() + { + Code = receiveOrder.ReceiveOrderNo, + CompanyId = "", + DeliveryCode = receiveOrder.DeliveryCode, + CustomerId = receiveOrder.CustomerId, + CreatorId = receiveOrder.Creater, + EndDate = receiveOrder.CreateDate, + ReceiveDate = receiveOrder.CreateDate, + PlantsId = "", + SuppliersId = receiveOrder.SuppliersId, + Type = "PO", + UniqueTag = receiveOrder.ReceiveOrderId.ToString(), + WarehouseCode = warehouse.WarehouseCode, + Way = 1, + Details = recevieOrderDetails + }; + + string response = _invokeERPService.InvokeMatReceiveApi(receiveModel); + + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } } public WebResponseContent GetReceiveOrders(SaveModel saveModel) @@ -168,5 +250,163 @@ return WebResponseContent.Instance.Error(ex.Message); } } + + public WebResponseContent ReceiveAllOrder(int purchaseOrderId, string lotNo) + { + try + { + Dt_PurchaseOrder purchaseOrder = Db.Queryable<Dt_PurchaseOrder>().Where(x => x.Id == purchaseOrderId).Includes(x => x.Details).First(); + if (purchaseOrder == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌閲囪喘鍗�"); + } + if (purchaseOrder.Details == null || purchaseOrder.Details.Count == 0) + { + return WebResponseContent.Instance.Error($"鏈壘鍒伴噰璐崟鏄庣粏淇℃伅"); + } + if (purchaseOrder.PurchaseOrderStatus == PurchaseOrderStatusEnum.Received.ObjToInt()) + { + return WebResponseContent.Instance.Error($"宸叉敹璐у畬鎴�"); + } + if (purchaseOrder.Details.FirstOrDefault(x => x.PurchaseDetailStatus == PurchaseOrderStatusEnum.NotReceived.ObjToInt()) == null) + { + return WebResponseContent.Instance.Error($"宸叉敹璐у畬鎴�"); + } + List<Dt_CheckOrder> checkOrders = new List<Dt_CheckOrder>(); + List<Dt_MaterielInfo> materielInfos = new List<Dt_MaterielInfo>(); + List<Dt_ReceiveOrderDetail> receiveOrderDetails = new List<Dt_ReceiveOrderDetail>(); + Dt_ReceiveOrder receiveOrder = BaseDal.Db.Queryable<Dt_ReceiveOrder>().Where(x => x.SuppliersId == purchaseOrder.SupplierCode && x.ReceiveOrderStatus != ReceiveOrderStatusEnum.Completed.ObjToInt()).Includes(x => x.Details).First(); + if (receiveOrder == null) + { + int rowNo = 0; + foreach (var item in purchaseOrder.Details) + { + Dt_MaterielInfo? materielInfo = materielInfos.FirstOrDefault(x => x.MaterielCode == item.MaterielCode); + if (materielInfo == null) + { + materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == item.MaterielCode); + if (materielInfo == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌鐗╂枡鐨勪俊鎭�"); + } + materielInfos.Add(materielInfo); + } + Dt_ReceiveOrderDetail receiveOrderDetail = new Dt_ReceiveOrderDetail() + { + PurchaseOrderNo = purchaseOrder.PurchaseOrderNo, + ReceivedQuantity = item.PurchaseDetailQuantity, + MaterielCode = item.MaterielCode, + LotNo = lotNo, + PurchaseOrderDetailRowNo = item.RowNo, + IfInspection = materielInfo.IsCheck.ObjToInt(), + CurrCode = "", + PriceInTax = 0, + TaxRate = "", + RowNo = rowNo + 1, + Unit = item.Unit + }; + rowNo += 1; + receiveOrderDetails.Add(receiveOrderDetail); + + if (materielInfo.IsCheck == WhetherEnum.True) + { + Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail); + checkOrder.ReceiveOrderNo = ""; + checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity; + checkOrder.ScrappedQuantity = 0; + checkOrder.ReturnQuantity = 0; + checkOrder.DefectedQuantity = 0; + checkOrder.ReceiveDetailRowNo = rowNo; + checkOrders.Add(checkOrder); + } + } + receiveOrder = new Dt_ReceiveOrder() + { + ReceiveOrderStatus = ReceiveOrderStatusEnum.Receiving.ObjToInt(), + CustomerId = "", + DeliveryCode = "", + ReceiveDate = DateTime.Now, + ReceiveOrderType = ReceiveOrderTypeEnum.PO.ObjToInt(), + SuppliersId = purchaseOrder.SupplierCode, + WarehouseId = purchaseOrder.Details.FirstOrDefault()?.WarehouseId ?? 0, + UploadStatus = WhetherEnum.False.ObjToInt(), + Details = receiveOrderDetails + }; + } + else + { + int rowNo = receiveOrder.Details.Count > 0 ? receiveOrder.Details.Max(x => x.RowNo) : 0; + + foreach (var item in purchaseOrder.Details) + { + Dt_MaterielInfo? materielInfo = materielInfos.FirstOrDefault(x => x.MaterielCode == item.MaterielCode); + if (materielInfo == null) + { + materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == item.MaterielCode); + if (materielInfo == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌鐗╂枡鐨勪俊鎭�"); + } + materielInfos.Add(materielInfo); + } + Dt_ReceiveOrderDetail receiveOrderDetail = new Dt_ReceiveOrderDetail() + { + PurchaseOrderNo = purchaseOrder.PurchaseOrderNo, + ReceivedQuantity = item.PurchaseDetailQuantity, + MaterielCode = item.MaterielCode, + LotNo = lotNo, + ReceiveOrderId = receiveOrder.ReceiveOrderId, + PurchaseOrderDetailRowNo = item.RowNo, + IfInspection = materielInfo.IsCheck.ObjToInt(), + CurrCode = "", + PriceInTax = 0, + TaxRate = "", + RowNo = rowNo + 1, + Unit = item.Unit, + + }; + rowNo += 1; + receiveOrderDetails.Add(receiveOrderDetail); + + if (materielInfo.IsCheck == WhetherEnum.True) + { + Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail); + checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity; + checkOrder.ScrappedQuantity = 0; + checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo; + checkOrder.ReturnQuantity = 0; + checkOrder.DefectedQuantity = 0; + checkOrder.ReceiveDetailRowNo = rowNo; + checkOrders.Add(checkOrder); + } + } + } + + purchaseOrder.Details.ForEach(x => x.PurchaseDetailStatus = PurchaseOrderStatusEnum.Received.ObjToInt()); + purchaseOrder.PurchaseOrderStatus = PurchaseOrderStatusEnum.Received.ObjToInt(); + + _unitOfWorkManage.BeginTran(); + if (receiveOrder.ReceiveOrderId > 0) + { + Db.Insertable(receiveOrderDetails).ExecuteCommand(); + } + else + { + Db.InsertNav(receiveOrder).Include(x => x.Details).ExecuteCommand(); + checkOrders.ForEach(x => x.ReceiveOrderNo = receiveOrder.ReceiveOrderNo); + } + _checkOrderRepository.AddData(checkOrders); + _inboundRepository.PurchaseOrderRepository.UpdateData(purchaseOrder); + _inboundRepository.PurchaseOrderDetailRepository.UpdateData(purchaseOrder.Details); + _unitOfWorkManage.CommitTran(); + + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + return WebResponseContent.Instance.Error(ex.Message); + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/WIDESEA_InboundService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/WIDESEA_InboundService.csproj" index 7cc354c..407bace 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/WIDESEA_InboundService.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/WIDESEA_InboundService.csproj" @@ -7,6 +7,7 @@ </PropertyGroup> <ItemGroup> + <ProjectReference Include="..\WIDESEA_External\WIDESEA_External.csproj" /> <ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" /> <ProjectReference Include="..\WIDESEA_ICheckRepository\WIDESEA_ICheckRepository.csproj" /> <ProjectReference Include="..\WIDESEA_IInboundService\WIDESEA_IInboundService.csproj" /> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs" index 90d48d5..0aac169 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs" @@ -38,6 +38,9 @@ [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鍗曚綅")] public string Unit { get; set; } + /// <summary> + /// 鏀惰揣鍗曟槑缁嗚鍙� + /// </summary> [SugarColumn(IsNullable = false, ColumnDescription = "琛屽彿")] public int RowNo { get; set; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" index f267062..752de71 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" @@ -29,6 +29,12 @@ [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鎵规鍙�")] public string BatchNo { get; set; } + [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鐢熶骇鏃ユ湡")] + public string ProductionDate { get; set; } + + [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鏈夋晥鏈�")] + public string EffectiveDate { get; set; } + [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "搴忓垪鍙�")] public string SerialNumber { get; set; } @@ -41,6 +47,9 @@ [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鏄庣粏鐘舵��")] public int Status { get; set; } + [SugarColumn(IsNullable = false, ColumnDescription = "鍏ュ簱鍗曟槑缁嗚鍙�")] + public int InboundOrderRowNo { get; set; } + [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")] public string Remark { get; set; } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderController.cs" index 0f02d08..b6d8ee7 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderController.cs" @@ -25,5 +25,16 @@ { return Service.CommitAudit(checkOrderId); } + + /// <summary> + /// 璐ㄦ缁撴灉瀹℃壒瀹屾垚鍚庡洖浼燛RP + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + [HttpGet, HttpPost, Route("FeedbackCheckResult")] + public WebResponseContent FeedbackCheckResult(int id) + { + return Service.FeedbackCheckResult(id); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" index 9741bc3..1b4e531 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" @@ -51,5 +51,16 @@ { return Service.MaterielGroup(inboundOrderId, palletCode, serNums); } + + /// <summary> + /// 鍏ュ簱瀹屾垚鍚庡洖浼燛RP + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + [HttpPost, HttpGet, Route("FeedbackInboundOrder")] + public WebResponseContent FeedbackInboundOrder(int id) + { + return Service.FeedbackInboundOrder(id); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderController.cs" index f2a5428..95be589 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderController.cs" @@ -27,6 +27,16 @@ } /// <summary> + /// 鏀惰揣瀹屾垚鍥炰紶ERP + /// </summary> + /// <param name="orderId"></param> + /// <returns></returns> + [HttpPost, HttpGet, Route("FeedbackReceiveOrder")] + public WebResponseContent FeedbackReceiveOrder(int orderId) + { + return Service.FeedbackReceiveOrder(orderId); + } + /// 鏌ヨ鏀惰揣鍗曚俊鎭� /// </summary> /// <returns></returns> @@ -35,5 +45,17 @@ { return Service.GetReceiveOrders(saveModel); } + + /// <summary> + /// 鏀惰揣 + /// </summary> + /// <param name="purchaseOrderId"></param> + /// <param name="lotNo"></param> + /// <returns></returns> + [HttpPost, HttpGet, Route("ReceiveAllOrder")] + public WebResponseContent ReceiveAllOrder(int purchaseOrderId, string lotNo) + { + return Service.ReceiveAllOrder(purchaseOrderId, lotNo); + } } } -- Gitblit v1.9.3