Merge branch 'dev_20260429' into dev_WMS20260401
# Conflicts: # mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/todo/UserDO.java # mhd-user-center/src/main/java/com/mhd/user/interfaces/dto/addDTO/UserDTO.java
This commit is contained in:
@@ -18,7 +18,7 @@ import java.util.Set;
|
|||||||
/**
|
/**
|
||||||
* bms财务结算系统feign调用接口
|
* bms财务结算系统feign调用接口
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
public interface BmsServiceFeign {
|
public interface BmsServiceFeign {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017", configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE, configuration = FeignAutoConfiguration.class)
|
||||||
public interface OmsServiceFeign {
|
public interface OmsServiceFeign {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.5:8014",configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class)
|
||||||
public interface WlhyServiceFeign {
|
public interface WlhyServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.util.Map;
|
|||||||
* @description: TODO
|
* @description: TODO
|
||||||
* @date 2024/5/10 8:58
|
* @date 2024/5/10 8:58
|
||||||
**/
|
**/
|
||||||
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.102.192.3:8016", fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.102.192.32:8016", fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
public interface WmsServiceFeign {
|
public interface WmsServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.mhd.system.api;
|
||||||
|
|
||||||
|
import com.mhd.common.core.constant.ServiceNameConstants;
|
||||||
|
import com.mhd.common.core.domain.entity.R;
|
||||||
|
import com.mhd.common.core.domain.dto.YmsSysUserDTO;
|
||||||
|
import com.mhd.system.api.domain.YmsLoginUser;
|
||||||
|
import com.mhd.system.api.factory.RemoteBmsFeignFallbackFactory;
|
||||||
|
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
|
public interface YmsServiceFeign {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取YMS用户基本信息
|
||||||
|
* @param szwlUserId 数字物流用户ID
|
||||||
|
* @return YMS登录用户基本信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/system/user/inner/getYmsUserInfo/{szwlUserId}")
|
||||||
|
R<YmsLoginUser> getYmsUserInfo(@PathVariable("szwlUserId") Long szwlUserId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户详细信息
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 用户信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/system/user/inner/info/{userId}")
|
||||||
|
R<Long> innerGetInfo(@PathVariable("userId") Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户
|
||||||
|
* @param ymsSysUserDTO 用户信息
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/system/user/inner/add")
|
||||||
|
R<Object> innerAdd(@RequestBody YmsSysUserDTO ymsSysUserDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户
|
||||||
|
* @param ymsSysUserDTO 用户信息
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping("/system/user/inner/edit")
|
||||||
|
R<Object> innerEdit(@RequestBody YmsSysUserDTO ymsSysUserDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户
|
||||||
|
* @param userIds 用户ID数组
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/system/user/inner/remove/{userIds}")
|
||||||
|
R<Object> innerRemove(@PathVariable("userIds") Long[] userIds);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* YMS登录用户信息
|
||||||
|
* @author AI
|
||||||
|
* @date 2026/05/13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class YmsLoginUser {
|
||||||
|
|
||||||
|
//登录人id
|
||||||
|
private Long id;
|
||||||
|
//登录人账号
|
||||||
|
private String username;
|
||||||
|
//登录人名字
|
||||||
|
private String nickName;
|
||||||
|
//登录人密码
|
||||||
|
private String password;
|
||||||
|
//当前登录部门code
|
||||||
|
private String orgCode;
|
||||||
|
//头像
|
||||||
|
private String avatar;
|
||||||
|
//性别(0男 1女 2未知)
|
||||||
|
private String sex;
|
||||||
|
//电子邮件
|
||||||
|
private String email;
|
||||||
|
//电话
|
||||||
|
private String phonenumber;
|
||||||
|
//状态(0正常 1停用)
|
||||||
|
private String status;
|
||||||
|
//删除标志(0代表存在 2代表删除)
|
||||||
|
private String delFlag;
|
||||||
|
//最后登录IP
|
||||||
|
private String loginIp;
|
||||||
|
//最后登录时间
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date loginDate;
|
||||||
|
//创建时间
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
//数字物流用户ID
|
||||||
|
private Long szwlUserId;
|
||||||
|
//一级组织表ID
|
||||||
|
private Long topOrganizationId;
|
||||||
|
//组织表ID
|
||||||
|
private Long organizationId;
|
||||||
|
//角色code集合
|
||||||
|
private String roleCodes;
|
||||||
|
//角色名称集合
|
||||||
|
private String roleNames;
|
||||||
|
//推广码
|
||||||
|
private String promoCode;
|
||||||
|
//账号类型 1.普通账号,2.组织账号,3.一级账号,4.平台员工,5.企业员工,6.合作商
|
||||||
|
private Integer userAccountType;
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import com.mhd.system.api.domain.MallOAuthToken;
|
|||||||
import com.mhd.system.api.domain.mall.BaseUser;
|
import com.mhd.system.api.domain.mall.BaseUser;
|
||||||
import com.mhd.system.api.domain.SysUser;
|
import com.mhd.system.api.domain.SysUser;
|
||||||
import com.mhd.system.api.domain.WlhyLoginUser;
|
import com.mhd.system.api.domain.WlhyLoginUser;
|
||||||
|
import com.mhd.system.api.domain.YmsLoginUser;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -87,6 +88,11 @@ public class LoginUser implements Serializable
|
|||||||
*/
|
*/
|
||||||
private WlhyLoginUser wlhyLoginUser;
|
private WlhyLoginUser wlhyLoginUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* YMS用户信息
|
||||||
|
*/
|
||||||
|
private YmsLoginUser ymsLoginUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* websocket地址
|
* websocket地址
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import com.mhd.common.log.service.AsyncLogService;
|
|||||||
import com.mhd.common.redis.service.RedisService;
|
import com.mhd.common.redis.service.RedisService;
|
||||||
import com.mhd.system.api.*;
|
import com.mhd.system.api.*;
|
||||||
import com.mhd.system.api.domain.*;
|
import com.mhd.system.api.domain.*;
|
||||||
|
import com.mhd.system.api.domain.YmsLoginUser;
|
||||||
import com.mhd.system.api.domain.mall.SysTenant;
|
import com.mhd.system.api.domain.mall.SysTenant;
|
||||||
import com.mhd.system.api.domain.mall.UserInfo;
|
import com.mhd.system.api.domain.mall.UserInfo;
|
||||||
import com.mhd.system.api.domain.mall.UserInfoLoginDTO;
|
import com.mhd.system.api.domain.mall.UserInfoLoginDTO;
|
||||||
@@ -70,6 +71,8 @@ public class SysLoginService {
|
|||||||
private UserServiceFeign userServiceFeign;
|
private UserServiceFeign userServiceFeign;
|
||||||
@Resource
|
@Resource
|
||||||
private WlhyServiceFeign wlhyServiceFeign;
|
private WlhyServiceFeign wlhyServiceFeign;
|
||||||
|
@Resource
|
||||||
|
private YmsServiceFeign ymsServiceFeign;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
@@ -459,6 +462,17 @@ public class SysLoginService {
|
|||||||
userInfo.setWlhyLoginUser(wlhyLoginUserR.getData());
|
userInfo.setWlhyLoginUser(wlhyLoginUserR.getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 获取YMS登录用户基本信息
|
||||||
|
try {
|
||||||
|
R<YmsLoginUser> ymsLoginUserR = ymsServiceFeign.getYmsUserInfo(userInfo.getUserPo().getUserId());
|
||||||
|
if (ymsLoginUserR.getCode() == R.SUCCESS && ymsLoginUserR.getData() != null) {
|
||||||
|
userInfo.setYmsLoginUser(ymsLoginUserR.getData());
|
||||||
|
log.info("获取YMS用户信息成功,userId: {}", userInfo.getUserPo().getUserId());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 获取YMS用户信息失败时,记录日志但不影响登录
|
||||||
|
log.warn("获取YMS用户信息失败,但不影响登录: {}", e.getMessage());
|
||||||
|
}
|
||||||
if(mallFlag == 1){
|
if(mallFlag == 1){
|
||||||
/*单点登录,获取商城鉴权
|
/*单点登录,获取商城鉴权
|
||||||
* 根据用户角色判断需要鉴权的服务,
|
* 根据用户角色判断需要鉴权的服务,
|
||||||
|
|||||||
@@ -12,19 +12,19 @@ spring:
|
|||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.102.192.5:6848
|
# server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
# username: nacos
|
||||||
# password: manhuoda@2023
|
# password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
@@ -32,4 +32,4 @@ spring:
|
|||||||
file-extension: yml #默认properties
|
file-extension: yml #默认properties
|
||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
+3
@@ -63,6 +63,9 @@ public class ServiceNameConstants
|
|||||||
//OMS结算系统
|
//OMS结算系统
|
||||||
public static final String OMS_SERVICE = "mhd-oms-service";
|
public static final String OMS_SERVICE = "mhd-oms-service";
|
||||||
|
|
||||||
|
//YMS系统
|
||||||
|
public static final String YMS_SERVICE = "mhd-yms-service";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
package com.mhd.common.core.domain.dto;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: brb
|
||||||
|
* @description:
|
||||||
|
* @create: 2026-05-13 10:28
|
||||||
|
*/
|
||||||
|
public class YmsSysDeptDTO {
|
||||||
|
/** 部门ID */
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 父部门ID */
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/** 祖级列表 */
|
||||||
|
private String ancestors;
|
||||||
|
|
||||||
|
/** 部门名称 */
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/** 显示顺序 */
|
||||||
|
private Integer orderNum;
|
||||||
|
|
||||||
|
/** 负责人 */
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 邮箱 */
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/** 部门状态:0正常,1停用 */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/** 父部门名称 */
|
||||||
|
private String parentName;
|
||||||
|
|
||||||
|
/** 子部门 */
|
||||||
|
private List<YmsSysDeptDTO> children = new ArrayList<YmsSysDeptDTO>();
|
||||||
|
}
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
package com.mhd.common.core.domain.dto;
|
||||||
|
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import com.mhd.common.core.annotation.Excels;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: brb
|
||||||
|
* @description: YMS系统用户DTO
|
||||||
|
* @create: 2026-05-13 10:27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class YmsSysUserDTO {
|
||||||
|
/** 用户ID */
|
||||||
|
@Excel(name = "用户序号", prompt = "用户编号")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 部门ID */
|
||||||
|
@Excel(name = "部门编号")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 用户账号 */
|
||||||
|
@Excel(name = "登录名称")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/** 用户昵称 */
|
||||||
|
@Excel(name = "用户名称")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/** 用户邮箱 */
|
||||||
|
@Excel(name = "用户邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/** 手机号码 */
|
||||||
|
@Excel(name = "手机号码")
|
||||||
|
private String phonenumber;
|
||||||
|
|
||||||
|
/** 用户性别 */
|
||||||
|
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/** 用户头像 */
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/** 密码 */
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/** 帐号状态(0正常 1停用) */
|
||||||
|
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/** 最后登录IP */
|
||||||
|
@Excel(name = "最后登录IP")
|
||||||
|
private String loginIp;
|
||||||
|
|
||||||
|
/** 最后登录时间 */
|
||||||
|
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date loginDate;
|
||||||
|
|
||||||
|
/** 部门对象 */
|
||||||
|
@Excels({
|
||||||
|
@Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT),
|
||||||
|
@Excel(name = "部门负责人", targetAttr = "leader", type = Excel.Type.EXPORT)
|
||||||
|
})
|
||||||
|
private YmsSysDeptDTO dept;
|
||||||
|
|
||||||
|
/** 角色对象 */
|
||||||
|
private List<YmsSysDeptDTO> roles;
|
||||||
|
|
||||||
|
/** 角色组 */
|
||||||
|
private Long[] roleIds;
|
||||||
|
|
||||||
|
/** 岗位组 */
|
||||||
|
private Long[] postIds;
|
||||||
|
|
||||||
|
/** 角色ID */
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/** szwl用户ID */
|
||||||
|
private Long szwlUserId;
|
||||||
|
|
||||||
|
/** 一级组织表ID */
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
/** 组织表ID */
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
/** 角色code集合 */
|
||||||
|
private List<String> roleCodes;
|
||||||
|
|
||||||
|
/** 角色名称集合 */
|
||||||
|
private List<String> roleNames;
|
||||||
|
|
||||||
|
/** 推广码 */
|
||||||
|
private String promoCode;
|
||||||
|
|
||||||
|
/** 账号类型 1.普通账号,2.组织账号,3.一级账号,4.平台员工,5.企业员工,6.合作商 */
|
||||||
|
private Integer userAccountType;
|
||||||
|
}
|
||||||
+2
@@ -104,5 +104,7 @@ public class OrganizationPo extends BaseVOEntity implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty("是否绑定 1-是,2-否")
|
@ApiModelProperty("是否绑定 1-是,2-否")
|
||||||
private Integer isBand;
|
private Integer isBand;
|
||||||
|
@ApiModelProperty("是否排队:0-否,1-是")
|
||||||
|
private Integer isQueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ spring:
|
|||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.102.192.5:6848
|
# server-addr: 10.102.192.31:6848
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
@@ -27,12 +27,12 @@ spring:
|
|||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||||
file-extension: yml #默认properties
|
file-extension: yml #默认properties
|
||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
@@ -16,7 +16,7 @@ spring:
|
|||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
@@ -25,7 +25,7 @@ spring:
|
|||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
|
|||||||
+20
@@ -30,6 +30,7 @@ import com.mhd.system.api.FinanceServiceFeign;
|
|||||||
import com.mhd.system.api.OrganizationServiceFeign;
|
import com.mhd.system.api.OrganizationServiceFeign;
|
||||||
import com.mhd.system.api.TicketServiceFeign;
|
import com.mhd.system.api.TicketServiceFeign;
|
||||||
import com.mhd.system.api.TransportFeign;
|
import com.mhd.system.api.TransportFeign;
|
||||||
|
import com.mhd.system.api.YmsServiceFeign;
|
||||||
import com.mhd.system.api.domain.PlatformUserDTO;
|
import com.mhd.system.api.domain.PlatformUserDTO;
|
||||||
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
|
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
|
||||||
import com.mhd.system.api.domain.WlhyLoginUser;
|
import com.mhd.system.api.domain.WlhyLoginUser;
|
||||||
@@ -181,6 +182,8 @@ public class UserApplicationService {
|
|||||||
private TicketServiceFeign ticketServiceFeign;
|
private TicketServiceFeign ticketServiceFeign;
|
||||||
@Resource
|
@Resource
|
||||||
private UserWlhyDomainService wlhyDomainService;
|
private UserWlhyDomainService wlhyDomainService;
|
||||||
|
@Resource
|
||||||
|
private UserYmsDomainService ymsDomainService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UserShipperApplicationService userShipperApplicationService;
|
private UserShipperApplicationService userShipperApplicationService;
|
||||||
@@ -1381,6 +1384,7 @@ public class UserApplicationService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public UserPo addUserYG(UserDO userDO) {
|
public UserPo addUserYG(UserDO userDO) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
String password = userDO.getPlainPassword();
|
||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
@@ -1484,6 +1488,20 @@ public class UserApplicationService {
|
|||||||
// 如果业务要求必须同步成功,可以取消下面的注释,让异常抛出
|
// 如果业务要求必须同步成功,可以取消下面的注释,让异常抛出
|
||||||
// throw e;
|
// throw e;
|
||||||
}
|
}
|
||||||
|
//获取组织信息
|
||||||
|
Long organizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
|
Integer isQueue = userMapper.getOrdIsQueue(organizationId);
|
||||||
|
|
||||||
|
if (isQueue==1) {
|
||||||
|
//同步YMS员工信息
|
||||||
|
try {
|
||||||
|
userEntity.setUserPassword(password);
|
||||||
|
ymsDomainService.addOrEditYmsUser(userEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 同步YMS失败时,记录日志但不影响用户保存
|
||||||
|
log.warn("同步YMS员工信息失败,但不影响用户保存: {}", e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
return userPo;
|
return userPo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2096,6 +2114,8 @@ public class UserApplicationService {
|
|||||||
UserEntity userEntity = userDomainService.updateUser(userDO);
|
UserEntity userEntity = userDomainService.updateUser(userDO);
|
||||||
//同步网货平台员工信息
|
//同步网货平台员工信息
|
||||||
wlhyDomainService.addOrEditPlatformUser(userEntity);
|
wlhyDomainService.addOrEditPlatformUser(userEntity);
|
||||||
|
//同步yms员工信息
|
||||||
|
ymsDomainService.addOrEditYmsUser(userEntity);
|
||||||
BeanUtils.copyProperties(userPo, userEntity);
|
BeanUtils.copyProperties(userPo, userEntity);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+26
@@ -29,6 +29,7 @@ import com.mhd.common.core.utils.poi.WpsImg;
|
|||||||
import com.mhd.system.api.FinanceServiceFeign;
|
import com.mhd.system.api.FinanceServiceFeign;
|
||||||
import com.mhd.system.api.TransportFeign;
|
import com.mhd.system.api.TransportFeign;
|
||||||
import com.mhd.system.api.WlhyServiceFeign;
|
import com.mhd.system.api.WlhyServiceFeign;
|
||||||
|
import com.mhd.system.api.YmsServiceFeign;
|
||||||
import com.mhd.system.api.service.webSocket.AsyncWebSocketApplicationService;
|
import com.mhd.system.api.service.webSocket.AsyncWebSocketApplicationService;
|
||||||
import com.mhd.user.application.strategy.VehicleBindingStrategy;
|
import com.mhd.user.application.strategy.VehicleBindingStrategy;
|
||||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||||
@@ -119,6 +120,8 @@ public class UserDriverApplicationService {
|
|||||||
private AsyncJPushApplicationService asyncJPushApplicationService;
|
private AsyncJPushApplicationService asyncJPushApplicationService;
|
||||||
@Resource
|
@Resource
|
||||||
private SpecialLogisticsFeign specialLogisticsFeign;
|
private SpecialLogisticsFeign specialLogisticsFeign;
|
||||||
|
@Resource
|
||||||
|
private UserYmsDomainService ymsDomainService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UserDataPermissionApplicationService userDataPermissionApplicationService;
|
private UserDataPermissionApplicationService userDataPermissionApplicationService;
|
||||||
@@ -184,6 +187,7 @@ public class UserDriverApplicationService {
|
|||||||
private DriverVehicleBindMapper driverVehicleBindMapper;
|
private DriverVehicleBindMapper driverVehicleBindMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserMapper userMapper;
|
private UserMapper userMapper;
|
||||||
|
private YmsServiceFeign ymsServiceFeign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 承运人列表查询
|
* @Description 承运人列表查询
|
||||||
@@ -515,6 +519,28 @@ public class UserDriverApplicationService {
|
|||||||
|
|
||||||
// 同步信息到网络货运平台
|
// 同步信息到网络货运平台
|
||||||
wlhyDomainService.saveOrUpdateDriverInfo(userDriverDO);
|
wlhyDomainService.saveOrUpdateDriverInfo(userDriverDO);
|
||||||
|
Long organizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
|
Integer isQueue = userMapper.getOrdIsQueue(organizationId);
|
||||||
|
if (isQueue==1) {
|
||||||
|
// 同步YMS员工信息
|
||||||
|
try {
|
||||||
|
UserEntity userEntity = new UserEntity();
|
||||||
|
userEntity.setUserId(userDriverDO.getUserId());
|
||||||
|
userEntity.setUserAccount(userDriverDO.getUserAccount());
|
||||||
|
userEntity.setUserName(userDriverDO.getUserName());
|
||||||
|
userEntity.setUserPhone(userDriverDO.getUserPhone());
|
||||||
|
userEntity.setUserPassword("Aa123456");
|
||||||
|
userEntity.setOrganizationId(userDriverDO.getOrganizationId());
|
||||||
|
userEntity.setOrganizationName(userDriverDO.getOrganizationName());
|
||||||
|
userEntity.setTopOrganizationId(userDriverDO.getTopOrganizationId());
|
||||||
|
userEntity.setUserAuthStatus(userDriverDO.getUserAuthStatus());
|
||||||
|
userEntity.setBusinessType(userDriverDO.getBusinessType());
|
||||||
|
ymsDomainService.addOrEditYmsUser(userEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 同步YMS失败时,记录日志但不影响用户保存
|
||||||
|
log.warn("同步YMS员工信息失败,但不影响用户保存: {}", e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 自动审核或提交审核
|
// 自动审核或提交审核
|
||||||
if (ObjectUtil.equal(configSwitch.getAutomaticCheckUserInfo(), UserDriverConstants.AUTOMATIC_CHECK_ENABLED)) {
|
if (ObjectUtil.equal(configSwitch.getAutomaticCheckUserInfo(), UserDriverConstants.AUTOMATIC_CHECK_ENABLED)) {
|
||||||
|
|||||||
+5
@@ -1,6 +1,7 @@
|
|||||||
package com.mhd.user.domain.userAggregate.repository.mapper;
|
package com.mhd.user.domain.userAggregate.repository.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mhd.common.core.domain.dto.YmsSysUserDTO;
|
||||||
import com.mhd.user.domain.userAggregate.entity.UserEntity;
|
import com.mhd.user.domain.userAggregate.entity.UserEntity;
|
||||||
import com.mhd.user.domain.userAggregate.repository.po.UserDocumentWarningQueryPo;
|
import com.mhd.user.domain.userAggregate.repository.po.UserDocumentWarningQueryPo;
|
||||||
import com.mhd.user.domain.userAggregate.repository.po.UserDriverCaptainAuthPo;
|
import com.mhd.user.domain.userAggregate.repository.po.UserDriverCaptainAuthPo;
|
||||||
@@ -74,4 +75,8 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
|||||||
|
|
||||||
|
|
||||||
String finShipperEnterpriseNamedByUserId(@Param("userId") Long userId);
|
String finShipperEnterpriseNamedByUserId(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
YmsSysUserDTO selectYmsByUserId(Long userId);
|
||||||
|
|
||||||
|
Integer getOrdIsQueue(Long organizationId);
|
||||||
}
|
}
|
||||||
+7
-1
@@ -293,4 +293,10 @@ public class UserDO extends BaseVOEntity {
|
|||||||
|
|
||||||
@ApiModelProperty("配送顺序")
|
@ApiModelProperty("配送顺序")
|
||||||
private String deliveryOrder;
|
private String deliveryOrder;
|
||||||
}
|
|
||||||
|
@ApiModelProperty("yms密码")
|
||||||
|
private String plainPassword;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前用户的组织是否开启排队")
|
||||||
|
private Integer isQueue;
|
||||||
|
}
|
||||||
+3
@@ -289,4 +289,7 @@ public class UserDriverDO extends UserDO {
|
|||||||
@ApiModelProperty(name = "车辆主体")
|
@ApiModelProperty(name = "车辆主体")
|
||||||
private String vehicleBody;
|
private String vehicleBody;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前用户的组织是否开启排队")
|
||||||
|
private Integer isQueue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+117
@@ -0,0 +1,117 @@
|
|||||||
|
package com.mhd.user.domain.userAggregate.service;
|
||||||
|
|
||||||
|
import com.mhd.common.core.domain.dto.YmsSysUserDTO;
|
||||||
|
import com.mhd.common.core.domain.entity.R;
|
||||||
|
import com.mhd.common.core.exception.ServiceException;
|
||||||
|
import com.mhd.common.core.utils.StringUtils;
|
||||||
|
import com.mhd.system.api.YmsServiceFeign;
|
||||||
|
import com.mhd.user.domain.userAggregate.entity.UserEntity;
|
||||||
|
import com.mhd.user.domain.userAggregate.repository.mapper.UserMapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* YMS平台用户同步领域服务
|
||||||
|
* @author AI
|
||||||
|
* @date 2026/05/12
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class UserYmsDomainService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private YmsServiceFeign ymsServiceFeign;
|
||||||
|
@Autowired
|
||||||
|
private UserMapper userMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步YMS平台员工信息(新增或修改)
|
||||||
|
* @param userEntity 用户实体
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public boolean addOrEditYmsUser(UserEntity userEntity){
|
||||||
|
if(userEntity == null){
|
||||||
|
log.warn("同步YMS平台员工信息失败:用户实体为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// R<Long> isAddOrEdit = ymsServiceFeign.innerGetInfo(userEntity.getUserId());
|
||||||
|
YmsSysUserDTO userEntityByYms = userMapper.selectYmsByUserId(userEntity.getUserId());
|
||||||
|
// if (R.FAIL == isAddOrEdit.getCode()) {
|
||||||
|
// throw new ServiceException(isAddOrEdit.getMsg());
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (userEntityByYms == null) {
|
||||||
|
//新增
|
||||||
|
return addYmsUser(userEntity);
|
||||||
|
}else {
|
||||||
|
//修改
|
||||||
|
return editYmsUser(userEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增YMS平台员工基本信息
|
||||||
|
* @param userEntity 用户实体
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public boolean addYmsUser(UserEntity userEntity){
|
||||||
|
YmsSysUserDTO ymsSysUserDTO = new YmsSysUserDTO();
|
||||||
|
ymsSysUserDTO.setUserName(userEntity.getUserAccount());
|
||||||
|
ymsSysUserDTO.setOrganizationId(userEntity.getOrganizationId());
|
||||||
|
ymsSysUserDTO.setTopOrganizationId(userEntity.getTopOrganizationId());
|
||||||
|
ymsSysUserDTO.setSzwlUserId(userEntity.getUserId());
|
||||||
|
ymsSysUserDTO.setNickName(userEntity.getUserName());
|
||||||
|
ymsSysUserDTO.setPhonenumber(userEntity.getUserPhone());
|
||||||
|
ymsSysUserDTO.setAvatar(userEntity.getAvatar());
|
||||||
|
ymsSysUserDTO.setPromoCode(userEntity.getPromoCode());
|
||||||
|
ymsSysUserDTO.setUserAccountType(userEntity.getUserAccountType());
|
||||||
|
ymsSysUserDTO.setPassword(userEntity.getUserPassword());
|
||||||
|
ymsSysUserDTO.setDeptId(103L);
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(userEntity.getRoleCode())){
|
||||||
|
ymsSysUserDTO.setRoleCodes(Arrays.asList(userEntity.getRoleCode().split(",")));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(userEntity.getRoleName())){
|
||||||
|
ymsSysUserDTO.setRoleNames(Arrays.asList(userEntity.getRoleName().split(",")));
|
||||||
|
}
|
||||||
|
|
||||||
|
R<Object> result = ymsServiceFeign.innerAdd(ymsSysUserDTO);
|
||||||
|
if (R.FAIL == result.getCode()) {
|
||||||
|
throw new ServiceException(result.getMsg());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改YMS平台员工基本信息
|
||||||
|
* @param userEntity 用户实体
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public boolean editYmsUser(UserEntity userEntity){
|
||||||
|
YmsSysUserDTO ymsSysUserDTO = new YmsSysUserDTO();
|
||||||
|
ymsSysUserDTO.setUserName(userEntity.getUserAccount());
|
||||||
|
ymsSysUserDTO.setSzwlUserId(userEntity.getUserId());
|
||||||
|
ymsSysUserDTO.setNickName(userEntity.getUserName());
|
||||||
|
ymsSysUserDTO.setPhonenumber(userEntity.getUserPhone());
|
||||||
|
ymsSysUserDTO.setAvatar(userEntity.getAvatar());
|
||||||
|
ymsSysUserDTO.setUserAccountType(userEntity.getUserAccountType());
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(userEntity.getRoleCode())){
|
||||||
|
ymsSysUserDTO.setRoleCodes(Arrays.asList(userEntity.getRoleCode().split(",")));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(userEntity.getRoleName())){
|
||||||
|
ymsSysUserDTO.setRoleNames(Arrays.asList(userEntity.getRoleName().split(",")));
|
||||||
|
}
|
||||||
|
|
||||||
|
R<Object> result = ymsServiceFeign.innerEdit(ymsSysUserDTO);
|
||||||
|
if (R.FAIL == result.getCode()) {
|
||||||
|
throw new ServiceException(result.getMsg());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -259,4 +259,7 @@ public class UserDTO extends BaseVOEntity {
|
|||||||
|
|
||||||
@ApiModelProperty("配送顺序")
|
@ApiModelProperty("配送顺序")
|
||||||
private String deliveryOrder;
|
private String deliveryOrder;
|
||||||
}
|
|
||||||
|
@ApiModelProperty("yms密码")
|
||||||
|
private String plainPassword;
|
||||||
|
}
|
||||||
@@ -20,17 +20,17 @@ spring:
|
|||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||||
file-extension: yml #默认properties
|
file-extension: yml #默认properties
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|||||||
@@ -791,4 +791,11 @@
|
|||||||
AND u.business_type IN (1, 3)
|
AND u.business_type IN (1, 3)
|
||||||
AND u.user_Id = #{userId}
|
AND u.user_Id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectYmsByUserId" resultType="com.mhd.common.core.domain.dto.YmsSysUserDTO">
|
||||||
|
select * from NGWL_TEST_YMS.SYS_USER where SZWL_USER_ID = #{userId}
|
||||||
|
</select>
|
||||||
|
<select id="getOrdIsQueue" resultType="java.lang.Integer">
|
||||||
|
SELECT is_queue from NGWL_TEST_PRODUCT.SYS_ORGANIZATION where ORGANIZATION_ID = #{organizationId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -19,14 +19,14 @@ spring:
|
|||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ spring:
|
|||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
|
|||||||
+1
-1
@@ -386,7 +386,7 @@ public class BusinessDocumentOrderDomainService {
|
|||||||
businessDocumentOrderDO.setOrgName(String.valueOf(u.getUserPo().getOrganizationName()));
|
businessDocumentOrderDO.setOrgName(String.valueOf(u.getUserPo().getOrganizationName()));
|
||||||
}
|
}
|
||||||
businessDocumentOrderDO.setTopOrganizationId(u.getUserPo().getTopOrganizationId());
|
businessDocumentOrderDO.setTopOrganizationId(u.getUserPo().getTopOrganizationId());
|
||||||
BigDecimal deliveryFreight=tmsOrder.getDeliveryFreight();
|
BigDecimal deliveryFreight=businessDocumentOrderDO.getDeliveryFreight();
|
||||||
/**
|
/**
|
||||||
* 生成货源单信息
|
* 生成货源单信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
+14
-3
@@ -992,6 +992,9 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
BeanUtils.copyProperties(tmsOrderAddDTO, resevationOrder);
|
BeanUtils.copyProperties(tmsOrderAddDTO, resevationOrder);
|
||||||
String id = tmsOrderAddDTO.getId();
|
String id = tmsOrderAddDTO.getId();
|
||||||
resevationOrder.setId(Long.valueOf(id));
|
resevationOrder.setId(Long.valueOf(id));
|
||||||
|
if (tmsOrderAddDTO.getOrderType()==2){
|
||||||
|
resevationOrder.setOrderType(0);
|
||||||
|
}
|
||||||
|
|
||||||
// 设置更新时间戳和用户信息
|
// 设置更新时间戳和用户信息
|
||||||
resevationOrder.setUpdateTime(new Date());
|
resevationOrder.setUpdateTime(new Date());
|
||||||
@@ -1417,12 +1420,15 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
cargoDTO.setCargoName(reservationCargo.getCargoName());
|
cargoDTO.setCargoName(reservationCargo.getCargoName());
|
||||||
cargoDTO.setCargoNum(reservationCargo.getCargoNum() != null ? reservationCargo.getCargoNum() : BigDecimal.ZERO);
|
cargoDTO.setCargoNum(reservationCargo.getCargoNum() != null ? reservationCargo.getCargoNum() : BigDecimal.ZERO);
|
||||||
cargoDTO.setCargoWeight(reservationCargo.getCargoWeight() != null ? reservationCargo.getCargoWeight() : BigDecimal.ZERO);
|
cargoDTO.setCargoWeight(reservationCargo.getCargoWeight() != null ? reservationCargo.getCargoWeight() : BigDecimal.ZERO);
|
||||||
|
cargoDTO.setWeight(reservationCargo.getCargoWeight() != null ? reservationCargo.getCargoWeight() : BigDecimal.ZERO);
|
||||||
|
cargoDTO.setMaterialVolume(reservationCargo.getCargoVolume() != null ? reservationCargo.getCargoVolume() : BigDecimal.ZERO);
|
||||||
cargoDTO.setCargoUnitName(reservationCargo.getCargoUnitName());
|
cargoDTO.setCargoUnitName(reservationCargo.getCargoUnitName());
|
||||||
cargoDTO.setWeightUnit(reservationCargo.getCargoUnitName());
|
cargoDTO.setWeightUnit(reservationCargo.getCargoUnitName());
|
||||||
cargoDTO.setGoodsTypeId(reservationCargo.getGoodsTypeId());
|
cargoDTO.setGoodsTypeId(reservationCargo.getGoodsTypeId());
|
||||||
cargoDTO.setGoodsType(reservationCargo.getGoodsType());
|
cargoDTO.setGoodsType(reservationCargo.getGoodsType());
|
||||||
cargoDTO.setGoodsNameId(reservationCargo.getGoodsNameId());
|
cargoDTO.setGoodsNameId(reservationCargo.getGoodsNameId());
|
||||||
cargoDTO.setGoodsName(reservationCargo.getGoodsName());
|
cargoDTO.setGoodsName(reservationCargo.getGoodsName());
|
||||||
|
cargoDTO.setCargoName(reservationCargo.getGoodsName());
|
||||||
cargoDTO.setMaterialContent(reservationCargo.getCargoContent());
|
cargoDTO.setMaterialContent(reservationCargo.getCargoContent());
|
||||||
cargoDTO.setMachineCode(reservationCargo.getMachineCode());
|
cargoDTO.setMachineCode(reservationCargo.getMachineCode());
|
||||||
businessDocumentCargoMultiList.add(cargoDTO);
|
businessDocumentCargoMultiList.add(cargoDTO);
|
||||||
@@ -1522,8 +1528,8 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
tmsCargoInfo.setCreateTime(new Date());
|
tmsCargoInfo.setCreateTime(new Date());
|
||||||
tmsCargoInfo.setUpdateTime(new Date());
|
tmsCargoInfo.setUpdateTime(new Date());
|
||||||
tmsCargoInfo.setOrderId(id);
|
tmsCargoInfo.setOrderId(id);
|
||||||
tmsCargoInfo.setCargoWeight(tmsCargoInfoDTO.getWeight()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getWeight());
|
tmsCargoInfo.setCargoWeight(tmsCargoInfoDTO.getCargoWeight()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoWeight());
|
||||||
tmsCargoInfo.setCargoVolume(tmsCargoInfoDTO.getMaterialVolume()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getMaterialVolume());
|
tmsCargoInfo.setCargoVolume(tmsCargoInfoDTO.getCargoVolume()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoVolume());
|
||||||
tmsCargoInfo.setCargoContent(tmsCargoInfoDTO.getCargoContent());
|
tmsCargoInfo.setCargoContent(tmsCargoInfoDTO.getCargoContent());
|
||||||
tmsCargoInfo.setCargoNum(tmsCargoInfoDTO.getCargoNum()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoNum());
|
tmsCargoInfo.setCargoNum(tmsCargoInfoDTO.getCargoNum()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoNum());
|
||||||
tmsCargoInfo.setGoodsName(tmsCargoInfoDTO.getGoodsName());
|
tmsCargoInfo.setGoodsName(tmsCargoInfoDTO.getGoodsName());
|
||||||
@@ -1682,6 +1688,10 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Integer, Long> countByOrderType() {
|
public Map<Integer, Long> countByOrderType() {
|
||||||
|
//获取当前登录用户
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
Long userId = loginUser.getUserPo().getUserId();
|
||||||
|
|
||||||
// 使用MyBatis Plus的LambdaQueryWrapper进行分组统计
|
// 使用MyBatis Plus的LambdaQueryWrapper进行分组统计
|
||||||
Map<Integer, Long> countMap = new HashMap<>();
|
Map<Integer, Long> countMap = new HashMap<>();
|
||||||
|
|
||||||
@@ -1689,7 +1699,8 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
for (int i = 0; i <= 5; i++) {
|
for (int i = 0; i <= 5; i++) {
|
||||||
LambdaQueryWrapper<ReservationOrder> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ReservationOrder> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ReservationOrder::getIsDelete, 0)
|
queryWrapper.eq(ReservationOrder::getIsDelete, 0)
|
||||||
.eq(ReservationOrder::getOrderType, i);
|
.eq(ReservationOrder::getOrderType, i)
|
||||||
|
.eq(ReservationOrder::getRealCreateBy, userId);
|
||||||
long count = resevationOrderMapper.selectCount(queryWrapper);
|
long count = resevationOrderMapper.selectCount(queryWrapper);
|
||||||
countMap.put(i, count);
|
countMap.put(i, count);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ public class OmsCargoInfoDTO implements Serializable {
|
|||||||
@ApiModelProperty("体积")
|
@ApiModelProperty("体积")
|
||||||
private BigDecimal materialVolume;
|
private BigDecimal materialVolume;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物体积")
|
||||||
|
private BigDecimal cargoVolume;
|
||||||
|
|
||||||
@ApiModelProperty("内容")
|
@ApiModelProperty("内容")
|
||||||
private String cargoContent;
|
private String cargoContent;
|
||||||
|
|
||||||
|
|||||||
@@ -480,6 +480,9 @@ public class OmsOrderAddDTO implements Serializable {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private java.util.Date documentDate;
|
private java.util.Date documentDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "预约单类型")
|
||||||
|
private Integer orderType;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("费用科目明细")
|
@ApiModelProperty("费用科目明细")
|
||||||
private List<OmsOrderAccount> tmsOrderAccountList;
|
private List<OmsOrderAccount> tmsOrderAccountList;
|
||||||
|
|||||||
+6
-1
@@ -236,7 +236,12 @@ public class ResevationOrderApi extends BaseController{
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return Result.error("取消预约失败:" + e.getMessage());
|
String errorMsg = e.getMessage();
|
||||||
|
// 移除错误消息中的换行符及后面的无用信息
|
||||||
|
if (errorMsg != null && errorMsg.contains("\n[ErrorCode]:")) {
|
||||||
|
errorMsg = errorMsg.substring(0, errorMsg.indexOf("\n[ErrorCode]:"));
|
||||||
|
}
|
||||||
|
return Result.error("取消预约失败:" + errorMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,17 +18,17 @@ spring:
|
|||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.102.192.105:6848
|
# server-addr: 10.102.192.105:6848
|
||||||
# 锁定server端的配置文件(读取它的配置项)
|
# 锁定server端的配置文件(读取它的配置项)
|
||||||
|
|||||||
+2
@@ -114,6 +114,8 @@ public class Organization extends BaseVOEntity implements Serializable {
|
|||||||
private String contactPhone;
|
private String contactPhone;
|
||||||
@ApiModelProperty("nc编码")
|
@ApiModelProperty("nc编码")
|
||||||
private String ncCode;
|
private String ncCode;
|
||||||
|
@ApiModelProperty("是否排队:0-否,1-是")
|
||||||
|
private Integer isQueue;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
@@ -129,4 +129,6 @@ public class OrganizationPo extends BaseVOEntity implements Serializable {
|
|||||||
private String contactPhone;
|
private String contactPhone;
|
||||||
@ApiModelProperty("nc编码")
|
@ApiModelProperty("nc编码")
|
||||||
private String ncCode;
|
private String ncCode;
|
||||||
|
@ApiModelProperty("是否排队:0-否,1-是")
|
||||||
|
private Integer isQueue;
|
||||||
}
|
}
|
||||||
+2
@@ -64,4 +64,6 @@ public class OrganizationCorrelationDO extends BaseVOEntity{
|
|||||||
private String contact;
|
private String contact;
|
||||||
@ApiModelProperty("联系人电话")
|
@ApiModelProperty("联系人电话")
|
||||||
private String contactPhone;
|
private String contactPhone;
|
||||||
|
@ApiModelProperty("是否排队:0-否,1-是")
|
||||||
|
private Integer isQueue;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -123,6 +123,8 @@ public class OrganizationDto extends BaseVOEntity implements Serializable {
|
|||||||
private String contactPhone;
|
private String contactPhone;
|
||||||
@ApiModelProperty("nc编码")
|
@ApiModelProperty("nc编码")
|
||||||
private String ncCode;
|
private String ncCode;
|
||||||
|
@ApiModelProperty("是否排队:0-否,1-是")
|
||||||
|
private Integer isQueue;
|
||||||
|
|
||||||
@ApiModelProperty(name = "唯一key集合(操作菜单使用)")
|
@ApiModelProperty(name = "唯一key集合(操作菜单使用)")
|
||||||
private List<String> idKeyList;
|
private List<String> idKeyList;
|
||||||
|
|||||||
@@ -19,20 +19,20 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||||
|
|||||||
@@ -102,7 +102,8 @@
|
|||||||
o1.company_name_en,
|
o1.company_name_en,
|
||||||
o1.contact,
|
o1.contact,
|
||||||
o1.nc_code,
|
o1.nc_code,
|
||||||
o1.contact_phone
|
o1.contact_phone,
|
||||||
|
o1.is_queue
|
||||||
FROM
|
FROM
|
||||||
sys_organization o1
|
sys_organization o1
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ spring:
|
|||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
#server-addr: 10.33.0.129:6010
|
#server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
#server-addr: 10.33.0.129:6010
|
#server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
|
|||||||
@@ -18,26 +18,26 @@ spring:
|
|||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置使用ip+端口号
|
# 线上测试环境配置使用ip+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.102.192.5:6848
|
# server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
# username: nacos
|
||||||
# password: manhuoda@2023
|
# password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.102.192.105:6848
|
# server-addr: 10.102.192.105:6848
|
||||||
config:
|
config:
|
||||||
server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置使用ip+端口号
|
# 线上测试环境配置使用ip+端口号
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.102.192.5:6848
|
# server-addr: 10.102.192.31:6848
|
||||||
# username: nacos
|
# username: nacos
|
||||||
# password: manhuoda@2023
|
# password: manhuoda@2023
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ spring:
|
|||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
@@ -25,7 +25,7 @@ spring:
|
|||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
|
|||||||
Reference in New Issue
Block a user