Commit 7f74b932 authored by liuzeheng's avatar liuzeheng

OrderQueryDTO 入参

parent ab17a968
...@@ -1922,8 +1922,11 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -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> 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 adminCargoControlOrderCount(@Param("query") OrderQueryVO query);
long adminCargoControlMyOrderCount(@Param("query") OrderQueryDTO query);
@ResultType(OrderBackPageVO.class) @ResultType(OrderBackPageVO.class)
@Select({ @Select({
"<script>", "<script>",
...@@ -3839,7 +3842,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> { ...@@ -3839,7 +3842,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query * @param query
* @return * @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> { ...@@ -3847,7 +3850,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query * @param query
* @return * @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> { ...@@ -3855,7 +3858,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query * @param query
* @return * @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> { ...@@ -3863,7 +3866,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query * @param query
* @return * @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> { ...@@ -3871,7 +3874,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query * @param query
* @return * @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> { ...@@ -3879,7 +3882,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query * @param query
* @return * @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> { ...@@ -3887,7 +3890,7 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
* @param query * @param query
* @return * @return
*/ */
List<OrderShipFeeExcelVo> getShipFeeExcelList(@Param("query") OrderQueryVO query); List<OrderShipFeeExcelVo> getShipFeeExcelList(@Param("query") OrderQueryDTO query);
@ResultType(OrderDO.class) @ResultType(OrderDO.class)
@Select({ @Select({
......
...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils; ...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderShipDataExcelVo; import cn.iocoder.yudao.module.order.vo.order.OrderShipDataExcelVo;
...@@ -51,7 +52,7 @@ public class AdvanceOrderExcelExportListener { ...@@ -51,7 +52,7 @@ public class AdvanceOrderExcelExportListener {
try { try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); 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()); query.setLang(event.getLang());
List<OrderShipFeeExcelVo> list = orderQueryService.getShipFeeExcelList(query); List<OrderShipFeeExcelVo> list = orderQueryService.getShipFeeExcelList(query);
String sheetName = event.getLang() == 0 ? "预付运费统计" : "advance fee statistics"; String sheetName = event.getLang() == 0 ? "预付运费统计" : "advance fee statistics";
......
...@@ -10,6 +10,7 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO; ...@@ -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.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.order.dto.OrderCostSummaryDto; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO; 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.OrderQueryVO;
...@@ -60,9 +61,9 @@ public class ContainerNumberOrderExcelExportListener { ...@@ -60,9 +61,9 @@ public class ContainerNumberOrderExcelExportListener {
PageVO page = new PageVO(); PageVO page = new PageVO();
page.setRows(10000); page.setRows(10000);
page.setPage(1); page.setPage(1);
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class); OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang()); query.setLang(event.getLang());
PageResult<OrderBackPageVO> orderPage = orderQueryService.orderPage(query, page); PageResult<OrderBackPageVO> orderPage = orderQueryService.myOrderPage(query, page);
if (CollectionUtil.isNotEmpty(orderPage.getList())) { if (CollectionUtil.isNotEmpty(orderPage.getList())) {
String nameZh = String.format("自编号%s的订单费用汇总统计", query.getContainerNumber()); String nameZh = String.format("自编号%s的订单费用汇总统计", query.getContainerNumber());
String nameEn = String.format("Summary Statistics of Order Expenses from ID%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; ...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo; import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
...@@ -50,7 +51,7 @@ public class CustomsOrderExcelExportListener { ...@@ -50,7 +51,7 @@ public class CustomsOrderExcelExportListener {
try { try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); 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()); query.setLang(event.getLang());
List<OrderCustomsDatasExcelVo> list = orderQueryService.getCustomsDatasExcelList(query); List<OrderCustomsDatasExcelVo> list = orderQueryService.getCustomsDatasExcelList(query);
String sheetName = event.getLang() == 0 ? "报关数据统计" : "customs data statistics"; String sheetName = event.getLang() == 0 ? "报关数据统计" : "customs data statistics";
......
...@@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.apollo.core.event.export.ExceptionOrderStatist ...@@ -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.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionStatisticsExcelVo; import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionStatisticsExcelVo;
...@@ -49,7 +50,7 @@ public class ExceptionOrderStatisticsExcelExportListener { ...@@ -49,7 +50,7 @@ public class ExceptionOrderStatisticsExcelExportListener {
try { try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); 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()); query.setLang(event.getLang());
List<OrderExceptionStatisticsExcelVo> list = orderQueryService.getOrderExceptionStatisticsExcel(query); List<OrderExceptionStatisticsExcelVo> list = orderQueryService.getOrderExceptionStatisticsExcel(query);
String sheetName = event.getLang() == 0 ? "异常单统计" : "Order exception statistics"; String sheetName = event.getLang() == 0 ? "异常单统计" : "Order exception statistics";
......
...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils; ...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderHeavyExcelVo; import cn.iocoder.yudao.module.order.vo.order.OrderHeavyExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
...@@ -50,7 +51,7 @@ public class HeavyOrderExcelExportListener { ...@@ -50,7 +51,7 @@ public class HeavyOrderExcelExportListener {
try { try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); 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()); query.setLang(event.getLang());
List<OrderHeavyExcelVo> list = orderQueryService.getHeavyOrderExcelList(query); List<OrderHeavyExcelVo> list = orderQueryService.getHeavyOrderExcelList(query);
String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics"; String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics";
......
...@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.order.listener.export; ...@@ -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.framework.apollo.core.event.export.OrderCargoControlExcelExportEvent;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; 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.service.orderCargoControl.OrderCargoControlService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -32,7 +33,7 @@ public class OrderCargoControlExcelExportListener { ...@@ -32,7 +33,7 @@ public class OrderCargoControlExcelExportListener {
public void orderCargoControlExcelExportEvent(OrderCargoControlExcelExportEvent event) { public void orderCargoControlExcelExportEvent(OrderCargoControlExcelExportEvent event) {
if (StringUtils.isNotBlank(event.getRequestParams())){ if (StringUtils.isNotBlank(event.getRequestParams())){
try { try {
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class); OrderQueryDTO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryDTO.class);
query.setLang(event.getLang()); query.setLang(event.getLang());
FileDO fileDO = orderCargoControlService.makeCargoControlOrderExcelFile(event.getUserId(), event.getUserType(), query); FileDO fileDO = orderCargoControlService.makeCargoControlOrderExcelFile(event.getUserId(), event.getUserType(), query);
event.setPath(fileDO.getPath()); event.setPath(fileDO.getPath());
......
...@@ -33,27 +33,27 @@ public class OrderExcelExportListener { ...@@ -33,27 +33,27 @@ public class OrderExcelExportListener {
* *
* @param event 编号记录 * @param event 编号记录
*/ */
@EventListener(OrderExcelExportEvent.class) // @EventListener(OrderExcelExportEvent.class)
public void orderExcelExportEvent(OrderExcelExportEvent event) throws IOException { // public void orderExcelExportEvent(OrderExcelExportEvent event) throws IOException {
if (StringUtils.isNotBlank(event.getRequestParams())){ // if (StringUtils.isNotBlank(event.getRequestParams())){
try { // try {
OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class); // OrderQueryVO query = JSONObject.parseObject(event.getRequestParams(), OrderQueryVO.class);
query.setLang(event.getLang()); // query.setLang(event.getLang());
FileDO fileDO = orderQueryService.makeOrderExcelFile(event.getUserId(), event.getUserType(), query); // FileDO fileDO = orderQueryService.makeOrderExcelFile(event.getUserId(), event.getUserType(), query);
event.setPath(fileDO.getPath()); // event.setPath(fileDO.getPath());
event.setFileName(fileDO.getPath()); // event.setFileName(fileDO.getPath());
event.setUrl(fileDO.getUrl()); // event.setUrl(fileDO.getUrl());
event.setFileId(fileDO.getId()); // event.setFileId(fileDO.getId());
}catch (Exception e){ // }catch (Exception e){
// TODO 测试阶段打印堆栈错误信息,便于分析原因 // // TODO 测试阶段打印堆栈错误信息,便于分析原因
e.printStackTrace(); // e.printStackTrace();
event.setResult(e.getMessage()); // event.setResult(e.getMessage());
} // }
}else { // }else {
event.setResult("param fail"); // event.setResult("param fail");
} // }
//
} // }
@EventListener(OrderExcelExportEvent.class) @EventListener(OrderExcelExportEvent.class)
public void MyOrderExcelExportEvent(OrderExcelExportEvent event) throws IOException { public void MyOrderExcelExportEvent(OrderExcelExportEvent event) throws IOException {
......
...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils; ...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderReturnOrderExcelVo; import cn.iocoder.yudao.module.order.vo.order.OrderReturnOrderExcelVo;
...@@ -50,7 +51,7 @@ public class ReturnOrderExcelExportListener { ...@@ -50,7 +51,7 @@ public class ReturnOrderExcelExportListener {
try { try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); 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()); query.setLang(event.getLang());
List<OrderReturnOrderExcelVo> list = orderQueryService.getReturnOrderExcelList(query); List<OrderReturnOrderExcelVo> list = orderQueryService.getReturnOrderExcelList(query);
String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics"; String sheetName = event.getLang() == 0 ? "重货单统计" : "heavy order statistics";
......
...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils; ...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderSaleRepayExcelVo; import cn.iocoder.yudao.module.order.vo.order.OrderSaleRepayExcelVo;
...@@ -50,7 +51,7 @@ public class SaleRepayOrderExcelExportListener { ...@@ -50,7 +51,7 @@ public class SaleRepayOrderExcelExportListener {
try { try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); 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()); query.setLang(event.getLang());
List<OrderSaleRepayExcelVo> list = orderQueryService.getSaleRepayExcelList(query); List<OrderSaleRepayExcelVo> list = orderQueryService.getSaleRepayExcelList(query);
String sheetName = event.getLang() == 0 ? "售后赔偿金额统计" : "sale repay statistics"; String sheetName = event.getLang() == 0 ? "售后赔偿金额统计" : "sale repay statistics";
......
...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils; ...@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; 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.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo; import cn.iocoder.yudao.module.order.vo.order.OrderCustomsDatasExcelVo;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
...@@ -51,7 +52,7 @@ public class ShippingOrderExcelExportListener { ...@@ -51,7 +52,7 @@ public class ShippingOrderExcelExportListener {
try { try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); 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()); query.setLang(event.getLang());
List<OrderShipDataExcelVo> list = orderQueryService.getShipDatasExcelList(query); List<OrderShipDataExcelVo> list = orderQueryService.getShipDatasExcelList(query);
String sheetName = event.getLang() == 0 ? "客户出货量统计" : "shipping data statistics"; String sheetName = event.getLang() == 0 ? "客户出货量统计" : "shipping data statistics";
......
...@@ -186,6 +186,8 @@ public interface OrderQueryService { ...@@ -186,6 +186,8 @@ public interface OrderQueryService {
PageResult<OrderBackPageVO> adminCargoControlOrderPage(OrderQueryVO query, PageVO page); PageResult<OrderBackPageVO> adminCargoControlOrderPage(OrderQueryVO query, PageVO page);
PageResult<OrderBackPageVO> adminCargoControlMyOrderPage(OrderQueryDTO query, PageVO page);
PageResult<OrderBackPageVO> appCargoControlOrderPage(OrderQueryVO query, PageVO page); PageResult<OrderBackPageVO> appCargoControlOrderPage(OrderQueryVO query, PageVO page);
...@@ -320,19 +322,19 @@ public interface OrderQueryService { ...@@ -320,19 +322,19 @@ public interface OrderQueryService {
FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception; 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 { ...@@ -1115,6 +1115,19 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize()); 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 @Override
public PageResult<OrderBackPageVO> appCargoControlOrderPage(OrderQueryVO query, PageVO page) { public PageResult<OrderBackPageVO> appCargoControlOrderPage(OrderQueryVO query, PageVO page) {
query.setLang(I18nMessage.getLang()); query.setLang(I18nMessage.getLang());
...@@ -1127,7 +1140,6 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1127,7 +1140,6 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize()); return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
} }
@Override @Override
public PageResult<OrderBackPageVO> receivedOrderPage(OrderQueryVO query, PageVO page) { public PageResult<OrderBackPageVO> receivedOrderPage(OrderQueryVO query, PageVO page) {
query.setLang(I18nMessage.getLang()); query.setLang(I18nMessage.getLang());
...@@ -1878,7 +1890,7 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1878,7 +1890,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
public FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception { public FileDO makeMyOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); String nowTime = formatter.format(LocalDateTime.now());
caseStatus(query.getStatus(),query);
String sheetName = query.getLang() == 0 ? "订单管理第{0}页" : "Order Management number {0}"; String sheetName = query.getLang() == 0 ? "订单管理第{0}页" : "Order Management number {0}";
if (Objects.isNull(userId)) { if (Objects.isNull(userId)) {
userId = 0L; userId = 0L;
...@@ -1960,7 +1972,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1960,7 +1972,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return * @return
*/ */
@Override @Override
public List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryVO query) { public List<OrderExceptionStatisticsExcelVo> getOrderExceptionStatisticsExcel(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getOrderExceptionStatisticsList(query); return orderMapper.getOrderExceptionStatisticsList(query);
} }
...@@ -1970,7 +1983,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1970,7 +1983,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return * @return
*/ */
@Override @Override
public List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryVO query) { public List<OrderHeavyExcelVo> getHeavyOrderExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getHeavyOrderExcelList(query); return orderMapper.getHeavyOrderExcelList(query);
} }
...@@ -1981,7 +1995,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1981,7 +1995,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return * @return
*/ */
@Override @Override
public List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryVO query) { public List<OrderReturnOrderExcelVo> getReturnOrderExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getReturnOrderExcelList(query); return orderMapper.getReturnOrderExcelList(query);
} }
...@@ -1992,7 +2007,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1992,7 +2007,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return * @return
*/ */
@Override @Override
public List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryVO query) { public List<OrderSaleRepayExcelVo> getSaleRepayExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getSaleRepayExcelList(query); return orderMapper.getSaleRepayExcelList(query);
} }
...@@ -2003,7 +2019,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -2003,7 +2019,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return * @return
*/ */
@Override @Override
public List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryVO query) { public List<OrderCustomsDatasExcelVo> getCustomsDatasExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getCustomsDatasExcelList(query); return orderMapper.getCustomsDatasExcelList(query);
} }
...@@ -2014,7 +2031,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -2014,7 +2031,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return * @return
*/ */
@Override @Override
public List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryVO query) { public List<OrderShipDataExcelVo> getShipDatasExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getShipDatasExcelList(query); return orderMapper.getShipDatasExcelList(query);
} }
...@@ -2025,7 +2043,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -2025,7 +2043,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
* @return * @return
*/ */
@Override @Override
public List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryVO query) { public List<OrderShipFeeExcelVo> getShipFeeExcelList(OrderQueryDTO query) {
caseStatus(query.getStatus(),query);
return orderMapper.getShipFeeExcelList(query); return orderMapper.getShipFeeExcelList(query);
} }
......
...@@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; ...@@ -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.member.dal.dataobject.user.MemberUserDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO; 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.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.OrderBackPageVO;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.order.OrderSendSmsReqVO; import cn.iocoder.yudao.module.order.vo.order.OrderSendSmsReqVO;
...@@ -107,8 +108,9 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO> ...@@ -107,8 +108,9 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO>
void exportCargoControlOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException; 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 ...@@ -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.dataobject.orderConsignor.OrderConsignorDO;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper; 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.OrderCargoControlReleaseInfoDto;
import cn.iocoder.yudao.module.order.dto.OrderQueryDTO;
import cn.iocoder.yudao.module.order.enums.OrderStatusEnum; 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.OrderBusinessService;
import cn.iocoder.yudao.module.order.service.order.OrderConsignorService; import cn.iocoder.yudao.module.order.service.order.OrderConsignorService;
...@@ -42,6 +43,7 @@ import com.alibaba.excel.ExcelWriter; ...@@ -42,6 +43,7 @@ import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder;
...@@ -56,10 +58,7 @@ import java.net.URLEncoder; ...@@ -56,10 +58,7 @@ import java.net.URLEncoder;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.Collection; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
...@@ -384,7 +383,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -384,7 +383,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
} }
@Override @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); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now()); String nowTime = formatter.format(LocalDateTime.now());
...@@ -408,7 +407,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -408,7 +407,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
OutputStream out = new FileOutputStream(path); OutputStream out = new FileOutputStream(path);
ExcelWriter excelWriter = EasyExcel.write(out, OrderCargoControlExcelVO.class).inMemory(true).build(); ExcelWriter excelWriter = EasyExcel.write(out, OrderCargoControlExcelVO.class).inMemory(true).build();
PageVO page = new PageVO(); PageVO page = new PageVO();
PageResult<OrderBackPageVO> pageResult = orderQueryService.adminCargoControlOrderPage(query, page); PageResult<OrderBackPageVO> pageResult = orderQueryService.adminCargoControlMyOrderPage(query, page);
long total = pageResult.getTotal(); long total = pageResult.getTotal();
int pageNumber = (int) Math.ceil((double) total / (double) PAGE_SIZE); //分页条数看情况 int pageNumber = (int) Math.ceil((double) total / (double) PAGE_SIZE); //分页条数看情况
// 去调用写入,根据数据库分页的总的页数来 // 去调用写入,根据数据库分页的总的页数来
...@@ -419,7 +418,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -419,7 +418,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
page.setPage(i); page.setPage(i);
page.setRows(PAGE_SIZE); page.setRows(PAGE_SIZE);
page.setField("o.order_id"); 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 -> { List<OrderCargoControlExcelVO> pageList = mpPage.getList().stream().map(backPageVO -> {
OrderCargoControlExcelVO excelVO = new OrderCargoControlExcelVO(); OrderCargoControlExcelVO excelVO = new OrderCargoControlExcelVO();
BeanUtils.copyProperties(backPageVO, excelVO); BeanUtils.copyProperties(backPageVO, excelVO);
......
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
WHERE WHERE
e.order_exception_status !=2 and o.deleted=0 e.order_exception_status !=2 and o.deleted=0
<include refid="orderQuerySql"> <include refid="myOrderQuerySql">
</include> </include>
</select> </select>
...@@ -509,6 +509,256 @@ ...@@ -509,6 +509,256 @@
</if> </if>
</sql> </sql>
<sql id="myOrderQuerySql">
<!-- <if test="query.status != null">-->
<!-- AND o.`status` = #{query.status}-->
<!-- </if>-->
<if test="query.statusList != null and query.statusList.size()>0">
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()==1 ">
AND o.`status` =
<foreach item='status' index="index" collection='query.statusList' >
#{status}
</foreach>
</if>
<if test="query.statusList != null and query.statusList != '' and query.statusList.size()>1 ">
AND o.`status` in
<foreach item='status' index="index" collection='query.statusList' open='(' separator=',' close=')'>
#{status}
</foreach>
</if>
</if>
<if test="query.salesmanId != null and query.creator">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ) or o.`creator` = #{query.creator})
</if>
<!-- <if test="query.customsType != null">-->
<!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<!-- <if test="query.productRecord != null">-->
<!-- AND o.`product_record` = #{query.productRecord}-->
<!-- </if>-->
<if test="query.customsType != null and query.customsType.size()>0">
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsType' >
#{customsType}
</foreach>
</if>
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsType' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
</if>
<if test="query.productRecord != null and query.productRecord.size()>0">
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecord' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecord' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
</if>
<if test="query.transportId != null">
AND o.`transport_id` = #{query.transportId}
</if>
<!-- <if test="query.warehouseType != null">-->
<!-- AND o.`warehouse_type` = #{query.warehouseType}-->
<!-- </if>-->
<if test="query.warehouseType != null and query.warehouseType.size()>0">
<if test="query.warehouseType != null and query.warehouseType != '' and query.warehouseType.size()==1 ">
AND o.`warehouse_type` =
<foreach item='warehouseType' index="index" collection='query.warehouseType' >
#{warehouseType}
</foreach>
</if>
<if test="query.warehouseType != null and query.warehouseType != '' and query.warehouseType.size()>1 ">
AND o.`warehouse_type` in
<foreach item='warehouseType' index="index" collection='query.warehouseType' open='(' separator=',' close=')'>
#{warehouseType}
</foreach>
</if>
</if>
<if test="query.packageType != null and query.packageType != '' ">
AND CONCAT(',',o.package_type,',') REGEXP CONCAT(',',REPLACE(#{query.packageType},',',',|,'), ',')
</if>
<if test="query.number != null and query.number != '' ">
AND (o.`number` like concat("%",concat(#{query.number},"%")) or o.order_id in( select distinct oi.order_id
from ecw_order_item oi
where oi.deleted = 0 and
((oi.warehouse_in_info is null and oi.express_no like concat('%',concat(#{query.number},'%')))
or (oi.warehouse_in_info is not null and oi.warehouse_in_info ->> '$.expressNo' like concat("%",concat(#{query.number},"%"))))))
</if>
<if test="query.notNumber != null and query.notNumber != '' ">
AND o.`number` not like concat("%",concat(#{query.notNumber},"%"))
and
o.order_id not in
(select distinct oi.order_id from ecw_order_item oi
where oi.deleted = 0 and
((oi.warehouse_in_info is null and oi.express_no like concat("%",concat(#{query.notNumber},"%")))
or
(oi.warehouse_in_info is not null and oi.warehouse_in_info ->> '$.expressNo' like
concat("%",concat(#{query.notNumber},"%")))))
</if>
<if test="query.marks != null and query.marks != '' ">
AND o.`marks` like concat("%",concat(#{query.marks},"%"))
</if>
<if test="query.consignorId != null ">
AND r.`customer_id` = #{query.consignorId}
</if>
<if test="query.consigneeId != null ">
AND c.`customer_id` = #{query.consigneeId}
</if>
<if test="query.isCargoControl != null ">
AND o.`is_cargo_control` = #{query.isCargoControl}
</if>
<if test="query.orderNo != null and query.orderNo != '' ">
AND o.`order_no` like concat("%",concat(#{query.orderNo},"%"))
</if>
<if test="query.orderIdList != null and query.orderIdList.size() != 0">
AND o.`order_id` in
<foreach item='orderId' index='index' collection='query.orderIdList' open='(' separator=',' close=')'>
#{orderId}
</foreach>
</if>
<if test="query.tidanNo != null and query.tidanNo != '' ">
AND o.`tidan_no` like concat("%",concat(#{query.tidanNo},"%"))
</if>
<if test="query.userId != null">
AND o.`user_id` = #{query.userId}
</if>
<if test="query.customerId != null">
AND o.`customer_id` = #{query.customerId}
</if>
<if test="query.beginRucangTime != null and query.endRucangTime != null ">
AND o.`rucang_time` between #{query.beginRucangTime} and #{query.endRucangTime}
</if>
<if test="query.beginQingguanTime != null and query.endQingguanTime != null ">
AND o.`qingguan_time` between #{query.beginQingguanTime} and #{query.endQingguanTime}
</if>
<if test="query.beginDaogangTime != null and query.endDaogangTime != null ">
AND o.`daogang_time` between #{query.beginDaogangTime} and #{query.endDaogangTime}
</if>
<if test="query.beginPreLoadTime != null and query.endPreLoadTime != null ">
AND o.`pre_load_time` between #{query.beginPreLoadTime} and #{query.endPreLoadTime}
</if>
<if test="query.beginOutboundTime != null and query.endOutboundTime != null ">
AND o.`status` > 5 AND o.container_number in(select distinct b.self_no from ecw_box_air_checkout bc join ecw_box b ON bc.shipment_id = b.id
where b.deleted = 0 and bc.deleted = 0 and bc.`checkout_time` between #{query.beginOutboundTime} and #{query.endOutboundTime})
</if>
<if test="query.beginLoadTime != null and query.endLoadTime != null ">
AND o.`load_time` between #{query.beginLoadTime} and #{query.endLoadTime}
</if>
<if test="query.beginUnloadTime != null and query.endUnloadTime != null ">
AND o.`unload_time` between #{query.beginUnloadTime} and #{query.endUnloadTime}
</if>
<if test="query.beginTakeTime != null and query.endTakeTime != null ">
AND o.`take_time` between #{query.beginTakeTime} and #{query.endTakeTime}
</if>
<if test="query.beginSplitTime != null and query.endSplitTime != null ">
AND o.`split_time` between #{query.beginSplitTime} and #{query.endSplitTime}
</if>
<if test="query.beginCreateTime != null and query.endCreateTime != null ">
AND o.`create_time` between #{query.beginCreateTime} and #{query.endCreateTime}
</if>
<if test="query.searchKey != null and query.searchKey != '' ">
AND concat(IFNULL(o.`order_no`,''),IFNULL(o.`parent_number`,''),IFNULL(o.`initial_parent_order_no`,''),
IFNULL(o.`old_numbers`,''),IFNULL(o.`marks`,''),IFNULL(nee.`name`,''),IFNULL(nee.`phone`,'')) like
concat("%",concat(#{query.searchKey},"%"))
</if>
<if test="query.numberKey != null and query.numberKey != '' ">
AND concat(IFNULL(o.`order_no`,''), IFNULL(o.`old_numbers`,''),IFNULL(o.`parent_number`,''), IFNULL(o.`initial_parent_order_no`,'')
,IFNULL(o.`marks`,''),IFNULL(o.`tidan_no`,''),IFNULL(o.`container_number`,'')) like concat("%",concat(#{query.numberKey},"%"))
</if>
<if test="query.prodKey != null and query.prodKey != '' ">
and (o.order_id in(
select oi.order_id
from ecw_order_item oi
left join ecw_product p
on oi.prod_id = p.id
left join ecw_product_type pt
on pt.id = oi.prod_type
left join ecw_product_brank pb
on pb.id = oi.brand
where oi.deleted = 0 and
concat(IFNULL(oi.`prod_title_zh`,''),IFNULL(oi.`prod_title_en`,''),IFNULL(pt.`title_zh`,''),IFNULL(pt.`title_en`,''),
IFNULL(pb.`title_zh`,''),IFNULL(pb.`title_en`,''))
like concat("%",concat(#{query.prodKey},"%"))
))
</if>
<if test="query.notProdKey != null and query.notProdKey != '' ">
and (o.order_id not in(
select oi.order_id
from ecw_order_item oi
left join ecw_product p
on oi.prod_id = p.id
left join ecw_product_type pt
on pt.id = oi.prod_type
left join ecw_product_brank pb
on pb.id = oi.brand
where oi.deleted = 0 and
concat(IFNULL(oi.`prod_title_zh`,''),IFNULL(oi.`prod_title_en`,''),IFNULL(pt.`title_zh`,''),IFNULL(pt.`title_en`,''),
IFNULL(pb.`title_zh`,''),IFNULL(pb.`title_en`,''))
like concat("%",concat(#{query.notProdKey},"%"))
))
</if>
<if test="query.eqProdKey != null and query.eqProdKey != '' ">
and (o.order_id in(
select oi.order_id
from ecw_order_item oi
left join ecw_product p
on oi.prod_id = p.id
left join ecw_product_type pt
on pt.id = oi.prod_type
left join ecw_product_brank pb
on pb.id = oi.brand
where oi.deleted = 0 and (oi.`prod_title_zh` = #{query.eqProdKey} or oi.`prod_title_en` = #{query.eqProdKey}
or pt.`title_zh` = #{query.eqProdKey} or pt.`title_en` = #{query.eqProdKey}
or pb.`title_zh` = #{query.eqProdKey} or pb.`title_en` = #{query.eqProdKey})
))
</if>
<if test="query.notEqProdKey != null and query.notEqProdKey != '' ">
and (o.order_id not in(
select oi.order_id
from ecw_order_item oi
left join ecw_product p
on oi.prod_id = p.id
left join ecw_product_type pt
on pt.id = oi.prod_type
left join ecw_product_brank pb
on pb.id = oi.brand
where oi.deleted = 0 and (oi.`prod_title_zh` = #{query.notEqProdKey} or oi.`prod_title_en` = #{query.notEqProdKey}
or pt.`title_zh` = #{query.notEqProdKey} or pt.`title_en` = #{query.notEqProdKey}
or pb.`title_zh` = #{query.notEqProdKey} or pb.`title_en` = #{query.notEqProdKey})
))
</if>
<if test="query.isNeat == false ">
AND o.sum_num <![CDATA[ < ]]> o.cost->>'$.totalNum'
</if>
<if test="query.isNeat == true ">
AND o.sum_num = o.cost->>'$.totalNum'
</if>
</sql>
<select id="getHeavyOrderExcelList" <select id="getHeavyOrderExcelList"
resultType="cn.iocoder.yudao.module.order.vo.order.OrderHeavyExcelVo"> resultType="cn.iocoder.yudao.module.order.vo.order.OrderHeavyExcelVo">
...@@ -526,7 +776,7 @@ ...@@ -526,7 +776,7 @@
LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
where o.order_type = 2 and o.deleted = 0 and eoi.warehouse_in_info is not null where o.order_type = 2 and o.deleted = 0 and eoi.warehouse_in_info is not null
<include refid="orderQuerySql"> <include refid="myOrderQuerySql">
</include> </include>
</select> </select>
...@@ -547,7 +797,7 @@ ...@@ -547,7 +797,7 @@
LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
where eowa.type = 3 and eowa.`status` = 2 and o.deleted = 0 and (eoi.volume is not null and eoi.volume != 0.00) where eowa.type = 3 and eowa.`status` = 2 and o.deleted = 0 and (eoi.volume is not null and eoi.volume != 0.00)
<include refid="orderQuerySql"> <include refid="myOrderQuerySql">
</include> </include>
</select> </select>
...@@ -568,7 +818,7 @@ ...@@ -568,7 +818,7 @@
LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
where ecc.status = 3 and o.deleted = 0 where ecc.status = 3 and o.deleted = 0
<include refid="orderQuerySql"> <include refid="myOrderQuerySql">
</include> </include>
</select> </select>
...@@ -583,7 +833,7 @@ ...@@ -583,7 +833,7 @@
ecw_order o ecw_order o
LEFT JOIN ecw_order_item eoi on eoi.order_id = o.order_id LEFT JOIN ecw_order_item eoi on eoi.order_id = o.order_id
where o.deleted = 0 and o.shipment_state >320 and o.shipment_state !=323 where o.deleted = 0 and o.shipment_state >320 and o.shipment_state !=323
<include refid="orderQuerySql"> <include refid="myOrderQuerySql">
</include> </include>
</select> </select>
...@@ -609,7 +859,7 @@ ...@@ -609,7 +859,7 @@
left join ecw_order_item eoi on o.order_id = eoi.order_id left join ecw_order_item eoi on o.order_id = eoi.order_id
left join ecw_order_objective ob on o.order_id = ob.order_id left join ecw_order_objective ob on o.order_id = ob.order_id
where o.deleted = 0 and o.shipment_state > 314 and con.`is_default` = 1 where o.deleted = 0 and o.shipment_state > 314 and con.`is_default` = 1
<include refid="orderQuerySql"> <include refid="myOrderQuerySql">
</include> </include>
</select> </select>
...@@ -627,7 +877,7 @@ ...@@ -627,7 +877,7 @@
left join ecw_order o on eoi.order_id = o.order_id left join ecw_order o on eoi.order_id = o.order_id
left join ecw_currency ec on eoi.sea_freight_currency = ec.id left join ecw_currency ec on eoi.sea_freight_currency = ec.id
and eoi.deleted = 0 and o.deleted = 0 and eoi.deleted = 0 and o.deleted = 0
<include refid="orderQuerySql"> <include refid="myOrderQuerySql">
</include> </include>
</select> </select>
...@@ -2753,6 +3003,95 @@ ...@@ -2753,6 +3003,95 @@
limit #{start}, #{size} limit #{start}, #{size}
</select> </select>
<select id="adminCargoControlMyOrderList" resultType="cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO">
select o.order_id,
o.package_type as advance_type,
o.package_remarks,
o.number,
o.order_no,
o.tidan_no,
o.type,
o.order_type,
o.air_shipment,
IFNULL((select SUM(IF(it.charge_volume > it.min_metering_volume, it.charge_volume, it.min_metering_volume)) FROM
ecw_order_item it WHERE it.order_id = o.order_id and it.deleted = 0 and it.warehouse_in_info IS NOT NULL), 0) as
w_volume,
IFNULL((select SUM(IF( it.charge_weight > it.min_metering_weight, it.charge_weight, it.min_metering_weight))
FROM ecw_order_item it WHERE it.order_id = o.order_id and it.deleted = 0 and it.warehouse_in_info IS NOT NULL),
0) as v_weight,
o.customs_type,
if(#{query.customerDetailId} is not null and #{query.customerDetailId} > 0, (select min(owi.`in_time`) from
ecw_order_warehouse_in owi where owi.deleted = 0 and owi.order_id = o.order_id ), o.rucang_time ) as
rucang_time,
o.cost,
o.parent_number,
o.parent_order_id,
o.initial_parent_order_id,
if(#{query.lang} = 0, de.departure ->> '$.titleZh', de.departure ->> '$.titleEn') as departure_name,
if(#{query.lang} = 0, ob.objective ->> '$.titleZh', ob.objective ->> '$.titleEn') as objective_name,
de.departure_id,
ob.objective_id,
o.adjust_to_start_warehouse_id,
o.marks,
o.salesman_id,
o.status,
o.abnormal_state,
o.in_warehouse_state,
o.shipment_state,
o.audit_type,
o.audit_result,
o.guan_lian_order_status,
o.transport_id,
(select ifnull(sum(ccp.pick_num),0) from ecw_order_cargo_control_pick ccp where ccp.order_id = o.order_id and
ccp.status in(1,2,3,4) ) as release_num,
o.is_cargo_control,
o.cargo_control_status,
o.cost ->> '$.totalNum' as total_num,
o.sum_num,
o.sum_volume,
o.sum_weight,
o.sum_weight_finished_warehouse_in,
o.sum_volume_finished_warehouse_in,
o.packing_list_url,
o.is_external_warehouse,
o.exception_reason,
o.is_exception,
o.create_time,
o.load_time,
(select su.nickname from system_user su where su.deleted = 0 and su.id = o.salesman_id) as salesman_name,
(select min(wi.`in_time`) from ecw_order_warehouse_in wi where wi.deleted = 0 and wi.order_id = o.order_id ) as
in_time,
if(#{query.userType} = 1, 1, 2) as user_type,
nor.name as consignor_name,
nor.name_en as consignor_name_en,
nor.phone as consignor_phone,
nor.country_code as consignor_country_code,
nee.name as consignee_name,
nee.name_en as consignee_name_en,
nee.phone as consignee_phone,
nee.country_code as consignee_country_code,
if(#{query.lang} = 0, channel.name_zh, channel.name_en) as channel_name,
occ.name as cargo_control_name,
occ.name_en as cargo_control_name_en,
occ.phone as cargo_control_phone,
occ.dial_code as cargo_control_country_code,
o.update_time,
#{query.lang} as lang
from ecw_order o
left join ecw_order_departure de on de.order_id = o.order_id
left join ecw_order_objective ob on ob.order_id = o.order_id
left join ecw_order_consignor nor on nor.order_id = o.order_id
left join ecw_order_consignee nee on nee.order_id = o.order_id
left join ecw_channel channel on channel.channel_id = o.channel_id
left join ecw_order_cargo_control occ
on occ.order_id = o.order_id and occ.is_actual = 1 and occ.deleted = 0
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
and o.is_cargo_control = 1
<include refid="myOrderQuery"/>
order by o.order_id desc
limit #{start}, #{size}
</select>
<select id="adminCargoControlOrderCount" resultType="java.lang.Long"> <select id="adminCargoControlOrderCount" resultType="java.lang.Long">
select count(1) select count(1)
from ecw_order o from ecw_order o
...@@ -2768,6 +3107,21 @@ ...@@ -2768,6 +3107,21 @@
<include refid="orderQuery"/> <include refid="orderQuery"/>
</select> </select>
<select id="adminCargoControlMyOrderCount" resultType="java.lang.Long">
select count(1)
from ecw_order o
left join ecw_order_departure de on de.order_id = o.order_id
left join ecw_order_objective ob on ob.order_id = o.order_id
left join ecw_order_consignor nor on nor.order_id = o.order_id
left join ecw_order_consignee nee on nee.order_id = o.order_id
left join ecw_channel channel on channel.channel_id = o.channel_id
left join ecw_order_cargo_control occ
on occ.order_id = o.order_id and occ.is_actual = 1 and occ.deleted = 0
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
and o.is_cargo_control = 1
<include refid="myOrderQuery"/>
</select>
<select id="appCargoControlOrderList" resultType="cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO"> <select id="appCargoControlOrderList" resultType="cn.iocoder.yudao.module.order.vo.order.OrderBackPageVO">
select select
o.order_id, o.order_id,
......
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