Compare commits
4 Commits
eaf2398810
...
9df31890d4
Author | SHA1 | Date |
---|---|---|
|
9df31890d4 | |
|
cb82bed10c | |
|
414923ea0a | |
|
4b8a5498ec |
|
@ -32,5 +32,7 @@ public interface IIncomeInvoiceDao extends IBaseDao<IncomeInvoiceEntity, String>
|
|||
List<IncomeInvoiceEntity> queryZtzz(IncomeInvoiceEntity entity);
|
||||
|
||||
List<JSONObject> queryByAloneId(IncomeInvoiceEntity jnquerydata);
|
||||
|
||||
List<JSONObject> queryAccount(IncomeInvoiceEntity jnentity);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,5 +66,11 @@ public class IncomeInvoiceDaoImpl extends MybatisGenericDao<IncomeInvoiceEntity,
|
|||
List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryByAloneId", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryAccount(IncomeInvoiceEntity jnentity) {
|
||||
List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryAccountByZq", jnentity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -534,5 +534,183 @@
|
|||
<if test="aloneId != null and aloneId != ''"> and a.ALONE_ID = #{aloneId} </if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="queryAccountByZq" resultType="com.alibaba.fastjson.JSONObject" parameterType="com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity">
|
||||
-- CREATE or replace VIEW V_LPHB_KMFZYE1 AS
|
||||
select * from (
|
||||
SELECT
|
||||
year,
|
||||
adjustperiod as period,
|
||||
year || '-' || adjustperiod as yearperiod,
|
||||
nt.code AS subjectCode,
|
||||
oa.name AS subjectName,
|
||||
oa.dispname as subjectFullName,
|
||||
( SELECT code FROM bd_account WHERE pk_account = nt.pid ) as superCode,
|
||||
case
|
||||
when balanorient = '1' then '-1'
|
||||
when balanorient = '0' then '1'
|
||||
end as subjectDir,
|
||||
case
|
||||
when pk_acctype = '0001Z01000000000019S' then 1
|
||||
when pk_acctype = '0001Z01000000000019T' then 2
|
||||
when pk_acctype = '0001Z01000000000019V' then 3
|
||||
when pk_acctype = '0001Z01000000000019U' then 4
|
||||
when pk_acctype = '0001Z01000000000019W' then 5
|
||||
when pk_acctype = '0001Z01000000000019X' then 6
|
||||
end as subjectType,
|
||||
nt.sumprint_level as subjectLevel,
|
||||
case
|
||||
when nt.sumprint_level = '0' then 1
|
||||
when nt.sumprint_level != '0' then 0
|
||||
end as endLevel,
|
||||
sum( debitamount ) AS debitValue,-- 本期借方發生額
|
||||
sum( localcreditamount ) AS creditValue,-- 本期貸方發生額
|
||||
CASE
|
||||
WHEN sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) ) > 0 THEN'1'
|
||||
WHEN sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) ) = 0 THEN'0' ELSE '-1' END AS initialSubjectDir,
|
||||
case
|
||||
when sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) )>0 then sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) )
|
||||
else 0 end AS initialDebitBalanceValue, -- 期初余额借方金额
|
||||
case when sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) ) < 0 then sum( qmlocalamount ) - ( sum( localdebitamount ) - sum( localcreditamount ) )
|
||||
else 0 end AS initialCreditBalanceValue, -- 期初余额贷方金额
|
||||
|
||||
CASE
|
||||
WHEN sum( qmamount ) > 0 THEN'1'
|
||||
WHEN sum( qmamount ) = 0 THEN'0' ELSE '-1' END AS balanceSubjectDir,
|
||||
case when sum( qmlocalamount )>0 then sum( qmlocalamount )
|
||||
else 0 end as balanceDeditValue, -- 期末余额借方金额
|
||||
|
||||
case when sum( qmlocalamount )>0 then sum( qmlocalamount )
|
||||
else 0 end as balanceCreditValue, -- 期末余额贷方金额
|
||||
sum( ljlocaldebitamount ) AS totalDebitValue,
|
||||
sum( ljlocalcreditamount ) AS totalCreditValue,
|
||||
org.code GSBM,
|
||||
org.name GSMC
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT
|
||||
accperiodmonth.periodyear YEAR,
|
||||
accperiodmonth.PERIOD ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid assid,
|
||||
0 AS localdebitamount,
|
||||
0 AS localcreditamount,
|
||||
0 AS debitamount,
|
||||
0 AS creditamount,
|
||||
sum( localdebitamount ) AS ljlocaldebitamount,
|
||||
sum( localcreditamount ) AS ljlocalcreditamount,
|
||||
sum( debitamount ) AS ljdebitamount,
|
||||
sum( creditamount ) AS ljcreditamount,
|
||||
0 AS qmlocalamount,
|
||||
0 AS qmamount
|
||||
FROM
|
||||
( SELECT substr( yearmth, 0, 4 ) periodyear, substr( yearmth, 6, 7 ) period FROM bd_accperiodmonth WHERE yearmth < TO_CHAR( SYSDATE, 'YYYY-MM' ) ) accperiodmonth
|
||||
LEFT JOIN gl_balance dezz ON dezz.YEAR = accperiodmonth.periodyear
|
||||
AND dezz.adjustperiod < = accperiodmonth.period
|
||||
WHERE
|
||||
voucherkind != 5
|
||||
AND voucherkind != 4
|
||||
AND dezz.adjustperiod > '00'
|
||||
GROUP BY
|
||||
accperiodmonth.periodyear,
|
||||
accperiodmonth.PERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid UNION ALL
|
||||
SELECT DISTINCT
|
||||
dezz.YEAR,
|
||||
dezz.ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid,
|
||||
sum( localdebitamount ) AS localdebitamount,
|
||||
sum( localcreditamount ) AS localcreditamount,
|
||||
sum( debitamount ) AS debitamount,
|
||||
sum( creditamount ) AS creditamount,
|
||||
0 AS ljlocaldebitamount,
|
||||
0 AS ljlocalcreditamount,
|
||||
0 AS ljdebitamount,
|
||||
0 AS ljcreditamount,
|
||||
0 AS qmlocalamount,
|
||||
0 AS qmamount
|
||||
FROM
|
||||
gl_balance dezz
|
||||
WHERE
|
||||
voucherkind != 5
|
||||
AND voucherkind != 4
|
||||
GROUP BY
|
||||
dezz.YEAR,
|
||||
dezz.ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid UNION ALL
|
||||
SELECT DISTINCT
|
||||
accperiodmonth.periodyear YEAR,
|
||||
accperiodmonth.PERIOD ADJUSTPERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid assid,
|
||||
0 AS localdebitamount,
|
||||
0 AS localcreditamount,
|
||||
0 AS debitamount,
|
||||
0 AS creditamount,
|
||||
0 AS ljlocaldebitamount,
|
||||
0 AS ljlocalcreditamount,
|
||||
0 AS ljdebitamount,
|
||||
0 AS ljcreditamount,
|
||||
sum( localdebitamount ) - sum( localcreditamount ) AS qmlocalamount,
|
||||
sum( debitamount ) - sum( creditamount ) AS qmamount
|
||||
FROM
|
||||
( SELECT substr( yearmth, 0, 4 ) periodyear, substr( yearmth, 6, 7 ) period FROM bd_accperiodmonth WHERE yearmth < TO_CHAR( SYSDATE, 'YYYY-MM' ) ) accperiodmonth
|
||||
LEFT JOIN gl_balance dezz ON dezz.YEAR = accperiodmonth.periodyear
|
||||
AND dezz.adjustperiod < = accperiodmonth.period
|
||||
WHERE
|
||||
voucherkind != 5
|
||||
AND voucherkind != 4
|
||||
AND dezz.adjustperiod >= '00'
|
||||
AND dezz.adjustperiod != '12A'
|
||||
GROUP BY
|
||||
accperiodmonth.periodyear,
|
||||
accperiodmonth.PERIOD,
|
||||
dezz.pk_org,
|
||||
dezz.pk_accasoa,
|
||||
dezz.pk_currtype,
|
||||
dezz.assid
|
||||
) a
|
||||
LEFT JOIN org_orgs org ON org.pk_org = a.pk_org
|
||||
LEFT JOIN bd_accasoa oa ON oa.pk_accasoa = a.pk_accasoa
|
||||
LEFT JOIN bd_account nt ON nt.pk_account = oa.pk_account
|
||||
LEFT JOIN bd_currtype currtype ON a.pk_currtype = currtype.pk_currtype
|
||||
LEFT JOIN gl_docfree1 fr1 ON fr1.assid = a.assid
|
||||
where adjustperiod != '12A'
|
||||
and adjustperiod >= '00'
|
||||
and adjustperiod != '00'
|
||||
GROUP BY
|
||||
year,
|
||||
adjustperiod,
|
||||
nt.code ,
|
||||
oa.name ,
|
||||
oa.dispname,
|
||||
nt.pid,
|
||||
balanorient,
|
||||
pk_acctype,
|
||||
org.code,
|
||||
org.name,
|
||||
nt.sumprint_level
|
||||
)m1
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="orgCode != null and orgCode !='' "> and gsbm = #{orgCode} </if>
|
||||
<if test="sysData != null and sysData !='' "> and yearperiod = {sysData} </if>
|
||||
</trim>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
}
|
||||
String cbUrl = "http://oapi.nanofintax.com/api/collect/uploadFinancialReport?accessToken=";
|
||||
String dataUrl = "http://oapi.nanofintax.com/api/invoice_receive/fp/v1/query?accessToken=";
|
||||
String uploadBalanceTableUrl = "http://oapi.nanofintax.com/api/collect/uploadBalanceTable?accessToken";
|
||||
String tokenUrl = "http://oapi.nanofintax.com/api/getToken";
|
||||
String accessKey = "6X3B526P5HqE6ums";
|
||||
String accessSecret = "34e5fc32ac894a2ba2ade8c3852c7a0a";
|
||||
|
@ -697,18 +698,20 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||
JSONObject businessDataStr = jsonStr.getJSONObject("businessDataStr");
|
||||
String eventType = jsonStr.getString("eventType");
|
||||
String ztbm = businessDataStr.getString("ztCode");//账套编码
|
||||
String cjzq = businessDataStr.getString("period");//采集账期
|
||||
String rwbm = businessDataStr.getString("taskNo");//任务编码
|
||||
switch (eventType) {
|
||||
case "onProcessFinished"://流程结束事件,同步物料到U8C
|
||||
if(businessDataStr.getString("dataType") == null){//数据类型
|
||||
return BaseResult.getFailureMessageEntity("数据类型为空");
|
||||
}
|
||||
if(businessDataStr.getString("dataType").equals("1")){//科目余额
|
||||
|
||||
taskExecutor.execute(() -> sendAccountCodeReport(ztbm,cjzq,rwbm));//科目余额
|
||||
return BaseResult.getSuccessMessageEntity("数据获取成功");
|
||||
}
|
||||
if(businessDataStr.getString("dataType").equals("2")){//财报
|
||||
String ztbm = businessDataStr.getString("ztCode");//账套编码
|
||||
String cjzq = businessDataStr.getString("period");//采集账期
|
||||
String rwbm = businessDataStr.getString("taskNo");//任务编码
|
||||
|
||||
if(ztbm == null || "".equals(ztbm)){
|
||||
return BaseResult.getFailureMessageEntity("账套编码为空");
|
||||
}
|
||||
|
@ -736,6 +739,54 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
|
||||
}
|
||||
|
||||
private JsonResultEntity sendAccountCodeReport(String ztbm, String cjzq, String rwbm) {
|
||||
String access_token = getToken();
|
||||
if (access_token == null) {
|
||||
return BaseResult.getFailureMessageEntity("token获取失败");
|
||||
}
|
||||
String url = uploadBalanceTableUrl+access_token;
|
||||
//通过公司编码、账期查询该单位的科目余额信息下发有度
|
||||
//查询当月帐套组织
|
||||
IncomeInvoiceEntity jnentity = new IncomeInvoiceEntity();
|
||||
jnentity.setDataSourceCode("htBip");
|
||||
jnentity.setSysData(cjzq);
|
||||
jnentity.setOrgCode(ztbm);
|
||||
//查询该账期下的科目余额
|
||||
List<JSONObject> jnlist = incomeInvoiceDao.queryAccount(jnentity);
|
||||
//正常来说数组不存在空的情况 如果为空就直接下发空数组给他们
|
||||
JSONObject sendData = new JSONObject();
|
||||
sendData.put("accessKey",accessKey);
|
||||
long timestamp = System.currentTimeMillis();
|
||||
sendData.put("timestamp",timestamp);
|
||||
sendData.put("taskNo",rwbm);
|
||||
sendData.put("period",cjzq);
|
||||
String a = YzfSignUtil.signRequest(sendData,accessSecret);
|
||||
sendData.put("sign",a);
|
||||
sendData.put("balanceTableList",jnlist);
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
headers.put("Content-Type", "application/json; charset=utf-8");
|
||||
String returndata = sendPost(url, headers, sendData.toJSONString());
|
||||
if (returndata != null && JSONObject.isValidObject(returndata)) {
|
||||
JSONObject dataJson = JSONObject.parseObject(returndata);
|
||||
if(dataJson != null && dataJson.getString("code") != null && "0".equals( dataJson.getString("code"))){
|
||||
JSONObject data = dataJson.getJSONObject("result");
|
||||
if(data != null ){
|
||||
if(data != null && data.getString("resultCode") != null && "0".equals( data.getString("resultCode"))){
|
||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+data.getString("message"));
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
}
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("发送失败:"+returndata);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.hzya.frame.execsql.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.hzya.frame.datasource.DataSourceUtil;
|
||||
import com.hzya.frame.execsql.entity.ExecSqlEntity;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
|
@ -80,7 +81,7 @@ public class ExecSqlServiceImpl implements IExecSqlService {
|
|||
@Override
|
||||
public int execUpdateSql(String sql, String data_source_code) throws Exception {
|
||||
logger.info("=============进入execUpdateSql方法============");
|
||||
if (ObjectUtils.isEmpty(sql)) {
|
||||
if (StrUtil.isNotEmpty(sql)) {
|
||||
if (sql.contains("where") || sql.contains("WHERE")) {
|
||||
// SqlSession sqlSession = getSqlSession(data_source_code);
|
||||
// SqlSession sqlSession = new DataSourceUtil().getDefaultSqlSession();
|
||||
|
|
|
@ -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<MakeInvoiceEntity, String> {
|
||||
/**
|
||||
*
|
||||
* @content 获取未推送税务的蓝字发票集合
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-03-20 15:32
|
||||
*
|
||||
*/
|
||||
|
||||
List<MakeInvoiceEntity> getMakeInvoiceByState(MakeInvoiceEntity entity);
|
||||
}
|
|
@ -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<MakeInvoiceEntity,String> implements IMakeInvoiceDao {
|
||||
|
||||
@Override
|
||||
@DS("#entity.dataSourceCode")
|
||||
public List<MakeInvoiceEntity> getMakeInvoiceByState(MakeInvoiceEntity entity) {
|
||||
return (List<MakeInvoiceEntity>) super.selectList("com.hzya.frame.seeyon.makeinvoice.dao.impl.MakeInvoiceDaoImpl.getMakeInvoiceByState",entity);
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.seeyon.makeinvoice.dao.impl.MakeInvoiceDaoImpl">
|
||||
<resultMap id="get-MakeInvoiceEntity-result" type="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
<result property="sourceFlowNumber" column="sourceFlowNumber" />
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="MakeInvoiceEntity_Base_Column_List">
|
||||
id
|
||||
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="getMakeInvoiceByState" resultMap="get-MakeInvoiceEntity-result" parameterType="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
select
|
||||
main.id as id,
|
||||
field0163 as sellerTaxNo,-- 销方税号
|
||||
'等待客户提供' as templateId, -- 模版ID
|
||||
field0117 as businessNo,-- 申请单单号
|
||||
field0106 as buyerName,-- 客户名称
|
||||
field0105 as buyerTaxNo,-- 客户税号
|
||||
field0100 + ' ' + field0101 as buyerAddrPhone,-- 地址和电话中间用空格隔开
|
||||
field0103 + ' ' + field0102 as buyerBankAccount,-- 开户行名称和开户行银行账户中间用空格隔开
|
||||
field0115 as applyPerson,-- 制单人
|
||||
0 as applyEmailNotice,-- 是否邮件通知申请人
|
||||
0 as buyerEmailNotice,-- 是否邮件通知购买方
|
||||
field0111 as otherEmail,-- 收件人邮箱
|
||||
field0126 as buyerRecvAddress,-- 邮寄地址
|
||||
'00' as specialInvoiceMark ,-- 临时默认00 后续确认 field0167建筑服务传03, 不动产租赁传06, 其他传00
|
||||
field0108 as sellerName, -- 销售方名称
|
||||
field0109 as invoiceType,-- 专票:21 普票:22
|
||||
'否' as isPerson, -- 是否自然人
|
||||
0 as levyTaxType,-- 征税方式
|
||||
field0090 as remark,-- 备注
|
||||
field0080 as itemName,-- 上网电费
|
||||
'1100101010600000000' as taxCateCode,-- 税收分类编码
|
||||
field0083 as spec,-- 规格型号
|
||||
field0084 as quantity,-- 电量
|
||||
field0168 as unitPrice,-- 单价(不含税)
|
||||
field0086 as price,-- 金额(不含税)
|
||||
field0118 as taxRate,-- 默认0.13
|
||||
field0169 as tax,-- 税额
|
||||
field0169 as includeTaxTag,-- 税额
|
||||
1 as detailType,-- 含税标识
|
||||
0 as detailType,-- 明细行性质
|
||||
0 as enjoyPreferentialFlag,-- 是否享受优惠
|
||||
field0167
|
||||
from formmain_0331 main
|
||||
left join formson_0332 body on main.id = body.formmain_id
|
||||
left join COL_SUMMARY summary on main.id = summary.form_recordid
|
||||
where summary.state = '3'
|
||||
and field0154 ='-8073674727882144390' -- 蓝字发票条件 是否红冲为是
|
||||
and field0206 is null
|
||||
</select>
|
||||
<select id="getMakeInvoiceByFormson_0700" resultMap="get-MakeInvoiceEntity-result" parameterType="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
|
||||
</select>
|
||||
<select id="getMakeInvoiceByFormson_0701" resultMap="get-MakeInvoiceEntity-result" parameterType="com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity">
|
||||
|
||||
</select>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="updatePushStatus" parameterType = "com.hzya.frame.seeyon.makeinvoice.entity.MakeInvoiceEntity" >
|
||||
update ${tabName} set ${pushStatusField} =#{pushStatus} where id=#{dataId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -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<MakeInvoiceEntity,String> {
|
||||
/**
|
||||
*
|
||||
* @content 推送蓝字发票申请单申请到税务平台
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2025-03-20 15:26
|
||||
*
|
||||
*/
|
||||
|
||||
JsonResultEntity sendMakeInvoiceSw(JSONObject requestJson);
|
||||
}
|
|
@ -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<MakeInvoiceEntity, String> implements IMakeInvoiceService {
|
||||
|
||||
@Autowired
|
||||
private IMakeInvoiceDao makeInvoiceDao;
|
||||
@Override
|
||||
public JsonResultEntity sendMakeInvoiceSw(JSONObject requestJson) {
|
||||
MakeInvoiceEntity makeInvoice = new MakeInvoiceEntity();
|
||||
makeInvoice.setDataSourceCode("HT_OA");
|
||||
List<MakeInvoiceEntity> makeInvoiceEntityList = makeInvoiceDao.getMakeInvoiceByState(makeInvoice);
|
||||
return BaseResult.getSuccessMessageEntity("操作成功");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue