cbs8插件
This commit is contained in:
parent
2f6f7e1755
commit
e64978e5e9
|
@ -97,7 +97,7 @@ public class PayApplyPluginInitializer extends PluginBaseEntity {
|
|||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
//支付申请
|
||||
// cbsPluginService.applyPay(requestJson);
|
||||
cbsPluginService.applyPay(requestJson);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
package com.hzya.frame.plugin.cbs8.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.cbs8.dto.req.AgentPayResultRequestDTO;
|
||||
import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
|
||||
import com.hzya.frame.cbs8.dto.res.AgentPayResultResDTO;
|
||||
import com.hzya.frame.cbs8.dto.res.PayResponseDTO;
|
||||
import com.hzya.frame.cbs8.dto.res.TransactionDetailDTO;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -39,4 +44,18 @@ public interface ICbsPluginService {
|
|||
* @param transactionDetailReqDTO
|
||||
*/
|
||||
List<TransactionDetailDTO> queryTransactionDetail(TransactionDetailReqDTO transactionDetailReqDTO);
|
||||
|
||||
/**
|
||||
* 代发代扣 支付申请
|
||||
* @param paymentEntity
|
||||
* @param agentPaymentDetailList
|
||||
*/
|
||||
PayResponseDTO applyAgentPay(AgentPaymentEntity paymentEntity, List<AgentPaymentDetailEntity> agentPaymentDetailList);
|
||||
|
||||
/**
|
||||
* 代发代扣 结果详情查询
|
||||
* @param agentPayResultRequestDTO
|
||||
* @return
|
||||
*/
|
||||
AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO);
|
||||
}
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
package com.hzya.frame.plugin.cbs8.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.cbs8.dto.req.ElecRequestDTO;
|
||||
import com.hzya.frame.cbs8.dto.req.PayResultRequestDTO;
|
||||
import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
|
||||
import com.hzya.frame.cbs8.dto.req.*;
|
||||
import com.hzya.frame.cbs8.dto.res.*;
|
||||
import com.hzya.frame.cbs8.service.ICbs8Service;
|
||||
import com.hzya.frame.cbs8.util.CBSUtil;
|
||||
import com.hzya.frame.cbs8.util.PayState;
|
||||
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.service.ICbsLogService;
|
||||
|
@ -22,6 +23,7 @@ import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
|||
import com.hzya.frame.seeyon.service.ICtpAttachmentService;
|
||||
import com.hzya.frame.seeyon.util.RestUtil;
|
||||
import com.hzya.frame.uuid.UUIDLong;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -49,6 +51,8 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
|||
@Autowired
|
||||
private ICtpAttachmentService ctpAttachmentService;
|
||||
|
||||
@Autowired
|
||||
private RestUtil restUtil;
|
||||
@Value("${cbs8.elec_path}")
|
||||
private String elec_path;
|
||||
@Value("${OA.data_source_code}")
|
||||
|
@ -177,7 +181,7 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
|||
CtpFileEntity cpFileEntity = new CtpFileEntity();
|
||||
cpFileEntity.setFile(file);
|
||||
cpFileEntity.setDataSourceCode(oa_data_source_code);
|
||||
JSONObject jsonObjectUpload = RestUtil.fileUpload(file,"8000240005");
|
||||
JSONObject jsonObjectUpload = restUtil.fileUpload(file,"8000240005");
|
||||
String file_url = jsonObjectUpload.getString("fileUrl");
|
||||
if (null != jsonObjectUpload && StrUtil.isNotEmpty(file_url)) {
|
||||
String sub_reference = String.valueOf(UUIDLong.longUUID());
|
||||
|
@ -232,4 +236,40 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
|||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代发代扣 支付申请
|
||||
*
|
||||
* @param paymentEntity
|
||||
* @param agentPaymentDetailList
|
||||
*/
|
||||
@Override
|
||||
public PayResponseDTO applyAgentPay(AgentPaymentEntity paymentEntity, List<AgentPaymentDetailEntity> agentPaymentDetailList) {
|
||||
if (null != paymentEntity && CollectionUtils.isNotEmpty(agentPaymentDetailList)){
|
||||
PaymentApplySubmitReqDTO paymentApplySubmitReqDTO = BeanUtil.copyProperties(paymentEntity,PaymentApplySubmitReqDTO.class);
|
||||
List<PaymentApplyAgentDTO> paymentApplyAgentList = new ArrayList<>();
|
||||
for (AgentPaymentDetailEntity detailEntity : agentPaymentDetailList) {
|
||||
PaymentApplyAgentDTO detailDTO = BeanUtil.copyProperties(detailEntity,PaymentApplyAgentDTO.class);
|
||||
paymentApplyAgentList.add(detailDTO);
|
||||
}
|
||||
PayResponseDTO payResponseDTO = cbs8Service.agentPayApply(paymentApplySubmitReqDTO,paymentApplyAgentList);
|
||||
return payResponseDTO;
|
||||
}else {
|
||||
throw new BaseSystemException("参数不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 代发代扣 结果详情查询
|
||||
*
|
||||
* @param agentPayResultRequestDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO) {
|
||||
if (null != agentPayResultRequestDTO && StrUtil.isNotEmpty(agentPayResultRequestDTO.getBusNum())){
|
||||
AgentPayResultResDTO agentPayResultResDTO = cbs8Service.agentPayResult(agentPayResultRequestDTO);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue