Merge branches '237master' and 'fw-bip' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into 237master
This commit is contained in:
commit
04801b5a64
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public interface IBipArchivesDao extends IBaseDao<BipArchivesEntity, String> {
|
||||||
|
|
||||||
|
List<BipArchivesEntity> queryArchivesData(BipArchivesEntity archivesEntity);
|
||||||
|
List<BipArchivesEntity> queryArchivesDatays(BipArchivesEntity archivesEntity);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository("bipArchivesDaoImpl")
|
||||||
|
public class BipArchivesDaoImpl extends MybatisGenericDao<BipArchivesEntity,String> implements IBipArchivesDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BipArchivesEntity> queryArchivesData(BipArchivesEntity entity) {
|
||||||
|
List<BipArchivesEntity> o = super.query(getSqlIdPrifx() + "queryArchivesData", entity);
|
||||||
|
return o;
|
||||||
|
} @Override
|
||||||
|
public List<BipArchivesEntity> queryArchivesDatays(BipArchivesEntity entity) {
|
||||||
|
List<BipArchivesEntity> o = super.query(getSqlIdPrifx() + "queryArchivesDatays", entity);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,188 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.entity;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.hzya.frame.uuid.UUIDUtils;
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (BdCorp)实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-09-06 14:47:18
|
||||||
|
*/
|
||||||
|
public class BipArchivesEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private String archivesType;//类型
|
||||||
|
private String leftCode;//左编码
|
||||||
|
private String rightCode;//右编码
|
||||||
|
|
||||||
|
private String leftAppId;//左应用id
|
||||||
|
private String leftAppCode;//左应用编码
|
||||||
|
private String leftAppName;//左应用名称
|
||||||
|
private String leftApiId;//左接口ID
|
||||||
|
private String leftId;//左id
|
||||||
|
private String leftName;//左名称
|
||||||
|
private String rightAppId;//右应用id
|
||||||
|
private String rightAppCode;//右应用编码
|
||||||
|
private String rightAppName;//右应用名称
|
||||||
|
private String rightApiId;//右接口ID
|
||||||
|
private String rightId;//右id
|
||||||
|
private String rightName;//右名称
|
||||||
|
private String leftOrg;//左公司
|
||||||
|
private String rightOrg;//右公司
|
||||||
|
|
||||||
|
public String getArchivesType() {
|
||||||
|
return archivesType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArchivesType(String archivesType) {
|
||||||
|
this.archivesType = archivesType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftCode() {
|
||||||
|
return leftCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftCode(String leftCode) {
|
||||||
|
this.leftCode = leftCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightCode() {
|
||||||
|
return rightCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightCode(String rightCode) {
|
||||||
|
this.rightCode = rightCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftAppId() {
|
||||||
|
return leftAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftAppId(String leftAppId) {
|
||||||
|
this.leftAppId = leftAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftAppCode() {
|
||||||
|
return leftAppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftAppCode(String leftAppCode) {
|
||||||
|
this.leftAppCode = leftAppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftAppName() {
|
||||||
|
return leftAppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftAppName(String leftAppName) {
|
||||||
|
this.leftAppName = leftAppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftApiId() {
|
||||||
|
return leftApiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftApiId(String leftApiId) {
|
||||||
|
this.leftApiId = leftApiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftId() {
|
||||||
|
return leftId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftId(String leftId) {
|
||||||
|
this.leftId = leftId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftName() {
|
||||||
|
return leftName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftName(String leftName) {
|
||||||
|
this.leftName = leftName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightAppId() {
|
||||||
|
return rightAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightAppId(String rightAppId) {
|
||||||
|
this.rightAppId = rightAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightAppCode() {
|
||||||
|
return rightAppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightAppCode(String rightAppCode) {
|
||||||
|
this.rightAppCode = rightAppCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightAppName() {
|
||||||
|
return rightAppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightAppName(String rightAppName) {
|
||||||
|
this.rightAppName = rightAppName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightApiId() {
|
||||||
|
return rightApiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightApiId(String rightApiId) {
|
||||||
|
this.rightApiId = rightApiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightId() {
|
||||||
|
return rightId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightId(String rightId) {
|
||||||
|
this.rightId = rightId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightName() {
|
||||||
|
return rightName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightName(String rightName) {
|
||||||
|
this.rightName = rightName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeftOrg() {
|
||||||
|
return leftOrg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeftOrg(String leftOrg) {
|
||||||
|
this.leftOrg = leftOrg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightOrg() {
|
||||||
|
return rightOrg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightOrg(String rightOrg) {
|
||||||
|
this.rightOrg = rightOrg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreate() {
|
||||||
|
this.setId(UUIDUtils.getUUID());
|
||||||
|
this.setSts("Y");
|
||||||
|
this.setCreate_user_id("1");
|
||||||
|
this.setModify_user_id("1");
|
||||||
|
this.setCreate_time(new Date());
|
||||||
|
this.setModify_time(new Date());
|
||||||
|
this.setOrg_id("0");
|
||||||
|
this.setCompanyId("0");
|
||||||
|
}
|
||||||
|
//修改信息
|
||||||
|
public void setUpdate() {
|
||||||
|
this.setModify_user_id("1");
|
||||||
|
this.setModify_time(new Date());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?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.bip.v3.v2207.dao.impl.BipArchivesDaoImpl">
|
||||||
|
<resultMap id="get-ArchivesEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="leftAppId" column="left_app_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="leftAppCode" column="left_app_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="leftAppName" column="left_app_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="leftApiId" column="left_api_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="leftId" column="left_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="leftCode" column="left_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="leftName" column="left_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rightAppId" column="right_app_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rightAppCode" column="right_app_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rightAppName" column="right_app_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rightApiId" column="right_api_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rightId" column="right_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rightCode" column="right_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="rightName" column="right_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||||
|
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||||
|
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="queryArchivesData" resultMap="get-ArchivesEntity-result"
|
||||||
|
parameterType="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity">
|
||||||
|
select
|
||||||
|
right_code
|
||||||
|
from
|
||||||
|
<choose>
|
||||||
|
<when test="archivesType == '1'.toString()"> sys_personnel_control </when>
|
||||||
|
<when test="archivesType == '2'.toString()"> sys_org_control </when>
|
||||||
|
<when test="archivesType == '6'.toString()"> sys_stock_control </when>
|
||||||
|
<when test="archivesType == '73'.toString()"> sys_merchant_control </when>
|
||||||
|
<when test="archivesType == 'D01'.toString()"> sys_taxrate_control </when>
|
||||||
|
<when test="archivesType == 'jobass'.toString()"> sys_project_control </when>
|
||||||
|
<when test="archivesType == '93'.toString()"> sys_bank_control </when>
|
||||||
|
<when test="archivesType == '96'.toString()"> sys_bankaccount_control </when>
|
||||||
|
<when test="archivesType == '22'.toString()"> sys_assets_control </when>
|
||||||
|
</choose>
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="leftCode != null and leftCode != ''">and left_code = #{leftCode}</if>
|
||||||
|
<if test="leftOrg != null and leftOrg != ''">and left_org = #{leftOrg}</if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryArchivesDatays" resultMap="get-ArchivesEntity-result"
|
||||||
|
parameterType="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity">
|
||||||
|
select
|
||||||
|
right_code
|
||||||
|
from
|
||||||
|
<choose>
|
||||||
|
<when test="archivesType == '0012'.toString()"> sys_stock_control </when>
|
||||||
|
<when test="archivesType == '0006'.toString()"> sys_stock_control </when>
|
||||||
|
<when test="archivesType == '0004'.toString()"> sys_merchant_control </when>
|
||||||
|
</choose>
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="leftCode != null and leftCode != ''">and left_code = #{leftCode}</if>
|
||||||
|
<if test="leftOrg != null and leftOrg != ''">and left_org = #{leftOrg}</if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.entity;
|
||||||
|
|
||||||
|
|
||||||
|
public class BipAss {
|
||||||
|
private String checktypecode;
|
||||||
|
private String checkvaluecode;
|
||||||
|
|
||||||
|
|
||||||
|
public String getChecktypecode() {
|
||||||
|
return checktypecode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChecktypecode(String checktypecode) {
|
||||||
|
this.checktypecode = checktypecode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckvaluecode() {
|
||||||
|
return checkvaluecode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckvaluecode(String checkvaluecode) {
|
||||||
|
this.checkvaluecode = checkvaluecode;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.entity;
|
||||||
|
|
||||||
|
|
||||||
|
public class BipCashflow {
|
||||||
|
private String money;
|
||||||
|
private String pk_cashflow;
|
||||||
|
|
||||||
|
public String getMoney() {
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoney(String money) {
|
||||||
|
this.money = money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_cashflow() {
|
||||||
|
return pk_cashflow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_cashflow(String pk_cashflow) {
|
||||||
|
this.pk_cashflow = pk_cashflow;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.entity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class BipVoucher {
|
||||||
|
private List<BipVoucherDetails> details;
|
||||||
|
private String no;
|
||||||
|
private String pk_corp;
|
||||||
|
private String pk_glorgbook;
|
||||||
|
private String pk_prepared;
|
||||||
|
private String pk_vouchertype;
|
||||||
|
private String pk_voucher;
|
||||||
|
|
||||||
|
public List<BipVoucherDetails> getDetails() {
|
||||||
|
return details;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetails(List<BipVoucherDetails> details) {
|
||||||
|
this.details = details;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNo() {
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNo(String no) {
|
||||||
|
this.no = no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_corp() {
|
||||||
|
return pk_corp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_corp(String pk_corp) {
|
||||||
|
this.pk_corp = pk_corp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_glorgbook() {
|
||||||
|
return pk_glorgbook;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_glorgbook(String pk_glorgbook) {
|
||||||
|
this.pk_glorgbook = pk_glorgbook;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_prepared() {
|
||||||
|
return pk_prepared;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_prepared(String pk_prepared) {
|
||||||
|
this.pk_prepared = pk_prepared;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_vouchertype() {
|
||||||
|
return pk_vouchertype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_vouchertype(String pk_vouchertype) {
|
||||||
|
this.pk_vouchertype = pk_vouchertype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_voucher() {
|
||||||
|
return pk_voucher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_voucher(String pk_voucher) {
|
||||||
|
this.pk_voucher = pk_voucher;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.entity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class BipVoucherDetails {
|
||||||
|
private List<BipAss> ass;
|
||||||
|
private List<BipCashflow> cashflow;
|
||||||
|
private String creditamount;
|
||||||
|
private String debitamount;
|
||||||
|
private String explanation;
|
||||||
|
private String localcreditamount;
|
||||||
|
private String localdebitamount;
|
||||||
|
private String pk_accsubj;
|
||||||
|
private String pk_currtype;
|
||||||
|
private String debitquantity;
|
||||||
|
private String price;
|
||||||
|
|
||||||
|
public List<BipAss> getAss() {
|
||||||
|
return ass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAss(List<BipAss> ass) {
|
||||||
|
this.ass = ass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<BipCashflow> getCashflow() {
|
||||||
|
return cashflow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCashflow(List<BipCashflow> cashflow) {
|
||||||
|
this.cashflow = cashflow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreditamount() {
|
||||||
|
return creditamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreditamount(String creditamount) {
|
||||||
|
this.creditamount = creditamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDebitamount() {
|
||||||
|
return debitamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDebitamount(String debitamount) {
|
||||||
|
this.debitamount = debitamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExplanation() {
|
||||||
|
return explanation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExplanation(String explanation) {
|
||||||
|
this.explanation = explanation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocalcreditamount() {
|
||||||
|
return localcreditamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocalcreditamount(String localcreditamount) {
|
||||||
|
this.localcreditamount = localcreditamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocaldebitamount() {
|
||||||
|
return localdebitamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocaldebitamount(String localdebitamount) {
|
||||||
|
this.localdebitamount = localdebitamount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_accsubj() {
|
||||||
|
return pk_accsubj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_accsubj(String pk_accsubj) {
|
||||||
|
this.pk_accsubj = pk_accsubj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPk_currtype() {
|
||||||
|
return pk_currtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk_currtype(String pk_currtype) {
|
||||||
|
this.pk_currtype = pk_currtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDebitquantity() {
|
||||||
|
return debitquantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDebitquantity(String debitquantity) {
|
||||||
|
this.debitquantity = debitquantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(String price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
|
||||||
|
public interface IBipPzService extends IBaseService<BipTokenVo,String>{
|
||||||
|
|
||||||
|
|
||||||
|
SysExtensionApiEntity getPz(SysExtensionApiEntity entity);
|
||||||
|
}
|
|
@ -15,4 +15,5 @@ public interface IBipV32207BillService extends IBaseService<BipTokenVo,String>{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SysExtensionApiEntity getBipBill(SysExtensionApiEntity entity);
|
SysExtensionApiEntity getBipBill(SysExtensionApiEntity entity);
|
||||||
|
SysExtensionApiEntity getBipBillYs(SysExtensionApiEntity entity);
|
||||||
}
|
}
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipAss;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipVoucher;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipVoucherDetails;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.service.IBipPzService;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import jdk.nashorn.internal.ir.annotations.Reference;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Service(value = "bipPzService")
|
||||||
|
public class BipPzServiceImpl extends BaseService<BipTokenVo, String> implements IBipPzService {
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBipArchivesDao bipArchivesDao;
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
* @return com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 组装凭证数据
|
||||||
|
* @Date 10:52 上午 2024/11/5
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public SysExtensionApiEntity getPz(SysExtensionApiEntity entity) {
|
||||||
|
String bodys = entity.getBodys();
|
||||||
|
BipVoucher voucher = JSONObject.parseObject(bodys, BipVoucher.class);
|
||||||
|
List<String> fzhs = Arrays.asList(new String[]{"1", "2", "6", "73", "D01", "jobass", "93", "96", "22"});
|
||||||
|
if (voucher.getDetails() != null && voucher.getDetails().size() > 0) {
|
||||||
|
for (int a = 0; a < voucher.getDetails().size(); a++) {
|
||||||
|
BipVoucherDetails voucherDetails = voucher.getDetails().get(a);
|
||||||
|
if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) {
|
||||||
|
for (int b = 0; b < voucherDetails.getAss().size(); b++) {
|
||||||
|
BipAss ass = voucherDetails.getAss().get(b);
|
||||||
|
if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) {
|
||||||
|
//存在需要转换的
|
||||||
|
if (fzhs.contains(ass.getChecktypecode())) {
|
||||||
|
BipArchivesEntity archivesEntity = new BipArchivesEntity();
|
||||||
|
archivesEntity.setArchivesType(ass.getChecktypecode());
|
||||||
|
archivesEntity.setLeftCode(ass.getCheckvaluecode());
|
||||||
|
archivesEntity.setLeftOrg(voucher.getPk_corp());
|
||||||
|
|
||||||
|
List<BipArchivesEntity> archivesEntities = bipArchivesDao.queryArchivesData(archivesEntity);
|
||||||
|
if (archivesEntities != null && archivesEntities.size() > 0) {
|
||||||
|
ass.setCheckvaluecode(archivesEntities.get(0).getRightCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bodys = JSON.toJSONString(voucher);
|
||||||
|
entity.setBodys(bodys);
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,8 +1,15 @@
|
||||||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipAss;
|
||||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipVoucher;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.entity.BipVoucherDetails;
|
||||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207BillService;
|
import com.hzya.frame.bip.v3.v2207.service.IBipV32207BillService;
|
||||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207TokenService;
|
import com.hzya.frame.bip.v3.v2207.service.IBipV32207TokenService;
|
||||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
@ -13,14 +20,19 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
@Service(value = "BipV32207BillServiceImpl")
|
@Service(value = "BipV32207BillServiceImpl")
|
||||||
public class BipV32207BillServiceImpl extends BaseService<BipTokenVo, String> implements IBipV32207BillService {
|
public class BipV32207BillServiceImpl extends BaseService<BipTokenVo, String> implements IBipV32207BillService {
|
||||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
@Resource
|
||||||
|
private IBipArchivesDao bipArchivesDao;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @content 此方法获取拼接单据动态加密,heade参数动态传入
|
* @content 此方法获取拼接单据动态加密,heade参数动态传入
|
||||||
|
@ -59,4 +71,64 @@ public class BipV32207BillServiceImpl extends BaseService<BipTokenVo, String> im
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public SysExtensionApiEntity getBipBillYs(SysExtensionApiEntity entity) {
|
||||||
|
try {
|
||||||
|
String bodys = entity.getBodys();
|
||||||
|
BipVoucher voucher = JSONObject.parseObject(bodys, BipVoucher.class);
|
||||||
|
List<String> fzhs = Arrays.asList(new String[]{"0012", "0006", "0004"});
|
||||||
|
if (voucher.getDetails() != null && voucher.getDetails().size() > 0) {
|
||||||
|
for (int a = 0; a < voucher.getDetails().size(); a++) {
|
||||||
|
BipVoucherDetails voucherDetails = voucher.getDetails().get(a);
|
||||||
|
if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) {
|
||||||
|
for (int b = 0; b < voucherDetails.getAss().size(); b++) {
|
||||||
|
BipAss ass = voucherDetails.getAss().get(b);
|
||||||
|
if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) {
|
||||||
|
//存在需要转换的
|
||||||
|
if (fzhs.contains(ass.getChecktypecode())) {
|
||||||
|
BipArchivesEntity archivesEntity = new BipArchivesEntity();
|
||||||
|
archivesEntity.setArchivesType(ass.getChecktypecode());
|
||||||
|
archivesEntity.setLeftCode(ass.getCheckvaluecode());
|
||||||
|
archivesEntity.setLeftOrg(voucher.getPk_corp());
|
||||||
|
|
||||||
|
List<BipArchivesEntity> archivesEntities = bipArchivesDao.queryArchivesData(archivesEntity);
|
||||||
|
if (archivesEntities != null && archivesEntities.size() > 0) {
|
||||||
|
ass.setCheckvaluecode(archivesEntities.get(0).getRightCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bodys = JSON.toJSONString(voucher);
|
||||||
|
entity.setBodys(bodys);
|
||||||
|
|
||||||
|
Map<String, String> headers = entity.getHeaders();
|
||||||
|
String client_id = headers.get("client_id");
|
||||||
|
//token信息
|
||||||
|
String access_token = headers.get("access_token");
|
||||||
|
//公钥
|
||||||
|
String pubKey = headers.get("pubKey");
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
sb.append(client_id);
|
||||||
|
String parm = entity.getBodys();
|
||||||
|
if (StringUtils.isNotBlank(parm)) {
|
||||||
|
sb.append(parm);
|
||||||
|
}
|
||||||
|
sb.append(pubKey);
|
||||||
|
// 签名
|
||||||
|
String sign = SHA256Util.getSHA256(sb.toString(), pubKey);
|
||||||
|
StringBuffer querys = new StringBuffer();
|
||||||
|
querys.append("access_token="+access_token);
|
||||||
|
querys.append("&signature="+sign);
|
||||||
|
querys.append("&client_id="+client_id);
|
||||||
|
entity.setQuerys(querys.toString());
|
||||||
|
headers.put("signature",sign);
|
||||||
|
// headers.put("content-type","application/x-www-form-urlencoded");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue