Commit 22f7984b authored by 黄重's avatar 黄重

去掉不用插件

parent c38ba585
# \u89d2\u8272
EXPERT=\u8bc4\u6807\u4e13\u5bb6
EVALUATION_MANAGER=\u8bc4\u6807\u7ba1\u7406
OPENING_MANAGER=\u5f00\u6807\u7ba1\u7406
EVALUATION_MONITOR=\u8bc4\u6807\u76d1\u7763
EVALUATOIN_WORKER=\u8bc4\u6807\u5de5\u4f5c\u4eba\u5458
SUPER_MANAGER=\u8d85\u7ea7\u7ba1\u7406\u5458
SYSTEM_MANAGER=\u7cfb\u7edf\u7ba1\u7406
# \u89d2\u8272
EXPERT=Evaluation Expert
EVALUATION_MANAGER=Bid Evaluation Management
OPENING_MANAGER=Bid Opening Management
EVALUATION_MONITOR=Bid Evaluation Supervision
EVALUATOIN_WORKER=Bid Evaluation Staff
SUPER_MANAGER=Administrator
SYSTEM_MANAGER=System Management
# \u89d2\u8272
EXPERT=\u8bc4\u6807\u4e13\u5bb6
EVALUATION_MANAGER=\u8bc4\u6807\u7ba1\u7406
OPENING_MANAGER=\u5f00\u6807\u7ba1\u7406
EVALUATION_MONITOR=\u8bc4\u6807\u76d1\u7763
EVALUATOIN_WORKER=\u8bc4\u6807\u5de5\u4f5c\u4eba\u5458
SUPER_MANAGER=\u8d85\u7ea7\u7ba1\u7406\u5458
SYSTEM_MANAGER=\u7cfb\u7edf\u7ba1\u7406
MY_PROJECT=\u6211\u7684\u9879\u76ee
POLICY_LAW =\u6cd5\u5f8b\u6cd5\u89c4
PROJECT_INFO=\u9879\u76ee\u4fe1\u606f
PROJECT_BASE_INFO=\u57fa\u672c\u4fe1\u606f
SUPPLIER_INFO=\u6295\u6807\u4eba\u4fe1\u606f
BIDDING_FILE=\u62db\u6807\u6587\u4ef6
SELECT_PACKAGE=\u5207\u6362\u5305\u4ef6
DOWNLOAD_BID_FILE=\u4e0b\u8f7d\u6807\u4e66
BT_SEED_TORRENT=\u6807\u4e66BT\u53d1\u5e03
SYSTEM_MANAGE=\u7cfb\u7edf\u7ba1\u7406
BID_PRICE_MANAGE=\u6295\u6807\u4ef7\u7ba1\u7406
EVALUATION_PRICE_MANAGE=\u8bc4\u6807\u4ef7\u7ba1\u7406
BID_BOND_INFO=\u6295\u6807\u4fdd\u8bc1\u91d1
#\u4f9b\u5e94\u5546
SUPPLIER_MANAGE=\u4f9b\u5e94\u5546\u7ba1\u7406
SUPPLIER_SIGNIN=\u7b7e\u5230\u7ba1\u7406
SUPPLIER_SIGNIN_INFO=\u7b7e\u5230\u4fe1\u606f
#\u5f00\u6807\u5de5\u5177
OPENING_TOOL_PROJECT=\u5f00\u6807\u5de5\u5177\u9879\u76ee\u83dc\u5355
OPENING_TOP_PROJECT=\u5f00\u6807\u5de5\u5177\u9876\u90e8\u83dc\u5355
OPENING_PREPARE=\u5f00\u6807\u51c6\u5907
OPENING_SETTING=\u5f00\u6807\u8bbe\u7f6e
OPENING_HALL=\u5f00\u6807\u5927\u5385
OPENING_RESULT=\u5f00\u6807\u7ed3\u679c
OPENING_DECRYPT=\u5f00\u6807\u89e3\u5bc6
#\u8bc4\u6807\u7ba1\u7406
MANAGEMENT_TOOL_PROJECT=\u8bc4\u6807\u7ba1\u7406\u9879\u76ee\u83dc\u5355
MANAGEMENT_TOP_PROJECT=\u8bc4\u6807\u7ba1\u7406\u9876\u90e8\u83dc\u5355
EVAL_OPERATION=\u64cd\u4f5c\u6d41\u7a0b
OPENING_MANAGE=\u5f00\u6807\u7ba1\u7406
EVALUATON_MANAGE=\u8bc4\u6807\u7ba1\u7406
EVALUATON_RULE=\u8bc4\u6807\u89c4\u5219
EVALUATON_METHOD=\u8bc4\u6807\u529e\u6cd5
EVALUATON_STEP=\u8bc4\u6807\u6b65\u9aa4
EVALUATON_EXPERT=\u8bc4\u6807\u4e13\u5bb6
EVALUATON_WORKER=\u8bc4\u6807\u5de5\u4f5c\u4eba\u5458
EVALUATON_SUPERVISOR=\u8bc4\u6807\u76d1\u7763
CLARIFY_ANSWER=\u6f84\u6e05\u7b54\u7591
BIDDING_ANSWERS=\u7b54\u7591\u8865\u7591
BID_CLARIFY_ANSWERS=\u6f84\u6e05\u7b54\u590d
EVALUATION_RESULT=\u8bc4\u6807\u7ed3\u679c
EVALUATION_PROGRESS=\u8bc4\u6807\u8fdb\u5ea6
EVALUATION_OPINION=\u8bc4\u6807\u610f\u89c1
LIMIT_WINNING=\u9650\u4e2d\u6807\u63a8\u8350
EVALUATION_REPORT=\u8bc4\u6807\u62a5\u8868
BID_COMMENTS_AUDIT=\u6e05\u6807\u5ba1\u6838
WASTE_BID=\u9879\u76ee\u5e9f\u6807
UPLOAD_EVAL_RESULT=\u4e0a\u4f20\u8bc4\u6807\u7ed3\u679c
GENERATE_REPORT=\u751f\u6210\u62a5\u8868
SIGNATURE_REPORT=\u62a5\u8868\u7b7e\u540d
SUPERVISION=\u76d1\u7763\u7ba1\u7406
EVALUATION_HALL=\u8bc4\u6807\u5927\u5385
VIDEOMEETING=\u89c6\u9891\u4f1a\u8bae
SIGNATURE=\u626b\u7801\u7b7e\u7ae0
UPLOAD_BID_FILE=\u4e0a\u4f20\u6807\u4e66
#\u8bc4\u6807\u5de5\u5177
MY_PROJECT=My project
POLICY_LAW =Laws and Regulations
PROJECT_INFO=Project info
PROJECT_BASE_INFO=Base info
SUPPLIER_INFO=Supplier info
BIDDING_FILE=Bidding file
SELECT_PACKAGE=Select package
DOWNLOAD_BID_FILE=Download bid file
BT_SEED_TORRENT=BT seed torrent
SYSTEM_MANAGE=System
BID_PRICE=Bid price
BID_PRICE_MANAGE=Bid price manage
EVALUATION_PRICE_MANAGE=Eval price manage
BID_BOND_INFO=Bid bond info
#\u4f9b\u5e94\u5546
SUPPLIER_MANAGE=Supplier manage
SUPPLIER_SIGNIN=Sign-in manage
SUPPLIER_SIGNIN_INFO=Sign-in info
#\u5f00\u6807\u5de5\u5177
OPENING_TOOL_PROJECT=Opening project menu
OPENING_TOP_PROJECT=Opening top menu
OPENING_PREPARE=Opening prepare
OPENING_SETTING=Opening setting
OPENING_HALL=Opening hall
OPENING_RESULT=Opening result
OPENING_DECRYPT=Decrypt&Opening
#\u8bc4\u6807\u7ba1\u7406
MANAGEMENT_TOOL_PROJECT=Manage project menu
MANAGEMENT_TOP_PROJECT=Manage top menu
EVAL_OPERATION=Operation process
OPENING_MANAGE=Opening manage
EVALUATON_MANAGE=Eval manage
EVALUATON_RULE=Eval rule
EVALUATON_METHOD=Eval method
EVALUATON_STEP=Eval step
EVALUATON_EXPERT=Eval expert
EVALUATON_WORKER=Eval worker
EVALUATON_SUPERVISOR=Eval supervisor
CLARIFY_ANSWER=Clarify answer
BIDDING_ANSWERS=Bidding answers
BID_CLARIFY_ANSWERS=Tender answers
EVALUATION_RESULT=Eval result
EVALUATION_PROGRESS=Eval progress
EVALUATION_OPINION=Eval opinion
LIMIT_WINNING=Limit Winning
EVALUATION_REPORT=Eval report
BID_COMMENTS_AUDIT=Bid comments audit
WASTE_BID=Waste Bid
UPLOAD_EVAL_RESULT=Upload eval result
GENERATE_REPORT=Generate report
SIGNATURE_REPORT=Signature report
SUPERVISION=Supervision
EVALUATION_HALL=Eval hall
VIDEOMEETING=Video Meeting
SIGNATURE=Signature
UPLOAD_BID_FILE=Upload bid file
\ No newline at end of file
MY_PROJECT=\u6211\u7684\u9879\u76ee
POLICY_LAW =\u6cd5\u5f8b\u6cd5\u89c4
PROJECT_INFO=\u9879\u76ee\u4fe1\u606f
PROJECT_BASE_INFO=\u57fa\u672c\u4fe1\u606f
SUPPLIER_INFO=\u6295\u6807\u4eba\u4fe1\u606f
BIDDING_FILE=\u62db\u6807\u6587\u4ef6
SELECT_PACKAGE=\u5207\u6362\u5305\u4ef6
DOWNLOAD_BID_FILE=\u4e0b\u8f7d\u6807\u4e66
BT_SEED_TORRENT=\u6807\u4e66BT\u53d1\u5e03
SYSTEM_MANAGE=\u7cfb\u7edf\u7ba1\u7406
BID_PRICE_MANAGE=\u6295\u6807\u4ef7\u7ba1\u7406
EVALUATION_PRICE_MANAGE=\u8bc4\u6807\u4ef7\u7ba1\u7406
BID_BOND_INFO=\u6295\u6807\u4fdd\u8bc1\u91d1
#\u4f9b\u5e94\u5546
SUPPLIER_MANAGE=\u4f9b\u5e94\u5546\u7ba1\u7406
SUPPLIER_SIGNIN=\u7b7e\u5230\u7ba1\u7406
SUPPLIER_SIGNIN_INFO=\u7b7e\u5230\u4fe1\u606f
#\u5f00\u6807\u5de5\u5177
OPENING_TOOL_PROJECT=\u5f00\u6807\u5de5\u5177\u9879\u76ee\u83dc\u5355
OPENING_TOP_PROJECT=\u5f00\u6807\u5de5\u5177\u9876\u90e8\u83dc\u5355
OPENING_PREPARE=\u5f00\u6807\u51c6\u5907
OPENING_SETTING=\u5f00\u6807\u8bbe\u7f6e
OPENING_HALL=\u5f00\u6807\u5927\u5385
OPENING_RESULT=\u5f00\u6807\u7ed3\u679c
OPENING_DECRYPT=\u5f00\u6807\u89e3\u5bc6
#\u8bc4\u6807\u7ba1\u7406
MANAGEMENT_TOOL_PROJECT=\u8bc4\u6807\u7ba1\u7406\u9879\u76ee\u83dc\u5355
MANAGEMENT_TOP_PROJECT=\u8bc4\u6807\u7ba1\u7406\u9876\u90e8\u83dc\u5355
EVAL_OPERATION=\u64cd\u4f5c\u6d41\u7a0b
OPENING_MANAGE=\u5f00\u6807\u7ba1\u7406
EVALUATON_MANAGE=\u8bc4\u6807\u7ba1\u7406
EVALUATON_RULE=\u8bc4\u6807\u89c4\u5219
EVALUATON_METHOD=\u8bc4\u6807\u529e\u6cd5
EVALUATON_STEP=\u8bc4\u6807\u6b65\u9aa4
EVALUATON_EXPERT=\u8bc4\u6807\u4e13\u5bb6
EVALUATON_WORKER=\u8bc4\u6807\u5de5\u4f5c\u4eba\u5458
EVALUATON_SUPERVISOR=\u8bc4\u6807\u76d1\u7763
CLARIFY_ANSWER=\u6f84\u6e05\u7b54\u7591
BIDDING_ANSWERS=\u7b54\u7591\u8865\u7591
BID_CLARIFY_ANSWERS=\u6f84\u6e05\u7b54\u590d
EVALUATION_RESULT=\u8bc4\u6807\u7ed3\u679c
EVALUATION_PROGRESS=\u8bc4\u6807\u8fdb\u5ea6
EVALUATION_OPINION=\u8bc4\u6807\u610f\u89c1
LIMIT_WINNING=\u9650\u4e2d\u6807\u63a8\u8350
EVALUATION_REPORT=\u8bc4\u6807\u62a5\u8868
BID_COMMENTS_AUDIT=\u6e05\u6807\u5ba1\u6838
UPLOAD_EVAL_RESULT=\u4e0a\u4f20\u8bc4\u6807\u7ed3\u679c
GENERATE_REPORT=\u751f\u6210\u62a5\u8868
SIGNATURE_REPORT=\u62a5\u8868\u7b7e\u540d
SUPERVISION=\u76d1\u7763\u7ba1\u7406
EVALUATION_HALL=\u8bc4\u6807\u5927\u5385
#\u8bc4\u6807\u5de5\u5177
This source diff could not be displayed because it is too large. You can view the blob instead.
Comma =,
Period=.
Semicolon=;
Exclamatory=!
Colon=:
# Certificate of Authorization
Cert_applyCert = Application for use
Cert_importCert = Import authorization certificate
Cert_expiredTips = Your authorization certificate has expired. Please contact {0}.
Cert_invalidTips = Your authorization certificate is invalid. Please contact {0}.
Cert_expiryTips = The current authorization certificate will expire in {0} days!
Cert_unauthorizedMachine = is not an authorization file for the current device {0}. Please contact {1}.
# Dialog Box
Dialog_warmTips = Warm tips
Dialog_deleteTips = Delete tips
Dialog_close = Close
Dialog_closedCountdown=Close in {0} seconds!
Config_systemConfig=System config
Config_basicConfiguration=Basic config
Config_moreConfiguration=More config
Config_propertyConfiguration=Param config
Config_liveBroadcastConfiguration=Live broadcast config
Config_baiduLiveBroadcast=BaiDu live
Config_liveStreamName=Live stream name
Config_otherLiveAddress=Other live address
Config_copyLiveAddress=Copy live address
Config_videoConfiguration=Video config
Config_versionChecking=Version checking
Config_checkNewVersion = Check the new version at startup
Config_productFinal=Release version
Config_productTest=Beta version
Config_obeServer=OBE Server
Config_tradingPlatform=Trading platform
Config_platformName=Name
Config_platformCode=Code
Config_fileDir=File cache dir
Config_fileLoadingCaches=File loading caches
Config_platformCode=Code
Config_signatureType = Electronic Signature
Config_language = Language
Config_languageSimpleChinese = Simple Chinese
Config_languageEnglish = English
Config_pdfViewControl = PDF load control
Config_time = System time
Config_dataServerTime = Data server time
Config_timeServerTime = Timestamp Server Time
Config_ftpServer=FTP Server
Config_ftpUser=User
Config_encoding=Encoding
Config_encodingTo=to
Config_btServer=BT Server
Config_url=Interface URL
Config_urlEncoder=Transcoding the URL Encoder
Config_zipEncoder=ZIP(RAR) Encoder
Config_saveTips=Successful configuration modification, system restart will take effect!
Config_setProxy=Set Proxy
System=System
LoginDialog_logoIco=icons/login/logo.png
LoginDialog_bidOpeningTitle = Opening hall
LoginDialog_accountCanceled = The account has been cancelled!
LoginDialog_accountLogin = Account login
LoginDialog_caLogin=CA login
LoginDialog_accountInput = Please enter a user name
LoginDialog_btn_notUpdate = Upgrade later
LoginDialog_btn_update= Upgrade
LoginDialog_passwordError = Account or password error, please re-enter!
LoginDialog_passwordInput= Please enter your password
LoginDialog_login = Login
LoginDialog_caLoginTips = If you know and are willing to comply with the CA Usage Specification, please click "Login" to enter.
LoginDialog_installCaDriverTips = If your computer has not yet installed a USBKey driver, install it first.
LoginDialog_closeSystem = Closed
LoginDialog_connectionFail = Server Connection Failed!
LoginDialog_editConfig = Modify configuration
LoginDialog_environment = Environment detection
LoginDialog_newVersionChecking = Is checking for the latest version, please wait a moment.
LoginDialog_checkedNewVersion = New version detected!
LoginDialog_checkedNewVersionTips = Detects a new version and can't continue using it until it's upgraded!
LoginDialog_noAuthority = You do not have login rights!
LoginDialog_notExistAccount = This account does not exist!
LoginDialog_notExistUser = There is no such user!
LoginDialog_reStart = Restart
LoginDialog_selectCa= Select Certificate
LoginDialog_selectCaType = Select CA type
LoginDialog_serverChecking = Connecting to the server, please wait a moment.
LoginDialog_updateTips = New version detected, upgrade or not!
LoginDialog_updateTitle = System Upgrade
LoginDialog_userCanceled = The account has been cancelled!
LoginDialog_versionChecking = Checking the host version information, please wait a moment.
LoginDialog_machineCode = Location identification code
LoginDialog_machineIP=IP
LoginDialog_cardLoginFail= IDCard [{0}] login failed!
LoginDialog_alreadyLogged= The account is logged in at {0} on device {1}. Is it mandatory to log in?
LoginDialog_notAllowed = Bid evaluation room does not have this location information, do not allow the use of this location, click "Application for Use" or contact management! (The location information has been copied to the clipboard)
MainDialog_myProject = My project
MainDialog_policyLaw = Laws and Regulations
TenderProjectListComposite_myProject = My Project
TenderProjectListComposite_search= Search
TenderProjectListComposite_searchProject= Enter the name or code of the project!
TenderProjectListComposite_config= Settings
TenderProjectListComposite_openingFinished=Bid opening completed
TenderProjectListComposite_openingNotFinished=No bid opening completed
TenderProjectListComposite_allProject=All projects
TenderProjectListComposite_unfinished = Unfinished projects
TenderProjectListComposite_finished = Finished projects
TenderProjectListComposite_inProgress = In progress projects
TenderProjectListComposite_inputPageSize = Enter the number of items displayed per page
TenderProjectListComposite_downloadProject = Download Project
TenderProjectListComposite_synchronizeProject = Synchronize Project
TenderProjectListComposite_more = More
TenderProjectListComposite_moreOperate = More Operations
TenderProjectListComposite_importProject = Import Project
TenderProjectListComposite_addProject = New Project
TenderProjectListComposite_configPageSize = Set Paging
TenderProjectListComposite_importProjectTips = Please select the bidding project
TenderProjectListComposite_setFinishTips = Are you sure you want to mark [{0}] {1} as colsed state?
TenderProjectListComposite_setFinishBackTips = Are you sure you want to mark [{0}] {1} as in-progress?
TenderProjectListComposite_deleteProjectTips = Are you sure you want to delete [{0}] {1}?
Evaluation_myEvaluationTips = Please complete all bid evaluation tasks according to the following arrow order!
Evaluation_avoidTips = You have chosen to avoid, you can not conduct any bid evaluation operation!
Evaluation_limitCountTips = The number of bid evaluation experts must be an odd number more than {0}!
Evaluation_moreBiddingManagerTips = The number of bidding representatives shall not be more than one third of the number of bid evaluation experts!
Evaluation_noOpeningTips = The economic bid has not been opened yet. The current evaluation operation cannot be carried out!
Evaluation_noStartTimeTips = Bid evaluation cannot be performed before the time of bid evaluation!
Evaluation_wasteTips = The current project has been abandoned, no bid evaluation operation can be carried out!
Evaluation_notFindDisciplineTips = No bid evaluation discipline document was found!
# Title
Title_signupSupplierList = Registered {0} list
Title_list={0} list
Title_view =View {0}
Title_create =Add {0}
Title_edit =Modify {0}
Title_delete =Delete {0}
Title_select =Select {0}
Title_selected =Selected {0}
Title_dropDownOptions = drop-down options
Title_name ={0} name
Title_expertInfo = Expert information
Title_loginInfo = Login information
Title_basicRules=Basic rules
Title_bidEvaluationRules=Eval rules
Title_progressControl=Progress control
Title_biddingFileRequir=Bidding file requir
Title_bidCancelledOpinion=Bid cancelled opinion
Title_evaluationOpinion=Eval opinion
Title_commonOpinions=Common opinions
Title_selectSupplierAndInputOpinion=Select a {0} and enter opinion for it
Title_supplierEvaluationOpinion=[{0}] is entering {2} for [{1}]
Title_currentSupplier=Current {0}
Title_bidFileLoadCache=Bid file load caches
Title_bidFileLoadSetting=Bid file load setting
Title_evalViewSetting=Eval view setting
Title_bidResponse=Bid response
Title_bidResponse=Return reason history
Title_reBackReason=Return reason
Title_hisReBackReason=Return reason history
Title_reauthorizeEvaluationReason=Reauthorize reason
#weak
Weak_sun=Sun
Weak_mon=Mon
Weak_tues=Tues
Weak_wed=Wed
Weak_thur=Thur
Weak_fri=Fri
Weak_sat=Sat
Weak_sunday=Sunday
Weak_monday=Monday
Weak_tuesday=Tuesday
Weak_wednesday=Wednesday
Weak_thursday=Thursday
Weak_friday=Friday
Weak_saturday=Saturday
Time_D=D
Time_day=Day
Time_H=H
Time_hour=Hour
Time_M=M
Time_minute=Minute
Time_S=S
Time_second=Second
Date_today=today
Date_nearlyDays=Nearly {0} days
Date_thisWeek=This week
Date_lastWeek=Last week
Date_nextWeek=Next week
Date_thisMonth=This month
Date_lastMonth=Last month
Date_nextMonth=Next month
Date_all=All
Status=Status
Required=Required
NoRequired=Non required
RevokeStatus_yes=Bid cancelled
RevokeStatus_no=Effective
OpeningStatus_opend=Opening complate
OpeningStatus_opening=In opening
OpeningStatus_success=Opening success
OpeningStatus_fail=Opening failure
OpeningStatus_none=No opening
Progress_complate=Complate
Progress_noComplate=uncomplate
Progress_noStart=Not started
Progress_inProgress=In progress
Progress_stop=Stopped
Progress_inAudit=In audit
Progress_pendingAudit=Audit
Progress_pendingAuditFormat=Waiting for {0} audit
Progress_auditComplate=Audit complete
Progress_reBack=Returned
UploadStatus_yes=Uploaded
UploadStatus_no=Not uploaded
Status_noTender = No tender
SignInStatus_yes=Sign in
SignInStatus_no=No sign in
SignInStatus_avoid=Avoid
Decrypt_yes=Decrypted
Decrypt_no=Undecrypted
Decrypt_success=Success
Decrypt_fail=failed
ConfirmStatus=Confirm status
Confirm_yes=Confirmed
Confirm_no=Unconfirmed
Confirm_timeOutAndNo=Timeout
Confirm_question=Question
Confirm_toBe=To be confirm
NoBidPrice=No bid Price
Audit_adopt=Adopt
Audit_return=Return
Setup_yes=seted
Setup_no=not set
Setup_yesFormat={0} has been set
Setup_noFormat={0} not set
Logged_in=Logged in
NotLogged_in=Not logged
Exist=Exist
NotExist=Not exist
Opening_ecryptable=Ecryptable
Opening_canOpening=Tenders
Opening_totalTenders=Tenders
Opening_complated=Complated
Opening_tendered=Tendered
Opening_signedIn=Signed
Opening_decrypted=Decrypted
Opening_confirmed=Confirmed
Opening_counts=Nums
Opening_packCount=Packs
Opening_reBidPriceTotal=Total
Opening_reBidPriceComplate=Complate
Start_yes=Started
Start_no=Not started
Invited_yes=Invited
Invited_no=Not invited
Invited_canceled=Canceled
Signature_yes=Signed
Signature_no=Not signed
SystemType=System
CustomType=Custom
# Formatting
Format_dateTimeStr=yyyy-MM-dd HH:mm:ss
Format_dateCnStr=MMM d, yyyy
Format_dateMinuteCNStr=yyyy-MM-dd HH:mm
Format_dateStr=MMM d, yyyy
# Verification
Verify_cardInvalid={0} is not a valid IDCard!
# System
Concat=
About = About
You=You
Others=Others
Welecome={0}, welcome!
Restart = Restart
Quit = Exit
LogOff = Log off
More = More
PasswordModify = Modify password
PasswordReset = Reset password
UserRole = Role
ModifyUserInfo = Modify personal information
BiddingCa = Binding CA
Product_name = Electronic bid opening system
Product_slogan = Fairness. Openness. Justice
TechnicalSupport = Technical Support: Beijing Guoxin Innovation Technology Co., Ltd.
Terminal_evaluation = Bid evaluation tool
Terminal_system = System management tool
Terminal_management = Evaluation management tool
Terminal_bidopening = Bid opening tool
Terminal_assistopening = Self-help bid opening tool
Terminal_supervise = Supervision and management
Login_reLoginTips={0} has been forcibly logged out. Do you want to log in again?
Login_reLogin = Re-login
Login_closeSystem = Shut down the system
Login_ip=Login IP
Login_status=Status
Login_time=Login time
# Enumeration
TenderProject = Project
TenderPackage = Bid segment
SubPackage = Package
Supplier = Supplier
Tender = Supplier
Expert = Expert
EvalExpert=Eval experts
Account_temp=Temporary account
Initialize_password=Initialize password
ProjectManager = Project manager
Supervisor=Supervisor
PurchaseSupervisor=Purchase supervisor
Worker=Worker
MoneyUnit=Money unit
BusinessBid=Business bid
TechnologyBid=Technology bid
BusinessTechnologyBid=BUS&TEC bid
EconomicBid=Economic bid
BidOpening = Bid opening
Opening = Open
Account=Account
Password=Password
PasswordConfirm=Confirm password
PasswordDefault= Default password
Money_yuan = Yuan
Money_wanYuan = Wan Yuan
BidDocument=Bid document
BiddingFile=Bidding file
BidFile=Bid file
Message=Message
Notice=Notice
SystemMessage=Messages
ClarificationAnswer=Clarification answer
ClarificationAnswerContent=Clarification answer content
ClarifyFile=Clarify file
ClarificationAnswerDocuments=Clarification answer documents
Answers=Answers
AnswerAttachment=Answer ATT
ReplyState=Reply state
Questions=Questions
QuestionAttachment=Question ATT
Addendums=Addendums
AddendumContent=Content
Title=Title
AboutAttachment=Attachments
QuestionDescribe=Question
Submitter=Submitter
SubmitOrg=SubmitOrg
SubmitTime=SubmitTime
BidEvaluation = Bid evaluation
EvaluationOperation = Operation process
EvaluationCheck = Evaluation check
GenerateEvaluationReport = Generate evaluation report
Factor_factor=Factor
Factor_compliance=Compliance factor
Factor_score=Score factor
Factor_price=Price factor
Factor_bill=Bill factor
Factor_credit=Credit factor
Step_step=Eval step
Step_signIn=Signing
Step_feature=Feature check
Step_compliance=Compliance eval
Step_score=Score eval
Step_detail=Detail eval
Step_price=Price eval
Step_bill=Bill eval
Step_billCheck=Bill clear
Step_credit=Credit eval
Step_multiPrice=Multi price
Step_editPrice=Correct price
Step_recommonedSort=Recommended sort
Step_reject=Veto tender
Step_recommoned=Recommoned
Step_bidComment=Bid file comments
Step_busComment=BUS comments
Step_tecComment=TEC comments
Step_priceCcompar=Price compar
Step_checkPrice=Check price
Step_limitPrice=Limited price
Step_wasteBidding=Waste Bidding
Verify_expert_info=Verify expert infomation
Local_import=Local import
Project_library_import=Project library import
AllExpertList=All expert list
CurrentProjectExperts=The current project experts
PackagesNum=Pack nums
RecommendedNum=Recommended nums
# Attributes
IP=IP
Port=Port
Yes=Yes
No=No
FullName=Full name
Gender=Gender
Male=male
Female=Female
IDCard=IDCard
Specialty=Specialty
ProfessionalTitle=PRO title
WorkCompany=Company
Attachment=Attachment
AttachmentName=Attachment name
File=File
FileName=File name
BidOpeningRoom = Bid opening room
BidOpeningAddress = Bid opening address
EvaluationRoom=Evaluation room
EvaluationAddress=Evaluation address
BidOpeningTime = Bid opening time
BidOpeningTimeOnBoard=Opening
CountdownOnBoard=Countdown
CheckInEndTime = Sign-in deadline
DecryptEndTime = Decrypt deadline
Deadline = Deadline
LedTitle=LED Title
LedScrollType=LED scroll type
LedScrollCyclic=Scroll cyclic
LedScrollByItem=Scroll by item
LedScrollOffset=Scroll offset
LedScrollSpeech=Scroll speech
LedScrollMessage=Scroll message
SpeechRate=Speech rate
Slow=Slow
Fast=Fast
Big=Big
Small=Small
SingOption=Sing option
SingFormat=Sing{0}
SingFilter=Singing filter
SingFilterTitle=Filter bracketed content in title eg:[bid security (yes, no)]
SingStartContent= Start singing
SingEndContent=End singing
SingReplace=Sing replace
BusTecBidOpeningTime = BUS TEC opening time
PriceBidOpeningTime = Price opening time
BidOpeningAgenda = Agenda
SealingStatus = Sealing status
SealingStatusIntact = intact
BudgetMoney = Procurement budget
TenderLimit = Bidding limit
BiddingControlPrice=Bidding price
Linker = Contacts
LinkerTel = Contact phone
Telephone = Telephone
Email = Email
EnterType = Recommendation
EvalMethod = Eval method
EvalManage = Eval manage
EvalStep = Eval step
EvalMember = Eval member
EvalProgress = Eval progress
EvalWay = Eval way
EvaluationTime = Eval time
HandInput = Manual input
Name = Name
NameFormat = {0} name
Address=Address
Code=Code
Number=Number
Type=Type
OrgCode=Org Code
Num =NUM
ListNum=List number
PlatformSource = Project information source
ProjectRequster = Purchaser
PurcategoryNames = Purchased items
SealedCode = Dark label encoding
VideoMeeting=Video meeting
VideoMeetingSubject=Video meeting subject
OpeningMeeting=Opening meeting
EvaluationMeeting=Evaluation meeting
Tel = Contact Phone
TenderContent = Purchase content
TenderMethod = Purchase method
TenderNumber = Bid number
TenderTime = Bid time
TenderType = Project type
ProjectName=Project name
ProjectCode=Project code
PackName=Pack name
PackCode=Pack code
ProjectHasPack=Has subpackage
BidOpeningType=Bid opening type
TwoStage=Tow stage
PhaseType=Phase type
FeatureCode=Feature code
Prequalification=Prequalification
ClauseType=Clause type
ClauseTypeStar=Substantive (asterisk) clause
ClauseTypeDeviate=Non-substantive (deviation) clauses
DeviateClause=Deviate clause
VetoBid=Veto bid
EvalOptions=Evaluation options
EvalType=Evaluation type
ConsistencyCheck=Consistency check
EvalFactor=Eval factor
EvalContent=Eval content
EvalExplain=Eval explain
Explain=Explain
Description=Description
ScoreDecimalDigits=Decimal digits
FactorName =Factor name
FactorScore=Factor score
ScoreRange=Score range
FactorWeight=Factor weight
EvalGroup=Eval group
ScoreType=Score type
ScoreDescription=Score desc
ComputationalProcess=Computational process
Points=points
Score=score
Weight=Weight
Price=Price
OriginalBidPrice=Original price
BidPrice=Bid Price
CorrectedPrice=Corrected Price
CorrectReason=Correct reason
CorrectValue=Correct value
BidPriceScore=Bid price score
BidPriceTotal= Total bid price
ScoreFormula=Score formula
BidOpeningOpinion=Bid opening opinion
BidOpeningStatus=Bid opening status
EvaluationStatus=Eval status
BidOpeningResult=Bid opening result
BidFileComments= Comments
BidFileSelfComment= Self Comments
AuditContent= Audit Content
BidEvaluationResult=Eval result
EvalStartTime=Eval start time
EvalEndTime=Eval end time
UseStatus=Use Status
ExpertType=Expert type
SpecialCategory=Special category
CheckInStatus=Signing status
CheckInTime=Signing time
Machine=Machine
MachineName=Machine name
MachineIp=Machine IP
MachineMark=Machine mark
Template=Template
Report=Report
ReportName=Report name
MyReport=My report
TempReport=Temp report
Number_1=nums
Number_2=nums
SupplierCouns=s
PeopleCouns=s
NumCouns=s
ItemCounts=s
None=None
Enter=Enter
MarkAsClosed=Mark as closed
MarkAsInProgress=Mark as in progress
BidBond=BidBond
RemittedByBasicAccount=Remitted by basic account
PaymentTime=Payment time
UnitAndCurrency=Unit(Currency)
Currency=Currency
ExchangeRate=Exchange rate
Rate=Rate
ExchangeRate=Exchange Rate
DiscountRate=Discount rate
Unit=Unit
SignPerSon=Signer
ServerFileInfo=Server file info
StateOfLocalFile=Local file
LocalFile=Local file
Byte=byte
DecryptionFile=Decrypt file
ImportBidFileBag=Import bid file bag
ExportBidFileBag=Export bid file bag
ExportClearBidFile=Export decrypt bid file
ClearBidFile=Clear bid files
Total=Total
Statistics=Statistics
Edit=Edit
CurrenciesExchangeRate=Exchange rate conversion
ExchangeRate=Exchange rate
HomePage=Home page
EndPage=End page
PreviousPage=Pre page
NextPage=Next page
CurrentPage=Cur
Page=page
TotalOf= of
PageRange=Page range
TotalPages={0} pages
PreviousItem=Pre
NextItem=Next
AdministrativeCode=Area code
UploadPicture=Upload avatar
BiddingLeader=Bidding leader
Business=Business
Technology=Technology
BusinessTechnology=BUS&TEC
Economic=Economic
QuotedPrice=Pirce
BusinessLeader=Business leader
TechnologyLeader=Technology leader
Leader=Leader
DefaultPassword=Init password
Distributed_expert=Distributed expert
Offer_breakdown=BidPrice
More_templates_operation=More templates operation
BidOpeningList=Bid opening list
BidPriceItemForm=Bid price item form
BidPriceName=Bid price name
BidPriceCode=Bid price code
BidPriceType=Bid price item type
NormalItem=Normal item
PriceItem=Price item
PriceType= Price type
Money=Money
RateOrDiscountRate=Rate
BidPriceItemName=BidPriceItemName
BidPriceItemCode=BidPriceItemCode
NotRequired=(Not required)
Include=Include
IncludeFormat=Include {0}
IncludedInTheTotalPriceType=Included type
IncludedInTheTotalPrice=Included in the total price
NotIncludedInTheTotalPrice=Not Included in the total price
QuotationListOfSubsidiary=The quotation list of subsidiary
Recommoned_shortlisted=Shortlisted
Recommoned_notShortlisted=Not shortlisted
Recommoned_recommoned=Recommoned
Recommoned_unrecommoned=Unecommoned
Recommoned_limitRcommoned=Limit Winning
Recommoned_chose=Chose
Recommoned_preferred=Preferred
Recommoned_alternative=Alternative
Package=Package
Creat=Creat {0}
LatestClarifyTime=Latest clarify time
ExportClarifyFiles=Export clarify files
Length=Length
FileSize=File size
Response_time=Response Time
SignerName=Signatory
DeliverTenderType=Deliver the tender way
OnlineSuccessDelivery=Online success delivery
ImportBiddingFiles=Import electronic bidding files
PaperBiddingFiles=Paper tenders
SelectASavedDirectory=Please select a saved directory
EvaluationPrice=Eval price
Clarification=Clarification
ClarifySupplier=Clarify supplier
ClarifyTitle=Clarify title
Collect=Collect
Conclusion=Conclusion
CheckResult=Check result
Conform=Conform
Unconform=Unconform
Qualified=Qualified
Unqualified=Unqualified
Unknown=Unknown
Esignature=Elec signature
HandwrittenSignature=Handwritten signature
ReuseSignature=Reuse the signature
HandwrittenSignatureConfiguration=Handwritten signature configuration
FingerprinPosition=Fingerprint Position
ThresholdOfFingerprintBinarization=Threshold of fingerprint binarization
FingerprintTransparency=Fingerprint transparency
SignatureServerType=Signature server type
LetterBookServer=Letter book server
CloudServer=Cloud server
SignatureServerAddress=Signature server address
SignatureRootCertificate=Signature root certificate
SignatureConfiguration=Signature configuration
NoFingerprints=No fingerprints
FingerprintsLeft=Fingerprints left
FingerprintsRight=Fingerprints right
FingerprintsUp=Fingerprints up
FingerprintsDown=Fingerprints down
FingerprintsCenter=Fingerprints center
ImportTemplatesFromLocal=Import templates from local
ProjectTemplate=Project template
ImportTemplatesFromOtherProjects=Import templates from other projects
ImportTemplatesFromLibrary=Import templates from the template library
SystemDefaultTemplate=System default template
MyTemplates=My templates
AllJoin=All join
TemplateList=Template list
PackageNumAndName=Package number package name
ReturnProject=Return project
Unbounded=Unbounded
Operation=Operation
CreateDefaultEvaluationStep=Create the default bid evaluation step
ConfirmChange=Confirm the change
EvaluationMembers=Eval members
EvaluationSet=Evaluation set
EarlyWarningRange=Early warning
FinalAverageScore=Average score
AllowChangePrice=Allow correct the price
ShowLimitPrice=Show limit price
ExceedLimitPrice=Exceeding Bidding limit
NotExceedLimitPrice=Not exceeding Bidding limit
ShowBidPrice=Show bid price
PublicBidding=Public bidding
SortByDarkCode=Sort by dark code
UseEvalGroup=Eval factor group
BidPriceSource=Quotation method
LocalEntry=Local entry
RemoteBidPrice=Remote bid price
MaxRound=Max round
Round=Round
TextScore=Score
MinScore=Min score
AvgScore=Avg score
ExpertConfirmationResult=Expert confirmation of result
MoveForward=Move forward
MoveBackwards=Move backwards
InstitutionCode=Institution code
ZipCode=Zip code
CompanyAddress=Company address
RegistrationTime=Registration time
OpeningListTemp=Opening list temp
This=This
OriginalPassword=Old password
NewPassword=New password
UserInfo=User info
AddSupplierNode=Remarks:\r\n(Including enterprise qualifications and qualifications)
SignFile=SignFile
CompleteFormat=Complete {0}
ArrangeByName=Arrange by name
ArrangeByNo=Arrange by number
ClearNumber=Clear number
ExcelSort=Excel sort
For=For
BidPriceNo=number of bid price
PreviousSupplier=Previous
NextSupplier=Next
RoleType=Role type
RoleInfo=Role info
Remarks=Remarks
CreateTime=Create time
#\u4ef7\u683c\u516c\u5f0f
FormulaConfig=Formula configuration
PriceFormula=Price formula
SelectionBasePriceCalculationRange=Step 1: Select benchmark price range
SetBasePriceCalculationFormula=Step 2: Set benchmark price formula
SetScoreCalculationFormula=Step 3: Set score formula
CostPerformance=Cost performance
LinearInterpolationMethod=Line interpolat
IntervalDeviationMethod=Interval deviation
PriceDeviationMethod=Price deviation
DeviationRateMethod=Deviation rate
BenchmarkPriceRange_count=By count
BenchmarkPriceRange_dispersion=By dispersion
BenchmarkPriceRange_dispersionCondition=By dispersion Combining condition
BenchmarkPriceRange_otherCondition=By other condition
SelectAllSupplierPrice=Take all effective evaluation price
SelectByFilterCondition= Select effective evaluation price according to conditions
FilterConditions=Filter conditions
AddConditions=Add condition
DeleteConditions=Delete condition
EffectiveSupplierCompareCountFormat=When effective suppliers {0} {1},
EffectiveSupplierCountFormat_1=When effective suppliers {0}
EffectiveSupplierCount_1=When effective suppliers
EffectiveSupplierCount_2=,
EffectiveSupplierCount_3=:
RemoveCount=remove
ConditionAnd= and
Highest=highest
Lowest=lowest
RemoveHighestPriceCount=highest evaluation price
RemoveLowestPriceCount=lowest evaluation price
CountFilterTips=The highest or lowest evaluation price removed does not participate in the calculation of benchmark price;
UnqualifiedFilterTips=The unqualified evaluation price does not participate in the calculation of benchmark price;
RevoveDefaultScore_1=Default score is
RevoveDefaultScore_2=points.
EmptyCalculateScore=Calculate the score according to the formula when it is empty
PleaseSetValidParamForFormat=Please set valid parameters for the {0}!
PleaseSetValidConditionParam=Please set valid parameters for the current condition!
#\u6309\u79bb\u6563\u5ea6
HighestHigherThanNextHighest=When the highest price is higher than the sccond highest price
LowestLowerThanNextLowest=When the lowest price is less than the sccond lowest price
IncludeDispersion=(include {0}%),
RemoveHighes=remove the highest price;
RemoveLowest=remove the lowest price;
#\u6309\u79bb\u6563\u5ea6\u7ec4\u5408\u6761\u4ef6
TakAllPrice_1=Take all the prices whose evaluation price
TakAllPrice_2=
TakAllPrice_3= of the average price
ConditionInvalidLessOne=If there is less than one valid bid evaluation price in the current condition range, the current condition is invalid!
DeviationDegreeFormula=The deviation degree = |A-X|/A
RemoveHighestConditions=Remove the highest evaluation price when any of the following conditions are met
RemoveHighestConditionsByAnd=Remove the highest rating price when all of the following settings are met
RemoveLowestConditions=Remove the highest evaluation price when any of the following conditions are met
SecondLowAndLowestDeviationDegree=Deviation degree between second low price and lowest price
ThirdLowAndSecondLowDeviationDegree=Deviation degree between third low price and second low price
ThirdLowAndLowestDeviationDegree=Deviation degree between third low price and lowest price
HighestAndSecondHigherDeviationDegree=Deviation degree between highest and second higher price price
SecondHigherAndThirdHigherDeviationDegree=Deviation degree between second higher price and third higher price
HighestAndThirdHigherDeviationDegree=Deviation degree between highest price and third higher price
ConditionFormat=Condition {0}
HighestComparNextCondition_1=If the highest price
HighestComparNextCondition_2=the second high price
HighestComparOtherAvgCondition_1=If the highest price
HighestComparOtherAvgCondition_2=the average of other {0} valid bid evaluation prices
#\u5176\u4ed6\u6761\u4ef6
XValue=The X
UseArithmeticAverage=Take the arithmetic average of all valid bid evaluation prices
TheFloatOfXRate=The float of X Rate
FetchingNumber=Fetching quantity within the range
SelectAllSupplierPriceInRange=If it is empty, all valid evaluation prices in the range will be taken.
LowerThan=lower than
LowerEqualThan=less than or equal to
HigherThan=greater than
HigherEqualThan=greater than or equal to
GetFetchingPrice=Take all valid evaluation prices that are {0} X value
GetFetchingByPercentPrice=Take all valid evaluation prices that are {0} {1}% of X value
GetFetchingNumberPrice=Take the {1} {2} valid evaluation prices that are {0} X value
GetFetchingNumberByPercentPrice= Take the {2} {3} valid evaluation prices that are {0} {1}% of X value
#\u57fa\u51c6\u4ef7\u8ba1\u7b97\u516c\u5f0f
BenchmarkPriceAccuracy=Benchmark price accuracy
BenchmarkPriceAccuracyTips=Benchmark price retained {0} decimal places,and followed digit is rounded.
EvaluatonPriceMethod=Evaluaton price
HighestPrice=Highest price
LowestPrice=Lowest price
AveragePrice=Average price
AverageFloating=Average floating
AverageDynamicFloating=Average dynamic floating
WeightedAverage=Weighted average
WeightedAverageFloat={0}\uff1dArithmetic average of all valid bid evaluation prices
FloatUp=Float up
FloatDown=Float down
GreaterThan=>
GreaterThanOrEqualTo=\u2265
EqualTo=\uff1d
LessThan=<
LessThanOrEqualTo=\u2264
#GreaterThan=greater than
#GreaterThanOrEqualTo=greater than or equal to
#LessThan=less than
#LessThanOrEqualTo=less than or equal to
UseLowestAsBasePrice=Use the lowest evaluated price as the benchmark price
BasePriceLowerLowestPrice=When the calculated benchmark price is lower than the lowest price,
#\u52a0\u6743\u5e73\u5747\u6cd5
CoefficientK=coefficient K
CoefficientR=coefficient R
FixedPriceValue=Fixed value
SetKValu=Set K value
SetRValu=Set R value
EnterDecimalBetweenFormat=Please enter a decimal between {0} - {1}, eg:{2}
DeviationRate=Deviation rate
DeviationRateFormula=Deviation rate=(
AccuracyFormat={0} retained {1} decimal places,and followed digit is rounded.
AccuracyPrefix={0} retained
AccuracySuffix=decimal places, and followed digit is rounded.
CostPerformanceFormula={0} = ({1} \u00f7 {2}) \u00d7 socres
DeviationRateRangeScore=Default score within deviation rate range
DeviationRateRange=The deviation rate range
DeviationRateDefaultRange_1=The deviation rate ranges between[
DeviationRateDefaultRange_2=],
DeviationRateDefaultRangeScore=Other cases based on {0} points to add (deducted) points;
DeviationRageGraterThanCondition=Deviation rate is greater than the percentage condition
DeviationRageLessThanCondition=Deviation rate is less than the percentage condition
DeviationRageLessThanTips=When deviation rate is less than 0%, enter a negative value.(eg: -10%)
DeviationRateCondition_1=When deviation rate is {0}
DeviationRateCondition_2=, and {0} {1} %
DeviationRateCondition_3=, each {0} than
DeviationRateCondition_4=When deviation rate is {0} {1} %, and {2}
EachHigher=each higher
EachLower=each lower
DeductScore=deduct
AddScore=add
DeductTo=and deducted until to
AddTo=and added until to
LinearInterpolationEg=eg\uff1aDeduct 1 point for every 1% higher deviation rate, when the deviation rates are 1.1%, 1.5%, and 1.9%, then deduct 1.1 points, 1.5 points, and 1.9 points
IntervalDeviationEg=eg\uff1aIf the deviation rate is greater than 0%, 1 point will be deducted for every 1% increase, 1 point will be deducted for 0% < deviation rate < = 1%, 2 points will be deducted for 1% < deviation rate < = 2%, and the same point will be deducted within one deviation range.
Tips_addFormulaParams=Please click "{0}" to set the {1} formula parameters!
AbsoluteFormula_1={0}\uff1d( 1 - | {1} | ) \u00d7 socres
AbsoluteFormula_2={0}\uff1d( 1 - {1} ) \u00d7 socres
Tips_absoluteFormula=When the deviation rate is less than 0%, the full score is obtained.
LowestPriceScore=The lowest score is
PriceDeviationRangeScore=Default score within the difference price
PriceDeviationRange=The difference price range
PriceDeviateRange_1=The difference price with the {0} ranges between [
AboveDifferenceCondition=Above the difference price condition
BelowDifferenceCondition=Below the difference price condition
DifferencePriceLessThanTips=When the difference price is less than 0, enter a negative value.(eg:less than -5 million)
DifferencePriceCondition_1=The difference price {0}
DifferencePriceCondition_2=, and {0} {1} {2}
DifferencePriceCondition_3=, {0}
DifferencePriceCondition_4=The difference price {0} {1} {2}, and {3}
#\u6b65\u9aa4
StepName=Step name
Note=Note
NodeName=Node name
AllExperts=All experts
ExpertLeader=Expert leader
SpecifyExpert=Specify expert
NodeNote=Node note
OneTicketVeto=One ticket veto
MinorityObeyMajority=Minority obey majority
ShortlistedRules=Short-list rules
FilterFinalists=Filter finalists
AllFinalists=All finalists
CentralizedReview=Centralized review
IndividualReview=Individual review
SmartReview=Smart review
FixedFactor=Fixed factor
FixedGradeRangeRules=Grade range rules
FixedGradeName=Grade name
FixedGradeRange=Grade range
FixedGradeScoreRange=Score range
DartBid=Dark bid
DefaultPriority=Default priority
RecommendedPriority=Priority
FirstPriority=First priority
SecondPriority=Second priority
ThirdPriority=Third priority
DefaultRecommendNum=Default Recommend {0} winning bidder candidates
RecommendedMinimumScore=Recommended minimum score
PriorityHighToLowFormat={0} from high to low
PriorityLowToHightFormat={0}from low to high
RemoveHighestLowestScore=Remove one highest and one lowest score
WasteReason=Reason of abolition
NeedVote=Need vote
NoVote=No vote
Vote=Vote
Votes=Votes
AllowChangeBasePrice=Allow modify benchmark price
AllowChangePriceScore=Allow modify price score
SortNo=Ranking
BasePrice=Benchmark price
PriceScore=Price score
BusAndTecScore=Business & technology score
FinalScore=Final score
WeightScore=Weight score
TotalScore=Total score
BatchDistribution=Batch distribution
# Button
Button_search = Search
Button_save = Save
Button_saveAs = Save as
Button_autoSave=Auto save
Button_saveFormat = Save {0}
Button_submit = Submit
Button_submitFormat = Submit {0}
Button_confirm = Confirm
Button_approval = Audit
Button_approvalFormat =Audit {0}
Button_forceOperation=Force operation
Button_continueSave=continue save
Button_iKnown=I Known
Button_iKnownAndContinue=I already know. Continue
Button_agree=Agree
Button_ok = OK
Button_clear = Clear
Button_cancel = Cancel
Button_clearAllFactor=Clear all factors
Button_close = Close
Button_operate = Operate
Button_open = Open
Button_openFile=Open file
Button_openDirectory=Open directory
Button_randomSort = Random order
Button_sortBySignTimeAsc = Sorted in order of signing time
Button_sortBySignTimeDesc = Sorted in reverse order by signing time
Button_sortByDefault=Default sort
Button_sortByEvalPriceDesc=Bid evaluation price from high to low
Button_sortByEvalPriceAsc=Bid evaluation price from low to high
Button_deleteAllNoTenderSupplier = Delete all no tender {0}
Button_copy=Copy
Button_batchCopy=Batch copy
Button_return = Return
Button_refresh = Refresh
Button_refreshNew=Refresh
Button_synchronize=Synchronize
Button_votoClause =Veto clause
Button_change = switch
Button_changeFormat = Switch {0}
Button_createSealedCode = Generate dark code
Button_add = Add
Button_addSibling=Add sibling
Button_addChildSibling=Add child sibling
Button_addTo=Add
Button_addToFormat=Add {0}
Button_applyToOthers=Apply to other {0}
Button_sendVideoMeetingVnvitation=Send video meeting invitation
Button_cancelVideoMeetingVnvitation=Cancel video meeting invitation
Button_batchSort = Batch sort
Button_delete = Del
Button_deleteFormat = Delete {0}
Button_deleteAll = Deleted all
Button_deleteAllFormat = Deleted all {0}
Button_upload = Upload
Button_uploading=Uploading...
Button_uploadFormat = Upload {0}
Button_uploadedFormat = {0} uploaded
Button_notUploadFormat = {0} not uploaded
Button_download = Download
Button_downloadFormat = Download {0}
Button_edit = edit
Button_editFormat = Edit {0}
Button_modify = Modify
Button_modifyFormat = Modify {0}
Button_select=Select
Button_selectFormat=Select {0}
Button_import = Import
Button_importFormat = Import {0}
Button_export = Export
Button_exportFormat= Export {0}
Button_exportAll=Export all
Button_exportAllFormat=Export all {0}
Button_batch=Batch
Button_batchFormat=Batch {0}
Button_selectAll=Select all
Button_deselected=Deselected
Button_selectInvert=Select invert
Button_moveDown = Down
Button_moveUp = Up
Button_overwrite = Overwrite
Button_changeTenderMethod = Transfer purchasing method
Button_updateProject = Update project information
Button_config=Config
Button_moreOperate=More
Button_forceSave=Force save
Button_reInput=Reinput
Button_showProjectCode=Show project codding
Button_notShowProjectCode=Not show project codding
Button_configScoreFormula=Config formula
Button_createStep=Create Step
Button_showInterfaceEffect=Show interface effect
Button_hiddenInterfaceEffect=Hidden interface effect
Button_setStepTemplate=Set to Template
Button_delStepTemplate=Del template
Button_importStep=Import step
Button_exportStep=Expoert step
Button_deleteAllStep=Delete all step
Button_enterBidOpeningHall=Enter opening hall
Button_opeingMeeting=Meeting
Button_confirmCorrectAndContinue=Confirm and continue operation
Button_syncNewTenderInfo=Sync tender info
Button_syncDecryptInfo=Sync decrypt info
Button_syncQuoteInfo=Sync price info
Button_showBidPriceOnly=Show price only
Button_original=Original
Button_decryptType=Decrypt type
Button_decryptLocal=Native decrypt
Button_decryptRemote=Decrypt
Button_decryptCentralize=Centralize decrypt
Button_continueDecrypt=Continue decrypt
Button_complateDecrypt=Complate
Button_stopDecrypt=Stop decrypt
Button_needConfirmResult=Need confirm results
Button_noNeedConfirmResult=No need confirm results
Button_autoSwitchPageOn=Turn on auto switch page
Button_autoSwitchPageOff=Turn off auto switch page
Button_setAutoSwitchPageTime=Set auto switch page time
Button_startFormat=Start {0}
Button_syncAndStartFormat=Sync & Start {0}
Button_openRemoteBidOpeningHall=Start sign in
Button_openRemoteBidOpeningHallNot=Sign in not started
Button_openRemoteBidOpeningHallAlready=Sign in started
Button_openingResultSignature=Signature
Button_openingListSignature=Signature
Button_openingResultReSignature=Re Signature
Button_uploadOpeningResultAndFile=Upload opening result
Button_showNowTime=Show current time
Button_notShowNowTime=Not show current time
Button_inputBidOpiningList=Input bid opening list
Button_configBidOpiningList=Config bid opening list
Button_complateAndUploadOpeningResult=Complate and upload
Button_complateBidOpening=Complate
Button_signBid=Sing Bid
Button_singVoice=Sing voice
Button_stopSingVoice=Stop voice
Button_finishSing=Sing finish
Button_sendMessage=Messages
Button_send=Send
Button_sendFormat=Send {0}
Button_reBidOpening=Re-opening
Button_generateOpeningRecordTotal=Generate Opening record
Button_remoteSignatureOpeningResult=Remote signature confirm
Button_checkedAndUpload=I have checked and confirm upload
Button_openingRecordTotal=Opening record summary
Button_focusUpload=Focus upload
Button_uploadBidOpeningResult=Upload bid opening result
Button_downloadBidOpeningResult=Download bid opening result
Button_canceledBid=Cancel\u2002bid
Button_canceledBidBack=Withdraw\u2002canceled bid
Button_clearResult=Empty result
Button_keepResult=Keep result
Button_addAttachment=Add attachment
Button_uploadDecryptedBidFile=Upload decrypted bid file
Button_startVideoMeeting=Start video meeting
Button_validateExpert=Validate expert
Button_createTempAccount=Create temp account
Button_allowView=Allow view
Button_view=View
Button_viewResult=View result
Button_notAllowView=Not allow view
Button_reBidEvaluation = Re-evaluation
Button_progressOverall = Overall progress
Button_progressFreeWithLimit = Limit the free progress of submission
Button_progressSelfFree = Free progress
Button_progressManual = Manual control of progress
Button_ShowAll = Show all
Button_ShowCanceled = Show canceled only
Button_ApplyInput = Apply Input
Button_generateReport = Generate
Button_batchGenerateReport = Batch generate
Button_exportAllCustomTemplate = Export all custom templates
Button_setAsCustomTemplate = Convert to custom template
Button_setAsCustomTemplateAndEdit = Convert to custom template & edit
Button_rotationSignature = Rotation signature
Button_joinRotationSignature = Join signature
Button_addSignatureUser=Add signer
Button_deleteFile = Delete file
Button_mergePdf=Merge PDF
Button_synchronizeReports=Synchronize
Button_joinMyReport = Join my report
Button_exportLocal = Export
Button_convertPdf = Convert pdf
Button_pdfFormat = PDF format conversion
Button_uploadEvaluationResult = Upload eval result
Button_evaluationCommitment = Commitment letter
Button_toSignatureCommitment = To sign Commitment letter
Button_avoid = Avoid
Button_vote = Vote
Button_votes = Votes
Button_expertSignIn = I want to sign in
Button_expertAvoid = I want to avoid
Button_myEvaluation = My Evaluation
Button_myMessage=My messages
Button_assignWorker = Assign workers
Button_needReview=Need to review
Button_needLeaderAndManagerReview=Need expert leader and manager review
Button_confirmAssign = Confirm assign
Button_assignEvalGroup = Assign eval group
Button_caSignature=CA Signature
Button_handSignature = Handwritten signature
Button_completeSignature=Complete signature
Button_duplicateSignature=Duplicate signature
Button_myReview = My audit
Button_expertSignApp=Expert sign APP
Button_dianJianSignApp=Sign APP
Button_scanSignatrue = Sweep signature
Button_tempScanSignature = Temp sweep signature
Button_addSignature=Add signature
Button_addMultiSignatureSameLocation=Batch signature
Button_manualSignature=Manual signature
Button_refreshQRCode=Refresh QR code
Button_authentication=Authentication
Button_keySignature=Auto signature
Button_batchKeySignature=Batch auto signature
Button_submitSignature=Submit signature
Button_reSignature=Re-signature
Button_revokeSignature=Re-signature
Button_copySignature=Copy signature
Button_keepSignature=I want to keep signature
Button_continueSignature=Continue signature
Button_giveUpSignature=Give up
Button_youAreSigning=You are signing
Button_beingSigned=Signing
Button_beingSignedBy=[{0}] is signing
Button_applySignature=Apply for signature
Button_elecSignature=Elec signature
Button_delSignatureSeal = Remove signature seal
Button_delAllSignatureSeal = Remove all signature seal
Button_getSupplierSelfOpinion=Get supplier self opinion
Button_showOneFactor=Show current factor
Button_showAllFactors=Show all factors
Button_bidFileOpinion = Bid file opinion
Button_factorOpinion = Factor opinion
Button_viewEvalOpinion = View eval opinion
Button_locationPoint = Location point
Button_allLocationPoint = All points
Button_evalLocation = Eval localtion
Button_veiwBidFile = View bid files
Button_viewBiddingFile = View bidding files
Button_viewLocalFiles = View files locally
Button_bidFileCompare = Bid file compare
Button_addCompare=Add compare
Button_startCompare=Start compare
Button_clearAll=Clear all
Button_viewProgress = Progress
Button_backEvalHall=Back to Hall
Button_appllyForBack=Applly for return
Button_appllyForBackFormat=Applly for return [{0}]
Button_reauthorizeEvaluation=Reauthorize evaluation
Button_wasteBidding = Cancel\u2002bid
Button_goToHome = Home
Button_discipline = Discipline
Button_adobeCaptivate = Adobe Captivate
Button_recommonedLeader = Recommen leader
Button_importBidFile=Import bid files
Button_uploadBidFile=Upload bid files
Button_downloadBidFile=Download bid files
Button_confirmComplate = Confirm submit
Button_continueEvaluation = Continue
Button_setAllFormat=Set all {0}
Button_quickEvaluation = Quick evaluation
Button_quickEvaluationScore = Quick score
Button_importOtherExpertResults = Import other expert results
Button_importHistoryResults = Import historical results
Button_lockRow = Lock row
Button_unlockRow = Unlock row
Button_enterDetailedEvaluationPanel =Enter detailed evaluation window
Button_setMaxFactorNameLength = Set the max length of factor name display
Button_enlargeColumnWidth=Enlarge column width
Button_reducedColumnWidth=Reduced column width
Button_switchAxis = Switch Axis
Button_analysisScoreDispersion = Analysis of score dispersion
Button_showLine=Show line
Button_changeStyles = Change Styles
Button_correctionBidPrice = Correction price
Button_recalculatePriceScore=Recalculate price score
Button_saveEvaluationResult = Save result
Button_submitEvaluationResult = Submit result
Button_submitAndEndEvaluation = Submit {0} and finish evaluation?
Button_submitAndApproval=Confirm and submit for approval
Button_reduce=Reduce
Button_enlarge =Enlarge
Button_reduceFontSize=Reduce font
Button_enlargeFont =Enlarge font
Button_viewBidEvaluationResults=View evaluation results
Button_downloadEncBidFile=Download encrypted files
Button_downloadDecBidFile=Download decrypted files
Button_importEncBidFile=Import encrypted package
Button_exportEncBidFile=Export encrypted package
Button_exportDecFile=Export encrypted files
Button_downloadFtp=FTP download
Button_downloadBt=BT download
Button_downloadOnline = Online download
Button_downloadLAN = LAN download
Button_setBidFileLoadCache=Set bid file load cache
Button_releaseBidFileCache=Release bid file cache
Button_useUniversalControl= Use common control
Button_useSpecialControl= Use special control
Button_hideOrShowLoactionPointPanel= Display (Hide) Location point panel
Button_correctPrice=Correct price
SetCurrencyConversionRate=Set currency conversion rate
SetLeader=Set leader
UndoLeader=Undo leader
SetCorrectQuotation=Set the correct quotation
AuxiliarySign=Auxiliary sign
CheckSignResult=Check sign result
Button_sortBySignTime=Sort by sign time
Button_sortBySignTimeReverse=Sort by sign time in reverse
Button_add_1=Add
Button_showOrHiddenToolbar=Show (Hidden) toolbar
Button_evalOrWasteOpinion=Evaluation (waste) opinion
Button_cancelApplication=Cancel application
Button_bidOpeningResultsSignature=Bid opening results signature
Button_startReBidPrice=Start a new BidPrice
Button_grantAuthorization=Grant authorization
Button_distributionMenu=Distribution Menu
Button_runBackground=Run in background
Button_noSyncToday=Don't sync today
Button_viewRecord=View log
Button_quickCleaning=Quick cleaning
Button_endEvaluation=End evaluation
Button_enterEvaluationHall=Enter evaluation hall
# Tips
Tips_tips=Note:
Tips_gettingList = Getting the {0} list
Tips_prepareTo=Prepare to{0}...
Tips_loading=Loading...
Tips_loadingSth=Loading {0}...
Tips_requesting=Requesting...
Tips_pleaseWait=Please Wait!
Tips_itIsNotTimeToOperate = This operation is not allowed until the start time of bid opening!
Tips_enteredEvaluation = Has entered the bidding evaluation link, can not carry out this operation!
Tips_startedStepEvaluation=The current step has already started to evaluatoin, can not carry out this operation!
Tips_enteredScoreEvaluation=Has entered the score evaluation link, can not carry out this operation!
Tips_enteredPriceEvaluation=Has entered the price evaluation link, can not carry out this operation!
Tips_deleteObj = Are you sure you want to delete [{0}]?
Tips_reCreateSealedCode = regenerate the dark label code?
Tips_deleteAllNotTenderSupplier = Are you sure you want to delete all {0} that are not tendered?
Tips_deleteAllObject = Are you sure you want to delete all {0}?
Tips_confirmOperate=Are you sure you want to {0}?
Tips_finishBidOpening = Bid opening has been completed, this operation is not allowed!
Tips_saveSuccess=Save Success.
Tips_saveFail=Save Fail!
Tips_updateSuccess=Update Success.
Tips_updateFail=Update Fail!
Tips_submitSuccess=Submit Success.
Tips_submitFail=Submit Fail!
Tips_deleteSuccess=Delete Success.
Tips_deleteFail=Delete Fail!
Tips_operateSuccess = The operation was successful.
Tips_operateFail = Operation failed!
Tips_requestSuccess=Request successful.
Tips_requestFail=Request failed!
Tips_deleteFileFailed=Delete failed, Please check if the file is open or occupied!
Tips_inputWordsCountWidthMax={0} characters have been input, up to {1} characters!
Tips_requriedProjectName=Project name cannot be empty!
Tips_requriedProjectCode=Project code cannot be empty!
Tips_importFromProject=Import form other project!
Tips_required={0} cannot be empty!
Tips_notSetFormat={0} not set!
Tips_pleaseEnterTheCorrect=Please enter the correct {0}!
Tips_pleaseEnterTheValid=Please enter the valid {0}!
Tips_pleaseSelectLeastOne=Please select at least one {0}!
Tips_pleaseSelect=Please select the {0}!
Tips_select=Please select
Tips_pleaseEnter=Please enter the {0}!
Tips_notUnique=[{0}] is not unique, please re-enter it.
Tips_alreadyExist=[{0}] already exists.
Tips_alreadyExistAndCover=[{0}] already exists.Do you want to overwrite it?
Tips_coverImport={0}Already exists. Are you sure you want to overwrite and import it?
Tips_clauseTypeStar=A non-conforming bid was rejected immediately!
Tips_clauseTypeDeviate=When the deviation amount reaches a certain amount, the bidding will be rejected!
Tips_evalOptionsEg=eg: "conformity, unconformity", or "\u221a, \u00d7", null value default use "conformity, unconformity"!
Tips_consistencyCheck=Check the consistency of all expert reviews!
Tips_applyToAllChildSiblingFactor=Does it apply to all factors at the Child Sibling?
Tips_scoreTypeInput =Input subjective opinion score
Tips_scoreTypeSelect =Drop-down selection objective score
Tips_scoreTypeAI = Intelligent Evaluation
Tips_pleaseEnterValidScore = Please enter a valid score!
Tips_pleaseEnterValidRange = Please enter a valid score range!
Tips_pleaseEnterValidWeight = Please enter a valid weight!
Tips_weight= When the weight is empty, it means no weight. When the score is 100, the corresponding weight value can be set.
Tips_noObjectiveScoreSelection = Please add at least one drop-down objective score option!
Tips_pleaseResetEvalStep = Please re-check and set up the bid evaluation step!
Tips_overParentLevalScor = The sum of the current level scores exceeds their superior level scores, so it is impossible to set an effective score for them!
Tips_lessThanChildLevalScore = The current level scores is less than the sum of its child level scores, so it is impossible to set an effective score for it!
Tips_cantSetValidWeight = Cannot set valid weights for current factor!
Tips_canOnlySetScore = Only {0} can be set for the current factor!
Tips_createFactorByBidPrice = Create price factor according to bid price!
Tips_linkBidPrice = Please contact the bid price for calculating the score!
Tips_hasConfigTotalPrice=The total bid price has been set, so this operation can not be carried out!
Tips_noConfigBidPrice=No bid price can be set!
Tips_configScoreFirst=Please set the score first!
Tips_configScoreFormulaFirst=Please set up the score formula first!
Tips_noScoreFormula=No score formula is set!
Tips_pleateConfigPriceFactorInfo=Please set the score (or weight) for the imported {0} factors!
Tips_configStepFirst=Please set up the evaluatoin step first!
Tips_step1=1. Click "Create Step" to select the evaluation step that meets the current evaluation method, or click "+" to add the evaluation step, or click "More operations" to do template operation;
Tips_step2=2. Click on the icon of each bid evaluation step to move, modify or set the rules of the bid evaluation step.
Tips_step3=3. No modification or deletion is allowed when the tender evaluation step enters the evaluation or the completion of the evaluation. If necessary, please return all the current tender evaluation steps at the "tender evaluation progress".
Tips_alreadyExistStep=Bid evaluation steps already exist. Are you sure you want to cover and import the evaluation steps?
Tips_setStepTemplate=There is already a template. Are you sure you want to set the current bid evaluation steps as templates?
Tips_uploadBidOpeningResult = Note: The result of bid opening must be uploaded on the day of bid opening. Otherwise, the bid can not be evaluation!
Tips_selectBidOpeningStage = Choose the bid opening stage
Tips_noBidOpeningTime = No bid opening time set!
Tips_synchronizingNewTenderInfo=Synchronizing latest bid information...
Tips_synchronizTenderInfoComplate=sync latest bid information complete.
Tips_synchronizTenderInfoFail=Synchronize latest bid information failed!
Tips_confirmSetBidOpeningTime=Please be sure to confirm that the time modified is consistent with the time in the project announcement (the announcement time shall prevail), and confirm to modify the bid opening time to {0} ?
Tips_signTimeAfterOpeningTime=The signing deadline you set is after the bid opening time!
Tips_confirmSetSigningDealine=The signing deadline cannot be changed after it is set. Are you sure you want to set the signing deadline to {0}!
Tips_confirmCancelSigningDealine=Are you sure you want to cancel the signing deadline?
Tips_changeDealine=Note: if you have already opened the remote bid opening hall, you need to re-open the remote bid opening hall after modifying the time, and {0} need to re-enter the bid opening hall to take effect!
Tips_decryptDealineBeforeOpeningTime=The deadline for decryption must be after the opening time!
Tips_setReasonableDecryptDeadline=Please set a reasonable decryption deadline to ensure sufficient decryption time.
Tips_decryptUseTime=The decryption operation will stop after {0} of bid opening time!
Tips_confirmSetDecryptdeadline=The decryption deadline cannot be changed after it is set. Are you sure you want to set the decryption deadline to {0}!
Tips_confirmCancelDecryptdeadline=Are you sure you want to cancel the decryption deadline?
Tips_openingHall=When "signed in" is blue, it means that the remote sign in is allowed; when "decrypted" is blue, it means that decryption is allowed!
Tips_timeForBidOpeningAndSynchronizInfo=It's time for bid opening, synchronizing the latest bid information...
Tips_cantDescryptEconomicBid=The Business and Technology evaluation has not been completed, and the economic bid cannot be decrypted!
Tips_timeBeforeForBidOpening=Decryption is not allowed before the bid opening time!
Tips_timeForBidOpening=It's time for bid opening. Please click "{0}" to start decrypt the bid file!
Tips_decryptionDeadline=The decryption deadline has expired, and decryption is not allowed to continue!
Tips_confirmAndContinueDecrypt=Confirmed and continue decrypt
Tips_noSupplierToDecrypt=There are no {0} who need to decrypt bid files!
Tips_noSupplierTendered=No {0} have been tendered!
Tips_noSyncQuotation=No quotation information can be synchronized!
Tips_synchronizedNewTenderInfoComplate=the latest bid information has been synchronized!
Tips_theBidOpeningTime=The bid opening time is:{0};
Tips_theSigninEndTime=The sign-in deadline is:{0};
Tips_theSigninClosedBefore=The sign-in will close {0} before the bid opening time;
Tips_theSigninClosedOpengingTime=The sign-in will be closed when the bid opening time is reached;
Tips_theSigninClosed=The sign-in will close {0} after the bid opening time;
Tips_theDecryptEndTime=The decrypt deadline is:{0};
Tips_theDecryptClosed=The sign-in will close {0} after the bid opening time;
Tips_openingRemainingTime=There are {0} before the bid opening.
Tips_ensureTecryptTime=Please ensure sufficient decryption time!
Tips_tooSoonToOpenHall=Note: Please start the remote bid opening hall within {0} hours before the time of bid opening!
Tips_checkSynchronizNewTenderInfo=Please confirm synchronized the latest bid information before decryption!
Tips_checkAndConfirmOpeningSetting=Please check and confirm whether the above settings are correct before performing the current operation!
Tips_checkBidOpeningTime=Note: Please confirm whether the current set bid opening time is consistent with the time specified in the project announcement(the announcement time shall prevail)!
Tips_checkSynchronizNewTenderInfoAndCheckTime=Note: Please confirm synchronized the latest bid information before decryption, and confirm whether the current set bid opening time is consistent with the time specified in the project announcement(the announcement time shall prevail).
Tips_complateBidOpeningForDeadline=The deadline for decryption is up. Please click "{0}" to end the bid opening!
Tips_complateAndUploadResultForDeadline=The deadline for decryption is up. Please click "{0}" to complete decryption and upload the bid opening result!
Tips_synchronizingSigninInfo=Synchronizing signin information...
Tips_synchronizingDecryptInfo=Synchronizing decryption information...
Tips_synchronizDecryptInfoFail=Synchronize decryption information failed!
Tips_synchronizingProjectSigninInfo=Synchronizing [{0}] signin information...
Tips_synchronizingProjectDecryptInfo=Synchronizing [{0}] decryption information...
Tips_synchronizProjectDecryptInfoFail=Synchronize [{0}] decryption information failed!
Tips_tenderProjectSigninInfo=[{0}] has {1} suppliers signed in.
Tips_tenderProjectSignintAll=All suppliers of [{0}] have been signed in.
Tips_cantBidOpeningCondition=The number of valid {0} is less than {0} and the bid cannot be opened!
Tips_lessThanBidOpeningCondition=The number of valid {0} is less than {0}, Do you want to continue decryption?
Tips_confirmStartBidOpening=Are you sure you want to start {0}!
Tips_starting=Starting...
Tips_startFailed=Start {0} failed!
Tips_startSuccess=Start {0} success.
Tips_noDecryptCount={0} bid files not decrypt
Tips_decryptFailedCount={0} bid files decrypt failed
Tips_obtainQuotationFailedCount={0} bid files obtain bid price failed
Tips_decryptErrors={0} bid files decrypt failed or obtain bid price failed!
Tips_problemsSolve=To avoid the above problems caused by network reasons, please try to synchronize the relevant results manually!
Tips_noConfirmOpeningResutlCount={0} bid opening results have not been confirmed by the {1};
Tips_LessThanThreeSuppliersDecrypted=Less than {1} {0}s have successfully decrypted
Tips_confirmComplateAndUploadOpeningResult=Confirm to upload the bid opening results and complete the bid opening?
Tips_decryptableFileDecryptComplate=The current decryptable bid files has been decrypted,
Tips_whetherComplateAndUploadOpeningResult=Do you upload the opening result and complete the bid opening?
Tips_totalTenderCountAndDecryptSuccessCount=At present, there are {0} suppliers bidding, and {1} of them have been decryptedand,
Tips_projectTotalTenderCountAndDecryptSuccessCount=There are {0} bids in the projectt, and {1} of them have been decryptedand,
Tips_selectOpeningProject=Please select the project to bid opening
Tips_reEntryOpeningHallEffect=Re entry into the bid opening hall takes effect
Tips_noStartOpeningHall=Please start remote sign in first!
Tips_reStartOpeningHall=Restart remote sign in?
Tips_noConfigLiveAddress=The live address is not set!
Tips_noLiveAddressAndConfirmOpenHall=The live address is not set. Do you want to continue to start the remote bid opening hall?
Tips_confirmStartOpeningHall=Are you sure you want to start remote sign in?
Tips_startingOpeningHall= Starting remote sign in...
Tips_startOpeningHallSuccess=Remote sign in started, waiting for remote sign in...
Tips_startOpeningHallFail=Failed to start remote sign in!
Tips_startProjectOpeningHallSuccess=[{0}] started remote sign in.
Tips_startProjectOpeningHallFail=[{0}] start remote sign in failed!
Tips_startDecryptSuccess=Remote decryption started, waiting for remote decryption...
Tips_startFocusDecryptSuccess=Remote decryption started, waiting for remote decryption...
Tips_startDecryptFail=Remote decryption started failed!
Tips_startProjectDecryptSuccess=[{0}] remote decryption started.
Tips_tenderProjectDecryptInfo=[{0}] has {1} suppliers decrypted.
Tips_tenderProjectDecryptAll=All suppliers of [{0}] have been decrypted.
Tips_startProjectDecryptFail=[{0}] remote decryption started failed!
Tips_projectDecryptComplate=[{0}] uploaded and completed bid opening!
Tips_inCompletingOpening=Is in batch completing bid opening...
Tips_inUploadingAndComplateOpening=Is in batch uploading bid opening results and completing bid opening...
Tips_uploadOpeningResultFailCount=There are {0} packages whose opening results are not uploaded or failed to upload!
Tips_noStartDecrypt=Please decrypt first!
Tips_halfProcessStep=Half Process Project Operational Tips\uff1a
Tips_halfProcessStep_1 = 1. enter the signing information at the supplier sign-in place;
Tips_halfProcessStep_2 = 2. Config the bid opening list.
Tips_halfProcessStep_3 = 3. Select supplier and enter Bid opening list contents for them;
Tips_halfProcessStep_4 = 4. Click "{0}" to finish the bid opening process;
Tips_halfProcessStep_5 = 5. Click "{0}" to upload the result to the trading platform;
Tips_halfProcessStep_6 = 6. Login and use "{0}" to enter the bid evaluation process.
Tips_wholeProcessStep = Whole Process Project Operational Tips\uff1a
Tips_wholeProcessStep_1 = 1, login and enter the bid opening hall to complete the bid opening process;
Tips_wholeProcessStep_2 = 2. Login and use "{0}" to enter the bid evaluation process. after the bid opening is completed.
Tips_wholeProcess = Note: The whole process project does not need to do any operations here, all operations are in {0}.
Tips_clearBidOpeningResult = Whether to empty the open result!
Tips_complateBidOpening = Bid opening has been completed. Do you upload the result of Bid opening?
Tips_reuploadBidOpeningResult = Upload bid opening result again?
Tips_uploadBidOpeningOneDay=The bid opening results can be uploaded on the day of bid opening. Can't do this operation!
Tips_focusUploadBidOpeningOneDay=The bid opening results can be uploaded on the day of bid opening. Do you want to force upload the bid opening results?
Tips_notComplateBidOpening=The bid opening has not been completed yet. Please confirm the completion of the bid opening and upload the opening result!
Tips_notComplateBidOpeningOperate=The bid opening has not been completed yet,Are you sure you want to do this?
Tips_importFileTypeFormat=Please import {0} format file!
Tips_exporting = Is exporting {0}...
Tips_exportSuccess=Exported success!
Tips_exportFail=Export failed!
Tips_exportSuccessFormat={0} Exported successfully!
Tips_exportFailFormat={0} Export failed!
Tips_exportAndOpenFile=Export successfully. Open the file or not!
Tips_exportAndOpenFileFormat={0} export successfully. Open the file or not!
Tips_exportAndOpenDirectory=Export successfully. Open the directory or not!
Tips_exportAndOpenDirectoryFormat={0} Export successfully. Open the directory or not!
Tips_noExportableData=No exportable data!
Tips_exportFinished=Export Finished!
Tips_successFormat={0} successfully!
Tips_failFormat={0} failed!
Tips_uploadingFormat=Uploading {0}...
Tips_uploadSuccess=Upload success!
Tips_uploadFail=Upload failed!
Tips_uploadSuccessFormat=The [{0}] upload successfully!
Tips_uploadFailFormat=The [{0}] upload failed!
Tips_uploadFinished=The upload task is over.
Tips_updatingFormat=Is updating [{0}]...
Tips_updateSuccessFormat=The [{0}] update successfully!
Tips_updateFailFormat=The [{0}] update failed!
Tips_downloadSuccess=Download success!
Tips_downloadFail=Download failed!
Tips_downloadSuccessFormat=The [{0}] download successfully!
Tips_downloadFailFormat=The [{0}] download failed!
Tips_scoreDecimalDigitsMax=Up to {0} decimal digits are supported!
Tips_allowViewBidPrice=Experts are allowed to view bid price when bid evaluation.
Tips_allowViewBidPriceScore=Experts are allowed to view bid price score when bid evaluation.
Tips_progressOverall = All experts complete the previous bid evaluation operation before proceeding to the next bid evaluation operation.
Tips_progressFreeWithLimit = Evaluation according to experts'own progress, but when the overall progress of the previous step is not completed, it can only be saved and not submitted.
Tips_progressSelfFree = Evaluation according to experts'own progress (If there is an uncompleted previous step and the bid may be cancelled situation in the previous step situation, it can only be saved and not submitted).
Tips_progressManual = Manual settings are required to allow evaluation before they can be evaluation.
Tips_reEvaluation = Click on the "{0}" bid evaluation step to authorize experts to re-evaluate the bid (retain historical data).
Tips_addMyReport = Click "\u221a" to add the report to {0}.
Tips_myReport = Click the "PDF" icon to convert the file to PDF. Move the mouse to the icon can display the function description.
Tips_convertingToPdf = [{0}] is being converted to pdf...
Tips_uploadReport = Only the selected report will be uploaded!
Tips_uploadAttachment = Can add other attachments used in the bid evaluation process!
Tips_needSignCommitment=Must sign commitment letter
Tips_noSignCommitment=You have not signed the commitment letter!
Tips_evaluationCommitment = I have read and agreed to sign the commitment letter.
Tips_inputExpertInfoFirst=Please fill in the expert information first!
Tips_expertAvoid=After avoidance, you will not be able to continue to participate in the bid evaluation.
Tips_avoidReason=Please enter the reason for avoidance.
Tips_avoidConfirm=Are you sure you want to avoid it?
Tips_noRecommonedLeader=The expert team leader has not been recommended, so the bid evaluation cannot be carried out!
Tips_voteExpertLeaderRound=Please take the [ {0} ] round of voting!
Tips_youHaveVoted=You have voted.
Tips_voteExpertLeaderCount=There are [ {0} ] experts who have not voted!
Tips_voteExpertLeaderResult=According to the voting results, the expert team leader will be [{0}]!
Tips_noBidFiles=No Bid Files!
Tips_viewBidFiles=View Bid files
Tips_noBiddingFiles=No Bidding Files!
Tips_changeEvalContent=Switch files(file panel layout)
Tips_viewBiddingFiles=View Bidding files
Tips_viewFilesBothHor=Bidding files and bid files are viewed on left and right screens
Tips_viewFilesBothVer=Bidding files and bid files are viewed on up and down screens
Tips_changeEvalPanelLayout=Switch panel layout
Tips_viewFullFiles=Full screen display files
Tips_viewFullEvaluationPanel=Full screen display evaluation panel
Tips_viewFileEvaluationVer=Up and down split screen display file and evaluation panel
Tips_viewFileEvaluationHor=Left and right split screen display file and evaluation panel
Tips_notFindResponsePointFile=No document corresponding to the review response point was found!
Tips_switchSuccessAndReLoadingFile=The switch is successful. Please reload the bid files!
Tips_notDisplaySignature=Note: The current control will not display the electronic signature!
Tips_selectMoreActions=Right click to select more actions!
Tips_downDecryptBidFile=Please select the decrypted bid file to download!
Tips_downEncryptBidFile=Please select the encrypted bid file to download!
Tips_pleaseSelectDownloadFormat=Please select the {0} to download!
Tips_noNeedToWaitForDownload=You don't have to wait in the download window!
Tips_sortBySignTime=Sorted by sign in time
Tips_sortBySignTimeReverse=Sorted by sign in time in reverse order
Tips_openDirectory=Double click or right-click to open directory
Tips_gettingDecryptedBidInfo=Getting decrypted file info...
Tips_gettingDecryptedBidInfoFailed=Failed to getting decrypted file info...
Tips_gettingEncryptedBidInfo=Getting encrypted file info...
Tips_gettingEncryptedBidInfoFailed=Failed to getting encrypted file info...
Tips_noDecryptedFilesDetected=No decrypted files detected
Tips_FailedToConnectServer=Failed to connect to the server
Tips_orBiddingFile=or biddingFile
Tips_assignEvalGroup=Please assign an expert to each evaluation unit (drag the expert to evaluation unit)
Tips_invalidPassword=The password you entered is invalid!
Tips_matchPassword=Password and confirm password don't match,Please input again!
Tips_existing_inputAgain=Already exists. Please enter again!
Tips_noFoundBidFiles=No bid files for [{0}] were found!
Tips_maxComparFilesCount=Up to {0} files can be compared!
Tips_alreadyExists=[{0}] already exists!
Tips_quickEvaluation = Set all unevaluation items to {0}
Tips_quickEvaluationScore = Set all non-scored items to max score
Tips_bidFileLoadCache = Please enter the number of bid file load caches.
Tips_enterOpinioForCurFactor = Please enter the opinion for current factor.
Tips_saveAllComplate = Only after everyone has completed [{0}] can this be done.
Tips_notAllowEvaluation = The [{0}] has not allowed bid evaluation. Please try again later!
Tips_notEvaluationComplate = The [{0}] has not been completed, which may affect the subsequent evaluation results, Please try again later!
Tips_preStepNotCompleted = Because when entering the current evaluation, the [{0}] has not completed, the results may affect the current evaluation results, please refresh and try again!
Tips_preStepNotCompletedBeforeEntry=When entering the current evaluation, the {0} has not completed the evaluation, and its result may affect the current evaluation result. Please refresh and try again!
Tips_existNoEvaluationFactor=[{0}] still has unevaluation factors , please check and evaluation all evaluation factors!
Tips_existNoScoreFactor=[{0}] still has evaluation factors that have not been scored , please check and score all evaluation factors!
Tips_entryScroeRange = Please enter the score between {0} - {1}!
Tips_setQuickEvaluation = Are you sure to set all non evaluated factors as "{0}"?
Tips_setQuickEvaluationScore = Are you sure to set all non scored factors to full score?
Tips_checkScoreBeforeSavePriceEvaluation = Before saving, please carefully check whether the benchmark price and price score are correct. If the configuration formula does not meet the bid evaluation method, you can manually enter the benchmark price or price score.
Tips_notSameWidthFormulaScore=The current price score is inconsistent with the formula calculation score, please click "{0}", If the configuration formula does not meet the bid evaluation method, you can manually enter the benchmark price or price score.
Tips_saveEvalResultSuccess = The current bid evaluation results are successfully saved.
Tips_saveEvalResultFailed = The current bid evaluation results are failed saved!
Tips_submitEvalResultFailed = The current bid evaluation results are failed submited!
Tips_submitEvaluationResult = After submit the result of the [{0}], you will be unable to modify the current evaluation results , Are you sure you want to submit the current evaluation result?
Tips_submitAndEndEvaluation = After submit the result of the [{0}], all bid evaluation processes will be completed ,Are you sure you want to complete the current evaluation operation??
Tips_unComplateProgress=The following evaluation process has not been completed:
Tips_recommonedTypeOfEntry=Please select the candidate to be shortlisted in the last column.
Tips_recommonedTypeOfRecommoned=Please select the winning bidder candidate in the last column.
Tips_recommonedTypeOfFirst=Please select the preferred (alternative) winning bidder candidate in the last column.
Tips_recommonedAtLeastOne=Please select at least one winning bidder candidate.
Tips_recommonedLimit=Only {0} winning bidder candidates can be selected at most.
Tips_recommonedEntryLimit=Only {0} candidates can be shortlisted at most.
Tips_recommonedPreferredLimit=Only {0} preferred candidate can be selected at most.
Tips_recommonedAlternativeLimit=Only {0} alternative candidates candidate can be selected at most.
Tips_recommonedEmpty=You have not recommended any winning bidder, Are you sure not to recommend and end the evaluation?
Tips_recommonedHighest=highest
Tips_recommonedLowest=lowest
Tips_recommonedFormat=The candidate with the {1} {0} will be recommended as the winning bidder.
Tips_recommonedChoseFormat=The candidate with the {1} {0} will be recommended as the preferred winning bidder.
Tips_please_add_expert = Please add the expert!
Tips_failure={0} failed!
Tips_openClarifyFiles=Double click the left mouse button to open the file.
Tips_sendLocalFile=Send local clarification
Tips_pleaseSelectSupplier=Please select to sign in
Tips_successSign=You have signed in successfully!
Tips_NotBidPrice=Quotation items are not set, please add quotation items to the bid opening list!
Tips_SelcetMinOneClarification=Please select at least one clarification!
Tips_clarificationFileTitle=Please fill in the title of the clarification file!
Tips_selectFile=Please select the clarification file you want to modify!
Tips_obtainingDownloadedTenderInfo=Obtaining downloaded tender information...
Tips_noBidFilePresent=No bid file at present!
Tips_selectExportDic=Please select the export directory
Tips_exportingAndWaiting=Exporting, please wait...
Tips_noBidFileCanBeExport=There is no bidding document can be exported!
Tips_downloadingFormat=Is downloading {0}...
Tips_downloadingAndWaitFormat=Downloading {0}, please wait...
Tips_notFoundDownloadFormat=There are no downloadable {0}s!
Tips_downloadFinished=The download task is over.
Tips_downloadFinishedFormat=The {0} download task is over.
Tips_downloading=Downloading
Tips_downloaded=Have downloaded
Tips_notFoundDownloadableExpert=There are no downloadable bid evaluation experts!
Tips_expertDownloadFailed=Bid evaluation expert download failed!
Tips_hasBeenUpdated=Has Been Updated
Tips_noDownloadTask=No download task at present!
Tips_reDownload=Re-download
Tips_failedDownload=Download Failed
Tips_pauseToDownload=Pause to download
Tips_waitingForDownload=Waiting For Download
Tips_timeUsed=Time used
Tips_confirmExit=There are tasks being downloaded. Confirm you want to stop downloading and quit?
Tips_stopAndExit=Stop and exit
Tips_minimizeDownload=Minimize download
Tips_selectToClarify=Please select one to clarify
Tips_sendClarification=sendClarification
Tips_uploadComplete=Upload to complete
Tips_uploadFailed=Fail to upload
Tips_sendClarificationFileFailed=Clarification file delivery failed!
Tips_just=Just{0}
Tips_synchronizingFormat=Synchronizing {0}...
Tips_synchronizedSuccessFormat={0} synchronization successful.
Tips_synchronizedFailedFormat={0} synchronization failed!
Tips_progressIn=Is in [{0}]...
Tips_progressInAndWait=Is in [{0}],please wait...
Tips_progressComplate=[{0}] completed!
Tips_progressNotStart=[{0}] not started!
Tips_TemplatesAlreadyExist=Templates already exist in the current project:
Tips_WhetherOrNotCovered=Whether or not covered
Tips_LoadFileFail=Failed to load to file...
Tips_fileDeleted=The current file has been deleted!
Tips_generatingFormat=Generating {0}...
Tips_generatingSuccessFormat={0}generated successfully
Tips_generatingFailFormat={0}generated failed!
Tips_synchronizeReports=Synchronization report will cover all files in my report. Are you sure you want to synchronize?
Tips_hasBeenSignedOperation=[{0}] has been signed, this operation cannot be performed!
Tips_continueOperationSigned=If you need to operate, please delete the signature record of the file in the circulation signature interface!
Tips_selectSignatureFile=Please select the file to be signed!
Tips_selectSigner=Please select the user who needs signature!
Tips_noNeedSigner=No users need signature!
Tips_signatureSuccess=Signature successful!
Tips_signatureFail=Signature failed!
Tips_signatureFirst=Please add your signature first!
Tips_selectCircleSignatureFile=Select files to sign
Tips_selectCircleSignatureUser=Select users to sign
#Tips_youAreSigning=You are signing
#Tips_beingSigned=Being signed
Tips_beingSignedBy=[{0}] is signing, Please select another file or try again later!
Tips_notComplateSignature=Your signature has not been submitted yet. Do you want to complete it?
#Tips_applySignature=Apply for signature
Tips_selectFileSignature=Please select the document on the left for electronic signature.
Tips_applyCircleSignature=Indicates that you can apply for electronic signature.
Tips_beingCircleSignature=Indicates that the current document is being electronically signed.
Tips_complateSignature=Indicates that you have completed the electronic signature.
Tips_submitSignature=Please click "{0}" after signature!
Tips_cancelSignaturePermission=Cancel signature permission
Tips_continueSignature=You have finished signature. To continue signature, please click "{0}".
Tips_circleignature=The final signature is subject to the document display!
Tips_reSignature=Click the "signed" status of user, can be authorized to continue signature!
Tips_HandwritingBoardConfiguration=Handwriting board configuration
Tips_signatureAuthentication=Please use the expert sign app to scan the QR code to verify your identity!
Tips_authenticationQRCodeScanned=Please operate and authenticate in app!
Tips_noIdInfoToAuthentication=This user does not have ID card info set, unable to authenticate!
Tips_identityNotMatch=The identity information of current user and app does not match!
Tips_identityNotMatchInfo=The identity information of current user and app does not match!\r\nThe current user ID card is: {0}\r\n The app user ID card is: {1}
Tips_authenticationSuccessful=Authentication successful!
Tips_gettingSignatureSeal=Getting signature seal...
Tips_gettingSignatureSealFailed=Failed to obtain signature seal!
Tips_noSignatureSealSet=Signature seal not set!
Tips_setSignatureSealFirst=Please set the signature seal in the app first!
Tips_signatureIdentity=When signing for the first time, please click" {0} "to verify your identity, and you can sign after passing the authentication.
Tips_signatureFileQRCode=Please use the {0} to scan the QR code to signature!
Tips_signatureFileQRCodeScanned=Please operate and signature in app!
Tips_addOneSignature=Add one signature at the specified location
Tips_addBatchSignatureSameLoaction=Batch add signatures at the same location within the following set page number range
Tips_egPageRange=for example: 1-10 or 2,4,6,8,10
Tips_CalculatingSignatureLocation=Calculating signature location...
Tips_notFoundSignatureKeyFile=File with signature keyword not found!
Tips_pleaseCheckSignatureKey=Please check whether the signature keyword is set in the file!
Tips_calculatingFileSignatureHash=Calculating [{0}] signature hash
Tips_notFoundSignatureKey=Signature key location not found in {0}!
Tips_batchSignature=Batch signing
Tips_batchSignatureFile=The [{0}] is being signed...
Tips_signatureSuccessFormat=The [{0}] was signed successfully!
Tips_signatureFailedFormat =The [{0}] was signed failed !
Tips_totalSignatureSuccessCount=A total of {0} fils were signed successfully!
Tips_totalSignatureFailedCount=A total of {0} fils were signed failed!
Tips_signatureFileCheckResult=The current file has detected that you have {0} places to sign. Please click "{1}" to sign. If you need to add your signature in other places, please click "{2}" to manually put the signature seal on the file where you need to sign.
Tips_signatureSupplement=If you need to add your signature in other places, please click "{0}" to manually put the signature seal on the file where you need to sign.
Tips_signatureManual=Please click "{0}" to manually put the signature seal on the file where you need to sign.
Tips_signatureManualSet=Please move the mouse and place the signature seal image in the file where it needs to be signed!
Tips_signatureManualConfirm=The signature keyword has been set in the current file. If you use {0}, it may occupy the key signature position, resulting in signature overlap. Are you sure you want to sign use {0}?
Tips_signatureSelectFile=Please select the file to be signed on the left(the green signature icon indicates that you can apply for signature).
Tips_signatureNo=No signature information was detected in the current file!
Tips_signatureTotalCount=There are {0} signature seals in the current file.
Tips_signatureNeedCountAndNotCount=You need to sign {0} seal in the current file, and {1} signature seals have been signed, and {2} is(are) not signed.
Tips_signatureNeedCountAndTotalCount=You need to sign {0} seal in the current file, and {1} signature seals have been signed.There are {2} signature seals in the file.
Tips_signatureCountAndTotalCount=You have added {0} signature seals to the current file. here are {1} signature seals in the file.
Tips_signatureNoAndTotalCount=You have not signed the current file. There are {0} signature seals in the file.
Tips_signatureAllAndComplate=You have completed all the signatures in the current file. Please check and confirm that the count and location of the signatures are correct, and then click "{0}" to complete the signature.
Tips_signatureCountAndComplate=You have added {0} signature seals to the current file. Please check and confirm that the count and location of the signatures are correct, and then click "{1}" to complete the signature.
Tips_signatureUncountableAndComplate=You have added signature seals to the current file. Please check and confirm that the count and location of the signatures are correct, and then click "{0}" to complete the signature.
Tips_signatureComplateNote=Note: before finished signature, please check whether the count and position of the signature are correct, and the signature cannot be revoked after finished.
Tips_signatureComplate=You have added {0} signature seals to the current file. Are you sure you want to complete the signature?
Tips_fileModified=The current file has been modified, please update and try again!
Tips_deleteSignatureSeal=Are you sure you want to delete the signature seal of {0} at 20 {1}?
Tips_deleteSignatureSealSuccess=The Signature of [{0}] deleted successfully!
Tips_deleteSignatureSealFailed=The Signature of [{0}] deleted failed!
Tips_deleteAndReSignature=The Signature of [{0}] deleted successfully. Please inform [{0}] to re-signature!
Tips_deleteAllSignatureSeal=Are you sure you want to delete all signature seals of the current file?
Tips_deleteLastSignature=Only the last signature seals can be deleted!
Tips_localSignatureByUser=1.Select the user to be signed; 2.Put the signature seal on the file where the signature is needed; 3.Use APP to scan the code to complete the signature.
Tips_signatureSealList=Signature list
Tips_noSignatureSeals=Signature information not found!
Tips_NoFoundReportToExport=Not found report to export!
Tips_DeleteSelectedReportTemp=Are you sure you want to delete the selected report template?
Tips_EnterEvaluationStepName=Please enter the name of bid evaluation
Tips_AlreadyExistsPleaseRetype=is already exists, please retype it!
Tips_ForExceedingLimitPrice=For exceeding the bid limit price
Tips_RejectBid=can waste the bid!
Tips_expertSignStep=Experts confirm personal information when signing in, and confirm whether there is interest relationship with the bidder (Supplier), if there is interest relationship, it needs to be avoided!
Tips_featureCheckStep=Please select the items to be Feature checked for features, and only the selected items will be checked during bid evaluation. The inspection results are only for experts' reference!
Tips_SetBidLimitPrice=Please set the bid limit price for the current bid evaluation step, and evaluate the bid price limit price during bid evaluation!
Tips_ReWriteLimitPrice=The bid limit price is wrong, please fill it again!
Tips_RankBaseOfVotes=The final ranking is determined by the number of expert votes when recommending the ranking!
Tips_DefaultIsWrongAndAgain=The content of recommended number is wrong by default, please fill in again
Tips_signInFirst=Please sign in first!
Tips_ConfirmInfoAndSignToEval=Please confirm your information, and you can only evaluate the bid after you sign in!
Tips_SelcetExpert=Select experts to specify!
Tips_SelectClearItem=Please select the bid clearance item for the current bid evaluation step
Tips_SelectEvalType=Please select bid evaluation type!
Tips_allowedImportOtherResult=Allow import other expert results
Tips_allowedImportHisResult=Allow import of history results
Tips_allowEditConclusion=Allow edit conclusion
Tips_allowedViewConclusion=Allow view result when completed
Tips_allowedViewSummaryResults=Allow view summary result when completed
Tips_inconsistentEarlyWarning=When the consistency results are inconsistent, prompt and early warning will be given
Tips_inconsistentNotAllowed=When the consistency results are inconsistent, Commit is not allowed
Tips_signatureBeforeSubmit=Electronic signature before submission
Tips_expertDecimalDigits=The expert scores retained {0} decimal places,and followed digit is rounded.
Tips_earlyWarningRange=Early warning when the expert score deviates from the average score by more than \u00b1{0}%(include)!
Tips_excludeOverWarningScore=Exclude expert scores that exceed the average score of \u00b1{0}%(include). If there is no valid score after exclude , use the
Tips_takeAllAverageScore =Take the average score of all experts
Tips_removeHighestLowstByExpert =Remove one highest score and one lowest score by expert
Tips_removeHighestLowstByFactor = Remove one highest score and one lowest score by factor item
Tips_scoredForSupplier = Scored all same factors for {0}s
Tips_MakeAtLeastOneRound=Please make at least one round of offer!
Tips_multiRoundBidPrice=One or more rounds of negotiation and quotation for {0}!
Tips_complateRoundBidPrice={0} have been completed!
Tips_allowedRoundBidPrice=only allowed for {0} whose evaluation score exceeds (include) the lowest score!
Tips_shortlistRoles=Empty value means all the candidates are shortlisted, and only one rule can be set at most!
Tips_shortlistEmpty=Empty value means all the candidates are shortlisted!
Tips_shortlistBySortNo=Only the top {0} can be shortlisted
Tips_shortlistByMinScore=Only the score >= {0} can be shortlisted
Tips_addGradeLevelHighToLow=Please add the grade level from high to low!
Tips_requriedMaxRound=Please enter the maximum quotation rounds!
Tips_maxBidPriceRound=Maximum quotation rounds allowed!
Tips_exceedMaxBidPriceRound=Up to {0} rounds allowed!
Tips_gettingRemoteBidPrice=Waiting for {0} remote quote price...
Tips_allComplateQuotedBidPrice=All {0}s have completed the latest round of quoted price!
Tips_notComplateQuotedBidPrice=There are {0} {1}s who have not completed the latest round of quoted price!
Tips_getSupplerBidPriceFileAndParsing=Got the quoted bid price file of {0}, parsing...
Tips_getSupplerBidPriceSuccess=The bid price information of {0} has been obtained successfully!
Tips_getSupplerBidPriceFailed=The bid price information of {0} has been obtained failed!
Tips_MakeMaxRound=Please enter the maximum turn!
Tips_winnerRule=The highest score or the highest ranking of the former is recommended as the winner!
Tips_alreadyWaste= The waste bidding has been initiated, Can't do this operation!
Tips_wasteReason=Please enter the reason for scrap
Tips_wasteStepFail=Initiating failure!
Tips_wasteStepConfirm=Do you confirm the initiation of the bid and the expert vote?
Tips_wasteStepConfirm1=Are you sure you want to do the scrap operation?
Tips_linkerCodeIsWrong=The IDCard number is invalid, please enter it again!
Tips_institutionCodeWrong=The institution code is not unique, please enter it again!
Tips_RandomOrderBeingExtracted=Random order is being extracted.....
Tips_ExportBirPriceXmlTemp=Export of template for the tender
Tips_UseDefalutBidPriceXmlTemp=Use the default opening list template
Tips_importBidPriceXmlTemp=Import of template for the tender
Tips_setDefalutBidPriceXmlTemp=Set to default opening list template
Tips_deleteDefalutBidPriceXmlTemp=Delete default opening list template
Tips_enterBidPriceName=Please enter the name of the bid price!
Tips_completeBidAndCanNotOperation=Bid opening has beencompleted and this operation cannot be performed!
Tips_completeEvaluationAndCanNotOperation=Bid evaluation has been completed and this operation cannot be performed!
Tips_pleaseSelectFile=Please select the file first!
Tips_reuploadBidFile=There is already bid files, do you want to continue to upload the bid file?
Tips_sameNameFileCovered=Bid files with the same name will be covered!
Tips_notFindSignatureInfo=The signature information of the current user is not find!
Tips_updatePasswordInfo=Plesase use a combination of letters with numbers or symbols
Tips_defaultPasswordInfo=Your password is the system initial password, please change the password first!
Tips_modificationsFailed=Modifications failed!
Tips_originalPasswordError=The original password is incorrect, please enter again!
Tips_samePasswordInfo=Password can not be the same!
Tips_passwordMatch=The new password does not match the confirmation password!
Tips_passwordRule=The password must consist of 6-16 letters and numbers!
Tips_changeMethodFail=This item is manually entered into the project, can't convert the procurement method!
Tips_sortAsBidNo=Also use the serial number as the bidNO
Tips_reSign=Are you sure you want to resign?
Tips_setBidOpenListError=The default bid opening list is incorrectly structured, please refresh and try again!
Tips_bidPriceSavesuccess=The Bid price entry is completed, Confirm to complete the bid opening?
Tips_creatEvalStep=Please create bid evaluation steps first!
Tips_generatStep=The following bid evaluation steps are generated by the bid evaluation step template according to the bid evaluation method and evaluation factors. After creation, you can modify or move the order of bid evaluation steps.
Tips_factorStep=Please select the {0}s to be evaluation for the current step on the right.
Tips_stepFilterRule=According to the principle of "{0}" or "{1}",Decide whether {2} can enter the next evaluation step.
Tips_oneTicketVeto=When one of the experts concluded is "{0}",the {1} will not be able to enter the next evaluation step.
Tips_minorityObeyMajority=When the conclusions of all experts are inconsistent, According to the principle of "{0}".
Tips_evaluationRule_filter=According to the principle of "{0}",the {2} who concludes as "{1}" will not be able to enter the next evaluation step.
Tips_evaluationRule_scoreFilter=The {1} with the final score >={0} points to the next evaluation step.
Tips_evaluationRule_sortNoFilter=The top {0} {1}s enter the next evaluation step.
Tips_evaluationRule_noFilter=All {0}s enter the next evaluation step
Tips_filterPriceSort=Evaluation only the {1} {2}s with the lowest {0}!
Tips_filterDeviateclause=When there are more than {0} (include) deviations in the deviate clause , the bidding will be rejected\u3002
Tips_evaluationRule_weight=The final score weight is {0}%.
Tips_vetoTenderStep=Decide whether {0} can enter the next evaluation step.
Tips_evaluationReturn=After the application is approved,you can continue to evaluation!
Tips_evaluationReturning=You have submitted the return application, please wait for approval!
Tips_evaluationFinishReturn=The evaluation has been completed, and application return is not allowed!
Tips_evaluationCompleted=This operation cannot be performed because the bid evaluation has been completed!
Tips_evaluationPriceFinishReturn=The economic bid opening has been completed, and it is not allowed to apply for return to the current evaluation step!
Tips_featureCheckResult=The red text indicates that the code may have the same situation, and the check results are for reference only. The {0} select "\u221a" means {1}, not select means {2}.
Tips_sameFeatureCode=Same {2} as {0} {1}s;
Tips_notDetectSameFeatureCode= Not detect the same feature code.
Tips_exceedsBiddingLimit=The red price indicates that the price exceeds the bidding limit
Tips_assignBidCommentTask=Assign the [{2}] tasks of the [{0}] selected [{1}]s to [{3}].
Tips_bidCommentStep=The result of {0} will be used as the reference for expert evaluation.
Tips_singStartContent=Set the starting voice content
Tips_singEndContent=Set the ending voice content Sing Bid finished(eg:each bidder has objection to the content of the singing?)
Tips_singReplace=Replace the following characters (multiple replacement characters are separated by commas",", and replacement contents are separated by colons":")
Tips_ledScroll=Each row as scrolling message,and effective after saving!
Tips_doubleClickViewFile=Double click the file icon to open the file for viewing!
Tips_doubleClickViewAndEditFile=Double click the file icon to open the file to view or adjust the style. (it is recommended to manually switch to PDF) confirm that the content and style are correct before uploading!
Tips_uploadOpeningSignatureFile=Tip: please check and confirm whether the contents and styles are correct before uploading, and upload after confirming that they are correct!
Tips_uploadOpeningSignatureFileConfirm=Confirm to upload the bid opening list for remote signature confirmation?
Tips_reSignatureOpeningFileConfirm=Reconfirm for confirmation will delete the uploaded files and all confirm records. Are you sure you want to reconfirm?
Tips_reSignatureOpeningFileTip=Tip: after successful operation, please upload the bid opening list file again!
Tips_localTenderReBidPrice=The project for the local projects, cannot apply for remote offer!
Tips_factorsBidTypeCount=Including {0} business and {1} technical factors
Tips_factorsNoBidType=No business and technical factors
Tips_evalProgressOperation=View and control bid evaluation progress or return bid evaluation steps
Tips_evalResultOperation=View and confirm bid evaluation results
Tips_quotation_comparison=To modify the bid price, please click "{0}",and it will be automatically converted to the bid evaluation price after correction.
Tips_errorsMessages=There are {0} error messages!
Tips_enterOpeningMeeting=Are you sure you want to enter the current video meeting of bid opening?
Tips_enterEvaluationMeeting=Are you sure you want to enter the current video meeting of bid evaluation?
AppendTips_scoreDecimalDigits_1=All aggregate scores are retained in
AppendTips_scoreDecimalDigits_2=decimal places, followed by one rounded.
SynchronizeProjectInfoShell_SyncProjectComplete=Sync project end!
SynchronizeProjectInfoShell_SyncProjectCompleteAndCountdown=Sync project end, and will be closed in {0} seconds!
SynchronizeProjectInfoShell_SyncingTodayProject=Synchronizing today's projects!
SynchronizeProjectInfoShell_SyncProjectSuccess=Successfully synchronized {0} projects!
SynchronizeProjectInfoShell_SyncProjectSuccessWithFail=Successfully synchronized {0} projects! and {1} projecdts failed!
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.gx.obe.datastruct</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Datastruct
Bundle-SymbolicName: com.gx.obe.datastruct;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.gx.obe.datastruct.Activator
Bundle-Vendor: GX
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.gx.obe.utils
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: com.gx.obe.datastruct
Bundle-ActivationPolicy: lazy
Export-Package: com.gx.obe.datastruct.tree,
com.gx.obe.datastruct.tree.table
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
javacDefaultEncoding.. = UTF-8
\ No newline at end of file
package com.gx.obe.datastruct;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.gx.obe.datastruct"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
package com.gx.obe.datastruct.tree;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Predicate;
import com.gx.obe.util.utils.CollectionUtils;
public class Forest<T extends ITree<T>> {
private final List<T> treeList;
private final List<T> leafList = new LinkedList<>();
public Forest(List<T> treeList) {
this.treeList = Optional.ofNullable(treeList).orElseGet(LinkedList::new);
initLeafList(this.treeList);
}
private void initLeafList(List<T> treeList) {
for (T iTree : treeList) {
List<T> childList = iTree.getChildList();
if (CollectionUtils.isNull(childList)) {
leafList.add(iTree);
continue;
}
initLeafList(childList);
}
}
public List<T> getTreeList() {
return treeList;
}
public List<T> getLeafList() {
return leafList;
}
public void removeLeafPath(T leaf) {
if (!leafList.remove(leaf)) {
return;
}
removePath(leaf);
}
public void filterPath(Predicate<T> predicate) {
Iterator<T> iterator = getLeafList().iterator();
while (iterator.hasNext()) {
T iTree = iterator.next();
if (!predicate.test(iTree)) {
iterator.remove();
removePath(iTree);
}
}
}
private void removePath(T iTree) {
T parent = iTree.getParent();
if (Objects.isNull(parent)) {
treeList.remove(iTree);
return;
}
List<T> childList = parent.getChildList();
if (!childList.remove(iTree)) {
return;
}
if (childList.size() != 0) {
return;
}
removePath(parent);
}
}
package com.gx.obe.datastruct.tree;
import java.util.List;
public interface ITree<T extends ITree<T>> {
public T getParent();
public List<T> getChildList();
}
package com.gx.obe.datastruct.tree.table;
import java.util.List;
/**
* @Description: 树
* @author chenxw
*/
public interface ITree {
/**
* @Description: 获取树根节点
* @author chenxw
* @return
*/
ITree getRoot();
/**
* @Description: 子树列表
* @author chenxw
* @return
*/
List<? extends ITree> getITrees();
/**
* @Description: 名称
* @author chenxw
* @return
*/
String getName();
/**
* @Description: 键
* @author chenxw
* @return
*/
String getKey();
/**
* @Description: 值
* @author chenxw
* @param key
* @return
*/
String getValue(Object key);
}
package com.gx.obe.datastruct.tree.table;
import java.util.ArrayList;
import java.util.List;
import com.gx.obe.util.utils.CollectionUtils;
/**
* @Description: 解析树
* @author chenxw
*/
public class ParseTrees {
/**
* @Description: 叶子节点列表
*/
private List<Tree> leafList = new ArrayList<>();
/**
* @Description: 树横向合并列表
*/
private List<TreeSpan> wideSpanList = new ArrayList<>();
/**
* @Description: 树竖向合并列表
*/
private List<TreeSpan> highSpanList = new ArrayList<>();
/**
* @Description: 高度
*/
private int height;
/**
* @Description: 叶子节点个数
*/
private int leafCount;
/**
* @Description: 空树
*/
private final Tree NULL_TREE = new Tree();
/**
* @author chenxw
* @param iTreeList
*/
public ParseTrees(List<? extends ITree> iTreeList) {
if (CollectionUtils.isNull(iTreeList)) {
return;
}
initLeafList(iTreeList, 0, null);
initHeight(iTreeList, 1);
initHighSpanList();
initWideSpanList(iTreeList, 0, 0);
initLeafCount();
}
/**
* @Description: 初始化叶子节点列表
* @author chenxw
* @param iTreeList
* @param level
* @param parent
*/
private void initLeafList(List<? extends ITree> iTreeList, int level, Tree parent) {
for (ITree iTree : iTreeList) {
Tree tree = new Tree();
tree.setLevel(level);
tree.setParent(parent);
tree.setValue(iTree);
List<? extends ITree> iTrees = iTree.getITrees();
if (CollectionUtils.isNull(iTrees)) leafList.add(tree);
else initLeafList(iTrees, level + 1, tree);
}
}
/**
* @Description: 初始化树横向合并列表
* @author chenxw
* @param iTreeList
* @param level
* @param leafIndex
*/
private int initWideSpanList(List<? extends ITree> iTreeList, int level, int leafIndex) {
for (ITree iTree : iTreeList) {
List<? extends ITree> iTrees = iTree.getITrees();
if (CollectionUtils.isNull(iTrees)) leafIndex++;
else {
TreeSpan span = new TreeSpan();
span.setLevel(level);
span.setLeafIndex(leafIndex);
span.setSpanCount(iTrees.size());
wideSpanList.add(span);
leafIndex = initWideSpanList(iTree.getITrees(), level + 1, leafIndex);
}
}
return leafIndex;
}
/**
* @Description: 初始化树竖向合并列表
* @author chenxw
*/
private void initHighSpanList() {
for (int i = 0; i < leafList.size(); i++) {
Tree tree = leafList.get(0);
if (height > tree.getLevel()) {
TreeSpan span = new TreeSpan();
span.setLevel(tree.getLevel());
span.setLeafIndex(i);
span.setSpanCount(height - tree.getLevel() + 1);
highSpanList.add(span);
}
}
}
/**
* @Description: 初始化树的高度
* @author chenxw
* @param iTreeList
* @param level
*/
private void initHeight(List<? extends ITree> iTreeList, int level) {
for (ITree iTree : iTreeList) {
List<? extends ITree> iTrees = iTree.getITrees();
if (CollectionUtils.isNull(iTrees)) height = Math.max(height, level);
else initHeight(iTrees, level + 1);
}
}
/**
* @Description: 初始化叶子节点的数量
* @author chenxw
*/
private void initLeafCount() {
leafCount = leafList.size();
}
/**
* @Description: 根据叶子节点索引获取叶子节点
* @author chenxw
* @param leafIndex
* @return
*/
public ITree get(int leafIndex) {
return leafList.get(leafIndex).getValue();
}
/**
* @Description: 根据层数及叶子节点索引获取对应包含这个叶子节点是节点
* @author chenxw
* @param level
* @param leafIndex
* @return
*/
public ITree getITree(int level, int leafIndex) {
return getTree(level, leafList.get(leafIndex)).getValue();
}
/**
* @Description: 根据层数递归获取节点
* @author chenxw
* @param level
* @param tree
* @return
*/
private Tree getTree(int level, Tree tree) {
if (level > tree.getLevel() || level < 0) {
return NULL_TREE;
}
if (level == tree.getLevel()) {
return tree;
}
return getTree(level, tree.getParent());
}
/**
* @Description: 获取树横向合并列表
* @author chenxw
* @return
*/
public List<TreeSpan> getWideSpanList() {
return wideSpanList;
}
/**
* @Description: 获取树竖向合并列表
* @author chenxw
* @return
*/
public List<TreeSpan> getHighSpanList() {
return highSpanList;
}
/**
* @Description: 获取数的高度
* @author chenxw
* @return
*/
public int getHeight() {
return height;
}
/**
* @Description: 获取叶子节点数
* @author chenxw
* @return
*/
public int getLeafCount() {
return leafCount;
}
}
package com.gx.obe.datastruct.tree.table;
import java.util.List;
import java.util.function.Function;
/**
* @Description: 字符串树
* @author chenxw
*/
public class StringTree implements ITree {
/**
* @Description: 父节点
*/
private ITree root;
/**
* @Description: 名称
*/
private String name;
/**
* @Description: 获取value函数
*/
private Function<Object, String> function;
/**
* @author chenxw
* @param name
* @param function
*/
public StringTree(ITree root, String name, Function<Object, String> function) {
this.root = root;
this.name = name;
this.function = function;
}
@Override
public ITree getRoot() {
return root;
}
@Override
public List<ITree> getITrees() {
return null;
}
@Override
public String getName() {
return name;
}
@Override
public String getKey() {
return null;
}
@Override
public String getValue(Object key) {
return function.apply(key);
}
}
package com.gx.obe.datastruct.tree.table;
/**
* @Description: 树
* @author chenxw
*/
class Tree {
/**
* @Description: 层数
*/
private int level;
/**
* @Description: 父节点
*/
private Tree parent;
/**
* @Description: 值
*/
private ITree value;
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public Tree getParent() {
return parent;
}
public void setParent(Tree parent) {
this.parent = parent;
}
public ITree getValue() {
return value;
}
public void setValue(ITree value) {
this.value = value;
}
}
\ No newline at end of file
package com.gx.obe.datastruct.tree.table;
public class TreeSpan {
private int level;
private int leafIndex;
private int spanCount;
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public int getLeafIndex() {
return leafIndex;
}
public void setLeafIndex(int leafIndex) {
this.leafIndex = leafIndex;
}
public int getSpanCount() {
return spanCount;
}
public void setSpanCount(int spanCount) {
this.spanCount = spanCount;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="/org.eclipse.swt.core/lib/de.kupzog.KTable.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.gx.obe.quote</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Quote
Bundle-SymbolicName: com.gx.obe.quote
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.gx.obe.quote.Activator
Bundle-Vendor: GX
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.gx.obe.components.core,
com.gx.obe.business,
org.eclipse.swt.core,
com.gx.obe.dynamicview,
com.gx.obe.common.icons,
com.gx.obe.common.widget,
com.gx.obe.action;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: com.gx.obe.quote
Bundle-ActivationPolicy: lazy
Export-Package: com.gx.obe.quote.action,
com.gx.obe.quote.beans,
com.gx.obe.quote.calculator,
com.gx.obe.quote.service
Import-Package: im.util
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
javacDefaultEncoding.. = UTF-8
\ No newline at end of file
package com.gx.obe.quote;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.gx.obe.quote"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
package com.gx.obe.quote.action;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.action.bean.CAction;
import com.gx.obe.quote.composite.AdjustStrategyManageComposite;
/**
* @Description: 修正策略管理
* @author chenxw
*/
public class AdjustStrategyManageAction extends CAction {
@Override
protected Composite initComposite(Composite parent) {
AdjustStrategyManageComposite composite = new AdjustStrategyManageComposite(parent, SWT.NONE);
composite.refresh(getTenderProject().getId());
return composite;
}
}
package com.gx.obe.quote.action;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.action.bean.CAction;
import com.gx.obe.quote.composite.BidPriceManageComposite;
/**
* @Description: 投标报价管理
* @author chenxw
*/
public class BidPriceManageAction extends CAction {
@Override
protected Composite initComposite(Composite parent) {
BidPriceManageComposite composite = new BidPriceManageComposite(parent, SWT.NONE);
composite.refresh(getTenderProject().getId());
return composite;
}
}
package com.gx.obe.quote.beans;
import java.math.BigDecimal;
import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.quote.enums.AdjustTypeEnum;
import com.gx.obe.util.utils.BigDecimalUtils;
/**
* @Description: 调整策略
* @author chenxw
*/
public class AdjustStrategy {
private String id;
private String tenderId;
private String supplierId;
private String bidPriceId;
/**
* @Description: 调整类型
*/
private String adjustType;
/**
* @Description: 调整的值
*/
private BigDecimal adjustValue;
/**
* @Description: 调整原因
*/
private String adjustReason;
private int scale = 2;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
public String getSupplierId() {
return supplierId;
}
public void setSupplierId(String supplierId) {
this.supplierId = supplierId;
}
public String getBidPriceId() {
return bidPriceId;
}
public void setBidPriceId(String bidPriceId) {
this.bidPriceId = bidPriceId;
}
public String getAdjustType() {
return adjustType;
}
public void setAdjustType(String adjustType) {
this.adjustType = adjustType;
}
public BigDecimal getAdjustValue() {
return adjustValue;
}
public void setAdjustValue(BigDecimal adjustValue) {
this.adjustValue = adjustValue;
}
public String getAdjustReason() {
return adjustReason;
}
public void setAdjustReason(String adjustReason) {
this.adjustReason = adjustReason;
}
public String getDescribe(String priceUnit) {
if (!AdjustTypeEnum.MAP.containsKey(getAdjustType())) {
return "";
}
switch (AdjustTypeEnum.MAP.get(getAdjustType())) {
case DISCOUNT_RATE:
if (adjustValue.compareTo(BigDecimal.ZERO) == -1) {
return "下浮".concat(BigDecimalUtils.round(adjustValue.multiply(BigDecimal.valueOf(-1)), scale).toString()).concat("%");
} else if (adjustValue.compareTo(BigDecimal.ZERO) == 1) {
return "上浮".concat(BigDecimalUtils.round(adjustValue, scale).toString()).concat("%");
}
break;
case DISCOUNT_AMOUNT:
if (adjustValue.compareTo(BigDecimal.ZERO) == -1) {
return "减少".concat(MoneyUtils.getMoneyFormatByUnit(adjustValue.multiply(BigDecimal.valueOf(-1)), priceUnit)).concat(priceUnit);
} else if (adjustValue.compareTo(BigDecimal.ZERO) == 1) {
return "增加".concat(MoneyUtils.getMoneyFormatByUnit(adjustValue, priceUnit)).concat(priceUnit);
}
break;
default:
break;
}
return "";
}
}
package com.gx.obe.quote.beans;
import java.math.BigDecimal;
/**
* @Description: 汇率
* @author chenxw
*/
public class ExchangeRate {
private String id;
private String tenderId;
/**
* @Description: 转换之前的币种编号
*/
private String beforeCode;
/**
* @Description: 转换之后的币种编号
*/
private String afterCode;
/**
* @Description: 汇率
*/
private BigDecimal rate;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
public String getBeforeCode() {
return beforeCode;
}
public void setBeforeCode(String beforeCode) {
this.beforeCode = beforeCode;
}
public String getAfterCode() {
return afterCode;
}
public void setAfterCode(String afterCode) {
this.afterCode = afterCode;
}
public BigDecimal getRate() {
return rate;
}
public void setRate(BigDecimal rate) {
this.rate = rate;
}
}
package com.gx.obe.quote.calculator;
import java.math.BigDecimal;
import java.util.Objects;
import java.util.Optional;
import com.gx.obe.quote.beans.AdjustStrategy;
import com.gx.obe.quote.enums.AdjustTypeEnum;
/**
* @Description: 修正策略计算器
* @author chenxw
*/
public class AdjustStrategyCalculator implements Calculator {
private AdjustStrategy adjustStrategy;
/**
* @author chenxw
* @param adjustStrategy
*/
public AdjustStrategyCalculator(AdjustStrategy adjustStrategy) {
this.adjustStrategy = adjustStrategy;
}
@Override
public BigDecimal calculate(BigDecimal bigDecimal) {
if (Objects.isNull(bigDecimal)) {
return null;
}
if (Objects.isNull(adjustStrategy)) {
return bigDecimal;
}
Optional<AdjustTypeEnum> adjustTypeEnumOptional = Optional.of(adjustStrategy).map(AdjustStrategy::getAdjustType).map(AdjustTypeEnum.MAP::get);
if (!adjustTypeEnumOptional.isPresent()) {
return bigDecimal;
}
BigDecimal adjustValue = adjustStrategy.getAdjustValue();
if (Objects.isNull(adjustValue)) {
return bigDecimal;
}
return adjustTypeEnumOptional.get().discount(bigDecimal, adjustValue);
}
}
package com.gx.obe.quote.calculator;
import java.math.BigDecimal;
import java.util.Objects;
/**
* @Description: 计算器
* @author chenxw
*/
@FunctionalInterface
public interface Calculator {
/**
* @Description: 计算
* @author chenxw
* @param bigDecimal
* @return
*/
public BigDecimal calculate(BigDecimal bigDecimal);
/**
* @Description: 之前
* @author chenxw
* @param before
* @return
*/
default Calculator compose(Calculator before) {
Objects.requireNonNull(before);
return t -> calculate(before.calculate(t));
}
/**
* @Description: 之后
* @author chenxw
* @param after
* @return
*/
default Calculator andThen(Calculator after) {
Objects.requireNonNull(after);
return t -> after.calculate(calculate(t));
}
}
package com.gx.obe.quote.calculator;
import java.math.BigDecimal;
import java.util.Objects;
import com.gx.obe.quote.exception.NoSetExchangeRateException;
import com.gx.obe.quote.utils.BidPriceUtils;
import com.gx.obe.web.entity.price.BidPriceResult;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
/**
* @Description: 评标价计算器
* @author chenxw
*/
public class EvaluationPriceCalculator {
private ExchangeRateCalculatorFactory calculatorFactory;
/**
* @author chenxw
* @param tenderId
*/
public EvaluationPriceCalculator(String tenderId, TenderProjectRuleEntity projectRule) {
if (Objects.isNull(projectRule)) {
return;
}
this.calculatorFactory = new ExchangeRateCalculatorFactory(tenderId, projectRule.getEvalCurrencyCode());
}
/**
* @Description: 计算
* @author chenxw
* @param bidPriceResult
* @return
* @throws NoSetExchangeRateException
*/
public BigDecimal calculate(BidPriceResult bidPriceResult) throws NoSetExchangeRateException {
if (Objects.isNull(bidPriceResult)) {
return null;
}
return createCalculator(bidPriceResult.getCurrencyCode()).calculate(BidPriceUtils.getFinalBidPrice(bidPriceResult));
}
/**
* @Description: 创建计算器
* @author chenxw
* @param beforeCode
* @return
* @throws NoSetExchangeRateException
*/
public Calculator createCalculator(String beforeCode) throws NoSetExchangeRateException {
if (Objects.isNull(calculatorFactory)) {
return t -> t;
}
return calculatorFactory.createCalculator(beforeCode);
}
}
package com.gx.obe.quote.calculator;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import com.gx.obe.quote.beans.ExchangeRate;
import com.gx.obe.quote.exception.NoSetExchangeRateException;
import com.gx.obe.quote.service.ExchangeRateService;
/**
* @Description: 汇率计算器工厂
* @author chenxw
*/
public class ExchangeRateCalculatorFactory {
private String tenderId;
private String afterCode;
private Map<String, BigDecimal> exchangeRateMap;
/**
* @author chenxw
* @param tenderId
* @param afterCode
*/
public ExchangeRateCalculatorFactory(String tenderId, String afterCode) {
this.tenderId = tenderId;
this.afterCode = afterCode;
this.exchangeRateMap = initExchangeRateMap();
}
/**
* @Description: 初始化汇率map
* @author chenxw
* @return
*/
private Map<String, BigDecimal> initExchangeRateMap() {
List<ExchangeRate> exchangeRateList = ExchangeRateService.getListByAfterCode(tenderId, afterCode);
if (Objects.isNull(exchangeRateList)) {
return new HashMap<>();
}
return exchangeRateList.stream().collect(Collectors.toMap(ExchangeRate::getBeforeCode, ExchangeRate::getRate));
}
/**
* @Description: 创建计算器
* @author chenxw
* @param beforeCode
* @return
* @throws NoSetExchangeRateException
*/
public Calculator createCalculator(String beforeCode) throws NoSetExchangeRateException {
if (Objects.equals(afterCode, beforeCode)) {
return t -> t;
}
BigDecimal exchangeRate = exchangeRateMap.get(beforeCode);
if (Objects.isNull(exchangeRate)) {
throw new NoSetExchangeRateException(beforeCode, afterCode);
}
return exchangeRate::multiply;
}
}
package com.gx.obe.quote.calculator;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import com.gx.obe.components.core.enumeration.BidPriceEnum;
import com.gx.obe.quote.beans.AdjustStrategy;
import com.gx.obe.quote.service.AdjustStrategyService;
import com.gx.obe.quote.utils.BidPriceUtils;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.web.entity.SupplierOpeningResult;
import com.gx.obe.web.entity.price.BidPriceResult;
public class SupplierOpeningResultCalculator {
private final AdjustStrategyService adjustStrategyService = new AdjustStrategyService();
private final Collector<BidPriceResult, ?, EvaluationPrice> collector = Collectors.reducing(new EvaluationPrice(), EvaluationPrice::new, EvaluationPrice::add);
public SupplierOpeningResultCalculator(String tenderId, List<BidPriceResult> bidPriceResultList, List<SupplierOpeningResult> supplierOpeningResultList) {
if (CollectionUtils.isNull(bidPriceResultList)) {
return;
}
calculatorBidPriceResultList(tenderId, bidPriceResultList);
if (CollectionUtils.isNull(supplierOpeningResultList)) {
return;
}
calculatorSupplierOpeningResultList(bidPriceResultList, supplierOpeningResultList);
}
private void calculatorBidPriceResultList(String tenderId, List<BidPriceResult> bidPriceResultList) {
Map<String, AdjustStrategy> adjustStrategyMap = getAdjustStrategyMap(tenderId);
for (BidPriceResult t : bidPriceResultList) {
BigDecimal evaluationPriceOriginal = BidPriceUtils.getFinalBidPrice(t);
t.setEvaluationPriceOriginal(evaluationPriceOriginal);
t.setEvaluationPrice(new AdjustStrategyCalculator(adjustStrategyMap.get(t.getBidPriceId().concat("-").concat(t.getSupplierId()))).calculate(evaluationPriceOriginal));
}
}
private void calculatorSupplierOpeningResultList(List<BidPriceResult> bidPriceResultList, List<SupplierOpeningResult> supplierOpeningResultList) {
Map<String, EvaluationPrice> evaluationPriceMap = bidPriceResultList.stream().filter(t -> BidPriceEnum.JOIN_TOTAL.equals(t.getJoinTotal())).collect(Collectors.groupingBy(BidPriceResult::getSupplierId, collector));
for (SupplierOpeningResult supplierOpeningResult : supplierOpeningResultList) {
EvaluationPrice evaluationPrice = evaluationPriceMap.get(supplierOpeningResult.getSupplierId());
supplierOpeningResult.setEvaluationPriceOriginal(evaluationPrice.evaluationPriceOriginal);
supplierOpeningResult.setEvaluationPrice(evaluationPrice.evaluationPrice);
}
}
private Map<String, AdjustStrategy> getAdjustStrategyMap(String tenderId) {
List<AdjustStrategy> adjustStrategies = adjustStrategyService.getAdjustStrategyList(tenderId);
if (Objects.isNull(adjustStrategies)) {
return new HashMap<>();
}
return adjustStrategies.stream().collect(Collectors.toMap(t -> t.getBidPriceId().concat("-").concat(t.getSupplierId()), Function.identity()));
}
class EvaluationPrice {
BigDecimal evaluationPriceOriginal;
BigDecimal evaluationPrice;
public EvaluationPrice() {
evaluationPriceOriginal = BigDecimal.ZERO;
evaluationPrice = BigDecimal.ZERO;
}
public EvaluationPrice(BidPriceResult bidPriceResult) {
this.evaluationPriceOriginal = bidPriceResult.getEvaluationPriceOriginal();
this.evaluationPrice = bidPriceResult.getEvaluationPrice();
}
private EvaluationPrice add(EvaluationPrice evaluationPrice) {
EvaluationPrice t = new EvaluationPrice();
t.evaluationPriceOriginal = this.evaluationPriceOriginal.add(evaluationPrice.evaluationPriceOriginal);
t.evaluationPrice = this.evaluationPrice.add(evaluationPrice.evaluationPrice);
return t;
}
}
}
package com.gx.obe.quote.composite;
import java.math.BigDecimal;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.IntStream;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import com.gx.obe.components.core.util.MoneyUtils;
import com.swtdesigner.SWTResourceManager;
public class AdjustStrategyEditComposite extends Composite {
private Combo combo;
private Text text;
private Label label;
private String[] combos;
private String unit;
private BigDecimal adjustValue;
private Consumer<BigDecimal> consumer;
public AdjustStrategyEditComposite(Composite parent, int style) {
super(parent, style);
setLayout(new GridLayout(3, false));
combo = new Combo(this, SWT.READ_ONLY);
combo.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> calculationAdjustValue()));
GridData gd_combo = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
gd_combo.widthHint = 50;
combo.setLayoutData(gd_combo);
text = new Text(this, SWT.BORDER | SWT.RIGHT);
text.addModifyListener(e -> calculationAdjustValue());
text.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
GridData gd_text = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
gd_text.widthHint = 150;
text.setLayoutData(gd_text);
label = new Label(this, SWT.NONE);
GridData gd_label = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_label.widthHint = 70;
label.setLayoutData(gd_label);
}
public void addAdjustValueListener(Consumer<BigDecimal> consumer) {
this.consumer = consumer;
}
private void calculationAdjustValue() {
adjustValue = MoneyUtils.getMoneyFromText(text.getText().trim(), unit);
if (Objects.isNull(adjustValue)) {
text.setText("0");
adjustValue = BigDecimal.ZERO;
} else if (combo.getSelectionIndex() == 1) {
adjustValue = BigDecimal.valueOf(-1).multiply(adjustValue);
}
Optional.ofNullable(consumer).ifPresent(t -> t.accept(adjustValue));
}
public void refresh(String[] combos, String unit) {
this.combos = combos;
this.unit = unit;
refreshComposite();
}
private void refreshComposite() {
combo.removeAll();
IntStream.range(0, combos.length).forEach(i -> combo.add(combos[i], i));
label.setText(unit);
refreshAdjustValue();
layout();
}
public void setAdjustValue(BigDecimal adjustValue) {
this.adjustValue = adjustValue;
refreshAdjustValue();
}
private void refreshAdjustValue() {
adjustValue = Optional.ofNullable(adjustValue).orElse(BigDecimal.ZERO);
if (adjustValue.compareTo(BigDecimal.ZERO) == -1) {
adjustValue = BigDecimal.valueOf(-1).multiply(adjustValue);
combo.select(1);
} else {
combo.select(0);
}
text.setText(MoneyUtils.getMoneyFormatByUnit(adjustValue, unit));
}
@Override
public boolean setFocus() {
return text.setFocus();
}
public BigDecimal getAdjustValue() {
return adjustValue;
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.quote.composite;
import java.util.Arrays;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.listener.RoundBorderLineListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import com.gx.obe.ColorConstants;
import com.gx.obe.common.widget.composite.TitleComposite;
import com.gx.obe.quote.table.AdjustStrategyTable;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.web.entity.price.BidPrice;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.BidPriceService;
import com.gx.obe.web.service.ProjectRuleService;
public class AdjustStrategyManageComposite extends Composite {
private final ProjectRuleService projectRuleService = new ProjectRuleService();
private final BidPriceService bidPriceService = new BidPriceService();
private Composite contentComposite;
public AdjustStrategyManageComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
TitleComposite composite = new TitleComposite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
composite.setTitle("调整评标价");
Composite composite_1 = new Composite(this, SWT.NONE);
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_composite_1 = new GridLayout(1, false);
gl_composite_1.marginHeight = 1;
gl_composite_1.marginWidth = 1;
composite_1.setLayout(gl_composite_1);
composite_1.addPaintListener(new RoundBorderLineListener(ColorConstants.BORDER_LINE_COLOR));
contentComposite = new Composite(composite_1, SWT.NONE);
contentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
contentComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
}
public void refresh(String tenderId) {
Arrays.stream(contentComposite.getChildren()).forEach(Control::dispose);
TenderProjectRuleEntity projectRule = projectRuleService.getProjectRule(tenderId);
List<BidPrice> bidPriceList = bidPriceService.getTenderBidPriceList(tenderId);
if (CollectionUtils.isNotNull(bidPriceList)) {
if (bidPriceList.size() == 1) {
new AdjustStrategyTable(contentComposite).refresh(tenderId, bidPriceList.get(0).getId(), projectRule);
} else {
new MultiBidPriceAdjustComposite(contentComposite, projectRule).refresh(bidPriceList);
}
}
contentComposite.layout();
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.quote.composite;
import java.util.Arrays;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.listener.RoundBorderLineListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import com.gx.obe.ColorConstants;
import com.gx.obe.common.widget.composite.TitleComposite;
import com.gx.obe.quote.table.BidPriceModifyTable;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.web.entity.price.BidPrice;
import com.gx.obe.web.service.BidPriceService;
public class BidPriceManageComposite extends Composite {
private final BidPriceService bidPriceService = new BidPriceService();
private Composite contentComposite;
public BidPriceManageComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
TitleComposite composite = new TitleComposite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
composite.setTitle("修正投标价");
Composite composite_1 = new Composite(this, SWT.NONE);
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_composite_1 = new GridLayout(1, false);
gl_composite_1.marginHeight = 1;
gl_composite_1.marginWidth = 1;
composite_1.setLayout(gl_composite_1);
composite_1.addPaintListener(new RoundBorderLineListener(ColorConstants.BORDER_LINE_COLOR));
contentComposite = new Composite(composite_1, SWT.NONE);
contentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
contentComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
}
public void refresh(String tenderId) {
Arrays.stream(contentComposite.getChildren()).forEach(Control::dispose);
List<BidPrice> bidPriceList = bidPriceService.getTenderBidPriceList(tenderId);
if (CollectionUtils.isNotNull(bidPriceList)) {
if (bidPriceList.size() == 1) {
new BidPriceModifyTable(contentComposite).refresh(tenderId, bidPriceList.get(0).getId());
} else {
new MultiBidPriceModifyComposite(contentComposite).refresh(bidPriceList);
}
}
contentComposite.layout();
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.quote.composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.quote.table.AdjustStrategyTable;
import com.gx.obe.web.entity.price.BidPrice;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
public class MultiBidPriceAdjustComposite extends TabSwitchComposite<BidPrice> {
public MultiBidPriceAdjustComposite(Composite parent, TenderProjectRuleEntity projectRule) {
super(parent);
addTabSwitchListener(new TabSwitchListener<BidPrice>() {
public void newContentComposite(Composite parent, BidPrice type) {
new AdjustStrategyTable(parent).refresh(type.getTenderId(), type.getId(), projectRule);
}
public ImageButton getImageButton(Composite parent, BidPrice type) {
ImageButton button = new ImageButton(parent, SWT.NONE);
button.setText(type.getBidPriceName());
return button;
}
});
}
}
package com.gx.obe.quote.composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.quote.table.BidPriceModifyTable;
import com.gx.obe.web.entity.price.BidPrice;
public class MultiBidPriceModifyComposite extends TabSwitchComposite<BidPrice> {
public MultiBidPriceModifyComposite(Composite parent) {
super(parent);
addTabSwitchListener(new TabSwitchListener<BidPrice>() {
public void newContentComposite(Composite parent, BidPrice type) {
new BidPriceModifyTable(parent).refresh(type.getTenderId(), type.getId());
}
public ImageButton getImageButton(Composite parent, BidPrice type) {
ImageButton button = new ImageButton(parent, SWT.NONE);
button.setText(type.getBidPriceName());
return button;
}
});
}
}
package com.gx.obe.quote.composite;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
public class TabSwitchComposite<T> extends Composite {
private List<T> list;
private Composite btnComposite;
private Composite contentComposite;
private ImageButton curButton;
private TabSwitchListener<T> tabSwitchListener;
public TabSwitchComposite(Composite parent) {
super(parent, SWT.NONE);
setLayout(new GridLayout(1, false));
btnComposite = new Composite(this, SWT.NONE);
btnComposite.setLayout(new RowLayout(SWT.HORIZONTAL));
btnComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
contentComposite = new Composite(this, SWT.NONE);
contentComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
contentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
}
public void refresh(List<T> list) {
this.list = list;
refreshBtnComposite();
}
private void refreshBtnComposite() {
Arrays.stream(btnComposite.getChildren()).forEach(Control::dispose);
list.stream().forEach(this::createButton);
btnComposite.layout();
btnComposite.getChildren()[0].notifyListeners(SWT.MouseUp, null);
}
private void createButton(T type) {
ImageButton button = tabSwitchListener.getImageButton(btnComposite, type);
button.addMouseListener(MouseListener.mouseUpAdapter(e -> {
Optional.ofNullable(curButton).ifPresent(t -> t.setSelection(false));
curButton = button;
curButton.setSelection(true);
Arrays.stream(contentComposite.getChildren()).forEach(Control::dispose);
tabSwitchListener.newContentComposite(contentComposite, type);
contentComposite.layout();
}));
}
public void addTabSwitchListener(TabSwitchListener<T> tabSwitchListener) {
this.tabSwitchListener = tabSwitchListener;
}
public interface TabSwitchListener<T> {
ImageButton getImageButton(Composite parent, T type);
void newContentComposite(Composite parent, T type);
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.quote.converter;
import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.dynamicview.converter.tostirng.ToStringConverter;
import com.gx.obe.quote.vo.QuoteVo;
public class MoneyConverter implements ToStringConverter {
@Override
public String convert(Object object) {
if (!(object instanceof QuoteVo)) {
return "";
}
QuoteVo quote = (QuoteVo) object;
return MoneyUtils.getMoneyFormatByUnit(quote.getPrice(), quote.getUnit());
}
}
package com.gx.obe.quote.dialog;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.core.widgets.EButton;
import org.eclipse.swt.core.widgets.EDialog;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import com.gx.obe.ColorConstants;
import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.quote.beans.AdjustStrategy;
import com.gx.obe.quote.composite.AdjustStrategyEditComposite;
import com.gx.obe.quote.enums.AdjustTypeEnum;
import com.gx.obe.quote.service.AdjustStrategyService;
import com.gx.obe.quote.utils.VerificationUtils;
import com.gx.obe.quote.vo.AdjustStrategyVo;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.web.service.evaluation.EvaluationStepService;
import com.swtdesigner.SWTResourceManager;
public class AdjustStrategyDialog extends EDialog {
private final AdjustStrategyService adjustStrategyService = new AdjustStrategyService();
private final EvaluationStepService evaluationStepService = new EvaluationStepService();
private AdjustStrategyEditComposite adjustStrategyEditComposite;
private AdjustTypeEnum adjustType;
private String tenderId;
private String evalPriceUnit;
private Map<String, Button> discountMap = new HashMap<>();
private Text adjustReason_text;
private Label beforePrice_label;
private Label afterPrice_label;
private AdjustStrategyVo adjustStrategyVo;
private Consumer<AdjustStrategyVo> confirmConsumer;
public AdjustStrategyDialog(Shell parentShell, String tenderId, String evalPriceUnit, AdjustStrategyVo adjustStrategyVo, Consumer<AdjustStrategyVo> confirmConsumer) {
super(parentShell);
this.tenderId = tenderId;
this.evalPriceUnit = evalPriceUnit;
this.adjustStrategyVo = adjustStrategyVo;
this.confirmConsumer = confirmConsumer;
setTitle("璋冩暣璇勬爣浠�");
}
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
GridLayout gl_container = new GridLayout(1, false);
gl_container.verticalSpacing = 0;
gl_container.marginHeight = 0;
gl_container.marginWidth = 0;
container.setLayout(gl_container);
Composite composite_1 = new Composite(container, SWT.NONE);
GridLayout gl_composite_1 = new GridLayout(1, false);
gl_composite_1.verticalSpacing = 0;
gl_composite_1.marginHeight = 0;
gl_composite_1.marginWidth = 0;
composite_1.setLayout(gl_composite_1);
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite composite_3 = new Composite(composite_1, SWT.NONE);
composite_3.setLayout(new GridLayout(2, false));
composite_3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
Label lblNewLabel = new Label(composite_3, SWT.NONE);
lblNewLabel.setText("璋冩暣绫诲瀷锛�");
Composite composite_4 = new Composite(composite_3, SWT.NONE);
composite_4.setLayout(new GridLayout(2, false));
composite_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Button discount_rate_btn = new Button(composite_4, SWT.RADIO);
discount_rate_btn.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
adjustType = AdjustTypeEnum.DISCOUNT_RATE;
refreshAdjustStrategyEditComposite();
}
});
discount_rate_btn.setText("娴姩鍨�");
discountMap.put(AdjustTypeEnum.DISCOUNT_RATE.getKey(), discount_rate_btn);
Button discount_amount_btn = new Button(composite_4, SWT.RADIO);
discount_amount_btn.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
adjustType = AdjustTypeEnum.DISCOUNT_AMOUNT;
refreshAdjustStrategyEditComposite();
}
});
discount_amount_btn.setText("澧炲噺鍨�");
discountMap.put(AdjustTypeEnum.DISCOUNT_AMOUNT.getKey(), discount_amount_btn);
ESepator label_1 = new ESepator(composite_1, SWT.HORIZONTAL);
label_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
label_1.setBackground(ColorConstants.SEP_LIGHT_COLOR);
Composite composite_6 = new Composite(composite_1, SWT.NONE);
composite_6.setLayout(new GridLayout(3, false));
composite_6.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
Label lblNewLabel_1 = new Label(composite_6, SWT.NONE);
lblNewLabel_1.setText("璋冩暣鍓嶆姤浠凤細");
beforePrice_label = new Label(composite_6, SWT.RIGHT);
beforePrice_label.setFont(SWTResourceManager.getFont("寰蒋闆呴粦", 12, SWT.NORMAL));
GridData gd_lblNewLabel_2 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblNewLabel_2.widthHint = 200;
beforePrice_label.setLayoutData(gd_lblNewLabel_2);
Label beforeUnit_label = new Label(composite_6, SWT.NONE);
GridData gd_beforeUnit_label = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_beforeUnit_label.widthHint = 50;
beforeUnit_label.setLayoutData(gd_beforeUnit_label);
beforeUnit_label.setText(evalPriceUnit);
Composite composite_5 = new Composite(composite_1, SWT.NONE);
composite_5.setLayout(new GridLayout(1, false));
composite_5.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
adjustStrategyEditComposite = new AdjustStrategyEditComposite(composite_5, SWT.NONE);
GridLayout gridLayout = (GridLayout) adjustStrategyEditComposite.getLayout();
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
adjustStrategyEditComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1));
adjustStrategyEditComposite.addAdjustValueListener(this::refreshAfterPrice);
Composite composite_7 = new Composite(composite_1, SWT.NONE);
composite_7.setLayout(new GridLayout(3, false));
composite_7.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
Label lblNewLabel_3 = new Label(composite_7, SWT.NONE);
lblNewLabel_3.setText("璋冩暣鍚庢姤浠凤細");
afterPrice_label = new Label(composite_7, SWT.RIGHT);
afterPrice_label.setFont(SWTResourceManager.getFont("寰蒋闆呴粦", 12, SWT.NORMAL));
GridData gd_lblNewLabel_4 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblNewLabel_4.widthHint = 200;
afterPrice_label.setLayoutData(gd_lblNewLabel_4);
Label afterUnit_label = new Label(composite_7, SWT.NONE);
GridData gd_afterUnit_label = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_afterUnit_label.widthHint = 50;
afterUnit_label.setLayoutData(gd_afterUnit_label);
afterUnit_label.setText(evalPriceUnit);
Composite composite_8 = new Composite(composite_1, SWT.NONE);
GridLayout gl_composite_8 = new GridLayout(2, false);
gl_composite_8.marginHeight = 10;
gl_composite_8.marginWidth = 10;
composite_8.setLayout(gl_composite_8);
composite_8.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Label lblNewLabel_5 = new Label(composite_8, SWT.NONE);
lblNewLabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
lblNewLabel_5.setText("璋冩暣鍘熷洜锛�");
adjustReason_text = new Text(composite_8, SWT.BORDER | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL);
adjustReason_text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
adjustReason_text.setTextLimit(500);
ESepator label = new ESepator(container, SWT.HORIZONTAL);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
label.setBackground(ColorConstants.SEP_LIGHT_COLOR);
Composite composite_2 = new Composite(container, SWT.NONE);
composite_2.setLayout(new GridLayout(1, false));
composite_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
EButton btnNewButton = new EButton(composite_2, SWT.NONE);
btnNewButton.addMouseListener(MouseListener.mouseUpAdapter(this::confirmAction));
btnNewButton.setText("纭");
init();
return container;
}
public void init() {
String key = Optional.ofNullable(adjustStrategyVo.getAdjustStrategy().getAdjustType()).orElse(AdjustTypeEnum.DISCOUNT_RATE.getKey());
Button discount = discountMap.get(key);
discount.setSelection(true);
discount.notifyListeners(SWT.MouseUp, null);
adjustStrategyEditComposite.setAdjustValue(adjustStrategyVo.getAdjustStrategy().getAdjustValue());
beforePrice_label.setText(MoneyUtils.getMoneyFormatByUnit(adjustStrategyVo.getBeforePrice().getPrice(), evalPriceUnit));
adjustReason_text.setText(Optional.ofNullable(adjustStrategyVo.getAdjustReason()).orElse(""));
}
private void refreshAdjustStrategyEditComposite() {
String[] combos = null;
String unit = null;
switch (adjustType) {
case DISCOUNT_AMOUNT:
combos = new String[] { "澧炲姞", "鍑忓皯" };
unit = evalPriceUnit;
break;
case DISCOUNT_RATE:
combos = new String[] { "涓婃诞", "涓嬫诞" };
unit = "%";
break;
}
adjustStrategyEditComposite.refresh(combos, unit);
}
private void refreshAfterPrice(BigDecimal adjustValue) {
BigDecimal afterPrice = adjustType.discount(adjustStrategyVo.getBeforePrice().getPrice(), adjustValue);
afterPrice_label.setText(MoneyUtils.getMoneyFormatByUnit(afterPrice, evalPriceUnit));
}
private void confirmAction(MouseEvent e) {
BigDecimal adjustValue = adjustStrategyEditComposite.getAdjustValue();
if (VerificationUtils.ver(adjustStrategyEditComposite, () -> BigDecimal.ZERO.compareTo(adjustValue) == 0, "褰撳墠鎶ヤ环娌℃湁杩涜璋冩暣锛�")) return;
String adjustReason = adjustReason_text.getText().trim();
if (VerificationUtils.ver(adjustReason_text, adjustReason::isEmpty, "璋冩暣鍘熷洜涓嶈兘涓虹┖锛�")) return;
if (evaluationStepService.isCompletePriceAndRecommonedStep(tenderId)) {
MessageDialog.openWarning(getShell(), "宸插畬鎴愪环鏍艰瘎瀹℃垨鎺ㄨ崘涓爣鍊欓�変汉锛屾棤娉曡皟鏁磋瘎鏍囦环锛�");
return;
}
AdjustStrategy adjustStrategy = adjustStrategyVo.getAdjustStrategy();
adjustStrategy.setAdjustType(adjustType.getKey());
adjustStrategy.setAdjustValue(adjustStrategyEditComposite.getAdjustValue());
adjustStrategy.setAdjustReason(adjustReason);
boolean save;
if (Objects.isNull(adjustStrategy.getId())) {
adjustStrategy.setId(UuidUtils.getUUID());
save = adjustStrategyService.insert(adjustStrategy);
} else {
save = adjustStrategyService.updateAssignProperty(adjustStrategy, new String[] {"adjustType", "adjustValue", "adjustReason"});
}
if (!save) {
MessageDialog.openError(getShell(), "淇濆瓨澶辫触锛�");
return;
}
adjustStrategyVo.setAdjustStrategy(adjustStrategy, evalPriceUnit);
close();
confirmConsumer.accept(adjustStrategyVo);
}
/**
* Return the initial size of the dialog.
*/
@Override
protected Point getInitialSize() {
return new Point(530, 330);
}
}
package com.gx.obe.quote.dialog;
import java.math.BigDecimal;
import java.util.Optional;
import java.util.function.Consumer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.core.widgets.EButton;
import org.eclipse.swt.core.widgets.EDialog;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import com.gx.obe.ColorConstants;
import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.quote.listener.PatternModifyListener;
import com.gx.obe.quote.utils.VerificationUtils;
import com.gx.obe.quote.vo.BidPriceModifyVo;
import com.gx.obe.quote.vo.QuoteVo;
import com.gx.obe.web.service.BidPriceResultService;
import com.gx.obe.web.service.evaluation.EvaluationStepService;
import com.swtdesigner.SWTResourceManager;
import im.util.BigDecimalUtil;
/**
* @Description: 修正投标报价
* @author chenxw
*/
public class ModifyBidPriceDialog extends EDialog {
private final BidPriceResultService bidPriceResultService = new BidPriceResultService();
private final EvaluationStepService evaluationStepService = new EvaluationStepService();
private Label finalBidPrice_text;
private Text modifyReason_text;
private String tenderId;
private BidPriceModifyVo modifyBidPriceVo;
private Consumer<BidPriceModifyVo> confirmConsumer;
private Combo digit_combo;
private Text digit_text;
private BigDecimal finalBidPrice;
public ModifyBidPriceDialog(Shell parentShell, String tenderId, BidPriceModifyVo modifyBidPriceVo, Consumer<BidPriceModifyVo> confirmConsumer) {
super(parentShell);
this.tenderId = tenderId;
this.modifyBidPriceVo = modifyBidPriceVo;
this.confirmConsumer = confirmConsumer;
setTitle("修正投标报价");
}
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
GridLayout gl_container = new GridLayout(1, false);
gl_container.verticalSpacing = 0;
gl_container.marginHeight = 0;
gl_container.marginWidth = 0;
container.setLayout(gl_container);
Composite composite_4 = new Composite(container, SWT.NONE);
composite_4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_composite_4 = new GridLayout(1, false);
gl_composite_4.marginHeight = 0;
gl_composite_4.marginWidth = 0;
composite_4.setLayout(gl_composite_4);
Composite composite_1 = new Composite(composite_4, SWT.NONE);
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_composite_1 = new GridLayout(3, false);
gl_composite_1.verticalSpacing = 10;
gl_composite_1.marginHeight = 10;
gl_composite_1.marginWidth = 10;
composite_1.setLayout(gl_composite_1);
Label lblNewLabel_5 = new Label(composite_1, SWT.NONE);
lblNewLabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblNewLabel_5.setText("原始报价:");
Label lblNewLabel_9 = new Label(composite_1, SWT.RIGHT);
lblNewLabel_9.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 12, SWT.NORMAL));
lblNewLabel_9.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblNewLabel_9.setText(MoneyUtils.getMoneyFormatByUnit(modifyBidPriceVo.getBidPrice().getPrice(), modifyBidPriceVo.getPriceUnit()));
Label lblNewLabel_10 = new Label(composite_1, SWT.NONE);
lblNewLabel_10.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 12, SWT.NORMAL));
lblNewLabel_10.setText(modifyBidPriceVo.getPriceUnit());
Label lblNewLabel = new Label(composite_1, SWT.NONE);
lblNewLabel.setText("修正描述:");
Composite composite = new Composite(composite_1, SWT.NONE);
composite.setLayout(new GridLayout(5, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
Label lblNewLabel_3 = new Label(composite, SWT.NONE);
lblNewLabel_3.setText("小数点向");
digit_combo = new Combo(composite, SWT.NONE);
digit_combo.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 12, SWT.NORMAL));
digit_combo.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> computeFinalBidPrice(digit_text.getText())));
digit_combo.add("前", 0);
digit_combo.add("后", 1);
digit_combo.select(0);
Label lblNewLabel_4 = new Label(composite, SWT.NONE);
lblNewLabel_4.setText("移动");
Composite composite_3 = new Composite(composite, SWT.NONE);
composite_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
GridLayout gl_composite_3 = new GridLayout(1, false);
gl_composite_3.verticalSpacing = 0;
gl_composite_3.marginHeight = 0;
gl_composite_3.marginWidth = 0;
composite_3.setLayout(gl_composite_3);
digit_text = new Text(composite_3, SWT.CENTER);
digit_text.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 12, SWT.NORMAL));
digit_text.addModifyListener(new PatternModifyListener("[1-6]", "", this::computeFinalBidPrice));
GridData gd_text = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_text.widthHint = 50;
digit_text.setLayoutData(gd_text);
ESepator text_label = new ESepator(composite_3, SWT.HORIZONTAL);
text_label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
text_label.setBackground(ColorConstants.SEP_LIGHT_COLOR);
Label lblNewLabel_6 = new Label(composite, SWT.NONE);
lblNewLabel_6.setText("位。");
Label lblNewLabel_1 = new Label(composite_1, SWT.NONE);
lblNewLabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblNewLabel_1.setText("修正报价:");
finalBidPrice_text = new Label(composite_1, SWT.RIGHT);
finalBidPrice_text.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 12, SWT.NORMAL));
finalBidPrice_text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
Label lblNewLabel_11 = new Label(composite_1, SWT.NONE);
lblNewLabel_11.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 12, SWT.NORMAL));
lblNewLabel_11.setText(modifyBidPriceVo.getPriceUnit());
Label lblNewLabel_2 = new Label(composite_1, SWT.NONE);
lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
lblNewLabel_2.setText("修正原因:");
modifyReason_text = new Text(composite_1, SWT.BORDER | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL);
modifyReason_text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
modifyReason_text.setTextLimit(500);
ESepator label = new ESepator(container, SWT.HORIZONTAL);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
label.setBackground(ColorConstants.SEP_LIGHT_COLOR);
Composite composite_2 = new Composite(container, SWT.NONE);
GridLayout gl_composite_2 = new GridLayout(1, false);
composite_2.setLayout(gl_composite_2);
composite_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
EButton btnNewButton = new EButton(composite_2, SWT.NONE);
btnNewButton.addMouseListener(MouseListener.mouseUpAdapter(this::confirmAction));
GridData gd_btnNewButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_btnNewButton.widthHint = 70;
gd_btnNewButton.heightHint = 25;
btnNewButton.setLayoutData(gd_btnNewButton);
btnNewButton.setText("确认");
init();
return container;
}
private void init() {
finalBidPrice = modifyBidPriceVo.getFinalBidPrice().getPrice();
digit_text.setFocus();
modifyReason_text.setText(Optional.ofNullable(modifyBidPriceVo.getModifyReason()).orElse(""));
// refreshFinalBidPriceText();
refreshDescription();
}
private void refreshFinalBidPriceText() {
finalBidPrice_text.setText(MoneyUtils.getMoneyFormatByUnit(finalBidPrice, modifyBidPriceVo.getPriceUnit()));
}
private void refreshDescription() {
double digit = Math.log10(BigDecimalUtil.div(modifyBidPriceVo.getBidPrice().getPrice(), finalBidPrice).doubleValue());
digit_combo.select(digit < 0 ? 1 : 0);
digit = Math.abs(digit);
long round = Math.round(digit);
if (Math.abs(round - digit) > 0.0001) {
digit_text.setText("");
} else {
digit_text.setText(String.valueOf(round));
}
}
private void computeFinalBidPrice(String value) {
if (value.isEmpty()) {
finalBidPrice = modifyBidPriceVo.getFinalBidPrice().getPrice();
} else {
Double digit = Double.valueOf(value);
if (digit_combo.getSelectionIndex() == 0) digit = -digit;
finalBidPrice = BigDecimalUtil.mul(modifyBidPriceVo.getBidPrice().getPrice(), BigDecimal.valueOf(Math.pow(10, digit)));
}
refreshFinalBidPriceText();
}
private void confirmAction(MouseEvent e) {
if (VerificationUtils.ver(finalBidPrice_text, () -> modifyBidPriceVo.getBidPrice().getPrice().compareTo(finalBidPrice) == 0, "未进行报价修正!")) return;
String modifyReason = modifyReason_text.getText();
if (VerificationUtils.ver(modifyReason_text, modifyReason::isEmpty, "修正原因不能为空!")) return;
//
// if (evaluationStepService.isCompletePriceAndRecommendStep(tenderId)) {
// MessageDialog.openWarning(getShell(), "已完成价格评审或推荐中标候选人,无法修正投标价!");
// return;
// }
//
// if (!bidPriceResultService.modifyBidPrice(modifyBidPriceVo.getId(), finalBidPrice, modifyReason)) {
// MessageDialog.openError(getShell(), "修正失败!");
// return;
// }
modifyBidPriceVo.setFinalBidPrice(new QuoteVo(finalBidPrice, modifyBidPriceVo.getPriceUnit()));
modifyBidPriceVo.setModifyReason(modifyReason);
close();
confirmConsumer.accept(modifyBidPriceVo);
}
@Override
protected Point getInitialSize() {
return new Point(500, 300);
}
}
package com.gx.obe.quote.enums;
import java.math.BigDecimal;
import java.util.Map;
import com.gx.obe.util.utils.EnumUtils;
/**
* @Description: 调整类型
* @author chenxw
*/
public enum AdjustTypeEnum {
/**
* @Description: 折扣率
*/
DISCOUNT_RATE("01") {
public BigDecimal discount(BigDecimal quote, BigDecimal adjustValue) {
return BigDecimal.valueOf(0.01).multiply(adjustValue).add(BigDecimal.ONE).multiply(quote);
}
},
/**
* @Description: 折扣金额
*/
DISCOUNT_AMOUNT("02") {
public BigDecimal discount(BigDecimal quote, BigDecimal adjustValue) {
return quote.add(adjustValue);
}
};
private String key;
/**
* @author chenxw
* @param key
*/
private AdjustTypeEnum(String key) {
this.setKey(key);
}
public static Map<String, AdjustTypeEnum> MAP = EnumUtils.toMap(values(), AdjustTypeEnum::getKey);
/**
* @Description: 折扣
* @author chenxw
* @param quote
* @param adjustValue
* @return
*/
public abstract BigDecimal discount(BigDecimal quote, BigDecimal adjustValue);
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
package com.gx.obe.quote.exception;
public class NoSetExchangeRateException extends Exception {
/**
* @Description:
*/
private static final long serialVersionUID = 1L;
private String beforeCode;
private String afterCode;
public NoSetExchangeRateException(String beforeCode, String afterCode) {
this.beforeCode = beforeCode;
this.afterCode = afterCode;
}
public String getBeforeCode() {
return beforeCode;
}
public void setBeforeCode(String beforeCode) {
this.beforeCode = beforeCode;
}
public String getAfterCode() {
return afterCode;
}
public void setAfterCode(String afterCode) {
this.afterCode = afterCode;
}
}
package com.gx.obe.quote.listener;
import java.util.function.Consumer;
import java.util.regex.Pattern;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Text;
public class PatternModifyListener implements ModifyListener {
private Pattern p;
private String defaultValue;
private Consumer<String> consumer;
public PatternModifyListener(String regex, String defaultValue, Consumer<String> consumer) {
this.p = Pattern.compile(regex);
this.defaultValue = defaultValue;
this.consumer = consumer;
}
@Override
public void modifyText(ModifyEvent e) {
Text text = (Text) e.widget;
String value = text.getText().trim();
if (value.equals(defaultValue)) {
consumer.accept(value);
return;
}
if (p.matcher(value).matches()) {
consumer.accept(value);
return;
}
text.setText(defaultValue);
}
}
package com.gx.obe.quote.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gx.obe.quote.beans.AdjustStrategy;
import com.gx.obe.web.utils.ObeHttpUtils;
import com.gx.obe.web.vo.UpdateAssignPropertyVo;
public class AdjustStrategyService {
protected static final String URL = "obeAdjustStrategy";
public List<AdjustStrategy> getListByBidPriceId(String tenderId, String bidPriceId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
param.put("bidPriceId", bidPriceId);
return ObeHttpUtils.getList(URL.concat("/getListByBidPriceId"), param , AdjustStrategy.class);
}
public boolean insert(AdjustStrategy adjustStrategy) {
return ObeHttpUtils.post(URL.concat("/insert"), adjustStrategy);
}
public boolean updateAssignProperty(AdjustStrategy adjustStrategy, String[] attributes) {
UpdateAssignPropertyVo<AdjustStrategy> vo = new UpdateAssignPropertyVo<>();
vo.setEntity(adjustStrategy);
vo.setAttributes(attributes);
return ObeHttpUtils.post(URL.concat("/updateAssignProperty"), vo);
}
public List<AdjustStrategy> getAdjustStrategyList(String tenderId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
return ObeHttpUtils.getList(URL.concat("/getAdjustStrategyList"), param, AdjustStrategy.class);
}
// public boolean deleteById(String id) {
// Map<String, Object> param = new HashMap<>();
// param.put("id", id);
// return ObeHttpUtils.getBoolean(URL.concat("/deleteById"), param);
// }
//
}
package com.gx.obe.quote.service;
import java.util.List;
import com.gx.obe.quote.beans.ExchangeRate;
public class ExchangeRateService {
/**
* @Description: 根据需要转换的币种获取当前姓名设置的汇率列表
* @author chenxw
* @param tenderId
* @param afterCode
* @return
*/
public static List<ExchangeRate> getListByAfterCode(String tenderId, String afterCode) {
// TODO Auto-generated method stub
return null;
}
}
package com.gx.obe.quote.table;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.dynamicview.view.DynamicTable;
import com.gx.obe.dynamicview.view.vo.OperateColVo;
import com.gx.obe.quote.beans.AdjustStrategy;
import com.gx.obe.quote.calculator.EvaluationPriceCalculator;
import com.gx.obe.quote.dialog.AdjustStrategyDialog;
import com.gx.obe.quote.exception.NoSetExchangeRateException;
import com.gx.obe.quote.service.AdjustStrategyService;
import com.gx.obe.quote.vo.AdjustStrategyVo;
import com.gx.obe.quote.vo.QuoteVo;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.price.BidPriceResult;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.BidPriceResultService;
import com.gx.obe.web.service.SupplierService;
import com.gx.obe.web.service.evaluation.EvaluationStepService;
import com.swtdesigner.ResourceManager;
import de.kupzog.ktable.SWTX;
public class AdjustStrategyTable extends DynamicTable {
private final Image editImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png");
private final Image deleteImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/delete.png");
private final SupplierService supplierService = new SupplierService();
private final BidPriceResultService bidPriceResultService = new BidPriceResultService();
private final AdjustStrategyService adjustStrategyService = new AdjustStrategyService();
private final EvaluationStepService evaluationStepService = new EvaluationStepService();
private String tenderId;
private String bidPriceId;
private TenderProjectRuleEntity projectRule;
public AdjustStrategyTable(Composite parent) {
super(parent, SWTX.AUTO_SCROLL | SWT.FULL_SELECTION | SWTX.EDIT_ON_KEY | SWTX.FILL_WITH_LASTCOL);
}
public void refresh(String tenderId, String bidPriceId, TenderProjectRuleEntity projectRule) {
this.tenderId = tenderId;
this.bidPriceId = bidPriceId;
this.projectRule = projectRule;
refreshTable();
}
private void refreshTable() {
// if (!evaluationStepService.isCompletePriceAndRecommendStep(tenderId)) {
// addOperateCol(new OperateColVo("操作", "调整", editImage, this::editEnablePre, this::editActionRender));
// addOperateCol(new OperateColVo("操作", "重置", deleteImage, this::deleteEnablePre, this::deleteActionRender));
// }
putReplaceMap("evalPriceUnit", projectRule.getEvalPriceUnit());
List<AdjustStrategyVo> adjustStrategyVoList = null;
List<Supplier> supplierList = supplierService.getOpenBidSuccessSupplier(tenderId);
if (CollectionUtils.isNotNull(supplierList)) {
adjustStrategyVoList = supplierList.stream().map(getAdjustStrategyVoMapper()).collect(Collectors.toList());
}
super.refresh(adjustStrategyVoList, AdjustStrategyVo.class);
}
private Function<Supplier, AdjustStrategyVo> getAdjustStrategyVoMapper() {
Map<String, BidPriceResult> bidPriceResultMap = null;
List<BidPriceResult> bidPriceResultList = bidPriceResultService.getBidPriceResultList(tenderId, bidPriceId);
if (CollectionUtils.isNotNull(bidPriceResultList)) {
bidPriceResultMap = bidPriceResultList.stream().collect(Collectors.toMap(BidPriceResult::getSupplierId, Function.identity()));
}
Map<String, AdjustStrategy> adjustStrategyMap = null;
List<AdjustStrategy> adjustStrategyList = adjustStrategyService.getListByBidPriceId(tenderId, bidPriceId);
if (CollectionUtils.isNotNull(adjustStrategyList)) {
adjustStrategyMap = adjustStrategyList.stream().collect(Collectors.toMap(AdjustStrategy::getSupplierId, Function.identity()));
}
Map<String, BidPriceResult> _bidPriceResultMap = Optional.ofNullable(bidPriceResultMap).orElseGet(HashMap::new);
Map<String, AdjustStrategy> _adjustStrategyMap = Optional.ofNullable(adjustStrategyMap).orElseGet(HashMap::new);
EvaluationPriceCalculator evaluationPriceCalculator = new EvaluationPriceCalculator(tenderId, projectRule);
return t -> {
BigDecimal beforePrice = null;
try {
beforePrice = evaluationPriceCalculator.calculate(_bidPriceResultMap.get(t.getId()));
} catch (NoSetExchangeRateException e) {
MessageDialog.openWarning(getShell(), "未设置".concat(e.getAfterCode()).concat(e.getBeforeCode()).concat("汇率!"));
}
AdjustStrategyVo adjustStrategyVo = new AdjustStrategyVo(t.getSupplierName(), new QuoteVo(beforePrice, projectRule.getEvalPriceUnit()));
adjustStrategyVo.setAdjustStrategy(_adjustStrategyMap.computeIfAbsent(t.getId(), this::adjustStrategyMapping), projectRule.getEvalPriceUnit());
return adjustStrategyVo;
};
}
private AdjustStrategy adjustStrategyMapping(String supplierId) {
AdjustStrategy adjustStrategy = new AdjustStrategy();
adjustStrategy.setTenderId(tenderId);
adjustStrategy.setSupplierId(supplierId);
adjustStrategy.setBidPriceId(bidPriceId);
return adjustStrategy;
}
private boolean editEnablePre(Object t) {
return Objects.nonNull(((AdjustStrategyVo) t).getBeforePrice().getPrice());
}
private boolean deleteEnablePre(Object t) {
return Objects.nonNull(((AdjustStrategyVo) t).getAdjustStrategy().getId());
}
private void editActionRender(Object t) {
new AdjustStrategyDialog(getShell(), tenderId, projectRule.getEvalPriceUnit(), (AdjustStrategyVo) t, this::confirmAction).open();
}
private void deleteActionRender(Object t) {
if (!MessageDialog.openConfirm(getShell(), "重置将清空当前供应商调整后评标价及调整原因,是否确认重置?")) {
return;
}
AdjustStrategyVo adjustStrategyVo = (AdjustStrategyVo) t;
// if (!adjustStrategyService.deleteById(adjustStrategyVo.getAdjustStrategy().getId())) {
// MessageDialog.openError(getShell(), "重置失败!");
// return;
// }
adjustStrategyVo.setAdjustStrategy(adjustStrategyMapping(adjustStrategyVo.getAdjustStrategy().getSupplierId()), projectRule.getEvalPriceUnit());
redraw();
MessageDialog.openShortMessage("重置成功!");
}
private void confirmAction(AdjustStrategyVo adjustStrategyVo) {
redraw();
}
}
package com.gx.obe.quote.table;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.dynamicview.view.DynamicTable;
import com.gx.obe.dynamicview.view.vo.OperateColVo;
import com.gx.obe.quote.dialog.ModifyBidPriceDialog;
import com.gx.obe.quote.vo.BidPriceModifyVo;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.StringUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.price.BidPriceResult;
import com.gx.obe.web.service.BidPriceResultService;
import com.gx.obe.web.service.SupplierService;
import com.gx.obe.web.service.evaluation.EvaluationStepService;
import com.swtdesigner.ResourceManager;
import de.kupzog.ktable.SWTX;
public class BidPriceModifyTable extends DynamicTable {
private final Image editImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png");
private final Image deleteImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/delete.png");
private final SupplierService supplierService = new SupplierService();
private final BidPriceResultService bidPriceResultService = new BidPriceResultService();
private final EvaluationStepService evaluationStepService = new EvaluationStepService();
private String tenderId;
private String bidPriceId;
public BidPriceModifyTable(Composite parent) {
super(parent, SWTX.AUTO_SCROLL | SWT.FULL_SELECTION | SWTX.EDIT_ON_KEY | SWTX.FILL_WITH_LASTCOL);
}
private boolean editEnablePre(Object t) {
return Objects.nonNull(((BidPriceModifyVo) t).getId());
}
private boolean deleteEnablePre(Object t) {
return StringUtils.isNotEmpty(((BidPriceModifyVo) t).getModifyReason());
}
private void editActionRender(Object t) {
new ModifyBidPriceDialog(getShell(), tenderId, (BidPriceModifyVo) t, this::confirmAction).open();
}
private void deleteActionRender(Object t) {
if (!MessageDialog.openConfirm(getShell(), "重置将清空当前供应商修正后报价及修正原因,是否确认重置?")) {
return;
}
BidPriceModifyVo modifyBidPriceVo = (BidPriceModifyVo) t;
// if (!bidPriceResultService.modifyBidPrice(modifyBidPriceVo.getId(), modifyBidPriceVo.getBidPrice().getPrice(), "")) {
// MessageDialog.openError(getShell(), "重置失败!");
// return;
// }
modifyBidPriceVo.setFinalBidPrice(modifyBidPriceVo.getBidPrice());
modifyBidPriceVo.setModifyReason("");
redraw();
MessageDialog.openShortMessage("重置成功!");
}
public void refresh(String tenderId, String bidPriceId) {
this.tenderId = tenderId;
this.bidPriceId = bidPriceId;
refreshTable();
}
private void refreshTable() {
// if (!evaluationStepService.isCompletePriceAndRecommendStep(tenderId)) {
// addOperateCol(new OperateColVo("操作", "修正", editImage, this::editEnablePre, this::editActionRender));
// addOperateCol(new OperateColVo("操作", "重置", deleteImage, this::deleteEnablePre, this::deleteActionRender));
// }
List<BidPriceModifyVo> modifyBidPriceVoList = null;
List<Supplier> supplierList = supplierService.getOpenBidSuccessSupplier(tenderId);
if (CollectionUtils.isNotNull(supplierList)) {
modifyBidPriceVoList = supplierList.stream().map(getModifyBidPriceVoMapper()).collect(Collectors.toList());
}
super.refresh(modifyBidPriceVoList, BidPriceModifyVo.class);
}
private Function<Supplier, BidPriceModifyVo> getModifyBidPriceVoMapper() {
List<BidPriceResult> bidPriceResultList = bidPriceResultService.getBidPriceResultList(tenderId, bidPriceId);
if (CollectionUtils.isNull(bidPriceResultList)) {
return t -> new BidPriceModifyVo(t.getSupplierName(), null);
}
Map<String, BidPriceResult> bidPriceResultMap = bidPriceResultList.stream().collect(Collectors.toMap(BidPriceResult::getSupplierId, Function.identity()));
return t -> new BidPriceModifyVo(t.getSupplierName(), bidPriceResultMap.get(t.getId()));
}
private void confirmAction(BidPriceModifyVo vo) {
redraw();
}
}
package com.gx.obe.quote.test;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class TestShell extends Shell {
/**
* Launch the application.
* @param args
*/
public static void main(String args[]) {
try {
Display display = Display.getDefault();
TestShell shell = new TestShell(display);
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Create the shell.
* @param display
*/
public TestShell(Display display) {
super(display, SWT.SHELL_TRIM);
createContents();
}
/**
* Create contents of the shell.
*/
protected void createContents() {
setText("SWT Application");
setSize(450, 300);
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.quote.utils;
import java.math.BigDecimal;
import java.util.Objects;
import java.util.Optional;
import com.gx.obe.web.entity.price.BidPriceResult;
public class BidPriceUtils {
public static BigDecimal getFinalBidPrice(BidPriceResult bidPriceResult) {
Objects.requireNonNull(bidPriceResult);
return Optional.of(bidPriceResult.getFinalBidPrice()).orElse(bidPriceResult.getBidPrice());
}
}
package com.gx.obe.quote.utils;
import java.util.function.Supplier;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.widgets.Control;
public class VerificationUtils {
public static boolean ver(Control control, Supplier<Boolean> condition, String message) {
if (!condition.get()) return false;
MessageDialog.openWarning(control.getShell(), message);
control.setFocus();
return true;
}
}
package com.gx.obe.quote.vo;
import com.gx.obe.dynamicview.annotation.TableCol;
import com.gx.obe.dynamicview.enums.ColAlignEnum;
import com.gx.obe.quote.beans.AdjustStrategy;
import com.gx.obe.quote.calculator.AdjustStrategyCalculator;
import com.gx.obe.quote.converter.MoneyConverter;
public class AdjustStrategyVo {
@TableCol(value = "供应商名称", width = 200, minWidth = 200, maxWidth = 300, align = ColAlignEnum.LEFT)
private String supplierName;
@TableCol(value = "调整前报价(${evalPriceUnit})", type = MoneyConverter.class, align = ColAlignEnum.RIGHT)
private QuoteVo beforePrice;
@TableCol("调整详情")
private String describe;
@TableCol(value = "调整后报价(${evalPriceUnit})", type = MoneyConverter.class, align = ColAlignEnum.RIGHT)
private QuoteVo afterPrice;
@TableCol(value = "调整原因", width = 300, minWidth = 200, maxWidth = 400, align = ColAlignEnum.LEFT)
private String adjustReason;
private AdjustStrategy adjustStrategy;
public AdjustStrategyVo(String supplierName, QuoteVo beforePrice) {
super();
this.supplierName = supplierName;
this.beforePrice = beforePrice;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public QuoteVo getBeforePrice() {
return beforePrice;
}
public void setBeforePrice(QuoteVo beforePrice) {
this.beforePrice = beforePrice;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
public QuoteVo getAfterPrice() {
return afterPrice;
}
public void setAfterPrice(QuoteVo afterPrice) {
this.afterPrice = afterPrice;
}
public String getAdjustReason() {
return adjustReason;
}
public void setAdjustReason(String adjustReason) {
this.adjustReason = adjustReason;
}
public AdjustStrategy getAdjustStrategy() {
return adjustStrategy;
}
public void setAdjustStrategy(AdjustStrategy adjustStrategy) {
this.adjustStrategy = adjustStrategy;
}
public void setAdjustStrategy(AdjustStrategy adjustStrategy, String priceUnit) {
this.afterPrice = new QuoteVo(new AdjustStrategyCalculator(adjustStrategy).calculate(beforePrice.getPrice()), priceUnit);
this.describe = adjustStrategy.getDescribe(priceUnit);
this.adjustReason = adjustStrategy.getAdjustReason();
this.adjustStrategy = adjustStrategy;
}
}
package com.gx.obe.quote.vo;
import java.util.Objects;
import com.gx.obe.dynamicview.annotation.TableCol;
import com.gx.obe.dynamicview.enums.ColAlignEnum;
import com.gx.obe.quote.converter.MoneyConverter;
import com.gx.obe.web.entity.price.BidPriceResult;
public class BidPriceModifyVo {
private String id;
@TableCol(value = "供应商名称", width = 200, minWidth = 200, maxWidth = 300, align = ColAlignEnum.LEFT)
private String supplierName;
@TableCol(value = "币种", width = 100, minWidth = 50, maxWidth = 100)
private String currencyName;
@TableCol(value = "单位", width = 100, minWidth = 50, maxWidth = 100)
private String priceUnit;
@TableCol(value = "原始报价", type = MoneyConverter.class, align = ColAlignEnum.RIGHT)
private QuoteVo bidPrice;
@TableCol(value = "修正报价", type = MoneyConverter.class, align = ColAlignEnum.RIGHT)
private QuoteVo finalBidPrice;
@TableCol(value = "修正原因", width = 300, minWidth = 200, maxWidth = 400, align = ColAlignEnum.LEFT)
private String modifyReason;
public BidPriceModifyVo(String supplierName, BidPriceResult bidPriceResult) {
this.supplierName = supplierName;
if (Objects.isNull(bidPriceResult)) {
return;
}
this.id = bidPriceResult.getId();
this.currencyName = bidPriceResult.getCurrencyName();
this.priceUnit = bidPriceResult.getPriceUnit();
this.bidPrice = new QuoteVo(bidPriceResult.getBidPrice(), bidPriceResult.getPriceUnit());
this.finalBidPrice = new QuoteVo(bidPriceResult.getFinalBidPrice(), bidPriceResult.getPriceUnit());
this.modifyReason = bidPriceResult.getModifyReason();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getCurrencyName() {
return currencyName;
}
public void setCurrencyName(String currencyName) {
this.currencyName = currencyName;
}
public String getPriceUnit() {
return priceUnit;
}
public void setPriceUnit(String priceUnit) {
this.priceUnit = priceUnit;
}
public QuoteVo getBidPrice() {
return bidPrice;
}
public void setBidPrice(QuoteVo bidPrice) {
this.bidPrice = bidPrice;
}
public QuoteVo getFinalBidPrice() {
return finalBidPrice;
}
public void setFinalBidPrice(QuoteVo finalBidPrice) {
this.finalBidPrice = finalBidPrice;
}
public String getModifyReason() {
return modifyReason;
}
public void setModifyReason(String modifyReason) {
this.modifyReason = modifyReason;
}
}
package com.gx.obe.quote.vo;
import java.math.BigDecimal;
public class QuoteVo {
private BigDecimal price;
private String unit;
public QuoteVo(BigDecimal price, String unit) {
this.price = price;
this.unit = unit;
}
public BigDecimal getPrice() {
return price;
}
public String getUnit() {
return unit;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="/org.eclipse.swt.core/lib/de.kupzog.KTable.jar"/>
<classpathentry kind="lib" path="/org.eclipse.swt.core/lib/org.eclipse.nebula.widgets.grid.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.gx.obe.step.appraise</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Appraise
Bundle-SymbolicName: com.gx.obe.step.appraise;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.gx.obe.step.appraise.Activator
Bundle-Vendor: GX
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.gx.obe.components.core,
org.eclipse.swt.core,
com.gx.obe.components.messages;bundle-version="1.0.0",
com.gx.obe.step,
com.gx.obe.business,
com.gx.obe.common.widget;bundle-version="1.0.0",
com.gx.obe.action;bundle-version="1.0.0",
com.gx.obe.lib;bundle-version="1.0.0",
com.gx.obe.common.icons;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: com.gx.obe.appraise
Bundle-ActivationPolicy: lazy
Export-Package: com.gx.obe.step.appraise.action,
com.gx.obe.step.appraise.builder,
com.gx.obe.step.appraise.dialog
<appraiseInfo>
<appraisedTotalResultList>
<appraisedTotalResult>
<appraiser>00</appraiser><!-- 角色类型 00:专家;01:项目经理 -->
<userName>张三</userName><!-- 姓名 -->
<userIdcard>130000199911111111</userIdcard><!-- 身份证号 -->
<appraiseDate>2020-11-25</appraiseDate><!-- 评价时间 -->
<score>90</score><!-- 总分:两位小数 -->
<appraisedResultList>
<appraisedResult>
<appraiseName>守时情况</appraiseName>
<appraiser>00</appraiser><!-- 角色类型 00:专家;01:项目经理 -->
<score>18</score><!-- 得分:两位小数 -->
<appraiseResultList>
<appraiseResult>
<userName>李四</userName><!-- 姓名 -->
<userIdcard>130000199911111112</userIdcard><!-- 身份证号 -->
<score>18</score><!-- 得分:整数 -->
<cause>原因说明</cause>
</appraiseResult>
<appraiseResult>
<userName>李四</userName><!-- 姓名 -->
<userIdcard>130000199911111112</userIdcard><!-- 身份证号 -->
<score>18</score><!-- 得分:整数 -->
<cause>原因说明</cause>
</appraiseResult>
<appraiseResult>
<userName>王五</userName><!-- 姓名 -->
<userIdcard>130000199911111122</userIdcard><!-- 身份证号 -->
<score>18</score>
<cause>原因说明</cause>
</appraiseResult>
</appraiseResultList>
</appraisedResult>
<appraisedResult>
<appraiseName>守时情况</appraiseName>
<appraiser>00</appraiser><!-- 角色类型 00:专家;01:项目经理 -->
<score>18</score><!-- 得分:两位小数 -->
<appraiseResultList>
<appraiseResult>
<userName>李四</userName><!-- 姓名 -->
<userIdcard>130000199911111112</userIdcard><!-- 身份证号 -->
<score>18</score><!-- 得分:整数 -->
<cause>原因说明</cause>
</appraiseResult>
<appraiseResult>
<userName>李四</userName><!-- 姓名 -->
<userIdcard>130000199911111112</userIdcard><!-- 身份证号 -->
<score>18</score><!-- 得分:整数 -->
<cause>原因说明</cause>
</appraiseResult>
<appraiseResult>
<userName>王五</userName><!-- 姓名 -->
<userIdcard>130000199911111122</userIdcard><!-- 身份证号 -->
<score>18</score>
<cause>原因说明</cause>
</appraiseResult>
</appraiseResultList>
</appraisedResult>
<appraisedResult>
<appraiseName>出席情况</appraiseName>
<appraiser>00</appraiser><!-- 角色类型 00:专家;01:项目经理 -->
<score>18</score>
<appraiseResultList>
<appraiseResult>
<userName>a</userName><!-- 姓名 -->
<userIdcard>130000199911111113</userIdcard><!-- 身份证号 -->
<score>18</score>
<cause>原因说明</cause>
</appraiseResult>
<appraiseResult>
<userName>b</userName><!-- 姓名 -->
<userIdcard>130000199911111114</userIdcard><!-- 身份证号 -->
<score>18</score>
<cause>原因说明</cause>
</appraiseResult>
</appraiseResultList>
</appraisedResult>
</appraisedResultList>
</appraisedTotalResult>
<appraisedTotalResult>
<appraiser>00</appraiser><!-- 角色类型 00:专家;01:项目经理 -->
<userName>张三</userName><!-- 姓名 -->
<userIdcard>130000199911111111</userIdcard><!-- 身份证号 -->
<appraiseDate>2020-11-25</appraiseDate><!-- 评价时间 -->
<score>90</score><!-- 总分:两位小数 -->
<appraisedResultList>
<appraisedResult>
<appraiseName>守时情况</appraiseName>
<appraiser>00</appraiser><!-- 角色类型 00:专家;01:项目经理 -->
<score>18</score><!-- 得分:两位小数 -->
<appraiseResultList>
<appraiseResult>
<userName>李四</userName><!-- 姓名 -->
<userIdcard>130000199911111112</userIdcard><!-- 身份证号 -->
<score>18</score><!-- 得分:整数 -->
<cause>原因说明</cause>
</appraiseResult>
<appraiseResult>
<userName>王五</userName><!-- 姓名 -->
<userIdcard>130000199911111122</userIdcard><!-- 身份证号 -->
<score>18</score>
<cause>原因说明</cause>
</appraiseResult>
</appraiseResultList>
</appraisedResult>
<appraisedResult>
<appraiseName>出席情况</appraiseName>
<score>18</score>
<appraiseResultList>
<appraiseResult>
<userName>a</userName><!-- 姓名 -->
<userIdcard>130000199911111113</userIdcard><!-- 身份证号 -->
<score>18</score>
<cause>原因说明</cause>
</appraiseResult>
<appraiseResult>
<userName>b</userName><!-- 姓名 -->
<userIdcard>130000199911111114</userIdcard><!-- 身份证号 -->
<score>18</score>
<cause>原因说明</cause>
</appraiseResult>
</appraiseResultList>
</appraisedResult>
</appraisedResultList>
</appraisedTotalResult>
</appraisedTotalResultList>
</appraiseInfo>
\ No newline at end of file
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
javacDefaultEncoding.. = UTF-8
package com.gx.obe.step.appraise;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.gx.obe.step.appraise"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
package com.gx.obe.step.appraise.action;
import java.util.Objects;
import org.eclipse.swt.SWT;
import com.gx.obe.action.bean.Action;
import com.gx.obe.action.listener.ActionListener;
import com.gx.obe.step.appraise.composite.expert.AppraiseExpertComposite;
import com.gx.obe.step.listener.ExpertEvaluationListener;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseExpertAction extends Action {
@Override
public void run() {
ActionListener actionListener = this.getListener();
if (Objects.isNull(actionListener)) return;
actionListener.onLoad(this);
ExpertEvaluationListener expertEvaluationListener = (ExpertEvaluationListener) this.getData("expertEvaluationListener");
TenderProjectEntity tenderProject = this.getTenderProject();
EvaluationStep evaluationStep = (EvaluationStep) this.getData("evaluationStep");
boolean hideLeft = Objects.nonNull(this.getData("hideLeft"));
AppraiseExpertComposite composite = new AppraiseExpertComposite(actionListener.getParentComposite(), SWT.NONE);
composite.hideLeft(hideLeft);
composite.addExpertEvaluationListener(expertEvaluationListener);
composite.refresh(tenderProject, evaluationStep);
actionListener.loadComposite(this, composite);
}
}
package com.gx.obe.step.appraise.action;
import java.util.Objects;
import org.eclipse.swt.SWT;
import com.gx.obe.action.bean.Action;
import com.gx.obe.action.listener.ActionListener;
import com.gx.obe.step.appraise.composite.expert.AppraiseExpertResultComposite;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseExpertResultAction extends Action {
@Override
public void run() {
ActionListener actionListener = this.getListener();
if (Objects.isNull(actionListener)) return;
actionListener.onLoad(this);
TenderProjectEntity tenderProject = this.getTenderProject();
EvaluationStep evaluationStep = (EvaluationStep) this.getData("evaluationStep");
AppraiseExpertResultComposite composite = new AppraiseExpertResultComposite(actionListener.getParentComposite(), SWT.NONE);
composite.refresh(tenderProject, evaluationStep);
actionListener.loadComposite(this, composite);
}
}
package com.gx.obe.step.appraise.action;
import java.util.Objects;
import org.eclipse.swt.SWT;
import com.gx.obe.action.bean.Action;
import com.gx.obe.action.listener.ActionListener;
import com.gx.obe.step.appraise.composite.manager.AppraiseManagerComposite;
import com.gx.obe.step.listener.ExpertEvaluationListener;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseManagerAction extends Action {
@Override
public void run() {
ActionListener actionListener = this.getListener();
if (Objects.isNull(actionListener)) return;
actionListener.onLoad(this);
ExpertEvaluationListener expertEvaluationListener = (ExpertEvaluationListener) this.getData("expertEvaluationListener");
TenderProjectEntity tenderProject = (TenderProjectEntity) this.getData("tenderProjectEntity");
EvaluationStep evaluationStep = (EvaluationStep) this.getData("evaluationStep");
AppraiseManagerComposite composite = new AppraiseManagerComposite(actionListener.getParentComposite(), SWT.NONE);
composite.addExpertEvaluationListener(expertEvaluationListener);
composite.refresh(tenderProject, evaluationStep);
actionListener.loadComposite(this, composite);
}
}
package com.gx.obe.step.appraise.action;
import java.util.Objects;
import org.eclipse.swt.SWT;
import com.gx.obe.action.bean.Action;
import com.gx.obe.action.listener.ActionListener;
import com.gx.obe.step.appraise.composite.manager.AppraiseManagerResultComposite;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseManagerResultAction extends Action {
@Override
public void run() {
ActionListener actionListener = this.getListener();
if (Objects.isNull(actionListener)) return;
actionListener.onLoad(this);
TenderProjectEntity tenderProject = this.getTenderProject();
EvaluationStep evaluationStep = (EvaluationStep) this.getData("evaluationStep");
AppraiseManagerResultComposite composite = new AppraiseManagerResultComposite(actionListener.getParentComposite(), SWT.NONE);
composite.refresh(tenderProject, evaluationStep);
actionListener.loadComposite(this, composite);
}
}
package com.gx.obe.step.appraise.bean;
/**
* @Description: 评价
* @author chenxw
*/
public class Appraise {
/**
* 主键
*/
private String id;
/**
* 名称
*/
private String name;
/**
* 分值
*/
private int score;
/**
* 考核内容及标准
*/
private String rule;
/**
* <!-- 角色类型 00:专家;01:项目经理 -->
*/
private String appraiser;
public Appraise() {}
public Appraise(String id, String name, int score, String rule, String appraiser) {
this.id = id;
this.name = name;
this.score = score;
this.rule = rule;
this.appraiser = appraiser;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getScore() {
return score;
}
public void setScore(int score) {
this.score = score;
}
public String getRule() {
return rule;
}
public void setRule(String rule) {
this.rule = rule;
}
public String getAppraiser() {
return appraiser;
}
public void setAppraiser(String appraiser) {
this.appraiser = appraiser;
}
}
package com.gx.obe.step.appraise.bean;
import java.util.function.Consumer;
import java.util.function.Function;
import com.gx.obe.util.utils.Keys;
/**
* @Description: 评价结果
* @author chenxw
*/
public class AppraiseResult {
/**
* 主键
*/
private String id;
/**
* 项目id
*/
private String tenderId;
/**
* 评价项id
*/
private String appraiseId;
/**
* 评价人id
*/
private String appraiserId;
/**
* 被评价人id
*/
private String appraisedId;
/**
* 得分
*/
private Integer score;
/**
* 原因
*/
private String cause;
public static class AppraiserResultKey extends Keys {
public AppraiserResultKey(String appraiseId, String appraisedId) {
super(appraiseId, appraisedId);
}
public String getAppraiseId() {
return (String) get(0);
}
public String getAppraisedId() {
return (String) get(1);
}
}
public static class AppraisedResultKey extends Keys {
public AppraisedResultKey(String appraiseId, String appraiserId) {
super(appraiseId, appraiserId);
}
public String getAppraiseId() {
return (String) get(0);
}
public String getAppraiserId() {
return (String) get(1);
}
}
public AppraiseResult() {}
public AppraiseResult(AppraiserResultKey appraiseResultKey) {
this.appraiseId = appraiseResultKey.getAppraiseId();
this.appraisedId = appraiseResultKey.getAppraisedId();
}
public static Function<AppraiserResultKey, AppraiseResult> newFun(Consumer<AppraiseResult> consumer) {
return t -> {
AppraiseResult appraiseResult = new AppraiseResult(t);
consumer.accept(appraiseResult);
return appraiseResult;
};
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAppraiseId() {
return appraiseId;
}
public void setAppraiseId(String appraiseId) {
this.appraiseId = appraiseId;
}
public String getAppraiserId() {
return appraiserId;
}
public void setAppraiserId(String appraiserId) {
this.appraiserId = appraiserId;
}
public String getAppraisedId() {
return appraisedId;
}
public void setAppraisedId(String appraisedId) {
this.appraisedId = appraisedId;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
public String getCause() {
return cause;
}
public void setCause(String cause) {
this.cause = cause;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
}
package com.gx.obe.step.appraise.bean;
import java.math.BigDecimal;
import com.gx.obe.util.utils.Keys;
/**
* @Description: 被评价人得分结果
* @author chenxw
*/
public class AppraisedResult {
/**
* 主键
*/
private String id;
/**
* 项目id
*/
private String tenderId;
/**
* 评价项id
*/
private String appraiseId;
/**
* 被评价人id
*/
private String appraisedId;
/**
* 得分
*/
private BigDecimal score;
public static class ResultKey extends Keys {
public ResultKey(String appraiseId, String appraisedId) {
super(appraiseId, appraisedId);
}
public String getAppraiseId() {
return (String) get(0);
}
public String getAppraisedId() {
return (String) get(1);
}
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAppraiseId() {
return appraiseId;
}
public void setAppraiseId(String appraiseId) {
this.appraiseId = appraiseId;
}
public String getAppraisedId() {
return appraisedId;
}
public void setAppraisedId(String appraisedId) {
this.appraisedId = appraisedId;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
}
package com.gx.obe.step.appraise.bean;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: 被评价人得分结果
* @author chenxw
*/
public class AppraisedTotalResult {
/**
* 主键
*/
private String id;
/**
* 项目id
*/
private String tenderId;
/**
* 被评价人id
*/
private String appraisedId;
/**
* 得分
*/
private BigDecimal score;
/**
* 评审时间
*/
private Date appraiseDate;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAppraisedId() {
return appraisedId;
}
public void setAppraisedId(String appraisedId) {
this.appraisedId = appraisedId;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public Date getAppraiseDate() {
return appraiseDate;
}
public void setAppraiseDate(Date appraiseDate) {
this.appraiseDate = appraiseDate;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
}
package com.gx.obe.step.appraise.builder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.bean.AppraisedResult;
import com.gx.obe.step.appraise.bean.AppraisedTotalResult;
import com.gx.obe.step.appraise.enumeration.AppraiserEnum;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.service.AppraisedResultService;
import com.gx.obe.step.appraise.service.AppraisedTotalResultService;
import com.gx.obe.step.appraise.utils.ObjectUtils;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.util.utils.DateUtils;
import com.gx.obe.util.utils.PredicateUtils;
import com.gx.obe.web.entity.auth.AuthUser;
public class AppraiseInfoDocumentBuilder {
private String tenderId;
private List<AuthUser> expertUserList;
private AuthUser managerUser;
private List<Appraise> appraiseExpertList;
private List<Appraise> appraiseManagerList;
private Map<String, AppraisedTotalResult> appraisedTotalResultMap;
private Map<String, Map<String, AppraisedResult>> appraisedResultMapMap;
private Map<String, Map<String, Map<String, AppraiseResult>>> appraiseResultMapMapMap;
public AppraiseInfoDocumentBuilder(String tenderId) {
this.tenderId = tenderId;
initData();
}
private void initData() {
expertUserList = UserUtils.getAllExpertUserList(tenderId);
managerUser = UserUtils.getManagerUser(tenderId);
appraiseExpertList = AppraiseService.getAllAppraiseExpertList();
appraiseManagerList = AppraiseService.getAppraiseManagerList();
appraisedTotalResultMap = AppraisedTotalResultService.getAppraisedTotalResult(tenderId).stream().collect(Collectors.toMap(AppraisedTotalResult::getAppraisedId, Function.identity()));
appraisedResultMapMap = AppraisedResultService.getAppraisedResultList(tenderId).stream().collect(Collectors.groupingBy(AppraisedResult::getAppraisedId, Collectors.toMap(AppraisedResult::getAppraiseId, Function.identity())));
appraiseResultMapMapMap = AppraiseResultService.getAppraiseResultList(tenderId).stream().collect(Collectors.groupingBy(AppraiseResult::getAppraisedId, Collectors.groupingBy(AppraiseResult::getAppraiseId, Collectors.toMap(AppraiseResult::getAppraiserId, Function.identity()))));
}
public Document build() {
initData();
Document document = DocumentHelper.createDocument();
Element appraisedTotalResultListElement = document.addElement("appraiseInfo").addElement("appraisedTotalResultList");
if (managerUser != null) {
setExpertAppraisedTotalResultListElement(appraisedTotalResultListElement);
setManagerAppraisedTotalResultListElement(appraisedTotalResultListElement);
}
return document;
}
private void setExpertAppraisedTotalResultListElement(Element appraisedTotalResultListElement) {
for (AuthUser expertUser : expertUserList) {
Element appraisedResultListElement = initAppraisedTotalResultElement(appraisedTotalResultListElement, expertUser, AppraiserEnum.EXPERT.getKey());
Map<String, AppraisedResult> appraisedResultMap = appraisedResultMapMap.getOrDefault(expertUser.getId(), new HashMap<>());
Map<String, Map<String, AppraiseResult>> appraiseResultMapMap = appraiseResultMapMapMap.getOrDefault(expertUser.getId(), new HashMap<>());
for (Appraise appraise : appraiseExpertList) {
Element appraiseResultListElement = initAppraisedResultElement(appraisedResultListElement, appraise, appraisedResultMap);
Map<String, AppraiseResult> appraiseResultMap = appraiseResultMapMap.get(appraise.getId());
switch (AppraiserEnum.getByKey(appraise.getAppraiser())) {
case EXPERT:
// expertUserList.stream().filter(PredicateUtils.apply(AuthUser::getId, Predicate.isEqual(expertUser.getId()).negate())).forEach(t -> {
// initAppraiseResultElement(appraiseResultListElement, t, appraiseResultMap);
// });
break;
case MANAGER:
initAppraiseResultElement(appraiseResultListElement, managerUser, appraiseResultMap);
break;
}
}
}
}
private void setManagerAppraisedTotalResultListElement(Element appraisedTotalResultListElement) {
Element appraisedResultListElement = initAppraisedTotalResultElement(appraisedTotalResultListElement, managerUser, AppraiserEnum.MANAGER.getKey());
Map<String, AppraisedResult> appraisedResultMap = appraisedResultMapMap.getOrDefault(managerUser.getId(), new HashMap<>());
Map<String, Map<String, AppraiseResult>> appraiseResultMapMap = appraiseResultMapMapMap.getOrDefault(managerUser.getId(), new HashMap<>());
for (Appraise appraise : appraiseManagerList) {
Element appraiseResultListElement = initAppraisedResultElement(appraisedResultListElement, appraise, appraisedResultMap);
Map<String, AppraiseResult> appraiseResultMap = appraiseResultMapMap.get(appraise.getId());
for (AuthUser authUser : expertUserList) {
initAppraiseResultElement(appraiseResultListElement.addElement("appraiseResult"), authUser, appraiseResultMap);
}
}
}
private Element initAppraisedTotalResultElement(Element appraisedTotalResultListElement, AuthUser authUser, String appraiser) {
Element appraisedTotalResultElement = appraisedTotalResultListElement.addElement("appraisedTotalResult");
AppraisedTotalResult appraisedTotalResult = appraisedTotalResultMap.get(authUser.getId());
appraisedTotalResultElement.addElement("appraiser").setText(appraiser);
appraisedTotalResultElement.addElement("userName").setText(authUser.getUserName());
appraisedTotalResultElement.addElement("userIdcard").setText(Optional.of(authUser).map(AuthUser::getUserIdcard).orElse("null"));
appraisedTotalResultElement.addElement("appraiseDate").setText(Optional.ofNullable(appraisedTotalResult).map(AppraisedTotalResult::getAppraiseDate).map(t -> DateUtils.getFormat(t, DateUtils.TIMESTAMP_STR)).orElse(""));
appraisedTotalResultElement.addElement("score").setText(Optional.ofNullable(appraisedTotalResult).map(AppraisedTotalResult::getScore).map(ObjectUtils::buildScoreText).orElse(""));
return appraisedTotalResultElement.addElement("appraisedResultList");
}
private Element initAppraisedResultElement(Element appraisedResultListElement, Appraise appraise, Map<String, AppraisedResult> appraisedResultMap) {
Element appraisedResultElement = appraisedResultListElement.addElement("appraisedResult");
AppraisedResult appraisedResult = appraisedResultMap.get(appraise.getId());
appraisedResultElement.addElement("appraiseName").setText(appraise.getName());
appraisedResultElement.addElement("appraiser").setText(appraise.getAppraiser());
appraisedResultElement.addElement("score").setText(Optional.ofNullable(appraisedResult).map(AppraisedResult::getScore).map(ObjectUtils::buildScoreText).orElse(""));
return appraisedResultElement.addElement("appraiseResultList");
}
private void initAppraiseResultElement(Element appraiseResultListElement, AuthUser authUser, Map<String, AppraiseResult> appraiseResultMap) {
Element appraiseResultElement = appraiseResultListElement.addElement("appraiseResult");
AppraiseResult appraiseResult = appraiseResultMap.get(authUser.getId());
appraiseResultElement.addElement("userName").setText(authUser.getUserName());
appraiseResultElement.addElement("userIdcard").setText(Optional.of(authUser).map(AuthUser::getUserIdcard).orElse("null"));
appraiseResultElement.addElement("score").setText(appraiseResult.getScore().toString());
appraiseResultElement.addElement("cause").setText(Optional.of(appraiseResult).map(AppraiseResult::getCause).orElse(""));
}
}
package com.gx.obe.step.appraise.composite;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.core.listener.RoundBorderLineListener;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.MouseTrackListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import com.gx.obe.ColorConstants;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.components.core.Constants;
import com.gx.obe.message.Messages;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.bean.AppraiseResult.AppraiserResultKey;
import com.gx.obe.step.appraise.dialog.InputCauseDialog;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.utils.DialogUtils;
import com.gx.obe.step.appraise.utils.ObjectUtils;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.swtdesigner.ResourceManager;
import com.swtdesigner.SWTResourceManager;
import de.kupzog.ktable.KTable;
import de.kupzog.ktable.KTableCellSelectionAdapter;
import de.kupzog.ktable.SWTX;
import de.kupzog.ktable.editors.KTableCellEditorText;
import de.kupzog.ktable.model.CommonKtableCModel;
import de.kupzog.ktable.renderers.FixedWrapCellRenderer;
import de.kupzog.ktable.renderers.TextWrapCellRenderer;
/**
* @Description: 评价界面
* @author chenxw
*/
public abstract class AppraiseComposite extends Composite {
private Consumer<Consumer<Shell>> openConsumer = DialogUtils.getOpenConsumer(getShell());
private Function<Function<Shell, String>, String> openFunction = DialogUtils.getOpenFunction(getShell());
private StyledText ruleText;
private Composite tableComposite;
private KTable kTable;
private Text causeText;
private Text appraisedNameText;
private List<Appraise> appraises;
private List<AuthUser> authUsers;
private Map<AppraiserResultKey, AppraiseResult> appraiseResultMap;
private int curRow;
private int curCol;
private CommonKtableCModel model;
private Text curFactorText;
private Label causeTitleLabel;
private Label causeCountLabel;
private TenderProjectEntity tenderProject;
/**
* @author chenxw
* @param parent
* @param style
*/
public AppraiseComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
Composite composite = new Composite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
GridLayout gl_evaluationComposite = new GridLayout(1, false);
gl_evaluationComposite.verticalSpacing = 0;
gl_evaluationComposite.horizontalSpacing = 0;
gl_evaluationComposite.marginHeight = 0;
gl_evaluationComposite.marginWidth = 0;
composite.setLayout(gl_evaluationComposite);
Composite expert_composite = new Composite(composite, SWT.NONE);
GridLayout gl_expert_composite = new GridLayout(2, false);
gl_expert_composite.marginWidth = 5;
gl_expert_composite.marginHeight = 5;
expert_composite.setLayout(gl_expert_composite);
expert_composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
expert_composite.setBackgroundImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/title_bg.png"));
CLabel appraisedTitleLabel = new CLabel(expert_composite, SWT.NONE);
appraisedTitleLabel.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/supplier.png"));
appraisedTitleLabel.setText("被评价人:");
appraisedTitleLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
appraisedTitleLabel.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
appraisedNameText = new Text(expert_composite, SWT.READ_ONLY);
appraisedNameText.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
appraisedNameText.setForeground(ColorConstants.FONT_BLUE_COLOR);
appraisedNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
tableComposite = new Composite(composite, SWT.NONE);
FillLayout fl_tableComposite = new FillLayout(SWT.HORIZONTAL);
fl_tableComposite.marginHeight = 1;
fl_tableComposite.marginWidth = 1;
tableComposite.setLayout(fl_tableComposite);
GridData gd_tableComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_tableComposite.heightHint = 300;
tableComposite.setLayoutData(gd_tableComposite);
tableComposite.addPaintListener(new RoundBorderLineListener(ColorConstants.BORDER_LINE_COLOR));
// ESepator factor_sep = new ESepator(composite, SWT.NONE);
// factor_sep.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
// factor_sep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
//
Composite bottomComposite = new Composite(composite, SWT.NONE);
bottomComposite.setBackground(ColorConstants.BORDER_LINE_COLOR);
GridData gd_composite_5 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_composite_5.heightHint = 200;
bottomComposite.setLayoutData(gd_composite_5);
GridLayout gl_composite_5 = new GridLayout(2, false);
gl_composite_5.marginHeight = 0;
gl_composite_5.marginWidth = 1;
gl_composite_5.verticalSpacing = 1;
gl_composite_5.horizontalSpacing = 1;
bottomComposite.setLayout(gl_composite_5);
bottomComposite.setBackgroundMode(SWT.INHERIT_FORCE);
Composite title_composite = new Composite(bottomComposite, SWT.NONE);
GridLayout gl_title_composite = new GridLayout(3, false);
gl_title_composite.marginWidth = 5;
gl_title_composite.marginHeight = 5;
title_composite.setLayout(gl_title_composite);
title_composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
title_composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
title_composite.setBackgroundImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/title_bg.png"));
CLabel factoTitleLabel = new CLabel(title_composite, SWT.NONE);
factoTitleLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
factoTitleLabel.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
factoTitleLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
factoTitleLabel.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/items.png"));
factoTitleLabel.setText("评价项:");
curFactorText = new Text(title_composite, SWT.READ_ONLY);
curFactorText.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
curFactorText.setForeground(ColorConstants.FONT_BLUE_COLOR);
curFactorText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Label tipsLabel = new Label(title_composite, SWT.NONE | SWT.WRAP);
tipsLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
tipsLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
tipsLabel.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
tipsLabel.setText("得分低于评审项分值的80%必须输入原因说明!");
// ImageButton ruleTitleBtn = new ImageButton(bottomComposite, SWT.NONE);
// ruleTitleBtn.setText("考核标准");
// ruleTitleBtn.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
// ruleTitleBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
// ruleTitleBtn.setForeground(ColorConstants.SKIN_FOREGROUND);
// ruleTitleBtn.setBackgroundColor(ColorConstants.SKIN_BG);
//
// ImageButton causeTitleBtn = new ImageButton(bottomComposite, SWT.NONE);
// causeTitleBtn.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
// causeTitleBtn.setText("打分原因说明");
// causeTitleBtn.setForeground(ColorConstants.SKIN_FOREGROUND);
// causeTitleBtn.setBackgroundColor(ColorConstants.SKIN_BG);
// causeTitleBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
Composite ruleComposite = new Composite(bottomComposite, SWT.NONE);
GridData gd_ruleComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_ruleComposite.widthHint = 300;
ruleComposite.setLayoutData(gd_ruleComposite);
GridLayout gl_ruleComposite = new GridLayout(1, false);
gl_ruleComposite.marginWidth = 5;
gl_ruleComposite.marginHeight = 5;
ruleComposite.setLayout(gl_ruleComposite);
ruleComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
ruleText = new StyledText(ruleComposite, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
ruleText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
ruleText.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
ruleText.setEditable(false);
Composite causeComposite = new Composite(bottomComposite, SWT.NONE);
GridData gd_causeComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_causeComposite.widthHint = 200;
causeComposite.setLayoutData(gd_causeComposite);
GridLayout gl_causeComposite = new GridLayout(2, false);
gl_causeComposite.marginHeight = 5;
gl_causeComposite.marginWidth = 5;
causeComposite.setLayout(gl_causeComposite);
causeComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
causeTitleLabel = new Label(causeComposite, SWT.NONE | SWT.WRAP);
causeTitleLabel.setForeground( ColorConstants.NOTE_TIPS_COLOR);
causeTitleLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
causeTitleLabel.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
causeTitleLabel.setText("请输入打分原因说明");
causeCountLabel = new Label(causeComposite, SWT.NONE | SWT.WRAP);
causeCountLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
causeCountLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
causeCountLabel.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
causeCountLabel.setText("500");
ESepator sep = new ESepator(causeComposite, SWT.NONE);
sep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
sep.setLineStyle(SWT.LINE_DOT);
sep.setLineWidth(2);
sep.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
causeText = new Text(causeComposite, SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
causeText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
causeCountLabel.setText("( "+causeText.getText().length() +" / 500 )");
}
});
causeText.setTextLimit(500);
causeText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
causeText.addMouseTrackListener(MouseTrackListener.mouseExitAdapter(e -> saveCauseAction()));
//// Label tipsLabel = new Label(causeComposite, SWT.NONE | SWT.WRAP);
//// tipsLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
//// tipsLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
//// tipsLabel.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
//// tipsLabel.setText("得分低于评审项分值的80%必须输入原因说明!");
//
// EButton saveCauseBtn = new EButton(causeComposite, SWT.NONE | EButton.CSS_BLUE);
// saveCauseBtn.setText(Messages.Button_ok);
// saveCauseBtn.addMouseListener(MouseListener.mouseUpAdapter(e -> saveCauseAction()));
}
/**
* @Description: 刷新
* @author chenxw
* @param appraises
* @param users
* @param appraisedResults
*/
public void refresh(TenderProjectEntity tenderProject, List<Appraise> appraises, List<AuthUser> users, List<AppraiseResult> appraiseResults) {
this.tenderProject = tenderProject;
this.appraises = appraises;
this.authUsers = users;
this.appraiseResultMap = initAppraiseResultMap(appraiseResults);
refreshAppraiseTable();
}
/**
* @Description: 初始化评价结果map
* @author chenxw
* @param appraiseResults
* @return
*/
private Map<AppraiserResultKey, AppraiseResult> initAppraiseResultMap(List<AppraiseResult> appraiseResults) {
if (Objects.isNull(appraiseResults)) {
return new HashMap<>();
}
return appraiseResults.stream().collect(Collectors.toMap(t -> new AppraiserResultKey(t.getAppraiseId(), t.getAppraisedId()), Function.identity()));
}
/**
* @Description: 刷新评价表格
* @author chenxw
*/
private void refreshAppraiseTable() {
Arrays.stream(tableComposite.getChildren()).forEach(Control::dispose);
kTable = new KTable(tableComposite, SWT.FULL_SELECTION | SWTX.AUTO_SCROLL | SWTX.EDIT_ON_KEY);
kTable.addCellSelectionListener(new KTableCellSelectionAdapter() {
public void cellSelected(int col, int row, int statemask) {
cellSelectedAction(col, row);
}
});
model = new CommonKtableCModel(kTable, 1, 1, appraises.size(), authUsers.size());
model.setColumnWidth(0, 200);
model.setRowHeightRender(row -> Constants.ROW_HIGHT);
model.setCellContentRender(this::setCellContent);
FixedWrapCellRenderer fixedWrapCellRenderer = new FixedWrapCellRenderer();
TextWrapCellRenderer textWrapCellRenderer = new TextWrapCellRenderer();
model.setCellRender((row, col) -> model.isFixedCell(col, row) ? fixedWrapCellRenderer : textWrapCellRenderer);
KTableCellEditorText editorText = new KTableCellEditorText();
editorText.setSingleClickEdit(true);
model.setCellEditorRender((row, col) -> model.isFixedCell(col, row) ? null : editorText);
model.setCellEditContentRender(this::setCellEditContent);
model.setCellAlignmentRender((row, col) -> SWTX.ALIGN_VERTICAL_CENTER | SWTX.ALIGN_HORIZONTAL_CENTER);
kTable.setModel(model);
tableComposite.layout();
if (!appraises.isEmpty() && !authUsers.isEmpty()) {
cellSelectedAction(1, 1);
}
}
private void cellSelectedAction(int col, int row) {
if(row < model.getFixedRowCount()) {
row = curRow;
}else {
curRow = row;
}
if (col < model.getFixedColumnCount()) {
col = curCol;
} else {
curCol = col;
}
refreshRuleText(row);
refreshCauseText(row, col);
refreshAppraisedName(col);
}
/**
* @Description: 设置单元格内容
* @author chenxw
* @param row
* @param col
* @return
*/
private String setCellContent(int row, int col) {
if (row == 0) {
if (col == 0) return "评价项";
return authUsers.get(col - model.getFixedColumnCount()).getUserName();
}
if (col == 0) return appraises.get(row - model.getFixedRowCount()).getName();
return Optional.of(new AppraiserResultKey(appraises.get(row - model.getFixedRowCount()).getId(), authUsers.get(col - model.getFixedColumnCount()).getId()))
.map(appraiseResultMap::get)
.map(AppraiseResult::getScore)
.map(String::valueOf)
.orElse("");
}
/**
* @Description: 设置单元格编辑内容
* @author chenxw
* @param row
* @param col
* @param content
*/
private void setCellEditContent(int row, int col, Object content) {
if (Objects.isNull(content) || content.toString().isEmpty()) {
return;
}
Integer score = ObjectUtils.toInteger(content);
if (Objects.isNull(score)) {
openConsumer.accept(t -> MessageDialog.openWarning(t, "请输入整数分值!"));
return;
}
Appraise appraise = appraises.get(row - model.getFixedRowCount());
if (score < 0 || score > appraise.getScore()) {
openConsumer.accept(t -> MessageDialog.openWarning(t, MessageFormat.format(Messages.Tips_entryScroeRange, 0, appraise.getScore())));
return;
}
AppraiseResult appraiseResult = getAppraiseResult(row, col);
if (score.equals(appraiseResult.getScore())) {
return;
}
String cause = null;
if (score < appraise.getScore() * 0.8) {
cause = openFunction.apply(t -> InputCauseDialog.openGetCause(t, appraiseResult.getCause()));
if (Objects.isNull(cause)) return;
}
appraiseResult.setScore(score);
appraiseResult.setCause(cause);
kTable.redraw();
refreshCauseText(row, col);
}
/**
* @Description: 保存打分原因说明
* @author chenxw
* @param row
*/
private void saveCauseAction() {
String text = causeText.getText();
AppraiseResult appraiseResult = getAppraiseResult(curRow, curCol);
Integer score = appraiseResult.getScore();
if (text.trim().isEmpty() && Objects.nonNull(score) && score < appraises.get(curRow - model.getFixedRowCount()).getScore() * 0.8) {
MessageDialog.openWarning(getShell(), "得分低于评审项分值的80%必须输入原因说明!");
refreshCauseText(curRow, curCol);
return;
}
appraiseResult.setCause(text);
}
/**
* @Description: 刷新规则文本
* @author chenxw
* @param row
*/
private void refreshRuleText(int row) {
if (row < model.getFixedRowCount()) return;
Appraise appraise = appraises.get(row - model.getFixedRowCount());
curFactorText.setText(Optional.of(appraise.getName()).orElse("评价项"));
StringBuilder textBuilder = new StringBuilder();
textBuilder.append("分值:").append("[0-").append(appraise.getScore()).append("]");
textBuilder.append("\r\n考核标准:");
ruleText.setText(textBuilder.toString());
StyleRange styleScoreRange = new StyleRange();
styleScoreRange.start = 0;
styleScoreRange.length = textBuilder.length();
styleScoreRange.foreground = ColorConstants.FONT_BLUE_COLOR;
styleScoreRange.fontStyle = SWT.BOLD;
ruleText.setStyleRange(styleScoreRange);
ruleText.append("\r\n");
ruleText.append(com.gx.obe.util.utils.ObjectUtils.getObjString(appraise.getRule()));
}
private void refreshAppraisedName(int col) {
if (col == 0) return;
String appraisedName = Optional.of(authUsers.get(col - model.getFixedColumnCount())).map(AuthUser :: getUserName).orElse("-");
if(Optional.of(authUsers.get(col - model.getFixedColumnCount())).map(AuthUser :: getId).orElse("").equals(Optional.ofNullable(tenderProject).map(t->t.getUserId()).orElse(""))) {
appraisedName = "项目经理 ( "+appraisedName+" )";
}
appraisedNameText.setText(appraisedName);
causeTitleLabel.setText("请输入对["+appraisedName+"]的打分原因说明");
}
/**
* @Description: 刷新原因文本
* @author chenxw
* @param row
* @param col
*/
private void refreshCauseText(int row, int col) {
causeText.setText(Optional.of(getAppraiseResult(row, col)).map(AppraiseResult::getCause).orElse(""));
}
/**
* @Description: 满分
* @author chenxw
*/
public void fullMarks() {
if (!MessageDialog.openConfirm(getShell(), Messages.Tips_setQuickEvaluationScore)) {
return;
}
for (Appraise appraise : appraises) {
for (AuthUser authUser : authUsers) {
AppraiseResult appraiseResult = getAppraiseResult(appraise.getId(), authUser.getId());
if (Objects.isNull(appraiseResult.getScore())) {
appraiseResult.setScore(appraise.getScore());
}
}
}
kTable.redraw();
}
/**
* @Description: 保存评价结果
* @author chenxw
* @return
*/
public boolean saveAppraiseResult() {
return AppraiseResultService.batchSaveOrUpdate(appraiseResultMap.values().stream().collect(Collectors.toList()), "score", "cause");
}
/**
* @Description: 检查评价结果
* @author chenxw
* @return
*/
public String checkAppraiseResult() {
for (Appraise appraise : appraises) {
for (AuthUser authUser : authUsers) {
AppraiseResult appraiseResult = getAppraiseResult(appraise.getId(), authUser.getId());
if (Objects.isNull(appraiseResult.getScore())) {
return MessageFormat.format(Messages.Tips_existNoScoreFactor, authUser.getUserName());
}
}
}
return null;
}
public abstract void initAppraiseResult(AppraiseResult appraiseResult);
/**
* @Description: 获取评价结果
* @author chenxw
* @param row
* @param col
* @return
*/
private AppraiseResult getAppraiseResult(int row, int col) {
return getAppraiseResult(appraises.get(row - model.getFixedRowCount()).getId(), authUsers.get(col - model.getFixedColumnCount()).getId());
}
/**
* @Description: 获取评价结果
* @author chenxw
* @param appraiseId
* @param appraisedId
* @return
*/
private AppraiseResult getAppraiseResult(String appraiseId, String appraisedId) {
return appraiseResultMap.computeIfAbsent(new AppraiserResultKey(appraiseId, appraisedId), AppraiseResult.newFun(this::initAppraiseResult));
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.step.appraise.composite;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import com.gx.obe.ColorConstants;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.components.core.Constants;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.bean.AppraiseResult.AppraiserResultKey;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.swtdesigner.ResourceManager;
import com.swtdesigner.SWTResourceManager;
import de.kupzog.ktable.KTable;
import de.kupzog.ktable.KTableCellSelectionAdapter;
import de.kupzog.ktable.SWTX;
import de.kupzog.ktable.model.CommonKtableCModel;
import de.kupzog.ktable.renderers.FixedWrapCellRenderer;
import de.kupzog.ktable.renderers.TextWrapCellRenderer;
/**
* @Description: 评价界面
* @author chenxw
*/
public class AppraiseResultComposite extends Composite {
private Text causeText;
private List<Appraise> appraises;
private List<AuthUser> authUsers;
private String appraiserName;
private Map<AppraiserResultKey, AppraiseResult> appraiseResultMap;
private Composite tableComposite;
private CommonKtableCModel model;
private Text curFactorText;
private StyledText ruleText;
private int curRow;
private int curCol;
private Text appraiserText;
private Text appraisedNameText;
private Composite title_composite;
private TenderProjectEntity tenderProject;
/**
* @author chenxw
* @param parent
* @param style
*/
public AppraiseResultComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
Composite composite = new Composite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
GridLayout gl_evaluationComposite = new GridLayout(1, false);
gl_evaluationComposite.verticalSpacing = 0;
gl_evaluationComposite.horizontalSpacing = 0;
gl_evaluationComposite.marginHeight = 0;
gl_evaluationComposite.marginWidth = 0;
composite.setLayout(gl_evaluationComposite);
tableComposite = new Composite(composite, SWT.NONE);
tableComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
GridData gd_tableComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_tableComposite.heightHint = 300;
tableComposite.setLayoutData(gd_tableComposite);
ESepator factor_sep = new ESepator(composite, SWT.NONE);
factor_sep.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
factor_sep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
Composite bottomComposite = new Composite(composite, SWT.NONE);
GridData gd_bottomComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
gd_bottomComposite.heightHint = 200;
bottomComposite.setLayoutData(gd_bottomComposite);
GridLayout gl_composite_5 = new GridLayout(2, false);
gl_composite_5.marginHeight = 1;
gl_composite_5.marginWidth = 1;
gl_composite_5.verticalSpacing = 0;
gl_composite_5.horizontalSpacing = 0;
bottomComposite.setLayout(gl_composite_5);
bottomComposite.setBackgroundMode(SWT.INHERIT_FORCE);
title_composite = new Composite(bottomComposite, SWT.NONE);
GridLayout gl_title_composite = new GridLayout(5, false);
gl_title_composite.marginWidth = 3;
gl_title_composite.marginHeight = 2;
gl_title_composite.horizontalSpacing = 0;
title_composite.setLayout(gl_title_composite);
title_composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
title_composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
title_composite.setBackgroundImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/title_bg.png"));
curFactorText = new Text(title_composite, SWT.READ_ONLY);
curFactorText.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
curFactorText.setForeground(ColorConstants.FONT_BLUE_COLOR);
GridData gd_curFactorText = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_curFactorText.widthHint = 100;
curFactorText.setLayoutData(gd_curFactorText);
CLabel appraiserTitleLabel = new CLabel(title_composite, SWT.NONE);
appraiserTitleLabel.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/edit_input.png"));
appraiserTitleLabel.setText("评价人:");
appraiserTitleLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
appraiserTitleLabel.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
appraiserText = new Text(title_composite, SWT.READ_ONLY);
appraiserText.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
appraiserText.setForeground(ColorConstants.FONT_BLUE_COLOR);
GridData gd_appraiserText = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_appraiserText.widthHint = 30;
appraiserText.setLayoutData(gd_appraiserText);
appraiserText.setText("评价人");
CLabel appraisedTitleLabel = new CLabel(title_composite, SWT.NONE);
appraisedTitleLabel.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/supplier.png"));
appraisedTitleLabel.setText("被评价人:");
appraisedTitleLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
appraisedTitleLabel.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
appraisedNameText = new Text(title_composite, SWT.READ_ONLY);
appraisedNameText.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
appraisedNameText.setForeground(ColorConstants.FONT_BLUE_COLOR);
GridData gd_appraisedNameText = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_appraisedNameText.widthHint = 30;
appraisedNameText.setLayoutData(gd_appraisedNameText);
ESepator subLineSep = new ESepator(bottomComposite, SWT.NONE);
subLineSep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
subLineSep.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
Composite ruleComposite = new Composite(bottomComposite, SWT.NONE);
GridData gd_ruleComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_ruleComposite.widthHint = 300;
ruleComposite.setLayoutData(gd_ruleComposite);
GridLayout gl_ruleComposite = new GridLayout(1, false);
gl_ruleComposite.marginWidth = 0;
gl_ruleComposite.marginHeight = 0;
ruleComposite.setLayout(gl_ruleComposite);
ruleComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
ruleText = new StyledText(ruleComposite, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
ruleText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
ruleText.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
ruleText.setEditable(false);
Composite causeComposite = new Composite(bottomComposite, SWT.NONE);
GridData gd_causeComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_causeComposite.widthHint = 200;
causeComposite.setLayoutData(gd_causeComposite);
GridLayout gl_causeComposite = new GridLayout(1, false);
gl_causeComposite.marginHeight = 0;
gl_causeComposite.marginWidth = 0;
gl_causeComposite.verticalSpacing = 3;
causeComposite.setLayout(gl_causeComposite);
causeComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
Label causeTitleLabel = new Label(causeComposite, SWT.NONE | SWT.WRAP);
causeTitleLabel.setForeground( ColorConstants.FONT_BLUE_COLOR);
causeTitleLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
causeTitleLabel.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
causeTitleLabel.setText("打分原因说明");
ESepator sep = new ESepator(causeComposite, SWT.NONE);
sep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
sep.setLineStyle(SWT.LINE_DOT);
sep.setLineWidth(2);
sep.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
causeText = new Text(causeComposite, SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
causeText.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
causeText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
}
/**
* @Description: 刷新
* @author chenxw
* @param appraiserName 评价人
* @param appraises
* @param users
* @param appraisedResults
*/
public void refresh(TenderProjectEntity tenderProject, String appraiserName, List<Appraise> appraises, List<AuthUser> users, List<AppraiseResult> appraiseResults) {
this.tenderProject = tenderProject;
this.appraiserName = appraiserName;
this.appraises = appraises;
this.authUsers = users;
this.appraiseResultMap = initAppraiseResultMap(appraiseResults);
refreshAppraiseTable();
}
/**
* @Description: 初始化评价结果map
* @author chenxw
* @param appraiseResults
* @return
*/
private Map<AppraiserResultKey, AppraiseResult> initAppraiseResultMap(List<AppraiseResult> appraiseResults) {
if (Objects.isNull(appraiseResults)) {
return new HashMap<>();
}
return appraiseResults.stream().collect(Collectors.toMap(t -> new AppraiserResultKey(t.getAppraiseId(), t.getAppraisedId()), Function.identity()));
}
/**
* @Description: 刷新评价表格
* @author chenxw
*/
private void refreshAppraiseTable() {
Arrays.stream(tableComposite.getChildren()).forEach(Control::dispose);
KTable kTable = new KTable(tableComposite, SWT.FULL_SELECTION | SWTX.AUTO_SCROLL | SWTX.EDIT_ON_KEY);
kTable.addCellSelectionListener(new KTableCellSelectionAdapter() {
public void cellSelected(int col, int row, int statemask) {
refreshSelectResult(row, col);
}
});
model = new CommonKtableCModel(kTable, 1, 1, appraises.size(), authUsers.size());
model.setColumnWidth(0, 200);
model.setRowHeightRender(row -> Constants.ROW_HIGHT);
model.setCellContentRender(this::setCellContent);
FixedWrapCellRenderer fixedWrapCellRenderer = new FixedWrapCellRenderer();
TextWrapCellRenderer textWrapCellRenderer = new TextWrapCellRenderer();
model.setCellRender((row, col) -> model.isFixedCell(col, row) ? fixedWrapCellRenderer : textWrapCellRenderer);
model.setCellAlignmentRender((row, col) -> SWTX.ALIGN_VERTICAL_CENTER | SWTX.ALIGN_HORIZONTAL_CENTER);
kTable.setModel(model);
tableComposite.layout();
if (!appraises.isEmpty() && !authUsers.isEmpty()) {
refreshSelectResult(model.getFixedColumnCount(), model.getFixedColumnCount());
}
}
private void refreshSelectResult(int row, int col) {
if(row < model.getFixedRowCount()) {
row = curRow;
}else {
curRow = row;
}
if (col < model.getFixedColumnCount()) {
col = curCol;
} else {
curCol = col;
}
refreshCauseText(row, col);
refreshRuleText(row);
appraiserText.setText(Optional.of(appraiserName).orElse("-"));
title_composite.layout();
}
/**
* @Description: 设置单元格内容
* @author chenxw
* @param row
* @param col
* @return
*/
private String setCellContent(int row, int col) {
if (row == 0) {
if (col == 0) return "评价项";
return authUsers.get(col - 1).getUserName();
}
if (col == 0) return appraises.get(row - 1).getName();
return Optional.of(new AppraiserResultKey(appraises.get(row - 1).getId(), authUsers.get(col - 1).getId())).map(appraiseResultMap::get).map(AppraiseResult::getScore).map(String::valueOf).orElse("");
}
/**
* @Description: 刷新原因文本
* @author chenxw
* @param row
* @param col
*/
private void refreshCauseText(int row, int col) {
causeText.setText(Optional.of(getAppraiseResult(appraises.get(row - 1).getId(), authUsers.get(col - 1).getId())).map(AppraiseResult::getCause).orElse(""));
String appraisedName = Optional.of(authUsers.get(col - model.getFixedColumnCount())).map(AuthUser :: getUserName).orElse("-");
if(Optional.of(authUsers.get(col - model.getFixedColumnCount())).map(AuthUser :: getId).orElse("").equals(Optional.ofNullable(tenderProject).map(t->t.getUserId()).orElse(""))) {
appraisedName = "项目经理 ( "+appraisedName+" )";
}
appraisedNameText.setText(appraisedName);
}
/**
* @Description: 刷新规则文本
* @author chenxw
* @param row
*/
private void refreshRuleText(int row) {
if (row < model.getFixedRowCount()) return;
Appraise appraise = appraises.get(row - model.getFixedRowCount());
curFactorText.setText(Optional.of(appraise.getName()).orElse("评价项"));
StringBuilder textBuilder = new StringBuilder();
textBuilder.append("分值:").append("[0-").append(appraise.getScore()).append("]");
textBuilder.append("\r\n考核标准:");
ruleText.setText(textBuilder.toString());
StyleRange styleScoreRange = new StyleRange();
styleScoreRange.start = 0;
styleScoreRange.length = textBuilder.length();
styleScoreRange.foreground = ColorConstants.FONT_BLUE_COLOR;
styleScoreRange.fontStyle = SWT.BOLD;
ruleText.setStyleRange(styleScoreRange);
ruleText.append("\r\n");
ruleText.append(com.gx.obe.util.utils.ObjectUtils.getObjString(appraise.getRule()));
}
/**
* @Description: 获取评价结果
* @author chenxw
* @param appraiseId
* @param appraisedId
* @return
*/
private AppraiseResult getAppraiseResult(String appraiseId, String appraisedId) {
return appraiseResultMap.computeIfAbsent(new AppraiserResultKey(appraiseId, appraisedId), AppraiseResult::new);
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.step.appraise.composite;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import com.gx.obe.ColorConstants;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.components.core.Constants;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.bean.AppraisedResult;
import com.gx.obe.step.appraise.bean.AppraiseResult.AppraisedResultKey;
import com.gx.obe.step.appraise.utils.ObjectUtils;
import com.gx.obe.web.entity.auth.AuthUser;
import com.swtdesigner.ResourceManager;
import com.swtdesigner.SWTResourceManager;
import de.kupzog.ktable.KTable;
import de.kupzog.ktable.SWTX;
import de.kupzog.ktable.model.CommonKtableCModel;
import de.kupzog.ktable.renderers.FixedWrapCellRenderer;
import de.kupzog.ktable.renderers.TextWrapCellRenderer;
/**
* @Description: 评价界面
* @author chenxw
*/
public class AppraiseSummaryResultComposite extends Composite {
private Composite tableComposite;
private List<Appraise> appraises;
private List<AuthUser> authUsers;
private Map<AppraisedResultKey, AppraiseResult> appraiseResultMap;
private Map<String, AppraisedResult> appraisedResultMap;
private Label messageLabel;
/**
* @author chenxw
* @param parent
* @param style
*/
public AppraiseSummaryResultComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
Composite composite = new Composite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
GridLayout gl_evaluationComposite = new GridLayout(1, false);
gl_evaluationComposite.verticalSpacing = 0;
gl_evaluationComposite.horizontalSpacing = 0;
gl_evaluationComposite.marginHeight = 0;
gl_evaluationComposite.marginWidth = 0;
composite.setLayout(gl_evaluationComposite);
Composite composite_1 = new Composite(composite, SWT.NONE);
composite_1.setLayout(new GridLayout(1, false));
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
composite_1.setBackgroundImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/title_bg.png"));
messageLabel = new Label(composite_1, SWT.NONE);
messageLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
messageLabel.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
ESepator supllerSep = new ESepator(composite, SWT.HORIZONTAL);
supllerSep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
supllerSep.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
tableComposite = new Composite(composite, SWT.NONE);
tableComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
tableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
}
/**
* @Description: 刷新
* @author chenxw
* @param appraises
* @param users
* @param appraisedResults
*/
public void refresh(List<Appraise> appraises, List<AuthUser> users, List<AppraiseResult> appraiseResults, List<AppraisedResult> appraisedResults) {
this.appraises = appraises;
this.authUsers = users;
this.appraiseResultMap = initAppraiseResultMap(appraiseResults);
this.appraisedResultMap = initAppraisedResultMap(appraisedResults);
refreshAppraiseTable();
}
/**
* @param appraiser评价人(评价人角色)
* @param appraisesed 被评价人
*/
public void setMessage(String appraiser, String appraisesed) {
messageLabel.setText(appraiser +"对 [ " + appraisesed +" ] 的评价结果");
}
/**
* @Description: 初始化评价结果map
* @author chenxw
* @param appraiseResults
* @return
*/
private Map<AppraisedResultKey, AppraiseResult> initAppraiseResultMap(List<AppraiseResult> appraiseResults) {
if (Objects.isNull(appraiseResults)) {
return new HashMap<>();
}
return appraiseResults.stream().collect(Collectors.toMap(t -> new AppraisedResultKey(t.getAppraiseId(), t.getAppraiserId()), Function.identity()));
}
/**
* @Description: 初始化被评价人的结果map
* @author chenxw
* @param appraisedResults
* @return
*/
private Map<String, AppraisedResult> initAppraisedResultMap(List<AppraisedResult> appraisedResults) {
if (Objects.isNull(appraisedResults)) {
return new HashMap<>();
}
return appraisedResults.stream().collect(Collectors.toMap(AppraisedResult::getAppraiseId, Function.identity()));
}
/**
* @Description: 刷新评价表格
* @author chenxw
*/
private void refreshAppraiseTable() {
Arrays.stream(tableComposite.getChildren()).forEach(Control::dispose);
KTable kTable = new KTable(tableComposite, SWT.FULL_SELECTION | SWTX.AUTO_SCROLL | SWTX.EDIT_ON_KEY);
CommonKtableCModel model = new CommonKtableCModel(kTable, 1, 1, appraises.size(), authUsers.size() + 1);
model.setColumnWidth(0, 200);
model.setRowHeightRender(row -> Constants.ROW_HIGHT);
model.setCellContentRender(this::setCellContent);
FixedWrapCellRenderer fixedWrapCellRenderer = new FixedWrapCellRenderer();
TextWrapCellRenderer textWrapCellRenderer = new TextWrapCellRenderer();
model.setCellRender((row, col) -> model.isFixedCell(col, row) ? fixedWrapCellRenderer : textWrapCellRenderer);
model.setCellAlignmentRender((row, col) -> SWTX.ALIGN_VERTICAL_CENTER | SWTX.ALIGN_HORIZONTAL_CENTER);
kTable.setModel(model);
tableComposite.layout();
}
/**
* @Description: 设置单元格内容
* @author chenxw
* @param row
* @param col
* @return
*/
private String setCellContent(int row, int col) {
if (row == 0) {
if (col == 0) return "评价项";
if (col == authUsers.size() + 1) return "最终得分";
return authUsers.get(col - 1).getUserName();
}
if (col == 0) return appraises.get(row - 1).getName();
if (col == authUsers.size() + 1) return Optional.of(appraises.get(row - 1).getId())
.map(appraisedResultMap::get)
.map(AppraisedResult::getScore)
.map(ObjectUtils::buildScoreText)
.orElse("");
return Optional.of(new AppraisedResultKey(appraises.get(row - 1).getId(), authUsers.get(col - 1).getId()))
.map(appraiseResultMap::get)
.map(AppraiseResult::getScore)
.map(String::valueOf)
.orElse("");
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.step.appraise.composite.expert;
import java.util.List;
import java.util.Objects;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.composite.AppraiseComposite;
import com.gx.obe.step.appraise.enumeration.AppraiserEnum;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.step.composite.EvaluationComposite;
import com.gx.obe.util.utils.TerminalUtils;
import com.gx.obe.web.entity.auth.AuthUser;
public class AppraiseExpertComposite extends EvaluationComposite {
private AppraiseComposite appraiseComposite;
public AppraiseExpertComposite(Composite parent, int style) {
super(parent, style);
}
@Override
protected void createEvaluatoinComposite(Composite evaluatoinComposite) {
appraiseComposite = new AppraiseComposite(evaluatoinComposite, SWT.NONE) {
public void initAppraiseResult(AppraiseResult appraiseResult) {
appraiseResult.setTenderId(tenderProject.getId());
appraiseResult.setAppraiserId(curUser.getId());
}
};
}
@Override
protected void initButtonComposite() {
createEButton("一键满分", MouseListener.mouseUpAdapter(e -> appraiseComposite.fullMarks()));
super.initButtonComposite();
}
@Override
protected void refreshEvaluationResult() {
AppraiserEnum appraiserEnum = AppraiserEnum.getByTerminal(TerminalUtils.getTerminalType());
if (Objects.isNull(appraiserEnum)) {
return;
}
List<Appraise> appraises = AppraiseService.getAppraiseExpertList(appraiserEnum.getKey());
List<AuthUser> users = null;
switch (appraiserEnum) {
case EXPERT:
users = UserUtils.getExcludeCurExpertUserList(tenderProject.getId(), curUser.getId());
break;
case MANAGER:
users = UserUtils.getAllExpertUserList(tenderProject.getId());
break;
}
List<AppraiseResult> appraiseResults = AppraiseResultService.getAppraiserResultList(tenderProject.getId(), curUser.getId());
appraiseComposite.refresh(tenderProject, appraises, users, appraiseResults);
}
@Override
protected boolean saveEvaluationResult() {
return appraiseComposite.saveAppraiseResult();
}
@Override
protected String checkEvaluationResult() {
return appraiseComposite.checkAppraiseResult();
}
}
package com.gx.obe.step.appraise.composite.expert;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.utils.WidgetUtils;
import org.eclipse.swt.core.widgets.ELink;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.composite.AppraiseResultComposite;
import com.gx.obe.step.appraise.enumeration.AppraiserEnum;
import com.gx.obe.step.appraise.enumeration.SumTypeEnum;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.step.composite.EvaluationResultComposite;
import com.gx.obe.step.dialog.ReEvaluationConfirmDialog;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.expert.Expert;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseExpertResultComposite extends EvaluationResultComposite<String> {
private AppraiseResultComposite composite;
private AppraiseExpertResultsfComposite resultsfComposite;
private ELink forBackLink;
public AppraiseExpertResultComposite(Composite parent, int style) {
super(parent, style);
}
@Override
protected void createLinkComposite(Composite linkComposite) {
forBackLink = new ELink(linkComposite, SWT.NONE);
forBackLink.addMouseListener(MouseListener.mouseUpAdapter(e -> forBackAction()));
}
private void forBackAction() {
new ReEvaluationConfirmDialog(getShell(), evaluationStep, expertEvaluationStep).open();
}
@Override
protected void createLoadComposite(Composite load_composite) {}
@Override
protected void getEvaluationResult(Composite load_composite, Type type) {
forBackLink.setText("退回".concat(evaluationStep.getStepName()));
WidgetUtils.setControlVisible(forBackLink, false);
switch (type) {
case EXPERT:
composite = new AppraiseResultComposite(load_composite, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
break;
case OTHER:
resultsfComposite = new AppraiseExpertResultsfComposite(load_composite, SWT.NONE);
resultsfComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
break;
}
}
@Override
protected void refreshEvaluationResult(Expert expert) {
List<Appraise> appraises = AppraiseService.getAppraiseExpertList(AppraiserEnum.EXPERT.getKey());
List<AuthUser> users = UserUtils.getExcludeCurExpertUserList(tenderProject.getId(), expert.getUserId());
List<AppraiseResult> appraiseResults = AppraiseResultService.getAppraiserResultList(tenderProject.getId(), expert.getUserId());
composite.refresh(tenderProject, Optional.ofNullable(expert.getUser()).map(AuthUser :: getUserName).orElse("评价人"), appraises, users, appraiseResults);
}
@Override
protected void refreshEvaluationResult(String e) {
SumTypeEnum sumTypeEnum = SumTypeEnum.map.get(e);
WidgetUtils.setControlVisible(forBackLink, SumTypeEnum.MANAGER == sumTypeEnum);
resultsfComposite.refresh(tenderProject, sumTypeEnum);
}
@Override
protected void disposeEvaluationResult(Type type) {
switch (type) {
case EXPERT:
if (Objects.nonNull(composite)) composite.dispose();
composite = null;
break;
case OTHER:
if (Objects.nonNull(resultsfComposite))resultsfComposite.dispose();
resultsfComposite = null;
break;
}
}
@Override
protected boolean isDisposeEvaluationResult(Type type) {
switch (type) {
case EXPERT:
return Objects.isNull(composite);
case OTHER:
return Objects.isNull(resultsfComposite);
}
return false;
}
@Override
protected List<Expert> getEvaluationUserList(TenderProjectEntity tenderProject, EvaluationStep evaluationStep) {
return UserUtils.getAllExpertList(tenderProject.getId());
}
@Override
protected List<String> getOtherList() {
return SumTypeEnum.getKeyList();
}
@Override
protected String getOtherBtnName(String e) {
return SumTypeEnum.map.get(e).getValue();
}
}
package com.gx.obe.step.appraise.composite.expert;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.composite.AppraiseResultComposite;
import com.gx.obe.step.appraise.enumeration.AppraiserEnum;
import com.gx.obe.step.appraise.enumeration.SumTypeEnum;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseExpertResultsfComposite extends Composite {
private TenderProjectEntity tenderProject;
private SumTypeEnum sumTypeEnum;
private AppraiseExpertSummaryResultComposite summaryComposite;
private AppraiseExpertSummaryResultFinalRComposite summaryFinalRComposite;
private AppraiseResultComposite managerComposite;
/**
* @author chenxw
* @param parent
* @param style
*/
public AppraiseExpertResultsfComposite(Composite parent, int style) {
super(parent, style);
setLayout(new FillLayout(SWT.HORIZONTAL));
}
public void refresh(TenderProjectEntity tenderProject, SumTypeEnum sumTypeEnum) {
this.tenderProject = tenderProject;
this.sumTypeEnum = sumTypeEnum;
refreshAppraiseExpertResultsf();
}
private void refreshAppraiseExpertResultsf() {
if (isDisposeEvaluationResult()) {
disposeEvaluationResult();
getEvaluationResult();
layout();
}
refreshEvaluationResult();
}
private void refreshEvaluationResult() {
switch (sumTypeEnum) {
case SUMMARY:
summaryComposite.refresh(tenderProject);
break;
case FINAL:
summaryFinalRComposite.refresh(tenderProject);
break;
case MANAGER:
List<Appraise> appraises = AppraiseService.getAppraiseExpertList(AppraiserEnum.MANAGER.getKey());
List<AuthUser> users = UserUtils.getAllExpertUserList(tenderProject.getId());
List<AppraiseResult> appraiseResults = AppraiseResultService.getAppraiserResultList(tenderProject.getId(), tenderProject.getUserId());
managerComposite.refresh(tenderProject, "项目经理", appraises, users, appraiseResults);
break;
}
}
private void getEvaluationResult() {
switch (sumTypeEnum) {
case SUMMARY:
summaryComposite = new AppraiseExpertSummaryResultComposite(this, SWT.NONE);
break;
case FINAL:
summaryFinalRComposite = new AppraiseExpertSummaryResultFinalRComposite(this, SWT.NONE);
break;
case MANAGER:
managerComposite = new AppraiseResultComposite(this, SWT.NONE);
break;
}
}
private void disposeEvaluationResult() {
Arrays.stream(this.getChildren()).forEach(Control::dispose);
managerComposite = null;
summaryComposite = null;
summaryFinalRComposite = null;
}
private boolean isDisposeEvaluationResult() {
switch (sumTypeEnum) {
case SUMMARY:
return Objects.isNull(summaryComposite);
case FINAL:
return Objects.isNull(summaryFinalRComposite);
case MANAGER:
return Objects.isNull(managerComposite);
}
return false;
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.step.appraise.composite.expert;
import java.util.List;
import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import com.gx.obe.ColorConstants;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.bean.AppraisedResult;
import com.gx.obe.step.appraise.composite.AppraiseSummaryResultComposite;
import com.gx.obe.step.appraise.enumeration.AppraiserEnum;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.service.AppraisedResultService;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.swtdesigner.SWTResourceManager;
public class AppraiseExpertSummaryResultComposite extends Composite {
private Grid expertNameGrid;
private AppraiseSummaryResultComposite expertResultComposite;
private AppraiseSummaryResultComposite managerResultComposite;
private TenderProjectEntity tenderProject;
/**
* @author chenxw
* @param parent
* @param style
*/
public AppraiseExpertSummaryResultComposite(Composite parent, int style) {
super(parent, style);
setBackground(ColorConstants.SEP_LIGHT_COLOR);
GridLayout gridLayout = new GridLayout(3, false);
gridLayout.horizontalSpacing = 1;
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
Composite composite = new Composite(this, SWT.NONE);
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
GridLayout gl_composite = new GridLayout(1, false);
gl_composite.marginHeight = 0;
gl_composite.marginWidth = 0;
composite.setLayout(gl_composite);
composite.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1));
expertNameGrid = new Grid(composite, SWT.NONE);
expertNameGrid.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> selectExpertNameAction()));
GridData gd_grid = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_grid.widthHint = 150;
expertNameGrid.setLayoutData(gd_grid);
expertNameGrid.setItemHeight(35);
GridColumn gridColumn = new GridColumn(expertNameGrid, SWT.CENTER);
gridColumn.setWidth(100);
GridItem gridItem = new GridItem(expertNameGrid, SWT.NONE);
gridItem.setFont(SWTResourceManager.getFont("微软雅黑", 11, SWT.NORMAL));
gridItem.setText("New Row");
// Label toolv_sepator = new Label(this, SWT.NONE);
// toolv_sepator.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
// GridData gd_toolv_sepator = new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1);
// gd_toolv_sepator.widthHint = 10;
// toolv_sepator.setLayoutData(gd_toolv_sepator);
Composite composite_1 = new Composite(this, SWT.NONE);
GridLayout gl_composite_1 = new GridLayout(1, false);
gl_composite_1.verticalSpacing = 0;
gl_composite_1.marginHeight = 0;
gl_composite_1.marginWidth = 0;
composite_1.setLayout(gl_composite_1);
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
expertResultComposite = new AppraiseSummaryResultComposite(composite_1, SWT.NONE);
GridData gd_expertResultComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_expertResultComposite.heightHint = 100;
expertResultComposite.setLayoutData(gd_expertResultComposite);
ESepator supllerSep = new ESepator(composite_1, SWT.HORIZONTAL);
supllerSep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
supllerSep.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
managerResultComposite = new AppraiseSummaryResultComposite(composite_1, SWT.NONE);
GridData gd_managerResultComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_managerResultComposite.heightHint = 100;
managerResultComposite.setLayoutData(gd_managerResultComposite);
new Label(this, SWT.NONE);
}
public void refresh(TenderProjectEntity tenderProject) {
this.tenderProject = tenderProject;
refreshExpertNameGrid();
}
private void refreshExpertNameGrid() {
List<AuthUser> users = UserUtils.getAllExpertUserList(tenderProject.getId());
expertNameGrid.removeAll();
for (AuthUser authUser : users) {
GridItem gridItem = new GridItem(expertNameGrid, SWT.NONE);
gridItem.setText(authUser.getUserName());
gridItem.setFont(SWTResourceManager.getFont("微软雅黑", 11, SWT.NORMAL));
gridItem.setData(authUser);
}
expertNameGrid.getParent().layout();
if (users.isEmpty()) {
return;
}
expertNameGrid.setSelection(0);
selectExpertNameAction();
}
private void selectExpertNameAction() {
if (expertNameGrid.getSelectionCount() <= 0) {
return;
}
AuthUser authUser = (AuthUser) expertNameGrid.getItem(expertNameGrid.getSelectionIndex()).getData();
List<AppraiseResult> appraiseResults = AppraiseResultService.getAppraisedResultList(tenderProject.getId(), authUser.getId());
List<AppraisedResult> appraisedResults = AppraisedResultService.getAppraisedResultList(tenderProject.getId(), authUser.getId());
refreshExpertResultComposite(authUser, appraiseResults, appraisedResults);
refreshManagerResultComposite(authUser, appraiseResults, appraisedResults);
}
private void refreshExpertResultComposite(AuthUser appraisesedUser, List<AppraiseResult> appraiseResults, List<AppraisedResult> appraisedResults) {
List<Appraise> appraises = AppraiseService.getAppraiseExpertList(AppraiserEnum.EXPERT.getKey());
List<AuthUser> users = UserUtils.getExcludeCurExpertUserList(tenderProject.getId(), appraisesedUser.getId());
expertResultComposite.setMessage("专家小组", appraisesedUser.getUserName());
expertResultComposite.refresh(appraises, users, appraiseResults, appraisedResults);
}
private void refreshManagerResultComposite(AuthUser appraisesedUser, List<AppraiseResult> appraiseResults, List<AppraisedResult> appraisedResults) {
List<Appraise> appraises = AppraiseService.getAppraiseExpertList(AppraiserEnum.MANAGER.getKey());
List<AuthUser> users = UserUtils.getManagerUserList(tenderProject.getUserId());
managerResultComposite.setMessage("项目经理", appraisesedUser.getUserName());
managerResultComposite.refresh( appraises, users, appraiseResults, appraisedResults);
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.step.appraise.composite.expert;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import com.gx.obe.components.core.Constants;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraisedResult;
import com.gx.obe.step.appraise.bean.AppraisedTotalResult;
import com.gx.obe.step.appraise.bean.AppraisedResult.ResultKey;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.service.AppraisedResultService;
import com.gx.obe.step.appraise.service.AppraisedTotalResultService;
import com.gx.obe.step.appraise.utils.ObjectUtils;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.swtdesigner.SWTResourceManager;
import de.kupzog.ktable.KTable;
import de.kupzog.ktable.SWTX;
import de.kupzog.ktable.model.CommonKtableCModel;
import de.kupzog.ktable.renderers.FixedWrapCellRenderer;
import de.kupzog.ktable.renderers.TextWrapCellRenderer;
/**
* @Description: 评价界面
* @author chenxw
*/
public class AppraiseExpertSummaryResultFinalRComposite extends Composite {
private Composite tableComposite;
private List<Appraise> appraises;
private List<AuthUser> authUsers;
private Map<ResultKey, AppraisedResult> appraisedResultMap;
private Map<String, AppraisedTotalResult> appraisedTotalResultMap;
/**
* @author chenxw
* @param parent
* @param style
*/
public AppraiseExpertSummaryResultFinalRComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
Composite composite = new Composite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
GridLayout gl_evaluationComposite = new GridLayout(1, false);
gl_evaluationComposite.verticalSpacing = 0;
gl_evaluationComposite.horizontalSpacing = 0;
gl_evaluationComposite.marginHeight = 0;
gl_evaluationComposite.marginWidth = 0;
composite.setLayout(gl_evaluationComposite);
tableComposite = new Composite(composite, SWT.NONE);
tableComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
tableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
}
/**
* @Description: 刷新
* @author chenxw
* @param appraises
* @param users
* @param appraisedResults
*/
public void refresh(TenderProjectEntity tenderProject) {
this.appraises = AppraiseService.getAllAppraiseExpertList();
this.authUsers = UserUtils.getAllExpertUserList(tenderProject.getId());
this.appraisedResultMap = initAppraisedResultMap(AppraisedResultService.getAppraisedResultList(tenderProject.getId()));
this.appraisedTotalResultMap = initAppraisedTotalResultMap(AppraisedTotalResultService.getAppraisedTotalResult(tenderProject.getId()));
refreshAppraiseTable();
}
/**
* @Description: 初始化被评价人的结果map
* @author chenxw
* @param appraisedResults
* @return
*/
private Map<ResultKey, AppraisedResult> initAppraisedResultMap(List<AppraisedResult> appraisedResults) {
if (Objects.isNull(appraisedResults)) {
return new HashMap<>();
}
return appraisedResults.stream().collect(Collectors.toMap(t -> new ResultKey(t.getAppraiseId(), t.getAppraisedId()), Function.identity(), (u, v) -> {
throw new IllegalStateException(String.format("Duplicate key %s", u));
}));
}
/**
* @Description: 初始化被评价人的结果map
* @author chenxw
* @param appraisedResults
* @return
*/
private Map<String, AppraisedTotalResult> initAppraisedTotalResultMap(List<AppraisedTotalResult> appraisedTotalResults) {
if (Objects.isNull(appraisedTotalResults)) {
return new HashMap<>();
}
return appraisedTotalResults.stream().collect(Collectors.toMap(AppraisedTotalResult::getAppraisedId, Function.identity(), (u, v) -> {
throw new IllegalStateException(String.format("Duplicate key %s", u));
}));
}
/**
* @Description: 刷新评价表格
* @author chenxw
*/
private void refreshAppraiseTable() {
Arrays.stream(tableComposite.getChildren()).forEach(Control::dispose);
KTable kTable = new KTable(tableComposite, SWT.FULL_SELECTION | SWTX.AUTO_SCROLL | SWTX.EDIT_ON_KEY);
CommonKtableCModel model = new CommonKtableCModel(kTable, 1, 1, authUsers.size(), appraises.size() + 1);
model.setColumnWidth(0, 200);
model.setRowHeightRender(row -> Constants.ROW_HIGHT);
model.setCellContentRender(this::setCellContent);
FixedWrapCellRenderer fixedWrapCellRenderer = new FixedWrapCellRenderer();
TextWrapCellRenderer textWrapCellRenderer = new TextWrapCellRenderer();
model.setCellRender((row, col) -> model.isFixedCell(col, row) ? fixedWrapCellRenderer : textWrapCellRenderer);
model.setCellAlignmentRender((row, col) -> SWTX.ALIGN_VERTICAL_CENTER | SWTX.ALIGN_HORIZONTAL_CENTER);
kTable.setModel(model);
kTable.layout();
tableComposite.layout();
}
/**
* @Description: 设置单元格内容
* @author chenxw
* @param row
* @param col
* @return
*/
private String setCellContent(int row, int col) {
if (row == 0) {
if (col == 0) return "专家";
if (col == appraises.size() + 1) return "考核合计分值";
return appraises.get(col - 1).getName();
}
if (col == 0) return authUsers.get(row - 1).getUserName();
if (col == appraises.size() + 1) return Optional.of(authUsers.get(row - 1).getId()).map(appraisedTotalResultMap::get).map(AppraisedTotalResult::getScore).map(ObjectUtils::buildScoreText).orElse("");
return Optional.of(new ResultKey(appraises.get(col - 1).getId(), authUsers.get(row - 1).getId())).map(appraisedResultMap::get).map(AppraisedResult::getScore).map(ObjectUtils::buildScoreText).orElse("");
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.step.appraise.composite.manager;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.composite.AppraiseComposite;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.step.composite.EvaluationComposite;
import com.gx.obe.web.entity.auth.AuthUser;
public class AppraiseManagerComposite extends EvaluationComposite {
private AppraiseComposite appraiseComposite;
public AppraiseManagerComposite(Composite parent, int style) {
super(parent, style);
}
@Override
protected void createEvaluatoinComposite(Composite evaluatoinComposite) {
appraiseComposite = new AppraiseComposite(evaluatoinComposite, SWT.NONE) {
public void initAppraiseResult(AppraiseResult appraiseResult) {
appraiseResult.setTenderId(tenderProject.getId());
appraiseResult.setAppraiserId(curUser.getId());
}
};
}
@Override
protected void initButtonComposite() {
createEButton("一键满分", MouseListener.mouseUpAdapter(e -> appraiseComposite.fullMarks()));
super.initButtonComposite();
}
@Override
protected void refreshEvaluationResult() {
List<Appraise> appraises = AppraiseService.getAppraiseManagerList();
List<AuthUser> users = UserUtils.getManagerUserList(tenderProject.getUserId());
List<AppraiseResult> appraiseResults = AppraiseResultService.getAppraiserResultList(tenderProject.getId(), curUser.getId());
appraiseComposite.refresh(tenderProject, appraises, users, appraiseResults);
}
@Override
protected boolean saveEvaluationResult() {
return appraiseComposite.saveAppraiseResult();
}
@Override
protected String checkEvaluationResult() {
return appraiseComposite.checkAppraiseResult();
}
}
package com.gx.obe.step.appraise.composite.manager;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.composite.AppraiseResultComposite;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.step.composite.EvaluationResultComposite;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.expert.Expert;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseManagerResultComposite extends EvaluationResultComposite<String> {
private AppraiseResultComposite composite;
private AppraiseManagerSummaryResultComposite summaryComposite;
public AppraiseManagerResultComposite(Composite parent, int style) {
super(parent, style);
}
@Override
protected void createLinkComposite(Composite linkComposite) {}
@Override
protected void createLoadComposite(Composite load_composite) {}
@Override
protected void getEvaluationResult(Composite load_composite, Type type) {
switch (type) {
case EXPERT:
composite = new AppraiseResultComposite(load_composite, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
break;
case OTHER:
summaryComposite = new AppraiseManagerSummaryResultComposite(load_composite, SWT.NONE);
summaryComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
break;
}
}
@Override
protected void refreshEvaluationResult(Expert expert) {
List<Appraise> appraises = AppraiseService.getAppraiseManagerList();
List<AuthUser> users = UserUtils.getManagerUserList(tenderProject.getUserId());
List<AppraiseResult> appraiseResults = AppraiseResultService.getAppraiserResultList(tenderProject.getId(), expert.getUserId());
composite.refresh(tenderProject, Optional.ofNullable(expert.getUser()).map(AuthUser :: getUserName).orElse("评价人"), appraises, users, appraiseResults);
}
@Override
protected void refreshEvaluationResult(String e) {
summaryComposite.refresh(tenderProject);
}
@Override
protected void disposeEvaluationResult(Type type) {
switch (type) {
case EXPERT:
if (Objects.nonNull(composite)) composite.dispose();
composite = null;
break;
case OTHER:
if (Objects.nonNull(summaryComposite)) summaryComposite.dispose();
summaryComposite = null;
break;
}
}
@Override
protected boolean isDisposeEvaluationResult(Type type) {
switch (type) {
case EXPERT:
return Objects.isNull(composite);
case OTHER:
return Objects.isNull(summaryComposite);
}
return true;
}
@Override
protected List<Expert> getEvaluationUserList(TenderProjectEntity tenderProject, EvaluationStep evaluationStep) {
return UserUtils.getAllExpertList(tenderProject.getId());
}
@Override
protected List<String> getOtherList() {
return Stream.of("summary").collect(Collectors.toList());
}
@Override
protected String getOtherBtnName(String e) {
return "得分汇总";
}
}
package com.gx.obe.step.appraise.composite.manager;
import java.util.List;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.step.appraise.bean.AppraisedResult;
import com.gx.obe.step.appraise.composite.AppraiseSummaryResultComposite;
import com.gx.obe.step.appraise.service.AppraiseResultService;
import com.gx.obe.step.appraise.service.AppraiseService;
import com.gx.obe.step.appraise.service.AppraisedResultService;
import com.gx.obe.step.appraise.utils.UserUtils;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseManagerSummaryResultComposite extends AppraiseSummaryResultComposite {
public AppraiseManagerSummaryResultComposite(Composite parent, int style) {
super(parent, style);
}
public void refresh(TenderProjectEntity tenderProject) {
List<Appraise> appraises = AppraiseService.getAppraiseManagerList();
List<AuthUser> users = UserUtils.getAllExpertUserList(tenderProject.getId());
List<AppraiseResult> appraiseResults = AppraiseResultService.getAppraisedResultList(tenderProject.getId(), tenderProject.getUserId());
List<AppraisedResult> appraisedResults = AppraisedResultService.getAppraisedResultList(tenderProject.getId(), tenderProject.getUserId());
// AppraisedTotalResult appraisedTotalResult = AppraisedTotalResultService.getByAppraisedId(tenderProject.getId(), tenderProject.getUserId());
super.refresh(appraises, users, appraiseResults, appraisedResults);
// setMessage("考核合计分值:".concat(Optional.ofNullable(appraisedTotalResult).map(AppraisedTotalResult::getScore).map(ObjectUtils::buildScoreText).orElse("")), "项目经理");
setMessage("评标小组", "项目经理");
}
}
package com.gx.obe.step.appraise.dialog;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.message.Messages;
import com.gx.obe.step.dialog.EvaluationStepDialog;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseExpertStepDialog extends EvaluationStepDialog {
/**
* @author chenxw
* @param parentShell
*/
public AppraiseExpertStepDialog(Shell parentShell, TenderProjectEntity tenderProject, EvaluationStep evaluationStep) {
super(parentShell, tenderProject, evaluationStep);
}
@Override
protected String getTipsText() {
return "项目经理对专家进行评价及专家之间互相评价!";
}
@Override
protected String getStepNameDef() {
return Messages.Step_appraiseExpert;
}
@Override
protected String getStepType() {
return EvaluationStepEnum.APPRAISE_EXPERT;
}
@Override
protected void createFromArea(Composite fromComposite, Composite gridComposite) {}
@Override
protected void setFromData(EvaluationStep evaluationStep) {}
@Override
protected String valFromData() {
return null;
}
@Override
protected void getFromData(EvaluationStep evaluationStep) {}
/**
* Return the initial size of the dialog.
*/
@Override
protected Point getInitialSize() {
return new Point(460, 300);
}
}
package com.gx.obe.step.appraise.dialog;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.message.Messages;
import com.gx.obe.step.dialog.EvaluationStepDialog;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
public class AppraiseManagerStepDialog extends EvaluationStepDialog {
/**
* @author chenxw
* @param parentShell
*/
public AppraiseManagerStepDialog(Shell parentShell, TenderProjectEntity tenderProject, EvaluationStep evaluationStep) {
super(parentShell, tenderProject, evaluationStep);
}
@Override
protected String getTipsText() {
return "专家对项目经理进行评价!";
}
@Override
protected String getStepNameDef() {
return Messages.Step_appraiseManager;
}
@Override
protected String getStepType() {
return EvaluationStepEnum.APPRAISE_MANAGER;
}
@Override
protected void createFromArea(Composite fromComposite, Composite gridComposite) {}
@Override
protected void setFromData(EvaluationStep evaluationStep) {}
@Override
protected String valFromData() {
return null;
}
@Override
protected void getFromData(EvaluationStep evaluationStep) {}
/**
* Return the initial size of the dialog.
*/
@Override
protected Point getInitialSize() {
return new Point(460, 300);
}
}
package com.gx.obe.step.appraise.dialog;
import java.util.Optional;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.EButton;
import org.eclipse.swt.core.widgets.EDialog;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import com.gx.obe.ColorConstants;
import com.gx.obe.message.Messages;
public class InputCauseDialog extends EDialog {
private Label messageLabel;
private String cause;
private String textStr;
/**
* @author chenxw
* @param parentShell
* @param textStr
*/
public InputCauseDialog(Shell parentShell, String textStr) {
super(parentShell);
this.textStr = textStr;
}
public static String openGetCause(Shell parentShell, String textStr) {
InputCauseDialog causeDialog = new InputCauseDialog(parentShell, textStr);
causeDialog.open();
return causeDialog.cause;
}
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.setLayout(new GridLayout(1, false));
Composite composite = new Composite(container, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite composite_2 = new Composite(composite, SWT.NONE);
composite_2.setLayout(new GridLayout(1, false));
composite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Label lblNewLabel = new Label(composite_2, SWT.NONE);
lblNewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblNewLabel.setText("请输入打分原因说明:");
Label tipsLabel = new Label(composite_2, SWT.NONE | SWT.WRAP);
tipsLabel.setForeground(ColorConstants.NOTE_TIPS_COLOR);
tipsLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
tipsLabel.setText("得分低于评审项分值的80%必须输入原因说明!");
Composite composite_3 = new Composite(composite, SWT.NONE);
composite_3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_composite_3 = new GridLayout(1, false);
gl_composite_3.marginHeight = 10;
gl_composite_3.marginWidth = 10;
composite_3.setLayout(gl_composite_3);
Text text = new Text(composite_3, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
text.setText(Optional.ofNullable(textStr).orElse(""));
Composite composite_1 = new Composite(composite, SWT.NONE);
GridLayout gl_composite_1 = new GridLayout(2, false);
gl_composite_1.marginHeight = 0;
gl_composite_1.marginWidth = 0;
composite_1.setLayout(gl_composite_1);
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
messageLabel = new Label(composite_1, SWT.NONE);
messageLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
EButton btnNewButton = new EButton(composite_1, SWT.NONE);
btnNewButton.addMouseListener(MouseListener.mouseUpAdapter(e -> {
String textStr = text.getText();
if (textStr.isEmpty()) {
messageLabel.setText("打分原因说明不能为空!");
return;
}
cause = textStr;
close();
}));
GridData gd_btnNewButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_btnNewButton.heightHint = 30;
gd_btnNewButton.widthHint = 70;
btnNewButton.setLayoutData(gd_btnNewButton);
btnNewButton.setText(Messages.Button_ok);
return container;
}
/**
* Return the initial size of the dialog.
*/
@Override
protected Point getInitialSize() {
return new Point(397, 270);
}
}
package com.gx.obe.step.appraise.enumeration;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.util.utils.PredicateUtils;
/**
* @Description: 专家评价枚举
* @author chenxw
*/
public enum AppraiseExpertEnum {
/**
* 守时情况
*/
PUNCTUAL_SITUATION("01", "守时情况", 20, AppraiserEnum.MANAGER,
"1.按时参加且无早退现象,满分;\r\n" +
"2.未在指定时间到达集合地点,迟到不超过一个小时的,扣5分;\r\n" +
"3.未在指定时间到达集合地点,迟到超过一个小时但不超过两个小时的,扣10分;\r\n" +
"4.迟到两个小时以上,不得分;\r\n" +
"5.未经评标组长同意,提前早退的,不得分。"),
/**
* 评标公正性
*/
EVALUATION_FAIRNESS("02", "评标公正性", 20, AppraiserEnum.EXPERT,
"1.评标公正,满分;\r\n" +
"2.主观评审,评分为0分或满分,且做出的解释说明不合理的,扣10分;\r\n" +
"3.不按照招标文件载明的评标办法进行评分,此项得0分。"),
/**
* 评标纪律遵守情况
*/
EVALUATION_DISCIPLINE("03", "评标纪律遵守情况", 20, AppraiserEnum.MANAGER,
"1.自觉遵守维护评标过程纪律,满分;\r\n" +
"2.评标工作未结束,提出要先行离开,经说服后继续评审,扣5分;\r\n" +
"3.故意拖延评标时间,影响评标工作进度,扣5分;\r\n" +
"4.将通讯工具带入评标区的,扣5分;\r\n" +
"5.在评标过程中擅离职守,但未影响评标程序正常进行的,扣10分;\r\n" +
"6.评标工作未结束,提出要先行离开,不听劝说。此项得0分;\r\n" +
"7.干扰、影响其他评委独立打分,扣10分;\r\n" +
"8.与其他评委商量打分,此项得0分;\r\n" +
"9.不服从评标现场管理的其他行为,此项得0分;\r\n" +
"10.拒绝在评标结果上签字且不以书面形式详细说明原因的,此项得0分;\r\n" +
"11.将投标文件及与评标内容有关的资料以记录、摘抄、复印、拍照等任何形式带离评或泄漏出评标现场的,此项得0分;\r\n" +
"12.不配合监督部门依职权进行的调查的,此项得0分。"),
/**
* 专业能力
*/
PROFESSIONAL_ABILITY("04", "专业能力", 20, AppraiserEnum.EXPERT,
"1.精通所评专业,满分;\r\n" +
"2.评标报告或评标资料中非关键性内容表述错误的,扣5分;\r\n" +
"3.评标报告或评标资料中关键性内容表述错误的,扣20分;\r\n" +
"4.对所评专业只有基本常识的了解,评标业务能力较差,扣10分;\r\n" +
"5.无法胜任所评专业,此项得0分;\r\n" +
"6.未经认真评标研读招标文件和投标文件,直接在评分表上打分,扣10分。"),
/**
* 职业操守
*/
OCCUPATION_ETHICS("05", "职业操守", 20, AppraiserEnum.MANAGER,
"1.有基本的职业操守,满分;\r\n" +
"2.评标期间谈论与评标内容无关事项影响项目正常评审的,扣5分;\r\n" +
"3.个人职称、履历等信息不完整或发生变化,未及时补充或者修改完善影响评标专家抽取和评标工作的,扣5分;\r\n" +
"4.对评审劳务报酬提出不合理要求,扣10分;\r\n" +
"5.评标过程中,工作态度消极,影响评标工作进度的扣10分;\r\n" +
"6.故意拖延时间增加报酬,此项得0分;\r\n" +
"7.未依法履行保密义务,向他人透露对投标文件的评审和比较、中标候选人的推荐等与评标有关的其他情况的,此项得0分。");
private Appraise appraise;
private AppraiserEnum appraiser;
private AppraiseExpertEnum(String key, String name, int score, AppraiserEnum appraiser, String rule) {
this.appraiser = appraiser;
this.appraise = new Appraise(key, name, score, rule, appraiser.getKey());
}
public Appraise getAppraise() {
return appraise;
}
public AppraiserEnum getAppraiser() {
return appraiser;
}
/**
* @Description: 根据评价人获取枚举列表
* @author chenxw
* @param appraiser
* @return
*/
public static List<AppraiseExpertEnum> getListByAppraiser(AppraiserEnum appraiser) {
return Arrays.stream(values())
.filter(PredicateUtils.apply(AppraiseExpertEnum::getAppraiser, Predicate.isEqual(appraiser)))
.collect(Collectors.toList());
}
}
package com.gx.obe.step.appraise.enumeration;
import com.gx.obe.step.appraise.bean.Appraise;
/**
* @Description: 评价项目经理枚举
* @author chenxw
*/
public enum AppraiseManagerEnum {
/**
* 守时情况
*/
PUNCTUAL_SITUATION("01", "守时情况", 20,
"1.按时参加且无早退现象,满分;\r\n" +
"2.未在指定时间到达集合地点,迟到不超过一个小时的,扣5分;\r\n" +
"3.未在指定时间到达集合地点,迟到超过一个小时但不超过两个小时的,扣10分;\r\n" +
"4.迟到两个小时以上得0分;"),
/**
* 招标代理服务能力
*/
PROXY_SERVICE_DISCIPLINE("02", "招标代理服务能力", 20,
"1.根据评标过程专家反馈意见,招标文件编制质量不高,或未按照标准范本编制文件等造成评标工作未能顺利进行,一次扣5-10分;\r\n" +
"2.招标文件出现违反法律法规、违反集团公司制度的,扣10分;"),
/**
* 协调沟通能力
*/
COORDINATION_DISCIPLINE("03", "协调沟通能力", 20,
"1.评标环节衔接流畅,语言组织顺畅,信息传达明确,满分;\r\n" +
"2.必要环节不缺失,如有缺失,一项扣5分。\r\n" +
"3.是否存在发表违法、违规言论,如有此项得0分;"),
/**
* 业务能力
*/
PROFESSIONAL_ABILITY("04", "业务能力", 20,
"1.对《招投标法》及《实施条例》等国家行业、集团公司相关法律法规的熟悉掌握程度(酌情打分);\r\n" +
"2.对所从事招标业务知识的掌握程度(酌情打分);\r\n" +
"3.对招评标相关业务流程的熟练程度(酌情打分)。"),
/**
* 职业操守
*/
OCCUPATION_ETHICS("05", "职业操守", 20,
"1.有基本的职业操守,满分;\r\n" +
"2.评标期间谈论与评标内容无关事项影响项目正常评审的,扣5分;\r\n" +
"3.评标过程中,工作态度消极,影响评标工作进度的扣10分;\r\n" +
"4.未依法履行保密义务,向他人透露对投标文件的评审和比较、中标候选人的推荐等与评标有关的其他情况的,此项得0分。");
private Appraise appraise;
private AppraiseManagerEnum(String key, String name, int score, String rule) {
appraise = new Appraise(key, name, score, rule, AppraiserEnum.EXPERT.getKey());
}
public Appraise getAppraise() {
return appraise;
}
}
package com.gx.obe.step.appraise.enumeration;
import java.util.Map;
import java.util.Objects;
import com.gx.obe.util.utils.EnumUtils;
import com.gx.obe.util.utils.TerminalUtils;
/**
* @Description: 评价人
* @author chenxw
*/
public enum AppraiserEnum {
EXPERT("00"), MANAGER("01");
private String key;
private static Map<String, AppraiserEnum> map = EnumUtils.toMap(values(), AppraiserEnum::getKey);
private AppraiserEnum(String key) {
this.key = key;
}
public String getKey() {
return key;
}
public static AppraiserEnum getByKey(String key) {
return map.get(key);
}
public static AppraiserEnum getByTerminal(TerminalUtils terminalType) {
if (Objects.isNull(terminalType)) {
return null;
}
switch (terminalType) {
case TERMINAL_EVALUATION:
return EXPERT;
case TERMINAL_MANAGEMENT:
return MANAGER;
default:
return null;
}
}
}
\ No newline at end of file
package com.gx.obe.step.appraise.enumeration;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.gx.obe.util.utils.EnumUtils;
public enum SumTypeEnum {
MANAGER("manager", "项目经理"),
SUMMARY("summary", "得分汇总"),
FINAL("final", "最终得分汇总");
public static Map<String, SumTypeEnum> map = EnumUtils.toMap(values(), SumTypeEnum::getKey);
private String key;
private String value;
private SumTypeEnum(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
public static List<String> getKeyList() {
return Arrays.stream(values()).map(SumTypeEnum::getKey).collect(Collectors.toList());
}
}
\ No newline at end of file
package com.gx.obe.step.appraise.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gx.obe.step.appraise.bean.AppraiseResult;
import com.gx.obe.web.utils.ObeHttpUtils;
import com.gx.obe.web.vo.BatchSaveOrUpdateVo;
public class AppraiseResultService {
private static final String URL = "obeAppraiseResult";
/**
* @Description: 根据评价人获取评价结果数据列表
* @author chenxw
* @param tenderId
* @param appraiserId
* @return
*/
public static List<AppraiseResult> getAppraiseResultList(String tenderId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
return ObeHttpUtils.getList(URL.concat("/getAppraiseResultList"), param, AppraiseResult.class);
}
/**
* @Description: 根据评价人获取评价结果数据列表
* @author chenxw
* @param tenderId
* @param appraiserId
* @return
*/
public static List<AppraiseResult> getAppraiserResultList(String tenderId, String appraiserId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
param.put("appraiserId", appraiserId);
return ObeHttpUtils.getList(URL.concat("/getAppraiserResultList"), param, AppraiseResult.class);
}
/**
* @Description: 根据被评价人获取评价结果数据列表
* @author chenxw
* @param tenderId
* @param appraisedId
* @return
*/
public static List<AppraiseResult> getAppraisedResultList(String tenderId, String appraisedId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
param.put("appraisedId", appraisedId);
return ObeHttpUtils.getList(URL.concat("/getAppraisedResultList"), param, AppraiseResult.class);
}
/**
* @Description: 批量保存或更新
* @author chenxw
* @param entityList
* @param attributes
* @return
*/
public static boolean batchSaveOrUpdate(List<AppraiseResult> entityList, String... attributes) {
BatchSaveOrUpdateVo<AppraiseResult> t = new BatchSaveOrUpdateVo<>();
t.setEntityList(entityList);
t.setAttributes(attributes);
return ObeHttpUtils.post(URL.concat("/batchSaveOrUpdate"), t);
}
}
package com.gx.obe.step.appraise.service;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import com.gx.obe.step.appraise.bean.Appraise;
import com.gx.obe.step.appraise.enumeration.AppraiseExpertEnum;
import com.gx.obe.step.appraise.enumeration.AppraiseManagerEnum;
import com.gx.obe.step.appraise.enumeration.AppraiserEnum;
/**
* @Description: 评价项目经理服务
* @author chenxw
*/
public class AppraiseService {
/**
* @Description: 获取项目经理打分项
* @author chenxw
* @param appraiser
* @return
*/
public static List<Appraise> getAppraiseManagerList() {
return Arrays.stream(AppraiseManagerEnum.values())
.map(AppraiseManagerEnum::getAppraise)
.collect(Collectors.toList());
}
/**
* @Description: 根据评价人获取专家打分项
* @author chenxw
* @param appraiser
* @return
*/
public static List<Appraise> getAppraiseExpertList(String appraiser) {
return AppraiseExpertEnum.getListByAppraiser(AppraiserEnum.getByKey(appraiser))
.stream()
.map(AppraiseExpertEnum::getAppraise)
.collect(Collectors.toList());
}
/**
* @Description: 获取专家打分项
* @author chenxw
* @return
*/
public static List<Appraise> getAllAppraiseExpertList() {
return Arrays.stream(AppraiseExpertEnum.values())
.map(AppraiseExpertEnum::getAppraise)
.collect(Collectors.toList());
}
}
package com.gx.obe.step.appraise.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gx.obe.step.appraise.bean.AppraisedResult;
import com.gx.obe.web.utils.ObeHttpUtils;
public class AppraisedResultService {
private static final String URL = "obeAppraisedResult";
/**
* @Description: 根据被评价人获取评价结果数据列表
* @author chenxw
* @param tenderId
* @param appraisedId
* @return
*/
public static List<AppraisedResult> getAppraisedResultList(String tenderId, String appraisedId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
param.put("appraisedId", appraisedId);
return ObeHttpUtils.getList(URL.concat("/getAppraisedResultList"), param, AppraisedResult.class);
}
public static List<AppraisedResult> getAppraisedResultList(String tenderId) {
return getAppraisedResultList(tenderId, null);
}
}
package com.gx.obe.step.appraise.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gx.obe.step.appraise.bean.AppraisedTotalResult;
import com.gx.obe.web.utils.ObeHttpUtils;
public class AppraisedTotalResultService {
private static final String URL = "obeAppraisedTotalResult";
/**
* @Description: 根据被评价人获取评价结果数据列表
* @author chenxw
* @param tenderId
* @param appraisedId
* @return
*/
public static AppraisedTotalResult getByAppraisedId(String tenderId, String appraisedId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
param.put("appraisedId", appraisedId);
return ObeHttpUtils.getOne(URL.concat("/getByAppraisedId"), param, AppraisedTotalResult.class);
}
/**
* @Description: 获取评价结果数据列表
* @author chenxw
* @param tenderId
* @return
*/
public static List<AppraisedTotalResult> getAppraisedTotalResult(String tenderId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
return ObeHttpUtils.getList(URL.concat("/getAppraisedTotalResult"), param, AppraisedTotalResult.class);
}
}
package com.gx.obe.step.appraise.test;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class Test {
public static void main(String[] args) {
TargetInter inter = (TargetInter) getProxy(new Target1(), new Advise() {
public void before() {
System.out.println("before....");
}
public void after() {
System.out.println("after....");
}
});
// System.out.println(inter.add(12, 13));
inter.work("唱歌").work("跳舞").work("打游戏");
}
public static Object getProxy(Object target, Advise advise) {
return Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(), new InvocationHandler() {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
advise.before();
Object result = method.invoke(target, args);
advise.after();
return result == target ? proxy : result;
}
});
}
interface Advise {
void before();
void after();
}
interface TargetInter {
int add(int a, int b);
TargetInter work(String str);
}
static class Target implements TargetInter {
public int add(int a, int b) {
System.out.println("+++++++++++");
return a + b;
}
@Override
public TargetInter work(String str) {
System.out.println(str);
return this;
}
}
static class Target1 implements TargetInter {
public int add(int a, int b) {
System.out.println("+++++++++++");
return a + b;
}
@Override
public TargetInter work(String str) {
System.out.println(str);
return this;
}
}
}
package com.gx.obe.step.appraise.utils;
import java.util.function.Consumer;
import java.util.function.Function;
import org.eclipse.swt.widgets.Shell;
public class DialogUtils {
public static Consumer<Consumer<Shell>> getOpenConsumer(Shell parent) {
return new Consumer<Consumer<Shell>>() {
boolean open = true;
public void accept(Consumer<Shell> c) {
if (open) {
open = false;
c.accept(parent);
open = true;
}
}
};
}
public static <T> Function<Function<Shell, T>, T> getOpenFunction(Shell parent) {
return new Function<Function<Shell, T>, T>() {
boolean open = true;
@Override
public T apply(Function<Shell, T> f) {
T t = null;
if (open) {
open = false;
t = f.apply(parent);
open = true;
}
return t;
}
};
}
}
package com.gx.obe.step.appraise.utils;
import java.math.BigDecimal;
import java.util.Optional;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.ExceptionUtils;
public class ObjectUtils {
public static Integer toInteger(Object o) {
return toInteger(o, null);
}
public static Integer toInteger(Object o, Integer defaultValue) {
return ExceptionUtils.get(() -> Optional.ofNullable(o).map(Object::toString).map(Integer::valueOf).get(), defaultValue);
}
public static String toString(Object o) {
return toString(o, null);
}
public static String toString(Object o, String defaultValue) {
return ExceptionUtils.get(() -> Optional.ofNullable(o).map(Object::toString).get(), defaultValue);
}
public static String buildScoreText(BigDecimal score) {
return BigDecimalUtils.round(score, 2).toString();
}
}
package com.gx.obe.step.appraise.utils;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.gx.obe.components.core.enumeration.ExpertEnum;
import com.gx.obe.util.utils.PredicateUtils;
import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.expert.Expert;
import com.gx.obe.web.service.TenderProjectService;
import com.gx.obe.web.service.UserService;
import com.gx.obe.web.service.expert.ExpertService;
public class UserUtils {
private static ExpertService expertService = new ExpertService();
private static UserService userService = new UserService();
private static TenderProjectService tenderProjectService = new TenderProjectService();
public static List<Expert> getAllExpertList(String tenderId) {
return expertService.getExpertList(tenderId, ExpertEnum.ALL);
}
public static List<AuthUser> getAllExpertUserList(String tenderId) {
return expertService.getExpertList(tenderId, ExpertEnum.ALL).stream().map(Expert::getUser).collect(Collectors.toList());
}
public static List<AuthUser> getExcludeCurExpertUserList(String tenderId, String userId) {
return expertService.getExpertList(tenderId, ExpertEnum.ALL).stream().filter(PredicateUtils.apply(Expert::getUserId, Predicate.isEqual(userId).negate())).map(Expert::getUser).collect(Collectors.toList());
}
public static List<AuthUser> getManagerUserList(String userId) {
return Stream.of(userService.getById(userId)).collect(Collectors.toList());
}
public static AuthUser getManagerUser(String tenderId) {
return userService.getById(tenderProjectService.getById(tenderId).getUserId());
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="/org.eclipse.swt.core/lib/de.kupzog.KTable.jar"/>
<classpathentry kind="lib" path="/org.eclipse.swt.core/lib/org.eclipse.nebula.widgets.grid.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.gx.obe.step.price</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Price
Bundle-SymbolicName: com.gx.obe.step.price;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.gx.obe.step.price.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.gx.obe.utils;bundle-version="1.0.0",
com.gx.obe.components.core,
com.gx.obe.bidPriceTable,
com.gx.obe.step;bundle-version="1.0.0",
org.eclipse.swt.core,
com.gx.obe.business,
com.gx.obe.common.icons,
com.gx.obe.datastruct,
com.gx.obe.components.messages;bundle-version="1.0.0",
com.gx.obe.config;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: com.gx.obe.step.price
Bundle-ActivationPolicy: lazy
Export-Package: com.gx.obe.step.price.beans,
com.gx.obe.step.price.calculator,
com.gx.obe.step.price.composite,
com.gx.obe.step.price.creater,
com.gx.obe.step.price.dataset,
com.gx.obe.step.price.dialog,
com.gx.obe.step.price.enums,
com.gx.obe.step.price.utils
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
javacDefaultEncoding.. = UTF-8
\ No newline at end of file
package com.gx.obe.step.price;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.gx.obe.step.price"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
package com.gx.obe.step.price.beans;
import java.util.List;
/**
* @Description: 报价明细
* @author chenxw
*/
public class PriceDetail {
/**
* @Description: 报价明细编码
*/
private String detailCode;
/**
* @Description: 名称
*/
private String name;
/**
* @Description: 得分权重
*/
private String scoreWeight;
/**
* @Description: 供应商报价明细列表
*/
private List<SupplierPriceDetail> supplierPriceDetailList;
public String getDetailCode() {
return detailCode;
}
public void setDetailCode(String detailCode) {
this.detailCode = detailCode;
}
public String getScoreWeight() {
return scoreWeight;
}
public void setScoreWeight(String scoreWeight) {
this.scoreWeight = scoreWeight;
}
public List<SupplierPriceDetail> getSupplierPriceDetailList() {
return supplierPriceDetailList;
}
public void setSupplierPriceDetailList(List<SupplierPriceDetail> supplierPriceDetailList) {
this.supplierPriceDetailList = supplierPriceDetailList;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.gx.obe.step.price.beans;
import java.math.BigDecimal;
import java.util.List;
public class PriceDetailEvalResult {
/**
* @Description: 主键
*/
private String id;
/**
* @Description: 项目id
*/
private String tenderId;
/**
* @Description: 报价明细编码
*/
private String detailCode;
/**
* @Description: 基准价
*/
private BigDecimal basePrice;
/**
* @Description: 供应商价格明细评审结果
*/
private List<SupplierPriceDetailEvalResult> supplierPriceDetailEvalResultList;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
public String getDetailCode() {
return detailCode;
}
public void setDetailCode(String detailCode) {
this.detailCode = detailCode;
}
public BigDecimal getBasePrice() {
return basePrice;
}
public void setBasePrice(BigDecimal basePrice) {
this.basePrice = basePrice;
}
public List<SupplierPriceDetailEvalResult> getSupplierPriceDetailEvalResultList() {
return supplierPriceDetailEvalResultList;
}
public void setSupplierPriceDetailEvalResultList(List<SupplierPriceDetailEvalResult> supplierPriceDetailEvalResultList) {
this.supplierPriceDetailEvalResultList = supplierPriceDetailEvalResultList;
}
}
package com.gx.obe.step.price.beans;
import java.math.BigDecimal;
public class PriceResult {
/**
* @Description: 偏差率
*/
private BigDecimal deviationRate;
/**
* @Description: 得分
*/
private BigDecimal score;
public BigDecimal getDeviationRate() {
return deviationRate;
}
public void setDeviationRate(BigDecimal deviationRate) {
this.deviationRate = deviationRate;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
}
package com.gx.obe.step.price.beans;
/**
* @Description: 供应商报价明细
* @author chenxw
*/
public class SupplierPriceDetail {
/**
* @Description: 供应商id
*/
private String supplierId;
/**
* @Description: 评标价
*/
private String evalPrice;
public String getSupplierId() {
return supplierId;
}
public void setSupplierId(String supplierId) {
this.supplierId = supplierId;
}
public String getEvalPrice() {
return evalPrice;
}
public void setEvalPrice(String evalPrice) {
this.evalPrice = evalPrice;
}
}
package com.gx.obe.step.price.beans;
import java.math.BigDecimal;
/**
* @Description: 价格明细评审结果
* @author chenxw
*/
public class SupplierPriceDetailEvalResult {
/**
* @Description: 主键
*/
private String id;
/**
* @Description: 项目id
*/
private String tenderId;
/**
* @Description: 供应商id
*/
private String supplierId;
/**
* @Description: 报价明细编码
*/
private String detailCode;
/**
* @Description: 偏差率
*/
private BigDecimal deviationRate;
/**
* @Description: 得分
*/
private BigDecimal score;
/**
* @Description: 权重
*/
private BigDecimal weight;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
public String getSupplierId() {
return supplierId;
}
public void setSupplierId(String supplierId) {
this.supplierId = supplierId;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public String getDetailCode() {
return detailCode;
}
public void setDetailCode(String detailCode) {
this.detailCode = detailCode;
}
public BigDecimal getDeviationRate() {
return deviationRate;
}
public void setDeviationRate(BigDecimal deviationRate) {
this.deviationRate = deviationRate;
}
public BigDecimal getWeight() {
return weight;
}
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
}
package com.gx.obe.step.price.calculator;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.step.price.beans.PriceResult;
import com.gx.obe.step.price.beans.SupplierPriceDetail;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
import com.gx.obe.util.utils.UuidUtils;
/**
* @Description: 价格明细评审结果计算器
* @author chenxw
*/
public class PriceDetailEvalResultCalculator {
/**
* @Description: 项目id
*/
private final String tenderId;
/**
* @Description: 价格公式计算器
*/
private final PriceFormulaCalculator calculator;
/**
* @author chenxw
* @param tenderId
* @param calculator
*/
public PriceDetailEvalResultCalculator(String tenderId, PriceFormulaCalculator calculator) {
Objects.requireNonNull(tenderId);
Objects.requireNonNull(calculator);
this.tenderId = tenderId;
this.calculator = calculator;
}
/**
* @Description: 计算价格明细评审结果
* @author chenxw
* @param priceDetail
* @return
*/
public PriceDetailEvalResult calculate(PriceDetail priceDetail) {
Objects.requireNonNull(priceDetail);
BigDecimal weight = Optional.ofNullable(priceDetail.getScoreWeight()).map(BigDecimal::new).map(BigDecimal.valueOf(0.01)::multiply).orElse(BigDecimal.ZERO);
String detailCode = priceDetail.getDetailCode();
List<SupplierPriceDetail> spdList = priceDetail.getSupplierPriceDetailList();
calculator.init(getPriceList(spdList));
PriceDetailEvalResult pder = new PriceDetailEvalResult();
pder.setId(UuidUtils.getUUID());
pder.setTenderId(tenderId);
pder.setDetailCode(detailCode);
pder.setBasePrice(calculator.getBasePrice());
pder.setSupplierPriceDetailEvalResultList(spdList.stream().map(t -> createEvalResult(detailCode, weight, t)).collect(Collectors.toList()));
return pder;
}
/**
* @Description: 获取化价格列表
* @author chenxw
* @param spdList
* @return
*/
private List<BigDecimal> getPriceList(List<SupplierPriceDetail> spdList) {
return spdList.stream().map(SupplierPriceDetail::getEvalPrice).map(this::getMoneyFormat).collect(Collectors.toList());
}
/**
* @Description: 生成供应商价格明细评审结果
* @author chenxw
* @param detailCode
* @param priceDetail
* @param weight
* @return
*/
private SupplierPriceDetailEvalResult createEvalResult(String detailCode, BigDecimal weight, SupplierPriceDetail priceDetail) {
SupplierPriceDetailEvalResult spder = new SupplierPriceDetailEvalResult();
spder.setId(UuidUtils.getUUID());
spder.setTenderId(tenderId);
spder.setDetailCode(detailCode);
spder.setSupplierId(priceDetail.getSupplierId());
PriceResult priceResult = calculator.calculate(getMoneyFormat(priceDetail.getEvalPrice()));
spder.setDeviationRate(priceResult.getDeviationRate());
spder.setScore(priceResult.getScore());
spder.setWeight(weight);
return spder;
}
private BigDecimal getMoneyFormat(String moneyStr) {
return MoneyUtils.getMoneyFromText(moneyStr, calculator.getPriceUnit());
}
}
package com.gx.obe.step.price.calculator;
import java.math.BigDecimal;
import java.util.List;
import com.gx.obe.step.price.beans.PriceResult;
/**
* @Description: 价格结果计算器
* @author chenxw
*/
public interface PriceFormulaCalculator {
/**
* @Description: 初始化
* @author chenxw
* @param priceList
*/
void init(List<BigDecimal> priceList);
/**
* @Description: 获取基准价
* @author chenxw
* @return
*/
BigDecimal getBasePrice();
/**
* @Description: 计算价格结果
* @author chenxw
* @param price
* @return
*/
PriceResult calculate(BigDecimal price);
/**
* @Description: 获取价格单位
* @author chenxw
* @return
*/
String getPriceUnit();
}
package com.gx.obe.step.price.calculator;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
import com.gx.obe.config.ConfigConstants;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
import com.gx.obe.step.price.utils.FactorUtils;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
/**
* @Description: 供应商价格评审结果计算器
* @author chenxw
*/
public class SupplierPriceEvalResultCalculator {
private final String tenderId;
private final String stepId;
private final String userId;
private final EvaluationFactor evaluationFactor;
/**
* @Description: 计算最终得分函数
*/
private final Function<BigDecimal, BigDecimal> calcuateFinalScoreFun;
/**
* @Description: 供应商总分计算器
*/
private SupplierTotalScoreCalculator supplierTotalScoreCalculator;
/**
* @author chenxw
* @param tenderId
* @param stepId
* @param userId
* @param evaluationFactor
*/
public SupplierPriceEvalResultCalculator(String tenderId, String stepId, String userId, EvaluationFactor evaluationFactor) {
this.tenderId = tenderId;
this.stepId = stepId;
this.userId = userId;
this.evaluationFactor = evaluationFactor;
Objects.requireNonNull(tenderId);
Objects.requireNonNull(stepId);
Objects.requireNonNull(userId);
Objects.requireNonNull(evaluationFactor);
this.calcuateFinalScoreFun = FactorUtils.getRealWeight(evaluationFactor.getFactorFinalWeight())::multiply;
this.supplierTotalScoreCalculator = SupplierTotalScoreCalculatorFactory.create(PropertiesUtils.getProperty(ConfigConstants.SUPPLIER_TOTAL_SCORE_CALCULATE_TYPE));
}
/**
* @author chenxw
* @Description: 计算价格指标评审结果(明细汇总结果)
* @param supplierId
* @param supplierPriceDetailEvalResultList
* @return
*/
public EvaluationFactorResult calculate(String supplierId, List<SupplierPriceDetailEvalResult> supplierPriceDetailEvalResultList) {
Objects.requireNonNull(supplierId);
CollectionUtils.notNull(supplierPriceDetailEvalResultList);
CollectionUtils.notContainNull(supplierPriceDetailEvalResultList);
EvaluationFactorResult efr = new EvaluationFactorResult();
efr.setId(UuidUtils.getUUID());
efr.setTenderId(tenderId);
efr.setStepId(stepId);
efr.setUserId(userId);
efr.setSupplierId(supplierId);
efr.setFactorId(evaluationFactor.getId());
efr.setFactorName(evaluationFactor.getFactorName());
BigDecimal score = supplierTotalScoreCalculator.calculate(supplierPriceDetailEvalResultList);
efr.setEvaluationScore(score);
efr.setEvaluationFinalScore(calcuateFinalScoreFun.apply(score));
return efr;
}
}
package com.gx.obe.step.price.calculator;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
import com.gx.obe.step.price.utils.BigDecimalUtils;
/**
* @Description: 供应商价格总分通过各项明细得分的平均分来计算
* @author chenxw
*/
public class SupplierTotalScoreAverageCalculator implements SupplierTotalScoreCalculator {
@Override
public BigDecimal calculate(List<SupplierPriceDetailEvalResult> supplierPriceDetailEvalResultList) {
return BigDecimalUtils.average(supplierPriceDetailEvalResultList.stream().map(SupplierPriceDetailEvalResult::getScore).collect(Collectors.toList()));
}
}
package com.gx.obe.step.price.calculator;
import java.math.BigDecimal;
import java.util.List;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
/**
* @Description: 供应商价格总分计算器
* @author chenxw
*/
public interface SupplierTotalScoreCalculator {
/**
* @Description: 计算
* @author chenxw
* @param supplierPriceDetailEvalResultList
* @return
*/
BigDecimal calculate(List<SupplierPriceDetailEvalResult> supplierPriceDetailEvalResultList);
}
package com.gx.obe.step.price.calculator;
/**
* @Description: 供应商价格总分计算器工厂
* @author chenxw
*/
public class SupplierTotalScoreCalculatorFactory {
private static final String AVERAGE = "average";
private static final String WEIGHTED = "weighted";
/**
* @Description: 创建总分计算器
* @author chenxw
* @param type 计算类型
* @return
*/
public static SupplierTotalScoreCalculator create(String type) {
switch (type) {
case AVERAGE:
return new SupplierTotalScoreAverageCalculator();
case WEIGHTED:
return new SupplierTotalScoreWeightedCalculator();
default:
return new SupplierTotalScoreAverageCalculator();
}
}
}
package com.gx.obe.step.price.calculator;
import java.math.BigDecimal;
import java.util.List;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
/**
* @Description: 供应商价格总分通过各项明细得分的权重占比来计算
* @author chenxw
*/
public class SupplierTotalScoreWeightedCalculator implements SupplierTotalScoreCalculator {
@Override
public BigDecimal calculate(List<SupplierPriceDetailEvalResult> supplierPriceDetailEvalResultList) {
return supplierPriceDetailEvalResultList.stream().reduce(BigDecimal.ZERO, this::accumulator, BigDecimal::add);
}
/**
* @Description: 计算权重后得分并累计
* @author chenxw
* @param bigDecimal
* @param result
* @return
*/
private BigDecimal accumulator(BigDecimal bigDecimal, SupplierPriceDetailEvalResult result) {
return bigDecimal.add(result.getScore().multiply(result.getWeight()));
}
}
package com.gx.obe.step.price.composite;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
import com.gx.obe.step.price.calculator.PriceDetailEvalResultCalculator;
import com.gx.obe.step.price.calculator.PriceFormulaCalculator;
import com.gx.obe.step.price.calculator.SupplierPriceEvalResultCalculator;
import com.gx.obe.step.price.service.PriceDetailEvalResultService;
import com.gx.obe.step.price.service.PriceDetailService;
import com.gx.obe.step.price.table.SupplierTreeTable;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.SupplierService;
import com.gx.obe.web.service.evaluation.EvaluationFactorResultService;
import de.kupzog.ktable.SWTX;
/**
* @Description: 报价明细评审界面
* @author chenxw
*/
public class PriceDetailComposite extends Composite {
private final SupplierService supplierService = new SupplierService();
private final EvaluationFactorResultService evaluationFactorResultService = new EvaluationFactorResultService();
/**
* @Description: 项目id
*/
private String tenderId;
/**
* @Description: 用户id
*/
private String userId;
/**
* @Description: 项目规则
*/
private TenderProjectRuleEntity projectRule;
/**
* @Description: 评审步骤
*/
private EvaluationStep evaluationStep;
/**
* @Description: 评审指标
*/
private EvaluationFactor evaluationFactor;
/**
* @Description: 供应商列表
*/
private List<Supplier> supplierList;
/**
* @Description: 价格公式计算器
*/
private PriceFormulaCalculator calculator;
/**
* @Description: 价格明细列表
*/
private List<PriceDetail> priceDetailList;
/**
* @Description: 价格明细评审结果列表
*/
private List<PriceDetailEvalResult> evalResultList;
/**
* @Description: 价格指标评审结果列表(明细汇总结果)
*/
private List<EvaluationFactorResult> factorResultList;
/**
* @Description: 表格界面
*/
private Composite tableComposite;
/**
* @author chenxw
* @param parent
* @param style
*/
public PriceDetailComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
tableComposite = new Composite(this, SWT.NONE);
tableComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
tableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
}
/**
* @Description: 刷新
* @author chenxw
* @param tenderId
* @param supplierList
* @param calculator
*/
public void refresh(String tenderId, String userId, TenderProjectRuleEntity projectRule, EvaluationStep evaluationStep, EvaluationFactor evaluationFactor) {
this.tenderId = tenderId;
this.userId = userId;
this.projectRule = projectRule;
this.evaluationStep = evaluationStep;
this.evaluationFactor = evaluationFactor;
this.supplierList = supplierService.getEvaluationStepSupplierList(tenderId, evaluationStep);
refreshPriceDetailList();
refreshEvalResultList();
refreshTable();
}
/**
* @Description: 设置计算器
* @author chenxw
* @param calculator
*/
public void setCalculator(PriceFormulaCalculator calculator) {
this.calculator = calculator;
}
/**
* @Description: 保存评审结果方法
* @author chenxw
* @return
*/
public boolean saveEvaluationResult() {
return PriceDetailEvalResultService.saveEvaluationResult(tenderId, evaluationStep.getId(), evaluationFactor.getId(), userId, evalResultList, factorResultList);
}
/**
* @Description: 刷新报价明细列表
* @author chenxw
*/
private void refreshPriceDetailList() {
if (Objects.isNull(evaluationFactor)) {
return;
}
priceDetailList = PriceDetailService.getPriceDetailList(tenderId, evaluationFactor.getBidPriceCode());
}
/**
* @Description: 刷新报价明细评审结果列表
* @author chenxw
*/
private void refreshEvalResultList() {
if (CollectionUtils.isNull(supplierList) || CollectionUtils.isNull(priceDetailList)) {
return;
}
// 如果当前步骤已经完成评审评审结果数据就从数据库里查询
if (CommonEnum.COMPLETE.equals(evaluationStep.getStepStatus())) {
evalResultList = PriceDetailEvalResultService.getPriceDetailEvalResultList(tenderId);
factorResultList = evaluationFactorResultService.getEvaluationFactorResultList(tenderId, evaluationStep.getId(), evaluationFactor.getId(), userId);
return;
}
if (Objects.isNull(calculator)) {
return;
}
// 获取价格明细评审结果计算器
PriceDetailEvalResultCalculator priceDetailEvalResultCalculator = new PriceDetailEvalResultCalculator(tenderId, calculator);
// 计算价格明细评审结果
evalResultList = priceDetailList.stream().map(priceDetailEvalResultCalculator::calculate).collect(Collectors.toList());
// 计算价格指标评审结果(明细汇总结果)
factorResultList = supplierList.stream().map(Supplier::getId).map(createEvaluationFactorResult()).collect(Collectors.toList());
}
/**
* @Description: 生成价格指标评审结果(明细汇总结果)
* @author chenxw
* @return
*/
private Function<String, EvaluationFactorResult> createEvaluationFactorResult() {
// 获取供应商价格评审结果计算器
SupplierPriceEvalResultCalculator supplierPriceEvalResultCalculator = new SupplierPriceEvalResultCalculator(tenderId, evaluationStep.getId(), userId, evaluationFactor);
// 以供应商为维度分组
Map<String, List<SupplierPriceDetailEvalResult>> supplierPriceDetailEvalResultListMap = evalResultList.stream()
.map(PriceDetailEvalResult::getSupplierPriceDetailEvalResultList)
.map(List::stream).flatMap(Function.identity())
.collect(Collectors.groupingBy(SupplierPriceDetailEvalResult::getSupplierId));
return t -> supplierPriceEvalResultCalculator.calculate(t, supplierPriceDetailEvalResultListMap.get(t));
}
/**
* @Description: 刷新价格明细评审表格
* @author chenxw
*/
private void refreshTable() {
Arrays.stream(tableComposite.getChildren()).forEach(Control::dispose);
new SupplierTreeTable(tableComposite, SWTX.AUTO_SCROLL | SWT.FULL_SELECTION | SWTX.EDIT_ON_KEY | SWTX.FILL_WITH_LASTCOL, projectRule, supplierList, priceDetailList, evalResultList, factorResultList);
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.step.price.creater;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.components.core.enumeration.EvaluationFactorEnum;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.components.core.enumeration.PriceReviewTypeEnum;
import com.gx.obe.datastruct.tree.Forest;
import com.gx.obe.message.Messages;
import com.gx.obe.step.price.enums.PriceDetailTableColEnum;
import com.gx.obe.step.price.utils.FactorUtils;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
public class DefaultPriceEvalStepCreater {
private String tenderId;
private Map<Boolean, List<EvaluationFactor>> priceFactorListMap;
public DefaultPriceEvalStepCreater(String tenderId, List<EvaluationFactor> priceFactorList) {
this.tenderId = tenderId;
this.priceFactorListMap = new Forest<>(priceFactorList).getLeafList().stream().collect(Collectors.partitioningBy(t -> PriceDetailTableColEnum.contain(t.getBidPriceCode(), PriceDetailTableColEnum.TypeEnum.PRICE)));
}
public List<PriceEvalStep> createSingle() {
List<PriceEvalStep> evalStepList = new ArrayList<>();
createDetail(evalStepList);
List<EvaluationFactor> evaluationFactorList = priceFactorListMap.get(false);
if (!evaluationFactorList.isEmpty()) {
PriceEvalStep evalStep = create();
evalStep.getPriceStep().setStepName(Messages.Step_price);
evalStep.getPriceStep().setScore(evaluationFactorList.stream().map(t -> t.getFactorScore()).reduce(null, BigDecimalUtils::add));
evalStep.getPriceStep().setWeight(evaluationFactorList.stream().map(this::getPriceStepWeight).reduce(null, BigDecimalUtils::add));
evalStep.getPriceStep().setEvaluationParam(EvaluationStepEnum.PRICE_REVIEW_TYPE, PriceReviewTypeEnum.PRICE);
evalStep.getFactorList().addAll(evaluationFactorList);
evalStepList.add(evalStep);
}
return evalStepList;
}
public List<PriceEvalStep> createMulty() {
List<PriceEvalStep> evalStepList = new ArrayList<>();
createDetail(evalStepList);
for (EvaluationFactor evaluationFactor : priceFactorListMap.get(false)) {
PriceEvalStep evalStep = create();
evalStep.getPriceStep().setStepName(evaluationFactor.getFactorName());
evalStep.getPriceStep().setScore(evaluationFactor.getFactorScore());
evalStep.getPriceStep().setWeight(getPriceStepWeight(evaluationFactor));
evalStep.getPriceStep().setEvaluationParam(EvaluationStepEnum.PRICE_REVIEW_TYPE, PriceReviewTypeEnum.PRICE);
evalStep.getFactorList().add(evaluationFactor);
evalStepList.add(evalStep);
}
return evalStepList;
}
private void createDetail(List<PriceEvalStep> evalStepList) {
for (EvaluationFactor evaluationFactor : priceFactorListMap.get(true)) {
PriceEvalStep evalStep = create();
evalStep.getPriceStep().setStepName(evaluationFactor.getFactorName());
evalStep.getPriceStep().setScore(evaluationFactor.getFactorScore());
evalStep.getPriceStep().setWeight(getPriceStepWeight(evaluationFactor));
evalStep.getPriceStep().setEvaluationParam(EvaluationStepEnum.PRICE_REVIEW_TYPE, PriceReviewTypeEnum.DETAIL);
evalStep.getFactorList().add(evaluationFactor);
evalStepList.add(evalStep);
}
}
private PriceEvalStep create() {
EvaluationStep priceStep = new EvaluationStep();
List<EvaluationFactor> factorList = new ArrayList<>();
priceStep.setId(UuidUtils.getUUID());
priceStep.setTenderId(tenderId);
priceStep.setStepType(EvaluationStepEnum.PRICE);
priceStep.setFilterType(EvaluationStepEnum.FILTER_NO);
priceStep.setStepStatus(CommonEnum.NOT_START);
priceStep.setEvalBidType(EvaluationFactorEnum.EVAL_BID_PRICE);
priceStep.setRoleType(EvaluationStepEnum.EXPERT_LEADER);
PriceEvalStep priceEvalStep = new PriceEvalStep();
priceEvalStep.setPriceStep(priceStep);
priceEvalStep.setFactorList(factorList);
return priceEvalStep;
}
private BigDecimal getPriceStepWeight(EvaluationFactor evaluationFactor) {
return evaluationFactor.getFactorScore().multiply(FactorUtils.getRealWeight(evaluationFactor.getFactorFinalWeight()));
}
}
package com.gx.obe.step.price.creater;
import java.util.List;
import java.util.stream.Collectors;
import com.gx.obe.business.entity.EvaluationStepFactor;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
public class PriceEvalStep {
private EvaluationStep priceStep;
private List<EvaluationFactor> factorList;
public EvaluationStep getPriceStep() {
return priceStep;
}
public void setPriceStep(EvaluationStep priceStep) {
this.priceStep = priceStep;
}
public List<EvaluationFactor> getFactorList() {
return factorList;
}
public void setFactorList(List<EvaluationFactor> factorList) {
this.factorList = factorList;
}
public List<EvaluationStepFactor> getEvaluationStepFactorList() {
return factorList.stream().map(t -> {
EvaluationStepFactor nodeFactor = new EvaluationStepFactor();
nodeFactor.setId(UuidUtils.getUUID());
nodeFactor.setStepId(priceStep.getId());
nodeFactor.setFactorId(t.getId());
nodeFactor.setTenderId(t.getTenderId());
return nodeFactor;
}).collect(Collectors.toList());
}
}
package com.gx.obe.step.price.creater;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.components.core.enumeration.EvaluationFactorEnum;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.components.core.enumeration.PriceReviewTypeEnum;
import com.gx.obe.datastruct.tree.Forest;
import com.gx.obe.step.price.enums.PriceDetailTableColEnum;
import com.gx.obe.step.price.utils.FactorUtils;
import com.gx.obe.util.utils.AssertUtils;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
public class PriceEvalStepCreater {
private int priceEvalStepCount;
private List<EvaluationStep> priceEvalStepList;
private List<EvaluationStep> priceDetailEvalStepList;
private Map<Boolean, List<EvaluationFactor>> priceFactorListMap;
private String tenderId;
public PriceEvalStepCreater(String tenderId, List<EvaluationStep> priceStepList, List<EvaluationFactor> factorList) {
this.tenderId = tenderId;
this.priceEvalStepList = priceStepList.stream().filter(t -> PriceReviewTypeEnum.PRICE.equals(t.getEvaluationParamByKey(EvaluationStepEnum.PRICE_REVIEW_TYPE))).collect(Collectors.toList());
this.priceDetailEvalStepList = priceStepList.stream().filter(t -> PriceReviewTypeEnum.DETAIL.equals(t.getEvaluationParamByKey(EvaluationStepEnum.PRICE_REVIEW_TYPE))).collect(Collectors.toList());
this.priceFactorListMap = new Forest<>(factorList).getLeafList().stream().collect(Collectors.partitioningBy(t -> PriceDetailTableColEnum.contain(t.getBidPriceCode(), PriceDetailTableColEnum.TypeEnum.PRICE)));
this.priceEvalStepCount = priceEvalStepList.size();
AssertUtils.isTrue(priceEvalStepCount <= priceFactorListMap.get(false).size());
AssertUtils.isTrue(priceDetailEvalStepList.size() == priceFactorListMap.get(true).size());
}
public PriceEvalStep create(EvaluationStep modelEvaluationStep) {
Objects.requireNonNull(modelEvaluationStep);
EvaluationStep priceStep = new EvaluationStep();
List<EvaluationFactor> factorList = new ArrayList<>();
priceStep.setId(UuidUtils.getUUID());
String priceReviewType = modelEvaluationStep.getEvaluationParamByKey(EvaluationStepEnum.PRICE_REVIEW_TYPE);
if (PriceReviewTypeEnum.PRICE.equals(priceReviewType)) {
List<EvaluationFactor> evaluationFactorList;
if (priceEvalStepCount == 1) {
evaluationFactorList = priceFactorListMap.get(false);
priceStep.setStepName(modelEvaluationStep.getStepName());
} else {
evaluationFactorList = new ArrayList<>();
evaluationFactorList.add(priceFactorListMap.get(false).get(0));
priceStep.setStepName(evaluationFactorList.get(0).getFactorName());
}
priceStep.setScore(evaluationFactorList.stream().map(t -> t.getFactorScore()).reduce(null, BigDecimalUtils::add));
priceStep.setWeight(evaluationFactorList.stream().map(this::getPriceStepWeight).reduce(null, BigDecimalUtils::add));
factorList.addAll(evaluationFactorList);
priceEvalStepList.remove(modelEvaluationStep);
priceFactorListMap.get(false).removeAll(evaluationFactorList);
priceEvalStepCount--;
} else if (PriceReviewTypeEnum.DETAIL.equals(priceReviewType)) {
EvaluationFactor evaluationFactor = priceFactorListMap.get(true).get(0);
priceStep.setStepName(evaluationFactor.getFactorName());
priceStep.setScore(evaluationFactor.getFactorScore());
priceStep.setWeight(getPriceStepWeight(evaluationFactor));
factorList.add(evaluationFactor);
priceDetailEvalStepList.remove(modelEvaluationStep);
priceFactorListMap.get(true).remove(evaluationFactor);
}
priceStep.setTenderId(tenderId);
priceStep.setStepType(EvaluationStepEnum.PRICE);
priceStep.setFilterType(EvaluationStepEnum.FILTER_NO);
priceStep.setStepStatus(CommonEnum.NOT_START);
priceStep.setEvalBidType(EvaluationFactorEnum.EVAL_BID_PRICE);
priceStep.setParams(modelEvaluationStep.getParams());
priceStep.setRoleType(modelEvaluationStep.getRoleType());
PriceEvalStep priceEvalStep = new PriceEvalStep();
priceEvalStep.setPriceStep(priceStep);
priceEvalStep.setFactorList(factorList);
return priceEvalStep;
}
private BigDecimal getPriceStepWeight(EvaluationFactor evaluationFactor) {
return evaluationFactor.getFactorScore().multiply(FactorUtils.getRealWeight(evaluationFactor.getFactorFinalWeight()));
}
}
package com.gx.obe.step.price.dataset;
import java.math.BigDecimal;
public class PriceDetailDto {
private String detailId;
private String detailCode;
private BigDecimal basePrice;
public String getDetailId() {
return detailId;
}
public void setDetailId(String detailId) {
this.detailId = detailId;
}
public String getDetailCode() {
return detailCode;
}
public void setDetailCode(String detailCode) {
this.detailCode = detailCode;
}
public BigDecimal getBasePrice() {
return basePrice;
}
public void setBasePrice(BigDecimal basePrice) {
this.basePrice = basePrice;
}
}
package com.gx.obe.step.price.dataset;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.gx.obe.business.entity.SupplierEvaluationStep;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.components.core.enumeration.PriceReviewTypeEnum;
import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.step.price.beans.SupplierPriceDetail;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
import com.gx.obe.step.price.service.PriceDetailEvalResultService;
import com.gx.obe.step.price.service.PriceDetailService;
import com.gx.obe.step.price.utils.MapUtils;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.service.SupplierEvaluationStepService;
import com.gx.obe.web.service.SupplierService;
import com.gx.obe.web.service.evaluation.EvaluationFactorService;
import com.gx.obe.web.service.evaluation.EvaluationStepService;
/**
* @Description: 价格明细评审结果数据集
* @author chenxw
*/
public class PriceDetailEvalResultDo {
private final EvaluationStepService evaluationStepService = new EvaluationStepService();
private final SupplierService supplierService = new SupplierService();
private final SupplierEvaluationStepService supplierEvaluationStepService = new SupplierEvaluationStepService();
private final EvaluationFactorService evaluationFactorService = new EvaluationFactorService();
private List<SupplierDto> supplierDtoList;
private List<PriceDetailDto> priceDetailDtoList;
private List<SubCrossData> subCrossDataList;
private String tenderId;
private String priceUnit;
/**
* @author chenxw
* @param tenderId
*/
public PriceDetailEvalResultDo(String tenderId, String priceUnit) {
this.tenderId = tenderId;
this.priceUnit = priceUnit;
init();
}
private void init() {
List<EvaluationStep> priceEvalStepList = evaluationStepService.getEvaluationStepListByType(tenderId, EvaluationStepEnum.PRICE);
if (CollectionUtils.isNull(priceEvalStepList)) {
return;
}
EvaluationStep priceDetailEvalStep = priceEvalStepList.stream().filter(t -> PriceReviewTypeEnum.DETAIL.equals(t.getEvaluationParamByKey(EvaluationStepEnum.PRICE_REVIEW_TYPE))).findAny().orElse(null);
if (Objects.isNull(priceDetailEvalStep)) {
return;
}
initSupplierDtoList(priceDetailEvalStep);
initPriceDetailEvalResult(priceDetailEvalStep);
}
/**
* @Description: 初始化供应商信息列表
* @author chenxw
* @param tenderId
* @param priceDetailEvalStep
*/
private void initSupplierDtoList(EvaluationStep priceDetailEvalStep) {
List<Supplier> supplierList = supplierService.getEvaluationStepSupplierList(tenderId, priceDetailEvalStep);
if (CollectionUtils.isNull(supplierList)) {
return;
}
List<SupplierEvaluationStep> supplierEvaluationStepList = Optional.ofNullable(supplierEvaluationStepService.getSupplierEvaluationStepByTenderIdAndStepId(tenderId, priceDetailEvalStep.getId())).orElseGet(ArrayList::new);
Map<String, SupplierEvaluationStep> supplierEvalStepMap = supplierEvaluationStepList.stream().collect(Collectors.toMap(SupplierEvaluationStep::getSupplierId, Function.identity()));
supplierDtoList = supplierList.stream().map(t -> {
SupplierDto supplierDto = new SupplierDto();
supplierDto.setSupplierId(t.getId());
supplierDto.setSupplierName(t.getSupplierName());
if (supplierEvalStepMap.containsKey(t.getId())) {
SupplierEvaluationStep supplierEvalStep = supplierEvalStepMap.get(t.getId());
supplierDto.setTotalScore(supplierEvalStep.getEvaluationScore());
supplierDto.setSortNo(supplierEvalStep.getSortNo());
}
return supplierDto;
}).collect(Collectors.toList());
}
/**
* @Description: 初始化报价明细评审结果
* @author chenxw
* @param tenderId
* @param priceDetailEvalStep
*/
private void initPriceDetailEvalResult(EvaluationStep priceDetailEvalStep) {
List<EvaluationFactor> evaluationTopFactorList = evaluationFactorService.getFactorListByStepId(tenderId, priceDetailEvalStep.getId());
EvaluationFactor evaluationFactor = Optional.ofNullable(evaluationTopFactorList).map(List::stream).flatMap(Stream::findFirst).orElse(null);
if (Objects.isNull(evaluationFactor)) {
return;
}
List<PriceDetail> priceDetailList = PriceDetailService.getPriceDetailList(tenderId, evaluationFactor.getBidPriceCode());
if (CollectionUtils.isNull(priceDetailList)) {
return;
}
List<PriceDetailEvalResult> evalResultList = Optional.of(tenderId).map(PriceDetailEvalResultService::getPriceDetailEvalResultList).orElseGet(ArrayList::new);
initPriceDetailDtoList(priceDetailList, evalResultList);
initSubCrossDataList(priceDetailList, evalResultList);
}
/**
* @Description: 初始化报价明细信息列表
* @author chenxw
* @param priceDetailList
* @param evalResultList
*/
private void initPriceDetailDtoList(List<PriceDetail> priceDetailList, List<PriceDetailEvalResult> evalResultList) {
Map<String, BigDecimal> priceDetailBasePriceMap = evalResultList.stream().collect(Collectors.toMap(PriceDetailEvalResult::getDetailCode, PriceDetailEvalResult::getBasePrice));
priceDetailDtoList = priceDetailList.stream().map(t -> {
PriceDetailDto priceDetailDto = new PriceDetailDto();
priceDetailDto.setDetailId(t.getDetailCode());
priceDetailDto.setDetailCode(t.getDetailCode().trim());
if (priceDetailBasePriceMap.containsKey(t.getDetailCode())) {
priceDetailDto.setBasePrice(MoneyUtils.getMoneyByUnit(priceDetailBasePriceMap.get(t.getDetailCode()), priceUnit));
}
return priceDetailDto;
}).collect(Collectors.toList());
}
/**
* @Description: 初始化
* @author chenxw
* @param priceDetailList
* @param evalResultList
*/
private void initSubCrossDataList(List<PriceDetail> priceDetailList, List<PriceDetailEvalResult> evalResultList) {
Map<String, Map<String, BigDecimal>> supplierPriceDetailScoreMapMap = evalResultList.stream().collect(Collectors.toMap(PriceDetailEvalResult::getDetailCode, t -> {
return t.getSupplierPriceDetailEvalResultList().stream().collect(Collectors.toMap(SupplierPriceDetailEvalResult::getSupplierId, SupplierPriceDetailEvalResult::getScore));
}));
subCrossDataList = priceDetailList.stream().flatMap(t -> {
List<SupplierPriceDetail> supplierDetailList = t.getSupplierPriceDetailList();
if (CollectionUtils.isNull(supplierDetailList)) {
return null;
}
Map<String, BigDecimal> supplierPriceDetailScoreMap = supplierPriceDetailScoreMapMap.get(t.getDetailCode());
if (MapUtils.isNull(supplierPriceDetailScoreMap)) {
return null;
}
return supplierDetailList.stream().map(s -> {
SubCrossData subCrossData = new SubCrossData();
subCrossData.setSupplierId(s.getSupplierId());
subCrossData.setDetailId(t.getDetailCode());
subCrossData.setPrice(MoneyUtils.getMoneyFromText(s.getEvalPrice(), priceUnit));
if (supplierPriceDetailScoreMap.containsKey(s.getSupplierId())) {
subCrossData.setScore(supplierPriceDetailScoreMap.get(s.getSupplierId()));
}
return subCrossData;
});
}).collect(Collectors.toList());
}
public List<SupplierDto> getSupplierDtoList() {
return supplierDtoList;
}
public List<PriceDetailDto> getPriceDetailDtoList() {
return priceDetailDtoList;
}
public List<SubCrossData> getSubCrossDataList() {
return subCrossDataList;
}
}
package com.gx.obe.step.price.dataset;
import java.math.BigDecimal;
public class SubCrossData {
private String detailId;
private String supplierId;
private BigDecimal price;
private BigDecimal score;
public String getDetailId() {
return detailId;
}
public void setDetailId(String detailId) {
this.detailId = detailId;
}
public String getSupplierId() {
return supplierId;
}
public void setSupplierId(String supplierId) {
this.supplierId = supplierId;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
}
package com.gx.obe.step.price.dataset;
import java.math.BigDecimal;
public class SupplierDto {
private String supplierId;
private String supplierName;
private BigDecimal totalScore;
private int sortNo;
public String getSupplierId() {
return supplierId;
}
public void setSupplierId(String supplierId) {
this.supplierId = supplierId;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public BigDecimal getTotalScore() {
return totalScore;
}
public void setTotalScore(BigDecimal totalScore) {
this.totalScore = totalScore;
}
public int getSortNo() {
return sortNo;
}
public void setSortNo(int sortNo) {
this.sortNo = sortNo;
}
}
package com.gx.obe.step.price.dialog;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.function.Predicate;
import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.nebula.widgets.grid.listener.GridCheckedListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.utils.GridUtils;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.components.core.enumeration.EvaluationFactorEnum;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.components.core.enumeration.PriceReviewTypeEnum;
import com.gx.obe.datastruct.tree.Forest;
import com.gx.obe.step.dialog.EvaluationStepSingleDialog;
import com.gx.obe.step.price.utils.FactorUtils;
import com.gx.obe.step.price.utils.IPriceEvalStep;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.PredicateUtils;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.service.evaluation.EvaluationFactorService;
/**
* @Description: 价格明细评审步骤界面
* @author chenxw
*/
public class PriceDetailEvaluationStepDialog extends EvaluationStepSingleDialog implements IPriceEvalStep {
private final String FACTOR_DATA = "evaluationFactor";
private final EvaluationFactorService evaluationFactorService = new EvaluationFactorService();
private final Image treeExpandPic = ImageResolver.RESOLVER_INSTANCE.loadImage(IconsActivator.PLUGIN_ID, "icons/tree_expend.png");
private final Image treeClosePic = ImageResolver.RESOLVER_INSTANCE.loadImage(IconsActivator.PLUGIN_ID, "icons/tree_close.png");
private final Image treeParentPic = ImageResolver.RESOLVER_INSTANCE.loadImage(IconsActivator.PLUGIN_ID, "icons/tree_parent.png");
private final Image treeItemPic = ImageResolver.RESOLVER_INSTANCE.loadImage(IconsActivator.PLUGIN_ID, "icons/tree_item.png");
private Grid factorGrid;
/**
* @author chenxw
* @param parentShell
* @param tenderProject
* @param evaluationStep
*/
public PriceDetailEvaluationStepDialog(Shell parentShell, TenderProjectEntity tenderProject, EvaluationStep evaluationStep) {
super(parentShell, tenderProject, evaluationStep);
}
@Override
protected String getTipsText() {
return "自动计算价格明细得分";
}
@Override
protected String getStepNameDef() {
return "价格明细评审";
}
@Override
protected String getStepType() {
return EvaluationStepEnum.PRICE;
}
@Override
protected void createFromArea(Composite fromComposite, Composite gridComposite) {
super.createFromArea(fromComposite, gridComposite);
Composite composite = new Composite(gridComposite, SWT.NONE);
GridLayout gl_composite = new GridLayout(1, false);
gl_composite.marginHeight = 0;
gl_composite.marginWidth = 0;
composite.setLayout(gl_composite);
factorGrid = new Grid(composite, SWT.NONE);
GridData gd_composite_1 = new GridData(SWT.CENTER, SWT.FILL, false, true, 1, 1);
gd_composite_1.widthHint = 200;
factorGrid.setLayoutData(gd_composite_1);
factorGrid.addListener(SWT.Selection, new GridCheckedListener(false));
GridColumn gridColumn = new GridColumn(factorGrid, SWT.CHECK);
gridColumn.setWidth(200);
gridColumn.setWordWrap(true);
gridColumn.setTree(true);
gridColumn.setShowTreeTogglePic(true);
gridColumn.setTreeTogglePic(treeExpandPic, treeClosePic);
initFactorGrid();
}
/**
* @Description: 初始化指标表格界面
* @author chenxw
*/
private void initFactorGrid() {
List<EvaluationFactor> evaluationFactorList = evaluationFactorService.getAllEvaluationFactorList(tenderProject.getId(), EvaluationFactorEnum.AUDIT_PRICE);
if (CollectionUtils.isNull(evaluationFactorList)) {
return;
}
Forest<EvaluationFactor> factorForest = new Forest<>(evaluationFactorList);
filterForestByStepFactor(tenderProject, evaluationStep, factorForest);
IPriceEvalStep.filterForestByReviewType(factorForest, PriceReviewTypeEnum.DETAIL);
for (EvaluationFactor evaluationFactor : evaluationFactorList) {
initFactorGridItem(new GridItem(factorGrid, SWT.NONE), evaluationFactor);
}
}
/**
* @Description: 初始化指标表格行
* @author chenxw
* @param parentItem
* @param evaluationFactor
*/
private void initFactorGridItem(GridItem parentItem, EvaluationFactor evaluationFactor) {
parentItem.setText(evaluationFactor.getFactorName());
List<EvaluationFactor> childFactorList = evaluationFactor.getChildFactorList();
if (CollectionUtils.isNull(childFactorList)) {
parentItem.setImage(treeItemPic);
parentItem.setData(FACTOR_DATA, evaluationFactor);
return;
}
parentItem.setExpanded(true);
parentItem.setCheckVisible(0, false);
parentItem.setImage(treeParentPic);
for (EvaluationFactor childFactor : childFactorList) {
initFactorGridItem(new GridItem(parentItem, SWT.NONE), childFactor);
}
}
@Override
protected void setFromData(EvaluationStep evaluationStep) {
super.setFromData(evaluationStep);
List<Object> factorIdList = evaluationStepFactorService.getFactorIdLsitByStepId(evaluationStep.getId());
Predicate<GridItem> gridItemPre = PredicateUtils.map(this::getFactorIdByItem, factorIdList::contains);
Arrays.stream(factorGrid.getItems()).filter(gridItemPre).forEach(t -> t.setChecked(true));
}
/**
* @Description: 根据表格行获取指标id
* @author chenxw
* @param item
* @return
*/
private String getFactorIdByItem(GridItem item) {
return Optional.ofNullable(item).map(t -> (EvaluationFactor) t.getData(FACTOR_DATA)).map(EvaluationFactor::getId).orElse(null);
}
@Override
protected String valFromData() {
List<EvaluationFactor> checkedFactorList = GridUtils.getCheckedValues(factorGrid, 0, FACTOR_DATA, true);
if (CollectionUtils.isNull(checkedFactorList)) return "请选择评审指标!";
if (checkedFactorList.size() > 1) return "价格明细评审步骤只能选择一个价格明细指标!";
return null;
}
@Override
protected void getFromData(EvaluationStep evaluationStep) {
super.getFromData(evaluationStep);
List<EvaluationFactor> checkedFactorList = GridUtils.getCheckedValues(factorGrid, 0, FACTOR_DATA, true);
EvaluationFactor evaluationFactor = checkedFactorList.get(0);
addEvaluationFactor(evaluationFactor);
evaluationStep.setScore(evaluationFactor.getFactorScore());
evaluationStep.setWeight(evaluationFactor.getFactorScore().multiply(FactorUtils.getRealWeight(evaluationFactor.getFactorFinalWeight())));
evaluationStep.setEvaluationParam(EvaluationStepEnum.PRICE_REVIEW_TYPE, PriceReviewTypeEnum.DETAIL);
}
@Override
protected Point getInitialSize() {
return new Point(600, 350);
}
}
package com.gx.obe.step.price.dto;
import java.util.List;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.web.entity.EvaluationFactorResult;
/**
* @Description: 报价明细评审结果数据传输对象
* @author chenxw
*/
public class PriceDetailEvalResultDto {
private String tenderId;
private String stepId;
private String factorId;
private String userId;
private List<PriceDetailEvalResult> priceDetailEvalResultList;
private List<EvaluationFactorResult> evaluationFactorResultList;
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
public String getStepId() {
return stepId;
}
public void setStepId(String stepId) {
this.stepId = stepId;
}
public String getFactorId() {
return factorId;
}
public void setFactorId(String factorId) {
this.factorId = factorId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public List<PriceDetailEvalResult> getPriceDetailEvalResultList() {
return priceDetailEvalResultList;
}
public void setPriceDetailEvalResultList(List<PriceDetailEvalResult> priceDetailEvalResultList) {
this.priceDetailEvalResultList = priceDetailEvalResultList;
}
public List<EvaluationFactorResult> getEvaluationFactorResultList() {
return evaluationFactorResultList;
}
public void setEvaluationFactorResultList(List<EvaluationFactorResult> evaluationFactorResultList) {
this.evaluationFactorResultList = evaluationFactorResultList;
}
}
package com.gx.obe.step.price.enums;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import com.gx.obe.util.utils.EnumUtils;
import com.gx.obe.util.utils.PredicateUtils;
/**
* @Description: 报价明细表列枚举
* @author chenxw
*/
public enum PriceDetailTableColEnum {
/**
* @Description: 物料编码
*/
MATERIAL_CODE("materialCode", "物料编码", TypeEnum.OTHER),
/**
* @Description: 项目单位
*/
NAME("name", "项目单位", TypeEnum.OTHER),
/**
* @Description: 数量
*/
NUMBER("number", "数量", TypeEnum.OTHER),
/**
* @Description: 未含税单价
*/
NO_TAX_SINGLE_PRICE("noTaxSinglePrice", "未含税单价", TypeEnum.PRICE),
/**
* @Description: 含税单价
*/
SINGLE_PRICE("singlePrice", "含税单价", TypeEnum.PRICE),
/**
* @Description: 含税合价
*/
PRICE("price", "含税合价", TypeEnum.PRICE),
/**
* @Description: 得分权重
*/
SCORE_WEIGHT("scoreWeight", "得分权重", TypeEnum.OTHER);
public enum TypeEnum {
PRICE, OTHER;
}
/**
* @Description: keyMap
*/
public static Map<String, PriceDetailTableColEnum> MAP = EnumUtils.toMap(values(), PriceDetailTableColEnum::getKey);
/**
* @Description: keyMap
*/
public static Map<String, PriceDetailTableColEnum> PRICE_MAP = EnumUtils.toMap(values(), PriceDetailTableColEnum::getKey, PredicateUtils.map(PriceDetailTableColEnum::getTypeEnum, Predicate.isEqual(TypeEnum.PRICE)));
/**
* @Description: key列表缓存
*/
public static Map<TypeEnum, List<String>> keyCacheMap = new HashMap<>();
private String key;
private String value;
private TypeEnum typeEnum;
/**
* @author chenxw
* @param key
* @param value
* @param typeEnum
*/
PriceDetailTableColEnum(String key, String value, TypeEnum typeEnum) {
this.key = key;
this.value = value;
this.typeEnum = typeEnum;
}
/**
* @Description: 是否包含指定类型指定key的枚举
* @author chenxw
* @param key
* @param typeEnum
* @return
*/
public static boolean contain(String key, TypeEnum typeEnum) {
return keyCacheMap.computeIfAbsent(typeEnum, PriceDetailTableColEnum::getKeyListByType).stream().anyMatch(Predicate.isEqual(key));
}
/**
* @Description: 根据类型获取key列表
* @author chenxw
* @param typeEnum
* @return
*/
public static List<String> getKeyListByType(TypeEnum typeEnum) {
return Arrays.stream(values()).filter(PredicateUtils.map(PriceDetailTableColEnum::getTypeEnum, Predicate.isEqual(typeEnum))).map(PriceDetailTableColEnum::getKey).collect(Collectors.toList());
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
public TypeEnum getTypeEnum() {
return typeEnum;
}
}
package com.gx.obe.step.price.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import com.gx.obe.bpt.service.BidPriceTableService;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.step.price.dto.PriceDetailEvalResultDto;
import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.utils.ObeHttpUtils;
/**
* @Description: 报价明细评审结果服务
* @author chenxw
*/
public class PriceDetailEvalResultService {
protected static final Logger logger = Logger.getLogger(BidPriceTableService.class);
protected static final String URL = "obePriceDetailEvalResult";
/**
* @Description: 获取报价明细评审结果列表
* @author chenxw
* @param tenderId
* @return
*/
public static List<PriceDetailEvalResult> getPriceDetailEvalResultList(String tenderId) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
return ObeHttpUtils.getList(URL.concat("/getPriceDetailEvalResultList"), param, PriceDetailEvalResult.class);
}
/**
* @Description: 保存评审结果
* @author chenxw
* @param userId
* @param factorId
* @param stepId
* @param tenderId
* @param evalResultList
* @param factorResultList
* @return
*/
public static boolean saveEvaluationResult(String tenderId, String stepId, String factorId, String userId, List<PriceDetailEvalResult> evalResultList, List<EvaluationFactorResult> factorResultList) {
PriceDetailEvalResultDto priceDetailEvalResultDto = new PriceDetailEvalResultDto();
priceDetailEvalResultDto.setTenderId(tenderId);
priceDetailEvalResultDto.setStepId(stepId);
priceDetailEvalResultDto.setFactorId(factorId);
priceDetailEvalResultDto.setUserId(userId);
priceDetailEvalResultDto.setPriceDetailEvalResultList(evalResultList);
priceDetailEvalResultDto.setEvaluationFactorResultList(factorResultList);
return ObeHttpUtils.post(URL.concat("/saveEvaluationResult"), priceDetailEvalResultDto);
}
}
package com.gx.obe.step.price.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gx.obe.bpt.service.BidPriceTableService;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.web.utils.ObeHttpUtils;
/**
* @Description: 报价明细服务
* @author chenxw
*/
public class PriceDetailService extends BidPriceTableService {
/**
* @Description: 获取报价明细列表
* @author chenxw
* @param tenderId
* @param colType
* @return
*/
public static List<PriceDetail> getPriceDetailList(String tenderId, String priceColType) {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
param.put("priceColType", priceColType);
return ObeHttpUtils.getList(URL.concat("/getPriceDetailList"), param, PriceDetail.class);
}
}
package com.gx.obe.step.price.table;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.gx.obe.datastruct.tree.table.ITree;
import com.gx.obe.datastruct.tree.table.StringTree;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.step.price.beans.SupplierPriceDetail;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
import com.gx.obe.util.utils.PredicateUtils;
/**
* @Description: 报价明细树
* @author chenxw
*/
public class PriceDetailTree implements ITree {
/**
* @Description: 报价明细
*/
private PriceDetail priceDetail;
/**
* @Description: 报价明细评审结果
*/
private PriceDetailEvalResult priceDetailEvalResult;
/**
* @Description: 基准价
*/
private String basePrice;
/**
* @Description: 评标价缓存区
*/
private Map<Object, String> evalPriceMap = new HashMap<>();
/**
* @Description: 得分缓存区
*/
private Map<Object, String> scoreMap = new HashMap<>();
/**
* @Description: 子树列表
*/
private final List<StringTree> stringTrees = Stream.of(
new StringTree(this, "报价", this::getEvalPrice),
new StringTree(this, "基准价", this::getBasePrice),
new StringTree(this, "得分", this::getScore)
).collect(Collectors.toList());
/**
* @author chenxw
* @param priceDetail
* @param priceDetailEvalResult
*/
public PriceDetailTree(PriceDetail priceDetail, PriceDetailEvalResult priceDetailEvalResult) {
this.priceDetail = priceDetail;
this.priceDetailEvalResult = priceDetailEvalResult;
this.basePrice = Optional.ofNullable(priceDetailEvalResult)
.map(PriceDetailEvalResult::getBasePrice)
.map(String::valueOf)
.orElse("");
}
/**
* @Description: 获取评标价
* @author chenxw
* @param supplierId
* @return
*/
private String getEvalPrice(Object supplierId) {
return evalPriceMap.computeIfAbsent(supplierId, this::createEvalPrice);
}
/**
* @Description: 获取得分
* @author chenxw
* @param supplierId
* @return
*/
private String getScore(Object supplierId) {
return scoreMap.computeIfAbsent(supplierId, this::createScore);
}
/**
* @Description: 获取基准价
* @author chenxw
* @param supplierId
* @return
*/
private String getBasePrice(Object supplierId) {
return basePrice;
}
/**
* @Description: 生成评标价
* @author chenxw
* @param supplierId
* @return
*/
private String createEvalPrice(Object supplierId) {
if (Objects.isNull(priceDetail)) return "";
return priceDetail.getSupplierPriceDetailList().stream()
.filter(PredicateUtils.map(SupplierPriceDetail::getSupplierId, Predicate.isEqual(supplierId)))
.findAny()
.map(SupplierPriceDetail::getEvalPrice)
.map(String::valueOf)
.orElse("");
}
/**
* @Description: 生成得分
* @author chenxw
* @param supplierId
* @return
*/
private String createScore(Object supplierId) {
if (Objects.isNull(priceDetailEvalResult)) return "";
return priceDetailEvalResult.getSupplierPriceDetailEvalResultList().stream()
.filter(PredicateUtils.map(SupplierPriceDetailEvalResult::getSupplierId, Predicate.isEqual(supplierId)))
.findAny()
.map(SupplierPriceDetailEvalResult::getScore)
.map(String::valueOf)
.orElse("");
}
@Override
public ITree getRoot() {
return null;
}
@Override
public List<? extends ITree> getITrees() {
return stringTrees;
}
@Override
public String getName() {
return priceDetail.getDetailCode();
}
@Override
public String getKey() {
return priceDetail.getDetailCode();
}
@Override
public String getValue(Object key) {
return null;
}
}
package com.gx.obe.step.price.table;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.datastruct.tree.table.ParseTrees;
import com.gx.obe.datastruct.tree.table.TreeSpan;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.entity.Supplier;
import de.kupzog.ktable.KTable;
import de.kupzog.ktable.model.CommonKtableCModel;
/**
* @Description: 价格明细评审表格
* @author chenxw
*/
public class PriceDetailTreeTable extends KTable {
private CommonKtableCModel model;
/**
* @Description: 供应商列表
*/
private final List<Supplier> supplierList;
/**
* @Description: 解析树
*/
private final ParseTrees parseTrees;
/**
* @Description: 普通表格列
*/
private final List<TableCol> tableColList = new ArrayList<>();
/**
* @Description: 价格指标评审结果
*/
// private final Map<String, EvaluationFactorResult> factorResultMap;
/**
* @Description: 得分排序编号map
*/
// private final Map<String, Integer> scoreSortNumberMap;
public PriceDetailTreeTable(Composite parent, int style, List<Supplier> supplierList, List<PriceDetail> priceDetailList, List<PriceDetailEvalResult> evalResultList, List<EvaluationFactorResult> factorResultList) {
super(parent, style);
this.supplierList = supplierList;
this.parseTrees = createParseTrees(priceDetailList, evalResultList);
// this.factorResultMap = factorResultList.stream().collect(Collectors.toMap(EvaluationFactorResult::getSupplierId, Function.identity()));
// ListSortUtils<EvaluationFactorResult> listSortUtils = new ListSortUtils<>(factorResultList, Comparator.comparing(EvaluationFactorResult::getEvaluationScore));
// this.scoreSortNumberMap = factorResultList.stream().collect(Collectors.toMap(EvaluationFactorResult::getSupplierId, listSortUtils::getSortNo));
initCommonKtableCModel();
}
/**
* @Description: 生成报价明细解析树
* @author chenxw
* @param priceDetailList
* @param evalResultList
*/
private ParseTrees createParseTrees(List<PriceDetail> priceDetailList, List<PriceDetailEvalResult> evalResultList) {
priceDetailList = Optional.ofNullable(priceDetailList).orElseGet(ArrayList::new);
evalResultList = Optional.ofNullable(evalResultList).orElseGet(ArrayList::new);
Map<String, PriceDetailEvalResult> evalResultMap = evalResultList.stream().collect(Collectors.toMap(PriceDetailEvalResult::getDetailCode, Function.identity()));
return new ParseTrees(priceDetailList.stream().map(t -> new PriceDetailTree(t, evalResultMap.get(t.getDetailCode()))).collect(Collectors.toList()));
}
/**
* @Description: 初始化表格模型
* @author chenxw
*/
private void initCommonKtableCModel() {
// Function<Object, EvaluationFactorResult> evaluationFactorResultFun = factorResultMap::get;
// Function<Object, Integer> scoreSortNumberFun = scoreSortNumberMap::get;
// tableColList.add(new TableCol("总分", evaluationFactorResultFun.andThen(EvaluationFactorResult::getEvaluationScore).andThen(String::valueOf)));
// tableColList.add(new TableCol("排序", scoreSortNumberFun.andThen(String::valueOf)));
model = new CommonKtableCModel(this, 1, parseTrees.getHeight(), parseTrees.getLeafCount() + tableColList.size(), supplierList.size());
for (TreeSpan treeSpan : parseTrees.getWideSpanList()) {
model.addRowSpan(model.getFixedRowCount() + treeSpan.getLeafIndex(), treeSpan.getLevel(), treeSpan.getSpanCount());
}
model.addColSpan(0, 0, parseTrees.getHeight());
for (int i = 0; i < tableColList.size(); i++) {
model.addColSpan(model.getFixedRowCount() + parseTrees.getLeafCount() + i, 0, parseTrees.getHeight());
}
model.setRowHeightRender(row -> 30);
model.setCellContentRender(this::receiveContent);
this.setModel(model);
this.getParent().layout();
}
/**
* @Description: 加载表格内容
* @author chenxw
* @param row
* @param col
* @return
*/
private String receiveContent(int row, int col) {
if (col < model.getFixedColumnCount()) {
if (row < model.getFixedRowCount()) {
return "报价明细";
}
row -= model.getFixedRowCount();
if (row < parseTrees.getLeafCount()) {
return parseTrees.getITree(col, row).getName();
}
return tableColList.get(row - parseTrees.getLeafCount()).getName();
}
Supplier supplier = supplierList.get(col - model.getFixedColumnCount());
if (row < model.getFixedRowCount()) {
return supplier.getSupplierName();
}
row -= model.getFixedRowCount();
if (row < parseTrees.getLeafCount()) {
return parseTrees.get(row).getValue(supplier.getId());
}
// return tableColList.get(row - parseTrees.getLeafCount()).getValueFun().apply(supplier.getId());
return "";
}
}
package com.gx.obe.step.price.table;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.gx.obe.datastruct.tree.table.ITree;
import com.gx.obe.datastruct.tree.table.StringTree;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.step.price.beans.SupplierPriceDetail;
import com.gx.obe.step.price.beans.SupplierPriceDetailEvalResult;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.PredicateUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
/**
* @Description: 供应商树
* @author chenxw
*/
public class SupplierTree implements ITree {
private TenderProjectRuleEntity projectRule;
private Supplier supplier;
private Map<String, List<SupplierPriceDetail>> supplierPriceDetailListMap;
private Map<String, List<SupplierPriceDetailEvalResult>> supplierPriceDetailEvalResultListMap;
/**
* @Description: 评标价缓存区
*/
private Map<Object, String> evalPriceMap = new HashMap<>();
/**
* @Description: 得分缓存区
*/
private Map<Object, String> scoreMap = new HashMap<>();
/**
* @Description: 子树列表
*/
private final List<StringTree> stringTrees;
public SupplierTree(TenderProjectRuleEntity projectRule, Supplier supplier, List<PriceDetail> priceDetailList, List<PriceDetailEvalResult> evalResultList) {
Objects.requireNonNull(projectRule);
this.projectRule = projectRule;
this.supplier = supplier;
this.supplierPriceDetailListMap = priceDetailList.stream().collect(Collectors.toMap(PriceDetail::getDetailCode, PriceDetail::getSupplierPriceDetailList));
this.supplierPriceDetailEvalResultListMap = evalResultList.stream().collect(Collectors.toMap(PriceDetailEvalResult::getDetailCode, PriceDetailEvalResult::getSupplierPriceDetailEvalResultList));
this.stringTrees = initStringTrees();
}
private List<StringTree> initStringTrees() {
return Stream.of(
new StringTree(this, "报价(" + projectRule.getPriceUnit() + ")", this::getEvalPrice),
new StringTree(this, "得分", this::getScore)
).collect(Collectors.toList());
}
/**
* @Description: 获取评标价
* @author chenxw
* @param detailCode
* @return
*/
private String getEvalPrice(Object detailCode) {
return evalPriceMap.computeIfAbsent(detailCode, this::createEvalPrice);
}
/**
* @Description: 获取得分
* @author chenxw
* @param detailCode
* @return
*/
private String getScore(Object detailCode) {
return scoreMap.computeIfAbsent(detailCode, this::createScore);
}
/**
* @Description: 生成评标价
* @author chenxw
* @param detailCode
* @return
*/
private String createEvalPrice(Object detailCode) {
return supplierPriceDetailListMap.get(detailCode).stream()
.filter(PredicateUtils.map(SupplierPriceDetail::getSupplierId, Predicate.isEqual(supplier.getId())))
.findAny()
.map(SupplierPriceDetail::getEvalPrice)
.orElse("");
}
/**
* @Description: 生成得分
* @author chenxw
* @param detailCode
* @return
*/
private String createScore(Object detailCode) {
if (!supplierPriceDetailEvalResultListMap.containsKey(detailCode)) {
return "";
}
return supplierPriceDetailEvalResultListMap.get(detailCode).stream()
.filter(PredicateUtils.map(SupplierPriceDetailEvalResult::getSupplierId, Predicate.isEqual(supplier.getId())))
.findAny()
.map(SupplierPriceDetailEvalResult::getScore)
.map(this::formatScore)
.orElse("");
}
private String formatScore(BigDecimal score) {
score = BigDecimalUtils.round(score, projectRule.getScoreRound());
if (Objects.isNull(score)) {
return null;
}
return score.toString();
}
@Override
public ITree getRoot() {
return null;
}
@Override
public List<? extends ITree> getITrees() {
return stringTrees;
}
@Override
public String getName() {
return supplier.getSupplierName();
}
@Override
public String getKey() {
return supplier.getId();
}
@Override
public String getValue(Object key) {
return null;
}
}
package com.gx.obe.step.price.table;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.swt.widgets.Composite;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.config.ConfigConstants;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.datastruct.tree.table.ParseTrees;
import com.gx.obe.datastruct.tree.table.TreeSpan;
import com.gx.obe.step.price.beans.PriceDetail;
import com.gx.obe.step.price.beans.PriceDetailEvalResult;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.ListSortUtils;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import de.kupzog.ktable.KTable;
import de.kupzog.ktable.SWTX;
import de.kupzog.ktable.model.CommonKtableCModel;
/**
* @Description: 以供应商为多表头的报价明细表
* @author chenxw
*/
public class SupplierTreeTable extends KTable {
private static final String SHOW_DETAIL_CODE = "code";
private static final String SHOW_DETAIL_NAME = "name";
/**
* @Description: 表格模型
*/
private CommonKtableCModel model;
/**
* @Description: 项目规则
*/
private TenderProjectRuleEntity projectRule;
/**
* @Description: 报价明细列表
*/
private List<PriceDetail> priceDetailList;
/**
* @Description: 报价明细评审列表
*/
private List<PriceDetailEvalResult> evalResultList;
/**
* @Description: 价格指标评审结果列表
*/
private List<EvaluationFactorResult> factorResultList;
/**
* @Description: 解析树
*/
private final ParseTrees parseTrees;
/**
* @Description: 普通表格列
*/
private final List<TableCol> tableColList = new ArrayList<>();
/**
* @Description: 普通表格行
*/
private final List<TableRow> tableRowList = new ArrayList<>();
/**
* @author chenxw
* @param parent
* @param style
* @param supplierList
* @param priceDetailList
* @param evalResultList
* @param factorResultList
*/
public SupplierTreeTable(Composite parent, int style, TenderProjectRuleEntity projectRule, List<Supplier> supplierList, List<PriceDetail> priceDetailList, List<PriceDetailEvalResult> evalResultList, List<EvaluationFactorResult> factorResultList) {
super(parent, style);
Objects.requireNonNull(projectRule);
this.projectRule = projectRule;
this.priceDetailList = Optional.ofNullable(priceDetailList).orElseGet(ArrayList::new);;
this.evalResultList = Optional.ofNullable(evalResultList).orElseGet(ArrayList::new);
this.factorResultList = Optional.ofNullable(factorResultList).orElseGet(ArrayList::new);
this.parseTrees = createParseTrees(supplierList);
initTableRowCol();
initCommonKtableCModel();
}
/**
* @Description: 生成解析树
* @author chenxw
* @param supplierList
* @return
*/
private ParseTrees createParseTrees(List<Supplier> supplierList) {
supplierList = Optional.ofNullable(supplierList).orElseGet(ArrayList::new);
return new ParseTrees(supplierList.stream().map(t -> new SupplierTree(projectRule, t, priceDetailList, evalResultList)).collect(Collectors.toList()));
}
/**
* @Description: 初始化普通表格行和列
* @author chenxw
*/
private void initTableRowCol() {
tableColList.add(new TableCol("序号", i -> String.valueOf(i + 1)));
String type = PropertiesUtils.getProperty(ConfigConstants.SHOW_PRICE_DETAIL_COL_CONTENT_TYPE);
Function<Integer, PriceDetail> getPriceDetailByIndex = priceDetailList::get;
tableColList.add(new TableCol("报价明细", getPriceDetailByIndex.andThen(priceDetailColContentFun(type)).andThen(ObjectUtils::getObjString)));
Function<String, BigDecimal> basePriceFun = evalResultList.stream().collect(Collectors.toMap(PriceDetailEvalResult::getDetailCode, PriceDetailEvalResult::getBasePrice))::get;
tableColList.add(new TableCol("基准价(" + projectRule.getPriceUnit() + ")", getPriceDetailByIndex.andThen(PriceDetail::getDetailCode).andThen(basePriceFun).andThen(this::formatPrice)));
if (PropertiesUtils.getProperty(ConfigConstants.SUPPLIER_TREE_TABLE_SHOW_WEIGHT, CommonEnum.NO).equals(CommonEnum.YES))
tableColList.add(new TableCol("权重(%)", getPriceDetailByIndex.andThen(PriceDetail::getScoreWeight).andThen(ObjectUtils::getObjString)));
Function<Object, EvaluationFactorResult> evaluationFactorResultFun = factorResultList.stream().collect(Collectors.toMap(EvaluationFactorResult::getSupplierId, Function.identity()))::get;
tableRowList.add(new TableRow("总分", evaluationFactorResultFun.andThen(this::getEvaluationScore).andThen(this::formatScore)));
ListSortUtils<EvaluationFactorResult> listSortUtils = new ListSortUtils<>(factorResultList, Comparator.comparing(EvaluationFactorResult::getEvaluationScore).reversed());
Function<Object, Integer> scoreSortNumberFun = factorResultList.stream().collect(Collectors.toMap(EvaluationFactorResult::getSupplierId, listSortUtils::getSortNo))::get;
tableRowList.add(new TableRow("排序", scoreSortNumberFun.andThen(this::formatSortNo)));
}
/**
* @Description: 报价明细列展示内容
* @author chenxw
* @return
*/
private Function<PriceDetail, String> priceDetailColContentFun(String type) {
switch (type) {
case SHOW_DETAIL_CODE: return PriceDetail::getDetailCode;
case SHOW_DETAIL_NAME: return PriceDetail::getName;
default:
return PriceDetail::getDetailCode;
}
}
/**
* @Description: 格式化金额
* @author chenxw
* @param price
* @return
*/
private String formatPrice(BigDecimal price) {
return MoneyUtils.getMoneyFormatByUnit(price, projectRule.getPriceUnit());
}
/**
* @Description: 格式化得分
* @author chenxw
* @param score
* @return
*/
private String formatScore(BigDecimal score) {
score = BigDecimalUtils.round(score, projectRule.getScoreRound());
if (Objects.isNull(score)) {
return "";
}
return score.toString();
}
/**
* @Description: 格式化排序编号
* @author chenxw
* @param sortNo
* @return
*/
private String formatSortNo(Integer sortNo) {
return Optional.ofNullable(sortNo).map(String::valueOf).orElse("");
}
/**
* @Description: 根据评审指标结果获取评审得分
* @author chenxw
* @param evaluationFactorResult
* @return
*/
public BigDecimal getEvaluationScore(EvaluationFactorResult evaluationFactorResult) {
return Optional.ofNullable(evaluationFactorResult).map(EvaluationFactorResult::getEvaluationScore).orElse(null);
}
/**
* @Description: 初始化表格模型
* @author chenxw
*/
private void initCommonKtableCModel() {
model = new CommonKtableCModel(this, parseTrees.getHeight(), tableColList.size(), priceDetailList.size() + tableRowList.size(), parseTrees.getLeafCount());
for (int i = 0; i < tableColList.size(); i++) {
model.addRowSpan(0, i, parseTrees.getHeight());
}
for (TreeSpan treeSpan : parseTrees.getWideSpanList()) {
model.addColSpan(treeSpan.getLevel(), model.getFixedColumnCount() + treeSpan.getLeafIndex(), treeSpan.getSpanCount());
}
for (int i = 0; i < tableRowList.size(); i++) {
model.addColSpan(parseTrees.getHeight() + priceDetailList.size() + i, 0, model.getFixedColumnCount());
for (TreeSpan treeSpan : parseTrees.getWideSpanList()) {
if (treeSpan.getLevel() == 0) {
model.addColSpan(parseTrees.getHeight() + priceDetailList.size() + i, model.getFixedColumnCount() + treeSpan.getLeafIndex(), treeSpan.getSpanCount());
}
}
}
for (int i = 0; i < tableColList.size(); i++) {
model.setColumnWidth(i, 100);
}
for (int i = 0; i < parseTrees.getLeafCount(); i++) {
model.setColumnWidth(model.getFixedColumnCount() + i, 100);
}
model.setRowHeightRender(row -> 30);
model.setCellContentRender(this::receiveContent);
model.setCellAlignmentRender(this::receiveCellAlignment);
this.setModel(model);
this.getParent().layout();
}
/**
* @Description: 加载表格内容
* @author chenxw
* @param row
* @param col
* @return
*/
private String receiveContent(int row, int col) {
if (row < model.getFixedRowCount()) {
if (col < tableColList.size()) {
return tableColList.get(col).getName();
}
return parseTrees.getITree(row, col - tableColList.size()).getName();
}
row -= model.getFixedRowCount();
if (row < priceDetailList.size()) {
String detailCode = priceDetailList.get(row).getDetailCode();
if (col < tableColList.size()) {
return tableColList.get(col).getValueFun().apply(row);
}
return parseTrees.get(col - tableColList.size()).getValue(detailCode);
}
row -= priceDetailList.size();
if (col < tableColList.size()) {
return tableRowList.get(row).getName();
}
col -= tableColList.size();
return tableRowList.get(row).getValueFun().apply(parseTrees.get(col).getRoot().getKey());
}
public int receiveCellAlignment(int row, int col) {
return SWTX.ALIGN_VERTICAL_CENTER | SWTX.ALIGN_HORIZONTAL_CENTER;
}
}
package com.gx.obe.step.price.table;
import java.util.function.Function;
/**
* @Description: 表格列
* @author chenxw
*/
public class TableCol {
/**
* @Description: 列名称
*/
private String name;
/**
* @Description: 列内容获取回调
*/
private Function<Integer, String> valueFun;
/**
* @author chenxw
* @param name
* @param valueFun
*/
public TableCol(String name, Function<Integer, String> valueFun) {
super();
this.name = name;
this.valueFun = valueFun;
}
public String getName() {
return name;
}
public Function<Integer, String> getValueFun() {
return valueFun;
}
}
package com.gx.obe.step.price.table;
import java.util.function.Function;
public class TableRow {
/**
* @Description: 行名称
*/
private String name;
/**
* @Description: 行内容获取回调
*/
private Function<Object, String> valueFun;
/**
* @author chenxw
* @param name
* @param valueFun
*/
public TableRow(String name, Function<Object, String> valueFun) {
super();
this.name = name;
this.valueFun = valueFun;
}
public String getName() {
return name;
}
public Function<Object, String> getValueFun() {
return valueFun;
}
}
package com.gx.obe.step.price.test;
public class Test {
public static void main(String[] args) {
}
}
package com.gx.obe.step.price.utils;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Objects;
import com.gx.obe.util.utils.CollectionUtils;
/**
* @Description: BigDecimal工具类
* @author chenxw
*/
public class BigDecimalUtils {
/**
* @Description: 平均值
* @author chenxw
* @param bigDecimals
* @return
*/
public static BigDecimal average(Collection<BigDecimal> bigDecimals) {
CollectionUtils.notNull(bigDecimals);
CollectionUtils.notContainNull(bigDecimals);
return bigDecimals.stream().reduce(BigDecimal.ZERO, BigDecimal::add).divide(BigDecimal.valueOf(bigDecimals.size()), 10, BigDecimal.ROUND_HALF_UP);
}
/**
* @Description: 区间范围
* @author chenxw
* @param source
* @param min
* @param max
* @return
*/
public static BigDecimal withinScope(BigDecimal source, BigDecimal min, BigDecimal max) {
Objects.requireNonNull(source);
if (Objects.nonNull(min)) source = source.max(min);
if (Objects.nonNull(max)) source = source.min(max);
return source;
}
/**
* @Description: 替换
* @author chenxw
* @param source
* @param eqValue
* @param defValue
* @return
*/
public static BigDecimal replace(BigDecimal source, BigDecimal eqValue, BigDecimal defValue) {
if (source == eqValue) return defValue;
if (Objects.isNull(eqValue)) return source;
if (Objects.isNull(source)) return null;
if (source.compareTo(eqValue) == 0) return defValue;
return source;
}
}
package com.gx.obe.step.price.utils;
import java.math.BigDecimal;
import java.util.Optional;
public class FactorUtils {
public static BigDecimal getRealWeight(BigDecimal weight) {
// 百分制换算(默认为1)
weight = Optional.ofNullable(weight).map(BigDecimal.valueOf(0.01)::multiply).orElse(BigDecimal.ONE);
// 范围在0~1之间
weight = BigDecimalUtils.withinScope(weight, BigDecimal.ZERO, BigDecimal.ONE);
// 如果为0则修改为1
return BigDecimalUtils.replace(weight, BigDecimal.ZERO, BigDecimal.ONE);
}
}
package com.gx.obe.step.price.utils;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.gx.obe.business.entity.EvaluationStepFactor;
import com.gx.obe.components.core.enumeration.EvaluationFactorEnum;
import com.gx.obe.components.core.enumeration.PriceReviewTypeEnum;
import com.gx.obe.datastruct.tree.Forest;
import com.gx.obe.step.price.enums.PriceDetailTableColEnum;
import com.gx.obe.step.service.StepFactorService;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.PredicateUtils;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.service.evaluation.EvaluationFactorService;
import com.gx.obe.web.service.evaluation.EvaluationStepFactorService;
public interface IPriceEvalStep {
EvaluationStepFactorService evaluationStepFactorService = new EvaluationStepFactorService();
EvaluationFactorService evaluationFactorService = new EvaluationFactorService();
boolean isAdd();
/**
* @Description: 根据步骤绑定的指标过滤指标树
* @author chenxw
* @param factorForest
*/
default void filterForestByStepFactor(TenderProjectEntity tenderProject, EvaluationStep evaluationStep, Forest<EvaluationFactor> factorForest) {
List<EvaluationStepFactor> evaluationStepFactorList = StepFactorService.getListByAuditType(tenderProject.getId(), EvaluationFactorEnum.AUDIT_PRICE);
if (CollectionUtils.isNull(evaluationStepFactorList)) {
return;
}
Stream<String> factorIdStream = evaluationStepFactorList.stream().map(EvaluationStepFactor::getFactorId);
if (!this.isAdd()) {
List<Object> factorIdLsitByStepId = evaluationStepFactorService.getFactorIdLsitByStepId(evaluationStep.getId());
factorIdStream = factorIdStream.filter(t -> !factorIdLsitByStepId.contains(t));
}
List<String> factorIdList = factorIdStream.collect(Collectors.toList());
factorForest.filterPath(t -> !factorIdList.contains(t.getId()));
}
static boolean isCreatePriceStep(TenderProjectEntity tenderProject, List<EvaluationStepFactor> evaluationStepFactorList, String priceReviewType) {
List<EvaluationFactor> priceEvalFactorList = evaluationFactorService.getAllEvaluationFactorList(tenderProject.getId(), EvaluationFactorEnum.AUDIT_PRICE);
if (CollectionUtils.isNull(priceEvalFactorList)) {
return false;
}
List<EvaluationFactor> list = new ArrayList<>(priceEvalFactorList);
Forest<EvaluationFactor> factorForest = new Forest<>(list);
if (CollectionUtils.isNotNull(evaluationStepFactorList)) {
List<String> factorIdList = evaluationStepFactorList.stream().map(EvaluationStepFactor::getFactorId).collect(Collectors.toList());
factorForest.filterPath(t -> !factorIdList.contains(t.getId()));
}
IPriceEvalStep.filterForestByReviewType(factorForest, priceReviewType);
return !list.isEmpty();
}
/**
* @Description: 根据价格步骤的评审类型过滤指标树
* @author chenxw
* @param factorForest
*/
static void filterForestByReviewType(Forest<EvaluationFactor> factorForest, String priceReviewType) {
factorForest.filterPath(PredicateUtils.map(EvaluationFactor::getBidPriceCode, getBidPriceCodePredicate(priceReviewType)));
}
static Predicate<String> getBidPriceCodePredicate(String priceReviewType) {
switch (priceReviewType) {
case PriceReviewTypeEnum.PRICE:
return t -> !PriceDetailTableColEnum.contain(t, PriceDetailTableColEnum.TypeEnum.PRICE);
case PriceReviewTypeEnum.DETAIL:
return t -> PriceDetailTableColEnum.contain(t, PriceDetailTableColEnum.TypeEnum.PRICE);
}
return t -> false;
}
}
package com.gx.obe.step.price.utils;
import java.util.Map;
import java.util.Objects;
public class MapUtils {
public static boolean isNull(Map<?, ?> map) {
return Objects.isNull(map) || map.isEmpty();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment