This commit is contained in:
lychang
2026-05-28 22:19:21 +08:00
parent 54438f40ad
commit 8a15a1bdf4
6 changed files with 598 additions and 6298 deletions

View File

@@ -166,8 +166,7 @@ func (s *CompanyInfoService) GetCompanyInfo(companyName string, apis []string) (
// EvaluateTaxHealth 执行税务健康测评
func (s *TaxHealthService) EvaluateTaxHealth(request TaxEvalRequest) (*TaxEvalResponse, error) {
// 生成随机数和时间戳
r, _ := rand.Int(rand.Reader, big.NewInt(10000))
nonce := strconv.FormatInt(r.Int64(), 10)
nonce := "123456"
timestamp := strconv.FormatInt(time.Now().Unix()*1000, 10)
apiURL := "https://api.cmdp.cn/v1/eval/tax-risk"
// 序列化请求体
@@ -210,9 +209,8 @@ func (s *TaxHealthService) EvaluateTaxHealth(request TaxEvalRequest) (*TaxEvalRe
// QueryTaxEvalResult 查询税务测评结果
func (s *TaxHealthService) QueryTaxEvalResult(orderNo string) (*TaxEvalQueryResponse, error) {
// 生成随机数和时间戳
r, _ := rand.Int(rand.Reader, big.NewInt(10000))
nonce := strconv.FormatInt(time.Now().UnixNano(), 36) + strconv.FormatInt(r.Int64(), 10)
timestamp := strconv.FormatInt(time.Now().Unix(), 10)
nonce := "123456"
timestamp := strconv.FormatInt(time.Now().Unix()*1000, 10)
apiURL := fmt.Sprintf("https://api.cmdp.cn/v1/eval/order/%s", orderNo)

View File

@@ -25,11 +25,10 @@ func TestCreateTaxEvalRequest(t *testing.T) {
request := TaxEvalRequest{
ReqNo: fmt.Sprintf("%v", time.Now().Unix()), // 使用时间戳生成请求号
Detail: TaxEvalDetail{
FileURL: "",
Data: companyData,
CompanyName: "顺丰", // 可以从数据中提取公司名称
CompanyName: "郑州惠兴", // 可以从数据中提取公司名称
Period: "Q1",
Year: "2023",
Year: "2022",
},
}