|
@@ -42,6 +42,38 @@ public class TripSyncBillUtils {
|
|
|
put("04", "4");
|
|
put("04", "4");
|
|
|
}};
|
|
}};
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param reimburseLevel 报销级别
|
|
|
|
|
+ * @return 将报销级别单据数据转换成接口的业务数据
|
|
|
|
|
+ */
|
|
|
|
|
+ public static Map<String,Object> getReimburseLevelDataParam(DynamicObject reimburseLevel){
|
|
|
|
|
+ String displayName = reimburseLevel.getDataEntityType().getDisplayName().getLocaleValue();
|
|
|
|
|
+ String billNumber = reimburseLevel.getString(BaseFieldConst.NUMBER);
|
|
|
|
|
+
|
|
|
|
|
+ logger.info(String.format("推送%s,单据编号%s开始转换业务数据", displayName, billNumber));
|
|
|
|
|
+
|
|
|
|
|
+ // 接口业务数据
|
|
|
|
|
+ Map<String, Object> data = new HashMap<>();
|
|
|
|
|
+ List<Map<String,Object>> dataTypeList = new ArrayList<>();
|
|
|
|
|
+ Map<String,Object> dataTypeInfo = new HashMap<>();
|
|
|
|
|
+ //是否添加VE_前缀,0否 1是
|
|
|
|
|
+ dataTypeInfo.put("prefixFlag","0");
|
|
|
|
|
+ dataTypeInfo.put("dataTypeNo","10115");
|
|
|
|
|
+ dataTypeInfo.put("dataTypeName","报销级别");
|
|
|
|
|
+ dataTypeInfo.put("type","1");
|
|
|
|
|
+ dataTypeInfo.put("dataCode",billNumber);
|
|
|
|
|
+ dataTypeInfo.put("dataName",reimburseLevel.getString(BaseFieldConst.NAME));
|
|
|
|
|
+ dataTypeInfo.put("status",reimburseLevel.getString("enable"));
|
|
|
|
|
+
|
|
|
|
|
+ dataTypeList.add(dataTypeInfo);
|
|
|
|
|
+ data.put("dataTypeInfo",dataTypeList);
|
|
|
|
|
+
|
|
|
|
|
+ logger.info(String.format("推送%s,单据编号%s转换业务数据结束,业务数据JSON:\n%s",
|
|
|
|
|
+ displayName, billNumber, JSONObject.toJSONString(data)));
|
|
|
|
|
+ return data;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @param accommodation 住宿补助标准
|
|
* @param accommodation 住宿补助标准
|
|
|
* @return 将住宿补助标准单据数据转换成接口的业务数据
|
|
* @return 将住宿补助标准单据数据转换成接口的业务数据
|
|
@@ -272,8 +304,8 @@ public class TripSyncBillUtils {
|
|
|
travelStandardScopes.put("scopesType", "1");
|
|
travelStandardScopes.put("scopesType", "1");
|
|
|
//适用范围 存对应的枚举的适用职级编号、适用部门编号、适用员工工号、适用岗位编号
|
|
//适用范围 存对应的枚举的适用职级编号、适用部门编号、适用员工工号、适用岗位编号
|
|
|
travelStandardScopes.put("scopesContent", reimburseLevel.getDynamicObject(1).getString(BaseFieldConst.NUMBER));
|
|
travelStandardScopes.put("scopesContent", reimburseLevel.getDynamicObject(1).getString(BaseFieldConst.NUMBER));
|
|
|
- //适用范围名称 TODO 确认下固定名称
|
|
|
|
|
- travelStandardScopes.put("scopesContentName", "职级范围");
|
|
|
|
|
|
|
+ //适用范围名称
|
|
|
|
|
+ travelStandardScopes.put("scopesContentName", reimburseLevel.getDynamicObject(1).getString(BaseFieldConst.NAME));
|
|
|
travelStandardScopesList.add(travelStandardScopes);
|
|
travelStandardScopesList.add(travelStandardScopes);
|
|
|
}
|
|
}
|
|
|
return travelStandardScopesList;
|
|
return travelStandardScopesList;
|