chenlu
2024-04-11 1b2f7cbe26f32310f528958da66ad81d4e48ca44
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
35个文件已修改
1415 ■■■■ 已修改文件
north-glass-erp/.idea/dataSources.local.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/BasicTable.vue 175 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/hook/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/StorageRecord.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue 190 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderDetail.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml 340 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/OrderDetail.xml 340 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/.idea/dataSources.local.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="dataSourceStorageLocal" created-in="IU-232.9559.62">
  <component name="dataSourceStorageLocal" created-in="IU-232.8660.185">
    <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
      <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0">
        <extra-name-characters>#@</extra-name-characters>
north-glass-erp/northglass-erp/src/components/BasicTable.vue
@@ -1,13 +1,19 @@
<script setup>
import {Search} from "@element-plus/icons-vue"
import {reactive, ref} from "vue"
import {defineEmits, onMounted, reactive, ref, watch} from "vue"
import {changeFilterEvent} from "@/hook"
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
const xGrid = ref()
let filterData = ref({})
const gridOptions = reactive({
  loading:true,
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'OrderReport',
  showFooter: true,//显示脚
  printConfig: {},
@@ -31,45 +37,7 @@
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {type: 'seq',fixed:"left", title: '自序', width: 80 },
    {field: '1',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '2',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '3',width:120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '4',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '5',width:120, title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '6',width:120, title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '7',width:120, title: '产品编码',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '8',width:120, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '9',width:120, title: '订单序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '半径',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '实际面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '主加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '商标选项',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '包装方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '铝条方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '送货地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '制单员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '建立时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '总厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '产品大类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '产品小类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'prodID',width:120, title: '客户批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
  ],//表头按钮
  toolbarConfig: {
@@ -88,39 +56,146 @@
        if (columnIndex === 0) {
          return '合计:'
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        if (props.childrenData.footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
  }
})
const props = defineProps({
  childrenData:{
    Object,
    default: ''
  }
})
const basicProp = ref({
  pageSize : 100,//页面显示数量
  pageNum:1,//当前页
  selectDate:['',''],//查询的日期
  pageTotal : 0,//总页数
  dataTotal : 0,//数据总条数
})
const sumNum = (list, field) => {
  let count = 0
  list.forEach(item => {
    count += Number(item[field])
  })
  return count.toFixed(2)
}
watch(props, (newVal) => {
  xGrid.value.loadData(props.childrenData.data)
  gridOptions.loading = false
})
onMounted(() => {
  gridOptions.columns = props.childrenData.columns
  getReportData()
})
function filterChanged(column){
  //gridOptions.loading=true
  //筛选条件发生变化条件发生变化
  let value = column.datas[0]!=undefined?column.datas[0]:''
  value = value.trim()
  //判断是否存在外键
  if (column.property.indexOf('.')>-1){
    const  columnArr = column.property.split('.')
    filterData.value[columnArr[0]] = {
      [columnArr[1]]:value
    }
  }else{
    filterData.value[column.property] = value
  }
  gridOptions.loading = true
  getReportData()
}
const handlePageChange = ({ currentPage, pageSize }) => {
  basicProp.value.pageNum = currentPage
  basicProp.value.pageTotal = pageSize
  gridOptions.loading = true
  getReportData()
}
const dateChanged = () => {
  gridOptions.loading = true
  getReportData()
}
const  getReportData = () => {
  request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${basicProp.value.selectDate}`,filterData.value).then(res => {
    if(res.code === '200'){
      props.childrenData.data = res.data.data
      basicProp.value.pageTotal = res.data.total.pageTotal
      basicProp.value.dataTotal = res.data.total.total
      basicProp.value.selectDate = res.data.selectDate
    }
  })
}
</script>
<template>
  <div class="main-div">
    <el-date-picker
        v-model="value1"
        v-model="basicProp.selectDate"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
        format="YYYY-MM-DD"
        value-format="YYYY-MM-DD"
    />
    <el-button style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <el-button
        @click="dateChanged"
        id="searchButton"
        type="primary"
        style="margin-top: -5px"
        :icon="Search">查询</el-button>
    <div class="order-detail">
      <vxe-grid
          max-height="97%"
          @filter-change="filterChanged"
          height="110%"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
      ></vxe-grid>
      >
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
        <template #pager>
          <!--使用 pager 插槽-->
          <!--        'PrevJump','NextJump', -->
          <vxe-pager
              @page-change="handlePageChange"
              :layouts="[  'PrevPage', 'Jump','PageCount', 'NextPage',  'Total']"
              v-model:current-page="basicProp.pageNum"
              v-model:page-size="basicProp.pageSize"
              v-model:pager-count="basicProp.pageTotal"
              :total="basicProp.dataTotal"
          >
          </vxe-pager>
        </template>
      </vxe-grid>
    </div>
  </div>
</template>
<style scoped>
<style scoped >
.main-div {
  width: 100%;
  height: 100%;
@@ -139,7 +214,7 @@
}
.order-detail{
  width: 100%;
  height: 90%;
  height:  calc(100% - 30px);
}
</style>
north-glass-erp/northglass-erp/src/hook/index.js
@@ -9,7 +9,7 @@
// 筛选函数
const filterChanged = ({ option, row, column }) => {
    if (option.data) {
        return row[column.field].toString().toLowerCase().indexOf(option.data) > -1
        return row[column.field].toString().indexOf(option.data) > -1
    }
    return true
}
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
@@ -66,7 +66,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
let filterData = ref({
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue
@@ -64,7 +64,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
let filterData = ref({
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
@@ -52,7 +52,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
let filterData = ref({
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
@@ -80,7 +80,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue
@@ -163,7 +163,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
//第一次调用
request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => {
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue
@@ -84,7 +84,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue
@@ -162,7 +162,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
//第一次调用
request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => {
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
@@ -78,7 +78,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
//第一次调用1
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
@@ -69,7 +69,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
@@ -218,7 +218,7 @@
    buttons: [
      { 'code' :'issue','name':t('productStock.orderTransfer'),status: 'primary'},
      { 'code' :'out','name':t('productStock.finishedProductPickup'),status: 'primary'},
      { 'code' :'rework','name':t('productStock.finishedProductRework'),status: 'primary'},
      /*{ 'code' :'rework','name':t('productStock.finishedProductRework'),status: 'primary'},*/
    ],
    /*import: false,
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue
@@ -62,7 +62,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
let selectDate = ref(["",""])
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/StorageRecord.vue
@@ -66,7 +66,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
onMounted(()=>{
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue
@@ -64,7 +64,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
//第一次调用
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue
@@ -65,7 +65,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
//第一次调用
north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue
@@ -20,6 +20,11 @@
let produceList = ref([])
//定义当前页数
let pageNum=$ref(1)
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 100
})
const  xGrid = ref();
let cellArea = ref()
north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue
@@ -42,7 +42,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
let selectDate = ref(["",""])
north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue
@@ -20,6 +20,11 @@
let produceList = ref([])
//定义当前页数
let pageNum=$ref(1)
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 100
})
const  xGrid = ref();
let cellArea = ref()
north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue
@@ -52,7 +52,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
let selectDate = ref(["",""])
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
@@ -76,7 +76,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
//第一次调用
north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue
@@ -22,7 +22,7 @@
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/delivery/selectDelivery' }">{{$t('delivery.shippingHomepage')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/delivery/selectOrderList' }">{{$t('delivery.orderShipment')}}</el-breadcrumb-item>
<!--        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/delivery/deliveryReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item>-->
        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/delivery/deliveryReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue
@@ -1,149 +1,71 @@
<script setup>
import {Folder, Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import BasicTable from "@/components/BasicTable.vue"
import request from "@/utils/request"
import {onMounted, reactive, ref} from "vue"
import { useI18n } from 'vue-i18n'
//语言获取
const { t } = useI18n()
const selectData = ref(["",""])
let filterData = ref({})
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
const childrenData = ref({
  columns:[
    {type:'expand',slots: { content:'content' },width: 50,fixed:"left"},
    {type: 'seq', title: '自序', width: 80 ,fixed:"left"},
    {field: '0',width:120,  title: '发货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '1',width:120,  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '2',width:120,  title: '客户单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '3',width:120,  title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '4',width:120,  title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '5',width:120,  title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '6',width:120,  title: '送货地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '7',width:120,   title: '发货员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '8',width:120,  title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '9',width:120,  title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '10',width:120,  title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '11',width:120,  title: '发货数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '12',width:120,  title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '13',width:120,  title: '实际面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '14',width:120,  title: '发货面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '15',width:120,   title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '16',width:120,   title: '发货金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '17',width:120,  title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '18',width:120,  title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '19',width:120,  title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '20',width:120,  title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '21',width:120,  title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '22',width:120,  title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '22',width:120,  title: '建立时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
  ],//表头按钮
  toolbarConfig: {
    buttons: [
    ],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  data:  [
  ],//table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        return ''
      })
    ]
  }
    {type: 'seq', title: t('basicData.Number'), width: 80 },
    {field: 'deliveryId',width:120,  title: t('delivery.deliveryNoteId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'creator',width:120,  title: t('delivery.shipper'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'deliveryDate',width:120,  title: t('delivery.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'customerId',width:120,  title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'customerName',width:120,  title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'project',width:120,  title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderId',width:120,   title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'paymentTerms',width:120,  title: t('delivery.paymentTerms'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'payMethod',width:120,  title:t('delivery.paymentMethod'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'quantity',width:120,  title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'area',width:120,  title: t('productStock.totalArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'createTime',width:120,  title: t('productStock.statementDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}
  ],//表格表头字段
  data:[],//表格数据
  pageTotal : 0,//总页数
  dataTotal : 0,//数据总条数
  pageSize : 100,//页面显示数量
  pageNum:1,//当前页
  selectDate:['',''],//查询的日期
  footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount']
})
//页面第一次加载
onMounted(() => {
  getReportData()
})
//封装获取数据方法方法
const  getReportData = () => {
  request.post(`/Delivery/getSelectShippingOrder/${childrenData.value.pageNum}/${childrenData.value.pageSize}/${childrenData.value.selectDate}`,filterData.value).then(res => {
    if(res.code === '200'){
      childrenData.value.data = res.data.data
      childrenData.value.pageTotal = res.data.total.pageTotal
      childrenData.value.dataTotal = res.data.total.total
      childrenData.value.selectDate = res.data.selectDate
    }
  })
}
const getData = (filter) => {
  filterData.value = filter
  getReportData()
}
</script>
<template>
  <div class="main-div">
    <el-date-picker
        v-model="value1"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
    />
    <el-button style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <div class="order-detail">
      <vxe-grid
          max-height="97%"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
      >
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
        <template #content="{ row}">
          <ul class="expand-wrapper">
            <li  v-for="(item,key,index) in row">
              <span style="font-weight: bold">{{key+':  '}}</span>
              <span>{{ item }}</span>
            </li>
          </ul>
        </template>
      </vxe-grid>
    </div>
  </div>
  <basic-table
      @getData="getData"
      :childrenData="childrenData"/>
</template>
<style scoped>
.main-div {
  width: 100%;
  height: 100%;
}
.el-col{
  border: #181818 1px solid;
}
.order-primary{
  width: 100%;
}
.order-detail{
  width: 100%;
  height: 80%;
}
</style>
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -69,7 +69,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
//第一次调用
@@ -198,7 +198,7 @@
    {field: 'deliveryState',title: t('basicData.review'), width: 40, slots: { default: 'state' }},
    {field: 'stockState',title: t('productStock.outbound'), width: 40, slots: { default: 'state' }},
    {field: 'deliveryId',width:120,  title: t('delivery.deliveryNoteNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'deliveryId',width:120,  title: t('delivery.deliveryNoteId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'creator',width:120,  title: t('delivery.shipper'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'deliveryDate',width:120,  title: t('delivery.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'customerId',width:120,  title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue
@@ -63,7 +63,7 @@
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 10
  pageSize : 100
})
north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
@@ -1,19 +1,59 @@
<script setup>
import BasicTable from "@/components/BasicTable.vue"
import request from "@/utils/request"
import {ref} from "vue"
const selectData = ref(["",""])
let data = ref({})
request.post(`/order/getOrderReport/1/100/${selectData.value}`,data.value).then(res => {
  if(res.code === '200'){
    console.log(res.data)
  }
import { ref} from "vue"
const childrenData = ref({
  columns:[
    {type:'expand',fixed:"left",width: 80},
    {type: 'seq',fixed:"left", title: '自序', width: 80 },
    {field: 'order.orderType',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.customerName',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.project',width:120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.orderId',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.batch',width:120, title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'productId',width:120, title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'productName',width:120, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderNumber',width:120, title: '订单序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    // {field: 'buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'width',width:120, title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'height',width:120, title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'bendRadius',width:120, title: '弯钢弧度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'grossArea',width:120, title: '实际面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'computeGrossArea',width:150, title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'shape',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.processingNote',width:140, title: '主加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'processingNote',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.remarks',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.icon',width:120, title: '商标选项',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.packType',width:120, title: '包装方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    // {field: 'prodID',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'perimeter',width:120, title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'price',width:120, title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'grossAmount',width:120, title: '金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.alType',width:120, title: '铝条方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    // {field: 'prodID',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.salesman',width:120, title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.deliveryAddress',width:120, title: '送货地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.creator',width:120, title: '制单员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'createTime',width:120, title: '建立时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'totalThickness',width:120, title: '总厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'levelOne',width:120, title: '产品大类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'levelTwo',width:120, title: '产品小类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.customerBatch',width:120, title: '客户批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
  ],//表格表头字段
  data:[],//表格数据
  url :'/order/getOrderReport/1',
  footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount']
})
</script>
<template>
  <basic-table/>
  <basic-table
      :childrenData="childrenData"/>
</template>
<style scoped>
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
@@ -33,6 +33,13 @@
        return Result.seccess(deliveryService.getSelectShippingOrder(pageNum,pageSize,selectDate,delivery));
    }
    /*发货报表查询*/
    @ApiOperation("发货报表查询接口")
    @PostMapping("/getSelectDeliveryDetailReport/{pageNum}/{pageSize}/{selectDate}")
    public Result getSelectDeliveryDetailReport(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody DeliveryDetail deliveryDetail){
        return Result.seccess(deliveryService.getSelectDeliveryDetailReport(pageNum,pageSize,selectDate,deliveryDetail));
    }
    /*发货订单明细查询*/
    @ApiOperation("发货编辑订单明细查询接口")
    @PostMapping("/getSelectShippingOrderDetail/{pageNum}/{pageSize}")
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderDetail.java
@@ -41,14 +41,20 @@
    private Integer state;
    private LocalDate createTime;
    private LocalDate updateTime;
    @TableField(select = false)
    @TableField(select = false,exist= false)
    private Order order;
    @TableField(select = false)
    @TableField(select = false,exist= false)
    private Delivery delivery;
    @TableField(select = false)
    @TableField(select = false,exist= false)
    private DeliveryDetail deliveryDetail;
    @TableField(select = false)
    @TableField(select = false,exist= false)
    private FinishedGoodsInventory finishedGoodsInventory;
    @TableField(exist= false)
    private String levelOne;
    @TableField(exist= false)
    private String levelTwo;
    @TableField(exist= false)
    private String totalThickness;
    //private Product product;
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java
@@ -9,6 +9,7 @@
import org.springframework.data.repository.CrudRepository;
import java.util.List;
import java.util.Map;
@Mapper
public interface DeliveryDetailMapper extends CrudRepository<DeliveryDetail,Long> {
@@ -21,6 +22,12 @@
    Integer getSelectShippingOrderDetailPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail);
    List<DeliveryDetail> getSelectDeliveryDetailReport(@Param("offset") Integer offset,
                                                      @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                                      @Param("deliveryDetail") DeliveryDetail deliveryDetail);
    Map<String,Integer> getSelectDeliveryDetailReportPageTotal(Integer offset, Integer pageSize,String startDate, String endDate, DeliveryDetail deliveryDetail);
    List<DeliveryDetail> getSelectShippingOrderDetails(@Param("offset") Integer offset,
                                                     @Param("pageSize") Integer pageSize,
                                                     @Param("orderDetail") OrderDetail orderDetail);
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java
@@ -6,6 +6,7 @@
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
@@ -15,4 +16,6 @@
    boolean updateOrderMoney( List<OrderDetail> orderDetails);
    List<OrderDetail> getOrderReport(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail);
    Map<String,Integer> getOrderReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail);
}
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -63,6 +63,28 @@
        return map;
    }
    public Map<String, Object> getSelectDeliveryDetailReport(Integer pageNum, Integer pageSize,List<String> selectDate, DeliveryDetail deliveryDetail) {
        Integer offset = (pageNum - 1) * pageSize;
        String endDate = LocalDate.now().toString();
        String startDate = LocalDate.now().minusDays(15).toString();
        if(selectDate !=null && selectDate.size()==2){
            if(!selectDate.get(0).isEmpty()){
                startDate = selectDate.get(0);
            }
            if(!selectDate.get(1).isEmpty()){
                endDate = selectDate.get(1);
            }
        }
        Map<String, Object> map = new HashMap<>();
        map.put("data", deliveryDetailMapper.getSelectDeliveryDetailReport(offset, pageSize,startDate,endDate, deliveryDetail));
        map.put("total", deliveryDetailMapper.getSelectDeliveryDetailReportPageTotal(offset, pageSize,startDate,endDate, deliveryDetail));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
    public Map<String, Object> getSelectShippingOrderDetail(Integer pageNum, Integer pageSize, OrderDetail orderDetail) {
        Integer offset = (pageNum - 1) * pageSize;
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -263,6 +263,11 @@
        Map<String,Object> map = new HashMap<>();
        map.put("data",orderDetailMapper.getOrderReport(offset, pageSize, startDate, endDate, orderDetail));
        map.put("total",orderDetailMapper.getOrderReportTotal(offset, pageSize, startDate, endDate, orderDetail));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
//        map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail));
        return map;
    }
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml
@@ -56,6 +56,36 @@
    </resultMap>
    <resultMap id="selectDeliveryDetail" type="com.example.erp.entity.sd.DeliveryDetail">
        <result column="order_id" property="orderId"/>
        <result column="order_number" property="orderNumber"/>
        <result column="o_quantity" property="quantity"/>
        <result column="delivery_id" property="deliveryId"/>
        <result column="delivery_number" property="deliveryNumber"/>
        <result column="area" property="area"/>
        <result column="money" property="money"/>
        <result column="delivery_detail_remakes" property="deliveryDetailRemakes"/>
        <result column="delivery_detail_state" property="deliveryDetailState"/>
        <result column="create_time" property="createTime"/>
        <result column="customer_id" property="delivery.customerId"/>
        <result column="customer_name" property="delivery.customerName"/>
        <result column="project" property="delivery.project"/>
        <result column="pay_method" property="delivery.payMethod"/>
        <result column="payment_terms" property="delivery.paymentTerms"/>
        <result column="pay_date" property="delivery.payDate"/>
        <result column="contacts" property="delivery.contacts"/>
        <result column="contact_number" property="delivery.contactNumber"/>
        <result column="delivery_address" property="delivery.deliveryAddress"/>
        <result column="delivery_date" property="delivery.deliveryDate"/>
        <result column="creator" property="delivery.creator"/>
        <result column="salesman" property="delivery.salesman"/>
    </resultMap>
    <delete id="deleteDeliveryDetail">
        delete from sd.delivery_detail where delivery_id=#{deliveryId}
    </delete>
@@ -443,4 +473,174 @@
        </where>
        limit #{offset},#{pageSize};
    </select>
    <select id="getSelectDeliveryDetailReport" resultMap="selectDeliveryDetail">
        select dd.delivery_id,
        dd.delivery_number,
        d.payment_terms,
        d.project,
        d.customer_id,
        d.customer_name,
        d.delivery_date,
        d.pay_method,
        d.pay_date,
        d.salesman,
        d.creator,
        d.contacts,
        d.contact_number,
        d.delivery_address,
        dd.order_id,
        dd.order_number,
        dd.area,
        dd.money,
        dd.quantity,
        dd.delivery_detail_remakes,
        dd.create_time
        from sd.delivery_detail dd
        left join sd.delivery d on dd.delivery_id=d.delivery_id
        <where>
            <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{deliveryDetail.deliveryId}
            </if>
            <if test="deliveryDetail.deliveryNumber != null and deliveryDetail.deliveryNumber != ''">
                and dd.delivery_number regexp #{deliveryDetail.deliveryNumber}
            </if>
            <if test="deliveryDetail.orderId != null and deliveryDetail.orderId != ''">
                and dd.order_id regexp #{deliveryDetail.orderId}
            </if>
            <if test="deliveryDetail.orderNumber != null and deliveryDetail.orderNumber != ''">
                and dd.order_number regexp #{deliveryDetail.orderNumber}
            </if>
            <if test="deliveryDetail.area != null and deliveryDetail.area != ''">
                and dd.area regexp #{deliveryDetail.area}
            </if>
            <if test="deliveryDetail.money != null and deliveryDetail.money != ''">
                and dd.money regexp #{deliveryDetail.money}
            </if>
            <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''">
                and dd.quantity regexp #{deliveryDetail.quantity}
            </if>
            <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{deliveryDetail.deliveryDetailRemakes}
            </if>
            <if test="deliveryDetail.createTime != null and deliveryDetail.createTime != ''">
                and dd.create_time regexp #{deliveryDetail.createTime}
            </if>
            <if test="deliveryDetail.delivery.paymentTerms != null and deliveryDetail.delivery.paymentTerms != ''">
                and d.payment_terms regexp #{deliveryDetail.delivery.paymentTerms}
            </if>
            <if test="deliveryDetail.delivery.project != null and deliveryDetail.delivery.project != ''">
                and d.project regexp #{deliveryDetail.delivery.project}
            </if>
            <if test="deliveryDetail.delivery.customerId != null and deliveryDetail.delivery.customerId != ''">
                and d.customer_id regexp #{deliveryDetail.delivery.customerId}
            </if>
            <if test="deliveryDetail.delivery.customerName != null and deliveryDetail.delivery.customerName != ''">
                and d.customer_name regexp #{deliveryDetail.delivery.customerName}
            </if>
            <if test="deliveryDetail.delivery.deliveryDate != null and deliveryDetail.delivery.deliveryDate != ''">
                and d.delivery_date regexp #{deliveryDetail.delivery.deliveryDate}
            </if>
            <if test="deliveryDetail.delivery.payMethod != null and deliveryDetail.delivery.payMethod != ''">
                and d.pay_method regexp #{deliveryDetail.delivery.payMethod}
            </if>
            <if test="deliveryDetail.delivery.payDate != null and deliveryDetail.delivery.payDate != ''">
                and d.pay_date regexp #{deliveryDetail.delivery.payDate}
            </if>
            <if test="deliveryDetail.delivery.salesman != null and deliveryDetail.delivery.salesman != ''">
                and d.salesman regexp #{deliveryDetail.delivery.salesman}
            </if>
            <if test="deliveryDetail.delivery.creator != null and deliveryDetail.delivery.creator != ''">
                and d.creator regexp #{deliveryDetail.delivery.creator}
            </if>
            <if test="deliveryDetail.delivery.contacts != null and deliveryDetail.delivery.contacts != ''">
                and d.contacts regexp #{deliveryDetail.delivery.contacts}
            </if>
            <if test="deliveryDetail.delivery.contactNumber != null and deliveryDetail.delivery.contactNumber != ''">
                and d.contact_number regexp #{deliveryDetail.delivery.contactNumber}
            </if>
            <if test="deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != ''">
                and d.delivery_address regexp #{deliveryDetail.delivery.deliveryAddress}
            </if>
        </where>
        order by dd.delivery_id,dd.delivery_number
        limit #{offset},#{pageSize};
    </select>
    <select id="getSelectDeliveryDetailReportPageTotal" resultMap="selectDeliveryDetail">
        select CEILING(count(dd.id)/#{pageSize}) as 'pageTotal',
        count(dd.id) as 'total'
        from sd.delivery_detail dd
        left join sd.delivery d on dd.delivery_id=d.delivery_id
        <where>
            <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{deliveryDetail.deliveryId}
            </if>
            <if test="deliveryDetail.deliveryNumber != null and deliveryDetail.deliveryNumber != ''">
                and dd.delivery_number regexp #{deliveryDetail.deliveryNumber}
            </if>
            <if test="deliveryDetail.orderId != null and deliveryDetail.orderId != ''">
                and dd.order_id regexp #{deliveryDetail.orderId}
            </if>
            <if test="deliveryDetail.orderNumber != null and deliveryDetail.orderNumber != ''">
                and dd.order_number regexp #{deliveryDetail.orderNumber}
            </if>
            <if test="deliveryDetail.area != null and deliveryDetail.area != ''">
                and dd.area regexp #{deliveryDetail.area}
            </if>
            <if test="deliveryDetail.money != null and deliveryDetail.money != ''">
                and dd.money regexp #{deliveryDetail.money}
            </if>
            <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''">
                and dd.quantity regexp #{deliveryDetail.quantity}
            </if>
            <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{deliveryDetail.deliveryDetailRemakes}
            </if>
            <if test="deliveryDetail.createTime != null and deliveryDetail.createTime != ''">
                and dd.create_time regexp #{deliveryDetail.createTime}
            </if>
            <if test="deliveryDetail.delivery.paymentTerms != null and deliveryDetail.delivery.paymentTerms != ''">
                and d.payment_terms regexp #{deliveryDetail.delivery.paymentTerms}
            </if>
            <if test="deliveryDetail.delivery.project != null and deliveryDetail.delivery.project != ''">
                and d.project regexp #{deliveryDetail.delivery.project}
            </if>
            <if test="deliveryDetail.delivery.customerId != null and deliveryDetail.delivery.customerId != ''">
                and d.customer_id regexp #{deliveryDetail.delivery.customerId}
            </if>
            <if test="deliveryDetail.delivery.customerName != null and deliveryDetail.delivery.customerName != ''">
                and d.customer_name regexp #{deliveryDetail.delivery.customerName}
            </if>
            <if test="deliveryDetail.delivery.deliveryDate != null and deliveryDetail.delivery.deliveryDate != ''">
                and d.delivery_date regexp #{deliveryDetail.delivery.deliveryDate}
            </if>
            <if test="deliveryDetail.delivery.payMethod != null and deliveryDetail.delivery.payMethod != ''">
                and d.pay_method regexp #{deliveryDetail.delivery.payMethod}
            </if>
            <if test="deliveryDetail.delivery.payDate != null and deliveryDetail.delivery.payDate != ''">
                and d.pay_date regexp #{deliveryDetail.delivery.payDate}
            </if>
            <if test="deliveryDetail.delivery.salesman != null and deliveryDetail.delivery.salesman != ''">
                and d.salesman regexp #{deliveryDetail.delivery.salesman}
            </if>
            <if test="deliveryDetail.delivery.creator != null and deliveryDetail.delivery.creator != ''">
                and d.creator regexp #{deliveryDetail.delivery.creator}
            </if>
            <if test="deliveryDetail.delivery.contacts != null and deliveryDetail.delivery.contacts != ''">
                and d.contacts regexp #{deliveryDetail.delivery.contacts}
            </if>
            <if test="deliveryDetail.delivery.contactNumber != null and deliveryDetail.delivery.contactNumber != ''">
                and d.contact_number regexp #{deliveryDetail.delivery.contactNumber}
            </if>
            <if test="deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != ''">
                and d.delivery_address regexp #{deliveryDetail.delivery.deliveryAddress}
            </if>
        </where>
        order by dd.delivery_id,dd.delivery_number
        limit #{offset},#{pageSize};
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
@@ -71,52 +71,324 @@
    <resultMap id="orderMap" type="com.example.erp.entity.sd.OrderDetail">
        <result column="order_number" property="orderNumber"/>
        <result column="order_number" property="productId"/>
        <result column="order_number" property="productName"/>
        <result column="order_number" property="width"/>
        <result column="order_number" property="height"/>
        <result column="order_number" property="quantity"/>
        <result column="order_number" property="bendRadius"/>
        <result column="order_number" property="grossArea"/>
        <result column="order_number" property="computeGrossArea"/>
        <result column="order_number" property="shape"/>
        <result column="order_number" property="edgingType"/>
        <result column="order_number" property="processingNote"/>
        <result column="order_number" property="remarks"/>
        <result column="order_number" property="perimeter"/>
        <result column="order_number" property="grossAmount"/>
        <result column="product_id" property="productId"/>
        <result column="product_name" property="productName"/>
        <result column="price" property="price"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="quantity" property="quantity"/>
        <result column="bend_radius" property="bendRadius"/>
        <result column="gross_area" property="grossArea"/>
        <result column="compute_gross_area" property="computeGrossArea"/>
        <result column="shape" property="shape"/>
        <result column="edging_type" property="edgingType"/>
        <result column="processing_note" property="processingNote"/>
        <result column="remarks" property="remarks"/>
        <result column="perimeter" property="perimeter"/>
        <result column="gross_amount" property="grossAmount"/>
        <result column="levelOne" property="levelOne"/>
        <result column="levelTwo" property="levelTwo"/>
        <result column="total_thickness" property="totalThickness"/>
        <result column="createTime" property="createTime"/>
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="order_type" property="orderType"/>
            <result column="customer_name" property="customerName"/>
            <result column="project" property="project"/>
            <result column="order_id" property="orderId"/>
            <result column="batch" property="batch"/>
            <result column="processing_note" property="processingNote"/>
            <result column="icon" property="icon"/>
            <result column="packType" property="packType"/>
            <result column="salesman" property="salesman"/>
            <result column="delivery_address" property="deliveryAddress"/>
            <result column="creator" property="creator"/>
            <result column="verifier" property="verifier"/>
            <result column="customer_batch" property="customerBatch"/>
        </association>
        <result column="order_type" property="order.orderType"/>
        <result column="customer_name" property="order.customerName"/>
        <result column="project" property="order.project"/>
        <result column="order_id" property="order.orderId"/>
        <result column="batch" property="order.batch"/>
        <result column="b.processing_note" property="order.processingNote"/>
        <result column="icon" property="order.icon"/>
        <result column="packType" property="order.packType"/>
        <result column="salesman" property="order.salesman"/>
        <result column="delivery_address" property="order.deliveryAddress"/>
        <result column="creator" property="order.creator"/>
        <result column="verifier" property="order.verifier"/>
        <result column="customer_batch" property="order.customerBatch"/>
    </resultMap>
    <select id="getOrderReport" resultMap="orderMap">
        SELECT
            *
            *,
            a.create_time as createTime,
            d.type_name as levelOne,
            e.type_name as levelTwo
        from order_detail as a
        left join sd.`order` as b
            on b.order_id = a.order_id
        left join sd.product as c
            on c.id = a.product_id
        left join sd.basic_glass_type as d
            on d.type_id = c.type_id
        left join sd.basic_glass_type as e
            on e.type_id = d.belong
        where  date(b.create_time)>=#{startDate} and date(b.create_time) &lt;= #{endDate}
        limit #{offset},#{pageSize}
        <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')">
            and b.order_type like concat('%',#{orderDetail.order.orderType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
            and b.customer_id like concat('%',#{orderDetail.order.customerId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.project != null and orderDetail.order.project != ''">
            and b.project like concat('%',#{orderDetail.order.project},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.orderId != null and orderDetail.order.orderId != ''">
            and b.order_id like concat('%',#{orderDetail.order.orderId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.batch != null and orderDetail.order.batch != ''">
            and b.batch like concat('%',#{orderDetail.order.batch},'%')
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and a.product_id like concat('%',#{orderDetail.productId},'%')
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and a.product_name like concat('%',#{orderDetail.productName},'%')
        </if>
        <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
            and a.order_number like concat('%',#{orderDetail.orderNumber},'%')
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
            and a.quantity like concat('%',#{orderDetail.quantity},'%')
        </if>
        <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''">
            and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%')
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
            and a.shape like concat('%',#{orderDetail.shape},'%')
        </if>
        <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
            and a.edging_type like concat('%',#{orderDetail.edgingType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''">
            and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%')
        </if>
        <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
            and a.processing_note like concat('%',#{orderDetail.processingNote},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.icon != null and orderDetail.order.icon != ''">
            and b.icon like concat('%',#{orderDetail.order.icon},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.packType != null and orderDetail.order.packType != ''">
            and b.pack_type like concat('%',#{orderDetail.order.packType},'%')
        </if>
        <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
            and a.perimeter like concat('%',#{orderDetail.perimeter},'%')
        </if>
        <if test="orderDetail.price != null and orderDetail.price != ''">
            and a.price like concat('%',#{orderDetail.price},'%')
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
            and b.al_type like concat('%',#{orderDetail.order.alType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
            and b.salesman like concat('%',#{orderDetail.order.salesman},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''">
            and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.creator != null and orderDetail.order.creator != ''">
            and b.creator like concat('%',#{orderDetail.order.creator},'%')
        </if>
        <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''">
            and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%')
        </if>
        <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''">
            and d.type_name like concat('%',#{orderDetail.levelOne},'%')
        </if>
        <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''">
            and e.type_name like concat('%',#{orderDetail.levelTwo},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''">
            and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%')
        </if>
        order by a.id desc
        limit #{offset},#{pageSize}
    </select>
    <select id="getOrderReportTotal" >
        SELECT
            CEILING(count(a.id)/#{pageSize}) as 'pageTotal',
            count(a.id) as 'total'
        from order_detail as a
                 left join sd.`order` as b
                           on b.order_id = a.order_id
                 left join sd.product as c
                           on c.id = a.product_id
                 left join sd.basic_glass_type as d
                           on d.type_id = c.type_id
                 left join sd.basic_glass_type as e
                           on e.type_id = d.belong
        where  date(b.create_time)>=#{startDate} and date(b.create_time) &lt;= #{endDate}
        <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')">
            and b.order_type like concat('%',#{orderDetail.order.orderType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
            and b.customer_id like concat('%',#{orderDetail.order.customerId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.project != null and orderDetail.order.project != ''">
            and b.project like concat('%',#{orderDetail.order.project},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.orderId != null and orderDetail.order.orderId != ''">
            and b.order_id like concat('%',#{orderDetail.order.orderId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.batch != null and orderDetail.order.batch != ''">
            and b.batch like concat('%',#{orderDetail.order.batch},'%')
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and a.product_id like concat('%',#{orderDetail.productId},'%')
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and a.product_name like concat('%',#{orderDetail.productName},'%')
        </if>
        <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
            and a.order_number like concat('%',#{orderDetail.orderNumber},'%')
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
            and a.quantity like concat('%',#{orderDetail.quantity},'%')
        </if>
        <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''">
            and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%')
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
            and a.shape like concat('%',#{orderDetail.shape},'%')
        </if>
        <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
            and a.edging_type like concat('%',#{orderDetail.edgingType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''">
            and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%')
        </if>
        <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
            and a.processing_note like concat('%',#{orderDetail.processingNote},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.icon != null and orderDetail.order.icon != ''">
            and b.icon like concat('%',#{orderDetail.order.icon},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.packType != null and orderDetail.order.packType != ''">
            and b.pack_type like concat('%',#{orderDetail.order.packType},'%')
        </if>
        <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
            and a.perimeter like concat('%',#{orderDetail.perimeter},'%')
        </if>
        <if test="orderDetail.price != null and orderDetail.price != ''">
            and a.price like concat('%',#{orderDetail.price},'%')
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
            and b.al_type like concat('%',#{orderDetail.order.alType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
            and b.salesman like concat('%',#{orderDetail.order.salesman},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''">
            and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.creator != null and orderDetail.order.creator != ''">
            and b.creator like concat('%',#{orderDetail.order.creator},'%')
        </if>
        <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''">
            and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%')
        </if>
        <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''">
            and d.type_name like concat('%',#{orderDetail.levelOne},'%')
        </if>
        <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''">
            and e.type_name like concat('%',#{orderDetail.levelTwo},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''">
            and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%')
        </if>
        order by a.id desc
    </select>
</mapper>
north-glass-erp/target/classes/mapper/sd/OrderDetail.xml
@@ -71,52 +71,324 @@
    <resultMap id="orderMap" type="com.example.erp.entity.sd.OrderDetail">
        <result column="order_number" property="orderNumber"/>
        <result column="order_number" property="productId"/>
        <result column="order_number" property="productName"/>
        <result column="order_number" property="width"/>
        <result column="order_number" property="height"/>
        <result column="order_number" property="quantity"/>
        <result column="order_number" property="bendRadius"/>
        <result column="order_number" property="grossArea"/>
        <result column="order_number" property="computeGrossArea"/>
        <result column="order_number" property="shape"/>
        <result column="order_number" property="edgingType"/>
        <result column="order_number" property="processingNote"/>
        <result column="order_number" property="remarks"/>
        <result column="order_number" property="perimeter"/>
        <result column="order_number" property="grossAmount"/>
        <result column="product_id" property="productId"/>
        <result column="product_name" property="productName"/>
        <result column="price" property="price"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="quantity" property="quantity"/>
        <result column="bend_radius" property="bendRadius"/>
        <result column="gross_area" property="grossArea"/>
        <result column="compute_gross_area" property="computeGrossArea"/>
        <result column="shape" property="shape"/>
        <result column="edging_type" property="edgingType"/>
        <result column="processing_note" property="processingNote"/>
        <result column="remarks" property="remarks"/>
        <result column="perimeter" property="perimeter"/>
        <result column="gross_amount" property="grossAmount"/>
        <result column="levelOne" property="levelOne"/>
        <result column="levelTwo" property="levelTwo"/>
        <result column="total_thickness" property="totalThickness"/>
        <result column="createTime" property="createTime"/>
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="order_type" property="orderType"/>
            <result column="customer_name" property="customerName"/>
            <result column="project" property="project"/>
            <result column="order_id" property="orderId"/>
            <result column="batch" property="batch"/>
            <result column="processing_note" property="processingNote"/>
            <result column="icon" property="icon"/>
            <result column="packType" property="packType"/>
            <result column="salesman" property="salesman"/>
            <result column="delivery_address" property="deliveryAddress"/>
            <result column="creator" property="creator"/>
            <result column="verifier" property="verifier"/>
            <result column="customer_batch" property="customerBatch"/>
        </association>
        <result column="order_type" property="order.orderType"/>
        <result column="customer_name" property="order.customerName"/>
        <result column="project" property="order.project"/>
        <result column="order_id" property="order.orderId"/>
        <result column="batch" property="order.batch"/>
        <result column="b.processing_note" property="order.processingNote"/>
        <result column="icon" property="order.icon"/>
        <result column="packType" property="order.packType"/>
        <result column="salesman" property="order.salesman"/>
        <result column="delivery_address" property="order.deliveryAddress"/>
        <result column="creator" property="order.creator"/>
        <result column="verifier" property="order.verifier"/>
        <result column="customer_batch" property="order.customerBatch"/>
    </resultMap>
    <select id="getOrderReport" resultMap="orderMap">
        SELECT
            *
            *,
            a.create_time as createTime,
            d.type_name as levelOne,
            e.type_name as levelTwo
        from order_detail as a
        left join sd.`order` as b
            on b.order_id = a.order_id
        left join sd.product as c
            on c.id = a.product_id
        left join sd.basic_glass_type as d
            on d.type_id = c.type_id
        left join sd.basic_glass_type as e
            on e.type_id = d.belong
        where  date(b.create_time)>=#{startDate} and date(b.create_time) &lt;= #{endDate}
        limit #{offset},#{pageSize}
        <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')">
            and b.order_type like concat('%',#{orderDetail.order.orderType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
            and b.customer_id like concat('%',#{orderDetail.order.customerId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.project != null and orderDetail.order.project != ''">
            and b.project like concat('%',#{orderDetail.order.project},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.orderId != null and orderDetail.order.orderId != ''">
            and b.order_id like concat('%',#{orderDetail.order.orderId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.batch != null and orderDetail.order.batch != ''">
            and b.batch like concat('%',#{orderDetail.order.batch},'%')
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and a.product_id like concat('%',#{orderDetail.productId},'%')
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and a.product_name like concat('%',#{orderDetail.productName},'%')
        </if>
        <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
            and a.order_number like concat('%',#{orderDetail.orderNumber},'%')
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
            and a.quantity like concat('%',#{orderDetail.quantity},'%')
        </if>
        <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''">
            and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%')
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
            and a.shape like concat('%',#{orderDetail.shape},'%')
        </if>
        <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
            and a.edging_type like concat('%',#{orderDetail.edgingType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''">
            and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%')
        </if>
        <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
            and a.processing_note like concat('%',#{orderDetail.processingNote},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.icon != null and orderDetail.order.icon != ''">
            and b.icon like concat('%',#{orderDetail.order.icon},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.packType != null and orderDetail.order.packType != ''">
            and b.pack_type like concat('%',#{orderDetail.order.packType},'%')
        </if>
        <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
            and a.perimeter like concat('%',#{orderDetail.perimeter},'%')
        </if>
        <if test="orderDetail.price != null and orderDetail.price != ''">
            and a.price like concat('%',#{orderDetail.price},'%')
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
            and b.al_type like concat('%',#{orderDetail.order.alType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
            and b.salesman like concat('%',#{orderDetail.order.salesman},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''">
            and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.creator != null and orderDetail.order.creator != ''">
            and b.creator like concat('%',#{orderDetail.order.creator},'%')
        </if>
        <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''">
            and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%')
        </if>
        <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''">
            and d.type_name like concat('%',#{orderDetail.levelOne},'%')
        </if>
        <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''">
            and e.type_name like concat('%',#{orderDetail.levelTwo},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''">
            and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%')
        </if>
        order by a.id desc
        limit #{offset},#{pageSize}
    </select>
    <select id="getOrderReportTotal" >
        SELECT
            CEILING(count(a.id)/#{pageSize}) as 'pageTotal',
            count(a.id) as 'total'
        from order_detail as a
                 left join sd.`order` as b
                           on b.order_id = a.order_id
                 left join sd.product as c
                           on c.id = a.product_id
                 left join sd.basic_glass_type as d
                           on d.type_id = c.type_id
                 left join sd.basic_glass_type as e
                           on e.type_id = d.belong
        where  date(b.create_time)>=#{startDate} and date(b.create_time) &lt;= #{endDate}
        <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')">
            and b.order_type like concat('%',#{orderDetail.order.orderType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
            and b.customer_id like concat('%',#{orderDetail.order.customerId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.project != null and orderDetail.order.project != ''">
            and b.project like concat('%',#{orderDetail.order.project},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.orderId != null and orderDetail.order.orderId != ''">
            and b.order_id like concat('%',#{orderDetail.order.orderId},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.batch != null and orderDetail.order.batch != ''">
            and b.batch like concat('%',#{orderDetail.order.batch},'%')
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and a.product_id like concat('%',#{orderDetail.productId},'%')
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and a.product_name like concat('%',#{orderDetail.productName},'%')
        </if>
        <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
            and a.order_number like concat('%',#{orderDetail.orderNumber},'%')
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
            and a.quantity like concat('%',#{orderDetail.quantity},'%')
        </if>
        <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''">
            and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%')
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
            and a.shape like concat('%',#{orderDetail.shape},'%')
        </if>
        <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
            and a.edging_type like concat('%',#{orderDetail.edgingType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''">
            and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%')
        </if>
        <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
            and a.processing_note like concat('%',#{orderDetail.processingNote},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.icon != null and orderDetail.order.icon != ''">
            and b.icon like concat('%',#{orderDetail.order.icon},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.packType != null and orderDetail.order.packType != ''">
            and b.pack_type like concat('%',#{orderDetail.order.packType},'%')
        </if>
        <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
            and a.perimeter like concat('%',#{orderDetail.perimeter},'%')
        </if>
        <if test="orderDetail.price != null and orderDetail.price != ''">
            and a.price like concat('%',#{orderDetail.price},'%')
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
            and b.al_type like concat('%',#{orderDetail.order.alType},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
            and b.salesman like concat('%',#{orderDetail.order.salesman},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''">
            and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.creator != null and orderDetail.order.creator != ''">
            and b.creator like concat('%',#{orderDetail.order.creator},'%')
        </if>
        <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''">
            and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%')
        </if>
        <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''">
            and d.type_name like concat('%',#{orderDetail.levelOne},'%')
        </if>
        <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''">
            and e.type_name like concat('%',#{orderDetail.levelTwo},'%')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''">
            and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%')
        </if>
        order by a.id desc
    </select>
</mapper>