杜洪波
2025-05-14 9db1c6c261049fbdcb104e6c0e07fa544bb42013
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package com.product.administration.test;
 
import com.product.common.utils.HttpTest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
/**
 * Copyright LX-BASE
 *
 * @Title: 报销申请测试
 * @Project: LX-BASE-SERVER
 * @Date: 2020-11-18 13:56:34
 * @Author: luoxin
 * @Description: LeaveRequestTest
 */
public class ClaimExpenseTest extends HttpTest {
  public static void main(String[] args) {
    //delClaimExpense();
    //saveClaimExpense();
    //getClaimExpenseAll();
    getAmountWords();
  }
 
  public static void saveClaimExpense() {
    Map<String,Object> map=new HashMap<>();
    map.put("url/api", "/api/claim_expense/save/v1");
    map.put("~table~", "product_oa_expense_claim");
    //uuid
    map.put("uuid","");
    //部门uuid
    map.put("department_uuid","c097b84a-92b5-440f-b524-d9282fc2db11");
    //报销日期
    map.put("reimbursement_datetime","1605680157");  //2020-11-18 14:15:57
    //公司uuid
    map.put("company_uuid","97ffb1d8-1ba4-4205-9c35-9218101ba087");
    //员工uuid
    map.put("staff_uuid","68df3855-3bff-40a1-86cf-ac00c4264495");
    //费用产生日期
    map.put("costs_produce_datetime",1606025757);//2020-11-22 14:15:57
    //product_oa_expense_claim_sub
    List claim_sub = new ArrayList();
 
    Map claim_sub1 = new HashMap();
    //摘要
    claim_sub1.put("summary", "车4444444费");
    //金额
    claim_sub1.put("money", "45.5");
    //数量
    claim_sub1.put("count", "1");
    claim_sub.add(claim_sub1);
    map.put("product_oa_expense_claim_sub",claim_sub);
    //金额合计
    map.put("total_amount","45.5");
    //金额大写
    map.put("amount_words","肆拾伍伍角");
    //备注
    map.put("remark","车费");
    //附件uuid
    map.put("accessory_uuid","");
    testPost(map);
  }
 
  public static void getClaimExpenseAll() {
    Map<String,Object> map=new HashMap<>();
    map.put("url/api", "/api/claim_expense/list/v1");
    map.put("~table~", "product_oa_expense_claim");
    testPost(map);
  }
 
  public static void delClaimExpense() {
    Map<String,Object> map=new HashMap<>();
    map.put("url/api", "/api/claim_expense/del/v1");
    map.put("~table~", "product_oa_expense_claim");
    map.put("uuids","86cdee6f-5a9c-4f20-8422-bbe9017e2504");
    testPost(map);
  }
 
  public static void getAmountWords() {
    Map<String,Object> map=new HashMap<>();
    map.put("url/api", "/api/claim_expense/money/v1");
    map.put("~table~", "product_oa_expense_claim");
    map.put("money","34234.12");
    testPost(map);
  }
}