| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | let filterData = ref({}) |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '', |
| | | project: '' |
| | | }) |
| | | |
| | | //工序 |
| | | const value = ref('磨边') |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | //第一次加载数据 |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, 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 = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | |
| | | request.post(`/report/selectProcessToBeCompleted/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, 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) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | // const changeFilterEvent = (event, option, $panel,) => { |
| | | // // 手动触发筛选 |
| | | // $panel.changeOption(event, !!option.data, option) |
| | | // } |
| | | |
| | | // function filterChanged(column){ |
| | | // //gridOptions.loading=true |
| | | // //筛选条件发生变化条件发生变化 |
| | | // let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | // value = value.trim() |
| | | // //判断是否存在外键 |
| | | // if (column.property.indexOf('.')>-1){ |
| | | // const columnArr = column.property.split('.') |
| | | // filterData.value[columnArr[0]] = { |
| | | // [columnArr[1]]:value |
| | | // } |
| | | // }else{ |
| | | // filterData.value[column.property] = value |
| | | // } |
| | | // |
| | | // gridOptions.loading = true |
| | | // |
| | | // } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '1', title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '2', title: '单片名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '3',title: '未完数', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '4', title: '未完面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | |
| | | {field: 'create_time', width: 120, title: '下单时间'}, |
| | | {field: 'delivery_date', width: 120, title: '交货日期'}, |
| | | { |
| | | field: 'order_id', width: 120, title: '销售单号', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | width: 120, |
| | | title: '流程卡号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'customer_name', width: 130, title: '客户名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: '项目名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'batch', width: 100, title: '批次', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'order_number', width: 100, title: '序号'}, |
| | | {field: 'technology_number', width: 120, title: '小片顺序', showOverflow: "ellipsis"}, |
| | | {field: 'glass_child', width: 100, title: '单片名称'}, |
| | | {field: 'child_width', width: 120, title: '宽'}, |
| | | {field: 'child_height', width: 120, title: '高'}, |
| | | {field: 'quantity', width: 120, title: '订单数量'}, |
| | | {field: 'childArea', width: 120, title: '单片面积'}, |
| | | {field: 'actualArea', width: 120, title: '实际面积'}, |
| | | {field: 'completeNum', width: 120, title: '已完成数量'}, |
| | | {field: 'completeArea', width: 120, title: '已完成面积'}, |
| | | {field: 'incompleteNum', width: 120, title: '未完成数量'}, |
| | | {field: 'incompleteArea', width: 120, title: '未完成面积'}, |
| | | {field: 'product_name', width: 120, title: '成品名称'}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['finishedNumber','finishedArea','wornNumber','wornArea'] |
| | | let footList = [''] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | style="width: 100px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="查询类型"> |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input> |
| | | |
| | | <el-input v-model="form.project" clearable placeholder="项目名称" style="width: 130px"></el-input> |
| | | |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="primary" @click="getWorkOrder">查询</el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">反审</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <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> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #selectForm { |
| | | width: 60%; |
| | | text-align: center; |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '' |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum=ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime()- 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()+3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1=getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | //第一次加载数据 |
| | | request.post(`/reportingWork/selectReportingWork/1/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, 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 = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = ()=>{ |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | request.post(`/reportingWork/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | request.post(`/reportingWork/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | pageNum.value=currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | //获取选中时间 |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | request.post(`/reportingWork/selectReportingWork/1/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | pageTotal.value=res.data.total |
| | | total.pageTotal=parseInt(res.data.total) |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | |
| | | |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | <el-menu-item index="/main/report/ProcessCardProgress">流程卡进度</el-menu-item> |
| | | <el-menu-item index="/main/report/OrderPlanDecomposition">订单计划分解</el-menu-item> |
| | | </el-sub-menu> |
| | | <el-sub-menu index="2" popper-class="test"> |
| | | <template #title>产量报表</template> |
| | | <el-menu-item index="/main/report/TeamOutput">班组产量</el-menu-item> |
| | | <el-menu-item index="/main/report/EquipmentOutput">设备产量</el-menu-item> |
| | | </el-sub-menu> |
| | | <!-- <el-sub-menu index="2" popper-class="test">--> |
| | | <!-- <template #title>产量报表</template>--> |
| | | <!-- <el-menu-item index="/main/report/TeamOutput">班组产量</el-menu-item>--> |
| | | <!-- <el-menu-item index="/main/report/EquipmentOutput">设备产量</el-menu-item>--> |
| | | <!-- </el-sub-menu>--> |
| | | <el-sub-menu index="3" popper-class="test"> |
| | | <template #title>次破报表</template> |
| | | <el-menu-item index="/main/report/DamageReport">次破报表</el-menu-item> |
| | |
| | | <el-menu-item index="/main/report/RawMaterialRequisition">原片领料</el-menu-item> |
| | | <el-menu-item index="/main/report/QualityReport">品质报表</el-menu-item> |
| | | <el-menu-item index="/main/report/Yield">成品率报表</el-menu-item> |
| | | <el-menu-item index="/main/report/OrderBOMOutside">BOM报表</el-menu-item> |
| | | <!-- <el-menu-item index="/main/report/OrderBOMOutside">BOM报表</el-menu-item>--> |
| | | </el-menu> |
| | | </div> |
| | | |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router=useRouter() |
| | | let filterData = ref({}) |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '', |
| | | project: '' |
| | | }) |
| | | |
| | | //工序 |
| | | const value = ref('磨边') |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | //第一次加载数据 |
| | | request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, 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 |
| | | console.log(res.data.data) |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | |
| | | request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | console.log(startTime, endTime) |
| | | request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, 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 |
| | | console.log(res.data.data) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | // const changeFilterEvent = (event, option, $panel,) => { |
| | | // // 手动触发筛选 |
| | | // $panel.changeOption(event, !!option.data, option) |
| | | // } |
| | | |
| | | // function filterChanged(column){ |
| | | // //gridOptions.loading=true |
| | | // //筛选条件发生变化条件发生变化 |
| | | // let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | // value = value.trim() |
| | | // //判断是否存在外键 |
| | | // if (column.property.indexOf('.')>-1){ |
| | | // const columnArr = column.property.split('.') |
| | | // filterData.value[columnArr[0]] = { |
| | | // [columnArr[1]]:value |
| | | // } |
| | | // }else{ |
| | | // filterData.value[column.property] = value |
| | | // } |
| | | // |
| | | // gridOptions.loading = true |
| | | // |
| | | // } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '1', width: 120, title: '工序',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '2',width: 120, title: '流程卡号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '3', width: 130,title: '客户名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '4',width: 120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '5', width: 100,title: '批次', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '6', width: 100,title: '序号', sortable: true}, |
| | | {field: '7',width: 100, title: '形状', sortable: true}, |
| | | {field: '8',width: 120, title: '楼层编号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '9', width: 120,title: '工艺流程', sortable: true}, |
| | | {field: '10', width: 120,title: '订单数', sortable: true}, |
| | | {field: '11',width: 120, title: '宽', sortable: true}, |
| | | {field: '12',width: 120, title: '高', sortable: true}, |
| | | {field: '13',width: 120, title: '库存数', sortable: true}, |
| | | {field: '14',width: 120, title: '库存面积', sortable: true}, |
| | | {field: '15',width: 120, title: '成品名称', sortable: true}, |
| | | {field: '16',width: 120, title: '在制品名称', sortable: true}, |
| | | {field: '17',width: 120, title: '弯钢半径', sortable: true}, |
| | | { |
| | | field: 'thisProcess', width: 120, title: '工序', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | width: 120, |
| | | title: '流程卡号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'customer_name', width: 130, title: '客户名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: '项目名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'batch', width: 100, title: '批次', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'order_number', width: 100, title: '序号'}, |
| | | {field: 'technology_number', width: 120, title: '小片顺序', showOverflow: "ellipsis"}, |
| | | {field: 'shape', width: 100, title: '形状'}, |
| | | {field: 'process', width: 120, title: '工艺流程'}, |
| | | {field: 'quantity', width: 120, title: '订单数'}, |
| | | {field: 'child_width', width: 120, title: '宽'}, |
| | | {field: 'child_height', width: 120, title: '高'}, |
| | | {field: 'stockNum', width: 120, title: '库存数'}, |
| | | {field: 'stockArea', width: 120, title: '库存面积'}, |
| | | {field: 'product_name', width: 120, title: '成品名称'}, |
| | | {field: 'bend_radius', width: 120, title: '弯钢半径'}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['finishedNumber','finishedArea','wornNumber','wornArea'] |
| | | let footList = [''] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | style="width: 100px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="查询类型"> |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input> |
| | | |
| | | <el-input v-model="form.project" clearable placeholder="项目名称" style="width: 130px"></el-input> |
| | | |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="primary" @click="getWorkOrder">查询</el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">反审</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <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> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #selectForm { |
| | | width: 60%; |
| | | text-align: center; |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.Report; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation("在制品报表") |
| | | @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)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工序待完成报表") |
| | | @PostMapping("/selectProcessToBeCompleted/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}") |
| | | public Result selectProcessToBeCompleted( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String inputProject, |
| | | @PathVariable String selectProcesses, |
| | | @RequestBody Report report) { |
| | | return Result.seccess(reportService.selectProcessToBeCompletedSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report)); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class Report { |
| | | @TableId(type = IdType.AUTO) |
| | | //工序 |
| | | private String process; |
| | | //流程卡号 |
| | | private String processId; |
| | | //客户名称 |
| | | private String customerName; |
| | | //项目名称 |
| | | private String project; |
| | | //销售单号 |
| | | private String orderId; |
| | | //批次 |
| | | private String batch; |
| | | //序号 |
| | | private String orderNumber; |
| | | //小片顺序 |
| | | private String technologyNumber; |
| | | //形状 |
| | | private String shape; |
| | | //工艺流程 |
| | | private String technologyFlow; |
| | | //订单数 |
| | | private String orderNum; |
| | | //宽 |
| | | private String childWidth; |
| | | //高 |
| | | private String childHeight; |
| | | //库存数 |
| | | private String stockNum; |
| | | //库存面积 |
| | | private String stockArea; |
| | | //产品名称 |
| | | private String productName; |
| | | //弯钢半径 |
| | | private String bendRadius; |
| | | |
| | | //单片面积 |
| | | private String childArea; |
| | | //实际面积 |
| | | private String actualArea; |
| | | //完成数量 |
| | | private String completeNum; |
| | | //完成面积 |
| | | private String completeArea; |
| | | //未完数量 |
| | | private String incompleteNum; |
| | | //未完面积 |
| | | private String incompleteArea; |
| | | } |
| | |
| | | |
| | | |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.pp.Report; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<DamageDetails> getProcessBreaking(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | |
| | | Map<String,Integer> getProcessBreakingTotal(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | |
| | | List<Map<String, String>> workInProgressMp( |
| | | @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | | @Param("orderId") String orderId, @Param("inputProject") String inputProject, |
| | | @Param("selectProcesses") String selectProcesses, Report report); |
| | | |
| | | List<Map<String, String>> processToBeCompletedMp(Date selectTime1, Date selectTime2, String orderId, |
| | | String inputProject, String selectProcesses, Report report); |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | | // @Param("orderId") String orderId, @Param("inputProject") String inputProject, |
| | | // @Param("selectProcesses") String selectProcesses, Report report); |
| | | } |
| | |
| | | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.Report; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | | import com.example.erp.mapper.pp.ReportMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | |
| | | private final ReportMapper reportMapper; |
| | | |
| | | private final OrderProcessDetailMapper orderProcessDetailMapper; |
| | | private final ProductionSchedulingMapper productionSchedulingMapper; |
| | | |
| | | |
| | | |
| | | public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper) { |
| | | public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper,ProductionSchedulingMapper productionSchedulingMapper) { |
| | | this.reportMapper = reportMapper; |
| | | this.orderProcessDetailMapper = orderProcessDetailMapper; |
| | | this.productionSchedulingMapper = productionSchedulingMapper; |
| | | } |
| | | |
| | | //流程卡进度方法 |
| | |
| | | // 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) { |
| | | |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | | if ("null".equals(inputProject)) { |
| | | inputProject = ""; |
| | | } |
| | | 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) { |
| | | 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.put("process", productionSchedulingMapper.selectProcess()); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap id="reportMap" type="com.example.erp.entity.pp.Report"> |
| | | <result column="process_id" property="processId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="process" property="technologyFlow"/> |
| | | <result column="quantity" property="orderNum"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="stockNum" property="stockNum"/> |
| | | <result column="stockArea" property="stockArea"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | <select id="workInProgressMp"> |
| | | select #{selectProcesses} 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 = #{selectProcesses} |
| | | and rw.review_status = 1 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | | left join sd.`order` as o |
| | | on o.order_id = od.order_id |
| | | where LENGTH(fc.process_id) = 14 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{selectProcesses} and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) and position(#{inputProject} in o.project) |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | |
| | | <!-- |
| | | <if test="Report.processId != null and Report.processId != ''"> |
| | | and fc.process_id regexp #{Report.processId} |
| | | </if> |
| | | <if test="Report.customerName != null and Report.customerName != ''"> |
| | | and o.customer_name regexp #{Report.customerName} |
| | | </if> |
| | | <if test="Report.project != null and Report.project != ''"> |
| | | and o.project regexp #{Report.project} |
| | | </if> |
| | | <if test="Report.batch != null and Report.batch != ''"> |
| | | and o.batch regexp #{Report.batch} |
| | | </if> |
| | | <if test="Report.shape != null and Report.shape != ''"> |
| | | and od.shape regexp #{Report.shape} |
| | | </if> |
| | | --> |
| | | |
| | | <!-- <select id="getWorkInProgressTotal">--> |
| | | <!-- select CEILING(count(fc.id) / #{pageSize}) as 'pageTotal',--> |
| | | <!-- count(distinct fc.id) as 'total'--> |
| | | |
| | | <!-- from sd.order_detail AS od--> |
| | | <!-- LEFT JOIN sd.order_glass_detail AS ogd--> |
| | | <!-- ON od.order_id = ogd.order_id--> |
| | | <!-- AND od.order_number = ogd.order_number--> |
| | | <!-- LEFT JOIN flow_card AS fc--> |
| | | <!-- ON fc.order_id = ogd.order_id--> |
| | | <!-- and fc.production_id = ogd.production_id--> |
| | | <!-- AND fc.order_number = ogd.order_number--> |
| | | <!-- AND fc.technology_number = ogd.technology_number--> |
| | | <!-- left join sd.order_process_detail as odpd--> |
| | | <!-- ON odpd.order_id = fc.order_id--> |
| | | <!-- AND odpd.order_number = fc.order_number--> |
| | | <!-- AND odpd.technology_number = fc.technology_number--> |
| | | <!-- and odpd.process_id = fc.process_id--> |
| | | <!-- left join sd.order_process_detail as odpds--> |
| | | <!-- ON odpds.id = odpd.id - 1--> |
| | | <!-- left join--> |
| | | <!-- (SELECT sum(rw.rework_num) as 'patchNumSum',--> |
| | | <!-- rw.process_id,--> |
| | | <!-- rw.order_sort,--> |
| | | <!-- rw.technology_number,--> |
| | | <!-- rwk.this_process--> |
| | | <!-- from rework as rw--> |
| | | <!-- LEFT JOIN--> |
| | | <!-- reporting_work as rwk--> |
| | | <!-- on rw.reporting_work_id = rwk.reporting_work_id--> |
| | | <!-- where rwk.this_process = #{selectProcesses}--> |
| | | <!-- and rw.review_status = 1--> |
| | | <!-- GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c--> |
| | | <!-- on c.process_id = fc.process_id--> |
| | | <!-- and c.order_sort = fc.order_number--> |
| | | <!-- and c.technology_number = fc.technology_number--> |
| | | <!-- left join sd.`order` as o--> |
| | | <!-- on o.order_id = od.order_id--> |
| | | <!-- where LENGTH(fc.process_id) = 14--> |
| | | <!-- and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - --> |
| | | <!-- odpd.broken_num != 0--> |
| | | <!-- and odpd.process = #{selectProcesses}--> |
| | | <!-- and o.create_time between #{selectTime1} and #{selectTime2}--> |
| | | <!-- and position(#{orderId} in od.order_id)--> |
| | | <!-- and position(#{inputProject} in o.project)--> |
| | | <!-- group by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- order by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- limit #{offset},#{pageSize};--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="processToBeCompletedMp"> |
| | | 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 = #{selectProcesses} |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} 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> |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap id="reportMap" type="com.example.erp.entity.pp.Report"> |
| | | <result column="process_id" property="processId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="process" property="technologyFlow"/> |
| | | <result column="quantity" property="orderNum"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="stockNum" property="stockNum"/> |
| | | <result column="stockArea" property="stockArea"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | <select id="workInProgressMp"> |
| | | select #{selectProcesses} 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 = #{selectProcesses} |
| | | and rw.review_status = 1 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | | left join sd.`order` as o |
| | | on o.order_id = od.order_id |
| | | where LENGTH(fc.process_id) = 14 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{selectProcesses} and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) and position(#{inputProject} in o.project) |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | |
| | | <!-- |
| | | <if test="Report.processId != null and Report.processId != ''"> |
| | | and fc.process_id regexp #{Report.processId} |
| | | </if> |
| | | <if test="Report.customerName != null and Report.customerName != ''"> |
| | | and o.customer_name regexp #{Report.customerName} |
| | | </if> |
| | | <if test="Report.project != null and Report.project != ''"> |
| | | and o.project regexp #{Report.project} |
| | | </if> |
| | | <if test="Report.batch != null and Report.batch != ''"> |
| | | and o.batch regexp #{Report.batch} |
| | | </if> |
| | | <if test="Report.shape != null and Report.shape != ''"> |
| | | and od.shape regexp #{Report.shape} |
| | | </if> |
| | | --> |
| | | |
| | | <!-- <select id="getWorkInProgressTotal">--> |
| | | <!-- select CEILING(count(fc.id) / #{pageSize}) as 'pageTotal',--> |
| | | <!-- count(distinct fc.id) as 'total'--> |
| | | |
| | | <!-- from sd.order_detail AS od--> |
| | | <!-- LEFT JOIN sd.order_glass_detail AS ogd--> |
| | | <!-- ON od.order_id = ogd.order_id--> |
| | | <!-- AND od.order_number = ogd.order_number--> |
| | | <!-- LEFT JOIN flow_card AS fc--> |
| | | <!-- ON fc.order_id = ogd.order_id--> |
| | | <!-- and fc.production_id = ogd.production_id--> |
| | | <!-- AND fc.order_number = ogd.order_number--> |
| | | <!-- AND fc.technology_number = ogd.technology_number--> |
| | | <!-- left join sd.order_process_detail as odpd--> |
| | | <!-- ON odpd.order_id = fc.order_id--> |
| | | <!-- AND odpd.order_number = fc.order_number--> |
| | | <!-- AND odpd.technology_number = fc.technology_number--> |
| | | <!-- and odpd.process_id = fc.process_id--> |
| | | <!-- left join sd.order_process_detail as odpds--> |
| | | <!-- ON odpds.id = odpd.id - 1--> |
| | | <!-- left join--> |
| | | <!-- (SELECT sum(rw.rework_num) as 'patchNumSum',--> |
| | | <!-- rw.process_id,--> |
| | | <!-- rw.order_sort,--> |
| | | <!-- rw.technology_number,--> |
| | | <!-- rwk.this_process--> |
| | | <!-- from rework as rw--> |
| | | <!-- LEFT JOIN--> |
| | | <!-- reporting_work as rwk--> |
| | | <!-- on rw.reporting_work_id = rwk.reporting_work_id--> |
| | | <!-- where rwk.this_process = #{selectProcesses}--> |
| | | <!-- and rw.review_status = 1--> |
| | | <!-- GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c--> |
| | | <!-- on c.process_id = fc.process_id--> |
| | | <!-- and c.order_sort = fc.order_number--> |
| | | <!-- and c.technology_number = fc.technology_number--> |
| | | <!-- left join sd.`order` as o--> |
| | | <!-- on o.order_id = od.order_id--> |
| | | <!-- where LENGTH(fc.process_id) = 14--> |
| | | <!-- and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - --> |
| | | <!-- odpd.broken_num != 0--> |
| | | <!-- and odpd.process = #{selectProcesses}--> |
| | | <!-- and o.create_time between #{selectTime1} and #{selectTime2}--> |
| | | <!-- and position(#{orderId} in od.order_id)--> |
| | | <!-- and position(#{inputProject} in o.project)--> |
| | | <!-- group by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- order by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- limit #{offset},#{pageSize};--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="processToBeCompletedMp"> |
| | | 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 = #{selectProcesses} |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} 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> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.userInfo.PermissionRoleMapper"> |
| | | <select id="getUserPermission"> |
| | | select |
| | | concat( |
| | | if(d.page=null || d.page='','',concat(d.page, '.')), |
| | | d.permission |
| | | ) as 'permission' |
| | | from user as a |
| | | left join user_role as e |
| | | on e.user_id = a.id |
| | | left join role as b |
| | | on e.role_id = b.id |
| | | left join permission_role as c |
| | | on b.id = c.role_id |
| | | left join permission_basic d |
| | | on d.id = c.permission_id |
| | | where a.id = #{loginId} |
| | | and d.state = 1 |
| | | </select> |
| | | |
| | | </mapper> |