Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
已删除13个文件
已修改52个文件
已添加11个文件
| | |
| | | |
| | | public string Config { get; set; } |
| | | |
| | | public object Data { get; set; } |
| | | public object Data { get; set; } |
| | | |
| | | public bool SaveCache { get; set; } = true; |
| | | } |
| | | } |
| | |
| | | </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> |
| | |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_BasicInfoRepository\WIDESEAWCS_BasicInfoRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | 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; |
| | |
| | | { |
| | | public interface ISys_MenuRepository : IRepository<Sys_Menu> |
| | | { |
| | | List<Sys_Menu> GetAllMenu(); |
| | | List<MenuDTO> GetAllMenu(); |
| | | |
| | | object GetSuperAdminMenu(); |
| | | |
| | |
| | | <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> |
| | |
| | | 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; |
| | |
| | | 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(); |
| | | |
| | |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [MultiTenant] |
| | | [SugarTable, MultiTenant] |
| | | public class Sys_Log |
| | | { |
| | | /// <summary> |
| | |
| | | /// <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> |
| | |
| | | /// ç¨æ·åç§° |
| | | /// </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; } |
| | | } |
| | | } |
| | |
| | | /// </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; } |
| | | } |
| | | } |
| | |
| | | [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; } |
| | | } |
| | | } |
| | |
| | | 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 = "夿³¨")] |
| | |
| | | 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> |
| | | /// 头å |
| | |
| | | /// </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 |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | |
| | | |
| | | <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> |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="Models\BasicInfo\" /> |
| | | <Folder Include="Models\BasicInfo\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | 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}" |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | {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 |
| | |
| | | {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 |
| | |
| | | {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 |
| | |
| | | {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 |
| | |
| | | {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} |
| | |
| | | {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} |
| | |
| | | using SqlSugar; |
| | | using 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; |
| | |
| | | { |
| | | 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; |
| | |
| | | { |
| | | 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; |
| | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | { |
| | | 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()); |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | |
| | | public List<Sys_Menu> GetUserMenuList(int roleId) |
| | | public List<MenuDTO> GetUserMenuList(int roleId) |
| | | { |
| | | if (App.User.IsRoleIdSuperAdmin(roleId)) |
| | | { |
| | |
| | | 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)) |
| | | { |
| | |
| | | //è·åç¨æ·æé |
| | | 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 |
| | | { |
| | |
| | | { |
| | | 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 |
| | |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_ITaskInfoRepository\WIDESEAWCS_ITaskInfoRepository.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | 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) |
| | | { |
| | |
| | | |
| | | if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | if (OutTaskStationIsOccupied(task) != null) |
| | | if (OutTaskStationIsOccupied(task) != null || true) |
| | | { |
| | | return task; |
| | | } |
| | |
| | | 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) |
| | |
| | | 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) |
| | | { |
| | |
| | | _userRepository = userRepository; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 审æ¹åæ |
| | | /// </summary> |
| | | /// <param name="sourceKey">æºä¸»é®</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent AuditAgree(int sourceKey) |
| | | { |
| | | try |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 审æ¹é©³å |
| | | /// </summary> |
| | | /// <param name="sourceKey">æºä¸»é®</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent AuditReject(int sourceKey) |
| | | { |
| | | try |
| | |
| | | _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)); |
| | |
| | | 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)); |
| | |
| | | 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 |
| | |
| | | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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)); |
| | |
| | | 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)); |
| | |
| | | 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 }); |
| | |
| | | { |
| | | public class BasicService : IBasicService |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public ILocationInfoService LocationInfoService { get; } |
| | | |
| | | public IMaterielInfoService MaterielInfoService { get; } |
| | |
| | | |
| | | 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) |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | { |
| | | 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); |
| | |
| | | /// <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 |
| | |
| | | _checkOrderRepository = checkOrderRepository; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æäº¤è´¨æ£ç»æ |
| | | /// </summary> |
| | | /// <param name="checkOrderId">è´¨æ£å主é®</param> |
| | | /// <param name="checkResult">è´¨æ£ç»æå¯¹è±¡</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent CommitCheckResult(int checkOrderId, Dt_CheckOrderResult checkResult) |
| | | { |
| | | try |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | _approvalTaskRepository = approvalTaskRepository; |
| | | _userRepository = userRepository; |
| | | _webSocketServer = webSocketServer; |
| | | _invokeERPService = invokeERPService; |
| | | } |
| | | |
| | | public WebResponseContent CommitAudit(int checkOrderId) |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥è´¨æ£å"); |
| | | } |
| | | if(checkOrder.CheckOrderStatus != CheckOrderStatusEnum.Checked.ObjToInt()) |
| | | if (checkOrder.CheckOrderStatus != CheckOrderStatusEnum.Checked.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该质æ£åè¿æªæ£éªå®æ"); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | </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" /> |
| | |
| | | { |
| | | Console.WriteLine(e.Message); |
| | | } |
| | | finally |
| | | { |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_External.Model; |
| | | |
| | | namespace WIDESEA_External.ERPService |
| | | { |
| | |
| | | /// </summary> |
| | | public class InvokeERPService : IInvokeERPService |
| | | { |
| | | string serviceIp = ""; |
| | | |
| | | /// <summary> |
| | | /// ERPæ¶è´§åæ¥å£è°ç¨ |
| | | /// </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ç©æå
¥åºåæ¥å£è°ç¨ |
| | | /// </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; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using 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æ¶è´§åæ¥å£è°ç¨ |
| | | /// </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ç©æå
¥åºåæ¥å£è°ç¨ |
| | | /// </summary> |
| | | /// <param name="inboundModel"></param> |
| | | /// <returns></returns> |
| | | string InvokeInboundOrderApi(ERPInboundModel inboundModel); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using 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; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using 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> |
| | | /// å
¬å¸ä»£å· |
| | | /// </summary> |
| | | public string CompanyId { get; set; } = "HATC"; |
| | | |
| | | /// <summary> |
| | | /// å·¥åä»£å· |
| | | /// </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> |
| | | /// 缺é·ä»£ç |
| | | /// </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; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using 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> |
| | | /// å
¬å¸ä»£å· |
| | | /// </summary> |
| | | public string CompanyId { get; set; } = "HATC"; |
| | | |
| | | /// <summary> |
| | | /// å·¥åä»£å· |
| | | /// </summary> |
| | | public string PlantsId { get; set; } = "HA020"; |
| | | |
| | | /// <summary> |
| | | /// å
¥åºæ¥æ |
| | | /// </summary> |
| | | public string StockDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä»£å· |
| | | /// </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> |
| | | /// å¨åºä»£å·(ä»åºä»£å·) |
| | | /// </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; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using 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> |
| | | /// å
¬å¸ä»£å· |
| | | /// </summary> |
| | | public string CompanyId { get; set; } = "HATC"; |
| | | |
| | | /// <summary> |
| | | /// å·¥åä»£å· |
| | | /// </summary> |
| | | public string PlantsId { get; set; } = "HA020"; |
| | | |
| | | /// <summary> |
| | | /// 客æ·ä»£å· |
| | | /// </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> |
| | | /// ä»åºä»£å· |
| | | /// </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; } = ""; |
| | | } |
| | | } |
| | |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_InboundService\WIDESEA_InboundService.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="Model\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | |
| | | { |
| | | public interface ICheckOrderService : IService<Dt_CheckOrder> |
| | | { |
| | | /// <summary> |
| | | /// è´¨æ£å®æåæäº¤å®¡æ¹ |
| | | /// </summary> |
| | | /// <param name="checkOrderId"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent CommitAudit(int checkOrderId); |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£ç»æå®¡æ¹å®æååä¼ ERP |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent FeedbackCheckResult(int id); |
| | | } |
| | | } |
| | |
| | | WebResponseContent MaterielGroup(int inboundOrderId, string palletCode, string serNum); |
| | | |
| | | WebResponseContent MaterielGroup(int inboundOrderId, string palletCode, List<string> serNums); |
| | | |
| | | WebResponseContent FeedbackInboundOrder(int id); |
| | | } |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | _basicRepository = basicRepository; |
| | | _stockRepository = stockRepository; |
| | | _recordService = recordService; |
| | | _invokeERPService = invokeERPService; |
| | | } |
| | | public WebResponseContent GetInboundOrders(SaveModel saveModel) |
| | | { |
| | |
| | | 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(); |
| | |
| | | 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) |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | _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; |
| | |
| | | using MailKit.Search; |
| | | using AutoMapper; |
| | | using MailKit.Search; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | 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; |
| | |
| | | { |
| | | 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) |
| | |
| | | } |
| | | |
| | | 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) |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | </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" /> |
| | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¶è´§åæç»è¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è¡å·")] |
| | | public int RowNo { get; set; } |
| | | |
| | |
| | | [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; } |
| | | |
| | |
| | | [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; } |
| | | } |
| | |
| | | { |
| | | return Service.CommitAudit(checkOrderId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£ç»æå®¡æ¹å®æååä¼ ERP |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("FeedbackCheckResult")] |
| | | public WebResponseContent FeedbackCheckResult(int id) |
| | | { |
| | | return Service.FeedbackCheckResult(id); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.MaterielGroup(inboundOrderId, palletCode, serNums); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºå®æååä¼ ERP |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("FeedbackInboundOrder")] |
| | | public WebResponseContent FeedbackInboundOrder(int id) |
| | | { |
| | | return Service.FeedbackInboundOrder(id); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <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> |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | | } |