From 18b4be9e6b7e8319c2e02b20b9f9b0a422c352a5 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 28 五月 2024 15:58:13 +0800
Subject: [PATCH] 部分报表导出,修改报工新增后质检状态不正确问题,修改报工编辑后查询数据错误问题
---
north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue | 7
north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue | 67 ++
north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue | 2
north-glass-erp/src/main/java/com/example/erp/dto/pp/SplittingDetailsOutsideDTO.java | 30 +
north-glass-erp/src/main/java/com/example/erp/dto/pp/DamageReportDTO.java | 44 +
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java | 17
north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue | 20
north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessToBeCompletedDTO.java | 50 ++
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 308 ++++++++++++
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue | 69 ++
north-glass-erp/src/main/java/com/example/erp/dto/pp/WorkInProgressDTO.java | 40 +
north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue | 159 +++--
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 11
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java | 114 +++-
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue | 94 ++-
north-glass-erp/src/main/java/com/example/erp/dto/pp/OrderPlanDecompositionDTO.java | 38 +
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java | 214 ++++---
north-glass-erp/src/main/java/com/example/erp/dto/pp/TaskCompletionStatusDTO.java | 24
north-glass-erp/src/main/java/com/example/erp/dto/pp/CrossProcessBreakingDTO.java | 32 +
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java | 4
north-glass-erp/src/main/java/com/example/erp/dto/pp/ProductionScheduleDTO.java | 32 +
north-glass-erp/src/main/java/com/example/erp/dto/pp/RawMaterialRequisitionDTO.java | 28 +
north-glass-erp/src/main/java/com/example/erp/dto/pp/YieldDTO.java | 26 +
north-glass-erp/src/main/java/com/example/erp/dto/pp/QualityReportDTO.java | 32 +
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java | 2
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | 7
north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessCardProgressDTO.java | 24
27 files changed, 1,238 insertions(+), 257 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
index 7434174..bba91c1 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -12,9 +12,9 @@
import BasicTable from '@/components/sd/product/BasicTable.vue'
import {VXETable} from "vxe-table";
import useUserInfoStore from "@/stores/userInfo";
-import { useI18n } from 'vue-i18n'
+import {useI18n} from 'vue-i18n'
//璇█鑾峰彇
-const { t } = useI18n()
+const {t} = useI18n()
let productGlassTypeStore = useProductGlassTypeStore()
let router = useRouter()
const userStore = useUserInfoStore()
@@ -36,7 +36,7 @@
location.reload();
} else {
ElMessage.warning(res.msg)
- // router.push("/login")
+ // router.push("/login")
}
})
break
@@ -144,7 +144,7 @@
keepSource: true,//淇濇寔婧愭暟鎹�
align: 'center',//鏂囧瓧灞呬腑
stripe: true,//鏂戦┈绾�
- rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
id: 'CustomerList',
showFooter: true,//鏄剧ず鑴�
printConfig: {},
@@ -157,7 +157,7 @@
useKey: true
},
filterConfig: { //绛涢�夐厤缃」
- //remote: true
+ //remote: true
},
customConfig: {
storage: true
@@ -245,7 +245,7 @@
keepSource: true,//淇濇寔婧愭暟鎹�
align: 'center',//鏂囧瓧灞呬腑
stripe: true,//鏂戦┈绾�
- rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
id: 'CustomerList',
showFooter: true,//鏄剧ず鑴�
printConfig: {},
@@ -258,7 +258,7 @@
useKey: true
},
filterConfig: { //绛涢�夐厤缃」
- //remote: true
+ //remote: true
},
customConfig: {
storage: true
@@ -275,7 +275,7 @@
title: t('processCard.processId'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
- width: 130,
+ width: 100,
filterMethod: filterChanged
},
{
@@ -293,7 +293,13 @@
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
},
- {field: 'shape', title: t('order.shape'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, filterMethod: filterChanged},
+ {
+ field: 'shape',
+ title: t('order.shape'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
{field: 'width', title: t('order.width'), showOverflow: "ellipsis"},
{field: 'height', title: t('order.height')},
{field: 'quantity', title: t('order.quantity')},
@@ -357,30 +363,31 @@
if (/^[1-9]\d*$/.test(checkedNum.value)) {
checkedList.forEach((item) => {
//瀹氫箟key鍊间繚鎸�
-
//鍒ゆ柇鍙敤鏁伴噺鏄惁澶т簬绛変簬杈撳叆鐨勬暟閲�,涓嶆弧瓒冲垯鎶涘嚭寮傚父
if (item.baiscQuantity * 1 < checkedNum.value * 1) throw new Error(t('processCard.schedulingQuantity'));
- item.quantity = checkedNum.value
+ item.quantity = checkedNum.value
item.processId = processId
item.landingSequence = index
- item.baiscQuantity=item.baiscQuantity - checkedNum.value
- })
- //鍒犻櫎key
- checkedList.forEach((item) => {
+ item.baiscQuantity = item.baiscQuantity - checkedNum.value
+ item.computeGrossArea = item.computeGrossArea - item.width * item.height * checkedNum.value / 1000000
+
+ //鍒犻櫎key
let key = item._X_ROW_KEY
delete item._X_ROW_KEY
- if (item.baiscQuantity===0){
+ if (item.baiscQuantity === 0) {
$grid.remove(checkedList)
}
- $gridLeft.insertAt(checkedList)
+ $gridLeft.insertAt(item)
+ //閲嶆柊璧嬪�糼ey
item._X_ROW_KEY = key
})
-//娓呴櫎涓よ竟澶嶉�夋
+
+
+ //娓呴櫎涓よ竟澶嶉�夋
$gridLeft.clearCheckboxRow()
$grid.clearCheckboxRow()
- }
- else if (checkedNum.value === '') {//鍒ゆ柇鏁伴噺杈撳叆妗嗘棤杈撳叆鏁板瓧
+ } else if (checkedNum.value === '') {//鍒ゆ柇鏁伴噺杈撳叆妗嗘棤杈撳叆鏁板瓧
checkedList.forEach((item) => {
item.processId = processId
@@ -397,11 +404,7 @@
$gridLeft.clearCheckboxRow()
$grid.clearCheckboxRow()
}
-
-
-
}
-
//鍚戝彸杈硅〃鏍兼坊鍔犳暟鎹�
@@ -437,18 +440,29 @@
let filterIndex = rightData.findIndex(item1 => item1.orderNumber === item.orderNumber)
//濡傛灉鍙宠竟琛ㄦ牸鏁版嵁涓瓨鍦ㄥ綋鍓嶆暟鎹垯鏁伴噺鐩稿姞
if (filterIndex >= 0) {
+ //鏁伴噺
rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + checkedNum.value * 1
+ //闈㈢Н
+ rightData[filterIndex].computeGrossArea=rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000
//濡傛灉宸﹁竟鏁伴噺涓�0鏃跺垹闄ゆ鏉℃暟鎹�
- if (item.quantity === 0) {
- $gridLeft.remove(item)
+ //鍒犻櫎key
+ let key = item._X_ROW_KEY
+ delete item._X_ROW_KEY
+ if (item.baiscQuantity === 0) {
+ $grid.remove(checkedList)
}
+ item._X_ROW_KEY = key
} else {
//鍙宠竟琛ㄦ牸娌℃湁姝ゆ潯鏁版嵁鍒欏線鍙宠竟琛ㄦ牸鎻掑叆鏁版嵁
item.baiscQuantity = checkedNum.value
+ item.computeGrossArea=item.width*item.height*checkedNum.value/1000000
if (item.quantity === 0) {
$gridLeft.remove(item)
}
$grid.insert(item)
+ }
+ if (item.quantity === 0) {
+ $gridLeft.remove(item)
}
})
} else if (checkedNum.value === '') {//鍒ゆ柇鏁伴噺杈撳叆妗嗘棤杈撳叆鏁板瓧
@@ -459,6 +473,9 @@
//鏃犺緭鍏ュ苟涓斿鏋滃彸杈硅〃鏍兼暟鎹腑瀛樺湪褰撳墠鏁版嵁鍒欐暟閲忕浉鍔�
if (filterIndex > -1) {
rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + item.quantity * 1
+ //闈㈢Н
+ rightData[filterIndex].computeGrossArea=rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000
+
} else {
delete item._X_ROW_KEY
$grid.insert(item)
@@ -507,6 +524,7 @@
//鍒ゆ柇鍙敤鏁伴噺鏄惁澶т簬绛変簬杈撳叆鐨勬暟閲�,涓嶆弧瓒冲垯鎶涘嚭寮傚父
if (item.baiscQuantity * 1 < checkedNum.value * 1) throw new Error("璇疯緭鍏ュ皬浜庣瓑浜庡緟鍒嗘暟閲忕殑鏁板瓧");
item.baiscQuantity = item.baiscQuantity - checkedNum.value
+ item.computeGrossArea=item.computeGrossArea-item.width*item.height*checkedNum.value/1000000
//瀹氫箟key鍊间繚鎸�
let key = item._X_ROW_KEY
//宸﹁竟琛ㄦ牸鏁版嵁
@@ -519,6 +537,7 @@
//濡傛灉鍙宠竟琛ㄦ牸鏁版嵁涓瓨鍦ㄥ綋鍓嶆暟鎹垯鏁伴噺鐩稿姞
if (filterIndex >= 0) {
leftData[filterIndex].quantity = leftData[filterIndex].quantity * 1 + checkedNum.value * 1
+ leftData[filterIndex].computeGrossArea=leftData[filterIndex].computeGrossArea-leftData[filterIndex].width*leftData[filterIndex].height*leftData[filterIndex].baiscQuantity/1000000
if (item.baiscQuantity === 0) {
$grid.remove(checkedList)
@@ -528,6 +547,7 @@
item.quantity = checkedNum.value
item.processId = checkedListLeft[0].processId
item.landingSequence = checkedListLeft[0].landingSequence
+ item.computeGrossArea=item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedNum.value/1000000
delete item._X_ROW_KEY
$gridLeft.insert(item)
item._X_ROW_KEY = key
@@ -538,6 +558,7 @@
item.quantity = checkedNum.value
item.processId = checkedListLeft[0].processId
item.landingSequence = checkedListLeft[0].landingSequence
+ // /item.computeGrossArea=item.computeGrossArea
if (item.baiscQuantity === 0) {
$grid.remove(checkedList)
@@ -545,6 +566,8 @@
for (let i = 0; i < leftData.length; i++) {
if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId === item.processId) {
leftData[i].quantity = leftData[i].quantity * 1 + checkedNum.value * 1
+ leftData[i].computeGrossArea=leftData[i].computeGrossArea-leftData[i].width*leftData[i].height*leftData[i].baiscQuantity/1000000
+
break
} else if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId !== item.processId) {
@@ -552,8 +575,7 @@
$gridLeft.insert(item)
item._X_ROW_KEY = key
break
- }
- else if (leftData[i].orderNumber !== item.orderNumber && leftData[i].processId !== item.processId) {
+ } else if (leftData[i].orderNumber !== item.orderNumber && leftData[i].processId !== item.processId) {
delete item._X_ROW_KEY
$gridLeft.insert(item)
@@ -569,6 +591,8 @@
item.processId = checkedListLeft[0].processId
item.landingSequence = checkedListLeft[0].landingSequence
item.quantity = checkedListLeft[0].baiscQuantity
+ item.computeGrossArea=item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedListLeft[0].baiscQuantity/1000000
+
delete item._X_ROW_KEY
})
$gridLeft.insertAt(checkedList)
@@ -597,7 +621,7 @@
const $tableRight = xGrid.value
if ($table) {
const selectRecords = $table.getCheckboxRecords()
- // const selectRight = $tableRight.getCheckboxRecords()
+ // const selectRight = $tableRight.getCheckboxRecords()
let leftData = $tableRight.getTableData().fullData
if (selectRecords.length === 0) {
ElMessage.warning("璇峰厛閫夋嫨淇濆瓨鐨勬暟鎹�")
@@ -667,10 +691,11 @@
<vxe-grid
ref="xGridLeft"
class="mytable-scrollbar"
- max-height="100%"
height="650px"
+ max-height="100%"
v-bind="gridLeftOptions"
v-on="gridEvents"
+ checkbox-config="{ reserve: true, strict: true }"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -702,14 +727,16 @@
<div width="12%">
<el-main style="">
- <span>{{$t('processCard.selectedQuantity')}}:<el-input v-model="checkedNum" clearable type="number"></el-input></span><br>
+ <span>{{ $t('processCard.selectedQuantity') }}:<el-input v-model="checkedNum" clearable
+ type="number"></el-input></span><br>
<el-button type="primary" @click="addRight"> 鈫�</el-button>
<br>
<br>
<el-button type="primary" @click="addLeft"> 鈫�</el-button>
<br>
<br>
- <el-button type="primary" @click="createProcessCard">{{$t('processCard.establishProcessCards')}}</el-button>
+ <el-button type="primary" @click="createProcessCard">{{ $t('processCard.establishProcessCards') }}
+ </el-button>
</el-main>
</div>
@@ -722,9 +749,10 @@
ref="xGrid"
class="mytable-scrollbar"
- max-height="100%"
height="650px"
+ max-height="100%"
v-bind="gridOptions"
+ checkbox-config="{ reserve: true, strict: true }"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue b/north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue
index 1a3919e..34d6790 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue
@@ -16,7 +16,7 @@
{field: 'area',width: 100, title: '娆$牬闈㈢Н', sortable: true},
{field: 'order.project', width: 120,title: '椤圭洰鍚嶇О', sortable: true},
{field: 'order.orderId',width: 120, title: '閿�鍞崟鍙�', sortable: true},
- {field: 'orderGlassDetail.glassChild',width: 120, title: '鍗曞搧鍚嶇О', sortable: true},
+ {field: 'orderGlassDetail.glassChild',width: 120, title: '鍗曠墖鍚嶇О', sortable: true},
],//琛ㄦ牸琛ㄥご瀛楁
data:[],//琛ㄦ牸鏁版嵁
url :'/report/crossProcessBreaking',
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue b/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
index 51c9642..d38698e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
@@ -6,7 +6,7 @@
import deepClone from "@/utils/deepClone";
import {ElDatePicker, ElMessage} from "element-plus";
import {useI18n} from 'vue-i18n'
-import {changeFilterEvent, filterChanged} from "@/hook"
+import exportExcel from "@/hook/exportExcel";
//璇█鑾峰彇
const {t} = useI18n()
let router = useRouter()
@@ -78,12 +78,12 @@
processType: [],
})
//绗竴娆″姞杞芥暟鎹�
-request.post(`/report/damageReport/${startTime}/${endTime}`, filterData.value).then((res) => {
+request.post(`/report/damageReport/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => {
if (res.code == 200) {
- // total.dataTotal = res.data.total.total*1
- // total.pageTotal= res.data.total.pageTotal
- // pageTotal.value = res.data.total
+ total.dataTotal = res.data.total.total*1
+ total.pageTotal= res.data.total.pageTotal
+ pageTotal.value = res.data.total
produceList = produceList.value.concat(deepClone(res.data.data))
xGrid.value.reloadData(produceList)
gridOptions.loading = false
@@ -97,7 +97,7 @@
let startTime = form.date1[0]
let endTime = form.date1[1]
- request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => {
+ request.post(`/report/damageReport/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => {
if (res.code == 200) {
@@ -114,14 +114,14 @@
let startTime = form.date1[0]
let endTime = form.date1[1]
- request.post(`/report/damageReport/${startTime}/${endTime}`, filterData.value).then((res) => {
+ request.post(`/report/damageReport/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => {
if (res.code == 200) {
- // total.dataTotal = res.data.total.total*1
- // total.pageTotal= res.data.total.pageTotal
- // pageTotal.value = res.data.total
- produceList = deepClone(res.data.data)
- xGrid.value.reloadData(produceList)
+ total.dataTotal = res.data.total.total * 1
+ total.pageTotal = res.data.total.pageTotal
+ pageTotal.value = res.data.total
+ xGrid.value.loadData(res.data.data)
+ gridOptions.loading = false
} else {
ElMessage.warning(res.msg)
}
@@ -135,31 +135,45 @@
selectPageList()
}
-
/*浣跨敤绛涢�夛紝鍚庣鑾峰彇鏁版嵁*/
-// const changeFilterEvent = (event, option, $panel,) => {
-// // 鎵嬪姩瑙﹀彂绛涢��
-// $panel.changeOption(event, !!option.data, option)
-// }
+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
-// }
-//
-// gridOptions.loading = true
-//
-// }
+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
+ }
+ gridOptions.loading = true
+
+ let startTime = form.date1[0]
+ let endTime = form.date1[1]
+ request.post(`/report/damageReport/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => {
+
+ if (res.code == 200) {
+ total.dataTotal = res.data.total.total*1
+ total.pageTotal=parseInt(res.data.total)
+ pageNum.value=1
+ produceList = deepClone(res.data.data)
+ xGrid.value.reloadData(produceList)
+ gridOptions.loading=false
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ })
+
+}
/*鍚庣杩斿洖缁撴灉澶氬眰宓屽灞曠ず*/
const hasDecimal = (value) => {
@@ -187,7 +201,7 @@
useKey: true
},
filterConfig: { //绛涢�夐厤缃」
- // remote: true
+ remote: true
},
customConfig: {
storage: true
@@ -201,59 +215,52 @@
{type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
{type: 'seq', fixed: "left", title: '鑷簭', width: 50},
{
- field: 'order_id', width: 120, title: '閿�鍞崟鍙�', filters: [{data: ''}],
- slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ field: 'orderId', width: 120, title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }
},
{
field: 'project',
width: 120,
title: '椤圭洰鍚嶇О',
showOverflow: "ellipsis",
- filters: [{data: ''}],
- slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ filters:[{ data: '' }],slots: { filter: 'num1_filter' }
},
{
- field: 'process_id', width: 130, title: '娴佺▼鍗″彿', filters: [{data: ''}],
- slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ field: 'processId', width: 130, title: '娴佺▼鍗″彿', filters:[{ data: '' }],slots: { filter: 'num1_filter' }
},
{
- field: 'order_number', width: 120, title: '璁㈠崟搴忓彿', filters: [{data: ''}],
- slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ field: 'orderNumber', width: 120, title: '璁㈠崟搴忓彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }
},
{
- field: 'technology_number', width: 100, title: '灏忕墖椤哄簭', filters: [{data: ''}],
- slots: {filter: 'num1_filter'},
- filterMethod: filterChanged
+ field: 'technologyNumber', width: 100, title: '灏忕墖椤哄簭', filters:[{ data: '' }],slots: { filter: 'num1_filter' }
},
{
- field: 'reporting_work_time',
+ field: 'reportingWorkTime',
width: 100,
title: '鎶ュ伐鏃堕棿',
type: 'date',
attrs: {placeholder: '', type: 'date'},
},
- {field: 'responsible_process', width: 120, title: '璐d换宸ュ簭', showOverflow: "ellipsis"},
- {field: 'responsible_team', width: 100, title: '璐d换鐝粍'},
- {field: 'responsible_equipment', width: 120, title: '璐d换璁惧'},
- {field: 'breakage_type', width: 120, title: '娆$牬绫诲瀷'},
- {field: 'breakage_reason', width: 120, title: '娆$牬鍘熷洜'},
- {field: 'breakage_quantity', width: 120, title: '娆$牬鏁伴噺'},
+ {field: 'responsibleProcess', width: 120, title: '璐d换宸ュ簭',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, showOverflow: "ellipsis"},
+ {field: 'responsibleTeam', width: 100, title: '璐d换鐝粍',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'responsibleEquipment', width: 120, title: '璐d换璁惧',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'breakageType', width: 120, title: '娆$牬绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'breakageReason', width: 120, title: '娆$牬鍘熷洜',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'breakageQuantity', width: 120, title: '娆$牬鏁伴噺'},
{field: 'area', width: 120, title: '娆$牬闈㈢Н'},
{field: 'personnel', width: 120, title: '璐d换浜哄憳'},
- {field: 'glass_child', width: 120, title: '鍗曠墖鍚嶇О'},
+ {field: 'glassChild', width: 120, title: '鍗曠墖鍚嶇О'},
],//琛ㄥご鎸夐挳
toolbarConfig: {
// buttons: [{
//
// }],
- import: false,
- export: true,
- print: true,
+ // import: false,
+ // export: true,
+ // print: true,
+ slots: {
+ tools: 'toolbar_buttons'
+ },
zoom: true,
custom: true
},
@@ -302,6 +309,7 @@
class="mytable-scrollbar"
max-height="100%"
v-bind="gridOptions"
+ @filter-change="filterChanged"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
@@ -315,21 +323,34 @@
</ul>
</template>
- <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
- <template #button_slot="{ row }">
- <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">缂栬緫</el-button>
- <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">鍙嶅</el-button>
- <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">鍒犻櫎</el-button>
+ <template #toolbar_buttons>
+ <vxe-button style="margin-right: 0.5rem"
+ @click="exportExcel('/report/exportDamageReport',
+ '娆$牬鏄庣粏鎶ヨ〃',
+ form.date1)">
+ 瀵煎嚭</vxe-button>
</template>
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
- <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/>
+ <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/>
</div>
</div>
</template>
-
+ <template #pager>
+ <!--浣跨敤 pager 鎻掓Ы-->
+ <!-- 'PrevJump','NextJump', -->
+ <vxe-pager
+ v-model:current-page="pageNum"
+ v-model:page-size="total.pageSize"
+ v-model:pager-count="total.pageTotal"
+ :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']"
+ :total="total.dataTotal"
+ @page-change="handlePageChange"
+ >
+ </vxe-pager>
+ </template>
</vxe-grid>
</div>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue b/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
index 73e00f2..88e3daa 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/OrderPlanDecomposition.vue
@@ -7,6 +7,7 @@
import {ElDatePicker, ElMessage} from "element-plus";
import {useI18n} from 'vue-i18n'
import {changeFilterEvent, filterChanged} from "@/hook"
+import exportExcel from "@/hook/exportExcel";
//璇█鑾峰彇
const {t} = useI18n()
let router = useRouter()
@@ -229,7 +230,7 @@
filterMethod: filterChanged
},
{
- field: 'quantity', width: 120, title: '璁㈡暟閲�', filters: [{data: ''}],
+ field: 'quantity', width: 120, title: '璁㈠崟鏁伴噺', filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
},
@@ -257,9 +258,12 @@
// buttons: [{
//
// }],
- import: false,
- export: true,
- print: true,
+ slots: {
+ tools: 'toolbar_buttons'
+ },
+ // import: false,
+ // export: true,
+ // print: true,
zoom: true,
custom: true
},
@@ -320,7 +324,13 @@
</li>
</ul>
</template>
-
+ <template #toolbar_buttons>
+ <vxe-button style="margin-right: 0.5rem"
+ @click="exportExcel('/report/exportOrderPlanDecomposition',
+ '璁㈠崟璁″垝鍒嗚В鎶ヨ〃',
+ form.date1)">
+ 瀵煎嚭</vxe-button>
+ </template>
<template #num1_filter="{ column, $panel }">
<div>
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 68b8c89..677f3b2 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
@@ -61,7 +61,7 @@
{field: 'glass_child',width: 130, title: '鍗曠墖鍚嶇О' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
{field: 'order_type', width: 120,title: '璁㈠崟绫诲瀷',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
{field: 'process_id',width: 110, title: '娴佺▼鍗″彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
- {field: 'technology_number', width: 90,title: '鏍囪',showOverflow:"ellipsis"},
+ {field: 'technology_number', width: 90,title: '灏忕墖椤哄簭',showOverflow:"ellipsis"},
{field: 'quantity', width: 90,title: '鏁伴噺'},
{field: 'broken_num',width: 90, title: '娆$牬鏁伴噺'},
{field: 'inventoryArea',width: 120, title: '鍏ュ簱闈㈢Н'},
@@ -150,7 +150,7 @@
// }],
// import: false,
// export: true,
- print: true,
+ // print: true,
zoom: true,
custom: true
},
@@ -184,6 +184,8 @@
const mergeCells = ref([
])
+
+
</script>
@@ -229,6 +231,7 @@
</template>
+
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
index 6e45163..c4b3a8d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessToBeCompleted.vue
@@ -273,9 +273,12 @@
// buttons: [{
//
// }],
- import: false,
- export: true,
- print: true,
+ slots: {
+ tools: 'toolbar_buttons'
+ },
+ // import: false,
+ // export: true,
+ // print: true,
zoom: true,
custom: true
},
@@ -297,7 +300,57 @@
}
})
+ function exportExcel(url, fileName,date) {
+ let processes = value.value
+ let inputVal = form.orderId
+ if (inputVal == '') {
+ inputVal = null
+ }
+ let inputProject = form.project
+ if (inputProject == '') {
+ inputProject = null
+ }
+ if(date===null){
+ ElMessage.warning("璇峰厛閫夋嫨鏃ユ湡")
+ return
+ }
+ if(processes===null){
+ ElMessage.warning("璇峰厛閫夋嫨宸ュ簭")
+ return
+ }
+
+ const date1 = new Date(date[0]);
+ const date2 = new Date(date[1]);
+ const timeDiff = Math.abs(date2.getTime() - date1.getTime());
+ const daysDiff = timeDiff / (1000 * 3600 * 24);
+ if(Math.floor(daysDiff)>180){
+ ElMessage.warning("瀵煎嚭鐨勭瓫閫夋椂闂翠笉鑳借秴杩�180澶�")
+ return
+ }
+ let dataMp = ref({
+ date: date,
+ processes: processes,
+ orderId: inputVal,
+ project: inputProject
+ })
+ request.post(url,dataMp.value,{responseType :'blob'}).then(res => {
+ const blob = new Blob([res])
+ if ('download' in document.createElement('a')) { // 闈濱E涓嬭浇
+ const elink = document.createElement('a')
+ elink.download = `${fileName}.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>
@@ -359,6 +412,14 @@
<el-button link size="small" type="primary" @click="getTableRow(row,'delete')">鍒犻櫎</el-button>
</template>
+ <template #toolbar_buttons>
+ <vxe-button style="margin-right: 0.5rem"
+ @click="exportExcel('/report/exportProcessToBeCompleted',
+ '宸ュ簭寰呭畬鎴愭姤琛�',
+ form.date1)">
+ 瀵煎嚭</vxe-button>
+ </template>
+
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
index 5e0fda1..a5140e8 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -269,9 +269,12 @@
// buttons: [{
//
// }],
- import: false,
- export: true,
- print: true,
+ slots: {
+ tools: 'toolbar_buttons'
+ },
+ // import: false,
+ // export: true,
+ // print: true,
zoom: true,
custom: true
},
@@ -294,7 +297,57 @@
})
+function exportExcel(url, fileName,date) {
+ let processes = value.value
+ let inputVal = form.orderId
+ if (inputVal == '') {
+ inputVal = null
+ }
+ let inputProject = form.project
+ if (inputProject == '') {
+ inputProject = null
+ }
+ if(date===null){
+ ElMessage.warning("璇峰厛閫夋嫨鏃ユ湡")
+ return
+ }
+ if(processes===null){
+ ElMessage.warning("璇峰厛閫夋嫨宸ュ簭")
+ return
+ }
+
+ const date1 = new Date(date[0]);
+ const date2 = new Date(date[1]);
+ const timeDiff = Math.abs(date2.getTime() - date1.getTime());
+ const daysDiff = timeDiff / (1000 * 3600 * 24);
+ if(Math.floor(daysDiff)>180){
+ ElMessage.warning("瀵煎嚭鐨勭瓫閫夋椂闂翠笉鑳借秴杩�180澶�")
+ return
+ }
+ let dataMp = ref({
+ date: date,
+ processes: processes,
+ orderId: inputVal,
+ project: inputProject
+ })
+ request.post(url,dataMp.value,{responseType :'blob'}).then(res => {
+ const blob = new Blob([res])
+ if ('download' in document.createElement('a')) { // 闈濱E涓嬭浇
+ const elink = document.createElement('a')
+ elink.download = `${fileName}.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>
@@ -358,11 +411,17 @@
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
- <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/>
+ <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/>
</div>
</div>
</template>
-
+ <template #toolbar_buttons>
+ <vxe-button style="margin-right: 0.5rem"
+ @click="exportExcel('/report/exportWorkInProgress',
+ '鍦ㄥ埗鍝佹姤琛�',
+ form.date1)">
+ 瀵煎嚭</vxe-button>
+ </template>
</vxe-grid>
</div>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index c50d3e0..c3f818b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -64,6 +64,7 @@
})
let detail = ref([])
+let layer=''
//瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁
const titleSelectJson = ref({
@@ -92,6 +93,8 @@
if(res.code === '200'){
titleUploadData.value = res.data.reportingWork
titleSelectJson.value = res.data.basic
+ layer= res.data.layer
+ //titleUploadData.value.processId=titleUploadData.value.processId+'/'+layer
xGrid.value.reloadData(res.data.reportingWorkDetails)
let button = {
code: 'update',
@@ -105,7 +108,7 @@
gridOptions.toolbarConfig.buttons.push(button)
}
- getQuantity()
+ // getQuantity()
inputDisabled.value = true
})
}
@@ -747,7 +750,7 @@
}
let indexOfChar = processId.indexOf("/")
let leftString = processId.slice(0, indexOfChar)
- if (leftString.length !== 14) {
+ if (leftString.length < 14) {
ElMessage.warning("璇疯緭鍏ユ纭綅鏁扮殑娴佺▼鍗�")
return
}
@@ -799,7 +802,7 @@
}
let indexOfChar = processId.indexOf("/")
let leftString = processId.slice(0, indexOfChar)
- if (leftString.length != 14) {
+ if (leftString.length < 14) {
ElMessage.warning("璇疯緭鍏ユ纭綅鏁扮殑娴佺▼鍗�")
return
}
@@ -821,8 +824,8 @@
//娴佺▼鍗″彿
let processIdStr = result[1];
//灞傚彿
- let technologyStr = result[2];
+ let technologyStr = result[2];
request.post(`/reportingWork/addSelectLastWork/${processIdStr}/${technologyStr}/${process}`).then((res) => {
if (res.code == 200) {
if(res.data.data==null){
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
index d95100b..a9db4eb 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -3,6 +3,7 @@
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
+import com.example.erp.dto.pp.*;
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.Report;
@@ -26,7 +27,7 @@
import java.util.Map;
@RestController
-@Api(value="鐢熶骇鎶ヨ〃controller",tags={"鐢熶骇鎶ヨ〃鎿嶄綔鎺ュ彛"})
+@Api(value = "鐢熶骇鎶ヨ〃controller", tags = {"鐢熶骇鎶ヨ〃鎿嶄綔鎺ュ彛"})
@RequestMapping("/report")
public class ReportController {
private final ReportService reportService;
@@ -38,9 +39,9 @@
//娴佺▼鍗¤繘搴�
@ApiOperation("娴佺▼鍗¤繘搴�")
@SaCheckPermission("ProcessCardProgress.search")
- @PostMapping ("/processCardProgress/{orderId}")
- public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns){
- return Result.seccess(reportService.processCardProgressSv(orderId,columns));
+ @PostMapping("/processCardProgress/{orderId}")
+ public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns) {
+ return Result.seccess(reportService.processCardProgressSv(orderId, columns));
}
@ApiOperation("璺ㄥ伐搴忔鐮�")
@@ -49,8 +50,8 @@
public Result getOrderReport(@PathVariable Integer pageNum,
@PathVariable Integer pageSize,
@PathVariable List<String> selectDate,
- @RequestBody DamageDetails damageDetails) {
- return Result.seccess(reportService.crossProcessBreakingSv(pageNum,pageSize,selectDate,damageDetails));
+ @RequestBody DamageDetails damageDetails) {
+ return Result.seccess(reportService.crossProcessBreakingSv(pageNum, pageSize, selectDate, damageDetails));
}
@@ -58,13 +59,13 @@
@SaCheckPermission("WorkInProgress.search")
@PostMapping("/workInProgress/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}")
public Result workInProgress(
- @PathVariable Date selectTime1,
- @PathVariable Date selectTime2,
- @PathVariable String orderId,
- @PathVariable String inputProject,
- @PathVariable String selectProcesses,
- @RequestBody Report report) {
- return Result.seccess(reportService.workInProgressSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report));
+ @PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @PathVariable String orderId,
+ @PathVariable String inputProject,
+ @PathVariable String selectProcesses,
+ @RequestBody Report report) {
+ return Result.seccess(reportService.workInProgressSv(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
}
@@ -77,28 +78,31 @@
@PathVariable String orderId,
@PathVariable String inputProject,
@PathVariable String selectProcesses,
- @RequestBody Report report) {
- return Result.seccess(reportService.selectProcessToBeCompletedSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report));
+ @RequestBody Report report) {
+ return Result.seccess(reportService.selectProcessToBeCompletedSv(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
}
@ApiOperation("娆$牬鏄庣粏鎶ヨ〃")
@SaCheckPermission("DamageReport.search")
- @PostMapping("/damageReport/{selectTime1}/{selectTime2}")
+ @PostMapping("/damageReport/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}")
public Result damageReport(
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
@PathVariable Date selectTime1,
@PathVariable Date selectTime2,
- @RequestBody Report report) {
- return Result.seccess(reportService.selectDamageReportSv(selectTime1,selectTime2,report));
+ @RequestBody DamageReportDTO damageReportDTO) {
+ return Result.seccess(reportService.selectDamageReportSv(pageNum, pageSize, selectTime1, selectTime2, damageReportDTO));
}
+
@ApiOperation("鍒嗘灦鏄庣粏鎶ヨ〃")
@SaCheckPermission("SplittingDetailsOutside.search")
@PostMapping("/splittingDetailsOutside/{orderId}")
public Result splittingDetailsOutside(
@PathVariable String orderId,
- @RequestBody Report report) {
- return Result.seccess(reportService.splittingDetailsOutsideSv(orderId,report));
+ @RequestBody Report report) {
+ return Result.seccess(reportService.splittingDetailsOutsideSv(orderId, report));
}
@@ -108,8 +112,8 @@
public Result qualityReport(
@PathVariable Date selectTime1,
@PathVariable Date selectTime2,
- @RequestBody Report report) {
- return Result.seccess(reportService.qualityReportSv(selectTime1,selectTime2,report));
+ @RequestBody Report report) {
+ return Result.seccess(reportService.qualityReportSv(selectTime1, selectTime2, report));
}
@@ -120,49 +124,81 @@
@PathVariable Date selectTime1,
@PathVariable Date selectTime2,
@PathVariable String selectProcesses,
- @RequestBody Report report) {
- return Result.seccess(reportService.yieldSv(selectTime1,selectTime2,selectProcesses,report));
+ @RequestBody Report report) {
+ return Result.seccess(reportService.yieldSv(selectTime1, selectTime2, selectProcesses, report));
}
@ApiOperation("鐢熶骇鍙戣揣杩涘害")
@SaCheckPermission("ProductionSchedule.search")
- @PostMapping ("/productionSchedule/{orderId}")
- public Result productionSchedule(@PathVariable String orderId, @RequestBody List<Integer> columns){
- return Result.seccess(reportService.productionScheduleSv(orderId,columns));
+ @PostMapping("/productionSchedule/{orderId}")
+ public Result productionSchedule(@PathVariable String orderId, @RequestBody List<Integer> columns) {
+ return Result.seccess(reportService.productionScheduleSv(orderId, columns));
}
@ApiOperation("浠诲姟瀹屾垚鎯呭喌姹囨�昏繘搴�")
@SaCheckPermission("TaskCompletionStatus.search")
- @PostMapping ("/taskCompletionStatus/{selectTime1}/{selectTime2}")
+ @PostMapping("/taskCompletionStatus/{selectTime1}/{selectTime2}")
public Result taskCompletionStatus(@PathVariable Date selectTime1,
@PathVariable Date selectTime2,
- @RequestBody List<Integer> columns){
- return Result.seccess(reportService.taskCompletionStatusSv(selectTime1,selectTime2,columns));
+ @RequestBody List<Integer> columns) {
+ return Result.seccess(reportService.taskCompletionStatusSv(selectTime1, selectTime2, columns));
}
@ApiOperation("璁㈠崟璁″垝鍒嗚В")
@SaCheckPermission("OrderPlanDecomposition.search")
- @PostMapping ("/orderPlanDecomposition/{selectTime1}/{selectTime2}")
+ @PostMapping("/orderPlanDecomposition/{selectTime1}/{selectTime2}")
public Result orderPlanDecomposition(@PathVariable Date selectTime1,
- @PathVariable Date selectTime2,
- @RequestBody Report report){
- return Result.seccess(reportService.orderPlanDecompositionSv(selectTime1,selectTime2,report));
+ @PathVariable Date selectTime2,
+ @RequestBody Report report) {
+ return Result.seccess(reportService.orderPlanDecompositionSv(selectTime1, selectTime2, report));
}
@ApiOperation("鍘熺墖棰嗘枡")
@SaCheckPermission("RawMaterialRequisition.search")
- @PostMapping ("/rawMaterialRequisition/{selectTime1}/{selectTime2}")
+ @PostMapping("/rawMaterialRequisition/{selectTime1}/{selectTime2}")
public Result rawMaterialRequisition(@PathVariable Date selectTime1,
@PathVariable Date selectTime2,
- @RequestBody Report report){
- return Result.seccess(reportService.rawMaterialRequisitionSv(selectTime1,selectTime2,report));
+ @RequestBody Report report) {
+ return Result.seccess(reportService.rawMaterialRequisitionSv(selectTime1, selectTime2, report));
}
+
@ApiOperation("璺ㄥ伐搴忔鐮存姤琛ㄥ鍑�")
@PostMapping("/exportCrossProcessBreaking")
public void exportCrossProcessBreaking(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
-
//鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
- DownExcel.download(response, DamageDetails.class, reportService.exportCrossProcessBreakingSv(dates),"CrossProcessBreaking");
+ DownExcel.download(response, CrossProcessBreakingDTO.class, reportService.exportCrossProcessBreakingSv(dates), "CrossProcessBreaking");
+ }
+
+ @ApiOperation("娆$牬鏄庣粏鎶ヨ〃瀵煎嚭")
+ @PostMapping("/exportDamageReport")
+ public void exportDamageReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, DamageReportDTO.class, reportService.exportDamageReportSv(dates), "DamageReport");
+ }
+
+ @ApiOperation("璁㈠崟璁″垝鍒嗚В鎶ヨ〃瀵煎嚭")
+ @PostMapping("/exportOrderPlanDecomposition")
+ public void exportOrderPlanDecomposition(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, OrderPlanDecompositionDTO.class, reportService.exportOrderPlanDecompositionSv(dates), "OrderPlanDecomposition");
+ }
+
+ @ApiOperation("宸ュ簭寰呭畬鎴愭姤琛ㄥ鍑�")
+ @PostMapping("/exportProcessToBeCompleted")
+ public void exportProcessToBeCompleted(HttpServletResponse response,
+ @RequestBody Map<String,Object> dates)
+ throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, ProcessToBeCompletedDTO.class, reportService.exportProcessToBeCompletedSv(dates), "ProcessToBeCompleted");
+ }
+
+ @ApiOperation("鍦ㄥ埗鍝佹姤琛ㄥ鍑�")
+ @PostMapping("/exportWorkInProgress")
+ public void exportWorkInProgress(HttpServletResponse response,
+ @RequestBody Map<String,Object> dates)
+ throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, WorkInProgressDTO.class, reportService.exportWorkInProgressSv(dates), "WorkInProgress");
}
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/CrossProcessBreakingDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/CrossProcessBreakingDTO.java
index 1960a53..9fc64ce 100644
--- a/north-glass-erp/src/main/java/com/example/erp/dto/pp/CrossProcessBreakingDTO.java
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/CrossProcessBreakingDTO.java
@@ -1,4 +1,36 @@
package com.example.erp.dto.pp;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @author SNG-016
+ */
+@Data
public class CrossProcessBreakingDTO {
+ @ExcelProperty("鎶ュ伐鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private LocalDateTime reportingWorkTime;
+ @ExcelProperty("璐d换宸ュ簭")
+ private String responsibleProcess;
+ @ExcelProperty("璐d换鐝粍")
+ private String responsibleTeam;
+ @ExcelProperty("娆$牬绫诲瀷")
+ private String breakageType;
+ @ExcelProperty("娆$牬鍘熷洜")
+ private String breakageReason;
+ @ExcelProperty("娆$牬鏁伴噺")
+ private Integer breakageQuantity;
+ @ExcelProperty("娆$牬闈㈢Н")
+ private Double area;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("閿�鍞崟鍙�")
+ private String orderId;
+ @ExcelProperty("鍗曠墖鍚嶇О")
+ private String glassChild;
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/DamageReportDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/DamageReportDTO.java
new file mode 100644
index 0000000..6195f1e
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/DamageReportDTO.java
@@ -0,0 +1,44 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+public class DamageReportDTO {
+ @ExcelProperty("閿�鍞崟鍙�")
+ private String orderId;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("娴佺▼鍗″彿")
+ private String processId;
+ @ExcelProperty("璁㈠崟搴忓彿")
+ private String orderNumber;
+ @ExcelProperty("灏忕墖椤哄簭")
+ private String technologyNumber;
+ @ExcelProperty("鎶ュ伐鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private LocalDateTime reportingWorkTime;
+ @ExcelProperty("璐d换宸ュ簭")
+ private String responsibleProcess;
+ @ExcelProperty("璐d换鐝粍")
+ private String responsibleTeam;
+ @ExcelProperty("璐d换璁惧")
+ private String responsibleEquipment;
+ @ExcelProperty("娆$牬绫诲瀷")
+ private String breakageType;
+ @ExcelProperty("娆$牬鍘熷洜")
+ private String breakageReason;
+ @ExcelProperty("娆$牬鏁伴噺")
+ private Integer breakageQuantity;
+ @ExcelProperty("娆$牬闈㈢Н")
+ private Double area;
+ @ExcelProperty("璐d换浜哄憳")
+ private String personnel;
+ @ExcelProperty("鍗曠墖鍚嶇О")
+ private String glassChild;
+
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/OrderPlanDecompositionDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/OrderPlanDecompositionDTO.java
new file mode 100644
index 0000000..25f313e
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/OrderPlanDecompositionDTO.java
@@ -0,0 +1,38 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+@Data
+public class OrderPlanDecompositionDTO {
+ @ExcelProperty("閿�鍞崟鍙�")
+ private String orderId;
+ @ExcelProperty("瀹㈡埛鍚嶇О")
+ private String customerName;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("鎵规")
+ private String batch;
+ @ExcelProperty("璁㈠崟鏁伴噺")
+ private Integer quantity;
+ @ExcelProperty("璁㈠崟闈㈢Н")
+ private Double area;
+ @ExcelProperty("鍒嗘灦鏃堕棿")
+ private LocalDate createTime;
+ @ExcelProperty("鍒囧壊寮�濮嬫椂闂�")
+ private LocalDate startTime;
+ @ExcelProperty("瀹屽伐鏁伴噺")
+ private Integer completionsNum;
+ @ExcelProperty("鍏ュ簱鏁伴噺")
+ private Integer receivedQuantity;
+ @ExcelProperty("鏈叆搴撴暟閲�")
+ private Integer receivedNo;
+ @ExcelProperty("鏄惁娓呭崟")
+ private Integer accomplish;
+ @ExcelProperty("鐢熶骇澶╂暟")
+ private Integer daysDifference;
+
+
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessCardProgressDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessCardProgressDTO.java
new file mode 100644
index 0000000..ad784b5
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessCardProgressDTO.java
@@ -0,0 +1,24 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class ProcessCardProgressDTO {
+ @ExcelProperty("浜у搧鍚嶇О")
+ private String productName;
+ @ExcelProperty("鍗曠墖鍚嶇О")
+ private String glassChild;
+ @ExcelProperty("璁㈠崟绫诲瀷")
+ private String orderType;
+ @ExcelProperty("娴佺▼鍗″彿")
+ private String processId;
+ @ExcelProperty("灏忕墖椤哄簭")
+ private String technologyNumber;
+ @ExcelProperty("鏁伴噺")
+ private Integer quantity;
+ @ExcelProperty("娆$牬鏁伴噺")
+ private Integer brokenNum;
+ @ExcelProperty("鍏ュ簱闈㈢Н")
+ private Double inventoryArea;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessToBeCompletedDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessToBeCompletedDTO.java
new file mode 100644
index 0000000..4602cfe
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProcessToBeCompletedDTO.java
@@ -0,0 +1,50 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+@Data
+public class ProcessToBeCompletedDTO {
+ @ExcelProperty("涓嬪崟鏃堕棿")
+ private LocalDate createTime;
+ @ExcelProperty("浜よ揣鏃ユ湡")
+ private LocalDate deliveryDate;
+ @ExcelProperty("閿�鍞崟鍙�")
+ private String orderId;
+ @ExcelProperty("娴佺▼鍗″彿")
+ private String processId;
+ @ExcelProperty("瀹㈡埛鍚嶇О")
+ private String customerName;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("鎵规")
+ private String batch;
+ @ExcelProperty("搴忓彿")
+ private String orderNumber;
+ @ExcelProperty("灏忕墖椤哄簭")
+ private String technologyNumber;
+ @ExcelProperty("鍗曠墖鍚嶇О")
+ private String glassChild;
+ @ExcelProperty("瀹�")
+ private String childWidth;
+ @ExcelProperty("楂�")
+ private String childHeight;
+ @ExcelProperty("璁㈠崟鏁伴噺")
+ private Integer quantity;
+ @ExcelProperty("鍗曠墖闈㈢Н")
+ private Double childArea;
+ @ExcelProperty("瀹為檯闈㈢Н")
+ private Double actualArea;
+ @ExcelProperty("宸插畬鎴愭暟閲�")
+ private Integer completeNum;
+ @ExcelProperty("宸插畬鎴愰潰绉�")
+ private Double completeArea;
+ @ExcelProperty("鏈畬鎴愭暟閲�")
+ private Integer incompleteNum;
+ @ExcelProperty("鏈畬鎴愰潰绉�")
+ private Double incompleteArea;
+ @ExcelProperty("鎴愬搧鍚嶇О")
+ private String productName;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProductionScheduleDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProductionScheduleDTO.java
new file mode 100644
index 0000000..b3d2299
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/ProductionScheduleDTO.java
@@ -0,0 +1,32 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class ProductionScheduleDTO {
+ @ExcelProperty("璁㈠崟搴忓彿")
+ private String orderNumber;
+ @ExcelProperty("褰㈢姸")
+ private String shape;
+ @ExcelProperty("浜у搧鍚嶇О")
+ private String productName;
+ @ExcelProperty("瀹�")
+ private String childWidth;
+ @ExcelProperty("楂�")
+ private String childHeight;
+ @ExcelProperty("鏁伴噺")
+ private Integer quantity;
+ @ExcelProperty("灏忕墖椤哄簭")
+ private String technologyNumber;
+ @ExcelProperty("鍗曠墖鍚嶇О")
+ private String glassChild;
+ @ExcelProperty("鍏ュ簱鏁伴噺")
+ private Integer inventoryNum;
+ @ExcelProperty("鍏ュ簱闈㈢Н")
+ private Double inventoryArea;
+ @ExcelProperty("鍙戣揣鏁伴噺")
+ private Integer shippedQuantity;
+ @ExcelProperty("鍙戣揣闈㈢Н")
+ private Double area;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/QualityReportDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/QualityReportDTO.java
new file mode 100644
index 0000000..6511b9e
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/QualityReportDTO.java
@@ -0,0 +1,32 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class QualityReportDTO {
+ @ExcelProperty("閿�鍞崟鍙�")
+ private String orderId;
+ @ExcelProperty("瀹㈡埛鍚嶇О")
+ private String customerName;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("璁㈠崟搴忓彿")
+ private String orderNumber;
+ @ExcelProperty("灏忕墖椤哄簭")
+ private String technologyNumber;
+ @ExcelProperty("浜у搧鍚嶇О")
+ private String productName;
+ @ExcelProperty("璁㈠崟鏁伴噺")
+ private Integer quantity;
+ @ExcelProperty("鎶曞叆鏁伴噺")
+ private Integer quantityMax;
+ @ExcelProperty("娆$牬鏁伴噺")
+ private Integer breakageQuantity;
+ @ExcelProperty("琛ョ墖鏁伴噺")
+ private Integer patchNum;
+ @ExcelProperty("鍏ュ簱鏁伴噺")
+ private Integer receivedQuantity;
+ @ExcelProperty("鎴愬搧鐜�")
+ private String finished;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/RawMaterialRequisitionDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/RawMaterialRequisitionDTO.java
new file mode 100644
index 0000000..18a71ea
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/RawMaterialRequisitionDTO.java
@@ -0,0 +1,28 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+@Data
+public class RawMaterialRequisitionDTO {
+ @ExcelProperty("宸ョ▼缂栧彿")
+ private String projectNo;
+ @ExcelProperty("鐗╂枡鍚嶇О")
+ private String materialName;
+ @ExcelProperty("鍘熺墖浜у湴")
+ private String producer;
+ @ExcelProperty("瀹�")
+ private String width;
+ @ExcelProperty("楂�")
+ private String height;
+ @ExcelProperty("宸查鏁伴噺")
+ private Integer quantity;
+ @ExcelProperty("宸查闈㈢Н")
+ private Double area;
+ @ExcelProperty("鍘熺墖鐢熶骇鏃ユ湡")
+ private LocalDate dateOfManufacture;
+ @ExcelProperty("棰嗗嚭鏃ユ湡")
+ private LocalDate date;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/SplittingDetailsOutsideDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/SplittingDetailsOutsideDTO.java
new file mode 100644
index 0000000..540e68d
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/SplittingDetailsOutsideDTO.java
@@ -0,0 +1,30 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class SplittingDetailsOutsideDTO {
+ @ExcelProperty("娴佺▼鍗″彿")
+ private String processId;
+ @ExcelProperty("璁㈠崟搴忓彿")
+ private String orderNumber;
+ @ExcelProperty("灏忕墖椤哄簭")
+ private String technologyNumber;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("鎵规")
+ private String batch;
+ @ExcelProperty("瀹�")
+ private String childWidth;
+ @ExcelProperty("楂�")
+ private String childHeight;
+ @ExcelProperty("璁㈠崟鏁�")
+ private Integer quantity;
+ @ExcelProperty("闈㈢Н")
+ private Double area;
+ @ExcelProperty("褰㈢姸")
+ private String shape;
+ @ExcelProperty("澶囨敞")
+ private String remarks;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/TaskCompletionStatusDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/TaskCompletionStatusDTO.java
new file mode 100644
index 0000000..acfb121
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/TaskCompletionStatusDTO.java
@@ -0,0 +1,24 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class TaskCompletionStatusDTO {
+ @ExcelProperty("瀹㈡埛鍚嶇О")
+ private String customerName;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("鎵规")
+ private String batch;
+ @ExcelProperty("閿�鍞崟鍙�")
+ private String orderId;
+ @ExcelProperty("璁㈠崟鏁伴噺")
+ private String quantity;
+ @ExcelProperty("璁㈠崟闈㈢Н")
+ private String area;
+ @ExcelProperty("鍙戣揣鏁伴噺")
+ private String shippedQuantity;
+ @ExcelProperty("鍙戣揣闈㈢Н")
+ private String shippedArea;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/WorkInProgressDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/WorkInProgressDTO.java
new file mode 100644
index 0000000..e8b1411
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/WorkInProgressDTO.java
@@ -0,0 +1,40 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class WorkInProgressDTO {
+ @ExcelProperty("宸ュ簭")
+ private String thisProcess;
+ @ExcelProperty("娴佺▼鍗″彿")
+ private String processId;
+ @ExcelProperty("瀹㈡埛鍚嶇О")
+ private String customerName;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("鎵规")
+ private String batch;
+ @ExcelProperty("搴忓彿")
+ private String orderNumber;
+ @ExcelProperty("灏忕墖椤哄簭")
+ private String technologyNumber;
+ @ExcelProperty("褰㈢姸")
+ private String shape;
+ @ExcelProperty("宸ヨ壓娴佺▼")
+ private String process;
+ @ExcelProperty("璁㈠崟鏁�")
+ private Integer quantity;
+ @ExcelProperty("瀹�")
+ private String childWidth;
+ @ExcelProperty("楂�")
+ private String childHeight;
+ @ExcelProperty("搴撳瓨鏁�")
+ private Integer stockNum;
+ @ExcelProperty("搴撳瓨闈㈢Н")
+ private Double stockArea;
+ @ExcelProperty("鎴愬搧鍚嶇О")
+ private String productName;
+ @ExcelProperty("寮挗鍗婂緞")
+ private String bendRadius;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/dto/pp/YieldDTO.java b/north-glass-erp/src/main/java/com/example/erp/dto/pp/YieldDTO.java
new file mode 100644
index 0000000..957a78e
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/dto/pp/YieldDTO.java
@@ -0,0 +1,26 @@
+package com.example.erp.dto.pp;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+public class YieldDTO {
+ @ExcelProperty("宸ュ簭")
+ private String process;
+ @ExcelProperty("閿�鍞崟鍙�")
+ private String orderId;
+ @ExcelProperty("瀹㈡埛鍚嶇О")
+ private String customerName;
+ @ExcelProperty("椤圭洰鍚嶇О")
+ private String project;
+ @ExcelProperty("浜у搧鍚嶇О")
+ private String productName;
+ @ExcelProperty("瀹屽伐闈㈢Н")
+ private String finishedArea;
+ @ExcelProperty("娆$牬闈㈢Н")
+ private String brokenArea;
+ @ExcelProperty("鎬婚潰绉�")
+ private String area;
+ @ExcelProperty("鎴愬搧鐜�")
+ private String finished;
+}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
index cce4b65..97b7d75 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
@@ -1,9 +1,9 @@
package com.example.erp.mapper.pp;
+import com.example.erp.dto.pp.*;
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.Report;
-import com.example.erp.entity.sd.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -29,7 +29,7 @@
List<Map<String, String>> processToBeCompletedMp(Date selectTime1, Date selectTime2, String orderId,
String inputProject, String selectProcesses, Report report);
- List<Map<String, String>> selectDamageReportMp(Date selectTime1, Date selectTime2, Report report);
+ List<DamageReportDTO> selectDamageReportMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, DamageReportDTO damageReportDTO);
List<Map<String, String>> splittingDetailsOutsideMp(String orderId, Report report);
@@ -45,7 +45,18 @@
List<Map<String, String>> rawMaterialRequisitionMp(Date selectTime1, Date selectTime2, Report report);
- List<DamageDetails> exportCrossProcessBreakingMp(List<LocalDate> dates);
+ List<CrossProcessBreakingDTO> exportCrossProcessBreakingMp(List<LocalDate> dates);
+
+ Map<String, Integer> getDamageReportPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, DamageReportDTO damageReportDTO);
+
+ List<DamageReportDTO> exportDamageReportMp(List<LocalDate> dates);
+
+ List<OrderPlanDecompositionDTO> exportOrderPlanDecompositionMp(List<LocalDate> dates);
+
+ List<ProcessToBeCompletedDTO> exportProcessToBeCompletedMp(List<LocalDate> date, String process, String inputVal, String project);
+
+ List<WorkInProgressDTO> exportWorkInProgressMp(List<LocalDate> date, String process, String inputVal, String project);
+
// Map<String, Integer> getWorkInProgressTotal(
// @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2,
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java
index 783f769..ead1e03 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java
@@ -75,4 +75,6 @@
Boolean updateQualityStatusMp(String reportingWorkId,String username);
List<Map<String,String>> detailsQualityMp(String reportingWorkId, ReportingWork reportingWork);
+
+ String selectLayerByReportingWorkId(String reportingWorkId);
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
index 55e7edd..454bc48 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -3,6 +3,7 @@
import com.baomidou.dynamic.datasource.annotation.DS;
+import com.example.erp.dto.pp.DamageReportDTO;
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.Report;
import com.example.erp.mapper.pp.ProductionSchedulingMapper;
@@ -23,7 +24,7 @@
private final ProductionSchedulingMapper productionSchedulingMapper;
- public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper,ProductionSchedulingMapper productionSchedulingMapper) {
+ public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper, ProductionSchedulingMapper productionSchedulingMapper) {
this.reportMapper = reportMapper;
this.orderProcessDetailMapper = orderProcessDetailMapper;
this.productionSchedulingMapper = productionSchedulingMapper;
@@ -36,24 +37,24 @@
map.put("data", reportMapper.processCardProgressMp(orderId));
//鑾峰彇琛ㄥご宸ュ簭绛涢�夋暟鎹�
- List<Map<String,String>> processFilterList = orderProcessDetailMapper.filterOrderProcess(orderId);
- List<Map<String,String>> processList = processFilterList;
+ List<Map<String, String>> processFilterList = orderProcessDetailMapper.filterOrderProcess(orderId);
+ List<Map<String, String>> processList = processFilterList;
List<String> filterList = new ArrayList<>();
//寰幆閬嶅巻鏁扮粍锛屽垽鏂搴忓彿褰撳墠鐨勫伐搴�
for (int i = 1; i < processFilterList.size(); i++) {
filterList.add(processFilterList.get(i).get("process"));
- List<Map<String,String>> lastProcessList =
+ List<Map<String, String>> lastProcessList =
orderProcessDetailMapper.filterLastProcess(
orderId,
String.valueOf(processFilterList.get(i).get("order_number")),
String.valueOf(processFilterList.get(i).get("technology_number")),
String.valueOf(processFilterList.get(i).get("id"))
- );
- if(!lastProcessList.isEmpty()){
+ );
+ if (!lastProcessList.isEmpty()) {
int finalI = i;
lastProcessList.forEach(lastProcess -> {
- if(filterList.contains(lastProcess.get("process"))){
+ if (filterList.contains(lastProcess.get("process"))) {
processList.add(lastProcess);
}
});
@@ -76,55 +77,53 @@
seenValues.add(value);
}
}
- map.put("title", uniqueList );
+ map.put("title", uniqueList);
-
-
- List<Map<String,Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
- List<Map<String,Integer>> rowCount = new ArrayList<>();
- columns.forEach(col ->{
- getRowCount.forEach(row ->{
- Map<String,Integer> getRow = new HashMap<>();
+ List<Map<String, Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
+ List<Map<String, Integer>> rowCount = new ArrayList<>();
+ columns.forEach(col -> {
+ getRowCount.forEach(row -> {
+ Map<String, Integer> getRow = new HashMap<>();
// { row: 0, col: 1, rowspan: 3, colspan: 0},
- getRow.put("row",row.get("RowNum"));
- getRow.put("col",col);
- getRow.put("rowspan",row.get("rowCount"));
- getRow.put("colspan",0);
+ getRow.put("row", row.get("RowNum"));
+ getRow.put("col", col);
+ getRow.put("rowspan", row.get("rowCount"));
+ getRow.put("colspan", 0);
rowCount.add(getRow);
});
});
- map.put("mergeCells",rowCount);
+ map.put("mergeCells", rowCount);
return map;
}
- public Map<String,Object> crossProcessBreakingSv(Integer pageNum, Integer pageSize, List<String> selectDate, DamageDetails damageDetails) {
- Integer offset = (pageNum-1)*pageSize;
+ public Map<String, Object> crossProcessBreakingSv(Integer pageNum, Integer pageSize, List<String> selectDate, DamageDetails damageDetails) {
+ 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()){
+ if (selectDate != null && selectDate.size() == 2) {
+ if (!selectDate.get(0).isEmpty()) {
startDate = selectDate.get(0);
}
- if(!selectDate.get(1).isEmpty()){
+ if (!selectDate.get(1).isEmpty()) {
endDate = selectDate.get(1);
}
}
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.getProcessBreaking(offset, pageSize, startDate, endDate, damageDetails));
- map.put("total",reportMapper.getProcessBreakingTotal(offset, pageSize, startDate, endDate, damageDetails));
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.getProcessBreaking(offset, pageSize, startDate, endDate, damageDetails));
+ map.put("total", reportMapper.getProcessBreakingTotal(offset, pageSize, startDate, endDate, damageDetails));
List<String> list = new ArrayList<>();
list.add(startDate);
list.add(endDate);
- map.put("selectDate",list);
+ map.put("selectDate", list);
// map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail));
return map;
}
- public Map<String,Object> workInProgressSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report) {
+ public Map<String, Object> workInProgressSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report) {
if ("null".equals(orderId)) {
orderId = "";
@@ -132,46 +131,48 @@
if ("null".equals(inputProject)) {
inputProject = "";
}
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.workInProgressMp( selectTime1, selectTime2,orderId,inputProject,selectProcesses,report));
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.workInProgressMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
map.put("process", productionSchedulingMapper.selectProcess());
return map;
}
- public Map<String,Object> selectProcessToBeCompletedSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report) {
+ public Map<String, Object> selectProcessToBeCompletedSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report) {
if ("null".equals(orderId)) {
orderId = "";
}
if ("null".equals(inputProject)) {
inputProject = "";
}
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.processToBeCompletedMp( selectTime1, selectTime2,orderId,inputProject,selectProcesses,report));
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.processToBeCompletedMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
map.put("process", productionSchedulingMapper.selectProcess());
return map;
}
- public Map<String,Object> selectDamageReportSv(Date selectTime1, Date selectTime2, Report report) {
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.selectDamageReportMp( selectTime1, selectTime2,report));
+ public Map<String, Object> selectDamageReportSv(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, DamageReportDTO damageReportDTO) {
+ Integer offset = (pageNum - 1) * pageSize;
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.selectDamageReportMp(offset, pageSize, selectTime1, selectTime2, damageReportDTO));
+ map.put("total", reportMapper.getDamageReportPageTotal(offset, pageSize, selectTime1, selectTime2, damageReportDTO));
return map;
}
- public Map<String,Object> splittingDetailsOutsideSv(String orderId, Report report) {
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.splittingDetailsOutsideMp( orderId,report));
+ public Map<String, Object> splittingDetailsOutsideSv(String orderId, Report report) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.splittingDetailsOutsideMp(orderId, report));
return map;
}
- public Map<String,Object> qualityReportSv(Date selectTime1, Date selectTime2, Report report) {
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.qualityReportMp( selectTime1,selectTime2,report));
+ public Map<String, Object> qualityReportSv(Date selectTime1, Date selectTime2, Report report) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.qualityReportMp(selectTime1, selectTime2, report));
return map;
}
- public Map<String,Object> yieldSv(Date selectTime1, Date selectTime2, String selectProcesses, Report report) {
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.yieldMp( selectTime1,selectTime2,selectProcesses,report));
+ public Map<String, Object> yieldSv(Date selectTime1, Date selectTime2, String selectProcesses, Report report) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.yieldMp(selectTime1, selectTime2, selectProcesses, report));
map.put("process", productionSchedulingMapper.selectProcess());
return map;
}
@@ -182,24 +183,24 @@
map.put("data", reportMapper.productionScheduleMp(orderId));
//鑾峰彇琛ㄥご宸ュ簭绛涢�夋暟鎹�
- List<Map<String,String>> processFilterList = orderProcessDetailMapper.filterOrderProcess(orderId);
- List<Map<String,String>> processList = processFilterList;
+ List<Map<String, String>> processFilterList = orderProcessDetailMapper.filterOrderProcess(orderId);
+ List<Map<String, String>> processList = processFilterList;
List<String> filterList = new ArrayList<>();
//寰幆閬嶅巻鏁扮粍锛屽垽鏂搴忓彿褰撳墠鐨勫伐搴�
for (int i = 1; i < processFilterList.size(); i++) {
filterList.add(processFilterList.get(i).get("process"));
- List<Map<String,String>> lastProcessList =
+ List<Map<String, String>> lastProcessList =
orderProcessDetailMapper.filterLastProcess(
orderId,
String.valueOf(processFilterList.get(i).get("order_number")),
String.valueOf(processFilterList.get(i).get("technology_number")),
String.valueOf(processFilterList.get(i).get("id"))
);
- if(!lastProcessList.isEmpty()){
+ if (!lastProcessList.isEmpty()) {
int finalI = i;
lastProcessList.forEach(lastProcess -> {
- if(filterList.contains(lastProcess.get("process"))){
+ if (filterList.contains(lastProcess.get("process"))) {
processList.add(lastProcess);
}
});
@@ -222,27 +223,25 @@
seenValues.add(value);
}
}
- map.put("title", uniqueList );
+ map.put("title", uniqueList);
-
-
- List<Map<String,Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
- List<Map<String,Integer>> rowCount = new ArrayList<>();
- columns.forEach(col ->{
- getRowCount.forEach(row ->{
- Map<String,Integer> getRow = new HashMap<>();
+ List<Map<String, Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId);
+ List<Map<String, Integer>> rowCount = new ArrayList<>();
+ columns.forEach(col -> {
+ getRowCount.forEach(row -> {
+ Map<String, Integer> getRow = new HashMap<>();
// { row: 0, col: 1, rowspan: 3, colspan: 0},
- getRow.put("row",row.get("RowNum"));
- getRow.put("col",col);
- getRow.put("rowspan",row.get("rowCount"));
- getRow.put("colspan",0);
+ getRow.put("row", row.get("RowNum"));
+ getRow.put("col", col);
+ getRow.put("rowspan", row.get("rowCount"));
+ getRow.put("colspan", 0);
rowCount.add(getRow);
});
});
- map.put("mergeCells",rowCount);
+ map.put("mergeCells", rowCount);
return map;
}
@@ -250,27 +249,27 @@
public Map<String, Object> taskCompletionStatusSv(Date selectTime1, Date selectTime2, List<Integer> columns) {
Map<String, Object> map = new HashMap<>();
//鑾峰彇琛ㄦ牸鍐呭鏁版嵁
- map.put("data", reportMapper.taskCompletionStatusMp(selectTime1,selectTime2));
+ map.put("data", reportMapper.taskCompletionStatusMp(selectTime1, selectTime2));
//鑾峰彇琛ㄥご宸ュ簭绛涢�夋暟鎹�
- List<Map<String,String>> processFilterList = orderProcessDetailMapper.filterOrderProcessCollect(selectTime1,selectTime2);
- List<Map<String,String>> processList = processFilterList;
+ List<Map<String, String>> processFilterList = orderProcessDetailMapper.filterOrderProcessCollect(selectTime1, selectTime2);
+ List<Map<String, String>> processList = processFilterList;
List<String> filterList = new ArrayList<>();
//寰幆閬嶅巻鏁扮粍锛屽垽鏂搴忓彿褰撳墠鐨勫伐搴�
for (int i = 1; i < processFilterList.size(); i++) {
filterList.add(processFilterList.get(i).get("process"));
- List<Map<String,String>> lastProcessList =
+ List<Map<String, String>> lastProcessList =
orderProcessDetailMapper.filterLastProcess(
String.valueOf(processFilterList.get(i).get("order_id")),
String.valueOf(processFilterList.get(i).get("order_number")),
String.valueOf(processFilterList.get(i).get("technology_number")),
String.valueOf(processFilterList.get(i).get("id"))
);
- if(!lastProcessList.isEmpty()){
+ if (!lastProcessList.isEmpty()) {
int finalI = i;
lastProcessList.forEach(lastProcess -> {
- if(filterList.contains(lastProcess.get("process"))){
+ if (filterList.contains(lastProcess.get("process"))) {
processList.add(lastProcess);
}
});
@@ -293,44 +292,79 @@
seenValues.add(value);
}
}
- map.put("title", uniqueList );
+ map.put("title", uniqueList);
-
-
- List<Map<String,Integer>> getRowCount = orderProcessDetailMapper.getGlassLRowCollect(selectTime1,selectTime2);
- List<Map<String,Integer>> rowCount = new ArrayList<>();
- columns.forEach(col ->{
- getRowCount.forEach(row ->{
- Map<String,Integer> getRow = new HashMap<>();
+ List<Map<String, Integer>> getRowCount = orderProcessDetailMapper.getGlassLRowCollect(selectTime1, selectTime2);
+ List<Map<String, Integer>> rowCount = new ArrayList<>();
+ columns.forEach(col -> {
+ getRowCount.forEach(row -> {
+ Map<String, Integer> getRow = new HashMap<>();
// { row: 0, col: 1, rowspan: 3, colspan: 0},
- getRow.put("row",row.get("RowNum"));
- getRow.put("col",col);
- getRow.put("rowspan",row.get("rowCount"));
- getRow.put("colspan",0);
+ getRow.put("row", row.get("RowNum"));
+ getRow.put("col", col);
+ getRow.put("rowspan", row.get("rowCount"));
+ getRow.put("colspan", 0);
rowCount.add(getRow);
});
});
- map.put("mergeCells",rowCount);
+ map.put("mergeCells", rowCount);
return map;
}
- public Map<String,Object> orderPlanDecompositionSv(Date selectTime1, Date selectTime2,Report report) {
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.orderPlanDecompositionMp( selectTime1,selectTime2,report));
+ public Map<String, Object> orderPlanDecompositionSv(Date selectTime1, Date selectTime2, Report report) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.orderPlanDecompositionMp(selectTime1, selectTime2, report));
return map;
}
- public Map<String,Object> rawMaterialRequisitionSv(Date selectTime1, Date selectTime2, Report report) {
- Map<String,Object> map = new HashMap<>();
- map.put("data",reportMapper.rawMaterialRequisitionMp( selectTime1,selectTime2,report));
+ public Map<String, Object> rawMaterialRequisitionSv(Date selectTime1, Date selectTime2, Report report) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", reportMapper.rawMaterialRequisitionMp(selectTime1, selectTime2, report));
return map;
}
public List exportCrossProcessBreakingSv(List<LocalDate> dates) {
return reportMapper.exportCrossProcessBreakingMp(dates);
}
+
+ public List exportDamageReportSv(List<LocalDate> dates) {
+
+ return reportMapper.exportDamageReportMp(dates);
+ }
+
+ public List exportOrderPlanDecompositionSv(List<LocalDate> dates) {
+ return reportMapper.exportOrderPlanDecompositionMp(dates);
+ }
+
+ public List exportProcessToBeCompletedSv(Map<String, Object> dates) {
+ List<LocalDate> date= (List<LocalDate>) dates.get("date");
+ String process= (String) dates.get("processes");
+ String inputVal= (String) dates.get("inputVal");
+ String project= (String) dates.get("project");
+ if ("null".equals(inputVal)) {
+ inputVal = "";
+ }
+ if ("null".equals(project)) {
+ project = "";
+ }
+ return reportMapper.exportProcessToBeCompletedMp(date,process,inputVal,project);
+ }
+
+ public List exportWorkInProgressSv(Map<String, Object> dates) {
+ List<LocalDate> date= (List<LocalDate>) dates.get("date");
+ String process= (String) dates.get("processes");
+ String inputVal= (String) dates.get("inputVal");
+ String project= (String) dates.get("project");
+ if ("null".equals(inputVal)) {
+ inputVal = "";
+ }
+ if ("null".equals(project)) {
+ project = "";
+ }
+ return reportMapper.exportWorkInProgressMp(date,process,inputVal,project);
+ }
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
index 7a351f4..e81a0ae 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -191,7 +191,7 @@
damageDetail.setOrderNumber(reportingWorkDetail.getOrderNumber());
damageDetail.setProcessId(reportingWork.getProcessId());
damageDetail.setTechnologyNumber(reportingWorkDetail.getTechnologyNumber());
- if (damageDetail.getResponsibleProcess() != reportingWork.getThisProcess()) {
+ if (!damageDetail.getResponsibleProcess().equals(reportingWork.getThisProcess())) {
damageDetail.setQualityInsStatus(1);
}
damageDetailsMapper.insert(damageDetail);
@@ -319,6 +319,8 @@
map.put("reportingWork", reportingWork);
map.put("reportingWorkDetails", reportingWorkDetails);
map.put("basic", getReportingWorkBase(reportingWork.getProcessId(), reportingWork.getThisProcess()));
+ //鏍规嵁鎶ュ伐缂栧彿鑾峰彇灞�
+ map.put("layer", reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId));
return map;
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index 6b52ee7..4a7553f 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -85,6 +85,24 @@
<result column="bend_radius" property="bendRadius"/>
</resultMap>
+ <resultMap id="damageReportMap" type="com.example.erp.dto.pp.DamageReportDTO">
+ <result column="order_id" property="orderId"/>
+ <result column="reporting_work_time" property="reportingWorkTime"/>
+ <result column="area" property="area"/>
+ <result column="breakage_quantity" property="breakageQuantity"/>
+ <result column="project" property="project"/>
+ <result column="process_id" property="processId"/>
+ <result column="order_number" property="orderNumber"/>
+ <result column="technology_number" property="technologyNumber"/>
+ <result column="responsible_process" property="responsibleProcess"/>
+ <result column="responsible_team" property="responsibleTeam"/>
+ <result column="responsible_equipment" property="responsibleEquipment"/>
+ <result column="breakage_type" property="breakageType"/>
+ <result column="breakage_reason" property="breakageReason"/>
+ <result column="personnel" property="personnel"/>
+ <result column="glass_child" property="glassChild"/>
+ </resultMap>
+
<!-- 娴佺▼鍗¤繘搴�-->
<select id="processCardProgressMp">
@@ -365,7 +383,7 @@
order by fc.process_id, fc.order_number, fc.technology_number
</select>
- <select id="selectDamageReportMp">
+ <select id="selectDamageReportMp" resultMap="damageReportMap">
SELECT
o.order_id,
o.project,
@@ -393,8 +411,88 @@
rw.reporting_work_time between #{selectTime1} and #{selectTime2}
AND dd.available = 0
AND LENGTH( rw.process_id )= 14
+ <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''">
+ and o.order_id regexp #{damageReportDTO.orderId}
+ </if>
+ <if test="damageReportDTO.project != null and damageReportDTO.project != ''">
+ and o.project regexp #{damageReportDTO.project}
+ </if>
+ <if test="damageReportDTO.processId != null and damageReportDTO.processId != ''">
+ and rw.process_id regexp #{damageReportDTO.processId}
+ </if>
+ <if test="damageReportDTO.orderNumber != null and damageReportDTO.orderNumber != ''">
+ and dd.order_number regexp #{damageReportDTO.orderNumber}
+ </if>
+ <if test="damageReportDTO.technologyNumber != null and damageReportDTO.technologyNumber != ''">
+ and dd.technology_number regexp #{damageReportDTO.technologyNumber}
+ </if>
+ <if test="damageReportDTO.responsibleProcess != null and damageReportDTO.responsibleProcess != ''">
+ and dd.responsible_process regexp #{damageReportDTO.responsibleProcess}
+ </if>
+ <if test="damageReportDTO.responsibleTeam != null and damageReportDTO.responsibleTeam != ''">
+ and dd.responsible_team regexp #{damageReportDTO.responsibleTeam}
+ </if>
+ <if test="damageReportDTO.responsibleEquipment != null and damageReportDTO.responsibleEquipment != ''">
+ and dd.responsible_equipment regexp #{damageReportDTO.responsibleEquipment}
+ </if>
+ <if test="damageReportDTO.breakageType != null and damageReportDTO.breakageType != ''">
+ and dd.breakage_type regexp #{damageReportDTO.breakageType}
+ </if>
+ <if test="damageReportDTO.breakageReason != null and damageReportDTO.breakageReason != ''">
+ and dd.breakage_reason regexp #{damageReportDTO.breakageReason}
+ </if>
GROUP BY
dd.id
+ limit #{offset},#{pageSize};
+ </select>
+
+ <select id="getDamageReportPageTotal">
+ SELECT
+ CEILING(count(dd.id)/#{pageSize}) as 'pageTotal',
+ count(distinct dd.id) as 'total'
+ FROM
+ sd.ORDER AS o
+ LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id
+ LEFT JOIN reporting_work AS rw ON rw.order_id = o.order_id
+ LEFT JOIN damage_details AS dd ON dd.reporting_work_id = rw.reporting_work_id
+ AND dd.order_number = ogd.order_number
+ AND dd.technology_number = ogd.technology_number
+ WHERE
+ rw.reporting_work_time between #{selectTime1} and #{selectTime2}
+ AND dd.available = 0
+ AND LENGTH( rw.process_id )= 14
+ <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''">
+ and o.order_id regexp #{damageReportDTO.orderId}
+ </if>
+ <if test="damageReportDTO.project != null and damageReportDTO.project != ''">
+ and o.project regexp #{damageReportDTO.project}
+ </if>
+ <if test="damageReportDTO.processId != null and damageReportDTO.processId != ''">
+ and rw.process_id regexp #{damageReportDTO.processId}
+ </if>
+ <if test="damageReportDTO.orderNumber != null and damageReportDTO.orderNumber != ''">
+ and dd.order_number regexp #{damageReportDTO.orderNumber}
+ </if>
+ <if test="damageReportDTO.technologyNumber != null and damageReportDTO.technologyNumber != ''">
+ and dd.technology_number regexp #{damageReportDTO.technologyNumber}
+ </if>
+ <if test="damageReportDTO.responsibleProcess != null and damageReportDTO.responsibleProcess != ''">
+ and dd.responsible_process regexp #{damageReportDTO.responsibleProcess}
+ </if>
+ <if test="damageReportDTO.responsibleTeam != null and damageReportDTO.responsibleTeam != ''">
+ and dd.responsible_team regexp #{damageReportDTO.responsibleTeam}
+ </if>
+ <if test="damageReportDTO.responsibleEquipment != null and damageReportDTO.responsibleEquipment != ''">
+ and dd.responsible_equipment regexp #{damageReportDTO.responsibleEquipment}
+ </if>
+ <if test="damageReportDTO.breakageType != null and damageReportDTO.breakageType != ''">
+ and dd.breakage_type regexp #{damageReportDTO.breakageType}
+ </if>
+ <if test="damageReportDTO.breakageReason != null and damageReportDTO.breakageReason != ''">
+ and dd.breakage_reason regexp #{damageReportDTO.breakageReason}
+ </if>
+
+ limit #{offset},#{pageSize};
</select>
<select id="splittingDetailsOutsideMp">
@@ -701,4 +799,212 @@
GROUP BY dd.id
order by dd.id desc
</select>
+
+ <select id="exportDamageReportMp">
+ SELECT o.order_id,
+ o.project,
+ rw.process_id,
+ dd.order_number,
+ dd.technology_number,
+ date(rw.reporting_work_time) as reporting_work_time,
+ dd.responsible_process,
+ dd.responsible_team,
+ dd.responsible_equipment,
+ dd.breakage_type,
+ dd.breakage_reason,
+ dd.breakage_quantity,
+ round(ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2) as area,
+ IFNULL(dd.responsible_personnel, '') as personnel,
+ ogd.glass_child
+ FROM sd.ORDER AS o
+ LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id
+ LEFT JOIN reporting_work AS rw ON rw.order_id = o.order_id
+ LEFT JOIN damage_details AS dd ON dd.reporting_work_id = rw.reporting_work_id
+ AND dd.order_number = ogd.order_number
+ AND dd.technology_number = ogd.technology_number
+ WHERE date(rw.reporting_work_time) >= #{dates[0]}
+ and date(rw.reporting_work_time) <= #{dates[1]}
+ AND dd.available = 0
+ AND LENGTH(rw.process_id) = 14
+ GROUP BY dd.id
+ </select>
+
+ <select id="exportOrderPlanDecompositionMp">
+ SELECT
+ o.order_id,
+ o.customer_name,
+ o.project,
+ o.batch,
+ o.quantity,
+ o.area,
+ date(fc.create_time) as create_time,
+ date(orw.startTime) as startTime,
+ oopd.completionsNum,
+ sum( DISTINCT fc.received_quantity ) AS received_quantity,
+ sum( DISTINCT fc.quantity - fc.received_quantity ) AS receivedNo,
+ IF(fc.quantity=fc.received_quantity,'宸叉竻鍗�','') as accomplish,
+ DATEDIFF(
+ MAX( rw.reporting_work_time ),
+ min( rw.reporting_work_time ))+1 AS daysDifference
+ FROM
+ sd.`order` AS o
+ LEFT JOIN flow_card AS fc ON fc.order_id = o.order_id
+ LEFT JOIN (
+ SELECT
+ a.order_id,
+ MIN( b.reporting_work_time ) AS startTime
+ FROM
+ sd.`order` AS a
+ LEFT JOIN reporting_work AS b ON a.order_id = b.order_id
+ WHERE
+ b.this_process = '鍒囧壊'
+ AND date(a.create_time) >= #{dates[0]}
+ and date(a.create_time) <= #{dates[1]}
+
+ GROUP BY
+ a.order_id
+ ) AS orw ON orw.order_id = o.order_id
+ LEFT JOIN (
+ SELECT
+ a.order_id,
+ SUM( b.reporting_work_num ) AS completionsNum
+ FROM
+ sd.`order` AS a
+ LEFT JOIN sd.order_process_detail AS b ON a.order_id = b.order_id
+ WHERE
+ b.process = '鍖呰'
+ AND date(a.create_time) >= #{dates[0]}
+ and date(a.create_time) <= #{dates[1]}
+ GROUP BY
+ a.order_id
+ ) AS oopd ON oopd.order_id = o.order_id
+ LEFT JOIN reporting_work AS rw ON rw.order_id = fc.order_id
+ AND rw.process_id = fc.process_id
+ WHERE
+ date(o.create_time) >= #{dates[0]}
+ and date(o.create_time) <= #{dates[1]}
+ AND fc.create_time IS NOT NULL
+ GROUP BY
+ o.order_id
+ </select>
+
+ <select id="exportProcessToBeCompletedMp">
+ select DATE(o.create_time) as create_time,
+ DATE(o.delivery_date) as delivery_date,
+ o.order_id,
+ fc.process_id,
+ o.customer_name,
+ o.project,
+ o.batch,
+ od.order_number,
+ ogd.technology_number,
+ ogd.glass_child,
+ ogd.child_width,
+ ogd.child_height,
+ od.quantity,
+ ROUND(ogd.child_width * ogd.child_height / 1000000, 2) as childArea,
+ ROUND(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as actualArea,
+ odpd.reporting_work_num as completeNum,
+ ROUND(ogd.child_width * ogd.child_height * odpd.reporting_work_num / 1000000,
+ 2) as completeArea,
+ od.quantity - odpd.reporting_work_num as incompleteNum,
+ ROUND(ogd.child_width * ogd.child_height * (od.quantity - odpd.reporting_work_num) / 1000000,
+ 2) as incompleteArea,
+ od.product_name
+
+ from sd.order_detail AS od
+ LEFT JOIN sd.order_glass_detail AS ogd
+ ON od.order_id = ogd.order_id
+ AND od.order_number = ogd.order_number
+ LEFT JOIN flow_card AS fc
+ ON fc.order_id = ogd.order_id
+ and fc.production_id = ogd.production_id
+ AND fc.order_number = ogd.order_number
+ AND fc.technology_number = ogd.technology_number
+ left join sd.order_process_detail as odpd
+ ON odpd.order_id = fc.order_id
+ AND odpd.order_number = fc.order_number
+ AND odpd.technology_number = fc.technology_number
+ and odpd.process_id = fc.process_id
+ left join sd.`order` as o
+ on o.order_id = od.order_id
+ where LENGTH(fc.process_id) = 14
+ and odpd.process = #{process}
+ and date(o.create_time) >= #{date[0]}
+ and date(o.create_time) <= #{date[1]}
+ and position(ifnull(#{inputVal},'') in od.order_id)
+ and position(ifnull(#{project},'') in o.project)
+ and od.quantity > odpd.reporting_work_num
+
+ group by fc.process_id, fc.order_number, fc.technology_number
+ order by fc.process_id, fc.order_number, fc.technology_number
+ </select>
+
+ <select id="exportWorkInProgressMp">
+ select #{process} as thisProcess,
+ fc.process_id,
+ o.customer_name,
+ o.project,
+ o.order_id,
+ o.batch,
+ od.shape,
+ ogd.order_number,
+ ogd.technology_number,
+ ogd.process,
+ od.quantity,
+ ogd.child_width,
+ ogd.child_height,
+ odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
+ odpd.broken_num as stockNum,
+ ROUND(ogd.child_width * ogd.child_height *
+ (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
+ odpd.broken_num) / 1000000, 2) as stockArea,
+ od.product_name,
+ od.bend_radius
+
+ from sd.order_detail AS od
+ LEFT JOIN sd.order_glass_detail AS ogd
+ ON od.order_id = ogd.order_id
+ AND od.order_number = ogd.order_number
+ LEFT JOIN flow_card AS fc
+ ON fc.order_id = ogd.order_id
+ and fc.production_id = ogd.production_id
+ AND fc.order_number = ogd.order_number
+ AND fc.technology_number = ogd.technology_number
+ left join sd.order_process_detail as odpd
+ ON odpd.order_id = fc.order_id
+ AND odpd.order_number = fc.order_number
+ AND odpd.technology_number = fc.technology_number
+ and odpd.process_id = fc.process_id
+ left join sd.order_process_detail as odpds
+ ON odpds.id = odpd.id - 1
+ left join
+ (SELECT sum(rw.rework_num) as 'patchNumSum',
+ rw.process_id,
+ rw.order_sort,
+ rw.technology_number,
+ rwk.this_process
+ from rework as rw
+ LEFT JOIN
+ reporting_work as rwk
+ on rw.reporting_work_id = rwk.reporting_work_id
+ where rwk.this_process = #{process}
+ and rw.review_status = 1
+ GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c
+ on c.process_id = fc.process_id
+ and c.order_sort = fc.order_number
+ and c.technology_number = fc.technology_number
+ left join sd.`order` as o
+ on o.order_id = od.order_id
+ where LENGTH(fc.process_id) = 14
+ and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count -
+ odpd.broken_num != 0
+ and odpd.process = #{process} and date(o.create_time) >= #{date[0]}
+ and date(o.create_time) <= #{date[1]}
+ and position(ifnull(#{inputVal},'') in od.order_id)
+ and position(ifnull(#{project},'') in o.project)
+
+ group by fc.process_id, fc.order_number, fc.technology_number
+ order by fc.process_id, fc.order_number, fc.technology_number
+ </select>
</mapper>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
index e59aff1..98403f5 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -418,7 +418,7 @@
right join flow_card as c
on c.process_id = b.process_id
- left join reporting_work_detail as a
+ right join reporting_work_detail as a
on a.reporting_work_id = b.reporting_work_id
and c.order_number=a.order_number
and c.technology_number = a.technology_number
@@ -741,4 +741,9 @@
GROUP BY rwd.order_number, ogd.glass_child, rwd.technology_number, dd.id
ORDER BY rwd.order_number
</select>
+
+ <select id="selectLayerByReportingWorkId">
+ select REPLACE(GROUP_CONCAT(DISTINCT rwd.technology_number),',','') from reporting_work_detail as rwd
+ where rwd.reporting_work_id=#{reportingWorkId}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0