Commit 566ffccb authored by zhengyi's avatar zhengyi

Merge branch 'order-update' into dev

parents ba8b04e1 5d7680e8
......@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.util.validation.PhoneUtil;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.excel.handler.WaterMarkHandler;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
......@@ -27,7 +26,6 @@ import cn.iocoder.yudao.module.order.convert.orderCargoControl.OrderCargoControl
import cn.iocoder.yudao.module.order.dal.dataobject.approval.OrderApprovalDO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControlPick.OrderCargoControlPickDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO;
import cn.iocoder.yudao.module.order.dal.mysql.approval.OrderApprovalMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper;
......@@ -40,7 +38,6 @@ import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.service.order.OrderService;
import cn.iocoder.yudao.module.order.vo.order.*;
import cn.iocoder.yudao.module.order.vo.orderCargoControl.*;
import cn.iocoder.yudao.module.order.vo.orderCargoControlPick.OrderCargoControlPickApplyVO;
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
import cn.iocoder.yudao.module.system.api.sms.SmsCodeApi;
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO;
......@@ -54,14 +51,12 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.AllArgsConstructor;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
......@@ -498,17 +493,25 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
// TODO 审批取消、审批拒绝,待补充业务日志及其他细节
if (orderApprovalDO.getType() == 61) {
msg = result == 3 ? "收货人限制修改申请取消" : "收货人限制修改申请拒绝";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("是否限制修改收货人");
applyInfoVO.setOrgValue(applyVO.getIsLimitUpdateConsignee() ? "是" : "否");
applyInfoVO.setNewValue(applyVO.getNewIsLimitUpdateConsignee() ? "是" : "否");
list.add(applyInfoVO);
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("锁定收货人天数");
applyInfoVO.setOrgValue(Objects.isNull(applyVO.getLockConsigneeDay()) ? "空" : applyVO.getLockConsigneeDay() + "天");
applyInfoVO.setNewValue(Objects.isNull(applyVO.getNewLockConsigneeDay()) ? "空" : applyVO.getNewLockConsigneeDay() + "天");
list.add(applyInfoVO);
}else if (orderApprovalDO.getType() == 61) {
ApplyInfoVO applyInfoVO;
if (applyVO.getIsLimitUpdateConsignee() != applyVO.getNewIsLimitUpdateConsignee()) {
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("是否限制修改收货人");
applyInfoVO.setOrgValue(applyVO.getIsLimitUpdateConsignee() ? "是" : "否");
applyInfoVO.setNewValue(applyVO.getNewIsLimitUpdateConsignee() ? "是" : "否");
list.add(applyInfoVO);
}
if ((Objects.nonNull(applyVO.getLockConsigneeDay()) && Objects.nonNull(applyVO.getNewLockConsigneeDay())
&& !Objects.equals(applyVO.getLockConsigneeDay(), applyVO.getNewLockConsigneeDay()))
|| (Objects.isNull(applyVO.getLockConsigneeDay()) && Objects.nonNull(applyVO.getNewLockConsigneeDay()))
|| (Objects.nonNull(applyVO.getLockConsigneeDay()) && Objects.isNull(applyVO.getNewLockConsigneeDay()))) {
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("锁定收货人天数");
applyInfoVO.setOrgValue(Objects.isNull(applyVO.getLockConsigneeDay()) ? "空" : applyVO.getLockConsigneeDay() + "天");
applyInfoVO.setNewValue(Objects.isNull(applyVO.getNewLockConsigneeDay()) ? "空" : applyVO.getNewLockConsigneeDay() + "天");
list.add(applyInfoVO);
}
} else if (orderApprovalDO.getType() == 62) {
msg = result == 3 ? "海外仓修改申请取消" : "海外仓修改申请拒绝";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("订单修改为海外仓模式");
......@@ -528,17 +531,25 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
.set(OrderDO::getLockConsigneeTime, newLockConsigneeTime)
.eq(OrderDO::getOrderId, orderApprovalDO.getOrderId()));
msg = "收货人限制修改申请审批通过";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("是否限制修改收货人");
applyInfoVO.setOrgValue(applyVO.getIsLimitUpdateConsignee() ? "是" : "否");
applyInfoVO.setNewValue(applyVO.getNewIsLimitUpdateConsignee() ? "是" : "否");
list.add(applyInfoVO);
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("锁定收货人天数");
applyInfoVO.setOrgValue(Objects.isNull(applyVO.getLockConsigneeDay()) ? "空" : applyVO.getLockConsigneeDay() + "天");
applyInfoVO.setNewValue(Objects.isNull(applyVO.getNewLockConsigneeDay()) ? "空" : applyVO.getNewLockConsigneeDay() + "天");
list.add(applyInfoVO);
}else if (orderApprovalDO.getType() == 62) {
ApplyInfoVO applyInfoVO;
if (applyVO.getIsLimitUpdateConsignee() != applyVO.getNewIsLimitUpdateConsignee()) {
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("是否限制修改收货人");
applyInfoVO.setOrgValue(applyVO.getIsLimitUpdateConsignee() ? "是" : "否");
applyInfoVO.setNewValue(applyVO.getNewIsLimitUpdateConsignee() ? "是" : "否");
list.add(applyInfoVO);
}
if ((Objects.nonNull(applyVO.getLockConsigneeDay()) && Objects.nonNull(applyVO.getNewLockConsigneeDay())
&& !Objects.equals(applyVO.getLockConsigneeDay(), applyVO.getNewLockConsigneeDay()))
|| (Objects.isNull(applyVO.getLockConsigneeDay()) && Objects.nonNull(applyVO.getNewLockConsigneeDay()))
|| (Objects.nonNull(applyVO.getLockConsigneeDay()) && Objects.isNull(applyVO.getNewLockConsigneeDay()))) {
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("锁定收货人天数");
applyInfoVO.setOrgValue(Objects.isNull(applyVO.getLockConsigneeDay()) ? "空" : applyVO.getLockConsigneeDay() + "天");
applyInfoVO.setNewValue(Objects.isNull(applyVO.getNewLockConsigneeDay()) ? "空" : applyVO.getNewLockConsigneeDay() + "天");
list.add(applyInfoVO);
}
} else if (orderApprovalDO.getType() == 62) {
// TODO 海外仓修改申请
......@@ -612,16 +623,24 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
StringUtils.isNotBlank(orderCargoControlApplyVO.getCcIds()) ? orderCargoControlApplyVO.getCcIds().split(StrUtil.COMMA) : null);
orderApprovalDO.setFormId(formId);
msg = "收货人限制修改申请";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("是否限制修改收货人");
applyInfoVO.setOrgValue(orderCargoControlApplyVO.getIsLimitUpdateConsignee() ? "是" : "否");
applyInfoVO.setNewValue(orderCargoControlApplyVO.getNewIsLimitUpdateConsignee() ? "是" : "否");
list.add(applyInfoVO);
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("锁定收货人天数");
applyInfoVO.setOrgValue(Objects.isNull(orderCargoControlApplyVO.getLockConsigneeDay()) ? "空" : orderCargoControlApplyVO.getLockConsigneeDay() + "天");
applyInfoVO.setNewValue(Objects.isNull(orderCargoControlApplyVO.getNewLockConsigneeDay()) ? "空" : orderCargoControlApplyVO.getNewLockConsigneeDay() + "天");
list.add(applyInfoVO);
ApplyInfoVO applyInfoVO;
if (orderCargoControlApplyVO.getIsLimitUpdateConsignee() != orderCargoControlApplyVO.getNewIsLimitUpdateConsignee()) {
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("是否限制修改收货人");
applyInfoVO.setOrgValue(orderCargoControlApplyVO.getIsLimitUpdateConsignee() ? "是" : "否");
applyInfoVO.setNewValue(orderCargoControlApplyVO.getNewIsLimitUpdateConsignee() ? "是" : "否");
list.add(applyInfoVO);
}
if ((Objects.nonNull(orderCargoControlApplyVO.getLockConsigneeDay()) && Objects.nonNull(orderCargoControlApplyVO.getNewLockConsigneeDay())
&& !Objects.equals(orderCargoControlApplyVO.getLockConsigneeDay(), orderCargoControlApplyVO.getNewLockConsigneeDay()))
|| (Objects.isNull(orderCargoControlApplyVO.getLockConsigneeDay()) && Objects.nonNull(orderCargoControlApplyVO.getNewLockConsigneeDay()))
|| (Objects.nonNull(orderCargoControlApplyVO.getLockConsigneeDay()) && Objects.isNull(orderCargoControlApplyVO.getNewLockConsigneeDay()))) {
applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("锁定收货人天数");
applyInfoVO.setOrgValue(Objects.isNull(orderCargoControlApplyVO.getLockConsigneeDay()) ? "空" : orderCargoControlApplyVO.getLockConsigneeDay() + "天");
applyInfoVO.setNewValue(Objects.isNull(orderCargoControlApplyVO.getNewLockConsigneeDay()) ? "空" : orderCargoControlApplyVO.getNewLockConsigneeDay() + "天");
list.add(applyInfoVO);
}
} else if (orderCargoControlApplyVO.getApplyType() == 62) {
orderApprovalDO.setOrderId(orderCargoControlApplyVO.getOrderId());
orderApprovalDO.setType(62);
......
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