廖井涛
2024-02-22 10ed6815dd763f6c348f13619ae15f7a062ee75c
发货界面库存界面修改
30个文件已修改
2025 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue 335 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue 325 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/BasicDataController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/Delivery.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/DeliveryDetail.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/BasicDateMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicDateService.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/BasicData.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/Delivery.xml 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/BasicData.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/Delivery.xml 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue
@@ -263,9 +263,21 @@
/*数据校验*/
const validRules = ref({
  quantity: [
    { required: true, message: '请输入领取数量' }
  ]
  quantity: [{
    validator (e) {
      if (e.row.quantity > e.row.finishedGoodsInventory.quantityAvailable) {
        return new Error('领出数量不能大于订单数')
      }else if (e.row.quantity ==="") {
        return new Error('领出数量不能为空或者是0')
      }
      const regex = /^[1-9]\d*$/g
      if ( !regex.test(e.row.quantity) ) {
        return new Error('请输入正整数')
      }
    }
  }]
})
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue
@@ -265,9 +265,21 @@
/*数据校验*/
const validRules = ref({
  quantity: [
    { required: true, message: '请输入领取数量' }
  ]
  quantity: [{
    validator (e) {
      if (e.row.quantity > e.row.finishedGoodsInventory.quantityAvailable) {
        return new Error('返工数量不能大于订单数')
      }else if (e.row.quantity ==="") {
        return new Error('返工数量不能为空或者是0')
      }
      const regex = /^[1-9]\d*$/g
      if ( !regex.test(e.row.quantity) ) {
        return new Error('请输入正整数')
      }
    }
  }]
})
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
@@ -236,7 +236,6 @@
              userId: userid,
              userName: username,
              orderDetail: selectRecords
            })
            request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryAllocate", flowData.value).then((res) => {
@@ -275,11 +274,26 @@
  orderNumber: [
    { required: true, message: '请输入调拨的订单序号' }
  ],
  quantity: [
    { required: true, message: '请输入调拨的数量' }
  ]
  quantity: [{
    validator (e) {
      if (e.row.quantity > e.row.finishedGoodsInventory.quantityAvailable) {
        return new Error('调拨数量不能大于订单数')
      }else if (e.row.quantity ==="") {
        return new Error('调拨数量不能为空或者是0')
      }
      const regex = /^[1-9]\d*$/g
      if ( !regex.test(e.row.quantity) ) {
        return new Error('请输入正整数')
      }
    }
  }]
})
</script>
<template>
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue
@@ -1,14 +1,23 @@
<!-- 领出记录  -->
<script setup>
import {reactive} from "vue";
import {reactive, ref} from "vue";
import {useRouter} from  'vue-router'
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import {Search} from "@element-plus/icons-vue";
const userStore = useUserInfoStore()
const username = userStore.user.userName
const userid = userStore.user.userId
let router=useRouter()
let produceList = ref([])
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/trader/CreateTrader', query: { id: row.id }})
    case 'add' :{
      alert('我接收到子组件传送的编辑信息')
      break
    }
    case 'delete':{
@@ -18,9 +27,123 @@
  }
}
const hasDecimal=(value)=>{
  const regex=/\./ // 定义正则表达式,查找小数点
  return regex.test(value) //返回true/false
}
const hasDecimalhtml=(item,row)=>{
  let aa=item.split('.').length
  if (aa===2){
    return row[item.split('.')[0]][item.split('.')[1]]
  }else if(aa===3){
    return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]]
  }
}
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
  orderDetail:{
    width:'',
    height:'',
    productId:'',
    productName:''
  }
})
let selectDate = ref(["",""])
//第一次调用
request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data)
    pageTotal.value=res.data.total
    selectDate.value = res.data.selectDate
    pageNum=1
    produceList = deepClone(res.data.data)
    xGrid.value.loadData(produceList)
    gridOptions.loading=false
  }else{
    ElMessage.warning(res.msg)
    router.push("/login")
  }
})
//定义页面总页数
let pageTotal=ref('')
//定义当前页数
let pageNum=$ref(1)
let pageState = null
/*使用筛选,后端获取数据*/
const changeFilterEvent = (event, option, $panel,) => {
  // 手动触发筛选
  $panel.changeOption(event, !!option.data, option)
}
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
  }
  request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const a =  {field:"status", title: '选择', width: '80',slots: { default: 'state' } }
const selectOrderList = ()=>{
  request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(selectDate.value)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const changeDate =  ()=>{
  selectOrderList()
}
//子组件接收参数
const  xGrid = ref();
const gridOptions = reactive({
  border:  "full",//表格加边框
@@ -51,106 +174,42 @@
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: '50'},
    // { type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    { type: 'seq',fixed:"left", title: '自序', width: '80' },
    // {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"},
    {field: 'id', width:'150', title: '领出单号', sortable: true,},
    {field: 'MaterialCode', width: '150',title: '订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'Code', width: '150',title: '序号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'MaterialName', width: '120',title: '补片单号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'Origin', width: '100',title: '工序', sortable: true},
    {field: 'InventoryNumber',width: '100', title: '次破原因', sortable: true,showOverflow:"ellipsis"},
    {field: 'Thickness', width: '80',title: '退货单号', sortable: true},
    {field: 'MainUnit',width: '100', title: '完工数量', sortable: true},
    {field: 'RecordNum',width: '100', title: '返工数量', sortable: true},
    {field: 'ProductNum',width: '100', title: '产品编号', sortable: true},
    {field: 'ProductName',width: '100', title: '产品名称', sortable: true},
    {field: 'Height', width: '100',title: '长', sortable: true},
    {field: 'Width',width: '100', title: '宽', sortable: true},
    {field: 'status', width: '80',title: '审核状态', sortable: true},
    {field: 'ZhiDanRen', width: '80',title: '制单人', sortable: true},
    {field: 'SafetyStock', width: '100',title: '制单日期', sortable: true},
    {field: 'Auditor', width: '100',title: '审核人', sortable: true},
    {field: 'AuditorDate', width: '100',title: '审核日期', sortable: true},
    {type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    {type:'expand',fixed:"left",slots: { content:'content' },width: '80'},
    {type: 'seq',fixed:"left", title: '自序', width: '80' },
    {field: 'status', width: '120',title: '单据状态',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operationOrderNumber', width:'150', title: '操作单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operationNumber', width: '100',title: '序号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'quantity', width: '140',title: '领出/返工数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId',width: '100', title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName',width: '140', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.width', width: '100',title: '宽度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.height',width: '100', title: '高度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operator', width: '100',title: '制单人',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operateTime', width:'140', title: '制单日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'reviewed', width: '100',title: '审核人',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'reviewedTime', width: '140',title: '审核日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'remarks', width: '140',title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
  ],//表头按钮
  toolbarConfig: {
    // buttons: [{
    //   'name': '新增'
    // }],
    buttons: [{
      'name': '反审',status: 'primary',
      'code':'add'
    }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  data:  [
    {
      "id": "LC23123011",
      "MaterialCode": "NG23060212",
      "Code": "1",
      "MaterialName": "11月29退货众致",
      "Origin": "智镜",
      "InventoryNumber": '黑点',
      "Thickness": '',
      "MainUnit": "",
      "RecordNum": "876",
      "ProductNum": "0604000108",
      "ProductName": "4mm高性能环保镜",
      "Height": "930.00",
      "Width": "550.00",
      "status": "已审核",
      "ZhiDanRen": "曲慧霞",
      "SafetyStock": "2023-12-30",
      "Auditor": "曲慧霞",
      "AuditorDate": "2023-12-30",
    },
    {
      "id": "LC23123011",
      "MaterialCode": "NG23060212",
      "Code": "1",
      "MaterialName": "11月29退货众致",
      "Origin": "智镜",
      "InventoryNumber": '黑点',
      "Thickness": '',
      "MainUnit": "",
      "RecordNum": "876",
      "ProductNum": "0604000108",
      "ProductName": "4mm高性能环保镜",
      "Height": "930.00",
      "Width": "550.00",
      "status": "已审核",
      "ZhiDanRen": "曲慧霞",
      "SafetyStock": "2023-12-30",
      "Auditor": "曲慧霞",
      "AuditorDate": "2023-12-30",
    },
    {
      "id": "LC23123011",
      "MaterialCode": "NG23060212",
      "Code": "1",
      "MaterialName": "11月29退货众致",
      "Origin": "智镜",
      "InventoryNumber": '黑点',
      "Thickness": '',
      "MainUnit": "",
      "RecordNum": "876",
      "ProductNum": "0604000108",
      "ProductName": "4mm高性能环保镜",
      "Height": "930.00",
      "Width": "550.00",
      "status": "已审核",
      "ZhiDanRen": "曲慧霞",
      "SafetyStock": "2023-12-30",
      "Auditor": "曲慧霞",
      "AuditorDate": "2023-12-30",
    },
  ],//table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
          return `页数:${pageNum}/${pageTotal.value}`
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
@@ -162,28 +221,75 @@
})
const gridEvents = {
  toolbarButtonClick ({ code }) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'add': {
          const $table = xGrid.value
          //gridOptions.columns.unshift(a)
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            console.log(selectRecords)
            let flowData = ref({
              userId:userid,
              userName:username,
              orderDetail:selectRecords
            })
            request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryCounterexamination",flowData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("反审成功")
                location.reload();
              }else{
                ElMessage.warning(res.msg)
                router.push("/login")
              }
            })
          }
          return;
        }
      }
    }
  },
}
const checkBoxConfig = {
  checkMethod: ({ row }) => {
    if (row['status']==='已审核'||row['status']==='未通过'){
      return !row.disable
    }else{
      return row.disable
    }
  },
  reserve:true
}
</script>
<template>
  <div class="main-div-customer">
    <el-row gutter="10" >
      <el-col :span="2.5">
        <div class="label-text">制单日期范围</div>
      </el-col>
      <el-col :span="4">
        <el-date-picker
            type="daterange"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            style="width: 200px;"
        />
      </el-col>
      <el-col span="4">
        <el-button id="searchButton" type="primary" :icon="Search">查询</el-button>
      </el-col>
    </el-row>
    <el-date-picker
        v-model="selectDate"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
        format="YYYY-MM-DD"
        value-format="YYYY-MM-DD"
    />
    <el-button @click="changeDate" style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <vxe-grid
        max-height="100%"
