Commit f7822e5f authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.17' into MVP1.7.17

parents 7cb22d10 af3dbdeb
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TDispatchInfoPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TFundPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSocialPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail;
......@@ -169,4 +171,10 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(exist = false)
private List<String> attaIdList;
/**
* 公积金是否可修改 可修改 true 不可修改 false
*/
@Schema(description = "公积金是否可修改")
@TableField(exist = false)
private Boolean fundUpdateFlag;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -157,4 +159,13 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "修改类型:1新增;2修改;3删除;4状态346为不可编辑")
private String modelType;
/**
* 公积金是否可修改 可修改 true 不可修改 false
*/
@ExcelAttribute(name = "公积金是否可修改", maxLength = 10)
@ExcelProperty("公积金是否可修改")
@Schema(description = "公积金是否可修改")
@TableField(exist = false)
private Boolean fundUpdateFlag;
}
......@@ -629,12 +629,4 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "公积金户ID")
private String configHouseId;
/**
* 公积金是否可修改 可修改 true 不可修改 false
*/
@ExcelAttribute(name = "公积金是否可修改", maxLength = 10)
@ExcelProperty("公积金是否可修改")
@Schema(description = "公积金是否可修改")
private Boolean fundUpdateFlag;
}
......@@ -844,8 +844,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//查已购买公积金明细
if (null != employeeRegistrationPre.getDispatchInfoFundPreVo()
&& !Common.isEmpty(employeeRegistrationPre.getDispatchInfoFundPreVo().getId())
&& null != employeeRegistrationPre.getDispatchInfoFundPreVo().getFundUpdateFlag()
&& employeeRegistrationPre.getDispatchInfoFundPreVo().getFundUpdateFlag().booleanValue()) {
&& null != employeeRegistrationPre.getFundUpdateFlag()
&& employeeRegistrationPre.getFundUpdateFlag().booleanValue()) {
R<Boolean> fundSdr = socialDaprUtils.getFundPreStatus(employeeRegistrationPre.getDispatchInfoFundPreVo().getId());
//公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,7办理成功,8办理失败
if (fundSdr != null && null != fundSdr.getData()
......
......@@ -645,9 +645,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
initFundPreInfo(preVo, preVo.getDispatchInfoFundPreVo(), user, empPreId);
}
//如果页面传承为不修改则不更新数据
if (null != preVo && null != preVo.getDispatchInfoFundPreVo()
&& null != preVo.getDispatchInfoFundPreVo().getFundUpdateFlag()
&& preVo.getDispatchInfoFundPreVo().getFundUpdateFlag().booleanValue()){
if (null != preVo && null != preVo.getFundUpdateFlag()
&& preVo.getFundUpdateFlag().booleanValue()){
socialDaprUtils.saveFundPreInfo(preVo);
}
}
......
......@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 聚富通到账通知交易流水查询
* 银企互联相关功能
*
* @author huyc
* @date 2024-05-23 10:24:12
......@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@RequestMapping("/icbcQuery" )
@Tag(name = "聚富通到账通知交易流水查询")
@Tag(name = "银企互联相关功能")
public class IcbcTransactionFlowQueryController {
private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;
......@@ -134,4 +134,30 @@ public class IcbcTransactionFlowQueryController {
public R getMeatebillreceive() {
return icbcTransactionFlowQueryService.getMeatebillreceive();
}
/**
* @param
* @Description: 支付指令提交
* @Author: huyc
* @Date: 2025/12/1
* @return:
**/
@Operation(summary = "支付指令提交", description = "支付指令提交")
@PostMapping("/submit")
public R submitPayment() {
return icbcTransactionFlowQueryService.executePayment();
}
/**
* @param
* @Description: 支付指令查询
* @Author: huyc
* @Date: 2025/12/1
* @return:
**/
@Operation(summary = "支付指令查询", description = "支付指令查询")
@PostMapping("/submitSearch")
public R submitSearch() {
return icbcTransactionFlowQueryService.submitSearch();
}
}
......@@ -46,4 +46,8 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
**/
R getMeatebillreceive();
R executePayment();
R submitSearch();
}
......@@ -38,6 +38,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ThreadLocalRandom;
/**
* 聚富通到账通知交易流水查询
......@@ -599,6 +600,181 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok();
}
@Override
public R executePayment() {
// 获取当前时间
LocalTime currentTime = LocalTime.now();
// 使用DateTimeFormatter格式化
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmmssSSS");
String formattedTime = currentTime.format(formatter);
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
try {
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestBizV2 bizContent =
new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestBizV2();
MybankEnterprisePayPayentRequestV2 request = new MybankEnterprisePayPayentRequestV2();
// 数据进行赋值
String seqNo = "AHWX" + System.currentTimeMillis();
//交易代码
bizContent.setTransCode("QHISD");
bizContent.setTranDate(DateUtil.getThisDay());
bizContent.setTranTime(formattedTime);
bizContent.setLanguage("zh_CN");
//指令包序列号:系统产生,一个集团永远不能重复
bizContent.setfSeqNo(seqNo);
bizContent.setZipFlag("0");
//入账方式:0:逐笔记账;2:并笔记账
bizContent.setSettleMode("2");
//总笔数
bizContent.setInstrCount(1);
//总金额:以分为单位
bizContent.setTotalAmount(1L);
bizContent.setZip("");
List<MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2> rd = new ArrayList<>();
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 rdV2 = buildPayRecord(seqNo);
rd.add(rdV2);
bizContent.setRd(rd);
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/pay/payent/V2");
request.setBizContent(bizContent);
MybankEnterprisePayPayentResponseV2 response = client.execute(request);
//huych-注意response中有发送成功的指令号。需保存
//result 指令状态:0:提交成功,等待银行处理 1:授权成功,等待银行处理 2:等待授权 3:等待二次授权 4:等待银行答复 5:主机返回待处理
// 6:被银行拒绝 7:处理成功 8:指令被拒绝授权 9:银行正在处理 10:预约指令 11:预约取消 12:等待监管审批
// 13:监管审批成功,等待银行处理 14:指令被监管审批拒绝 40:待确认 41:客户取消 42:等待华商审批 43:华商审批成功
if (response.isSuccess()) {
// 业务成功处理
return R.ok();
} else {
// 失败
return R.failed("工行支付指令提交失败");
}
} catch (Exception e) {
log.error("工行支付指令提交失败", e);
throw new RuntimeException("支付指令提交失败", e);
}
}
@Override
public R submitSearch() {
// 获取当前时间
LocalTime currentTime = LocalTime.now();
// 使用DateTimeFormatter格式化
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmmssSSS");
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
try {
MybankEnterprisePayQpayentRequestV1.MybankEnterprisePayQpayentRequestBizV1 bizContent =
new MybankEnterprisePayQpayentRequestV1.MybankEnterprisePayQpayentRequestBizV1();
MybankEnterprisePayQpayentRequestV1 request = new MybankEnterprisePayQpayentRequestV1();
String seqNo = "AHWX" + System.currentTimeMillis();
bizContent.setTransCode("QHISD");
bizContent.setTranDate("20251201");
bizContent.setTranTime("103231001");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo(seqNo);
bizContent.setQryfSeqno("null");
//待查平台交易序列号
bizContent.setQrySerialNo("KRJ113228907767190");
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/pay/qpayent/V1");
request.setBizContent(bizContent);
MybankEnterprisePayQpayentResponseV1 response = client.execute(request);
if (response.isSuccess()) {
// 业务成功处理
return R.ok();
} else {
// 失败
return R.failed("查询失败");
}
} catch (Exception e) {
log.error("工行支付指令查询失败", e);
throw new RuntimeException("支付指令查询失败", e);
}
}
private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecord(String seqNo) {
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 payRecord =
new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2();
//业务唯一编号:相同指令不重复
payRecord.setUniBusiId(generateUniBusiId());
//指令顺序号:每笔指令的序号,本包内不重复
payRecord.setiSeqNo(seqNo);
//预约日期
// payRecord.setScheduleDate("20251126");
//对公对私标志:0:对公;1:个人
payRecord.setPayeeType("0");
//币种:ISO币种,仅支持人民币
payRecord.setCurrency("CNY");
//记账处理方式:1:加急;2:普通;3:跨行快汇
payRecord.setPayType("1");
//付款方账户名称
payRecord.setPayerCnname("安徽皖信人力资源管理有限公司");
payRecord.setPayerAccount("1302010109024596014");
//付款方账户英文名称:账号付款时,中文名称、英文名称至少输入一项
payRecord.setPayerEnname("");
//收款方账号:收方不支持NRA账号
payRecord.setPayeeAccount("1302015209250019444");
//收款方账户名称
payRecord.setPayeeCnname("安徽易服智享信息科技有限公司");
//收款方账户英文名称
// payRecord.setPayeeEnname("");
//收款方系统内外标志:1:工行;2:他行
payRecord.setIoFlag("1");
//同城异地标志:1:同城;2:异地
payRecord.setSameCityFlag("1");
//收款方所在城市名称
// payRecord.setPayeeCity("合肥市");
//收款方行号:跨行指令要求对方行行号和行名上送正确
// payRecord.setPayeeBankNo("102100099996");
//收款方行名
// payRecord.setPayeeBankName("");
//金额:以分为单位
payRecord.setAmount(1L);
//用途代码
// payRecord.setPurposeCode(record.getPurposeCode());
//用途中文描述:用途代码和用途中文描述二选一上送
payRecord.setPurpose("转账");
//摘要
payRecord.setSummary("测试转账");
//英文备注
// payRecord.setSummaryEn(record.getSummaryEn());
//附言:不得有非法字符,包括 ' " : %
// payRecord.setPostscript(record.getPostscript());
//业务编号(业务参考号)
// payRecord.setRefNo(record.getRefNo());
//相关业务编号
// payRecord.setRelatedRefNo(record.getRelatedRefNo());
//ERP流水号
// payRecord.setErpSerialNo(record.getErpSerialNo());
//ERP支票号
// payRecord.setErpCheckNo(record.getErpCheckNo());
//业务代码
// payRecord.setBusiCode(record.getBusiCode());
//原始凭证种类
// payRecord.setOriVoucherType(record.getOriVoucherType());
//原始凭证号
// payRecord.setOriVoucherNo(record.getOriVoucherNo());
//原始凭证名称
// payRecord.setOriVoucherName(record.getOriVoucherName());
//预先审批编号
// payRecord.setPreApprovalNo(record.getPreApprovalNo());
//监管用途代码:0:无用途 1:工资及退休金 2:贷款 3:采购款 4:借款 5:拨款 6:还款 7:交款 8:差旅费 9:运费 10:保证金 11:投资 99:其他
// payRecord.setRegulationPurposeCode(record.getRegulationPurposeCode());
return payRecord;
}
private String generateUniBusiId() {
return "UNI" + System.currentTimeMillis() + ThreadLocalRandom.current().nextInt(1000, 9999);
}
private void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
EKPEntryPushParam pushParam,String bankName,String bankNo) throws ParseException {
pushParam.setFd_recipName(entry.getRecipName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment