你好啊
2024-08-06 819a1abc8a542494234e844baa87da90b0c21ad4
Merge branch 'master' of http://bore.pub:10439/r/ERP_override
45个文件已修改
1个文件已添加
1694 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintRepairCustomLabel.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintRepairCustomLabelSemi.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/OrderDetail.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet3.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/CreateOutBound.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorageCreate.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/StorageRecord.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryProductReport.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/Order.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/OrderSummaryReport.vue 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/DeliveryDetail.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 1157 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderDetailMapper.xml 191 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -121,10 +121,7 @@
            }
          }
          //处理同配置打印
          handleGetQRCode()
          handleSummary()
        } else {
@@ -175,7 +172,7 @@
      totalArea += collection.total_area * 1;
      totalWeight += collection.width * collection.height * collection.quantity / 1000000 * collection.separation * 2.5 * 1;
      //每个序号周长
      collection.perimeter = (collection.width * 2 + collection.height * 2) * collection.quantity / 1000
      collection.perimeter = parseFloat(((collection.width * 2 + collection.height * 2) * collection.quantity / 1000).toFixed(3))
    });
    // 输出每个集合中的总数量
    produceList.value[i].detail[0].quantity = totalQuantity
@@ -318,13 +315,13 @@
      </tr>
      <tr v-for="(itemtextarea,index) in item.detail" :key="index">
        <td v-if="like='1'" colspan="4" rowspan="6" style="width: 480px;height: 100px ">
          <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{company.printLabel.printFlowCard.processingNote(itemtextarea)}}</textarea>
          <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{itemtextarea.otherRemarks}}</textarea>
          </div>
        </td>
        <td v-else colspan="6" rowspan="2" style="width: 480px;height: 100px ">
          <!--          <div style="width: 100%;height: 100%"><textarea style="height: 99%;width: 99%;font-size: 11px">{{ itemtextarea.processing_note }}</textarea>-->
          <!--          </div>-->
           <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{company.printLabel.printFlowCard.processingNote(itemtextarea)}}</textarea>
           <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{itemtextarea.otherRemarks}}</textarea>
           </div>
        </td>
        <td>完工签名</td>
north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue
@@ -137,8 +137,7 @@
          }
          //处理同配置打印
          handleSummary()
          handleGetQRCode()
        } else {
          ElMessage.warning(res.msg)
north-glass-erp/northglass-erp/src/components/pp/PrintRepairCustomLabel.vue
@@ -38,7 +38,7 @@
data.value.printList = JSON.parse(props.list)
onMounted(() => {
      request.post(`/Replenish/getSelectPrintCustomLabel/${type}`, data.value).then((res) => {
      request.post(`/Replenish/getSelectPrintCustomLabel/${type}/${lableType}`, data.value).then((res) => {
        if (res.code == 200) {
          produceList.value = deepClone(res.data.title)
north-glass-erp/northglass-erp/src/components/pp/PrintRepairCustomLabelSemi.vue
@@ -39,7 +39,7 @@
data.value.printList = JSON.parse(props.list)
onMounted(() => {
      request.post(`/Replenish/getSelectPrintCustomLabel/${type}`, data.value).then((res) => {
      request.post(`/Replenish/getSelectPrintCustomLabel/${type}/${lableType}`, data.value).then((res) => {
        if (res.code == 200) {
          produceList.value = deepClone(res.data.title)
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
@@ -200,7 +200,7 @@
              <td>{{delivery.quantity}}</td>
              <td>{{delivery.area}}</td>
              <td></td>
              <td>{{sumMoney}}</td>
              <td>{{parseFloat(sumMoney.toFixed(2))}}</td>
              <td colspan="2"></td>
            </tr>
            <tr class="day-in">
north-glass-erp/northglass-erp/src/components/sd/order/OrderDetail.vue
@@ -43,6 +43,7 @@
    {field: 'height',width:140,  title: t('order.height'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'quantity',width:140,  title: t('order.quantity'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'processingNote',width:200,  title: t('order.processingNote'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'price',width:140,  title: t('order.price'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'area',width:150,  title: t('order.trueArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged},
    {field: 'grossArea',width:160,  title: t('order.trueGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged},
    {field: 'computeArea',width:180,  title: t('order.computeArea'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet3.vue
@@ -187,7 +187,7 @@
        <td>{{delivery.quantity}}</td>
        <td>{{delivery.area}}</td>
        <td></td>
        <td>{{sumMoney}}</td>
        <td>{{parseFloat(sumMoney.toFixed(2))}}</td>
        <td colspan="2"></td>
      </tr>
      <tr class="day-in">
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -236,6 +236,7 @@
        oneClickStorage:'一键完工',
        quantityMount:'数量金额',
        orderSummaryReport:'订单总报表',
        msg:{
            productCheck:'请选择产品',
            tableLengthNot:'没有表格数据',
north-glass-erp/northglass-erp/src/router/index.js
@@ -167,6 +167,11 @@
              component: () => import('../views/sd/order/UpdateOrderCraft.vue'),
            },
            {
              path: 'orderSummaryReport',
              name: 'orderSummaryReport',
              component: () => import('../views/sd/order/OrderSummaryReport.vue'),
            },
            {
              path: 'orderReport',
              name: 'orderReport',
              component: () => import('../views/sd/order/OrderReport.vue'),
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
@@ -31,7 +31,6 @@
          router.push({path:'/main/ingredients/SelectIngredients',query:{random:Math.random()}})
        }else{
          ElMessage.warning(t('basicData.msg.deleteFail'))
          router.push("/login")
        }
      }).catch((err)=>{
        ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/CreateOutBound.vue
@@ -340,7 +340,6 @@
              router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}})
            } else {
              ElMessage.warning(t('basicData.msg.reviewFail'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
@@ -360,7 +359,6 @@
              router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}})
            } else {
              ElMessage.warning(t('basicData.msg.cancelReviewFail'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue
@@ -34,7 +34,6 @@
          router.push({path:'/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}})
        }else{
          ElMessage.warning(t('basicData.msg.deleteSuccess'))
          router.push("/login")
        }
      }).catch((err)=>{
        ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/ReturnToStorageCreate.vue
@@ -347,7 +347,6 @@
              router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}})
            }else{
              ElMessage.warning(t('basicData.msg.saveFail'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
@@ -368,7 +367,6 @@
              router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}})
            } else {
              ElMessage.warning(t('basicData.msg.reviewFail'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
@@ -388,7 +386,6 @@
              router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}})
            } else {
              ElMessage.warning(t('basicData.msg.cancelReviewFail'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
@@ -285,8 +285,10 @@
                router.push({path:'/main/productStock/CreateProductStock',query:{random:Math.random()}})
              }else{
                ElMessage.warning(t('productStock.entryFailure'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
              router.push("/login")
            })
          }
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue
@@ -72,7 +72,6 @@
              router.push({path:'/main/productStock/FinishedGoodsIssue',query:{random:Math.random()}})
            }else{
              ElMessage.warning(t('productStock.failedToRetrieve'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue
@@ -291,7 +291,6 @@
                router.push({path: '/main/productStock/FinishedProductOut', query: {random: Math.random()}})
              } else {
                ElMessage.warning(t('productStock.deliveryFailed'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue
@@ -71,7 +71,6 @@
              router.push({path:'/main/productStock/FinishedProductRework',query:{random:Math.random()}})
            } else {
              ElMessage.warning(t('productStock.reworkFailed'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
@@ -287,7 +287,6 @@
                router.push({path:'/main/productStock/OrderAllocation',query:{random:Math.random()}})
              } else {
                ElMessage.warning(t('productStock.transferFailed'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue
@@ -266,7 +266,6 @@
              }else{
                ElMessage.warning(t('basicData.msg.cancelReviewFail'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/StorageRecord.vue
@@ -285,7 +285,6 @@
              }else{
                ElMessage.warning(t('productStock.cancellationFailed'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue
@@ -278,7 +278,6 @@
              }else{
                ElMessage.warning(t('basicData.msg.reviewFail'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
@@ -316,7 +315,6 @@
              }else{
                ElMessage.warning(t('productStock.voidFailed'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue
@@ -257,7 +257,6 @@
              }else{
                ElMessage.warning(t('basicData.msg.cancelReviewFail'))
                router.push("/login")
              }
            }).catch((err)=>{
              ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
@@ -113,7 +113,7 @@
//标签类型
let  filteredOptions=[]
const lableType = ref('1')
const lableType = ref('2')
const lableTypeOptions = [
  {
    value: '1',
@@ -160,7 +160,7 @@
//打印类型
const printType = ref()
const printType = ref('小片标签')
//定义接收加载表头下拉数据
const titleSelectJson = ref({
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -320,7 +320,7 @@
      {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'},
      {code: 'printLabel', name: t('processCard.labelPrinting'), status: 'primary'},
      {code: 'printLabel2', name: t('processCard.labelPrinting2'), status: 'primary'},
      {code: 'printLike', name: "同配置打印", status: 'primary'},
      // {code: 'printLike', name: "同配置打印", status: 'primary'},
    ],
    // import: false,
    // export: true,
@@ -591,7 +591,7 @@
<template>
  <div class="main-div-customer">
    <el-input v-model="printMerge" :placeholder="$t('processCard.mergePrinting')" clearable
    <el-input v-show="isVisible" v-model="printMerge" :placeholder="$t('processCard.mergePrinting')" clearable
              style="width: 90px"></el-input>
    &nbsp;
    <label>{{ $t('processCard.labelStyle') }}:</label>
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -12,15 +12,25 @@
import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue"
import OrderSortDetail from '@/components/pp/OrderSortDetail.vue'
import companyInfo from "@/stores/sd/companyInfo"
import useUserInfoStore from "@/stores/userInfo";
//语言获取
const {t} = useI18n()
const company = companyInfo()
let router = useRouter()
const printVisible= ref(false)
const userStore = useUserInfoStore()
const userId = userStore.user.userId
let inquiryMode = company.printLabel.getSelectFlowCard;
const checkedValue = ref(inquiryMode)
const checkedValue = ref("")
if (userId==="A071" || userId==="A107"){
   checkedValue.value = ref(2)
}
else {
   checkedValue.value = ref(inquiryMode)
}
//排序
let editRow = ref({
  orderId:null,
@@ -257,7 +267,7 @@
            }
          }
          let array = orderIdList.split('|');
         router.push({path: '/main/processCard/PrintFlowCard', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value}})
         router.push({path: '/main/processCard/PrintFlowCard', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value}})
          return;
        }
@@ -291,7 +301,7 @@
            :icon="Search"
            type="primary" @click="getWorkOrder">{{ $t('basicData.search') }}
        </el-button>
        <vxe-checkbox style="margin-top:6px;margin-left:10px " v-if="!(checkedValue === 2 && inquiryMode === 2)" v-model="checkedValue"  content="合并" :checked-value="1" :unchecked-value="2" ></vxe-checkbox>
        <vxe-checkbox style="margin-top:6px;margin-left:10px " v-if="!(checkedValue.value === 2 && inquiryMode === 2)" v-model="checkedValue.value"  content="合并" :checked-value="1" :unchecked-value="2" ></vxe-checkbox>
      </el-row>
    </div>
    <vxe-grid
north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue
@@ -95,7 +95,6 @@
      router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}})
    }else{
      ElMessage.warning(t('basicData.msg.saveFail'))
      router.push("/login")
    }
  }).catch((err)=>{
    ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
@@ -52,7 +52,6 @@
          router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}})
        }else{
          ElMessage.warning(t('basicData.msg.deleteFail'))
          router.push("/login")
        }
      }).catch((err)=>{
        ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
@@ -228,6 +228,9 @@
        })
        otherMoney.value =res.data.orderOtherMoneyList
        titleUploadData.value.creator=userStore.user.userName
        titleUploadData.value.creatorId=userStore.user.userId
        xGrid.value.reloadData(orderDetails)
        xGrid.value.loadData(produceList)
        //隐藏复选框
@@ -413,6 +416,7 @@
            deliveryIdType:company.deliveryIdType
          })
          console.log(flowData.value)
           request.post("/Delivery/insertDelivery", flowData.value).then((res) => {
             if(res.code==200 && res.data===true){
               ElMessage.success(t('delivery.deliveryNoteSubmittedSuccessfully'))
@@ -440,7 +444,6 @@
              router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}})
            } else {
              ElMessage.warning(t('basicData.msg.reviewFail'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
@@ -460,7 +463,6 @@
              router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}})
            } else {
              ElMessage.warning(t('basicData.msg.reviewFail'))
              router.push("/login")
            }
          }).catch((err)=>{
            ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryProductReport.vue
@@ -16,11 +16,14 @@
    {field: 'orderDetail.productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.paymentTerms',width:120, title: t('delivery.paymentTerms'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.project',width:140, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity',width:120, title: t('order.quantity'), sortable: true},
    {field: 'quantity',width:120, title: t('order.quantity'),sortable: true},
    {field: 'price',width:120, title: t('order.price'), sortable: true},
    {field: 'area',width:120, title: t('productStock.totalArea'), sortable: true},
    {field: 'order.otherMoney',width:120, title: t('basicData.otherAmounts'), sortable: true},
    {field: 'money',width:120, title: t('delivery.money'), sortable: true},
    {field: 'delivery.freight',width:120, title: t('delivery.freight'), sortable: true},
    {field: 'delivery.freightPrice',width:120, title: t('delivery.freightPrice'), sortable: true},
    {field: 'delivery.freightQuantity',width:120, title: t('delivery.freightQuantity'), sortable: true},
    {field: 'delivery.customerId',width:120, title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.deliveryDate',width:120, title: t('delivery.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryReport.vue
@@ -16,11 +16,14 @@
    {field: 'orderDetail.productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.paymentTerms',width:120, title: t('delivery.paymentTerms'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.project',width:140, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity',width:120, title: t('order.quantity'), sortable: true},
    {field: 'price',width:120, title: t('order.price'), sortable: true},
    {field: 'area',width:120, title: t('productStock.totalArea'), sortable: true},
    {field: 'order.otherMoney',width:120, title: t('basicData.otherAmounts'), sortable: true},
    {field: 'money',width:120, title: t('delivery.money'), sortable: true},
    {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'price',width:120, title: t('order.price'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'area',width:120, title: t('productStock.totalArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.otherMoney',width:120, title: t('basicData.otherAmounts'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'money',width:120, title: t('delivery.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.freight',width:120, title: t('delivery.freight'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.freightPrice',width:120, title: t('delivery.freightPrice'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.freightQuantity',width:120, title: t('delivery.freightQuantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.customerId',width:120, title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'delivery.deliveryDate',width:120, title: t('delivery.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -46,7 +46,6 @@
          router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}})
        }else{
          ElMessage.warning(t('basicData.msg.deleteFail'))
          router.push("/login")
        }
      }).catch((err)=>{
        ElMessage.error(t('basicData.msg.ServerConnectionError'))
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -384,6 +384,7 @@
                    item.computeArea = item.area
                    item.computeGrossArea = item.grossArea
                  })
                  computedMoney(null)
                  selectOrder(order)
                }
@@ -1225,6 +1226,7 @@
//关闭其他金额界面
const refOtherMoney = ref()
const closeOtherMoneyDialog = async (done) => {
north-glass-erp/northglass-erp/src/views/sd/order/Order.vue
@@ -39,6 +39,7 @@
            </span>
            <template #dropdown>
              <el-dropdown-menu>
                <el-dropdown-item command="/main/order/orderSummaryReport" >{{$t('order.orderSummaryReport')}}</el-dropdown-item>
                <el-dropdown-item command="/main/order/orderReport" >{{ $t('order.orderReport') }}</el-dropdown-item>
                <el-dropdown-item command="/main/order/orderProductSummaryReport">{{ $t('order.orderDetailsSummary') }}</el-dropdown-item>
              </el-dropdown-menu>
north-glass-erp/northglass-erp/src/views/sd/order/OrderSummaryReport.vue
New file
@@ -0,0 +1,48 @@
<script setup>
import BasicTable from "@/components/BasicTable.vue"
import { ref} from "vue"
import request from "@/utils/request"
import {useI18n} from "vue-i18n";
const { t } = useI18n()
const childrenData = ref({
  columns:[
    {type:'expand',fixed:"left",width: 80,slots: { content:'content' }},
    {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 },
    {field: 'orderId',width:120, title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderType',width:120, title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'project',width:120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'batch',width:120, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'area',width:120, title: t('order.area'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    //{field: 'otherMoney',width:120, title: t('basicData.otherAmounts'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'money',width:120, title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'perimeter',width:120, title: t('order.perimeter'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'processingNote',width:120, title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'icon',width:120, title: t('order.icon'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'packType',width:120, title: t('order.packType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'alType',width:120, title: t('order.alType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'salesman',width:120, title: t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'deliveryAddress',width:120, title: t('order.deliveryAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'creator',width:120, title: t('order.creator'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'createTime',width:120, title: t('basicData.creationTime'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'customerBatch',width:120, title: t('order.customerBatch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
  ],//表格表头字段
  data:[],//表格数据
  url :'/order/getOrderSummaryReport',
  exportUrl :'/order/exportOrderSummary',
  exportName:t('order.orderSummaryReport'),
  footList:['quantity','money','area','perimeter','otherMoney']
})
</script>
<template>
  <basic-table
      :childrenData="childrenData"/>
</template>
<style scoped>
</style>
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
@@ -70,10 +70,11 @@
    }
    @ApiOperation("补片打印自定义标签数据查询接口")
    @PostMapping("/getSelectPrintCustomLabel/{type}")
    @PostMapping("/getSelectPrintCustomLabel/{type}/{lableType}")
    public Result getSelectPrintCustomLabel( @PathVariable String type,
                                             @PathVariable Integer lableType,
                                             @RequestBody Map<String, Object> object) {
        return Result.seccess(replenishService.getSelectPrintCustomLabelSv(type,object));
        return Result.seccess(replenishService.getSelectPrintCustomLabelSv(type,lableType,object));
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
@@ -151,6 +151,18 @@
        return  Result.seccess(orderService.getOrderProductSummary(pageNum,pageSize,selectDate,orderDetail));
    }
    @SaCheckPermission("orderReport.search")
    @ApiOperation("查询订单总报表")
    @PostMapping("/getOrderSummaryReport/{pageNum}/{pageSize}/{selectDate}")
    public Result getOrderSummaryReport(@PathVariable Integer pageNum,
                                 @PathVariable Integer pageSize,
                                 @PathVariable List<String> selectDate,
                                 @RequestBody Order order)  {
        return  Result.seccess(orderService.getOrderSummaryReport(pageNum,pageSize,selectDate,order));
    }
    @ApiOperation("订单报表导出")
    @PostMapping("/exportOrderReport")
    public void exportOrderReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
@@ -166,6 +178,14 @@
        DownExcel.download(response, OrderDTO.class, orderService.exportOrderProductSummary(dates),"orderReport");
    }
    @ApiOperation("订单总报表导出")
    @PostMapping("/exportOrderSummary")
    public void exportOrderSummary(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
        //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字
        DownExcel.download(response, Order.class, orderService.exportOrderSummary(dates),"orderReport");
    }
    @ApiOperation("订单小片标签")
    @PostMapping("/getOrderProductDetailTag/{orderId}")
north-glass-erp/src/main/java/com/example/erp/entity/sd/DeliveryDetail.java
@@ -20,6 +20,7 @@
    private Integer quantity;
    private Double money;
    private Double price;
    private Double otherMoney;
    private String deliveryDetailRemakes;
    private Integer deliveryDetailState;
    private String otherColumns;
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -141,4 +141,6 @@
    List<Map<String, String>> selectPrintNotMp(String orderId);
    List<Map<String, String>> selectPrintNotMergeMp(String orderId);
    List<Map<String, String>> getRepairPrintCustomDataSemi(String processId, Integer technologyNumber, String reportingWorkId);
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java
@@ -63,7 +63,8 @@
    Integer getSelectShippingOrderDetailsPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail);
    Boolean insertDeliveryDetail(@Param("orderDetail") OrderDetail orderDetail, @Param("number") String number
            ,@Param("deliveryNumber") Integer deliveryNumber,@Param("deliveryDetailMoney") Double deliveryDetailMoney);
            ,@Param("deliveryNumber") Integer deliveryNumber,@Param("deliveryDetailMoney") Double deliveryDetailMoney,
                                 @Param("otherMoneys") Double otherMoneys);
    Integer getdeliveryDetailmaximum(@Param("deliveryId") String deliveryId);
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.dto.sd.OrderDTO;
import com.example.erp.dto.sd.OrderDetailProductDTO;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
@@ -42,5 +43,11 @@
    List<Map<String,Object>> getOrderProductByProductIds(Object productId, String orderId);
    List<Order> getOrderSummaryReport(Integer offset, Integer pageSize, String startDate, String endDate, Order order);
    Map<String,Integer> getOrderSummaryReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, Order order, String type);
    List<Order> exportOrderSummary(List<LocalDate> dates);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
@@ -191,16 +191,23 @@
        return map;
    }
    public Map<String, Object> getSelectPrintCustomLabelSv(String type, Map<String, Object> object) {
    public Map<String, Object> getSelectPrintCustomLabelSv(String type, Integer lableType, Map<String, Object> object) {
        Map<String, Object> map = new HashMap<>();
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            for (FlowCard flowCard : flowCardList) {
                if (lableType != 2){
                    Map<String, Object> itemmap = new HashMap<>();
                    itemmap.put("data", flowCardMapper.getRepairPrintCustomData(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getReportingWorkId()));
                    list.add(itemmap);
                }
                else{
                    Map<String, Object> itemmap = new HashMap<>();
                    itemmap.put("data", flowCardMapper.getRepairPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getReportingWorkId()));
                    list.add(itemmap);
                }
                Map<String, Object> itemmap = new HashMap<>();
                itemmap.put("data", flowCardMapper.getRepairPrintCustomData(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getReportingWorkId()));
                list.add(itemmap);
            }
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -10,9 +10,11 @@
import com.example.erp.dto.sd.DeliveryDetailDTO;
import com.example.erp.dto.sd.DeliveryDetailProductDTO;
import com.example.erp.entity.sd.*;
import com.example.erp.entity.userInfo.Log;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper;
import com.example.erp.mapper.sd.*;
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -41,6 +43,8 @@
    FinishedGoodsInventoryMapper finishedGoodsInventoryMapper;
    @Autowired
    DeliveryOtherMoneyMapper deliveryOtherMoneyMapper;
    @Autowired
    LogService logService;
    @Autowired
    SysErrorService sysErrorService;
@@ -175,6 +179,11 @@
            //查询发货单是否存在
            Integer deliveryConut = deliveryMapper.getDeliveryConut(deliveryId);
            Log log = new Log();
            log.setOperator(delivery.getCreator());
            log.setOperatorId(delivery.getCreatorId());
            log.setContent(object.toString());
            if (deliveryConut != 0) {
                //编辑还原数据
                String deliveryDetailNumber = "";
@@ -205,11 +214,13 @@
                deliveryOtherMoneyMapper.deleteDeliveryOtherMoney(deliveryId);
                oddNumber = deliveryId;
                deliveryMapper.updateDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId());
                log.setFunction("insertDelivery修改:"+oddNumber);
            } else {
                //获取单号
                oddNumber = orderNumberSetting("发货",deliveryIdType);
                //新增发货表数据
                deliveryMapper.insertDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId());
                log.setFunction("insertDelivery新增:"+oddNumber);
            }
            double area = 0.0;
            Integer quantity = 0;
@@ -221,10 +232,12 @@
                deliveryOtherMoney.setQuantity(0.0);
            });
            double otherMoneys=0.0;
            List <Map<String, Object>> moneryList=new ArrayList<Map<String, Object>>();//最终结果
            //获取对象集合循环进行新增修改
            if (!orderDetaillist.isEmpty()) {
                for (OrderDetail orderDetail : orderDetaillist) {
                    double deliveryDetailotherMoneys=0.0;
                    Integer calculateType=0;
                    if (orderDetail.getOrder().getOrderId()==null){
@@ -258,6 +271,7 @@
                                Map<String, Object> deliveryDetailOtherMoney = deliveryDetailMapper.getSelectOrderotherMoney(orderDetail.getOrderId(),orderDetail.getOrderNumber(), key, jsonObject.get(key).toString());
                                if(deliveryDetailOtherMoney.get("monery")!=null){
                                    otherMoneys=otherMoneys+Double.valueOf(deliveryDetailOtherMoney.get("monery").toString());
                                    deliveryDetailotherMoneys=Double.valueOf(deliveryDetailOtherMoney.get("monery").toString());
                                    moneryItemmap.put("DeliveryDetailOtherMoney", deliveryDetailOtherMoney);
                                    moneryList.add(moneryItemmap);
                                }else{
@@ -293,7 +307,7 @@
                    }
                    //新增发货明细数据
                    deliveryDetailMapper.insertDeliveryDetail(orderDetail, oddNumber, deliveryDetailmaximum + 1,deliveryDetailMoney);
                    deliveryDetailMapper.insertDeliveryDetail(orderDetail, oddNumber, deliveryDetailmaximum + 1,deliveryDetailMoney,deliveryDetailotherMoneys);
                    //修改订单明细
                    deliveryDetailMapper.updateOrderDetailDeliveryNum(orderDetail);
                    //修改库存表出库数量
@@ -318,7 +332,7 @@
                int intMoney= (int) Math.round(money+freight+otherMoneys);
                //修改发货明细累加面积数量金额
                deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)), quantity, Double.valueOf(intMoney), otherMoney.get(), oddNumber);
                logService.saveLog(log);
            } else {
                return false;
            }
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -437,6 +437,34 @@
        return orderDetailMapper.exportOrderReport(dates);
    }
    public Map<String,Object> getOrderSummaryReport(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",orderDetailMapper.getOrderSummaryReport(offset, pageSize, startDate, endDate, order));
        map.put("total",orderDetailMapper.getOrderSummaryReportTotal(offset, pageSize, startDate, endDate, order,"order"));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
//        map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail));
        return map;
    }
    public List<Order> exportOrderSummary(List<LocalDate> dates) {
        return orderDetailMapper.exportOrderSummary(dates);
    }
    public Map<String,Object> getOrderProductSummary(Integer pageNum, Integer pageSize, List<String> selectDate, OrderDetail orderDetail) {
        Integer offset = (pageNum-1)*pageSize;
        String endDate = LocalDate.now().toString();
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -256,20 +256,16 @@
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id and od.order_number = ogd.order_number
                 left join sd.product as p on od.product_name = p.product_name
                 left join (
            SELECT
                order_id,
                order_number,
                JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S01' )) AS S01,
                JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S02' )) AS S02,
                JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S03' )) AS S03,
                JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S04' )) AS S04,
                JSON_UNQUOTE( JSON_EXTRACT( other_columns, '$.S05' )) AS S05
            FROM
                sd.order_detail
            WHERE
                order_id = #{orderId}
        ) as ods on ods.order_id=od.order_id and ods.order_number=od.order_number
                 left join (SELECT order_id,
                                   order_number,
                                   JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')) AS S01,
                                   JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S02')) AS S02,
                                   JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S03')) AS S03,
                                   JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S04')) AS S04,
                                   JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S05')) AS S05
                            FROM sd.order_detail
                            WHERE order_id = #{orderId}) as ods
                           on ods.order_id = od.order_id and ods.order_number = od.order_number
        where od.order_id = #{orderId}
          and ogd.production_id = #{productionId}
          and ogd.splitting_status = 0
@@ -450,7 +446,14 @@
    </delete>
    <select id="selectPrintFlowCardMp">
        select order_id,project,customer_name,quantity,area,order_type,pack_type,batch
        select order_id,
               project,
               customer_name,
               quantity,
               area,
               order_type,
               pack_type,
               batch
        from sd.order
        where create_time between #{selectTime1} and #{selectTime2}
          and position(#{orderId} in order_id)
@@ -468,161 +471,169 @@
    </select>
    <select id="selectPrintMp">
        select * from ((select fc.id,
                               fc.order_id,
                               fc.process_id,
                               o.customer_name,
                               o.project,
                               ogdss.technology_number,
                               ogdss.concatenated_glass_child,
                               ROUND(sum(fc.quantity)/(count(DISTINCT fc.technology_number)))         as quantity,
                               sum(ogd.total_area)      as total_area,
                               # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                               od.product_name,
                               ogdss.concatenated_glass_child as glass_child,
                               fc.founder,
                               date(fc.splitFrame_time) as splitFrame_time,
                               fc.print_status,
                               processed_part as  process
        select *
        from ((select fc.id,
                      fc.order_id,
                      fc.process_id,
                      o.customer_name,
                      o.project,
                      ogdss.technology_number,
                      ogdss.concatenated_glass_child,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
                      date(fc.splitFrame_time)                                         as splitFrame_time,
                      fc.print_status,
                      processed_part                                                   as process
                        from flow_card as fc
                                 left join sd.order_glass_detail as ogd
                                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                              ogd.technology_number = fc.technology_number
                                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                                 left join sd.`order` as o on o.order_id = fc.order_id
                                 left join (
                            select
                                ogds.order_id,
                                ogds.order_number,
                                GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
                                ogds.glass_child AS concatenated_glass_child,
                                process AS processed_part
                            from sd.order_glass_detail as ogds
                            where ogds.order_id = #{orderId}
                            GROUP BY order_id, order_number,ogds.glass_child
                        ) as ogdss on fc.order_id=ogdss.order_id and ogdss.order_number=fc.order_number
                        where fc.order_id = #{orderId}
                        GROUP BY fc.process_id,ogdss.concatenated_glass_child
                        order by fc.process_id,ogdss.technology_number)
               from flow_card as fc
                        left join sd.order_glass_detail as ogd
                                  on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                     ogd.technology_number = fc.technology_number
                        left join sd.order_detail as od
                                  on od.order_id = fc.order_id and od.order_number = fc.order_number
                        left join sd.`order` as o on o.order_id = fc.order_id
                        left join (select ogds.order_id,
                                          ogds.order_number,
                                          GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
                                          ogds.glass_child                                  AS concatenated_glass_child,
                                          process                                           AS processed_part
                                   from sd.order_glass_detail as ogds
                                   where ogds.order_id = #{orderId}
                                   GROUP BY order_id, order_number, ogds.glass_child) as ogdss
                                  on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
               where fc.order_id = #{orderId}
               GROUP BY fc.process_id, ogdss.concatenated_glass_child
               order by fc.process_id, ogdss.technology_number)
                       UNION
              UNION
                       (select fc.id,
                               fc.order_id,
                               fc.process_id,
                               o.customer_name,
                               o.project,
                               ogdss.technology_number,
                               ogd.glass_address,
                               ROUND(sum(fc.quantity)/(count(DISTINCT fc.technology_number)))         as quantity,
                               sum(ogd.total_area)      as total_area,
                               # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                               od.product_name,
                               ogdss.concatenated_glass_child as glass_child,
                               fc.founder,
                               date(fc.splitFrame_time) as splitFrame_time,
                               fc.print_status,
                               processed_part as  process
              (select fc.id,
                      fc.order_id,
                      fc.process_id,
                      o.customer_name,
                      o.project,
                      ogdss.technology_number,
                      ogd.glass_address,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
                      date(fc.splitFrame_time)                                         as splitFrame_time,
                      fc.print_status,
                      processed_part                                                   as process
                        from flow_card as fc
                                 left join sd.order_glass_detail as ogd
                                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                              ogd.technology_number = fc.technology_number
                                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                                 left join sd.`order` as o on o.order_id = fc.order_id
                                 left join (
                            select
                                ogds.order_id,
                                ogds.order_number,
                                GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
                                ogds.glass_child,
                                GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child,
                                SUBSTRING(process, LOCATE('夹胶', process)) AS processed_part
                            from sd.order_glass_detail as ogds
                            where ogds.order_id = #{orderId} and LOCATE('夹胶',ogds.process)>0
                            GROUP BY order_id, order_number,ogds.group
                        ) as ogdss on fc.order_id=ogdss.order_id and ogdss.order_number=fc.order_number
                        where fc.order_id = #{orderId}
                        GROUP BY fc.process_id,ogdss.technology_number
                        order by fc.process_id)
                       UNION
                       (select fc.id,
                               fc.order_id,
                               fc.process_id,
                               o.customer_name,
                               o.project,
                               ogdss.technology_number,
                               ogd.glass_address,
                               ROUND(sum(fc.quantity)/(count(DISTINCT fc.technology_number)))         as quantity,
                               sum(ogd.total_area)      as total_area,
                               od.product_name,
                               ogdss.concatenated_glass_child as glass_child,
                               fc.founder,
                               date(fc.splitFrame_time) as splitFrame_time,
                               fc.print_status,
                               processed_part as process
               from flow_card as fc
                        left join sd.order_glass_detail as ogd
                                  on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                     ogd.technology_number = fc.technology_number
                        left join sd.order_detail as od
                                  on od.order_id = fc.order_id and od.order_number = fc.order_number
                        left join sd.`order` as o on o.order_id = fc.order_id
                        left join (select ogds.order_id,
                                          ogds.order_number,
                                          GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
                                          ogds.glass_child,
                                          GROUP_CONCAT(ogds.glass_child SEPARATOR ' ')      AS concatenated_glass_child,
                                          SUBSTRING(process, LOCATE('夹胶', process))       AS processed_part
                                   from sd.order_glass_detail as ogds
                                   where ogds.order_id = #{orderId}
                                     and LOCATE('夹胶', ogds.process) > 0
                                   GROUP BY order_id, order_number, ogds.group) as ogdss
                                  on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
               where fc.order_id = #{orderId}
               GROUP BY fc.process_id, ogdss.technology_number
               order by fc.process_id)
              UNION
              (select fc.id,
                      fc.order_id,
                      fc.process_id,
                      o.customer_name,
                      o.project,
                      ogdss.technology_number,
                      ogd.glass_address,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
                      date(fc.splitFrame_time)                                         as splitFrame_time,
                      fc.print_status,
                      processed_part                                                   as process
                        from flow_card as fc
                                 left join sd.order_glass_detail as ogd
                                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                              ogd.technology_number = fc.technology_number
                                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                                 left join sd.`order` as o on o.order_id = fc.order_id
                                 left join (
                            select
                                ogds.order_id,
                                ogds.order_number,
                                GROUP_CONCAT(pds.glass_sort SEPARATOR '') AS technology_number,
                                ogds.glass_child,
                                GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child,
                                SUBSTRING(pds.process, LOCATE('中空', pds.process)) AS processed_part
                            from sd.order_glass_detail as ogds
                                     left join sd.order_detail as ods on ods.order_id=ogds.order_id and ods.order_number=ogds.order_number
                                     left join sd.product_detail as pds on pds.prod_id=ods.product_id and pds.glass_sort=ogds.technology_number
                            where ogds.order_id = #{orderId}
                            GROUP BY order_id, order_number
                        ) as ogdss on fc.order_id=ogdss.order_id and ogdss.order_number=fc.order_number
                        where fc.order_id = #{orderId}
                        GROUP BY fc.process_id
                        order by fc.process_id)
                       ) AS combined_results where process is not null and process!=""
               from flow_card as fc
                        left join sd.order_glass_detail as ogd
                                  on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                     ogd.technology_number = fc.technology_number
                        left join sd.order_detail as od
                                  on od.order_id = fc.order_id and od.order_number = fc.order_number
                        left join sd.`order` as o on o.order_id = fc.order_id
                        left join (select ogds.order_id,
                                          ogds.order_number,
                                          GROUP_CONCAT(pds.glass_sort SEPARATOR '')           AS technology_number,
                                          ogds.glass_child,
                                          GROUP_CONCAT(ogds.glass_child SEPARATOR ' ')        AS concatenated_glass_child,
                                          SUBSTRING(pds.process, LOCATE('中空', pds.process)) AS processed_part
                                   from sd.order_glass_detail as ogds
                                            left join sd.order_detail as ods
                                                      on ods.order_id = ogds.order_id and ods.order_number = ogds.order_number
                                            left join sd.product_detail as pds on pds.prod_id = ods.product_id and
                                                                                  pds.glass_sort =
                                                                                  ogds.technology_number
                                   where ogds.order_id = #{orderId}
                                   GROUP BY order_id, order_number) as ogdss
                                  on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
               where fc.order_id = #{orderId}
               GROUP BY fc.process_id
               order by fc.process_id)) AS combined_results
        where process is not null
          and process != ""
    </select>
    <select id="getPrimaryList">
        select o.customer_name,
               o.project,
               #{process} process,
               #{process}                                         process,
               od.edging_type,
               #{glassChild} as glass_child,
               #{glassChild}                                   as glass_child,
               od.product_name,
               o.processing_note,
               fc.process_id,
               SUM(od.quantity)                                as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               sum(od.weight)                   as weight,
               sum(od.weight)                                  as weight,
               #{technologyNumber}                             as technologyNumber,
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber,
               concat("对应我司", TRIM(
                       SUBSTRING(
                               o.processing_note,
                               LOCATE('对应我司', o.processing_note) + CHAR_LENGTH('对应我司')
                           ))
                   )                                           AS otherRemarks
        from flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id=od.product_id
                 left join (
            select         ogd.order_id,
                           ogd.order_number,
                           ogd.technology_number,
                           ogd.glass_child,
                           GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
            from sd.order_glass_detail as ogd
            where ogd.order_id = left(#{processId},10)
              and position(ogd.technology_number in #{technologyNumber})
            GROUP BY order_id, order_number
        ) as ogdc on ogdc.order_id=ogd.order_id and ogdc.order_number=ogd.order_number and ogdc.technology_number=ogd.technology_number
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left(#{processId}, 10)
                              and position(ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by fc.process_id
@@ -635,10 +646,10 @@
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               concat(od.processing_note,od.remarks) as remarks,
               concat(IFNULL(od.processing_note,''), IFNULL(od.remarks,''))                       as remarks,
               od.other_columns,
               round(ogd.child_width) as width,
               round(ogd.child_height) as height,
               round(ogd.child_width)                                       as width,
               round(ogd.child_height)                                      as height,
               pd.separation,
               fc.technology_number
        from flow_card as fc
@@ -646,7 +657,8 @@
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
        left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by fc.process_id, fc.order_number
@@ -682,8 +694,8 @@
               o.project,
               od.building_number,
               od.processing_note,
               ogd.child_width as width,
               ogd.child_height as height,
               ogd.child_width         as width,
               ogd.child_height        as height,
               ogd.glass_child,
               ogd.process,
               e.type_name,
@@ -696,42 +708,45 @@
                 left join sd.order_detail od
                           on SUBSTR(opd.process_id, 1, 10) = od.order_id and opd.order_sort = od.order_number
                 left join sd.order_glass_detail ogd
                           on SUBSTR(opd.process_id, 1, 10) = ogd.order_id and opd.order_sort = ogd.order_number and opd.layer=ogd.technology_number
                           on SUBSTR(opd.process_id, 1, 10) = ogd.order_id and opd.order_sort = ogd.order_number and
                              opd.layer = ogd.technology_number
                 left join sd.product p on od.product_id = p.id
                 left join sd.basic_glass_type e on e.type_id = p.type_id
        left join sd.customer c on c.id=o.customer_id
                 left join sd.customer c on c.id = o.customer_id
        where opd.project_no = #{projectNo}
        order by opd.stock_id
    </select>
    <select id="getPrintLabel1">
        select o.order_id ,
        select o.order_id,
               o.project,
               o.customer_id ,
               ogd.child_width as width,
               ogd.child_height as height,
               o.customer_id,
               ogd.child_width                as width,
               ogd.child_height               as height,
               od.quantity,
               od.order_number as orderNumber,
               fc.technology_number as technologyNumber,
               od.order_number                as orderNumber,
               fc.technology_number           as technologyNumber,
               ogd.glass_child,
               ogd.process,
               c.customer_abbreviation as customer_name,
               ifnull(od.processing_note,'') as processing_note,
               c.customer_abbreviation        as customer_name,
               ifnull(od.processing_note, '') as processing_note,
               bgt.type_name,
               od.other_columns,
               od.building_number,
               od.bend_radius
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number
                 left join sd.order_glass_detail as ogd
                           on ogd.order_id = od.order_id and ogd.order_number = od.order_number
                 left join pp.flow_card as fc on o.order_id = fc.order_id and
                                                 od.order_number = fc.order_number and fc.technology_number=ogd.technology_number
                 left join sd.product pt on pt.id=od.product_id
                 left join sd.customer c on c.id=o.customer_id
                 left join sd.basic_glass_type bgt on bgt.type_id=pt.type_id
                                                 od.order_number = fc.order_number and
                                                 fc.technology_number = ogd.technology_number
                 left join sd.product pt on pt.id = od.product_id
                 left join sd.customer c on c.id = o.customer_id
                 left join sd.basic_glass_type bgt on bgt.type_id = pt.type_id
        where fc.process_id = #{processId}
          and fc.technology_number=#{technologyNumber}
        group by od.order_number,od.width,od.height
          and fc.technology_number = #{technologyNumber}
        group by od.order_number, od.width, od.height
    </select>
    <select id="printFlowCardDetailsMp">
@@ -750,7 +765,7 @@
            AND fc.order_number = ogd.order_number
            AND fc.technology_number = ogd.technology_number
        where fc.process_id = #{processId}
          and  position(fc.technology_number in #{technologyNumber})
          and position(fc.technology_number in #{technologyNumber})
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.order_number)
    </select>
@@ -805,58 +820,61 @@
    </resultMap>
    <select id="getPrintCustomData">
        select o.order_id           as orderId,
        select o.order_id                                            as orderId,
               project,
               customer_id          as customerId,
               o.customer_name        as customerName,
               order_type           as orderType,
               order_classify       as orderClassify,
               customer_id                                           as customerId,
               o.customer_name                                       as customerName,
               order_type                                            as orderType,
               order_classify                                        as orderClassify,
               batch,
               o.icon,
               pack_type            as packType,
               delivery_date        as deliveryDate,
               al_type              as alType,
               pack_type                                             as packType,
               delivery_date                                         as deliveryDate,
               al_type                                               as alType,
               money,
               contract_id          as contractId,
               customer_batch          customerBatch,
               contract_id                                           as contractId,
               customer_batch                                           customerBatch,
               contacts,
               delivery_address     as deliveryAddress,
               od.processing_note   as processingNote,
               delivery_address                                      as deliveryAddress,
               od.processing_note                                    as processingNote,
               width,
               height,
               od.quantity,
               od.order_number      as orderNumber,
               fc.technology_number as technologyNumber,
               od.building_number   as buildingNumber,
               od.product_name      as productName,
               od.edging_type       as edgingType,
               od.order_number                                       as orderNumber,
               fc.technology_number                                  as technologyNumber,
               od.building_number                                    as buildingNumber,
               od.product_name                                       as productName,
               od.edging_type                                        as edgingType,
               p.remarks,
               c.customer_abbreviation as customerAbbreviation,
               p.product_abbreviation as productAbbreviation,
               fc.process_id as processId,
               o.create_time as createTime,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S02' )) AS figureNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S03' )) AS colourCeramicGlaze,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S04' )) AS remarks1,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S05' )) AS remarks2,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S06' )) AS remarks3,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S07' )) AS remarks4,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S08' )) AS remarks5,
                p.remarks as filmNumber,
                od.bend_radius as bendRadius,
                od.other_columns,
               ogd.glass_child as glassChild,
               ogd.glass_address as glassAddress,
               JSON_UNQUOTE( JSON_EXTRACT( pd.separation, '$.color' )) AS color
               c.customer_abbreviation                               as customerAbbreviation,
               p.product_abbreviation                                as productAbbreviation,
               fc.process_id                                         as processId,
               o.create_time                                         as createTime,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5,
               p.remarks                                             as filmNumber,
               od.bend_radius                                        as bendRadius,
               od.other_columns,
               ogd.glass_child                                       as glassChild,
               ogd.glass_address                                     as glassAddress,
               JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color'))  AS color
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join flow_card as fc on o.order_id = fc.order_id and
                                              od.order_number = fc.order_number
                 left join sd.product as p on p.id=od.product_id
                 left join sd.product as p on p.id = od.product_id
                 left join sd.customer as c on c.id = o.customer_id
        left join sd.product_detail as pd  on pd.prod_id=p.id and pd.sort_num=od.order_number and pd.glass_sort=fc.technology_number
        left join sd.order_glass_detail as ogd on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number and ogd.technology_number=fc.technology_number
                 left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and
                                                      pd.glass_sort = fc.technology_number
                 left join sd.order_glass_detail as ogd
                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                              ogd.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        group by od.order_number, width, height
@@ -893,64 +911,65 @@
                 left join patch_log as pl on pl.order_id = fc.order_id and pl.process_id = fc.process_id and
                                              pl.order_sort = fc.order_number and
                                              pl.technology_number = fc.technology_number
        where pl.create_time between #{selectTime1} and #{selectTime2} and pl.review_status>0
        GROUP BY pl.id,fc.process_id, ogd.technology_number
        order by pl.id desc,fc.process_id, ogd.technology_number
        where pl.create_time between #{selectTime1} and #{selectTime2}
          and pl.review_status > 0
        GROUP BY pl.id, fc.process_id, ogd.technology_number
        order by pl.id desc, fc.process_id, ogd.technology_number
    </select>
    <select id="getRepairPrintCustomData">
        select o.order_id           as orderId,
        select o.order_id                                            as orderId,
               o.project,
               o.customer_id          as customerId,
               o.customer_name        as customerName,
               o.order_type           as orderType,
               o.order_classify       as orderClassify,
               o.customer_id                                         as customerId,
               o.customer_name                                       as customerName,
               o.order_type                                          as orderType,
               o.order_classify                                      as orderClassify,
               o.batch,
               o.icon,
               o.pack_type            as packType,
               o.delivery_date        as deliveryDate,
               o.al_type              as alType,
               o.pack_type                                           as packType,
               o.delivery_date                                       as deliveryDate,
               o.al_type                                             as alType,
               o.money,
               contract_id          as contractId,
               customer_batch          customerBatch,
               contract_id                                           as contractId,
               customer_batch                                           customerBatch,
               contacts,
               o.delivery_address     as deliveryAddress,
               od.processing_note   as processingNote,
               o.delivery_address                                    as deliveryAddress,
               od.processing_note                                    as processingNote,
               od.width,
               od.height,
               pl.patch_num         as quantity,
               pl.order_sort        as orderNumber,
               pl.technology_number as technologyNumber,
               od.building_number   as buildingNumber,
               od.product_name      as productName,
               od.edging_type       as edgingType,
                p.remarks,
                c.customer_abbreviation as customerAbbreviation,
               p.product_abbreviation as productAbbreviation,
               fc.process_id as processId,
               o.create_time as createTime,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S02' )) AS figureNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S03' )) AS colourCeramicGlaze,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S04' )) AS remarks1,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S05' )) AS remarks2,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S06' )) AS remarks3,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S07' )) AS remarks4,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S08' )) AS remarks5,
               p.remarks as filmNumber,
               od.bend_radius as bendRadius
               pl.patch_num                                          as quantity,
               pl.order_sort                                         as orderNumber,
               pl.technology_number                                  as technologyNumber,
               od.building_number                                    as buildingNumber,
               od.product_name                                       as productName,
               od.edging_type                                        as edgingType,
               p.remarks,
               c.customer_abbreviation                               as customerAbbreviation,
               p.product_abbreviation                                as productAbbreviation,
               fc.process_id                                         as processId,
               o.create_time                                         as createTime,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5,
               p.remarks                                             as filmNumber,
               od.bend_radius                                        as bendRadius
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join flow_card as fc on o.order_id = fc.order_id and
                                              od.order_number = fc.order_number
                 left join patch_log as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                              pl.technology_number = fc.technology_number
                 left join sd.product as p on p.id=od.product_id
                 left join sd.product as p on p.id = od.product_id
                 left join sd.customer as c on c.id = o.customer_id
                 left join sd.product_detail as pd  on pd.prod_id=p.id and pd.sort_num=od.order_number
                 left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number
        where pl.process_id = #{processId}
          and pl.technology_number = #{technologyNumber}
        and pl.reporting_work_id=#{reportingWorkId}
          and pl.reporting_work_id = #{reportingWorkId}
        group by od.order_number, width, height
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, pl.order_sort)
    </select>
@@ -965,9 +984,10 @@
    </select>
    <update id="updatePrintStateMp">
        update  pp.flow_card
        set print_status = print_status+1
        where process_id = #{processId} and technology_number = #{technologyNumber}
        update pp.flow_card
        set print_status = print_status + 1
        where process_id = #{processId}
          and technology_number = #{technologyNumber}
    </update>
    <select id="printFlowCardOrderSortMp">
@@ -985,7 +1005,7 @@
                 LEFT JOIN sd.order_glass_detail AS ogd ON fc.order_id = ogd.order_id
            AND fc.order_number = ogd.order_number
            AND fc.technology_number = ogd.technology_number
        where fc.order_id=#{orderId}
        where fc.order_id = #{orderId}
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.technology_number)
    </select>
@@ -1002,13 +1022,13 @@
               o.project,
               ogd.process,
               od.edging_type,
               ogdc.concatenated_glass_child as glass_child,
               ogdc.concatenated_glass_child                   as glass_child,
               od.product_name,
               o.processing_note,
               fc.process_id,
               SUM(od.quantity)                                as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               sum(od.weight)                   as weight,
               sum(od.weight)                                  as weight,
               #{technologyNumber}                             as technologyNumber,
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber
        from flow_card as fc
@@ -1017,25 +1037,28 @@
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id=od.product_id
                 left join (
            select         ogd.order_id,
                           ogd.order_number,
                           ogd.technology_number,
                           ogd.glass_child,
                           GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
            from sd.order_glass_detail as ogd
            where ogd.order_id = left(#{processId},10)
              and position(ogd.technology_number in #{technologyNumber})
            GROUP BY order_id, order_number
        ) as ogdc on ogdc.order_id=ogd.order_id and ogdc.order_number=ogd.order_number and ogdc.technology_number=ogd.technology_number
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left(#{processId}, 10)
                              and position(ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber}) and ogdc.concatenated_glass_child is NOT null
          and position(fc.technology_number in #{technologyNumber})
          and ogdc.concatenated_glass_child is NOT null
        group by fc.process_id, fc.technology_number
    </select>
    <select id="selectorderOtherMoney">
        select * from sd.basic_other_money where id between 21 and 35
        select *
        from sd.basic_other_money
        where id between 21 and 35
    </select>
    <select id="selectReworkPrintMp">
@@ -1068,8 +1091,8 @@
                                           pl.order_sort = fc.order_number and
                                           pl.technology_number = fc.technology_number
        where pl.create_time between #{selectTime1} and #{selectTime2}
        GROUP BY fc.process_id, ogd.technology_number,pl.reporting_work_id
        order by pl.id desc,fc.process_id, ogd.technology_number
        GROUP BY fc.process_id, ogd.technology_number, pl.reporting_work_id
        order by pl.id desc, fc.process_id, ogd.technology_number
    </select>
    <select id="getDetailListLike">
@@ -1079,10 +1102,10 @@
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               concat(od.processing_note,od.remarks) as remarks,
               concat(IFNULL(od.processing_note,''), IFNULL(od.remarks,''))                       as remarks,
               od.other_columns,
               round(ogd.child_width) as width,
               round(ogd.child_height) as height,
               round(ogd.child_width)                                       as width,
               round(ogd.child_height)                                      as height,
               pd.separation,
               fc.technology_number
        from flow_card as fc
@@ -1090,10 +1113,11 @@
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by fc.process_id, fc.order_number,fc.technology_number
        group by fc.process_id, fc.order_number, fc.technology_number
        order by IF(sort != NULL || sort != '', sort, fc.order_number)
    </select>
@@ -1102,13 +1126,13 @@
               o.project,
               ogd.process,
               od.edging_type,
               ogdc.concatenated_glass_child as glass_child,
               ogdc.concatenated_glass_child                   as glass_child,
               od.product_name,
               o.processing_note,
               fc.process_id,
               pl.patch_num                                as quantity,
               pl.patch_num                                    as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               sum(od.weight)                   as weight,
               sum(od.weight)                                  as weight,
               #{technologyNumber}                             as technologyNumber,
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber
        from flow_card as fc
@@ -1117,36 +1141,39 @@
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id=od.product_id
                 left join (
            select         ogd.order_id,
                           ogd.order_number,
                           ogd.technology_number,
                           ogd.glass_child,
                           GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
            from sd.order_glass_detail as ogd
            where ogd.order_id = left(#{processId},10)
              and ogd.order_number=#{orderNumber}
              and position(ogd.technology_number in #{technologyNumber})
            GROUP BY order_id, order_number
        ) as ogdc on ogdc.order_id=ogd.order_id and ogdc.order_number=ogd.order_number and ogdc.technology_number=ogd.technology_number
                 left join patch_log as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
        where fc.process_id = #{processId} and fc.order_number=#{orderNumber}
          and position(fc.technology_number in #{technologyNumber}) and ogdc.concatenated_glass_child is NOT null
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left(#{processId}, 10)
                              and ogd.order_number = #{orderNumber}
                              and position(ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
                 left join patch_log as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                              pl.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and position(fc.technology_number in #{technologyNumber})
          and ogdc.concatenated_glass_child is NOT null
        group by fc.process_id, fc.technology_number
    </select>
    <select id="getDetailListRefund">
        select fc.order_number,
               concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
               (pl.patch_num) as quantity,
               (pl.patch_num)                                               as quantity,
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               concat(od.processing_note,od.remarks) as remarks,
               concat(IFNULL(od.processing_note,''), IFNULL(od.remarks,''))                       as remarks,
               od.other_columns,
               round(ogd.child_width) as width,
               round(ogd.child_height) as height,
               round(ogd.child_width)                                       as width,
               round(ogd.child_height)                                      as height,
               pd.separation,
               fc.technology_number
        from flow_card as fc
@@ -1154,13 +1181,15 @@
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
                 left join patch_log as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
                 left join patch_log as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                              pl.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and position(fc.technology_number in #{technologyNumber})
        and pl.reporting_work_id=#{reportingWorkId}
        group by fc.process_id, fc.order_number,fc.technology_number
          and pl.reporting_work_id = #{reportingWorkId}
        group by fc.process_id, fc.order_number, fc.technology_number
        order by IF(sort != NULL || sort != '', sort, fc.order_number)
    </select>
@@ -1173,9 +1202,9 @@
               od.product_name,
               o.processing_note,
               fc.process_id,
               pl.patch_num                                as quantity,
               pl.patch_num                                    as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               sum(od.weight)                   as weight,
               sum(od.weight)                                  as weight,
               #{technologyNumber}                             as technologyNumber,
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber,
               dd.breakage_type,
@@ -1188,40 +1217,43 @@
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id=od.product_id
                 left join (
            select         ogd.order_id,
                           ogd.order_number,
                           ogd.technology_number,
                           ogd.glass_child,
                           GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
            from sd.order_glass_detail as ogd
            where ogd.order_id = left(#{processId},10)
              and ogd.order_number = #{orderNumber}
              and position(ogd.technology_number in #{technologyNumber})
            GROUP BY order_id, order_number
        ) as ogdc on ogdc.order_id=ogd.order_id and ogdc.order_number=ogd.order_number and ogdc.technology_number=ogd.technology_number
                 left join patch_log as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
        left join pp.reporting_work as rw on rw.order_id=fc.order_id and rw.process_id=fc.process_id
        left join pp.damage_details as dd on rw.reporting_work_id=dd.reporting_work_id and dd.order_number=fc.order_number and dd.technology_number=fc.technology_number
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left(#{processId}, 10)
                              and ogd.order_number = #{orderNumber}
                              and position(ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
                 left join patch_log as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                              pl.technology_number = fc.technology_number
                 left join pp.reporting_work as rw on rw.order_id = fc.order_id and rw.process_id = fc.process_id
                 left join pp.damage_details as dd
                           on rw.reporting_work_id = dd.reporting_work_id and dd.order_number = fc.order_number and
                              dd.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and fc.technology_number = #{technologyNumber}
        and rw.reporting_work_id=#{reportingWorkId}
          and rw.reporting_work_id = #{reportingWorkId}
        group by fc.process_id, fc.technology_number
    </select>
    <select id="getDetailListLikeRefund">
        select fc.order_number,
               concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
               pl.patch_num as quantity,
               pl.patch_num                                                 as quantity,
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               concat(od.processing_note,od.remarks) as remarks,
               concat(IFNULL(od.processing_note,''), IFNULL(od.remarks,''))                       as remarks,
               od.other_columns,
               round(ogd.child_width) as width,
               round(ogd.child_height) as height,
               round(ogd.child_width)                                       as width,
               round(ogd.child_height)                                      as height,
               pd.separation,
               fc.technology_number
        from flow_card as fc
@@ -1229,13 +1261,15 @@
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
                 left join patch_log as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
                 left join patch_log as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                              pl.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and position(fc.technology_number in #{technologyNumber})
          and pl.reporting_work_id=#{reportingWorkId}
        group by fc.process_id, fc.order_number,fc.technology_number
          and pl.reporting_work_id = #{reportingWorkId}
        group by fc.process_id, fc.order_number, fc.technology_number
        order by IF(sort != NULL || sort != '', sort, fc.order_number)
    </select>
@@ -1248,9 +1282,9 @@
               od.product_name,
               o.processing_note,
               fc.process_id,
               pl.rework_num                                as quantity,
               pl.rework_num                                   as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               sum(od.weight)                   as weight,
               sum(od.weight)                                  as weight,
               #{technologyNumber}                             as technologyNumber,
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber
        from flow_card as fc
@@ -1259,20 +1293,21 @@
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id=od.product_id
                 left join (
            select         ogd.order_id,
                           ogd.order_number,
                           ogd.technology_number,
                           ogd.glass_child,
                           GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
            from sd.order_glass_detail as ogd
            where ogd.order_id = left(#{processId},10)
              and ogd.order_number = #{orderNumber}
              and position(ogd.technology_number in #{technologyNumber})
            GROUP BY order_id, order_number
        ) as ogdc on ogdc.order_id=ogd.order_id and ogdc.order_number=ogd.order_number and ogdc.technology_number=ogd.technology_number
                 left join rework as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left(#{processId}, 10)
                              and ogd.order_number = #{orderNumber}
                              and position(ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
                 left join rework as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                           pl.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and fc.technology_number = #{technologyNumber}
@@ -1282,14 +1317,14 @@
    <select id="getDetailListRework">
        select fc.order_number,
               concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
               (pl.rework_num) as quantity,
               (pl.rework_num)                                              as quantity,
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               concat(od.processing_note,od.remarks) as remarks,
               concat(od.processing_note, od.remarks)                       as remarks,
               od.other_columns,
               round(ogd.child_width) as width,
               round(ogd.child_height) as height,
               round(ogd.child_width)                                       as width,
               round(ogd.child_height)                                      as height,
               pd.separation,
               fc.technology_number
        from flow_card as fc
@@ -1297,13 +1332,15 @@
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
                 left join rework as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
                 left join rework as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                           pl.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and position(fc.technology_number in #{technologyNumber})
          and pl.reporting_work_id=#{reportingWorkId}
        group by fc.process_id, fc.order_number,fc.technology_number
          and pl.reporting_work_id = #{reportingWorkId}
        group by fc.process_id, fc.order_number, fc.technology_number
        order by IF(sort != NULL || sort != '', sort, fc.order_number)
    </select>
@@ -1312,13 +1349,13 @@
               o.project,
               ogd.process,
               od.edging_type,
               ogdc.concatenated_glass_child as glass_child,
               ogdc.concatenated_glass_child                   as glass_child,
               od.product_name,
               o.processing_note,
               fc.process_id,
               pl.rework_num                                as quantity,
               pl.rework_num                                   as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               sum(od.weight)                   as weight,
               sum(od.weight)                                  as weight,
               #{technologyNumber}                             as technologyNumber,
               concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber
        from flow_card as fc
@@ -1327,36 +1364,39 @@
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id=od.product_id
                 left join (
            select         ogd.order_id,
                           ogd.order_number,
                           ogd.technology_number,
                           ogd.glass_child,
                           GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
            from sd.order_glass_detail as ogd
            where ogd.order_id = left(#{processId},10)
              and ogd.order_number=#{orderNumber}
              and position(ogd.technology_number in #{technologyNumber})
            GROUP BY order_id, order_number
        ) as ogdc on ogdc.order_id=ogd.order_id and ogdc.order_number=ogd.order_number and ogdc.technology_number=ogd.technology_number
                 left join rework as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
        where fc.process_id = #{processId} and fc.order_number=#{orderNumber}
          and position(fc.technology_number in #{technologyNumber}) and ogdc.concatenated_glass_child is NOT null
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left(#{processId}, 10)
                              and ogd.order_number = #{orderNumber}
                              and position(ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
                 left join rework as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                           pl.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and position(fc.technology_number in #{technologyNumber})
          and ogdc.concatenated_glass_child is NOT null
        group by fc.process_id, fc.technology_number
    </select>
    <select id="getDetailListLikeRework">
        select fc.order_number,
               concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
               pl.rework_num as quantity,
               pl.rework_num                                                as quantity,
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               concat(od.processing_note,od.remarks) as remarks,
               concat(od.processing_note, od.remarks)                       as remarks,
               od.other_columns,
               round(ogd.child_width) as width,
               round(ogd.child_height) as height,
               round(ogd.child_width)                                       as width,
               round(ogd.child_height)                                      as height,
               pd.separation,
               fc.technology_number
        from flow_card as fc
@@ -1364,71 +1404,75 @@
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
                 left join rework as pl on pl.process_id=fc.process_id and pl.order_sort=fc.order_number and pl.technology_number=fc.technology_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
                 left join rework as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                           pl.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.order_number = #{orderNumber}
          and position(fc.technology_number in #{technologyNumber})
          and pl.reporting_work_id=#{reportingWorkId}
        group by fc.process_id, fc.order_number,fc.technology_number
          and pl.reporting_work_id = #{reportingWorkId}
        group by fc.process_id, fc.order_number, fc.technology_number
        order by IF(sort != NULL || sort != '', sort, fc.order_number)
    </select>
    <select id="getPrintCustomDataSemi">
        select o.order_id           as orderId,
        select o.order_id                                            as orderId,
               project,
               customer_id          as customerId,
               o.customer_name        as customerName,
               order_type           as orderType,
               order_classify       as orderClassify,
               customer_id                                           as customerId,
               o.customer_name                                       as customerName,
               order_type                                            as orderType,
               order_classify                                        as orderClassify,
               batch,
               o.icon,
               pack_type            as packType,
               delivery_date        as deliveryDate,
               al_type              as alType,
               pack_type                                             as packType,
               delivery_date                                         as deliveryDate,
               al_type                                               as alType,
               money,
               contract_id          as contractId,
               customer_batch          customerBatch,
               contract_id                                           as contractId,
               customer_batch                                           customerBatch,
               contacts,
               delivery_address     as deliveryAddress,
               od.processing_note   as processingNote,
               width,
               height,
               delivery_address                                      as deliveryAddress,
               od.processing_note                                    as processingNote,
               round(ogd.child_width)                                as width,
               round(ogd.child_height)                               as height,
               od.quantity,
               od.order_number      as orderNumber,
               fc.technology_number as technologyNumber,
               od.building_number   as buildingNumber,
               od.product_name      as productName,
               od.edging_type       as edgingType,
               od.order_number                                       as orderNumber,
               fc.technology_number                                  as technologyNumber,
               od.building_number                                    as buildingNumber,
               od.product_name                                       as productName,
               od.edging_type                                        as edgingType,
               p.remarks,
               c.customer_abbreviation as customerAbbreviation,
               p.product_abbreviation as productAbbreviation,
               CONCAT(fc.process_id,'/',fc.technology_number) as processId,
               o.create_time as createTime,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S02' )) AS figureNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S03' )) AS colourCeramicGlaze,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S04' )) AS remarks1,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S05' )) AS remarks2,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S06' )) AS remarks3,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S07' )) AS remarks4,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S08' )) AS remarks5,
               p.remarks as filmNumber,
               od.bend_radius as bendRadius,
               ogd.glass_child as glassChild,
               ogd.glass_address as glassAddress,
            JSON_UNQUOTE( JSON_EXTRACT( pd.separation, '$.color' )) AS color
               c.customer_abbreviation                               as customerAbbreviation,
               p.product_abbreviation                                as productAbbreviation,
               CONCAT(fc.process_id, '/', fc.technology_number)      as processId,
               o.create_time                                         as createTime,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5,
               p.remarks                                             as filmNumber,
               od.bend_radius                                        as bendRadius,
               ogd.glass_child                                       as glassChild,
               ogd.glass_address                                     as glassAddress,
               JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color'))  AS color
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join flow_card as fc on o.order_id = fc.order_id and
                                              od.order_number = fc.order_number
                 left join sd.product as p on p.id=od.product_id
                 left join sd.product as p on p.id = od.product_id
                 left join sd.customer as c on c.id = o.customer_id
                 left join sd.product_detail as pd  on pd.prod_id=p.id and pd.sort_num=od.order_number
        left join sd.order_glass_detail ogd on ogd.order_id=o.order_id and ogd.order_number=od.order_number and ogd.technology_number=fc.technology_number
                 left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number
                 left join sd.order_glass_detail ogd
                           on ogd.order_id = o.order_id and ogd.order_number = od.order_number and
                              ogd.technology_number = fc.technology_number
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        group by od.order_number,ogd.technology_number, width, height
        group by od.order_number, ogd.technology_number, ogd.child_width, ogd.child_height
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.order_number)
    </select>
@@ -1462,114 +1506,181 @@
    </select>
    <select id="selectPrintNotMergeMp">
        select * from ((select fc.id,
                               fc.order_id,
                               fc.process_id,
                               o.customer_name,
                               o.project,
                               fc.order_number,
                               ogd.technology_number,
                               ogd.glass_address,
                               sum(od.quantity)         as quantity,
                               sum(ogd.total_area)      as total_area,
                               od.product_name,
                               ogd.glass_child,
                               fc.founder,
                               date(fc.splitFrame_time) as splitFrame_time,
                            /* if(fc.print_status=0,'未打印','已打印') as  print_status*/
                               fc.print_status,
                               ogd.process
                        from flow_card as fc
                                 left join sd.order_glass_detail as ogd
                                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                              ogd.technology_number = fc.technology_number
                                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                                 left join sd.`order` as o on o.order_id = fc.order_id
                        where fc.order_id = #{orderId}
                        GROUP BY fc.process_id, ogd.technology_number
                        order by fc.process_id, ogd.technology_number)
        select *
        from ((select fc.id,
                      fc.order_id,
                      fc.process_id,
                      o.customer_name,
                      o.project,
                      fc.order_number,
                      ogd.technology_number,
                      ogd.glass_address,
                      sum(od.quantity)         as quantity,
                      sum(ogd.total_area)      as total_area,
                      od.product_name,
                      ogd.glass_child,
                      fc.founder,
                      date(fc.splitFrame_time) as splitFrame_time,
                   /* if(fc.print_status=0,'未打印','已打印') as  print_status*/
                      fc.print_status,
                      ogd.process
               from flow_card as fc
                        left join sd.order_glass_detail as ogd
                                  on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                     ogd.technology_number = fc.technology_number
                        left join sd.order_detail as od
                                  on od.order_id = fc.order_id and od.order_number = fc.order_number
                        left join sd.`order` as o on o.order_id = fc.order_id
               where fc.order_id = #{orderId}
               GROUP BY fc.process_id, ogd.technology_number
               order by fc.process_id, ogd.technology_number)
                       UNION
              UNION
                       (select fc.id,
                               fc.order_id,
                               fc.process_id,
                               o.customer_name,
                               o.project,
                               ogdss.technology_number,
                               ogd.glass_address,
                               ROUND(sum(fc.quantity)/(count(DISTINCT fc.technology_number)))         as quantity,
                               sum(ogd.total_area)      as total_area,
                               # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                               od.product_name,
                               ogdss.concatenated_glass_child as glass_child,
                               fc.founder,
                               date(fc.splitFrame_time) as splitFrame_time,
                               fc.print_status,
                               processed_part as  process
              (select fc.id,
                      fc.order_id,
                      fc.process_id,
                      o.customer_name,
                      o.project,
                      ogdss.technology_number,
                      ogd.glass_address,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      # SUM(ogd.child_width*child_height*fc.quantity/(count(DISTINCT ogd.technology_number))) as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
                      date(fc.splitFrame_time)                                         as splitFrame_time,
                      fc.print_status,
                      processed_part                                                   as process
                        from flow_card as fc
                                 left join sd.order_glass_detail as ogd
                                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                              ogd.technology_number = fc.technology_number
                                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                                 left join sd.`order` as o on o.order_id = fc.order_id
                                 left join (
                            select
                                ogds.order_id,
                                ogds.order_number,
                                GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
                                ogds.glass_child,
                                GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child,
                                SUBSTRING(process, LOCATE('夹胶', process)) AS processed_part
                            from sd.order_glass_detail as ogds
                            where ogds.order_id = #{orderId} and LOCATE('夹胶',ogds.process)>0
                            GROUP BY order_id, order_number,ogds.group
                        ) as ogdss on fc.order_id=ogdss.order_id and ogdss.order_number=fc.order_number
                        where fc.order_id = #{orderId}
                        GROUP BY fc.process_id,ogdss.technology_number
                        order by fc.process_id)
                       UNION
                       (select fc.id,
                               fc.order_id,
                               fc.process_id,
                               o.customer_name,
                               o.project,
                               ogdss.technology_number,
                               ogd.glass_address,
                               ROUND(sum(fc.quantity)/(count(DISTINCT fc.technology_number)))         as quantity,
                               sum(ogd.total_area)      as total_area,
                               od.product_name,
                               ogdss.concatenated_glass_child as glass_child,
                               fc.founder,
                               date(fc.splitFrame_time) as splitFrame_time,
                               fc.print_status,
                               processed_part as process
               from flow_card as fc
                        left join sd.order_glass_detail as ogd
                                  on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                     ogd.technology_number = fc.technology_number
                        left join sd.order_detail as od
                                  on od.order_id = fc.order_id and od.order_number = fc.order_number
                        left join sd.`order` as o on o.order_id = fc.order_id
                        left join (select ogds.order_id,
                                          ogds.order_number,
                                          GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
                                          ogds.glass_child,
                                          GROUP_CONCAT(ogds.glass_child SEPARATOR ' ')      AS concatenated_glass_child,
                                          SUBSTRING(process, LOCATE('夹胶', process))       AS processed_part
                                   from sd.order_glass_detail as ogds
                                   where ogds.order_id = #{orderId}
                                     and LOCATE('夹胶', ogds.process) > 0
                                   GROUP BY order_id, order_number, ogds.group) as ogdss
                                  on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
               where fc.order_id = #{orderId}
               GROUP BY fc.process_id, ogdss.technology_number
               order by fc.process_id)
              UNION
              (select fc.id,
                      fc.order_id,
                      fc.process_id,
                      o.customer_name,
                      o.project,
                      ogdss.technology_number,
                      ogd.glass_address,
                      ROUND(sum(fc.quantity) / (count(DISTINCT fc.technology_number))) as quantity,
                      sum(ogd.total_area)                                              as total_area,
                      od.product_name,
                      ogdss.concatenated_glass_child                                   as glass_child,
                      fc.founder,
                      date(fc.splitFrame_time)                                         as splitFrame_time,
                      fc.print_status,
                      processed_part                                                   as process
                        from flow_card as fc
                                 left join sd.order_glass_detail as ogd
                                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                              ogd.technology_number = fc.technology_number
                                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                                 left join sd.`order` as o on o.order_id = fc.order_id
                                 left join (
                            select
                                ogds.order_id,
                                ogds.order_number,
                                GROUP_CONCAT(pds.glass_sort SEPARATOR '') AS technology_number,
                                ogds.glass_child,
                                GROUP_CONCAT(ogds.glass_child SEPARATOR ' ') AS concatenated_glass_child,
                                SUBSTRING(pds.process, LOCATE('中空', pds.process)) AS processed_part
                            from sd.order_glass_detail as ogds
                                     left join sd.order_detail as ods on ods.order_id=ogds.order_id and ods.order_number=ogds.order_number
                                     left join sd.product_detail as pds on pds.prod_id=ods.product_id and pds.glass_sort=ogds.technology_number
                            where ogds.order_id = #{orderId}
                            GROUP BY order_id, order_number
                        ) as ogdss on fc.order_id=ogdss.order_id and ogdss.order_number=fc.order_number
                        where fc.order_id = #{orderId}
                        GROUP BY fc.process_id
                        order by fc.process_id)
               from flow_card as fc
                        left join sd.order_glass_detail as ogd
                                  on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
                                     ogd.technology_number = fc.technology_number
                        left join sd.order_detail as od
                                  on od.order_id = fc.order_id and od.order_number = fc.order_number
                        left join sd.`order` as o on o.order_id = fc.order_id
                        left join (select ogds.order_id,
                                          ogds.order_number,
                                          GROUP_CONCAT(pds.glass_sort SEPARATOR '')           AS technology_number,
                                          ogds.glass_child,
                                          GROUP_CONCAT(ogds.glass_child SEPARATOR ' ')        AS concatenated_glass_child,
                                          SUBSTRING(pds.process, LOCATE('中空', pds.process)) AS processed_part
                                   from sd.order_glass_detail as ogds
                                            left join sd.order_detail as ods
                                                      on ods.order_id = ogds.order_id and ods.order_number = ogds.order_number
                                            left join sd.product_detail as pds on pds.prod_id = ods.product_id and
                                                                                  pds.glass_sort =
                                                                                  ogds.technology_number
                                   where ogds.order_id = #{orderId}
                                   GROUP BY order_id, order_number) as ogdss
                                  on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
               where fc.order_id = #{orderId}
               GROUP BY fc.process_id
               order by fc.process_id)) AS combined_results
        where process is not null
          and process != ""
    </select>
                      ) AS combined_results where process is not null and process!=""
    <select id="getRepairPrintCustomDataSemi">
        select o.order_id                                            as orderId,
               o.project,
               o.customer_id                                         as customerId,
               o.customer_name                                       as customerName,
               o.order_type                                          as orderType,
               o.order_classify                                      as orderClassify,
               o.batch,
               o.icon,
               o.pack_type                                           as packType,
               o.delivery_date                                       as deliveryDate,
               o.al_type                                             as alType,
               o.money,
               contract_id                                           as contractId,
               customer_batch                                           customerBatch,
               contacts,
               o.delivery_address                                    as deliveryAddress,
               od.processing_note                                    as processingNote,
               round(ogd.child_width)                                as width,
               round(ogd.child_height)                               as height,
               pl.patch_num                                          as quantity,
               pl.order_sort                                         as orderNumber,
               pl.technology_number                                  as technologyNumber,
               od.building_number                                    as buildingNumber,
               od.product_name                                       as productName,
               od.edging_type                                        as edgingType,
               p.remarks,
               c.customer_abbreviation                               as customerAbbreviation,
               p.product_abbreviation                                as productAbbreviation,
               CONCAT(fc.process_id, '/', fc.technology_number)      as processId,
               o.create_time                                         as createTime,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4,
               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5,
               p.remarks                                             as filmNumber,
               od.bend_radius                                        as bendRadius,
               ogd.glass_child                                       as glassChild,
               ogd.glass_address                                     as glassAddress,
               JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color'))  AS color
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join flow_card as fc on o.order_id = fc.order_id and
                                              od.order_number = fc.order_number
                 left join patch_log as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and
                                              pl.technology_number = fc.technology_number
                 left join sd.product as p on p.id = od.product_id
                 left join sd.customer as c on c.id = o.customer_id
                 left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number
                 left join sd.order_glass_detail ogd
                           on ogd.order_id = o.order_id and ogd.order_number = od.order_number and
                              ogd.technology_number = fc.technology_number
        where pl.process_id = #{processId}
          and pl.technology_number = #{technologyNumber}
          and pl.reporting_work_id = #{reportingWorkId}
        group by od.order_number, width, height
        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, pl.order_sort)
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml
@@ -84,6 +84,9 @@
        <result column="delivery_date" property="delivery.deliveryDate"/>
        <result column="creator" property="delivery.creator"/>
        <result column="salesman" property="delivery.salesman"/>
        <result column="freight" property="delivery.freight"/>
        <result column="freight_price" property="delivery.freightPrice"/>
        <result column="freight_quantity" property="delivery.freightQuantity"/>
        <result column="product_id" property="orderDetail.productId"/>
        <result column="product_name" property="orderDetail.productName"/>
@@ -151,11 +154,11 @@
    <insert id="insertDeliveryDetail"  useGeneratedKeys="true" >
        insert into sd.delivery_detail (delivery_id,delivery_number,order_number,
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time,price)
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time,price,other_money)
        values (
                   #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeArea}*#{orderDetail.deliveryDetail.quantity},
                #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity},
                #{deliveryDetailMoney},'',1,#{orderDetail.otherColumns},now(),#{orderDetail.price}
                #{deliveryDetailMoney},'',1,#{orderDetail.otherColumns},now(),#{orderDetail.price},#{otherMoneys}
               )
    </insert>
@@ -545,7 +548,10 @@
        dd.quantity,
        dd.delivery_detail_remakes,
        dd.create_time,
        o.other_money
        o.other_money,
        d.freight_price,
        d.freight_quantity,
        d.freight
        from sd.delivery_detail dd
        left join sd.delivery d on dd.delivery_id=d.delivery_id
        left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
@@ -571,16 +577,16 @@
                and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%')
            </if>
            <if test="deliveryDetail.area != null and deliveryDetail.area != ''">
                and dd.area like concat('%', #{deliveryDetail.area},'%')
                and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','')
            </if>
            <if test="deliveryDetail.price != null and deliveryDetail.price != ''">
                and dd.price like concat('%', #{deliveryDetail.price},'%')
                and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','')
            </if>
            <if test="deliveryDetail.money != null and deliveryDetail.money != ''">
                and dd.money like concat('%', #{deliveryDetail.money},'%')
                and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''">
                and dd.quantity like concat('%', #{deliveryDetail.quantity},'%')
                and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','')
            </if>
            <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%')
@@ -623,6 +629,18 @@
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')">
                and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%')
            </if>
            <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )">
                and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )">
                and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )">
                and d.freight_quantity regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightQuantity},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )">
                and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','')
            </if>
        </where>
@@ -658,16 +676,16 @@
                and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%')
            </if>
            <if test="deliveryDetail.area != null and deliveryDetail.area != ''">
                and dd.area like concat('%', #{deliveryDetail.area},'%')
                and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','')
            </if>
            <if test="deliveryDetail.price != null and deliveryDetail.price != ''">
                and dd.price like concat('%', #{deliveryDetail.price},'%')
                and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','')
            </if>
            <if test="deliveryDetail.money != null and deliveryDetail.money != ''">
                and dd.money like concat('%', #{deliveryDetail.money},'%')
                and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''">
                and dd.quantity like concat('%', #{deliveryDetail.quantity},'%')
                and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','')
            </if>
            <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%')
@@ -711,7 +729,18 @@
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')">
                and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%')
            </if>
            <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )">
                and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )">
                and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )">
                and d.freight_quantity regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightQuantity},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )">
                and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','')
            </if>
        </where>
        order by dd.delivery_id,dd.delivery_number
    </select>
@@ -742,7 +771,10 @@
        sum(dd.quantity) as quantity,
        dd.delivery_detail_remakes,
        dd.create_time,
        o.other_money
        o.other_money,
        d.freight_price,
        d.freight_quantity,
        d.freight
        from sd.delivery_detail dd left join delivery d on dd.delivery_id=d.delivery_id
            left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
            left join sd.`order` o on dd.order_id=o.order_id
@@ -767,16 +799,16 @@
                and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%')
            </if>
            <if test="deliveryDetail.area != null and deliveryDetail.area != ''">
                and dd.area like concat('%', #{deliveryDetail.area},'%')
                and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','')
            </if>
            <if test="deliveryDetail.price != null and deliveryDetail.price != ''">
                and dd.price like concat('%', #{deliveryDetail.price},'%')
                and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','')
            </if>
            <if test="deliveryDetail.money != null and deliveryDetail.money != ''">
                and dd.money like concat('%', #{deliveryDetail.money},'%')
                and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''">
                and dd.quantity like concat('%', #{deliveryDetail.quantity},'%')
                and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','')
            </if>
            <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%')
@@ -825,6 +857,18 @@
            </if>
            <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productId != null and deliveryDetail.orderDetail.productId != '')">
                and od.product_name like concat('%', #{deliveryDetail.orderDetail.productId},'%')
            </if>
            <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )">
                and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )">
                and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )">
                and d.freight_quantity like concat('%', #{deliveryDetail.delivery.freightQuantity},'%')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )">
                and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','')
            </if>
        </where>
@@ -863,16 +907,16 @@
                and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%')
            </if>
            <if test="deliveryDetail.area != null and deliveryDetail.area != ''">
                and dd.area like concat('%', #{deliveryDetail.area},'%')
                and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','')
            </if>
            <if test="deliveryDetail.price != null and deliveryDetail.price != ''">
                and dd.price like concat('%', #{deliveryDetail.price},'%')
                and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','')
            </if>
            <if test="deliveryDetail.money != null and deliveryDetail.money != ''">
                and dd.money like concat('%', #{deliveryDetail.money},'%')
                and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''">
                and dd.quantity like concat('%', #{deliveryDetail.quantity},'%')
                and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','')
            </if>
            <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%')
@@ -922,6 +966,18 @@
            <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productId != null and deliveryDetail.orderDetail.productId != '')">
                and od.product_name like concat('%', #{deliveryDetail.orderDetail.productId},'%')
            </if>
            <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )">
                and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )">
                and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )">
                and d.freight_quantity like concat('%', #{deliveryDetail.delivery.freightQuantity},'%')
            </if>
            <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )">
                and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','')
            </if>
        </where>
        group by dd.delivery_id,dd.order_id,od.product_id) as zu
north-glass-erp/src/main/resources/mapper/sd/OrderDetailMapper.xml
@@ -113,6 +113,153 @@
    </resultMap>
    <select id="getOrderSummaryReport" >
        SELECT
        *
        from  sd.`order` as b
        where  date(b.create_time)>=#{startDate} and date(b.create_time) &lt;= #{endDate}
        <if test="order.orderType != null and order.orderType != ''">
            and b.order_type like concat('%',#{order.orderType},'%')
        </if>
        <if test="order.customerId != null and order.customerId != ''">
            and b.customer_id like concat('%',#{order.customerId},'%')
        </if>
        <if test="order.customerName != null and order.customerName != ''">
            and b.customer_name like concat('%',#{order.customerName},'%')
        </if>
        <if test="order.project != null and order.project != ''">
            and b.project like concat('%',#{order.project},'%')
        </if>
        <if test="order.orderId != null and order.orderId != ''">
            and b.order_id like concat('%',#{order.orderId},'%')
        </if>
        <if test="order.batch != null and order.batch != ''">
            and b.batch like concat('%',#{order.batch},'%')
        </if>
        <if test="order.icon != null and order.icon != ''">
            and b.icon like concat('%',#{order.icon},'%')
        </if>
        <if test="order.packType != null and order.packType != ''">
            and b.pack_type like concat('%',#{order.packType},'%')
        </if>
        <if test="order.alType != null and order.alType != ''">
            and b.al_type like concat('%',#{order.alType},'%')
        </if>
        <if test="order.salesman != null and order.salesman != ''">
            and b.salesman like concat('%',#{order.salesman},'%')
        </if>
        <if test="order.deliveryAddress != null and order.deliveryAddress != ''">
            and b.delivery_address like concat('%',#{order.deliveryAddress},'%')
        </if>
        <if test="order.creator != null and order.creator != ''">
            and b.creator like concat('%',#{order.creator},'%')
        </if>
        <if test="order.otherMoney != null and order.otherMoney != ''">
            and b.other_money regexp REGEXP_REPLACE(#{order.otherMoney},'\\.0+$','')
        </if>
        <if test="order.quantity != null ">
            and b.quantity like concat('%',#{order.quantity},'%')
        </if>
        <if test="order.money != null ">
            and b.money  regexp REGEXP_REPLACE(#{order.money},'\\.0+$','')
        </if>
        <if test="order.perimeter != null and order.perimeter != ''">
            and b.perimeter regexp REGEXP_REPLACE(#{order.perimeter},'\\.0+$','')
        </if>
        <if test="order.processingNote != null and order.processingNote != ''">
            and b.processing_note like concat('%',#{order.processingNote},'%')
        </if>
        <if test="order.area != null and order.area != ''">
            and b.area regexp REGEXP_REPLACE(#{order.area},'\\.0+$','')
        </if>
        order by b.id desc
        limit #{offset},#{pageSize}
    </select>
    <select id="getOrderSummaryReportTotal" >
        SELECT
        CEILING(count(b.id)/#{pageSize}) as 'pageTotal',
        count(b.id) as 'total'
        from  sd.`order` as b
        where  date(b.create_time)>=#{startDate} and date(b.create_time) &lt;= #{endDate}
        <if test="order.orderType != null and order.orderType != ''">
            and b.order_type like concat('%',#{order.orderType},'%')
        </if>
        <if test="order.customerId != null and order.customerId != ''">
            and b.customer_id like concat('%',#{order.customerId},'%')
        </if>
        <if test="order.customerName != null and order.customerName != ''">
            and b.customer_name like concat('%',#{order.customerName},'%')
        </if>
        <if test="order.project != null and order.project != ''">
            and b.project like concat('%',#{order.project},'%')
        </if>
        <if test="order.orderId != null and order.orderId != ''">
            and b.order_id like concat('%',#{order.orderId},'%')
        </if>
        <if test="order.batch != null and order.batch != ''">
            and b.batch like concat('%',#{order.batch},'%')
        </if>
        <if test="order.icon != null and order.icon != ''">
            and b.icon like concat('%',#{order.icon},'%')
        </if>
        <if test="order.packType != null and order.packType != ''">
            and b.pack_type like concat('%',#{order.packType},'%')
        </if>
        <if test="order.alType != null and order.alType != ''">
            and b.al_type like concat('%',#{order.alType},'%')
        </if>
        <if test="order.salesman != null and order.salesman != ''">
            and b.salesman like concat('%',#{order.salesman},'%')
        </if>
        <if test="order.deliveryAddress != null and order.deliveryAddress != ''">
            and b.delivery_address like concat('%',#{order.deliveryAddress},'%')
        </if>
        <if test="order.creator != null and order.creator != ''">
            and b.creator like concat('%',#{order.creator},'%')
        </if>
        <if test="order.otherMoney != null and order.otherMoney != ''">
            and b.other_money regexp REGEXP_REPLACE(#{order.otherMoney},'\\.0+$','')
        </if>
        <if test="order.quantity != null ">
            and b.quantity like concat('%',#{order.quantity},'%')
        </if>
        <if test="order.money != null ">
            and b.money  regexp REGEXP_REPLACE(#{order.money},'\\.0+$','')
        </if>
        <if test="order.perimeter != null and order.perimeter != ''">
            and b.perimeter regexp REGEXP_REPLACE(#{order.perimeter},'\\.0+$','')
        </if>
        <if test="order.processingNote != null and order.processingNote != ''">
            and b.processing_note like concat('%',#{order.processingNote},'%')
        </if>
        <if test="order.area != null and order.area != ''">
            and b.area regexp REGEXP_REPLACE(#{order.area},'\\.0+$','')
        </if>
    </select>
    <select id="exportOrderSummary"  >
        SELECT *
        from sd.`order` as b
        where  date(b.create_time)>=#{dates[0]} and date(b.create_time) &lt;= #{dates[1]}
        order by b.id desc
    </select>
    <select id="getOrderReport" resultMap="orderMap">
        SELECT
            *,
@@ -165,11 +312,11 @@
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
            and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
            and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
@@ -181,11 +328,11 @@
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
            and a.gross_area regexp REGEXP_REPLACE(#{orderDetail},'\\.0+$','')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
            and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
@@ -221,7 +368,7 @@
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
            and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
@@ -307,11 +454,11 @@
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
            and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
            and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
@@ -323,11 +470,11 @@
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
            and a.gross_area regexp REGEXP_REPLACE(#{orderDetail},'\\.0+$','')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
            and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
@@ -363,7 +510,7 @@
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
            and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
@@ -498,11 +645,11 @@
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
            and a.width  regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
            and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
@@ -514,11 +661,11 @@
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
            and a.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
            and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
@@ -554,7 +701,7 @@
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
            and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
@@ -647,11 +794,11 @@
        </if>
        <if test="orderDetail.width != null and orderDetail.width != ''">
            and a.width like concat('%',#{orderDetail.width},'%')
            and a.width  regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
        </if>
        <if test="orderDetail.height != null and orderDetail.height != ''">
            and a.height like concat('%',#{orderDetail.height},'%')
            and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
        </if>
        <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
@@ -663,11 +810,11 @@
        </if>
        <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
            and a.gross_area like concat('%',#{orderDetail.grossArea},'%')
            and a.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
        </if>
        <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
            and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%')
            and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
        </if>
        <if test="orderDetail.shape != null and orderDetail.shape != ''">
@@ -703,7 +850,7 @@
        </if>
        <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''">
            and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%')
            and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','')
        </if>
        <if test="orderDetail.order!=null and  orderDetail.order.alType != null and orderDetail.order.alType != ''">
@@ -826,8 +973,8 @@
                           on d.type_id = c.type_id
                 left join sd.basic_glass_type as e
                           on e.type_id = d.belong
        where date(a.create_time) >= #{dates[0]}
          and date(a.create_time) &lt;= #{dates[1]}
        where date(b.create_time) >= #{dates[0]}
          and date(b.create_time) &lt;= #{dates[1]}
        group by b.order_id, a.product_id
        order by b.order_id desc
    </select>