Merge branch 'yuecheng-project' of http://hzya.ufyct.com:9015/root/kangarooDataCenterV3 into yuecheng-project
This commit is contained in:
commit
d0206cb1c4
|
@ -1,8 +1,10 @@
|
||||||
package com.hzya.frame.plugin.cbs8.plugin;
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
import com.hzya.frame.cbs8.dto.req.AgentPayResultRequestDTO;
|
import com.hzya.frame.cbs8.dto.req.AgentPayResultRequestDTO;
|
||||||
|
import com.hzya.frame.cbs8.dto.res.AgentPayQueryDTO;
|
||||||
import com.hzya.frame.cbs8.dto.res.AgentPayResultResDTO;
|
import com.hzya.frame.cbs8.dto.res.AgentPayResultResDTO;
|
||||||
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
@ -11,6 +13,8 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description
|
* @Description
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
|
@ -102,9 +106,8 @@ public class AgentPayResultPluginInitializer extends PluginBaseEntity {
|
||||||
//1、查询代发代扣交易未完成代
|
//1、查询代发代扣交易未完成代
|
||||||
//2、调用cbs接口
|
//2、调用cbs接口
|
||||||
AgentPayResultRequestDTO agentPayResultRequestDTO = new AgentPayResultRequestDTO();
|
AgentPayResultRequestDTO agentPayResultRequestDTO = new AgentPayResultRequestDTO();
|
||||||
agentPayResultRequestDTO.setBusNum("");
|
agentPayResultRequestDTO.setBusNum("PA00034224062600011");
|
||||||
AgentPayResultResDTO agentPayResultResDTO = cbsPluginService.agentPayResult(agentPayResultRequestDTO);
|
AgentPayResultResDTO agentPayResultResDTO = cbsPluginService.agentPayResult(agentPayResultRequestDTO);
|
||||||
//更新OA表单
|
|
||||||
//记录日志
|
//记录日志
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,20 +109,8 @@ public class PayApplyAgentPluginInitializer extends PluginBaseEntity {
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
//1、查询代支付的
|
//1、查询代支付的
|
||||||
AgentPaymentEntity agentPaymentEntity = new AgentPaymentEntity();
|
AgentPaymentEntity agentPaymentEntity = new AgentPaymentEntity();
|
||||||
List<AgentPaymentEntity> agentPaymentList = agentPaymentService.queryUnpaid(agentPaymentEntity);
|
agentPaymentEntity.setOaId("4442823497745714629");
|
||||||
if (CollectionUtils.isNotEmpty(agentPaymentList)){
|
cbsPluginService.applyAgentPay(agentPaymentEntity);
|
||||||
for (AgentPaymentEntity paymentEntity : agentPaymentList) {
|
|
||||||
AgentPaymentDetailEntity detailEntity = new AgentPaymentDetailEntity();
|
|
||||||
detailEntity.setFormmainId(paymentEntity.getId());
|
|
||||||
List<AgentPaymentDetailEntity> agentPaymentDetailList = agentPaymentService.queryDetails(detailEntity);
|
|
||||||
if (CollectionUtils.isNotEmpty(agentPaymentDetailList)){
|
|
||||||
//调用代发代扣接口
|
|
||||||
PayResponseDTO payResponseDTO = cbsPluginService.applyAgentPay(paymentEntity, agentPaymentDetailList);
|
|
||||||
//更新OA表单
|
|
||||||
//记录日志
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class PayApplyPluginInitializer extends PluginBaseEntity {
|
||||||
if (null == paymentEntity)
|
if (null == paymentEntity)
|
||||||
paymentEntity = new PaymentEntity();
|
paymentEntity = new PaymentEntity();
|
||||||
//支付申请
|
//支付申请
|
||||||
paymentEntity.setOaId("5490849762671477371");
|
paymentEntity.setOaId("8475071606892874568");
|
||||||
cbsPluginService.applyPay(paymentEntity);
|
cbsPluginService.applyPay(paymentEntity);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,9 +57,8 @@ public interface ICbsPluginService {
|
||||||
/**
|
/**
|
||||||
* 代发代扣 支付申请
|
* 代发代扣 支付申请
|
||||||
* @param paymentEntity
|
* @param paymentEntity
|
||||||
* @param agentPaymentDetailList
|
|
||||||
*/
|
*/
|
||||||
PayResponseDTO applyAgentPay(AgentPaymentEntity paymentEntity, List<AgentPaymentDetailEntity> agentPaymentDetailList);
|
void applyAgentPay(AgentPaymentEntity paymentEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代发代扣 结果详情查询
|
* 代发代扣 结果详情查询
|
||||||
|
|
|
@ -5,22 +5,23 @@ import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.map.MapBuilder;
|
import cn.hutool.core.map.MapBuilder;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.hzya.frame.cbs8.dto.req.*;
|
import com.hzya.frame.cbs8.dto.req.*;
|
||||||
import com.hzya.frame.cbs8.dto.res.*;
|
import com.hzya.frame.cbs8.dto.res.*;
|
||||||
import com.hzya.frame.cbs8.service.ICbs8Service;
|
import com.hzya.frame.cbs8.service.ICbs8Service;
|
||||||
import com.hzya.frame.cbs8.util.CBSUtil;
|
import com.hzya.frame.cbs8.util.CBSUtil;
|
||||||
|
import com.hzya.frame.cbs8.util.CurrencyEnum;
|
||||||
import com.hzya.frame.cbs8.util.PayState;
|
import com.hzya.frame.cbs8.util.PayState;
|
||||||
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
import com.hzya.frame.seeyon.cap4.form.dto.*;
|
import com.hzya.frame.seeyon.cap4.form.dto.*;
|
||||||
import com.hzya.frame.seeyon.cbs8.entity.*;
|
import com.hzya.frame.seeyon.cbs8.entity.*;
|
||||||
import com.hzya.frame.seeyon.cbs8.service.ICbsLogService;
|
import com.hzya.frame.seeyon.cbs8.service.*;
|
||||||
import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
|
|
||||||
import com.hzya.frame.seeyon.cbs8.service.ITransactionDetailService;
|
|
||||||
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
|
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
|
||||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||||
import com.hzya.frame.seeyon.service.ICtpAttachmentService;
|
import com.hzya.frame.seeyon.service.ICtpAttachmentService;
|
||||||
|
@ -38,6 +39,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description
|
* @Description
|
||||||
|
@ -57,6 +59,10 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
private ICtpAttachmentService ctpAttachmentService;
|
private ICtpAttachmentService ctpAttachmentService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITransactionDetailService transactionDetailService;
|
private ITransactionDetailService transactionDetailService;
|
||||||
|
@Autowired
|
||||||
|
private IAgentPaymentService agentPaymentService;
|
||||||
|
@Autowired
|
||||||
|
private IAgentPaymentDetailService agentPaymentDetailService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RestUtil restUtil;
|
private RestUtil restUtil;
|
||||||
|
@ -104,6 +110,7 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
}
|
}
|
||||||
//4、更新OA表单
|
//4、更新OA表单
|
||||||
pay.setDataSourceCode(oa_data_source_code);
|
pay.setDataSourceCode(oa_data_source_code);
|
||||||
|
pay.setApplyCode(payResponseDTO.getBusNum());
|
||||||
paymentService.updatePayState(pay);
|
paymentService.updatePayState(pay);
|
||||||
//5、记录操作日志
|
//5、记录操作日志
|
||||||
savePayLog(pay,payResponseDTO);
|
savePayLog(pay,payResponseDTO);
|
||||||
|
@ -174,6 +181,7 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
//如果支付状态为空,保存支付申请状态,如果支付状态不为空,则保存支付状态
|
//如果支付状态为空,保存支付申请状态,如果支付状态不为空,则保存支付状态
|
||||||
PaymentEntity paymentEntity = new PaymentEntity();
|
PaymentEntity paymentEntity = new PaymentEntity();
|
||||||
paymentEntity.setOaId(entity.getOa_id());
|
paymentEntity.setOaId(entity.getOa_id());
|
||||||
|
paymentEntity.setApplyCode(entity.getCbs_apply_code());
|
||||||
paymentEntity.setDataSourceCode(oa_data_source_code);
|
paymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
List<PaymentEntity> paymentList = paymentService.query(paymentEntity);
|
List<PaymentEntity> paymentList = paymentService.query(paymentEntity);
|
||||||
if (CollectionUtils.isNotEmpty(paymentList)){
|
if (CollectionUtils.isNotEmpty(paymentList)){
|
||||||
|
@ -300,21 +308,53 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
* 代发代扣 支付申请
|
* 代发代扣 支付申请
|
||||||
*
|
*
|
||||||
* @param paymentEntity
|
* @param paymentEntity
|
||||||
* @param agentPaymentDetailList
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PayResponseDTO applyAgentPay(AgentPaymentEntity paymentEntity, List<AgentPaymentDetailEntity> agentPaymentDetailList) {
|
public void applyAgentPay(AgentPaymentEntity paymentEntity) {
|
||||||
if (null != paymentEntity && CollectionUtils.isNotEmpty(agentPaymentDetailList)){
|
try {
|
||||||
PaymentApplySubmitReqDTO paymentApplySubmitReqDTO = BeanUtil.copyProperties(paymentEntity,PaymentApplySubmitReqDTO.class);
|
if (null != paymentEntity ){
|
||||||
List<PaymentApplyAgentDTO> paymentApplyAgentList = new ArrayList<>();
|
paymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
for (AgentPaymentDetailEntity detailEntity : agentPaymentDetailList) {
|
List<AgentPaymentEntity> agentPaymentList = agentPaymentService.queryUnpaid(paymentEntity);
|
||||||
PaymentApplyAgentDTO detailDTO = BeanUtil.copyProperties(detailEntity,PaymentApplyAgentDTO.class);
|
if (CollectionUtils.isNotEmpty(agentPaymentList)){
|
||||||
paymentApplyAgentList.add(detailDTO);
|
for (AgentPaymentEntity agentPay : agentPaymentList) {
|
||||||
|
AgentPaymentDetailEntity detailEntity = new AgentPaymentDetailEntity();
|
||||||
|
detailEntity.setFormmainId(agentPay.getOaId());
|
||||||
|
detailEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
List<AgentPaymentDetailEntity> agentPaymentDetailList = agentPaymentService.queryDetails(detailEntity);
|
||||||
|
if (CollectionUtils.isNotEmpty(agentPaymentDetailList)){
|
||||||
|
PaymentApplySubmitReqDTO paymentApplySubmitReqDTO = BeanUtil.copyProperties(agentPay,PaymentApplySubmitReqDTO.class);
|
||||||
|
List<PaymentApplyAgentDTO> paymentApplyAgentList = new ArrayList<>();
|
||||||
|
for (AgentPaymentDetailEntity detail : agentPaymentDetailList) {
|
||||||
|
PaymentApplyAgentDTO detailDTO = BeanUtil.copyProperties(detail,PaymentApplyAgentDTO.class);
|
||||||
|
paymentApplyAgentList.add(detailDTO);
|
||||||
|
}
|
||||||
|
//招行这里要传203
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend5("203");
|
||||||
|
PayResponseDTO payResponseDTO = cbs8Service.agentPayApply(paymentApplySubmitReqDTO,paymentApplyAgentList);
|
||||||
|
if (null != payResponseDTO){
|
||||||
|
Boolean successed = payResponseDTO.getSuccessed();
|
||||||
|
AgentPaymentEntity pay = new AgentPaymentEntity();
|
||||||
|
pay.setOaId(paymentEntity.getOaId());
|
||||||
|
pay.setDataSourceCode(oa_data_source_code);
|
||||||
|
if (successed){
|
||||||
|
//更新申请单号到OA
|
||||||
|
pay.setApplyCode(payResponseDTO.getBusNum());
|
||||||
|
pay.setPayResult("审批中");
|
||||||
|
}else {
|
||||||
|
pay.setPayResult(payResponseDTO.getErrorMsg());
|
||||||
|
}
|
||||||
|
agentPaymentService.updateResult(pay);
|
||||||
|
System.out.println(JSONObject.toJSONString(payResponseDTO));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
throw new BaseSystemException("参数不能为空");
|
||||||
}
|
}
|
||||||
PayResponseDTO payResponseDTO = cbs8Service.agentPayApply(paymentApplySubmitReqDTO,paymentApplyAgentList);
|
}catch (Exception e){
|
||||||
return payResponseDTO;
|
logger.error("代发代扣出错:{}",e);
|
||||||
}else {
|
|
||||||
throw new BaseSystemException("参数不能为空");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,9 +366,49 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO) {
|
public AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO) {
|
||||||
if (null != agentPayResultRequestDTO && StrUtil.isNotEmpty(agentPayResultRequestDTO.getBusNum())){
|
try {
|
||||||
AgentPayResultResDTO agentPayResultResDTO = cbs8Service.agentPayResult(agentPayResultRequestDTO);
|
if (null != agentPayResultRequestDTO && StrUtil.isNotEmpty(agentPayResultRequestDTO.getBusNum())){
|
||||||
return agentPayResultResDTO;
|
AgentPayResultResDTO agentPayResultResDTO = cbs8Service.agentPayResult(agentPayResultRequestDTO);
|
||||||
|
//更新OA表单
|
||||||
|
String busNum = agentPayResultResDTO.getBusNum();
|
||||||
|
if (StringUtils.isNotEmpty(busNum)){
|
||||||
|
AgentPaymentEntity agentPaymentEntity = new AgentPaymentEntity();
|
||||||
|
agentPaymentEntity.setApplyCode(busNum);
|
||||||
|
agentPaymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
AgentPaymentEntity entity = agentPaymentService.queryByApplyCode(agentPaymentEntity);
|
||||||
|
String pay_status = agentPayResultResDTO.getPayStatus();
|
||||||
|
String status = agentPayResultResDTO.getStatus();
|
||||||
|
if (null != entity){
|
||||||
|
AgentPaymentEntity result = new AgentPaymentEntity();
|
||||||
|
result.setOaId(entity.getOaId());
|
||||||
|
result.setDataSourceCode(oa_data_source_code);
|
||||||
|
//更新主表
|
||||||
|
if (StrUtil.isEmpty(pay_status)) {
|
||||||
|
result.setPayResult(PayState.payStateGetValue(status));//支付申请状态 支付状态和支付申请状态用一个
|
||||||
|
} else {
|
||||||
|
result.setPayResult(PayState.payStateGetValue(pay_status));//支付状态 支付状态和支付申请状态用一个
|
||||||
|
}
|
||||||
|
agentPaymentService.updateResult(result);
|
||||||
|
//更新明细表
|
||||||
|
List<AgentPayQueryDTO> agentDetails = agentPayResultResDTO.getAgentDetails();
|
||||||
|
for (AgentPayQueryDTO d : agentDetails) {
|
||||||
|
AgentPaymentDetailEntity detail = new AgentPaymentDetailEntity();
|
||||||
|
detail.setFormmainId(entity.getOaId());
|
||||||
|
detail.setDtlAmount(d.getDtlAmount());
|
||||||
|
detail.setDtlCnapsCode(d.getDtlCnapsCode());
|
||||||
|
detail.setDtlRevName(d.getDtlRevName());
|
||||||
|
detail.setDtlSeqNum(Integer.valueOf(d.getDtlSeqNum()));
|
||||||
|
detail.setPayResult(PayState.payStateGetValue(d.getDtlStatus()));
|
||||||
|
detail.setPayDate(CBSUtil.convertTimestampToString(d.getDtlPayTime()));
|
||||||
|
detail.setDataSourceCode(oa_data_source_code);
|
||||||
|
agentPaymentDetailService.updatePayResult(detail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return agentPayResultResDTO;
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error("代发代扣详情结果查询出错{}",e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -336,16 +416,38 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
/**
|
/**
|
||||||
* 保存交易明细到OA底表
|
* 保存交易明细到OA底表
|
||||||
*
|
*
|
||||||
* @param transactionDetailList
|
* @param transactionlList
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void saveTransactionDetail(List<TransactionDetailDTO> transactionDetailList) {
|
public void saveTransactionDetail(List<TransactionDetailDTO> transactionlList) {
|
||||||
if (CollectionUtils.isNotEmpty(transactionDetailList)){
|
if (CollectionUtils.isNotEmpty(transactionlList)){
|
||||||
//过滤已经保存过的数据
|
//过滤已经保存过的数据
|
||||||
for (TransactionDetailDTO dto : transactionDetailList) {
|
//收款档案表的数据
|
||||||
TransactionDetailEntity transactionDetail = new TransactionDetailEntity();
|
TransactionDetailEntity transactionDetailEntity = new TransactionDetailEntity();
|
||||||
BeanUtil.copyProperties(dto,transactionDetail);
|
transactionDetailEntity.setBankTransactionDate(DateUtil.lastWeek().toDateStr());
|
||||||
transactionDetailService.restSave(transactionDetail);
|
transactionDetailEntity.setDataSourceCode(oa_data_source_code);
|
||||||
|
List<TransactionDetailEntity> transactionDetailList = transactionDetailService.querySerialNumber(transactionDetailEntity);
|
||||||
|
//过滤已经保存的数据
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionDetailList)){
|
||||||
|
//过滤transactionlList 去除已经存在transactionDetailList中的数据,条件为transactionSerialNumber相等
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionlList)){
|
||||||
|
transactionlList = transactionlList.stream()
|
||||||
|
.filter(item -> transactionDetailList.stream()
|
||||||
|
.noneMatch(detailItem -> item.getTransactionSerialNumber().equals(detailItem.getTransactionSerialNumber())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(transactionlList)){
|
||||||
|
//保存到OA底表
|
||||||
|
for (TransactionDetailDTO dto : transactionlList) {
|
||||||
|
TransactionDetailEntity transactionDetail = new TransactionDetailEntity();
|
||||||
|
BeanUtil.copyProperties(dto,transactionDetail);
|
||||||
|
transactionDetail.setCurrency(CurrencyEnum.getChineseNameByCode(dto.getCurrency()));
|
||||||
|
if (NumberUtil.isNumber(dto.getBankTransactionDate())){//如果是时间戳 转换成日期字符串
|
||||||
|
transactionDetail.setBankTransactionDate(CBSUtil.convertTimestampToString(dto.getBankTransactionDate()));
|
||||||
|
}
|
||||||
|
transactionDetailService.restSave(transactionDetail);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,13 @@ public class PaymentApplySubmitReqDTO {
|
||||||
private String cityFlag;
|
private String cityFlag;
|
||||||
//银行备用字段 一共8个
|
//银行备用字段 一共8个
|
||||||
private String bankExtend1;
|
private String bankExtend1;
|
||||||
|
private String bankExtend2;
|
||||||
|
private String bankExtend3;
|
||||||
|
private String bankExtend4;
|
||||||
|
private String bankExtend5;
|
||||||
|
private String bankExtend6;
|
||||||
|
private String bankExtend7;
|
||||||
|
private String bankExtend8;
|
||||||
|
|
||||||
//客户备用字段1
|
//客户备用字段1
|
||||||
private String erpExtend1;
|
private String erpExtend1;
|
||||||
|
@ -179,4 +186,60 @@ public class PaymentApplySubmitReqDTO {
|
||||||
public void setErpExtend3(String erpExtend3) {
|
public void setErpExtend3(String erpExtend3) {
|
||||||
this.erpExtend3 = erpExtend3;
|
this.erpExtend3 = erpExtend3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBankExtend2() {
|
||||||
|
return bankExtend2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankExtend2(String bankExtend2) {
|
||||||
|
this.bankExtend2 = bankExtend2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankExtend3() {
|
||||||
|
return bankExtend3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankExtend3(String bankExtend3) {
|
||||||
|
this.bankExtend3 = bankExtend3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankExtend4() {
|
||||||
|
return bankExtend4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankExtend4(String bankExtend4) {
|
||||||
|
this.bankExtend4 = bankExtend4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankExtend5() {
|
||||||
|
return bankExtend5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankExtend5(String bankExtend5) {
|
||||||
|
this.bankExtend5 = bankExtend5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankExtend6() {
|
||||||
|
return bankExtend6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankExtend6(String bankExtend6) {
|
||||||
|
this.bankExtend6 = bankExtend6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankExtend7() {
|
||||||
|
return bankExtend7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankExtend7(String bankExtend7) {
|
||||||
|
this.bankExtend7 = bankExtend7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankExtend8() {
|
||||||
|
return bankExtend8;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankExtend8(String bankExtend8) {
|
||||||
|
this.bankExtend8 = bankExtend8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ public class Cbs8ServiceImpl implements ICbs8Service {
|
||||||
List<JSONObject> dataList = cbsResponseDTO.getData();
|
List<JSONObject> dataList = cbsResponseDTO.getData();
|
||||||
if (CollectionUtils.isNotEmpty(dataList)){
|
if (CollectionUtils.isNotEmpty(dataList)){
|
||||||
JSONObject o = dataList.get(0);
|
JSONObject o = dataList.get(0);
|
||||||
PayResponseDTO payResponseDTO = JSON.toJavaObject(o, PayResponseDTO.class);
|
PayResponseDTO payResponseDTO = JSON.toJavaObject(o, PayResponseDTO.class);
|
||||||
return payResponseDTO;
|
return payResponseDTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,15 @@ public enum PayState {
|
||||||
one("1","待处理"),
|
one("1","待处理"),
|
||||||
two("2","审批中"),
|
two("2","审批中"),
|
||||||
three("3","处理失败"),
|
three("3","处理失败"),
|
||||||
four("4","审批通过"),
|
four("4","审批完成"),
|
||||||
five("5","审批撤销"),
|
five("5","审批撤销"),
|
||||||
six("6","审批拒绝"),
|
six("6","审批拒绝"),
|
||||||
seven("7","待发送审批"),
|
seven("7","待发送审批"),
|
||||||
eight("8","集中受理中"),
|
eight("8","集中受理中"),
|
||||||
nine("9","审批退回"),
|
nine("9","审批退回"),
|
||||||
ten("10","未处理");
|
ten("10","预处理中"),
|
||||||
|
eleven("11","预处理拒绝"),
|
||||||
|
twelve("12","资金监控审批中");
|
||||||
|
|
||||||
|
|
||||||
//类型
|
//类型
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.seeyon.cbs8.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 代发代扣
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/26 10:50
|
||||||
|
**/
|
||||||
|
public interface IAgentPaymentDao extends IBaseDao<AgentPaymentEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.seeyon.cbs8.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 代发代扣明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/26 10:54
|
||||||
|
**/
|
||||||
|
public interface IAgentPaymentDetailDao extends IBaseDao<AgentPaymentDetailEntity,String> {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.seeyon.cbs8.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/26 10:51
|
||||||
|
**/
|
||||||
|
@Repository("OAAgentPaymentDaoImpl")
|
||||||
|
public class AgentPaymentDaoImpl extends MybatisGenericDao<AgentPaymentEntity,String> implements IAgentPaymentDao {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.seeyon.cbs8.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/26 10:55
|
||||||
|
**/
|
||||||
|
@Repository("OAAgentPaymentDetailDaoImpl")
|
||||||
|
public class AgentPaymentDetailDaoImpl extends MybatisGenericDao<AgentPaymentDetailEntity,String> implements IAgentPaymentDetailDao {
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import com.hzya.frame.web.entity.BaseEntity;
|
||||||
* @Date 2024/6/18 14:58
|
* @Date 2024/6/18 14:58
|
||||||
**/
|
**/
|
||||||
public class AgentPaymentDetailEntity extends BaseEntity {
|
public class AgentPaymentDetailEntity extends BaseEntity {
|
||||||
|
//每笔明细金额
|
||||||
private String dtlAmount;
|
private String dtlAmount;
|
||||||
//收款账号
|
//收款账号
|
||||||
private String dtlRevAccount;
|
private String dtlRevAccount;
|
||||||
|
@ -25,6 +26,11 @@ public class AgentPaymentDetailEntity extends BaseEntity {
|
||||||
//明细序号,从1开始递增
|
//明细序号,从1开始递增
|
||||||
private int dtlSeqNum;
|
private int dtlSeqNum;
|
||||||
|
|
||||||
|
//支付结果
|
||||||
|
private String payResult;
|
||||||
|
//支付日期
|
||||||
|
private String payDate;
|
||||||
|
|
||||||
public String getDtlAmount() {
|
public String getDtlAmount() {
|
||||||
return dtlAmount;
|
return dtlAmount;
|
||||||
}
|
}
|
||||||
|
@ -88,4 +94,20 @@ public class AgentPaymentDetailEntity extends BaseEntity {
|
||||||
public void setDtlSeqNum(int dtlSeqNum) {
|
public void setDtlSeqNum(int dtlSeqNum) {
|
||||||
this.dtlSeqNum = dtlSeqNum;
|
this.dtlSeqNum = dtlSeqNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPayResult() {
|
||||||
|
return payResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayResult(String payResult) {
|
||||||
|
this.payResult = payResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayDate() {
|
||||||
|
return payDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayDate(String payDate) {
|
||||||
|
this.payDate = payDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?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.seeyon.cbs8.dao.impl.AgentPaymentDetailDaoImpl">
|
||||||
|
<resultMap id="get-AgentPaymentDetailEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="formmainId" column="formmainId" />
|
||||||
|
<result property="tabName" column="tabName" />
|
||||||
|
<result property="dtlSeqNum" column="dtlSeqNum" />
|
||||||
|
<result property="dtlAmount" column="dtlAmount" />
|
||||||
|
<result property="dtlRevAccount" column="dtlRevAccount" />
|
||||||
|
<result property="dtlCnapsCode" column="dtlCnapsCode" />
|
||||||
|
<result property="dtlRevName" column="dtlRevName" />
|
||||||
|
<result property="dtlRevBankName" column="dtlRevBankName" />
|
||||||
|
<result property="payResult" column="payResult" />
|
||||||
|
<result property="payDate" column="payDate" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="AgentPaymentDetailEntity_Base_Column_List">
|
||||||
|
id,
|
||||||
|
formmainId,
|
||||||
|
tabName,
|
||||||
|
dtlSeqNum,
|
||||||
|
dtlAmount,
|
||||||
|
dtlRevAccount,
|
||||||
|
dtlCnapsCode,
|
||||||
|
dtlRevName,
|
||||||
|
dtlRevBankName,
|
||||||
|
payResult,
|
||||||
|
payDate
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-AgentPaymentDetailEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
|
||||||
|
select
|
||||||
|
<include refid="AgentPaymentDetailEntity_Base_Column_List"/>
|
||||||
|
from (
|
||||||
|
SELECT
|
||||||
|
formson_0225.id,
|
||||||
|
formson_0225.formmain_id AS formmainId,
|
||||||
|
'formson_0225' AS tabName,
|
||||||
|
formson_0225.field0001 AS dtlSeqNum,
|
||||||
|
formson_0225.field0019 AS dtlAmount,
|
||||||
|
formson_0225.field0036 AS dtlRevAccount,
|
||||||
|
formson_0225.field0035 AS dtlCnapsCode,
|
||||||
|
formson_0225.field0037 AS dtlRevName,
|
||||||
|
formson_0225.field0034 AS dtlRevBankName,
|
||||||
|
formson_0225.field0044 AS payResult,
|
||||||
|
formson_0225.field0045 AS payDate
|
||||||
|
FROM
|
||||||
|
formson_0225
|
||||||
|
)formson_0225
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' "> formson_0225.id = #{id} </if>
|
||||||
|
<if test="formmainId != null and formmainId !='' "> and formson_0225.formmainId = #{formmainId} </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> and formson_0225.tabName = #{tabName} </if>
|
||||||
|
<if test="dtlSeqNum != null and dtlSeqNum !='' "> and formson_0225.dtlSeqNum = #{dtlSeqNum} </if>
|
||||||
|
<if test="dtlAmount != null and dtlAmount !='' "> and formson_0225.dtlAmount = #{dtlAmount} </if>
|
||||||
|
<if test="dtlRevAccount != null and dtlRevAccount !='' "> and formson_0225.dtlRevAccount = #{dtlRevAccount} </if>
|
||||||
|
<if test="dtlCnapsCode != null and dtlCnapsCode !='' "> and formson_0225.dtlCnapsCode = #{dtlCnapsCode} </if>
|
||||||
|
<if test="dtlRevName != null and dtlRevName !='' "> and formson_0225.dtlRevName = #{dtlRevName} </if>
|
||||||
|
<if test="dtlRevBankName != null and dtlRevBankName !='' "> and formson_0225.dtlRevBankName = #{dtlRevBankName} </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
|
||||||
|
update formson_0225 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="payDate != null and payDate !='' ">field0045 =#{payDate},</if>
|
||||||
|
<if test="payResult != null and payResult !='' ">field0044 =#{payResult}</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 更新支付结果 -->
|
||||||
|
<update id="entity_update_result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
|
||||||
|
update formson_0225 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="payDate != null and payDate !='' ">field0045 =#{payDate},</if>
|
||||||
|
<if test="payResult != null and payResult !='' ">field0044 =#{payResult}</if>
|
||||||
|
</trim>
|
||||||
|
where field0001=#{dtlSeqNum} and field0019=#{dtlAmount} and field0035=#{dtlCnapsCode} and field0037=#{dtlRevName}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
|
@ -9,6 +9,11 @@ import com.hzya.frame.web.entity.BaseEntity;
|
||||||
**/
|
**/
|
||||||
public class AgentPaymentEntity extends BaseEntity {
|
public class AgentPaymentEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//oa id
|
||||||
|
private String oaId;
|
||||||
|
private String finishedflag;
|
||||||
|
//流程标题
|
||||||
|
private String title;
|
||||||
//业务参考号
|
//业务参考号
|
||||||
private String referenceNum;
|
private String referenceNum;
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +31,10 @@ public class AgentPaymentEntity extends BaseEntity {
|
||||||
private String payAccount;
|
private String payAccount;
|
||||||
//用途
|
//用途
|
||||||
private String purpose;
|
private String purpose;
|
||||||
|
//申请单号
|
||||||
|
private String applyCode;
|
||||||
|
//支付结果
|
||||||
|
private String payResult;
|
||||||
|
|
||||||
private String tableName;//表名称
|
private String tableName;//表名称
|
||||||
private String billName;//单据名称
|
private String billName;//单据名称
|
||||||
|
@ -94,4 +102,44 @@ public class AgentPaymentEntity extends BaseEntity {
|
||||||
public void setBillName(String billName) {
|
public void setBillName(String billName) {
|
||||||
this.billName = billName;
|
this.billName = billName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOaId() {
|
||||||
|
return oaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOaId(String oaId) {
|
||||||
|
this.oaId = oaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFinishedflag() {
|
||||||
|
return finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishedflag(String finishedflag) {
|
||||||
|
this.finishedflag = finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplyCode() {
|
||||||
|
return applyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplyCode(String applyCode) {
|
||||||
|
this.applyCode = applyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayResult() {
|
||||||
|
return payResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayResult(String payResult) {
|
||||||
|
this.payResult = payResult;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?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.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl">
|
||||||
|
<resultMap id="get-AgentPaymentEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
|
||||||
|
<result property="oaId" column="oaId" />
|
||||||
|
<result property="title" column="title" />
|
||||||
|
<result property="finishedflag" column="finishedflag" />
|
||||||
|
<result property="referenceNum" column="referenceNum" />
|
||||||
|
<result property="busType" column="busType" />
|
||||||
|
<result property="amount" column="amount" />
|
||||||
|
<result property="currency" column="currency" />
|
||||||
|
<result property="payAccount" column="payAccount" />
|
||||||
|
<result property="purpose" column="purpose" />
|
||||||
|
<result property="tableName" column="tableName" />
|
||||||
|
<result property="billName" column="billName" />
|
||||||
|
<result property="applyCode" column="applyCode" />
|
||||||
|
<result property="payResult" column="payResult" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="AgentPaymentEntity_Base_Column_List">
|
||||||
|
oaId,
|
||||||
|
tableName,
|
||||||
|
finishedflag,
|
||||||
|
title,
|
||||||
|
billName,
|
||||||
|
referenceNum,
|
||||||
|
busType,
|
||||||
|
amount,
|
||||||
|
currency,
|
||||||
|
payAccount,
|
||||||
|
applyCode,
|
||||||
|
payResult,
|
||||||
|
purpose
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-AgentPaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
|
||||||
|
select
|
||||||
|
<include refid="AgentPaymentEntity_Base_Column_List"/>
|
||||||
|
from (
|
||||||
|
SELECT
|
||||||
|
formmain_0224.id AS oaId,
|
||||||
|
'formmain_0224' as tableName,
|
||||||
|
formmain_0224.finishedflag,
|
||||||
|
COL_SUMMARY.SUBJECT AS title,
|
||||||
|
'工资表' AS billName,
|
||||||
|
formmain_0224.field0002 AS referenceNum,
|
||||||
|
'203' AS busType,
|
||||||
|
formmain_0224.field0020 AS amount,
|
||||||
|
'10' AS currency,
|
||||||
|
'755915707610112' AS payAccount,
|
||||||
|
formmain_0224.field0043 AS applyCode,
|
||||||
|
formmain_0224.field0046 AS payResult,
|
||||||
|
'工资' AS purpose
|
||||||
|
FROM
|
||||||
|
formmain_0224
|
||||||
|
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0224.id
|
||||||
|
)formmain_0224
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="referenceNum != null and referenceNum !='' "> formmain_0224.referenceNum = #{referenceNum} </if>
|
||||||
|
<if test="busType != null and busType !='' "> and formmain_0224.busType = #{busType} </if>
|
||||||
|
<if test="amount != null and amount !='' ">and formmain_0224.amount = #{amount} </if>
|
||||||
|
<if test="currency != null and currency !='' "> and formmain_0224.currency = #{currency} </if>
|
||||||
|
<if test="payAccount != null and payAccount !='' ">and formmain_0224.payAccount = #{payAccount} </if>
|
||||||
|
<if test="applyCode != null and applyCode !='' ">and formmain_0224.applyCode = #{applyCode} </if>
|
||||||
|
<if test="payResult != null and payResult !='' ">and formmain_0224.payResult = #{payResult} </if>
|
||||||
|
<if test="purpose != null and purpose !='' "> and formmain_0224.purpose = #{purpose} </if>
|
||||||
|
<if test="tableName != null and tableName !='' "> and formmain_0224.tableName = #{tableName} </if>
|
||||||
|
<if test="oaId != null and oaId !='' ">and formmain_0224.oaId = #{oaId} </if>
|
||||||
|
<if test="title != null and title !='' "> and formmain_0224.title = #{title} </if>
|
||||||
|
<if test="billName != null and billName !='' "> and formmain_0224.billName = #{billName} </if>
|
||||||
|
<if test="finishedflag != null and finishedflag !='' "> and formmain_0224.finishedflag = #{finishedflag} </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="entity_list_base_unpaid" resultMap="get-AgentPaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
|
||||||
|
select
|
||||||
|
<include refid="AgentPaymentEntity_Base_Column_List"/>
|
||||||
|
from (
|
||||||
|
SELECT
|
||||||
|
formmain_0224.id AS oaId,
|
||||||
|
'formmain_0224' as tableName,
|
||||||
|
formmain_0224.finishedflag,
|
||||||
|
COL_SUMMARY.SUBJECT AS title,
|
||||||
|
'工资表' AS billName,
|
||||||
|
formmain_0224.field0002 AS referenceNum,
|
||||||
|
'203' AS busType,
|
||||||
|
formmain_0224.field0020 AS amount,
|
||||||
|
'10' AS currency,
|
||||||
|
'755915707610112' AS payAccount,
|
||||||
|
formmain_0224.field0043 AS applyCode,
|
||||||
|
formmain_0224.field0046 AS payResult,
|
||||||
|
'工资' AS purpose
|
||||||
|
FROM
|
||||||
|
formmain_0224
|
||||||
|
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0224.id
|
||||||
|
)formmain_0224
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="referenceNum != null and referenceNum !='' "> formmain_0224.referenceNum = #{referenceNum} </if>
|
||||||
|
<if test="busType != null and busType !='' "> and formmain_0224.busType = #{busType} </if>
|
||||||
|
<if test="amount != null and amount !='' ">and formmain_0224.amount = #{amount} </if>
|
||||||
|
<if test="currency != null and currency !='' "> and formmain_0224.currency = #{currency} </if>
|
||||||
|
<if test="payAccount != null and payAccount !='' ">and formmain_0224.payAccount = #{payAccount} </if>
|
||||||
|
<if test="applyCode != null and applyCode !='' ">and formmain_0224.applyCode = #{applyCode} </if>
|
||||||
|
<if test="purpose != null and purpose !='' "> and formmain_0224.purpose = #{purpose} </if>
|
||||||
|
<if test="tableName != null and tableName !='' "> and formmain_0224.tableName = #{tableName} </if>
|
||||||
|
<if test="oaId != null and oaId !='' ">and formmain_0224.oaId = #{oaId} </if>
|
||||||
|
<if test="title != null and title !='' "> and formmain_0224.title = #{title} </if>
|
||||||
|
<if test="billName != null and billName !='' "> and formmain_0224.billName = #{billName} </if>
|
||||||
|
<if test="finishedflag != null and finishedflag !='' "> and formmain_0224.finishedflag = #{finishedflag} </if>
|
||||||
|
</trim>
|
||||||
|
and formmain_0224.applyCode is null
|
||||||
|
and formmain_0224.payResult is null
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
|
||||||
|
update formmain_0224 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="applyCode != null and applyCode !='' ">field0043 =#{applyCode},</if>
|
||||||
|
<if test="payResult != null and payResult !='' ">field0046 =#{payResult}</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{oaId}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
|
@ -10,6 +10,7 @@ import com.hzya.frame.web.entity.BaseEntity;
|
||||||
public class PaymentEntity extends BaseEntity {
|
public class PaymentEntity extends BaseEntity {
|
||||||
|
|
||||||
private String oaId;//主表id
|
private String oaId;//主表id
|
||||||
|
private String formsonId;//明细表id
|
||||||
private String payCompany;//付款公司
|
private String payCompany;//付款公司
|
||||||
private String title;//流程标题
|
private String title;//流程标题
|
||||||
private String tableName;//表名称
|
private String tableName;//表名称
|
||||||
|
@ -19,12 +20,14 @@ public class PaymentEntity extends BaseEntity {
|
||||||
private String busType;//业务类型
|
private String busType;//业务类型
|
||||||
private String payResultField;//支付结果字段
|
private String payResultField;//支付结果字段
|
||||||
private String payDateField;//打款日期字段
|
private String payDateField;//打款日期字段
|
||||||
|
private String applyCodeField;//支付申请单号字段
|
||||||
private String receiptFiled;//电子回单字段
|
private String receiptFiled;//电子回单字段
|
||||||
private String summaryId;//summaryid
|
private String summaryId;//summaryid
|
||||||
private String startDate;//单据日期
|
private String startDate;//单据日期
|
||||||
private String finishedflag;//流程状态
|
private String finishedflag;//流程状态
|
||||||
private String payDate;//打款日期
|
private String payDate;//打款日期
|
||||||
private String payResult;//支付结果
|
private String payResult;//支付结果
|
||||||
|
private String applyCode;//支付申请单号
|
||||||
private String payAccount;//付款账号
|
private String payAccount;//付款账号
|
||||||
private String payBankName;//付款开户银行
|
private String payBankName;//付款开户银行
|
||||||
private String amount;//金额
|
private String amount;//金额
|
||||||
|
@ -297,4 +300,28 @@ public class PaymentEntity extends BaseEntity {
|
||||||
public void setPayCompanyCode(String payCompanyCode) {
|
public void setPayCompanyCode(String payCompanyCode) {
|
||||||
this.payCompanyCode = payCompanyCode;
|
this.payCompanyCode = payCompanyCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFormsonId() {
|
||||||
|
return formsonId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormsonId(String formsonId) {
|
||||||
|
this.formsonId = formsonId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplyCodeField() {
|
||||||
|
return applyCodeField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplyCodeField(String applyCodeField) {
|
||||||
|
this.applyCodeField = applyCodeField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplyCode() {
|
||||||
|
return applyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplyCode(String applyCode) {
|
||||||
|
this.applyCode = applyCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,13 @@
|
||||||
<result property="personalFlag" column="personalFlag" />
|
<result property="personalFlag" column="personalFlag" />
|
||||||
<result property="tableName" column="tableName" />
|
<result property="tableName" column="tableName" />
|
||||||
<result property="oaId" column="oaId" />
|
<result property="oaId" column="oaId" />
|
||||||
|
<result property="formsonId" column="formsonId" />
|
||||||
<result property="payCompany" column="payCompany" />
|
<result property="payCompany" column="payCompany" />
|
||||||
<result property="billName" column="billName" />
|
<result property="billName" column="billName" />
|
||||||
<result property="payResultField" column="payResultField" />
|
<result property="payResultField" column="payResultField" />
|
||||||
<result property="payDateField" column="payDateField" />
|
<result property="payDateField" column="payDateField" />
|
||||||
|
<result property="applyCodeField" column="applyCodeField" />
|
||||||
|
<result property="applyCode" column="applyCode" />
|
||||||
<result property="receiptFiled" column="receiptFiled" />
|
<result property="receiptFiled" column="receiptFiled" />
|
||||||
<result property="summaryId" column="summaryId" />
|
<result property="summaryId" column="summaryId" />
|
||||||
<result property="startDate" column="startDate" />
|
<result property="startDate" column="startDate" />
|
||||||
|
@ -34,7 +37,8 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="PaymentEntity_Base_Column_List">
|
<sql id="PaymentEntity_Base_Column_List">
|
||||||
oaId,
|
oaId,
|
||||||
|
formsonId,
|
||||||
payCompany,
|
payCompany,
|
||||||
payCompanyCode,
|
payCompanyCode,
|
||||||
title,
|
title,
|
||||||
|
@ -44,12 +48,14 @@
|
||||||
busType,
|
busType,
|
||||||
payResultField,
|
payResultField,
|
||||||
payDateField,
|
payDateField,
|
||||||
|
applyCodeField,
|
||||||
receiptFiled,
|
receiptFiled,
|
||||||
summaryId,
|
summaryId,
|
||||||
startDate,
|
startDate,
|
||||||
finishedflag,
|
finishedflag,
|
||||||
payDate,
|
payDate,
|
||||||
payResult,
|
payResult,
|
||||||
|
applyCode,
|
||||||
payAccount,
|
payAccount,
|
||||||
payBankName,
|
payBankName,
|
||||||
amount,
|
amount,
|
||||||
|
@ -68,39 +74,71 @@
|
||||||
<!-- 基础查询语句 -->
|
<!-- 基础查询语句 -->
|
||||||
<sql id="base_sql">
|
<sql id="base_sql">
|
||||||
SELECT
|
SELECT
|
||||||
formson_0210.id as oaId,
|
formmain_0209.id as oaId, -- 主表id
|
||||||
'formson_0210' as tableName,
|
formson_0210.formsonId,
|
||||||
COL_SUMMARY.SUBJECT as title,
|
'formson_0210' as tableName, -- 表名
|
||||||
unit.name as payCompany,
|
COL_SUMMARY.SUBJECT as title, -- 单据标题
|
||||||
|
unit.name as payCompany, -- 付款公司
|
||||||
'差旅费报销单' as billName,
|
'差旅费报销单' as billName,
|
||||||
'field0072' as payResultField,
|
'field0072' as payResultField, -- 支付结果字段
|
||||||
'field0073' as payDateField,
|
'field0073' as payDateField, -- 打款日期字段
|
||||||
'' as receiptFiled,
|
'field0080' AS applyCodeField,-- CBS支付申请单号
|
||||||
|
'' as receiptFiled,-- 电子回单字段
|
||||||
COL_SUMMARY.id as summaryId,
|
COL_SUMMARY.id as summaryId,
|
||||||
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum,
|
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号
|
||||||
formmain_0209.START_DATE as startDate,
|
formmain_0209.START_DATE as startDate, -- 单据日期
|
||||||
formmain_0209.FINISHEDFLAG as finishedflag,
|
formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态
|
||||||
formson_0210.field0073 as payDate,
|
formson_0210.field0073 as payDate, -- 打款日期
|
||||||
formson_0210.field0072 as payResult,
|
formson_0210.field0072 as payResult, -- 支付结果
|
||||||
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount,
|
formson_0210.field0080 AS applyCode,-- 支付申请单号
|
||||||
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName,
|
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户
|
||||||
formson_0210.field0031 as amount,
|
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行
|
||||||
formmain_0209.field0038 as purpose,
|
formson_0210.field0031 as amount, -- 金额
|
||||||
formmain_0209.field0038 as cbsAbstract,
|
formmain_0209.field0038 as purpose, -- 用途
|
||||||
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount,
|
formmain_0209.field0038 as cbsAbstract, -- 摘要
|
||||||
formson_0210.field0068 as revBankName,
|
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户
|
||||||
'测试' as revAccountName,
|
formson_0210.field0068 as revBankName, -- 收款开户行
|
||||||
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode,
|
formson_0210.field0075 as revAccountName, -- 收款人
|
||||||
item.showvalue as personalFlag,
|
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号
|
||||||
'OTH' as revBankType,
|
item.ENUMVALUE as personalFlag,-- 公私标记
|
||||||
|
formson_0210.field0079 as revBankType,
|
||||||
'10' as currency,
|
'10' as currency,
|
||||||
'202' as busType,
|
'202' as busType,
|
||||||
'' as receipt
|
'' as receipt -- 电子回单
|
||||||
from
|
FROM
|
||||||
formson_0210
|
(
|
||||||
|
SELECT
|
||||||
|
WM_CONCAT(id) AS formsonId,
|
||||||
|
formmain_id,
|
||||||
|
SUM(field0031) AS field0031,
|
||||||
|
MIN(sort) AS sort,
|
||||||
|
field0068,
|
||||||
|
field0069,
|
||||||
|
field0071,
|
||||||
|
field0079,
|
||||||
|
field0075,
|
||||||
|
field0070,
|
||||||
|
field0072,
|
||||||
|
field0073,
|
||||||
|
field0080
|
||||||
|
FROM
|
||||||
|
formson_0210
|
||||||
|
WHERE
|
||||||
|
field0067 = '-5486592002512828355'
|
||||||
|
GROUP BY
|
||||||
|
formmain_id,
|
||||||
|
field0068,
|
||||||
|
field0069,
|
||||||
|
field0071,
|
||||||
|
field0079,
|
||||||
|
field0075,
|
||||||
|
field0070,
|
||||||
|
field0072,
|
||||||
|
field0073,
|
||||||
|
field0080
|
||||||
|
)formson_0210
|
||||||
LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id
|
LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id
|
||||||
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0209.id
|
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0209.id
|
||||||
-- LEFT JOIN CTP_AFFAIR ON CTP_AFFAIR.object_id = COL_SUMMARY.id
|
|
||||||
left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070
|
left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070
|
||||||
left join ORG_UNIT unit on unit.id =formmain_0209.field0002
|
left join ORG_UNIT unit on unit.id =formmain_0209.field0002
|
||||||
</sql>
|
</sql>
|
||||||
|
@ -129,6 +167,7 @@
|
||||||
<if test="title != null and title !='' "> and v.title = #{title} </if>
|
<if test="title != null and title !='' "> and v.title = #{title} </if>
|
||||||
<if test="billName != null and billName !='' "> and v.billName = #{billName} </if>
|
<if test="billName != null and billName !='' "> and v.billName = #{billName} </if>
|
||||||
<if test="payResult != null and payResult !='' ">and v.payResult = #{payResult} </if>
|
<if test="payResult != null and payResult !='' ">and v.payResult = #{payResult} </if>
|
||||||
|
<if test="applyCode != null and applyCode !='' ">and v.applyCode = #{applyCode} </if>
|
||||||
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
|
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
|
||||||
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
|
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
|
||||||
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
|
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
|
||||||
|
@ -235,7 +274,8 @@
|
||||||
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
|
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
|
||||||
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
|
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
|
||||||
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
|
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
|
||||||
|
and v.amount > 0
|
||||||
|
and v.payResult is null
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -285,9 +325,10 @@
|
||||||
update ${tableName} set
|
update ${tableName} set
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="payDate != null and payDate !='' ">${payDateField} =#{payDate},</if>
|
<if test="payDate != null and payDate !='' ">${payDateField} =#{payDate},</if>
|
||||||
<if test="payResult != null and payResult !='' ">${payResultField} =#{payResult}</if>
|
<if test="payResult != null and payResult !='' ">${payResultField} =#{payResult},</if>
|
||||||
|
<if test="applyCodeField != null and applyCodeField !='' ">${applyCodeField} =#{applyCode}</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{oaId}
|
where id = #{formsonId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!--修改电子回单-->
|
<!--修改电子回单-->
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hzya.frame.seeyon.cbs8.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 代发代扣明细
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/26 11:00
|
||||||
|
**/
|
||||||
|
public interface IAgentPaymentDetailService extends IBaseService<AgentPaymentDetailEntity,String> {
|
||||||
|
/**
|
||||||
|
* 更新明细表支付状态
|
||||||
|
* @param detail
|
||||||
|
*/
|
||||||
|
void updatePayResult(AgentPaymentDetailEntity detail);
|
||||||
|
}
|
|
@ -21,6 +21,14 @@ public interface IAgentPaymentService extends IBaseService<AgentPaymentEntity,St
|
||||||
*/
|
*/
|
||||||
List<AgentPaymentEntity> queryUnpaid(AgentPaymentEntity entity) throws Exception;
|
List<AgentPaymentEntity> queryUnpaid(AgentPaymentEntity entity) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据支付申请单号查询
|
||||||
|
* @param agentPayment
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
AgentPaymentEntity queryByApplyCode(AgentPaymentEntity agentPayment)throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询明细表
|
* 查询明细表
|
||||||
* @param entity
|
* @param entity
|
||||||
|
@ -28,4 +36,10 @@ public interface IAgentPaymentService extends IBaseService<AgentPaymentEntity,St
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
List<AgentPaymentDetailEntity> queryDetails(AgentPaymentDetailEntity entity)throws Exception;
|
List<AgentPaymentDetailEntity> queryDetails(AgentPaymentDetailEntity entity)throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新支付状态
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateResult(AgentPaymentEntity entity);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.hzya.frame.seeyon.cbs8.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentDetailService;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/6/26 11:01
|
||||||
|
**/
|
||||||
|
@Service("OAAgentPaymentDetailServiceImpl")
|
||||||
|
public class AgentPaymentDetailServiceImpl extends BaseService<AgentPaymentDetailEntity,String> implements IAgentPaymentDetailService {
|
||||||
|
|
||||||
|
private IAgentPaymentDetailDao agentPaymentDetailDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setAgentPaymentDetailDao(IAgentPaymentDetailDao agentPaymentDetailDao) {
|
||||||
|
this.agentPaymentDetailDao = agentPaymentDetailDao;
|
||||||
|
this.dao = agentPaymentDetailDao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新明细表支付状态
|
||||||
|
*
|
||||||
|
* @param detail
|
||||||
|
*/
|
||||||
|
@DS("#detail.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updatePayResult(AgentPaymentDetailEntity detail) {
|
||||||
|
agentPaymentDetailDao.update("com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDetailDaoImpl.entity_update_result",detail);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,17 @@
|
||||||
package com.hzya.frame.seeyon.cbs8.service.impl;
|
package com.hzya.frame.seeyon.cbs8.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDao;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao;
|
||||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||||
|
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentDetailService;
|
||||||
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
|
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
|
||||||
|
import com.hzya.frame.web.exception.BaseSystemException;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -15,6 +23,16 @@ import java.util.List;
|
||||||
**/
|
**/
|
||||||
@Service(value = "cbs8AgentPaymentServiceImpl")
|
@Service(value = "cbs8AgentPaymentServiceImpl")
|
||||||
public class AgentPaymentServiceImpl extends BaseService<AgentPaymentEntity,String> implements IAgentPaymentService {
|
public class AgentPaymentServiceImpl extends BaseService<AgentPaymentEntity,String> implements IAgentPaymentService {
|
||||||
|
|
||||||
|
private IAgentPaymentDao agentPaymentDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAgentPaymentDetailService agentPaymentDetailService;
|
||||||
|
@Autowired
|
||||||
|
public void setAgentPaymentDao(IAgentPaymentDao agentPaymentDao) {
|
||||||
|
this.agentPaymentDao = agentPaymentDao;
|
||||||
|
this.dao = agentPaymentDao;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 查询待支付待代发代扣 主表
|
* 查询待支付待代发代扣 主表
|
||||||
*
|
*
|
||||||
|
@ -22,8 +40,31 @@ public class AgentPaymentServiceImpl extends BaseService<AgentPaymentEntity,Stri
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public List<AgentPaymentEntity> queryUnpaid(AgentPaymentEntity entity) throws Exception {
|
public List<AgentPaymentEntity> queryUnpaid(AgentPaymentEntity entity) throws Exception {
|
||||||
|
List<AgentPaymentEntity> list = agentPaymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl.entity_list_base_unpaid");
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据支付申请单号查询
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AgentPaymentEntity queryByApplyCode(AgentPaymentEntity entity) throws Exception {
|
||||||
|
if (null != entity && StrUtil.isNotEmpty(entity.getApplyCode())){
|
||||||
|
List<AgentPaymentEntity> list = agentPaymentDao.query(entity);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
if (list.size() > 1){
|
||||||
|
throw new BaseSystemException("根据"+entity.getApplyCode()+"查询到多条记录");
|
||||||
|
}
|
||||||
|
return list.get(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,8 +75,19 @@ public class AgentPaymentServiceImpl extends BaseService<AgentPaymentEntity,Stri
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public List<AgentPaymentDetailEntity> queryDetails(AgentPaymentDetailEntity entity) throws Exception {
|
public List<AgentPaymentDetailEntity> queryDetails(AgentPaymentDetailEntity entity) throws Exception {
|
||||||
return null;
|
List<AgentPaymentDetailEntity> list = agentPaymentDetailService.query(entity);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateResult(AgentPaymentEntity entity) {
|
||||||
|
agentPaymentDao.update("com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl.entity_update",entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,9 +120,15 @@ public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implem
|
||||||
if (null != entity
|
if (null != entity
|
||||||
&& StrUtil.isNotEmpty(entity.getTableName())
|
&& StrUtil.isNotEmpty(entity.getTableName())
|
||||||
&& StrUtil.isNotEmpty(entity.getOaId())
|
&& StrUtil.isNotEmpty(entity.getOaId())
|
||||||
|
&& StrUtil.isNotEmpty(entity.getFormsonId())
|
||||||
&& StrUtil.isNotEmpty(entity.getPayDateField())
|
&& StrUtil.isNotEmpty(entity.getPayDateField())
|
||||||
&& StrUtil.isNotEmpty(entity.getPayResultField())){
|
&& StrUtil.isNotEmpty(entity.getPayResultField())){
|
||||||
paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_payState",entity);
|
String formsonId = entity.getFormsonId();
|
||||||
|
String[] formsonIdArray = formsonId.split(",");
|
||||||
|
for (String s : formsonIdArray) {
|
||||||
|
entity.setFormsonId(s);
|
||||||
|
paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_payState",entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue