From 3c63bfcb45c622fee76934a0cfefdc1a9396fc8d Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 07 二月 2025 13:33:18 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue         |   45 +++++--
 north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue                  |  135 ++++++++++++++++------
 north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java |    7 
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue          |    2 
 north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue            |   35 +++--
 north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue              |    9 +
 north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java       |    1 
 north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue              |   17 ++
 north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue          |   46 +++++--
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml                          |    6 
 10 files changed, 211 insertions(+), 92 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
index b9e8424..fd99b52 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -629,7 +629,7 @@
   gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
     // 杩欓噷鏍规嵁 hidePrintLabels 鐨勫�煎喅瀹氭槸鍚﹂殣钘� printLabel 鍜� printLabel2
     if (hidePrintLabels == 'true') {
-      return button.code !== 'printLabel' && button.code !== 'printLabel2' && button.code !== 'customLabel';
+      return button.code !== 'printLabel' && button.code !== 'printLabel2' ;
     } else {
       return true && button.code !== 'printLike'; // 鏄剧ず璇ユ寜閽�
     }
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
index b0fad29..8e65a26 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
@@ -52,20 +52,25 @@
 let column = [1,3,8]
 //鐐瑰嚮鏌ヨ
 const getWorkOrder = () => {
-  request.post(`/report/processCardProgress/${form.orderId}`,column).then((res) => {
+  request.post(`/report/processCardProgress/${form.orderId}`, column).then((res) => {
     if (res.code == 200) {
-      if(res.data.data.length===0){
+      if (res.data.data.length === 0) {
         ElMessage.warning(t('report.noDataFoundForThisOrder'))
         return
       }
-      //gridOptions.columns = JSON.parse(JSON.stringify(columns))
-      res.data.title.forEach(item =>{
-        let column = {slots: { default: 'quantitySum' }, width: 90,title: item.process}
+      // 鍔ㄦ�佹坊鍔犲垪
+      res.data.title.forEach((item, index) => {
+        let column = {
+          slots: { default: 'quantitySum' },
+          width: 90,
+          title: item.process,
+          field: `dynamicColumn${index}` // 涓哄姩鎬佸垪娣诲姞鍞竴鐨� field
+        }
         gridOptions.columns.push(column)
       })
       res.data.data.forEach(item => {
-        item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity)
-        item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount)
+        item.reportWorkQuantity = JSON.parse(item.reportWorkQuantity)
+        item.reportWorkQuantityCount = JSON.parse(item.reportWorkQuantityCount)
       })
       mergeCells.value = res.data.mergeCell
       xGrid.value.loadData(res.data.data)
@@ -74,6 +79,16 @@
     }
   })
 }
+
+const footSumDynamic = (data, columnTitle) => {
+  let sum = 0;
+  data.forEach(item => {
+    const value = Number(item.reportWorkQuantity[columnTitle]) || 0; // 浠� reportWorkQuantity 涓彁鍙栧�煎苟杞崲涓烘暟瀛�
+    sum += value;
+  });
+  return sum.toFixed(2);
+}
+
 const quantitySum = ( row,column )=>{
   const reportWorkQuantity = row.reportWorkQuantity[column.title] || 0
   const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || 0
@@ -169,24 +184,24 @@
   data:  [
   ],//table body瀹為檯鏁版嵁
   //鑴氶儴姹傚拰
-  footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
-
-    return[
+  footerMethod ({ columns, data }) {
+    return [
       columns.map((column, columnIndex) => {
         if (columnIndex === 0) {
           return t('basicData.total')
         }
-        const List = ["quantity","broken_num","inventory",]
+        const List = ["quantity", "broken_num", "inventory", "inventoryArea"]; // 闈欐�佸垪鐨勬眰鍜�
         if (List.includes(column.field)) {
-          console.log(data)
-          console.log(column.field)
           return footSum(data, column.field)
+        }
+        // 鍔ㄦ�佸垪鐨勬眰鍜�
+        if (column.field && column.field.startsWith('dynamicColumn')) {
+          return footSumDynamic(data, column.title)
         }
         return ''
       })
     ]
-  },
-
+  }
 })
 
 
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue
index da678ad..610e1da 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue
@@ -8,6 +8,7 @@
 import {changeFilterEvent, filterChanged} from "@/hook"
 
 import { useI18n } from 'vue-i18n'
+import footSum from "@/hook/footSum";
 //璇█鑾峰彇
 const { t } = useI18n()
 let router=useRouter()
@@ -58,7 +59,9 @@
       }
       //gridOptions.columns = JSON.parse(JSON.stringify(columns))
       res.data.title.forEach((item, index) => {
-        let column = { slots: { default: 'quantitySum' }, width: 90, title: item.process };
+        let column = { slots: { default: 'quantitySum' }, width: 90, title: item.process,
+          field: `dynamicColumn${index}` // 涓哄姩鎬佸垪娣诲姞鍞竴鐨� field
+        };
         const insertIndex = 5;  // 璁剧疆鎻掑叆浣嶇疆鐨勭储寮�
         gridOptions.columns = [
           ...gridOptions.columns.slice(0, insertIndex + index), // 鍙栨彃鍏ヤ綅缃箣鍓嶇殑閮ㄥ垎
@@ -76,6 +79,15 @@
       ElMessage.warning(res.msg)
     }
   })
+}
+
+const footSumDynamic = (data, columnTitle) => {
+  let sum = 0;
+  data.forEach(item => {
+    const value = Number(item.reportWorkQuantity[columnTitle]) || 0; // 浠� reportWorkQuantity 涓彁鍙栧�煎苟杞崲涓烘暟瀛�
+    sum += value;
+  });
+  return sum.toFixed(2);
 }
 const quantitySum = ( row,column )=>{
   const reportWorkQuantity = row.reportWorkQuantity[column.title] || 0
@@ -157,20 +169,24 @@
   data:  [
   ],//table body瀹為檯鏁版嵁
   //鑴氶儴姹傚拰
-  // footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
-  //   let footList=['7','8','9','10']
-  //   return[
-  //     columns.map((column, columnIndex) => {
-  //       if (columnIndex === 0) {
-  //         return '鍚堣:'
-  //       }
-  //       if (footList.includes(column.field)) {
-  //         return sumNum(data, column.field)
-  //       }
-  //       return ''
-  //     })
-  //   ]
-  // }
+  footerMethod ({ columns, data }) {
+    return [
+      columns.map((column, columnIndex) => {
+        if (columnIndex === 0) {
+          return t('basicData.total')
+        }
+        const List = ["quantity", "inventoryNum", "inventoryArea"]; // 闈欐�佸垪鐨勬眰鍜�
+        if (List.includes(column.field)) {
+          return footSum(data, column.field)
+        }
+        // 鍔ㄦ�佸垪鐨勬眰鍜�
+        if (column.field && column.field.startsWith('dynamicColumn')) {
+          return footSumDynamic(data, column.title)
+        }
+        return ''
+      })
+    ]
+  }
 
 })
 
diff --git a/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue b/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue
index d072897..d1db71d 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue
@@ -13,6 +13,13 @@
 const route = useRoute()
 let produceList = ref([])
 const userStore = useUserInfoStore()
+const props = defineProps({
+  getOrderPage:null
+})
+
+let emit = defineEmits([
+  'getOrderFunction'
+])
 
 
 
@@ -96,7 +103,12 @@
     if(res.code==200 && res.data===true){
       resetForm()
       ElMessage.success(t('basicData.msg.saveSuccess'))
-      router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}})
+      if(!props.getOrderPage){
+        router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}})
+      }else{
+        emit('getOrderFunction')
+      }
+
     }else{
       ElMessage.warning(t('basicData.msg.saveFail'))
     }
@@ -121,41 +133,38 @@
 
 <template>
   <div class="main-div">
-
-    <div class="order-primary" >
       <el-row>
-        <el-col  :span="2"><el-text>{{ $t('customer.customerName') }}:</el-text></el-col>
+        <el-col :span="4"><el-text>{{ $t('customer.customerName') }}:</el-text></el-col>
         <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="ruleForm.customerName"  ></el-input></el-col>
       </el-row>
       <el-row>
-        <el-col  :span="2"><el-text>{{ $t('customer.customerAbbreviation') }}:</el-text></el-col>
+        <el-col  :span="4"><el-text>{{ $t('customer.customerAbbreviation') }}:</el-text></el-col>
         <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="ruleForm.customerAbbreviation"  ></el-input></el-col>
       </el-row>
       <el-row>
-        <el-col  :span="2"><el-text>{{ $t('customer.customerGrade') }}:</el-text></el-col>
+        <el-col  :span="4"><el-text>{{ $t('customer.customerGrade') }}:</el-text></el-col>
         <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="ruleForm.grade"  ></el-input></el-col>
       </el-row>
       <el-row>
