This commit is contained in:
lvleigang 2024-11-05 16:46:56 +08:00
commit 92e447c5e4
6 changed files with 9 additions and 127 deletions

View File

@ -141,6 +141,8 @@ public class PayReqSyncU8CPluginInitializer extends PluginBaseEntity {
for (String key : hashMap.keySet()) {
main.put(key, hashMap.get(key));
}
logger.info("组装数据前"+JSON.toJSONString(hashMaps));
logger.info("组装数据前1"+main.toString());
ningboBankPluginService.updateU8CStatus(main,integration_task_living_details_id);
}
} catch (Exception e) {

View File

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.u8c.service.ISalesBillingService;
import com.hzya.frame.u8c.sosale.service.ISoSaleService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -93,6 +94,7 @@ private ISoSaleService soSaleService;
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
return soSaleService.getU8cSaleToOa(requestJson);
soSaleService.getU8cSaleToOa(requestJson);
return BaseResult.getSuccessMessageEntity("销售订单同步OA成功");
}
}

View File

@ -208,9 +208,8 @@ public class RestUtil {
}
public static String sendU8CToOA(String parm, String apiCode,String userCode){
String baseUrl = "http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface";
System.out.println("推送参数"+parm);
//获取OAtoken
logger.info("推送参数"+parm);
JSONObject tokenObj = new JSONObject();
tokenObj.put("password","2cdd6cfc-5b87-47d1-aaea-756a55f6b5a6");
tokenObj.put("userName","restUser");
@ -231,7 +230,7 @@ public class RestUtil {
.body(parm)//表单内容
.timeout(20000)//超时毫秒
.execute().body();
System.out.println("返回参数"+result);
logger.info("返回参数"+parm);
if(StrUtil.isNotEmpty(result)){
return analytic(result);
}

View File

@ -1,89 +0,0 @@
package com.hzya.frame.u8.dto;
import com.alibaba.fastjson.annotation.JSONField;
/**
* @Description u8返回对象
* @Author xiangerlin
* @Date 2024/5/14 15:40
**/
public class U8ResponseDTO {
@JSONField(name = "Flag")
private String flag;
@JSONField(name = "DataOne")
private String dataOne;
@JSONField(name = "DataTwo")
private String dataTwo;
@JSONField(name = "Msg")
private String msg;
//如果co初始化失败或者token不对的时候会返回这些信息
private String code;
private String success;
private String message;
private String data;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getDataOne() {
return dataOne;
}
public void setDataOne(String dataOne) {
this.dataOne = dataOne;
}
public String getDataTwo() {
return dataTwo;
}
public void setDataTwo(String dataTwo) {
this.dataTwo = dataTwo;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getSuccess() {
return success;
}
public void setSuccess(String success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}

View File

@ -1,34 +0,0 @@
package com.hzya.frame.u8.util;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.u8.dto.U8ResponseDTO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* @Description
* @Author xiangerlin
* @Date 2024/5/14 15:30
**/
public class U8Util {
static Logger logger = LogManager.getLogger(U8Util.class);
//获取token
public static String getToken() {
String url = "http://127.0.0.1:51910/Api/Base/GetToken";
JSONObject jsonObject = new JSONObject();
jsonObject.put("secretkey", "L1NhkDrQhtBDzTxFxPI0jxWcBzTBSPvaI5xZusRRi9ofS9d6ngxrj1erwbdjxtUT");
logger.info("获取U8token参数:{}", jsonObject.toJSONString());
String token = HttpRequest.post( url).body(jsonObject.toJSONString()).timeout(60000).execute().body();
logger.info("token返回参数:{}", jsonObject.toJSONString());
if (StrUtil.isNotEmpty(token)) {
U8ResponseDTO u8ResponseDTO = JSONObject.parseObject(token, U8ResponseDTO.class);
return u8ResponseDTO.getMessage();
}
return token;
}
}

View File

@ -318,6 +318,8 @@ public class SoSaleServiceImpl extends BaseService<SoSaleEntity, String> impleme
field0032.put("value",line.getFrownote());
bodyDetails.add(field0032);
body.put("fields",bodyDetails);
records.add(body);
});
subTablesObj.put("records",records);
subTablesObj.put("name","formson_0048");