Merge remote-tracking branch 'origin/master'

This commit is contained in:
刘鹏 2024-07-12 16:05:09 +08:00
commit e837732538
7 changed files with 650 additions and 259 deletions

View File

@ -12,13 +12,37 @@ import java.util.Date;
*/ */
public class DetailList { public class DetailList {
/**
* 单价
*/
private String unitPrice; private String unitPrice;
/**
* 金额
*/
private String totalAmount; private String totalAmount;
/**
* 税率
*/
private String taxRate; private String taxRate;
/**
* 单位
*/
private String unit; private String unit;
/**
* 数量
*/
private String quantity; private String quantity;
/**
* 规格型号
*/
private String specifictionModel; private String specifictionModel;
/**
* 税额
*/
private String tax; private String tax;
/**
* 货物或应税劳务服务名称
*/
private String commodityName; private String commodityName;
public void setUnitPrice(String unitPrice) { public void setUnitPrice(String unitPrice) {
this.unitPrice = unitPrice; this.unitPrice = unitPrice;

View File

@ -0,0 +1,52 @@
package shkd.fi.fi.common.orc;
public class ErrorResponse {
/**
* Copyright 2024 bejson.com
*/
/**
* Auto-generated: 2024-07-12 15:26:47
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
private long code;
private String subCode;
private String message;
private String subMessage;
public void setCode(long code) {
this.code = code;
}
public long getCode() {
return code;
}
public void setSubCode(String subCode) {
this.subCode = subCode;
}
public String getSubCode() {
return subCode;
}
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
public void setSubMessage(String subMessage) {
this.subMessage = subMessage;
}
public String getSubMessage() {
return subMessage;
}
}

View File

@ -15,6 +15,13 @@ public class OCRRetureData {
private String method; private String method;
private String requestId; private String requestId;
private List<Response> response; private List<Response> response;
private ErrorResponse errorResponse;
public void setErrorResponse(ErrorResponse errorResponse) {
this.errorResponse = errorResponse;
}
public ErrorResponse getErrorResponse() {
return errorResponse;
}
public void setMethod(String method) { public void setMethod(String method) {
this.method = method; this.method = method;
} }

View File

@ -1,7 +1,8 @@
/** /**
* Copyright 2024 bejson.com * Copyright 2024 bejson.com
*/ */
package shkd.fi.fi.common.orc; package shkd.fi.fi.common.orc;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -13,252 +14,368 @@ import java.util.List;
*/ */
public class Response { public class Response {
/**
* 城市
*/
private String city; private String city;
/**
* 购买方银行账号
*/
private String buyerBankAccount; private String buyerBankAccount;
/**
* 备注
*/
private String remark; private String remark;
/**
* 标题
*/
private String title; private String title;
/**
* 开票人
*/
private String issuer; private String issuer;
/**
* 合计税额:飞机燃油附加费
*/
private double totalTax; private double totalTax;
/**
* 发票联次 eg:第一联
*/
private String invoiceTemplateType; private String invoiceTemplateType;
/**
* 销售方名称
*/
private String saleName; private String saleName;
/**
* 销售方税号
*/
private String saleTaxNo; private String saleTaxNo;
/**
* 省份
*/
private String province; private String province;
/**
* 销售方地址电话
*/
private String sellerAddrTel; private String sellerAddrTel;
/**
* 发票类型
*/
private String invoiceType; private String invoiceType;
/**
* 发票号码
*/
private String invoiceNo; private String invoiceNo;
/**
* 发票联次名称 eg:发票联
*/
private String invoiceTemplateName; private String invoiceTemplateName;
/**
* 发票位置
*/
private InvoicePosition invoicePosition; private InvoicePosition invoicePosition;
/**
* 发票在影像中的旋转角度(顺时针)
*/
private int orientation; private int orientation;
/**
* 机器编号
*/
private String machineCode; private String machineCode;
/**
* 购买方地址电话
*/
private String buyerAddrTel; private String buyerAddrTel;
private String transitMark; private String transitMark;
private String reviewer; private String reviewer;
/**
* 开票日期
*/
private Date invoiceDate; private Date invoiceDate;
/**
* 发票代码
*/
private String invoiceCode; private String invoiceCode;
/**
* 购买方名称
*/
private String purchaserName; private String purchaserName;
/**
* 校验码
*/
private String checkCode; private String checkCode;
private double totalAmount; private double totalAmount;
/**
* 购买方税号
*/
private String purchaserTaxNo; private String purchaserTaxNo;
/**
* 销售方银行账号
*/
private String sellerBankAccount; private String sellerBankAccount;
/**
* 发票密文
*/
private String invoiceCiphertext; private String invoiceCiphertext;
/**
* 明细
*/
private List<DetailList> detailList; private List<DetailList> detailList;
/**
* 是否有公司印章:0-;1-
*/
private int hasSeal; private int hasSeal;
/**
* 价税合计
*/
private double amountTax; private double amountTax;
public void setCity(String city) { public void setCity(String city) {
this.city = city; this.city = city;
} }
public String getCity() {
return city; public String getCity() {
} return city;
}
public void setBuyerBankAccount(String buyerBankAccount) { public void setBuyerBankAccount(String buyerBankAccount) {
this.buyerBankAccount = buyerBankAccount; this.buyerBankAccount = buyerBankAccount;
} }
public String getBuyerBankAccount() {
return buyerBankAccount; public String getBuyerBankAccount() {
} return buyerBankAccount;
}
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark; this.remark = remark;
} }
public String getRemark() {
return remark; public String getRemark() {
} return remark;
}
public void setTitle(String title) { public void setTitle(String title) {
this.title = title; this.title = title;
} }
public String getTitle() {
return title; public String getTitle() {
} return title;
}
public void setIssuer(String issuer) { public void setIssuer(String issuer) {
this.issuer = issuer; this.issuer = issuer;
} }
public String getIssuer() {
return issuer; public String getIssuer() {
} return issuer;
}
public void setTotalTax(double totalTax) { public void setTotalTax(double totalTax) {
this.totalTax = totalTax; this.totalTax = totalTax;
} }
public double getTotalTax() {
return totalTax; public double getTotalTax() {
} return totalTax;
}
public void setInvoiceTemplateType(String invoiceTemplateType) { public void setInvoiceTemplateType(String invoiceTemplateType) {
this.invoiceTemplateType = invoiceTemplateType; this.invoiceTemplateType = invoiceTemplateType;
} }
public String getInvoiceTemplateType() {
return invoiceTemplateType; public String getInvoiceTemplateType() {
} return invoiceTemplateType;
}
public void setSaleName(String saleName) { public void setSaleName(String saleName) {
this.saleName = saleName; this.saleName = saleName;
} }
public String getSaleName() {
return saleName; public String getSaleName() {
} return saleName;
}
public void setSaleTaxNo(String saleTaxNo) { public void setSaleTaxNo(String saleTaxNo) {
this.saleTaxNo = saleTaxNo; this.saleTaxNo = saleTaxNo;
} }
public String getSaleTaxNo() {
return saleTaxNo; public String getSaleTaxNo() {
} return saleTaxNo;
}
public void setProvince(String province) { public void setProvince(String province) {
this.province = province; this.province = province;
} }
public String getProvince() {
return province; public String getProvince() {
} return province;
}
public void setSellerAddrTel(String sellerAddrTel) { public void setSellerAddrTel(String sellerAddrTel) {
this.sellerAddrTel = sellerAddrTel; this.sellerAddrTel = sellerAddrTel;
} }
public String getSellerAddrTel() {
return sellerAddrTel; public String getSellerAddrTel() {
} return sellerAddrTel;
}
public void setInvoiceType(String invoiceType) { public void setInvoiceType(String invoiceType) {
this.invoiceType = invoiceType; this.invoiceType = invoiceType;
} }
public String getInvoiceType() {
return invoiceType; public String getInvoiceType() {
} return invoiceType;
}
public void setInvoiceNo(String invoiceNo) { public void setInvoiceNo(String invoiceNo) {
this.invoiceNo = invoiceNo; this.invoiceNo = invoiceNo;
} }
public String getInvoiceNo() {
return invoiceNo; public String getInvoiceNo() {
} return invoiceNo;
}
public void setInvoiceTemplateName(String invoiceTemplateName) { public void setInvoiceTemplateName(String invoiceTemplateName) {
this.invoiceTemplateName = invoiceTemplateName; this.invoiceTemplateName = invoiceTemplateName;
} }
public String getInvoiceTemplateName() {
return invoiceTemplateName; public String getInvoiceTemplateName() {
} return invoiceTemplateName;
}
public void setInvoicePosition(InvoicePosition invoicePosition) { public void setInvoicePosition(InvoicePosition invoicePosition) {
this.invoicePosition = invoicePosition; this.invoicePosition = invoicePosition;
} }
public InvoicePosition getInvoicePosition() {
return invoicePosition; public InvoicePosition getInvoicePosition() {
} return invoicePosition;
}
public void setOrientation(int orientation) { public void setOrientation(int orientation) {
this.orientation = orientation; this.orientation = orientation;
} }
public int getOrientation() {
return orientation; public int getOrientation() {
} return orientation;
}
public void setMachineCode(String machineCode) { public void setMachineCode(String machineCode) {
this.machineCode = machineCode; this.machineCode = machineCode;
} }
public String getMachineCode() {
return machineCode; public String getMachineCode() {
} return machineCode;
}
public void setBuyerAddrTel(String buyerAddrTel) { public void setBuyerAddrTel(String buyerAddrTel) {
this.buyerAddrTel = buyerAddrTel; this.buyerAddrTel = buyerAddrTel;
} }
public String getBuyerAddrTel() {
return buyerAddrTel; public String getBuyerAddrTel() {
} return buyerAddrTel;
}
public void setTransitMark(String transitMark) { public void setTransitMark(String transitMark) {
this.transitMark = transitMark; this.transitMark = transitMark;
} }
public String getTransitMark() {
return transitMark; public String getTransitMark() {
} return transitMark;
}
public void setReviewer(String reviewer) { public void setReviewer(String reviewer) {
this.reviewer = reviewer; this.reviewer = reviewer;
} }
public String getReviewer() {
return reviewer; public String getReviewer() {
} return reviewer;
}
public void setInvoiceDate(Date invoiceDate) { public void setInvoiceDate(Date invoiceDate) {
this.invoiceDate = invoiceDate; this.invoiceDate = invoiceDate;
} }
public Date getInvoiceDate() {
return invoiceDate; public Date getInvoiceDate() {
} return invoiceDate;
}
public void setInvoiceCode(String invoiceCode) { public void setInvoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode; this.invoiceCode = invoiceCode;
} }
public String getInvoiceCode() {
return invoiceCode; public String getInvoiceCode() {
} return invoiceCode;
}
public void setPurchaserName(String purchaserName) { public void setPurchaserName(String purchaserName) {
this.purchaserName = purchaserName; this.purchaserName = purchaserName;
} }
public String getPurchaserName() {
return purchaserName; public String getPurchaserName() {
} return purchaserName;
}
public void setCheckCode(String checkCode) { public void setCheckCode(String checkCode) {
this.checkCode = checkCode; this.checkCode = checkCode;
} }
public String getCheckCode() {
return checkCode; public String getCheckCode() {
} return checkCode;
}
public void setTotalAmount(double totalAmount) { public void setTotalAmount(double totalAmount) {
this.totalAmount = totalAmount; this.totalAmount = totalAmount;
} }
public double getTotalAmount() {
return totalAmount; public double getTotalAmount() {
} return totalAmount;
}
public void setPurchaserTaxNo(String purchaserTaxNo) { public void setPurchaserTaxNo(String purchaserTaxNo) {
this.purchaserTaxNo = purchaserTaxNo; this.purchaserTaxNo = purchaserTaxNo;
} }
public String getPurchaserTaxNo() {
return purchaserTaxNo; public String getPurchaserTaxNo() {
} return purchaserTaxNo;
}
public void setSellerBankAccount(String sellerBankAccount) { public void setSellerBankAccount(String sellerBankAccount) {
this.sellerBankAccount = sellerBankAccount; this.sellerBankAccount = sellerBankAccount;
} }
public String getSellerBankAccount() {
return sellerBankAccount; public String getSellerBankAccount() {
} return sellerBankAccount;
}
public void setInvoiceCiphertext(String invoiceCiphertext) { public void setInvoiceCiphertext(String invoiceCiphertext) {
this.invoiceCiphertext = invoiceCiphertext; this.invoiceCiphertext = invoiceCiphertext;
} }
public String getInvoiceCiphertext() {
return invoiceCiphertext; public String getInvoiceCiphertext() {
} return invoiceCiphertext;
}
public void setDetailList(List<DetailList> detailList) { public void setDetailList(List<DetailList> detailList) {
this.detailList = detailList; this.detailList = detailList;
} }
public List<DetailList> getDetailList() {
return detailList; public List<DetailList> getDetailList() {
} return detailList;
}
public void setHasSeal(int hasSeal) { public void setHasSeal(int hasSeal) {
this.hasSeal = hasSeal; this.hasSeal = hasSeal;
} }
public int getHasSeal() {
return hasSeal; public int getHasSeal() {
} return hasSeal;
}
public void setAmountTax(double amountTax) { public void setAmountTax(double amountTax) {
this.amountTax = amountTax; this.amountTax = amountTax;
} }
public double getAmountTax() {
return amountTax; public double getAmountTax() {
} return amountTax;
}
} }

View File

@ -1,18 +1,21 @@
package shkd.fi.fi.formplugin; package shkd.fi.fi.formplugin;
import kd.bos.bill.AbstractBillPlugIn; import kd.bos.bill.AbstractBillPlugIn;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.form.CloseCallBack; import kd.bos.form.CloseCallBack;
import kd.bos.form.FormShowParameter; import kd.bos.form.FormShowParameter;
import kd.bos.form.ShowType; import kd.bos.form.ShowType;
import kd.bos.form.control.events.ItemClickEvent; import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.form.events.ClosedCallBackEvent;
import java.util.EventObject; import java.util.EventObject;
import java.util.List;
public class ApFinapbillFormPlugin extends AbstractBillPlugIn { public class ApFinapbillFormPlugin extends AbstractBillPlugIn {
@Override @Override
public void registerListener(EventObject e) { public void registerListener(EventObject e) {
super.registerListener(e); super.registerListener(e);
this.addItemClickListeners("tbmain","shkd_fpocr"); this.addItemClickListeners("tbmain", "shkd_fpocr");
} }
@Override @Override
@ -21,13 +24,24 @@ public class ApFinapbillFormPlugin extends AbstractBillPlugIn {
String itemKey = evt.getItemKey(); String itemKey = evt.getItemKey();
if ("shkd_fpocr".equals(itemKey)) { if ("shkd_fpocr".equals(itemKey)) {
FormShowParameter parameter = new FormShowParameter(); FormShowParameter parameter = new FormShowParameter();
parameter.setCustomParam("id",""); Object id = this.getModel().getValue("id");
parameter.setCustomParam("billno",this.getModel().getValue("billno")); if (id.equals(0L)) {
// parameter.setCustomParam("id",""); this.getView().showMessage("请先保存单据");
return;
}
parameter.setCustomParam("id", id);
parameter.setCustomParam("billno", this.getModel().getValue("billno"));
parameter.setFormId("shkd_uploadattachments"); parameter.setFormId("shkd_uploadattachments");
parameter.setCloseCallBack(new CloseCallBack(this,"shkd_fpocr")); parameter.setCloseCallBack(new CloseCallBack(this, "shkd_fpocr"));
parameter.getOpenStyle().setShowType(ShowType.Modal); parameter.getOpenStyle().setShowType(ShowType.Modal);
this.getView().showForm(parameter); this.getView().showForm(parameter);
} }
} }
@Override
public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) {
super.closedCallBack(closedCallBackEvent);
}
} }

File diff suppressed because one or more lines are too long