@@ -191,15 +297,26 @@
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
        :checkbox-config="checkBoxConfig"
    >
      <!--      <template #state="{ row,column}">
      &lt;!&ndash;                <p>{{row[column.field]}}</p>&ndash;&gt;
      &lt;!&ndash;        <el-checkbox v-model="row['isState']" :disabled="row[column.field]==='已审核'||row[column.field]==='未通过'"/>&ndash;&gt;
              <vxe-checkbox v-model="row['isState']" :disabled="row[column.field]==='已审核'||row[column.field]==='未通过'"></vxe-checkbox>
            </template>-->
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row }">
        <ul class="expand-wrapper">
          <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{item.title+':  '}}</span>
            <span>{{ row[item.field] }}</span>
            <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span>
            <span v-else>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue
@@ -7,6 +7,7 @@
import deepClone from "@/utils/deepClone";
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import {Search} from "@element-plus/icons-vue";
const userStore = useUserInfoStore()
const username = userStore.user.userName
@@ -41,6 +42,7 @@
}
let selectDate = ref(["",""])
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
@@ -55,11 +57,12 @@
})
//第一次调用
request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100",filterData.value).then((res) => {
request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data)
    pageTotal.value=res.data.total
    selectDate.value = res.data.selectDate
    pageNum=1
    produceList = deepClone(res.data.data)
@@ -97,11 +100,12 @@
  }else{
    filterData.value[column.property] = value
  }
  request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100",filterData.value).then((res) => {
  request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
@@ -114,6 +118,28 @@
}
const a =  {field:"status", title: '选择', width: '80',slots: { default: 'state' } }
const selectOrderList = ()=>{
  request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(selectDate.value)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const changeDate =  ()=>{
  selectOrderList()
}
@@ -235,7 +261,7 @@
        }
        case 'rework': {
          router.push({path: '/main/productStock/TransferRecord'});
          router.push({path: '/main/productStock/ReworkRecord'});
          return
        }
@@ -264,22 +290,16 @@
<template>
  <div class="main-div-customer">
    <el-row gutter="10" >
      <el-col :span="2.5">
        <div class="label-text">制单日期范围</div>
      </el-col>
      <el-col :span="4">
        <el-date-picker
            type="daterange"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            style="width: 200px;"
        />
      </el-col>
      <el-col span="4">
        <el-button id="searchButton" type="primary" :icon="Search">查询</el-button>
      </el-col>
    </el-row>
    <el-date-picker
        v-model="selectDate"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
        format="YYYY-MM-DD"
        value-format="YYYY-MM-DD"
    />
    <el-button @click="changeDate" style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <vxe-grid
        max-height="100%"
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue
@@ -7,6 +7,7 @@
import deepClone from "@/utils/deepClone";
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import {Search} from "@element-plus/icons-vue";
const userStore = useUserInfoStore()
const username = userStore.user.userName
@@ -54,12 +55,15 @@
})
let selectDate = ref(["",""])
//第一次调用
request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100",filterData.value).then((res) => {
request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100/"+selectDate.value,filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data)
    pageTotal.value=res.data.total
    selectDate.value = res.data.selectDate
    pageNum=1
    produceList = deepClone(res.data.data)
@@ -97,11 +101,12 @@
  }else{
    filterData.value[column.property] = value
  }
  request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100",filterData.value).then((res) => {
  request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
@@ -114,7 +119,27 @@
}
const a =  {field:"status", title: '选择', width: '80',slots: { default: 'state' } }
const selectOrderList = ()=>{
  request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(selectDate.value)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const changeDate =  ()=>{
  selectOrderList()
}
//子组件接收参数
@@ -150,35 +175,25 @@
  },//表头参数
  columns:[
    {type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    //{type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    {type:'expand',fixed:"left",slots: { content:'content' },width: '80'},
    {type: 'seq',fixed:"left", title: '自序', width: '80' },
    {field: 'status', width: '120',title: '单据状态',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operationOrderNumber', width:'150', title: '操作单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operationNumber', width: '100',title: '序号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'quantity', width: '140',title: '领出/返工数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'staterOperationOrderNumber', width: '150',title: '新调拨单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'endOperationOrderNumber', width: '100',title: '新序号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'quantity', width: '140',title: '调拨数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId',width: '100', title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName',width: '140', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.width', width: '100',title: '宽度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.height',width: '100', title: '高度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operator', width: '100',title: '制单人',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'operateTime', width:'140', title: '制单日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'reviewed', width: '100',title: '审核人',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'reviewedTime', width: '140',title: '审核日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'remarks', width: '140',title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
  ],//表头按钮
  toolbarConfig: {
    buttons: [{
      'name': '反审',status: 'primary',
      'code':'add'
    }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  footerMethod ({ columns, data }) {//页脚函数
    return[
@@ -237,17 +252,7 @@
}
const checkBoxConfig = {
  checkMethod: ({ row }) => {
    if (row['status']==='已审核'||row['status']==='未通过'){
      return !row.disable
    }else{
      return row.disable
    }
  },
  reserve:true
}
@@ -255,22 +260,16 @@
<template>
  <div class="main-div-customer">
    <el-row gutter="10" >
      <el-col :span="2.5">
        <div class="label-text">制单日期范围</div>
      </el-col>
      <el-col :span="4">
        <el-date-picker
            type="daterange"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            style="width: 200px;"
        />
      </el-col>
      <el-col span="4">
        <el-button id="searchButton" type="primary" :icon="Search">查询</el-button>
      </el-col>
    </el-row>
    <el-date-picker
        v-model="selectDate"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
        format="YYYY-MM-DD"
        value-format="YYYY-MM-DD"
    />
    <el-button @click="changeDate" style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <vxe-grid
        max-height="100%"
@@ -279,7 +278,6 @@
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
        :checkbox-config="checkBoxConfig"
    >
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
@@ -8,6 +8,7 @@
import VXETable from "vxe-table";
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import validator from "vxe-table/lib/validator";
const router = useRouter()
const route = useRoute()
const userStore = useUserInfoStore()
@@ -32,10 +33,16 @@
}
let unpaidQuantity = ref({})
//定义接收加载表头下拉数据
const titleSelectJson = ref({
  paymentTerms:[],
})
// 定义表头上传数据
let titleUploadData = ref({
  deliveryState:'',
  paymentTerms:'',
  customerId:'',
  customerName:'',
  project:'',
@@ -89,14 +96,32 @@
  },
})
//页面第一次加载
request.get(`/basicData/deliveryBasicData`).then((res) => {
  if(res.code==200){
    titleSelectJson.value=deepClone(res.data)
    titleUploadData.value.paymentTerms = titleSelectJson.value.paymentTerms[0].basicName
    const today = new Date
    today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000))
    titleUploadData.value.deliveryDate = today.getFullYear() +
        '-' + ("0" + (today.getMonth() + 1)).slice(-2)
        + '-' + ("0" + today.getDate()).slice(-2)
  }else{
    ElMessage.warning(res.msg)
  }
})
const  xGrid = ref();
const  number = ref();
onMounted(()=>{
  //发货新增
  const orderId = route.query.orderId
  if (typeof orderId !== 'undefined' && orderId !== null && orderId !== '' && orderId !== '\n' && orderId !== '\r'){
    filterData.value.orderId=orderId
    number.value=orderId
    //第一次调用
    request.post("/Delivery/getseletShippingOrderDetails/1/100",filterData.value).then((res) => {
@@ -124,6 +149,14 @@
        pageNum=1
        produceList = deepClone(res.data.data)
        xGrid.value.loadData(produceList)
        //let arr =  Object.values(gridOptions.toolbarConfig);
        //arr[0].splice(1,2)
        //禁用按钮
        gridOptions.toolbarConfig.buttons[1].disabled  = true
        gridOptions.toolbarConfig.buttons[2].disabled = true
        //显示复选框
        xGrid.value.showColumn("select")
        gridOptions.loading=false
      }else{
        ElMessage.warning(res.msg)
@@ -131,7 +164,7 @@
      }
    })
  }
//发货编辑
  const str = route.query.deliveryID
  if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){
@@ -144,12 +177,24 @@
        console.log(res.data.data)
        pageTotal.value=res.data.total
        titleUploadData.value=deepClone(res.data.delivery)
        console.log(titleUploadData.value)
        console.log(titleUploadData.value.customerId)
        console.log(deepClone(res.data.delivery))
        //根据审核状态显示审核按钮或者是反审按钮
        gridOptions.toolbarConfig.buttons[0].disabled = true
        if(titleUploadData.value.deliveryState===1){
          gridOptions.toolbarConfig.buttons[1].disabled = true
        }
        if(titleUploadData.value.deliveryState===0){
          gridOptions.toolbarConfig.buttons[2].disabled = true
        }
        pageNum=1
        produceList = deepClone(res.data.data)
        xGrid.value.loadData(produceList)
        //隐藏复选框
        xGrid.value.hideColumn("select")
        gridOptions.loading=false
      }else{
        ElMessage.warning(res.msg)
        router.push("/login")
@@ -162,13 +207,86 @@
//定义页面总页数
let pageTotal=ref('')
//定义当前页数
let pageNum=$ref(1)
const changeFilterEvent = (event, option, $panel) => {
  // 手动触发筛选
  $panel.changeOption(event, !!option.data, option)
}
//前端筛选
const filterChanged = ({ option, row, column }) => {
  if (option.data) {
    let param = column.field
    if(param.indexOf(".")>-1){
      let  array = param.split('.')
      return row[array[0]][array[1]].toString().toLowerCase().indexOf(option.data) > -1
    }else{
      return row[param].toString().toLowerCase().indexOf(option.data) > -1
    }
  }
  return true
  //@filter-change="filterChanged"
  /*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
  }
  const str = route.query.deliveryID
  if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){
    filterData.value.deliveryDetail.deliveryId=str
    request.post("/Delivery/getseletShippingOrderDetail/1/100",filterData.value).then((res) => {
      if(res.code==200){
        console.log(res.data.data)
        pageTotal.value=res.data.total
        pageNum=1
        produceList = deepClone(res.data.data)
        xGrid.value.reloadData(produceList)
        gridOptions.loading=false
      }else{
        ElMessage.warning(res.msg)
        router.push("/login")
      }
    })
  }
  const orderId = route.query.orderId
  if (typeof orderId !== 'undefined' && orderId !== null && orderId !== '' && orderId !== '\n' && orderId !== '\r'){
    filterData.value.orderId=orderId
    request.post("/Delivery/getseletShippingOrderDetails/1/100",filterData.value).then((res) => {
      if(res.code==200){
        console.log(res.data.title)
        pageTotal.value=res.data.total
        pageNum=1
        produceList = deepClone(res.data.data)
        xGrid.value.loadData(produceList)
        gridOptions.loading=false
      }else{
        ElMessage.warning(res.msg)
        router.push("/login")
      }
    })
  }
  console.log(route.query.orderId)
  console.log(filterData.value.deliveryDetail.deliveryId)
  console.log(filterData.value)*/
}
@@ -191,7 +309,7 @@
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
    //remote: true
  },
  customConfig: {
    storage: true
@@ -204,37 +322,39 @@
  columns:[
    {type:'expand',slots: { content:'content' },width: 60,fixed:"left"},
    {type:'checkbox',title: '选择', width: 80,fixed:"left"},
    {field: 'select',type:'checkbox',title: '选择', width: 80,fixed:"left"},
    {type: 'seq', title: '自序', width: 80 ,fixed:"left"},
    {field: '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: 'finishedGoodsInventory.quantityAvailable',width:120,  title: '库存可发',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.quantity',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: 'deliveryDetail.quantity',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: '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: 'price',width:120,  title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'finishedGoodsInventory.storageRegion',width:120,  title: '库区',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'deliveryDetail.money',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: 'shape',width:120,  title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'finishedGoodsInventory.actualSignalArea',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: 'computeArea',width:120,  title: '结算单片面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'computeGrossArea',width:120,  title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'processingNote',width:120,  title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'deliveryDetail.deliveryDetailRemakes',width:120,  title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'edgingType',width:120,  title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'perimeter',width:120,  title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderId',width:120,  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'order.batch',width:120,  title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'finishedGoodsInventory.quantityAvailable',width:120,  title: '库存可发',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'order.quantity',width:120,  title: '未发数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'quantity',width:120,  title: '总数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'deliveryDetail.quantity',width:120,  title: '发货数量',editRender: { name: 'input', attrs: { placeholder: '' } },filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'buildingNumber',width:120,  title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'productId',width:120,   title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'productName',width:120,  title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'price',width:120,  title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'finishedGoodsInventory.storageRegion',width:120,  title: '库区',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'deliveryDetail.money',width:120,  title: '金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'width',width:120,  title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'height',width:120,  title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'shape',width:120,  title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'finishedGoodsInventory.actualSignalArea',width:120,   title: '单片面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'grossArea',width:120,   title: '总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'computeArea',width:120,  title: '结算单片面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'computeGrossArea',width:120,  title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'processingNote',width:120,  title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'deliveryDetail.deliveryDetailRemakes',width:120,  title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'edgingType',width:120,  title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'perimeter',width:120,  title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
  ],//表头按钮
  toolbarConfig: {
    buttons: [
      {'code': 'add', 'name': '保存',status: 'primary',icon: 'vxe-icon-save'}
      {'code': 'add', 'name': '保存',status: 'primary',icon: 'vxe-icon-save'},
      {'code': 'toExamine', 'name': '审核',status: 'primary'},
      {'code': 'CounterExamination', 'name': '反审',status: 'primary'}
    ],
    import: false,
    export: true,
@@ -259,7 +379,7 @@
})
const gridEvents = {
  toolbarButtonClick ({ code }) {
  async toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
@@ -271,17 +391,94 @@
            ElMessage.warning("未选中数据")
            return
          }
          const errMap = await $grid.validate(selectRecords)
          console.log(errMap)
          if (errMap) {
            ElMessage.warning("数据校验失败")
            return
          }
          //表头数据校验
          const project = titleUploadData.value.project
          if(project === null || project === undefined || project === ''){
            ElMessage.error('输入项目名称!')
            return
          }
          const paymentTerms = titleUploadData.value.paymentTerms
          if(paymentTerms === null || paymentTerms === undefined || paymentTerms === ''){
            ElMessage.error('请选择付款条件!')
            return
          }
          const payMethod = titleUploadData.value.payMethod
          if(payMethod === null || payMethod === undefined || payMethod === ''){
            ElMessage.error('请输入收款方式!')
            return
          }
          const contacts = titleUploadData.value.contacts
          if(contacts === null || contacts === undefined || contacts === ''){
            ElMessage.error('请输入联系人!')
            return
          }
          const contactNumber = titleUploadData.value.contactNumber
          if(contactNumber === null || contactNumber === undefined || contactNumber === ''){
            ElMessage.error('请输入联系电话!')
            return
          }
          const deliveryAddress = titleUploadData.value.deliveryAddress
          if(deliveryAddress === null || deliveryAddress === undefined || deliveryAddress === ''){
            ElMessage.error('请输入送货地址!')
            return
          }
          let flowData = ref({
            delivery:selectRecords,
            title:titleUploadData.value
            delivery: selectRecords,
            title: titleUploadData.value
          })
          console.log(flowData)
          request.post("/Delivery/insertDelivery", flowData.value).then((res) => {
            if(res.code==200){
              ElMessage.success("发货单提交成功")
              router.push({path: '/main/delivery/selectDelivery', query: { id: 1 }})
            }else{
           request.post("/Delivery/insertDelivery", flowData.value).then((res) => {
             if(res.code==200){
               ElMessage.success("发货单提交成功")
               router.push({path: '/main/delivery/selectDelivery', query: { id: 1 }})
             }else{
               ElMessage.warning(res.msg)
               router.push("/login")
             }
           })
          break
        }
        case 'toExamine': {
          let flowData = ref({
            deliveryId: route.query.deliveryID,
            type: 1
          })
          console.log(flowData)
          request.post("/Delivery/updateDeliveryToExamine", flowData.value).then((res) => {
            if (res.code == 200) {
              ElMessage.success("审核成功")
              router.push({path: '/main/delivery/selectDelivery', query: {id: 1}})
            } else {
              ElMessage.warning(res.msg)
              router.push("/login")
            }
          })
          break
        }
        case 'CounterExamination': {
          let flowData = ref({
            deliveryId: route.query.deliveryID,
            type: 0
          })
          console.log(flowData)
          request.post("/Delivery/updateDeliveryToExamine", flowData.value).then((res) => {
            if (res.code == 200) {
              ElMessage.success("审核成功")
              router.push({path: '/main/delivery/selectDelivery', query: {id: 1}})
            } else {
              ElMessage.warning(res.msg)
              router.push("/login")
            }
@@ -293,6 +490,30 @@
  }
}
/*数据校验*/
const validRules = ref({
  quantity: [
    { type: 'number', min: 0, message: '请输入大于等于0的数值' }
  ],
    "deliveryDetail.quantity": [{
       validator (e) {
          if (e.row.deliveryDetail.quantity > e.row.finishedGoodsInventory.quantityAvailable) {
            return new Error('发货数量不能大于库存数')
          }else if (e.row.deliveryDetail.quantity ==="") {
            return new Error('发货数量不能为空或者是0')
         }
         const regex = /^[1-9]\d*$/g
         if ( !regex.test(e.row.deliveryDetail.quantity) ) {
           return new Error('请输入正整数')
         }
       }
    }]
})
</script>
@@ -301,17 +522,22 @@
    <div class="order-primary" style="background-color: white">
      <el-row>
        <el-col  :span="2"><el-text>客户编码:</el-text></el-col>
        <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="titleUploadData.customerId" ></el-input></el-col>
        <el-col  :span="3"><el-input style="font-size: large;color: #181818" v-model="titleUploadData.customerId" ></el-input></el-col>
        <el-col  :span="2"><el-text>客户名称:</el-text></el-col>
        <el-col  :span="5"><el-input  v-model="titleUploadData.customerName"></el-input></el-col>
        <el-col  :span="2"><el-text>项目名称:</el-text></el-col>
        <el-col  :span="5"><el-input v-model="titleUploadData.project"></el-input></el-col>
      </el-row>
      <el-row>
        <el-col  :span="2"><el-text>付款条件:</el-text></el-col>
        <el-col  :span="5">
          <el-select  clearable  >
            <el-option/>
        <el-col  :span="2"><el-text>付款条件:</el-text></el-col>
        <el-col  :span="3">
          <el-select v-model="titleUploadData.paymentTerms"  clearable placeholder=""  >
            <el-option
                v-for="item in titleSelectJson['paymentTerms']"
                :key="item.id"
                :label="item.basicName"
                :value="item.basicName"
            />
          </el-select>
        </el-col>
        <el-col  :span="2"><el-text>收款方式:</el-text></el-col>
@@ -327,7 +553,7 @@
      </el-row>
      <el-row>
        <el-col  :span="2"><el-text>联系人:</el-text></el-col>
        <el-col  :span="5"><el-input v-model="titleUploadData.contacts"/></el-col>
        <el-col  :span="3"><el-input v-model="titleUploadData.contacts"/></el-col>
        <el-col  :span="2"><el-text>联系电话:</el-text></el-col>
        <el-col  :span="5"><el-input v-model="titleUploadData.contactNumber"/></el-col>
        <el-col  :span="2"><el-text>送货地址:</el-text></el-col>
@@ -335,7 +561,7 @@
      </el-row>
      <el-row>
        <el-col  :span="2"><el-text>备注:</el-text></el-col>
        <el-col  :span="5"><el-input v-model="titleUploadData.remarks"/></el-col>
        <el-col  :span="3"><el-input v-model="titleUploadData.remarks"/></el-col>
        <el-col  :span="2"><el-text>报表日期:</el-text></el-col>
        <el-col  :span="5"><el-input v-model="titleUploadData.createTime"></el-input></el-col>
        <el-col  :span="2"><el-text>发货报表日期:</el-text></el-col>
@@ -348,7 +574,7 @@
      </el-row>
      <el-row>
        <el-col  :span="2"><el-text>业务员:</el-text></el-col>
        <el-col  :span="5"><el-input v-model="titleUploadData.salesman"/></el-col>
        <el-col  :span="3"><el-input v-model="titleUploadData.salesman"/></el-col>
        <el-col  :span="2"><el-text>发货员:</el-text></el-col>
        <el-col  :span="5"><el-input v-model="titleUploadData.creator"/></el-col>
      </el-row>
@@ -360,6 +586,7 @@
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          :edit-rules="validRules"
      >
        <template #num1_filter="{ column, $panel }">
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -47,14 +47,17 @@
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({})
let selectDate = ref(["",""])
const  xGrid = ref();
//第一次调用
request.post("/Delivery/getseletShippingOrder/1/100",filterData.value).then((res) => {
request.post("/Delivery/getseletShippingOrder/1/100/"+selectDate.value,filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data)
    pageTotal.value=res.data.total
    selectDate.value = res.data.selectDate
    pageNum=1
    produceList = deepClone(res.data.data)
    xGrid.value.loadData(produceList)
@@ -90,7 +93,7 @@
  }else{
    filterData.value[column.property] = value
  }
  request.post("/Delivery/getseletShippingOrder/1/100",filterData.value).then((res) => {
  request.post("/Delivery/getseletShippingOrder/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
@@ -104,6 +107,28 @@
      router.push("/login")
    }
  })
}
const selectOrderList = ()=>{
  request.post("/Delivery/getseletShippingOrder/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      pageTotal.value=res.data.total
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const changeDate =  ()=>{
  selectOrderList()
}
const gridOptions = reactive({
@@ -152,7 +177,8 @@
    //{field: '11',width:120,  title: '付款条件',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'payMethod',width:120,  title: '付款方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'quantity',width:120,  title: '总数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'area',width:120,  title: '总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}
    {field: 'area',width:120,  title: '总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'createTime',width:120,  title: '创建日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}
  ],//表头按钮
@@ -185,12 +211,15 @@
<template>
  <div style="width: 100%;height: 100%">
    <el-date-picker
        v-model="value1"
        v-model="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="changeDate" style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <vxe-grid
        max-height="97%"
        @filter-change="filterChanged"
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectOrderList.vue
@@ -53,13 +53,15 @@
  },
})
let selectDate = ref(["",""])
//第一次调用
request.post("/Delivery/getSelectOrderInventory/1/100",filterData.value).then((res) => {
request.post("/Delivery/getSelectOrderInventory/1/100/"+selectDate.value,filterData.value).then((res) => {
  if(res.code==200){
    pageTotal.value=res.data.total
    selectDate.value = res.data.selectDate
    pageNum=1
    produceList = deepClone(res.data.data)
    xGrid.value.loadData(produceList)
@@ -93,11 +95,12 @@
  }else{
    filterData.value[column.property] = value
  }
  request.post("/Delivery/getSelectOrderInventory/1/100",filterData.value).then((res) => {
  request.post("/Delivery/getSelectOrderInventory/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
@@ -107,6 +110,28 @@
      router.push("/login")
    }
  })
}
const selectOrderList = ()=>{
  request.post("/Delivery/getSelectOrderInventory/1/100/"+selectDate.value,filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      pageTotal.value=res.data.total
      selectDate.value = res.data.selectDate
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const changeDate =  ()=>{
  selectOrderList()
}
@@ -232,12 +257,15 @@
<template>
  <div  style="width: 100%;height: 100%">
    <el-date-picker
        v-model="value1"
        v-model="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="changeDate" style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <vxe-grid
        max-height="97%"
        class="mytable-scrollbar"
north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
@@ -77,15 +77,15 @@
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"调拨失败");
            throw new ServiceException(Constants.Code_500,"调拨失败,请检查订单输入是否正确");
        }
    }
    /*领出查询*/
    @PostMapping("/getselectAllocateFinishedOperateLog/{pageNum}/{pageSize}")
    public Result getselectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){
        return Result.seccess(finishedGoodsInventoryService.getselectAllocateFinishedOperateLog(pageNum,pageSize,finishedOperateLog));
    /*调拨记录查询*/
    @PostMapping("/getselectAllocateFinishedOperateLog/{pageNum}/{pageSize}/{selectDate}")
    public Result getselectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){
        return Result.seccess(finishedGoodsInventoryService.getselectAllocateFinishedOperateLog(pageNum,pageSize,selectDate,finishedOperateLog));
    }
    /*订单领出*/
@@ -102,9 +102,9 @@
    }
    /*领出记录查询*/
    @PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}")
    public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){
        return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,finishedOperateLog));
    @PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}/{selectDate}")
    public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){
        return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,selectDate,finishedOperateLog));
    }
    /*订单返工*/
north-glass-erp/src/main/java/com/example/erp/controller/sd/BasicDataController.java
@@ -19,4 +19,9 @@
    public Result getOrderBasicData(){
        return Result.seccess(basicDateService.getOrderBasicData());
    }
    @GetMapping("/deliveryBasicData")
    public Result getDeliveryBasicData(){
        return Result.seccess(basicDateService.getDeliveryBasicData());
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
@@ -13,6 +13,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@RestController
@@ -23,22 +24,22 @@
    /*发货订单查询*/
    @PostMapping("/getseletShippingOrder/{pageNum}/{pageSize}")
    public Result getseletShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody Delivery delivery){
        return Result.seccess(deliveryService.getseletShippingOrder(pageNum,pageSize,delivery));
    @PostMapping("/getseletShippingOrder/{pageNum}/{pageSize}/{selectDate}")
    public Result getseletShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Delivery delivery){
        return Result.seccess(deliveryService.getseletShippingOrder(pageNum,pageSize,selectDate,delivery));
    }
    /*发货订单明细查询*/
    @PostMapping("/getseletShippingOrderDetail/{pageNum}/{pageSize}")
    public Result getseletShippingOrderDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){
    public Result getseletShippingOrderDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize,  @RequestBody OrderDetail orderDetail){
        System.out.println(orderDetail.getDeliveryDetail().getDeliveryId());
        return Result.seccess(deliveryService.getseletShippingOrderDetail(pageNum,pageSize,orderDetail));
    }
    /*库存可发货订单查询*/
    @PostMapping("/getSelectOrderInventory/{pageNum}/{pageSize}")
    public Result getSelectOrderInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody Order order){
        return Result.seccess(deliveryService.getSelectOrderInventory(pageNum,pageSize,order));
    @PostMapping("/getSelectOrderInventory/{pageNum}/{pageSize}/{selectDate}")
    public Result getSelectOrderInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Order order){
        return Result.seccess(deliveryService.getSelectOrderInventory(pageNum,pageSize,selectDate,order));
    }
    /*发货订单明细查询*/
@@ -50,7 +51,6 @@
    @PostMapping("/insertDelivery")
    public Result insertDelivery( @RequestBody Map<String,Object> object){
        System.out.println(object);
        if(deliveryService.insertDelivery(object)){
            return Result.seccess();
@@ -59,6 +59,17 @@
        }
    }
    @PostMapping("/updateDeliveryToExamine")
    public Result updateDeliveryToExamine( @RequestBody Map<String,Object> object){
        System.out.println(object);
        if(deliveryService.updateDeliveryToExamine(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"审核失败");
        }
    }
north-glass-erp/src/main/java/com/example/erp/entity/sd/Delivery.java
@@ -14,6 +14,7 @@
    private Long id;
    private Integer deliveryState;
    private Integer stockState;
    private String paymentTerms;
    private String deliveryId;
    private String orderId;
    private String project;
north-glass-erp/src/main/java/com/example/erp/entity/sd/DeliveryDetail.java
@@ -17,7 +17,7 @@
    private String orderId;
    private Integer orderNumber;
    private Double area;
    private String quantity;
    private Integer quantity;
    private Double money;
    private String deliveryDetailRemakes;
    private Integer deliveryDetailState;
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java
@@ -21,11 +21,11 @@
    Boolean insertFinishedOperateLogAllocate(@Param("orderDetail") OrderDetail orderDetail,@Param("userName") String userName,@Param("oddNumber") String oddNumber);
    List<OrderDetail> getselectAllocateFinishedOperateLog(@Param("offset") Integer offset,
                                             @Param("pageSize") Integer pageSize,
                                             @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                             @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog);
    Integer getselectAllocateFinishedOperateLogPageTotal(@Param("offset") Integer offset,
                                                         @Param("pageSize") Integer pageSize,
                                                         @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                                         @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog);
    Integer getmaximum(@Param("type") String type);
