增加平台验证接口

pro
wj 2 years ago
parent aeedcdd984
commit 2169d3300d

@ -11,6 +11,7 @@ import com.glxp.api.entity.auth.*;
import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.entity.system.CompanyEntity;
import com.glxp.api.entity.system.SysPdaKeyEntity; import com.glxp.api.entity.system.SysPdaKeyEntity;
import com.glxp.api.exception.JsonException; import com.glxp.api.exception.JsonException;
import com.glxp.api.req.auth.FilterInvWarehouseRequest;
import com.glxp.api.req.auth.LoginRequest; import com.glxp.api.req.auth.LoginRequest;
import com.glxp.api.req.auth.PCLoginRequest; import com.glxp.api.req.auth.PCLoginRequest;
import com.glxp.api.req.auth.UpdatePasswordRequest; import com.glxp.api.req.auth.UpdatePasswordRequest;
@ -75,12 +76,12 @@ public class LoginController extends BaseController {
AuthAdmin authAdmin = authAdminService.findByUserName(loginRequest.getUsername()); AuthAdmin authAdmin = authAdminService.findByUserName(loginRequest.getUsername());
if (authAdmin == null) { if (authAdmin == null) {
UserRegisterEntity userRegisterEntity=userRegisterService.selectByUserName(loginRequest.getUsername()); UserRegisterEntity userRegisterEntity = userRegisterService.selectByUserName(loginRequest.getUsername());
if(userRegisterEntity!=null){ if (userRegisterEntity != null) {
throw new JsonException(ResultEnum.DATA_NOT, "该账号未通过审核!"); throw new JsonException(ResultEnum.DATA_NOT, "该账号未通过审核!");
}else { } else {
throw new JsonException(ResultEnum.DATA_NOT, "该账号未注册!"); throw new JsonException(ResultEnum.DATA_NOT, "该账号未注册!");
} }
} }
if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(authAdmin.getPassWord())) { if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(authAdmin.getPassWord())) {
@ -226,9 +227,9 @@ public class LoginController extends BaseController {
LoginUserInfoResponse loginUserInfoResponse = new LoginUserInfoResponse(); LoginUserInfoResponse loginUserInfoResponse = new LoginUserInfoResponse();
BeanUtils.copyProperties(authAdmin, loginUserInfoResponse); BeanUtils.copyProperties(authAdmin, loginUserInfoResponse);
CompanyEntity companyEntity = companyService.findCompany(authAdmin.getCustomerId()); CompanyEntity companyEntity = companyService.findCompany(authAdmin.getCustomerId());
if("110".equals(authAdmin.getCustomerId())){ if ("110".equals(authAdmin.getCustomerId())) {
loginUserInfoResponse.setCompanyName(authAdmin.getEmployeeName()); loginUserInfoResponse.setCompanyName(authAdmin.getEmployeeName());
}else{ } else {
loginUserInfoResponse.setCompanyName(companyEntity.getCompanyName()); loginUserInfoResponse.setCompanyName(companyEntity.getCompanyName());
} }
loginUserInfoResponse.setLocDeptName(deptService.getInvName(loginUserInfoResponse.getLocDeptCode())); loginUserInfoResponse.setLocDeptName(deptService.getInvName(loginUserInfoResponse.getLocDeptCode()));
@ -305,6 +306,8 @@ public class LoginController extends BaseController {
return ResultVOUtils.error(ResultEnum.DATA_CHANGE); return ResultVOUtils.error(ResultEnum.DATA_CHANGE);
} }
//------------------------------------------UDIMS接口-----------------------------------------------------------
/** /**
* *
* *
@ -342,6 +345,12 @@ public class LoginController extends BaseController {
authLicenseDao.romveByCustomerId(authAdmin.getCustomerId() + ""); authLicenseDao.romveByCustomerId(authAdmin.getCustomerId() + "");
authLicenseDao.save(authLicense); authLicenseDao.save(authLicense);
} }
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setSpUse(true);
List<InvWarehouseEntity> invList = invWarehouseService.findInvListByUser(filterInvWarehouseRequest);
Map<String, Object> res = new WeakHashMap<>(2);
res.put("license", authLicense);
res.put("invList", invList);
return ResultVOUtils.success(authLicense); return ResultVOUtils.success(authLicense);
} }

@ -1,10 +1,12 @@
package com.glxp.api.entity.auth; package com.glxp.api.entity.auth;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("auth_license")
public class AuthLicense { public class AuthLicense {
private String id; private String id;
// 名称 // 名称

Loading…
Cancel
Save