| | |
| | | import com.doumee.dao.business.model.InvoiceRecord; |
| | | import com.doumee.dao.business.model.Orders; |
| | | import com.doumee.dao.dto.ApplyInvoiceDTO; |
| | | import com.doumee.dao.dto.invoice.InvoiceA0001DTO; |
| | | import com.doumee.dao.dto.invoice.InvoiceA0001ItemDTO; |
| | | import com.doumee.dao.dto.invoice.InvoiceA0001Request; |
| | | import com.doumee.dao.vo.InvoiceRecordSummaryVO; |
| | | import com.doumee.service.business.InvoiceRecordService; |
| | | import com.doumee.service.common.EmailService; |
| | |
| | | record.setCreateTime(new Date()); |
| | | invoiceRecordMapper.insert(record); |
| | | |
| | | InvoiceA0001Request invoiceA0001Request = new InvoiceA0001Request(); |
| | | invoiceA0001Request.setAccess_token("");//请求token |
| | | invoiceA0001Request.setServiceKey("ebi_InvoiceHandle_newBlueInvoice"); |
| | | |
| | | |
| | | InvoiceA0001DTO invoiceA0001DTO = new InvoiceA0001DTO(); |
| | | invoiceA0001DTO.setData_resources("API"); |
| | | invoiceA0001DTO.setItype("026"); |
| | | invoiceA0001DTO.setNsrsbh("");//销售方纳税人识别号 |
| | | invoiceA0001DTO.setOrder_num("");//业务单据号;必须是唯一的 |
| | | invoiceA0001DTO.setZsfs("0"); |
| | | invoiceA0001DTO.setTspz("00"); |
| | | invoiceA0001DTO.setXsf_yhzh("");//销售方开户行名称与银行账号 自贡市XX银行XX街支行 8888888888 |
| | | invoiceA0001DTO.setXsf_mc("");//销售方名称 |
| | | invoiceA0001DTO.setXsf_nsrsbh("");//销售方纳税人识别号 |
| | | invoiceA0001DTO.setXsf_dzdh("");//销售方地址、电话 自贡市XX街6号悠悠大厦D8幢8单元8层 0830-66008888 |
| | | invoiceA0001DTO.setGmf_mc(""); //购买方名称 |
| | | invoiceA0001DTO.setKpr(""); //开票人 |
| | | invoiceA0001DTO.setJshj("");//价税合计;单位:元(2位小数) 价税合计=合计金额(不含税)+合计税额 注意:不能使用商品的单价、数量、税率、税额来进行累加,最后四舍五入,只能是总合计金额+合计税额 |
| | | invoiceA0001DTO.setHjje("");//合计金额 注意:不含税,单位:元(2位小数) |
| | | invoiceA0001DTO.setHjse("");//合计税额单位:元(2位小数) |
| | | |
| | | List<InvoiceA0001ItemDTO> common_fpkj_xmxx = new ArrayList<>(); |
| | | InvoiceA0001ItemDTO invoiceA0001ItemDTO = new InvoiceA0001ItemDTO(); |
| | | invoiceA0001ItemDTO.setFphxz("0"); |
| | | invoiceA0001ItemDTO.setXmmc("");//项目名称 |
| | | invoiceA0001ItemDTO.setXmdj("");//项目单价 小数点后6位 注意:单价是含税单价,大于0的数字 |
| | | invoiceA0001ItemDTO.setXmsl("1"); |
| | | invoiceA0001ItemDTO.setXmje(""); |
| | | invoiceA0001ItemDTO.setSe(""); |
| | | invoiceA0001ItemDTO.setSl(""); |
| | | common_fpkj_xmxx.add(invoiceA0001ItemDTO); |
| | | invoiceA0001DTO.setCommon_fpkj_xmxx(common_fpkj_xmxx); |
| | | invoiceA0001Request.setData(invoiceA0001DTO); |
| | | // 更新订单发票状态为申请中 |
| | | order.setInvoiceStatus(Constants.TWO); |
| | | order.setUpdateTime(new Date()); |