From eb6bdf43a0081dcf86a874147bb2bc6d6eb35188 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Tue, 17 Dec 2019 15:24:24 +0800 Subject: [PATCH] ... --- .../CarDealerAchievement.h | 227 +++++++++++++++++- .../CarDealerScheme/CarDealerScheme.h | 13 + 2 files changed, 239 insertions(+), 1 deletion(-) diff --git a/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerAchievement/CarDealerAchievement.h b/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerAchievement/CarDealerAchievement.h index 0be407a..2903573 100644 --- a/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerAchievement/CarDealerAchievement.h +++ b/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerAchievement/CarDealerAchievement.h @@ -1,5 +1,230 @@ #pragma once + +#include + class CarDealerAchievement { -}; +public: + CarDealerAchievement( const std::wstring & theYear, + const std::wstring & theMonth, + const std::wstring & carDealerCode, + const long double checkedAchievement, + const int policyAmount, + const int cpicAmount, + const int piccAmount, + const int pinganAmount, + const int othersAmount ) + : theYear( theYear ), + theMonth( theMonth ), + carDealerCode( carDealerCode ), + checkedAchievement( checkedAchievement ), + policyAmount( policyAmount ), + cpicAmount( cpicAmount ), + piccAmount( piccAmount ), + pinganAmount( pinganAmount ), + othersAmount( othersAmount ) + { + } + + CarDealerAchievement( const wchar_t * theYear, + const wchar_t * theMonth, + const wchar_t * carDealerCode, + const long double checkedAchievement, + const int policyAmount, + const int cpicAmount, + const int piccAmount, + const int pinganAmount, + const int othersAmount ) + : theYear( theYear ), + theMonth( theMonth ), + carDealerCode( carDealerCode ), + checkedAchievement( checkedAchievement ), + policyAmount( policyAmount ), + cpicAmount( cpicAmount ), + piccAmount( piccAmount ), + pinganAmount( pinganAmount ), + othersAmount( othersAmount ) + { + } + + + CarDealerAchievement( const CarDealerAchievement & other ) + : theYear( other.theYear ), + theMonth( other.theMonth ), + carDealerCode( other.carDealerCode ), + checkedAchievement( other.checkedAchievement ), + policyAmount( other.policyAmount ), + cpicAmount( other.cpicAmount ), + piccAmount( other.piccAmount ), + pinganAmount( other.pinganAmount ), + othersAmount( other.othersAmount ) + { + } + + CarDealerAchievement( CarDealerAchievement && other ) + : theYear( std::move(other.theYear) ), + theMonth( std::move(other.theMonth) ), + carDealerCode( std::move(other.carDealerCode) ), + checkedAchievement( other.checkedAchievement ), + policyAmount( other.policyAmount ), + cpicAmount( other.cpicAmount ), + piccAmount( other.piccAmount ), + pinganAmount( other.pinganAmount ), + othersAmount( other.othersAmount ) + { + } + + CarDealerAchievement & operator=( const CarDealerAchievement & other ) + { + if ( this == &other ) + return *this; + theYear = other.theYear; + theMonth = other.theMonth; + carDealerCode = other.carDealerCode; + checkedAchievement = other.checkedAchievement; + policyAmount = other.policyAmount; + cpicAmount = other.cpicAmount; + piccAmount = other.piccAmount; + pinganAmount = other.pinganAmount; + othersAmount = other.othersAmount; + return *this; + } + + CarDealerAchievement & operator=( CarDealerAchievement && other ) + { + if ( this == &other ) + return *this; + theYear = std::move( other.theYear ); + theMonth = std::move( other.theMonth ); + carDealerCode = std::move( other.carDealerCode ); + checkedAchievement = other.checkedAchievement; + policyAmount = other.policyAmount; + cpicAmount = other.cpicAmount; + piccAmount = other.piccAmount; + pinganAmount = other.pinganAmount; + othersAmount = other.othersAmount; + return *this; + } + + + friend bool operator==( const CarDealerAchievement & lhs, const CarDealerAchievement & rhs ) + { + return lhs.theYear == rhs.theYear + && lhs.theMonth == rhs.theMonth + && lhs.carDealerCode == rhs.carDealerCode + && lhs.checkedAchievement == rhs.checkedAchievement + && lhs.policyAmount == rhs.policyAmount + && lhs.cpicAmount == rhs.cpicAmount + && lhs.piccAmount == rhs.piccAmount + && lhs.pinganAmount == rhs.pinganAmount + && lhs.othersAmount == rhs.othersAmount; + } + + friend bool operator!=( const CarDealerAchievement & lhs, const CarDealerAchievement & rhs ) + { + return !(lhs == rhs); + } + + + std::wstring getTheYear() const + { + return theYear; + } + + void setTheYear( const std::wstring & theYear ) + { + this->theYear = theYear; + } + + std::wstring getTheMonth() const + { + return theMonth; + } + + void setTheMonth( const std::wstring & theMonth ) + { + this->theMonth = theMonth; + } + + std::wstring getCarDealerCode() const + { + return carDealerCode; + } + + void setCarDealerCode( const std::wstring & carDealerCode ) + { + this->carDealerCode = carDealerCode; + } + + long double getCheckedAchievement() const + { + return checkedAchievement; + } + + void setCheckedAchievement( const long double checkedAchievement ) + { + this->checkedAchievement = checkedAchievement; + } + + int getPolicyAmount() const + { + return policyAmount; + } + + void setPolicyAmount( const int policyAmount ) + { + this->policyAmount = policyAmount; + } + + int getCpicAmount() const + { + return cpicAmount; + } + + void setCpicAmount( const int cpicAmount ) + { + this->cpicAmount = cpicAmount; + } + + int getPiccAmount() const + { + return piccAmount; + } + + void setPiccAmount( const int piccAmount ) + { + this->piccAmount = piccAmount; + } + + int getPinganAmount() const + { + return pinganAmount; + } + + void setPinganAmount( const int pinganAmount ) + { + this->pinganAmount = pinganAmount; + } + + int getOthersAmount() const + { + return othersAmount; + } + + void setOthersAmount( const int othersAmount ) + { + this->othersAmount = othersAmount; + } + +private: + std::wstring theYear; + std::wstring theMonth; + std::wstring carDealerCode; + long double checkedAchievement; + int policyAmount; + int cpicAmount; + int piccAmount; + int pinganAmount; + int othersAmount; +}; diff --git a/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerScheme/CarDealerScheme.h b/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerScheme/CarDealerScheme.h index 0e514b9..c91d2d2 100644 --- a/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerScheme/CarDealerScheme.h +++ b/代码/cpp/car_dealer_util/source/Data/Datastructure/CarDealerScheme/CarDealerScheme.h @@ -1,6 +1,19 @@ #pragma once +#include + class CarDealerScheme { +public: + +private: + std::wstring theYear; + std::wstring theMonth; + std::wstring carDealerCode; + std::wstring manHourPrice; + std::wstring partPrice; + std::wstring claimSupport; //理赔支持 + std::wstring scheme; + std::wstring isQualified; //是否达成预期 };