Commit 17ce7625 by 邓实川 Committed by chenzg

发票金额数值限制

parent d3567596
......@@ -4,7 +4,7 @@
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
*/
package cn.timer.api.bean.qyzx.businessService;
import java.util.Date;
......@@ -27,90 +27,93 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <p>Title: QyzxInvoiceData.java</p>
* <p>Description: 发票资料实体类</p>
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
/**
* <p>
* Title: QyzxInvoiceData.java
* </p>
* <p>
* Description: 发票资料实体类
* </p>
*
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name="qyzx_invoice_data")
@Table(name = "qyzx_invoice_data")
@ApiModel("发票资料表")
public class QyzxInvoiceData extends Model<QyzxInvoiceData>{
public class QyzxInvoiceData extends Model<QyzxInvoiceData> {
private static final long serialVersionUID = 2890357568571822258L;
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="主键",example="1")
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "主键", example = "1")
private Integer id;
@ApiModelProperty(value="订单号",example="1")
private String orderNo;
@ApiModelProperty(value="发票抬头",example="广东优领")
private String invoiceTitle;
@ApiModelProperty(value="税号",example="915345164")
@ApiModelProperty(value = "订单号", example = "1")
private String orderNo;
@ApiModelProperty(value = "发票抬头", example = "广东优领")
private String invoiceTitle;
@ApiModelProperty(value = "税号", example = "915345164")
private String dutyParagraph;
@ApiModelProperty(value="公司地址",example="广东省")
@ApiModelProperty(value = "公司地址", example = "广东省")
private String companyAddress;
@ApiModelProperty(value="电话号码",example="18152456464")
@ApiModelProperty(value = "电话号码", example = "18152456464")
private String companyPhone;
@ApiModelProperty(value="开户行",example="中信银行广州白云支行")
@ApiModelProperty(value = "开户行", example = "中信银行广州白云支行")
private String bankName;
@ApiModelProperty(value="银行账号",example="8110901011900785029")
@ApiModelProperty(value = "银行账号", example = "8110901011900785029")
private String bankAccount;
@ApiModelProperty(value="发票类型",example="0-普通 1-专用")
@ApiModelProperty(value = "发票类型", example = "0-普通 1-专用")
private Integer invoiceType;
@ApiModelProperty(value="开票项目",example="")
@ApiModelProperty(value = "开票项目", example = "")
private String invoiceProject;
@ApiModelProperty(value="发票金额",example="")
@ApiModelProperty(value = "发票金额", example = "")
private Double invoiceValue;
@ApiModelProperty(value="收货人",example="翁🐻")
@ApiModelProperty(value = "收货人", example = "翁🐻")
private String consignee;
@ApiModelProperty(value="收货人电话",example="13144400255")
@ApiModelProperty(value = "收货人电话", example = "13144400255")
private String consigneePhone;
@ApiModelProperty(value="邮箱",example="13144400255@163.com")
@ApiModelProperty(value = "邮箱", example = "13144400255@163.com")
private String email;
@ApiModelProperty(value="收货地址省市区",example="广东省/广州市/白云区")
@ApiModelProperty(value = "收货地址省市区", example = "广东省/广州市/白云区")
private String shippingArea;
@ApiModelProperty(value="收货详细地址",example="白云东平伯曼酒店")
@ApiModelProperty(value = "收货详细地址", example = "白云东平伯曼酒店")
private String shippingAddress;
@ApiModelProperty(value="邮编",example="510080")
@ApiModelProperty(value = "邮编", example = "510080")
private String zipCode;
@ApiModelProperty(value="企业",example="117")
private Integer orgCode;
@ApiModelProperty(value="模块状态",example="默认0-开启,1-关闭")
private Integer status;
@ApiModelProperty(value="排序",example="")
private String sort;
@ApiModelProperty(value="是否删除",example="默认0-未删除,1-删除")
private Integer isDelete;
@ApiModelProperty(value = "企业", example = "117")
private Integer orgCode;
@ApiModelProperty(value = "模块状态", example = "默认0-开启,1-关闭")
private Integer status;
@ApiModelProperty(value = "排序", example = "")
private String sort;
@ApiModelProperty(value = "是否删除", example = "默认0-未删除,1-删除")
private Integer isDelete;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value="创建时间 ",example="")
@ApiModelProperty(value = "创建时间 ", example = "")
private Date createTime;
@ApiModelProperty(value="创建人 ",example="")
@ApiModelProperty(value = "创建人 ", example = "")
private Integer createUser;
@TableField(fill = FieldFill.INSERT_UPDATE)
@ApiModelProperty(value="修改时间 ",example="")
@ApiModelProperty(value = "修改时间 ", example = "")
private Date modifyTime;
@ApiModelProperty(value="修改人 ",example="")
@ApiModelProperty(value = "修改人 ", example = "")
private Integer modifyUser;
}
......@@ -223,29 +223,21 @@ public class QyzxBusinessController {
return ResultUtil.pageData(list, page.getTotal(), "查询成功");
}
public static void main(String[] args) {
QyzxInvoiceData qyzxInvoiceData = new QyzxInvoiceData();
qyzxInvoiceData.setBankAccount("123");
qyzxInvoiceData.setBankName("234");
if (!ObjectUtil.isAllNotEmpty(qyzxInvoiceData, qyzxInvoiceData.getBankAccount(),
qyzxInvoiceData.getBankName())) {
System.out.println("请完善发票信息!");
} else {
System.err.println("可以,不错");
}
}
@PostMapping(value = "/invoicing")
@ApiOperation(value = "开发票", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxInvoiceData> generateOrder(@CurrentUser UserBean userBean,
@RequestBody QyzxInvoiceData qyzxInvoiceData) {
Double invoiceValue = qyzxInvoiceData.getInvoiceValue();
if (invoiceValue <= 0)
return ResultUtil.error("请填写正确的发票金额!");
if (!ObjectUtil.isAllNotEmpty(
// qyzxInvoiceData,
qyzxInvoiceData.getInvoiceTitle(), qyzxInvoiceData.getDutyParagraph(),
qyzxInvoiceData.getCompanyAddress(), qyzxInvoiceData.getCompanyPhone(), qyzxInvoiceData.getBankName(),
qyzxInvoiceData.getBankAccount(), qyzxInvoiceData.getInvoiceType(), qyzxInvoiceData.getInvoiceProject(),
qyzxInvoiceData.getInvoiceValue(), qyzxInvoiceData.getConsignee(), qyzxInvoiceData.getConsigneePhone(),
invoiceValue, qyzxInvoiceData.getConsignee(), qyzxInvoiceData.getConsigneePhone(),
qyzxInvoiceData.getEmail(), qyzxInvoiceData.getShippingArea(), qyzxInvoiceData.getShippingAddress(),
qyzxInvoiceData.getZipCode())) {
return ResultUtil.error("请完善发票信息!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment