feat(t227): query ERP directly from Go

This commit is contained in:
QiuSW
2026-07-29 10:05:25 +08:00
parent a5a61c05d0
commit a822edd1b2
10 changed files with 682 additions and 97 deletions
@@ -672,7 +672,7 @@ func daysInclusive(start, end time.Time) int {
func freightSourceErrorCode(err error) string {
switch {
case errors.Is(err, domain.ErrFreightSourceNotConfigured):
return "ERP_CONNECTOR_NOT_CONFIGURED"
return "ERP_NOT_CONFIGURED"
case errors.Is(err, domain.ErrFreightSourceSessionNeeded):
return "ERP_SESSION_REQUIRED"
case errors.Is(err, domain.ErrFreightSourceNotFound):
@@ -680,7 +680,7 @@ func freightSourceErrorCode(err error) string {
case errors.Is(err, domain.ErrFreightSourceProtocol):
return "ERP_RESPONSE_INVALID"
default:
return "ERP_CONNECTOR_UNAVAILABLE"
return "ERP_UNAVAILABLE"
}
}