工资代发

2024年7月12日 16:23:11
This commit is contained in:
xiang2lin 2024-07-12 16:23:18 +08:00
parent 5fc9b8319e
commit 357453c017
5 changed files with 34 additions and 6 deletions

View File

@ -103,16 +103,20 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
String decryptRes = CBSUtil.decrypt(secretResByte);
//6记录系统日志
IntegrationTaskLivingDetailsEntity logTask = new IntegrationTaskLivingDetailsEntity();
logTask.setRootAppPk(sourceBody.getString("formsonId"));
logTask.setRootAppBill(sourceBody.getString("referenceNum"));
logTask.setRootAppPk(sourceBody.getString("oaId"));
String ferenceNum = Convert.toStr(sourceBody.getString("referenceNumNew"), sourceBody.getString("referenceNum"));
logTask.setRootAppBill(ferenceNum);
logTask.setPluginId("CBS8PayApplyPlugin");
//对方接口返回信息
logTask.setNewTransmitInfo(decryptRes);
logTask.setNewPushDate(new Date());
Date date = new Date();
logTask.setNewPushDate(date);
//调用接口请求参数
logTask.setRootAppNewData(hzyaExtData);
PayResponseDTO payResponseDTO = PayResponseDTO.payResValueOf(decryptRes);
if (StrUtil.isEmpty(taskDetailId)){
logTask.setCreate_time(date);
logTask.setModify_time(date);
//为true是成功
if (payResponseDTO.getSuccessed()) {
taskLivingDetailsService.saveLogToSuccess(logTask);
@ -120,6 +124,8 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
taskLivingDetailsService.saveLogToFail(logTask);
}
}else {
logTask.setId(taskDetailId);
logTask.setModify_time(date);
if (payResponseDTO.getSuccessed()){
taskLivingDetailsService.saveLogFailToSuccess(logTask);
}else {

View File

@ -9,4 +9,11 @@ import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
* @Date 2024/6/14 17:30
**/
public interface ICbsLogDao extends IBaseDao<CbsLogEntity,String> {
/**
* 更新日志
* @param entity
* @return
*/
int updateLog(CbsLogEntity entity);
}

View File

@ -1,5 +1,6 @@
package com.hzya.frame.seeyon.cbs8.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao;
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
@ -12,4 +13,16 @@ import org.springframework.stereotype.Repository;
**/
@Repository()
public class CbsLogDaoImpl extends MybatisGenericDao<CbsLogEntity,String> implements ICbsLogDao {
/**
* 更新日志
*
* @param entity
* @return
*/
@DS("#entity.dataSourceCode")
@Override
public int updateLog(CbsLogEntity entity) {
this.update(getSqlIdPrifx()+"entity_update",entity);
return 0;
}
}

View File

@ -106,6 +106,7 @@
<if test="pay_state != null and pay_state !='' ">field0010 =#{pay_state},</if>
field0011 =#{message},
<if test="apply_state != null and apply_state !='' ">field0012 =#{apply_state},</if>
<if test="cbs_apply_code != null and cbs_apply_code !='' ">field0005 =#{cbs_apply_code},</if>
<if test="successed != null and successed !='' ">field0014 =#{successed}</if>
</trim>
where id = #{id}

View File

@ -109,12 +109,13 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
logEntity.setApply_state(apply_state);
logEntity.setSuccessed(successed);
logEntity.setBill_code(cbsLogEntity.getBill_code());
logEntity.setCbs_apply_code(cbs_apply_code);
logEntity.setDataSourceCode(oa_data_source_code);
try {
updateLog(logEntity);
}catch (Exception e){
e.printStackTrace();
logger.error("更新");
logger.error("更新cbs交易日志出错:{}",e);
}
}
}
@ -186,10 +187,10 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
*
* @param logEntity
*/
@DS("#logEntity.dataSourceCode")
// @DS("#logEntity.dataSourceCode")
@Override
public void updateLog(CbsLogEntity logEntity) {
cbsLogDao.update(logEntity);
cbsLogDao.updateLog(logEntity);
}
//获取xml模板