Merge branch 'dev' into test

pro
wj 2 years ago
commit 86a14f88f5

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

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

Loading…
Cancel
Save