金蝶服务端调用OSF服务

在金蝶使用中会用前端和后端调用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);

猜你喜欢

转载自blog.csdn.net/qq_31450641/article/details/118940519

相关文章