parent
89a1182f26
commit
5fc9b8319e
|
@ -7,6 +7,7 @@ import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
|
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -109,20 +110,23 @@ public class PayApplyPluginInitializer extends PluginBaseEntity {
|
||||||
if (null == paymentEntity){
|
if (null == paymentEntity){
|
||||||
paymentEntity = new PaymentEntity();
|
paymentEntity = new PaymentEntity();
|
||||||
}
|
}
|
||||||
String id = requestJson.getString("integration_task_living_details_id");
|
String taskDetailId = requestJson.getString("integration_task_living_details_id");
|
||||||
if (StrUtil.isNotEmpty(id)){
|
if (StrUtil.isNotEmpty(taskDetailId)){
|
||||||
//查询日志里的参数
|
//查询日志里的参数
|
||||||
//查询日志表
|
//查询日志表
|
||||||
IntegrationTaskLivingDetailsEntity taskDetailEntity = taskLivingDetailsService.get(id);
|
IntegrationTaskLivingDetailsEntity taskDetailEntity = taskLivingDetailsService.get(taskDetailId);
|
||||||
if (null != taskDetailEntity){
|
if (null != taskDetailEntity){
|
||||||
//重试标记
|
//重试标记
|
||||||
paymentEntity.setRetry_flag("1");
|
paymentEntity.setRetryFlag("1");
|
||||||
paymentEntity.setReferenceNum(taskDetailEntity.getRootAppBill());
|
paymentEntity.setReferenceNum(taskDetailEntity.getRootAppBill());
|
||||||
|
paymentEntity.setTaskDetailId(taskDetailId);
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("根据id:{},查不到记录",taskDetailId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//支付申请
|
//支付申请
|
||||||
//paymentEntity.setOaId("8475071606892874568");
|
//paymentEntity.setOaId("-5026223055769156433");
|
||||||
cbsPluginService.applyPay(paymentEntity);
|
cbsPluginService.applyPay(paymentEntity);
|
||||||
return null;
|
return BaseResult.getSuccessMessageEntity("cbs8支付申请插件执行完成");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,10 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
if (CollectionUtils.isNotEmpty(paymentList)){
|
if (CollectionUtils.isNotEmpty(paymentList)){
|
||||||
for (PaymentEntity pay : paymentList) {
|
for (PaymentEntity pay : paymentList) {
|
||||||
//调用支付申请接口
|
//调用支付申请接口
|
||||||
|
pay.setTaskDetailId(paymentEntity.getTaskDetailId());
|
||||||
|
if (StrUtil.isNotEmpty(paymentEntity.getTaskDetailId())){
|
||||||
|
pay.setReferenceNumNew(spliceBillCode(pay.getReferenceNum()));
|
||||||
|
}
|
||||||
PayResponseDTO payResponseDTO = cbs8Service.payApply(pay);
|
PayResponseDTO payResponseDTO = cbs8Service.payApply(pay);
|
||||||
boolean successed = payResponseDTO.getSuccessed();
|
boolean successed = payResponseDTO.getSuccessed();
|
||||||
if (successed){
|
if (successed){
|
||||||
|
@ -312,8 +316,9 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
PaymentApplyAgentDTO detailDTO = BeanUtil.copyProperties(detail,PaymentApplyAgentDTO.class);
|
PaymentApplyAgentDTO detailDTO = BeanUtil.copyProperties(detail,PaymentApplyAgentDTO.class);
|
||||||
paymentApplyAgentList.add(detailDTO);
|
paymentApplyAgentList.add(detailDTO);
|
||||||
}
|
}
|
||||||
//招行这里要传203
|
|
||||||
paymentApplySubmitReqDTO.setBankExtend5("203");
|
//不同银行添加 处理不一样
|
||||||
|
addAttribute(agentPay,paymentApplySubmitReqDTO,paymentApplyAgentList);
|
||||||
PayResponseDTO payResponseDTO = cbs8Service.agentPayApply(paymentApplySubmitReqDTO,paymentApplyAgentList);
|
PayResponseDTO payResponseDTO = cbs8Service.agentPayApply(paymentApplySubmitReqDTO,paymentApplyAgentList);
|
||||||
if (null != payResponseDTO){
|
if (null != payResponseDTO){
|
||||||
Boolean successed = payResponseDTO.getSuccessed();
|
Boolean successed = payResponseDTO.getSuccessed();
|
||||||
|
@ -341,6 +346,48 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 不同银行设置不同的字段
|
||||||
|
* @param agentPay
|
||||||
|
* @param paymentApplySubmitReqDTO 表头
|
||||||
|
* @param list 表体
|
||||||
|
*/
|
||||||
|
private void addAttribute(AgentPaymentEntity agentPay, PaymentApplySubmitReqDTO paymentApplySubmitReqDTO,List<PaymentApplyAgentDTO> list) {
|
||||||
|
//招商 CMB
|
||||||
|
//代发类型
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend5("203");
|
||||||
|
|
||||||
|
|
||||||
|
//浦东发展银行 PDB
|
||||||
|
paymentApplySubmitReqDTO.setPersonalFlag("1");
|
||||||
|
//代发类型
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend5("203");
|
||||||
|
//单位编号
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend6("203");
|
||||||
|
//代发信息 1002表示代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend8("1002");
|
||||||
|
for (PaymentApplyAgentDTO p : list) {
|
||||||
|
p.setDtlBankFlag("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
//民生银行 CMC
|
||||||
|
//1表示代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend5("1");
|
||||||
|
for (PaymentApplyAgentDTO p : list) {
|
||||||
|
p.setDtlBankFlag("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
//农业银行 ABC
|
||||||
|
//200表示同行代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend2("200");
|
||||||
|
//99020001表示工资发放
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend8("99020001");
|
||||||
|
|
||||||
|
//光大银行 CEB
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend1("00000000");
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend8("0");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代发代扣 结果详情查询
|
* 代发代扣 结果详情查询
|
||||||
*
|
*
|
||||||
|
@ -495,4 +542,10 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//拼接新的单据号
|
||||||
|
private String spliceBillCode(String code){
|
||||||
|
String hour = Convert.toStr(DateUtil.hour(new Date(),true));
|
||||||
|
String minute = Convert.toStr(DateUtil.minute(new Date()));
|
||||||
|
return code+"-"+hour+minute;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue