From d873cbc55704ed517607227d9d010204da3f1888 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 12 七月 2024 13:43:05 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/router/index.js                                        |    8 
 north-glass-erp/northglass-erp/src/lang/en.js                                             |    1 
 north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue                              |    2 
 north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue               |    2 
 north-glass-erp/northglass-erp/src/lang/zh.js                                             |    1 
 north-glass-erp/src/main/java/com/example/erp/dto/pp/ScheduleProductionScheduleDTO.java   |   30 +
 north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java                 |    6 
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml                                 |    5 
 north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue          |   81 ++-
 north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue                    |    2 
 north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue             |    2 
 north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java   |    2 
 north-glass-erp/src/main/resources/mapper/pp/Report.xml                                   |  895 +++++++++++++++++++----------------
 north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue                     |    2 
 north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue                       |    2 
 north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue                    |    2 
 north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java         |   22 
 north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue            |    2 
 north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java               |   16 
 north-glass-erp/northglass-erp/src/views/pp/report/Report.vue                             |    1 
 north-glass-erp/northglass-erp/src/views/pp/report/ScheduleProductionSchedule.vue         |  375 +++++++++++++++
 north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue                         |    8 
 north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue                 |    2 
 north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue             |    2 
 north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java |    2 
 north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml                     |    7 
 north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue                      |    2 
 north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue             |    2 
 north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue                         |    2 
 29 files changed, 1,015 insertions(+), 471 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/lang/en.js b/north-glass-erp/northglass-erp/src/lang/en.js
index bbc88a7..8a0e049 100644
--- a/north-glass-erp/northglass-erp/src/lang/en.js
+++ b/north-glass-erp/northglass-erp/src/lang/en.js
@@ -788,6 +788,7 @@
         TaskCompletionStatus:'Task completion report',
         rawMaterialRequisition:'Raw material requisition report',
         qualityReport:'Quality statement',
+        productionScheduling:'Production scheduling report',
         yieldReport:'Yield report',
         workingProcedure:'Process',
         inventoryArea:'Stock area',
diff --git a/north-glass-erp/northglass-erp/src/lang/zh.js b/north-glass-erp/northglass-erp/src/lang/zh.js
index c44624c..8c1de7b 100644
--- a/north-glass-erp/northglass-erp/src/lang/zh.js
+++ b/north-glass-erp/northglass-erp/src/lang/zh.js
@@ -813,6 +813,7 @@
         TaskCompletionStatus:'浠诲姟瀹屾垚鎯呭喌鎶ヨ〃',
         rawMaterialRequisition:'鍘熺墖棰嗘枡鎶ヨ〃',
         qualityReport:'鍝佽川鎶ヨ〃',
+        productionScheduling:'鎺掍骇璁″垝鎶ヨ〃',
         yieldReport:'鎴愬搧鐜囨姤琛�',
         workingProcedure:'宸ュ簭',
         inventoryArea:'搴撳瓨闈㈢Н',
diff --git a/north-glass-erp/northglass-erp/src/router/index.js b/north-glass-erp/northglass-erp/src/router/index.js
index bbfae56..0c08fb8 100644
--- a/north-glass-erp/northglass-erp/src/router/index.js
+++ b/north-glass-erp/northglass-erp/src/router/index.js
@@ -695,7 +695,13 @@
               component: () => import('../views/pp/report/DamageReport.vue'),
             },
             {
-              //璺ㄥ伐搴忔鐮存姤琛�
+              //璁㈠崟鎺掍骇璁″垝
+              path: 'scheduleProductionSchedule',
+              name: 'scheduleProductionSchedule',
+              component: () => import('../views/pp/report/ScheduleProductionSchedule.vue'),
+            },
+            {
+              //鎺掍骇璁″垝
               path: 'crossProcessBreaking',
               name: 'crossProcessBreaking',
               component: () => import('../views/pp/report/crossProcessBreaking.vue'),
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
index 56d9355..a5ef52f 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -239,7 +239,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'productionScheduling',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
@@ -258,7 +258,7 @@
     storage: true
   },
   editConfig: {
-    trigger: 'click',
+    trigger: 'dblclick',
     mode: 'row',
     showStatus: true
   },
@@ -308,6 +308,15 @@
       editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},
       title: t('processCard.planEndTime')
     },
+    {
+      field: 'schedulingQuantity',
+      width: 120,
+      editRender: {name: 'input', attrs: {placeholder: ''}},
+      title: t('processCard.productionSchedulingQuantity'),
+      sortable: true
+    },
+    {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120},
+
     // {field: '鎺掍骇缂栧彿', title: '鎺掍骇缂栧彿',  width: 120 },
     {
       field: 'orderGlassDetail.orderId',
@@ -356,13 +365,7 @@
     },
     {field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 90},
     {field: 'orderGlassDetail.area', title: t('processCard.orderArea'), width: 90},
-    {
-      field: 'schedulingQuantity',
-      width: 120,
-      editRender: {name: 'input', attrs: {placeholder: ''}},
-      title: t('processCard.productionSchedulingQuantity'),
-      sortable: true
-    },
+
     {field: 'pendingProductionQuantity', title: t('processCard.quantityToScheduled'), width: 100},
     {field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 100},
     {field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 100},
@@ -371,7 +374,6 @@
     {field: 'reviewer', title: t('processCard.reviewed'), width: 80},
     {field: 'orderDetail.productName', title: t('order.product'), width: 140},
     {field: 'orderDetail.shape', title: t('order.shape'), width: 80},
-    {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120},
     {field: 'schedulingId', title: t('processCard.schedulingId'), width: 120},
   ],//琛ㄥご鎸夐挳
 
@@ -476,22 +478,29 @@
               ElMessage.warning("璇峰嬀閫夋帓浜ф暟鎹�")
               return;
             }
-            const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
-            if (type === 'confirm') {
-              let schedulingData = ref({
-                scheduling: selectRecords,
-              })
-
-              request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
-                if (res.code == 200) {
-                  ElMessage.success("鍒犻櫎鎴愬姛")
-                  location.reload();
-                } else {
-                  ElMessage.warning(res.msg)
-
-                }
-              })
-            }
+            selectRecords.forEach(item => {
+              if(item.reviewStatus=="宸插鏍�"){
+                ElMessage.warning("涓嶈兘鍒犻櫎宸插鏍告暟鎹�")
+                return;
+              }
+            });
+            alert(1111)
+            // const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎璇ユ暟鎹�?')
+            // if (type === 'confirm') {
+            //   let schedulingData = ref({
+            //     scheduling: selectRecords,
+            //   })
+            //
+            //   request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
+            //     if (res.code == 200) {
+            //       ElMessage.success("鍒犻櫎鎴愬姛")
+            //       location.reload();
+            //     } else {
+            //       ElMessage.warning(res.msg)
+            //
+            //     }
+            //   })
+            // }
           }
           return;
         }
@@ -582,17 +591,28 @@
   const table = $grid.getTableData().fullData
   const selectRecords = $grid.getCheckboxRecords()
   let selectState = stateValue.value
-  table.forEach((selectRecords) => {
-    if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity && selectState == 1) {
+  selectRecords.forEach((selectRecords) => {
+    console.log(selectRecords)
+    if (selectRecords.schedulingQuantity > selectRecords.pendingProductionQuantity) {
       ElMessage.warning("鎺掍骇鏁伴噺涓嶈兘澶т簬寰呮帓浜ф暟閲�")
       //绂佺敤淇濆瓨鎸夐挳
       //gridOptions.toolbarConfig.buttons[2].disabled = true
     }
-
-
   })
 }
+const checkBoxConfig = {
+  checkMethod: ({ row }) => {
+    console.log(row)
+    if (row['reviewStatus']==="宸插鏍�"){
+      return row.disable
+    }else{
+      return !row.disable
+    }
 
+  },
+  reserve:true
+
+}
 
 </script>
 
@@ -648,6 +668,7 @@
         v-on="gridEvents"
         @filter-change="filterChanged"
         @checkbox-change="determineNum"
+        :checkbox-config="checkBoxConfig"
     >
       <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
       <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
index d48537e..942605d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -100,7 +100,7 @@
 
 //鑾峰彇涓冨ぉ鍓嶅埌褰撳墠鏃堕棿
 function getNowTime() {
-  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)
+  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15)
       .toISOString()
       .replace('T', ' ')
       .slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue b/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
index 53be210..ec973fd 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
@@ -189,7 +189,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'DamageReport',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue b/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue
index bfe1541..c5eebb5 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/EquipmentOutput.vue
@@ -37,7 +37,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe:true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'EquipmentOutput',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue b/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue
index aa53263..e68a0b5 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/OrderBOMOutside.vue
@@ -37,7 +37,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe:true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'OrderBOMOutside',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue b/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
index 84f5802..4e75127 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
@@ -176,7 +176,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height:30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'OrderPlanDecomposition',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
index dccf7a0..4be2474 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
@@ -198,7 +198,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'ProcessToBeCompleted',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue b/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue
index 7d8bdb4..a183665 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/QualityReport.vue
@@ -177,7 +177,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'QualityReport',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue b/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue
index c50015d..92aa1b6 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/RawMaterialRequisition.vue
@@ -177,7 +177,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'RawMaterialRequisition',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue b/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue
index 97e7a78..a797f30 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/Report.vue
@@ -68,6 +68,7 @@
         <el-menu-item  index="/main/report/RawMaterialRequisition">{{$t('report.rawMaterialRequisition')}}</el-menu-item>
         <el-menu-item  index="/main/report/QualityReport">{{$t('report.qualityReport')}}</el-menu-item>
         <el-menu-item  index="/main/report/Yield">{{$t('report.yieldReport')}}</el-menu-item>
+        <el-menu-item  index="/main/report/ScheduleProductionSchedule">{{$t('report.productionScheduling')}}</el-menu-item>
 <!--        <el-menu-item  index="/main/report/OrderBOMOutside">BOM鎶ヨ〃</el-menu-item>-->
       </el-menu>
     </div>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ScheduleProductionSchedule.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ScheduleProductionSchedule.vue
new file mode 100644
index 0000000..61eca89
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ScheduleProductionSchedule.vue
@@ -0,0 +1,375 @@
+<script setup>
+
+import {reactive, ref} from "vue";
+import {useRouter} from 'vue-router'
+import request from "@/utils/request";
+import deepClone from "@/utils/deepClone";
+import {ElDatePicker, ElMessage} from "element-plus";
+import {useI18n} from 'vue-i18n'
+import exportExcel from "@/hook/exportExcel";
+import footSum from "@/hook/footSum"
+//璇█鑾峰彇
+const {t} = useI18n()
+let router = useRouter()
+let filterData = ref({})
+//鎻愪氦鐨勮〃鍗�
+const form = reactive({
+  date1: '',
+  orderId: '',
+  project: '',
+  processes:''
+
+})
+
+//宸ュ簭
+const value = ref(t('machine.cutting'))
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+  let count = 0
+  list.forEach(item => {
+    count += Number(item[field])
+  })
+  return count.toFixed(2)
+}
+
+
+//瀹氫箟椤甸潰鎬婚〉鏁�
+let pageTotal = ref('')
+//瀹氫箟鏁版嵁杩斿洖缁撴灉
+let produceList = ref([])
+//瀹氫箟褰撳墠椤垫暟
+let pageNum = ref(1)
+let pageState = null
+
+//鑾峰彇涓冨ぉ鍓嶅埌褰撳墠鏃堕棿
+function getNowTime() {
+  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3)
+      .toISOString()
+      .replace('T', ' ')
+      .slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
+  const end = new Date(new Date().getTime() + 3600 * 1000 * 24)
+      .toISOString()
+      .replace('T', ' ')
+      .slice(0, 10)//榛樿缁撴潫鏃堕棿褰撳墠鏃堕棿
+  return [start, end]
+}
+
+
+//绗竴娆″姞杞借幏鍙栬繎涓冨ぉ鏃堕棿鍜岄粯璁ょ姸鎬�
+form.date1 = getNowTime()
+let startTime = form.date1[0]
+let endTime = form.date1[1]
+let processes = value.value
+let total = reactive({
+  pageTotal: 0,
+  dataTotal: 0,
+  pageSize: 100
+})
+//瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁
+const titleSelectJson = ref({
+  processType: [],
+})
+//绗竴娆″姞杞芥暟鎹�
+request.post(`/report/scheduleProductionSchedule/1/${total.pageSize}/${startTime}/${endTime}/${processes}`, filterData.value).then((res) => {
+
+  if (res.code == 200) {
+    total.dataTotal = res.data.total.total * 1
+    total.pageTotal = res.data.total.pageTotal
+    pageTotal.value = res.data.total
+    titleSelectJson.value.processType = res.data.process
+    produceList = produceList.value.concat(deepClone(res.data.data))
+    xGrid.value.reloadData(produceList)
+    gridOptions.loading = false
+  } else {
+    ElMessage.warning(res.msg)
+  }
+})
+
+//椤佃剼缈婚〉鏌ヨ
+const selectPageList = () => {
+  let startTime = form.date1[0]
+  let endTime = form.date1[1]
+  let processes = value.value
+  request.post(`/report/scheduleProductionSchedule/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${processes}`, filterData.value).then((res) => {
+    if (res.code == 200) {
+
+
+      produceList = deepClone(res.data.data)
+      xGrid.value.reloadData(produceList)
+    } else {
+      ElMessage.warning(res.msg)
+    }
+  })
+}
+
+//鐐瑰嚮鏌ヨ
+const getWorkOrder = () => {
+
+  let startTime = form.date1[0]
+  let endTime = form.date1[1]
+  let processes = value.value
+  request.post(`/report/scheduleProductionSchedule/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${processes}`, filterData.value).then((res) => {
+
+    if (res.code == 200) {
+      total.dataTotal = res.data.total.total * 1
+      total.pageTotal = res.data.total.pageTotal
+      pageTotal.value = res.data.total
+
+      xGrid.value.loadData(res.data.data)
+      gridOptions.loading = false
+    } else {
+      ElMessage.warning(res.msg)
+    }
+  })
+}
+
+//椤佃剼璺宠浆
+const handlePageChange = ({currentPage, pageSize}) => {
+  pageNum.value = currentPage
+  total.pageTotal = pageSize
+  selectPageList()
+}
+
+/*浣跨敤绛涢�夛紝鍚庣鑾峰彇鏁版嵁*/
+const changeFilterEvent = (event, option, $panel,) => {
+  // 鎵嬪姩瑙﹀彂绛涢��
+  $panel.changeOption(event, !!option.data, option)
+}
+
+function filterChanged(column) {
+  //gridOptions.loading=true
+  //绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
+  let value = column.datas[0] != undefined ? column.datas[0] : ''
+  value = value.trim()
+  //鍒ゆ柇鏄惁瀛樺湪澶栭敭
+  if (column.property.indexOf('.') > -1) {
+    const columnArr = column.property.split('.')
+    filterData.value[columnArr[0]] = {
+      [columnArr[1]]: value
+    }
+  } else {
+    filterData.value[column.property] = value
+  }
+
+  let startTime = form.date1[0]
+  let endTime = form.date1[1]
+  request.post(`/report/scheduleProductionSchedule/1/${total.pageSize}/${startTime}/${endTime}/${processes}`, filterData.value).then((res) => {
+
+    if (res.code == 200) {
+      total.dataTotal = res.data.total.total * 1
+      total.pageTotal = parseInt(res.data.total)
+      pageNum.value = 1
+      produceList = deepClone(res.data.data)
+      xGrid.value.reloadData(produceList)
+      gridOptions.loading = false
+    } else {
+      ElMessage.warning(res.msg)
+    }
+  })
+
+}
+
+/*鍚庣杩斿洖缁撴灉澶氬眰宓屽灞曠ず*/
+const hasDecimal = (value) => {
+  const regex = /\./; // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
+  return regex.test(value); // 杩斿洖true/false
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+const xGrid = ref()
+const gridOptions = reactive({
+  border: "full",//琛ㄦ牸鍔犺竟妗�
+  keepSource: true,//淇濇寔婧愭暟鎹�
+  align: 'center',//鏂囧瓧灞呬腑
+  stripe: true,//鏂戦┈绾�
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  id: 'DamageReport',
+  showFooter: true,//鏄剧ず鑴�
+  printConfig: {},
+  importConfig: {},
+  exportConfig: {},
+  scrollY: {enabled: true},//寮�鍚櫄鎷熸粴鍔�
+  showOverflow: true,
+  columnConfig: {
+    resizable: true,
+    useKey: true
+  },
+  filterConfig: {   //绛涢�夐厤缃」
+    remote: true
+  },
+  customConfig: {
+    storage: true
+  },
+  editConfig: {
+    trigger: 'click',
+    mode: 'row',
+    showStatus: true
+  },//琛ㄥご鍙傛暟
+  columns: [
+    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
+    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
+    {
+      field: 'orderId', width: 120, title: t('order.orderId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}
+    },
+    {
+      field: 'project',
+      width: 120,
+      title: t('order.project'),
+      showOverflow: "ellipsis",
+      filters: [{data: ''}], slots: {filter: 'num1_filter'}
+    },
+    {
+      field: 'processes',
+      title: t('report.workingProcedure'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'}
+    },
+    {
+      field: 'schedulingQuantity',
+      title: t('order.quantity'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'}
+    },
+    {
+      field: 'notes',
+      title: t('basicData.remarks'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'}
+    },
+    {
+      field: 'scheduledStartTime',
+      title: t('processCard.scheduledStartTime'),
+      type: 'date',
+      attrs: {placeholder: '', type: 'date'},
+    },
+    {
+      field: 'planEndTime',
+      title: t('processCard.planEndTime'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      showOverflow: "ellipsis"
+    },
+
+  ],//琛ㄥご鎸夐挳
+
+  toolbarConfig: {
+    slots: {
+      tools: 'toolbar_buttons'
+    },
+    zoom: true,
+    custom: true
+  },
+  data: [],//table body瀹為檯鏁版嵁
+  //鑴氶儴姹傚拰
+  footerMethod({columns, data}) {//椤佃剼鍑芥暟
+    return [
+      columns.map((column, columnIndex) => {
+        if (columnIndex === 0) {
+          return t('basicData.total')
+        }
+        const List = ["schedulingQuantity", ]
+        if (List.includes(column.field)) {
+          return footSum(data, column.field)
+        }
+        return ''
+      })
+    ]
+  }
+
+})
+
+
+</script>
+
+<template>
+  <div class="main-div-customer">
+    <div id="selectForm">
+      <el-row :gutter="0">
+        <el-date-picker
+            v-model="form.date1"
+            :end-placeholder="$t('basicData.endDate')"
+            :start-placeholder="$t('basicData.startDate')"
+            format="YYYY/MM/DD"
+            style="width: 100px"
+            type="daterange"
+            value-format="YYYY-MM-DD"
+        />
+        &nbsp;&nbsp;
+        <el-select v-model="value" clearable default-value="default_city" style="width: 120px">
+          <el-option
+              v-for="item in titleSelectJson['processType']"
+              :key="item.id"
+              :label="item.basic_name"
+              :value="item.basic_name"
+          />
+        </el-select>
+        &nbsp;&nbsp;
+        <el-button type="primary" @click="getWorkOrder">{{ $t('basicData.search') }}</el-button>
+      </el-row>
+
+    </div>
+    <vxe-grid
+        ref="xGrid"
+        class="mytable-scrollbar"
+        max-height="100%"
+        v-bind="gridOptions"
+        @filter-change="filterChanged"
+
+    >
+      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
+      <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+      <template #content="{ row }">
+        <ul class="expand-wrapper">
+          <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
+            <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
+            <span>{{ row[item.field] }}</span>
+          </li>
+        </ul>
+      </template>
+
+      <template #toolbar_buttons>
+        <vxe-button style="margin-right: 0.5rem"
+                    @click="exportExcel('/report/exportScheduleReport',
+                                          t('report.productionScheduling'),
+                                          form.date1)">
+          {{ t('basicData.export') }}
+        </vxe-button>
+      </template>
+
+      <template #num1_filter="{ column, $panel }">
+        <div>
+          <div v-for="(option, index) in column.filters" :key="index">
+            <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/>
+          </div>
+        </div>
+      </template>
+      <template #pager>
+        <!--浣跨敤 pager 鎻掓Ы-->
+        <!--        'PrevJump','NextJump', -->
+        <vxe-pager
+            v-model:current-page="pageNum"
+            v-model:page-size="total.pageSize"
+            v-model:pager-count="total.pageTotal"
+            :layouts="[  'PrevPage', 'Jump','PageCount', 'NextPage',  'Total']"
+            :total="total.dataTotal"
+            @page-change="handlePageChange"
+        >
+        </vxe-pager>
+      </template>
+
+    </vxe-grid>
+  </div>
+</template>
+
+<style scoped>
+.main-div-customer {
+  width: 99%;
+  height: 100%;
+}
+
+#selectForm {
+  width: 60%;
+  text-align: center;
+}
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue b/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue
index 6d2294d..2ed8a40 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/SplittingDetailsOutside.vue
@@ -162,7 +162,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'SplittingDetailsOutside',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue b/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
index 5124618..a46fb31 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
@@ -194,7 +194,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'TeamOutput',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
index dcd86c2..ce80b04 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -232,7 +232,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'WorkInProgress',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue b/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue
index 0a5906a..6770e43 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/Yield.vue
@@ -179,7 +179,7 @@
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe: true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true, height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'Yield',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
index 3fc370d..1e99bb7 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -112,7 +112,7 @@
 
 //鑾峰彇3澶╁墠鍒板綋鍓嶆椂闂�
 function getNowTime() {
-  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3)
+  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15)
       .toISOString()
       .replace('T', ' ')
       .slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index 43c946c..16c04c6 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -1103,8 +1103,11 @@
    if (['width', 'height', 'quantity', 'price'].includes(column.property)) {
       row.area = area(row)
       row.grossArea = countArea(row)
-      row.computeArea = row.area
-      row.computeGrossArea = row.grossArea
+     if(![ 'quantity', 'price'].includes(column.property)){
+       row.computeArea = row.area
+       row.computeGrossArea = row.grossArea
+     }
+
      if(titleUploadData.value.calculateType===3){
        row.grossAmount=parseFloat((row.price * row.quantity).toFixed(2))
      }else{
@@ -1181,6 +1184,7 @@
 
     if( !isNaN(item.computeArea*1) && item.computeArea != null ){
       if(titleUploadData.value.calculateType===3){
+        item.computeGrossArea = item.computeArea*item.quantity
         item.grossAmount=parseFloat((item.price * item.quantity).toFixed(2))
       }else{
         item.grossArea = countArea(item)
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
index c953e0c..feb327f 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -248,4 +248,26 @@
         DownExcel.download(response, YieldDTO.class, reportService.exportYieldSv(dates), "Yield");
     }
 
+    @ApiOperation("鎺掍骇璁㈠崟淇℃伅鎶ヨ〃")
+    @PostMapping("/scheduleProductionSchedule/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{processes}")
+    public Result scheduleProductionSchedule(
+            @PathVariable Integer pageNum,
+            @PathVariable Integer pageSize,
+            @PathVariable Date selectTime1,
+            @PathVariable Date selectTime2,
+            @PathVariable String processes,
+            @RequestBody ScheduleProductionScheduleDTO scheduleProductionScheduleDTO) {
+        return Result.seccess(reportService.scheduleProductionScheduleSv(pageNum, pageSize, selectTime1, selectTime2,processes, scheduleProductionScheduleDTO));
+
+    }
+
+    @ApiOperation("璁㈠崟鎺掍骇璁″垝")
+    @PostMapping("/exportScheduleReport")
+    public void exportScheduleReport(HttpServletResponse response,
+                                     @RequestBody Map<String, Object> dates
+    ) throws IOException, IllegalAccessException, InstantiationException {
+        //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+        System.out.println(dates);
+        DownExcel.download(response, ScheduleProductionScheduleDTO.class, reportService.exportScheduleReportSv(dates), "ScheduleProduction");
+    }
 }
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/ScheduleProductionScheduleDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ScheduleProductionScheduleDTO.java
new file mode 100644
index 0000000..4355288
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ScheduleProductionScheduleDTO.java
@@ -0,0 +1,30 @@
+package com.example.erp.dto.pp;
+
+import cn.hutool.core.date.DateTime;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class ScheduleProductionScheduleDTO {
+    @ExcelProperty("閿�鍞崟鍙�")
+    private String orderId;
+    @ExcelProperty("椤圭洰鍚嶇О")
+    private String project;
+    @ExcelProperty("宸ュ簭")
+    private String processes;
+    @ExcelProperty("鎺掍骇鏁伴噺")
+    private String schedulingQuantity;
+    @ExcelProperty("澶囨敞")
+    private String notes;
+    @ExcelProperty("寮�濮嬫椂闂�")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDateTime scheduledStartTime;
+    @ExcelProperty("缁撴潫鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDateTime planEndTime;
+
+
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java
index 905bf0c..f589fc5 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java
@@ -20,7 +20,7 @@
 
     Boolean insertSelective(String schedulingId, String orderId, String orderNumber,String technologyNumber, String processes, Integer schedulingQuantity, LocalDate scheduledStartTime, LocalDate planEndTime, String notes);
 
-    Boolean examineSchedulingMp(String schedulingId, String userName);
+    Boolean examineSchedulingMp(String schedulingId, String userName, Integer schedulingQuantity, String notes);
 
     Boolean deleteSchedulingMp(String schedulingId);
 
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
index 721698a..b868815 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
@@ -73,6 +73,12 @@
 
     List<Map<String, String>> workInProgressProcessMp(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report);
 
+    List<ScheduleProductionScheduleDTO> scheduleProductionScheduleMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String processes, ScheduleProductionScheduleDTO scheduleProductionScheduleDTO);
+
+    Map<String, Integer> getScheduleProductionScheduleTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String processes, ScheduleProductionScheduleDTO scheduleProductionScheduleDTO);
+
+    List<ScheduleProductionScheduleDTO> exportScheduleReportMp(List<LocalDate> date, String process);
+
 
 //    Map<String, Integer> getWorkInProgressTotal(
 //                                                @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2,
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
index 2517b30..e4d2964 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
@@ -117,7 +117,7 @@
 
         if (!schedulinglist.isEmpty()) {
             for (ProductionScheduling productionScheduling : schedulinglist) {
-                productionSchedulingMapper.examineSchedulingMp(productionScheduling.getSchedulingId(),userName);
+                productionSchedulingMapper.examineSchedulingMp(productionScheduling.getSchedulingId(),userName,productionScheduling.getSchedulingQuantity(),productionScheduling.getNotes());
                 // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
             }
             return true;
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
index 4972af8..5b06d79 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -4,6 +4,7 @@
 import com.baomidou.dynamic.datasource.annotation.DS;
 
 import com.example.erp.dto.pp.DamageReportDTO;
+import com.example.erp.dto.pp.ScheduleProductionScheduleDTO;
 import com.example.erp.dto.pp.TeamOutputDTO;
 import com.example.erp.entity.pp.DamageDetails;
 import com.example.erp.entity.pp.Report;
@@ -411,4 +412,19 @@
         map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
         return map;
     }
+
+    public Map<String, Object> scheduleProductionScheduleSv(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, String processes, ScheduleProductionScheduleDTO scheduleProductionScheduleDTO) {
+        Integer offset = (pageNum - 1) * pageSize;
+        Map<String, Object> map = new HashMap<>();
+        map.put("data", reportMapper.scheduleProductionScheduleMp(offset, pageSize, selectTime1, selectTime2,processes, scheduleProductionScheduleDTO));
+        map.put("total", reportMapper.getScheduleProductionScheduleTotal(offset, pageSize, selectTime1, selectTime2,processes, scheduleProductionScheduleDTO));
+        map.put("process", productionSchedulingMapper.selectProcess());
+        return map;
+    }
+
+    public List exportScheduleReportSv(Map<String, Object> dates) {
+        List<LocalDate> date= (List<LocalDate>) dates.get("date");
+        String process= (String) dates.get("processes");
+        return reportMapper.exportScheduleReportMp(date,process);
+    }
 }
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 5758f11..dc997a3 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -218,7 +218,6 @@
                 on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number
         set ogd.splitting_status=0
         where ogd.order_id = #{orderId}
-          and ogd.production_id = left(#{processId}, 11)
 
     </update>
 
@@ -226,7 +225,7 @@
     <update id="deleteFlowCardMp">
         delete
         from flow_card as fc
-        where fc.production_id = left(#{processId}, 11)
+        where fc.order_id = left(#{processId}, 10)
     </update>
 
     <!--    鍒嗘灦鏂板鏄庣粏鏌ヨ-->
@@ -447,7 +446,7 @@
     <delete id="deleteReportingWork">
         delete
         from sd.order_process_detail
-        where left(process_id, 11) = left(#{processId}, 11)
+        where order_id = left(#{processId}, 10)
     </delete>
 
     <select id="selectPrintFlowCardMp">
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml b/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
index fdd147d..17de88e 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
@@ -68,7 +68,8 @@
         ps.reviewer,
         od.product_name,
         if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
-        ps.scheduling_id
+        ps.scheduling_id,
+        ps.notes
         from sd.order_detail as od
         left join sd.order as o on od.order_id = o.order_id
         left join production_scheduling as ps
@@ -195,7 +196,9 @@
     <update id="examineSchedulingMp">
         update production_scheduling
         set review_status=1,
-            reviewer=#{userName}
+            reviewer=#{userName},
+            scheduling_quantity=#{schedulingQuantity},
+            notes=#{notes}
         where scheduling_id = #{schedulingId}
     </update>
 
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index 969710f..f4a1ad2 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -57,12 +57,12 @@
         <result column="breakage_reason" property="breakageReason"/>
         <result column="breakage_quantity" property="breakageQuantity"/>
         <result column="area" property="area"/>
-            <result column="reporting_work_id" property="reportingWork.reportingWorkId"/>
-            <result column="reporting_work_time" property="reportingWork.reportingWorkTime"/>
-            <result column="this_process" property="reportingWork.thisProcess"/>
-            <result column="project" property="order.project"/>
-            <result column="order_id" property="order.orderId"/>
-            <result column="glass_child" property="orderGlassDetail.glassChild"/>
+        <result column="reporting_work_id" property="reportingWork.reportingWorkId"/>
+        <result column="reporting_work_time" property="reportingWork.reportingWorkTime"/>
+        <result column="this_process" property="reportingWork.thisProcess"/>
+        <result column="project" property="order.project"/>
+        <result column="order_id" property="order.orderId"/>
+        <result column="glass_child" property="orderGlassDetail.glassChild"/>
     </resultMap>
 
 
@@ -120,8 +120,18 @@
         <result column="product_name" property="productName"/>
     </resultMap>
 
+    <resultMap id="scheduleProductionScheduleMap" type="com.example.erp.dto.pp.ScheduleProductionScheduleDTO">
+        <result column="order_id" property="orderId"/>
+        <result column="project" property="project"/>
+        <result column="processes" property="processes"/>
+        <result column="scheduling_quantity" property="schedulingQuantity"/>
+        <result column="notes" property="notes"/>
+        <result column="scheduled_start_time" property="scheduledStartTime"/>
+        <result column="plan_end_time" property="planEndTime"/>
+    </resultMap>
 
-<!--    娴佺▼鍗¤繘搴�-->
+
+    <!--    娴佺▼鍗¤繘搴�-->
     <select id="processCardProgressMp">
         select a.product_name,
                b.glass_child,
@@ -165,7 +175,7 @@
                             FROM sd.order_process_detail as a
                             where a.order_id = #{orderId}
                             GROUP BY process_id, a.order_number, a.technology_number) as e
-                               on e.process_id = c.process_id
+                           on e.process_id = c.process_id
                                and e.technology_number = c.technology_number
                                and e.order_number = c.order_number
         where a.order_id = #{orderId}
@@ -176,56 +186,66 @@
     </select>
 
     <select id="getProcessBreaking" resultMap="damageDetailsTableMap">
-        select rw.reporting_work_id,rw.reporting_work_time,dd.responsible_process,dd.responsible_team,
-               dd.breakage_type,dd.breakage_reason,ROUND((dd.breakage_quantity)) as breakage_quantity,
-               round(ogd.child_width*ogd.child_height*(dd.breakage_quantity)/1000000,2) as area,rw.this_process,
-               o.project,o.order_id,ogd.glass_child,rw.this_process
-        from
-            damage_details as dd
-                left join reporting_work as rw
-                    on rw.reporting_work_id=dd.reporting_work_id
-                left join sd.order as o
-                    on rw.order_id=o.order_id
-                left join sd.order_glass_detail as ogd
-                          on ogd.order_id=o.order_id and ogd.order_number=dd.order_number
-                                 and ogd.technology_number and dd.technology_number
-        where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) &lt;= #{endDate}
-          and rw.this_worn_quantity>0 and dd.available=0
-          and reviewed_state!=2
-            and rw.this_process!=dd.responsible_process
+        select rw.reporting_work_id,
+               rw.reporting_work_time,
+               dd.responsible_process,
+               dd.responsible_team,
+               dd.breakage_type,
+               dd.breakage_reason,
+               ROUND((dd.breakage_quantity))                                                   as breakage_quantity,
+               round(ogd.child_width * ogd.child_height * (dd.breakage_quantity) / 1000000, 2) as area,
+               rw.this_process,
+               o.project,
+               o.order_id,
+               ogd.glass_child,
+               rw.this_process
+        from damage_details as dd
+                 left join reporting_work as rw
+                           on rw.reporting_work_id = dd.reporting_work_id
+                 left join sd.order as o
+                           on rw.order_id = o.order_id
+                 left join sd.order_glass_detail as ogd
+                           on ogd.order_id = o.order_id and ogd.order_number = dd.order_number
+                               and ogd.technology_number and dd.technology_number
+        where date(rw.reporting_work_time) >= #{startDate}
+          and date(rw.reporting_work_time) &lt;= #{endDate}
+          and rw.this_worn_quantity > 0
+          and dd.available = 0
+          and reviewed_state != 2
+          and rw.this_process != dd.responsible_process
         GROUP BY dd.id
         order by dd.id desc
         limit #{offset},#{pageSize}
     </select>
 
     <select id="getProcessBreakingTotal">
-        select
-            CEILING(count(dd.id)/#{pageSize}) as 'pageTotal',
-            count(distinct dd.id) as 'total'
-        from
-            damage_details as dd
-                left join reporting_work as rw
-                          on rw.reporting_work_id=dd.reporting_work_id
-                left join sd.order as o
-                          on rw.order_id=o.order_id
-                left join sd.order_glass_detail as ogd
-                          on ogd.order_id=o.order_id and ogd.order_number=dd.order_number
-                              and ogd.technology_number and dd.technology_number
-        where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) &lt;= #{endDate}
-          and rw.this_worn_quantity>0 and dd.available=0
-          and reviewed_state!=2
-          and rw.this_process!=dd.responsible_process
+        select CEILING(count(dd.id) / #{pageSize}) as 'pageTotal',
+               count(distinct dd.id)               as 'total'
+        from damage_details as dd
+                 left join reporting_work as rw
+                           on rw.reporting_work_id = dd.reporting_work_id
+                 left join sd.order as o
+                           on rw.order_id = o.order_id
+                 left join sd.order_glass_detail as ogd
+                           on ogd.order_id = o.order_id and ogd.order_number = dd.order_number
+                               and ogd.technology_number and dd.technology_number
+        where date(rw.reporting_work_time) >= #{startDate}
+          and date(rw.reporting_work_time) &lt;= #{endDate}
+          and rw.this_worn_quantity > 0
+          and dd.available = 0
+          and reviewed_state != 2
+          and rw.this_process != dd.responsible_process
         order by dd.id desc
     </select>
 
     <select id="workInProgressMp">
-        select #{selectProcesses} as thisProcess,
+        select #{selectProcesses}                                     as thisProcess,
                fc.process_id,
                o.customer_name,
                o.project,
                o.order_id,
                o.batch,
-               if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
+               if(od.shape = 1, '鏅舰', if(od.shape = 2, '寮傚舰', '')) as shape,
                ogd.order_number,
                ogd.technology_number,
                ogd.process,
@@ -233,10 +253,10 @@
                ogd.child_width,
                ogd.child_height,
                odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-               odpd.broken_num as stockNum,
+               odpd.broken_num                                        as stockNum,
                ROUND(ogd.child_width * ogd.child_height *
                      (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-                      odpd.broken_num) / 1000000, 2) as stockArea,
+                      odpd.broken_num) / 1000000, 2)                  as stockArea,
                od.product_name,
                od.bend_radius
 
@@ -277,8 +297,10 @@
         where LENGTH(fc.process_id) = 14
           and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
               odpd.broken_num != 0
-          and odpd.process = #{selectProcesses} and o.create_time between #{selectTime1} and #{selectTime2}
-          and position(#{orderId} in od.order_id) and position(#{inputProject} in o.project)
+          and odpd.process = #{selectProcesses}
+          and o.create_time between #{selectTime1} and #{selectTime2}
+          and position(#{orderId} in od.order_id)
+          and position(#{inputProject} in o.project)
 
         group by fc.process_id, fc.order_number, fc.technology_number
         order by fc.process_id, fc.order_number, fc.technology_number
@@ -302,59 +324,59 @@
         </if>
     -->
 
-<!--     <select id="getWorkInProgressTotal">-->
-<!--        select CEILING(count(fc.id) / #{pageSize}) as 'pageTotal',-->
-<!--               count(distinct fc.id)               as 'total'-->
+    <!--     <select id="getWorkInProgressTotal">-->
+    <!--        select CEILING(count(fc.id) / #{pageSize}) as 'pageTotal',-->
+    <!--               count(distinct fc.id)               as 'total'-->
 
-<!--        from sd.order_detail AS od-->
-<!--                 LEFT JOIN sd.order_glass_detail AS ogd-->
-<!--                           ON od.order_id = ogd.order_id-->
-<!--                               AND od.order_number = ogd.order_number-->
-<!--                 LEFT JOIN flow_card AS fc-->
-<!--                           ON fc.order_id = ogd.order_id-->
-<!--                               and fc.production_id = ogd.production_id-->
-<!--                               AND fc.order_number = ogd.order_number-->
-<!--                               AND fc.technology_number = ogd.technology_number-->
-<!--                 left join sd.order_process_detail as odpd-->
-<!--                           ON odpd.order_id = fc.order_id-->
-<!--                               AND odpd.order_number = fc.order_number-->
-<!--                               AND odpd.technology_number = fc.technology_number-->
-<!--                               and odpd.process_id = fc.process_id-->
-<!--                 left join sd.order_process_detail as odpds-->
-<!--                           ON odpds.id = odpd.id - 1-->
-<!--                 left join-->
-<!--             (SELECT sum(rw.rework_num) as 'patchNumSum',-->
-<!--                     rw.process_id,-->
-<!--                     rw.order_sort,-->
-<!--                     rw.technology_number,-->
-<!--                     rwk.this_process-->
-<!--              from rework as rw-->
-<!--                       LEFT JOIN-->
-<!--                   reporting_work as rwk-->
-<!--                   on rw.reporting_work_id = rwk.reporting_work_id-->
-<!--              where rwk.this_process = #{selectProcesses}-->
-<!--                and rw.review_status = 1-->
-<!--              GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c-->
-<!--             on c.process_id = fc.process_id-->
-<!--                 and c.order_sort = fc.order_number-->
-<!--                 and c.technology_number = fc.technology_number-->
-<!--                 left join sd.`order` as o-->
-<!--                           on o.order_id = od.order_id-->
-<!--        where LENGTH(fc.process_id) = 14-->
-<!--          and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - -->
-<!--              odpd.broken_num != 0-->
-<!--          and odpd.process = #{selectProcesses}-->
-<!--          and o.create_time between #{selectTime1} and #{selectTime2}-->
-<!--          and position(#{orderId} in od.order_id)-->
-<!--          and position(#{inputProject} in o.project)-->
-<!--        group by fc.process_id, fc.order_number, fc.technology_number-->
-<!--        order by fc.process_id, fc.order_number, fc.technology_number-->
-<!--        limit #{offset},#{pageSize};-->
-<!--    </select>-->
+    <!--        from sd.order_detail AS od-->
+    <!--                 LEFT JOIN sd.order_glass_detail AS ogd-->
+    <!--                           ON od.order_id = ogd.order_id-->
+    <!--                               AND od.order_number = ogd.order_number-->
+    <!--                 LEFT JOIN flow_card AS fc-->
+    <!--                           ON fc.order_id = ogd.order_id-->
+    <!--                               and fc.production_id = ogd.production_id-->
+    <!--                               AND fc.order_number = ogd.order_number-->
+    <!--                               AND fc.technology_number = ogd.technology_number-->
+    <!--                 left join sd.order_process_detail as odpd-->
+    <!--                           ON odpd.order_id = fc.order_id-->
+    <!--                               AND odpd.order_number = fc.order_number-->
+    <!--                               AND odpd.technology_number = fc.technology_number-->
+    <!--                               and odpd.process_id = fc.process_id-->
+    <!--                 left join sd.order_process_detail as odpds-->
+    <!--                           ON odpds.id = odpd.id - 1-->
+    <!--                 left join-->
+    <!--             (SELECT sum(rw.rework_num) as 'patchNumSum',-->
+    <!--                     rw.process_id,-->
+    <!--                     rw.order_sort,-->
+    <!--                     rw.technology_number,-->
+    <!--                     rwk.this_process-->
+    <!--              from rework as rw-->
+    <!--                       LEFT JOIN-->
+    <!--                   reporting_work as rwk-->
+    <!--                   on rw.reporting_work_id = rwk.reporting_work_id-->
+    <!--              where rwk.this_process = #{selectProcesses}-->
+    <!--                and rw.review_status = 1-->
+    <!--              GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c-->
+    <!--             on c.process_id = fc.process_id-->
+    <!--                 and c.order_sort = fc.order_number-->
+    <!--                 and c.technology_number = fc.technology_number-->
+    <!--                 left join sd.`order` as o-->
+    <!--                           on o.order_id = od.order_id-->
+    <!--        where LENGTH(fc.process_id) = 14-->
+    <!--          and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - -->
+    <!--              odpd.broken_num != 0-->
+    <!--          and odpd.process = #{selectProcesses}-->
+    <!--          and o.create_time between #{selectTime1} and #{selectTime2}-->
+    <!--          and position(#{orderId} in od.order_id)-->
+    <!--          and position(#{inputProject} in o.project)-->
+    <!--        group by fc.process_id, fc.order_number, fc.technology_number-->
+    <!--        order by fc.process_id, fc.order_number, fc.technology_number-->
+    <!--        limit #{offset},#{pageSize};-->
+    <!--    </select>-->
 
     <select id="processToBeCompletedMp">
-        select DATE(o.create_time) as create_time,
-               DATE(o.delivery_date) as delivery_date,
+        select DATE(o.create_time)                                                  as create_time,
+               DATE(o.delivery_date)                                                as delivery_date,
                o.order_id,
                fc.process_id,
                o.customer_name,
@@ -366,14 +388,14 @@
                ogd.child_width,
                ogd.child_height,
                od.quantity,
-               ROUND(ogd.child_width * ogd.child_height / 1000000, 2)                 as childArea,
-               ROUND(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2)   as actualArea,
-               odpd.reporting_work_num                                                as completeNum,
+               ROUND(ogd.child_width * ogd.child_height / 1000000, 2)               as childArea,
+               ROUND(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as actualArea,
+               odpd.reporting_work_num                                              as completeNum,
                ROUND(ogd.child_width * ogd.child_height * odpd.reporting_work_num / 1000000,
-                     2)                                                               as completeArea,
-               od.quantity - odpd.reporting_work_num                                  as incompleteNum,
+                     2)                                                             as completeArea,
+               od.quantity - odpd.reporting_work_num                                as incompleteNum,
                ROUND(ogd.child_width * ogd.child_height * (od.quantity - odpd.reporting_work_num) / 1000000,
-                     2)                                                               as incompleteArea,
+                     2)                                                             as incompleteArea,
                od.product_name
 
         from sd.order_detail AS od
@@ -403,34 +425,34 @@
         order by fc.process_id, fc.order_number, fc.technology_number
     </select>
 
-    <select id="selectDamageReportMp" resultMap="damageReportMap">
+        <select id="selectDamageReportMp" resultMap="damageReportMap">
         SELECT
-            o.order_id,
-            o.project,
-            rw.process_id,
-            dd.order_number,
-            dd.technology_number,
-            date(rw.reporting_work_time) as reporting_work_time,
-            dd.responsible_process,
-            dd.responsible_team,
-            dd.responsible_equipment,
-            dd.breakage_type,
-            dd.breakage_reason,
-            dd.breakage_quantity,
-            round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) as area,
-            IFNULL(dd.responsible_personnel,'') as personnel,
-            ogd.glass_child
+        o.order_id,
+        o.project,
+        rw.process_id,
+        dd.order_number,
+        dd.technology_number,
+        date(rw.reporting_work_time) as reporting_work_time,
+        dd.responsible_process,
+        dd.responsible_team,
+        dd.responsible_equipment,
+        dd.breakage_type,
+        dd.breakage_reason,
+        dd.breakage_quantity,
+        round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) as area,
+        IFNULL(dd.responsible_personnel,'') as personnel,
+        ogd.glass_child
         FROM
-            sd.ORDER AS o
-                LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id
-                LEFT JOIN reporting_work AS rw ON rw.order_id = o.order_id
-                LEFT JOIN damage_details AS dd ON dd.reporting_work_id = rw.reporting_work_id
-                AND dd.order_number = ogd.order_number
-                AND dd.technology_number = ogd.technology_number
+        sd.ORDER AS o
+        LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id
+        LEFT JOIN reporting_work AS rw ON rw.order_id = o.order_id
+        LEFT JOIN damage_details AS dd ON dd.reporting_work_id = rw.reporting_work_id
+        AND dd.order_number = ogd.order_number
+        AND dd.technology_number = ogd.technology_number
         WHERE
-            rw.reporting_work_time between #{selectTime1} and #{selectTime2}
-          AND dd.available = 0
-          AND LENGTH( rw.process_id )= 14
+        rw.reporting_work_time between #{selectTime1} and #{selectTime2}
+        AND dd.available = 0
+        AND LENGTH( rw.process_id )= 14
         <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''">
             and o.order_id regexp #{damageReportDTO.orderId}
         </if>
@@ -462,7 +484,7 @@
             and dd.breakage_reason regexp #{damageReportDTO.breakageReason}
         </if>
         GROUP BY
-            dd.id
+        dd.id
         limit #{offset},#{pageSize};
     </select>
 
@@ -516,30 +538,26 @@
     </select>
 
     <select id="splittingDetailsOutsideMp">
-        SELECT
-            fc.process_id processId,
-            fc.order_number orderNumber,
-            fc.technology_number as technologyNumber,
-            o.project,
-            o.batch,
-            ogd.child_width as childWidth,
-            ogd.child_height as childHeight,
-            fc.quantity,
-            round( ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2 ) as area,
-            if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
-            od.remarks
-        FROM
-            sd.ORDER AS o
-                LEFT JOIN sd.order_detail AS od ON od.order_id = od.order_id
-                LEFT JOIN sd.order_glass_detail AS ogd ON o.order_id = ogd.order_id
-                AND ogd.order_number = od.order_number
-                LEFT JOIN flow_card AS fc ON fc.order_id = ogd.order_id
-                AND fc.order_number
-                AND fc.technology_number = ogd.technology_number
-        WHERE
-            fc.order_id = #{orderId}
-        GROUP BY
-            fc.id
+        SELECT fc.process_id                                                           processId,
+               fc.order_number                                                         orderNumber,
+               fc.technology_number                                                 as technologyNumber,
+               o.project,
+               o.batch,
+               ogd.child_width                                                      as childWidth,
+               ogd.child_height                                                     as childHeight,
+               fc.quantity,
+               round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
+               if(od.shape = 1, '鏅舰', if(od.shape = 2, '寮傚舰', ''))               as shape,
+               od.remarks
+        FROM sd.ORDER AS o
+                 LEFT JOIN sd.order_detail AS od ON od.order_id = od.order_id
+                 LEFT JOIN sd.order_glass_detail AS ogd ON o.order_id = ogd.order_id
+            AND ogd.order_number = od.order_number
+                 LEFT JOIN flow_card AS fc ON fc.order_id = ogd.order_id
+            AND fc.order_number
+            AND fc.technology_number = ogd.technology_number
+        WHERE fc.order_id = #{orderId}
+        GROUP BY fc.id
     </select>
 
     <select id="qualityReportMp">
@@ -550,10 +568,10 @@
                fc.technology_number,
                od.product_name,
                od.quantity,
-               ifnull(MAX(opd.reporting_work_num_count),0)                                                   as quantityMax,
+               ifnull(MAX(opd.reporting_work_num_count), 0)                                        as quantityMax,
                IFNULL(SUM(distinct dd.breakage_quantity), 0)                                       as breakage_quantity,
                IFNULL(sum(distinct pl.patch_num), 0)                                               as patch_num,
-               ifnull(fc.received_quantity,0) as received_quantity,
+               ifnull(fc.received_quantity, 0)                                                     as received_quantity,
                CONCAT(ROUND(ROUND(od.quantity / MAX(opd.reporting_work_num_count), 2) * 100), '%') as finished
         FROM sd.`order` AS o
                  LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id
@@ -612,55 +630,51 @@
     </select>
 
     <select id="productionScheduleMp">
-        select
-            a.order_number,
-            if(a.shape=1,'鏅舰',if(a.shape=2,'寮傚舰','')) as shape,
-            a.product_name,
-            b.child_width,
-            b.child_height,
-            c.quantity,
-            c.technology_number,
-            b.glass_child,
-            ifnull(e.reportWorkQuantity,0) as reportWorkQuantity,
-            ifnull(e.reportWorkQuantityCount,0) as reportWorkQuantityCount,
-            ifnull(f.inventory,0) as inventoryNum,
-            round(ifnull(f.inventory,0)*a.area,2) as  inventoryArea,
-            ifnull(dd.quantity,0) as shippedQuantity,
-            ifnull(dd.area,0) as area
+        select a.order_number,
+               if(a.shape = 1, '鏅舰', if(a.shape = 2, '寮傚舰', '')) as shape,
+               a.product_name,
+               b.child_width,
+               b.child_height,
+               c.quantity,
+               c.technology_number,
+               b.glass_child,
+               ifnull(e.reportWorkQuantity, 0)                      as reportWorkQuantity,
+               ifnull(e.reportWorkQuantityCount, 0)                 as reportWorkQuantityCount,
+               ifnull(f.inventory, 0)                               as inventoryNum,
+               round(ifnull(f.inventory, 0) * a.area, 2)            as inventoryArea,
+               ifnull(dd.quantity, 0)                               as shippedQuantity,
+               ifnull(dd.area, 0)                                   as area
 
-        from
-            flow_card as c
-                left join
-            sd.order_detail as a
-            on  c.order_id = a.order_id
-                and c.order_number = a.order_number
-                left join sd.order_glass_detail as b
-                          on c.order_id = b.order_id
-                              and b.order_number = c.order_number
-                              and c.technology_number = b.technology_number
-                left join sd.`order` as d
-                          on c.order_id = d.order_id
-                left join mm.finished_goods_inventory as f
-                          on c.order_id = f.order_id and f.order_number = c.order_number
-                left join (
-                SELECT process_id,
-                       technology_number,
-                       sum(a.broken_num) as broken_num,
-                       concat('{',
-                              GROUP_CONCAT(concat("\"",process,"\":\"",reporting_work_num,"\"")),
-                              '}'
-                           ) as reportWorkQuantity,
-                       concat('{',
-                              GROUP_CONCAT(concat("\"",process,"\":\"",reporting_work_num,"\"")),
-                              '}'
-                           ) as  reportWorkQuantityCount
-                FROM sd.order_process_detail as a
-                where a.order_id=#{orderId}
-                GROUP BY process_id,a.technology_number
-            ) as e
-                          on e.process_id = c.process_id
-                              and e.technology_number = c.technology_number
-                left join sd.delivery_detail as dd on dd.order_id=a.order_id and dd.order_number=a.order_number
+        from flow_card as c
+                 left join
+             sd.order_detail as a
+             on c.order_id = a.order_id
+                 and c.order_number = a.order_number
+                 left join sd.order_glass_detail as b
+                           on c.order_id = b.order_id
+                               and b.order_number = c.order_number
+                               and c.technology_number = b.technology_number
+                 left join sd.`order` as d
+                           on c.order_id = d.order_id
+                 left join mm.finished_goods_inventory as f
+                           on c.order_id = f.order_id and f.order_number = c.order_number
+                 left join (SELECT process_id,
+                                   technology_number,
+                                   sum(a.broken_num) as broken_num,
+                                   concat('{',
+                                          GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num, "\"")),
+                                          '}'
+                                       )             as reportWorkQuantity,
+                                   concat('{',
+                                          GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num, "\"")),
+                                          '}'
+                                       )             as reportWorkQuantityCount
+                            FROM sd.order_process_detail as a
+                            where a.order_id = #{orderId}
+                            GROUP BY process_id, a.technology_number) as e
+                           on e.process_id = c.process_id
+                               and e.technology_number = c.technology_number
+                 left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number
         where a.order_id = #{orderId}
         ORDER BY a.order_number
     </select>
@@ -669,11 +683,11 @@
         select d.customer_name as customerName,
                d.project,
                d.batch,
-               c.order_id as orderId,
+               c.order_id      as orderId,
                d.quantity,
                d.area,
-               dd.quantity as shippedQuantity,
-               dd.area     as shippedArea,
+               dd.quantity     as shippedQuantity,
+               dd.area         as shippedArea,
                e.reportWorkQuantity,
                e.reportWorkQuantityCount
 
@@ -693,100 +707,82 @@
                                    technology_number,
                                    sum(a.broken_num) as broken_num,
                                    concat('{',
-                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num,0), "\"")),
+                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num, 0), "\"")),
                                           '}'
                                        )             as reportWorkQuantity,
                                    concat('{',
-                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num,0), "\"")),
+                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num, 0), "\"")),
                                           '}'
                                        )             as reportWorkQuantityCount
                             FROM sd.order_process_detail as a
                                      left join sd.`order` as o on o.order_id = a.order_id
                             where o.create_time BETWEEN #{selectTime1} and #{selectTime2}
-                            GROUP BY process_id,a.technology_number
-                            ) as e
+                            GROUP BY process_id, a.technology_number) as e
                            on e.process_id = c.process_id
                                and e.technology_number = c.technology_number
                  left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number
-        where d.create_time BETWEEN #{selectTime1} and #{selectTime2} and reportWorkQuantity is not null
+        where d.create_time BETWEEN #{selectTime1} and #{selectTime2}
+          and reportWorkQuantity is not null
         GROUP BY a.order_id
         ORDER BY a.order_id
     </select>
 
     <select id="orderPlanDecompositionMp">
-        SELECT
-            o.order_id,
-            o.customer_name,
-            o.project,
-            o.batch,
-            o.quantity,
-            o.area,
-            date(fc.create_time) as create_time,
-            date(orw.startTime) as startTime,
-            ifnull(oopd.completionsNum,0) as completionsNum,
-            sum( DISTINCT fc.received_quantity ) AS received_quantity,
-            o.quantity-sum( DISTINCT  fc.received_quantity ) AS receivedNo,
-            IF(fc.quantity=fc.received_quantity,'宸叉竻鍗�','') as accomplish,
-            DATEDIFF(
-                    MAX( rw.reporting_work_time ),
-                    min( rw.reporting_work_time ))+1 AS daysDifference
-        FROM
-            sd.`order` AS o
-                LEFT JOIN flow_card AS fc ON fc.order_id = o.order_id
-                LEFT JOIN (
-                SELECT
-                    a.order_id,
-                    MIN( b.reporting_work_time ) AS startTime
-                FROM
-                    sd.`order` AS a
-                        LEFT JOIN reporting_work AS b ON a.order_id = b.order_id
-                WHERE
-                    b.this_process = '鍒囧壊'
-                  AND a.create_time BETWEEN #{selectTime1} and #{selectTime2}
-                GROUP BY
-                    a.order_id
-            ) AS orw ON orw.order_id = o.order_id
-                LEFT JOIN (
-                SELECT
-                    a.order_id,
-                    SUM( b.reporting_work_num ) AS completionsNum
-                FROM
-                    sd.`order` AS a
-                        LEFT JOIN sd.order_process_detail AS b ON a.order_id = b.order_id
-                WHERE
-                    b.process = '鍖呰'
-                  AND a.create_time BETWEEN #{selectTime1} and #{selectTime2}
-                GROUP BY
-                    a.order_id
-            ) AS oopd ON oopd.order_id = o.order_id
-                LEFT JOIN reporting_work AS rw ON rw.order_id = fc.order_id
-                AND rw.process_id = fc.process_id
-        WHERE
-            o.create_time BETWEEN #{selectTime1} and #{selectTime2}
+        SELECT o.order_id,
+               o.customer_name,
+               o.project,
+               o.batch,
+               o.quantity,
+               o.area,
+               date(fc.create_time)                                 as create_time,
+               date(orw.startTime)                                  as startTime,
+               ifnull(oopd.completionsNum, 0)                       as completionsNum,
+               sum(DISTINCT fc.received_quantity)                   AS received_quantity,
+               o.quantity - sum(DISTINCT fc.received_quantity)      AS receivedNo,
+               IF(fc.quantity = fc.received_quantity, '宸叉竻鍗�', '') as accomplish,
+               DATEDIFF(
+                       MAX(rw.reporting_work_time),
+                       min(rw.reporting_work_time)) + 1             AS daysDifference
+        FROM sd.`order` AS o
+                 LEFT JOIN flow_card AS fc ON fc.order_id = o.order_id
+                 LEFT JOIN (SELECT a.order_id,
+                                   MIN(b.reporting_work_time) AS startTime
+                            FROM sd.`order` AS a
+                                     LEFT JOIN reporting_work AS b ON a.order_id = b.order_id
+                            WHERE b.this_process = '鍒囧壊'
+                              AND a.create_time BETWEEN #{selectTime1} and #{selectTime2}
+                            GROUP BY a.order_id) AS orw ON orw.order_id = o.order_id
+                 LEFT JOIN (SELECT a.order_id,
+                                   SUM(b.reporting_work_num) AS completionsNum
+                            FROM sd.`order` AS a
+                                     LEFT JOIN sd.order_process_detail AS b ON a.order_id = b.order_id
+                            WHERE b.process = '鍖呰'
+                              AND a.create_time BETWEEN #{selectTime1} and #{selectTime2}
+                            GROUP BY a.order_id) AS oopd ON oopd.order_id = o.order_id
+                 LEFT JOIN reporting_work AS rw ON rw.order_id = fc.order_id
+            AND rw.process_id = fc.process_id
+        WHERE o.create_time BETWEEN #{selectTime1} and #{selectTime2}
           AND fc.create_time IS NOT NULL
-        GROUP BY
-            o.order_id
+        GROUP BY o.order_id
     </select>
 
     <select id="rawMaterialRequisitionMp">
-        SELECT
-            fc.project_no,
-            modl.material_name,
-            modl.producer,
-            ou.width,
-            ou.height,
-            modl.date_of_manufacture,
-            SUM(distinct modl.outbound_quantity) as quantity,
-            ROUND(SUM(modl.outbound_quantity)*SUM(modl.single_piece_area),2) as area,
-            date(mo.material_requisition_date) as date
-        FROM
-            mm.material_outbound_detail AS modl
-                left join mm.material_outbound as mo on mo.material_outbound_id=modl.material_outbound_id
-                LEFT JOIN optimize_use AS ou ON modl.use_id = ou.id and ou.raw_stock_code=modl.inventory_id
-                LEFT JOIN flow_card AS fc ON ou.project_no = fc.project_no
-        where  modl.use_id IS NOT NULL and mo.material_requisition_date BETWEEN #{selectTime1} and #{selectTime2}
-        GROUP BY
-            ou.width,ou.height,material_code
+        SELECT fc.project_no,
+               modl.material_name,
+               modl.producer,
+               ou.width,
+               ou.height,
+               modl.date_of_manufacture,
+               SUM(distinct modl.outbound_quantity)                                as quantity,
+               ROUND(SUM(modl.outbound_quantity) * SUM(modl.single_piece_area), 2) as area,
+               date(mo.material_requisition_date)                                  as date
+        FROM mm.material_outbound_detail AS modl
+                 left join mm.material_outbound as mo on mo.material_outbound_id = modl.material_outbound_id
+                 LEFT JOIN optimize_use AS ou ON modl.use_id = ou.id and ou.raw_stock_code = modl.inventory_id
+                 LEFT JOIN flow_card AS fc ON ou.project_no = fc.project_no
+        where modl.use_id IS NOT NULL
+          and mo.material_requisition_date BETWEEN #{selectTime1} and #{selectTime2}
+        GROUP BY ou.width, ou.height, material_code
     </select>
 
     <select id="exportCrossProcessBreakingMp">
@@ -850,62 +846,46 @@
     </select>
 
     <select id="exportOrderPlanDecompositionMp">
-        SELECT
-            o.order_id,
-            o.customer_name,
-            o.project,
-            o.batch,
-            o.quantity,
-            o.area,
-            date(fc.create_time) as create_time,
-            date(orw.startTime) as startTime,
-            oopd.completionsNum,
-            sum( DISTINCT fc.received_quantity ) AS received_quantity,
-            sum( DISTINCT fc.quantity - fc.received_quantity ) AS receivedNo,
-            IF(fc.quantity=fc.received_quantity,'宸叉竻鍗�','') as accomplish,
-            DATEDIFF(
-                    MAX( rw.reporting_work_time ),
-                    min( rw.reporting_work_time ))+1 AS daysDifference
-        FROM
-            sd.`order` AS o
-                LEFT JOIN flow_card AS fc ON fc.order_id = o.order_id
-                LEFT JOIN (
-                SELECT
-                    a.order_id,
-                    MIN( b.reporting_work_time ) AS startTime
-                FROM
-                    sd.`order` AS a
-                        LEFT JOIN reporting_work AS b ON a.order_id = b.order_id
-                WHERE
-                    b.this_process = '鍒囧壊'
-                  AND date(a.create_time) >= #{dates[0]}
-                  and date(a.create_time) &lt;= #{dates[1]}
+        SELECT o.order_id,
+               o.customer_name,
+               o.project,
+               o.batch,
+               o.quantity,
+               o.area,
+               date(fc.create_time)                                 as create_time,
+               date(orw.startTime)                                  as startTime,
+               oopd.completionsNum,
+               sum(DISTINCT fc.received_quantity)                   AS received_quantity,
+               sum(DISTINCT fc.quantity - fc.received_quantity)     AS receivedNo,
+               IF(fc.quantity = fc.received_quantity, '宸叉竻鍗�', '') as accomplish,
+               DATEDIFF(
+                       MAX(rw.reporting_work_time),
+                       min(rw.reporting_work_time)) + 1             AS daysDifference
+        FROM sd.`order` AS o
+                 LEFT JOIN flow_card AS fc ON fc.order_id = o.order_id
+                 LEFT JOIN (SELECT a.order_id,
+                                   MIN(b.reporting_work_time) AS startTime
+                            FROM sd.`order` AS a
+                                     LEFT JOIN reporting_work AS b ON a.order_id = b.order_id
+                            WHERE b.this_process = '鍒囧壊'
+                              AND date(a.create_time) >= #{dates[0]}
+                              and date(a.create_time) &lt;= #{dates[1]}
 
-                GROUP BY
-                    a.order_id
-            ) AS orw ON orw.order_id = o.order_id
-                LEFT JOIN (
-                SELECT
-                    a.order_id,
-                    SUM( b.reporting_work_num ) AS completionsNum
-                FROM
-                    sd.`order` AS a
-                        LEFT JOIN sd.order_process_detail AS b ON a.order_id = b.order_id
-                WHERE
-                    b.process = '鍖呰'
-                  AND  date(a.create_time) >= #{dates[0]}
-                  and date(a.create_time) &lt;= #{dates[1]}
-                GROUP BY
-                    a.order_id
-            ) AS oopd ON oopd.order_id = o.order_id
-                LEFT JOIN reporting_work AS rw ON rw.order_id = fc.order_id
-                AND rw.process_id = fc.process_id
-        WHERE
-            date(o.create_time) >= #{dates[0]}
-                and date(o.create_time) &lt;= #{dates[1]}
+                            GROUP BY a.order_id) AS orw ON orw.order_id = o.order_id
+                 LEFT JOIN (SELECT a.order_id,
+                                   SUM(b.reporting_work_num) AS completionsNum
+                            FROM sd.`order` AS a
+                                     LEFT JOIN sd.order_process_detail AS b ON a.order_id = b.order_id
+                            WHERE b.process = '鍖呰'
+                              AND date(a.create_time) >= #{dates[0]}
+                              and date(a.create_time) &lt;= #{dates[1]}
+                            GROUP BY a.order_id) AS oopd ON oopd.order_id = o.order_id
+                 LEFT JOIN reporting_work AS rw ON rw.order_id = fc.order_id
+            AND rw.process_id = fc.process_id
+        WHERE date(o.create_time) >= #{dates[0]}
+          and date(o.create_time) &lt;= #{dates[1]}
           AND fc.create_time IS NOT NULL
-        GROUP BY
-            o.order_id
+        GROUP BY o.order_id
     </select>
 
     <select id="exportProcessToBeCompletedMp">
@@ -952,8 +932,8 @@
           and odpd.process = #{process}
           and date(o.create_time) >= #{date[0]}
           and date(o.create_time) &lt;= #{date[1]}
-          and position(ifnull(#{inputVal},'') in od.order_id)
-          and position(ifnull(#{project},'') in o.project)
+          and position(ifnull(#{inputVal}, '') in od.order_id)
+          and position(ifnull(#{project}, '') in o.project)
           and od.quantity > odpd.reporting_work_num
 
         group by fc.process_id, fc.order_number, fc.technology_number
@@ -961,13 +941,13 @@
     </select>
 
     <select id="exportWorkInProgressMp">
-        select #{process} as thisProcess,
+        select #{process}                                             as thisProcess,
                fc.process_id,
                o.customer_name,
                o.project,
                o.order_id,
                o.batch,
-               if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
+               if(od.shape = 1, '鏅舰', if(od.shape = 2, '寮傚舰', '')) as shape,
                ogd.order_number,
                ogd.technology_number,
                ogd.process,
@@ -975,10 +955,10 @@
                ogd.child_width,
                ogd.child_height,
                odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-               odpd.broken_num as stockNum,
+               odpd.broken_num                                        as stockNum,
                ROUND(ogd.child_width * ogd.child_height *
                      (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-                      odpd.broken_num) / 1000000, 2) as stockArea,
+                      odpd.broken_num) / 1000000, 2)                  as stockArea,
                od.product_name,
                od.bend_radius
 
@@ -1019,10 +999,11 @@
         where LENGTH(fc.process_id) = 14
           and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
               odpd.broken_num != 0
-          and odpd.process = #{process} and  date(o.create_time) >= #{date[0]}
+          and odpd.process = #{process}
+          and date(o.create_time) >= #{date[0]}
           and date(o.create_time) &lt;= #{date[1]}
-          and position(ifnull(#{inputVal},'') in od.order_id)
-          and position(ifnull(#{project},'') in o.project)
+          and position(ifnull(#{inputVal}, '') in od.order_id)
+          and position(ifnull(#{project}, '') in o.project)
 
         group by fc.process_id, fc.order_number, fc.technology_number
         order by fc.process_id, fc.order_number, fc.technology_number
@@ -1032,11 +1013,11 @@
         select d.customer_name as customerName,
                d.project,
                d.batch,
-               c.order_id as orderId,
+               c.order_id      as orderId,
                d.quantity,
                d.area,
-               dd.quantity as shippedQuantity,
-               dd.area     as shippedArea,
+               dd.quantity     as shippedQuantity,
+               dd.area         as shippedArea,
                e.reportWorkQuantity,
                e.reportWorkQuantityCount
 
@@ -1056,24 +1037,25 @@
                                    technology_number,
                                    sum(a.broken_num) as broken_num,
                                    concat('{',
-                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num,0), "\"")),
+                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num, 0), "\"")),
                                           '}'
                                        )             as reportWorkQuantity,
                                    concat('{',
-                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num,0), "\"")),
+                                          GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num, 0), "\"")),
                                           '}'
                                        )             as reportWorkQuantityCount
                             FROM sd.order_process_detail as a
                                      left join sd.`order` as o on o.order_id = a.order_id
                             where date(o.create_time) >= #{date[0]}
                               and date(o.create_time) &lt;= #{date[1]}
-                            GROUP BY process_id,a.technology_number
-        ) as e
+                            GROUP BY process_id, a.technology_number) as e
                            on e.process_id = c.process_id
                                and e.technology_number = c.technology_number
                  left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number
-        where d.create_time and date(o.create_time) >= #{dates[0]}
-          and date(o.create_time) &lt;= #{dates[1]} and reportWorkQuantity is not null
+        where d.create_time
+          and date(o.create_time) >= #{dates[0]}
+          and date(o.create_time) &lt;= #{dates[1]}
+          and reportWorkQuantity is not null
         GROUP BY a.order_id
         ORDER BY a.order_id
     </select>
@@ -1093,9 +1075,8 @@
                  LEFT JOIN optimize_use AS ou ON modl.use_id = ou.id and ou.raw_stock_code = modl.inventory_id
                  LEFT JOIN flow_card AS fc ON ou.project_no = fc.project_no
         where modl.use_id IS NOT NULL
-          and
-            date(mo.material_requisition_date) >= #{dates[0]}
-                and date(mo.material_requisition_date) &lt;= #{dates[1]}
+          and date(mo.material_requisition_date) >= #{dates[0]}
+          and date(mo.material_requisition_date) &lt;= #{dates[1]}
         GROUP BY ou.width, ou.height, material_code
     </select>
 
@@ -1132,9 +1113,8 @@
             AND opd.order_number = fc.order_number
             AND opd.technology_number = fc.technology_number
 
-        WHERE
-            date(o.create_time) >= #{dates[0]}
-                and date(o.create_time) &lt;= #{dates[1]}
+        WHERE date(o.create_time) >= #{dates[0]}
+          and date(o.create_time) &lt;= #{dates[1]}
         GROUP BY o.order_id,
                  fc.order_number,
                  fc.technology_number
@@ -1172,43 +1152,43 @@
 
     <select id="teamOutputMp" resultMap="teamOutputMap">
         SELECT
-            rw.reporting_work_time,
-            rw.this_process,
-            rw.teams_groups_name,
-            o.project,
-            rw.process_id,
-            rwd.order_number,
-            MAX( ogd.child_width ) as width,
-            MAX( ogd.child_height ) as height,
+        rw.reporting_work_time,
+        rw.this_process,
+        rw.teams_groups_name,
+        o.project,
+        rw.process_id,
+        rwd.order_number,
+        MAX( ogd.child_width ) as width,
+        MAX( ogd.child_height ) as height,
         if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
-            sum( pd.thickness ) as thickness,
-            od.edging_type,
-            rwd.completed_quantity,
-            ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area,
-            od.product_name
+        sum( pd.thickness ) as thickness,
+        od.edging_type,
+        rwd.completed_quantity,
+        ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area,
+        od.product_name
         FROM
-            reporting_work AS rw
-                LEFT JOIN reporting_work_detail AS rwd ON rw.reporting_work_id = rwd.reporting_work_id
-                LEFT JOIN sd.`order` AS o ON o.order_id = rw.order_id
-                LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id
-                AND od.order_number = rwd.order_number
-                LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id
-                AND ogd.order_number = rwd.order_number
-                AND ogd.technology_number = rwd.technology_number
-                AND ogd.order_number = od.order_number
-                LEFT JOIN (
-                SELECT
-                    prod_id,
-                    glass_sort,
-                    REPLACE ( JSON_UNQUOTE( JSON_EXTRACT( separation, '$.thickness' )), 'mm', '' ) AS thickness
-                FROM
-                    sd.product_detail
-                WHERE
-                    detail_type = "glass"
-            ) AS pd ON pd.prod_id = od.product_id
-                AND pd.glass_sort = rwd.technology_number
+        reporting_work AS rw
+        LEFT JOIN reporting_work_detail AS rwd ON rw.reporting_work_id = rwd.reporting_work_id
+        LEFT JOIN sd.`order` AS o ON o.order_id = rw.order_id
+        LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id
+        AND od.order_number = rwd.order_number
+        LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id
+        AND ogd.order_number = rwd.order_number
+        AND ogd.technology_number = rwd.technology_number
+        AND ogd.order_number = od.order_number
+        LEFT JOIN (
+        SELECT
+        prod_id,
+        glass_sort,
+        REPLACE ( JSON_UNQUOTE( JSON_EXTRACT( separation, '$.thickness' )), 'mm', '' ) AS thickness
+        FROM
+        sd.product_detail
+        WHERE
+        detail_type = "glass"
+        ) AS pd ON pd.prod_id = od.product_id
+        AND pd.glass_sort = rwd.technology_number
         where rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
-          and rw.this_process=#{selectProcesses}
+        and rw.this_process=#{selectProcesses}
         <if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''">
             and rw.this_process regexp #{teamOutputDTO.thisProcess}
         </if>
@@ -1229,16 +1209,16 @@
         </if>
 
         GROUP BY
-            rwd.order_number,
-            rw.this_process,
-            rw.teams_groups_name,
-            rw.process_id,
-            rw.reporting_work_id
+        rwd.order_number,
+        rw.this_process,
+        rw.teams_groups_name,
+        rw.process_id,
+        rw.reporting_work_id
         ORDER BY
-            rw.this_process,
-            rw.reporting_work_time,
-            rw.teams_groups_name,
-            rw.process_id
+        rw.this_process,
+        rw.reporting_work_time,
+        rw.teams_groups_name,
+        rw.process_id
         limit #{offset},#{pageSize};
     </select>
 
@@ -1292,18 +1272,18 @@
     </select>
 
     <select id="workInProgressOrderMp">
-        select #{selectProcesses} as thisProcess,
+        select #{selectProcesses}                                     as thisProcess,
                o.customer_name,
                o.project,
                o.order_id,
                o.batch,
-               if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
-               sum(od.quantity) as quantity,
+               if(od.shape = 1, '鏅舰', if(od.shape = 2, '寮傚舰', '')) as shape,
+               sum(od.quantity)                                       as quantity,
                sum(odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-                   odpd.broken_num )as stockNum,
+                   odpd.broken_num)                                   as stockNum,
                sum(ROUND(ogd.child_width * ogd.child_height *
                          (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-                          odpd.broken_num) / 1000000, 2)) as stockArea,
+                          odpd.broken_num) / 1000000, 2))             as stockArea,
                od.product_name
 
         from sd.order_detail AS od
@@ -1343,27 +1323,29 @@
         where LENGTH(fc.process_id) = 14
           and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
               odpd.broken_num != 0
-          and odpd.process = #{selectProcesses} and o.create_time between #{selectTime1} and #{selectTime2}
-          and position(#{orderId} in od.order_id) and position(#{inputProject} in o.project)
+          and odpd.process = #{selectProcesses}
+          and o.create_time between #{selectTime1} and #{selectTime2}
+          and position(#{orderId} in od.order_id)
+          and position(#{inputProject} in o.project)
 
         group by o.order_id
         order by o.order_id
     </select>
-    
+
     <select id="workInProgressProcessMp">
-        select #{selectProcesses} as thisProcess,
+        select #{selectProcesses}                                     as thisProcess,
                o.customer_name,
                o.project,
                o.order_id,
                fc.process_id,
                o.batch,
-               if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
-               sum(od.quantity) as quantity,
+               if(od.shape = 1, '鏅舰', if(od.shape = 2, '寮傚舰', '')) as shape,
+               sum(od.quantity)                                       as quantity,
                sum(odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-                   odpd.broken_num )as stockNum,
+                   odpd.broken_num)                                   as stockNum,
                sum(ROUND(ogd.child_width * ogd.child_height *
                          (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
-                          odpd.broken_num) / 1000000, 2)) as stockArea,
+                          odpd.broken_num) / 1000000, 2))             as stockArea,
                od.product_name
 
         from sd.order_detail AS od
@@ -1403,10 +1385,87 @@
         where LENGTH(fc.process_id) = 14
           and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
               odpd.broken_num != 0
-          and odpd.process = #{selectProcesses} and o.create_time between #{selectTime1} and #{selectTime2}
-          and position(#{orderId} in od.order_id) and position(#{inputProject} in o.project)
+          and odpd.process = #{selectProcesses}
+          and o.create_time between #{selectTime1} and #{selectTime2}
+          and position(#{orderId} in od.order_id)
+          and position(#{inputProject} in o.project)
 
-        group by o.order_id,fc.process_id
-        order by o.order_id,fc.process_id
+        group by o.order_id, fc.process_id
+        order by o.order_id, fc.process_id
+    </select>
+
+    <select id="scheduleProductionScheduleMp" resultMap="scheduleProductionScheduleMap">
+        select ps.order_id,
+               o.project,
+               ps.processes,
+               sum(ps.scheduling_quantity) as scheduling_quantity,
+               notes,
+               date(ps.scheduled_start_time) as scheduled_start_time,
+               date(ps.plan_end_time) as plan_end_time
+        from (select order_id, order_number, processes, scheduling_quantity, scheduled_start_time, plan_end_time, notes
+              from production_scheduling
+              where processes = #{processes}
+              GROUP BY order_id, order_number) as ps
+                 left join sd.`order` as o on o.order_id = ps.order_id
+        where ps.processes = #{processes}
+          and ps.scheduled_start_time between #{selectTime1} and #{selectTime2}
+        <if test="scheduleProductionScheduleDTO.orderId != null and scheduleProductionScheduleDTO.orderId != ''">
+            and ps.order_id regexp #{scheduleProductionScheduleDTO.orderId}
+        </if>
+        <if test="scheduleProductionScheduleDTO.project != null and scheduleProductionScheduleDTO.project != ''">
+            and o.project regexp #{scheduleProductionScheduleDTO.project}
+        </if>
+        <if test="scheduleProductionScheduleDTO.processes != null and scheduleProductionScheduleDTO.processes != ''">
+            and ps.processes regexp #{scheduleProductionScheduleDTO.processes}
+        </if>
+        <if test="scheduleProductionScheduleDTO.notes != null and scheduleProductionScheduleDTO.notes != ''">
+            and ps.notes regexp #{scheduleProductionScheduleDTO.notes}
+        </if>
+        GROUP BY ps.order_id, ps.processes
+        limit #{offset},#{pageSize};
+    </select>
+
+    <select id="getScheduleProductionScheduleTotal">
+        select CEILING(count(ps.order_id)/#{pageSize}) as 'pageTotal',
+        count(distinct ps.order_id) as 'total'
+        from (select order_id, order_number, processes, scheduling_quantity, scheduled_start_time, plan_end_time, notes
+        from production_scheduling
+        where processes = #{processes}
+        GROUP BY order_id, order_number) as ps
+        left join sd.`order` as o on o.order_id = ps.order_id
+        where ps.processes = #{processes}
+        and ps.scheduled_start_time between #{selectTime1} and #{selectTime2}
+        <if test="scheduleProductionScheduleDTO.orderId != null and scheduleProductionScheduleDTO.orderId != ''">
+            and ps.order_id regexp #{scheduleProductionScheduleDTO.orderId}
+        </if>
+        <if test="scheduleProductionScheduleDTO.project != null and scheduleProductionScheduleDTO.project != ''">
+            and o.project regexp #{scheduleProductionScheduleDTO.project}
+        </if>
+        <if test="scheduleProductionScheduleDTO.processes != null and scheduleProductionScheduleDTO.processes != ''">
+            and ps.processes regexp #{scheduleProductionScheduleDTO.processes}
+        </if>
+        <if test="scheduleProductionScheduleDTO.notes != null and scheduleProductionScheduleDTO.notes != ''">
+            and ps.notes regexp #{scheduleProductionScheduleDTO.notes}
+        </if>
+        limit #{offset},#{pageSize};
+    </select>
+
+    <select id="exportScheduleReportMp">
+        select ps.order_id,
+        o.project,
+        ps.processes,
+        sum(ps.scheduling_quantity) as scheduling_quantity,
+        notes,
+        date(ps.scheduled_start_time) as scheduled_start_time,
+        date(ps.plan_end_time) as plan_end_time
+        from (select order_id, order_number, processes, scheduling_quantity, scheduled_start_time, plan_end_time, notes
+        from production_scheduling
+        where processes = #{process}
+        GROUP BY order_id, order_number) as ps
+        left join sd.`order` as o on o.order_id = ps.order_id
+        where ps.processes = #{process}
+          and date(scheduled_start_time) >= #{date[0]}
+          and date(scheduled_start_time) &lt;= #{date[1]}
+        GROUP BY ps.order_id, ps.processes
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0