Procházet zdrojové kódy

ZEUS、DAITO対応

master
sosuke.iwabuchi před 1 rokem
rodič
revize
af75389fb9
10 změnil soubory, kde provedl 47 přidání a 36 odebrání
  1. +2
    -2
      CSVDownloader.sln
  2. +2
    -4
      CSVDownloader/CSVDownloader.csproj
  3. +11
    -9
      CSVDownloader/Program.cs
  4. +7
    -0
      CSVDownloader/Properties/launchSettings.json
  5. +2
    -1
      CSVDownloader/Store/CreditCSVData/DaitoCreitDataStore.cs
  6. +1
    -1
      CSVDownloader/Store/ElectricMoneyCSVData/DaitoElectronicMoneyDataStore.cs
  7. +1
    -1
      CSVDownloader/Store/QRCSVData/DaitoQRDataStore.cs
  8. +9
    -2
      CSVDownloader/Web/DriverFactory.cs
  9. +12
    -16
      CSVDownloader/Web/ZeusController.cs
  10. binární
      CSVDownloader/chromedriver.exe

+ 2
- 2
CSVDownloader.sln Zobrazit soubor

@@ -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


+ 2
- 4
CSVDownloader/CSVDownloader.csproj Zobrazit soubor

@@ -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>


+ 11
- 9
CSVDownloader/Program.cs Zobrazit soubor

@@ -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;
} }


+ 7
- 0
CSVDownloader/Properties/launchSettings.json Zobrazit soubor

@@ -0,0 +1,7 @@
{
"profiles": {
"CSVDownloader": {
"commandName": "Project"
}
}
}

+ 2
- 1
CSVDownloader/Store/CreditCSVData/DaitoCreitDataStore.cs Zobrazit soubor

@@ -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,


+ 1
- 1
CSVDownloader/Store/ElectricMoneyCSVData/DaitoElectronicMoneyDataStore.cs Zobrazit soubor

@@ -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,


+ 1
- 1
CSVDownloader/Store/QRCSVData/DaitoQRDataStore.cs Zobrazit soubor

@@ -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,


+ 9
- 2
CSVDownloader/Web/DriverFactory.cs Zobrazit soubor

@@ -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));




+ 12
- 16
CSVDownloader/Web/ZeusController.cs Zobrazit soubor

@@ -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;
} }




binární
CSVDownloader/chromedriver.exe Zobrazit soubor


Načítá se…
Zrušit
Uložit