parent
e74c8668ff
commit
8a4f453a0c
|
@ -26,4 +26,11 @@ public interface ISeeyonExtService {
|
|||
* @param logEntity
|
||||
*/
|
||||
void ydcSeeyon2u8CallBack(SysMessageManageLogEntity logEntity);
|
||||
|
||||
/**
|
||||
* 更新英德赛表单
|
||||
* @param sql
|
||||
* @param dataSourceCode
|
||||
*/
|
||||
void updateYdcForm(String sql,String dataSourceCode);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ import cn.hutool.json.JSONUtil;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.execsql.service.IExecSqlService;
|
||||
import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity;
|
||||
import com.hzya.frame.seeyon.service.ISeeyonExtService;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
|
@ -41,6 +43,8 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
|||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private IExecSqlService executionService;
|
||||
|
||||
static {
|
||||
inventoryAttrMap = new HashMap<>();
|
||||
|
@ -146,18 +150,20 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
|||
}
|
||||
if (StrUtil.isNotEmpty(sql)){
|
||||
logger.info("要执行的sql:{}",sql);
|
||||
String sign = SecureUtil.md5(sql);
|
||||
String data = SecureUtil.aes(KEY.getBytes()).encryptHex(sql);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000190001")
|
||||
.put("publicKey","ZJYA+I8JEYTh7Mkjr7ncOp1uISzUk/ugy0uL4OTJgepuip9Ce7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","cYLV+V7qcvBEWU/hAhH4Mgd6Zjs43nALsmzdNApb142abKpMCMTwodlKbQQe5/oEj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId","800019")
|
||||
.build();
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("sign",sign);
|
||||
params.put("data",data);
|
||||
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(JSON.toJSONString(params)).timeout(60000).execute().body();
|
||||
//不调rest接口了,改成直接更新
|
||||
updateYdcForm(sql,"ydc_oa_sqlserver");
|
||||
// String sign = SecureUtil.md5(sql);
|
||||
// String data = SecureUtil.aes(KEY.getBytes()).encryptHex(sql);
|
||||
// Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
// .put("apiCode", "8000190001")
|
||||
// .put("publicKey","ZJYA+I8JEYTh7Mkjr7ncOp1uISzUk/ugy0uL4OTJgepuip9Ce7eDIk+3zDUT+v578prj")
|
||||
// .put("secretKey","cYLV+V7qcvBEWU/hAhH4Mgd6Zjs43nALsmzdNApb142abKpMCMTwodlKbQQe5/oEj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
// .put("appId","800019")
|
||||
// .build();
|
||||
// JSONObject params = new JSONObject();
|
||||
// params.put("sign",sign);
|
||||
// params.put("data",data);
|
||||
// String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(JSON.toJSONString(params)).timeout(60000).execute().body();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -190,6 +196,22 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新英德赛表单
|
||||
*
|
||||
* @param sql
|
||||
* @param dataSourceCode
|
||||
*/
|
||||
@Override
|
||||
@DS("#dataSourceCode")
|
||||
public void updateYdcForm(String sql, String dataSourceCode) {
|
||||
try {
|
||||
executionService.execUpdateSql(sql,dataSourceCode);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
//存货参数组装
|
||||
private SysExtensionApiEntity getInventory(JSONObject businessData,SysExtensionApiEntity param,JSONObject hzyaExtData){
|
||||
if (null != businessData){
|
||||
|
|
Loading…
Reference in New Issue