分析页统计:生产单状态统计接口实现

This commit is contained in:
gaoqr
2024-08-06 18:31:22 +08:00
parent 483e2dcb99
commit f737c17866
15 changed files with 310 additions and 43 deletions
@@ -1,6 +1,8 @@
package com.cf.imes.framework.security.core.util;
import cn.hutool.core.util.StrUtil;
import com.cf.imes.framework.common.exception.ServiceException;
import com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants;
import com.cf.imes.framework.security.core.LoginUser;
import com.cf.imes.framework.web.core.util.WebFrameworkUtils;
import org.springframework.lang.Nullable;
@@ -123,9 +125,12 @@ public class SecurityFrameworkUtils {
* 获取当前用户的组织ID
*
*/
public static Long getUserOrganId(){
return SecurityFrameworkUtils.getLoginUser().getOrganId();
public static Long getUserOrganId() {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
if (loginUser == null) {
throw new ServiceException(GlobalErrorCodeConstants.UNAUTHORIZED);
}
return loginUser.getOrganId();
}
}