出库流程操作库存;出库单导入调整;

This commit is contained in:
王奎兴
2026-01-27 17:23:06 +08:00
parent 797f2db7c1
commit 76fff6437d
22 changed files with 372 additions and 124 deletions
@@ -440,6 +440,32 @@ public class UserApplicationService {
return userPo;
}
/**
* @Description 根据用户ID获取用户信息
* @Author Alex
* @Date 2022/12/20 17:12
*/
public UserPo selectByUserName(String userName) {
if (StringUtils.isEmpty(userName)) {
LoginUser loginUser = SecurityUtils.getLoginUser();
userName = loginUser.getUsername();
}
UserPo userPo = userDomainService.selectByUserName(userName);
if (userPo != null){
userPo.setPrincipalAccount(userPo.getUserAccount());
}
if (StringUtils.isNotEmpty(userPo.getRoleCode())){
String[] split = userPo.getRoleCode().split(";");
List<String> list = CollectionUtil.toList(split);
userPo.setRoleCodeList(list);
}
UserShipperPo userShipperPo = userShipperDomainService.selectByUserId(userPo.getUserId());
if(null != userShipperPo){
userPo.setEsignEnterpriseStatus(userShipperPo.getEsignEnterpriseStatus());
}
return userPo;
}
/**
* @Description 分配用户默认普通用户角色
* @Author Alex
@@ -4964,4 +4990,4 @@ public class UserApplicationService {
public UserPo selectUserTableByUserId(Long userId){
return userDomainService.selectByUserId(userId);
}
}
}
@@ -27,6 +27,8 @@ public interface UserRepositoryInterface extends IService<UserEntity> {
UserPo findAdminUserByOrganizationId(UserDO userDO);
UserPo findByUserId(Long userId);
UserPo selectByUserName(String userName);
UserPo findByTopOrganizationIdAndUserAccount(UserDO userDO);
UserPo getUserByDingUserId(String dingUserId);
@@ -73,5 +75,4 @@ public interface UserRepositoryInterface extends IService<UserEntity> {
String finShipperEnterpriseNamedByUserId(Long userId);
}
}
@@ -60,4 +60,4 @@ public interface UserShipperRepositoryInterface extends IService<UserShipperEnti
SettlementInfoQueryVo getSettlementInfoByUserId(Long userId);
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
}
}
@@ -24,6 +24,8 @@ public interface UserMapper extends BaseMapper<UserEntity> {
UserPo selectByUserId(Long userId);
UserPo selectByUserName(String userName);
UserPo selectUserShipperList(UserPo userPo);
List<UserPo> selectUserShipperListWaybill(UserPo userPo);
@@ -72,4 +74,4 @@ public interface UserMapper extends BaseMapper<UserEntity> {
String finShipperEnterpriseNamedByUserId(@Param("userId") Long userId);
}
}
@@ -28,4 +28,4 @@ public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
List<UserShipperEntity> selectBySealId(@Param("userShipperEntity") UserShipperEntity userShipperEntity);
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
}
}
@@ -64,6 +64,11 @@ public class UserRepositoryImpl extends ServiceImpl<UserMapper,UserEntity> imple
return userMapper.selectByUserId(userId);
}
@Override
public UserPo selectByUserName(String userName) {
return userMapper.selectByUserName(userName);
}
@Override
public UserEntity selectById(Long userId) {
return userMapper.selectById(userId);
@@ -168,4 +173,4 @@ public class UserRepositoryImpl extends ServiceImpl<UserMapper,UserEntity> imple
public String finShipperEnterpriseNamedByUserId(Long userId) {
return userMapper.finShipperEnterpriseNamedByUserId(userId);
}
}
}
@@ -166,4 +166,4 @@ public class UserShipperRepositoryImpl extends ServiceImpl<UserShipperMapper, Us
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
return shipperMapper.getShipperSummaryData(userId);
}
}
}
@@ -125,6 +125,10 @@ public class UserDomainService {
return userRepositoryInterface.findByUserId(userId);
}
public UserPo selectByUserName(String userName) {
return userRepositoryInterface.selectByUserName(userName);
}
public void updateWhenLogin(UserDO userDO) {
userRepositoryInterface.update(new UpdateWrapper<UserEntity>().lambda()
.set(UserEntity::getLastLoginIp,userDO.getLastLoginIp()).set(UserEntity::getLastLoginTime,userDO.getLastLoginTime())
@@ -259,4 +263,4 @@ public class UserDomainService {
.set(UserEntity::getHasDefaultAddress, dto.getHasDefaultAddress())
.eq(UserEntity::getUserId, dto.getUserId()));
}
}
}
@@ -236,4 +236,4 @@ public class UserShipperDomainService {
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
return userShipperRepositoryInterface.getShipperSummaryData(userId);
}
}
}
@@ -201,6 +201,14 @@ public class UserAPI extends BaseController {
return AjaxResult.success(userPo);
}
@Log(title = "用户中台管理-查询", description ="根据用户ID查询用户详细信息",businessType = BusinessType.INQUIRE)
@ApiOperation("根据用户ID查询用户详细信息")
@GetMapping("/getInfoByName/{userName}")
public AjaxResult getInfoByName(@PathVariable("userName") String userName) {
UserPo userPo = userApplicationService.selectByUserName(userName);
return AjaxResult.success(userPo);
}
/**
* @Description 新增租户新增货主新增司机新增员工用户注册等
* @Author Alex
@@ -946,4 +954,4 @@ public class UserAPI extends BaseController {
public R<String> finShipperEnterpriseNamedByUserId(@PathVariable("userId") Long userId) {
return R.ok(userApplicationService.finShipperEnterpriseNamedByUserId(userId));
}
}
}