-        <el-col  :span="2"><el-text>{{ $t('customer.moneyLimit') }}:</el-text></el-col>
+        <el-col  :span="4"><el-text>{{ $t('customer.moneyLimit') }}:</el-text></el-col>
         <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="ruleForm.moneyLimit"  ></el-input></el-col>
       </el-row>
       <el-row>
-        <el-col  :span="2"><el-text>{{ $t('customer.address') }}:</el-text></el-col>
+        <el-col  :span="4"><el-text>{{ $t('customer.address') }}:</el-text></el-col>
         <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="ruleForm.address"  ></el-input></el-col>
       </el-row>
       <el-row>
-        <el-col  :span="2"><el-text>{{ $t('customer.contacts') }}:</el-text></el-col>
+        <el-col  :span="4"><el-text>{{ $t('customer.contacts') }}:</el-text></el-col>
         <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="ruleForm.contact"  ></el-input></el-col>
       </el-row>
       <el-row>
-        <el-col  :span="2"><el-text>{{ $t('customer.telephone') }}:</el-text></el-col>
+        <el-col  :span="4"><el-text>{{ $t('customer.telephone') }}:</el-text></el-col>
         <el-col  :span="5"><el-input style="font-size: large;color: #181818" v-model="ruleForm.phone"  ></el-input></el-col>
       </el-row>
       <el-row>
-        <el-col  :span="2"><el-button type="primary" @click="submitForm()">{{ $t('basicData.save') }}</el-button></el-col>
-        <el-col  :span="2"><el-button @click="resetForm()">{{ $t('customer.resetting') }}</el-button></el-col>
+        <el-col  :span="4"><el-button type="primary" @click="submitForm()">{{ $t('basicData.save') }}</el-button></el-col>
+        <el-col  :span="4"><el-button @click="resetForm()">{{ $t('customer.resetting') }}</el-button></el-col>
       </el-row>
-    </div>
 
   </div>
 
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 5d82427..839d5e1 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
@@ -8,6 +8,8 @@
 import  useUserInfoStore from '@/stores/userInfo'
 import companyInfo from "@/stores/sd/companyInfo"
 import SelectProduct from "@/views/sd/product/SelectProduct.vue"
+import CreateProduct from "@/views/sd/product/CreateProduct.vue"
+import CreateCustomer from "@/views/sd/customer/CreateCustomer.vue"
 import OrderOtherMoney from "@/components/sd/order/OrderOtherMoney.vue"
 import OrderSizeCheck from "@/components/sd/order/OrderSizeCheck.vue"
 import {changeFilterEvent,filterChanged} from "@/hook"
