This commit is contained in:
parent
c3f969541b
commit
a50cc1dad5
|
@ -2,8 +2,8 @@ package com.hzya.frame.plugin.a8bill.plugin;
|
|||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
|
@ -65,7 +65,7 @@ public class KunBFlowSubPluginInitializer extends PluginBaseEntity{
|
|||
String dataSourceCode = "KUNBOA";
|
||||
oaBillEntity.setDataSourceCode(dataSourceCode);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select * from v_hzya_pay where payState ='1'");
|
||||
stringBuffer.append("select * from v_hzya_pay_sub ");
|
||||
try {
|
||||
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
|
||||
if(CollectionUtils.isNotEmpty(hashMaps)){
|
||||
|
@ -80,18 +80,27 @@ public class KunBFlowSubPluginInitializer extends PluginBaseEntity{
|
|||
if(StrUtil.isNotEmpty(affairId)&& StrUtil.isNotEmpty(memberId)){
|
||||
JSONObject tokenRes = new JSONObject();
|
||||
tokenRes.put("loginName",loginName);
|
||||
tokenRes.put("userName","restUser");
|
||||
tokenRes.put("password","f91a3aea-f202-4366-8958-61a778f613bc");
|
||||
logger.info("获取token请求参数:"+tokenRes.toString());
|
||||
String tokenResult = OaFlowUtil.sendOAToEsb(tokenRes.toString(),"8000320000");
|
||||
String tokenResult = OaFlowUtil.sendOAToEsb(tokenRes.toString(),"8000320000","");
|
||||
logger.info("获取token请求返回:"+tokenResult);
|
||||
//通过当前处理人获取token
|
||||
Map res = new HashMap();
|
||||
res.put("affairId", affairId);
|
||||
res.put("memberid", memberId);//当前处理人ID
|
||||
res.put("comment", "自动审批");//处理意见
|
||||
res.put("attitude", "1");//态度:1同意,2不同意,0已阅
|
||||
logger.info("流程处理请求参数:"+JSON.toJSONString(res));
|
||||
String result = OaFlowUtil.sendOAToEsb(JSON.toJSONString(res),"8000320001");
|
||||
logger.info("流程处理请求返回:"+result);
|
||||
JSONObject tokenObj = JSON.parseObject(tokenResult);
|
||||
JSONObject attribute = tokenObj.getJSONObject("attribute");
|
||||
if(null != attribute){
|
||||
String token = attribute.getString("id");
|
||||
if(StrUtil.isNotEmpty(token)){
|
||||
//通过当前处理人获取token
|
||||
Map res = new HashMap();
|
||||
res.put("affairId", affairId);
|
||||
res.put("memberid", memberId);//当前处理人ID
|
||||
res.put("comment", "自动审批");//处理意见
|
||||
res.put("attitude", "1");//态度:1同意,2不同意,0已阅
|
||||
logger.info("流程处理请求参数:"+ JSON.toJSONString(res));
|
||||
String result = OaFlowUtil.sendOAToEsb(JSON.toJSONString(res),"8000320001",token);
|
||||
logger.info("流程处理请求返回:"+result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public class KunBNingBBankPluginInitializer extends PluginBaseEntity{
|
|||
sb.append(" where id = '"+main.getString("id")+"'");
|
||||
//2024年7月29日10:54:47新增逻辑,如果状态是付款成功,则将当前时间写入汇总表一份,客户林工提出
|
||||
if(payStateFlag){
|
||||
String sqlStr = "update formson_0416 set field0020 = '"+payDateStr+"' where id = '"+payId+"'";
|
||||
String sqlStr = "update formson_0416 set field0020 = '"+payDateStr+"' ,field0019 = '支付成功' where id = '"+payId+"'";
|
||||
payBillDao.updateStateForId(sqlStr,oaBillEntity);
|
||||
}
|
||||
//修改推送状态,防止重复推送
|
||||
|
|
|
@ -10,13 +10,14 @@ import cn.hutool.http.HttpRequest;
|
|||
*/
|
||||
|
||||
public class OaFlowUtil {
|
||||
public static String sendOAToEsb(String parm,String apiCode){
|
||||
public static String sendOAToEsb(String parm,String apiCode,String token){
|
||||
// String baseUrl = "http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
// System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800032")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("token", token)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
|
|
Loading…
Reference in New Issue