Browse Source

fix(check): 直接支付

master
Yen 2 weeks ago
parent
commit
dd508362b5
  1. 8
      cms-modules/cms-system/src/main/java/com/qs/serve/modules/tbs/common/TbsSeeYonConst.java
  2. 3
      cms-modules/cms-system/src/main/java/com/qs/serve/modules/vtb/entity/bo/VtbVerificationCenterCommitBo.java
  3. 2
      cms-modules/cms-system/src/main/java/com/qs/serve/modules/vtb/service/VtbVerificationService.java
  4. 24
      cms-modules/cms-system/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java

8
cms-modules/cms-system/src/main/java/com/qs/serve/modules/tbs/common/TbsSeeYonConst.java

@ -98,6 +98,14 @@ public interface TbsSeeYonConst {
} }
} }
class PayBillConf{
public static String Code(){
return DevEnvironmentConfig.isDev()?"PayBill_Test":"PayBill";
}
}
String API_TEST = "/testConnection"; String API_TEST = "/testConnection";
String API_PROCESS_CREATE = "/process/create"; String API_PROCESS_CREATE = "/process/create";
String API_CONTRACT_RELEASE_CANCEL = "/process/cancelReleaseContractApply"; String API_CONTRACT_RELEASE_CANCEL = "/process/cancelReleaseContractApply";

3
cms-modules/cms-system/src/main/java/com/qs/serve/modules/vtb/entity/bo/VtbVerificationCenterCommitBo.java

@ -46,4 +46,7 @@ public class VtbVerificationCenterCommitBo {
/** 是否释放 */ /** 是否释放 */
private Integer inputReleaseFlag; private Integer inputReleaseFlag;
/** 是否直接支付(这个值取反 0-表示直接支付;1-表示不直接支付) */
private Integer directPayFlag;
} }

2
cms-modules/cms-system/src/main/java/com/qs/serve/modules/vtb/service/VtbVerificationService.java

