| @@ -11,8 +11,8 @@ Global | |||||
| Release|Any CPU = Release|Any CPU | Release|Any CPU = Release|Any CPU | ||||
| EndGlobalSection | EndGlobalSection | ||||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||||
| {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Debug|Any CPU.ActiveCfg = Release|Any CPU | |||||
| {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Debug|Any CPU.Build.0 = Release|Any CPU | |||||
| {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
| {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
| {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Release|Any CPU.ActiveCfg = Release|Any CPU | {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||
| {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Release|Any CPU.Build.0 = Release|Any CPU | {ED01BF6B-81D2-46D8-B89D-6570F53C38B8}.Release|Any CPU.Build.0 = Release|Any CPU | ||||
| EndGlobalSection | EndGlobalSection | ||||
| @@ -1,4 +1,4 @@ | |||||
| <Project Sdk="Microsoft.NET.Sdk"> | |||||
| <Project Sdk="Microsoft.NET.Sdk"> | |||||
| <PropertyGroup> | <PropertyGroup> | ||||
| <OutputType>Exe</OutputType> | <OutputType>Exe</OutputType> | ||||
| @@ -23,6 +23,7 @@ | |||||
| <PackageReference Include="Selenium.Support" Version="3.141.0" /> | <PackageReference Include="Selenium.Support" Version="3.141.0" /> | ||||
| <PackageReference Include="Selenium.WebDriver" Version="3.141.0" /> | <PackageReference Include="Selenium.WebDriver" Version="3.141.0" /> | ||||
| <PackageReference Include="System.Data.SQLite.Core" Version="1.0.113.7" /> | <PackageReference Include="System.Data.SQLite.Core" Version="1.0.113.7" /> | ||||
| <PackageReference Include="WebDriverManager" Version="2.17.4" /> | |||||
| </ItemGroup> | </ItemGroup> | ||||
| <ItemGroup> | <ItemGroup> | ||||
| @@ -41,9 +42,6 @@ | |||||
| </ItemGroup> | </ItemGroup> | ||||
| <ItemGroup> | <ItemGroup> | ||||
| <None Update="chromedriver.exe"> | |||||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||||
| </None> | |||||
| <None Update="log4net.config"> | <None Update="log4net.config"> | ||||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||
| </None> | </None> | ||||
| @@ -265,14 +265,14 @@ namespace CSVDownloader { | |||||
| } | } | ||||
| // HelloTechno(GMO) | // HelloTechno(GMO) | ||||
| { | { | ||||
| var controller = new GMOController(driver_); | |||||
| if (!hasParam_ || paramAgentCode_ == controller.GetCreditAgentCode()) { | |||||
| var dic = parking_credit_card_agencies_spotID_dao_.GetDictionary(controller.GetCreditAgent()); | |||||
| controller.SetParkingDic(dic); | |||||
| web_controller_list_.Add(controller); | |||||
| credit_datastore_map_.Add(controller.GetCreditAgent(), gmo_credit_store_); | |||||
| electronic_money_datastore_map_.Add(controller.GetCreditAgent(), gmo_electronic_money_store_); | |||||
| } | |||||
| //var controller = new GMOController(driver_); | |||||
| //if (!hasParam_ || paramAgentCode_ == controller.GetCreditAgentCode()) { | |||||
| // var dic = parking_credit_card_agencies_spotID_dao_.GetDictionary(controller.GetCreditAgent()); | |||||
| // controller.SetParkingDic(dic); | |||||
| // web_controller_list_.Add(controller); | |||||
| // credit_datastore_map_.Add(controller.GetCreditAgent(), gmo_credit_store_); | |||||
| // electronic_money_datastore_map_.Add(controller.GetCreditAgent(), gmo_electronic_money_store_); | |||||
| //} | |||||
| } | } | ||||
| @@ -286,7 +286,9 @@ namespace CSVDownloader { | |||||
| // 実行対象日判定 | // 実行対象日判定 | ||||
| if (!web_controller.IsWorkDate()) { | |||||
| if (hasParam_) { | |||||
| logger_.Info($"起動引数ありのため実行対象日判定をスキップ"); | |||||
| } else if (!web_controller.IsWorkDate()) { | |||||
| logger_.Info($"処理対象日外:{ web_controller.GetCreditAgent()}"); | logger_.Info($"処理対象日外:{ web_controller.GetCreditAgent()}"); | ||||
| return result_code; | return result_code; | ||||
| } | } | ||||
| @@ -0,0 +1,7 @@ | |||||
| { | |||||
| "profiles": { | |||||
| "CSVDownloader": { | |||||
| "commandName": "Project" | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -27,8 +27,9 @@ namespace CSVDownloader.Store.CreditCSVData { | |||||
| Developer, | Developer, | ||||
| AdjustType, | AdjustType, | ||||
| FeeType, | FeeType, | ||||
| ReceptionDatetime, | |||||
| ReceptionDatetime = 6, | |||||
| Amount, | Amount, | ||||
| ReceiptNo, | |||||
| ReceptionNo, | ReceptionNo, | ||||
| ResponseNo, | ResponseNo, | ||||
| ErrorCode1, | ErrorCode1, | ||||
| @@ -20,7 +20,7 @@ namespace CSVDownloader.Store.ElectronicMoneyDataStore { | |||||
| public enum ColName { | public enum ColName { | ||||
| SpotID = 100, | SpotID = 100, | ||||
| ParkingName = 0, | ParkingName = 0, | ||||
| ReceptionDatetime, | |||||
| ReceptionDatetime = 3, | |||||
| AdjustType, | AdjustType, | ||||
| Amount, | Amount, | ||||
| TradeID, | TradeID, | ||||
| @@ -22,7 +22,7 @@ namespace CSVDownloader.Store.QRCSVData { | |||||
| SpotID = 100, | SpotID = 100, | ||||
| ParkingName = 0, | ParkingName = 0, | ||||
| Developer, | Developer, | ||||
| ReceptionDatetime, | |||||
| ReceptionDatetime = 4, | |||||
| Company, | Company, | ||||
| Amount, | Amount, | ||||
| AdjustNo, | AdjustNo, | ||||
| @@ -8,6 +8,9 @@ using OpenQA.Selenium.Chrome; | |||||
| using OpenQA.Selenium.Support.UI; | using OpenQA.Selenium.Support.UI; | ||||
| using SeleniumExtras.WaitHelpers; | using SeleniumExtras.WaitHelpers; | ||||
| using WebDriverManager; | |||||
| using WebDriverManager.DriverConfigs.Impl; | |||||
| namespace CSVDownloader.Web { | namespace CSVDownloader.Web { | ||||
| class DriverFactory { | class DriverFactory { | ||||
| public static ChromeDriver GetDriver() { | public static ChromeDriver GetDriver() { | ||||
| @@ -15,10 +18,14 @@ namespace CSVDownloader.Web { | |||||
| var options = new ChromeOptions(); | var options = new ChromeOptions(); | ||||
| // options.AddArgument("--headless"); | // options.AddArgument("--headless"); | ||||
| options.BinaryLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\chrome-win64\\chrome.exe"; | |||||
| //options.BinaryLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\chrome-win64\\chrome.exe"; | |||||
| String download_dir = GetTmpDownloadDir(); | String download_dir = GetTmpDownloadDir(); | ||||
| options.AddUserProfilePreference("download.default_directory", download_dir); | options.AddUserProfilePreference("download.default_directory", download_dir); | ||||
| ChromeDriver driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), options); | |||||
| //ChromeDriver driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), options); | |||||
| new DriverManager().SetUpDriver(new ChromeConfig()); | |||||
| ChromeDriver driver = new ChromeDriver(options); | |||||
| WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); | WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); | ||||
| @@ -226,25 +226,21 @@ namespace CSVDownloader.Web { | |||||
| continue; | continue; | ||||
| } | } | ||||
| if (failed_flg) { | |||||
| if (failed_flg) { | |||||
| var error_list = new List<Store.ParkingCreditCardAgenciesSpotIDError>(); | |||||
| logger_.Error("失敗駐車場名"); | |||||
| foreach (var ele in failed_parking_name_hs_table) { | |||||
| error_list.Add(new Store.ParkingCreditCardAgenciesSpotIDError() { | |||||
| creditcard_agencies_id = CreditAgenciesMap.GetID(agent_), | |||||
| creditcard_agencies_spot_name = ele | |||||
| }); | |||||
| logger_.Error($"駐車場 \"{ele}\""); | |||||
| } | |||||
| throw new SpotNameNotMatchException(error_list); | |||||
| } | |||||
| } | |||||
| if (failed_flg) { | |||||
| var error_list = new List<Store.ParkingCreditCardAgenciesSpotIDError>(); | |||||
| logger_.Error("失敗駐車場名"); | |||||
| foreach (var ele in failed_parking_name_hs_table) { | |||||
| error_list.Add(new Store.ParkingCreditCardAgenciesSpotIDError() { | |||||
| creditcard_agencies_id = CreditAgenciesMap.GetID(agent_), | |||||
| creditcard_agencies_spot_name = ele | |||||
| }); | |||||
| logger_.Error($"駐車場 \"{ele}\""); | |||||
| } | } | ||||
| throw new SpotNameNotMatchException(error_list); | |||||
| } | } | ||||
| return result_list; | return result_list; | ||||
| } | } | ||||