From c3e3920e4e7fcda3dd986c00bb80188381e93015 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 18 四月 2024 09:59:50 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/a1536384743/erp_-override
---
north-glass-erp/northglass-erp/src/router/index.js | 10
north-glass-erp/target/classes/mapper/sd/Delivery.xml | 14
north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue | 19
north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue | 2
north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java | 6
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java | 6
north-glass-erp/src/main/resources/mapper/sd/Customer.xml | 156 ++++++
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue | 10
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue | 4
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml | 53 ++
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue | 24
north-glass-erp/northglass-erp/src/views/sd/customer/CreateCustomer.vue | 2
north-glass-erp/src/main/resources/mapper/sd/Delivery.xml | 14
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java | 5
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java | 8
north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java | 5
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java | 2
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java | 4
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue | 62 ++
north-glass-erp/target/classes/mapper/sd/Customer.xml | 156 ++++++
north-glass-erp/target/classes/mapper/sd/OrderDetail.xml | 18
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java | 10
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java | 2
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue | 14
north-glass-erp/pom.xml | 58 +-
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java | 23 +
north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml | 18
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue | 224 +++++++++
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomerOrder.vue | 345 +++++++++++++++
north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java | 24 +
north-glass-erp/src/main/java/com/example/erp/tools/DownExcel.java | 17
north-glass-erp/src/main/java/com/example/erp/mapper/sd/CustomerMapper.java | 8
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml | 53 ++
33 files changed, 1,330 insertions(+), 46 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/router/index.js b/north-glass-erp/northglass-erp/src/router/index.js
index 2c3fd7a..95ded16 100644
--- a/north-glass-erp/northglass-erp/src/router/index.js
+++ b/north-glass-erp/northglass-erp/src/router/index.js
@@ -132,6 +132,11 @@
name: 'createDelivery',
component: () => import('../views/sd/delivery/CreateDelivery.vue'),
},
+ {
+ path: 'deliveryPrinting',
+ name: 'deliveryPrinting',
+ component: () => import('../views/sd/delivery/DeliveryPrinting.vue'),
+ },
{
@@ -192,6 +197,11 @@
path: 'createCustomer',
name: 'createCustomer',
component: () => import('../views/sd/customer/CreateCustomer.vue'),
+ },
+ {
+ path: 'selectCustomerOrder',
+ name: 'selectCustomerOrder',
+ component: () => import('../views/sd/customer/SelectCustomerOrder.vue'),
}
]
},
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
index 7152658..3fedbf0 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
@@ -84,13 +84,25 @@
})
productName+="}"
- let materialStore={
- id:ruleForm.value.id,
- type:value.value,
- json:productName,
- width:BasicData.value[0].Type,
- height:BasicData.value[1].Type
+ let materialStore
+
+ if(value.value==='鍘熺墖'){
+ materialStore={
+ id:ruleForm.value.id,
+ type:value.value,
+ json:productName,
+ width:BasicData.value[0].Type,
+ height:BasicData.value[1].Type
+ }
+ }else if(value.value==='杈呮枡'){
+ materialStore={
+ id:ruleForm.value.id,
+ type:value.value,
+ json:productName,
+ }
}
+
+
console.log(materialStore)
if(isBool){
request.post("/MaterialStore/saveMaterialStore", materialStore).then((res) => {
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
index 50905c9..bf8f54e 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
@@ -6,6 +6,10 @@
import {computed, onMounted, reactive, ref} from "vue"
import {useRoute, useRouter} from "vue-router"
import {changeFilterEvent,filterChanged} from "@/hook"
+import { useI18n } from 'vue-i18n'
+
+//璇█鑾峰彇
+const { t } = useI18n()
const router = useRouter()
const route = useRoute()
@@ -323,7 +327,11 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<template #button_slot="{ row }">
<el-button @click="getTableRow(row,'edit')" link type="primary" size="small">缂栬緫</el-button>
- <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button>
+ <el-popconfirm @confirm="getTableRow(row,'delete')" title="纭畾鍒犻櫎?">
+ <template #reference>
+ <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
+ </template>
+ </el-popconfirm>
</template>
<!-- 涓嬫媺璇︽儏寰幆鏄剧ず涓枃 -->
<template #num1_filter="{ column, $panel }">
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
index c868542..ea405e3 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
@@ -734,9 +734,9 @@
</el-select>
</el-row>
</div>
- <div class="main-div-customers">
+ <div class="main-div-customers" style="height: 350px">
<vxe-grid
- height="400px"
+ height="100%"
class="mytable-scrollbar"
ref="xGrids"
v-bind="gridOption"
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 bebd527..888d6d8 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
@@ -151,7 +151,7 @@
// }],
// import: false,
// export: true,
- // print: true,
+ print: true,
zoom: true,
custom: true
},
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 e2dce98..8b6da70 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
@@ -123,7 +123,7 @@
<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.creditLimit') }}:</el-text></el-col>
+ <el-col :span="2"><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>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
index 412c5d7..fcd265c 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
@@ -24,6 +24,11 @@
router.push({path: '/main/customer/CreateCustomer', query: { id: row.id }})
break
}
+ case 'customerOrder' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/customer/selectCustomerOrder', query: { id: row.id }})
+ break
+ }
case 'delete':{
let ruleForm = ref({
id:0,
@@ -189,7 +194,7 @@
columns:[
{type:'expand',fixed:"left",slots: { content:'content' },width: 60},
{type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 },
- {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left"},
+ {title: t('basicData.operate'), width: 180, slots: { default: 'button_slot' },fixed:"left"},
{field: 'id', title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
{field: 'customerName', title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
{field: 'grade', title: t('customer.customerGrade'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
@@ -250,7 +255,12 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<template #button_slot="{ row }">
<el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>
- <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button>
+ <el-button @click="getTableRow(row,'customerOrder')" link type="primary" size="small">瀹㈡埛璁㈠崟</el-button>
+ <el-popconfirm @confirm="getTableRow(row,'delete')" title="纭畾鍒犻櫎?">
+ <template #reference>
+ <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
+ </template>
+ </el-popconfirm>
</template>
<template #num1_filter="{ column, $panel }">
diff --git a/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomerOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomerOrder.vue
new file mode 100644
index 0000000..e69429c
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomerOrder.vue
@@ -0,0 +1,345 @@
+<script setup>
+import {Search} from "@element-plus/icons-vue"
+import {useRoute, useRouter} from "vue-router"
+import {onMounted, reactive, ref} from "vue";
+import request from "@/utils/request"
+import deepClone from "@/utils/deepClone"
+import VXETable from "vxe-table";
+import useUserInfoStore from "@/stores/userInfo";
+import {ElMessage} from "element-plus";
+import { useI18n } from 'vue-i18n'
+
+//璇█鑾峰彇
+const { t } = useI18n()
+const router = useRouter()
+const route = useRoute()
+const userStore = useUserInfoStore()
+const username = userStore.user.userName
+const userid = userStore.user.userId
+let produceList = ref([])
+
+const getTableRow = (row,type) =>{
+ switch (type) {
+
+ }
+}
+
+
+const hasDecimal=(value)=>{
+ const regex=/\./ // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
+ return regex.test(value) //杩斿洖true/false
+}
+
+const hasDecimalhtml=(item,row)=>{
+ let aa=item.split('.').length
+ if (aa===2){
+ return row[item.split('.')[0]][item.split('.')[1]]
+ }else if(aa===3){
+ return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]]
+ }
+
+
+}
+
+//绛涢�夋潯浠讹紝鏈夊閿渶瑕佸厛瀹氫箟鏄庣粏閲岄潰鐨勬暟鎹�
+let filterData = ref({
+ order:{
+ customerId:''
+ }
+
+
+})
+let selectDate = ref(["",""])
+
+let pageNum=ref(1)
+let total = reactive({
+ pageTotal : 0,
+ dataTotal : 0,
+ pageSize : 100
+})
+
+
+onMounted(()=>{
+
+ //鑾峰彇浼犺繃鏉ョ殑鏁版嵁杩涜鍒ゆ柇
+ const str = route.query.id
+ if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){
+ filterData.value.order.customerId = Number(str)
+
+ request.post(`/customer/getSelectCustomerOderDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
+ if(res.code==200){
+ console.log(res.data.data)
+ total.dataTotal = res.data.total.total*1
+ total.pageTotal= res.data.total.pageTotal
+ selectDate.value = res.data.selectDate
+ pageNum.value=1
+ produceList = deepClone(res.data.data)
+ xGrid.value.loadData(produceList)
+ gridOptions.loading=false
+
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+ }
+
+
+})
+
+
+
+
+const changeFilterEvent = (event, option, $panel,) => {
+ // 鎵嬪姩瑙﹀彂绛涢��
+ $panel.changeOption(event, !!option.data, option)
+}
+function filterChanged(column){
+ gridOptions.loading=true
+ //绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
+ let value = column.datas[0]!=undefined?column.datas[0]:''
+ value = value.trim()
+ //鍒ゆ柇鏄惁瀛樺湪澶栭敭
+ if (column.property.indexOf('.')>-1){
+ const columnArr = column.property.split('.')
+ filterData.value[columnArr[0]] = {
+ [columnArr[1]]:value
+ }
+ }else{
+ filterData.value[column.property] = value
+ }
+ request.post(`/customer/getSelectCustomerOderDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
+
+ if(res.code==200){
+ total.dataTotal = res.data.total.total*1
+ total.pageTotal= res.data.total.pageTotal
+ selectDate.value = res.data.selectDate
+ pageNum.value=1
+ produceList = deepClone(res.data.data)
+ xGrid.value.loadData(produceList)
+ gridOptions.loading=false
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+}
+
+const selectOrderList = ()=>{
+ request.post(`/customer/getSelectCustomerOderDate/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
+
+ if(res.code==200){
+ if (res.data.total!=null){
+ total.dataTotal = res.data.total.total*1
+ total.pageTotal= res.data.total.pageTotal
+ }
+ produceList = deepClone(res.data.data)
+ xGrid.value.loadData(produceList)
+ gridOptions.loading=false
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+}
+
+const changeDate = ()=>{
+ pageNum.value=1
+ selectOrderList()
+}
+
+//椤佃剼璺宠浆
+const handlePageChange = ({ currentPage, pageSize }) => {
+ total.pageTotal = pageSize
+ pageNum.value=currentPage
+
+ selectOrderList()
+}
+
+
+const xGrid = ref()
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ showFooter: true,//鏄剧ず鑴�
+ printConfig: {},
+ importConfig: {},
+ exportConfig: {},
+ scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔�
+ showOverflow:true,
+ columnConfig: {
+ resizable: true,
+ useKey: true
+ },
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
+ },
+ customConfig: {
+ storage: true
+ },
+ editConfig: {
+ trigger: 'click',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ columns:[
+
+ {type:'expand',slots: { content:'content' },width: 60,fixed:"left"},
+ {type: 'seq', title: t('basicData.Number'), width: 80 ,fixed:"left"},
+
+ {field: 'orderId',width:120, title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'order.customerId',width:120, title: t('customer.customerNumber')},
+ {field: 'order.customerName',width:120, title: t('customer.customerName')},
+ {field: 'quantity',width:120, title: t('order.quantity')},
+ {field: 'productId',width:120, title: "浜у搧缂栧彿",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'productName',width:120, title: "浜у搧鍚嶇О",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'shape',width:120, title: "褰㈢姸",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'width',width:120, title: "瀹藉害",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'height',width:120, title: "楂樺害",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'order.project',width:120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'order.batch',width:120, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'order.money',width:120, title: "璁㈠崟閲戦",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'area',width:120, title: t('productStock.totalArea')},
+ {field: 'order.orderType',width:120, title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'order.salesman',width:120, title:t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: 'order.createTime',width:120, title:"鍒涘缓鏃堕棿"},
+
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ ],
+ /*import: false,
+ export: true,
+ print: true,*/
+ zoom: true,
+ custom: true
+ },
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ let footList = ['quantity','area']
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return t('basicData.total')
+ }
+ if (footList.includes(column.field)) {
+ return sumNum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+
+})
+
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+const gridEvents = {
+ toolbarButtonClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+
+ }
+ }
+ }
+}
+
+//鏁扮粍鏁版嵁楠岄噸
+function isAllEqual(array){
+ if(array.length>0){
+ return !array.some(function(value,index){
+ return value !== array[0];
+ });
+ }else{
+ return true;
+ }
+}
+
+
+
+
+</script>
+
+<template>
+ <div style="width: 100%;height: 100%">
+ <el-date-picker
+ v-model="selectDate"
+ type="daterange"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ format="YYYY-MM-DD"
+ value-format="YYYY-MM-DD"
+
+ />
+ <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button>
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ @filter-change="filterChanged"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+
+ >
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <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 #state="{ row,column}">
+ <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/>
+ </template>
+
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>
+ <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button>
+ </template>
+
+ <template #num1_filter="{ column, $panel }">
+ <div>
+ <div v-for="(option, index) in column.filters" :key="index">
+ <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
+ </div>
+ </div>
+ </template>
+
+ <template #pager>
+ <!--浣跨敤 pager 鎻掓Ы-->
+ <vxe-pager
+ @page-change="handlePageChange"
+ :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']"
+ v-model:current-page="pageNum"
+ v-model:page-size="total.pageSize"
+ v-model:pager-count="total.pageTotal"
+ :total="total.dataTotal"
+ >
+ </vxe-pager>
+ </template>
+ </vxe-grid>
+
+
+ </div>
+</template>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue
new file mode 100644
index 0000000..4896f10
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue
@@ -0,0 +1,224 @@
+<script setup>
+import request from "@/utils/request"
+import {ElDatePicker, ElMessage} from "element-plus"
+import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
+import {Search} from "@element-plus/icons-vue"
+import {useRouter} from 'vue-router'
+import {changeFilterEvent, filterChanged} from "@/hook"
+
+import { useI18n } from 'vue-i18n'
+import deepClone from "@/utils/deepClone";
+//璇█鑾峰彇
+const { t } = useI18n()
+let router=useRouter()
+let produceList = ref([])
+let delivery = ref([])
+
+let props = defineProps({
+ deliveryId:null
+})
+
+const form = ref({
+})
+
+onMounted(()=>{
+ console.log(props.deliveryId)
+ if(props.deliveryId===null || props.deliveryId===undefined || props.deliveryId===''){
+ return
+ }
+ form.value.deliveryId = props.deliveryId
+ request.post(`/Delivery/getSelectDeliveryPrinting`,form.value).then((res) => {
+ if(res.code==200){
+ produceList = deepClone(res.data.data)
+ delivery=deepClone(res.data.delivery)
+ console.log(produceList)
+ console.log(delivery)
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+
+})
+
+
+
+</script>
+
+<template>
+ <div style="width: 100%;height: 100%">
+ <div style="font-size: 30px;text-align: center">甯稿窞甯傚悏鍒╃幓鐠冩湁闄愬叕鍙�</div>
+ <el-row :gutter="20">
+ <el-col :span="6"><div></div></el-col>
+ <el-col :span="12"><div style="font-size: 25px;text-align: center">閿�鍞彂璐у崟</div></el-col>
+ <el-col :span="6">
+ <div style="font-size: 20px;text-align: center;display: flex">
+ <div>鍙戣揣鍗曞彿锛�</div>
+ <div>{{delivery.deliveryId}}</div>
+ </div>
+ </el-col>
+ </el-row>
+ <div style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%">
+ <table id="day-in" style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%">
+ <tr>
+ <th>搴忓彿</th>
+ <th>妤煎眰缂栧彿</th>
+ <th>瀹�(寮у害)*楂�</th>
+ <th>鏁伴噺</th>
+ <th>闈㈢Н</th>
+ <th>鍗曚环</th>
+ <th>閲戦</th>
+ <th>鍔犲伐瑕佹眰</th>
+ </tr>
+
+ <template v-for="(item, index) in produceList" :key="index" >
+ <tr>
+ <td colspan="3">浜у搧鍚嶇О:{{item.DeliveryDetail.orderDetail.productName}}</td>
+ <td colspan="3">瀵规柟鍗曞彿:</td>
+ <td colspan="2">璁㈠崟缂栧彿:{{item.DeliveryDetail.orderDetail.orderId}}</td>
+ </tr>
+
+ <tr v-for="(items, index1) in item.DeliveryDetailList" :key="index1">
+ <td>{{items.order_number}}</td>
+ <td>{{items.buildingNumber}}</td>
+ <td>{{items.width}}x{{items.height}}</td>
+ <td>{{items.quantity}}</td>
+ <td>{{items.area}}</td>
+ <td>{{items.price}}</td>
+ <td>{{items.money}}</td>
+ <td>{{items.processingNote}}</td>
+ </tr>
+ <tr>
+ <td colspan="3">灏忚:</td>
+ <td>{{item.DeliveryDetail.quantity}}</td>
+ <td>{{item.DeliveryDetail.area}}</td>
+ <td></td>
+ <td>{{item.DeliveryDetail.money}}</td>
+ <td></td>
+ </tr>
+
+ </template>
+ <tr>
+ <td colspan="3">鍚堣:</td>
+ <td>{{delivery.quantity}}</td>
+ <td>{{delivery.area}}</td>
+ <td></td>
+ <td>{{delivery.money}}</td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+<!-- <div style="border: 1px solid #d3dce6;border-collapse: collapse;">-->
+<!-- <el-row :gutter="20" >-->
+
+<!-- <el-col :span="9">-->
+<!-- <div style="font-size: 20px;display: flex">-->
+<!-- <div>瀹㈡埛鍚嶇О锛�</div>-->
+<!-- <div>甯稿窞甯傞噾瀹濈煶闂ㄧ獥鏈夐檺鍏徃</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="9">-->
+<!-- <div style="font-size: 20px;display: flex">-->
+<!-- <div>椤圭洰鍚嶇О锛�</div>-->
+<!-- <div>鍏洯閬�</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="6">-->
+<!-- <div style="font-size: 20px;display: flex">-->
+<!-- <div>鑱旂郴浜猴細</div>-->
+<!-- <div></div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+
+<!-- <el-row :gutter="20" >-->
+<!-- <el-col :span="18">-->
+<!-- <div style="font-size: 20px;display: flex">-->
+<!-- <div>閫佽揣鍦板潃锛�</div>-->
+<!-- <div></div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="6">-->
+<!-- <div style="font-size: 20px;display: flex">-->
+<!-- <div>鑱旂郴鐢佃瘽锛�</div>-->
+<!-- <div></div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+<!-- </div>-->
+
+<!-- <div style="border: 1px solid #d3dce6;border-collapse: collapse;">-->
+<!-- <el-row :gutter="20" >-->
+
+<!-- <el-col :span="2">-->
+<!-- <div class="alias">-->
+<!-- <div>搴忓彿</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="5">-->
+<!-- <div class="alias">-->
+<!-- <div>妤煎眰缂栧彿</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="5">-->
+<!-- <div class="alias">-->
+<!-- <div>瀹�(寮ч暱)*楂�</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="2">-->
+<!-- <div class="alias">-->
+<!-- <div>鏁伴噺</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="2">-->
+<!-- <div class="alias">-->
+<!-- <div>闈㈢Н</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="2">-->
+<!-- <div class="alias">-->
+<!-- <div>鍗曚环</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="2">-->
+<!-- <div class="alias" >-->
+<!-- <div>閲戦</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- <el-col :span="4">-->
+<!-- <div class="alias" >-->
+<!-- <div>鍔犲伐瑕佹眰</div>-->
+<!-- </div>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+
+
+<!-- </div>-->
+
+
+ </div>
+
+
+</template>
+
+<style >
+.el-row {
+ margin-bottom: 10px;
+}
+.el-row:last-child {
+ margin-bottom: 0;
+}
+.el-col {
+ border-radius: 4px;
+}
+
+.grid-content {
+ border-radius: 4px;
+ min-height: 36px;
+}
+.alias{
+ text-align: center;
+ font-size: 20px;
+}
+
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
index 086149f..6d21a00 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -8,6 +8,7 @@
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import { useI18n } from 'vue-i18n'
+import DeliveryPrinting from "@/views/sd/delivery/DeliveryPrinting.vue";
//璇█鑾峰彇
const { t } = useI18n()
@@ -15,11 +16,18 @@
const userStore = useUserInfoStore()
const username = userStore.user.userName
const userid = userStore.user.userId
+const dialogTableVisible = ref(false)
+let rowClickIndex = ref(null)
let produceList = ref([])
const getTableRow = (row,type) =>{
switch (type) {
case 'edit' :{
router.push({path: '/main/delivery/createDelivery', query: { deliveryID: row.deliveryId }})
+ break
+ }
+ case 'printing' :{
+ const url = router.resolve({path: '/main/delivery/deliveryPrinting', query: { deliveryID: row.deliveryId }})
+ window.open(url.href, '_blank')
break
}
case 'delete':{
@@ -162,6 +170,29 @@
selectOrderList()
}
+const gridEvents = {
+
+ menuClick ({ menu, row, column }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (menu.code) {
+ case 'getProcessList': {
+ if(rowClickIndex.value===null){
+ ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+ return
+ }
+ dialogTableVisible.value = true
+ break
+ }
+
+ }
+ }
+ },
+ cellClick({ row }){
+ rowClickIndex.value = row
+ }
+}
+
const gridOptions = reactive({
border: "full",//琛ㄦ牸鍔犺竟妗�
keepSource: true,//淇濇寔婧愭暟鎹�
@@ -189,10 +220,20 @@
trigger: 'click',
mode: 'row',
showStatus: true
- },//琛ㄥご鍙傛暟
+ },
+ menuConfig: {
+ body: {
+ options: [
+ [
+ { code: 'getProcessList', name: "鎵撳嵃", prefixIcon: 'vxe-icon-file-txt', visible: true}
+ ]
+ ]
+ }
+ },
+ //琛ㄥご鍙傛暟
columns:[
{type:'expand',slots: { content:'content' },width: 60},
- {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' }},
+ {title: t('basicData.operate'), width: 150, slots: { default: 'button_slot' }},
{type: 'seq', title: t('basicData.Number'), width: 80 },
{field: 'deliveryState',title: t('basicData.review'), width: 40, slots: { default: 'state' }},
@@ -258,6 +299,7 @@
class="mytable-scrollbar"
ref="xGrid"
v-bind="gridOptions"
+ v-on="gridEvents"
>
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -280,7 +322,12 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<template #button_slot="{ row }">
<el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>
- <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button>
+ <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">鎵撳嵃</el-button>
+ <el-popconfirm @confirm="getTableRow(row,'delete')" title="纭畾鍒犻櫎?">
+ <template #reference>
+ <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
+ </template>
+ </el-popconfirm>
</template>
<template #num1_filter="{ column, $panel }">
@@ -304,6 +351,15 @@
</vxe-pager>
</template>
</vxe-grid>
+
+ <el-dialog
+ v-model="dialogTableVisible"
+ destroy-on-close
+ style="width: 75%;height:70% ">
+ <DeliveryPrinting
+ :deliveryId="rowClickIndex.deliveryId"
+ style="width: 100%;height: 100%" />
+ </el-dialog>
</div>
</template>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue b/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
index 29868c6..e37d5b3 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
@@ -1,7 +1,7 @@
<script setup>
import BasicTable from "@/components/BasicTable.vue"
import { ref} from "vue"
-
+import request from "@/utils/request"
const childrenData = ref({
columns:[
{type:'expand',fixed:"left",width: 80,slots: { content:'content' }},
@@ -48,6 +48,23 @@
footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount']
})
+request.post('/order/exportOrderReport',null,{responseType :'blob'}).then(res => {
+ const blob = new Blob([res])
+ // console.log(blob)
+ // if ('download' in document.createElement('a')) { // 闈濱E涓嬭浇
+ // const elink = document.createElement('a')
+ // elink.download = 'a.xlsx'
+ // elink.style.display = 'none'
+ // elink.href = URL.createObjectURL(blob)
+ // document.body.appendChild(elink)
+ // elink.click()
+ // URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
+ // document.body.removeChild(elink)
+ // } else { // IE10+涓嬭浇
+ // navigator.msSaveBlob(blob, fileName)
+ // }
+
+ })
</script>
<template>
diff --git a/north-glass-erp/pom.xml b/north-glass-erp/pom.xml
index 5027113..6fe1a8b 100644
--- a/north-glass-erp/pom.xml
+++ b/north-glass-erp/pom.xml
@@ -131,6 +131,12 @@
<version>4.3.5.Final</version>
</dependency>
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>easyexcel</artifactId>
+ <version>3.2.1</version>
+ </dependency>
+
</dependencies>
@@ -152,31 +158,31 @@
</build>
- <!--<repositories>
- <repository>
- <id>nexus-aliyun</id>
- <name>nexus-aliyun</name>
- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
+<!-- <repositories>-->
+<!-- <repository>-->
+<!-- <id>nexus-aliyun</id>-->
+<!-- <name>nexus-aliyun</name>-->
+<!-- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>-->
+<!-- <releases>-->
+<!-- <enabled>true</enabled>-->
+<!-- </releases>-->
+<!-- <snapshots>-->
+<!-- <enabled>false</enabled>-->
+<!-- </snapshots>-->
+<!-- </repository>-->
+<!-- </repositories>-->
- <pluginRepositories>
- <pluginRepository>
- <id>public</id>
- <name>aliyun nexus</name>
- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>-->
+<!-- <pluginRepositories>-->
+<!-- <pluginRepository>-->
+<!-- <id>public</id>-->
+<!-- <name>aliyun nexus</name>-->
+<!-- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>-->
+<!-- <releases>-->
+<!-- <enabled>true</enabled>-->
+<!-- </releases>-->
+<!-- <snapshots>-->
+<!-- <enabled>false</enabled>-->
+<!-- </snapshots>-->
+<!-- </pluginRepository>-->
+<!-- </pluginRepositories>-->
</project>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java
index dd6c85d..8c49ace 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java
@@ -59,6 +59,12 @@
}
}
+ @ApiOperation("瀹㈡埛璁㈠崟鏌ヨ鎺ュ彛")
+ @PostMapping("/getSelectCustomerOderDate/{pageNum}/{pageSize}/{selectDate}")
+ public Result getSelectCustomerOderDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody OrderDetail orderDetail){
+ return Result.seccess(customerService.getSelectCustomerOderDate(pageNum,pageSize,selectDate,orderDetail));
+ }
+
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
index 4f1645d..a653efd 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
@@ -95,6 +95,12 @@
}
}
+ @ApiOperation("鍙戣揣璁㈠崟鏌ヨ鎺ュ彛")
+ @PostMapping("/getSelectDeliveryPrinting")
+ public Result getSelectDeliveryPrinting( @RequestBody DeliveryDetail deliveryDetail){
+ return Result.seccess(deliveryService.getSelectDeliveryPrinting(deliveryDetail));
+ }
+
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
index 23f9db5..ebb3696 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
@@ -7,11 +7,14 @@
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.sd.OrderService;
+import com.example.erp.tools.DownExcel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
@@ -90,4 +93,9 @@
return Result.seccess(orderService.getOrderReport(pageNum,pageSize,selectDate,orderDetail));
}
+ @ApiOperation("璁㈠崟鎶ヨ〃瀵煎嚭")
+ @PostMapping("/exportOrderReport")
+ public void exportOrderReport(HttpServletResponse response) throws IOException, IllegalAccessException, InstantiationException {
+ DownExcel.download(response,Order.class, orderService.exportOrderReport(),"orderReport");
+ }
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java b/north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java
index 47637b8..0a27f16 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java
@@ -1,5 +1,6 @@
package com.example.erp.entity.sd;
+import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -13,9 +14,11 @@
@TableName("sd.`order`")
public class Order {
@TableId(type = IdType.AUTO)
-
+ @ExcelProperty("id")
private Long id;
+ @ExcelProperty("璁㈠崟缂栧彿")
private String orderId;
+ @ExcelProperty("椤圭洰鍚嶇О")
private String project;
private Integer customerId;
private String customerName;
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/CustomerMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/CustomerMapper.java
index d286f2c..86622ca 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/CustomerMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/CustomerMapper.java
@@ -2,6 +2,8 @@
import com.example.erp.entity.sd.Customer;
import com.example.erp.entity.sd.Delivery;
+import com.example.erp.entity.sd.DeliveryDetail;
+import com.example.erp.entity.sd.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.repository.CrudRepository;
@@ -25,4 +27,10 @@
Boolean updateCustomer(@Param("customer") Customer customer);
Boolean deleteCustomer(@Param("customer") Customer customer);
+
+ List<OrderDetail> getSelectCustomerOderDate(@Param("offset") Integer offset,
+ @Param("pageSize") Integer pageSize, String startDate, String endDate,
+ @Param("orderDetail") OrderDetail orderDetail);
+
+ Map<String,Integer> getSelectCustomerOderDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate, OrderDetail orderDetail);
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java
index bae21c0..d66aa05 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java
@@ -22,6 +22,11 @@
Integer getSelectShippingOrderDetailPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail);
+ List<DeliveryDetail> getSelectDeliveryPrinting(@Param("deliveryDetail") DeliveryDetail deliveryDetail);
+
+ List <Map<String, Object>> getSelectDeliveryDetailPrinting(@Param("deliveryId") String deliveryId,
+ @Param("productId") Integer productId,@Param("orderId") String orderId);
+
List<DeliveryDetail> getSelectDeliveryDetailReport(@Param("offset") Integer offset,
@Param("pageSize") Integer pageSize,String startDate, String endDate,
@Param("deliveryDetail") DeliveryDetail deliveryDetail);
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
index 7c30f76..a79c0fb 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
@@ -23,6 +23,8 @@
@Param("pageSize") Integer pageSize,
@Param("orderDetail") OrderDetail orderDetail);
+ Delivery getSelectShippingOrderDetailDeliveryPrinting(@Param("deliveryDetail") DeliveryDetail deliveryDetail);
+
Order getSelectShippingOrderDetailDeliverys(@Param("offset") Integer offset,
@Param("pageSize") Integer pageSize,
@Param("orderDetail") OrderDetail orderDetail);
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java
index b0afeb4..ae18ea6 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java
@@ -18,4 +18,6 @@
List<OrderDetail> getOrderReport(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail);
Map<String,Integer> getOrderReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail);
+
+ List<Order> exportOrderReport();
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
index 1290530..38df1b3 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -109,8 +109,14 @@
finishedGoodsInventoryMapper.updateflowcard(flowCard);
//淇敼璁㈠崟鏄庣粏琛ㄥ叆搴撴暟閲�
finishedGoodsInventoryMapper.updateIntOrderNumberConut(flowCard.getOrder().getOrderId(),flowCard.getOrderNumber(),flowCard.getInventoryQuantity());
- //淇敼璁㈠崟琛ㄥ叆搴撶姸鎬�
- finishedGoodsInventoryMapper.updateOrderWarehousingState(flowCard.getOrder().getOrderId(),1);
+ if (ordersum == (ordernumbersum + flowCard.getInventoryQuantity())) {
+ //淇敼璁㈠崟琛ㄥ叆搴撶姸鎬�
+ finishedGoodsInventoryMapper.updateOrderWarehousingState(flowCard.getOrder().getOrderId(),2);
+ }else{
+ //淇敼璁㈠崟琛ㄥ叆搴撶姸鎬�
+ finishedGoodsInventoryMapper.updateOrderWarehousingState(flowCard.getOrder().getOrderId(),1);
+ }
+
}
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
index c141ddb..d14e3dc 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
@@ -97,5 +97,29 @@
}
+ public Map<String, Object> getSelectCustomerOderDate(Integer pageNum, Integer pageSize,List<String> selectDate, OrderDetail orderDetail) {
+ Integer offset = (pageNum - 1) * pageSize;
+ String endDate = LocalDate.now().toString();
+ String startDate = LocalDate.now().minusDays(15).toString();
+ if(selectDate !=null && selectDate.size()==2){
+ if(!selectDate.get(0).isEmpty()){
+ startDate = selectDate.get(0);
+ }
+ if(!selectDate.get(1).isEmpty()){
+ endDate = selectDate.get(1);
+ }
+ }
+ System.out.println(orderDetail);
+ System.out.println(orderDetail.getOrder());
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", customerMapper.getSelectCustomerOderDate(offset, pageSize,startDate,endDate, orderDetail));
+ map.put("total", customerMapper.getSelectCustomerOderDatePageTotal(offset, pageSize,startDate,endDate, orderDetail));
+ List<String> list = new ArrayList<>();
+ list.add(startDate);
+ list.add(endDate);
+ map.put("selectDate",list);
+ return map;
+ }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
index 4dc53cb..87e2360 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -265,6 +265,29 @@
}
+ public Map<String, Object> getSelectDeliveryPrinting( DeliveryDetail deliveryDetail) {
+ Map<String, Object> map = new HashMap<>();
+ List <Map<String, Object>> list=new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋�
+ System.out.println(deliveryDetail);
+ List<DeliveryDetail> deliveryDetailList=deliveryDetailMapper.getSelectDeliveryPrinting(deliveryDetail);
+ for (int i = 0; i < deliveryDetailList.size(); i++) {
+
+ Map<String, Object> itemmap = new HashMap<>();
+
+ List <Map<String, Object>> deliveryDetailList2=deliveryDetailMapper.getSelectDeliveryDetailPrinting(deliveryDetailList.get(i).getDeliveryId(),
+ deliveryDetailList.get(i).getOrderDetail().getProductId(),deliveryDetailList.get(i).getOrderDetail().getOrderId());
+ itemmap.put("DeliveryDetail",deliveryDetailList.get(i));
+ itemmap.put("DeliveryDetailList",deliveryDetailList2);
+ list.add(itemmap);
+
+
+ }
+ map.put("data", list);
+ map.put("delivery", deliveryMapper.getSelectShippingOrderDetailDeliveryPrinting(deliveryDetail));
+ return map;
+
+ }
+
public String orderNumberSetting(String type) {
//鏍规嵁绫诲瀷鑷姩鐢熸垚涓嶅悓鐨勬搷浣滃崟鍙�
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
index e63f36a..6c06526 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -271,4 +271,8 @@
// map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail));
return map;
}
+
+ public List<Order> exportOrderReport() {
+ return orderDetailMapper.exportOrderReport();
+ }
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/tools/DownExcel.java b/north-glass-erp/src/main/java/com/example/erp/tools/DownExcel.java
new file mode 100644
index 0000000..f6c4c46
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/tools/DownExcel.java
@@ -0,0 +1,17 @@
+package com.example.erp.tools;
+
+import com.alibaba.excel.EasyExcel;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+//exccel涓嬭浇
+public class DownExcel {
+ public static void download(HttpServletResponse response, Class t, List list,String reportName) throws IOException, IllegalAccessException,InstantiationException {
+ response.setContentType("application/vnd.ms-excel");// 璁剧疆鏂囨湰鍐呯渷
+ response.setCharacterEncoding("utf-8");// 璁剧疆瀛楃缂栫爜
+ response.setHeader("Content-disposition", "attachment;filename="+reportName+".xlsx"); // 璁剧疆鍝嶅簲澶�
+ EasyExcel.write(response.getOutputStream(), t).sheet("妯℃澘").doWrite(list); //鐢╥o娴佹潵鍐欏叆鏁版嵁
+ }
+}
diff --git a/north-glass-erp/src/main/resources/mapper/sd/Customer.xml b/north-glass-erp/src/main/resources/mapper/sd/Customer.xml
index 9092f50..aa4a38d 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/Customer.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/Customer.xml
@@ -3,6 +3,162 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.erp.mapper.sd.CustomerMapper">
+ <resultMap id="selectCustomerOrderDetail" type="com.example.erp.entity.sd.OrderDetail">
+
+ <result column="order_id" property="orderId"/>
+ <result column="order_number" property="orderNumber"/>
+ <result column="quantity" property="quantity"/>
+ <result column="building_number" property="buildingNumber"/>
+ <result column="product_name" property="productName"/>
+ <result column="product_id" property="productId"/>
+ <result column="price" property="price"/>
+ <result column="width" property="width"/>
+ <result column="height" property="height"/>
+ <result column="area" property="area"/>
+ <result column="shape" property="shape"/>
+ <result column="gross_area" property="grossArea"/>
+ <result column="compute_area" property="computeArea"/>
+ <result column="compute_gross_area" property="computeGrossArea"/>
+ <result column="processing_note" property="processingNote"/>
+ <result column="edging_type" property="edgingType"/>
+ <result column="perimeter" property="perimeter"/>
+
+
+ <result column="batch" property="order.batch"/>
+ <result column="project" property="order.project"/>
+ <result column="customer_id" property="order.customerId"/>
+ <result column="customer_name" property="order.customerName"/>
+ <result column="money" property="order.money"/>
+ <result column="order_type" property="order.orderType"/>
+ <result column="salesman" property="order.salesman"/>
+ <result column="create_time" property="order.createTime"/>
+
+
+
+
+
+ </resultMap>
+
+
+ <select id="getSelectCustomerOderDate" resultMap="selectCustomerOrderDetail">
+ select od.order_id,
+ od.order_number,
+ o.project,
+ od.product_id,
+ od.product_name,
+ o.customer_id,
+ o.customer_name,
+ sum(od.quantity) as quantity,
+ sum(od.area) as area,
+ od.shape,
+ od.width,
+ od.height,
+ o.batch,
+ o.money,
+ o.order_type,
+ o.salesman,
+ o.create_time
+ from order_detail od
+ left join `order` o on o.order_id = od.order_id
+ <where>
+ and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate}
+ <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
+ and o.customer_id = #{orderDetail.order.customerId}
+ </if>
+ <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
+ and o.project regexp #{orderDetail.order.project}
+ </if>
+ <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
+ and o.batch regexp #{orderDetail.order.batch}
+ </if>
+ <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
+ and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
+ </if>
+ <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
+ and o.order_type regexp #{orderDetail.order.orderType}
+ </if>
+ <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
+ and o.salesman regexp #{orderDetail.order.salesman}
+ </if>
+ <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
+ and od.order_id regexp #{orderDetail.orderId}
+ </if>
+ <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
+ and od.order_number regexp #{orderDetail.orderNumber}
+ </if>
+ <if test="orderDetail.productId != null and orderDetail.productId != ''">
+ and od.product_id regexp #{orderDetail.productId}
+ </if>
+ <if test="orderDetail.productName != null and orderDetail.productName != ''">
+ and od.product_name regexp #{orderDetail.productName}
+ </if>
+ <if test="orderDetail.shape != null and orderDetail.shape != ''">
+ and od.shape regexp #{orderDetail.shape}
+ </if>
+ <if test="orderDetail.width != null and orderDetail.width != ''">
+ and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
+ </if>
+ <if test="orderDetail.height != null and orderDetail.height != ''">
+ and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
+ </if>
+
+ </where>
+ group by od.product_id, od.width, od.height
+ limit #{offset},#{pageSize};
+ </select>
+
+ <select id="getSelectCustomerOderDatePageTotal" >
+ select
+ CEILING(count(zu.id)/#{pageSize}) as 'pageTotal',
+ count(zu.id) as 'total' from (select od.product_id,od.id
+ from order_detail od
+ left join `order` o on o.order_id = od.order_id
+ <where>
+ and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate}
+ <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
+ and o.customer_id = #{orderDetail.order.customerId}
+ </if>
+ <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
+ and o.project regexp #{orderDetail.order.project}
+ </if>
+ <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
+ and o.batch regexp #{orderDetail.order.batch}
+ </if>
+ <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
+ and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
+ </if>
+ <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
+ and o.order_type regexp #{orderDetail.order.orderType}
+ </if>
+ <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
+ and o.salesman regexp #{orderDetail.order.salesman}
+ </if>
+ <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
+ and od.order_id regexp #{orderDetail.orderId}
+ </if>
+ <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
+ and od.order_number regexp #{orderDetail.orderNumber}
+ </if>
+ <if test="orderDetail.productId != null and orderDetail.productId != ''">
+ and od.product_id regexp #{orderDetail.productId}
+ </if>
+ <if test="orderDetail.productName != null and orderDetail.productName != ''">
+ and od.product_name regexp #{orderDetail.productName}
+ </if>
+ <if test="orderDetail.shape != null and orderDetail.shape != ''">
+ and od.shape regexp #{orderDetail.shape}
+ </if>
+ <if test="orderDetail.width != null and orderDetail.width != ''">
+ and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
+ </if>
+ <if test="orderDetail.height != null and orderDetail.height != ''">
+ and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
+ </if>
+
+ </where>
+ group by od.product_id, od.width, od.height) as zu
+ </select>
+
<select id="getCustomerList">
select
*
diff --git a/north-glass-erp/src/main/resources/mapper/sd/Delivery.xml b/north-glass-erp/src/main/resources/mapper/sd/Delivery.xml
index bdeccd8..bf2a184 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/Delivery.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/Delivery.xml
@@ -202,6 +202,20 @@
limit 0,1
</select>
+ <select id="getSelectShippingOrderDetailDeliveryPrinting" >
+ select
+ d.delivery_id,d.quantity,d.money,d.area,
+ d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number,
+ d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id
+ from sd.delivery d
+ <where>
+ <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
+ and d.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
+ </if>
+
+ </where>
+ </select>
+
<select id="getSelectShippingOrderDetailDeliverys" >
select customer_id,customer_name,project,salesman,salesman_id,contacts,contact_number,delivery_address from sd.`order`
diff --git a/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml b/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml
index 2e92abc..f83bba4 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml
@@ -87,6 +87,28 @@
</resultMap>
+ <resultMap id="selectDeliveryDetailOrderDetail" type="com.example.erp.entity.sd.DeliveryDetail">
+
+ <result column="order_number" property="orderNumber"/>
+ <result column="o_quantity" property="quantity"/>
+ <result column="delivery_id" property="deliveryId"/>
+ <result column="delivery_number" property="deliveryNumber"/>
+ <result column="quantity" property="quantity"/>
+ <result column="area" property="area"/>
+ <result column="money" property="money"/>
+ <result column="delivery_detail_remakes" property="deliveryDetailRemakes"/>
+ <result column="delivery_detail_state" property="deliveryDetailState"/>
+ <result column="create_time" property="createTime"/>
+
+ <result column="product_id" property="orderDetail.productId"/>
+ <result column="product_name" property="orderDetail.productName"/>
+ <result column="order_id" property="orderDetail.orderId"/>
+
+
+
+
+ </resultMap>
+
<delete id="deleteDeliveryDetail">
delete from sd.delivery_detail where delivery_id=#{deliveryId}
</delete>
@@ -645,4 +667,35 @@
</where>
order by dd.delivery_id,dd.delivery_number
</select>
+
+ <select id="getSelectDeliveryPrinting" resultMap="selectDeliveryDetailOrderDetail" >
+ select dd.delivery_id,od.order_id,od.product_id,od.product_name,sum(dd.area) as area,sum(dd.money) as money,sum(dd.quantity) as quantity from
+ delivery_detail dd left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
+
+ <where>
+ <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
+ and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
+ </if>
+ </where>
+ group by od.order_id,od.product_name,od.product_id
+ </select>
+
+ <select id="getSelectDeliveryDetailPrinting" >
+ select od.order_id,
+ od.order_number,
+ od.product_name,
+ od.width,
+ od.height,
+ dd.quantity,
+ dd.money,
+ dd.area,
+ ifnull(od.processing_note,"") as processingNote,
+ ifnull(od.building_number,"") as buildingNumber,
+ od.price
+ from delivery_detail dd
+ left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number
+ where delivery_id = #{deliveryId}
+ and od.order_id = #{orderId}
+ and od.product_id = #{productId}
+ </select>
</mapper>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
index 77df67b..b4409d1 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
@@ -391,4 +391,22 @@
order by a.id desc
</select>
+ <select id="exportOrderReport">
+ SELECT
+ *,
+ a.create_time as createTime,
+ d.type_name as levelOne,
+ e.type_name as levelTwo
+ from order_detail as a
+ left join sd.`order` as b
+ on b.order_id = a.order_id
+ left join sd.product as c
+ on c.id = a.product_id
+ left join sd.basic_glass_type as d
+ on d.type_id = c.type_id
+ left join sd.basic_glass_type as e
+ on e.type_id = d.belong
+
+ </select>
+
</mapper>
\ No newline at end of file
diff --git a/north-glass-erp/target/classes/mapper/sd/Customer.xml b/north-glass-erp/target/classes/mapper/sd/Customer.xml
index 9092f50..aa4a38d 100644
--- a/north-glass-erp/target/classes/mapper/sd/Customer.xml
+++ b/north-glass-erp/target/classes/mapper/sd/Customer.xml
@@ -3,6 +3,162 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.erp.mapper.sd.CustomerMapper">
+ <resultMap id="selectCustomerOrderDetail" type="com.example.erp.entity.sd.OrderDetail">
+
+ <result column="order_id" property="orderId"/>
+ <result column="order_number" property="orderNumber"/>
+ <result column="quantity" property="quantity"/>
+ <result column="building_number" property="buildingNumber"/>
+ <result column="product_name" property="productName"/>
+ <result column="product_id" property="productId"/>
+ <result column="price" property="price"/>
+ <result column="width" property="width"/>
+ <result column="height" property="height"/>
+ <result column="area" property="area"/>
+ <result column="shape" property="shape"/>
+ <result column="gross_area" property="grossArea"/>
+ <result column="compute_area" property="computeArea"/>
+ <result column="compute_gross_area" property="computeGrossArea"/>
+ <result column="processing_note" property="processingNote"/>
+ <result column="edging_type" property="edgingType"/>
+ <result column="perimeter" property="perimeter"/>
+
+
+ <result column="batch" property="order.batch"/>
+ <result column="project" property="order.project"/>
+ <result column="customer_id" property="order.customerId"/>
+ <result column="customer_name" property="order.customerName"/>
+ <result column="money" property="order.money"/>
+ <result column="order_type" property="order.orderType"/>
+ <result column="salesman" property="order.salesman"/>
+ <result column="create_time" property="order.createTime"/>
+
+
+
+
+
+ </resultMap>
+
+
+ <select id="getSelectCustomerOderDate" resultMap="selectCustomerOrderDetail">
+ select od.order_id,
+ od.order_number,
+ o.project,
+ od.product_id,
+ od.product_name,
+ o.customer_id,
+ o.customer_name,
+ sum(od.quantity) as quantity,
+ sum(od.area) as area,
+ od.shape,
+ od.width,
+ od.height,
+ o.batch,
+ o.money,
+ o.order_type,
+ o.salesman,
+ o.create_time
+ from order_detail od
+ left join `order` o on o.order_id = od.order_id
+ <where>
+ and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate}
+ <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
+ and o.customer_id = #{orderDetail.order.customerId}
+ </if>
+ <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
+ and o.project regexp #{orderDetail.order.project}
+ </if>
+ <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
+ and o.batch regexp #{orderDetail.order.batch}
+ </if>
+ <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
+ and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
+ </if>
+ <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
+ and o.order_type regexp #{orderDetail.order.orderType}
+ </if>
+ <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
+ and o.salesman regexp #{orderDetail.order.salesman}
+ </if>
+ <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
+ and od.order_id regexp #{orderDetail.orderId}
+ </if>
+ <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
+ and od.order_number regexp #{orderDetail.orderNumber}
+ </if>
+ <if test="orderDetail.productId != null and orderDetail.productId != ''">
+ and od.product_id regexp #{orderDetail.productId}
+ </if>
+ <if test="orderDetail.productName != null and orderDetail.productName != ''">
+ and od.product_name regexp #{orderDetail.productName}
+ </if>
+ <if test="orderDetail.shape != null and orderDetail.shape != ''">
+ and od.shape regexp #{orderDetail.shape}
+ </if>
+ <if test="orderDetail.width != null and orderDetail.width != ''">
+ and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
+ </if>
+ <if test="orderDetail.height != null and orderDetail.height != ''">
+ and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
+ </if>
+
+ </where>
+ group by od.product_id, od.width, od.height
+ limit #{offset},#{pageSize};
+ </select>
+
+ <select id="getSelectCustomerOderDatePageTotal" >
+ select
+ CEILING(count(zu.id)/#{pageSize}) as 'pageTotal',
+ count(zu.id) as 'total' from (select od.product_id,od.id
+ from order_detail od
+ left join `order` o on o.order_id = od.order_id
+ <where>
+ and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate}
+ <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
+ and o.customer_id = #{orderDetail.order.customerId}
+ </if>
+ <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
+ and o.project regexp #{orderDetail.order.project}
+ </if>
+ <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
+ and o.batch regexp #{orderDetail.order.batch}
+ </if>
+ <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
+ and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
+ </if>
+ <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
+ and o.order_type regexp #{orderDetail.order.orderType}
+ </if>
+ <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
+ and o.salesman regexp #{orderDetail.order.salesman}
+ </if>
+ <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
+ and od.order_id regexp #{orderDetail.orderId}
+ </if>
+ <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
+ and od.order_number regexp #{orderDetail.orderNumber}
+ </if>
+ <if test="orderDetail.productId != null and orderDetail.productId != ''">
+ and od.product_id regexp #{orderDetail.productId}
+ </if>
+ <if test="orderDetail.productName != null and orderDetail.productName != ''">
+ and od.product_name regexp #{orderDetail.productName}
+ </if>
+ <if test="orderDetail.shape != null and orderDetail.shape != ''">
+ and od.shape regexp #{orderDetail.shape}
+ </if>
+ <if test="orderDetail.width != null and orderDetail.width != ''">
+ and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
+ </if>
+ <if test="orderDetail.height != null and orderDetail.height != ''">
+ and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
+ </if>
+
+ </where>
+ group by od.product_id, od.width, od.height) as zu
+ </select>
+
<select id="getCustomerList">
select
*
diff --git a/north-glass-erp/target/classes/mapper/sd/Delivery.xml b/north-glass-erp/target/classes/mapper/sd/Delivery.xml
index bdeccd8..bf2a184 100644
--- a/north-glass-erp/target/classes/mapper/sd/Delivery.xml
+++ b/north-glass-erp/target/classes/mapper/sd/Delivery.xml
@@ -202,6 +202,20 @@
limit 0,1
</select>
+ <select id="getSelectShippingOrderDetailDeliveryPrinting" >
+ select
+ d.delivery_id,d.quantity,d.money,d.area,
+ d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number,
+ d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id
+ from sd.delivery d
+ <where>
+ <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
+ and d.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
+ </if>
+
+ </where>
+ </select>
+
<select id="getSelectShippingOrderDetailDeliverys" >
select customer_id,customer_name,project,salesman,salesman_id,contacts,contact_number,delivery_address from sd.`order`
diff --git a/north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml b/north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
index 2e92abc..f83bba4 100644
--- a/north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
+++ b/north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
@@ -87,6 +87,28 @@
</resultMap>
+ <resultMap id="selectDeliveryDetailOrderDetail" type="com.example.erp.entity.sd.DeliveryDetail">
+
+ <result column="order_number" property="orderNumber"/>
+ <result column="o_quantity" property="quantity"/>
+ <result column="delivery_id" property="deliveryId"/>
+ <result column="delivery_number" property="deliveryNumber"/>
+ <result column="quantity" property="quantity"/>
+ <result column="area" property="area"/>
+ <result column="money" property="money"/>
+ <result column="delivery_detail_remakes" property="deliveryDetailRemakes"/>
+ <result column="delivery_detail_state" property="deliveryDetailState"/>
+ <result column="create_time" property="createTime"/>
+
+ <result column="product_id" property="orderDetail.productId"/>
+ <result column="product_name" property="orderDetail.productName"/>
+ <result column="order_id" property="orderDetail.orderId"/>
+
+
+
+
+ </resultMap>
+
<delete id="deleteDeliveryDetail">
delete from sd.delivery_detail where delivery_id=#{deliveryId}
</delete>
@@ -645,4 +667,35 @@
</where>
order by dd.delivery_id,dd.delivery_number
</select>
+
+ <select id="getSelectDeliveryPrinting" resultMap="selectDeliveryDetailOrderDetail" >
+ select dd.delivery_id,od.order_id,od.product_id,od.product_name,sum(dd.area) as area,sum(dd.money) as money,sum(dd.quantity) as quantity from
+ delivery_detail dd left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
+
+ <where>
+ <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
+ and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
+ </if>
+ </where>
+ group by od.order_id,od.product_name,od.product_id
+ </select>
+
+ <select id="getSelectDeliveryDetailPrinting" >
+ select od.order_id,
+ od.order_number,
+ od.product_name,
+ od.width,
+ od.height,
+ dd.quantity,
+ dd.money,
+ dd.area,
+ ifnull(od.processing_note,"") as processingNote,
+ ifnull(od.building_number,"") as buildingNumber,
+ od.price
+ from delivery_detail dd
+ left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number
+ where delivery_id = #{deliveryId}
+ and od.order_id = #{orderId}
+ and od.product_id = #{productId}
+ </select>
</mapper>
\ No newline at end of file
diff --git a/north-glass-erp/target/classes/mapper/sd/OrderDetail.xml b/north-glass-erp/target/classes/mapper/sd/OrderDetail.xml
index 77df67b..b4409d1 100644
--- a/north-glass-erp/target/classes/mapper/sd/OrderDetail.xml
+++ b/north-glass-erp/target/classes/mapper/sd/OrderDetail.xml
@@ -391,4 +391,22 @@
order by a.id desc
</select>
+ <select id="exportOrderReport">
+ SELECT
+ *,
+ a.create_time as createTime,
+ d.type_name as levelOne,
+ e.type_name as levelTwo
+ from order_detail as a
+ left join sd.`order` as b
+ on b.order_id = a.order_id
+ left join sd.product as c
+ on c.id = a.product_id
+ left join sd.basic_glass_type as d
+ on d.type_id = c.type_id
+ left join sd.basic_glass_type as e
+ on e.type_id = d.belong
+
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0