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;
|
}
|
}
|