组织排队开关,新增用户司机同步yms,oms预约单修改
This commit is contained in:
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017", configuration = FeignAutoConfiguration.class)
|
||||
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE, configuration = FeignAutoConfiguration.class)
|
||||
public interface OmsServiceFeign {
|
||||
|
||||
|
||||
|
||||
@@ -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.SysUser;
|
||||
import com.mhd.system.api.domain.WlhyLoginUser;
|
||||
import com.mhd.system.api.domain.YmsLoginUser;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -87,6 +88,11 @@ public class LoginUser implements Serializable
|
||||
*/
|
||||
private WlhyLoginUser wlhyLoginUser;
|
||||
|
||||
/**
|
||||
* YMS用户信息
|
||||
*/
|
||||
private YmsLoginUser ymsLoginUser;
|
||||
|
||||
/**
|
||||
* websocket地址
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.mhd.common.log.service.AsyncLogService;
|
||||
import com.mhd.common.redis.service.RedisService;
|
||||
import com.mhd.system.api.*;
|
||||
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.UserInfo;
|
||||
import com.mhd.system.api.domain.mall.UserInfoLoginDTO;
|
||||
@@ -70,6 +71,8 @@ public class SysLoginService {
|
||||
private UserServiceFeign userServiceFeign;
|
||||
@Resource
|
||||
private WlhyServiceFeign wlhyServiceFeign;
|
||||
@Resource
|
||||
private YmsServiceFeign ymsServiceFeign;
|
||||
|
||||
@Resource
|
||||
private RedisService redisService;
|
||||
@@ -459,6 +462,17 @@ public class SysLoginService {
|
||||
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){
|
||||
/*单点登录,获取商城鉴权
|
||||
* 根据用户角色判断需要鉴权的服务,
|
||||
|
||||
+3
@@ -63,6 +63,9 @@ public class ServiceNameConstants
|
||||
//OMS结算系统
|
||||
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-否")
|
||||
private Integer isBand;
|
||||
@ApiModelProperty("是否排队:0-否,1-是")
|
||||
private Integer isQueue;
|
||||
}
|
||||
|
||||
|
||||
+20
@@ -30,6 +30,7 @@ import com.mhd.system.api.FinanceServiceFeign;
|
||||
import com.mhd.system.api.OrganizationServiceFeign;
|
||||
import com.mhd.system.api.TicketServiceFeign;
|
||||
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.cache.AssociationWarehouseCacheDO;
|
||||
import com.mhd.system.api.domain.WlhyLoginUser;
|
||||
@@ -181,6 +182,8 @@ public class UserApplicationService {
|
||||
private TicketServiceFeign ticketServiceFeign;
|
||||
@Resource
|
||||
private UserWlhyDomainService wlhyDomainService;
|
||||
@Resource
|
||||
private UserYmsDomainService ymsDomainService;
|
||||
|
||||
@Resource
|
||||
private UserShipperApplicationService userShipperApplicationService;
|
||||
@@ -1381,6 +1384,7 @@ public class UserApplicationService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public UserPo addUserYG(UserDO userDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
String password = userDO.getPlainPassword();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
@@ -1484,6 +1488,20 @@ public class UserApplicationService {
|
||||
// 如果业务要求必须同步成功,可以取消下面的注释,让异常抛出
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
@@ -2096,6 +2114,8 @@ public class UserApplicationService {
|
||||
UserEntity userEntity = userDomainService.updateUser(userDO);
|
||||
//同步网货平台员工信息
|
||||
wlhyDomainService.addOrEditPlatformUser(userEntity);
|
||||
//同步yms员工信息
|
||||
ymsDomainService.addOrEditYmsUser(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.TransportFeign;
|
||||
import com.mhd.system.api.WlhyServiceFeign;
|
||||
import com.mhd.system.api.YmsServiceFeign;
|
||||
import com.mhd.system.api.service.webSocket.AsyncWebSocketApplicationService;
|
||||
import com.mhd.user.application.strategy.VehicleBindingStrategy;
|
||||
import com.mhd.user.domain.motorcade.entity.Motorcade;
|
||||
@@ -119,6 +120,8 @@ public class UserDriverApplicationService {
|
||||
private AsyncJPushApplicationService asyncJPushApplicationService;
|
||||
@Resource
|
||||
private SpecialLogisticsFeign specialLogisticsFeign;
|
||||
@Resource
|
||||
private UserYmsDomainService ymsDomainService;
|
||||
|
||||
@Resource
|
||||
private UserDataPermissionApplicationService userDataPermissionApplicationService;
|
||||
@@ -184,6 +187,7 @@ public class UserDriverApplicationService {
|
||||
private DriverVehicleBindMapper driverVehicleBindMapper;
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
private YmsServiceFeign ymsServiceFeign;
|
||||
|
||||
/**
|
||||
* @Description 承运人列表查询
|
||||
@@ -515,6 +519,28 @@ public class UserDriverApplicationService {
|
||||
|
||||
// 同步信息到网络货运平台
|
||||
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)) {
|
||||
|
||||
+5
@@ -1,6 +1,7 @@
|
||||
package com.mhd.user.domain.userAggregate.repository.mapper;
|
||||
|
||||
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.repository.po.UserDocumentWarningQueryPo;
|
||||
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);
|
||||
|
||||
YmsSysUserDTO selectYmsByUserId(Long userId);
|
||||
|
||||
Integer getOrdIsQueue(Long organizationId);
|
||||
}
|
||||
+6
@@ -281,4 +281,10 @@ public class UserDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
|
||||
@ApiModelProperty("yms密码")
|
||||
private String plainPassword;
|
||||
|
||||
@ApiModelProperty("当前用户的组织是否开启排队")
|
||||
private Integer isQueue;
|
||||
}
|
||||
|
||||
+3
@@ -289,4 +289,7 @@ public class UserDriverDO extends UserDO {
|
||||
@ApiModelProperty(name = "车辆主体")
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -247,4 +247,7 @@ public class UserDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyContactPhone;
|
||||
|
||||
@ApiModelProperty("yms密码")
|
||||
private String plainPassword;
|
||||
}
|
||||
|
||||
@@ -774,4 +774,11 @@
|
||||
AND u.business_type IN (1, 3)
|
||||
AND u.user_Id = #{userId}
|
||||
</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>
|
||||
+1
-1
@@ -386,7 +386,7 @@ public class BusinessDocumentOrderDomainService {
|
||||
businessDocumentOrderDO.setOrgName(String.valueOf(u.getUserPo().getOrganizationName()));
|
||||
}
|
||||
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);
|
||||
String id = tmsOrderAddDTO.getId();
|
||||
resevationOrder.setId(Long.valueOf(id));
|
||||
if (tmsOrderAddDTO.getOrderType()==2){
|
||||
resevationOrder.setOrderType(0);
|
||||
}
|
||||
|
||||
// 设置更新时间戳和用户信息
|
||||
resevationOrder.setUpdateTime(new Date());
|
||||
@@ -1417,12 +1420,15 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
||||
cargoDTO.setCargoName(reservationCargo.getCargoName());
|
||||
cargoDTO.setCargoNum(reservationCargo.getCargoNum() != null ? reservationCargo.getCargoNum() : 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.setWeightUnit(reservationCargo.getCargoUnitName());
|
||||
cargoDTO.setGoodsTypeId(reservationCargo.getGoodsTypeId());
|
||||
cargoDTO.setGoodsType(reservationCargo.getGoodsType());
|
||||
cargoDTO.setGoodsNameId(reservationCargo.getGoodsNameId());
|
||||
cargoDTO.setGoodsName(reservationCargo.getGoodsName());
|
||||
cargoDTO.setCargoName(reservationCargo.getGoodsName());
|
||||
cargoDTO.setMaterialContent(reservationCargo.getCargoContent());
|
||||
cargoDTO.setMachineCode(reservationCargo.getMachineCode());
|
||||
businessDocumentCargoMultiList.add(cargoDTO);
|
||||
@@ -1522,8 +1528,8 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
||||
tmsCargoInfo.setCreateTime(new Date());
|
||||
tmsCargoInfo.setUpdateTime(new Date());
|
||||
tmsCargoInfo.setOrderId(id);
|
||||
tmsCargoInfo.setCargoWeight(tmsCargoInfoDTO.getWeight()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getWeight());
|
||||
tmsCargoInfo.setCargoVolume(tmsCargoInfoDTO.getMaterialVolume()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getMaterialVolume());
|
||||
tmsCargoInfo.setCargoWeight(tmsCargoInfoDTO.getCargoWeight()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoWeight());
|
||||
tmsCargoInfo.setCargoVolume(tmsCargoInfoDTO.getCargoVolume()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoVolume());
|
||||
tmsCargoInfo.setCargoContent(tmsCargoInfoDTO.getCargoContent());
|
||||
tmsCargoInfo.setCargoNum(tmsCargoInfoDTO.getCargoNum()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoNum());
|
||||
tmsCargoInfo.setGoodsName(tmsCargoInfoDTO.getGoodsName());
|
||||
@@ -1682,6 +1688,10 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
||||
|
||||
@Override
|
||||
public Map<Integer, Long> countByOrderType() {
|
||||
//获取当前登录用户
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long userId = loginUser.getUserPo().getUserId();
|
||||
|
||||
// 使用MyBatis Plus的LambdaQueryWrapper进行分组统计
|
||||
Map<Integer, Long> countMap = new HashMap<>();
|
||||
|
||||
@@ -1689,7 +1699,8 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
LambdaQueryWrapper<ReservationOrder> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ReservationOrder::getIsDelete, 0)
|
||||
.eq(ReservationOrder::getOrderType, i);
|
||||
.eq(ReservationOrder::getOrderType, i)
|
||||
.eq(ReservationOrder::getRealCreateBy, userId);
|
||||
long count = resevationOrderMapper.selectCount(queryWrapper);
|
||||
countMap.put(i, count);
|
||||
}
|
||||
|
||||
@@ -62,6 +62,9 @@ public class OmsCargoInfoDTO implements Serializable {
|
||||
@ApiModelProperty("体积")
|
||||
private BigDecimal materialVolume;
|
||||
|
||||
@ApiModelProperty("货物体积")
|
||||
private BigDecimal cargoVolume;
|
||||
|
||||
@ApiModelProperty("内容")
|
||||
private String cargoContent;
|
||||
|
||||
|
||||
@@ -480,6 +480,9 @@ public class OmsOrderAddDTO implements Serializable {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date documentDate;
|
||||
|
||||
@ApiModelProperty(value = "预约单类型")
|
||||
private Integer orderType;
|
||||
|
||||
|
||||
@ApiModelProperty("费用科目明细")
|
||||
private List<OmsOrderAccount> tmsOrderAccountList;
|
||||
|
||||
+6
-1
@@ -236,7 +236,12 @@ public class ResevationOrderApi extends BaseController{
|
||||
|
||||
} catch (Exception e) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -114,6 +114,8 @@ public class Organization extends BaseVOEntity implements Serializable {
|
||||
private String contactPhone;
|
||||
@ApiModelProperty("nc编码")
|
||||
private String ncCode;
|
||||
@ApiModelProperty("是否排队:0-否,1-是")
|
||||
private Integer isQueue;
|
||||
|
||||
|
||||
}
|
||||
+2
@@ -129,4 +129,6 @@ public class OrganizationPo extends BaseVOEntity implements Serializable {
|
||||
private String contactPhone;
|
||||
@ApiModelProperty("nc编码")
|
||||
private String ncCode;
|
||||
@ApiModelProperty("是否排队:0-否,1-是")
|
||||
private Integer isQueue;
|
||||
}
|
||||
+2
@@ -64,4 +64,6 @@ public class OrganizationCorrelationDO extends BaseVOEntity{
|
||||
private String contact;
|
||||
@ApiModelProperty("联系人电话")
|
||||
private String contactPhone;
|
||||
@ApiModelProperty("是否排队:0-否,1-是")
|
||||
private Integer isQueue;
|
||||
}
|
||||
|
||||
+2
@@ -123,6 +123,8 @@ public class OrganizationDto extends BaseVOEntity implements Serializable {
|
||||
private String contactPhone;
|
||||
@ApiModelProperty("nc编码")
|
||||
private String ncCode;
|
||||
@ApiModelProperty("是否排队:0-否,1-是")
|
||||
private Integer isQueue;
|
||||
|
||||
@ApiModelProperty(name = "唯一key集合(操作菜单使用)")
|
||||
private List<String> idKeyList;
|
||||
|
||||
@@ -102,7 +102,8 @@
|
||||
o1.company_name_en,
|
||||
o1.contact,
|
||||
o1.nc_code,
|
||||
o1.contact_phone
|
||||
o1.contact_phone,
|
||||
o1.is_queue
|
||||
FROM
|
||||
sys_organization o1
|
||||
LEFT JOIN
|
||||
|
||||
Reference in New Issue
Block a user