Commit 2de98da0 authored by lanbaoming's avatar lanbaoming

2024-06-03

parent ace9f0a4
......@@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.apilog.core.filter.ApiAccessLogFilter;
import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService;
import cn.iocoder.yudao.framework.web.config.WebProperties;
import cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration;
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.WebFilterOrderEnum;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
......
......@@ -2,7 +2,7 @@ package cn.iocoder.yudao.framework.common.util.collection;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.core.KeyValue;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
......
package cn.iocoder.yudao.framework.common.util.io;
import lombok.Data;
/*
lanbm 2024-05-31 add
上传文件数据结构
*/
@Data
public class FileModel {
private String name;
private String url;
//"https://jiedao-test1.oss-cn-shenzhen.aliyuncs.com/2024/05/31/6659327255617974679661ea.jpg",
private String uid;
//: 1717121654191,
private String status;
//success"
}
......@@ -22,7 +22,9 @@ public class IoUtils {
* @return 内容
* @throws IORuntimeException IO 异常
*/
public static String readUtf8(InputStream in, boolean isClose) throws IORuntimeException {
public static String readUtf8(InputStream in, boolean isClose)
throws IORuntimeException {
return StrUtil.utf8Str(IoUtil.read(in, isClose));
}
......
package cn.iocoder.yudao.framework.common.core;
package cn.iocoder.yudao.framework.common.util.json.core;
import lombok.AllArgsConstructor;
import lombok.Data;
......
package cn.iocoder.yudao.framework.common.enums;
package cn.iocoder.yudao.framework.common.util.spring.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.framework.common.enums;
package cn.iocoder.yudao.framework.common.util.spring.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.framework.common.enums;
package cn.iocoder.yudao.framework.common.util.spring.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.framework.common.enums;
package cn.iocoder.yudao.framework.common.util.spring.enums;
/**
* Web 过滤器顺序的枚举类,保证过滤器按照符合我们的预期
......
package cn.iocoder.yudao.framework.common.validation;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import javax.validation.Constraint;
import javax.validation.Payload;
......
package cn.iocoder.yudao.framework.common.validation;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
......
package cn.iocoder.yudao.framework.dict.core.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import lombok.Data;
/**
......
package cn.iocoder.yudao.framework.file.core.client;
import cn.iocoder.yudao.framework.file.core.enums.FileStorageEnum;
public interface FileClientFactory {
/**
......@@ -14,7 +16,7 @@ public interface FileClientFactory {
* 创建文件客户端
*
* @param configId 配置编号
* @param storage 存储器的枚举 {@link cn.iocoder.yudao.framework.file.core.enums.FileStorageEnum}
* @param storage 存储器的枚举 {@link FileStorageEnum}
* @param config 文件配置
*/
<Config extends FileClientConfig> void createOrUpdateFileClient(Long configId, Integer storage, Config config);
......
......@@ -8,8 +8,6 @@ import io.minio.*;
import java.io.ByteArrayInputStream;
import static cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig.ENDPOINT_ALIYUN;
/**
* 基于 S3 协议的文件客户端,实现 MinIO、阿里云、腾讯云、七牛云、华为云等云服务
*
......@@ -73,7 +71,7 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
*/
private String buildRegion() {
// 阿里云必须有 region,否则会报错
if (config.getEndpoint().contains(ENDPOINT_ALIYUN)) {
if (config.getEndpoint().contains(S3FileClientConfig.ENDPOINT_ALIYUN)) {
return StrUtil.subBefore(config.getEndpoint(), '.', false)
.replaceAll("-internal", ""); // 去除内网 Endpoint 的后缀
}
......
......@@ -2,17 +2,17 @@ package cn.iocoder.yudao.framework.file.core.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.file.core.client.FileClient;
import cn.iocoder.yudao.framework.file.core.client.FileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.db.DBFileClient;
import cn.iocoder.yudao.framework.file.core.client.db.DBFileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.ftp.FtpFileClient;
import cn.iocoder.yudao.framework.file.core.client.ftp.FtpFileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.local.LocalFileClient;
import cn.iocoder.yudao.framework.file.core.client.local.LocalFileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClient;
import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.sftp.SftpFileClient;
import cn.iocoder.yudao.framework.file.core.client.sftp.SftpFileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.FileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.db.DBFileClient;
import cn.iocoder.yudao.framework.file.core.client.db.DBFileClientConfig;
import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClient;
import cn.iocoder.yudao.framework.file.core.client.s3.S3FileClientConfig;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
......@@ -94,7 +94,7 @@ public class I18nMessage {
/**
* 获取一条语言配置信息(后台管理)
*
* 判断当前系统使用的语言 lanbm 2024-05-28 添加注释
* @return
* @throws IOException
*/
......
......@@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.mq.config;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.system.SystemUtil;
import cn.iocoder.yudao.framework.common.enums.DocumentEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.DocumentEnum;
import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate;
import cn.iocoder.yudao.framework.mq.core.interceptor.RedisMessageInterceptor;
import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener;
......
......@@ -4,7 +4,7 @@ import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.servlet.ServletUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils;
......
package cn.iocoder.yudao.framework.security.core;
import cn.hutool.core.map.MapUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.*;
......
package cn.iocoder.yudao.framework.security.core.authentication;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.service.SecurityAuthFrameworkService;
import cn.iocoder.yudao.framework.web.config.WebProperties;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
......@@ -30,7 +28,7 @@ import java.util.Map;
* 实际上,它就是 {@link SecurityAuthFrameworkService} 定义的三个接口。
* 因为需要支持多种类型,所以需要根据请求的 URL,判断出对应的用户类型,从而使用对应的 SecurityAuthFrameworkService 是吸纳
*
* @see cn.iocoder.yudao.framework.common.enums.UserTypeEnum
* @see UserTypeEnum
* @author 捷道源码
*/
public class MultiUserDetailsAuthenticationProvider extends AbstractUserDetailsAuthenticationProvider {
......
package cn.iocoder.yudao.framework.security.core.authentication;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import lombok.Getter;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
......
package cn.iocoder.yudao.framework.security.core.service;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import org.springframework.security.core.userdetails.UserDetailsService;
......
package cn.iocoder.yudao.framework.sms.core.client;
import cn.iocoder.yudao.framework.common.core.KeyValue;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsReceiveRespDTO;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsTemplateRespDTO;
......
package cn.iocoder.yudao.framework.sms.core.client.impl;
import cn.iocoder.yudao.framework.common.core.KeyValue;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.sms.core.client.SmsClient;
import cn.iocoder.yudao.framework.sms.core.client.SmsCodeMapping;
import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult;
......
......@@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.sms.core.client.impl.aliyun;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.core.KeyValue;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsReceiveRespDTO;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO;
......
......@@ -7,7 +7,7 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.crypto.digest.HmacAlgorithm;
import cn.hutool.http.HttpUtil;
import cn.iocoder.yudao.framework.common.core.KeyValue;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsReceiveRespDTO;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO;
......
......@@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
import cn.iocoder.yudao.framework.common.core.KeyValue;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsReceiveRespDTO;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO;
......
package cn.iocoder.yudao.framework.tenant.config;
import cn.hutool.core.annotation.AnnotationUtil;
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.WebFilterOrderEnum;
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnoreAspect;
......
......@@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.web.config;
import cn.hutool.core.util.CharsetUtil;
import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService;
import cn.iocoder.yudao.framework.common.constant.Constant;
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.WebFilterOrderEnum;
import cn.iocoder.yudao.framework.i18n.core.LocaleInterceptor;
import cn.iocoder.yudao.framework.web.core.filter.CacheRequestBodyFilter;
import cn.iocoder.yudao.framework.web.core.filter.DemoFilter;
......
package cn.iocoder.yudao.framework.flowable.config;
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.WebFilterOrderEnum;
import cn.iocoder.yudao.framework.flowable.core.web.FlowableWebFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
......
......@@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserG
import cn.iocoder.yudao.module.bpm.convert.definition.BpmUserGroupConvert;
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import io.swagger.annotations.Api;
......
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler;
import com.baomidou.mybatisplus.annotation.TableField;
......
......@@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserG
import cn.iocoder.yudao.module.bpm.convert.definition.BpmUserGroupConvert;
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmUserGroupMapper;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
......
......@@ -9,7 +9,10 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/*
入仓修改审批
lanbm 2024-05-31 添加注释
*/
@Component
@Slf4j
public class BpmOrderWarehousingModificationResultListener extends BpmProcessInstanceResultEventListener {
......@@ -24,7 +27,9 @@ public class BpmOrderWarehousingModificationResultListener extends BpmProcessIns
@Override
protected void onEvent(BpmProcessInstanceResultEvent event) {
log.info("-------------------入仓修改回调-------------------------{},{}", event.getBusinessKey(), event.getResult());
//lanbm 2024-05-31 处理异常
log.info("-------------------入仓修改回调-------------------------{},{}",
event.getBusinessKey(), event.getResult());
orderWarehouseInService.updateApplyCallback(event.getBusinessKey(), event.getResult());
}
......
......@@ -3,25 +3,10 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript;
import cn.iocoder.yudao.module.bpm.service.definition.BpmTaskAssignRuleService;
import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService;
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import com.google.common.annotations.VisibleForTesting;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.UserTask;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.impl.el.ExpressionManager;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.impl.bpmn.behavior.UserTaskActivityBehavior;
......@@ -34,10 +19,6 @@ import java.util.*;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString;
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.TASK_ASSIGN_SCRIPT_NOT_EXISTS;
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.TASK_CREATE_FAIL_NO_CANDIDATE_USER;
/**
* 自定义的流程任务的 assignee 负责人的分配
......
......@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.service.definition;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
......
......@@ -112,7 +112,8 @@ import static cn.iocoder.yudao.module.ecw.enums.ErrorCodeConstants.*;
@Log4j2
@Service
@Validated
public class CustomerServiceImpl extends AbstractService<CustomerMapper, CustomerDO> implements CustomerService {
public class CustomerServiceImpl extends AbstractService<CustomerMapper,
CustomerDO> implements CustomerService {
@Resource
private CustomerMapper customerMapper;
......@@ -173,10 +174,19 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
public static final String logFormat = "[%d]联系人:%s 区号:%s 电话:%s 默认:(%s)";
/*
lanbm 2024-05-28 添加注释,发货人带来的收货人,
改为进入待分配列表
*/
@Override
@Transactional(rollbackFor = Exception.class)
public CustomerContactsDO createConsigeeCustomer(String name, String areaCode, String phone, String company,
String email, CustomerDO consignorCustomerDO, String orderNo) {
public CustomerContactsDO createConsigeeCustomer(String name,
String areaCode,
String phone,
String company,
String email,
CustomerDO consignorCustomerDO,
String orderNo) {
Long customerService = null;
if (consignorCustomerDO != null) {
......@@ -196,9 +206,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
// 订单发货人是否人跟进客户经理,有则分配给客户经理待接收,没有则放到待分配客户。
if (customerService != null) {
// 发货人客户经理
customerCreateReqVO.setCustomerService(customerService);
//lanbm 2024-05-28 修改为进入待分配列表
//修改发货人带来的收货人,进入待分配列表,只需要改此处
//customerCreateReqVO.setCustomerService(customerService);
customerCreateReqVO.setCustomerService(null);
// 第1个发货人客户经理
customerCreateReqVO.setConsigneeFirstCustomerService(customerService);
//customerCreateReqVO.setConsigneeFirstCustomerService(customerService);
customerCreateReqVO.setConsigneeFirstCustomerService(null);
//end lanbm 2024-05-28 修改为进入待分配列表
}
......@@ -214,7 +229,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
// web订单收货人
customerCreateReqVO.setIsWebOrderConsigneeSync(true);
CustomerContactsCreateReqVO customerContactsCreateReqVO = new CustomerContactsCreateReqVO();
CustomerContactsCreateReqVO customerContactsCreateReqVO =
new CustomerContactsCreateReqVO();
customerContactsCreateReqVO.setName(name);
customerContactsCreateReqVO.setPhoneNew(phone);
customerContactsCreateReqVO.setIsDefault(1);
......@@ -224,12 +240,15 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
customerCreateReqVO.setCountry(countryDO.getId());
customerCreateReqVO.setCustomerContacts(Arrays.asList(customerContactsCreateReqVO));
customerCreateReqVO.setCustomerOperateLogRemark("管理端创建收货人时关联创建客户");
//customerCreateReqVO.setCustomerOperateLogRemark("管理端创建收货人时关联创建客户");
//lanbm 2024-05-28 修改日志记录信息
customerCreateReqVO.setCustomerOperateLogRemark("管理端创建收货人时关联创建客户,进待分配列表");
customerCreateReqVO.setCustomerOperateLogOrderNo(orderNo);
Long customerId = this.createCustomer(customerCreateReqVO);
List<CustomerContactsDO> customerContactsDOS = customerContactsMapper.selectList(new LambdaQueryWrapperX<CustomerContactsDO>().eq(CustomerContactsDO::getCustomerId, customerId).eq(CustomerContactsDO::getIsDefault, true));
List<CustomerContactsDO> customerContactsDOS =
customerContactsMapper.selectList(new LambdaQueryWrapperX<CustomerContactsDO>().eq(CustomerContactsDO::getCustomerId, customerId).eq(CustomerContactsDO::getIsDefault, true));
return customerContactsDOS.stream().findFirst().orElse(new CustomerContactsDO());
}
......@@ -2390,7 +2409,11 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
}
@Override
public void assignedCustomer(List<CustomerDO> customerDOList, Long customerServiceId, CustomerOperateTypeEnum customerOperateTypeEnum, String reason, String reqBodyJson) {
public void assignedCustomer(List<CustomerDO> customerDOList,
Long customerServiceId,
CustomerOperateTypeEnum customerOperateTypeEnum,
String reason,
String reqBodyJson) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
if (CollectionUtil.isNotEmpty(customerDOList)) {
......@@ -2990,7 +3013,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
// 下单完成入仓,根据订单入仓的时间往后延期六个月
//Date date = DateUtil.offsetMonth(rucangTime, 6).toJdkDate();
Date date = DateUtil.offsetMonth(rucangTime, 12).toJdkDate();
if (customer.getEstimateEnterOpenSeaTime() == null || customer.getEstimateEnterOpenSeaTime().compareTo(date) == -1) {
if (customer.getEstimateEnterOpenSeaTime() == null ||
customer.getEstimateEnterOpenSeaTime().compareTo(date) == -1) {
customer.setEstimateEnterOpenSeaTime(date);
}
......
......@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.customer.service.zhongPao;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.constant.Constant;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
......
package cn.iocoder.yudao.module.customer.controller.admin.zhongPao;
import cn.iocoder.yudao.framework.common.constant.Constant;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
......
......@@ -44,37 +44,33 @@ public class CalculateOrderYeJiTypeListener {
public void CalculateOrderYeJiTypePushEvent(
CalculateOrderYeJiTypeEvent event) {
zTest m = new zTest();
String sMsg = "计算业绩类型" + event.getCustomerId();
zTest m=new zTest();
String sMsg="计算业绩类型"+event.getCustomerId();
OrderDO orderDO = orderService.getById(event.getOrderId());
if (orderDO == null) {
throw exception(ORDER_NOT_EXISTS);
}
//获取订单中计算号的业绩归属客户ID
event.setCustomerId(orderDO.getCustomerId());
CustomerDO customerDO = customerService.getById(event.getCustomerId());
if (customerDO == null) {
//throw exception(CUSTOMER_NOT_EXISTS);
//lanbm 2024-05-27 添加的逻辑细化
orderService.UpdateOrderYeJiType(event.getOrderId(), 0);
sMsg += ",客户不存,订单业绩属于公司,订单算老业绩";
sMsg+=",客户不存在先不计算业绩类型";
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
return;
}
int isNew = 0;
if (customerDO.getIsNew() == true) {
isNew = 1;//新客户业绩类型
sMsg += ",新业绩";
} else {
sMsg+=",新业绩";
}
else {
isNew = 0;//老客户业绩类型
sMsg += ",老业绩";
sMsg+=",老业绩";
}
orderService.UpdateOrderYeJiType(event.getOrderId(), isNew);
......
package cn.iocoder.yudao.module.delivery.utility;
import cn.hutool.core.annotation.AnnotationUtil;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.TypeReference;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import cn.iocoder.yudao.module.delivery.entity.Employee;
import cn.iocoder.yudao.module.delivery.entity.deptex.TreeNode;
import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.ArrayList;
import java.util.List;
import java.math.BigDecimal;
import java.util.*;
/*
递归的例子 lanbm 2024-05-26 add
......@@ -23,5 +39,177 @@ public class JsonFactory {
}
return treeNodes;
}
/*
获取UUID lanbm 2024-05-30 添加
*/
public static String getUUID()
{
return UUID.randomUUID().toString();
}
/*
日期相关的通用工具类
https://blog.csdn.net/weixin_53742691/article/details/134064426
*/
public static void test1() {
//Date、long、Calendar之间的相互转换
//当前时间
Date date = DateUtil.date();
//Calendar转Date
date = DateUtil.date(Calendar.getInstance());
//时间戳转Date
date = DateUtil.date(System.currentTimeMillis());
//自动识别格式转换
String dateStr = "2017-03-01";
date = DateUtil.parse(dateStr);
//自定义格式化转换
date = DateUtil.parse(dateStr, "yyyy-MM-dd");
//格式化输出日期
String format = DateUtil.format(date, "yyyy-MM-dd");
//获得年的部分
int year = DateUtil.year(date);
//获得月份,从0开始计数
int month = DateUtil.month(date);
//获取某天的开始、结束时间
Date beginOfDay = DateUtil.beginOfDay(date);
Date endOfDay = DateUtil.endOfDay(date);
//计算偏移后的日期时间
Date newDate = DateUtil.offset(date, DateField.DAY_OF_MONTH, 2);
//计算日期时间之间的偏移量
long betweenDay = DateUtil.between(date, newDate, DateUnit.DAY);
}
/*
字符串相关的通用工具类
*/
public static void test2() {
//判断是否为空字符串
String str = "test";
StrUtil.isEmpty(str);
StrUtil.isNotEmpty(str);
//去除字符串的前后缀
StrUtil.removeSuffix("a.jpg", ".jpg");
StrUtil.removePrefix("a.jpg", "a.");
//格式化字符串
String template = "这只是个占位符:{}";
String str2 = StrUtil.format(template, "我是占位符");
// LOGGER.info("/strUtil format:{}", str2);
}
public static void test3() {
double n1 = 1.234;
double n2 = 1.234;
double result;
//对float、double、BigDecimal做加减乘除操作
result = NumberUtil.add(n1, n2);
result = NumberUtil.sub(n1, n2);
result = NumberUtil.mul(n1, n2);
result = NumberUtil.div(n1, n2);
//保留两位小数
BigDecimal roundNum = NumberUtil.round(n1, 2);
String n3 = "1.234";
//判断是否为数字、整数、浮点数
NumberUtil.isNumber(n3);
NumberUtil.isInteger(n3);
NumberUtil.isDouble(n3);
//BeanUtil
//JavaBean的工具类,可用于Map与JavaBean对象的互相转换以及对象属性的拷贝。
//PmsBrand brand = new PmsBrand();
//brand.setId(1L);
//brand.setName("小米");
// brand.setShowStatus(0);
//Bean转Map
//Map<String, Object> map = BeanUtil.beanToMap(brand);
//LOGGER.info("beanUtil bean to map:{}", map);
//Map转Bean
//PmsBrand mapBrand = BeanUtil.mapToBean(map, PmsBrand.class, false);
//LOGGER.info("beanUtil map to bean:{}", mapBrand);
//Bean属性拷贝
//PmsBrand copyBrand = new PmsBrand();
//BeanUtil.copyProperties(brand, copyBrand);
//LOGGER.info("beanUtil copy properties:{}", copyBrand);
}
public static void test4() {
//将多个键值对加入到Map中
Map<Object, Object> map = MapUtil.of(new String[][]{
{"key1", "value1"},
{"key2", "value2"},
{"key3", "value3"}
});
//判断Map是否为空
MapUtil.isEmpty(map);
MapUtil.isNotEmpty(map);
// AnnotationUtil 注解工具类,可用于获取注解与注解中指定的值。
//获取指定类、方法、字段、构造器上的注解列表
// Annotation[] annotationList = AnnotationUtil.getAnnotations(HutoolController.class, false);
// LOGGER.info("annotationUtil annotations:{}", annotationList);
//获取指定类型注解
// Api api = AnnotationUtil.getAnnotation(HutoolController.class, Api.class);
// LOGGER.info("annotationUtil api value:{}", api.description());
//获取指定类型注解的值
//Object annotationValue = AnnotationUtil.getAnnotationValue(HutoolController.class,
// RequestMapping.class);
}
/*
字符串和对象的相互转换
*/
public static void test5() {
//对象转字符串
Employee e=new Employee();
String userInfoStr = JSONUtil.toJsonStr(e);
//log.info("对象转字符串userInfoStr:{}", userInfoStr);
//生成token
//String jwtToken = TokenUtil.createJwtToken(userInfoStr);
//字符串转对象
Employee userInfo = JSONUtil.toBean(userInfoStr, Employee.class);
List<Employee> userMapList=new ArrayList<>();
// HuTool
List<Employee> userList =
JSONUtil.toList(new JSONArray(userMapList),Employee.class);
// 同fastjson
/*
List<Employee> userList2 =
JSON.parseObject(JSON.toJSONString(userMapList)
,new TypeReference<>() {});
*/
String uuid = IdUtil.simpleUUID(); // 生成简单UUID
BigDecimal num1 = new BigDecimal("10.5");
BigDecimal num2 = new BigDecimal("5.2");
BigDecimal result = NumberUtil.add(num1, num2);
//使用BigDecimal进行精确运算
//Map<String,Integer> originalMap = new HashMap<>();
//Map<Integer, String> swappedMap = CollUtil.reverse(originalMap);
//交换Map的键和值
}
}
package cn.iocoder.yudao.module.delivery.utility;
import cn.iocoder.yudao.module.delivery.entity.Employee;
import org.apache.ibatis.jdbc.SQL;
import java.util.Map;
/*
代码中的动态SQL语句
*/
public class ProductInfoDynaSqlProvider {
// 分页动态查询
public String selectWithParam(Map<String, Object> params) {
String sql = new SQL() {
{
SELECT("*");
FROM("product_info");
if (params.get("productInfo") != null) {
Employee productInfo = (Employee) params.get("Employee");
if (productInfo.getName() != null && !"".equals(productInfo.getName())) {
WHERE(" code = #{productInfo.code} ");
}
if (productInfo.getName() != null && !productInfo.getName().equals("")) {
WHERE(" name LIKE CONCAT ('%',#{productInfo.name},'%') ");
}
if (productInfo.getEmail() != null && !productInfo.getEmail().equals("")) {
WHERE(" brand LIKE CONCAT ('%',#{productInfo.brand},'%') ");
}
if (productInfo.getAge() > 0) {
WHERE(" price > #{productInfo.priceFrom} ");
}
}
}
}.toString();
if (params.get("pager") != null) {
sql += " limit #{pager.firstLimitParam} , #{pager.perPageRows} ";
}
return sql;
}
//根据条件动态查询商品总记录数
public String count(Map<String, Object> params) {
return new SQL() {
{
SELECT("count(*)");
FROM("product_info");
if (params.get("productInfo") != null) {
Employee productInfo = (Employee) params.get("Employee");
if (productInfo.getName() != null && !"".equals(productInfo.getName())) {
WHERE(" code = #{productInfo.code} ");
}
if (productInfo.getName() != null && !productInfo.getName().equals("")) {
WHERE(" name LIKE CONCAT ('%',#{productInfo.name},'%') ");
}
if (productInfo.getEmail() != null && !productInfo.getEmail().equals("")) {
WHERE(" brand LIKE CONCAT ('%',#{productInfo.brand},'%') ");
}
if (productInfo.getAge() > 0) {
WHERE(" price > #{productInfo.priceFrom} ");
}
}
}
}.toString();
}
//根据条件动态查询总记录数
public String count2(Map<String, Object> params) {
return new SQL() {
{
SELECT("count(*)");
FROM("user_info");
if (params.get("userInfo") != null) {
Employee userInfo = (Employee) params.get("userInfo");
if (userInfo.getName() != null && !userInfo.getName().equals("")) {
WHERE(" userName LIKE CONCAT ('%',#{userInfo.userName},'%') ");
}
}
}
}.toString();
}
}
......@@ -49,6 +49,152 @@
SET Overdue=Overdue + 1
WHERE user_name = #{userName}
</update>
<resultMap type="cn.iocoder.yudao.module.delivery.entity.Employee" id="SysTestMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="testName" column="test_name" jdbcType="VARCHAR"/>
<result property="orderNum" column="order_num" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<!--查询所有-->
<select id="queryAll" resultMap="SysTestMap">
select id,
test_name,
order_num,
create_time,
del_flag,
remark
from sys_test
</select>
<!--查询单个-->
<select id="queryById" resultMap="SysTestMap">
select id,
test_name,
order_num,
create_time,
del_flag,
remark
from sys_test
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="SysTestMap">
select
id, test_name, order_num, create_time, del_flag, remark
from sys_test
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="testName != null and testName != ''">
and test_name = #{testName}
</if>
<if test="orderNum != null">
and order_num = #{orderNum}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="delFlag != null">
and del_flag = #{delFlag}
</if>
<if test="remark != null and remark != ''">
and remark = #{remark}
</if>
</where>
limit #{pageable.offset}, #{pageable.pageSize}
</select>
<!--统计总行数-->
<select id="count" resultType="java.lang.Long">
select count(1)
from sys_test
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="testName != null and testName != ''">
and test_name = #{testName}
</if>
<if test="orderNum != null">
and order_num = #{orderNum}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="delFlag != null">
and del_flag = #{delFlag}
</if>
<if test="remark != null and remark != ''">
and remark = #{remark}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into sys_test(test_name, order_num, create_time, del_flag, remark)
values (#{testName}, #{orderNum}, #{createTime}, #{delFlag}, #{remark})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into sys_test(test_name, order_num, create_time, del_flag, remark)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.testName}, #{entity.orderNum}, #{entity.createTime}, #{entity.delFlag}, #{entity.remark})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into sys_test(test_name, order_num, create_time, del_flag, remark)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.testName}, #{entity.orderNum}, #{entity.createTime}, #{entity.delFlag}, #{entity.remark})
</foreach>
on duplicate key update
test_name = values(test_name),
order_num = values(order_num),
create_time = values(create_time),
del_flag = values(del_flag),
remark = values(remark)
</insert>
<!--通过主键修改数据-->
<update id="update">
update sys_test
<set>
<if test="testName != null and testName != ''">
test_name = #{testName},
</if>
<if test="orderNum != null">
order_num = #{orderNum},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="delFlag != null">
del_flag = #{delFlag},
</if>
<if test="remark != null and remark != ''">
remark = #{remark},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete
from sys_test
where id = #{id}
</delete>
</mapper>
......@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.depository.dal.mysql.warehouse;
import java.util.*;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
......
package cn.iocoder.yudao.module.ecw.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.ecw.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.ecw.dal.dataobject.dock;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import lombok.*;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
......@@ -91,7 +92,7 @@ public class DockDO extends BaseDO {
/**
* 0显示 1不显示
*
* 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum 对应的类}
* 枚举 {@link CommonStatusEnum 对应的类}
*/
private Integer status;
......
package cn.iocoder.yudao.module.ecw.service.currency;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
import cn.iocoder.yudao.module.ecw.controller.admin.currency.vo.*;
......
package cn.iocoder.yudao.module.ecw.service.unit;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
......
......@@ -69,7 +69,8 @@ public class FileController {
String fix = FileNameUtil.getSuffix(file.getOriginalFilename());
path = DateUtils.getDir() + IdUtil.objectId() + (StrUtil.isBlank(fix) ? StrUtil.EMPTY : StrUtil.DOT + fix);
}
return success(fileService.createFile(path, IoUtil.readBytes(file.getInputStream())));
return success(fileService.createFile(path,
IoUtil.readBytes(file.getInputStream())));
}
@PostMapping("org-name/up")
......
package cn.iocoder.yudao.module.infra.dal.dataobject.file;
import cn.iocoder.yudao.framework.file.core.client.db.DBFileClient;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
......@@ -9,7 +10,7 @@ import lombok.*;
/**
* 文件内容表
*
* 专门用于存储 {@link cn.iocoder.yudao.framework.file.core.client.db.DBFileClient} 的文件内容
* 专门用于存储 {@link DBFileClient} 的文件内容
*
* @author 捷道源码
*/
......
package cn.iocoder.yudao.module.infra.dal.dataobject.logger;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
......
package cn.iocoder.yudao.module.infra.dal.dataobject.logger;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.infra.enums.logger.ApiErrorLogProcessStatusEnum;
import com.baomidou.mybatisplus.annotation.TableId;
......
......@@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.infra.service.file;
import cn.hutool.core.io.FileTypeUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.file.core.client.FileClient;
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePageReqVO;
......
package cn.iocoder.yudao.module.member.api.user.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import lombok.Data;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
......
package cn.iocoder.yudao.module.member.convert.auth;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.module.member.controller.app.auth.vo.*;
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
......
package cn.iocoder.yudao.module.member.dal.dataobject.user;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
......
package cn.iocoder.yudao.module.member.dal.mysql.user;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.member.controller.admin.user.vo.UserBackVO;
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
......
......@@ -2,18 +2,15 @@ package cn.iocoder.yudao.module.member.service.auth;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils;
import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
import cn.iocoder.yudao.framework.common.util.validation.PhoneUtil;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.authentication.MultiUsernamePasswordAuthenticationToken;
import cn.iocoder.yudao.module.ecw.api.customer.CustomerApi;
import cn.iocoder.yudao.module.ecw.api.internalMessage.ClientInternalMessageApi;
import cn.iocoder.yudao.module.ecw.api.internalMessage.InternalMessageApi;
import cn.iocoder.yudao.module.ecw.api.internalMessage.dto.InternalMessageCreateDto;
import cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi;
import cn.iocoder.yudao.module.member.controller.app.auth.vo.*;
......@@ -24,7 +21,6 @@ import cn.iocoder.yudao.module.member.enums.UserOperationLogTypeEnum;
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
import cn.iocoder.yudao.module.member.service.userOperationLog.UserOperationLogService;
import cn.iocoder.yudao.module.member.vo.userOperationLog.UserOperationLogCreateReqVO;
import cn.iocoder.yudao.module.product.service.coupon.CouponService;
import cn.iocoder.yudao.module.system.api.auth.UserSessionApi;
import cn.iocoder.yudao.module.system.api.logger.LoginLogApi;
import cn.iocoder.yudao.module.system.api.logger.dto.LoginLogCreateReqDTO;
......
......@@ -3,13 +3,11 @@ package cn.iocoder.yudao.module.member.service.user;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.event.BoxCheckOrderSchedulingEvent;
import cn.iocoder.yudao.framework.apollo.core.event.MemberRegEvent;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.common.util.validation.PhoneUtil;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
......
package cn.iocoder.yudao.module.order.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.order.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......@@ -36,7 +36,7 @@ public enum OrderAirTimeEnum implements IntArrayValuable {
AIR_WAREHOUSE_WITHDRAWAL(7206, "退仓", "Warehouse Withdrawal", "货物已退仓","The shipment have been withdrawn from warehouse"),
AIR_ORDER_CANCEL(8800, "取消订单", "Order Cancelled", "",""),
;
......
package cn.iocoder.yudao.module.order.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.order.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.order.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......@@ -33,7 +33,7 @@ public enum OrderSeaTimeEnum implements IntArrayValuable {
SEA_WAREHOUSE_WITHDRAWAL(7206, "退仓", "Warehouse Withdrawal", "货物已退仓","The shipment have been withdrawn from warehouse"),
SEA_ORDER_CANCEL(8800, "取消订单", "Order Cancelled", "",""),
;
......
package cn.iocoder.yudao.module.order.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.order.enums;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
......@@ -29,14 +29,13 @@ import java.util.stream.Collectors;
/**
* 未报价异常处理
* lanbm 2024-05-31 添加注释
*/
@Component("ProductPriceExceptionHandleListener")
@AllArgsConstructor
public class ProductPriceExceptionHandleListener {
private final OrderQueryService orderQueryService;
private final OrderExceptionService orderExceptionService;
private final OrderBusinessService orderBusinessService;
......@@ -52,18 +51,28 @@ public class ProductPriceExceptionHandleListener {
}
/*
处理好报价相关的订单的异常 lanbm 2024-05-31
*/
public void orderOtherFeeEvent(HandleData event) {
List<ProductPriceDO> priceList = event.getNeedHandleList();
//ecw_product_price
//找出符合条件的订单
for (ProductPriceDO productPriceDO : priceList) {
//线路ID
Long lineId = productPriceDO.getWarehouseLineId();
//渠道ID ecw_channel
Long channelId = productPriceDO.getShippingChannelId();
Long productId = productPriceDO.getProductId();
if (channelId != null && channelId == 0L) channelId = null;
List<OrderItemDO> orderItemList = orderQueryService.getOrderItemByLineIdAndProductId(lineId, productId, channelId);
//获取订单项信息
List<OrderItemDO> orderItemList =
orderQueryService.getOrderItemByLineIdAndProductId(lineId,
productId,
channelId);
if (CollectionUtil.isEmpty(orderItemList)) continue;
//找出订单的未报价异常
......@@ -71,8 +80,9 @@ public class ProductPriceExceptionHandleListener {
.map(OrderItemDO::getOrderItemId)
.collect(Collectors.toSet());
//找出这些订单的未处理的未报价异常
List<OrderExceptionDO> exceptionDOList = orderExceptionService.list(new LambdaQueryWrapper<OrderExceptionDO>()
.eq(OrderExceptionDO::getOrderExceptionType, OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION.getKey())
List<OrderExceptionDO> exceptionDOList =
orderExceptionService.list(new LambdaQueryWrapper<OrderExceptionDO>()
.eq(OrderExceptionDO::getOrderExceptionType,OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION.getKey())
.in(OrderExceptionDO::getOrderItemId, orderItemIdSet)
.ne(OrderExceptionDO::getOrderExceptionStatus, 2)
);
......@@ -85,7 +95,8 @@ public class ProductPriceExceptionHandleListener {
// orderExceptionResultHandlerVo.setHandlerId(Constant.SYSTEM_USER_ADMIN_ID); //admin
// orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
// orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
orderBusinessService.handleOrderNoQuote(orderExceptionDO.getOrderId());
orderBusinessService.handleOrderNoQuote(
orderExceptionDO.getOrderId());
}
}
......@@ -105,7 +116,8 @@ public class ProductPriceExceptionHandleListener {
// orderExceptionResultHandlerVo.setHandlerId(Constant.SYSTEM_USER_ADMIN_ID); //admin
// orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
// orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
orderBusinessService.handleOrderNoQuote(orderExceptionDO.getOrderId());
orderBusinessService.handleOrderNoQuote(
orderExceptionDO.getOrderId());
}
// }
......
......@@ -395,14 +395,22 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
private void handleException(Long orderId, OrderDO orderDO, int type) {
OrderConsignorDO orderConsignorDO = orderConsignorService.getOne(new LambdaQueryWrapper<OrderConsignorDO>().eq(OrderConsignorDO::getOrderId, orderId).last("limit 1"));
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOne(new LambdaQueryWrapper<OrderConsigneeDO>().eq(OrderConsigneeDO::getOrderId, orderId).last("limit 1"));
List<OrderItemDO> orderItemDOList = orderItemMapper.selectList(new LambdaQueryWrapper<OrderItemDO>().eq(OrderItemDO::getOrderId, orderId));
OrderConsignorDO orderConsignorDO =
orderConsignorService.getOne(new LambdaQueryWrapper<OrderConsignorDO>().eq(OrderConsignorDO::getOrderId, orderId).last("limit 1"));
OrderConsigneeDO orderConsigneeDO =
orderConsigneeService.getOne(new LambdaQueryWrapper<OrderConsigneeDO>().eq(OrderConsigneeDO::getOrderId, orderId).last("limit 1"));
List<OrderItemDO> orderItemDOList =
orderItemMapper.selectList(new LambdaQueryWrapper<OrderItemDO>().eq(OrderItemDO::getOrderId, orderId));
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
String updater = String.valueOf(loginUser != null ? loginUser.getId() : null);
// 插入订单商品项
this.costCalculation(updater, orderDO, orderConsignorDO.getCustomerId(), orderConsigneeDO.getCustomerId(),
orderConsignorDO.getCustomerContactsId(), orderConsigneeDO.getCustomerContactsId(), orderItemDOList, type);
this.costCalculation(updater, orderDO,
orderConsignorDO.getCustomerId(),
orderConsigneeDO.getCustomerId(),
orderConsignorDO.getCustomerContactsId(),
orderConsigneeDO.getCustomerContactsId(),
orderItemDOList, type);
}
private void handleException(Long orderId, OrderDO orderDO, List<OrderChangePriceParam> channelPriceParams, int type) {
......
......@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.order.service.order.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
......@@ -91,7 +91,6 @@ import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
......
......@@ -9,7 +9,7 @@ import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
......
......@@ -310,7 +310,8 @@ public class OrderWarehouseAdjustServiceImpl extends AbstractService<OrderWareho
public void adjustApplyCallback(String approvalId, Integer result) {
// 调仓申请 - 回调
OrderWarehouseApprovalDO orderWarehouseApprovalDO = orderWarehouseApprovalService.getById(Long.parseLong(approvalId));
OrderWarehouseApprovalDO orderWarehouseApprovalDO =
orderWarehouseApprovalService.getById(Long.parseLong(approvalId));
// 更新审核单状态
orderWarehouseApprovalService.callbackUpdate(orderWarehouseApprovalDO, result);
......@@ -332,7 +333,8 @@ public class OrderWarehouseAdjustServiceImpl extends AbstractService<OrderWareho
warehouseAdjustMapper.updateById(orderWarehouseAdjustDO);
}
String processingResults = orderWarehouseApprovalDO.getProcessingResults();
String processingResults =
orderWarehouseApprovalDO.getProcessingResults();
if (ApprovalResultStatusEnum.pass.getValue().equals(result)) {
//纪录订单操作日志
orderBusinessService.addOrderOperateLog(orderId, "仓库操作", "调仓申请通过", "");
......
......@@ -22,6 +22,7 @@ import java.util.List;
/**
* 创建收货人客户任务
* lanbm 2024-05-27 添加注释 创建收货人客户
*/
@Component
@TenantJob
......@@ -46,28 +47,48 @@ public class CreateConsigneeCustomerJob implements JobHandler {
/**
* 每天定点执行一次,扫描收货人无客户档案且订单创建时间-当前>14天的web订单,
* 若存在,则新建收货人客户档案进入待分配.
*
* @param param 参数
* @return
* @throws Exception
*/
@Override
public String execute(String param) throws Exception {
List<OrderDO> noConsigeeCustomerOrderList = orderQueryService.getNoConsigeeCustomerOrderList(14);
//获取14天未入库的订单的收货人 lanbm 2024-05-28 添加注释
List<OrderDO> noConsigeeCustomerOrderList =
orderQueryService.getNoConsigeeCustomerOrderList(14);
if (CollectionUtil.isNotEmpty(noConsigeeCustomerOrderList)) {
for (OrderDO orderDO : noConsigeeCustomerOrderList) {
//订单id和订单编号
Long orderId = orderDO.getOrderId();
String orderNo = orderDO.getOrderNo();
OrderConsignorDO orderConsignorDO = orderConsignorService.getOrderConsignorByOrderId(orderId);
//订单发货人
OrderConsignorDO orderConsignorDO =
orderConsignorService.getOrderConsignorByOrderId(orderId);
//发货人不为空
if (orderConsignorDO != null) {
CustomerDO consignorCustomerDO = customerService.getCustomer(orderConsignorDO.getCustomerId());
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOrderConsigneeByOrderId(orderId);
CustomerDO consignorCustomerDO =
customerService.getCustomer(orderConsignorDO.getCustomerId());
//订单收货人
OrderConsigneeDO orderConsigneeDO =
orderConsigneeService.getOrderConsigneeByOrderId(orderId);
//创建收货人
CustomerContactsDO consigeeCustomer = customerService.createConsigeeCustomer(orderConsigneeDO.getName(),
orderConsigneeDO.getCountryCode(), orderConsigneeDO.getPhone(), orderConsigneeDO.getCompany(), orderConsigneeDO.getEmail(), null, orderNo);
CustomerContactsDO consigeeCustomer =
customerService.createConsigeeCustomer(
orderConsigneeDO.getName(),
orderConsigneeDO.getCountryCode(),
orderConsigneeDO.getPhone(),
orderConsigneeDO.getCompany(),
orderConsigneeDO.getEmail(),
null,
orderNo);
if (consigeeCustomer != null) {
orderConsigneeDO.setCustomerId(consigeeCustomer.getCustomerId());
orderConsigneeDO.setCustomerContactsId(consigeeCustomer.getId());
......@@ -75,10 +96,12 @@ public class CreateConsigneeCustomerJob implements JobHandler {
}
//并更新其他收货人
List<OrderConsigneeDO> otherConsigneeDOList = orderConsigneeService.selectList(new LambdaQueryWrapperX<OrderConsigneeDO>()
.eq(OrderConsigneeDO::getCountryCode, orderConsigneeDO.getCountryCode())
.eq(OrderConsigneeDO::getPhone, orderConsigneeDO.getPhone())
.apply("deleted = 0 and order_id != " + orderId + " and (customer_id is null or customer_id = 0 or customer_contacts_id is null or customer_contacts_id = 0)"));
List<OrderConsigneeDO> otherConsigneeDOList =
orderConsigneeService.selectList(new LambdaQueryWrapperX<OrderConsigneeDO>()
.eq(OrderConsigneeDO::getCountryCode, orderConsigneeDO.getCountryCode())
.eq(OrderConsigneeDO::getPhone, orderConsigneeDO.getPhone())
.apply("deleted = 0 and order_id != " + orderId + " and (customer_id is null or customer_id = 0 or customer_contacts_id is null or customer_contacts_id = 0)"));
if (CollectionUtil.isNotEmpty(otherConsigneeDOList)) {
for (OrderConsigneeDO consigneeDO : otherConsigneeDOList) {
consigneeDO.setCustomerId(consigeeCustomer.getCustomerId());
......
package cn.iocoder.yudao.module.order.controller.admin.order;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.enums.OrderExceptionEnum;
import cn.iocoder.yudao.module.order.service.order.OrderAirService;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.service.orderCargoControl.OrderCargoControlService;
import cn.iocoder.yudao.module.order.service.orderException.OrderExceptionService;
import cn.iocoder.yudao.module.order.service.orderWarehousePicture.OrderWarehousePictureService;
import cn.iocoder.yudao.module.order.vo.order.*;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionDescVO;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionStatisticsExcelVo;
import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInFinishReqVO;
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
import cn.iocoder.yudao.module.system.api.permission.dto.RoleRespDTO;
import cn.iocoder.yudao.module.system.enums.ErrorCodeConstants;
......@@ -33,21 +19,16 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.ORDER_ID_NOT_NULL;
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ROLE_NOT_EXISTS;
......
......@@ -4,8 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.file.FileNameUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiTypeEvent;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
......@@ -141,18 +140,23 @@ public class OrderController {
if (null == createReqVO.getStatus()) {
createReqVO.setStatus(0);
}
if (Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), createReqVO.getTransportId())
if (Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(),
createReqVO.getTransportId())
|| Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(), createReqVO.getTransportId())) {
if (Objects.isNull(createReqVO.getChannelId()) || 0 == createReqVO.getChannelId()) {
if (Objects.isNull(createReqVO.getChannelId()) ||
0 == createReqVO.getChannelId()) {
//空运渠道不能为空
throw exception(ORDER_LINE_CHANNEL_NOT_NULL);
}
if (StringUtils.isNotEmpty(createReqVO.getNumber()) && createReqVO.getNumber().length() > 2048) {
if (StringUtils.isNotEmpty(createReqVO.getNumber())
&& createReqVO.getNumber().length() > 2048) {
throw exception(ORDER_EXPRESS_NUMBER_TOO_LONG);
}
}
//lanbm 2024-05-13 添加注释 member_user 注册会员用户
Long orderId = orderService.createOrder(createReqVO, null).getOrderId();
Long orderId = orderService.createOrder(createReqVO,
null).getOrderId();
return success(orderId);
}
......
package cn.iocoder.yudao.module.order.controller.admin.order;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
......@@ -8,7 +8,6 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.vo.order.*;
import cn.iocoder.yudao.module.system.api.file.FileMakeApi;
import cn.iocoder.yudao.module.system.api.file.dto.FileMakeReqDTO;
import cn.iocoder.yudao.module.system.enums.download.DownloadTypeEnum;
......
package cn.iocoder.yudao.module.order.controller.admin.orderCargoControl;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.framework.limiter.dynamic.DynamicRateLimiter;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
......
......@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.order.controller.admin.orderCargoControlPick;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.service.orderCargoControl.OrderCargoControlService;
......@@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.*;
import javax.validation.*;
......
package cn.iocoder.yudao.module.order.controller.admin.orderCount;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.order.dal.dataobject.orderException.OrderExceptionDO;
import cn.iocoder.yudao.module.order.dto.OrderCostSummaryDto;
import cn.iocoder.yudao.module.order.dto.OrderDetailSummaryDto;
......
......@@ -73,6 +73,9 @@ public class OrderWarehouseInController {
"jiedao:order:finish:warehouse:in:{0}";
/*
创建入仓,保存入仓记录 lanbm 2024-05-28 添加注释
*/
@PostMapping("/create")
@ApiOperation("入仓/追加")
@Idempotent(timeout = 8)
......@@ -102,6 +105,9 @@ public class OrderWarehouseInController {
// return success(true);
// }
/*
入仓记录修改 lanbm 2024-05-28 添加注释
*/
@PutMapping("/update-or-updateApply")
@ApiOperation("入仓中直接入仓修改,完成入仓的发起修改请求")
public CommonResult<Boolean> updateOrUpdateApply(@Valid @RequestBody OrderWarehouseInUpdateApplyReqVO updateReqVO) {
......@@ -126,7 +132,8 @@ public class OrderWarehouseInController {
@Idempotent(timeout = 5)
public CommonResult<Boolean> finishWarehouseIn(@Valid @RequestBody OrderWarehouseInFinishReqVO finishReqVO) {
//lanbm 2024-05-26 在此处添加注释
String redisKey = MessageFormat.format(ORDER_FINISH_WAREHOUSE_IN_KEY, finishReqVO.getOrderId().toString());
String redisKey = MessageFormat.format(ORDER_FINISH_WAREHOUSE_IN_KEY,
finishReqVO.getOrderId().toString());
Long count = redisHelper.incrBy(redisKey, 1);
if (count > 1) {
return error(ORDER_FINISH_WAREHOUSE_IN_REPEAT_COMMIT);
......@@ -200,7 +207,8 @@ public class OrderWarehouseInController {
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<OrderWarehouseApprovalBackVO> getRollbackApprovalInfo(@RequestParam("orderId") Long orderId) {
// 校验存在
OrderWarehouseApprovalDO orderWarehouseApprovalDO = orderWarehouseApprovalService.selectOne(OrderWarehouseApprovalTypeEnum.WAREHOUSE_IN_TO_RETURN.getValue(), orderId);
OrderWarehouseApprovalDO orderWarehouseApprovalDO =
orderWarehouseApprovalService.selectOne(OrderWarehouseApprovalTypeEnum.WAREHOUSE_IN_TO_RETURN.getValue(), orderId);
return success(OrderWarehouseApprovalConvert.INSTANCE.convert(orderWarehouseApprovalDO));
}
......@@ -241,7 +249,8 @@ public class OrderWarehouseInController {
@ApiImplicitParam(name = "orderItemId", value = "订单品名id", required = true, example = "1024", dataTypeClass = Long.class)
})
public CommonResult<OrderWarehouseInBackVO> getOrderWarehouseInDeleted(@RequestParam("orderId") Long orderId, @RequestParam("orderItemId") Long orderItemId) {
OrderWarehouseInBackVO orderWarehouseInBackVODeleted = orderWarehouseInService.getOrderWarehouseInListDeleted(orderId, orderItemId);
OrderWarehouseInBackVO orderWarehouseInBackVODeleted =
orderWarehouseInService.getOrderWarehouseInListDeleted(orderId, orderItemId);
return success(orderWarehouseInBackVODeleted);
}
......
......@@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.file.FileNameUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
......
package cn.iocoder.yudao.module.pay.dal.dataobject.merchant;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......
package cn.iocoder.yudao.module.pay.dal.dataobject.merchant;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig;
import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum;
......
package cn.iocoder.yudao.module.pay.dal.dataobject.merchant;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
......
package cn.iocoder.yudao.module.pay.enums.order;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.pay.enums.order;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.pay.enums.refund;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package cn.iocoder.yudao.module.pay.service.merchant;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO;
import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO;
import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO;
......@@ -79,7 +80,7 @@ public interface PayAppService {
* 修改应用信息状态
*
* @param id 应用编号
* @param status 状态{@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum}
* @param status 状态{@link CommonStatusEnum}
*/
void updateAppStatus(Long id, Integer status);
......
......@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.pay.service.merchant;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO;
import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO;
......
......@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.pay.service.merchant;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
......
package cn.iocoder.yudao.module.product.service.product.impl;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.product.vo.productAttr.ProductAttrCreateReqVO;
......
......@@ -4,8 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.event.ProductConfirmedEvent;
import cn.iocoder.yudao.framework.apollo.core.event.ProductUpdateAutoProcessOverWeightExceptionEvent;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
......
package cn.iocoder.yudao.module.product.service.productbrandempower;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
import cn.iocoder.yudao.module.customer.dal.mysql.customer.CustomerMapper;
import cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService;
......@@ -32,7 +30,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;
import org.openxmlformats.schemas.officeDocument.x2006.bibliography.CTAuthorType;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
......
......@@ -51,6 +51,10 @@ public class ProductPriceBaseVO extends ProductPriceReqBaseVO {
@ApiModelProperty(value = "是否需要预约入仓,0-否,1-是")
private Integer needBook;
/*
没有固定价格,每单价格都不一样
lanbm 2024-05-28 添加注释
*/
@ApiModelProperty(value = "是否单询,0-否,1-是")
private Integer needOrderInquiry;
......
......@@ -83,11 +83,17 @@ public class ProductPriceController {
@ApiOperation("更新路线产品")
@PreAuthorize("@ss.hasPermission('ecw:product-price:update')")
@Idempotent(timeout = 5)
public CommonResult<Boolean> updateProductPrice(@Valid @RequestBody ProductPriceUpdateReqVO updateReqVO) {
public CommonResult<Boolean> updateProductPrice(
@Valid @RequestBody ProductPriceUpdateReqVO updateReqVO) {
//lanbm 2024-05-28 添加注释
productPriceService.updateProductPrice(updateReqVO);
return success(true);
}
/*
修改空运价格,在处理价格异常时,处理和此价格关联的订单信息
lanbm 2024-05-31 添加注释
*/
@PutMapping("/updateAir")
@ApiOperation("更新空运路线产品")
@Idempotent(timeout = 5)
......@@ -108,7 +114,11 @@ public class ProductPriceController {
@ApiOperation("批量更新路线产品")
@PreAuthorize("@ss.hasPermission('ecw:product-price:update')")
public CommonResult<Boolean> batchUpdateProductPrice(@RequestBody ProductPriceBatchUpdateReqVo updateReqVO) {
ProductPriceCheckAO productPriceCheckAO = productPriceService.check(updateReqVO);
//批量修改价格 lanbm 2024-05-29 添加注释
//检查Redis中是否有正在修改的产品价格
ProductPriceCheckAO productPriceCheckAO =
productPriceService.check(updateReqVO);
routerService.batchUpdateProductPrice(updateReqVO, productPriceCheckAO);
return success(true);
}
......
package cn.iocoder.yudao.module.product.controller.admin.productbrandempower;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.module.product.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.product.vo.productbrandempower.*;
import org.springframework.web.bind.annotation.*;
......@@ -8,7 +8,6 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.*;
import javax.validation.*;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment