部分报表导出,修改报工新增后质检状态不正确问题,修改报工编辑后查询数据错误问题
| | |
| | | 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: {}, |
| | |
| | | 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: {}, |
| | |
| | | title: t('processCard.processId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 130, |
| | | width: 100, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | |
| | | 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')}, |
| | |
| | | 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.processId = processId |
| | | item.landingSequence = index |
| | | item.baiscQuantity=item.baiscQuantity - checkedNum.value |
| | | }) |
| | | item.computeGrossArea = item.computeGrossArea - item.width * item.height * checkedNum.value / 1000000 |
| | | |
| | | //删除key |
| | | checkedList.forEach((item) => { |
| | | let key = item._X_ROW_KEY |
| | | delete item._X_ROW_KEY |
| | | if (item.baiscQuantity===0){ |
| | | $grid.remove(checkedList) |
| | | } |
| | | $gridLeft.insertAt(checkedList) |
| | | $gridLeft.insertAt(item) |
| | | //重新赋值key |
| | | item._X_ROW_KEY = key |
| | | }) |
| | | |
| | | |
| | | |
| | | //清除两边复选框 |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | | } |
| | | else if (checkedNum.value === '') {//判断数量输入框无输入数字 |
| | | } else if (checkedNum.value === '') {//判断数量输入框无输入数字 |
| | | |
| | | checkedList.forEach((item) => { |
| | | item.processId = processId |
| | |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //向右边表格添加数据 |
| | |
| | | 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 === '') {//判断数量输入框无输入数字 |
| | |
| | | //无输入并且如果右边表格数据中存在当前数据则数量相加 |
| | | 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) |
| | |
| | | //判断可用数量是否大于等于输入的数量,不满足则抛出异常 |
| | | 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 |
| | | //左边表格数据 |
| | |
| | | //如果右边表格数据中存在当前数据则数量相加 |
| | | 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) |
| | |
| | | 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 |
| | |
| | | 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) |
| | | |
| | |
| | | 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) { |
| | | |
| | |
| | | $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) |
| | |
| | | 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) |
| | |
| | | <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"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | |
| | | <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> |
| | | |
| | |
| | | |
| | | 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"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | {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', |
| | |
| | | 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() |
| | |
| | | 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 |
| | |
| | | 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) { |
| | | |
| | | |
| | |
| | | |
| | | 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) |
| | | } |
| | |
| | | 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 |
| | | // } |
| | | // |
| | | 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) => { |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | {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: '责任工序', showOverflow: "ellipsis"}, |
| | | {field: 'responsible_team', width: 100, title: '责任班组'}, |
| | | {field: 'responsible_equipment', width: 120, title: '责任设备'}, |
| | | {field: 'breakage_type', width: 120, title: '次破类型'}, |
| | | {field: 'breakage_reason', width: 120, title: '次破原因'}, |
| | | {field: 'breakage_quantity', width: 120, title: '次破数量'}, |
| | | {field: 'responsibleProcess', width: 120, title: '责任工序',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, showOverflow: "ellipsis"}, |
| | | {field: 'responsibleTeam', width: 100, title: '责任班组',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'responsibleEquipment', width: 120, title: '责任设备',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: '责任人员'}, |
| | | {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 |
| | | }, |
| | |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | @filter-change="filterChanged" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | </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> |
| | |
| | | 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() |
| | |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', width: 120, title: '订数量', filters: [{data: ''}], |
| | | field: 'quantity', width: 120, title: '订单数量', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | </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> |
| | |
| | | {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: '入库面积'}, |
| | |
| | | // }], |
| | | // import: false, |
| | | // export: true, |
| | | print: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | const mergeCells = ref([ |
| | | |
| | | ]) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | </template> |
| | | |
| | | |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | } |
| | | |
| | | }) |
| | | 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')) { // 非IE下载 |
| | | 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> |
| | | |
| | |
| | | <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"> |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | |
| | | }) |
| | | |
| | | 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')) { // 非IE下载 |
| | | 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> |
| | |
| | | <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> |
| | |
| | | |
| | | }) |
| | | let detail = ref([]) |
| | | let layer='' |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | |
| | | 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', |
| | |
| | | |
| | | gridOptions.toolbarConfig.buttons.push(button) |
| | | } |
| | | getQuantity() |
| | | // getQuantity() |
| | | inputDisabled.value = true |
| | | }) |
| | | } |
| | |
| | | } |
| | | let indexOfChar = processId.indexOf("/") |
| | | let leftString = processId.slice(0, indexOfChar) |
| | | if (leftString.length !== 14) { |
| | | if (leftString.length < 14) { |
| | | ElMessage.warning("请输入正确位数的流程卡") |
| | | return |
| | | } |
| | |
| | | } |
| | | let indexOfChar = processId.indexOf("/") |
| | | let leftString = processId.slice(0, indexOfChar) |
| | | if (leftString.length != 14) { |
| | | if (leftString.length < 14) { |
| | | ElMessage.warning("请输入正确位数的流程卡") |
| | | return |
| | | } |
| | |
| | | //流程卡号 |
| | | 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){ |
| | |
| | | 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; |
| | |
| | | |
| | | @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}") |
| | |
| | | @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"); |
| | | } |
| | | } |
| | |
| | | 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("责任工序") |
| | | private String responsibleProcess; |
| | | @ExcelProperty("责任班组") |
| | | 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; |
| | | } |
New file |
| | |
| | | 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("责任工序") |
| | | private String responsibleProcess; |
| | | @ExcelProperty("责任班组") |
| | | private String responsibleTeam; |
| | | @ExcelProperty("责任设备") |
| | | private String responsibleEquipment; |
| | | @ExcelProperty("次破类型") |
| | | private String breakageType; |
| | | @ExcelProperty("次破原因") |
| | | private String breakageReason; |
| | | @ExcelProperty("次破数量") |
| | | private Integer breakageQuantity; |
| | | @ExcelProperty("次破面积") |
| | | private Double area; |
| | | @ExcelProperty("责任人员") |
| | | private String personnel; |
| | | @ExcelProperty("单片名称") |
| | | private String glassChild; |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | 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); |
| | | |
| | |
| | | |
| | | 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, |
| | |
| | | Boolean updateQualityStatusMp(String reportingWorkId,String username); |
| | | |
| | | List<Map<String,String>> detailsQualityMp(String reportingWorkId, ReportingWork reportingWork); |
| | | |
| | | String selectLayerByReportingWorkId(String reportingWorkId); |
| | | } |
| | |
| | | |
| | | 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; |
| | |
| | | map.put("title", uniqueList ); |
| | | |
| | | |
| | | |
| | | |
| | | List<Map<String,Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId); |
| | | List<Map<String,Integer>> rowCount = new ArrayList<>(); |
| | | columns.forEach(col ->{ |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String,Object> selectDamageReportSv(Date selectTime1, Date selectTime2, Report 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( selectTime1, selectTime2,report)); |
| | | map.put("data", reportMapper.selectDamageReportMp(offset, pageSize, selectTime1, selectTime2, damageReportDTO)); |
| | | map.put("total", reportMapper.getDamageReportPageTotal(offset, pageSize, selectTime1, selectTime2, damageReportDTO)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | map.put("title", uniqueList ); |
| | | |
| | | |
| | | |
| | | |
| | | List<Map<String,Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId); |
| | | List<Map<String,Integer>> rowCount = new ArrayList<>(); |
| | | columns.forEach(col ->{ |
| | |
| | | map.put("title", uniqueList ); |
| | | |
| | | |
| | | |
| | | |
| | | List<Map<String,Integer>> getRowCount = orderProcessDetailMapper.getGlassLRowCollect(selectTime1,selectTime2); |
| | | List<Map<String,Integer>> rowCount = new ArrayList<>(); |
| | | columns.forEach(col ->{ |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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); |
| | |
| | | map.put("reportingWork", reportingWork); |
| | | map.put("reportingWorkDetails", reportingWorkDetails); |
| | | map.put("basic", getReportingWorkBase(reportingWork.getProcessId(), reportingWork.getThisProcess())); |
| | | //根据报工编号获取层 |
| | | map.put("layer", reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId)); |
| | | |
| | | |
| | | return map; |
| | |
| | | <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"> |
| | |
| | | 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, |
| | |
| | | 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"> |
| | |
| | | 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> |
| | |
| | | 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 |
| | |
| | | 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> |