puzhibing
2022-08-22 1421f8e9c308c4741cb396309035009393b5b036
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package com.stylefeng.guns.modular.system.warpper;
 
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
 
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
 
/**
 * 发票
 */
@ApiModel("发票")
public class InvoiceWarpper {
    @ApiModelProperty("主键")
    private Integer id;
    @ApiModelProperty("申请时间")
    private String insertTime;
    @ApiModelProperty("发票类型说明")
    private String type;
    @ApiModelProperty("发票内容")
    private String content;
    @ApiModelProperty("开票状态(1=待开,2=已开,3=失败)")
    private Integer state;
    @ApiModelProperty("开票金额")
    private Double money;
 
    public Integer getId() {
        return id;
    }
 
    public void setId(Integer id) {
        this.id = id;
    }
 
    public String getInsertTime() {
        return insertTime;
    }
 
    public void setInsertTime(String insertTime) {
        this.insertTime = insertTime;
    }
 
    public String getType() {
        return type;
    }
 
    public void setType(String type) {
        this.type = type;
    }
 
    public String getContent() {
        return content;
    }
 
    public void setContent(String content) {
        this.content = content;
    }
 
    public Integer getState() {
        return state;
    }
 
    public void setState(Integer state) {
        this.state = state;
    }
 
    public Double getMoney() {
        return money;
    }
 
    public void setMoney(Double money) {
        this.money = money;
    }
 
    @Override
    public String toString() {
        return "InvoiceWarpper{" +
                "id=" + id +
                ", insertTime='" + insertTime + '\'' +
                ", type='" + type + '\'' +
                ", content='" + content + '\'' +
                ", state=" + state +
                ", money=" + money +
                '}';
    }
 
    public static List<InvoiceWarpper> getInvoiceWarpper(List<Map<String, Object>> maps){
        List<InvoiceWarpper> list = new ArrayList<>();
        if(null != maps){
            for(Map<String, Object> map : maps){
                InvoiceWarpper invoiceWarpper = new InvoiceWarpper();
                invoiceWarpper.setId(null != map.get("id") ? Integer.valueOf(String.valueOf(map.get("id"))) : 0);
                invoiceWarpper.setInsertTime(null != map.get("insertTime") ? String.valueOf(map.get("insertTime")) : "");
                invoiceWarpper.setType(null != map.get("type1") ? String.valueOf(map.get("type1")) : "");
                invoiceWarpper.setContent(null != map.get("content") ? String.valueOf(map.get("content")) : "");
                invoiceWarpper.setState(null != map.get("state") ? Integer.valueOf(String.valueOf(map.get("state"))) : 0);
                invoiceWarpper.setMoney(null != map.get("money") ? Double.valueOf(String.valueOf(map.get("money"))) : 0);
                list.add(invoiceWarpper);
            }
        }
        return list;
    }
}