| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.9559.62"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.8660.185"> |
| | | <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2"> |
| | | <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | |
| | | request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | //console.log(res.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | buttons: [ |
| | | {code: 'saveFlowCard', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | checkedList.forEach((item) => { |
| | | item.processId = processId |
| | | item.landingSequence = index |
| | | item.quantity=item.baiscQuantity |
| | | }) |
| | | checkedList.forEach((item)=>{ |
| | | delete item._X_ROW_KEY |
| | | }) |
| | | |
| | | $gridLeft.insertAt(checkedList) |
| | | $grid.remove(checkedList) |
| | | } |
| | |
| | | if (filterIndex > -1) { |
| | | rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + item.quantity * 1 |
| | | } else { |
| | | delete item._X_ROW_KEY |
| | | $grid.insert(item) |
| | | } |
| | | |
| | |
| | | item.quantity = checkedNum.value |
| | | item.processId = checkedListLeft[0].processId |
| | | item.landingSequence = checkedListLeft[0].landingSequence |
| | | delete item._X_ROW_KEY |
| | | $gridLeft.insert(item) |
| | | } |
| | | |
| | |
| | | checkedList.forEach((item) => { |
| | | item.processId = checkedListLeft[0].processId |
| | | item.landingSequence = checkedListLeft[0].landingSequence |
| | | delete item._X_ROW_KEY |
| | | }) |
| | | $gridLeft.insertAt(checkedList) |
| | | $grid.remove(checkedList) |
| | |
| | | ElMessage.warning("请先将右侧数据全部建立流程卡后保存") |
| | | return; |
| | | } |
| | | //console.log(selectRecords[0].quantity) |
| | | let flowCardData = ref({ |
| | | flowCard: selectRecords, |
| | | userName:username, |
| | | productionId:productionId |
| | | }) |
| | | |
| | | //console.log(flowCardData.value) |
| | | request.post("/processCard/addFlowCard", flowCardData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | let router=useRouter() |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | let router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | let selectProcesses=value.value |
| | | |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | Processes:selectProcesses |
| | | }) |
| | | if (selectRecords.length==0){ |
| | | ElMessage.success("请勾选排产数据") |
| | | return; |
| | | } |
| | | for (let i = 0; i < selectRecords.length; i++){ |
| | | let start= selectRecords[i].scheduled_start_time |
| | | let end= selectRecords[i].plan_end_time |
| | | let number=selectRecords[i].scheduling_quantity |
| | | let start= selectRecords[i].scheduled_start_time |
| | | let end= selectRecords[i].plan_end_time |
| | | let number=selectRecords[i].scheduling_quantity |
| | | //计划开始、结束时间,排产数量不能为空 |
| | | if (start==null || end==null || number==null){ |
| | | ElMessage.success("请填入对应的值再进行保存") |
| | | return; |
| | | } |
| | | } |
| | | console.log(schedulingData.value) |
| | | // request.post("/workOrder/addOrderWork", schedulingData.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // ElMessage.success("保存成功") |
| | | // location.reload(); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // }) |
| | | let selectProcesses=value.value |
| | | if (selectProcesses==null || selectProcesses==""){ |
| | | ElMessage.success("请选择排产工序") |
| | | return; |
| | | } |
| | | |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | processes:selectProcesses,//工序 |
| | | userName:username//审核人 |
| | | }) |
| | | console.log(schedulingData.value) |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/addScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | return; |
| | |
| | | <script setup> |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {indexOf} from "xe-utils"; |
| | | |
| | | const xGrid = ref() |
| | | let router = useRouter() |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { id: row.id }}) |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的排版状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | //定义表头数据 |
| | | const titleUploadData = ref({ |
| | | //销售单号 |
| | | orderId: '', |
| | | //生产单号 |
| | | productionId: '', |
| | | //设备类型 |
| | | deviceType: '', |
| | | //班组类型 |
| | | teamsType: '', |
| | | //生产日期 |
| | | reportingWorkDate: '', |
| | | //报工工序 |
| | | thisProcess: '', |
| | | //上工序 |
| | | previousProcess: '', |
| | | //下工序 |
| | | nextProcess: '', |
| | | //备注 |
| | | notes: '', |
| | | //本工序完工数 |
| | | thisCompletedQuantity: '', |
| | | //本工序报废数 |
| | | thisWornQuantity: '', |
| | | //班次 |
| | | classes: '', |
| | | //责任工序 |
| | | responsibleProcess: '', |
| | | order: { |
| | | //客户编号 |
| | | customerId: '', |
| | | //客户名称 |
| | | customerName: '', |
| | | //项目名称 |
| | | project: '', |
| | | }, |
| | | flowCard: { |
| | | //可报工数量 |
| | | quantity: '' |
| | | }, |
| | | |
| | | |
| | | }) |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | deviceType: [], |
| | | teamsType: [], |
| | | processType: [], |
| | | thisProcessType: [], |
| | | mateProcessType: [], |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | } |
| | | |
| | | const form = reactive({ |
| | | lckh: 'NG23120801A01/1' |
| | | processId: 'NG24022302A01/1' |
| | | }) |
| | | //子组件接收参数 |
| | | |
| | | const optionVal = ref('') |
| | | const options = [ |
| | | { |
| | | value: '切割', |
| | | label: '切割', |
| | | }, |
| | | { |
| | | value: '磨边', |
| | | label: '磨边', |
| | | }, |
| | | { |
| | | value: '钢化', |
| | | label: '钢化', |
| | | }, |
| | | ] |
| | | |
| | | //班次 |
| | | const classesVal = ref('早班') |
| | | const classesOption = [ |
| | | { |
| | | value: '早班', |
| | | label: '早班', |
| | | }, |
| | | { |
| | | value: '晚班', |
| | | label: '晚班', |
| | | }, |
| | | ] |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'serialNumber',width:90, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'singlePieceName',width:120, title: '单片名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'marking',width:90, title: '标记', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'pieces',width:100, title: '片标记',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'processCardNumber',width:110, title: '流程卡数量', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'width',width:70, title: '宽', sortable: true}, |
| | | {field: 'height',width:70, title: '高', sortable: true}, |
| | | {field: 'shape',width:70, title: '形状', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'upCompletedQuantity',width:120, title: '上工完工数量', sortable: true}, |
| | | {field: 'completedQuantity',width:100, title: '完工数量', sortable: true}, |
| | | {field: 'numberBroken',width:100, title: '次破数量', sortable: true}, |
| | | {field: 'availableUse',width:80, title: '可利用', sortable: true}, |
| | | {field: 'returnProcess',width:100, title: '退回工序', sortable: true}, |
| | | {field: 'reasonType',width:100, title: '次破类型', sortable: true}, |
| | | {field: 'reasonDamage',width:100, title: '次破原因', sortable: true}, |
| | | {field: 'responsibilityDevice',width:100, title: '责任设备', sortable: true}, |
| | | {field: 'responsibilityProcess',width:100, title: '责任工序', sortable: true}, |
| | | {field: 'responsibilityTeams',width:100, title: '责任班组', sortable: true}, |
| | | {field: 'responsibilityPersonnel',width:100, title: '责任人员', sortable: true}, |
| | | {field: 'completed', width:90,title: '已完工', sortable: true}, |
| | | {field: 'onceBroken', width:90,title: '已次破', sortable: true} |
| | | columns: [ |
| | | // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { |
| | | field: 'order_number', |
| | | width: 90, |
| | | title: '序号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'glass_child', |
| | | width: 120, |
| | | title: '单片名称', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | | width: 90, |
| | | title: '标记', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'glass_address', |
| | | width: 100, |
| | | title: '片标记', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity_card', |
| | | width: 110, |
| | | title: '流程卡数量', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | showOverflow: "ellipsis", |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_width', |
| | | width: 70, |
| | | title: '宽', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_height', |
| | | width: 70, |
| | | title: '高', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'shape', |
| | | width: 70, |
| | | title: '形状', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | showOverflow: "ellipsis", |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'quantity', width: 120, title: '上工完工数量',}, |
| | | { |
| | | field: 'completedQuantity', width: 100, title: '完工数量', |
| | | editRender: { |
| | | name: 'input', |
| | | attrs: {placeholder: ''}, |
| | | }, |
| | | |
| | | ],//表头按钮 |
| | | }, |
| | | { |
| | | field: 'breakageNumber', width: 100, title: '次破数量', |
| | | editRender: { |
| | | name: 'input', |
| | | attrs: {placeholder: ''} |
| | | } |
| | | }, |
| | | {field: 'available', width: 80, title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | {field: 'returnProcess', width: 100, title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | { |
| | | field: 'reasonType', width: 100, title: '次破类型', |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} |
| | | }, |
| | | { |
| | | field: 'reasonDamage', width: 100, title: '次破原因', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | { |
| | | field: 'responsibleProcess', width: 100, title: '责任工序', |
| | | editRender: {}, |
| | | slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} |
| | | //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, |
| | | |
| | | toolbarConfig: { |
| | | }, |
| | | { |
| | | field: 'responsibleEquipment', |
| | | width: 100, |
| | | title: '责任设备', |
| | | editRender: {}, |
| | | slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'} |
| | | // editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | |
| | | { |
| | | field: 'responsibleTeam', width: 100, title: '责任班组', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | { |
| | | field: 'responsibilityPersonnel', |
| | | width: 100, |
| | | title: '责任人员', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | |
| | | }, |
| | | {field: 'completed', width: 90, title: '已完工',}, |
| | | {field: 'onceBroken', width: 90, title: '已次破',}, |
| | | |
| | | ], |
| | | //表单验证 |
| | | editRules: {}, |
| | | toolbarConfig: {//表头按钮 |
| | | buttons: [ |
| | | { code: 'empty', name: '清空报工数量' }, |
| | | { code: 'sameCompletion', name: '完工相同' }, |
| | | { code: 'sameDamage', name: '次破相同' }, |
| | | { code: 'sameOneCompletion', name: '完工一列相同' }, |
| | | { code: 'sameOneDamage', name: '次破一列相同' }, |
| | | {code: 'print_lck', name: '保存',status:'primary' ,icon:'vxe-icon-save'}, |
| | | {code: 'print_lck', name: '保存并审核',status:'primary' ,icon:'vxe-icon-save'}, |
| | | // {code: 'empty', name: '清空报工数量'}, |
| | | // {code: 'sameCompletion', name: '完工相同'}, |
| | | // {code: 'sameDamage', name: '次破相同'}, |
| | | // {code: 'sameOneCompletion', name: '完工一列相同'}, |
| | | // {code: 'sameOneDamage', name: '次破一列相同'}, |
| | | {code: 'print_lck', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | {code: 'print_lck', name: '保存并审核', status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | serialNumber:'1', |
| | | singlePieceName: '6mm白玻平钢(外)', |
| | | marking: '1', |
| | | pieces: '(外)', |
| | | processCardNumber: '11', |
| | | width: '575', |
| | | height:"2241", |
| | | shape: '普形', |
| | | upCompletedQuantity: '11', |
| | | completedQuantity: '1', |
| | | numberBroken:'', |
| | | availableUse:'', |
| | | returnProcess:'', |
| | | |
| | | reasonType: '机器', |
| | | reasonDamage:'气泡超标', |
| | | available:'', |
| | | reworkProcess:'', |
| | | responsibilityProcess:'中空', |
| | | responsibilityTeams:'中空一班', |
| | | responsibilityPersonnel:'', |
| | | responsibilityDevice:'中空3#线', |
| | | completed:'', |
| | | onceBroken:'', |
| | | }, |
| | | { |
| | | serialNumber:'1', |
| | | singlePieceName: '6mm白玻平钢(内)', |
| | | marking: '2', |
| | | pieces: '(内)', |
| | | processCardNumber: '11', |
| | | width: '575', |
| | | height:"2241", |
| | | shape: '普形', |
| | | upCompletedQuantity: '11', |
| | | completedQuantity: '1', |
| | | numberBroken:'', |
| | | availableUse:'', |
| | | returnProcess:'', |
| | | |
| | | reasonType: '机器', |
| | | reasonDamage:'气泡超标', |
| | | available:'', |
| | | reworkProcess:'', |
| | | responsibilityProcess:'中空', |
| | | responsibilityTeams:'中空一班', |
| | | responsibilityPersonnel:'', |
| | | responsibilityDevice:'中空3#线', |
| | | completed:'', |
| | | onceBroken:'', |
| | | }, |
| | | { |
| | | serialNumber:'2', |
| | | singlePieceName: '8mm白玻平钢(外)', |
| | | marking: '1', |
| | | pieces: '(外)', |
| | | processCardNumber: '11', |
| | | width: '575', |
| | | height:"2241", |
| | | shape: '普形', |
| | | upCompletedQuantity: '11', |
| | | completedQuantity: '1', |
| | | numberBroken:'', |
| | | availableUse:'', |
| | | returnProcess:'', |
| | | |
| | | reasonType: '机器', |
| | | reasonDamage:'气泡超标', |
| | | available:'', |
| | | reworkProcess:'', |
| | | responsibilityProcess:'中空', |
| | | responsibilityTeams:'中空一班', |
| | | responsibilityPersonnel:'', |
| | | responsibilityDevice:'中空3#线', |
| | | completed:'', |
| | | onceBroken:'', |
| | | }, |
| | | { |
| | | serialNumber:'2', |
| | | singlePieceName: '8mm白玻平钢(内)', |
| | | marking: '2', |
| | | pieces: '(内)', |
| | | processCardNumber: '11', |
| | | width: '575', |
| | | height:"2241", |
| | | shape: '普形', |
| | | upCompletedQuantity: '11', |
| | | completedQuantity: '1', |
| | | numberBroken:'', |
| | | availableUse:'', |
| | | returnProcess:'', |
| | | |
| | | reasonType: '机器', |
| | | reasonDamage:'气泡超标', |
| | | available:'', |
| | | reworkProcess:'', |
| | | responsibilityProcess:'中空', |
| | | responsibilityTeams:'中空一班', |
| | | responsibilityPersonnel:'', |
| | | responsibilityDevice:'中空3#线', |
| | | completed:'', |
| | | onceBroken:'', |
| | | }, |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['processCardNumber','upCompletedQuantity','completedQuantity','numberBroken',''] |
| | | return[ |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['', '', '', '', ''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | |
| | | |
| | | }) |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/reportingWork/selectProcess`).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | titleSelectJson.value.processType = res.data.process; |
| | | //console.log(titleSelectJson.value.processType) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //下拉款选择工序时查询 |
| | | const getWork = () => { |
| | | |
| | | let processId = form.processId |
| | | if (processId.indexOf("/") < 0) { |
| | | |
| | | ElMessage.success("请输入正确格式流程卡") |
| | | return |
| | | } |
| | | let indexOfChar = processId.indexOf("/") |
| | | let leftString = processId.slice(0, indexOfChar) |
| | | if (leftString.length != 13) { |
| | | ElMessage.success("请输入正确位数的流程卡") |
| | | return |
| | | } |
| | | //工序 |
| | | let process = titleUploadData.value.thisProcess |
| | | if (process == "" || process == null) { |
| | | |
| | | ElMessage.success("请选择工序") |
| | | return |
| | | } |
| | | |
| | | if (titleSelectJson.value.thisProcessType.indexOf(process) == -1 && process != "切割" && titleSelectJson.value.thisProcessType != "") { |
| | | ElMessage.success("此工序不属于该流程卡") |
| | | return |
| | | } |
| | | //流程卡号 |
| | | let processIdStr = processId.substring(0, 13); |
| | | //层号 |
| | | let technologyStr = processId.substring(14); |
| | | |
| | | request.post(`/reportingWork/addSelectLastWork/${processIdStr}/${technologyStr}/${process}`).then((res) => { |
| | | if (res.code == 200) { |
| | | //表头赋值 |
| | | titleUploadData.value = res.data.data |
| | | //设备下拉框 |
| | | titleSelectJson.value.deviceType = res.data.device |
| | | //班组下拉框 |
| | | titleSelectJson.value.teamsType = res.data.teams |
| | | //当前流程卡工序 |
| | | titleSelectJson.value.thisProcessType = res.data.thisProcess |
| | | //报工时间默认当天 |
| | | const today = new Date |
| | | today.setTime(today.getTime()) |
| | | titleUploadData.value.reportingWorkDate = today.getFullYear() + |
| | | '-' + ("0" + (today.getMonth() + 1)).slice(-2) |
| | | + '-' + ("0" + today.getDate()).slice(-2) |
| | | //绑定下方表格 |
| | | xGrid.value.reloadData(res.data.Detail) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //判断完工次破数量是否满足条件 |
| | | const verifyNum = () => { |
| | | const $grid = xGrid.value |
| | | const table = $grid.getTableData().fullData |
| | | //console.log(table) |
| | | let sum = 0; |
| | | let sumBreak = 0; |
| | | table.forEach((item) => { |
| | | if (item.completedQuantity == null || item.completedQuantity == "") { |
| | | item.completedQuantity = 0; |
| | | } |
| | | if (item.breakageNumber == null || item.breakageNumber == "") { |
| | | item.breakageNumber = 0; |
| | | } |
| | | |
| | | if (item.quantity < item.completedQuantity) { |
| | | ElMessage.success("序号" + item.order_number + "的数量不能大于上工序数量") |
| | | |
| | | |
| | | } else if (item.breakageNumber * 1 + item.completedQuantity * 1 > item.quantity * 1) { |
| | | ElMessage.success("请输入序号" + item.order_number + "正确的完工或次破数量") |
| | | } |
| | | |
| | | sum = item.completedQuantity * 1 + sum * 1 |
| | | |
| | | sumBreak = item.breakageNumber * 1 + sumBreak * 1 |
| | | |
| | | }) |
| | | titleUploadData.value.thisCompletedQuantity = sum |
| | | titleUploadData.value.thisWornQuantity = sumBreak |
| | | } |
| | | |
| | | |
| | | const ptypeChangeEvent = (row) => { |
| | | // for (let i = 0; i < row.length; i++){ |
| | | // |
| | | // let process=row[i].responsibleProcess |
| | | // } |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div id="head"> |
| | | <el-input placeholder="流程卡号" v-model="form.lckh" style="width: 200px"/> |
| | | |
| | | <div style="height: 100%;width: 100%"> |
| | | <div id="head" style="height: 5%;width: 100%;margin-bottom: 5px"> |
| | | <el-input v-model="form.processId" placeholder="流程卡号" style="width: 200px" @keyup.enter.native="getWork"/> |
| | | |
| | | <el-select v-model="titleUploadData.thisProcess" clearable placeholder="请选择工序" style="width: 120px" |
| | | @change="getWork"> |
| | | <el-option |
| | | 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">审核不通过</el-button> |
| | | |
| | | <label>流程卡面积:xxx平方米</label> |
| | | </div> |
| | | <div style="background-color: white;margin-bottom: 5px;height: 17%;width: 100%"> |
| | | <el-row> |
| | | <el-col :span="2"> |
| | | <el-text>销售单号:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-text>{{ titleUploadData.orderId }}</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>生产订单号:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-text>{{ titleUploadData.productionId }}</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>客户编码:</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>{{ titleUploadData.order.customerId }}</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>客户名称:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-text class="customClass">{{ titleUploadData.order.customerName }}</el-text> |
| | | |
| | | <select class="processesSt"> |
| | | <option>报工工序</option> |
| | | <option value="切割">切割</option> |
| | | <option value="磨边">磨边</option> |
| | | <option value="钢化">钢化</option> |
| | | </select> |
| | | |
| | | <el-button type="primary">审核通过</el-button> |
| | | <el-button type="primary">审核不通过</el-button> |
| | | |
| | | <label>流程卡面积:xxx平方米</label> |
| | | </div> |
| | | <div> |
| | | <table id="titleTable" style="border: 1px solid black;"> |
| | | <tr> |
| | | <td>销售单号</td> |
| | | <td>NG23120801</td> |
| | | <td>生产订单号</td> |
| | | <td>NG23120801A</td> |
| | | <td>客户编码</td> |
| | | <td>123213</td> |
| | | <td>客户名称</td> |
| | | <td>xxxx</td> |
| | | <td>项目名称</td> |
| | | <td>xxxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td>报工设备</td> |
| | | <td>中空一线</td> |
| | | <td>上工序</td> |
| | | <td>钢化</td> |
| | | <td>可报工数量</td> |
| | | <td>12</td> |
| | | <td>本工序完工</td> |
| | | <td>11</td> |
| | | <td>本工序次破</td> |
| | | <td>1</td> |
| | | </tr> |
| | | <tr> |
| | | <td>报工班组</td> |
| | | <td>中空一班</td> |
| | | <td>班次</td> |
| | | <td>早班</td> |
| | | <td>下工序</td> |
| | | <td>包装</td> |
| | | <td>报工时间</td> |
| | | <td><input class="chaxun" id="bgsj" maxlength="255" type="datetime-local" name="bgsj"></td> |
| | | <td>备注</td> |
| | | <td>1</td> |
| | | </tr> |
| | | <tr> |
| | | <td>单片次破</td> |
| | | <td> |
| | | <el-select v-model="value" placeholder="允许" > |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>项目名称:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-text wrap-text="false">{{ titleUploadData.order.project }}</el-text> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"> |
| | | <el-text>报工设备:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.deviceType" clearable placeholder="请选择设备"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | v-for="item in titleSelectJson['deviceType']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </td> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>上工序:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <el-text>{{ titleUploadData.previousProcess }}</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>可报工数量:</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>{{ titleUploadData.flowCard.quantity }}</el-text> |
| | | |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | min-height="100px" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | size="small" |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>本工序完工:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-text>{{ titleUploadData.thisCompletedQuantity }}</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>本工序次破:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-text>{{ titleUploadData.thisWornQuantity }}</el-text> |
| | | </el-col> |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"> |
| | | <el-text>报工班组:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.teamsType" clearable placeholder="请选择班组"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['teamsType']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>班次:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="classesVal" class="processesSt" placeholder=""> |
| | | <el-option |
| | | v-for="item in classesOption" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>下工序:</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>{{ titleUploadData.nextProcess }}</el-text> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <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> |
| | | </template> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>报工日期:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-date-picker |
| | | v-model="titleUploadData.reportingWorkDate" |
| | | placeholder="" |
| | | style="width: 100%" |
| | | type="date" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>备注:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | |
| | | <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)"/> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </div> |
| | | <div class="main-div-customer" style="width: 100%;height: 70%"> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | size="small" |
| | | v-bind="gridOptions" |
| | | @filter-change="filterChanged" |
| | | @edit-closed="verifyNum" |
| | | |
| | | > |
| | | <!-- 责任工序--> |
| | | <template #reportingWordSort="{ row }"> |
| | | <vxe-select v-model="row.responsibleProcess" transfer @change="ptypeChangeEvent(row)"> |
| | | <vxe-option v-for="item in titleSelectJson.thisProcessType" :key="item" :label="item" :value="item"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #reportingWordSort_default="{ row }"> |
| | | <span>{{ row.responsibleProcess }}</span> |
| | | </template> |
| | | <!-- 责任设备 --> |
| | | <template #reportingDeviceSort="{ row }"> |
| | | <vxe-select v-model="row.responsibleEquipment" transfer> |
| | | <vxe-option v-for="item in titleSelectJson.mateProcessType" :key="item" :label="item" :value="item"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #reportingDeviceSort_default="{ row }"> |
| | | <span>{{ row.responsibleEquipment }}</span> |
| | | </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)"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </vxe-grid> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | |
| | | .processCard{ |
| | | .processCard { |
| | | width: 140px; |
| | | } |
| | | .processesSt{ |
| | | |
| | | .processesSt { |
| | | height: 33px; |
| | | width: 80px; |
| | | width: 120px; |
| | | background-color: #409eff; |
| | | color: white; |
| | | border: none; |
| | | border-radius: 5px; |
| | | } |
| | | #titleTable tr,#titleTable td{ |
| | | |
| | | #titleTable tr, #titleTable td { |
| | | border: 1px solid #000; |
| | | } |
| | | #titleTable{ |
| | | |
| | | #titleTable { |
| | | border-collapse: collapse; |
| | | text-align: center; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | #titleTable td{ |
| | | |
| | | #titleTable td { |
| | | width: 100px; |
| | | height: 30px; |
| | | } |
| | | #titleTable td:nth-child(1){ |
| | | |
| | | #titleTable td:nth-child(1) { |
| | | width: 100px; |
| | | height: 30px; |
| | | } |
| | | #titleTable td:nth-child(2){ |
| | | |
| | | #titleTable td:nth-child(2) { |
| | | width: 100px; |
| | | } |
| | | .chaxun{ |
| | | background-color:#D5EAFF; |
| | | |
| | | .chaxun { |
| | | background-color: #D5EAFF; |
| | | border: none; |
| | | } |
| | | |
| | | .customClass { |
| | | white-space: nowrap; /* 不换行 */ |
| | | } |
| | | |
| | | .el-text { |
| | | |
| | | } |
| | | |
| | | .el-col .el-select { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .el-col { |
| | | text-align: center; |
| | | border: #181818 1px solid; |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.pp.BasicDateProduceService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/basicDataProduce") |
| | | public class BasicDataProduceController { |
| | | @Autowired |
| | | BasicDateProduceService basicDateProduceService; |
| | | // @PostMapping("/selectWorkBasic/{process}") |
| | | // public Result SelectWorkBasic( |
| | | // @PathVariable String process) { |
| | | // return Result.seccess(basicDateProduceService.SelectWorkBasicSv(process)); |
| | | // } |
| | | } |
| | |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | // System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString()); |
| | | return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | |
| | | public Result updateLayoutStatus( |
| | | @PathVariable String processId |
| | | ){ |
| | | System.out.println(flowCardService.UpdateLayoutStatusSv(processId)); |
| | | if(flowCardService.UpdateLayoutStatusSv(processId)){ |
| | | return Result.seccess(); |
| | | }else { |
| | |
| | | //添加流程卡 |
| | | @PostMapping("/addFlowCard") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | System.out.println("obj:"+object); |
| | | if(flowCardService.AddFlowCardSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | |
| | | |
| | | } |
| | | |
| | | //添加排产数据 |
| | | @PostMapping("/addScheduling") |
| | | public Result AddScheduling( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(productionSchedulingService.AddSchedulingSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.ReportingWorkService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | import java.sql.Date; |
| | | @RestController |
| | | @RequestMapping("/reportingWork") |
| | | public class ReportingWorkController { |
| | | @Autowired |
| | | ReportingWorkService reportingWorkService; |
| | | |
| | | |
| | | @PostMapping ("/addSelectLastWork/{processIdStr}/{technologyStr}/{process}") |
| | | public Result AddSelectLastWork( |
| | | @PathVariable String processIdStr, |
| | | @PathVariable String technologyStr, |
| | | @PathVariable String process) { |
| | | return Result.seccess(reportingWorkService.AddSelectLastWorkSv(processIdStr,technologyStr,process)); |
| | | } |
| | | @PostMapping ("/selectProcess") |
| | | public Result SelectProcess() { |
| | | return Result.seccess(reportingWorkService.SelectProcessSv()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | //添加工单 |
| | | @PostMapping("/addOrderWork") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | System.out.println("obj:"+object); |
| | | |
| | | if(workOrderService.AddOrderWorkSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class BasicDataProduce { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | private String basicType; |
| | | private String basicName; |
| | | private String basicCategory; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | } |
| | |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class ProductionScheduling { |
| | | //自增id |
| | |
| | | //排产数量 |
| | | private Integer schedulingQuantity; |
| | | //计划开始时间 |
| | | private Integer scheduledStartTime; |
| | | private LocalDate scheduledStartTime; |
| | | //计划结束时间 |
| | | private Integer planEndTime; |
| | | private LocalDate planEndTime; |
| | | //审核状态 |
| | | private String reviewStatus; |
| | | //备注 |
| | | private String notes; |
| | | //创建时间 |
| | | private String createTime; |
| | | private LocalDate createTime; |
| | | |
| | | //外键订单表 |
| | | private Order order; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.sd.Order; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | //班次 |
| | | private String classes; |
| | | //班组编号 |
| | | private String teamsgroupsId; |
| | | private String teamsGroupsId; |
| | | //班组名称 |
| | | private String teamsgroupsName; |
| | | private String teamsGroupsName; |
| | | //报工状态 |
| | | private Integer reportingWorkState; |
| | | //审核人 |
| | |
| | | //修改时间 |
| | | private LocalDate updateTime; |
| | | |
| | | |
| | | private Order order; |
| | | //外键流程卡表 |
| | | private FlowCard flowCard; |
| | | private ReportingWork reportingWork; |
| | | |
| | | private ReportingWorkDetail reportingWorkDetail; |
| | | } |
| | |
| | | //完工数量 |
| | | private Integer completedQuantity; |
| | | //次破数量 |
| | | private Integer breakageNumber; |
| | | private Integer breakageQuantity; |
| | | //次破原因 |
| | | private String breakageReason; |
| | | //类型 |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.entity.pp.BasicDataProduce; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface BasicDateProduceMapper { |
| | | |
| | | |
| | | |
| | | List<BasicDataProduce> SelectWorkBasicDeviceMp(String process); |
| | | |
| | | List<BasicDataProduce> SelectWorkBasicTeamsMp(String process); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> SelectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | |
| | | Integer selectMaxId(); |
| | | |
| | | Boolean insertSelective(String schedulingId, String orderId, String orderNumber, String processes, Integer schedulingQuantity, LocalDate scheduledStartTime, LocalDate planEndTime, String notes); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | import com.example.erp.entity.pp.BasicDataProduce; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.entity.pp.ReportingWorkDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface ReportingWorkMapper { |
| | | |
| | | |
| | | ReportingWork AddSelectLastWorkMp(String processIdStr, String technologyStr,String previousProcess,String nextProcess,String process); |
| | | |
| | | List<BasicDataProduce> SelectWorkBasicDeviceMp(String process); |
| | | |
| | | List<BasicDataProduce> SelectWorkBasicTeamsMp(String process); |
| | | |
| | | String SelectTechnologicalProcess(String processIdStr); |
| | | |
| | | String SelectWorkTechnologyMp(String processIdStr); |
| | | |
| | | List<Map<String,String>> SelectTechnologicalNumMp(String processIdStr, String technologyStr); |
| | | |
| | | List<Map<String,String>> SelectReworlDetailMp(String processIdStr, String technologyStr, String previousProcess); |
| | | |
| | | List<Map<String,String>> SelectProcessMp(); |
| | | } |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.mapper.pp.BasicDateProduceMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | | public class BasicDateProduceService { |
| | | @Autowired |
| | | private BasicDateProduceMapper basicDateProduceMapper; |
| | | |
| | | |
| | | // public Object SelectWorkBasicSv(String process) { |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // map.put("device", basicDateProduceMapper.SelectWorkBasicDeviceMp(process)); |
| | | // map.put("teams", basicDateProduceMapper.SelectWorkBasicTeamsMp(process)); |
| | | // return map; |
| | | // } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | map.put("data", productionSchedulingMapper.SelectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean AddSchedulingSv(Map<String, Object> object) { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | String processes = ""; |
| | | if (object.get("processes") != null) { |
| | | processes = object.get("processes").toString(); |
| | | } |
| | | |
| | | Integer maxId = productionSchedulingMapper.selectMaxId(); |
| | | //查询订单id,并且自增 |
| | | String formattedNumber = String.format("%02d", maxId+1); |
| | | //格式化当前日期 |
| | | java.util.Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | String schedulingId = "PC"+formattedDate+formattedNumber; |
| | | |
| | | List<ProductionScheduling> schedulinglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("scheduling")), ProductionScheduling.class); |
| | | if (!schedulinglist.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : schedulinglist) { |
| | | productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes()); |
| | | // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId()); |
| | | } |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import com.example.erp.mapper.pp.BasicDateProduceMapper; |
| | | import com.example.erp.mapper.pp.ReportingWorkMapper; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class ReportingWorkService { |
| | | @Autowired |
| | | ReportingWorkMapper reportingWorkMapper; |
| | | |
| | | BasicDateProduceMapper basicDateProduceMapper; |
| | | |
| | | public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //查询流程卡工艺流程 |
| | | String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(processIdStr); |
| | | |
| | | int index = technologicalProcess.indexOf("-"); |
| | | //获取工艺流程第一个工序 |
| | | String interceptProcess = technologicalProcess.substring(0, index); |
| | | String[] processList = technologicalProcess.split("->"); |
| | | int length = processList.length; |
| | | |
| | | //定义当前工序上下工序 |
| | | String previousProcess = ""; |
| | | String nextProcess = ""; |
| | | |
| | | //循环该流程卡工艺流程 |
| | | for (int i = 0; i < length; i++) { |
| | | //当到当前工序时 |
| | | if (processList[i].equals(process)) { |
| | | //获取当前工序的上一道工序 |
| | | if (i - 1 < 0) { |
| | | previousProcess = ""; |
| | | } else { |
| | | previousProcess = processList[i - 1]; |
| | | } |
| | | //获取当前工序的下一道工序 |
| | | if (i + 1 > length - 1) { |
| | | nextProcess = ""; |
| | | } else { |
| | | nextProcess = processList[i + 1]; |
| | | } |
| | | //System.out.println("当前工序:" + process + " 上一道工序:" + previousProcess + " 下一道工序:" + nextProcess); |
| | | //查询当前工序的表头数据 |
| | | map.put("data", reportingWorkMapper.AddSelectLastWorkMp(processIdStr, technologyStr,previousProcess,nextProcess,process)); |
| | | map.put("thisProcess", processList); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | |
| | | //设备下拉框 |
| | | map.put("device", reportingWorkMapper.SelectWorkBasicDeviceMp(process)); |
| | | //班组下拉框 |
| | | map.put("teams", reportingWorkMapper.SelectWorkBasicTeamsMp(process)); |
| | | |
| | | |
| | | //查询本工序报工需要哪几层,上工序是什么 |
| | | String obtainTechnology = reportingWorkMapper.SelectWorkTechnologyMp(processIdStr); |
| | | |
| | | |
| | | //判断本工序是不是第一道工序 |
| | | if (interceptProcess.equals(process)) { |
| | | //是第一道工序,查询流程卡数据 |
| | | map.put("Detail", reportingWorkMapper.SelectTechnologicalNumMp(processIdStr,technologyStr)); |
| | | |
| | | } |
| | | else { |
| | | //不是第一道工序,查询报工数据 |
| | | |
| | | map.put("Detail", reportingWorkMapper.SelectReworlDetailMp(processIdStr,technologyStr,previousProcess)); |
| | | } |
| | | |
| | | // 第一道工序(流程卡数+补片数量-完工数-次破数-返工未完成数-禁用数量) |
| | | |
| | | // 后续工序(上工序报工数-完工数-次破数-返工未完成数) |
| | | |
| | | return map; |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> SelectProcessSv() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("process", reportingWorkMapper.SelectProcessMp()); |
| | | return map; |
| | | } |
| | | } |
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.pp.BasicDateProduceMapper"> |
| | | <select id="SelectWorkBasicDeviceMp"> |
| | | select |
| | | * |
| | | from |
| | | basic_data_produce as a |
| | | where a.basic_category=#{process} and a.basic_type='设备' |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicTeamsMp"> |
| | | select |
| | | * |
| | | from |
| | | basic_data_produce as a |
| | | where a.basic_category=#{process} and a.basic_type='班组' |
| | | </select> |
| | | </mapper> |
| | |
| | | where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id, regexp #{flowCard.order.orderId} |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | | </if> |
| | | <if test="flowCard.order.customerName != null and flowCard.order.customerName != ''"> |
| | | and o.customer_name regexp #{flowCard.order.customerName} |
| | |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | | select |
| | | COUNT(ps.scheduling_id) |
| | | from |
| | | `production_scheduling` as ps |
| | | where |
| | | date(ps.create_time) = curdate() |
| | | </select> |
| | | |
| | | <insert id="insertSelective"> |
| | | insert into production_scheduling( |
| | | scheduling_id, |
| | | order_id, |
| | | order_number, |
| | | processes, |
| | | scheduling_quantity, |
| | | scheduled_start_time, |
| | | plan_end_time, |
| | | notes, |
| | | create_time |
| | | ) |
| | | VALUES( |
| | | #{schedulingId}, |
| | | #{orderId}, |
| | | #{orderNumber}, |
| | | #{processes}, |
| | | #{schedulingQuantity}, |
| | | #{scheduledStartTime}, |
| | | #{planEndTime}, |
| | | #{notes}, |
| | | now() |
| | | ) |
| | | </insert> |
| | | </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.pp.ReportingWorkMapper"> |
| | | <resultMap id="reportingWorkMap" type="com.example.erp.entity.pp.ReportingWork"> |
| | | <result property="orderId" column="order_id"/> |
| | | <result property="productionId" column="production_id"/> |
| | | <result property="previousProcess" column="previous_process"/> |
| | | <result property="nextProcess" column="next_process"/> |
| | | <result property="thisProcess" column="this_process"/> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result property="customerId" column="customer_id"/> |
| | | <result property="customerName" column="customer_name"/> |
| | | <result property="project" column="project"/> |
| | | </association> |
| | | <association property="flowCard" javaType="com.example.erp.entity.pp.FlowCard"> |
| | | <result property="orderId" column="order_id"/> |
| | | <result property="productionId" column="production_id"/> |
| | | <result property="quantity" column="quantity"/> |
| | | </association> |
| | | <association property="reportingWorkDetail" javaType="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | <result property="completedQuantity" column="completed_quantity"/> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="AddSelectLastWorkMp" resultMap="reportingWorkMap"> |
| | | select o.order_id, |
| | | fc.production_id, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | o.project, |
| | | SUM(fc.quantity) as quantity, |
| | | #{previousProcess} as previous_process, |
| | | #{nextProcess} as next_process, |
| | | #{process} as this_process |
| | | from sd.order as o |
| | | left join flow_card as fc on fc.order_id = o.order_id |
| | | where fc.process_id = #{processIdStr} |
| | | and position(fc.technology_number in #{technologyStr}) |
| | | GROUP BY fc.process_id |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicDeviceMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '设备' |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicTeamsMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '班组' |
| | | </select> |
| | | |
| | | <!-- 查询流程卡工艺流程--> |
| | | <select id="SelectTechnologicalProcess"> |
| | | select ogd.process |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = LEFT(#{processIdStr}, 11) |
| | | limit 1 |
| | | |
| | | </select> |
| | | |
| | | <select id="SelectWorkTechnologyMp"> |
| | | select GROUP_CONCAT(distinct fc.technology_number) |
| | | from flow_card as fc |
| | | where fc.process_id = #{processIdStr} |
| | | </select> |
| | | |
| | | <!-- 第一道工序报工明细查询--> |
| | | <select id="SelectTechnologicalNumMp"> |
| | | SELECT |
| | | fc.order_number, |
| | | ogd.glass_child, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | fc.quantity AS quantity_card, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) |
| | | as quantity |
| | | 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 reporting_work as rw on rw.order_id=fc.order_id and rw.production_id=fc.production_id and rw.process_id=fc.process_id |
| | | left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id and rwd.order_number=fc.order_number and rwd.technology_number=fc.technology_number |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | AND position( |
| | | fc.technology_number IN #{technologyStr}) |
| | | |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | | <!-- 非第一道工序报工明细查询--> |
| | | <select id="SelectReworlDetailMp"> |
| | | SELECT fc.order_number, |
| | | ogd.glass_child, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | fc.quantity as quantity_card, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) as quantity |
| | | 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 sd.order_process_detail as opd |
| | | on opd.order_id = ogd.order_id and opd.order_number = ogd.order_number and |
| | | opd.technology_number = ogd.technology_number |
| | | |
| | | left join flow_card as fc on opd.order_id = fc.order_id and opd.order_number = fc.order_number and |
| | | opd.technology_number = fc.technology_number |
| | | left join reporting_work as rw on rw.order_id=fc.order_id and |
| | | rw.production_id=fc.production_id and rw.process_id=fc.process_id and rw.this_process = #{previousProcess} |
| | | left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id and |
| | | rwd.order_number=fc.order_number and rwd.technology_number=fc.technology_number |
| | | where fc.process_id = #{processIdStr} |
| | | and opd.process = #{previousProcess} |
| | | and position(ogd.technology_number in #{technologyStr}) |
| | | |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | | <select id="SelectProcessMp"> |
| | | select * from sd.basic_data where basic_type="product" and basic_category="process" |
| | | |
| | | </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.pp.BasicDateProduceMapper"> |
| | | <select id="SelectWorkBasicDeviceMp"> |
| | | select |
| | | * |
| | | from |
| | | basic_data_produce as a |
| | | where a.basic_category=#{process} and a.basic_type='设备' |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicTeamsMp"> |
| | | select |
| | | * |
| | | from |
| | | basic_data_produce as a |
| | | where a.basic_category=#{process} and a.basic_type='班组' |
| | | </select> |
| | | </mapper> |
| | |
| | | where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id, regexp #{flowCard.order.orderId} |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | | </if> |
| | | <if test="flowCard.order.customerName != null and flowCard.order.customerName != ''"> |
| | | and o.customer_name regexp #{flowCard.order.customerName} |
| | |
| | | p.thickness, |
| | | od.weight |
| | | 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 sd.product as p on od.product_name=p.product_name |
| | |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | | select |
| | | COUNT(ps.scheduling_id) |
| | | from |
| | | `production_scheduling` as ps |
| | | where |
| | | date(ps.create_time) = curdate() |
| | | </select> |
| | | |
| | | <insert id="insertSelective"> |
| | | insert into production_scheduling( |
| | | scheduling_id, |
| | | order_id, |
| | | order_number, |
| | | processes, |
| | | scheduling_quantity, |
| | | scheduled_start_time, |
| | | plan_end_time, |
| | | notes, |
| | | create_time |
| | | ) |
| | | VALUES( |
| | | #{schedulingId}, |
| | | #{orderId}, |
| | | #{orderNumber}, |
| | | #{processes}, |
| | | #{schedulingQuantity}, |
| | | #{scheduledStartTime}, |
| | | #{planEndTime}, |
| | | #{notes}, |
| | | now() |
| | | ) |
| | | </insert> |
| | | </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.pp.ReportingWorkMapper"> |
| | | <resultMap id="reportingWorkMap" type="com.example.erp.entity.pp.ReportingWork"> |
| | | <result property="orderId" column="order_id"/> |
| | | <result property="productionId" column="production_id"/> |
| | | <result property="previousProcess" column="previous_process"/> |
| | | <result property="nextProcess" column="next_process"/> |
| | | <result property="thisProcess" column="this_process"/> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result property="customerId" column="customer_id"/> |
| | | <result property="customerName" column="customer_name"/> |
| | | <result property="project" column="project"/> |
| | | </association> |
| | | <association property="flowCard" javaType="com.example.erp.entity.pp.FlowCard"> |
| | | <result property="orderId" column="order_id"/> |
| | | <result property="productionId" column="production_id"/> |
| | | <result property="quantity" column="quantity"/> |
| | | </association> |
| | | <association property="reportingWorkDetail" javaType="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | <result property="completedQuantity" column="completed_quantity"/> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="AddSelectLastWorkMp" resultMap="reportingWorkMap"> |
| | | select o.order_id, |
| | | fc.production_id, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | o.project, |
| | | SUM(fc.quantity) as quantity, |
| | | #{previousProcess} as previous_process, |
| | | #{nextProcess} as next_process, |
| | | #{process} as this_process |
| | | from sd.order as o |
| | | left join flow_card as fc on fc.order_id = o.order_id |
| | | where fc.process_id = #{processIdStr} |
| | | and position(fc.technology_number in #{technologyStr}) |
| | | GROUP BY fc.process_id |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicDeviceMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '设备' |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicTeamsMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '班组' |
| | | </select> |
| | | |
| | | <!-- 查询流程卡工艺流程--> |
| | | <select id="SelectTechnologicalProcess"> |
| | | select ogd.process |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = LEFT(#{processIdStr}, 11) |
| | | limit 1 |
| | | |
| | | </select> |
| | | |
| | | <select id="SelectWorkTechnologyMp"> |
| | | select GROUP_CONCAT(distinct fc.technology_number) |
| | | from flow_card as fc |
| | | where fc.process_id = #{processIdStr} |
| | | </select> |
| | | |
| | | <!-- 第一道工序报工明细查询--> |
| | | <select id="SelectTechnologicalNumMp"> |
| | | SELECT |
| | | fc.order_number, |
| | | ogd.glass_child, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | fc.quantity AS quantity_card, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) |
| | | as quantity |
| | | 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 reporting_work as rw on rw.order_id=fc.order_id and rw.production_id=fc.production_id and rw.process_id=fc.process_id |
| | | left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id and rwd.order_number=fc.order_number and rwd.technology_number=fc.technology_number |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | AND position( |
| | | fc.technology_number IN #{technologyStr}) |
| | | |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | | <!-- 非第一道工序报工明细查询--> |
| | | <select id="SelectReworlDetailMp"> |
| | | SELECT fc.order_number, |
| | | ogd.glass_child, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | fc.quantity as quantity_card, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) as quantity |
| | | 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 sd.order_process_detail as opd |
| | | on opd.order_id = ogd.order_id and opd.order_number = ogd.order_number and |
| | | opd.technology_number = ogd.technology_number |
| | | |
| | | left join flow_card as fc on opd.order_id = fc.order_id and opd.order_number = fc.order_number and |
| | | opd.technology_number = fc.technology_number |
| | | left join reporting_work as rw on rw.order_id=fc.order_id and |
| | | rw.production_id=fc.production_id and rw.process_id=fc.process_id and rw.this_process = #{previousProcess} |
| | | left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id and |
| | | rwd.order_number=fc.order_number and rwd.technology_number=fc.technology_number |
| | | where fc.process_id = #{processIdStr} |
| | | and opd.process = #{previousProcess} |
| | | and position(ogd.technology_number in #{technologyStr}) |
| | | |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | | <select id="SelectProcessMp"> |
| | | select * from sd.basic_data where basic_type="product" and basic_category="process" |
| | | |
| | | </select> |
| | | |
| | | </mapper> |