@ -91,7 +91,7 @@ public interface VtbVerificationService extends IService<VtbVerification> {
*/ */
Map<String, Object> buildSeeYonVerificationData(TbsActivity activity, SysUser sysUser, Map<String, Object> buildSeeYonVerificationData(TbsActivity activity, SysUser sysUser,
VtbVerification verification, String saleRegionNames, VtbVerification verification, String saleRegionNames,
String bizRegionNames,BmsSupplier supplier); String bizRegionNames,BmsSupplier supplier,String templateCode);
/** /**
* 审核通过回调 * 审核通过回调

24
cms-modules/cms-system/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java

@ -933,7 +933,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
//保存 //保存
this.saveOrUpdate(verification); this.saveOrUpdate(verification);
this.commitSy(activity,sysUser,verification,saleBizNames,bizBizNames,supplier); this.commitSy(activity,sysUser,verification,saleBizNames,bizBizNames,supplier,verificationBo.getDirectPayFlag());
this.updateById(verification); this.updateById(verification);
if(!StringUtils.hasText(verification.getSyFormId())||!StringUtils.hasText(verification.getSyFlowId())){ if(!StringUtils.hasText(verification.getSyFormId())||!StringUtils.hasText(verification.getSyFlowId())){
Assert.throwEx("远程调用失败"); Assert.throwEx("远程调用失败");
@ -1118,12 +1118,17 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
* @param saleRegionNames * @param saleRegionNames
* @param bizRegionNames * @param bizRegionNames
*/ */
private void commitSy(TbsActivity activity,SysUser sysUser,VtbVerification verification,String saleRegionNames,String bizRegionNames,BmsSupplier supplier){ private void commitSy(TbsActivity activity,SysUser sysUser,VtbVerification verification,
Map<String, Object> data = buildSeeYonVerificationData(activity, sysUser, verification, saleRegionNames, bizRegionNames,supplier); String saleRegionNames,String bizRegionNames,BmsSupplier supplier,Integer isDirectPayFlag){
String templateCode = TbsSeeYonConst.CostCheckConf.Code();
if(isDirectPayFlag!=null&&isDirectPayFlag.equals(1)){
templateCode = TbsSeeYonConst.PayBillConf.Code();
}
Map<String, Object> data = buildSeeYonVerificationData(activity, sysUser, verification, saleRegionNames, bizRegionNames,supplier,templateCode);
String dataJson = JsonUtil.objectToJson(data); String dataJson = JsonUtil.objectToJson(data);
log.warn("核销请求JSON,核销号:{}:{}",verification.getVerificationCode(),dataJson); log.warn("核销请求JSON,核销号:{}:{}",verification.getVerificationCode(),dataJson);
BaseCreateProcessBo createProcess = new BaseCreateProcessBo(); BaseCreateProcessBo createProcess = new BaseCreateProcessBo();
createProcess.setTemplateCode(TbsSeeYonConst.CostCheckConf.Code()); createProcess.setTemplateCode(templateCode);
createProcess.setMemberLoginName(sysUser.getSyAccount()); createProcess.setMemberLoginName(sysUser.getSyAccount());
createProcess.setSubjectTitle(TbsSeeYonConst.PRE_TITLE_VERIFICATION + verification.getRemark()); createProcess.setSubjectTitle(TbsSeeYonConst.PRE_TITLE_VERIFICATION + verification.getRemark());
createProcess.setTargetId(verification.getId()+""); createProcess.setTargetId(verification.getId()+"");
@ -1134,14 +1139,14 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
} }
String flowId = flowIdResult.getData(); String flowId = flowIdResult.getData();
String formId = null; String formId = null;
R<String> formIdResult = seeYonService.getFormId(TbsSeeYonConst.CostCheckConf.Code(),verification.getId()); R<String> formIdResult = seeYonService.getFormId(templateCode,verification.getId());
if(formIdResult.getStatus()==200){ if(formIdResult.getStatus()==200){
formId = formIdResult.getData(); formId = formIdResult.getData();
} }
verification.setSyFlowId(flowId); verification.setSyFlowId(flowId);
verification.setSyFormId(formId); verification.setSyFormId(formId);
//创建流程后回调 //创建流程后回调
BaseCreateCallbackBo callbackBo = new BaseCreateCallbackBo(TbsSeeYonConst.CostCheckConf.Code(),verification.getId()+""); BaseCreateCallbackBo callbackBo = new BaseCreateCallbackBo(templateCode,verification.getId()+"");
seeYonService.createCallbackStatus(callbackBo); seeYonService.createCallbackStatus(callbackBo);
} }
@ -1165,12 +1170,13 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
temp.setSupplierName(supplier.getSupplierName()); temp.setSupplierName(supplier.getSupplierName());
temp.setSupplierCode(supplier.getSupplierCode()); temp.setSupplierCode(supplier.getSupplierCode());
temp.setAmount(activity.getTotalAmount().subtract(activity.getUsedAmount())); temp.setAmount(activity.getTotalAmount().subtract(activity.getUsedAmount()));
return buildSeeYonVerificationData(activity,sysUser,temp,saleBizNames,bizBizNames,supplier); String templateCode = TbsSeeYonConst.CostCheckConf.Code();
return buildSeeYonVerificationData(activity,sysUser,temp,saleBizNames,bizBizNames,supplier,templateCode);
} }
@NotNull @NotNull
@Override @Override
public Map<String, Object> buildSeeYonVerificationData(TbsActivity activity, SysUser sysUser, VtbVerification verification, String saleRegionNames, String bizRegionNames,BmsSupplier supplier) { public Map<String, Object> buildSeeYonVerificationData(TbsActivity activity, SysUser sysUser, VtbVerification verification, String saleRegionNames, String bizRegionNames,BmsSupplier supplier,String templateCode) {
Map<String, Object> data = new HashMap<>(20); Map<String, Object> data = new HashMap<>(20);
data.put("costApplyCode", verification.getVerificationCode()); data.put("costApplyCode", verification.getVerificationCode());
data.put("applyUserCode", sysUser.getCode()); data.put("applyUserCode", sysUser.getCode());
@ -1183,7 +1189,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
data.put("orgId", verification.getId()); data.put("orgId", verification.getId());
data.put("targetId", verification.getId()); data.put("targetId", verification.getId());
data.put("targetCode", verification.getVerificationCode()); data.put("targetCode", verification.getVerificationCode());
data.put("exsp1",TbsSeeYonConst.CostCheckConf.Code()); data.put("exsp1",templateCode);
data.put("jinE", verification.getAmount().toString()); data.put("jinE", verification.getAmount().toString());
data.put("money", verification.getAmount().toString()); data.put("money", verification.getAmount().toString());
data.put("auto_check", VerificationUtil.getAutoFlag()); data.put("auto_check", VerificationUtil.getAutoFlag());

Loading…
Cancel
Save