当前位置: 首页 > 工具软件 > OSF > 使用案例 >

金蝶服务端调用OSF服务

酆景辉
2023-12-01

在金蝶使用中会用前端和后端调用OSF服务

1.  前端调用方法:

        shr.callService({
            serviceName : "transformationService",
            param:{
                requestType : "GET",
                requestMethod:"/hrAgent/person/updateApprovalStatus",
                identifiy:"hragent",
                requestGetUrl:"queryReq="+newDataJson
            },
            type: "post",
            async : true,
            success: function(data) {
                var data = JSON.parse(data);
			    //返回的信息
				if(data&&data.code==1){
					self_page.updateHrApprovalInfo(hrApproveData,loading);
				}else{
                    // 回调成功关闭遮罩
                    layer.close(loading);
					var message=data&&data.message?data.message:"审批失败";
					shr.showWarning({
						message: message
					});
				}
            },
            error:function(e){
                // 回调成功关闭遮罩
                layer.close(loading);
                shr.showWarning({
                    message: "审批异常,请稍后重试"
                });
            }
        });

2.服务端调用示例

import com.kingdee.shr.base.syssetting.app.osf.OSFAppUtil;

	

	String serviceName = "generateHolidayLimitOSF";
		Map param = new HashMap();
		param.put("adminOrgUnitNum", adminOrgUnitNum);
		param.put("personNum", personNum);
		param.put("holidayTypeName", holidayTypeName);
		param.put("existedDealType", existedDealType);

		OSFAppUtil osfUtil = new OSFAppUtil();
		Object osfObject = OSFAppUtil.callService(ctx, serviceName,
				(HashMap) param);

2.第三方系统单点登录调用

SHRClient client = new SHRClient();
Response count = client.execute(request, "getUnProcessAssignCount", null);

 类似资料: