From 4b8a5498ec77dd1b5385cd0b66f2f02e34ca2989 Mon Sep 17 00:00:00 2001 From: yuqh <123456> Date: Thu, 3 Apr 2025 08:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/MakeInvoicePluginInitializer.java | 6 +- .../makeinvoice/dao/IMakeInvoiceDao.java | 19 + .../dao/impl/MakeInvoiceDaoImpl.java | 20 + .../makeinvoice/entity/MakeInvoiceEntity.java | 531 ++++++++++++++++++ .../makeinvoice/entity/MakeInvoiceEntity.xml | 70 +++ .../service/IMakeInvoiceService.java | 19 + .../service/impl/MakeInvoiceServiceImpl.java | 27 + 7 files changed, 691 insertions(+), 1 deletion(-) create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/IMakeInvoiceDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/impl/MakeInvoiceDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/IMakeInvoiceService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/impl/MakeInvoiceServiceImpl.java diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java index 4736a39c..364de1db 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/MakeInvoicePluginInitializer.java @@ -2,10 +2,12 @@ package com.hzya.frame.plugin.ht.plugin; import com.alibaba.fastjson.JSONObject; import com.hzya.frame.base.PluginBaseEntity; +import com.hzya.frame.seeyon.makeinvoice.service.IMakeInvoiceService; import com.hzya.frame.web.entity.BaseResult; import com.hzya.frame.web.entity.JsonResultEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; /** * @Description @@ -14,6 +16,8 @@ import org.slf4j.LoggerFactory; **/ public class MakeInvoicePluginInitializer extends PluginBaseEntity { Logger logger = LoggerFactory.getLogger(getClass()); + @Autowired + private IMakeInvoiceService makeInvoiceService; /*** * 插件初始化方法 * @Author 👻👻👻👻👻👻👻👻 gjh @@ -91,7 +95,7 @@ public class MakeInvoicePluginInitializer extends PluginBaseEntity { **/ @Override public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { - + JsonResultEntity result = makeInvoiceService.sendMakeInvoiceSw(requestJson); return BaseResult.getSuccessMessageEntity("操作成功"); } } diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/IMakeInvoiceDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/IMakeInvoiceDao.java new file mode 100644 index 00000000..12c863de --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/IMakeInvoiceDao.java @@ -0,0 +1,19 @@ +package com.hzya.frame.seeyon.makeinvoice.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity; + +import java.util.List; + +public interface IMakeInvoiceDao extends IBaseDao { +/** + * + * @content 获取未推送税务的蓝字发票集合 + * @className: Administrator + * @author laborer + * @date 2025-03-20 15:32 + * + */ + + List getMakeInvoiceByState(MakeInvoiceEntity entity); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/impl/MakeInvoiceDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/impl/MakeInvoiceDaoImpl.java new file mode 100644 index 00000000..a2990984 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/dao/impl/MakeInvoiceDaoImpl.java @@ -0,0 +1,20 @@ +package com.hzya.frame.seeyon.makeinvoice.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.makeinvoice.dao.IMakeInvoiceDao; +import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity; +import org.springframework.stereotype.Repository; + +import java.util.HashMap; +import java.util.List; + +@Repository(value = "MakeInvoiceDaoImpl") +public class MakeInvoiceDaoImpl extends MybatisGenericDao implements IMakeInvoiceDao { + + @Override + @DS("#entity.dataSourceCode") + public List getMakeInvoiceByState(MakeInvoiceEntity entity) { + return (List) super.selectList("com.hzya.frame.seeyon.makeinvoice.dao.impl.MakeInvoiceDaoImpl.getMakeInvoiceByState",entity); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.java new file mode 100644 index 00000000..46167157 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.java @@ -0,0 +1,531 @@ +package com.hzya.frame.seeyon.makeinvoice.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +public class MakeInvoiceEntity extends BaseEntity { + + private String sellerTaxNo;//企业纳税人识别号,建议传 + private String templateId;//模版ID,固定值: 测试环境: 生产环境:" + private String businessNo;//业务单号 (40长度) + private String superiorBusinessNo;//上级业务单号,后续接口创建红字发票申请时,可根据此字段查找该单号下的已开发票。可传:销售单号等,或可与业务单号保持一致 + private String buyerName;//购买方名称,收购发票会以在开票企业在云帐房内维护的信息覆盖该属性 + private String buyerTaxNo;//购买方纳税人识别号,收购发票时与企业编码二选一必传 + private String buyerAddrPhone;//购买方地址、电话,收购发票会以在开票企业在云帐房内维护的信息覆盖该属性 + private String buyerBankAccount;//购买方开户行及账号,收购发票会以在开票企业在云帐房内维护的信息覆盖该属性 + private String applyPerson;//申请人,为空时,平台将记录申请人为“系统自动” + private String applyEmailNotice;//是否邮件通知申请人,按平台内申请人邮箱发送示例值:0可选值:1 是0 否 + private String buyerEmailNotice;//是否邮件通知购买方,按平台内购买方邮箱发送示例值:0可选值:1 是0 否 + private String workcode;// 申请人工号 + private String otherEmail;//其他发票接收邮箱,可支持最多10个邮箱,邮箱间以英文字符;分隔 + private String buyerContact;//购买方发票邮寄接收联系人名称 + private String buyerMobile;//购买方发票邮寄接收手机号 + private String buyerRecvAddress;//购买方发票邮寄接收地址 + private String applicationRemark;//申请单其他说明 + private String attachments;//附件,文件Url地址列表 + private String notifyUrl;//回调通知地址【必须为外网可以调通的地址】 + private String specialInvoiceMark;//特殊票种标识 00非特殊票种 01农产品销售 02农产品收购 03 建筑服务 04 货物运输服务 05 不动产销售服务 06不动产经营租赁服务 14机动车" + private String sellerName;//销售方名称,收购类发票必填 ,非收购发票会以在开票企业在云帐房内维护的信息覆盖该属性 + private String sellerAddrPhone;//销售方地址、电话,非收购发票会以在开票企业在云帐房内维护的信息覆盖该属性 + private String sellerBankAccount;//销售方银行账号,非收购发票会以在开票企业在云帐房内维护的信息覆盖该属性 + private String extFieldJSONObject;//自定义字段,具体传参见示例 + private String extendFields;//自定义扩展字段.最多支持6个文本类型和4个日期类型,日期格式为yyyy-MM-dd.其中的key为用户自行配置(集团视角-应用设置-扩展字段配置) + private String applicationForm;//申请单信息 + private String invoiceType;//发票种类示例值:0可选值:0 增值税普通发票10 增值税专用发票2 增值税电子普通发票13增值税电子专用发票 21电子发票(增值税专用发票) 22电子发票(普通发票) + private String isPerson;//是否自然人 1是 默认为否 + private String levyTaxType;//征税方式,差额征税时,一个开票申请中只可有一张发票示例值:0 可选值:0 普通征税2 差额征税(差额开具)3 差额征税(全额开具) + private String deduction;//扣除额,差额征税时必填 + private String remark;//发票备注,换行使用\n隔开230字节(115个纯汉字) + private String detailList;//开票明细 + private String itemNo;//明细行编号,为空时,平台将自动生成一个唯一编号 + private String itemName;//商品名称 + private String taxCateCode;//税收分类编码,19位 + private String spec;//规格型号/(车辆识别代号/车架号码) + private String unit;//单位 + private String quantity;//数量示例值:200 (特殊票种为机动车时必填,且车架识别代号/车架号码不为空时,数值必须为正整数) + private String unitPrice;//单价示例值:100.23(特殊票种为机动车时必填) + private String price;//金额示例值:100.23 + private String taxRate;//税率示例值:0.03 + private String zeroFlag;//零税率标识,如果税率为0,必填示例值:1 可选值: 1:免税2:不征收3:普通零税率 + private String tax;//税额示例值:100.23 + private String includeTaxTag;//含税标识,为1时,则单价和金额为不含税单价及不含税金额示例值:0 可选值:0 含税1 不含税 + private String detailType;//明细行性质示例值:0 可选值: 0 正常行1 折扣行2 被折扣行 如果是折扣行,只开票明细只接受金额,并且金额不能超过被折扣行 + private String enjoyPreferentialFlag;//是否享受优惠 示例值:0 可选值: 0 否  1是 + private String preferentialPolicyType;//优惠政策类型(是否享受优惠为是时必传)传递 code 示例:100 100-简易征收 107-按3%简易征收, 108-按5%简易征收, 109-按5%简易征收减按1.5%计征" + private String specialIndustryDTO;//特殊票种信息-建筑服务 + private String place;//地址:建筑服务发生地,不动产地址。“-”分割 示例:江苏省-南京市-雨花台区 北京市-海淀区" + private String placeOfDetail;//详细地址:建筑服务发生地详细地址,不动产详细地址 + private String constructionProjectName;//建筑项目名称 + private String kqysssxbgglbm;//跨区域涉税事项报验管理編号 + private String productNo;//土地增值税项目编号 + private String crossDistinctCityFlag;//跨地(市)标志:是,否 + + + private String certificateOfTitle;//产权证书/不动产权证号 + private String areaUnit;//面积单位: 平方千米 平方米 孔公里 公顷 亩 h㎡ k㎡ ㎡" + private String startDate;//租赁开始,格式yyyy-MM-dd + private String endDate;//租赁结束,格式yyyy-MM-dd + + public String getSellerTaxNo() { + return sellerTaxNo; + } + + public void setSellerTaxNo(String sellerTaxNo) { + this.sellerTaxNo = sellerTaxNo; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getBusinessNo() { + return businessNo; + } + + public void setBusinessNo(String businessNo) { + this.businessNo = businessNo; + } + + public String getSuperiorBusinessNo() { + return superiorBusinessNo; + } + + public void setSuperiorBusinessNo(String superiorBusinessNo) { + this.superiorBusinessNo = superiorBusinessNo; + } + + public String getBuyerName() { + return buyerName; + } + + public void setBuyerName(String buyerName) { + this.buyerName = buyerName; + } + + public String getBuyerTaxNo() { + return buyerTaxNo; + } + + public void setBuyerTaxNo(String buyerTaxNo) { + this.buyerTaxNo = buyerTaxNo; + } + + public String getBuyerAddrPhone() { + return buyerAddrPhone; + } + + public void setBuyerAddrPhone(String buyerAddrPhone) { + this.buyerAddrPhone = buyerAddrPhone; + } + + public String getBuyerBankAccount() { + return buyerBankAccount; + } + + public void setBuyerBankAccount(String buyerBankAccount) { + this.buyerBankAccount = buyerBankAccount; + } + + public String getApplyPerson() { + return applyPerson; + } + + public void setApplyPerson(String applyPerson) { + this.applyPerson = applyPerson; + } + + public String getApplyEmailNotice() { + return applyEmailNotice; + } + + public void setApplyEmailNotice(String applyEmailNotice) { + this.applyEmailNotice = applyEmailNotice; + } + + public String getBuyerEmailNotice() { + return buyerEmailNotice; + } + + public void setBuyerEmailNotice(String buyerEmailNotice) { + this.buyerEmailNotice = buyerEmailNotice; + } + + public String getWorkcode() { + return workcode; + } + + public void setWorkcode(String workcode) { + this.workcode = workcode; + } + + public String getOtherEmail() { + return otherEmail; + } + + public void setOtherEmail(String otherEmail) { + this.otherEmail = otherEmail; + } + + public String getBuyerContact() { + return buyerContact; + } + + public void setBuyerContact(String buyerContact) { + this.buyerContact = buyerContact; + } + + public String getBuyerMobile() { + return buyerMobile; + } + + public void setBuyerMobile(String buyerMobile) { + this.buyerMobile = buyerMobile; + } + + public String getBuyerRecvAddress() { + return buyerRecvAddress; + } + + public void setBuyerRecvAddress(String buyerRecvAddress) { + this.buyerRecvAddress = buyerRecvAddress; + } + + public String getApplicationRemark() { + return applicationRemark; + } + + public void setApplicationRemark(String applicationRemark) { + this.applicationRemark = applicationRemark; + } + + public String getAttachments() { + return attachments; + } + + public void setAttachments(String attachments) { + this.attachments = attachments; + } + + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + public String getSpecialInvoiceMark() { + return specialInvoiceMark; + } + + public void setSpecialInvoiceMark(String specialInvoiceMark) { + this.specialInvoiceMark = specialInvoiceMark; + } + + public String getSellerName() { + return sellerName; + } + + public void setSellerName(String sellerName) { + this.sellerName = sellerName; + } + + public String getSellerAddrPhone() { + return sellerAddrPhone; + } + + public void setSellerAddrPhone(String sellerAddrPhone) { + this.sellerAddrPhone = sellerAddrPhone; + } + + public String getSellerBankAccount() { + return sellerBankAccount; + } + + public void setSellerBankAccount(String sellerBankAccount) { + this.sellerBankAccount = sellerBankAccount; + } + + public String getExtFieldJSONObject() { + return extFieldJSONObject; + } + + public void setExtFieldJSONObject(String extFieldJSONObject) { + this.extFieldJSONObject = extFieldJSONObject; + } + + public String getExtendFields() { + return extendFields; + } + + public void setExtendFields(String extendFields) { + this.extendFields = extendFields; + } + + public String getApplicationForm() { + return applicationForm; + } + + public void setApplicationForm(String applicationForm) { + this.applicationForm = applicationForm; + } + + public String getInvoiceType() { + return invoiceType; + } + + public void setInvoiceType(String invoiceType) { + this.invoiceType = invoiceType; + } + + public String getIsPerson() { + return isPerson; + } + + public void setIsPerson(String isPerson) { + this.isPerson = isPerson; + } + + public String getLevyTaxType() { + return levyTaxType; + } + + public void setLevyTaxType(String levyTaxType) { + this.levyTaxType = levyTaxType; + } + + public String getDeduction() { + return deduction; + } + + public void setDeduction(String deduction) { + this.deduction = deduction; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getDetailList() { + return detailList; + } + + public void setDetailList(String detailList) { + this.detailList = detailList; + } + + public String getItemNo() { + return itemNo; + } + + public void setItemNo(String itemNo) { + this.itemNo = itemNo; + } + + public String getItemName() { + return itemName; + } + + public void setItemName(String itemName) { + this.itemName = itemName; + } + + public String getTaxCateCode() { + return taxCateCode; + } + + public void setTaxCateCode(String taxCateCode) { + this.taxCateCode = taxCateCode; + } + + public String getSpec() { + return spec; + } + + public void setSpec(String spec) { + this.spec = spec; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getUnitPrice() { + return unitPrice; + } + + public void setUnitPrice(String unitPrice) { + this.unitPrice = unitPrice; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getTaxRate() { + return taxRate; + } + + public void setTaxRate(String taxRate) { + this.taxRate = taxRate; + } + + public String getZeroFlag() { + return zeroFlag; + } + + public void setZeroFlag(String zeroFlag) { + this.zeroFlag = zeroFlag; + } + + public String getTax() { + return tax; + } + + public void setTax(String tax) { + this.tax = tax; + } + + public String getIncludeTaxTag() { + return includeTaxTag; + } + + public void setIncludeTaxTag(String includeTaxTag) { + this.includeTaxTag = includeTaxTag; + } + + public String getDetailType() { + return detailType; + } + + public void setDetailType(String detailType) { + this.detailType = detailType; + } + + public String getEnjoyPreferentialFlag() { + return enjoyPreferentialFlag; + } + + public void setEnjoyPreferentialFlag(String enjoyPreferentialFlag) { + this.enjoyPreferentialFlag = enjoyPreferentialFlag; + } + + public String getPreferentialPolicyType() { + return preferentialPolicyType; + } + + public void setPreferentialPolicyType(String preferentialPolicyType) { + this.preferentialPolicyType = preferentialPolicyType; + } + + public String getSpecialIndustryDTO() { + return specialIndustryDTO; + } + + public void setSpecialIndustryDTO(String specialIndustryDTO) { + this.specialIndustryDTO = specialIndustryDTO; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getPlaceOfDetail() { + return placeOfDetail; + } + + public void setPlaceOfDetail(String placeOfDetail) { + this.placeOfDetail = placeOfDetail; + } + + public String getConstructionProjectName() { + return constructionProjectName; + } + + public void setConstructionProjectName(String constructionProjectName) { + this.constructionProjectName = constructionProjectName; + } + + public String getKqysssxbgglbm() { + return kqysssxbgglbm; + } + + public void setKqysssxbgglbm(String kqysssxbgglbm) { + this.kqysssxbgglbm = kqysssxbgglbm; + } + + public String getProductNo() { + return productNo; + } + + public void setProductNo(String productNo) { + this.productNo = productNo; + } + + public String getCrossDistinctCityFlag() { + return crossDistinctCityFlag; + } + + public void setCrossDistinctCityFlag(String crossDistinctCityFlag) { + this.crossDistinctCityFlag = crossDistinctCityFlag; + } + + public String getCertificateOfTitle() { + return certificateOfTitle; + } + + public void setCertificateOfTitle(String certificateOfTitle) { + this.certificateOfTitle = certificateOfTitle; + } + + public String getAreaUnit() { + return areaUnit; + } + + public void setAreaUnit(String areaUnit) { + this.areaUnit = areaUnit; + } + + public String getStartDate() { + return startDate; + } + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.xml new file mode 100644 index 00000000..68fe74db --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/entity/MakeInvoiceEntity.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + id + + + + + + + + + + + update ${tabName} set ${pushStatusField} =#{pushStatus} where id=#{dataId} + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/IMakeInvoiceService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/IMakeInvoiceService.java new file mode 100644 index 00000000..981808af --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/IMakeInvoiceService.java @@ -0,0 +1,19 @@ +package com.hzya.frame.seeyon.makeinvoice.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity; +import com.hzya.frame.web.entity.JsonResultEntity; + +public interface IMakeInvoiceService extends IBaseService { +/** + * + * @content 推送蓝字发票申请单申请到税务平台 + * @className: Administrator + * @author laborer + * @date 2025-03-20 15:26 + * + */ + +JsonResultEntity sendMakeInvoiceSw(JSONObject requestJson); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/impl/MakeInvoiceServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/impl/MakeInvoiceServiceImpl.java new file mode 100644 index 00000000..6d23919c --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/makeinvoice/service/impl/MakeInvoiceServiceImpl.java @@ -0,0 +1,27 @@ +package com.hzya.frame.seeyon.makeinvoice.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.makeinvoice.dao.IMakeInvoiceDao; +import com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity; +import com.hzya.frame.seeyon.makeinvoice.service.IMakeInvoiceService; +import com.hzya.frame.web.entity.BaseResult; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service("ZxBankServiceImpl") +public class MakeInvoiceServiceImpl extends BaseService implements IMakeInvoiceService { + +@Autowired +private IMakeInvoiceDao makeInvoiceDao; + @Override + public JsonResultEntity sendMakeInvoiceSw(JSONObject requestJson) { + MakeInvoiceEntity makeInvoice = new MakeInvoiceEntity(); + makeInvoice.setDataSourceCode("HT_OA"); + List makeInvoiceEntityList = makeInvoiceDao.getMakeInvoiceByState(makeInvoice); + return BaseResult.getSuccessMessageEntity("操作成功"); + } +}