凭证号和凭证期间回写
This commit is contained in:
parent
05c309cae9
commit
88f2bd23e7
|
@ -87,4 +87,24 @@ public interface IServiceDataDao extends IBaseDao<ServiceDataEntity,String> {
|
||||||
* @Date 2024-12-19 10:49
|
* @Date 2024-12-19 10:49
|
||||||
* **/
|
* **/
|
||||||
List<ServiceDataEntity> queryDataByVdef1(ServiceDataEntity entity);
|
List<ServiceDataEntity> queryDataByVdef1(ServiceDataEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 查询支付成功但是没有做凭证的数据
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2025-05-09 17:15
|
||||||
|
* **/
|
||||||
|
List<ServiceDataEntity> queryVoucherIsNull(ServiceDataEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 凭证号和凭证期间回写
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2025-05-09 17:39
|
||||||
|
* **/
|
||||||
|
Integer updateVoucherResult(ServiceDataEntity entity);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,4 +74,16 @@ public class ServiceDataDaoImpl extends MybatisGenericDao<ServiceDataEntity,Stri
|
||||||
public List<ServiceDataEntity> queryDataByVdef1(ServiceDataEntity entity) {
|
public List<ServiceDataEntity> queryDataByVdef1(ServiceDataEntity entity) {
|
||||||
return super.query("queryDataByVdef1",entity);
|
return super.query("queryDataByVdef1",entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<ServiceDataEntity> queryVoucherIsNull(ServiceDataEntity entity) {
|
||||||
|
return (List<ServiceDataEntity>) super.selectList("queryVoucherIsNull",entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public Integer updateVoucherResult(ServiceDataEntity entity) {
|
||||||
|
return super.update("updateVoucherResult",entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,60 @@ public class ServiceDataEntity extends BaseEntity {
|
||||||
|
|
||||||
private String bipAmountField;//BIP打款金额字段
|
private String bipAmountField;//BIP打款金额字段
|
||||||
private String bipAmount;//BIP打款金额
|
private String bipAmount;//BIP打款金额
|
||||||
|
private String bipCbsDateFiled;//BIP推CBS时间字段
|
||||||
|
private String voucherPeriodFiled;//凭证期间字段
|
||||||
|
private String voucherNumberFiled;//凭证号字段
|
||||||
|
private String bipCbsDate;//BIP推CBS时间
|
||||||
|
private String voucherPeriod;//凭证期间
|
||||||
|
private String voucherNumber;//凭证号
|
||||||
|
|
||||||
|
public String getBipCbsDateFiled() {
|
||||||
|
return bipCbsDateFiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBipCbsDateFiled(String bipCbsDateFiled) {
|
||||||
|
this.bipCbsDateFiled = bipCbsDateFiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVoucherPeriodFiled() {
|
||||||
|
return voucherPeriodFiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoucherPeriodFiled(String voucherPeriodFiled) {
|
||||||
|
this.voucherPeriodFiled = voucherPeriodFiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVoucherNumberFiled() {
|
||||||
|
return voucherNumberFiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoucherNumberFiled(String voucherNumberFiled) {
|
||||||
|
this.voucherNumberFiled = voucherNumberFiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBipCbsDate() {
|
||||||
|
return bipCbsDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBipCbsDate(String bipCbsDate) {
|
||||||
|
this.bipCbsDate = bipCbsDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVoucherPeriod() {
|
||||||
|
return voucherPeriod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoucherPeriod(String voucherPeriod) {
|
||||||
|
this.voucherPeriod = voucherPeriod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVoucherNumber() {
|
||||||
|
return voucherNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVoucherNumber(String voucherNumber) {
|
||||||
|
this.voucherNumber = voucherNumber;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBipAmountField() {
|
public String getBipAmountField() {
|
||||||
return bipAmountField;
|
return bipAmountField;
|
||||||
|
|
|
@ -27,6 +27,12 @@
|
||||||
,bip_payment_number as bipPaymentNumber
|
,bip_payment_number as bipPaymentNumber
|
||||||
,bip_amount_field as bipAmountField
|
,bip_amount_field as bipAmountField
|
||||||
,bip_amount as bipAmount
|
,bip_amount as bipAmount
|
||||||
|
,bip_cbs_date_filed as bipCbsDateFiled
|
||||||
|
,voucher_period_filed as voucherPeriodFiled
|
||||||
|
,voucher_number_filed as voucherNumberFiled
|
||||||
|
,bip_cbs_date as bipCbsDate
|
||||||
|
,voucher_period as voucherPeriod
|
||||||
|
,voucher_number as voucherNumber
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="entity_list_base" resultMap="get-ServiceDataEntity-result" parameterType = "com.hzya.frame.sysnew.comparison.serviceData.entity.ServiceDataEntity">
|
<select id="entity_list_base" resultMap="get-ServiceDataEntity-result" parameterType = "com.hzya.frame.sysnew.comparison.serviceData.entity.ServiceDataEntity">
|
||||||
|
@ -57,6 +63,17 @@
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="queryVoucherIsNull" resultMap="get-ServiceDataEntity-result" parameterType = "com.hzya.frame.sysnew.comparison.serviceData.entity.ServiceDataEntity">
|
||||||
|
select
|
||||||
|
<include refid="ServiceDataEntity_Base_Column_List" />
|
||||||
|
from V_CMP_APPLY
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="billCode != null and billCode != ''"> and vdef1 = #{billCode} </if>
|
||||||
|
and pay_result ='支付成功' and voucher_number is null AND rownum < 51
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 查询 采用==查询 -->
|
<!-- 查询 采用==查询 -->
|
||||||
<select id="queryDataByVdef1" resultMap="get-ServiceDataEntity-result" parameterType = "com.hzya.frame.sysnew.comparison.serviceData.entity.ServiceDataEntity">
|
<select id="queryDataByVdef1" resultMap="get-ServiceDataEntity-result" parameterType = "com.hzya.frame.sysnew.comparison.serviceData.entity.ServiceDataEntity">
|
||||||
select
|
select
|
||||||
|
@ -92,6 +109,7 @@
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="payDate != null and payDate != ''"> ${payDateFiled} = to_date(#{payDate},'YYYY-MM-DD HH24:MI:SS'),</if>
|
<if test="payDate != null and payDate != ''"> ${payDateFiled} = to_date(#{payDate},'YYYY-MM-DD HH24:MI:SS'),</if>
|
||||||
<if test="bipAmount != null and bipAmount != ''"> ${bipAmountField} = #{bipAmount},</if>
|
<if test="bipAmount != null and bipAmount != ''"> ${bipAmountField} = #{bipAmount},</if>
|
||||||
|
<if test="bipCbsDate != null and bipCbsDate != ''"> ${bipCbsDateFiled} = to_date(#{bipCbsDate},'YYYY-MM-DD HH24:MI:SS'),</if>
|
||||||
<if test="payResult != null and payResult != ''"> ${payResultFiled} = #{payResult}</if>
|
<if test="payResult != null and payResult != ''"> ${payResultFiled} = #{payResult}</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id=#{id}
|
where id=#{id}
|
||||||
|
@ -104,6 +122,15 @@
|
||||||
where id=#{id}
|
where id=#{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="updateVoucherResult" parameterType = "com.hzya.frame.sysnew.comparison.serviceData.entity.ServiceDataEntity" >
|
||||||
|
update ${tabName} set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="voucherPeriod != null and voucherPeriod != ''"> ${voucherPeriodFiled} = #{voucherPeriod},</if>
|
||||||
|
<if test="voucherNumber != null and voucherNumber != ''"> ${voucherNumberFiled} = #{voucherNumber}</if>
|
||||||
|
</trim>
|
||||||
|
where id=#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -40,4 +40,13 @@ public interface IServiceDataService extends IBaseService<ComparisonEntity,Strin
|
||||||
|
|
||||||
SysExtensionApiEntity getToken(SysExtensionApiEntity entity);
|
SysExtensionApiEntity getToken(SysExtensionApiEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 查询支付成功并且没有做凭证的单子
|
||||||
|
* @Param
|
||||||
|
* @Return
|
||||||
|
* @Author hecan
|
||||||
|
* @Date 2025-05-09 17:21
|
||||||
|
* **/
|
||||||
|
JsonResultEntity queryVoucherIsNull(JSONObject json);
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,7 @@ public class ServiceDataServiceImpl extends BaseService<ComparisonEntity,String>
|
||||||
serviceDataEntity.setPayResult(jsonObject.getString("payResult"));
|
serviceDataEntity.setPayResult(jsonObject.getString("payResult"));
|
||||||
serviceDataEntity.setPayDate(jsonObject.getString("payDate"));
|
serviceDataEntity.setPayDate(jsonObject.getString("payDate"));
|
||||||
serviceDataEntity.setBipAmount(jsonObject.getString("bipAmount"));
|
serviceDataEntity.setBipAmount(jsonObject.getString("bipAmount"));
|
||||||
|
serviceDataEntity.setBipCbsDate(jsonObject.getString("bipCbsDate"));
|
||||||
serviceDataEntity.setDataSourceCode(jsonObject.getString("dataSourceCode"));
|
serviceDataEntity.setDataSourceCode(jsonObject.getString("dataSourceCode"));
|
||||||
logger.info("====开始根据单据号:{},表名称:{},表单id:{}更新支付状态和时间======", serviceDataEntity.getBillCode(), serviceDataEntity.getTabName(), serviceDataEntity.getId());
|
logger.info("====开始根据单据号:{},表名称:{},表单id:{}更新支付状态和时间======", serviceDataEntity.getBillCode(), serviceDataEntity.getTabName(), serviceDataEntity.getId());
|
||||||
integer = serviceDataDao.updatePayResult(serviceDataEntity);
|
integer = serviceDataDao.updatePayResult(serviceDataEntity);
|
||||||
|
@ -246,6 +247,56 @@ public class ServiceDataServiceImpl extends BaseService<ComparisonEntity,String>
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity queryVoucherIsNull(JSONObject json) {
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = json.getJSONObject("jsonStr");
|
||||||
|
/* if (!checkStr(jsonObject.getString("voucherNumber"))) {
|
||||||
|
logger.info("====传递的凭证号为空====");
|
||||||
|
return BaseResult.getFailureMessageEntity("请传递凭证号");
|
||||||
|
}
|
||||||
|
if (!checkStr(jsonObject.getString("voucherPeriod"))) {
|
||||||
|
logger.info("====传递的凭证期间为空====");
|
||||||
|
return BaseResult.getFailureMessageEntity("请传递凭证期间");
|
||||||
|
}*/
|
||||||
|
if (!checkStr(jsonObject.getString("billCode"))) {
|
||||||
|
logger.info("====传递的OA单据编号为空====");
|
||||||
|
return BaseResult.getFailureMessageEntity("请传递OA单据编号");
|
||||||
|
}
|
||||||
|
//查询支付状态为空的数据
|
||||||
|
ServiceDataEntity serviceData = new ServiceDataEntity();
|
||||||
|
serviceData.setBillCode(jsonObject.getString("billCode"));
|
||||||
|
serviceData.setDataSourceCode(jsonObject.getString("dataSourceCode"));
|
||||||
|
List<ServiceDataEntity> serviceDataEntities = serviceDataDao.queryVoucherIsNull(serviceData);
|
||||||
|
Integer integer = null;
|
||||||
|
if (CollectionUtils.isNotEmpty(serviceDataEntities)) {
|
||||||
|
for (ServiceDataEntity serviceDataEntity : serviceDataEntities) {
|
||||||
|
if(serviceDataEntity.getBillCode().equals(jsonObject.getString("billCode"))){
|
||||||
|
serviceDataEntity.setVoucherNumber(jsonObject.getString("voucherNumber"));
|
||||||
|
serviceDataEntity.setVoucherPeriod(jsonObject.getString("voucherPeriod"));
|
||||||
|
serviceDataEntity.setDataSourceCode(jsonObject.getString("dataSourceCode"));
|
||||||
|
if(null != jsonObject.getString("voucherNumber") || null !=jsonObject.getString("voucherPeriod")){
|
||||||
|
logger.info("====开始根据表名称:{},表单id:{}更新凭证号:{}和凭证期间:{}======", serviceDataEntity.getTabName(), serviceDataEntity.getId(),jsonObject.getString("voucherNumber"),jsonObject.getString("voucherPeriod"));
|
||||||
|
integer = serviceDataDao.updateVoucherResult(serviceDataEntity);
|
||||||
|
logger.info("====根据表名称:{},表单id:{}更新凭证号:{}和凭证期间:{}完成======", serviceDataEntity.getTabName(), serviceDataEntity.getId(),jsonObject.getString("voucherNumber"),jsonObject.getString("voucherPeriod"));
|
||||||
|
}else{
|
||||||
|
logger.info("=====传递的凭证号和凭证期间都为空======");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
logger.info("======传递的OA单据编号与查询出来的OA单据编号不一致=========");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("更新成功", integer);
|
||||||
|
} else {
|
||||||
|
logger.info("=========没有支付成功并且凭证号为空的数据=======");
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询成功,没有支付成功并且凭证号为空数据");
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("查询三维支付成功并且凭证号为空的数据失败:{}",e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SysExtensionApiEntity addDataSourceCode(SysExtensionApiEntity entity) {
|
public SysExtensionApiEntity addDataSourceCode(SysExtensionApiEntity entity) {
|
||||||
try {
|
try {
|
||||||
|
@ -294,6 +345,7 @@ public class ServiceDataServiceImpl extends BaseService<ComparisonEntity,String>
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<JSONObject> bindingDocument(JSONObject jsonObject, MdmModuleSourceEntity mdmModuleSourceEntity, String dbCode) {
|
private List<JSONObject> bindingDocument(JSONObject jsonObject, MdmModuleSourceEntity mdmModuleSourceEntity, String dbCode) {
|
||||||
String formmainId=null;
|
String formmainId=null;
|
||||||
String vdef1=null;
|
String vdef1=null;
|
||||||
|
|
Loading…
Reference in New Issue