Merge remote-tracking branch 'origin/dev_wkx_20251209' into dev
This commit is contained in:
@@ -38,6 +38,10 @@ public class LoginUser implements Serializable
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String realname;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
|
||||
+1
@@ -2042,6 +2042,7 @@ public class UserApplicationService {
|
||||
VehiclePo vehiclePo = new VehiclePo();
|
||||
sysUser.setUserid(userPo.getUserId());
|
||||
sysUser.setUsername(userPo.getUserAccount());
|
||||
sysUser.setRealname(userPo.getUserName());
|
||||
UserDriverPo userDriverPo = userDriverDomainService.selectByUserId(userPo.getUserId());
|
||||
if (ObjectUtil.isNull(userDriverPo)) {
|
||||
userDriverPo = new UserDriverPo();
|
||||
|
||||
+36
@@ -2052,6 +2052,42 @@ public class UserDriverApplicationService {
|
||||
return mapList;
|
||||
}
|
||||
|
||||
public List<Map<String, String>> userPersonalDriverAuthList() {
|
||||
//获取当前登录人
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
|
||||
UserDriverDO userDriverDO = new UserDriverDO();
|
||||
//20240227 修改为查询用户关联的司机数据,包括车队长、承运企业
|
||||
List<UserDriverPo> userDriverPos = userDriverDomainService.userPersonalDriverAuthList(userDriverDO);
|
||||
|
||||
List<Map<String, String>> mapList = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(userDriverPos)) {
|
||||
for (UserDriverPo u : userDriverPos) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("userId", u.getUserId().toString());
|
||||
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(u.getUserName());
|
||||
|
||||
if (StrUtil.isNotEmpty(u.getUserPhone())) {
|
||||
str.append(", ").append(u.getUserPhone());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotEmpty(u.getDriverEnterpriseName())) {
|
||||
str.append("【").append(u.getDriverEnterpriseName()).append("】");
|
||||
}
|
||||
|
||||
map.put("label", String.valueOf(str));
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 车队认证-车队长查询
|
||||
*/
|
||||
|
||||
+2
@@ -1,5 +1,6 @@
|
||||
package com.mhd.user.domain.userAggregate.factory;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.user.domain.userAggregate.entity.UserEntity;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.user.domain.userAggregate.repository.todo.UserDO;
|
||||
@@ -20,6 +21,7 @@ public class UserFactory {
|
||||
public UserEntity getUserEntity(UserDO userDO) {
|
||||
UserEntity userEntity = new UserEntity();
|
||||
BeanUtils.copyProperties(userDO,userEntity, IgnoreNullUtil.getNullPropertyNames(userDO));
|
||||
userEntity.setDepartmentId(ObjectUtil.isNotEmpty(userDO.getDepartmentId())?Integer.valueOf(userDO.getDepartmentId()):null);
|
||||
return userEntity;
|
||||
}
|
||||
public CheckDO getCheckDo(UserDO userDO) {
|
||||
|
||||
+2
@@ -55,6 +55,8 @@ public interface UserDriverRepositoryInterface extends IService<UserDriverEntity
|
||||
|
||||
List<UserDriverPo> userDriverAuthList(UserDriverDO userDriverDO);
|
||||
|
||||
List<UserDriverPo> userPersonalDriverAuthList(UserDriverDO userDriverDO);
|
||||
|
||||
List<Map<String, Object>> motorcadeAuthCaptainList(Long organizationId);
|
||||
|
||||
List<UserDriverPo> getRegionDriverList(UserDriverDO userDriverDO);
|
||||
|
||||
+2
@@ -54,6 +54,8 @@ public interface UserDriverMapper extends BaseMapper<UserDriverEntity> {
|
||||
|
||||
List<UserDriverPo> userDriverAuthList(UserDriverDO userDriverDO);
|
||||
|
||||
List<UserDriverPo> userPersonalDriverAuthList(UserDriverDO userDriverDO);
|
||||
|
||||
List<Map<String, Object>> motorcadeAuthCaptainList(Long organizationId);
|
||||
|
||||
List<UserDriverPo> getRegionDriverList(@Param("userDriverDO") UserDriverDO userDriverDO);
|
||||
|
||||
+5
@@ -183,6 +183,11 @@ public class UserDriverRepositoryImpl extends ServiceImpl<UserDriverMapper,UserD
|
||||
return userDriverMapper.userDriverAuthList(userDriverDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDriverPo> userPersonalDriverAuthList(UserDriverDO userDriverDO) {
|
||||
return userDriverMapper.userPersonalDriverAuthList(userDriverDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> motorcadeAuthCaptainList(Long organizationId) {
|
||||
return userDriverMapper.motorcadeAuthCaptainList(organizationId);
|
||||
|
||||
+5
@@ -187,6 +187,11 @@ public class UserDriverDomainService {
|
||||
return userDriverRepositoryInterface.userDriverAuthList(userDriverDO);
|
||||
}
|
||||
|
||||
@DataPermissions(cacheName = "master")
|
||||
public List<UserDriverPo> userPersonalDriverAuthList(UserDriverDO userDriverDO) {
|
||||
return userDriverRepositoryInterface.userPersonalDriverAuthList(userDriverDO);
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> motorcadeAuthCaptainList(Long organizationId) {
|
||||
return userDriverRepositoryInterface.motorcadeAuthCaptainList(organizationId);
|
||||
}
|
||||
|
||||
@@ -246,6 +246,17 @@ public class UserDriverAPI extends BaseController {
|
||||
return AjaxResult.success(userDriverApplicationService.userDriverAuthList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆认证-承运人查询(个人司机)
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "承运人管理-查询", description ="车辆认证-承运人查询(个人司机)",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("车辆认证-承运人查询(个人司机)")
|
||||
@GetMapping("/userPersonalDriverAuthList")
|
||||
public AjaxResult userPersonalDriverAuthList() {
|
||||
return AjaxResult.success(userDriverApplicationService.userPersonalDriverAuthList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆导入-承运人查询
|
||||
* @return
|
||||
|
||||
@@ -58,4 +58,7 @@ public class QueryAllShipperInfoVo {
|
||||
|
||||
@ApiModelProperty("是否有默认地址")
|
||||
private Boolean hasDefaultAddress;
|
||||
|
||||
@ApiModelProperty("用户nc")
|
||||
private String documentPreparerNcCode;
|
||||
}
|
||||
|
||||
@@ -975,6 +975,37 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="userPersonalDriverAuthList" resultType="com.mhd.user.domain.userAggregate.repository.po.UserDriverPo">
|
||||
select ud.driver_id,
|
||||
u.user_id,
|
||||
u.user_name,
|
||||
u.user_phone,
|
||||
u.user_account,
|
||||
ude.user_driver_enterprise_id,
|
||||
ude.driver_enterprise_name
|
||||
from "USER" u
|
||||
left join user_driver ud on ud.user_id = u.user_id and u.del_flag = 1
|
||||
left join user_driver_enterprise ude
|
||||
on u.user_id = ude.user_id and ude.del_flag = 1
|
||||
where u.del_flag = 1 and u.role_code = 'driver'
|
||||
<if test="createBy != null"> and u.create_by = #{createBy}</if>
|
||||
<if test="createBy != null and organizationIdList == null">
|
||||
and u.create_by = #{createBy}</if>
|
||||
<if test="organizationIdList != null and createBy == null">
|
||||
AND u.organization_id in
|
||||
<foreach item="id" collection="organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="organizationIdList != null and createBy != null">
|
||||
AND (u.organization_id in
|
||||
<foreach item="id" collection="organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
OR u.create_by = #{createBy})
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="motorcadeAuthCaptainList" resultType="java.util.HashMap">
|
||||
select u.user_id userId,
|
||||
u.top_organization_id topOrganizationId,
|
||||
|
||||
@@ -708,7 +708,7 @@
|
||||
</select>
|
||||
|
||||
<select id="findAllShipperInfo" resultType="com.mhd.user.interfaces.vo.QueryAllShipperInfoVo">
|
||||
SELECT u.user_id, u.user_name, u.user_area_address, u.user_area_county_id, u.user_area_name ,u.user_phone,u.has_default_address,b.shipper_id,b.shipper_enterprise_name
|
||||
SELECT u.user_id, u.user_name, u.user_area_address, u.user_area_county_id, u.user_area_name ,u.user_phone,u.has_default_address,b.shipper_id,b.shipper_enterprise_name,u.DOCUMENT_PREPARER_NC_CODE
|
||||
FROM "USER" u
|
||||
LEFT JOIN user_shipper b ON u.user_id = b.user_id
|
||||
left join (select user_id, LISTAGG(r.role_name, '&') WITHIN GROUP(ORDER BY r.role_name) AS roleName
|
||||
|
||||
+4
@@ -35,4 +35,8 @@ public class ReceivingAccount extends BaseEntity implements Serializable {
|
||||
|
||||
/** 删除标记:1-正常,2-已删除 */
|
||||
private Integer delFlag;
|
||||
/**组织相关*/
|
||||
private String topOrganizationId;
|
||||
/**组织相关*/
|
||||
private String organizationId;
|
||||
}
|
||||
|
||||
+5
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -35,4 +36,8 @@ public class MaterialDO {
|
||||
private Boolean deleted;
|
||||
private BigDecimal materialVolume;
|
||||
private String materialContent;
|
||||
/**组织相关*/
|
||||
private String topOrganizationId;
|
||||
/**组织相关*/
|
||||
private String organizationId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
-- 添加SYS_ORG_CODE字段
|
||||
ALTER TABLE RECEIVING_ACCOUNT
|
||||
ADD ORGANIZATION_ID VARCHAR(128);
|
||||
-- 添加字段注释(备注)
|
||||
COMMENT ON COLUMN RECEIVING_ACCOUNT.ORGANIZATION_ID IS '所属部门';
|
||||
|
||||
-- 添加SYS_ORG_CODE字段
|
||||
ALTER TABLE RECEIVING_ACCOUNT
|
||||
ADD TOP_ORGANIZATION_ID VARCHAR(128);
|
||||
-- 添加字段注释(备注)
|
||||
COMMENT ON COLUMN RECEIVING_ACCOUNT.TOP_ORGANIZATION_ID IS '所属部门';
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
-- 添加SYS_ORG_CODE字段
|
||||
ALTER TABLE MATERIAL
|
||||
ADD ORGANIZATION_ID VARCHAR(128);
|
||||
-- 添加字段注释(备注)
|
||||
COMMENT ON COLUMN MATERIAL.ORGANIZATION_ID IS '所属部门';
|
||||
|
||||
-- 添加SYS_ORG_CODE字段
|
||||
ALTER TABLE MATERIAL
|
||||
ADD TOP_ORGANIZATION_ID VARCHAR(128);
|
||||
-- 添加字段注释(备注)
|
||||
COMMENT ON COLUMN MATERIAL.TOP_ORGANIZATION_ID IS '所属部门';
|
||||
Reference in New Issue
Block a user