oa对接u8扩展类

This commit is contained in:
xiang2lin 2024-06-03 13:43:15 +08:00
parent 3f6ea50b70
commit df93aa6891
2 changed files with 33 additions and 6 deletions

View File

@ -216,7 +216,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
Object summaryObj = entity.getSummaryObj();
String deeCfgId = entity.getDeeCfgId();
String currentNodeLast = entity.getCurrentNodeLast();
Map<String, Object> businessData = JSON.parseObject(entity.getBusinessDataStr(), Map.class);
JSONObject businessData = JSON.parseObject(entity.getBusinessDataStr());
Map<String, Object> extData = entity.getExtData();
/** 表单表的FORM ID,用此字段标记是哪个流程*/
String formApp = entity.getFormApp();
@ -248,12 +248,34 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
/** 结束事件*/
case "onProcessFinished":
if (StrUtil.isNotEmpty(formApp)){
String type = "_add";
switch (formApp){
case "-8691606453890363968"://存货
JSONObject formmain0227 = businessData.getJSONObject("formmain_0227");
//新增还是修改
type = formmain0227.getString("field0014");
break;
case "6223456019738676230"://供应商
JSONObject formmain0225 = businessData.getJSONObject("formmain_0225");
type = formmain0225.getString("field0019");
break;
case "-9122508232154527168"://客户
JSONObject formmain0226 = businessData.getJSONObject("formmain_0226");
type = formmain0226.getString("field0024");
break;
}
//这个枚举代表修改
if (type.equals("7858843591961101741")){
type = "_add";
}else {
type = "_edit";
}
SysApplicationApiEntity sysApplicationApiEntity = new SysApplicationApiEntity();
sysApplicationApiEntity.setHeaderIn(formApp);
sysApplicationApiEntity.setHeaderIn(formApp+type);
List<SysApplicationApiEntity> applist = sysApplicationApiService.queryByLike(sysApplicationApiEntity);
if (CollectionUtil.isNotEmpty(applist)){
if (applist.size() > 1){
return BaseResult.getFailureMessageEntity("根据formID" + formApp+"查询出多条数据", "");
return BaseResult.getFailureMessageEntity("根据formApp" + formApp+"查询出多条数据", "");
}
SysApplicationApiEntity sysApp = applist.get(0);
Map<String, String> headerMap = MapBuilder.<String, String>create(true)

View File

@ -106,7 +106,7 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
String formApp = sourceBody.getString("formApp");
param.put("formAppId",formApp);
param.put("formMainIds",formMainIds);
param.put("dataSourceCode","ht_oa_sqlserver");
param.put("dataSourceCode","ydc_oa_sqlserver");
param.put("eventType",sourceBody.getString("eventType"));
//把返回的单号更新到oa档案表
@ -183,7 +183,8 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
JSONObject jsonObject = new JSONObject();
jsonObject.put("billid", formmain0225.getString("id"));
jsonObject.put("AccId", formmain0225.getString("field0020"));
jsonObject.put("Token", U8Util.getToken());
//jsonObject.put("Token", U8Util.getToken());
jsonObject.put("Token", "Hzya1314_CheckSkip");
JSONObject oArchives = new JSONObject();
oArchives.put("cVenCode", formmain0225.getString("field0002"));
oArchives.put("cVenName", formmain0225.getString("field0003"));
@ -206,6 +207,10 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
oArchives.put("cVenRegCode", formmain0225.getString("field0009"));
oArchives.put("cVenBank", formmain0225.getString("field0011"));
oArchives.put("cVenAccount", formmain0225.getString("field0012"));
//专管业务员
oArchives.put("cVenPPerson",formmain0225.getString("field0016"));
//分管部门
oArchives.put("cVenDepart","field0013");
jsonObject.put("oArchives", oArchives);
param.setBodys(JSON.toJSONString(jsonObject));
hzyaExtData.put("billCode", formmain0225.getString("field0001"));