Commit 3746638b authored by liuzeheng's avatar liuzeheng

Merge branch 'master' into dev

# Conflicts:
#	yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxPreloadGoods/BoxPreloadGoodsServiceImpl.java
parents 0c7d2637 ae7935bc
......@@ -1922,8 +1922,11 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
List<OrderBackPageVO> adminCargoControlOrderList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryVO query);
List<OrderBackPageVO> adminCargoControlMyOrderList(@Param("start") int start, @Param("size") int size, @Param("query") OrderQueryDTO query);
long adminCargoControlOrderCount(@Param("query") OrderQueryVO query);
long adminCargoControlMyOrderCount(@Param("query") OrderQueryDTO query);
@ResultType(OrderBackPageVO.class)
@Select({
"<script>",
......@@ -3839,7 +3842,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsList(@Param("query") OrderQueryVO query);
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsList(@Param("query") OrderQueryDTO query);
/**
* 重货统计
......@@ -3847,7 +3850,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderHeavyExcelVo> getHeavyOrderExcelList(@Param("query") OrderQueryVO query);
List<OrderHeavyExcelVo> getHeavyOrderExcelList(@Param("query") OrderQueryDTO query);
/**
* 退仓统计
......@@ -3855,7 +3858,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(@Param("query") OrderQueryVO query);
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(@Param("query") OrderQueryDTO query);
/**
* 售后赔付
......@@ -3863,7 +3866,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(@Param("query") OrderQueryVO query);
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(@Param("query") OrderQueryDTO query);
/**
* 报关数据
......@@ -3871,7 +3874,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(@Param("query") OrderQueryVO query);
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(@Param("query") OrderQueryDTO query);
/**
* 出货量
......@@ -3879,7 +3882,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderShipDataExcelVo> getShipDatasExcelList(@Param("query") OrderQueryVO query);
List<OrderShipDataExcelVo> getShipDatasExcelList(@Param("query") OrderQueryDTO query);
/**
* 预付运费
......@@ -3887,7 +3890,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query
* @return
*/
List<OrderShipFeeExcelVo> getShipFeeExcelList(@Param("query") OrderQueryVO query);
List<OrderShipFeeExcelVo> getShipFeeExcelList(@Param("query") OrderQueryDTO query);
@ResultType(OrderDO.class)
@Select({
......
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderShipDataExcelVo;
......@@ -51,7 +52,7 @@ public class AdvanceOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
List<OrderShipFeeExcelVo> list = orderQueryService.getShipFeeExcelList(query);
String sheetName = event.getLang() == 0 ? "预付运费统计" : "advance fee statistics";
......
......@@ -10,6 +10,7 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderCostSummaryDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......@@ -60,9 +61,9 @@ public class ContainerNumberOrderExcelExportListener {
PageVO page = new PageVO();
page.setRows(10000);
page.setPage(1);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
PageResult<OrderBackPageVO> orderPage = orderQueryService.orderPage(query, page);
PageResult<OrderBackPageVO> orderPage = orderQueryService.myOrderPage(query, page);
if (CollectionUtil.isNotEmpty(orderPage.getList())) {
String nameZh = String.format("自编号%s的订单费用汇总统计", query.getContainerNumber());
String nameEn = String.format("Summary Statistics of Order Expenses from ID%s", query.getContainerNumber());
......
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......@@ -50,7 +51,7 @@ public class CustomsOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
List<OrderCustomsDatasExcelVo> list = orderQueryService.getCustomsDatasExcelList(query);
String sheetName = event.getLang() == 0 ? "报关数据统计" : "customs data statistics";
......
......@@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.apollo.core.event.export.ExceptionOrderStatist
import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionStatisticsExcelVo;
......@@ -49,7 +50,7 @@ public class ExceptionOrderStatisticsExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
List<OrderExceptionStatisticsExcelVo> list = orderQueryService.getOrderExceptionStatisticsExcel(query);
String sheetName = event.getLang() == 0 ? "异常单统计" : "Order exception statistics";
......
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderHeavyExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......@@ -50,7 +51,7 @@ public class HeavyOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
List<OrderHeavyExcelVo> list = orderQueryService.getHeavyOrderExcelList(query);
String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics";
......
......@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.order.listener.export;
import cn.iocoder.yudao.framework.apollo.core.event.export.OrderCargoControlExcelExportEvent;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.orderCargoControl.OrderCargoControlService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import com.alibaba.fastjson.JSONObject;
......@@ -32,7 +33,7 @@ public class OrderCargoControlExcelExportListener {
public void orderCargoControlExcelExportEvent(OrderCargoControlExcelExportEvent event) {
if (StringUtils.isNotBlank(event.getRequestParams())){
try {
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
FileDO fileDO = orderCargoControlService.makeCargoControlOrderExcelFile(event.getUserId(), event.getUserType(), query);
event.setPath(fileDO.getPath());
......
......@@ -33,27 +33,27 @@ public class OrderExcelExportListener {
*
* @param event 编号记录
*/
@EventListener(OrderExcelExportEvent.class)
public void orderExcelExportEvent(OrderExcelExportEvent event) throws IOException {
if (StringUtils.isNotBlank(event.getRequestParams())){
try {
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang());
FileDO fileDO = orderQueryService.makeOrderExcelFile(event.getUserId(), event.getUserType(), query);
event.setPath(fileDO.getPath());
event.setFileName(fileDO.getPath());
event.setUrl(fileDO.getUrl());
event.setFileId(fileDO.getId());
}catch (Exception e){
// TODO 测试阶段打印堆栈错误信息,便于分析原因
e.printStackTrace();
event.setResult(e.getMessage());
}
}else {
event.setResult("param fail");
}
}
// @EventListener(OrderExcelExportEvent.class)
// public void orderExcelExportEvent(OrderExcelExportEvent event) throws IOException {
// if (StringUtils.isNotBlank(event.getRequestParams())){
// try {
// OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
// query.setLang(event.getLang());
// FileDO fileDO = orderQueryService.makeOrderExcelFile(event.getUserId(), event.getUserType(), query);
// event.setPath(fileDO.getPath());
// event.setFileName(fileDO.getPath());
// event.setUrl(fileDO.getUrl());
// event.setFileId(fileDO.getId());
// }catch (Exception e){
// // TODO 测试阶段打印堆栈错误信息,便于分析原因
// e.printStackTrace();
// event.setResult(e.getMessage());
// }
// }else {
// event.setResult("param fail");
// }
//
// }
@EventListener(OrderExcelExportEvent.class)
public void MyOrderExcelExportEvent(OrderExcelExportEvent event) throws IOException {
......
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderReturnOrderExcelVo;
......@@ -50,7 +51,7 @@ public class ReturnOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
List<OrderReturnOrderExcelVo> list = orderQueryService.getReturnOrderExcelList(query);
String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics";
......
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderSaleRepayExcelVo;
......@@ -50,7 +51,7 @@ public class SaleRepayOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
List<OrderSaleRepayExcelVo> list = orderQueryService.getSaleRepayExcelList(query);
String sheetName = event.getLang() == 0 ? "售后赔偿金额统计" : "sale repay statistics";
......
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
......@@ -51,7 +52,7 @@ public class ShippingOrderExcelExportListener {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang());
List<OrderShipDataExcelVo> list = orderQueryService.getShipDatasExcelList(query);
String sheetName = event.getLang() == 0 ? "客户出货量统计" : "shipping data statistics";
......
......@@ -186,6 +186,8 @@ public interface OrderQueryService {
PageResult<OrderBackPageVO> adminCargoControlOrderPage(OrderQueryVO query, PageVO page);
PageResult<OrderBackPageVO> adminCargoControlMyOrderPage(OrderQueryDTO query, PageVO page);
PageResult<OrderBackPageVO> appCargoControlOrderPage(OrderQueryVO query, PageVO page);
......@@ -320,19 +322,19 @@ public interface OrderQueryService {
FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception;
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryVO query);
List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryDTO query);
List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryVO query);
List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryDTO query);
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryVO query);
List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryDTO query);
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryVO query);
List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryDTO query);
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryVO query);
List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryDTO query);
List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryVO query);
List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryDTO query);
List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryVO query);
List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryDTO query);
/**
* 查询订单的身份信息
......
......@@ -1115,6 +1115,19 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
@Override
public PageResult<OrderBackPageVO> adminCargoControlMyOrderPage(OrderQueryDTO query, PageVO page) {
query.setLang(I18nMessage.getLang());
caseStatus(query.getStatus(),query);
IPage<OrderBackPageVO> mpPage = MyBatisUtils.buildPage(page);
long total = orderMapper.adminCargoControlMyOrderCount(query);
log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<OrderBackPageVO> list = orderMapper.adminCargoControlMyOrderList(start, size, query);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
@Override
public PageResult<OrderBackPageVO> appCargoControlOrderPage(OrderQueryVO query, PageVO page) {
query.setLang(I18nMessage.getLang());
......@@ -1127,7 +1140,6 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
@Override
public PageResult<OrderBackPageVO> receivedOrderPage(OrderQueryVO query, PageVO page) {
query.setLang(I18nMessage.getLang());
......@@ -1878,7 +1890,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
public FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
caseStatus(query.getStatus(),query);
String sheetName = query.getLang() == 0 ? "订单管理第{0}页" : "Order Management number {0}";
if (Objects.isNull(userId)) {
userId = 0L;
......@@ -1960,7 +1972,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return
*/
@Override
public List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryVO query) {
public List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getOrderExceptionStatisticsList(query);
}
......@@ -1970,7 +1983,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return
*/
@Override
public List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryVO query) {
public List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getHeavyOrderExcelList(query);
}
......@@ -1981,7 +1995,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return
*/
@Override
public List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryVO query) {
public List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getReturnOrderExcelList(query);
}
......@@ -1992,7 +2007,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return
*/
@Override
public List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryVO query) {
public List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getSaleRepayExcelList(query);
}
......@@ -2003,7 +2019,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return
*/
@Override
public List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryVO query) {
public List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getCustomsDatasExcelList(query);
}
......@@ -2014,7 +2031,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return
*/
@Override
public List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryVO query) {
public List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getShipDatasExcelList(query);
}
......@@ -2025,7 +2043,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return
*/
@Override
public List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryVO query) {
public List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getShipFeeExcelList(query);
}
......
......@@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderSendSmsReqVO;
......@@ -107,8 +108,9 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO>
void exportCargoControlOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException;
FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception;
// FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception;
FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception;
/**
* 判断是否控货人是否设置了控货密码
*
......
......@@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargo
import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper;
import cn.iocoder.yudao.module.order.dto.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.enums.OrderStatusEnum;
import cn.iocoder.yudao.module.order.service.order.OrderBusinessService;
import cn.iocoder.yudao.module.order.service.order.OrderConsignorService;
......@@ -42,6 +43,7 @@ import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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;
......@@ -56,10 +58,7 @@ import java.net.URLEncoder;
import java.text.MessageFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
......@@ -384,7 +383,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
}
@Override
public FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception {
public FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
......@@ -408,7 +407,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
OutputStream out = new FileOutputStream(path);
ExcelWriter excelWriter = EasyExcel.write(out, OrderCargoControlExcelVO.class).inMemory(true).build();
PageVO page = new PageVO();
PageResult<OrderBackPageVO> pageResult = orderQueryService.adminCargoControlOrderPage(query, page);
PageResult<OrderBackPageVO> pageResult = orderQueryService.adminCargoControlMyOrderPage(query, page);
long total = pageResult.getTotal();
int pageNumber = (int) Math.ceil((double) total / (double) PAGE_SIZE); //分页条数看情况
// 去调用写入,根据数据库分页的总的页数来
......@@ -419,7 +418,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
page.setPage(i);
page.setRows(PAGE_SIZE);
page.setField("o.order_id");
PageResult<OrderBackPageVO> mpPage = orderQueryService.adminCargoControlOrderPage(query, page);
PageResult<OrderBackPageVO> mpPage = orderQueryService.adminCargoControlMyOrderPage(query, page);
List<OrderCargoControlExcelVO> pageList = mpPage.getList().stream().map(backPageVO -> {
OrderCargoControlExcelVO excelVO = new OrderCargoControlExcelVO();
BeanUtils.copyProperties(backPageVO, excelVO);
......
......@@ -1372,7 +1372,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
));
Iterator<Long> orderIdIt = orderMap.keySet().iterator();
for (Integer num : missList) {
if (orderIdIt.hasNext()) {
if(orderIdIt.hasNext()) {
Long orderId = orderIdIt.next();
List<BoxPreloadGoodsDO> orderGoodList = orderMap.get(orderId);
setTidanNum(orderGoodList, num, selfNo, updateOrder);
......@@ -1383,7 +1383,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
List<BoxPreloadGoodsDO> resultList = orderMap.values().stream()
.flatMap(Collection::stream)
.collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(resultList)) {
if(CollectionUtil.isNotEmpty(resultList)) {
setTidanNum(resultList, orderNum, selfNo, updateOrder);
}
}
......@@ -1391,13 +1391,13 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
}
}
if (updateOrder) {
if(updateOrder) {
Set<Long> orderIdSet = preloadGoodsList.stream()
.map(BoxPreloadGoodsDO::getOrderId)
.collect(Collectors.toSet());
Map<Long, Integer> tidanNumMap = preloadGoodsList.stream()
.collect(Collectors.toMap(BoxPreloadGoodsDO::getOrderId, BoxPreloadGoodsDO::getTidanNum, (v1, v2) -> v2));
.collect(Collectors.toMap(BoxPreloadGoodsDO::getOrderId, BoxPreloadGoodsDO::getTidanNum, (v1, v2)->v2));
for (Long orderId : orderIdSet) {
Integer orderNum = tidanNumMap.get(orderId);
String ladingBillNo = selfNo + "-" + orderNum;
......@@ -1408,7 +1408,6 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
/**
* 找出有间隔的订单
*
* @param list 预装商品项
* @return
*/
......@@ -1470,7 +1469,6 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
/**
* 根据订单生成提单号
*
* @param orderId 订单ID
* @return
*/
......@@ -1549,8 +1547,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
BoxDO boxDO = boxService.getBox(shipmentId);
Integer prStatus = boxDO.getPrStatus();
Set<Long> orderIdSet = getShipOrderIdList(shipmentId);
if (CollectionUtil.isEmpty(orderIdSet)) {
if (prStatus == PrStatusEnum.PRELOAD_ING.getPrStatus() ||
if(CollectionUtil.isEmpty(orderIdSet)) {
if(prStatus == PrStatusEnum.PRELOAD_ING.getPrStatus() ||
prStatus == PrStatusEnum.PRELOAD_APPROVAL_FAIL.getPrStatus()
) {
//修改为已订舱,待预装
......@@ -1559,7 +1557,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
}
} else {
//修改为预装中
if (prStatus == PrStatusEnum.NO_PRELOAD.getPrStatus() ||
if(prStatus == PrStatusEnum.NO_PRELOAD.getPrStatus() ||
prStatus == PrStatusEnum.PRELOAD_APPROVAL_FAIL.getPrStatus()
) {
//未预装和预装审核失败的情况才修改为预装中
......@@ -1572,7 +1570,6 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
/**
* 把订单从出货单中删除
*
* @param shipmentId 出货单ID
* @param orderIdCollection 订单列表
* @param type 1 预装移除 2 理货移除 3 装柜移除
......@@ -1580,7 +1577,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
*/
@Override
public void deleteOrderList(Long shipmentId, Collection<Long> orderIdCollection, Integer type, boolean hasExit) {
if (CollectionUtil.isNotEmpty(orderIdCollection)) {
if(CollectionUtil.isNotEmpty(orderIdCollection)) {
//删除装柜商品
boxPreloadGoodsMapper.delete(new LambdaQueryWrapperX<BoxPreloadGoodsDO>()
.in(BoxPreloadGoodsDO::getOrderId, orderIdCollection)
......@@ -1599,8 +1596,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
//删除该订单在理货这合包时的装箱数据
boxOrderCheckInfoService.remove(new LambdaQueryWrapperX<BoxOrderCheckInfoDO>()
.eq(BoxOrderCheckInfoDO::getShipmentId, shipmentId)
.in(BoxOrderCheckInfoDO::getOrderId, orderIdCollection)
.eq(BoxOrderCheckInfoDO::getShipmentId,shipmentId)
.in(BoxOrderCheckInfoDO::getOrderId,orderIdCollection)
);
//删除已经理货的数据
......@@ -1867,7 +1864,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
//查询订单的报关费用
List<BoxLoadOrderVO> orderVOList = detailBackVO.getSectionOrderList();
if (CollectionUtil.isNotEmpty(orderVOList)) {
if(CollectionUtil.isNotEmpty(orderVOList)) {
List<Long> orderIdList = orderVOList.stream()
.map(BoxLoadOrderVO::getOrderId)
.collect(Collectors.toList());
......@@ -1881,16 +1878,16 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
detailBackVO.setAbnormalList(BoxAbnormalConvert.INSTANCE.convertList(abnormalList));
String dealOrderIds = null;
BoxAbnormalDO boxAbnormalDO = null;
if (CollectionUtil.isNotEmpty(abnormalList)) {
if(CollectionUtil.isNotEmpty(abnormalList)) {
boxAbnormalDO = abnormalList.get(0);
dealOrderIds = boxAbnormalDO.getDealOrderIds();
}
if (StringUtils.isEmpty(dealOrderIds)) {
if(StringUtils.isEmpty(dealOrderIds)) {
dealOrderIds = "";
}
for (BoxLoadOrderVO orderVO : orderVOList) {
orderVO.setCustomsFee(orderFeeMap.get(orderVO.getOrderId()));
if (boxAbnormalDO == null) {
if(boxAbnormalDO == null) {
orderVO.setAbnormalDealStatus(1);
} else {
boolean isDeal = dealOrderIds.contains(orderVO.getOrderId().toString());
......@@ -2246,13 +2243,13 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
OrderConsigneeDO filterConsigneeDO = getFilterOrderConsigneeDO(boxDO, loadList);
OrderDO orderDO = orderService.getById(orderId);
if (filterConsigneeDO != null) {
if(filterConsigneeDO != null) {
//校验收货人是否是同一个人
OrderConsigneeDO consigneeDO = boxService.getOrderConsignee(orderDO);
//校验是否是用一个人 ,通过手机号
if (consigneeDO != null && !consigneeDO.getPhone().equals(filterConsigneeDO.getPhone())) {
if(consigneeDO != null && !consigneeDO.getPhone().equals(filterConsigneeDO.getPhone())) {
throw new ServiceException(500, "当前自编号是客户+自清,收货人必须是手机号相同才可以进行分拣");
}
}
......@@ -2260,7 +2257,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
//如果都符合,下面展示互斥和关联订单的弹窗
Integer relationStatus = createReqVO.getRelationStatus();
//校验是否是互斥订单
if (relationStatus == null || relationStatus == 2) {
if(relationStatus == null || relationStatus == 2) {
//校验互斥订单
checkMutualOrder(loadList, orderDO);
}
......@@ -2271,7 +2268,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
boolean hasRelationOrder = CollectionUtil.isNotEmpty(orderRelationList);
if (hasRelationOrder) {
if(hasRelationOrder) {
Set<Long> orderIdSet = orderRelationList.stream()
.flatMap(o -> Stream.of(o.getOrderId(), o.getRelateOrderId()))
.collect(Collectors.toSet());
......@@ -2347,7 +2344,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
//过滤了入仓为0的数据
List<OrderItemBackVO> orderItemList = orderItemService.getOrderItemBackByOrderId(orderIdList);
if (CollectionUtil.isEmpty(orderItemList)) {
if(CollectionUtil.isEmpty(orderItemList)) {
throw new ServiceException(500, "订单项不存在");
}
......
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