Merge remote-tracking branch 'origin/yuecheng-project' into yuecheng-project
This commit is contained in:
commit
bcece745c1
|
@ -3,6 +3,7 @@ package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
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;
|
||||||
|
@ -96,6 +97,6 @@ public class ElecBillPluginInitializer extends PluginBaseEntity {
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
cbsPluginService.elecBillUpload(requestJson);
|
cbsPluginService.elecBillUpload(requestJson);
|
||||||
return null;
|
return BaseResult.getSuccessMessageEntity("cbs8电子回单插件执行成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package com.hzya.frame.plugin.cbs8.plugin;
|
package com.hzya.frame.plugin.cbs8.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
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.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;
|
||||||
|
@ -19,7 +23,8 @@ public class PayApplyPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICbsPluginService cbsPluginService;
|
private ICbsPluginService cbsPluginService;
|
||||||
|
@Autowired
|
||||||
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
/***
|
/***
|
||||||
* 插件初始化方法
|
* 插件初始化方法
|
||||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
@ -102,11 +107,26 @@ public class PayApplyPluginInitializer extends PluginBaseEntity {
|
||||||
requestJson.remove("jsonStr");
|
requestJson.remove("jsonStr");
|
||||||
paymentEntity = JSONObject.parseObject(requestJson.toString(),PaymentEntity.class);
|
paymentEntity = JSONObject.parseObject(requestJson.toString(),PaymentEntity.class);
|
||||||
}
|
}
|
||||||
if (null == paymentEntity)
|
if (null == paymentEntity){
|
||||||
paymentEntity = new PaymentEntity();
|
paymentEntity = new PaymentEntity();
|
||||||
|
}
|
||||||
|
String taskDetailId = requestJson.getString("integration_task_living_details_id");
|
||||||
|
if (StrUtil.isNotEmpty(taskDetailId)){
|
||||||
|
//查询日志里的参数
|
||||||
|
//查询日志表
|
||||||
|
IntegrationTaskLivingDetailsEntity taskDetailEntity = taskLivingDetailsService.get(taskDetailId);
|
||||||
|
if (null != taskDetailEntity){
|
||||||
|
//重试标记
|
||||||
|
paymentEntity.setRetryFlag("1");
|
||||||
|
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支付申请插件执行完成");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
|
||||||
import com.hzya.frame.cbs8.dto.res.TransactionDetailDTO;
|
import com.hzya.frame.cbs8.dto.res.TransactionDetailDTO;
|
||||||
import com.hzya.frame.cbs8.util.CBSUtil;
|
import com.hzya.frame.cbs8.util.CBSUtil;
|
||||||
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
|
||||||
|
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;
|
||||||
|
@ -120,7 +121,6 @@ public class TransactionDetailPluginInitializer extends PluginBaseEntity {
|
||||||
List<TransactionDetailDTO> transactionDetailList = cbsPluginService.queryTransactionDetail(transactionDetailReqDTO);
|
List<TransactionDetailDTO> transactionDetailList = cbsPluginService.queryTransactionDetail(transactionDetailReqDTO);
|
||||||
//保存交易明细到OA底表
|
//保存交易明细到OA底表
|
||||||
cbsPluginService.saveTransactionDetail(transactionDetailList);
|
cbsPluginService.saveTransactionDetail(transactionDetailList);
|
||||||
return new JsonResultEntity("成功",true,transactionDetailList);
|
return BaseResult.getSuccessMessageEntity("成功",transactionDetailList);
|
||||||
//return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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){
|
||||||
|
@ -209,10 +213,11 @@ public class CbsPluginServiceImpl implements ICbsPluginService {
|
||||||
public void elecBillUpload(JSONObject requestJson) throws Exception {
|
public void elecBillUpload(JSONObject requestJson) throws Exception {
|
||||||
//查询支付成功 没有电子回单的数据
|
//查询支付成功 没有电子回单的数据
|
||||||
PaymentEntity paymentEntity = new PaymentEntity();
|
PaymentEntity paymentEntity = new PaymentEntity();
|
||||||
// List<PaymentEntity> paymentList = paymentService.queryElecIsNull(paymentEntity);
|
paymentEntity.setDataSourceCode(oa_data_source_code);
|
||||||
paymentEntity.setPayDate("2024-06-20");
|
List<PaymentEntity> paymentList = paymentService.queryElecIsNull(paymentEntity);
|
||||||
paymentEntity.setReferenceNum("41");
|
//paymentEntity.setPayDate("2024-06-20");
|
||||||
List<PaymentEntity> paymentList = Arrays.asList(paymentEntity);
|
//paymentEntity.setReferenceNum("41");
|
||||||
|
//List<PaymentEntity> paymentList = Arrays.asList(paymentEntity);
|
||||||
if (CollectionUtils.isNotEmpty(paymentList)) {
|
if (CollectionUtils.isNotEmpty(paymentList)) {
|
||||||
for (PaymentEntity pay : paymentList) {
|
for (PaymentEntity pay : paymentList) {
|
||||||
try {
|
try {
|
||||||
|
@ -312,8 +317,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 +347,65 @@ 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");
|
||||||
|
|
||||||
|
//民生银行 CMC
|
||||||
|
//1表示代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend5("1");
|
||||||
|
|
||||||
|
//农业银行 ABC
|
||||||
|
//200表示同行代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend2("200");
|
||||||
|
//99020001表示工资发放
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend8("99020001");
|
||||||
|
|
||||||
|
//光大银行 CEB
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend1("00000000");
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend8("0");
|
||||||
|
//证件号,不知道填什么
|
||||||
|
for (PaymentApplyAgentDTO paymentApplyAgentDTO : list) {
|
||||||
|
paymentApplyAgentDTO.setDtlExtend1("");
|
||||||
|
}
|
||||||
|
|
||||||
|
//民生银行
|
||||||
|
//付款类型 1代表代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend5("1");
|
||||||
|
|
||||||
|
//工商银行
|
||||||
|
paymentApplySubmitReqDTO.setUrgentTag("0");
|
||||||
|
|
||||||
|
//广发银行
|
||||||
|
//3表示代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend2("3");
|
||||||
|
|
||||||
|
//华夏银行
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend1("0");
|
||||||
|
// xhj3001表示代发工资
|
||||||
|
paymentApplySubmitReqDTO.setBankExtend2("xhj3001");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代发代扣 结果详情查询
|
* 代发代扣 结果详情查询
|
||||||
*
|
*
|
||||||
|
@ -495,4 +560,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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@ import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
|
import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
|
||||||
import com.hzya.frame.mdm.service.IMdmServiceCache;
|
import com.hzya.frame.mdm.service.IMdmServiceCache;
|
||||||
|
@ -79,7 +81,8 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
private IMdmServiceCache mdmServiceCache;
|
private IMdmServiceCache mdmServiceCache;
|
||||||
@Resource
|
@Resource
|
||||||
private IMdmModuleSendLogDao mdmModuleSendLogDao;
|
private IMdmModuleSendLogDao mdmModuleSendLogDao;
|
||||||
|
@Resource
|
||||||
|
private IMdmModuleDistributeTripartiteDao mdmModuleDistributeTripartiteDao;
|
||||||
@Value("${zt.url}")
|
@Value("${zt.url}")
|
||||||
private String url ;
|
private String url ;
|
||||||
|
|
||||||
|
@ -342,6 +345,21 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
parameterJson.put("body",apiEntity.getBodyIn());
|
parameterJson.put("body",apiEntity.getBodyIn());
|
||||||
parameterJson.put("query",apiEntity.getQueryIn());
|
parameterJson.put("query",apiEntity.getQueryIn());
|
||||||
parameterJson.put("data",object);
|
parameterJson.put("data",object);
|
||||||
|
|
||||||
|
if (!"1".equals(type)) {//删除或者修改情况,查询三方id,有就设置,没有就设置空
|
||||||
|
//1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setSts("Y");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
|
||||||
|
String tripartiteId = "";
|
||||||
|
if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
|
||||||
|
tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
|
||||||
|
}
|
||||||
|
parameterJson.put("tripartiteId", tripartiteId);
|
||||||
|
}
|
||||||
/** head */
|
/** head */
|
||||||
Map<String, String> header = null;
|
Map<String, String> header = null;
|
||||||
/** query */
|
/** query */
|
||||||
|
@ -399,7 +417,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
return BaseResult.getFailureMessageEntity("发送错误:"+rzjsonResultEntity.getMsg());
|
return BaseResult.getFailureMessageEntity("发送错误:"+rzjsonResultEntity.getMsg());
|
||||||
}
|
}
|
||||||
JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
|
JSONObject attritube = JSONObject.parseObject(rzjsonResultEntity.getAttribute().toString());
|
||||||
logger.info("认证接口返回信息:"+ attritube.toJSONString());
|
logger.info("认证接口返回信息:"+ attritube.toJSONString());
|
||||||
querys = getQuery(apiEntity,querys,attritube);
|
querys = getQuery(apiEntity,querys,attritube);
|
||||||
headers = getHeaders(apiEntity,headers,attritube);
|
headers = getHeaders(apiEntity,headers,attritube);
|
||||||
|
|
||||||
|
@ -408,6 +426,39 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
//组装数据发送
|
//组装数据发送
|
||||||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||||
if(jsonResultEntity.isFlag()){
|
if(jsonResultEntity.isFlag()){
|
||||||
|
if ("1".equals(type)) {//保存三方返回id
|
||||||
|
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
|
||||||
|
JSONObject backScriptJson = new JSONObject();
|
||||||
|
backScriptJson.put("data", jsonResultEntity.getAttribute());
|
||||||
|
groovy.put("code", scriptEntity.getScriptCode()+"back");
|
||||||
|
groovy.put("className", scriptEntity.getClassName()+"back");
|
||||||
|
groovy.put("name", scriptEntity.getScriptName()+"back");
|
||||||
|
groovy.put("methodStr", scriptEntity.getBackScriptData());
|
||||||
|
groovy.put("parameterJson", backScriptJson);
|
||||||
|
JSONObject groovyStr = new JSONObject();
|
||||||
|
groovyStr.put("jsonStr", groovy);
|
||||||
|
try {
|
||||||
|
Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
|
||||||
|
if(str != null){
|
||||||
|
JSONObject backJsonResultEntity = JSONObject.parseObject(str.toString());
|
||||||
|
if(backJsonResultEntity != null && backJsonResultEntity.getString("success") != null && "true".equals(backJsonResultEntity.getString("success"))){
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setCreate();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setTripartiteId(backJsonResultEntity.getString("tripartiteId"));
|
||||||
|
mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||||
|
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
|
||||||
|
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
|
||||||
|
return BaseResult.getFailureMessageEntity("发送错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
taskDetailEntity.setResult("发送成功");
|
taskDetailEntity.setResult("发送成功");
|
||||||
taskLivingDetailsService.saveLogFailToSuccess(taskDetailEntity);
|
taskLivingDetailsService.saveLogFailToSuccess(taskDetailEntity);
|
||||||
return BaseResult.getFailureMessageEntity("发送成功");
|
return BaseResult.getFailureMessageEntity("发送成功");
|
||||||
|
@ -422,6 +473,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
//查询主数据
|
//查询主数据
|
||||||
MdmModuleEntity queryMdmModuleEntity = new MdmModuleEntity();
|
MdmModuleEntity queryMdmModuleEntity = new MdmModuleEntity();
|
||||||
queryMdmModuleEntity.setSts("Y");
|
queryMdmModuleEntity.setSts("Y");
|
||||||
|
queryMdmModuleEntity.setMdmCode(10004L);
|
||||||
List<MdmModuleEntity> mdmModuleEntities = mdmModuleDao.queryBase(queryMdmModuleEntity);
|
List<MdmModuleEntity> mdmModuleEntities = mdmModuleDao.queryBase(queryMdmModuleEntity);
|
||||||
if(mdmModuleEntities == null || mdmModuleEntities.size() == 0){
|
if(mdmModuleEntities == null || mdmModuleEntities.size() == 0){
|
||||||
return BaseResult.getSuccessMessageEntity("主数据未设置,不需要下发");
|
return BaseResult.getSuccessMessageEntity("主数据未设置,不需要下发");
|
||||||
|
@ -458,11 +510,11 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
|
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
doAdd(mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
|
doAdd(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
|
||||||
//修改
|
//修改
|
||||||
//doUpdate(mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
|
doUpdate(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
|
||||||
//删除
|
//删除
|
||||||
//doDelete(mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
|
doDelete(mdmModuleEntities.get(i).getId(),mdmCode,mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +528,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doDelete(Long mainCode,List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities) throws Exception {
|
private void doDelete(String mdmId,Long mainCode,List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities) throws Exception {
|
||||||
//查询一千条数据
|
//查询一千条数据
|
||||||
String mainDb = null;
|
String mainDb = null;
|
||||||
List<JSONObject> objects = new ArrayList<>();
|
List<JSONObject> objects = new ArrayList<>();
|
||||||
|
@ -573,6 +625,20 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
parameterJson.put("body",apiEntity.getBodyIn());
|
parameterJson.put("body",apiEntity.getBodyIn());
|
||||||
parameterJson.put("query",apiEntity.getQueryIn());
|
parameterJson.put("query",apiEntity.getQueryIn());
|
||||||
parameterJson.put("data",doObjects.get(i));
|
parameterJson.put("data",doObjects.get(i));
|
||||||
|
|
||||||
|
//1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setSts("Y");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmId);
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(objects.get(i).getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
|
||||||
|
String tripartiteId = "";
|
||||||
|
if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
|
||||||
|
tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
|
||||||
|
}
|
||||||
|
parameterJson.put("tripartiteId", tripartiteId);
|
||||||
|
|
||||||
/** head */
|
/** head */
|
||||||
Map<String, String> header = null;
|
Map<String, String> header = null;
|
||||||
/** query */
|
/** query */
|
||||||
|
@ -657,7 +723,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doUpdate(Long mainCode,List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities) throws Exception {
|
private void doUpdate(String mdmId,Long mainCode,List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities) throws Exception {
|
||||||
//查询一千条数据
|
//查询一千条数据
|
||||||
String mainDb = null;
|
String mainDb = null;
|
||||||
List<JSONObject> objects = new ArrayList<>();
|
List<JSONObject> objects = new ArrayList<>();
|
||||||
|
@ -742,6 +808,18 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
parameterJson.put("body",apiEntity.getBodyIn());
|
parameterJson.put("body",apiEntity.getBodyIn());
|
||||||
parameterJson.put("query",apiEntity.getQueryIn());
|
parameterJson.put("query",apiEntity.getQueryIn());
|
||||||
parameterJson.put("data",doObjects.get(i));
|
parameterJson.put("data",doObjects.get(i));
|
||||||
|
//1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setSts("Y");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmId);
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(objects.get(i).getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
|
||||||
|
String tripartiteId = "";
|
||||||
|
if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
|
||||||
|
tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
|
||||||
|
}
|
||||||
|
parameterJson.put("tripartiteId", tripartiteId);
|
||||||
/** head */
|
/** head */
|
||||||
Map<String, String> header = null;
|
Map<String, String> header = null;
|
||||||
/** query */
|
/** query */
|
||||||
|
@ -833,7 +911,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
* @param mdmModuleDistributeEntities
|
* @param mdmModuleDistributeEntities
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
**/
|
||||||
private void doAdd(Long mainCode,List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities,List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities,List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities ) throws Exception {
|
private void doAdd(String mdmId,Long mainCode,List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities,List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities,List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities ) throws Exception {
|
||||||
//查询一千条数据
|
//查询一千条数据
|
||||||
String mainDb = null;
|
String mainDb = null;
|
||||||
List<JSONObject> objects = new ArrayList<>();
|
List<JSONObject> objects = new ArrayList<>();
|
||||||
|
@ -993,6 +1071,43 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
||||||
//组装数据发送
|
//组装数据发送
|
||||||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||||
if(jsonResultEntity.isFlag()){
|
if(jsonResultEntity.isFlag()){
|
||||||
|
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
|
||||||
|
JSONObject backScriptJson = new JSONObject();
|
||||||
|
backScriptJson.put("data", jsonResultEntity.getAttribute());
|
||||||
|
groovy.put("code", scriptEntity.getScriptCode()+"back");
|
||||||
|
groovy.put("className", scriptEntity.getClassName()+"back");
|
||||||
|
groovy.put("name", scriptEntity.getScriptName()+"back");
|
||||||
|
groovy.put("methodStr", scriptEntity.getBackScriptData());
|
||||||
|
groovy.put("parameterJson", backScriptJson);
|
||||||
|
JSONObject groovyStr = new JSONObject();
|
||||||
|
groovyStr.put("jsonStr", groovy);
|
||||||
|
try {
|
||||||
|
Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
|
||||||
|
if(str != null){
|
||||||
|
JSONObject backJsonResultEntity = JSONObject.parseObject(str.toString());
|
||||||
|
if(backJsonResultEntity != null && backJsonResultEntity.getString("success") != null && "true".equals(backJsonResultEntity.getString("success"))){
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setId(UUIDUtils.getUUID());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setSts("Y");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setCreate_user_id("1");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setModify_user_id("1");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setCreate_time(new Date());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setModify_time(new Date());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setOrg_id("0");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setCompanyId("0");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmId);
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(objects.get(i).getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setTripartiteId(backJsonResultEntity.getString("tripartiteId"));
|
||||||
|
mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||||
|
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","新增返回脚本解析保存三方id错误",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存日志
|
//保存日志
|
||||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -12,7 +12,7 @@ spring:
|
||||||
dynamic:
|
dynamic:
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://hzya.ufyct.com:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
username: root
|
username: root
|
||||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
|
|
@ -22,15 +22,15 @@ spring:
|
||||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||||
# type: com.alibaba.druid.pool.DruidDataSource
|
# type: com.alibaba.druid.pool.DruidDataSource
|
||||||
url: jdbc:mysql://hzya.ufyct.com:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
# url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
username: root
|
# username: root
|
||||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
|
||||||
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
|
||||||
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
|
||||||
# username: hzyazt
|
|
||||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
||||||
|
url: jdbc:dm://ufidahz.com.cn:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||||
|
username: hzyazt
|
||||||
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
|
driver-class-name: dm.jdbc.driver.DmDriver
|
||||||
savefile:
|
savefile:
|
||||||
# 文件保存路径
|
# 文件保存路径
|
||||||
path: /Users/apple/Desktop/log/local
|
path: /Users/apple/Desktop/log/local
|
||||||
|
|
|
@ -12,7 +12,7 @@ spring:
|
||||||
dynamic:
|
dynamic:
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://hzya.ufyct.com:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||||
username: root
|
username: root
|
||||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
|
|
|
@ -122,3 +122,5 @@ jeecg :
|
||||||
minio_name: ??
|
minio_name: ??
|
||||||
minio_pass: ??
|
minio_pass: ??
|
||||||
bucketName: ??
|
bucketName: ??
|
||||||
|
data:
|
||||||
|
use: true
|
|
@ -57,6 +57,42 @@ public class temButtom {
|
||||||
@Autowired
|
@Autowired
|
||||||
private PayResultPluginInitializer payResultPluginInitializer;
|
private PayResultPluginInitializer payResultPluginInitializer;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void payApplyExtTest(){
|
||||||
|
String bodys = "{\n" +
|
||||||
|
" \"amount\": \"12000\",\n" +
|
||||||
|
" \"applyCodeField\": \"field0086\",\n" +
|
||||||
|
" \"billName\": \"资金使用审批表(其他)\",\n" +
|
||||||
|
" \"busType\": \"202\",\n" +
|
||||||
|
" \"cnapsCode\": \"00031342444\",\n" +
|
||||||
|
" \"currency\": \"10\",\n" +
|
||||||
|
" \"dataSourceCode\": \"master\",\n" +
|
||||||
|
" \"finishedflag\": \"1\",\n" +
|
||||||
|
" \"formsonId\": \"8364887433640955440\",\n" +
|
||||||
|
" \"oaId\": \"-4951125123923096260\",\n" +
|
||||||
|
" \"payAccount\": \"8110801013602348528\",\n" +
|
||||||
|
" \"payBankName\": \"中信银行绍兴分行\",\n" +
|
||||||
|
" \"payCompany\": \"绍兴市越城区建设投资有限公司\",\n" +
|
||||||
|
" \"payDateField\": \"field0070\",\n" +
|
||||||
|
" \"payResultField\": \"field0069\",\n" +
|
||||||
|
" \"personalFlag\": \"0\",\n" +
|
||||||
|
" \"receipt\": \"\",\n" +
|
||||||
|
" \"receiptFiled\": \"\",\n" +
|
||||||
|
" \"referenceNum\": \"ZJSY202407030002-1\",\n" +
|
||||||
|
" \"revAccount\": \"7122459925896517\",\n" +
|
||||||
|
" \"revAccountName\": \"越城区人民医院\",\n" +
|
||||||
|
" \"revBankName\": \"中国农业银行绍兴支行\",\n" +
|
||||||
|
" \"sort\": \"1\",\n" +
|
||||||
|
" \"startDate\": \"2024-07-03 11:34:29.999000\",\n" +
|
||||||
|
" \"summaryId\": \"7384107412543258850\",\n" +
|
||||||
|
" \"tableName\": \"formson_0222\",\n" +
|
||||||
|
" \"title\": \"《资金使用审批表》-ZJSY202407030002\"\n" +
|
||||||
|
"}";
|
||||||
|
SysExtensionApiEntity api = new SysExtensionApiEntity();
|
||||||
|
api.setBodys(bodys);
|
||||||
|
cbs8ExtService.payApply(api);
|
||||||
|
System.out.println("111");
|
||||||
|
}
|
||||||
@Test
|
@Test
|
||||||
public void cbs8PluginTest(){
|
public void cbs8PluginTest(){
|
||||||
try {
|
try {
|
||||||
|
@ -100,15 +136,15 @@ public class temButtom {
|
||||||
@Test
|
@Test
|
||||||
public void cbs8ExtTest(){
|
public void cbs8ExtTest(){
|
||||||
PaymentEntity paymentEntity = new PaymentEntity();
|
PaymentEntity paymentEntity = new PaymentEntity();
|
||||||
paymentEntity.setReferenceNum("CL202406140003");
|
paymentEntity.setReferenceNum("ZJSY202407030002-1");
|
||||||
paymentEntity.setPayAccount("655905707410000");
|
paymentEntity.setPayAccount("655905707410000");
|
||||||
paymentEntity.setPayBankName("");
|
paymentEntity.setPayBankName("");
|
||||||
paymentEntity.setAmount("99.02");
|
paymentEntity.setAmount("12000");
|
||||||
paymentEntity.setRevAccount("123456778");
|
paymentEntity.setRevAccount("7122459925896517");
|
||||||
paymentEntity.setRevBankName("中国工商银行总行清算中心");
|
paymentEntity.setRevBankName("中国农业银行绍兴支行");
|
||||||
paymentEntity.setRevBankType("ICB");
|
paymentEntity.setRevBankType("ICB");
|
||||||
paymentEntity.setRevAccountName("测试账户");
|
paymentEntity.setRevAccountName("测试账户");
|
||||||
paymentEntity.setCnapsCode("102100099996");
|
paymentEntity.setCnapsCode("00031342444");
|
||||||
paymentEntity.setPurpose("测试用途");
|
paymentEntity.setPurpose("测试用途");
|
||||||
paymentEntity.setBusType("202");
|
paymentEntity.setBusType("202");
|
||||||
paymentEntity.setCurrency("10");
|
paymentEntity.setCurrency("10");
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class DataSourceUtilProperties {
|
||||||
public static final String MYSQLDRIVER_6 = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
public static final String MYSQLDRIVER_6 = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
||||||
public static final String MYSQLDRIVER = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
public static final String MYSQLDRIVER = "com.mysql.jdbc.Driver"; // mysql数据库的驱动类
|
||||||
public static final String ORACLEDRIVER = "oracle.jdbc.OracleDriver"; // oracles数据库的驱动类
|
public static final String ORACLEDRIVER = "oracle.jdbc.OracleDriver"; // oracles数据库的驱动类
|
||||||
public static final String SQL2005DRIVER = "net.sourceforge.jtds.jdbc.Driver"; // sqlserver数据库的驱动类
|
public static final String SQL2005DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; // sqlserver数据库的驱动类
|
||||||
public static final String SQL2000DRIVER = "net.sourceforge.jtds.jdbc.Driver"; // sqlserver数据库的驱动类
|
public static final String SQL2000DRIVER = "net.sourceforge.jtds.jdbc.Driver"; // sqlserver数据库的驱动类
|
||||||
public static final String dm = "dm.jdbc.driver.DmDriver"; // 达梦数据库的驱动类
|
public static final String dm = "dm.jdbc.driver.DmDriver"; // 达梦数据库的驱动类
|
||||||
|
|
||||||
|
|
47
pom.xml
47
pom.xml
|
@ -23,8 +23,8 @@
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<junit.version>4.12</junit.version>
|
<junit.version>4.12</junit.version>
|
||||||
<fastjson.version>2.0.33</fastjson.version>
|
<fastjson.version>2.0.33</fastjson.version>
|
||||||
<spring-boot-starter-web.version>2.7.4</spring-boot-starter-web.version>
|
<spring-boot-starter-web.version>2.7.18</spring-boot-starter-web.version>
|
||||||
<spring-boot-starter-tomcat.version>2.7.4</spring-boot-starter-tomcat.version>
|
<spring-boot-starter-tomcat.version>2.7.18</spring-boot-starter-tomcat.version>
|
||||||
<p6spy.version>3.9.1</p6spy.version>
|
<p6spy.version>3.9.1</p6spy.version>
|
||||||
<gson.version>2.8.5</gson.version>
|
<gson.version>2.8.5</gson.version>
|
||||||
<zxing.version>3.3.0</zxing.version>
|
<zxing.version>3.3.0</zxing.version>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<!-- <mysql-connector-j.version>8.0.33</mysql-connector-j.version>-->
|
<!-- <mysql-connector-j.version>8.0.33</mysql-connector-j.version>-->
|
||||||
<mysql-connector-java>5.1.49</mysql-connector-java>
|
<mysql-connector-java>5.1.49</mysql-connector-java>
|
||||||
<pagehelper-spring-boot-starter.version>1.4.6</pagehelper-spring-boot-starter.version>
|
<pagehelper-spring-boot-starter.version>1.4.6</pagehelper-spring-boot-starter.version>
|
||||||
<spring-boot-starter-cache.version>2.7.4</spring-boot-starter-cache.version>
|
<spring-boot-starter-cache.version>2.7.18</spring-boot-starter-cache.version>
|
||||||
<sa.token.version>1.30.0</sa.token.version>
|
<sa.token.version>1.30.0</sa.token.version>
|
||||||
<lang3.version>3.13.0</lang3.version>
|
<lang3.version>3.13.0</lang3.version>
|
||||||
<commons.io.version>2.6</commons.io.version>
|
<commons.io.version>2.6</commons.io.version>
|
||||||
|
@ -53,9 +53,9 @@
|
||||||
<ojdbc6.version>11.2.0.4</ojdbc6.version>
|
<ojdbc6.version>11.2.0.4</ojdbc6.version>
|
||||||
<dynamic-datasource-spring-boot-starter.version>3.5.2</dynamic-datasource-spring-boot-starter.version>
|
<dynamic-datasource-spring-boot-starter.version>3.5.2</dynamic-datasource-spring-boot-starter.version>
|
||||||
<druid-spring-boot-starter.version>1.2.18</druid-spring-boot-starter.version>
|
<druid-spring-boot-starter.version>1.2.18</druid-spring-boot-starter.version>
|
||||||
<spring-boot-starter-test.version>2.7.4</spring-boot-starter-test.version>
|
<spring-boot-starter-test.version>2.7.18</spring-boot-starter-test.version>
|
||||||
<spring-boot.version>2.7.4</spring-boot.version>
|
<spring-boot.version>2.7.18</spring-boot.version>
|
||||||
<spring-boot-starter-aop.version>2.7.4</spring-boot-starter-aop.version>
|
<spring-boot-starter-aop.version>2.7.18</spring-boot-starter-aop.version>
|
||||||
<unit.version>4.12</unit.version>
|
<unit.version>4.12</unit.version>
|
||||||
<quartz.version>2.3.0</quartz.version>
|
<quartz.version>2.3.0</quartz.version>
|
||||||
<org.springframework.version>5.3.23</org.springframework.version>
|
<org.springframework.version>5.3.23</org.springframework.version>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.7.4</version>
|
<version>2.7.18</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
<!-- lookup parent from repository -->
|
<!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
@ -275,6 +275,11 @@
|
||||||
<version>${lombok.version}</version>
|
<version>${lombok.version}</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
|
<version>6.4.0.jre8</version>
|
||||||
|
</dependency>
|
||||||
<!--sqlserver-->
|
<!--sqlserver-->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
||||||
|
@ -403,7 +408,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>2.7.4</version>
|
<version>2.7.18</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||||
|
@ -411,6 +416,32 @@
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<!--设置maven-war-plugins插件,否则外部依赖无法打进war包-->
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.18.1</version>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<webResources>
|
||||||
|
<resource>
|
||||||
|
<directory>${basedir}/../service/src/main/resources/lib</directory>
|
||||||
|
<targetPath>WEB-INF/lib/</targetPath>
|
||||||
|
<filtering>false</filtering>
|
||||||
|
<includes>
|
||||||
|
<!-- 匹配所有jar包 -->
|
||||||
|
<include>**/*.jar</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<!--加载src/main/java下的xml-->
|
<!--加载src/main/java下的xml-->
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
<artifactId>pubbaseapp_nccloud_rtLevel</artifactId>
|
<artifactId>pubbaseapp_nccloud_rtLevel</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/pubbaseapp_nccloud_rtLevel-1.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/pubbaseapp_nccloud_rtLevel-1.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.hzya.bipyonyoulog</groupId>
|
<groupId>com.hzya.bipyonyoulog</groupId>
|
||||||
<artifactId>yonyoulog</artifactId>
|
<artifactId>yonyoulog</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/yonyoulog.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/yonyoulog.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<artifactId>bcprov</artifactId>
|
<artifactId>bcprov</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/bcprov-jdk15on-1.70.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/bcprov-jdk15on-1.70.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -49,7 +49,14 @@
|
||||||
<artifactId>DataApiSdk</artifactId>
|
<artifactId>DataApiSdk</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/DataApiSdk-jar-with-dependencies.jar</systemPath>
|
<systemPath>${basedir}/src/main/resources/lib/DataApiSdk-jar-with-dependencies.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.hzya.openBasicSDK</groupId>
|
||||||
|
<artifactId>openBasicSDK</artifactId>
|
||||||
|
<version>1</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/resources/lib/openBasicSDK-2.1.230630.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -45,7 +45,6 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
||||||
@Override
|
@Override
|
||||||
public SysExtensionApiEntity payApply(SysExtensionApiEntity entity) {
|
public SysExtensionApiEntity payApply(SysExtensionApiEntity entity) {
|
||||||
String bodys = entity.getBodys();
|
String bodys = entity.getBodys();
|
||||||
logger.info("Cbs8ExtServiceImpl.payApply方法body参数:{}",bodys);
|
|
||||||
if (StrUtil.isNotEmpty(bodys)) {
|
if (StrUtil.isNotEmpty(bodys)) {
|
||||||
PaymentEntity paymentEntity = JSONObject.parseObject(bodys, PaymentEntity.class);
|
PaymentEntity paymentEntity = JSONObject.parseObject(bodys, PaymentEntity.class);
|
||||||
if (null != paymentEntity) {
|
if (null != paymentEntity) {
|
||||||
|
@ -73,10 +72,11 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
||||||
String requestData = JSONObject.toJSONString(list);
|
String requestData = JSONObject.toJSONString(list);
|
||||||
//加密 签名
|
//加密 签名
|
||||||
encrypAndsign(entity, requestData);
|
encrypAndsign(entity, requestData);
|
||||||
|
//重试日志id
|
||||||
|
entity.getHeaders().put("integration_task_living_details_id",paymentEntity.getTaskDetailId());
|
||||||
entity.setBodys(requestData);
|
entity.setBodys(requestData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info("Cbs8ExtServiceImpl.payApply方法执行完毕:{}",JSONObject.toJSONString(entity));
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,26 +96,41 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
||||||
JSONObject sourceBody = sourceData.getJSONObject("body");//源数据body
|
JSONObject sourceBody = sourceData.getJSONObject("body");//源数据body
|
||||||
//自定义参数,存放的是请求报文明文
|
//自定义参数,存放的是请求报文明文
|
||||||
String hzyaExtData = targetHeaders.getString("hzyaExtData");
|
String hzyaExtData = targetHeaders.getString("hzyaExtData");
|
||||||
|
String taskDetailId = targetHeaders.getString("integration_task_living_details_id");
|
||||||
String returnDataBase64 = logEntity.getReturnData();
|
String returnDataBase64 = logEntity.getReturnData();
|
||||||
byte[] secretResByte = Base64.getDecoder().decode(returnDataBase64);
|
byte[] secretResByte = Base64.getDecoder().decode(returnDataBase64);
|
||||||
//解密报文
|
//解密报文
|
||||||
String decryptRes = CBSUtil.decrypt(secretResByte);
|
String decryptRes = CBSUtil.decrypt(secretResByte);
|
||||||
//6、记录系统日志
|
//6、记录系统日志
|
||||||
IntegrationTaskLivingDetailsEntity logTask = new IntegrationTaskLivingDetailsEntity();
|
IntegrationTaskLivingDetailsEntity logTask = new IntegrationTaskLivingDetailsEntity();
|
||||||
logTask.setRootAppPk(sourceBody.getString("formsonId"));
|
logTask.setRootAppPk(sourceBody.getString("oaId"));
|
||||||
logTask.setRootAppBill(sourceBody.getString("referenceNum"));
|
String ferenceNum = Convert.toStr(sourceBody.getString("referenceNumNew"), sourceBody.getString("referenceNum"));
|
||||||
|
logTask.setRootAppBill(ferenceNum);
|
||||||
logTask.setPluginId("CBS8PayApplyPlugin");
|
logTask.setPluginId("CBS8PayApplyPlugin");
|
||||||
//对方接口返回信息
|
//对方接口返回信息
|
||||||
logTask.setNewTransmitInfo(decryptRes);
|
logTask.setNewTransmitInfo(decryptRes);
|
||||||
logTask.setNewPushDate(new Date());
|
Date date = new Date();
|
||||||
|
logTask.setNewPushDate(date);
|
||||||
//调用接口请求参数
|
//调用接口请求参数
|
||||||
logTask.setRootAppNewData(hzyaExtData);
|
logTask.setRootAppNewData(hzyaExtData);
|
||||||
PayResponseDTO payResponseDTO = PayResponseDTO.payResValueOf(decryptRes);
|
PayResponseDTO payResponseDTO = PayResponseDTO.payResValueOf(decryptRes);
|
||||||
//为true是成功
|
if (StrUtil.isEmpty(taskDetailId)){
|
||||||
if (payResponseDTO.getSuccessed()) {
|
logTask.setCreate_time(date);
|
||||||
taskLivingDetailsService.saveLogToSuccess(logTask);
|
logTask.setModify_time(date);
|
||||||
|
//为true是成功
|
||||||
|
if (payResponseDTO.getSuccessed()) {
|
||||||
|
taskLivingDetailsService.saveLogToSuccess(logTask);
|
||||||
|
}else {
|
||||||
|
taskLivingDetailsService.saveLogToFail(logTask);
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
taskLivingDetailsService.saveLogToFail(logTask);
|
logTask.setId(taskDetailId);
|
||||||
|
logTask.setModify_time(date);
|
||||||
|
if (payResponseDTO.getSuccessed()){
|
||||||
|
taskLivingDetailsService.saveLogFailToSuccess(logTask);
|
||||||
|
}else {
|
||||||
|
taskLivingDetailsService.updateLogFailToSuccess(logTask);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("payApplyCallBack方法执行出错:{}",e);
|
logger.info("payApplyCallBack方法执行出错:{}",e);
|
||||||
|
@ -286,14 +301,11 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Map<String, String> headersValueOf(String sign, long timestamp) {
|
private Map<String, String> headersValueOf(String sign, long timestamp) {
|
||||||
logger.info("开始组装请求头参数:{},{}",sign,timestamp);
|
|
||||||
Map<String, String> header = new HashMap();
|
Map<String, String> header = new HashMap();
|
||||||
header.put(CBSUtil.SIGN_HEADER_NAME, sign);
|
header.put(CBSUtil.SIGN_HEADER_NAME, sign);
|
||||||
header.put(CBSUtil.TIMESTAMP_HEADER, Long.toString(timestamp));
|
header.put(CBSUtil.TIMESTAMP_HEADER, Long.toString(timestamp));
|
||||||
header.put(HTTP.CONTENT_TYPE, CBSUtil.TARGET_CONTENT_TYPE);
|
header.put(HTTP.CONTENT_TYPE, CBSUtil.TARGET_CONTENT_TYPE);
|
||||||
logger.info("准备获取token");
|
|
||||||
header.put(CBSUtil.AUTHORIZATION, CBSUtil.BEARER + CbsAccessToken.getToken());
|
header.put(CBSUtil.AUTHORIZATION, CBSUtil.BEARER + CbsAccessToken.getToken());
|
||||||
logger.info("组装后的header参数:{}",JSONObject.toJSONString(header));
|
|
||||||
return header;
|
return header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,7 +318,6 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
||||||
private void encrypAndsign(SysExtensionApiEntity entity, String requestData) {
|
private void encrypAndsign(SysExtensionApiEntity entity, String requestData) {
|
||||||
//签名
|
//签名
|
||||||
long timestamp = System.currentTimeMillis();
|
long timestamp = System.currentTimeMillis();
|
||||||
logger.info("CBS请求参数明文:{}", requestData);
|
|
||||||
String sign = CBSUtil.sign(requestData, timestamp);
|
String sign = CBSUtil.sign(requestData, timestamp);
|
||||||
//加密
|
//加密
|
||||||
byte[] encryptedData = CBSUtil.encrypt(requestData);
|
byte[] encryptedData = CBSUtil.encrypt(requestData);
|
||||||
|
@ -314,6 +325,5 @@ public class Cbs8ExtServiceImpl implements ICbs8ExtService {
|
||||||
header.put("hzyaExtData", requestData);
|
header.put("hzyaExtData", requestData);
|
||||||
entity.setByteBodys(encryptedData);
|
entity.setByteBodys(encryptedData);
|
||||||
entity.setHeaders(header);
|
entity.setHeaders(header);
|
||||||
logger.info("加密,签名方法执行完毕");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -442,11 +442,11 @@ where id = #{id}
|
||||||
<when test="item.filedType == '2'.toString()">
|
<when test="item.filedType == '2'.toString()">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="item.dataType == '1'.toString()">
|
<when test="item.dataType == '1'.toString()">
|
||||||
MODIFY COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
|
MODIFY COLUMN ${item.enName} decimal(${item.filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{item.chName},
|
#{item.chName},
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
add COLUMN ${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT
|
add COLUMN ${item.enName} decimal(${item.filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{item.chName},
|
#{item.chName},
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
|
@ -505,14 +505,14 @@ where id = #{id}
|
||||||
<when test="filedType == '2'.toString()">
|
<when test="filedType == '2'.toString()">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="dataType == '1'.toString()">
|
<when test="dataType == '1'.toString()">
|
||||||
add COLUMN ${enName} decimal(${filedLength}) DEFAULT NULL COMMENT
|
add COLUMN ${enName} decimal(${filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{chName}
|
#{chName}
|
||||||
</when>
|
</when>
|
||||||
<when test="dataType == '3'.toString()">
|
<when test="dataType == '3'.toString()">
|
||||||
drop COLUMN ${enName}
|
drop COLUMN ${enName}
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
MODIFY COLUMN ${enName} decimal(${filedLength}) DEFAULT NULL COMMENT
|
MODIFY COLUMN ${enName} decimal(${filedLength},8) DEFAULT NULL COMMENT
|
||||||
#{chName}
|
#{chName}
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
|
@ -566,13 +566,13 @@ where id = #{id}
|
||||||
<when test="filedType == '2'.toString()">
|
<when test="filedType == '2'.toString()">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="dataType == '1'.toString()">
|
<when test="dataType == '1'.toString()">
|
||||||
add ${enName} decimal(${filedLength}) DEFAULT NULL
|
add ${enName} decimal(${filedLength},8) DEFAULT NULL
|
||||||
</when>
|
</when>
|
||||||
<when test="dataType == '3'.toString()">
|
<when test="dataType == '3'.toString()">
|
||||||
drop ${enName}
|
drop ${enName}
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
MODIFY ${enName} decimal(${filedLength}) DEFAULT NULL
|
MODIFY ${enName} decimal(${filedLength},8) DEFAULT NULL
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</when>
|
</when>
|
||||||
|
|
|
@ -1482,6 +1482,11 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
||||||
}
|
}
|
||||||
entity.setUpdate();
|
entity.setUpdate();
|
||||||
entity.setDataType("2");
|
entity.setDataType("2");
|
||||||
|
try {
|
||||||
|
mdmModuleDao.alterTableField(entity);
|
||||||
|
} catch (Exception e){
|
||||||
|
throw new BaseSystemException("表字段类型,修改失败,请联系管理员");
|
||||||
|
}
|
||||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities = new ArrayList<>();
|
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities = new ArrayList<>();
|
||||||
mdmModuleDbFiledsEntities.add(entity);
|
mdmModuleDbFiledsEntities.add(entity);
|
||||||
mdmServiceCache.saveOrUpdateMdmModuleDbFileds(entity.getMdmId(), mdmModuleDbFiledsEntities);
|
mdmServiceCache.saveOrUpdateMdmModuleDbFileds(entity.getMdmId(), mdmModuleDbFiledsEntities);
|
||||||
|
@ -1505,11 +1510,11 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
//try {
|
||||||
mdmModuleDao.alterTableField(entity);
|
// mdmModuleDao.alterTableField(entity);
|
||||||
} catch (Exception e){
|
//} catch (Exception e){
|
||||||
throw new BaseSystemException("表字段类型,修改失败,请联系管理员");
|
// throw new BaseSystemException("表字段类型,修改失败,请联系管理员");
|
||||||
}
|
//}
|
||||||
return BaseResult.getSuccessMessageEntity("修改字段成功");
|
return BaseResult.getSuccessMessageEntity("修改字段成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@ update mdm_module_db_fileds set
|
||||||
<if test="queryType != null and queryType != ''"> query_type = #{queryType},</if>
|
<if test="queryType != null and queryType != ''"> query_type = #{queryType},</if>
|
||||||
<if test="listType != null and listType != ''"> list_type = #{listType},</if>
|
<if test="listType != null and listType != ''"> list_type = #{listType},</if>
|
||||||
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
|
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
|
||||||
<if test="filedLength != null and filedLength != ''"> filed_length = #{filedLength},</if>
|
filed_length = #{filedLength},
|
||||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(mdm_module_distribute_tripartite: table)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:38
|
||||||
|
*/
|
||||||
|
public interface IMdmModuleDistributeTripartiteDao extends IBaseDao<MdmModuleDistributeTripartiteEntity, String> {
|
||||||
|
|
||||||
|
MdmModuleDistributeTripartiteEntity queryOneTripartite(MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:38
|
||||||
|
*/
|
||||||
|
@Repository(value = "MdmModuleDistributeTripartiteDaoImpl")
|
||||||
|
public class MdmModuleDistributeTripartiteDaoImpl extends MybatisGenericDao<MdmModuleDistributeTripartiteEntity, String> implements IMdmModuleDistributeTripartiteDao{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MdmModuleDistributeTripartiteEntity queryOneTripartite(MdmModuleDistributeTripartiteEntity entity) {
|
||||||
|
MdmModuleDistributeTripartiteEntity o = (MdmModuleDistributeTripartiteEntity) super.selectOne(getSqlIdPrifx() + "queryOneTripartite", entity);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:39
|
||||||
|
*/
|
||||||
|
public class MdmModuleDistributeTripartiteEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/** 公司id */
|
||||||
|
private String companyId;
|
||||||
|
/** 主数据id */
|
||||||
|
private String mdmId;
|
||||||
|
/** 数据id */
|
||||||
|
private String dataId;
|
||||||
|
/** 应用id */
|
||||||
|
private String appId;
|
||||||
|
/** 三方id */
|
||||||
|
private String tripartiteId;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(String companyId) {
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMdmId() {
|
||||||
|
return mdmId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMdmId(String mdmId) {
|
||||||
|
this.mdmId = mdmId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataId() {
|
||||||
|
return dataId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataId(String dataId) {
|
||||||
|
this.dataId = dataId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppId() {
|
||||||
|
return appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(String appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTripartiteId() {
|
||||||
|
return tripartiteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTripartiteId(String tripartiteId) {
|
||||||
|
this.tripartiteId = tripartiteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,290 @@
|
||||||
|
<?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.mdm.mdmModuleDistributeTripartite.dao.impl.MdmModuleDistributeTripartiteDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-MdmModuleDistributeTripartiteEntity-result" type="com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||||
|
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||||
|
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="dataId" column="data_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="tripartiteId" column="tripartite_id" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "MdmModuleDistributeTripartiteEntity_Base_Column_List">
|
||||||
|
id
|
||||||
|
,sorts
|
||||||
|
,create_user_id
|
||||||
|
,create_time
|
||||||
|
,modify_user_id
|
||||||
|
,modify_time
|
||||||
|
,sts
|
||||||
|
,org_id
|
||||||
|
,company_id
|
||||||
|
,mdm_id
|
||||||
|
,data_id
|
||||||
|
,app_id
|
||||||
|
,tripartite_id
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||||
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||||
|
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||||
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||||
|
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select count(1) from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||||
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||||
|
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||||
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||||
|
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
|
<select id="entity_list_like" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||||
|
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||||
|
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||||
|
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||||
|
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||||
|
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id like concat('%',#{dataId},'%') </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id like concat('%',#{tripartiteId},'%') </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
<select id="MdmModuleDistributeTripartiteentity_list_or" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||||
|
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||||
|
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||||
|
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||||
|
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||||
|
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> or data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> or tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--新增所有列-->
|
||||||
|
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_module_distribute_tripartite(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''"> id , </if>
|
||||||
|
<if test="sorts != null"> sorts , </if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||||
|
<if test="create_time != null"> create_time , </if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||||
|
<if test="modify_time != null"> modify_time , </if>
|
||||||
|
<if test="sts != null and sts != ''"> sts , </if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> data_id , </if>
|
||||||
|
<if test="appId != null and appId != ''"> app_id , </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> tripartite_id , </if>
|
||||||
|
<if test="sts == null ">sts,</if>
|
||||||
|
</trim>
|
||||||
|
)values(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id != ''"> #{id} ,</if>
|
||||||
|
<if test="sorts != null"> #{sorts} ,</if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||||
|
<if test="create_time != null"> #{create_time} ,</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||||
|
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||||
|
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||||
|
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||||
|
<if test="dataId != null and dataId != ''"> #{dataId} ,</if>
|
||||||
|
<if test="appId != null and appId != ''"> #{appId} ,</if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> #{tripartiteId} ,</if>
|
||||||
|
<if test="sts == null ">'Y',</if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增 -->
|
||||||
|
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_module_distribute_tripartite(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, mdm_id, data_id, app_id, tripartite_id, sts)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.mdmId},#{entity.dataId},#{entity.appId},#{entity.tripartiteId}, 'Y')
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增或者修改-->
|
||||||
|
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into mdm_module_distribute_tripartite(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, mdm_id, data_id, app_id, tripartite_id)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.mdmId},#{entity.dataId},#{entity.appId},#{entity.tripartiteId})
|
||||||
|
</foreach>
|
||||||
|
on duplicate key update
|
||||||
|
create_user_id = values(create_user_id),
|
||||||
|
create_time = values(create_time),
|
||||||
|
modify_user_id = values(modify_user_id),
|
||||||
|
modify_time = values(modify_time),
|
||||||
|
sts = values(sts),
|
||||||
|
org_id = values(org_id),
|
||||||
|
company_id = values(company_id),
|
||||||
|
mdm_id = values(mdm_id),
|
||||||
|
data_id = values(data_id),
|
||||||
|
app_id = values(app_id),
|
||||||
|
tripartite_id = values(tripartite_id)</insert>
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
update mdm_module_distribute_tripartite set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||||
|
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||||
|
<if test="dataId != null and dataId != ''"> data_id = #{dataId},</if>
|
||||||
|
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> tripartite_id = #{tripartiteId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
update mdm_module_distribute_tripartite set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
<!-- 多条件逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity" >
|
||||||
|
update mdm_module_distribute_tripartite set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||||
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
<!--通过主键删除-->
|
||||||
|
<delete id="entity_delete">
|
||||||
|
delete from mdm_module_distribute_tripartite where id = #{id}
|
||||||
|
</delete>
|
||||||
|
<select id="queryOneTripartite" databaseId="mysql" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||||
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||||
|
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||||
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||||
|
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
order by sorts desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryOneTripartite" databaseId="oracle" resultMap="get-MdmModuleDistributeTripartiteEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity">
|
||||||
|
SELECT * FROM (
|
||||||
|
select
|
||||||
|
<include refid="MdmModuleDistributeTripartiteEntity_Base_Column_List" />
|
||||||
|
from mdm_module_distribute_tripartite
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||||
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||||
|
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||||
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||||
|
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||||
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||||
|
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||||
|
<if test="dataId != null and dataId != ''"> and data_id = #{dataId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
|
<if test="tripartiteId != null and tripartiteId != ''"> and tripartite_id = #{tripartiteId} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
order by sorts desc
|
||||||
|
) WHERE ROWNUM = 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:39
|
||||||
|
*/
|
||||||
|
public interface IMdmModuleDistributeTripartiteService extends IBaseService<MdmModuleDistributeTripartiteEntity, String>{
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.hzya.frame.mdm.mdmModuleDistributeTripartite.service.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.service.IMdmModuleDistributeTripartiteService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
/**
|
||||||
|
* 主数据下发三方主键表(MdmModuleDistributeTripartite)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-07-15 11:33:39
|
||||||
|
*/
|
||||||
|
@Service(value = "mdmModuleDistributeTripartiteService")
|
||||||
|
public class MdmModuleDistributeTripartiteServiceImpl extends BaseService<MdmModuleDistributeTripartiteEntity, String> implements IMdmModuleDistributeTripartiteService {
|
||||||
|
|
||||||
|
private IMdmModuleDistributeTripartiteDao mdmModuleDistributeTripartiteDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setMdmModuleDistributeTripartiteDao(IMdmModuleDistributeTripartiteDao dao) {
|
||||||
|
this.mdmModuleDistributeTripartiteDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,8 @@ import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.dao.IMdmModuleDistributeTripartiteDao;
|
||||||
|
import com.hzya.frame.mdm.mdmModuleDistributeTripartite.entity.MdmModuleDistributeTripartiteEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleOptionLog.dao.IMdmModuleOptionLogDao;
|
import com.hzya.frame.mdm.mdmModuleOptionLog.dao.IMdmModuleOptionLogDao;
|
||||||
import com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity;
|
import com.hzya.frame.mdm.mdmModuleOptionLog.entity.MdmModuleOptionLogEntity;
|
||||||
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
|
||||||
|
@ -86,7 +88,8 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
private ISysApplicationScriptDao sysApplicationScriptDao;
|
private ISysApplicationScriptDao sysApplicationScriptDao;
|
||||||
@Resource
|
@Resource
|
||||||
private IMdmModuleDao mdmModuleDao;
|
private IMdmModuleDao mdmModuleDao;
|
||||||
|
@Resource
|
||||||
|
private IMdmModuleDistributeTripartiteDao mdmModuleDistributeTripartiteDao;
|
||||||
@Resource
|
@Resource
|
||||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -1811,13 +1814,29 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
parameterJson.put("body", apiEntity.getBodyIn());
|
parameterJson.put("body", apiEntity.getBodyIn());
|
||||||
parameterJson.put("query", apiEntity.getQueryIn());
|
parameterJson.put("query", apiEntity.getQueryIn());
|
||||||
parameterJson.put("data", object);
|
parameterJson.put("data", object);
|
||||||
|
|
||||||
|
if (!"1".equals(type)) {//删除或者修改情况,查询三方id,有就设置,没有就设置空
|
||||||
|
//1、根据主数据id、数据id、应用ID默认查询主数据应用下发三方id表,只查询最新的一条数据
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setSts("Y");
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity = mdmModuleDistributeTripartiteDao.queryOneTripartite(mdmModuleDistributeTripartiteEntity);
|
||||||
|
String tripartiteId = "";
|
||||||
|
if(mdmModuleDistributeTripartiteEntity != null && mdmModuleDistributeTripartiteEntity.getTripartiteId() != null ){
|
||||||
|
tripartiteId = mdmModuleDistributeTripartiteEntity.getTripartiteId();
|
||||||
|
}
|
||||||
|
parameterJson.put("tripartiteId", tripartiteId);
|
||||||
|
}
|
||||||
|
|
||||||
/** head */
|
/** head */
|
||||||
Map<String, String> header = null;
|
Map<String, String> header = null;
|
||||||
/** query */
|
/** query */
|
||||||
String querys = null;
|
String querys = null;
|
||||||
/** body */
|
/** body */
|
||||||
String bodys = object.toJSONString();
|
String bodys = object.toJSONString();
|
||||||
if (scriptEntity != null && scriptEntity.getId() != null) {
|
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getScriptData() != null ) {
|
||||||
groovy.put("code", scriptEntity.getScriptCode());
|
groovy.put("code", scriptEntity.getScriptCode());
|
||||||
groovy.put("className", scriptEntity.getClassName());
|
groovy.put("className", scriptEntity.getClassName());
|
||||||
groovy.put("name", scriptEntity.getScriptName());
|
groovy.put("name", scriptEntity.getScriptName());
|
||||||
|
@ -1885,6 +1904,39 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
//组装数据发送
|
//组装数据发送
|
||||||
JsonResultEntity jsonResultEntity = sendData(apiEntity, headers, bodys, querys);
|
JsonResultEntity jsonResultEntity = sendData(apiEntity, headers, bodys, querys);
|
||||||
if (jsonResultEntity.isFlag()) {
|
if (jsonResultEntity.isFlag()) {
|
||||||
|
|
||||||
|
if ("1".equals(type)) {//保存三方返回id
|
||||||
|
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
|
||||||
|
JSONObject backScriptJson = new JSONObject();
|
||||||
|
backScriptJson.put("data", jsonResultEntity.getAttribute());
|
||||||
|
groovy.put("code", scriptEntity.getScriptCode()+"back");
|
||||||
|
groovy.put("className", scriptEntity.getClassName()+"back");
|
||||||
|
groovy.put("name", scriptEntity.getScriptName()+"back");
|
||||||
|
groovy.put("methodStr", scriptEntity.getBackScriptData());
|
||||||
|
groovy.put("parameterJson", backScriptJson);
|
||||||
|
JSONObject groovyStr = new JSONObject();
|
||||||
|
groovyStr.put("jsonStr", groovy);
|
||||||
|
try {
|
||||||
|
Object str = groovyIntegrationService.groovyScriptExecution(groovyStr);
|
||||||
|
if(str != null){
|
||||||
|
JSONObject backJsonResultEntity = JSONObject.parseObject(str.toString());
|
||||||
|
if(backJsonResultEntity != null && backJsonResultEntity.getString("success") != null && "true".equals(backJsonResultEntity.getString("success"))){
|
||||||
|
MdmModuleDistributeTripartiteEntity mdmModuleDistributeTripartiteEntity = new MdmModuleDistributeTripartiteEntity();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setCreate();
|
||||||
|
mdmModuleDistributeTripartiteEntity.setMdmId(mdmModuleEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setDataId(object.getString("id"));
|
||||||
|
mdmModuleDistributeTripartiteEntity.setAppId(sysApplicationEntity.getId());
|
||||||
|
mdmModuleDistributeTripartiteEntity.setTripartiteId(backJsonResultEntity.getString("tripartiteId"));
|
||||||
|
mdmModuleDistributeTripartiteDao.save(mdmModuleDistributeTripartiteEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||||
|
saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(),mdmModuleDistributeEntity.getId(),"2", "转发失败", dbname, object.getString("id"), sysApplicationEntity.getName(),sysApplicationEntity.getId(), apiEntity.getApiName(),apiEntity.getId(), object.toJSONString(), type);
|
||||||
|
return BaseResult.getFailureMessageEntity("发送错误:" + jsonResultEntity.getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(),mdmModuleDistributeEntity.getId(),"1", "发送成功", dbname, object.getString("id"), sysApplicationEntity.getName(),sysApplicationEntity.getId(), apiEntity.getApiName(),apiEntity.getId(), object.toJSONString(), type);
|
saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(),mdmModuleDistributeEntity.getId(),"1", "发送成功", dbname, object.getString("id"), sysApplicationEntity.getName(),sysApplicationEntity.getId(), apiEntity.getApiName(),apiEntity.getId(), object.toJSONString(), type);
|
||||||
return BaseResult.getSuccessMessageEntity("发送成功");
|
return BaseResult.getSuccessMessageEntity("发送成功");
|
||||||
} else {
|
} else {
|
||||||
|
@ -2209,7 +2261,7 @@ public class MdmServiceImpl implements IMdmService {
|
||||||
|
|
||||||
private JsonResultEntity sendData(SysApplicationApiEntity applicationApiEntity, Map<String, String> headers, String bodys, String querys) {
|
private JsonResultEntity sendData(SysApplicationApiEntity applicationApiEntity, Map<String, String> headers, String bodys, String querys) {
|
||||||
StringBuffer urls = new StringBuffer(url);
|
StringBuffer urls = new StringBuffer(url);
|
||||||
if (querys != null) {
|
if (querys != null && !"".equals(querys)) {
|
||||||
urls.append("?");
|
urls.append("?");
|
||||||
urls.append(querys);
|
urls.append(querys);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.hzya.frame.ningboBankTreasury.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
|
||||||
|
public class NingboBankTreasuryEntity extends BaseEntity {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.hzya.frame.ningboBankTreasury.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
public interface INingboBankTreasuryService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 单笔查证接口
|
||||||
|
* @Date 4:45 下午 2024/7/9
|
||||||
|
* @param jsonObject
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
**/
|
||||||
|
Object sendNbBank(JSONObject jsonObject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @content 此方法获取初始化参数,拼接请求参数
|
||||||
|
* @author laborer
|
||||||
|
* @date 2024/5/27 0027 11:38
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
SysExtensionApiEntity doChangeData(SysExtensionApiEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
package com.hzya.frame.ningboBankTreasury.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.bip.v3.v2207.dps.service.impl.PayMentServiceImpl;
|
||||||
|
import com.hzya.frame.ningboBankTreasury.service.INingboBankTreasuryService;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||||
|
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import com.nbcb.sdk.OpenSDK;
|
||||||
|
import com.nbcb.sdk.aes.exception.SDKException;
|
||||||
|
import com.nbcb.sdk.aes.param.ConfigParam;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@Service(value = "ningboBankTreasuryServiceImpl")
|
||||||
|
public class NingboBankTreasuryServiceImpl implements INingboBankTreasuryService {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(NingboBankTreasuryServiceImpl.class);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param jsonObject
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 单笔查证接口
|
||||||
|
* @Date 4:45 下午 2024/7/9
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public Object sendNbBank(JSONObject jsonObject) {
|
||||||
|
JSONObject returnJson = new JSONObject();
|
||||||
|
JSONObject entity = getstrObj("jsonStr", jsonObject);
|
||||||
|
String dataJson = entity.getString("Data");
|
||||||
|
String appKey = entity.getString("appKey");
|
||||||
|
String privateKey = entity.getString("privateKey");
|
||||||
|
String publicUrl = entity.getString("publicUrl");
|
||||||
|
String publicKey = entity.getString("publicKey");
|
||||||
|
String productID = entity.getString("productID");
|
||||||
|
String serviceID = entity.getString("serviceID");
|
||||||
|
//初始化宁波银行OpenSDK
|
||||||
|
try {
|
||||||
|
ConfigParam configParam = new ConfigParam(privateKey,publicUrl,appKey,publicKey,10000,20000);
|
||||||
|
OpenSDK.dynamicInit(configParam,true);
|
||||||
|
} catch (SDKException e) {
|
||||||
|
logger.error("初始化宁波银行OpenSDK错误:{}",e.getMessage());
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","初始化宁波银行OpenSDK错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
//发送数据
|
||||||
|
try {
|
||||||
|
String returnData = OpenSDK.send(productID,serviceID,dataJson.replace(" ",""));
|
||||||
|
if(returnData == null || "".equals(returnData)){
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","发送宁波银行OpenSDK返回错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
returnJson = JSONObject.parseObject(returnData);
|
||||||
|
JSONObject retData = returnJson.getJSONObject("Data");
|
||||||
|
String retCode = retData.getString("retCode");
|
||||||
|
String retMsg = retData.getString("retMsg");
|
||||||
|
returnJson.put("retCode",retCode);
|
||||||
|
returnJson.put("retMsg",retMsg);
|
||||||
|
return returnJson;
|
||||||
|
} catch (Exception e) {
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","发送宁波银行OpenSDK返回转换Json错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
returnJson.put("retCode","9999");
|
||||||
|
returnJson.put("retMsg","发送宁波银行OpenSDK错误");
|
||||||
|
return returnJson;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param entity
|
||||||
|
* @content 此方法获取初始化参数,拼接请求参数
|
||||||
|
* @author laborer
|
||||||
|
* @date 2024/5/27 0027 11:38
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysExtensionApiEntity doChangeData(SysExtensionApiEntity entity) {
|
||||||
|
try {
|
||||||
|
if(entity == null ){
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
Map<String, String> returnHeaders = new HashMap<>();
|
||||||
|
JSONObject returnDataData = new JSONObject();
|
||||||
|
JSONObject returnData = new JSONObject();
|
||||||
|
Map<String, String> headers = entity.getHeaders();
|
||||||
|
String bodys = entity.getBodys();
|
||||||
|
JSONObject data = JSONObject.parseObject(bodys);
|
||||||
|
|
||||||
|
//先处理转发请求header
|
||||||
|
returnHeaders.put("yatl",headers.get("yatl"));
|
||||||
|
returnHeaders.put("yadj",headers.get("yadj"));
|
||||||
|
|
||||||
|
returnDataData.put("appKey",headers.get("appKey"));
|
||||||
|
returnDataData.put("privateKey",headers.get("privateKey"));
|
||||||
|
returnDataData.put("publicUrl",headers.get("publicUrl"));
|
||||||
|
returnDataData.put("publicKey",headers.get("publicKey"));
|
||||||
|
returnDataData.put("productID",headers.get("productID"));
|
||||||
|
returnDataData.put("serviceID",headers.get("serviceID"));
|
||||||
|
data.put("custId",headers.get("custId"));
|
||||||
|
returnData.put("Data",data);
|
||||||
|
returnDataData.put("Data",returnData);
|
||||||
|
entity.setHeaders(returnHeaders);
|
||||||
|
entity.setBodys(returnDataData.toJSONString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
//发送内部处理方法错误
|
||||||
|
logger.error("宁波银行内部转换接口错误:{}",e.getMessage());
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public JSONObject getstrObj(String key, JSONObject object) {
|
||||||
|
if (checkStr(object.getString(key)) ) {
|
||||||
|
return object.getJSONObject(key);
|
||||||
|
}
|
||||||
|
return new JSONObject();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param str
|
||||||
|
* @return void
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 校验字符串
|
||||||
|
* @Date 11:41 上午 2022/12/7
|
||||||
|
**/
|
||||||
|
protected Boolean checkStr(String str) {
|
||||||
|
Boolean flag = true;
|
||||||
|
if (str == null || "".equals(str)) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,4 +9,11 @@ import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||||
* @Date 2024/6/14 17:30
|
* @Date 2024/6/14 17:30
|
||||||
**/
|
**/
|
||||||
public interface ICbsLogDao extends IBaseDao<CbsLogEntity,String> {
|
public interface ICbsLogDao extends IBaseDao<CbsLogEntity,String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新日志
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateLog(CbsLogEntity entity);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzya.frame.seeyon.cbs8.dao.impl;
|
package com.hzya.frame.seeyon.cbs8.dao.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao;
|
import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao;
|
||||||
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||||
|
@ -12,4 +13,16 @@ import org.springframework.stereotype.Repository;
|
||||||
**/
|
**/
|
||||||
@Repository()
|
@Repository()
|
||||||
public class CbsLogDaoImpl extends MybatisGenericDao<CbsLogEntity,String> implements ICbsLogDao {
|
public class CbsLogDaoImpl extends MybatisGenericDao<CbsLogEntity,String> implements ICbsLogDao {
|
||||||
|
/**
|
||||||
|
* 更新日志
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public int updateLog(CbsLogEntity entity) {
|
||||||
|
this.update(getSqlIdPrifx()+"entity_update",entity);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,10 @@ public class AgentPaymentDetailEntity extends BaseEntity {
|
||||||
|
|
||||||
//明细序号,从1开始递增
|
//明细序号,从1开始递增
|
||||||
private int dtlSeqNum;
|
private int dtlSeqNum;
|
||||||
|
//明细用途
|
||||||
|
private String dtlPurpose;
|
||||||
|
//是否跨行 Y表示跨行 N表示同行
|
||||||
|
private String dtlBankFlag;
|
||||||
//支付结果
|
//支付结果
|
||||||
private String payResult;
|
private String payResult;
|
||||||
//支付日期
|
//支付日期
|
||||||
|
@ -110,4 +113,20 @@ public class AgentPaymentDetailEntity extends BaseEntity {
|
||||||
public void setPayDate(String payDate) {
|
public void setPayDate(String payDate) {
|
||||||
this.payDate = payDate;
|
this.payDate = payDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDtlPurpose() {
|
||||||
|
return dtlPurpose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDtlPurpose(String dtlPurpose) {
|
||||||
|
this.dtlPurpose = dtlPurpose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDtlBankFlag() {
|
||||||
|
return dtlBankFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDtlBankFlag(String dtlBankFlag) {
|
||||||
|
this.dtlBankFlag = dtlBankFlag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
<result property="dtlCnapsCode" column="dtlCnapsCode" />
|
<result property="dtlCnapsCode" column="dtlCnapsCode" />
|
||||||
<result property="dtlRevName" column="dtlRevName" />
|
<result property="dtlRevName" column="dtlRevName" />
|
||||||
<result property="dtlRevBankName" column="dtlRevBankName" />
|
<result property="dtlRevBankName" column="dtlRevBankName" />
|
||||||
|
<result property="dtlBankFlag" column="dtlBankFlag" />
|
||||||
|
<result property="dtlPurpose" column="dtlPurpose" />
|
||||||
<result property="payResult" column="payResult" />
|
<result property="payResult" column="payResult" />
|
||||||
<result property="payDate" column="payDate" />
|
<result property="payDate" column="payDate" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -25,6 +27,8 @@
|
||||||
dtlCnapsCode,
|
dtlCnapsCode,
|
||||||
dtlRevName,
|
dtlRevName,
|
||||||
dtlRevBankName,
|
dtlRevBankName,
|
||||||
|
dtlPurpose,
|
||||||
|
dtlBankFlag,
|
||||||
payResult,
|
payResult,
|
||||||
payDate
|
payDate
|
||||||
</sql>
|
</sql>
|
||||||
|
@ -39,16 +43,19 @@
|
||||||
formson_0225.id,
|
formson_0225.id,
|
||||||
formson_0225.formmain_id AS formmainId,
|
formson_0225.formmain_id AS formmainId,
|
||||||
'formson_0225' AS tabName,
|
'formson_0225' AS tabName,
|
||||||
|
'N' AS dtlBankFlag,
|
||||||
formson_0225.field0001 AS dtlSeqNum,
|
formson_0225.field0001 AS dtlSeqNum,
|
||||||
formson_0225.field0019 AS dtlAmount,
|
formson_0225.field0019 AS dtlAmount,
|
||||||
formson_0225.field0036 AS dtlRevAccount,
|
formson_0225.field0036 AS dtlRevAccount,
|
||||||
formson_0225.field0035 AS dtlCnapsCode,
|
formson_0225.field0035 AS dtlCnapsCode,
|
||||||
formson_0225.field0037 AS dtlRevName,
|
formson_0225.field0037 AS dtlRevName,
|
||||||
formson_0225.field0034 AS dtlRevBankName,
|
formson_0225.field0034 AS dtlRevBankName,
|
||||||
|
to_char(formmain_0224.field0030,'yyyy-MM')||'月'||'工资'AS dtlPurpose,
|
||||||
formson_0225.field0044 AS payResult,
|
formson_0225.field0044 AS payResult,
|
||||||
formson_0225.field0045 AS payDate
|
formson_0225.field0045 AS payDate
|
||||||
FROM
|
FROM
|
||||||
formson_0225
|
formson_0225
|
||||||
|
LEFT JOIN formmain_0224 ON formmain_0224.id = formson_0225.formmain_id
|
||||||
)formson_0225
|
)formson_0225
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="id != null and id !='' "> formson_0225.id = #{id} </if>
|
<if test="id != null and id !='' "> formson_0225.id = #{id} </if>
|
||||||
|
|
|
@ -40,6 +40,8 @@ public class AgentPaymentEntity extends BaseEntity {
|
||||||
private String tableName;//表名称
|
private String tableName;//表名称
|
||||||
private String billName;//单据名称
|
private String billName;//单据名称
|
||||||
|
|
||||||
|
private String payBankType;//付款银行类型
|
||||||
|
|
||||||
public String getReferenceNum() {
|
public String getReferenceNum() {
|
||||||
return referenceNum;
|
return referenceNum;
|
||||||
}
|
}
|
||||||
|
@ -151,4 +153,12 @@ public class AgentPaymentEntity extends BaseEntity {
|
||||||
public void setPayDate(String payDate) {
|
public void setPayDate(String payDate) {
|
||||||
this.payDate = payDate;
|
this.payDate = payDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPayBankType() {
|
||||||
|
return payBankType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayBankType(String payBankType) {
|
||||||
|
this.payBankType = payBankType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
busType,
|
busType,
|
||||||
amount,
|
amount,
|
||||||
currency,
|
currency,
|
||||||
|
payBankType,
|
||||||
payAccount,
|
payAccount,
|
||||||
applyCode,
|
applyCode,
|
||||||
payResult,
|
payResult,
|
||||||
|
@ -52,7 +53,8 @@
|
||||||
'755915707610112' AS payAccount,
|
'755915707610112' AS payAccount,
|
||||||
formmain_0224.field0043 AS applyCode,
|
formmain_0224.field0043 AS applyCode,
|
||||||
formmain_0224.field0046 AS payResult,
|
formmain_0224.field0046 AS payResult,
|
||||||
'工资' AS purpose
|
formmain_0224.field0053 as payBankType,
|
||||||
|
to_char(formmain_0224.field0030,'yyyy-MM')||'月'||''工资' AS purpose
|
||||||
FROM
|
FROM
|
||||||
formmain_0224
|
formmain_0224
|
||||||
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0224.id
|
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0224.id
|
||||||
|
|
|
@ -106,6 +106,7 @@
|
||||||
<if test="pay_state != null and pay_state !='' ">field0010 =#{pay_state},</if>
|
<if test="pay_state != null and pay_state !='' ">field0010 =#{pay_state},</if>
|
||||||
field0011 =#{message},
|
field0011 =#{message},
|
||||||
<if test="apply_state != null and apply_state !='' ">field0012 =#{apply_state},</if>
|
<if test="apply_state != null and apply_state !='' ">field0012 =#{apply_state},</if>
|
||||||
|
<if test="cbs_apply_code != null and cbs_apply_code !='' ">field0005 =#{cbs_apply_code},</if>
|
||||||
<if test="successed != null and successed !='' ">field0014 =#{successed}</if>
|
<if test="successed != null and successed !='' ">field0014 =#{successed}</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
|
|
@ -45,6 +45,10 @@ public class PaymentEntity extends BaseEntity {
|
||||||
private String payType;//付款类别
|
private String payType;//付款类别
|
||||||
private String payCompanyCode;//付款公司编码
|
private String payCompanyCode;//付款公司编码
|
||||||
|
|
||||||
|
//是否重试
|
||||||
|
private String retryFlag;
|
||||||
|
//重试日志id
|
||||||
|
private String taskDetailId;
|
||||||
public String getOaId() {
|
public String getOaId() {
|
||||||
return oaId;
|
return oaId;
|
||||||
}
|
}
|
||||||
|
@ -324,4 +328,20 @@ public class PaymentEntity extends BaseEntity {
|
||||||
public void setApplyCode(String applyCode) {
|
public void setApplyCode(String applyCode) {
|
||||||
this.applyCode = applyCode;
|
this.applyCode = applyCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRetryFlag() {
|
||||||
|
return retryFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRetryFlag(String retryFlag) {
|
||||||
|
this.retryFlag = retryFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskDetailId() {
|
||||||
|
return taskDetailId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskDetailId(String taskDetailId) {
|
||||||
|
this.taskDetailId = taskDetailId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,74 +315,37 @@
|
||||||
|
|
||||||
<!-- 查询交易成功,且电子回单为空的,上传电子回单用 -->
|
<!-- 查询交易成功,且电子回单为空的,上传电子回单用 -->
|
||||||
<select id="PaymentEntity_list_base_elec_isnull" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
<select id="PaymentEntity_list_base_elec_isnull" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
||||||
<!-- select
|
select v.* from (
|
||||||
<include refid="PaymentEntity_Base_Column_List"/>
|
<include refid="base_sql"/>
|
||||||
from
|
) v
|
||||||
v_hzya_oa_cbs_all-->
|
|
||||||
-- 差旅费报销单
|
|
||||||
SELECT
|
|
||||||
formson_0210.id as oaId, -- 主表id
|
|
||||||
'formson_0210' as tableName, -- 表名
|
|
||||||
COL_SUMMARY.SUBJECT as title, -- 单据标题
|
|
||||||
unit.name as payCompany, -- 付款公司
|
|
||||||
'差旅费报销单' as billName,
|
|
||||||
'field0072' as payResultField, -- 支付结果字段
|
|
||||||
'field0073' as payDateField, -- 打款日期字段
|
|
||||||
'' as receiptFiled,-- 电子回单字段
|
|
||||||
COL_SUMMARY.id as summaryId,
|
|
||||||
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号
|
|
||||||
formmain_0209.START_DATE as startDate, -- 单据日期
|
|
||||||
formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态
|
|
||||||
formson_0210.field0073 as payDate, -- 打款日期
|
|
||||||
formson_0210.field0072 as payResult, -- 支付结果
|
|
||||||
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户
|
|
||||||
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行
|
|
||||||
formson_0210.field0031 as amount, -- 金额
|
|
||||||
formmain_0209.field0038 as purpose, -- 用途
|
|
||||||
formmain_0209.field0038 as cbsAbstract, -- 摘要
|
|
||||||
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户
|
|
||||||
formson_0210.field0068 as revBankName, -- 收款开户行
|
|
||||||
'' as revAccountName, -- 收款人
|
|
||||||
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号
|
|
||||||
item.showvalue as personalFlag,-- 公私标记
|
|
||||||
'' as revBankType,-- 收款银行类型
|
|
||||||
'10' as currency,-- 币种
|
|
||||||
'' as busType,-- 业务类型
|
|
||||||
'' as receipt -- 电子回单
|
|
||||||
from
|
|
||||||
formson_0210
|
|
||||||
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 CTP_AFFAIR ON CTP_AFFAIR.object_id = COL_SUMMARY.id
|
|
||||||
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 V_USER_VIEW_ALL us on us.staffid=formmain_0209.field0024
|
|
||||||
WHERE 1=1
|
|
||||||
-- and formson_0210.field0031>0
|
|
||||||
and CTP_AFFAIR.node_name = '发起者' and CTP_AFFAIR.COMPLETE_TIME is null and CTP_AFFAIR.STATE = 3
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
|
<if test="referenceNum != null and referenceNum !='' "> v.referenceNum = #{referenceNum} </if>
|
||||||
<if test="busType != null and busType !='' "> and busType = #{busType} </if>
|
<if test="busType != null and busType !='' "> and v.busType = #{busType} </if>
|
||||||
<if test="amount != null and amount !='' ">and amount = #{amount} </if>
|
<if test="amount != null and amount !='' ">and v.amount = #{amount} </if>
|
||||||
<if test="currency != null and currency !='' "> and currency = #{currency} </if>
|
<if test="currency != null and currency !='' "> and v.currency = #{currency} </if>
|
||||||
<if test="payAccount != null and payAccount !='' ">and payAccount = #{payAccount} </if>
|
<if test="payAccount != null and payAccount !='' ">and v.payAccount = #{payAccount} </if>
|
||||||
<if test="revAccount != null and revAccount !='' "> and revAccount = #{revAccount} </if>
|
<if test="revAccount != null and revAccount !='' "> and v.revAccount = #{revAccount} </if>
|
||||||
<if test="revAccountName != null and revAccountName !='' "> and revAccountName = #{revAccountName} </if>
|
<if test="revAccountName != null and revAccountName !='' "> and v.revAccountName = #{revAccountName} </if>
|
||||||
<if test="revBankType != null and revBankType !='' "> and revBankType = #{revBankType} </if>
|
<if test="revBankType != null and revBankType !='' "> and v.revBankType = #{revBankType} </if>
|
||||||
<if test="revBankName != null and revBankName !='' ">and revBankName = #{revBankName} </if>
|
<if test="revBankName != null and revBankName !='' ">and v.revBankName = #{revBankName} </if>
|
||||||
<if test="cnapsCode != null and cnapsCode !='' ">and cnapsCode = #{cnapsCode} </if>
|
<if test="cnapsCode != null and cnapsCode !='' ">and v.cnapsCode = #{cnapsCode} </if>
|
||||||
<if test="purpose != null and purpose !='' "> and purpose = #{purpose} </if>
|
<if test="purpose != null and purpose !='' "> and v.purpose = #{purpose} </if>
|
||||||
<if test="personalFlag != null and personalFlag !='' ">and personalFlag = #{personalFlag} </if>
|
<if test="personalFlag != null and personalFlag !='' ">and v.personalFlag = #{personalFlag} </if>
|
||||||
<if test="tableName != null and tableName !='' "> and tableName = #{tableName} </if>
|
<if test="tableName != null and tableName !='' "> and v.tableName = #{tableName} </if>
|
||||||
<if test="oaId != null and oaId !='' ">and oaId = #{oaId} </if>
|
<if test="oaId != null and oaId !='' ">and v.oaId = #{oaId} </if>
|
||||||
<if test="payCompany != null and payCompany !='' "> and payCompany = #{payCompany} </if>
|
<if test="payCompany != null and payCompany !='' "> and v.payCompany = #{payCompany} </if>
|
||||||
<if test="payCompanyCode != null and payCompanyCode !='' "> and payCompanyCode = #{payCompanyCode} </if>
|
<if test="payCompanyCode != null and payCompanyCode !='' "> and v.payCompanyCode = #{payCompanyCode} </if>
|
||||||
<if test="title != null and title !='' "> and title = #{title} </if>
|
<if test="title != null and title !='' "> and v.title = #{title} </if>
|
||||||
<if test="billName != null and billName !='' "> and billName = #{billName} </if>
|
<if test="billName != null and billName !='' "> and v.billName = #{billName} </if>
|
||||||
<if test="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
|
<if test="payResult != null and payResult !='' ">and v.payResult = #{payResult} </if>
|
||||||
<if test="payType != null and payType !='' "> and payType = #{payType} </if>
|
<if test="applyCode != null and applyCode !='' ">and v.applyCode = #{applyCode} </if>
|
||||||
and receipt is null and personalFlag='0' and payResult = '支付成功'
|
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
|
||||||
|
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
|
||||||
|
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
|
||||||
|
and (v.receipt is NULL OR v.receipt = '')
|
||||||
|
-- and payResult = '支付成功'
|
||||||
</trim>
|
</trim>
|
||||||
|
order by v.oaId,v.sort
|
||||||
</select>
|
</select>
|
||||||
<!-- 查询待支付的 -->
|
<!-- 查询待支付的 -->
|
||||||
<select id="PaymentEntity_list_base_unpaid" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
<select id="PaymentEntity_list_base_unpaid" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
||||||
|
@ -412,9 +375,11 @@
|
||||||
<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
|
<if test="retryFlag == null or retryFlag == ''">
|
||||||
and v.payResult is null
|
and v.payResult is null
|
||||||
and v.finishedflag = 1
|
and v.amount > 0
|
||||||
|
and v.finishedflag = 1
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -424,10 +389,9 @@
|
||||||
|
|
||||||
<!-- 查询未完成的 采用==查询 -->
|
<!-- 查询未完成的 采用==查询 -->
|
||||||
<select id="PaymentEntity_list_base_in_payment" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
<select id="PaymentEntity_list_base_in_payment" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
|
||||||
select
|
select v.* from (
|
||||||
<include refid="PaymentEntity_Base_Column_List"/>
|
<include refid="base_sql"/>
|
||||||
from
|
) v
|
||||||
v_hzya_oa_cbs
|
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
|
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
|
||||||
<if test="busType != null and busType !='' "> and busType = #{busType} </if>
|
<if test="busType != null and busType !='' "> and busType = #{busType} </if>
|
||||||
|
@ -450,9 +414,9 @@
|
||||||
<if test="payResult != null and payResult !='' ">and payResult = #{payResult} </if>
|
<if test="payResult != null and payResult !='' ">and payResult = #{payResult} </if>
|
||||||
<if test="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
|
<if test="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
|
||||||
<if test="payType != null and payType !='' "> and payType = #{payType} </if>
|
<if test="payType != null and payType !='' "> and payType = #{payType} </if>
|
||||||
and (payResult='支付中'
|
and (v.payResult='支付中'
|
||||||
or payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败'))
|
or v.payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败'))
|
||||||
and personalFlag='0'
|
and v.personalFlag='0'
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -109,12 +109,13 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
|
||||||
logEntity.setApply_state(apply_state);
|
logEntity.setApply_state(apply_state);
|
||||||
logEntity.setSuccessed(successed);
|
logEntity.setSuccessed(successed);
|
||||||
logEntity.setBill_code(cbsLogEntity.getBill_code());
|
logEntity.setBill_code(cbsLogEntity.getBill_code());
|
||||||
|
logEntity.setCbs_apply_code(cbs_apply_code);
|
||||||
logEntity.setDataSourceCode(oa_data_source_code);
|
logEntity.setDataSourceCode(oa_data_source_code);
|
||||||
try {
|
try {
|
||||||
updateLog(logEntity);
|
updateLog(logEntity);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("更新");
|
logger.error("更新cbs交易日志出错:{}",e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,10 +187,10 @@ public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implemen
|
||||||
*
|
*
|
||||||
* @param logEntity
|
* @param logEntity
|
||||||
*/
|
*/
|
||||||
@DS("#logEntity.dataSourceCode")
|
// @DS("#logEntity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public void updateLog(CbsLogEntity logEntity) {
|
public void updateLog(CbsLogEntity logEntity) {
|
||||||
cbsLogDao.update(logEntity);
|
cbsLogDao.updateLog(logEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取xml模板
|
//获取xml模板
|
||||||
|
|
|
@ -22,6 +22,8 @@ public class SysApplicationScriptEntity extends BaseEntity {
|
||||||
private String className;
|
private String className;
|
||||||
/** 脚本内容 */
|
/** 脚本内容 */
|
||||||
private String scriptData;
|
private String scriptData;
|
||||||
|
/** 返回脚本内容 */
|
||||||
|
private String backScriptData;
|
||||||
/** 描述 */
|
/** 描述 */
|
||||||
private String scriptRemark;
|
private String scriptRemark;
|
||||||
/** 发布日期 */
|
/** 发布日期 */
|
||||||
|
@ -112,5 +114,12 @@ public class SysApplicationScriptEntity extends BaseEntity {
|
||||||
this.companyId = companyId;
|
this.companyId = companyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBackScriptData() {
|
||||||
|
return backScriptData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBackScriptData(String backScriptData) {
|
||||||
|
this.backScriptData = backScriptData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<result property="scriptVersion" column="script_version" jdbcType="VARCHAR"/>
|
<result property="scriptVersion" column="script_version" jdbcType="VARCHAR"/>
|
||||||
<result property="className" column="class_name" jdbcType="VARCHAR"/>
|
<result property="className" column="class_name" jdbcType="VARCHAR"/>
|
||||||
<result property="scriptData" column="script_data" jdbcType="VARCHAR"/>
|
<result property="scriptData" column="script_data" jdbcType="VARCHAR"/>
|
||||||
|
<result property="backScriptData" column="back_script_data" jdbcType="VARCHAR"/>
|
||||||
<result property="scriptRemark" column="script_remark" jdbcType="VARCHAR"/>
|
<result property="scriptRemark" column="script_remark" jdbcType="VARCHAR"/>
|
||||||
<result property="releaseDate" column="release_date" jdbcType="TIMESTAMP"/>
|
<result property="releaseDate" column="release_date" jdbcType="TIMESTAMP"/>
|
||||||
<result property="scriptStatus" column="script_status" jdbcType="VARCHAR"/>
|
<result property="scriptStatus" column="script_status" jdbcType="VARCHAR"/>
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
,script_version
|
,script_version
|
||||||
,class_name
|
,class_name
|
||||||
,script_data
|
,script_data
|
||||||
|
,back_script_data
|
||||||
,script_remark
|
,script_remark
|
||||||
,release_date
|
,release_date
|
||||||
,script_status
|
,script_status
|
||||||
|
@ -62,6 +64,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||||
|
@ -90,6 +93,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||||
|
@ -120,6 +124,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version like concat('%',#{scriptVersion},'%') </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version like concat('%',#{scriptVersion},'%') </if>
|
||||||
<if test="className != null and className != ''"> and class_name like concat('%',#{className},'%') </if>
|
<if test="className != null and className != ''"> and class_name like concat('%',#{className},'%') </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data like concat('%',#{scriptData},'%') </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data like concat('%',#{scriptData},'%') </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data like concat('%',#{backScriptData},'%') </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark like concat('%',#{scriptRemark},'%') </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark like concat('%',#{scriptRemark},'%') </if>
|
||||||
<if test="releaseDate != null"> and release_date like concat('%',#{releaseDate},'%') </if>
|
<if test="releaseDate != null"> and release_date like concat('%',#{releaseDate},'%') </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status like concat('%',#{scriptStatus},'%') </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status like concat('%',#{scriptStatus},'%') </if>
|
||||||
|
@ -150,6 +155,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> or script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> or script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> or class_name = #{className} </if>
|
<if test="className != null and className != ''"> or class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> or script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> or script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> or back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> or script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> or script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> or release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> or release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> or script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> or script_status = #{scriptStatus} </if>
|
||||||
|
@ -178,6 +184,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> script_version , </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> script_version , </if>
|
||||||
class_name ,
|
class_name ,
|
||||||
<if test="scriptData != null and scriptData != ''"> script_data , </if>
|
<if test="scriptData != null and scriptData != ''"> script_data , </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> back_script_data , </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> script_remark , </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> script_remark , </if>
|
||||||
<if test="releaseDate != null"> release_date , </if>
|
<if test="releaseDate != null"> release_date , </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> script_status , </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> script_status , </if>
|
||||||
|
@ -200,6 +207,7 @@
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> #{scriptVersion} ,</if>
|
<if test="scriptVersion != null and scriptVersion != ''"> #{scriptVersion} ,</if>
|
||||||
CONCAT('g','_',LAST_INSERT_ID()) ,
|
CONCAT('g','_',LAST_INSERT_ID()) ,
|
||||||
<if test="scriptData != null and scriptData != ''"> #{scriptData} ,</if>
|
<if test="scriptData != null and scriptData != ''"> #{scriptData} ,</if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> #{backScriptData} ,</if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> #{scriptRemark} ,</if>
|
<if test="scriptRemark != null and scriptRemark != ''"> #{scriptRemark} ,</if>
|
||||||
<if test="releaseDate != null"> #{releaseDate} ,</if>
|
<if test="releaseDate != null"> #{releaseDate} ,</if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> #{scriptStatus} ,</if>
|
<if test="scriptStatus != null and scriptStatus != ''"> #{scriptStatus} ,</if>
|
||||||
|
@ -217,18 +225,18 @@
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 批量新增 -->
|
<!-- 批量新增 -->
|
||||||
<insert id="entityInsertBatch" >
|
<insert id="entityInsertBatch" >
|
||||||
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data,back_script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.backScriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 批量新增或者修改-->
|
<!-- 批量新增或者修改-->
|
||||||
<insert id="entityInsertOrUpdateBatch" >
|
<insert id="entityInsertOrUpdateBatch" >
|
||||||
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data,back_script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.backScriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||||
</foreach>
|
</foreach>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
app_id = values(app_id),
|
app_id = values(app_id),
|
||||||
|
@ -237,6 +245,7 @@
|
||||||
script_version = values(script_version),
|
script_version = values(script_version),
|
||||||
class_name = values(class_name),
|
class_name = values(class_name),
|
||||||
script_data = values(script_data),
|
script_data = values(script_data),
|
||||||
|
back_script_data = values(back_script_data),
|
||||||
script_remark = values(script_remark),
|
script_remark = values(script_remark),
|
||||||
release_date = values(release_date),
|
release_date = values(release_date),
|
||||||
script_status = values(script_status),
|
script_status = values(script_status),
|
||||||
|
@ -257,6 +266,7 @@ update sys_application_script set
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> script_version = #{scriptVersion},</if>
|
<if test="scriptVersion != null and scriptVersion != ''"> script_version = #{scriptVersion},</if>
|
||||||
<if test="className != null and className != ''"> class_name = #{className},</if>
|
<if test="className != null and className != ''"> class_name = #{className},</if>
|
||||||
<if test="scriptData != null and scriptData != ''"> script_data = #{scriptData},</if>
|
<if test="scriptData != null and scriptData != ''"> script_data = #{scriptData},</if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> back_script_data = #{backScriptData},</if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> script_remark = #{scriptRemark},</if>
|
<if test="scriptRemark != null and scriptRemark != ''"> script_remark = #{scriptRemark},</if>
|
||||||
<if test="releaseDate != null"> release_date = #{releaseDate},</if>
|
<if test="releaseDate != null"> release_date = #{releaseDate},</if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> script_status = #{scriptStatus},</if>
|
<if test="scriptStatus != null and scriptStatus != ''"> script_status = #{scriptStatus},</if>
|
||||||
|
@ -286,6 +296,7 @@ update sys_application_script set sts= 'N' ,modify_time = #{modify_time},modify
|
||||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||||
|
<if test="backScriptData != null and backScriptData != ''"> and back_script_data = #{backScriptData} </if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||||
|
|
|
@ -587,6 +587,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
||||||
sysApplicationDatabaseDao.logicRemoveMultiCondition(detailEntity);
|
sysApplicationDatabaseDao.logicRemoveMultiCondition(detailEntity);
|
||||||
SysApplicationDatabaseEntity databaseEntity = entity.getDatabaseEntity();
|
SysApplicationDatabaseEntity databaseEntity = entity.getDatabaseEntity();
|
||||||
if (databaseEntity != null) {
|
if (databaseEntity != null) {
|
||||||
|
databaseEntity.setAppId(entity.getId());
|
||||||
databaseEntity.setPassword(AESUtil.encrypt(databaseEntity.getPassword()));
|
databaseEntity.setPassword(AESUtil.encrypt(databaseEntity.getPassword()));
|
||||||
databaseEntity.setSts("Y");
|
databaseEntity.setSts("Y");
|
||||||
databaseEntity.setSts("Y");
|
databaseEntity.setSts("Y");
|
||||||
|
|
|
@ -289,7 +289,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
<if test="sts == null ">sts,</if>
|
||||||
</trim>
|
</trim>
|
||||||
)values(
|
)values(
|
||||||
|
@ -326,7 +325,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||||
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
||||||
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
||||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from integration_task_living_details a WHERE a.sts = 'Y' ),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
<if test="sts == null ">'Y',</if>
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
|
@ -368,7 +366,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||||
<if test="sorts == null ">sorts,</if>
|
|
||||||
<if test="sts == null ">sts,</if>
|
<if test="sts == null ">sts,</if>
|
||||||
</trim>
|
</trim>
|
||||||
)values(
|
)values(
|
||||||
|
@ -405,7 +402,6 @@
|
||||||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||||
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
||||||
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
||||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from integration_task_living_details a WHERE a.sts = 'Y' ),</if>
|
|
||||||
<if test="sts == null ">'Y',</if>
|
<if test="sts == null ">'Y',</if>
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
|
|
|
@ -228,7 +228,7 @@ a.id
|
||||||
from sys_person a
|
from sys_person a
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="id != null and id != ''">and a.id like concat('%',#{id},'%')</if>
|
<if test="id != null and id != ''">and a.id like concat('%',#{id},'%')</if>
|
||||||
<if test="organId != null and organId != ''">and a.organ_id like concat('%',#{organId},'%')</if>
|
<if test="organId != null and organId != ''">and a.organ_id = #{organId}</if>
|
||||||
<if test="personCode != null and personCode != ''">and a.person_code like concat('%',#{personCode},'%')</if>
|
<if test="personCode != null and personCode != ''">and a.person_code like concat('%',#{personCode},'%')</if>
|
||||||
<if test="personName != null and personName != ''">and a.person_name like concat('%',#{personName},'%')</if>
|
<if test="personName != null and personName != ''">and a.person_name like concat('%',#{personName},'%')</if>
|
||||||
<if test="sex != null and sex != ''">and a.sex like concat('%',#{sex},'%')</if>
|
<if test="sex != null and sex != ''">and a.sex like concat('%',#{sex},'%')</if>
|
||||||
|
|
Binary file not shown.
|
@ -10,6 +10,7 @@ import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingE
|
||||||
import com.hzya.frame.web.quartz.QuartzJobFactoryUtils;
|
import com.hzya.frame.web.quartz.QuartzJobFactoryUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
|
@ -34,13 +35,17 @@ public class MyApplicationListener implements ApplicationListener<ApplicationRea
|
||||||
private IIntegrationTaskLivingDao iIntegrationTaskLivingDao;
|
private IIntegrationTaskLivingDao iIntegrationTaskLivingDao;
|
||||||
@Resource
|
@Resource
|
||||||
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
|
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
|
||||||
|
@Value("${data.use}")
|
||||||
|
private boolean dataUse;
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
||||||
initTask();
|
initTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initTask() {
|
private void initTask() {
|
||||||
|
if(!dataUse){
|
||||||
|
return;
|
||||||
|
}
|
||||||
//查询所有任务,添加到任务执行计划中
|
//查询所有任务,添加到任务执行计划中
|
||||||
IntegrationTaskEntity queryEntity = new IntegrationTaskEntity();
|
IntegrationTaskEntity queryEntity = new IntegrationTaskEntity();
|
||||||
//任务状态1、启用
|
//任务状态1、启用
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.hzya.frame.web.action.ApplicationContextUtil;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -36,25 +37,27 @@ public class InitCommandLineRunner implements ApplicationListener<ApplicationRea
|
||||||
Logger logger = LoggerFactory.getLogger(InitCommandLineRunner.class);
|
Logger logger = LoggerFactory.getLogger(InitCommandLineRunner.class);
|
||||||
@Resource
|
@Resource
|
||||||
private ApplicationCache applicationCache;
|
private ApplicationCache applicationCache;
|
||||||
|
@Value("${data.use}")
|
||||||
|
private boolean dataUse;
|
||||||
@Resource
|
@Resource
|
||||||
private InterfaceCache interfaceCache;
|
private InterfaceCache interfaceCache;
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(ApplicationReadyEvent event) {
|
public void onApplicationEvent(ApplicationReadyEvent event) {
|
||||||
logger.info("初始化ApplicationCache Map start <<<<<<<<<<<<<<<<<<<<<<<<");
|
if(dataUse){
|
||||||
applicationCache.reloadData("1");
|
logger.info("初始化ApplicationCache Map start <<<<<<<<<<<<<<<<<<<<<<<<");
|
||||||
applicationCache.reloadData("2");
|
applicationCache.reloadData("1");
|
||||||
applicationCache.reloadData("3");
|
applicationCache.reloadData("2");
|
||||||
applicationCache.reloadData("4");
|
applicationCache.reloadData("3");
|
||||||
|
applicationCache.reloadData("4");
|
||||||
interfaceCache.reloadData("1");
|
|
||||||
interfaceCache.reloadData("2");
|
|
||||||
interfaceCache.reloadData("3");
|
|
||||||
interfaceCache.reloadData("4");
|
|
||||||
interfaceCache.reloadData("5");
|
|
||||||
interfaceCache.reloadData("6");
|
|
||||||
logger.info("初始化ApplicationCache Map END <<<<<<<<<<<<<<<<<<<<<<<<");
|
|
||||||
|
|
||||||
|
interfaceCache.reloadData("1");
|
||||||
|
interfaceCache.reloadData("2");
|
||||||
|
interfaceCache.reloadData("3");
|
||||||
|
interfaceCache.reloadData("4");
|
||||||
|
interfaceCache.reloadData("5");
|
||||||
|
interfaceCache.reloadData("6");
|
||||||
|
logger.info("初始化ApplicationCache Map END <<<<<<<<<<<<<<<<<<<<<<<<");
|
||||||
|
}
|
||||||
String path = InitCommandLineRunner.class.getClassLoader().getResource("").getPath();
|
String path = InitCommandLineRunner.class.getClassLoader().getResource("").getPath();
|
||||||
;
|
;
|
||||||
logger.info("cfgHomeClassURL:" + path);
|
logger.info("cfgHomeClassURL:" + path);
|
||||||
|
|
Loading…
Reference in New Issue