@@ -734,7 +736,7 @@
 //鍒濆鍖栧垽鏂槸鍚︽湁id浼犲叆
 onMounted(async ()=>{
   gridOptions.loading = true
-  await initOrder()
+  await initOrder(0)
 
   //鍚敤琛ㄦ牸鎷栧姩閫変腑
   addListener(xGrid.value,gridOptions)
@@ -884,47 +886,48 @@
 
 
 //椤甸潰绗竴娆″姞杞芥墽琛�
-const initOrder = async ()=>{
+const initOrder = async (val)=>{
 
   await request.get(`/basicData/orderBasicData`).then((res) => {
     if(res.code==200){
       titleSelectJson.value=deepClone(res.data)
-      //鍏朵粬閲戦
-      otherMoney.value = titleSelectJson.value.orderOtherMoney[0]
-      //let columns = []
-      otherMoney.value.forEach(item => {
-        let column = {
-          field: `otherColumns.${item.column}`,
-          width:100,
-          title: item.alias,
-          editRender: {
-            name: 'input',
+      if(val===0){
+        //鍏朵粬閲戦
+        otherMoney.value = titleSelectJson.value.orderOtherMoney[0]
+        //let columns = []
+        otherMoney.value.forEach(item => {
+          let column = {
+            field: `otherColumns.${item.column}`,
+            width:100,
+            title: item.alias,
+            editRender: {
+              name: 'input',
+            }
           }
-        }
-        //鍒ゆ柇  鍏朵粬鍒楁槸鍚︽槸鏁板瓧
-        if(item.column.indexOf('M')>-1){
-          gridOptions.editRules[`otherColumns.${item.column}`] = [
-            {
-              validator ({ cellValue }) {
-                const regex = /^(0(\.\d{1,3})?|([1-9]\d{0,4})(\.\d{1,3})?|99999(\.9{1,3})?)$/
-                if (cellValue && !regex.test(cellValue)) {
-                  return new Error(t('basicData.msg.range99999Dec3'))
+          //鍒ゆ柇  鍏朵粬鍒楁槸鍚︽槸鏁板瓧
+          if(item.column.indexOf('M')>-1){
+            gridOptions.editRules[`otherColumns.${item.column}`] = [
+              {
+                validator ({ cellValue }) {
+                  const regex = /^(0(\.\d{1,3})?|([1-9]\d{0,4})(\.\d{1,3})?|99999(\.9{1,3})?)$/
+                  if (cellValue && !regex.test(cellValue)) {
+                    return new Error(t('basicData.msg.range99999Dec3'))
+                  }
                 }
               }
-            }
-          ]
-        }else{
-          gridOptions.editRules[`otherColumns.${item.column}`] = [
-            { required: false},
-            { min: 0, max: 255, message: t('basicData.msg.max255') }
-          ]
-        }
+            ]
+          }else{
+            gridOptions.editRules[`otherColumns.${item.column}`] = [
+              { required: false},
+              { min: 0, max: 255, message: t('basicData.msg.max255') }
+            ]
+          }
 
-        //columns.push(column)
-        gridOptions.columns.push(column)
+          //columns.push(column)
+          gridOptions.columns.push(column)
 
-      })
-
+        })
+      }
       //杩涘叆椤甸潰涓嬫媺妗嗚缃粯璁ゅ��
       titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName
       titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].basicName
@@ -1449,6 +1452,27 @@
   xGrid.value.clearSelected()
 }
 
+//鍒囨崲浜у搧鐣岄潰
+const productFlag = ref(true)
+const changeProduct = (val)=>{
+  productFlag.value = val
+}
+const closeProductDialog = ()=>{
+  productFlag.value = true
+}
+//鏀瑰彉浜у搧椤甸潰鍒囨崲
+const changePage = () => {
+  productFlag.value = true
+}
+// 鍒涘缓瀹㈡埛鏄剧ず
+let createCustomerVisible = ref(false)
+
+//鍒涘缓瀹㈡埛鎴愬姛杩斿洖鏂规硶
+const createCustomerSuccess = async () => {
+  await initOrder(1)
+  createCustomerVisible.value = false
+}
+
 </script>
 
 <template>
@@ -1469,6 +1493,11 @@
                        :label="item.id+' '+item.customerName"
                        :value="item.id"
                        />
+            <template #footer>
+              <el-button @click="createCustomerVisible=true"  text bg size="small" >
+                {{$t('basicData.create')}}
+              </el-button>
+            </template>
           </el-select>
         </el-col>
         <el-col  :span="2"><el-text>*{{$t('order.orderType')}}锛�</el-text></el-col>
@@ -1625,8 +1654,23 @@
           :autosize="{ minRows: 2, maxRows: 20 }"
       />
     </el-dialog>
-    <el-dialog id="product" v-model="productVisible"  style="width: 80%;height:75% ">
-      <select-product :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 100%;height: 100%" />
+    <el-dialog id="product"
+               class="product1"
+               v-model="productVisible"
+               @closed="closeProductDialog"
+               :destroy-on-close="true"
+               style="width: 80%;height:75%; ">
+      <template #header >
+        <div class="my-header">
+        <el-button @click="changeProduct(true)">{{$t('basicData.search')}}</el-button>
+        <el-button @click="changeProduct(false)">{{$t('basicData.create')}}</el-button>
+        </div>
+      </template>
+      <select-product v-if="productFlag" :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 100%;height: 100%" />
+      <create-product v-else
+                      :productFlag="productFlag"
+                      @changePage="changePage"
+                      style="text-align: left;background-color: #D5EAFF;"/>
     </el-dialog>
 <!--璇樊缁撶畻-->
     <el-dialog v-model="errorAreaVisible"  style="width: 300px;height:150px ">
@@ -1678,7 +1722,18 @@
           @getParent="gaveOrderSizeCheck"
           :orderId="titleUploadData.orderId"
           :OrderDetail="xGrid"/>
+<!--      <create-customer/>-->
     </el-dialog>
+    <!--    瀹㈡埛鍒涘缓绐楀彛-->
+    <el-dialog
+        id="createCustomer"
+        :title="$t('customer.page.createCustomer')"
+        v-model="createCustomerVisible"
+        style="width: 700px;height:445px;text-align: left "
+    >
+      <create-customer :getOrderPage="'order'" @getOrderFunction="createCustomerSuccess" />
+    </el-dialog>
+
 
   </div>
 </template>
@@ -1692,7 +1747,7 @@
   .el-col{
     border: #181818 1px solid;
   }
-  :deep(.el-input__wrapper) {
+  :deep(.order-primary .el-input__wrapper) {
     box-shadow: 0 0 0 0 var(--el-input-border-color, var(--el-border-color)) inset;
     cursor: default;
     border: none !important;
@@ -1718,9 +1773,13 @@
     width: 100%;
   }
 
-  :deep(#sizeCheck .el-dialog__body){
+  :deep(#sizeCheck .el-dialog__body,#createCustomer .el-dialog__body){
     height: 90%;
     width: 100%;
   }
-
+  .my-header {
+    display: flex;
+    /*flex-direction : row;
+    justify-content: space-between;*/
+  }
 </style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue b/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
index 8ef1bcc..2b846b6 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -14,6 +14,14 @@
 const router = useRouter()
 const route = useRoute()
 let  userInfo = useUserInfo()
+let props = defineProps({
+  productFlag:null
+})
+
+let emit = defineEmits([
+  'getProductRow'
+])
+
 const disposeList = $ref([
   t('product.coloredGlaze'),
   t('product.frostedSand'),
@@ -162,10 +170,17 @@
 }
 
 const  saveProducts=(product)=>{
+  if(props.productFlag===false){
+    product.title.state = 1
+  }
   request.post(`/product/saveProduct`,product).then((res) =>{
     if(res.code==200){
       ElMessage.success(t('product.msg.saveSuccess'))
-      router.push("/main/product/selectProduct")
+      if(props.productFlag===false){
+        emit('changePage')
+      }else{
+        router.push("/main/product/selectProduct")
+      }
     }
   })
 }
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
index 518f415..e34694f 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
@@ -280,7 +280,7 @@
 }
 
 let emit = defineEmits([
-    'getProductRow'
+    'changePage'
 ])
 
 const emitParent = (row,type) => {
@@ -310,7 +310,12 @@
 onUnmounted(() => {
   clearTimeout(initTime)
   if (sortable2) {
-    sortable2.destroy()
+    try{
+      sortable2.destroy()
+    }
+    catch (e){
+    }
+
   }
 })
 
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
index 27758bd..9c108f4 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
@@ -6,8 +6,6 @@
 import com.example.erp.service.sd.ProductService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.ibatis.annotations.Delete;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -27,7 +25,10 @@
     @ApiOperation("浜у搧鏌ヨ鎺ュ彛")
     @SaCheckPermission("selectProduct.search")
     @PostMapping  ("/{pageNum}/{pageSize}/{glassType}")
-    public Result defaultDateProduct(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> glassType, @RequestBody Product product){
+    public Result defaultDateProduct(@PathVariable Integer pageNum,
+                                     @PathVariable Integer pageSize,
+                                     @PathVariable List<String> glassType,
+                                     @RequestBody Product product){
         return Result.seccess(productService.defaultDateProduct(pageNum,pageSize,glassType,product));
     }
     @ApiOperation("鍏朵粬绯荤粺鑾峰彇浜у搧鏌ヨ鎺ュ彛")
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java
index 6ab5949..8b5f4b1 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java
@@ -7,7 +7,6 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.example.erp.common.Constants;
-import com.example.erp.entity.sd.Order;
 import com.example.erp.entity.sd.Product;
 import com.example.erp.entity.sd.ProductDetail;
 import com.example.erp.exception.ServiceException;
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 758a84a..0697cf3 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -710,7 +710,7 @@
                fc.quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,
-               if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),od.bend_radius) as bend_radius,
+               if(od.bend_radius!=null,od.bend_radius,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04'))) as bend_radius,
                concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
                od.other_columns,
                round(ogd.child_width)                                         as width,
@@ -1307,7 +1307,7 @@
                fc.quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,
-               if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),od.bend_radius) as bend_radius,
+               if(od.bend_radius!=null,od.bend_radius,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04'))) as bend_radius,
                concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
                od.other_columns,
                round(ogd.child_width)                                         as width,
@@ -1414,7 +1414,7 @@
                sum(pl.patch_num)                                                 as quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,
-               if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),od.bend_radius) as bend_radius,
+               if(od.bend_radius!=null,od.bend_radius,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04'))) as bend_radius,
                concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
                od.other_columns,
                round(ogd.child_width)                                         as width,

--
Gitblit v1.8.0