@@ -43,11 +43,11 @@
                                            @Param("remarks") String remarks);
    List<OrderDetail> getSelectOperateRecord(@Param("offset") Integer offset,
                                                          @Param("pageSize") Integer pageSize,
                                                          @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                                          @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog);
    Integer getSelectOperateRecordLogPageTotal(@Param("offset") Integer offset,
                                                         @Param("pageSize") Integer pageSize,
                                                         @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                                         @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog);
    Boolean updateToExamine(@Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,
north-glass-erp/src/main/java/com/example/erp/mapper/sd/BasicDateMapper.java
@@ -11,6 +11,7 @@
@Mapper
public interface BasicDateMapper {
    List<BasicData> getOrderBasicData();
    List<String> getOrderBasicDataType();
    List<BasicData> getOrderBasicData(String type);
    List<String> getOrderBasicDataType(String type);
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
@@ -15,7 +15,7 @@
public interface DeliveryMapper extends CrudRepository<Delivery,Long> {
    List<Delivery> getseletShippingOrder(@Param("offset") Integer offset,
                                                      @Param("pageSize") Integer pageSize,
                                                      @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                                      @Param("delivery") Delivery delivery);
   Delivery getseletShippingOrderDetaildelivery(@Param("offset") Integer offset,
@@ -25,16 +25,18 @@
    Order getseletShippingOrderDetaildeliverys(@Param("offset") Integer offset,
                                                 @Param("pageSize") Integer pageSize,
                                                 @Param("orderDetail") OrderDetail orderDetail);
    Integer getseletShippingOrderPageTotal(Integer offset, Integer pageSize,Delivery delivery);
    Integer getseletShippingOrderPageTotal(Integer offset, Integer pageSize,String startDate, String endDate,Delivery delivery);
    List<Order> getSelectOrderInventory(@Param("offset") Integer offset,
                                        @Param("pageSize") Integer pageSize,
                                        @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                        @Param("order") Order order);
    Integer getSelectOrderInventoryPageTotal(Integer offset, Integer pageSize, Order order);
    Integer getSelectOrderInventoryPageTotal(Integer offset, Integer pageSize,String startDate, String endDate, Order order);
    Boolean insertDelivery(@Param("delivery") Delivery delivery,@Param("number") String number,@Param("orderId") String orderId);
    Boolean updateDeliveryToExamine(@Param("deliveryId") String deliveryId,@Param("deliveryState") int deliveryState);
    Integer getmaximum(@Param("type") String type);
    Boolean updatedelivery(@Param("area") Double area,
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -246,11 +246,27 @@
    }
    public Map<String, Object> getselectAllocateFinishedOperateLog(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) {
    public Map<String, Object> getselectAllocateFinishedOperateLog(Integer pageNum, Integer pageSize,List<String> selectDate, FinishedOperateLog finishedOperateLog) {
        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", finishedOperateLogMapper.getselectAllocateFinishedOperateLog(offset, pageSize, finishedOperateLog));
        map.put("total", finishedOperateLogMapper.getselectAllocateFinishedOperateLogPageTotal(offset, pageSize, finishedOperateLog));
        map.put("data", finishedOperateLogMapper.getselectAllocateFinishedOperateLog(offset, pageSize,startDate,endDate, finishedOperateLog));
        map.put("total", finishedOperateLogMapper.getselectAllocateFinishedOperateLogPageTotal(offset, pageSize,startDate,endDate, finishedOperateLog));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
@@ -302,19 +318,34 @@
    }
    public Map<String, Object> getselectTakeOutFinishedOperateLog(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) {
   /* public Map<String, Object> getselectTakeOutFinishedOperateLog(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) {
        Integer offset = (pageNum - 1) * pageSize;
        Map<String, Object> map = new HashMap<>();
        map.put("data", finishedOperateLogMapper.getselectAllocateFinishedOperateLog(offset, pageSize, finishedOperateLog));
        map.put("total", finishedOperateLogMapper.getselectAllocateFinishedOperateLogPageTotal(offset, pageSize, finishedOperateLog));
        return map;
    }
    }*/
    public Map<String, Object> getSelectOperateRecord(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) {
        Integer offset = (pageNum - 1) * pageSize;
    public Map<String, Object> getSelectOperateRecord(Integer pageNum, Integer pageSize, List<String> selectDate, FinishedOperateLog finishedOperateLog) {
        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", finishedOperateLogMapper.getSelectOperateRecord(offset, pageSize, finishedOperateLog));
        map.put("total", finishedOperateLogMapper.getSelectOperateRecordLogPageTotal(offset, pageSize, finishedOperateLog));
        map.put("data", finishedOperateLogMapper.getSelectOperateRecord(offset, pageSize,startDate, endDate, finishedOperateLog));
        map.put("total", finishedOperateLogMapper.getSelectOperateRecordLogPageTotal(offset, pageSize,startDate, endDate, finishedOperateLog));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicDateService.java
@@ -20,11 +20,11 @@
    private CustomerMapper customerMapper;
    //获取订单基本数据
public Map<String, List<Object>> getOrderBasicData() {
    public Map<String, List<Object>> getOrderBasicData() {
        //获取订单基本数据类型
        List<String> orderBasicDataType = basicDateMapper.getOrderBasicDataType();
        List<String> orderBasicDataType = basicDateMapper.getOrderBasicDataType("order");
        //获取订单基本数据
        List<BasicData> orderBasicData = basicDateMapper.getOrderBasicData();
        List<BasicData> orderBasicData = basicDateMapper.getOrderBasicData("order");
        //创建Map对象
        Map<String, List<Object>> orderBasicDataMap = new HashMap<>(); ;
        //创建List对象
@@ -53,4 +53,30 @@
        //返回Map对象
        return orderBasicDataMap;
    }
    //获取发货基本数据
    public Map<String, List<Object>> getDeliveryBasicData() {
        //获取订单基本数据类型
        List<String> deliveryBasicDataType = basicDateMapper.getOrderBasicDataType("delivery");
        //获取订单基本数据
        List<BasicData> deliveryBasicData = basicDateMapper.getOrderBasicData("delivery");
        //创建Map对象
        Map<String, List<Object>> deliveryBasicDataMap = new HashMap<>(); ;
        //创建List对象
        //遍历订单基本数据类型
        for(String item :deliveryBasicDataType){
            List<Object> orderBasicDataList = new ArrayList<>();
            //将类型和List对象放入Map中
            deliveryBasicDataMap.put(item,orderBasicDataList);
        }
        //遍历订单基本数据
        for (BasicData item : deliveryBasicData){
            //将数据放入List中
            deliveryBasicDataMap.get(item.getBasicCategory()).add(item);
        }
        //返回Map对象
        return deliveryBasicDataMap;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -16,6 +16,7 @@
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;
@Service
@@ -32,29 +33,59 @@
    @Autowired
    FinishedGoodsInventoryMapper finishedGoodsInventoryMapper;
    public Map<String, Object> getseletShippingOrder(Integer pageNum, Integer pageSize, Delivery delivery) {
    public Map<String, Object> getseletShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Delivery delivery) {
        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", deliveryMapper.getseletShippingOrder(offset, pageSize, delivery));
        System.out.println(deliveryMapper.getseletShippingOrder(offset, pageSize, delivery));
        map.put("total", deliveryMapper.getseletShippingOrderPageTotal(offset, pageSize, delivery));
        map.put("data", deliveryMapper.getseletShippingOrder(offset, pageSize,startDate,endDate, delivery));
        map.put("total", deliveryMapper.getseletShippingOrderPageTotal(offset, pageSize,startDate,endDate, delivery));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
    public Map<String, Object> getseletShippingOrderDetail(Integer pageNum, Integer pageSize, OrderDetail orderDetail) {
        Integer offset = (pageNum - 1) * pageSize;
        Map<String, Object> map = new HashMap<>();
        System.out.println(orderDetail.getDeliveryDetail().getMoney());
        map.put("data", deliveryDetailMapper.getseletShippingOrderDetail(offset, pageSize, orderDetail));
        map.put("delivery", deliveryMapper.getseletShippingOrderDetaildelivery(offset, pageSize, orderDetail));
        map.put("total", deliveryDetailMapper.getseletShippingOrderDetailPageTotal(offset, pageSize, orderDetail));
        return map;
    }
    public Map<String, Object> getSelectOrderInventory(Integer pageNum, Integer pageSize, Order order) {
    public Map<String, Object> getSelectOrderInventory(Integer pageNum, Integer pageSize,List<String> selectDate, Order order) {
        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", deliveryMapper.getSelectOrderInventory(offset, pageSize, order));
        map.put("total", deliveryMapper.getSelectOrderInventoryPageTotal(offset, pageSize, order));
        map.put("data", deliveryMapper.getSelectOrderInventory(offset, pageSize,startDate,endDate, order));
        map.put("total", deliveryMapper.getSelectOrderInventoryPageTotal(offset, pageSize,startDate,endDate, order));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
@@ -82,15 +113,15 @@
        if (!orderDetaillist.isEmpty()){
            for (OrderDetail orderDetail : orderDetaillist) {
                quantity+=orderDetail.getFinishedGoodsInventory().getQuantityAvailable();
                area+=orderDetail.getFinishedGoodsInventory().getActualSignalArea()*orderDetail.getFinishedGoodsInventory().getQuantityAvailable();
                money+=orderDetail.getPrice()*orderDetail.getFinishedGoodsInventory().getQuantityAvailable();
                quantity+=orderDetail.getDeliveryDetail().getQuantity();
                area+=orderDetail.getFinishedGoodsInventory().getActualSignalArea()*orderDetail.getDeliveryDetail().getQuantity();
                money+=orderDetail.getPrice()*orderDetail.getDeliveryDetail().getQuantity();
                Integer deliveryDetailmaximum=deliveryDetailMapper.getdeliveryDetailmaximum(oddNumber);
                System.out.println(deliveryDetailmaximum);
                deliveryDetailMapper.insertDeliveryDetail(orderDetail,oddNumber,deliveryDetailmaximum);
                deliveryDetailMapper.updateOrderDetailDeliveryNum(orderDetail);
                //修改库存表出库数量
                finishedGoodsInventoryMapper.updateInventoryquantityOut(orderDetail.getOrderId(),orderDetail.getOrderNumber(),orderDetail.getFinishedGoodsInventory().getQuantityAvailable());
                finishedGoodsInventoryMapper.updateInventoryquantityOut(orderDetail.getOrderId(),orderDetail.getOrderNumber(),orderDetail.getDeliveryDetail().getQuantity());
                isinsert=true;
            }
            System.out.println("面积"+area+"数量"+quantity+"金额"+money);
@@ -104,6 +135,28 @@
    }
    public Boolean updateDeliveryToExamine(Map<String,Object> object) {
        Boolean isinsert=false;
        String deliveryId = "";
        int type =3;
        if (object.get("deliveryId") != null) {
            deliveryId = object.get("deliveryId").toString();
        }
        if (object.get("type") != null) {
            type = Integer.parseInt(object.get("type").toString());
        }
        System.out.println(deliveryId);
        deliveryMapper.updateDeliveryToExamine(deliveryId,type);
        return true;
    }
    public String orderNumberSetting(String type) {
        //根据类型自动生成不同的操作单号
        String alias="";
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
@@ -181,10 +181,10 @@
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id regexp #{orderDetail.order.customerId}
@@ -193,10 +193,10 @@
                and o.customer_name regexp #{orderDetail.order.customerName}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{orderDetail.finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.area != null and orderDetail.finishedGoodsInventory.area != ''">
                and fgi.area regexp #{orderDetail.finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
@@ -234,10 +234,10 @@
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id regexp #{orderDetail.order.customerId}
@@ -246,10 +246,10 @@
                and o.customer_name regexp #{orderDetail.order.customerName}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{orderDetail.finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.area != null and orderDetail.finishedGoodsInventory.area != ''">
                and fgi.area regexp #{orderDetail.finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
@@ -300,22 +300,22 @@
                and d.customer_name regexp #{orderDetail.delivery.customerName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''">
                and d.quantity regexp #{orderDetail.delivery.quantity}
            </if>
            <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''">
                and od.warehouseNum regexp #{orderDetail.warehouseNum}
                and od.warehouse_num regexp #{orderDetail.warehouseNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''">
                and d.area regexp #{orderDetail.delivery.area}
                and d.area regexp REGEXP_REPLACE(#{orderDetail.delivery.area},'\\.0+$','')
            </if>
            <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''">
                and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber}
@@ -377,22 +377,22 @@
                and d.customer_name regexp #{orderDetail.delivery.customerName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''">
                and d.quantity regexp #{orderDetail.delivery.quantity}
            </if>
            <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''">
                and od.warehouseNum regexp #{orderDetail.warehouseNum}
                and od.warehouse_num regexp #{orderDetail.warehouseNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''">
                and d.area regexp #{orderDetail.delivery.area}
                and d.area regexp REGEXP_REPLACE(#{orderDetail.delivery.area},'\\.0+$','')
            </if>
            <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''">
                and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber}
@@ -537,10 +537,10 @@
                and od.product_name regexp #{flowCard.orderDetail.productName}
            </if>
            <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
                and od.width regexp #{flowCard.orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{flowCard.orderDetail.width},'\\.0+$','')
            </if>
            <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
                and od.height regexp #{flowCard.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{flowCard.orderDetail.height},'\\.0+$','')
            </if>
            <if test="flowCard.order.creator != null and flowCard.order.creator != ''">
                and o.creator regexp #{flowCard.order.creator}
@@ -558,7 +558,7 @@
                and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
            </if>
            <if test="flowCard.order.area != null and flowCard.order.area != ''">
                and o.area regexp #{flowCard.order.area}
                and o.area regexp REGEXP_REPLACE(#{flowCard.order.area},'\\.0+$','')
            </if>
            <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
                and o.batch regexp #{flowCard.order.batch}
@@ -593,10 +593,10 @@
                and od.product_name regexp #{flowCard.orderDetail.productName}
            </if>
            <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
                and od.width regexp #{flowCard.orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{flowCard.orderDetail.width},'\\.0+$','')
            </if>
            <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
                and od.height regexp #{flowCard.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{flowCard.orderDetail.height},'\\.0+$','')
            </if>
            <if test="flowCard.order.creator != null and flowCard.order.creator != ''">
                and o.creator regexp #{flowCard.order.creator}
@@ -614,7 +614,7 @@
                and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
            </if>
            <if test="flowCard.order.area != null and flowCard.order.area != ''">
                and o.area regexp #{flowCard.order.area}
                and o.area regexp REGEXP_REPLACE(#{flowCard.order.area},'\\.0+$','')
            </if>
            <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
                and o.batch regexp #{flowCard.order.batch}
@@ -678,7 +678,7 @@
                and o.order_type regexp #{finishedGoodsInventory.order.orderType}
            </if>
            <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''">
                and od.height regexp #{finishedGoodsInventory.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{finishedGoodsInventory.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''">
                and fgi.inventory regexp #{finishedGoodsInventory.inventory}
@@ -687,10 +687,10 @@
                and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''">
                and fgi.area regexp #{finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''">
                and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber}
@@ -752,7 +752,7 @@
                and o.order_type regexp #{finishedGoodsInventory.order.orderType}
            </if>
            <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''">
                and od.height regexp #{finishedGoodsInventory.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{finishedGoodsInventory.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''">
                and fgi.inventory regexp #{finishedGoodsInventory.inventory}
@@ -761,10 +761,10 @@
                and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''">
                and fgi.area regexp #{finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''">
                and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber}
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -53,6 +53,7 @@
              from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
@@ -75,10 +76,10 @@
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp #{finishedOperateLog.orderDetail.width}
                and  od.width regexp  REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp #{finishedOperateLog.orderDetail.height}
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
@@ -109,6 +110,7 @@
            from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
            left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                 date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
@@ -131,10 +133,10 @@
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp #{finishedOperateLog.orderDetail.width}
                and  od.width regexp  REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp #{finishedOperateLog.orderDetail.height}
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
@@ -176,6 +178,7 @@
              from mm.finished_operate_log aa where aa.operate_type = '调拨') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                 date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
@@ -204,10 +207,10 @@
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp #{finishedOperateLog.orderDetail.width}
                and  od.width regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp #{finishedOperateLog.orderDetail.height}
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
@@ -221,6 +224,45 @@
        from (select *
              from mm.finished_operate_log aa where aa.operate_type = '调拨') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.end_operation_order_number = od.order_number
        <where>
            date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
            <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''">
                and fol.order_id regexp #{finishedOperateLog.orderId}
            </if>
            <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''">
                and fol.operation_number regexp #{finishedOperateLog.operationNumber}
            </if>
            <if test="finishedOperateLog.staterOperationOrderNumber != null and finishedOperateLog.staterOperationOrderNumber != ''">
                and fol.stater_operation_order_number regexp #{finishedOperateLog.staterOperationOrderNumber}
            </if>
            <if test="finishedOperateLog.endOperationOrderNumber != null and finishedOperateLog.endOperationOrderNumber != ''">
                and fol.end_operation_order_number regexp #{finishedOperateLog.endOperationOrderNumber}
            </if>
            <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''">
                and fol.quantity regexp #{finishedOperateLog.quantity}
            </if>
            <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''">
                and fol.operator regexp #{finishedOperateLog.operator}
            </if>
            <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''">
                and  od.product_id regexp #{finishedOperateLog.orderDetail.productId}
            </if>
            <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''">
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
north-glass-erp/src/main/resources/mapper/sd/BasicData.xml
@@ -8,14 +8,14 @@
            *
        from
            basic_data as a
        where a.basic_type='order'
        where a.basic_type=#{type}
    </select>
    <select id="getOrderBasicDataType">
        select
            a.basic_category
        from
            basic_data as a
        where a.basic_type='order'
        where a.basic_type=#{type}
        group by  a.basic_category
    </select>
north-glass-erp/src/main/resources/mapper/sd/Delivery.xml
@@ -28,6 +28,9 @@
        <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/>
    </resultMap>
    <update id="updateDeliveryToExamine">
        update sd.delivery set delivery_state=#{deliveryState} where delivery_id=#{deliveryId}
    </update>
    <update id="updatedelivery">
        update sd.delivery set area=#{area},quantity=#{quantity},money=#{money} where delivery_id=#{oddNumber}
@@ -39,11 +42,11 @@
    <insert id="insertDelivery"  useGeneratedKeys="true" >
        insert into sd.delivery(delivery_state,stock_state,delivery_id,order_id,project,customer_id,customer_name,
        insert into sd.delivery(delivery_state,stock_state,payment_terms,delivery_id,order_id,project,customer_id,customer_name,
            delivery_date,pay_method,pay_date,salesman_id,salesman,creator_id,creator,contacts,contact_number,delivery_address,
                                area,quantity,money,remarks,create_time)
        values (
                   0,0,#{number} ,#{orderId},#{delivery.project},#{delivery.customerId},#{delivery.customerName},#{delivery.deliveryDate},#{delivery.payMethod},
                   0,0,#{delivery.paymentTerms},#{number} ,#{orderId},#{delivery.project},#{delivery.customerId},#{delivery.customerName},#{delivery.deliveryDate},#{delivery.payMethod},
                #{delivery.payDate},#{delivery.salesmanId},#{delivery.salesman},#{delivery.creatorId},#{delivery.creator},#{delivery.contacts},#{delivery.contactNumber},#{delivery.deliveryAddress},
                   0,0,0,#{delivery.remarks},now()
               )
@@ -73,7 +76,7 @@
        from sd.`order` o
        left join mm.finished_goods_inventory fgi on o.order_id = fgi.order_id
        <where>
            fgi.quantity_available > 0
            fgi.quantity_available > 0 and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="order.orderId != null and order.orderId != ''">
                and o.order_id REGEXP #{order.orderId}
            </if>
@@ -93,10 +96,10 @@
                and o.batch REGEXP #{order.batch}
            </if>
            <if test="order.money != null and order.money != ''">
                and o.money REGEXP #{order.money}
                and o.money REGEXP REGEXP_REPLACE(#{order.money},'\\.0+$','')
            </if>
            <if test="order.area != null and order.area != ''">
                and o.area REGEXP #{order.area}
                and o.area REGEXP REGEXP_REPLACE(#{order.area},'\\.0+$','')
            </if>
            <if test="order.packType != null and order.packType != ''">
                and o.pack_type REGEXP #{order.packType}
@@ -126,7 +129,7 @@
        o.money,o.area,o.create_time,o.pack_type,o.order_type,o.creator
        from sd.`order` o left join mm.finished_goods_inventory fgi on o.order_id=fgi.order_id
        <where>
            fgi.quantity_available > 0
            fgi.quantity_available > 0 and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="order.orderId != null and order.orderId != ''">
                and o.order_id REGEXP #{order.orderId}
            </if>
@@ -146,10 +149,10 @@
                and o.batch REGEXP #{order.batch}
            </if>
            <if test="order.money != null and order.money != ''">
                and o.money REGEXP #{order.money}
                and o.money REGEXP REGEXP_REPLACE(#{order.money},'\\.0+$','')
            </if>
            <if test="order.area != null and order.area != ''">
                and o.area REGEXP #{order.area}
                and o.area REGEXP REGEXP_REPLACE(#{order.area},'\\.0+$','')
            </if>
            <if test="order.packType != null and order.packType != ''">
                and o.pack_type REGEXP #{order.packType}
@@ -177,6 +180,7 @@
    <select id="getseletShippingOrderDetaildelivery" >
        select
        d.delivery_state,d.stock_state,d.payment_terms,
        d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number,
        d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id
        from sd.delivery d
@@ -204,6 +208,7 @@
    <select id="getseletShippingOrder">
        select * from sd.delivery d
        <where>
            date(d.create_time)>=#{startDate} and date(d.create_time) &lt;= #{endDate}
            <if test="delivery.deliveryId != null and delivery.deliveryId != ''">
                and d.delivery_id regexp #{delivery.deliveryId}
            </if>
@@ -232,14 +237,49 @@
                and d.quantity regexp #{delivery.quantity}
            </if>
            <if test="delivery.area != null and delivery.area != ''">
                and d.area regexp #{delivery.area}
                and d.area regexp REGEXP_REPLACE(#{delivery.area},'\\.0+$','')
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
    <select id="getseletShippingOrderPageTotal">
        select
            CEILING(count(id)/#{pageSize})
        from sd.delivery
        from sd.delivery d
        <where>
            date(d.create_time)>=#{startDate} and date(d.create_time) &lt;= #{endDate}
            <if test="delivery.deliveryId != null and delivery.deliveryId != ''">
                and d.delivery_id regexp #{delivery.deliveryId}
            </if>
            <if test="delivery.creator != null and delivery.creator != ''">
                and d.creator regexp #{delivery.creator}
            </if>
            <if test="delivery.deliveryDate != null and delivery.deliveryDate != ''">
                and d.delivery_date regexp #{delivery.deliveryDate}
            </if>
            <if test="delivery.customerId != null and delivery.customerId != ''">
                and d.customer_id regexp #{delivery.customerId}
            </if>
            <if test="delivery.customerName != null and delivery.customerName != ''">
                and d.customer_name regexp #{delivery.customerName}
            </if>
            <if test="delivery.project != null and delivery.project != ''">
                and d.project regexp #{delivery.project}
            </if>
            <if test="delivery.orderId != null and delivery.orderId != ''">
                and d.order_id regexp #{delivery.orderId}
            </if>
            <if test="delivery.payMethod != null and delivery.payMethod != ''">
                and d.pay_method regexp #{delivery.payMethod}
            </if>
            <if test="delivery.quantity != null and delivery.quantity != ''">
                and d.quantity regexp #{delivery.quantity}
            </if>
            <if test="delivery.area != null and delivery.area != ''">
                and d.area regexp REGEXP_REPLACE(#{delivery.area},'\\.0+$','')
            </if>
        </where>
        limit #{offset},#{pageSize};
</select>
</mapper>
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml
@@ -56,7 +56,7 @@
    </resultMap>
    <update id="updateOrderDetailDeliveryNum">
        update sd.order_detail set delivery_num=#{finishedGoodsInventory.quantityAvailable} where order_id=#{orderId} and order_number=#{orderNumber}
        update sd.order_detail set delivery_num=#{deliveryDetail.quantity} where order_id=#{orderId} and order_number=#{orderNumber}
    </update>
    <select id="getdeliveryDetailmaximum" >
@@ -69,8 +69,8 @@
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time)
        values (
                   #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea},
                #{orderDetail.orderId},#{orderDetail.finishedGoodsInventory.quantityAvailable},
                #{orderDetail.price}*#{orderDetail.finishedGoodsInventory.quantityAvailable},'',1,now()
                #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity},
                #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now()
               )
    </insert>
@@ -90,6 +90,72 @@
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''">
                and dd.quantity regexp #{orderDetail.deliveryDetail.quantity}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp #{orderDetail.price}
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''">
                and dd.money regexp  REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
            <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes}
            </if>
        </where>
        limit #{offset},#{pageSize};
@@ -107,6 +173,72 @@
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''">
                and dd.quantity regexp #{orderDetail.deliveryDetail.quantity}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp #{orderDetail.price}
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''">
                and dd.money regexp  REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
            <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
@@ -118,7 +250,7 @@
               fgi.quantity_available,
               od.quantity- od.delivery_num as t_quantity,
               od.quantity as o_quantity,
               od.delivery_num as d_quantity,
               fgi.quantity_available as d_quantity,
               od.building_number,
               od.product_id,
               od.product_name,
@@ -143,6 +275,63 @@
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''">
                and od.delivery_num regexp #{orderDetail.deliveryNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp  REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
@@ -159,6 +348,63 @@
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''">
                and od.delivery_num regexp #{orderDetail.deliveryNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp  REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml
@@ -181,10 +181,10 @@
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id regexp #{orderDetail.order.customerId}
@@ -193,10 +193,10 @@
                and o.customer_name regexp #{orderDetail.order.customerName}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{orderDetail.finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.area != null and orderDetail.finishedGoodsInventory.area != ''">
                and fgi.area regexp #{orderDetail.finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
@@ -234,10 +234,10 @@
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id regexp #{orderDetail.order.customerId}
@@ -246,10 +246,10 @@
                and o.customer_name regexp #{orderDetail.order.customerName}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{orderDetail.finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.area != null and orderDetail.finishedGoodsInventory.area != ''">
                and fgi.area regexp #{orderDetail.finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
@@ -300,22 +300,22 @@
                and d.customer_name regexp #{orderDetail.delivery.customerName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''">
                and d.quantity regexp #{orderDetail.delivery.quantity}
            </if>
            <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''">
                and od.warehouseNum regexp #{orderDetail.warehouseNum}
                and od.warehouse_num regexp #{orderDetail.warehouseNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''">
                and d.area regexp #{orderDetail.delivery.area}
                and d.area regexp REGEXP_REPLACE(#{orderDetail.delivery.area},'\\.0+$','')
            </if>
            <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''">
                and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber}
@@ -377,22 +377,22 @@
                and d.customer_name regexp #{orderDetail.delivery.customerName}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp #{orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp #{orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''">
                and d.quantity regexp #{orderDetail.delivery.quantity}
            </if>
            <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''">
                and od.warehouseNum regexp #{orderDetail.warehouseNum}
                and od.warehouse_num regexp #{orderDetail.warehouseNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''">
                and d.area regexp #{orderDetail.delivery.area}
                and d.area regexp REGEXP_REPLACE(#{orderDetail.delivery.area},'\\.0+$','')
            </if>
            <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''">
                and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber}
@@ -537,10 +537,10 @@
                and od.product_name regexp #{flowCard.orderDetail.productName}
            </if>
            <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
                and od.width regexp #{flowCard.orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{flowCard.orderDetail.width},'\\.0+$','')
            </if>
            <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
                and od.height regexp #{flowCard.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{flowCard.orderDetail.height},'\\.0+$','')
            </if>
            <if test="flowCard.order.creator != null and flowCard.order.creator != ''">
                and o.creator regexp #{flowCard.order.creator}
@@ -558,7 +558,7 @@
                and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
            </if>
            <if test="flowCard.order.area != null and flowCard.order.area != ''">
                and o.area regexp #{flowCard.order.area}
                and o.area regexp REGEXP_REPLACE(#{flowCard.order.area},'\\.0+$','')
            </if>
            <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
                and o.batch regexp #{flowCard.order.batch}
@@ -593,10 +593,10 @@
                and od.product_name regexp #{flowCard.orderDetail.productName}
            </if>
            <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
                and od.width regexp #{flowCard.orderDetail.width}
                and od.width regexp REGEXP_REPLACE(#{flowCard.orderDetail.width},'\\.0+$','')
            </if>
            <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
                and od.height regexp #{flowCard.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{flowCard.orderDetail.height},'\\.0+$','')
            </if>
            <if test="flowCard.order.creator != null and flowCard.order.creator != ''">
                and o.creator regexp #{flowCard.order.creator}
@@ -614,7 +614,7 @@
                and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
            </if>
            <if test="flowCard.order.area != null and flowCard.order.area != ''">
                and o.area regexp #{flowCard.order.area}
                and o.area regexp REGEXP_REPLACE(#{flowCard.order.area},'\\.0+$','')
            </if>
            <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
                and o.batch regexp #{flowCard.order.batch}
@@ -678,7 +678,7 @@
                and o.order_type regexp #{finishedGoodsInventory.order.orderType}
            </if>
            <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''">
                and od.height regexp #{finishedGoodsInventory.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{finishedGoodsInventory.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''">
                and fgi.inventory regexp #{finishedGoodsInventory.inventory}
@@ -687,10 +687,10 @@
                and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''">
                and fgi.area regexp #{finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''">
                and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber}
@@ -752,7 +752,7 @@
                and o.order_type regexp #{finishedGoodsInventory.order.orderType}
            </if>
            <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''">
                and od.height regexp #{finishedGoodsInventory.orderDetail.height}
                and od.height regexp REGEXP_REPLACE(#{finishedGoodsInventory.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''">
                and fgi.inventory regexp #{finishedGoodsInventory.inventory}
@@ -761,10 +761,10 @@
                and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea}
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''">
                and fgi.area regexp #{finishedGoodsInventory.area}
                and fgi.area regexp REGEXP_REPLACE(#{finishedGoodsInventory.area},'\\.0+$','')
            </if>
            <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''">
                and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber}
north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
@@ -53,6 +53,7 @@
              from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
@@ -75,10 +76,10 @@
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp #{finishedOperateLog.orderDetail.width}
                and  od.width regexp  REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp #{finishedOperateLog.orderDetail.height}
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
@@ -109,6 +110,7 @@
            from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
            left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                 date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
@@ -131,10 +133,10 @@
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp #{finishedOperateLog.orderDetail.width}
                and  od.width regexp  REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp #{finishedOperateLog.orderDetail.height}
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
@@ -176,6 +178,7 @@
              from mm.finished_operate_log aa where aa.operate_type = '调拨') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                 date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
@@ -204,10 +207,10 @@
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp #{finishedOperateLog.orderDetail.width}
                and  od.width regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp #{finishedOperateLog.orderDetail.height}
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
@@ -221,6 +224,45 @@
        from (select *
              from mm.finished_operate_log aa where aa.operate_type = '调拨') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.end_operation_order_number = od.order_number
        <where>
            date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
            <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''">
                and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber}
            </if>
            <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''">
                and fol.order_id regexp #{finishedOperateLog.orderId}
            </if>
            <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''">
                and fol.operation_number regexp #{finishedOperateLog.operationNumber}
            </if>
            <if test="finishedOperateLog.staterOperationOrderNumber != null and finishedOperateLog.staterOperationOrderNumber != ''">
                and fol.stater_operation_order_number regexp #{finishedOperateLog.staterOperationOrderNumber}
            </if>
            <if test="finishedOperateLog.endOperationOrderNumber != null and finishedOperateLog.endOperationOrderNumber != ''">
                and fol.end_operation_order_number regexp #{finishedOperateLog.endOperationOrderNumber}
            </if>
            <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''">
                and fol.quantity regexp #{finishedOperateLog.quantity}
            </if>
            <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''">
                and fol.operator regexp #{finishedOperateLog.operator}
            </if>
            <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''">
                and  od.product_id regexp #{finishedOperateLog.orderDetail.productId}
            </if>
            <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''">
                and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
            </if>
            <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                and  od.width regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''">
                and  od.height regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.height},'\\.0+$','')
            </if>
            <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''">
                and fol.operate_time regexp #{finishedOperateLog.operateTime}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
north-glass-erp/target/classes/mapper/sd/BasicData.xml
@@ -8,14 +8,14 @@
            *
        from
            basic_data as a
        where a.basic_type='order'
        where a.basic_type=#{type}
    </select>
    <select id="getOrderBasicDataType">
        select
            a.basic_category
        from
            basic_data as a
        where a.basic_type='order'
        where a.basic_type=#{type}
        group by  a.basic_category
    </select>
north-glass-erp/target/classes/mapper/sd/Delivery.xml
@@ -28,6 +28,9 @@
        <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/>
    </resultMap>
    <update id="updateDeliveryToExamine">
        update sd.delivery set delivery_state=#{deliveryState} where delivery_id=#{deliveryId}
    </update>
    <update id="updatedelivery">
        update sd.delivery set area=#{area},quantity=#{quantity},money=#{money} where delivery_id=#{oddNumber}
@@ -39,11 +42,11 @@
    <insert id="insertDelivery"  useGeneratedKeys="true" >
        insert into sd.delivery(delivery_state,stock_state,delivery_id,order_id,project,customer_id,customer_name,
        insert into sd.delivery(delivery_state,stock_state,payment_terms,delivery_id,order_id,project,customer_id,customer_name,
            delivery_date,pay_method,pay_date,salesman_id,salesman,creator_id,creator,contacts,contact_number,delivery_address,
                                area,quantity,money,remarks,create_time)
        values (
                   0,0,#{number} ,#{orderId},#{delivery.project},#{delivery.customerId},#{delivery.customerName},#{delivery.deliveryDate},#{delivery.payMethod},
                   0,0,#{delivery.paymentTerms},#{number} ,#{orderId},#{delivery.project},#{delivery.customerId},#{delivery.customerName},#{delivery.deliveryDate},#{delivery.payMethod},
                #{delivery.payDate},#{delivery.salesmanId},#{delivery.salesman},#{delivery.creatorId},#{delivery.creator},#{delivery.contacts},#{delivery.contactNumber},#{delivery.deliveryAddress},
                   0,0,0,#{delivery.remarks},now()
               )
@@ -73,7 +76,7 @@
        from sd.`order` o
        left join mm.finished_goods_inventory fgi on o.order_id = fgi.order_id
        <where>
            fgi.quantity_available > 0
            fgi.quantity_available > 0 and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="order.orderId != null and order.orderId != ''">
                and o.order_id REGEXP #{order.orderId}
            </if>
@@ -93,10 +96,10 @@
                and o.batch REGEXP #{order.batch}
            </if>
            <if test="order.money != null and order.money != ''">
                and o.money REGEXP #{order.money}
                and o.money REGEXP REGEXP_REPLACE(#{order.money},'\\.0+$','')
            </if>
            <if test="order.area != null and order.area != ''">
                and o.area REGEXP #{order.area}
                and o.area REGEXP REGEXP_REPLACE(#{order.area},'\\.0+$','')
            </if>
            <if test="order.packType != null and order.packType != ''">
                and o.pack_type REGEXP #{order.packType}
@@ -126,7 +129,7 @@
        o.money,o.area,o.create_time,o.pack_type,o.order_type,o.creator
        from sd.`order` o left join mm.finished_goods_inventory fgi on o.order_id=fgi.order_id
        <where>
            fgi.quantity_available > 0
            fgi.quantity_available > 0 and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="order.orderId != null and order.orderId != ''">
                and o.order_id REGEXP #{order.orderId}
            </if>
@@ -146,10 +149,10 @@
                and o.batch REGEXP #{order.batch}
            </if>
            <if test="order.money != null and order.money != ''">
                and o.money REGEXP #{order.money}
                and o.money REGEXP REGEXP_REPLACE(#{order.money},'\\.0+$','')
            </if>
            <if test="order.area != null and order.area != ''">
                and o.area REGEXP #{order.area}
                and o.area REGEXP REGEXP_REPLACE(#{order.area},'\\.0+$','')
            </if>
            <if test="order.packType != null and order.packType != ''">
                and o.pack_type REGEXP #{order.packType}
@@ -177,6 +180,7 @@
    <select id="getseletShippingOrderDetaildelivery" >
        select
        d.delivery_state,d.stock_state,d.payment_terms,
        d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number,
        d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id
        from sd.delivery d
@@ -204,6 +208,7 @@
    <select id="getseletShippingOrder">
        select * from sd.delivery d
        <where>
            date(d.create_time)>=#{startDate} and date(d.create_time) &lt;= #{endDate}
            <if test="delivery.deliveryId != null and delivery.deliveryId != ''">
                and d.delivery_id regexp #{delivery.deliveryId}
            </if>
@@ -232,14 +237,49 @@
                and d.quantity regexp #{delivery.quantity}
            </if>
            <if test="delivery.area != null and delivery.area != ''">
                and d.area regexp #{delivery.area}
                and d.area regexp REGEXP_REPLACE(#{delivery.area},'\\.0+$','')
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
    <select id="getseletShippingOrderPageTotal">
        select
            CEILING(count(id)/#{pageSize})
        from sd.delivery
        from sd.delivery d
        <where>
            date(d.create_time)>=#{startDate} and date(d.create_time) &lt;= #{endDate}
            <if test="delivery.deliveryId != null and delivery.deliveryId != ''">
                and d.delivery_id regexp #{delivery.deliveryId}
            </if>
            <if test="delivery.creator != null and delivery.creator != ''">
                and d.creator regexp #{delivery.creator}
            </if>
            <if test="delivery.deliveryDate != null and delivery.deliveryDate != ''">
                and d.delivery_date regexp #{delivery.deliveryDate}
            </if>
            <if test="delivery.customerId != null and delivery.customerId != ''">
                and d.customer_id regexp #{delivery.customerId}
            </if>
            <if test="delivery.customerName != null and delivery.customerName != ''">
                and d.customer_name regexp #{delivery.customerName}
            </if>
            <if test="delivery.project != null and delivery.project != ''">
                and d.project regexp #{delivery.project}
            </if>
            <if test="delivery.orderId != null and delivery.orderId != ''">
                and d.order_id regexp #{delivery.orderId}
            </if>
            <if test="delivery.payMethod != null and delivery.payMethod != ''">
                and d.pay_method regexp #{delivery.payMethod}
            </if>
            <if test="delivery.quantity != null and delivery.quantity != ''">
                and d.quantity regexp #{delivery.quantity}
            </if>
            <if test="delivery.area != null and delivery.area != ''">
                and d.area regexp REGEXP_REPLACE(#{delivery.area},'\\.0+$','')
            </if>
        </where>
        limit #{offset},#{pageSize};
</select>
</mapper>
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
@@ -56,7 +56,7 @@
    </resultMap>
    <update id="updateOrderDetailDeliveryNum">
        update sd.order_detail set delivery_num=#{finishedGoodsInventory.quantityAvailable} where order_id=#{orderId} and order_number=#{orderNumber}
        update sd.order_detail set delivery_num=#{deliveryDetail.quantity} where order_id=#{orderId} and order_number=#{orderNumber}
    </update>
    <select id="getdeliveryDetailmaximum" >
@@ -69,8 +69,8 @@
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time)
        values (
                   #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea},
                #{orderDetail.orderId},#{orderDetail.finishedGoodsInventory.quantityAvailable},
                #{orderDetail.price}*#{orderDetail.finishedGoodsInventory.quantityAvailable},'',1,now()
                #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity},
                #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now()
               )
    </insert>
@@ -90,6 +90,72 @@
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''">
                and dd.quantity regexp #{orderDetail.deliveryDetail.quantity}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp #{orderDetail.price}
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''">
                and dd.money regexp  REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
            <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes}
            </if>
        </where>
        limit #{offset},#{pageSize};
@@ -107,6 +173,72 @@
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''">
                and dd.quantity regexp #{orderDetail.deliveryDetail.quantity}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp #{orderDetail.price}
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''">
                and dd.money regexp  REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
            <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
@@ -118,7 +250,7 @@
               fgi.quantity_available,
               od.quantity- od.delivery_num as t_quantity,
               od.quantity as o_quantity,
               od.delivery_num as d_quantity,
               fgi.quantity_available as d_quantity,
               od.building_number,
               od.product_id,
               od.product_name,
@@ -143,6 +275,63 @@
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''">
                and od.delivery_num regexp #{orderDetail.deliveryNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp  REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
@@ -159,6 +348,63 @@
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''">
                and od.delivery_num regexp #{orderDetail.deliveryNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp  REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>