Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | <link rel="icon" href="/favicon.ico"> |
| | | <link rel="stylesheet" type="text/css" media="print" href="/print-lock.css"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>北玻</title> |
| | | <title>北玻ERP</title> |
| | | </head> |
| | | <body> |
| | | <div id="app"></div> |
| | |
| | | produceList1.otherMoney1=otherMoney1 |
| | | produceList2.value.push(produceList1) |
| | | } |
| | | for(let j=0;j<produceList2.value.length;j++){ |
| | | |
| | | if(produceList2.value[j].delivery.money.toFixed(0)!==(produceList2.value[j].otherMoneys |
| | | +produceList2.value[j].sumMoney+produceList2.value[j].delivery.freight).toFixed(0)){ |
| | | console.log(produceList2.value[j]) |
| | | console.log(produceList2.value[j].delivery.money) |
| | | console.log((produceList2.value[j].otherMoneys |
| | | +produceList2.value[j].sumMoney).toFixed(0)) |
| | | console.log(produceList2.value[j].delivery.deliveryId) |
| | | } |
| | | |
| | | } |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'review' :{ |
| | | |
| | | $grid.clearEdit() |
| | | const $table = xGrid.value.getTableData().fullData |
| | | const $oldTable = props.OrderDetail |
| | | $table.forEach((item,index)=>{ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | |
| | | <script setup> |
| | | /*生产加工单竖版*/ |
| | | import request from "@/utils/request" |
| | | import {computed, onMounted, ref} from "vue" |
| | | import PrintFoot from "@/components/sd/order/PrintFoot.vue" |
| | |
| | | const getWeight = (productList) => { |
| | | let weight = 0 |
| | | productList.forEach(item => { |
| | | weight += item.weight |
| | | weight += item.weight*item.quantity |
| | | }) |
| | | return parseFloat(weight.toFixed(2)) |
| | | } |
| | |
| | | <tr v-if="index===0"> |
| | | <th style="width: 6%;font-weight: bold;">序</th> |
| | | <th style="width: 15%;font-weight: bold;" >楼层编号</th> |
| | | <th style="width: 25%;font-weight: bold;" colspan="3">宽X高</th> |
| | | <th style="width: 20%;font-weight: bold;" colspan="3">宽X高</th> |
| | | <th style="width: 8%;font-weight: bold;">数量</th> |
| | | <th style="width: 12%;font-weight: bold;">面积</th> |
| | | <th style="width: 17%;font-weight: bold;" colspan="2">加工要求</th> |
| | | <th style="width: 22%;font-weight: bold;" colspan="2">加工要求/备注</th> |
| | | </tr> |
| | | |
| | | |
| | |
| | | <td colspan="3" style="font-size: 20px;font-weight: bold;" v-else>{{items.width}}x{{items.height}}</td> |
| | | <td style="font-size: 20px;font-weight: bold;">{{items.quantity}}</td> |
| | | <td style="font-size: 20px;font-weight: bold;">{{items.grossArea.toFixed(2)}}</td> |
| | | <td colspan="2">{{items.processingNote}}</td> |
| | | <td colspan="2">{{items.processingNote}} |
| | | {{items.remarks==null?'':'/'}} |
| | | {{items.remarks}}</td> |
| | | </tr> |
| | | <tr class="day-in" > |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="5">小计:</td> |
| | |
| | | materialAdditionReport:"物料新增报表", |
| | | materialOutboundReport:"物料出库报表", |
| | | materialReturnReport:"物料返库报表", |
| | | optimizeOutboundReport:"优化出库报表", |
| | | optimizeQuantity:"优化使用数量", |
| | | }, |
| | | components:{ |
| | | addNewSignature :'أضف اسم جديد', |
| | |
| | | materialAdditionReport:"Material addition report", |
| | | materialOutboundReport:"Material delivery report", |
| | | materialReturnReport:"Material return report", |
| | | optimizeOutboundReport:"优化出库报表", |
| | | optimizeQuantity:"优化使用数量", |
| | | }, |
| | | components:{ |
| | | addNewSignature :'Add label name', |
| | |
| | | materialAdditionReport:"物料新增报表", |
| | | materialOutboundReport:"物料出库报表", |
| | | materialReturnReport:"物料返库报表", |
| | | optimizeOutboundReport:"优化出库报表", |
| | | optimizeQuantity:"优化使用数量", |
| | | }, |
| | | components:{ |
| | | addNewSignature :'Добавить имя метки', |
| | |
| | | materialAdditionReport:"物料新增报表", |
| | | materialOutboundReport:"物料出库报表", |
| | | materialReturnReport:"物料返库报表", |
| | | optimizeOutboundReport:"优化出库报表", |
| | | optimizeQuantity:"优化使用数量", |
| | | }, |
| | | components:{ |
| | | addNewSignature :'新增标签名', |
| | |
| | | component: () => import('../views/mm/stockReport/MaterialOutboundReport.vue'), |
| | | }, |
| | | { |
| | | path: 'optimizeOutboundReport', |
| | | name: 'optimizeOutboundReport', |
| | | component: () => import('../views/mm/stockReport/OptimizeOutboundReport.vue'), |
| | | }, |
| | | { |
| | | path: 'materialReturnReport', |
| | | name: 'materialReturnReport', |
| | | component: () => import('../views/mm/stockReport/MaterialReturnReport.vue'), |
New file |
| | |
| | | <script setup> |
| | | |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import request from "@/utils/request" |
| | | import { ref} from "vue" |
| | | import { useI18n } from 'vue-i18n' |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' }, |
| | | {field: 'operationOrderNumber', width:'150', title: t('productStock.operationOrderNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'projectNo', width: '120',title:t('ingredientsStock.projectNo'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity', width: '140',title: t('ingredientsStock.outboundQuantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'useCount', width: '140',title: t('stockReport.optimizeQuantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'inventoryId',width: '100', title: t('ingredientsStock.id'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'materialName',width: '140', title: t('ingredientsStock.materialName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: '100',title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'height',width: '100', title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'thickness', width: '100',title: t('order.totalThickness'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'unit', width:'140', title: t('ingredients.unit'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operator', width: '100',title: t('productStock.creator'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operateTime', width:'140', title: t('productStock.productionDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/materialInventory/getOptimizeOutboundReport/物料出库', |
| | | exportUrl :'/materialInventory/exportMaterialLogReport/物料出库', |
| | | exportName:t('stockReport.materialOutboundReport'), |
| | | footList:['quantity'] |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <basic-table |
| | | :childrenData="childrenData"/> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | </style> |
| | |
| | | <el-dropdown-item command="/main/stockReport/materialAdditionReport" >{{$t('stockReport.materialAdditionReport')}}</el-dropdown-item> |
| | | <el-dropdown-item command="/main/stockReport/materialOutboundReport" >{{ $t('stockReport.materialOutboundReport') }}</el-dropdown-item> |
| | | <el-dropdown-item command="/main/stockReport/materialReturnReport" >{{ $t('stockReport.materialReturnReport') }}</el-dropdown-item> |
| | | <el-dropdown-item command="/main/stockReport/optimizeOutboundReport" >{{ $t('stockReport.optimizeOutboundReport') }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | const props = defineProps({ |
| | | projectNo : String |
| | | project : null |
| | | }); |
| | | |
| | | const computed = ref(null); |
| | |
| | | // 监听子组件ComputeCard的数据 |
| | | |
| | | |
| | | |
| | | const computeCardRef=ref(null) |
| | | |
| | | |
| | | const handleCardData = (data) => { |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | if (props.projectNo) { |
| | | handleFetchData(props.projectNo); |
| | | handleTableData(data); |
| | | handleDataReceive(data); |
| | | if (props.project) { |
| | | console.log(props.project) |
| | | handleFetchData(props.project.projectNumber); |
| | | //handleTableData(data); |
| | | //handleDataReceive(data); |
| | | } |
| | | }); |
| | | |
| | |
| | | } |
| | | |
| | | const handleSimulation = async () => { |
| | | const data=computeCardRef.value.selectFullData(); |
| | | if(props.project!=null){ |
| | | computed.value.glass_thickness=props.project.glass_thickness |
| | | computed.value.glass_type=props.project.glass_type |
| | | } |
| | | data.forEach(item=>{ |
| | | const processCard = { |
| | | process_no: item.processId, |
| | | layers: item.technologyNumber, |
| | | total_layers: item.total_layers, |
| | | total_num: item.total_num, |
| | | total_area: item.total_area, |
| | | is_must: true, |
| | | allow_rotate: item.allow_rotate, |
| | | priority_level: 0, |
| | | tempering: item.tempering, |
| | | curtain_wall: item.curtain_wall, |
| | | patch_state: item.patch_state, |
| | | merge: item.merge, |
| | | glass_details: [] |
| | | }; |
| | | |
| | | request.post(`/glassOptimize/selectComputeDetail/${item.processId}/${item.technologyNumber}/${item.patch_state}`).then((res) => { |
| | | if(Number(res.code) === 200){ |
| | | res.data.data.forEach(items=>{ |
| | | const detail={ |
| | | process_id:null, |
| | | technology_number:null, |
| | | order_number:null, |
| | | layers_number:null, |
| | | max_width:null, |
| | | max_height:null, |
| | | child_width:null, |
| | | child_height:null, |
| | | quantity:null, |
| | | patch_state:null |
| | | } |
| | | detail.process_id=items.process_id |
| | | detail.technology_number=items.technology_number |
| | | detail.order_number=items.order_number |
| | | detail.layers_number=item.total_layers |
| | | detail.max_width=items.maxwidth |
| | | detail.max_height=items.maxheight |
| | | detail.child_width=items.width |
| | | detail.child_height=items.height |
| | | detail.quantity=items.quantity |
| | | detail.patch_state=item.patch_state |
| | | |
| | | processCard.glass_details.push(detail) |
| | | }) |
| | | |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | computed.value.process_cards.push(processCard) |
| | | }) |
| | | console.log(computed.value) |
| | | |
| | | /*request.post(`/glassOptimize/simulationCalculate`,computed.value).then((res) => { |
| | | if(Number(res.code) === 200){ |
| | | |
| | | } |
| | | })*/ |
| | | /*try { |
| | | const responses = await Promise.all(requests); |
| | | |
| | | // 整合数据 |
| | | const processData = responses.reduce((acc, res, index) => { |
| | | |
| | | // 检查res.data是否为对象,并且包含'data'字段 |
| | | if (typeof res.data === 'object' && res.data !== null && 'data' in res.data) { |
| | | |
| | | // 检查data是否为数组 |
| | | if (!Array.isArray(data)) { |
| | | console.error(`响应数据中的'data'字段不是数组,process_id:`); |
| | | return acc; |
| | | } |
| | | |
| | | // 初始化process_card对象 |
| | | const processCard = { |
| | | process_no: data.processId, |
| | | layers: data.technologyNumber, |
| | | total_layers: data.total_layers, |
| | | total_num: data.total_num, |
| | | total_area: data.total_area, |
| | | is_must: true, |
| | | allow_rotate: data.allow_rotate, |
| | | priority_level: 0, |
| | | tempering: data.tempering, |
| | | curtain_wall: data.curtain_wall, |
| | | patch_state: data.patch_state, |
| | | merge: data.merge, |
| | | glass_details: [] |
| | | }; |
| | | |
| | | |
| | | // 整合glass_details |
| | | data.forEach(detail => { |
| | | const matchedNewData = data.find( |
| | | item => item.technology_number === detail.technology_number |
| | | ); |
| | | |
| | | processCard.glass_details.push({ |
| | | process_id: data.processId, |
| | | technology_number: detail.technology_number, |
| | | order_number: detail.order_number, |
| | | layers_number: detail.layers_number, |
| | | max_width: detail.width, |
| | | max_height: detail.height, |
| | | child_width: detail.child_width, |
| | | child_height: detail.child_height, |
| | | quantity: matchedNewData ? matchedNewData.quantity : 0, |
| | | patch_state: 0 |
| | | }); |
| | | }); |
| | | |
| | | // 将processCard添加到acc中 |
| | | if (!acc.process_cards) { |
| | | acc.process_cards = []; |
| | | } |
| | | acc.process_cards.push(processCard); |
| | | // 设置其他字段的值 |
| | | |
| | | } else { |
| | | console.error(`响应数据格式不正确,process_id: ${processId}`); |
| | | } |
| | | return acc; |
| | | }, {}); |
| | | if (data.length > 0) { |
| | | // 假设所有条目的thickness和glassType相同 |
| | | processData.glass_thickness = data[0].thickness; |
| | | processData.glass_type = data[0].glassType; |
| | | } else { |
| | | processData.glass_thickness = ""; |
| | | processData.glass_type = ""; |
| | | } |
| | | |
| | | |
| | | |
| | | // 发送整合后的数据到父组件 |
| | | emit('sendData', processData); |
| | | } catch (error) { |
| | | console.error('请求失败:', error); |
| | | }*/ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | const loading = ElLoading.service({ |
| | | lock: true, |
| | | text: '正在计算中,请稍候...', |
| | |
| | | //接受子组件ComputeCard的流程卡号 |
| | | let projectRow = ref({ |
| | | processId:null, |
| | | patchState:null, |
| | | technologyNumber:null |
| | | }) |
| | | const handleUpdateProcessId = newProcessId => { |
| | | projectRow.value.processId = newProcessId; |
| | | console.log('接收到子组件获取的流程卡号为',projectRow.value.processId) |
| | | const handleUpdateProcessId = (processId,patchState,technologyNumber) => { |
| | | projectRow.value.processId = processId; |
| | | projectRow.value.patchState = patchState; |
| | | }; |
| | | |
| | | const handleTechnologyNumberUpdate = (processId,patchState,technologyNumber) => { |
| | | projectRow.value.technologyNumber = technologyNumber; |
| | | projectRow.value.patchState = patchState; |
| | | }; |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | <div style="width: 100%; height: 100%;"> |
| | | |
| | | <div id="compute"> |
| | | <compute :data="computedData" @fetch-data="handleFetchData" :project-no="props.projectNo" @sendData="handleData" @simulate-click="handleSimulation" /> |
| | | <compute :data="computedData" @fetch-data="handleFetchData" :project="props.project" @sendData="handleData" @simulate-click="handleSimulation" /> |
| | | </div> |
| | | |
| | | <div id="computeCard"> |
| | | <compute-card :table-data="receivedData" |
| | | <compute-card ref="computeCardRef" :table-data="receivedData" |
| | | :process-id="projectRow.processId===null?null:projectRow.processId" |
| | | @upProcessId="handleUpdateProcessId" @sendData="handleCardData" |
| | | :technology-number="projectRow.technologyNumber===null?null:projectRow.technologyNumber" |
| | | @upProcessId="handleUpdateProcessId" @updateTechnologyNumber="handleTechnologyNumberUpdate" @sendData="handleCardData" |
| | | /> |
| | | </div> |
| | | |
| | | <div id="computeDetail"> |
| | | <compute-detail :process-id="projectRow.processId===null?null:projectRow.processId" /> |
| | | <compute-detail :process-id="projectRow.processId===null?null:projectRow.processId" |
| | | :technology-number="projectRow.technologyNumber===null?null:projectRow.technologyNumber" |
| | | :patch-state="projectRow.patchState===null?null:projectRow.patchState"/> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | margin-top: -30px; |
| | | margin-bottom: 2%; |
| | | width: 100%; |
| | | height: 40%; |
| | | height: 37%; |
| | | } |
| | | #computeCard{ |
| | | margin-top: 90px; |
| | | width: 64%; |
| | | height: 40%; |
| | | height: 55%; |
| | | float: left; |
| | | } |
| | | #computeDetail{ |
| | | margin-top: 90px; |
| | | margin-left: 1%; |
| | | float: left; |
| | | width: 35%; |
| | | height: 40%; |
| | | height: 55%; |
| | | } |
| | | </style> |
| | |
| | | <input type="number" v-model="settings.tempering.maxPieceCount" step="1" />
|
| | | </div>
|
| | | <div class="form-group">
|
| | | <label>X轴默认间隔(mm)</label>
|
| | | <label>长轴默认间隔(mm)</label>
|
| | | <input type="number" v-model="settings.tempering.xAxisInterval" step="1" />
|
| | | </div>
|
| | | <div class="form-group">
|
| | | <label>Y轴默认间隔(mm)</label>
|
| | | <label>宽轴默认间隔(mm)</label>
|
| | | <input type="number" v-model="settings.tempering.yAxisInterval" step="1" />
|
| | | </div>
|
| | | </div>
|
| | |
| | | } |
| | | |
| | | //从工程管理获取工程号,并跳转 |
| | | const projectNumber = ref(''); |
| | | const projectNumber = ref(); |
| | | const switchDialog = (number) => { |
| | | projectNumber.value = number; |
| | | detailPage.value = 3; |
| | |
| | | |
| | | //获取GlassInventory的值(查询库存) |
| | | const sendDataGlassInventory = ref() |
| | | const handleInventoyData = (selectedLabel1,selectedLabel2) => { |
| | | const handleInventoyData = (selectedLabel1,selectedLabel2,type) => { |
| | | sendDataGlassInventory.value = { |
| | | selectedLabel1, selectedLabel2 |
| | | selectedLabel1, selectedLabel2,type |
| | | }; |
| | | }; |
| | | |
| | |
| | | style="width: 90%;height:90%;margin-top: 3vh" |
| | | z-index="100" |
| | | > |
| | | <project-create v-if="detailPage===1" /> |
| | | <project-create v-if="detailPage===1" @switch-dialog="switchDialog"/> |
| | | <project-mange v-if="detailPage===2" @switch-dialog="switchDialog" @closeDetailPage="handlePopupClose"/> |
| | | <glass-computed v-if="detailPage===3" :project-no="projectNumber"/> |
| | | <glass-computed v-if="detailPage===3" :project="projectNumber"/> |
| | | <div v-else></div> |
| | | </el-dialog> |
| | | |
| | |
| | | :deep( .el-dialog__body){ |
| | | height: calc(100% - 55px); |
| | | width: 100%; |
| | | margin-top: 30px; |
| | | //padding: 0; |
| | | } |
| | | |
| | |
| | | import ProcessCardDetail from "@/views/pp/glassOptimize/page/ProcessCardDetail.vue"; |
| | | import ProjectList from "@/views/pp/glassOptimize/page/ProjectList.vue"; |
| | | |
| | | import {ref} from "vue"; |
| | | import {defineEmits, nextTick, onMounted, reactive, ref} from "vue"; |
| | | import {useI18n} from "vue-i18n"; |
| | | import GlassComputed from "@/views/pp/glassOptimize/GlassComputed.vue"; |
| | | import ProjectMange from "@/views/pp/glassOptimize/ProjectMange.vue"; |
| | | import request from "@/utils/request"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {useRouter} from "vue-router"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook"; |
| | | |
| | | const router = useRouter(); |
| | | let projectRow = ref({ |
| | | processId:null, |
| | | technologyNumber:null |
| | | }) |
| | | |
| | | const processCardRef=ref(null) |
| | | |
| | | const handleProcessIdUpdate = newProcessId => { |
| | | projectRow.value.processId = newProcessId; |
| | | |
| | | }; |
| | | |
| | | const handleTechnologyNumberUpdate = newTechnologyNumber => { |
| | | projectRow.value.technologyNumber = newTechnologyNumber; |
| | | }; |
| | | |
| | | const updateState = state => { |
| | | getProject(); |
| | | |
| | | }; |
| | | |
| | | |
| | | const { t } = useI18n() |
| | | |
| | | const xGrid = ref() |
| | | |
| | | |
| | | const gridOptions = reactive({ |
| | | height:'100%', |
| | | loading: false, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30, useKey: true},//鼠标移动或选择高亮 |
| | | id: 'ProjectList', |
| | | scrollX:{enabled: true}, |
| | | scrollY:{ enabled: true ,gt:0},//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | columns:[ |
| | | {field: 'id',width: 150, title: 'ID'}, |
| | | {field: 'projectNumber',width: 150, title: '工程号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'project_name',width: 150, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'glass_type',width: 150, title: '膜系',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'glass_thickness',width: 150, title: '厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'type',width: 150, title: '类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'state',width: 150, title: '状态',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'quantity',width: 150, title: t('order.quantity')}, |
| | | {field: 'glass_total_area',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'process_qty',width: 150, title: '流程数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'process_cards',width: 150, title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | |
| | | ],//表头参数 |
| | | data:null,//表格数据 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | ], |
| | | import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | //右键菜单选项 |
| | | menuConfig: { |
| | | body: { |
| | | options: [ |
| | | [ |
| | | {code: 'openProject', name: '打开工程', prefixIcon: 'vxe-icon-folder-open'}, |
| | | {code: 'updateProject', name: '修改工程', prefixIcon: 'vxe-icon-folder-open'}, |
| | | {code: 'compute', name: '模拟计算', prefixIcon: 'vxe-icon-subtable'}, |
| | | {code: 'delProject', name: '删除工程', prefixIcon: 'vxe-icon-delete'}, |
| | | ], |
| | | [] |
| | | ] |
| | | } |
| | | } |
| | | |
| | | }) |
| | | |
| | | // 定义操作配置对象数组,集中管理不同操作选项对应的参数 |
| | | const operationConfigs = [ |
| | | { |
| | | code: 'openProject', // 打开工程 |
| | | initialState: ['1'], // |
| | | targetState: null, |
| | | successMsg: '已打开!', |
| | | checkMessage: '当前工程状态不符合条件,请确认工程状态后再操作!', |
| | | requiresRow: true, |
| | | openFile: async ({row}) => { |
| | | const projectNumber = row.projectNumber; |
| | | const thickness = row.glass_thickness; |
| | | const glassType = row.glass_type; |
| | | await router.push({ |
| | | name: 'optimizeInfo', |
| | | params: { |
| | | projectNo: projectNumber, |
| | | thickNess: thickness, |
| | | model: glassType |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | code: 'compute', // 打开模拟计算操作 |
| | | initialState: ['1'], // |
| | | targetState: null, |
| | | successMsg: '模拟计算已启动!', |
| | | checkMessage: '当前工程状态不符合模拟计算条件,请确认工程状态后再操作!', |
| | | requiresRow: true, |
| | | actionFunction: async ({row}) => { |
| | | const projectNo = row.projectNumber; |
| | | emit('switch-dialog', row); |
| | | } |
| | | }, |
| | | { |
| | | code: 'delProject', |
| | | initialState: ['1'], |
| | | targetState: null, |
| | | successMsg: '工程删除成功!', |
| | | checkMessage: '当前工程状态不符合删除条件,请确认工程状态后再操作!', |
| | | }, |
| | | { |
| | | code: 'updateProject', |
| | | initialState: ['1'], |
| | | targetState: null, |
| | | successMsg: '', |
| | | checkMessage: '当前工程状态不符合删除条件,请确认工程状态后再操作!', |
| | | } |
| | | |
| | | ]; |
| | | |
| | | //定义切换模拟计算弹窗 |
| | | const emit = defineEmits(['switch-dialog']); |
| | | |
| | | onMounted(async () => { |
| | | getProject(); |
| | | }) |
| | | |
| | | // 定义数据返回结果,使用ref创建响应式数据,初始化为空数组 |
| | | let produceList = ref([]) |
| | | |
| | | const getProject = ()=>{ |
| | | request.post(`/glassOptimize/getProjectList`).then((res) => { |
| | | if(res.code==200){ |
| | | produceList.value = deepClone(res.data.data); |
| | | xGrid.value.loadData(produceList.value) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 公共处理函数,处理相同数据时的操作,并返回targetRoute对象(右键菜单和双击打开) |
| | | const handleSameDataOperation = async ({projectNumber, thickness, glassType}) => { |
| | | const targetRoute = { |
| | | name: 'optimizeInfo', |
| | | params: { |
| | | projectNo: projectNumber, |
| | | thickNess: String(thickness), |
| | | model: glassType |
| | | } |
| | | }; |
| | | const currentRoute = router.currentRoute.value; |
| | | const isRoutesEqual = currentRoute.name === targetRoute.name && |
| | | currentRoute.params.projectNo === targetRoute.params.projectNo && |
| | | currentRoute.params.thickNess === targetRoute.params.thickNess && |
| | | currentRoute.params.model === targetRoute.params.model; |
| | | if (isRoutesEqual) { |
| | | handleConfirm(); |
| | | } |
| | | return {isRoutesEqual}; |
| | | }; |
| | | |
| | | //选中相同数据时弹窗提示 |
| | | const handleConfirm = () => { |
| | | const currentRoute = router.currentRoute.value; |
| | | const projectNumber = currentRoute.params.projectNo; |
| | | ElMessageBox.confirm(`当前工程(工程号:${projectNumber})已打开,是否重新打开?`, '确认操作', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | emit('close-detail-page'); |
| | | ElMessage.success('已打开!'); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage.info('已取消操作'); |
| | | }); |
| | | }; |
| | | |
| | | const gridEvents = { |
| | | menuClick({menu, row}) { |
| | | const $grid = xGrid.value; |
| | | if ($grid) { |
| | | const config = operationConfigs.find(c => c.code === menu.code); |
| | | if (config) { |
| | | if (config.requiresRow && !row) { |
| | | ElMessage.warning('未选中工程,请选中工程后再进行当前操作!'); |
| | | return; |
| | | } |
| | | if (config.code === 'compute') { |
| | | config.actionFunction({row}); |
| | | return; |
| | | } |
| | | if (config.code === 'updateProject') { |
| | | if (!row) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } |
| | | processCardRef.value.getUpdateFlowCardList(row.projectNumber,row.glass_type,row.glass_thickness); |
| | | return; |
| | | } |
| | | if (config.code === 'openProject') { |
| | | handleSameDataOperation(row).then(({isRoutesEqual}) => { |
| | | if (!isRoutesEqual) { |
| | | config.openFile({row}); |
| | | ElMessage.success(config.successMsg); |
| | | } |
| | | }); |
| | | } |
| | | // 添加确认提示弹窗,询问用户是否进行当前操作 |
| | | ElMessageBox.confirm('是否进行当前操作?', '确认操作', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (config.code === 'delProject') { |
| | | if (!row) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } |
| | | const isInitialStateMatched = config.initialState.includes(String(row.state)); |
| | | if (!isInitialStateMatched) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } |
| | | deleteProject(row.projectNumber, config); |
| | | } |
| | | }).catch(() => { |
| | | // 用户点击取消后执行的逻辑 |
| | | ElMessage.info('已取消操作'); |
| | | }); |
| | | } else { |
| | | console.error(`未找到操作选项 ${menu.code} 对应的配置,请检查配置项`); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | function deleteProject(projectNumber, config) { |
| | | request.post(`/glassOptimize/deleteProject/${projectNumber}`, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then((res) => { |
| | | if (res.code==200 && res.data===true) { |
| | | ElMessage.success(config.successMsg); |
| | | // 从列表中移除已删除的工程数据 |
| | | const index = produceList.value.findIndex(item => item.projectNumber === projectNumber); |
| | | if (index !== -1) { |
| | | produceList.value.splice(index, 1); |
| | | xGrid.value.reloadData(produceList.value); |
| | | } |
| | | //刷新工程号 |
| | | processCardRef.value.getProjectId(); |
| | | processCardRef.value.selectGlassType(); |
| | | processCardRef.value.selectFlowCardList(); |
| | | } else { |
| | | console.log('res.code 的值:', res.code, ', 类型:', typeof res.code); |
| | | console.log('res.msg 的值:', res.msg, ', 类型:', typeof res.msg); |
| | | const errorMsg = res.data ? res.data.errorMessage : config.failureMsg; |
| | | ElMessage.error(`操作失败,原因: ${errorMsg}`); |
| | | } |
| | | }).catch((error) => { |
| | | console.error('请求出错,工程删除未完成,详细错误信息:', error); |
| | | ElMessage.error(`请求出错,工程删除未完成,原因: ${errorMsg}`); |
| | | }); |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | <div style="width: 100%; height: 100%;"> |
| | | |
| | | <div id="processCard"> |
| | | <process-card :process-id="projectRow.processId===null?null:projectRow.processId" |
| | | <process-card ref="processCardRef" :process-id="projectRow.processId===null?null:projectRow.processId" |
| | | :technology-number="projectRow.technologyNumber===null?null:projectRow.technologyNumber" |
| | | @updateProcessId="handleProcessIdUpdate" |
| | | @updateTechnologyNumber="handleTechnologyNumberUpdate" |
| | | @updateState="updateState" |
| | | /> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | |
| | | <div id="project-list"> |
| | | <project-list/> |
| | | <div style="width: 100%;height: 100%"> |
| | | <h1>工程列表</h1> |
| | | <vxe-grid |
| | | size="small" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @keyup.enter.native="$panel.confirmFilter()" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import userInfo from "@/stores/userInfo"; |
| | | import {useRouter} from 'vue-router'; |
| | | import {defineEmits} from 'vue'; |
| | | import {changeFilterEvent, filterChanged} from "@/hook"; |
| | | |
| | | |
| | | const {t} = useI18n() |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | }, |
| | | |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {field: 'projectNumber', width: 100, title: '工程号', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {type: 'seq', title: t('basicData.Number'), width: 80}, |
| | | {field: 'projectNumber', width: 100, title: '工程号',sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'projectName', width: 50, title: '名称',}, |
| | | {field: 'glassType', width: 50, title: '膜系',}, |
| | | {field: 'thickness', width: 50, title: '厚度',}, |
| | |
| | | {field: 'area', width: 50, title: '面积',}, |
| | | {field: 'processCardQuantity', width: 100, title: '流程卡数量',}, |
| | | {field: 'usingQuantity', width: 100, title: '原片使用数',}, |
| | | {field: 'processCardCollection', width: 70, title: '流程卡',}, |
| | | {field: 'processCardCollection', width: 70, title: '流程卡',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'temperedLoadingRate', width: 100, title: '钢化装载率',}, |
| | | {field: 'numberOfTemperingFurnaces', width: 100, title: '钢化炉数',}, |
| | | {field: 'averageCuttingRate', width: 100, title: '平均切裁率',}, |
| | |
| | | const operationConfigs = [ |
| | | { |
| | | code: 'openProject', // 打开工程 |
| | | initialState: ['10', '20', '100', '200'], // |
| | | initialState: ['1','10', '20', '100', '200'], // |
| | | targetState: null, |
| | | successMsg: '已打开!', |
| | | checkMessage: '当前工程状态不符合条件,请确认工程状态后再操作!', |
| | |
| | | checkMessage: '当前工程状态不符合模拟计算条件,请确认工程状态后再操作!', |
| | | requiresRow: true, |
| | | actionFunction: async ({row}) => { |
| | | const projectNumber = row.projectNumber; |
| | | emit('switch-dialog', projectNumber); |
| | | const projectNo = row.projectNumber; |
| | | emit('switch-dialog', row); |
| | | } |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | code: 'InitializeProject', |
| | | initialState: ['2', '10', '20'], |
| | | initialState: '2', |
| | | targetState: 1, |
| | | successMsg: '初始化工程成功!', |
| | | checkMessage: '当前工程状态不符合初始化条件,请确认工程状态后再操作!', |
| | |
| | | ElMessage.success(config.successMsg); |
| | | return; |
| | | } |
| | | if (config.code === 'compute') { |
| | | config.actionFunction({row}); |
| | | return; |
| | | } |
| | | // 添加确认提示弹窗,询问用户是否进行当前操作 |
| | | ElMessageBox.confirm('是否进行当前操作?', '确认操作', { |
| | | confirmButtonText: '确定', |
| | |
| | | } |
| | | else { |
| | | row.state = config.targetState; |
| | | let code=0 |
| | | const index = produceList.value.findIndex(item => item === row); |
| | | if (index !== -1) { |
| | | produceList.value.splice(index, 1, {...row}); |
| | | xGrid.value.reloadData(produceList.value); |
| | | } |
| | | updateProjectStateAndHandleResponse(row, row.projectNumber, config.targetState, config.successMsg); |
| | | if(config.code === 'undoCompute'){ |
| | | code=1 |
| | | }else if(config.code === 'undoOptimize'){ |
| | | code=2 |
| | | } |
| | | else if(config.code === 'production'){ |
| | | code=3 |
| | | } |
| | | else if(config.code === 'novisible'){ |
| | | code=4 |
| | | } |
| | | else if(config.code === 'InitializeProject'){ |
| | | code=5 |
| | | } |
| | | updateProjectStateAndHandleResponse(row, row.projectNumber, config.targetState,code, config.successMsg); |
| | | } |
| | | } |
| | | }).catch(() => { |
| | |
| | | } |
| | | } |
| | | |
| | | function updateProjectStateAndHandleResponse(row, projectNumber, targetState, successMsg) { |
| | | function updateProjectStateAndHandleResponse(row, projectNumber, targetState,code, successMsg) { |
| | | const updateParams = { |
| | | projectNumber: projectNumber, |
| | | stateToUpdate: targetState |
| | | }; |
| | | request.post(`/glassOptimize/updateProjectState/${projectNumber}/${targetState}`, updateParams, { |
| | | request.post(`/glassOptimize/updateProjectState/${projectNumber}/${targetState}/${code}`, updateParams, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then((res) => { |
| | | if (Number(res.code) === 200 && (res.msg === "" || res.msg === null)) { |
| | | if (res.code==200 && res.data===true) { |
| | | ElMessage.success(config.successMsg); |
| | | // 从列表中移除已删除的工程数据 |
| | | const index = produceList.value.findIndex(item => item.projectNumber === projectNumber); |
| | |
| | | }) |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | /*const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }); |
| | | } |
| | | }*/ |
| | | |
| | | // 点击查询按钮触发的函数,根据当前筛选条件获取数据并加载到表格 |
| | | const getWorkOrder = () => { |
| | |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data); |
| | | gridOptions.data = produceList.value; |
| | | xGrid.value.reloadData(produceList.value); |
| | | xGrid.value.loadData(produceList.value); |
| | | gridOptions.loading = false; |
| | | } else { |
| | | ElMessage.warning(res.msg); |
| | |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | > |
| | | <template #select_filter="{ column, $panel }"> |
| | | <div> |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="text" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="type" v-model="option.data" @keyup.enter.native="$panel.confirmFilter()" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <script setup> |
| | | import {defineEmits, ref} from "vue"; |
| | | |
| | | |
| | | const value1 = ref('') |
| | | const value2 = ref('') |
| | | |
| | |
| | | |
| | | const emit = defineEmits(['send-data-inventory',]); |
| | | const props = defineProps({ |
| | | closeDialog: Function |
| | | closeDialog: Function, |
| | | thickNess:null, |
| | | model:null |
| | | }); |
| | | |
| | | value1.value=props.thickNess |
| | | value2.value=props.model |
| | | |
| | | const CheckInventory = () => { |
| | | const selectedLabel1 = options1.find((option) => option.value === value1.value)?.label || ''; |
| | | const selectedLabel2 = options2.find((option) => option.value === value2.value)?.label || ''; |
| | | const selectedLabel1 = value1.value; |
| | | const selectedLabel2 = value2.value; |
| | | // 判断两个值是否都被选择了,如果有一个为空字符串,则提示并返回,不执行后续操作 |
| | | if (!selectedLabel1 ||!selectedLabel2) { |
| | | window.alert('请选择相关选项'); |
| | | if (selectedLabel1==="" || selectedLabel2==="") { |
| | | window.alert('请输入'); |
| | | return; |
| | | } |
| | | props.closeDialog(1); |
| | |
| | | <template> |
| | | <div id="box"> |
| | | <div> |
| | | <span>厚度(mm):</span> |
| | | <el-select v-model="value1" clearable style="width: 240px"> |
| | | <el-option |
| | | v-for="item in options1" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <span>厚度(mm):</span> |
| | | <el-input v-model="value1" style="width: 140px"></el-input> |
| | | </div> |
| | | |
| | | <div style="margin-top: 30px"> |
| | | <span>玻璃类型:</span> |
| | | <el-select v-model="value2" clearable style="width: 240px; margin-left: 23px"> |
| | | <el-option |
| | | v-for="item in options2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <span>玻璃类型 :</span> |
| | | <el-input v-model="value2" style="width: 140px"> |
| | | |
| | | </el-input> |
| | | </div> |
| | | |
| | | <div style="float: right; margin:-55px 35px 0 0;"> |
| | |
| | | <script setup> |
| | | import {reactive, ref, watch} from "vue"; |
| | | import {onMounted, reactive, ref, watch} from "vue"; |
| | | import {useI18n} from "vue-i18n"; |
| | | import {Platform, Search, SuccessFilled} from "@element-plus/icons-vue"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | |
| | | //获取工程号 |
| | | const props = defineProps({ |
| | | projectNo : String, |
| | | project: null, |
| | | data: { |
| | | type: Array, |
| | | default: () => [] |
| | | } |
| | | }); |
| | | // 定义响应式数据,用于绑定工程号输入框的值 |
| | | const inputValue = ref(props.projectNo); |
| | | |
| | | |
| | | const selectOptions = [ |
| | | { |
| | | value: '0', |
| | | label: '默认' |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '优先竖排' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '优先横排' |
| | | } |
| | | ] |
| | | |
| | | |
| | | // 定义混排等级 |
| | | const optionVal = ref('') |
| | | const optionVal = ref(50) |
| | | |
| | | // 定义装载率 |
| | | const percentage1 = ref(80) |
| | |
| | | // 定义其他表单数据 |
| | | const furnaceWidth = ref('') // 炉宽 |
| | | const furnaceLength = ref('') // 炉长 |
| | | const heatingTime = ref('') // 加热时间 |
| | | const heatingTime = ref('') // 钢化加热时间 |
| | | const rotateMode = ref({value: '0', label: '默认'}) // 钢化旋转模式 |
| | | const spacingLong = ref('') // 长轴间隔 |
| | | const spacingWidth = ref('') // 宽轴间隔 |
| | | const quantity = ref('') // 工程片数 |
| | | |
| | | // 定义响应式数据,用于绑定工程号输入框的值 |
| | | let inputValue=ref(null) |
| | | if(props.project!==undefined){ |
| | | inputValue= ref(props.project.projectNumber); |
| | | quantity.value=props.project.quantity |
| | | } |
| | | |
| | | const fetchSettings = async (username) => { |
| | | try { |
| | |
| | | ],//表头参数 |
| | | data: null,//表格数据 |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots: { |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | |
| | | }, |
| | | }) |
| | | |
| | | onMounted(async() => { |
| | | await firstLoading() |
| | | }) |
| | | |
| | | const firstLoading = async() => { |
| | | request.post(`/glassOptimize/selectOptimizeParms/${username}`).then((res) => { |
| | | if (res.code == "200") { |
| | | const parsedData = JSON.parse(res.data); |
| | | furnaceWidth.value=parsedData.tempering.furnaceWidth |
| | | furnaceLength.value=parsedData.tempering.furnaceLength |
| | | spacingLong.value=parsedData.tempering.xAxisInterval |
| | | spacingWidth.value=parsedData.tempering.yAxisInterval |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | // 监听父组件传递的数据变化 |
| | | watch(() => props.data, (newValue) => { |
| | | if (newValue) { |
| | | // 处理数据并更新表格 |
| | | const processData = newValue.data[0]; |
| | | console.log('Processed Data:', processData); |
| | | const processedData = [ |
| | | { |
| | | id: "1", |
| | |
| | | } |
| | | ]; |
| | | gridOptions.data = processedData; |
| | | console.log(gridOptions.data) |
| | | } else { |
| | | console.error("数据格式不正确或为空"); |
| | | gridOptions.data = []; |
| | | } |
| | | }) |
| | | |
| | | |
| | | const options = [ |
| | | { |
| | | value: '0', |
| | | label: '不混排', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '轻度混排', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '中度混排', |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: '高度混排', |
| | | }, |
| | | ] |
| | | |
| | | const inputValues = { |
| | | project_no:inputValue.value, |
| | | glass_thickness:"", |
| | | glass_type:"", |
| | | chaos_pct: optionVal.value*0.01,//混排等级 |
| | | cage_free:percentage2.value*0.01,//理片龙空闲度 |
| | | tempering_time:heatingTime.value,//钢化加热时间 |
| | | heat_mode: 0,//模式选择 |
| | | max_load_pct: percentage1.value*0.01,//最大装载率 |
| | | max_area: 0,//最大面积 |
| | | max_qty:0,//最大片数 |
| | | load_width:null, |
| | | load_length: null, |
| | | x_space: null, |
| | | y_space: null, |
| | | load_rate: null, |
| | | furnaces_qty:"", |
| | | rotate_mode:0, |
| | | polys_allow_rotate: 0, |
| | | process_cards:[] |
| | | }; |
| | | |
| | | |
| | | // let emit = defineEmits(['fetch-data']); |
| | | let emit = defineEmits(['fetch-data', 'sendData']) |
| | | const inputValues = { |
| | | project_no:inputValue, |
| | | glass_thickness:"", |
| | | glass_type:"", |
| | | chaos_pct: optionVal.value*0.01,//混排等级 |
| | | cage_free:percentage2.value*0.01,//理片龙空闲度 |
| | | tempering_time:heatingTime.value,//钢化加热时间 |
| | | heat_mode: 0,//模式选择 |
| | | max_load_pct: percentage1.value*0.01,//最大装载率 |
| | | max_area: 0,//最大面积 |
| | | max_qty:0,//最大片数 |
| | | load_width:furnaceWidth, |
| | | load_length: furnaceLength, |
| | | x_space: spacingWidth, |
| | | y_space: spacingLong, |
| | | load_rate: null, |
| | | }; |
| | | |
| | | // 发送所有数据到父组件 |
| | | emit('sendData', { |
| | | ...inputValues |
| | | }); |
| | | const handleSearchClick = () => { |
| | | // 通过 $emit 触发自定义事件,将工程号传递给父组件,由父组件去调用接口获取数据 |
| | | emit('fetch-data', inputValue.value); |
| | |
| | | |
| | | }; |
| | | const handleSimulationClick = () => { |
| | | |
| | | inputValues.load_width = furnaceWidth.value |
| | | inputValues.load_length = furnaceLength.value |
| | | inputValues.x_space = spacingWidth.value |
| | | inputValues.y_space = spacingLong.value |
| | | inputValues.polys_allow_rotate = parseInt(rotateMode.value.value) |
| | | |
| | | emit('sendData', { |
| | | ...inputValues |
| | | }) |
| | | // 触发父组件的 simulate-click 事件 |
| | | emit('simulate-click'); |
| | | |
| | | |
| | | }; |
| | | |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div style="width: 100%;height: 100%"> |
| | | <!--模拟计算表头--> |
| | | <div id="title" style="margin-top: -10px"> |
| | | <span> |
| | | 工程编号 |
| | | <el-input style="width:150px;margin-left: 30px" clearable v-model="inputValue" placeholder="请输入工程号"></el-input> |
| | | <el-button |
| | | type="primary" |
| | | :icon="Search" |
| | | style="margin-left: 20px" |
| | | @click="handleSearchClick" |
| | | >{{ $t('basicData.search') }} |
| | | </el-button> |
| | | </span> |
| | | <span style="float: right ; margin-right: 120px"> |
| | | 工程混排等级 |
| | | <el-select |
| | | placeholder="选择混排等级" |
| | | style="margin-left:10px; width: 200px; " |
| | | ref="getSelect" |
| | | v-model="optionVal" |
| | | clearable |
| | | class="m-2" |
| | | @change="getWorkOrder" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary" style="margin-left: 10px" :icon="Platform" @click="handleSimulationClick">模拟计算</el-button> |
| | | <el-button type="primary" style="margin-left: 20px" :icon="SuccessFilled" @click="handleSave">保存</el-button> |
| | | </span><br> |
| | | <div class="demo-progress" style="margin-top: 5px"> |
| | | <div style="display: flex; align-items: center"> |
| | | <span>钢化最大装载</span> |
| | | <!-- 进度条设置 --> |
| | | <div id="title" style="margin-top: -10px;height: 50%"> |
| | | <div style="display: flex"> |
| | | <div style="width: 850px"> |
| | | 工程编号 |
| | | <el-input style="width:150px;margin-left: 30px" clearable v-model="inputValue" placeholder="请输入工程号"></el-input> |
| | | <el-button |
| | | type="primary" |
| | | :icon="Search" |
| | | style="margin-left: 20px" |
| | | @click="handleSearchClick" |
| | | >{{ $t('basicData.search') }} |
| | | </el-button> |
| | | </div> |
| | | <div style="display: flex ; width: 700px;align-items: center;"> |
| | | <span>工程混排等级</span> |
| | | <el-slider |
| | | style="max-width: 400px; flex: 1; margin-left: 10px" |
| | | v-model="percentage1" |
| | | style="max-width: 200px; flex: 1; margin-left: 10px" |
| | | v-model="optionVal" |
| | | :min="0" |
| | | :max="100" |
| | | :step="1"/> |
| | | <span style="margin-left: 20px ; width: 30px;">{{ percentage1 }}%</span> |
| | | <span style="float: right ; margin-left: 150px;"> |
| | | 宽轴间隔 <vxe-input size="small" class="input" clearable v-model="spacingWidth"></vxe-input> |
| | | 炉宽(mm) <vxe-input size="small" class="input" clearable v-model="furnaceWidth"></vxe-input> |
| | | </span> |
| | | <span style="margin-left: 20px ; width: 35px;">{{ optionVal }}%</span> |
| | | |
| | | <el-button type="primary" style="margin-left: 10px" :icon="Platform" @click="handleSimulationClick">模拟计算</el-button> |
| | | <el-button type="primary" style="margin-left: 20px" :icon="SuccessFilled" @click="handleSave">保存</el-button> |
| | | </div> |
| | | </div><br> |
| | | <div style="display:flex"> |
| | | <div class="demo-progress" style="margin-top: 5px;width: 50%"> |
| | | <div style="display: flex; align-items: center"> |
| | | <span>钢化最大装载</span> |
| | | <!-- 进度条设置 --> |
| | | <el-slider |
| | | style="max-width: 400px; flex: 1; margin-left: 10px" |
| | | v-model="percentage1" |
| | | :min="0" |
| | | :max="100" |
| | | :step="1"/> |
| | | <span style="margin-left: 20px ; width: 35px;">{{ percentage1 }}%</span> |
| | | <!-- <span style="float: right ; margin-left: 150px;"> |
| | | 工程片数 <vxe-input size="small" disabled class="input" v-model="quantity"></vxe-input> |
| | | 宽轴间隔 <vxe-input size="small" class="input" clearable v-model="spacingWidth"></vxe-input> |
| | | 炉宽(mm) <vxe-input size="small" class="input" clearable v-model="furnaceWidth"></vxe-input> |
| | | </span>--> |
| | | </div> |
| | | <div style="display: flex; align-items: center"> |
| | | <span>理片笼空闲度</span> |
| | | <!-- 进度条设置 --> |
| | | <el-slider |
| | | style="max-width: 400px; flex: 1; margin-left: 10px" |
| | | v-model="percentage2" |
| | | :min="0" |
| | | :max="100" |
| | | :step="1"/> |
| | | <span style="margin-left: 20px ; width: 35px;">{{ percentage2 }}%</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="demo-progress" style="display: flex;font-size: 15px"> |
| | | <div style="height: 35px;line-height: 35px"> |
| | | <div>工程片数 <el-input size="small" disabled class="input" v-model="quantity"></el-input></div> |
| | | <div>钢化旋转方式 |
| | | <el-select style="width: 100px;height: 30px" v-model="rotateMode"> |
| | | <el-option |
| | | v-for="item in selectOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div style="margin-left: 15px;height: 35px;line-height: 35px"> |
| | | <div>宽轴间隔 <el-input size="small" class="input" clearable v-model="spacingWidth"></el-input></div> |
| | | <div>长轴间隔 <vxe-input size="small" class="input" clearable v-model="spacingLong"></vxe-input></div> |
| | | |
| | | |
| | | </div> |
| | | <div style="margin-left: 15px;height: 35px;line-height: 35px"> |
| | | <div>炉宽(mm) <el-input size="small" class="input" clearable v-model="furnaceWidth"></el-input></div> |
| | | <div>炉长(mm) <vxe-input size="small" class="input" clearable v-model="furnaceLength"></vxe-input></div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <br> |
| | | <div class="demo-progress" style="margin-top: -10px"> |
| | | <!-- <div class="demo-progress" style="margin-top: -10px"> |
| | | <div style="display: flex; align-items: center"> |
| | | <span>理片笼空闲度</span> |
| | | <!-- 进度条设置 --> |
| | | <!– 进度条设置 –> |
| | | <el-slider |
| | | style="max-width: 400px; flex: 1; margin-left: 10px" |
| | | v-model="percentage2" |
| | | :min="0" |
| | | :max="100" |
| | | :step="1"/> |
| | | <span style="margin-left: 20px ; width: 30px;">{{ percentage2 }}%</span> |
| | | <span style="margin-left: 20px ; width: 35px;">{{ percentage2 }}%</span> |
| | | <span style="float: right ; margin-left: 150px;"> |
| | | 加热时间(秒)<vxe-input size="small" class="input" clearable v-model="heatingTime"></vxe-input> |
| | | 加热时间(秒)<el-select style="width: 50px;height: 30px" v-model="rotateMode"> |
| | | <el-option |
| | | v-for="item in selectOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | 长轴间隔 <vxe-input size="small" class="input" clearable v-model="spacingLong"></vxe-input> |
| | | 炉长(mm) <vxe-input size="small" class="input" clearable v-model="furnaceLength"></vxe-input> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | <div style="height: 50%"> |
| | | <vxe-grid |
| | | size="small" |
| | | @filter-change="filterChanged" |
| | | height="50%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" |
| | | @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | |
| | | <vxe-grid |
| | | size="small" |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" |
| | | @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | |
| | | .input { |
| | | width: 80px; |
| | | margin-left: 20px; |
| | | height: 30px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | import {nextTick, onMounted, reactive, ref, watch} from "vue"; |
| | | import request from "@/utils/request"; |
| | | import {useI18n} from "vue-i18n"; |
| | | import {ElMessage} from "element-plus"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | const { t } = useI18n() |
| | | |
| | | const xGrid = ref() |
| | |
| | | }, |
| | | |
| | | columns:[ |
| | | {type:'seq',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'check', title: '选择', width: 250, cellRender: checkboxCellRender }, |
| | | {field: 'process_id',width: 150, title: t('processCard.processId'), sortable: true}, |
| | | {field: 'technology_number',width: 70, title: '层', sortable: true}, |
| | | {field: 'TotalFloors',width: 150, title: '总层数', sortable: true}, |
| | | {type: 'seq', title: t('basicData.Number'), width: 80}, |
| | | {field: 'curtain_wall',title: '幕墙模式',width: 80, slots: { default: 'state1' }}, |
| | | {field: "allow_rotate", title: '允许横排', width: 80, slots: { default: 'state2' }}, |
| | | {field: "tempering", title: '钢化', width: 80, slots: { default: 'state3' }}, |
| | | |
| | | {field: 'processId',width: 150, title: t('processCard.processId'), sortable: true}, |
| | | {field: 'technologyNumber',width: 70, title: '层', sortable: true}, |
| | | {field: 'total_layers',width: 150, title: '总层数', sortable: true}, |
| | | {field: 'TotalNumber',width: 150, title: '规格', sortable: true}, |
| | | {field: 'quantity',width: 150, title: t('order.quantity'), sortable: true}, |
| | | {field: 'total_num',width: 150, title: t('order.quantity'), sortable: true}, |
| | | {field: 'glass_child',width: 150, title: t('order.product'), sortable: true}, |
| | | {field: 'project', width:150, title: t('order.project'), showOverflow: "ellipsis"}, |
| | | {field: 'area',width: 150, title: t('order.area'), sortable: true}, |
| | | {field: 'total_area',width: 150, title: t('order.area'), sortable: true}, |
| | | |
| | | |
| | | ],//表头参数 |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | ]); |
| | | |
| | | |
| | | |
| | | const selectFullData = () => { |
| | | return xGrid.value.getTableData().fullData |
| | | } |
| | | |
| | | |
| | | const props = defineProps({ |
| | | tableData: Array, |
| | | processId: null, |
| | | technologyNumber: null, |
| | | patchState: null, |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | watch(() => props.tableData, async (newData) => { |
| | | if (Array.isArray(newData)) { |
| | | gridOptions.data = newData; |
| | | await nextTick(); |
| | | if (xGrid.value) { |
| | | const grid = xGrid.value; |
| | | if (typeof grid.refresh === 'function') { |
| | | grid.refresh(); |
| | | } |
| | | |
| | | |
| | | // 提取所有唯一的process_id |
| | | const processIds = Array.from(new Set(newData.map(item => item.process_id))); |
| | | |
| | | // 发起所有请求 |
| | | const requests = processIds.map(processId => |
| | | request.post(`/glassOptimize/selectComputeDetail/${processId}`) |
| | | ); |
| | | |
| | | try { |
| | | const responses = await Promise.all(requests); |
| | | |
| | | // 整合数据 |
| | | const processData = responses.reduce((acc, res, index) => { |
| | | const processId = processIds[index]; |
| | | |
| | | // 检查res.data是否为对象,并且包含'data'字段 |
| | | if (typeof res.data === 'object' && res.data !== null && 'data' in res.data) { |
| | | const data = res.data.data; |
| | | |
| | | // 检查data是否为数组 |
| | | if (!Array.isArray(data)) { |
| | | console.error(`响应数据中的'data'字段不是数组,process_id: ${processId}`); |
| | | return acc; |
| | | } |
| | | |
| | | // 获取对应process_id的newData条目 |
| | | const relatedNewData = newData.filter(item => item.process_id === processId); |
| | | |
| | | // 初始化process_card对象 |
| | | const processCard = { |
| | | process_no: processId, |
| | | layers: relatedNewData.technology_number, |
| | | total_layers: relatedNewData.TotalNumber, |
| | | total_num: relatedNewData.quantity, |
| | | total_area: relatedNewData.area, |
| | | is_must: true, |
| | | allow_rotate: relatedNewData.check === 1 ? true : false, |
| | | priority_level: 0, |
| | | tempering: relatedNewData.check === 2 ? true : false, |
| | | curtain_wall: relatedNewData.check === 3 ? true : false, |
| | | patch_state: 0, |
| | | merge: 0, |
| | | glass_details: [] |
| | | }; |
| | | |
| | | |
| | | // 整合glass_details |
| | | data.forEach(detail => { |
| | | const matchedNewData = relatedNewData.find( |
| | | item => item.technology_number === detail.technology_number |
| | | ); |
| | | |
| | | processCard.glass_details.push({ |
| | | process_id: processId, |
| | | technology_number: detail.technology_number, |
| | | order_number: detail.order_number, |
| | | layers_number: detail.layers_number, |
| | | max_width: detail.width, |
| | | max_height: detail.height, |
| | | child_width: detail.child_width, |
| | | child_height: detail.child_height, |
| | | quantity: matchedNewData ? matchedNewData.quantity : 0, |
| | | patch_state: 0 |
| | | }); |
| | | }); |
| | | |
| | | // 将processCard添加到acc中 |
| | | if (!acc.process_cards) { |
| | | acc.process_cards = []; |
| | | } |
| | | acc.process_cards.push(processCard); |
| | | // 设置其他字段的值 |
| | | |
| | | } else { |
| | | console.error(`响应数据格式不正确,process_id: ${processId}`); |
| | | } |
| | | return acc; |
| | | }, {}); |
| | | if (newData.length > 0) { |
| | | // 假设所有条目的thickness和glassType相同 |
| | | processData.glass_thickness = newData[0].thickness; |
| | | processData.glass_type = newData[0].glassType; |
| | | } else { |
| | | processData.glass_thickness = ""; |
| | | processData.glass_type = ""; |
| | | } |
| | | |
| | | |
| | | |
| | | // 发送整合后的数据到父组件 |
| | | emit('sendData', processData); |
| | | } catch (error) { |
| | | console.error('请求失败:', error); |
| | | } |
| | | } |
| | | } else { |
| | | console.error('传递给表格的数据格式不符合要求,期望是数组格式'); |
| | | console.log(newData) |
| | | xGrid.value.loadData(deepClone(newData)) |
| | | const data = xGrid.value.getTableData().fullData |
| | | data.forEach(item => { |
| | | item.tempering = item.tempering === 1; |
| | | item.allow_rotate = item.allow_rotate === 1; |
| | | item.curtain_wall = item.curtain_wall === 1; |
| | | }) |
| | | } |
| | | }); |
| | | |
| | |
| | | cellClick({row}) { |
| | | rowClickIndex.value = row |
| | | // Emit 事件将更新后的值传递给父组件 |
| | | emit('upProcessId', rowClickIndex.value.process_id); |
| | | emit('upProcessId', rowClickIndex.value.processId,rowClickIndex.value.patch_state,rowClickIndex.value.technologyNumber); |
| | | emit('updateTechnologyNumber', rowClickIndex.value.processId,rowClickIndex.value.patch_state,rowClickIndex.value.technologyNumber); |
| | | } |
| | | } |
| | | |
| | | defineExpose({selectFullData}) |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <span>流程卡</span> |
| | | <vxe-grid |
| | | size="small" |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #state1="{ row,column}"> |
| | | <el-checkbox |
| | | v-model="row.curtain_wall"/> |
| | | </template> |
| | | <template #state2="{ row,column}"> |
| | | <el-checkbox |
| | | v-model="row.allow_rotate"/> |
| | | </template> |
| | | <template #state3="{ row,column}"> |
| | | <el-checkbox |
| | | v-model="row.tempering"/> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {Minus, Plus, Search} from "@element-plus/icons-vue"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook"; |
| | | const { t } = useI18n() |
| | | |
| | | // 接收父组件传递过来的流程卡号(processId) |
| | | let props = defineProps({ |
| | | processId:null, |
| | | patchState:null, |
| | | technologyNumber:null |
| | | }); |
| | | |
| | | const xGrid = ref() |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | |
| | | columns:[ |
| | | {type: 'seq',width: 70, title: '序号',filters:[{ data: '' }],}, |
| | | {field: 'width',width: 150,title: t('order.width'),filters:[{ data: '' }],}, |
| | | {field: 'height',width: 150,title: t('order.height')}, |
| | | {field: 'quantity',width: 150, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'Storey Number',width: 150, title: t('order.buildingNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'shape',width: 150, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'area',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'Label type',width: 150, title: '印标',filters:[{ data: '' }],}, |
| | | {field: 'width',width: 150,title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'height',width: 150,title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'quantity',width: 150, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'building_number',width: 150, title: t('order.buildingNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'shape',width: 150, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'area',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'icon',width: 150, title: '印标',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | ],//表头参数 |
| | | data:null,//表格数据 |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | |
| | | |
| | | watch( |
| | | () => props.processId, |
| | | (newValue, oldValue) => { |
| | | if (props.processId!=null){ |
| | | selectComputeDetail() |
| | | |
| | | } |
| | | |
| | | ()=> [props.processId,props.technologyNumber], |
| | | ([newValue, oldValue])=> { |
| | | if (props.processId!=null){ |
| | | selectComputeDetail() |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | const selectComputeDetail = () => { |
| | | if (props.processId!=null || props.processId!=""){ |
| | | request.post(`/glassOptimize/selectComputeDetail/${props.processId}`).then((res) => { |
| | | request.post(`/glassOptimize/selectComputeDetail/${props.processId}/${props.technologyNumber}/${props.patchState}`).then((res) => { |
| | | if(Number(res.code) === 200){ |
| | | xGrid.value.loadData(res.data.data) |
| | | }else{ |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="type" v-model="option.data" @keyup.enter.native="$panel.confirmFilter()" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import request from "@/utils/request"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {useRoute} from "vue-router"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | const { t } = useI18n() |
| | | |
| | | const xGrid = ref() |
| | |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | trigger: 'dblclick', |
| | | mode: 'cell', |
| | | showStatus: true |
| | | }, |
| | | |
| | |
| | | {type:'seq',fixed:"left", title:' ', width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {field: 'id', title: '物料编码',}, |
| | | {field:'width',title: t('order.width'),}, |
| | | {field: 'height',title: t('order.height')}, |
| | | {field:'width',editRender: { name: 'input',attrs: {disabled:true}}, title: t('order.width'),}, |
| | | {field: 'height',editRender: { name: 'input',attrs: {disabled:true}},title: t('order.height')}, |
| | | {field: 'thickness', title: t('order.totalThickness'),}, |
| | | {field: 'model', title: t('warehouseBasicData.type'),}, |
| | | {field: 'leftTrim', title: '左修边',}, |
| | | {field: 'downTrim', title: '下修边',}, |
| | | {field: 'rigthTrim', title: '右修边',}, |
| | | {field: 'upTrim', title: '上修边',}, |
| | | {field: 'available_quantity', title: '库存数量',}, |
| | | {field: '', title: '加工数量',}, |
| | | {field: 'leftTrim',editRender: { name: 'input',attrs: {disabled:false}}, title: '左修边',}, |
| | | {field: 'downTrim',editRender: { name: 'input',attrs: {disabled:false}}, title: '下修边',}, |
| | | {field: 'rightTrim',editRender: { name: 'input',attrs: {disabled:false}}, title: '右修边',}, |
| | | {field: 'upTrim',editRender: { name: 'input',attrs: {disabled:false}}, title: '上修边',}, |
| | | {field: 'available_quantity',editRender: { name: 'input',attrs: {disabled:false}}, title: '库存数量',}, |
| | | {field: 'processingQuantity', title: '加工数量',}, |
| | | {field: 'name', title: '名称',}, |
| | | {field: 'producer', title: '供应商',} |
| | | ],//表头参数 |
| | |
| | | [ |
| | | {code: 'selectTrimming', name: '设置统一修边',}, |
| | | {code: 'Exports', name: '数据导出', prefixIcon: 'vxe-icon-download', visible: true, disabled: false}, |
| | | {code: 'addRow', name: t('basicData.add'), prefixIcon: 'vxe-icon-square-plus', visible: true, disabled: true }, |
| | | ], |
| | | [] |
| | | ] |
| | | }, |
| | | }, |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | }, |
| | | }) |
| | | |
| | |
| | | gridRef: xGrid, |
| | | requiresRow: false, |
| | | }, |
| | | { |
| | | code: 'addRow', // 导出文件操作的配置 |
| | | successMsg: '添加成功!', |
| | | gridRef: xGrid, |
| | | requiresRow: false, |
| | | }, |
| | | ] |
| | | |
| | | // 右键菜单点击逻辑 |
| | |
| | | if (config.code === 'Exports') { |
| | | config.gridRef.value.exportData(); |
| | | ElMessage.success(config.successMsg); |
| | | return; |
| | | } |
| | | if (config.code === 'addRow') { |
| | | if ($grid.getTableData().tableData.length >=100){ |
| | | ElMessage.error(t('order.msg.tableLengthMax')) |
| | | return |
| | | } |
| | | if ($grid.getCheckedFilters().length!==0){ |
| | | ElMessage.error(t('order.msg.pleaseCancelTheFilteringFirst')) |
| | | return |
| | | } |
| | | console.log($grid.getTableData().visibleData) |
| | | let result = toolbarButtonClickEvent() |
| | | let lengths = 0 |
| | | if (result!=null){ |
| | | lengths=result.start |
| | | } |
| | | if($grid.getTableData().fullData.length>lengths+1){ |
| | | $grid.insertAt({}, lengths+1) |
| | | }else{ |
| | | $grid.insertAt({}, -1) |
| | | } |
| | | return; |
| | | } |
| | | // 添加确认提示弹窗,询问用户是否进行当前操作 |
| | |
| | | |
| | | const thickness = ref(route.params.thickNess); |
| | | const model = ref(route.params.model); |
| | | let projectNo = ref(null); |
| | | let type = ref(1); |
| | | |
| | | |
| | | const selectMaterialStore = () =>{ |
| | | request.post(`/glassOptimize/materialStore/${thickness.value}/${model.value}`).then((res) => { |
| | | const selectMaterialStore = async () =>{ |
| | | request.get(`/glassOptimize/materialStore/${thickness.value}/${model.value}/${projectNo}?type=${type.value}`).then((res) => { |
| | | if (Number(res.code) === 200) { |
| | | const rawData = res.data.data; |
| | | const edgeTrimming = res.data.edgeTrimming; |
| | | let state = res.data.state; |
| | | if (Array.isArray(rawData) && rawData.length > 0) { |
| | | const formattedData = rawData.map(item => { |
| | | const formattedItem = {}; |
| | |
| | | } |
| | | return formattedItem; |
| | | }); |
| | | const data = formattedData; |
| | | data.forEach(item => { |
| | | item.leftTrim = 0; |
| | | item.downTrim = 0; |
| | | item.rigthTrim = 0; |
| | | item.upTrim = 0; |
| | | }); |
| | | if(edgeTrimming!=null){ |
| | | const edgeTrimmingData = edgeTrimming.map(item => { |
| | | const edgeTrimmingItem = {}; |
| | | for (const key in item) { |
| | | if (typeof item[key] === 'string') { |
| | | //去除字符串属性值开头和结尾的双引号 |
| | | edgeTrimmingItem[key] = item[key].replace(/^\"|\"$/g, ''); |
| | | } else { |
| | | edgeTrimmingItem[key] = item[key]; |
| | | } |
| | | } |
| | | return edgeTrimmingItem; |
| | | }); |
| | | console.log(edgeTrimmingData) |
| | | formattedData.forEach(item => { |
| | | item.leftTrim = edgeTrimmingData[0].leftTrim; |
| | | item.downTrim = edgeTrimmingData[0].downTrim; |
| | | item.rightTrim = edgeTrimmingData[0].rightTrim; |
| | | item.upTrim = edgeTrimmingData[0].upTrim; |
| | | }); |
| | | } |
| | | if(state<10){ |
| | | gridOptions.columns[3].editRender.attrs.disabled=false |
| | | gridOptions.columns[4].editRender.attrs.disabled=false |
| | | gridOptions.menuConfig.body.options[0][2].disabled = false |
| | | }else if(state>20){ |
| | | gridOptions.columns[7].editRender.attrs.disabled=true |
| | | gridOptions.columns[8].editRender.attrs.disabled=true |
| | | gridOptions.columns[9].editRender.attrs.disabled=true |
| | | gridOptions.columns[10].editRender.attrs.disabled=true |
| | | gridOptions.columns[11].editRender.attrs.disabled=true |
| | | } |
| | | xGrid.value.loadData(formattedData); |
| | | gridOptions.data = formattedData; |
| | | } else { |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | selectMaterialStore(); |
| | | addListener(xGrid.value,gridOptions) |
| | | if(route.params.projectNo!=null){ |
| | | projectNo=route.params.projectNo |
| | | selectMaterialStore(); |
| | | } |
| | | |
| | | }); |
| | | |
| | | watch(() => props.receivedData, (newData) => { |
| | |
| | | if (newInventoryData) { |
| | | thickness.value = newInventoryData.selectedLabel1; |
| | | model.value = newInventoryData.selectedLabel2; |
| | | type.value=newInventoryData.type |
| | | // 由于 thickness 和 model 的值改变了,更新表格,调用 selectMaterialStore 重新获取数据 |
| | | selectMaterialStore(); |
| | | } |
| | |
| | | properties: { |
| | | selectedLabel1: { type: String }, |
| | | selectedLabel2: { type: String }, |
| | | type: { type: String } |
| | | } |
| | | } |
| | | }); |
| | |
| | | // 从 receivedData 中获取对应的值来更新表格数据项 |
| | | leftTrim: Number(receivedData.quicksetLeft), |
| | | downTrim: Number(receivedData.quicksetBottom), |
| | | rigthTrim: Number(receivedData.quicksetRight), |
| | | rightTrim: Number(receivedData.quicksetRight), |
| | | upTrim: Number(receivedData.quicksetTop), |
| | | }; |
| | | updatedData.push(updatedItem); |
| | |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook"; |
| | | |
| | | const {t} = useI18n() |
| | | const userStore = useUserInfoStore() |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | }, |
| | | columns: [ |
| | | |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {field: 'select',type:'checkbox',title: t('basicData.check'), width: 80,fixed:"left"}, |
| | | { |
| | | field: 'process_id', |
| | | width: 150, |
| | | title: t('processCard.processId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | |
| | | title: '层', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'TotalFloors', |
| | |
| | | title: '总层数', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'TotalNumber', |
| | |
| | | title: '规格', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | |
| | | title: t('order.quantity'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'shape', |
| | |
| | | title: t('order.shape'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'glass_child', |
| | |
| | | title: t('order.product'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | {field: 'project', width: 150, title: t('order.project'), showOverflow: "ellipsis"}, |
| | | {field: 'project', width: 150, title: t('order.project'), showOverflow: "ellipsis",filterMethod:filterChanged}, |
| | | { |
| | | field: 'area', |
| | | width: 150, |
| | | title: t('order.area'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | },{ |
| | | field: 'patch_state', |
| | | width: 100, |
| | | title: '补片状态' |
| | | }, |
| | | |
| | | |
| | |
| | | emit('updateTechnologyNumber', rowClickIndex.value.technology_number); |
| | | } |
| | | } |
| | | const emit = defineEmits(['updateProcessId', 'updateTechnologyNumber']); |
| | | const emit = defineEmits(['updateProcessId', 'updateTechnologyNumber', 'updateState']); |
| | | |
| | | |
| | | //小圆点单选框 |
| | | let radio = ref(1); |
| | | let isButtonDisabledAdd = ref(false); |
| | | let isButtonDisabledUpdate = ref(true); |
| | | |
| | | const selectFlowCardList = () => { |
| | | const selectFlowCardList = async () => { |
| | | request.post(`/glassOptimize/getFlowCardList/${optionVal.value}/${radio.value}`).then((res) => { |
| | | if (res.code == 200) { |
| | | getProjectId() |
| | | isButtonDisabledAdd.value=false |
| | | isButtonDisabledUpdate.value = true |
| | | xGrid.value.loadData(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | }) |
| | | } |
| | | |
| | | const getUpdateFlowCardList = async (projectNumber,type,thickness) => { |
| | | radio.value=1 |
| | | request.post(`/glassOptimize/getUpdateFlowCardList/${type}/${thickness}/${radio.value}/${projectNumber}`).then((res) => { |
| | | if (res.code == 200) { |
| | | oddNumbers.value=projectNumber |
| | | optionVal.value=thickness+"mm"+type |
| | | isButtonDisabledAdd.value=true |
| | | isButtonDisabledUpdate.value=false |
| | | xGrid.value.loadData(deepClone(res.data.data)) |
| | | xGrid.value.getTableData().fullData.forEach(item => { |
| | | if(item.occupyState===0){ |
| | | xGrid.value.setCheckboxRow(item, true); |
| | | } |
| | | }) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //创建工程 |
| | | const addProject = () => { |
| | | const addProject = (type) => { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if($table.getCheckedFilters().length!==0){ |
| | | ElMessage.error(t('order.msg.pleaseCancelTheFilteringFirst')) |
| | | return |
| | | } |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning(t('reportingWorks.selectProcessCardData')) |
| | | return; |
| | |
| | | |
| | | let projectData = ref({ |
| | | projectdetail: selectRecords, |
| | | userName : username |
| | | userName : username, |
| | | projectType: type |
| | | }) |
| | | let inputProject = projectNmae.value |
| | | if (inputProject == undefined) { |
| | | inputProject = null |
| | | } |
| | | request.post(`/glassOptimize/addProject/${optionVal.value}/${oddNumbers.value}/${inputProject}`, projectData.value).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | if (res.code == 200 && res.data === "true") { |
| | | emit('updateState', 1); |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | selectFlowCardList() |
| | | getProjectId(); |
| | | }else if(res.data === "false1") { |
| | | ElMessage.warning("工程号已存在请重新刷新界面") |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | const handleRowClassName = ({ row, rowIndex }) => { |
| | | if (row.patch_state === 1) { |
| | | return 'high-score'; |
| | | } |
| | | if (row.occupyState === 0) { |
| | | return 'high-score2'; |
| | | } |
| | | } |
| | | |
| | | //抛出方法到父界面 |
| | | defineExpose({getProjectId,selectFlowCardList,selectGlassType,getUpdateFlowCardList}) |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 110%; margin-top: -36px"> |
| | | <h1>流程卡列表 |
| | | <div> |
| | | 流程卡列表 |
| | | <span style="margin-left: 140px;font-size: 14px">工程编号:</span> |
| | | <!-- <span>{{oddNumbers}}</span>--> |
| | | <el-input disabled v-model="oddNumbers" style="width: 100px"></el-input> |
| | | <!-- <vxe-input :disabled="isDisabled" placeholder="" v-model="oddNumbers" size="small" style="color:black;"></vxe-input> --> |
| | | <span style="font-size: 14px">工程名称:</span> |
| | | <el-input style="width: 150px" placeholder="" v-model="projectNmae" size="small"></el-input> |
| | | <el-button style="margin-left: 20px" type="primary" @click="addProject">创建</el-button> |
| | | </h1> |
| | | <el-button style="margin-left: 20px" type="primary" :disabled="isButtonDisabledAdd" @click="addProject(1)">创建</el-button> |
| | | <el-button style="margin-left: 20px;" type="primary" :disabled="isButtonDisabledUpdate" @click="addProject(2)">修改</el-button> |
| | | </div> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | |
| | | size="small" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | :row-class-name="handleRowClassName" |
| | | > |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | |
| | | <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)" |
| | | @keyup.enter.native="$panel.confirmFilter()"/> |
| | | <input type="type" v-model="option.data" @keyup.enter.native="$panel.confirmFilter()" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <vxe-radio content="补单" label="3"></vxe-radio> |
| | | </vxe-radio-group> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | <style lang="css"> |
| | | .high-score { |
| | | background-color: #d4baba !important; |
| | | } |
| | | .high-score2 { |
| | | background-color: #a5aec9 !important; |
| | | } |
| | | </style> |
| | |
| | | import {useI18n} from "vue-i18n"; |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook"; |
| | | const { t } = useI18n() |
| | | |
| | | let props = defineProps({ |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | ] |
| | | },*/ |
| | | columns:[ |
| | | {field: 'order_number',width: 70, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field:'child_width',width: 150,title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'child_height',width: 150,title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width: 150, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'building_number',width: 150, title: t('order.buildingNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'shape',width: 150, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'grossArea',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'separation',width: 150, title: t('craft.TrademarkAttribute'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order_number',width: 70, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field:'child_width',width: 150,title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'child_height',width: 150,title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'quantity',width: 150, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'building_number',width: 150, title: t('order.buildingNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'shape',width: 150, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'grossArea',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'separation',width: 150, title: t('craft.TrademarkAttribute'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | |
| | | ],//表头参数 |
| | | data:null,//表格数据 |
| | |
| | | <h1>流程卡详情</h1> |
| | | <vxe-grid |
| | | size="small" |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="type" v-model="option.data" @keyup.enter.native="$panel.confirmFilter()" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | }, |
| | | |
| | | columns: [ |
| | | {type: 'seq', fixed: "left", title: ' ', slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', title: t('basicData.Number'), width: 80}, |
| | | {field: 'order_number', title: '订序', width: 70}, |
| | | {field: 'child_width', |
| | | {field: 'width', |
| | | width: 100, |
| | | title: t('order.width'), |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'child_height', |
| | | field: 'height', |
| | | width: 100, |
| | | title: t('order.height'), |
| | | sortable: true |
| | |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'process_cards', |
| | | field: 'process_id', |
| | | width: 150, |
| | | title: '流程卡号', |
| | | filters: [{data: ''}], |
| | |
| | | }, |
| | | |
| | | { |
| | | field: 'shelf_number', |
| | | field: 'layout_id', |
| | | width: 150, |
| | | title: '架号', |
| | | filters: [{data: ''}], |
| | |
| | | await emit('changeDialog', command) |
| | | } |
| | | |
| | | let originalFilm=ref(true) |
| | | let surplusMaterial=ref(false) |
| | | |
| | | //优化计算 |
| | | const dialogVisible = ref({}); |
| | | const openDialog = (index) => { |
| | |
| | | //工程号 |
| | | const projectNo = ref(route.params.projectNo); |
| | | const projectName = ref(''); |
| | | const thickNess = ref(route.params.thickNess); |
| | | const model = ref(route.params.model); |
| | | onBeforeUnmount(() => { |
| | | localStorage.setItem('projectNo', projectNo.value); |
| | | }); |
| | |
| | | request.post(`/glassOptimize/projectInfo/${projectNo.value}`).then((res) => { |
| | | if ((Number(res.code) === 200)) { |
| | | const data = res.data.data; |
| | | data.forEach(item => { |
| | | item.longGrind1 = 0; |
| | | item.longGrind2 = 0; |
| | | item.shortGrind1 = 0; |
| | | item.shortGrind2 = 0; |
| | | item.shelf_number = 0; |
| | | }); |
| | | xGrid.value.loadData(res.data.data); |
| | | gridOptions.data = res.data.data; |
| | | projectName.value = res.data.data[0].project_name; |
| | | const grindingTrimming = res.data.grindingTrimming; |
| | | if(grindingTrimming!==null){ |
| | | const formattedData = grindingTrimming.map(item => { |
| | | const formattedItem = {}; |
| | | for (const key in item) { |
| | | if (typeof item[key] === 'string') { |
| | | //去除字符串属性值开头和结尾的双引号 |
| | | formattedItem[key] = item[key].replace(/^\"|\"$/g, ''); |
| | | } else { |
| | | formattedItem[key] = item[key]; |
| | | } |
| | | } |
| | | return formattedItem; |
| | | }); |
| | | data.forEach(item => { |
| | | if(formattedData[0].autoFillEdge==="true"){ |
| | | item.longGrind1=0 |
| | | item.longGrind2=0 |
| | | item.shortGrind1=0 |
| | | item.shortGrind2=0 |
| | | if(item.width>=formattedData[0].minAutoLenght){ |
| | | item.width+=parseFloat(formattedData[0].leftEdge) |
| | | item.width+=parseFloat(formattedData[0].rightEdge) |
| | | item.longGrind1 = formattedData[0].leftEdge; |
| | | item.longGrind2 = formattedData[0].rightEdge; |
| | | } |
| | | if(item.height>=formattedData[0].minAutoLenght){ |
| | | item.height+=parseFloat(formattedData[0].upEdge) |
| | | item.height+=parseFloat(formattedData[0].downEdge) |
| | | item.shortGrind1 = formattedData[0].upEdge; |
| | | item.shortGrind2 = formattedData[0].downEdge; |
| | | } |
| | | } |
| | | item.height=parseFloat(item.height.toFixed(2)) |
| | | item.width=parseFloat(item.width.toFixed(2)) |
| | | |
| | | }); |
| | | } |
| | | xGrid.value.loadData(data); |
| | | gridOptions.data = data; |
| | | projectName.value = data[0].project_name; |
| | | } else { |
| | | ElMessage.warning(res.msg); |
| | | } |
| | |
| | | |
| | | // 从子组件SetAmount获取磨量值,并更新表格数据 |
| | | const Amount = (amountData) => { |
| | | nextTick(() => { |
| | | fetchData() |
| | | /*nextTick(() => { |
| | | const data = gridOptions.data; |
| | | if (data) { |
| | | try { |
| | |
| | | } else { |
| | | console.warn('表格数据为空,无法更新磨量值'); |
| | | } |
| | | }); |
| | | });*/ |
| | | }; |
| | | |
| | | //中转站接受SetTrimming的值(设置修边) |
| | |
| | | |
| | | //中转站接受CheckInventory的值(查询库存) |
| | | const handleInventory = (selectedLabel1, selectedLabel2) => { |
| | | emit('send-inventory-to-op', selectedLabel1, selectedLabel2); |
| | | let type=0; |
| | | if(originalFilm.value===true&&surplusMaterial.value===true){ |
| | | type=3 |
| | | }else if(originalFilm.value===true&&surplusMaterial.value===false){ |
| | | type=1 |
| | | }else if(originalFilm.value===false&&surplusMaterial.value===true){ |
| | | type=2 |
| | | }else{ |
| | | type=1 |
| | | } |
| | | emit('send-inventory-to-op', selectedLabel1, selectedLabel2,type); |
| | | } |
| | | |
| | | </script> |
| | |
| | | <span>工程编号:</span> |
| | | <el-input readonly placeholder="" style="width: 150px" v-model="projectNo"></el-input> |
| | | <span>工程名称:</span> |
| | | <el-input readonly placeholder="" style="width: 150px; margin-right: 340px;" v-model="projectName" ></el-input> |
| | | <el-input readonly placeholder="" style="width: 150px; margin-right: 140px;" v-model="projectName" ></el-input> |
| | | 原片<el-checkbox v-model="originalFilm" ></el-checkbox> |
| | | 余料<el-checkbox v-model="surplusMaterial" ></el-checkbox> |
| | | <el-button id="checkinventory" type="primary" @click="openDialog(1)">查询库存</el-button> |
| | | <el-dialog v-model="dialogVisible[1]" title="查询库存" destroy-on-close style="width: 35%;height:35%;"> |
| | | <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/> |
| | | <check-inventory :closeDialog="closeDialog" :thickNess="thickNess" :model="model" |
| | | @send-data-inventory="handleInventory"/> |
| | | </el-dialog> |
| | | <el-button id="button" type="primary" @click="openDialog(2)">设置磨量</el-button> |
| | | <el-dialog v-model="dialogVisible[2]" title="设置磨量(mm)" destroy-on-close |
| | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {nextTick, onMounted, reactive, ref, watch} from "vue"; |
| | | import {useI18n} from "vue-i18n"; |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {hiprint} from "vue-plugin-hiprint"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {defineEmits} from 'vue'; |
| | | const { t } = useI18n() |
| | | |
| | | const xGrid = ref() |
| | | |
| | | |
| | | const gridOptions = reactive({ |
| | | height:'100%', |
| | |
| | | showStatus: true |
| | | }, |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'id',width: 150, title: 'ID',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'project_no',width: 150, title: '工程号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'project_name',width: 150, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | //右键菜单选项 |
| | | menuConfig: { |
| | | body: { |
| | | options: [ |
| | | [ |
| | | {code: 'openProject', name: '打开工程', prefixIcon: 'vxe-icon-folder-open'}, |
| | | {code: 'compute', name: '模拟计算', prefixIcon: 'vxe-icon-subtable'}, |
| | | {code: 'delProject', name: '删除工程', prefixIcon: 'vxe-icon-delete'}, |
| | | ], |
| | | [] |
| | | ] |
| | | } |
| | | } |
| | | |
| | | }) |
| | | |
| | | // 定义操作配置对象数组,集中管理不同操作选项对应的参数 |
| | | const operationConfigs = [ |
| | | { |
| | | code: 'openProject', // 打开工程 |
| | | initialState: ['10', '20', '100', '200'], // |
| | | targetState: null, |
| | | successMsg: '已打开!', |
| | | checkMessage: '当前工程状态不符合条件,请确认工程状态后再操作!', |
| | | requiresRow: true, |
| | | openFile: async ({row}) => { |
| | | const projectNumber = row.projectNumber; |
| | | const thickness = row.thickness; |
| | | const glassType = row.glassType; |
| | | await router.push({ |
| | | name: 'optimizeInfo', |
| | | params: { |
| | | projectNo: projectNumber, |
| | | thickNess: thickness, |
| | | model: glassType |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | code: 'compute', // 打开模拟计算操作 |
| | | initialState: ['1', '2'], // |
| | | targetState: null, |
| | | successMsg: '模拟计算已启动!', |
| | | checkMessage: '当前工程状态不符合模拟计算条件,请确认工程状态后再操作!', |
| | | requiresRow: true, |
| | | actionFunction: async ({row}) => { |
| | | const projectNo = row.projectNumber; |
| | | emit('switch-dialog', row); |
| | | } |
| | | }, |
| | | { |
| | | code: 'delProject', |
| | | initialState: ['1', '2', '10', '20', '100'], |
| | | targetState: null, |
| | | successMsg: '工程删除成功!', |
| | | checkMessage: '当前工程状态不符合删除条件,请确认工程状态后再操作!', |
| | | } |
| | | |
| | | ]; |
| | | |
| | | //定义切换模拟计算弹窗 |
| | | const emit = defineEmits(['switch-dialog']); |
| | | |
| | | onMounted(async () => { |
| | | getProject(); |
| | | }) |
| | | |
| | | |
| | | |
| | | const getProject = ()=>{ |
| | | request.post(`/glassOptimize/getProjectList`).then((res) => { |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const gridEvents = { |
| | | menuClick({menu, row}) { |
| | | const $grid = xGrid.value; |
| | | if ($grid) { |
| | | const config = operationConfigs.find(c => c.code === menu.code); |
| | | if (config) { |
| | | if (config.requiresRow && !row) { |
| | | ElMessage.warning('未选中工程,请选中工程后再进行当前操作!'); |
| | | return; |
| | | } |
| | | if (config.code === 'compute') { |
| | | config.actionFunction({row}); |
| | | return; |
| | | } |
| | | // 添加确认提示弹窗,询问用户是否进行当前操作 |
| | | ElMessageBox.confirm('是否进行当前操作?', '确认操作', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (config.code === 'viewTempered') { |
| | | ElMessageBox.alert('当前点击的是查看钢化版图功能,目前暂时仅做提示,暂无实际查看操作!', '功能提示', { |
| | | confirmButtonText: '我知道了' |
| | | }); |
| | | return; |
| | | } |
| | | if (config.code === 'viewOptimize') { |
| | | ElMessageBox.alert('当前点击的是查看钢化版图功能,目前暂时仅做提示,暂无实际查看操作!', '功能提示', { |
| | | confirmButtonText: '我知道了' |
| | | }); |
| | | return; |
| | | } |
| | | if (config.code === 'delProject') { |
| | | if (!row) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } |
| | | const isInitialStateMatched = config.initialState.includes(String(row.state)); |
| | | if (!isInitialStateMatched) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } |
| | | deleteProject(row.projectNumber, config); |
| | | } else if (!checkOperationCondition(config, row)) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } else { |
| | | if (config.code === 'openProject') { |
| | | handleSameDataOperation(row).then(({isRoutesEqual}) => { |
| | | if (!isRoutesEqual) { |
| | | config.openFile({row}); |
| | | ElMessage.success(config.successMsg); |
| | | } |
| | | }); |
| | | } else if (config.code === 'compute') { |
| | | config.actionFunction({row}); |
| | | } else if (config.code === 'optimizeTypography') { |
| | | handleSameDataOperation(row).then(({isRoutesEqual}) => { |
| | | if (!isRoutesEqual) { |
| | | config.Typography({row}); |
| | | ElMessage.success(config.successMsg); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | row.state = config.targetState; |
| | | const index = produceList.value.findIndex(item => item === row); |
| | | if (index !== -1) { |
| | | produceList.value.splice(index, 1, {...row}); |
| | | xGrid.value.reloadData(produceList.value); |
| | | } |
| | | updateProjectStateAndHandleResponse(row, row.projectNumber, config.targetState, config.successMsg); |
| | | } |
| | | } |
| | | }).catch(() => { |
| | | // 用户点击取消后执行的逻辑 |
| | | ElMessage.info('已取消操作'); |
| | | }); |
| | | } else { |
| | | console.error(`未找到操作选项 ${menu.code} 对应的配置,请检查配置项`); |
| | | } |
| | | } |
| | | }, |
| | | cellDblclick: ({row}) => { |
| | | const menu = {code: 'openProject'}; |
| | | nextTick(() => { |
| | | handleSameDataOperation(row).then(({isRoutesEqual}) => { |
| | | if (!isRoutesEqual) { |
| | | gridEvents.menuClick({menu, row}); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {onMounted, ref} from "vue"; |
| | | import {defineEmits} from 'vue'; |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | onMounted(async() => { |
| | | await firstLoading() |
| | | }) |
| | | |
| | | const firstLoading = async() => { |
| | | request.post(`/glassOptimize/getConfiguration/磨量`).then((res) => { |
| | | if (res.code == "200") { |
| | | const rawData = res.data.data; |
| | | if (Array.isArray(rawData) && rawData.length > 0) { |
| | | const formattedData = rawData.map(item => { |
| | | const formattedItem = {}; |
| | | for (const key in item) { |
| | | if (typeof item[key] === 'string') { |
| | | //去除字符串属性值开头和结尾的双引号 |
| | | formattedItem[key] = item[key].replace(/^\"|\"$/g, ''); |
| | | } else { |
| | | formattedItem[key] = item[key]; |
| | | } |
| | | } |
| | | return formattedItem; |
| | | }); |
| | | quicksetLeft.value=formattedData[0].leftEdge |
| | | quicksetTop.value=formattedData[0].upEdge |
| | | quicksetRight.value=formattedData[0].rightEdge |
| | | quicksetBottom.value=formattedData[0].downEdge |
| | | controlValue.value=formattedData[0].quickEdge |
| | | if(formattedData[0].autoFillEdge=="true"){ |
| | | check.value=true |
| | | }else{ |
| | | check.value=false |
| | | } |
| | | minAutoLenght.value=formattedData[0].minAutoLenght |
| | | |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }); |
| | | }; |
| | | function setupComponent() { |
| | | // 各个输入框绑定的值,初始化为0 |
| | | const quicksetTop = ref('0'); |
| | |
| | | const quicksetLeft = ref('0'); |
| | | // 用于控制的输入值,初始化为1 |
| | | const controlValue = ref('1'); |
| | | const minAutoLenght = ref('0'); |
| | | |
| | | const syncValues = () => { |
| | | // 将控制值赋给其他四个组件 |
| | |
| | | quicksetBottom, |
| | | quicksetLeft, |
| | | controlValue, |
| | | minAutoLenght, |
| | | syncValues |
| | | }; |
| | | } |
| | |
| | | quicksetBottom, |
| | | quicksetLeft, |
| | | controlValue, |
| | | minAutoLenght, |
| | | syncValues |
| | | } = setupComponent(); |
| | | |
| | | const check = ref(true) |
| | | const check = ref() |
| | | |
| | | const emit = defineEmits(['set-amount']); |
| | | const props = defineProps({ |
| | |
| | | }); |
| | | |
| | | const setAmount = () => { |
| | | const amountData = { |
| | | quicksetTop: quicksetTop.value, |
| | | quicksetRight: quicksetRight.value, |
| | | quicksetBottom: quicksetBottom.value, |
| | | quicksetLeft: quicksetLeft.value |
| | | }; |
| | | emit('set-amount', amountData); |
| | | props.closeDialog(2); |
| | | let json = "{" |
| | | json+='"left_edge":"'+quicksetLeft.value+'",' |
| | | json+='"up_edge":"'+quicksetTop.value+'",' |
| | | json+='"right_edge":"'+quicksetRight.value+'",' |
| | | json+='"down_edge":"'+quicksetBottom.value+'",' |
| | | json+='"auto_fill_edge":"'+check.value+'",' |
| | | json+='"quick_edge":"'+controlValue.value+'",' |
| | | json+='"min_auto_lenght":"'+minAutoLenght.value+'"' |
| | | json+="}" |
| | | |
| | | let configuration={ |
| | | json:json, |
| | | } |
| | | |
| | | request.post(`/glassOptimize/saveConfiguration/磨量`,configuration).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | const amountData = { |
| | | quicksetTop: quicksetTop.value, |
| | | quicksetRight: quicksetRight.value, |
| | | quicksetBottom: quicksetBottom.value, |
| | | quicksetLeft: quicksetLeft.value, |
| | | controlValue:controlValue.value, |
| | | minAutoLenght:minAutoLenght.value, |
| | | }; |
| | | emit('set-amount', amountData); |
| | | props.closeDialog(2); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | </script> |
| | |
| | | <div style="margin-top: 30px"> |
| | | <span>成品边长大于等于多少时自动填充(单位: mm)</span> |
| | | <el-checkbox v-model="check" style="margin: 5px 0 0 12px;"/> |
| | | <vxe-input style="width: 100px; height: 40px; margin-left: 5px" placeholder="0"/> |
| | | <vxe-input style="width: 100px; height: 40px; margin-left: 5px" v-model="minAutoLenght" placeholder=""/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {onMounted, ref} from "vue"; |
| | | import {defineEmits} from 'vue'; |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | |
| | | onMounted(async() => { |
| | | await firstLoading() |
| | | }) |
| | | |
| | | const firstLoading = async() => { |
| | | request.post(`/glassOptimize/getConfiguration/修边`).then((res) => { |
| | | if (res.code == "200") { |
| | | const rawData = res.data.data; |
| | | if (Array.isArray(rawData) && rawData.length > 0) { |
| | | const formattedData = rawData.map(item => { |
| | | const formattedItem = {}; |
| | | for (const key in item) { |
| | | if (typeof item[key] === 'string') { |
| | | //去除字符串属性值开头和结尾的双引号 |
| | | formattedItem[key] = item[key].replace(/^\"|\"$/g, ''); |
| | | } else { |
| | | formattedItem[key] = item[key]; |
| | | } |
| | | } |
| | | return formattedItem; |
| | | }); |
| | | quicksetLeft.value=formattedData[0].leftTrim |
| | | quicksetTop.value=formattedData[0].upTrim |
| | | quicksetRight.value=formattedData[0].rightTrim |
| | | quicksetBottom.value=formattedData[0].downTrim |
| | | |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | function setupComponent() { |
| | | // 各个输入框绑定的值,初始化为0 |
| | |
| | | }); |
| | | |
| | | const setTrimming = () => { |
| | | const dataToSend = { |
| | | quicksetTop: quicksetTop.value, |
| | | quicksetRight: quicksetRight.value, |
| | | quicksetBottom: quicksetBottom.value, |
| | | quicksetLeft: quicksetLeft.value |
| | | }; |
| | | emit('send-data-event', dataToSend); |
| | | props.closeDialog(3); |
| | | let json = "{" |
| | | json+='"left_trim":"'+quicksetLeft.value+'",' |
| | | json+='"up_trim":"'+quicksetTop.value+'",' |
| | | json+='"right_trim":"'+quicksetRight.value+'",' |
| | | json+='"down_trim":"'+quicksetBottom.value+'",' |
| | | json+='"auto_fill_trim":"'+true+'",' |
| | | json+='"quick_trim":"'+15+'"' |
| | | json+="}" |
| | | |
| | | let configuration={ |
| | | json:json, |
| | | } |
| | | |
| | | request.post(`/glassOptimize/saveConfiguration/修边`,configuration).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | const dataToSend = { |
| | | quicksetTop: quicksetTop.value, |
| | | quicksetRight: quicksetRight.value, |
| | | quicksetBottom: quicksetBottom.value, |
| | | quicksetLeft: quicksetLeft.value |
| | | }; |
| | | emit('send-data-event', dataToSend); |
| | | props.closeDialog(3); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | |
| | | </script> |
| | |
| | | const route = currentRoute.value |
| | | |
| | | let processId = route.query.processId |
| | | let merge = null |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/flowCardDetail/${processId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | merge = res.data.merge |
| | | console.log(merge) |
| | | if(merge != 0){ |
| | | gridOptions.toolbarConfig.buttons[0].name='取消合并' |
| | | } |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | type: 'warning', |
| | | } |
| | | ).then(()=>{ |
| | | request.post("/processCard/mergeFlowCard", flowData.value).then((res) => { |
| | | request.post(`/processCard/mergeFlowCard/${merge}`, flowData.value).then((res) => { |
| | | if(res.code==200 && res.data==="true"){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path: '/main/processCard/SelectProcessCard', query:{random:Math.random()}}) |
| | |
| | | {field: 'responsibleEquipment', width: 120, title: t('reportingWorks.responsibleEquipment'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'breakageType', width: 120, title: t('reportingWorks.breakageType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'breakageReason', width: 120, title: t('reportingWorks.breakageReason'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'childWidth', width: 100, title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'childHeight', width: 100, title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'breakageQuantity', width: 120, title: t('reportingWorks.quantityBroken')}, |
| | | {field: 'area', width: 120, title: t('reportingWorks.wornArea')}, |
| | | {field: 'personnel', width: 120, title: t('reportingWorks.responsiblePersonnel')}, |
| | |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | titleSelectJson.value.processType.unshift(newItem.value) |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | |
| | | total.value = res.data.footSum |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | produceList = res.data.data |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | console.log(produceList) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | const sumMmValues = (workProcessName) => { |
| | | if (!workProcessName) return 0; |
| | | |
| | | return workProcessName |
| | | .split('+') // 拆分每个部分 |
| | | .map(part => { |
| | | const match = part.match(/^(\d+)(?=mm)/); // 提取 mm 前面的数字 |
| | | return match ? parseInt(match[1], 10) : 0; |
| | | }) |
| | | .reduce((sum, num) => sum + num, 0); // 求和 |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | |
| | | pageNum.value=1 |
| | | total.value = res.data.footSum |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading=false |
| | | } else { |
| | |
| | | {field: 'code', width: 100, title: t('reportingWorks.glassNumber')}, |
| | | {field: 'width', width: 90, title: t('order.width')}, |
| | | {field: 'height', width: 90, title: t('order.height')}, |
| | | {field: 'mmTotal', width: 90, title: t('order.totalThickness')}, |
| | | {field: 'workProcessName', width: 120, title: t('report.workProcessName')}, |
| | | {field: 'edgingType', width: 110, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completedQuantity', width: 90, title: t('reportingWorks.completedQuantity')}, |
| | |
| | | {title: t('basicData.operate'), width: 140, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: t('basicData.Number'), width: 50 }, |
| | | {field: 'reportingWorkId', width: 120, title: t('reportingWorks.reportingWorkId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, |
| | | {field: 'reportingWorkTime',width: 120, title: t('reportingWorks.reportingWorkTime') ,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reportingWorkTime',width: 120, title: t('reportingWorks.reportingWorkTime') ,showOverflow:"ellipsis" ,}, |
| | | {field: 'orderId', width: 130,title: t('order.orderId') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processId', width: 160,title: t('processCard.processId') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project',width: 150, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, |
| | |
| | | |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | console.log(res.data.data) |
| | | const orderDetails = res.data.data |
| | | orderDetails.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | |
| | | break |
| | | } |
| | | case 'updateMoney': { |
| | | $grid.clearEdit() |
| | | updateMoney() |
| | | break |
| | | } |
| | |
| | | break |
| | | } |
| | | case 'saveOrder': { |
| | | xGrid.value.clearEdit() |
| | | if ($grid.getTableData().tableData.length === 0){ |
| | | ElMessage.error( t('order.msg.tableLengthNot')) |
| | | return |
| | |
| | | {field: 'goodsQuantity',width:120, title: t('searchOrder.inventoryNum'), sortable: true}, |
| | | {field: 'area',width:120, title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'money',width:120, title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120, title: t('basicData.reportData'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'updateTime',width:120, title: t('productStock.approvedDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120,filters:[{ data: '' }],slots: { filter: 'num1_filter' }, title: t('basicData.reportData'), sortable: true}, |
| | | {field: 'updateTime',width:120, title: t('productStock.approvedDate'), sortable: true}, |
| | | {field: 'packType',width:120, title: t('order.packType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderType',width:120, title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'salesman',width:120, title: t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'creator',width:120, title: t('product.creator'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'verifier',width:120, title: t('basicData.review'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'perimeter',width:120, title: t('searchOrder.perimeter'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryDate',width:120, title: t('order.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryDate',width:120, title: t('order.deliveryDate'), sortable: true}, |
| | | {field: 'customerBatch',width:120, title: t('order.customerBatch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | |
| | | //{field: '14',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | const config = { |
| | | filter: filterData.value, |
| | | sort: sortData.value |
| | |
| | | return Result.seccess(materialInventoryService.cancelMaterialAdditionRecord(object)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("优化物料库存记录查询接口") |
| | | @SaCheckPermission("warehouseReport.search") |
| | | @PostMapping("/getOptimizeOutboundReport/{type}/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getOptimizeOutboundReport(@PathVariable String type,@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody MaterialLog materialLog){ |
| | | return Result.seccess(materialInventoryService.getOptimizeOutboundReport(type,pageNum,pageSize,selectDate,materialLog)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | //库存信息 |
| | | @ApiOperation("库存信息接口") |
| | | @PostMapping ("/materialStore/{thickness}/{model}") |
| | | @GetMapping ("/materialStore/{thickness}/{model}/{projectNumber}") |
| | | public Result materialStore( |
| | | @PathVariable String thickness, |
| | | @PathVariable String model ){ |
| | | return Result.seccess(glassOptimizeService.materialStoreSv(thickness,model)); |
| | | @PathVariable String model,@PathVariable String projectNumber, |
| | | @RequestParam(name = "type", required = false) Integer type ){ |
| | | return Result.seccess(glassOptimizeService.materialStoreSv(thickness,model,projectNumber,type)); |
| | | } |
| | | |
| | | |
| | |
| | | @PathVariable String optionVal, |
| | | @PathVariable Integer radio){ |
| | | return Result.seccess(glassOptimizeService.getFlowCardList(optionVal,radio)); |
| | | } |
| | | |
| | | //工程查询流程卡 |
| | | @ApiOperation("修改工程查询流程卡接口") |
| | | @PostMapping ("/getUpdateFlowCardList/{type}/{thickness}/{radio}/{projectNo}") |
| | | public Result getUpdateFlowCardList( |
| | | @PathVariable String type,@PathVariable String thickness, |
| | | @PathVariable Integer radio,@PathVariable String projectNo){ |
| | | return Result.seccess(glassOptimizeService.getUpdateFlowCardList(type,thickness,radio,projectNo)); |
| | | } |
| | | |
| | | //工程查询流程卡 |
| | |
| | | |
| | | //修改工程状态 |
| | | @ApiOperation("修改工程状态接口") |
| | | @PostMapping("/updateProjectState/{projectNumber}/{state}") |
| | | @PostMapping("/updateProjectState/{projectNumber}/{state}/{code}") |
| | | public Result updateProjectState( |
| | | @PathVariable String projectNumber, |
| | | @PathVariable Integer state |
| | | @PathVariable Integer state, |
| | | @PathVariable Integer code |
| | | ) { |
| | | if (glassOptimizeService.updateProjectState(projectNumber, state)) { |
| | | if (glassOptimizeService.updateProjectState(projectNumber, state,code)) { |
| | | return Result.seccess(); |
| | | } else { |
| | | throw new ServiceException(Constants.Code_500, "修改失败"); |
| | |
| | | @PostMapping("/deleteProject/{projectNumber}") |
| | | public Result deleteProject( |
| | | @PathVariable String projectNumber){ |
| | | return Result.seccess(glassOptimizeService.deleteProject(projectNumber)); |
| | | return Result.seccess(glassOptimizeService.deleteProject(projectNumber,1)); |
| | | } |
| | | |
| | | //模拟计算工程号查询 |
| | |
| | | return Result.seccess(glassOptimizeService.selectProjectComputeSv(projectNumber)); |
| | | } |
| | | |
| | | //模拟计算工程号查询 |
| | | @ApiOperation("模拟计算工程数据查询") |
| | | @PostMapping ("/selectProjectComputeAll/{projectNumber}") |
| | | public Result selectProjectComputeAll( |
| | | @PathVariable String projectNumber){ |
| | | return Result.seccess(glassOptimizeService.selectProjectComputeAll(projectNumber)); |
| | | } |
| | | |
| | | //模拟计算流程卡详情 |
| | | @ApiOperation("模拟计算流程卡详情") |
| | | @PostMapping ("/selectComputeDetail/{processId}") |
| | | @PostMapping ("/selectComputeDetail/{processId}/{technologyNumber}/{patchState}") |
| | | public Result selectComputeDetail( |
| | | @PathVariable String processId){ |
| | | return Result.seccess(glassOptimizeService.selectComputeDetailSv(processId)); |
| | | @PathVariable String processId, @PathVariable Integer technologyNumber,@PathVariable String patchState){ |
| | | return Result.seccess(glassOptimizeService.selectComputeDetailSv(processId,technologyNumber,patchState)); |
| | | } |
| | | |
| | | @ApiOperation("模拟计算") |
| | |
| | | return new ResponseEntity<>(optContent.getBytes(), headers, HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping("/getConfiguration/{type}") |
| | | public Result getConfiguration(@PathVariable String type) { |
| | | return Result.seccess(glassOptimizeService.getConfiguration(type)); |
| | | } |
| | | |
| | | @ApiOperation("修片磨量修改") |
| | | @PostMapping("/saveConfiguration/{type}") |
| | | public Result saveConfiguration(@PathVariable String type, @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(glassOptimizeService.saveConfiguration(object,type)); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation("合并流程卡接口") |
| | | @PostMapping("/mergeFlowCard") |
| | | public Result mergeFlowCard(@RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.mergeFlowCard(object)); |
| | | @PostMapping("/mergeFlowCard/{merge}") |
| | | public Result mergeFlowCard(@RequestBody Map<String, Object> object, |
| | | @PathVariable Integer merge) { |
| | | return Result.seccess(flowCardService.mergeFlowCard(object,merge)); |
| | | } |
| | | @ApiOperation("汉玻获取流程卡接口") |
| | | @PostMapping("/getProcessCardList/hanbo") |
| | |
| | | return Result.seccess(reportingWorkService.reportingWorkTransferSv(reportingWork)); |
| | | } |
| | | |
| | | @ApiOperation("手机查询当班产量") |
| | | @PostMapping ("/selectShiftQuantity") |
| | | public Result selectShiftQuantity(@RequestBody Map<String,Object> reportingWork) { |
| | | return Result.seccess(reportingWorkService.selectShiftQuantitySv(reportingWork)); |
| | | } |
| | | |
| | | @ApiOperation("手机查询本班组报工记录") |
| | | @PostMapping("/selectReportingWorkRecordByPhone") |
| | | public Result selectReportingWorkRecordByPhone(@RequestBody Map<String,Object> selectPam) { |
| | | return Result.seccess(reportingWorkService.selectReportingWorkRecordByPhoneSv(selectPam)); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiOperation("手机扫码玻璃信息") |
| | | @PostMapping("/scannerGlassInfo/{projectNo}") |
| | | public Result scannerGlassInfo(@PathVariable String projectNo) { |
| | | System.out.println("123123"); |
| | | return Result.seccess(orderService.scannerGlassInfo(projectNo)); |
| | | } |
| | | |
| | | @PostMapping("/test") |
| | | public Result scannerGlassInfo() { |
| | | System.out.println("123123"); |
| | | return Result.seccess(null); |
| | | } |
| | | |
| | |
| | | private String glassChild; |
| | | @ExcelProperty("编号") |
| | | private String glassNumber; |
| | | @ExcelProperty("宽") |
| | | private String childWidth; |
| | | @ExcelProperty("高") |
| | | private String childHeight; |
| | | |
| | | } |
| | |
| | | private Double grossArea; |
| | | @ExcelProperty("结算总面积") |
| | | private Double computeGrossArea; |
| | | @ExcelProperty("重量") |
| | | private Double weights; |
| | | @ExcelProperty("形状") |
| | | private String shape; |
| | | @ExcelProperty("磨边类型") |
New file |
| | |
| | | package com.example.erp.dto.sd; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OrderSearchDTO { |
| | | @TableId(type = IdType.AUTO) |
| | | @ExcelProperty("id") |
| | | private Long id; |
| | | @ExcelProperty("订单编号") |
| | | private String orderId; |
| | | @ExcelProperty("项目名称") |
| | | private String project; |
| | | @ExcelProperty("客户编号") |
| | | private Integer customerId; |
| | | @ExcelProperty("客户名称") |
| | | private String customerName; |
| | | @ExcelProperty("订单类型") |
| | | private String orderType; |
| | | @ExcelProperty("订单分类") |
| | | private String orderClassify; |
| | | @ExcelProperty("商标") |
| | | private String icon; |
| | | @ExcelProperty("包装方式") |
| | | private String packType; |
| | | @ExcelProperty("发货时间") |
| | | private String deliveryDate; |
| | | @ExcelProperty("批次") |
| | | private String batch; |
| | | @ExcelProperty("计算方式") |
| | | private Integer calculateType; |
| | | @ExcelProperty("销售人员id") |
| | | private Integer salesmanId; |
| | | @ExcelProperty("销售员") |
| | | private String salesman; |
| | | @ExcelProperty("铝条方式") |
| | | private String alType; |
| | | @ExcelProperty("金额") |
| | | private Double money; |
| | | @ExcelProperty("合同编号") |
| | | private String contractId; |
| | | @ExcelProperty("客户批次") |
| | | private String customerBatch; |
| | | @ExcelProperty("联系人") |
| | | private String contacts; |
| | | @ExcelProperty("联系电话") |
| | | private String contactNumber; |
| | | @ExcelProperty("发货地址") |
| | | private String deliveryAddress; |
| | | @ExcelProperty("其他金额") |
| | | private Double otherMoney; |
| | | @ExcelProperty("其他金额备注") |
| | | private String otherMoneyRemarks; |
| | | @ExcelProperty("加工要求") |
| | | private String processingNote; |
| | | @ExcelProperty("其他备注") |
| | | private String otherRemarks; |
| | | @ExcelProperty("面积") |
| | | private Double area; |
| | | @ExcelProperty("订单总数") |
| | | private Long quantity; |
| | | @ExcelProperty("订单周长") |
| | | private Double perimeter; |
| | | @ExcelProperty("审核人id") |
| | | private String verifierId; |
| | | @ExcelProperty("审核人") |
| | | private String verifier; |
| | | @ExcelProperty("创建人id") |
| | | private String creatorId; |
| | | @ExcelProperty("创建人") |
| | | private String creator; |
| | | @ExcelProperty("下单") |
| | | private Integer createOrder; |
| | | @ExcelProperty("工艺审核") |
| | | private Integer processReview; |
| | | @ExcelProperty("订单审核") |
| | | private Integer orderReview; |
| | | @ExcelProperty("生产订单") |
| | | private Integer productionOrder; |
| | | @ExcelProperty("流程卡") |
| | | private Integer processingCard; |
| | | @ExcelProperty("入库") |
| | | private Integer warehousing; |
| | | @ExcelProperty("发货") |
| | | private Integer delivery; |
| | | @ExcelProperty("打印次数") |
| | | private Integer printingNumber; |
| | | @ExcelProperty("创建日期") |
| | | @TableField(update = "false") |
| | | private String createTime; |
| | | @ExcelProperty("修改日期") |
| | | private String updateTime; |
| | | @TableField(select = false,exist = false) |
| | | private Integer goodsQuantity; |
| | | @TableField(select = false,exist = false) |
| | | private String timeOut; |
| | | |
| | | @TableField(value = "customer_id") |
| | | private Customer customer; |
| | | @TableField(select = false) |
| | | private FinishedGoodsInventory finishedGoodsInventory; |
| | | |
| | | } |
| | |
| | | @ExcelProperty("创建时间") |
| | | private LocalDate operateTime; |
| | | |
| | | @ExcelProperty("优化使用数量") |
| | | private Integer useCount; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | String selectProjectNo(@Param("useId") Integer useId); |
| | | |
| | | List<MaterialLog> getOptimizeOutboundReport(Integer offset, Integer pageSize, String startDate, String endDate, MaterialLog materialLog, String type); |
| | | |
| | | Map<String,Integer> getOptimizeOutboundReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, MaterialLog materialLog, String type); |
| | | } |
| | |
| | | Boolean updatePrintNumberMp(String processId, Integer orderNumber); |
| | | |
| | | String getOrderIdByProcessId(String processId); |
| | | |
| | | Boolean updateFlowCardIsMerge(String processId); |
| | | |
| | | Integer flowCardDetailMergeMp(String processId); |
| | | } |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.OptimizeProjectMange; |
| | | import com.example.erp.entity.pp.OptimizeUse; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | //工程信息 |
| | | List<Map<String, Object>> projectInfoMp(String projectNo); |
| | | |
| | | List<Map<String, Object>> firstOptimization(String projectNo); |
| | | |
| | | List<Map<String, Object>> analogComputationOptimization(String projectNo); |
| | | |
| | | //工程信息流程卡 |
| | | List<Map<String, Object>> getProcessCardMp(String projectNo); |
| | | |
| | | List<FlowCard> getFlowCardList(String projectNo); |
| | | |
| | | List<PatchLog> getPatchLogList(String projectNo); |
| | | |
| | | //库存信息 |
| | | List<Map<String, Object>> materialStoreMp(String thickness, String model); |
| | | |
| | | List<Map<String, Object>> surplusMaterialsMp(String thickness, String model); |
| | | |
| | | List<Map<String, Object>> materialStoreSurplusMp(String thickness, String model); |
| | | |
| | | List<Map<String, Object>> materialStoreOptimizeUse(String projectNumber); |
| | | |
| | | //工单管理查询未转工单数据 |
| | | List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | List<Map<String, Object>> selectWordOrder(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | |
| | | //创建工程膜系查询 |
| | | List<Map<String, Object>> getFlowCardListMp(String optionVal, Integer radio); |
| | | List<Map<String, Object>> getFlowCardListWhole(String optionVal); |
| | | List<Map<String, Object>> getFlowCardListNormal(String optionVal); |
| | | List<Map<String, Object>> getFlowCardListPatch(String optionVal); |
| | | |
| | | List<Map<String, Object>> getFlowCardListModify(String type,String thickness,String projectNO); |
| | | |
| | | //工程管理工程号查询 |
| | | List<OptimizeProjectMange> optimizeProjectMangeMp(Date startSelectTime, Date endSelectTime, OptimizeProjectMange optimizeProjectMange); |
| | |
| | | //删除工程 |
| | | int deleteProjectMp(String projectNumber); |
| | | |
| | | int deleteOptimizeHeatDetail(String projectNumber); |
| | | |
| | | int deleteOptimizeHeatLayout(String projectNumber); |
| | | |
| | | int deleteOptimizeDetail(String projectNumber); |
| | | |
| | | //模拟计算工程号查询 |
| | | List<Map<String, Object>> selectProjectComputeMp(@Param("projectNo")String projectNumber); |
| | | |
| | | Map<String, Object> selectProjectCount(@Param("projectNo")String projectNumber); |
| | | |
| | | //模拟计算流程卡详情 |
| | | List<Map<String, Object>> selectComputeDetailMp(String processId); |
| | | List<Map<String, Object>> selectComputeDetailMp(String processId,Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectComputeDetailMpPatchState(String processId,Integer technologyNumber); |
| | | |
| | | |
| | | //模拟计算保存 钢化排版详情 |
| | |
| | | |
| | | Boolean updateFlowCardProject(String processId, String technologyNumber, String projectId); |
| | | |
| | | Boolean updatePatchLogProject(String processId, String technologyNumber, String projectId); |
| | | |
| | | Boolean updateFlowCardProjectReturn(String processId, String technologyNumber, String projectId); |
| | | |
| | | Boolean updatePatchLogProjectReturn(String processId, Integer technologyNumber, String projectId); |
| | | |
| | | Double getSelectArea(String processId, String technologyNumber); |
| | | |
| | | Boolean addProjectMp(String projectId, String projectNmae, String glassThickness, String glassType, Integer sumQuantity, Double sumArea, String userName); |
| | | Double getSelectAreaPatchLog(String processId, String technologyNumber); |
| | | |
| | | Boolean addProjectMp(String projectId, String projectNmae, String glassThickness, String glassType, |
| | | Integer sumQuantity, Double sumArea, String userName,Integer processIdCount, String processId, Integer type); |
| | | |
| | | Boolean updateProjectMp(String projectId, String projectNmae, String glassThickness, String glassType, |
| | | Integer sumQuantity, Double sumArea, String userName,Integer processIdCount, String processId, Integer type); |
| | | |
| | | List<Map<String, Object>> getTemperedConfiguration(); |
| | | |
| | | List<Map<String, Object>> getGrindingTrimming(); |
| | | |
| | | List<Map<String, Object>> getEdgeTrimming(); |
| | | |
| | | Boolean updateOptimizeConfig(String json,Integer type); |
| | | } |
| | |
| | | |
| | | |
| | | import com.example.erp.dto.pp.*; |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.Report; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | List<YieldDTO> exportYieldMp(List<LocalDate> date, String process); |
| | | |
| | | List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | |
| | | Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | |
| | |
| | | |
| | | Map<String,Float> teamOutputFootSum(Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | |
| | | String getLaminating(String selectProcesses); |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.dto.sd.OrderSearchDTO; |
| | | import com.example.erp.entity.sd.Order; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | boolean updateOrderParameter(@Param("orderId") String orderId); |
| | | |
| | | List<Order> getOrderList(Integer offset, Integer pageSize, String startDate, String endDate, Order order, Integer orderType, String field, String orderBy); |
| | | Map<String,Float> getPageTotal(Integer offset, Integer pageSize, String startDate, String endDate, Order order , Integer orderType); |
| | | List<Order> getOrderList(Integer offset, Integer pageSize, String startDate, String endDate, OrderSearchDTO order, Integer orderType, String field, String orderBy); |
| | | Map<String,Float> getPageTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderSearchDTO order , Integer orderType); |
| | | |
| | | boolean reviewOrderById(String id, Integer status, String userId, String userName); |
| | | |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.sql.Date; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | List<Map<String, Integer>> getGlassLRowCollect(Date selectTime1, Date selectTime2); |
| | | |
| | | String selectNextProcess(String processId, String technologyNumber, String thisProcess); |
| | | |
| | | List<Map<String, String>> selectShiftQuantitySv(String creatorId, String startDate,String endDate); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> getOptimizeOutboundReport(String type, Integer pageNum, Integer pageSize, List<String> selectDate, MaterialLog materialLog) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | if(selectDate !=null && selectDate.size()==2){ |
| | | if(!selectDate.get(0).isEmpty()){ |
| | | startDate = selectDate.get(0); |
| | | } |
| | | if(!selectDate.get(1).isEmpty()){ |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", materialInventoryMapper.getOptimizeOutboundReport(offset, pageSize,startDate, endDate, materialLog,type)); |
| | | map.put("total", materialInventoryMapper.getOptimizeOutboundReportTotal(offset, pageSize,startDate, endDate, materialLog,type)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | public Object flowCardDetailSv(String processId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.flowCardDetailMp(processId, flowCard)); |
| | | map.put("merge", flowCardMapper.flowCardDetailMergeMp(processId)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | public String mergeFlowCard(Map<String, Object> object) { |
| | | public String mergeFlowCard(Map<String, Object> object, Integer merge) { |
| | | String returns = "false"; |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | List<Map<String, Object>> flowCardList1 = flowCardMapper.selectFlowCardMerge(flowCardList.get(0).getProcessId()); |
| | | int index = 1; |
| | | for (int i = 0; i < flowCardList1.size(); i++) { |
| | | if (Integer.valueOf(flowCardList1.get(i).get("count2").toString()) > 1) { |
| | | List<Integer> technologyNumber = Arrays.stream(flowCardList1.get(i).get("count1").toString().split(",")) |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId(), technologyNumber, index); |
| | | index += 1; |
| | | returns = "true"; |
| | | if (merge == 0){ |
| | | int index = 1; |
| | | for (int i = 0; i < flowCardList1.size(); i++) { |
| | | if (Integer.valueOf(flowCardList1.get(i).get("count2").toString()) > 1) { |
| | | List<Integer> technologyNumber = Arrays.stream(flowCardList1.get(i).get("count1").toString().split(",")) |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId(), technologyNumber, index); |
| | | index += 1; |
| | | returns = "true"; |
| | | } |
| | | } |
| | | }else {//取消合并 |
| | | flowCardMapper.updateFlowCardIsMerge(flowCardList.get(0).getProcessId()); |
| | | returns = "true"; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import com.example.erp.common.RabbitMQUtil; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.OptimizeProjectMange; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.pp.GlassOptimizeMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.sql.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.DecimalFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeoutException; |
| | | |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @DS("sd") |
| | | public class GlassOptimizeService { |
| | | @Autowired |
| | | GlassOptimizeMapper glassOptimizeMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | | RabbitMQUtil rabbitMQUtil; |
| | | //模拟计算 |
| | |
| | | |
| | | |
| | | // 获取 computeData 和 cardData |
| | | Object computeData = message.get("computeData"); |
| | | Object cardData = message.get("cardData"); |
| | | /*Object computeData = message.get("computeData"); |
| | | Object cardData = message.get("cardData");*/ |
| | | |
| | | rabbitMQUtil.sendMessage("6"); |
| | | rabbitMQUtil.sendMessage(message.toString()); |
| | | System.out.println("send message: " + message); |
| | | String date = rabbitMQUtil.receiveMessages(); |
| | | System.out.println("Received message: " + date); |
| | |
| | | |
| | | //工程信息 |
| | | public Map<String, Object> projectInfoSv(String projectNo) { |
| | | Map<String, Object> stringObjectMap = glassOptimizeMapper.selectProjectCount(projectNo); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.projectInfoMp(projectNo)); |
| | | if(Integer.parseInt(stringObjectMap.get("state").toString())<10){ |
| | | map.put("data", glassOptimizeMapper.firstOptimization(projectNo)); |
| | | map.put("grindingTrimming", glassOptimizeMapper.getGrindingTrimming()); |
| | | }else if(stringObjectMap.get("state").equals(10)){ |
| | | map.put("data", glassOptimizeMapper.analogComputationOptimization(projectNo)); |
| | | map.put("grindingTrimming", glassOptimizeMapper.getGrindingTrimming()); |
| | | }else{ |
| | | map.put("data", glassOptimizeMapper.analogComputationOptimization(projectNo)); |
| | | map.put("grindingTrimming", glassOptimizeMapper.getGrindingTrimming()); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //库存信息 |
| | | public Map<String, Object> materialStoreSv(String thickness, String model) { |
| | | public Map<String, Object> materialStoreSv(String thickness, String model, String projectNumber,Integer type) { |
| | | Map<String, Object> stringObjectMap = glassOptimizeMapper.selectProjectCount(projectNumber); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.materialStoreMp(thickness,model)); |
| | | if(Integer.parseInt(stringObjectMap.get("state").toString())<10){ |
| | | if(type==1){ |
| | | map.put("data", glassOptimizeMapper.materialStoreMp(thickness,model)); |
| | | }else if(type==2){ |
| | | map.put("data", glassOptimizeMapper.surplusMaterialsMp(thickness,model)); |
| | | }else{ |
| | | map.put("data", glassOptimizeMapper.materialStoreSurplusMp(thickness,model)); |
| | | } |
| | | map.put("edgeTrimming", glassOptimizeMapper.getEdgeTrimming()); |
| | | }else if(Integer.parseInt(stringObjectMap.get("state").toString())==10){ |
| | | if(type==1){ |
| | | map.put("data", glassOptimizeMapper.materialStoreMp(thickness,model)); |
| | | }else if(type==2){ |
| | | map.put("data", glassOptimizeMapper.surplusMaterialsMp(thickness,model)); |
| | | }else{ |
| | | map.put("data", glassOptimizeMapper.materialStoreSurplusMp(thickness,model)); |
| | | } |
| | | map.put("edgeTrimming", glassOptimizeMapper.getEdgeTrimming()); |
| | | }else{ |
| | | map.put("data", glassOptimizeMapper.materialStoreOptimizeUse(projectNumber)); |
| | | map.put("edgeTrimming", null); |
| | | } |
| | | map.put("state", Integer.parseInt(stringObjectMap.get("state").toString())); |
| | | return map; |
| | | } |
| | | |
| | |
| | | //工程查询流程卡 |
| | | public Map<String, Object> getFlowCardList(String optionVal, Integer radio) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.getFlowCardListMp(optionVal, radio)); |
| | | if(radio==1){ |
| | | map.put("data", glassOptimizeMapper.getFlowCardListWhole(optionVal)); |
| | | }else if(radio==2){ |
| | | map.put("data", glassOptimizeMapper.getFlowCardListNormal(optionVal)); |
| | | }else{ |
| | | map.put("data", glassOptimizeMapper.getFlowCardListPatch(optionVal)); |
| | | } |
| | | |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getUpdateFlowCardList(String type,String thickness, Integer radio,String projectNo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(radio==1){ |
| | | map.put("data", glassOptimizeMapper.getFlowCardListModify(type,thickness,projectNo)); |
| | | }else if(radio==2){ |
| | | map.put("data", glassOptimizeMapper.getFlowCardListNormal(type)); |
| | | }else{ |
| | | map.put("data", glassOptimizeMapper.getFlowCardListPatch(type)); |
| | | } |
| | | |
| | | |
| | | return map; |
| | | } |
| | |
| | | } |
| | | |
| | | //修改排版状态 |
| | | public Boolean updateProjectState(String projectNumber, Integer state) { |
| | | public Boolean updateProjectState(String projectNumber, Integer state, Integer code) { |
| | | if (!projectNumber.isEmpty()) { |
| | | glassOptimizeMapper.updateProjectStateMp(projectNumber, state); |
| | | //撤销模拟计算 |
| | | if(code==1){ |
| | | glassOptimizeMapper.deleteOptimizeHeatDetail(projectNumber); |
| | | glassOptimizeMapper.deleteOptimizeHeatLayout(projectNumber); |
| | | glassOptimizeMapper.updateProjectStateMp(projectNumber, state); |
| | | } |
| | | //撤销优化排版 |
| | | else if(code==2){ |
| | | glassOptimizeMapper.deleteOptimizeHeatDetail(projectNumber); |
| | | glassOptimizeMapper.deleteOptimizeHeatDetail(projectNumber); |
| | | glassOptimizeMapper.deleteOptimizeHeatLayout(projectNumber); |
| | | glassOptimizeMapper.updateProjectStateMp(projectNumber, state); |
| | | } |
| | | //允许生产 |
| | | else if(code==3){ |
| | | glassOptimizeMapper.updateProjectStateMp(projectNumber, state); |
| | | } |
| | | //生产不可见 |
| | | else if(code==4){ |
| | | glassOptimizeMapper.updateProjectStateMp(projectNumber, state); |
| | | } |
| | | //初始化工程 |
| | | else if(code==5){ |
| | | glassOptimizeMapper.updateProjectStateMp(projectNumber, state); |
| | | } |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | } |
| | | |
| | | //删除工程 |
| | | public Map<String, Object> deleteProject(String projectNumber) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.deleteProjectMp(projectNumber)); |
| | | return map; |
| | | public boolean deleteProject(String projectNumber,Integer type) { |
| | | Map<String, Object> stringObjectMap = glassOptimizeMapper.selectProjectCount(projectNumber); |
| | | if(stringObjectMap.get("state").equals(10)){ |
| | | glassOptimizeMapper.deleteOptimizeHeatDetail(projectNumber); |
| | | glassOptimizeMapper.deleteOptimizeHeatLayout(projectNumber); |
| | | }else if(stringObjectMap.get("state").equals(20)){ |
| | | glassOptimizeMapper.deleteOptimizeDetail(projectNumber); |
| | | glassOptimizeMapper.deleteOptimizeHeatDetail(projectNumber); |
| | | glassOptimizeMapper.deleteOptimizeHeatLayout(projectNumber); |
| | | } |
| | | List<FlowCard> flowCardList =glassOptimizeMapper.getFlowCardList(projectNumber); |
| | | List<PatchLog> patchLogList =glassOptimizeMapper.getPatchLogList(projectNumber); |
| | | if(flowCardList!=null){ |
| | | for (FlowCard flowCard:flowCardList){ |
| | | glassOptimizeMapper.updateFlowCardProjectReturn(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectNumber); |
| | | } |
| | | } |
| | | if(patchLogList!=null){ |
| | | for (PatchLog patchLog:patchLogList){ |
| | | glassOptimizeMapper.updatePatchLogProjectReturn(patchLog.getProcessId(),patchLog.getTechnologyNumber(),projectNumber); |
| | | } |
| | | } |
| | | //判断是否是修改工程 |
| | | if(type.equals(1)){ |
| | | glassOptimizeMapper.deleteProjectMp(projectNumber); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | |
| | | public Map<String, Object>selectProjectComputeSv(String projectNumber) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.selectProjectComputeMp(projectNumber)); |
| | | //map.put("project", glassOptimizeMapper.selectProjectCount(projectNumber)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object>selectProjectComputeAll(String projectNumber) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> projectComputeMpList=glassOptimizeMapper.selectProjectComputeMp(projectNumber); |
| | | for (Map<String, Object> stringObjectMap : projectComputeMpList) { |
| | | stringObjectMap.get("process_id"); |
| | | stringObjectMap.get("technology_number"); |
| | | } |
| | | map.put("data", glassOptimizeMapper.selectProjectComputeMp(projectNumber)); |
| | | //map.put("project", glassOptimizeMapper.selectProjectCount(projectNumber)); |
| | | return map; |
| | | } |
| | | |
| | | //模拟计算流程卡详情 |
| | | public Map<String, Object>selectComputeDetailSv(String processId) { |
| | | public Map<String, Object>selectComputeDetailSv(String processId,Integer technologyNumber,String patchState) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.selectComputeDetailMp(processId)); |
| | | if(patchState.equals("0")){ |
| | | map.put("data", glassOptimizeMapper.selectComputeDetailMp(processId,technologyNumber)); |
| | | }else{ |
| | | map.put("data", glassOptimizeMapper.selectComputeDetailMpPatchState(processId,technologyNumber)); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Boolean addProjectSv(String optionVal, String projectId, String projectNmae, Map<String, Object> object) { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | if ("null".equals(projectNmae)) { |
| | | projectNmae = ""; |
| | | } |
| | | Double sumArea = (double) 0; |
| | | Double area = (double) 0; |
| | | Integer sumQuantity = 0; |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("projectdetail")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | //给流程卡表添加对应的工程号 |
| | | glassOptimizeMapper.updateFlowCardProject(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectId); |
| | | area = glassOptimizeMapper.getSelectArea(flowCard.getProcessId(),flowCard.getTechnologyNumber()); |
| | | sumArea += area; |
| | | sumQuantity +=flowCard.getQuantity(); |
| | | public String addProjectSv(String optionVal, String projectId, String projectNmae, Map<String, Object> object) { |
| | | String saveState = "true"; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | int index = optionVal.indexOf("mm"); |
| | | // 获取 "mm" 前面的部分 |
| | | String glass_thickness = optionVal.substring(0, index); |
| | | // 获取 "mm" 后面的部分 |
| | | String glass_type = optionVal.substring(index + 2); |
| | | glassOptimizeMapper.addProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea,userName); |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | String projectType = ""; |
| | | if (object.get("projectType") != null) { |
| | | projectType = object.get("projectType").toString(); |
| | | } |
| | | if ("null".equals(projectNmae)) { |
| | | projectNmae = ""; |
| | | } |
| | | BigDecimal sumArea = new BigDecimal(0); |
| | | double area = 0; |
| | | Integer sumQuantity = 0; |
| | | Integer type = 0; |
| | | int state1 = 0; |
| | | int state2 = 0; |
| | | StringBuilder processId= new StringBuilder(); |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("projectdetail")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | if(projectType.equals("2")){ |
| | | deleteProject(projectId,2); |
| | | } |
| | | for (FlowCard flowCard : flowCardList) { |
| | | if(flowCard.getPatchState().equals(0)){ |
| | | state1=1; |
| | | //给流程卡表添加对应的工程号 |
| | | Boolean a=glassOptimizeMapper.updateFlowCardProject(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectId); |
| | | area = glassOptimizeMapper.getSelectArea(flowCard.getProcessId(),flowCard.getTechnologyNumber()).doubleValue(); |
| | | sumArea = sumArea.add(BigDecimal.valueOf(area)); |
| | | sumQuantity +=flowCard.getQuantity(); |
| | | processId.append(flowCard.getProcessId()).append("-").append(flowCard.getTechnologyNumber()).append(";"); |
| | | }else{ |
| | | state2=1; |
| | | Boolean a=glassOptimizeMapper.updatePatchLogProject(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectId); |
| | | area = glassOptimizeMapper.getSelectAreaPatchLog(flowCard.getProcessId(),flowCard.getTechnologyNumber()).doubleValue(); |
| | | sumArea = sumArea.add(BigDecimal.valueOf(area)); |
| | | sumQuantity +=flowCard.getQuantity(); |
| | | processId.append(flowCard.getProcessId()).append("-").append(flowCard.getTechnologyNumber()).append(";"); |
| | | } |
| | | |
| | | } |
| | | if(state1==1&&state2==0){ |
| | | type=1; |
| | | }else if(state1==1&&state2==1){ |
| | | type=2; |
| | | } |
| | | int index = optionVal.indexOf("mm"); |
| | | // 获取 "mm" 前面的部分 |
| | | String glass_thickness = optionVal.substring(0, index); |
| | | // 获取 "mm" 后面的部分 |
| | | String glass_type = optionVal.substring(index + 2); |
| | | if(projectType.equals("2")){ |
| | | glassOptimizeMapper.updateProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea.doubleValue(),userName, |
| | | flowCardList.size(), String.valueOf(processId),type); |
| | | }else{ |
| | | if(glassOptimizeMapper.selectProjectCount(projectId)==null){ |
| | | glassOptimizeMapper.addProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea.doubleValue(),userName, |
| | | flowCardList.size(), String.valueOf(processId),type); |
| | | }else{ |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | return "false1"; |
| | | } |
| | | } |
| | | }else { |
| | | return "false2"; |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e+Arrays.toString(e.getStackTrace())); |
| | | sysError.setFunc("addProjectSv"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = "false"; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getConfiguration(String type) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(type.equals("钢化")){ |
| | | map.put("data", glassOptimizeMapper.getTemperedConfiguration()); |
| | | }else if(type.equals("磨量")){ |
| | | map.put("data", glassOptimizeMapper.getGrindingTrimming()); |
| | | }else if(type.equals("修边")){ |
| | | map.put("data", glassOptimizeMapper.getEdgeTrimming()); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Boolean saveConfiguration(Map<String,Object> object,String type) { |
| | | String json = ""; |
| | | if (object.get("json") != null) { |
| | | json = object.get("json").toString(); |
| | | } |
| | | if(type.equals("钢化")){ |
| | | glassOptimizeMapper.updateOptimizeConfig(json,1); |
| | | } else if (type.equals("修边")) { |
| | | glassOptimizeMapper.updateOptimizeConfig(json,5); |
| | | }else if (type.equals("磨量")) { |
| | | glassOptimizeMapper.updateOptimizeConfig(json,4); |
| | | } |
| | | return true; |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | | String laminating = reportMapper.getLaminating(selectProcesses); |
| | | map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO)); |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | | map.put("footSum" ,reportMapper.teamOutputFootSum(selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | |
| | | reportingWorkMapper.insert(reportingWork); |
| | | //副表循环插入,并且插入次破信息表。再根据次破信息修改订单玻璃流程表的完工数量与刺破数量 |
| | | reportingWorkDetails.forEach(reportingWorkDetail -> { |
| | | |
| | | reportingWork.setThisCompletedQuantity(reportingWork.getThisCompletedQuantity() + reportingWorkDetail.getCompletedQuantity()); |
| | | reportingWork.setThisWornQuantity(reportingWork.getThisWornQuantity() + reportingWorkDetail.getBreakageQuantity()); |
| | | int qualityInsStatus = (int) reportingWorkJson.get("qualityInsStatus"); |
| | | reportingWorkDetail.setReportingWorkId(reportingWorkId); |
| | | List<DamageDetails> damageDetails = reportingWorkDetail.getDamageDetails(); |
| | |
| | | |
| | | |
| | | }); |
| | | reportingWorkMapper.update(reportingWork, new LambdaUpdateWrapper<ReportingWork>() |
| | | .eq(ReportingWork::getId, reportingWork.getId())); |
| | | |
| | | //保存日志 |
| | | Log log = new Log(); |
| | |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | return result; |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> selectShiftQuantitySv(Map<String, Object> reportingWork) { |
| | | String creatorId = (String) reportingWork.get("userId"); |
| | | List<LocalDateTime> dateList = (List<LocalDateTime>) reportingWork.get("searchDate"); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | String startDate = LocalDateTime.now().with(LocalTime.MIN).format(formatter); |
| | | String endDate = LocalDateTime.now().format(formatter); |
| | | if (dateList.get(0)!=null){ |
| | | startDate = String.valueOf(dateList.get(0)); |
| | | } |
| | | if (dateList.get(1)!=null){ |
| | | endDate = String.valueOf(dateList.get(1)); |
| | | } |
| | | List<String> date = new ArrayList<>(); |
| | | date.add(startDate); |
| | | date.add(endDate); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("data",orderProcessDetailMapper.selectShiftQuantitySv(creatorId, startDate, endDate)); |
| | | result.put("date",date); |
| | | return result; |
| | | } |
| | | |
| | | public Map<String, Object> selectReportingWorkRecordByPhoneSv(Map<String,Object> reportingWork) { |
| | | List<LocalDateTime> dateList = (List<LocalDateTime>) reportingWork.get("searchDate"); |
| | | String startDate = LocalDate.now().minusDays(14).toString(); |
| | | String endDate = LocalDate.now().toString(); |
| | | if (dateList.get(0)!=null){ |
| | | startDate = String.valueOf(dateList.get(0)); |
| | | } |
| | | if (dateList.get(1)!=null){ |
| | | endDate = String.valueOf(dateList.get(1)); |
| | | } |
| | | List<String> date = new ArrayList<>(); |
| | | date.add(startDate); |
| | | date.add(endDate); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("data",reportingWorkMapper.selectList( |
| | | new QueryWrapper<ReportingWork>().nested( |
| | | reportingWork.get("process")!=null, |
| | | wrapper-> wrapper.eq("creator_id",reportingWork.get("userId"))//当工序为空时,查询所有报工信息 |
| | | ) |
| | | .gt("reviewed_state",-1) |
| | | .between("date(reporting_work_time)",startDate,endDate) |
| | | .orderByDesc("id"))); |
| | | result.put("date",date); |
| | | |
| | | return result; |
| | | |
| | | } |
| | | } |
| | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.dto.sd.OrderDTO; |
| | | import com.example.erp.dto.sd.OrderDetailProductDTO; |
| | | import com.example.erp.dto.sd.OrderSearchDTO; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | |
| | | } |
| | | } |
| | | JSONObject orderJson = new JSONObject(config); |
| | | Order order = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("filter")), Order.class); |
| | | OrderSearchDTO order = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("filter")), OrderSearchDTO.class); |
| | | Map<String,String> sortDate = (Map<String, String>) config.get("sort"); |
| | | String field = sortDate.get("field").replaceAll("(?<!^)([A-Z])", "_$1").toLowerCase(); |
| | | String orderBy = sortDate.get("order"); |
| | |
| | | select project_no from pp.optimize_use where id=#{useId}; |
| | | </select> |
| | | |
| | | <select id="getOptimizeOutboundReport"> |
| | | SELECT |
| | | ml.operation_order_number, |
| | | ml.project_no, |
| | | ml.inventory_id, |
| | | ml.material_name, |
| | | ml.unit, |
| | | ml.width, |
| | | ml.height, |
| | | ml.thickness, |
| | | ml.quantity, |
| | | round(ml.width*ml.height*ml.quantity/1000000,2) as area, |
| | | ou.use_count, |
| | | ou.not_use_count, |
| | | ml.operator, |
| | | ml.operate_time |
| | | |
| | | FROM |
| | | mm.material_log AS ml |
| | | LEFT JOIN pp.optimize_use AS ou ON ou.project_no = ml.project_no |
| | | AND ou.raw_stock_code = ml.inventory_id |
| | | WHERE |
| | | ou.project_no IS NOT NULL |
| | | AND date( ml.operate_time )>= #{startDate} and date(ml.operate_time) <= #{endDate} |
| | | and ml.operate_type=#{type} |
| | | |
| | | <if test="materialLog.operationOrderNumber != null and materialLog.operationOrderNumber != ''"> |
| | | and ml.operation_order_number regexp #{materialLog.operationOrderNumber} |
| | | </if> |
| | | <if test="materialLog.useCount != null and materialLog.useCount != ''"> |
| | | and ou.use_count regexp #{materialLog.useCount} |
| | | </if> |
| | | <if test="materialLog.quantity != null and materialLog.quantity != ''"> |
| | | and ml.quantity regexp #{materialLog.quantity} |
| | | </if> |
| | | <if test="materialLog.width != null and materialLog.width != ''"> |
| | | and ml.width regexp REGEXP_REPLACE(#{materialLog.width},'\\.0+$','') |
| | | </if> |
| | | <if test="materialLog.height != null and materialLog.height != ''"> |
| | | and ml.height regexp REGEXP_REPLACE(#{materialLog.height},'\\.0+$','') |
| | | </if> |
| | | <if test="materialLog.thickness != null and materialLog.thickness != ''"> |
| | | and ml.thickness regexp REGEXP_REPLACE(#{materialLog.thickness},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="materialLog.inventoryId != null and materialLog.inventoryId != ''"> |
| | | and ml.inventory_id regexp #{materialLog.inventoryId} |
| | | </if> |
| | | |
| | | <if test="materialLog.materialName != null and materialLog.materialName != ''"> |
| | | and ml.material_name regexp #{materialLog.materialName} |
| | | </if> |
| | | <if test="materialLog.producer != null and materialLog.producer != ''"> |
| | | and ml.producer regexp #{materialLog.producer} |
| | | </if> |
| | | <if test="materialLog.unit != null and materialLog.unit != ''"> |
| | | and ml.unit regexp #{materialLog.unit} |
| | | </if> |
| | | <if test="materialLog.operator != null and materialLog.operator != ''"> |
| | | and ml.operator regexp #{materialLog.operator} |
| | | </if> |
| | | <if test="materialLog.remarks != null and materialLog.remarks != ''"> |
| | | and ml.remarks regexp #{materialLog.remarksr} |
| | | </if> |
| | | order by ml.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getOptimizeOutboundReportTotal"> |
| | | SELECT |
| | | CEILING(count(ml.id)/#{pageSize}) as 'pageTotal', |
| | | count(ml.id) as 'total' |
| | | |
| | | FROM |
| | | mm.material_log AS ml |
| | | LEFT JOIN pp.optimize_use AS ou ON ou.project_no = ml.project_no |
| | | AND ou.raw_stock_code = ml.inventory_id |
| | | WHERE |
| | | ou.project_no IS NOT NULL |
| | | AND date( ml.operate_time )>= #{startDate} and date(ml.operate_time) <= #{endDate} |
| | | and ml.operate_type=#{type} |
| | | </select> |
| | | </mapper> |
| | |
| | | left join sd.order_detail as od on od.order_id = SUBSTRING(fc.process_id,1,10) and od.order_number = fc.order_sort |
| | | left join sd.`order` as o on o.order_id = SUBSTRING(fc.process_id,1,10) |
| | | left join pp.`flow_card` as fcd on fcd.process_id=fc.process_id and fcd.technology_number=ogd.technology_number and fcd.order_number=od.order_number |
| | | where fc.project_no = #{printProject} |
| | | where fc.project_no = #{printProject} and fc.process_id is not null and fc.process_id!="" |
| | | GROUP BY fc.process_id, ogd.technology_number |
| | | order by fc.process_id, ogd.technology_number |
| | | </select> |
| | |
| | | <select id="getOrderIdByProcessId"> |
| | | select order_id from pp.flow_card where process_id = #{processId} limit 1; |
| | | </select> |
| | | |
| | | <select id="flowCardDetailMergeMp"> |
| | | select merge from pp.flow_card where process_id = #{processId} group by id ORDER BY merge desc LIMIT 1 |
| | | </select> |
| | | |
| | | <update id="updateFlowCardIsMerge"> |
| | | update pp.flow_card fc set fc.merge=0 |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | </mapper> |
| | |
| | | <select id="projectInfoMp"> |
| | | SELECT |
| | | f.order_number, |
| | | g.child_width , |
| | | g.child_height , |
| | | g.child_width as 'width', |
| | | g.child_height as 'height', |
| | | f.quantity , |
| | | d.shape , |
| | | op.process_cards , |
| | |
| | | f.technology_number , |
| | | g.glass_child , |
| | | g.icon, |
| | | op.project_name |
| | | op.project_name, |
| | | d.processing_note |
| | | FROM |
| | | ((pp.flow_card AS f |
| | | LEFT JOIN sd.order_detail AS d ON (((f.order_id = d.order_id) AND (f.order_number = d.order_number)))) |
| | |
| | | f.order_id, |
| | | f.technology_number, |
| | | f.order_number; |
| | | </select> |
| | | |
| | | <!--第一次优化查询--> |
| | | <select id="firstOptimization"> |
| | | ( SELECT |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | c.quantity, |
| | | o.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | | c.technology_number, |
| | | d.glass_child, |
| | | o.product_name, |
| | | o.price, |
| | | o.remarks, |
| | | o.building_number, |
| | | round( d.area * c.quantity, 4 ) as 'area', |
| | | c.order_number, |
| | | d.icon, |
| | | op.project_name |
| | | FROM |
| | | pp.flow_card c |
| | | LEFT JOIN sd.order_detail o ON c.order_id = o.order_id |
| | | AND c.order_number = o.order_number |
| | | LEFT JOIN sd.order_glass_detail d ON c.order_id = d.order_id |
| | | AND c.order_number = d.order_number |
| | | AND c.technology_number = d.technology_number |
| | | INNER JOIN pp.optimize_project AS op ON op.project_no = c.project_no |
| | | WHERE |
| | | c.project_no IS NOT NULL |
| | | and c.project_no = #{projectNo} |
| | | ORDER BY |
| | | c.process_id, |
| | | c.order_number |
| | | ) union |
| | | ( |
| | | SELECT |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | c.patch_num as quantity, |
| | | o.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | | c.technology_number, |
| | | d.glass_child, |
| | | o.product_name, |
| | | o.price, |
| | | o.remarks, |
| | | o.building_number, |
| | | round( d.area * c.patch_num, 4 ) as 'area', |
| | | c.order_sort as order_number, |
| | | d.icon, |
| | | op.project_name |
| | | FROM |
| | | pp.patch_log c |
| | | LEFT JOIN sd.order_detail o ON c.order_id = o.order_id |
| | | AND c.order_sort = o.order_number |
| | | LEFT JOIN sd.order_glass_detail d ON c.order_id = d.order_id |
| | | AND c.order_sort = d.order_number |
| | | AND c.technology_number = d.technology_number |
| | | INNER JOIN pp.optimize_project AS op ON op.project_no = c.project_no |
| | | WHERE |
| | | c.project_no IS NOT NULL |
| | | and c.project_no = #{projectNo} |
| | | ORDER BY |
| | | c.process_id, |
| | | c.order_sort) |
| | | </select> |
| | | |
| | | |
| | | <!--第一次优化查询--> |
| | | <select id="analogComputationOptimization"> |
| | | SELECT |
| | | h.project_no, |
| | | h.layout_id, |
| | | h.width AS width, |
| | | h.height AS height, |
| | | count( 1 ) AS quantity, |
| | | o.shape, |
| | | concat( h.process_id, '-', h.layer ) AS 'process_id', |
| | | h.layer, |
| | | d.glass_child, |
| | | o.product_name, |
| | | o.price, |
| | | o.remarks, |
| | | o.building_number, |
| | | round( d.area * count( 1 ), 4 ) AS 'area', |
| | | c.order_number, |
| | | d.icon, |
| | | o.price |
| | | from |
| | | pp.`optimize_heat_detail` h |
| | | LEFT JOIN pp.flow_card c ON h.process_id = c.process_id |
| | | AND h.layer = c.technology_number |
| | | AND h.order_sort = c.order_number |
| | | LEFT JOIN sd.order_detail o ON c.order_id = o.order_id |
| | | AND c.order_number = o.order_number |
| | | LEFT JOIN sd.order_glass_detail d ON c.order_id = d.order_id |
| | | AND c.order_number = d.order_number |
| | | AND c.technology_number = d.technology_number |
| | | WHERE |
| | | h.project_no = #{projectNo} |
| | | GROUP BY |
| | | h.project_no, |
| | | h.layout_id, |
| | | h.width, |
| | | h.height, |
| | | h.process_id, |
| | | h.layer, |
| | | d.area, |
| | | c.quantity, |
| | | d.child_width, |
| | | d.child_height, |
| | | o.shape, |
| | | d.glass_child, |
| | | o.product_name, |
| | | o.price, |
| | | o.remarks, |
| | | o.building_number, |
| | | c.order_number, |
| | | d.icon, |
| | | o.price |
| | | ORDER BY |
| | | LENGTH( h.layout_id ), |
| | | h.layout_id; |
| | | </select> |
| | | |
| | | <!--工程信息流程卡--> |
| | |
| | | fc.order_number |
| | | </select> |
| | | |
| | | <select id="getFlowCardList"> |
| | | SELECT * |
| | | FROM |
| | | pp.flow_card AS fc |
| | | WHERE |
| | | fc.project_no = #{projectNo} |
| | | |
| | | </select> |
| | | |
| | | <select id="getPatchLogList"> |
| | | SELECT * |
| | | FROM |
| | | pp.patch_log |
| | | WHERE |
| | | project_no = #{projectNo} |
| | | |
| | | </select> |
| | | |
| | | <!--库存信息--> |
| | | <select id="materialStoreMp"> |
| | | SELECT |
| | | i.id AS id, |
| | | i.producer AS producer, |
| | | i.available_quantity AS available_quantity, |
| | | i.available_quantity-i.plan_quantity AS available_quantity, |
| | | JSON_EXTRACT(s.json, '$.width') AS width, |
| | | JSON_EXTRACT(s.json, '$.height') AS height, |
| | | JSON_EXTRACT(s.json, '$.thickness') AS thickness, |
| | |
| | | ( |
| | | (`s`.`type` = '原片') |
| | | AND (`i`.`optimize_state` = 1) |
| | | AND (`i`.`available_quantity` > 0) |
| | | AND (`i`.`available_quantity`-i.plan_quantity > 0) |
| | | AND JSON_EXTRACT(s.json, '$.thickness') = #{thickness} |
| | | AND JSON_EXTRACT(s.json, '$.model') = #{model} |
| | | ) |
| | | ORDER BY |
| | | `i`.`available_quantity` DESC ; |
| | | </select> |
| | | |
| | | <!--余料信息--> |
| | | <select id="surplusMaterialsMp"> |
| | | SELECT |
| | | i.id AS id, |
| | | '' AS producer, |
| | | i.quantity AS available_quantity, |
| | | i.width, |
| | | i.height, |
| | | i.thickness, |
| | | i.colour AS name, |
| | | i.colour |
| | | FROM mm.surplus_materials as i |
| | | WHERE |
| | | i.quantity>0 and i.colour=#{model} and i.thickness=#{thickness} |
| | | ORDER BY |
| | | i.quantity DESC ; |
| | | </select> |
| | | |
| | | <!--库存余料信息--> |
| | | <select id="materialStoreSurplusMp"> |
| | | (SELECT |
| | | i.id AS id, |
| | | i.producer AS producer, |
| | | i.available_quantity-i.plan_quantity AS available_quantity, |
| | | JSON_EXTRACT(s.json, '$.width') AS width, |
| | | JSON_EXTRACT(s.json, '$.height') AS height, |
| | | JSON_EXTRACT(s.json, '$.thickness') AS thickness, |
| | | JSON_EXTRACT(s.json, '$.name') AS name, |
| | | JSON_EXTRACT(s.json, '$.model') AS model |
| | | FROM mm.material_inventory as `i` |
| | | LEFT JOIN mm.material_store as s ON ( |
| | | ( |
| | | `i`.`material_code` = `s`.`id` |
| | | ) |
| | | ) |
| | | WHERE |
| | | ( |
| | | (`s`.`type` = '原片') |
| | | AND (`i`.`optimize_state` = 1) |
| | | AND (`i`.`available_quantity`-i.plan_quantity > 0) |
| | | AND JSON_EXTRACT(s.json, '$.thickness') = #{thickness} |
| | | AND JSON_EXTRACT(s.json, '$.model') = #{model} |
| | | ) |
| | | ORDER BY |
| | | `i`.`available_quantity` DESC) union |
| | | (SELECT |
| | | i.id AS id, |
| | | '' AS producer, |
| | | i.quantity AS available_quantity, |
| | | i.width, |
| | | i.height, |
| | | i.thickness, |
| | | i.colour AS name, |
| | | i.colour |
| | | FROM mm.surplus_materials as i |
| | | WHERE |
| | | i.quantity>0 and i.colour=#{model} and i.thickness=#{thickness} |
| | | ORDER BY |
| | | i.quantity DESC ); |
| | | </select> |
| | | |
| | | |
| | | <select id="materialStoreOptimizeUse"> |
| | | select ms.id AS id, |
| | | ou.use_count AS processingQuantity, |
| | | ou.width, |
| | | ou.height, |
| | | ou.left_trim as leftTrim, |
| | | ou.down_trim as downTrim, |
| | | ou.up_trim as upTrim, |
| | | ou.right_trim as rightTrim, |
| | | JSON_EXTRACT(ms.json, '$.thickness') AS thickness, |
| | | JSON_EXTRACT(ms.json, '$.name') AS name, |
| | | JSON_EXTRACT(ms.json, '$.model') AS model |
| | | from pp.optimize_use ou |
| | | left join mm.material_store ms on ou.raw_stock_code=ms.id where project_no=#{projectNumber} and state=1 |
| | | </select> |
| | | |
| | | <select id="selectWordOrder" resultMap="wordOrderMap"> |
| | |
| | | AND pd.glass_sort = fc.technology_number |
| | | WHERE |
| | | CONCAT( JSON_UNQUOTE( JSON_EXTRACT( pd.separation, '$.thickness' )), JSON_UNQUOTE( JSON_EXTRACT( pd.separation, '$.color' )) )= #{optionVal} |
| | | and ISNULL(fc.project_no) |
| | | and ISNULL(fc.project_no) and fc.layout_status=1 |
| | | GROUP BY |
| | | fc.process_id, |
| | | fc.technology_number |
| | | ORDER BY |
| | | fc.process_id, |
| | | fc.technology_number |
| | | </select> |
| | | |
| | | <select id="getFlowCardListWhole"> |
| | | SELECT 流程卡号 as process_id, |
| | | 层 as technology_number, |
| | | 总层数 as TotalFloors, |
| | | 规格 as TotalNumber, |
| | | 数量 as quantity, |
| | | 形状 as shape, |
| | | 项目 as project, |
| | | 单片名称 as glass_child, |
| | | 面积 as area, |
| | | GlassType as glassType, |
| | | patch_state |
| | | FROM pp.v_optimize_process_whole where |
| | | CONCAT( JSON_UNQUOTE( JSON_EXTRACT( GlassType, '$.thickness' )), JSON_UNQUOTE( JSON_EXTRACT( GlassType, '$.color' )) )= #{optionVal} |
| | | </select> |
| | | |
| | | <select id="getFlowCardListNormal"> |
| | | SELECT 流程卡号 as process_id, |
| | | 层 as technology_number, |
| | | 总层数 as TotalFloors, |
| | | 规格 as TotalNumber, |
| | | 数量 as quantity, |
| | | 形状 as shape, |
| | | 项目 as project, |
| | | 单片名称 as glass_child, |
| | | 面积 as area, |
| | | GlassType as glassType, |
| | | patch_state |
| | | FROM pp.v_optimize_process_normal where |
| | | CONCAT( JSON_UNQUOTE( JSON_EXTRACT( GlassType, '$.thickness' )), JSON_UNQUOTE( JSON_EXTRACT( GlassType, '$.color' )) )= #{optionVal} |
| | | </select> |
| | | |
| | | <select id="getFlowCardListPatch"> |
| | | SELECT 流程卡号 as process_id, |
| | | 层 as technology_number, |
| | | 总层数 as TotalFloors, |
| | | 规格 as TotalNumber, |
| | | 数量 as quantity, |
| | | 形状 as shape, |
| | | 项目 as project, |
| | | 单片名称 as glass_child, |
| | | 面积 as area, |
| | | GlassType as glassType, |
| | | patch_state |
| | | FROM pp.v_optimize_process_patch where |
| | | CONCAT( JSON_UNQUOTE( JSON_EXTRACT( GlassType, '$.thickness' )), JSON_UNQUOTE( JSON_EXTRACT( GlassType, '$.color' )) )= #{optionVal} |
| | | </select> |
| | | |
| | | <select id="getFlowCardListModify"> |
| | | SELECT 流程卡号 as process_id, |
| | | 层 as technology_number, |
| | | 总层数 as TotalFloors, |
| | | 规格 as TotalNumber, |
| | | 数量 as quantity, |
| | | 形状 as shape, |
| | | 项目 as project, |
| | | 产品名称 as glass_child, |
| | | 面积 as area, |
| | | GlassType as glassType, |
| | | patch_state, |
| | | 占用 as occupyState |
| | | FROM pp.v_optimize_porject_modify_merg where |
| | | GlassType REGEXP #{type} and GlassType REGEXP #{thickness} |
| | | and (工程号 is null or 工程号 = #{projectNO}) order by 占用,patch_state,流程卡号 |
| | | </select> |
| | | |
| | | <!--工程管理--> |
| | |
| | | `p`.`update_time` AS `Modify time` |
| | | from pp.optimize_project as p |
| | | left join pp.optimize_admin as a on p.creater = a.Id |
| | | where (`p`.`state` > -(1)) |
| | | where (`p`.`state` > 1) |
| | | and DATE (`p`.`create_time`) BETWEEN #{startSelectTime} AND #{endSelectTime} |
| | | <if test="optimizeProjectMange.projectNumber != null and optimizeProjectMange.projectNumber != ''"> |
| | | and p.project_no regexp #{optimizeProjectMange.projectNumber} |
| | |
| | | where project_no = #{projectNumber} |
| | | </delete> |
| | | |
| | | <delete id="deleteOptimizeHeatDetail"> |
| | | delete from pp.optimize_heat_detail |
| | | where project_no = #{projectNumber} |
| | | </delete> |
| | | |
| | | <delete id="deleteOptimizeHeatLayout"> |
| | | delete from pp.optimize_heat_layout |
| | | where project_no = #{projectNumber} |
| | | </delete> |
| | | |
| | | <delete id="deleteOptimizeDetail"> |
| | | delete from pp.optimize_detail |
| | | where project_no = #{projectNumber} |
| | | </delete> |
| | | |
| | | <select id="getProjectListMp"> |
| | | SELECT |
| | | p.id, |
| | | p.project_no, |
| | | p.project_no as projectNumber, |
| | | p.project_name, |
| | | p.glass_type, |
| | | p.glass_thickness, |
| | | p.type, |
| | | p.state, |
| | | p.glass_total, |
| | | p.glass_total as quantity, |
| | | p.glass_total_area, |
| | | p.process_qty, |
| | | p.process_cards, |
| | |
| | | |
| | | <!--模拟计算查询流程卡--> |
| | | <select id="selectProjectComputeMp"> |
| | | SELECT |
| | | fc.process_id, |
| | | fc.technology_number, |
| | | fc.project_no, |
| | | fcss.TotalFloors, |
| | | COUNT(fc.order_number) AS TotalNumber, |
| | | SUM(fc.quantity) AS quantity, |
| | | ROUND(SUM(od.width * od.height * fc.quantity / 1000000), 2) AS area, |
| | | o.project, |
| | | ogd.glass_child, |
| | | od.shape, |
| | | SUBSTRING(glass_child, 1, LOCATE('mm', glass_child) - 1) as thickness, |
| | | SUBSTRING(glass_child, LOCATE('mm', glass_child) + 2) as glassType |
| | | FROM |
| | | pp.flow_card AS fc |
| | | LEFT JOIN sd.`order` AS o ON fc.order_id = o.order_id |
| | | LEFT JOIN sd.order_detail AS od ON od.order_id = fc.order_id AND od.order_number = fc.order_number |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON ogd.order_id = fc.order_id AND ogd.order_number = fc.order_number AND |
| | | ogd.technology_number = fc.technology_number |
| | | LEFT JOIN ( |
| | | SELECT |
| | | fcs.process_id, |
| | | fcs.order_number, |
| | | COUNT(DISTINCT fcs.technology_number) AS TotalFloors |
| | | FROM |
| | | pp.flow_card AS fcs |
| | | GROUP BY |
| | | fcs.process_id, fcs.order_number |
| | | ) AS fcss |
| | | ON fcss.process_id = fc.process_id AND fcss.order_number = fc.order_number |
| | | WHERE |
| | | fc.project_no = #{projectNo} |
| | | GROUP BY |
| | | fc.process_id, fc.technology_number |
| | | ORDER BY |
| | | fc.process_id, fc.technology_number; |
| | | select |
| | | 流程卡号 as processId, |
| | | 层 as technologyNumber, |
| | | 总层数 as total_layers, |
| | | 规格 as TotalNumber, |
| | | 数量 as total_num, |
| | | 项目 as project, |
| | | 产品名称 as glass_child, |
| | | 面积 as total_area, |
| | | tempering as tempering, |
| | | merge as merge, |
| | | patch_state as patch_state, |
| | | 0 as allow_rotate, |
| | | 0 as curtain_wall, |
| | | 0 as priority_level, |
| | | 1 as is_must |
| | | from pp.v_optimize_init_project_process_summary where project_no = #{projectNo} |
| | | </select> |
| | | |
| | | <select id="selectProjectCount"> |
| | | select * from pp.optimize_project where project_no=#{projectNo} |
| | | </select> |
| | | |
| | | <!--模拟计算流程卡详情--> |
| | |
| | | |
| | | <!--模拟计算流程卡详情2--> |
| | | <select id="selectComputeDetailMp"> |
| | | SELECT |
| | | d.width AS width, |
| | | d.height AS height, |
| | | f.quantity AS quantity, |
| | | d.building_number AS `Storey Number`, |
| | | d.shape AS shape, |
| | | round(g.area * f.quantity, 4) AS area, |
| | | g.icon AS `Label type`, |
| | | dal.patch_status, |
| | | g.technology_number, |
| | | g.order_number, |
| | | fl.layers_number, |
| | | g.child_width, |
| | | g.child_height, |
| | | fl.process_id |
| | | select `f`.`order_id` AS order_id, |
| | | `f`.`order_number` AS order_number, |
| | | `d`.`width` AS maxwidth, |
| | | `d`.`height` AS maxheight, |
| | | `g`.`child_width` AS width, |
| | | `g`.`child_height` AS height, |
| | | `f`.`process_id` AS process_id, |
| | | sum(`f`.`quantity`) AS quantity, |
| | | `f`.`technology_number` AS technology_number, |
| | | `d`.`building_number` AS building_number, |
| | | `d`.`shape` AS shape, |
| | | sum(round((`g`.`area` * `f`.`quantity`), 4)) AS area, |
| | | `g`.`icon` AS icon |
| | | from (( |
| | | `pp`.`flow_card` `f` |
| | | left join `sd`.`order_detail` `d` on (((`f`.`order_id` = `d`.`order_id`) |
| | | and (`f`.`order_number` = `d`.`order_number`)))) |
| | | left join `sd`.`order_glass_detail` `g` on (((`f`.`order_id` = `g`.`order_id`) |
| | | and (`f`.`order_number` = `g`.`order_number`) |
| | | and (`f`.`technology_number` = `g`.`technology_number`)))) |
| | | where (`f`.`layout_status` != 0) |
| | | and f.process_id = #{processId} |
| | | and f.technology_number = #{technologyNumber} |
| | | group by `f`.`process_id`, |
| | | `f`.`technology_number`, |
| | | `f`.`order_id`, |
| | | `f`.`order_number`, |
| | | `d`.`width`, |
| | | `d`.`height`, |
| | | `g`.`child_width`, |
| | | `g`.`child_height`, |
| | | `f`.`quantity`, |
| | | `d`.`building_number`, |
| | | `d`.`shape`, |
| | | `g`.`area`, |
| | | `g`.`icon` |
| | | </select> |
| | | |
| | | FROM |
| | | pp.flow_card f |
| | | LEFT JOIN pp.optimize_project p ON f.project_no = p.project_no |
| | | LEFT JOIN sd.order o ON f.order_id = o.order_id |
| | | LEFT JOIN sd.order_detail d ON f.order_id = d.order_id AND f.order_number = d.order_number |
| | | LEFT JOIN sd.order_glass_detail g ON f.order_id = g.order_id AND f.order_number = g.order_number AND f.technology_number = g.technology_number |
| | | LEFT JOIN sd.product_detail p2 ON d.product_id = p2.prod_id AND f.technology_number = p2.glass_sort |
| | | LEFT JOIN pp.optimize_project j ON f.project_no = j.project_no |
| | | LEFT JOIN pp.damage_details dal ON dal.order_number = g.order_number AND dal.technology_number = g.technology_number and f.process_id=dal.process_id |
| | | LEFT JOIN pp.flow_card fl ON fl.order_id = g.order_id AND fl.order_number = g.order_number AND fl.technology_number = g.technology_number |
| | | WHERE |
| | | p.state IN (1, 2) and |
| | | f.process_id = #{processId} |
| | | <select id="selectComputeDetailMpPatchState"> |
| | | select `l`.`order_id` AS order_id, |
| | | `l`.`order_sort` AS order_number, |
| | | `d`.`width` AS maxwidth, |
| | | `d`.`height` AS maxheight, |
| | | `g`.`child_width` AS width, |
| | | `g`.`child_height` AS height, |
| | | `l`.`process_id` AS process_id, |
| | | `l`.`patch_num` AS quantity, |
| | | `l`.`technology_number` AS technology_number, |
| | | `d`.`building_number` AS building_number, |
| | | `d`.`shape` AS shape, |
| | | round((`g`.`area` * `l`.`patch_num`), 4) AS area, |
| | | `g`.`icon` AS icon |
| | | from ((( |
| | | `pp`.`patch_log` `l` |
| | | left join (select `pp`.`optimize_project`.`project_no` AS `project_no` |
| | | from `pp`.`optimize_project` |
| | | where ((`optimize_project`.`state` = 1)or (`optimize_project`.`state` = 2))) `p` on ((`l`.`project_no` = `p`.`project_no`))) |
| | | left join `sd`.`order_detail` `d` on (((`l`.`order_id` = `d`.`order_id`)and (`l`.`order_sort` = `d`.`order_number`)))) |
| | | left join `sd`.`order_glass_detail` `g` on (((`l`.`order_id` = `g`.`order_id`)and (`l`.`order_sort` = `g`.`order_number`) |
| | | and (`l`.`technology_number` = `g`.`technology_number`)))) |
| | | where `l`.process_id = #{processId} |
| | | and `l`.technology_number = #{technologyNumber} |
| | | group by `l`.`process_id`, |
| | | `l`.`technology_number`, |
| | | `l`.`order_id`, |
| | | `l`.`order_sort`, |
| | | `d`.`width`, |
| | | `d`.`height`, |
| | | `g`.`child_width`, |
| | | `g`.`child_height`, |
| | | `l`.`patch_num`, |
| | | `d`.`building_number`, |
| | | `d`.`shape`, |
| | | `g`.`area`, |
| | | `g`.`icon` |
| | | </select> |
| | | |
| | | <select id="getProcessCardDetailmMp"> |
| | |
| | | </select> |
| | | |
| | | <update id="updateFlowCardProject"> |
| | | UPDATE pp.flow_card set project_no=#{projectId} |
| | | UPDATE pp.flow_card set project_no=#{projectId},layout_status=2 |
| | | where process_id=#{processId} and technology_number=#{technologyNumber} |
| | | </update> |
| | | |
| | | <update id="updatePatchLogProject"> |
| | | UPDATE pp.patch_log set project_no=#{projectId} |
| | | where process_id=#{processId} and technology_number=#{technologyNumber} |
| | | </update> |
| | | |
| | | <update id="updateFlowCardProjectReturn"> |
| | | UPDATE pp.flow_card set project_no=null,layout_status=1 |
| | | where process_id=#{processId} and technology_number=#{technologyNumber} and project_no=#{projectId} |
| | | </update> |
| | | |
| | | <update id="updatePatchLogProjectReturn"> |
| | | UPDATE pp.patch_log set project_no=null |
| | | where process_id=#{processId} and technology_number=#{technologyNumber} and project_no=#{projectId} |
| | | </update> |
| | | |
| | | <select id="getSelectArea"> |
| | |
| | | group by fc.process_id,fc.technology_number |
| | | </select> |
| | | |
| | | <select id="getSelectAreaPatchLog"> |
| | | select |
| | | sum(patch_area) |
| | | from pp.patch_log |
| | | where process_id=#{processId} and technology_number=#{technologyNumber} |
| | | group by process_id,technology_number |
| | | </select> |
| | | |
| | | <update id="updateProjectMp"> |
| | | update pp.optimize_project set project_name=#{projectNmae},glass_total=#{sumQuantity},glass_total_area= #{sumArea}, |
| | | type=#{type},process_qty=#{processIdCount},process_cards=#{processId} where project_no=#{projectId} |
| | | </update> |
| | | |
| | | <insert id="addProjectMp"> |
| | | insert into pp.optimize_project (project_no, project_name, order_glass_type, order_glass_thickness) |
| | | values (#{projectId}, #{projectNmae}, #{glassType}, #{glassThickness}) |
| | | insert into pp.optimize_project (project_no, project_name, order_glass_type, order_glass_thickness,glass_type, glass_thickness, |
| | | glass_total,glass_total_area,type,state,process_qty,process_cards) |
| | | values (#{projectId}, #{projectNmae}, #{glassType}, #{glassThickness}, #{glassType}, #{glassThickness},#{sumQuantity}, #{sumArea}, |
| | | #{type},1,#{processIdCount},#{processId}) |
| | | </insert> |
| | | |
| | | |
| | |
| | | FROM pp.optimize_project_file |
| | | WHERE project_no=#{processId} and type='优化结果'; |
| | | </select> |
| | | |
| | | <select id="getTemperedConfiguration"> |
| | | select JSON_EXTRACT( oc.config_detail, '$.glass_thickness' ) as glass_thickness, |
| | | JSON_EXTRACT( oc.config_detail, '$.glass_type' ) as glass_type, |
| | | JSON_EXTRACT( oc.config_detail, '$.tempering_time' ) as tempering_time, |
| | | JSON_EXTRACT( oc.config_detail, '$.load_width' ) as load_width, |
| | | JSON_EXTRACT( oc.config_detail, '$.load_length' ) as load_length, |
| | | JSON_EXTRACT( oc.config_detail, '$.x_space' ) as x_space, |
| | | JSON_EXTRACT( oc.config_detail, '$.y_space' ) as y_space |
| | | from pp.optimize_admin oa left join pp.optimize_config oc on oa.h_id=oc.id where name='admin' |
| | | </select> |
| | | |
| | | <select id="getEdgeTrimming"> |
| | | select JSON_EXTRACT( oc.config_detail, '$.left_trim' ) as leftTrim, |
| | | JSON_EXTRACT( oc.config_detail, '$.up_trim' ) as upTrim, |
| | | JSON_EXTRACT( oc.config_detail, '$.right_trim' ) as rightTrim, |
| | | JSON_EXTRACT( oc.config_detail, '$.down_trim' ) as downTrim, |
| | | JSON_EXTRACT( oc.config_detail, '$.auto_fill_trim' ) as autoFillTrim, |
| | | JSON_EXTRACT( oc.config_detail, '$.quick_trim' ) as quickTrim |
| | | from pp.optimize_config oc where config_type=5 |
| | | </select> |
| | | |
| | | <select id="getGrindingTrimming"> |
| | | select JSON_EXTRACT( oc.config_detail, '$.left_edge' ) as leftEdge, |
| | | JSON_EXTRACT( oc.config_detail, '$.up_edge' ) as upEdge, |
| | | JSON_EXTRACT( oc.config_detail, '$.right_edge' ) as rightEdge, |
| | | JSON_EXTRACT( oc.config_detail, '$.down_edge' ) as downEdge, |
| | | JSON_EXTRACT( oc.config_detail, '$.auto_fill_edge' ) as autoFillEdge, |
| | | JSON_EXTRACT( oc.config_detail, '$.quick_edge' ) as quickEdge, |
| | | JSON_EXTRACT( oc.config_detail, '$.min_auto_lenght' ) as minAutoLenght |
| | | from pp.optimize_config oc where config_type=4 |
| | | </select> |
| | | |
| | | <update id="updateOptimizeConfig"> |
| | | UPDATE pp.optimize_config set config_detail=#{json},create_time=now() |
| | | where config_type=#{type} |
| | | </update> |
| | | </mapper> |
| | |
| | | <result column="personnel" property="personnel"/> |
| | | <result column="glass_child" property="glassChild"/> |
| | | <result column="glassNumber" property="glassNumber"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="teamOutputMap" type="com.example.erp.dto.pp.TeamOutputDTO"> |
| | |
| | | round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) as area, |
| | | IFNULL(dd.responsible_personnel,'') as personnel, |
| | | ogd.glass_child, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') AS glassNumber |
| | | FROM |
| | | sd.ORDER AS o |
| | |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code, |
| | | rw.reviewed, |
| | | rw.examine_time, |
| | | GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName |
| | | -- GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName |
| | | CASE |
| | | WHEN #{laminating} = 'laminating' THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+') |
| | | ELSE MAX( ogd.glass_child ) |
| | | END AS workProcessName |
| | | FROM |
| | | reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id |
| | | left join flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number |
| | |
| | | rw.teams_groups_name |
| | | ) as subquery |
| | | </select> |
| | | |
| | | <select id="getLaminating"> |
| | | select IFNULL(nickname,'') from sd.basic_data where basic_category='process' and basic_name=#{selectProcesses} |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <select id="getFootSum"> |
| | | SELECT |
| | | ifnull(SUM(this_completed_quantity),0) AS thisCompletedQuantity, |
| | | ifnull(SUM(ROUND(child_width * child_height * this_completed_quantity / 1000000, 2)),0) AS completedArea, |
| | | ifnull(SUM(this_worn_quantity),0) AS thisWornQuantity, |
| | | ifnull(SUM(ROUND(child_width * child_height * this_worn_quantity / 1000000, 2)),0) AS wornArea |
| | | FROM ( |
| | | -- 先对 reporting_work_id 进行去重 |
| | | SELECT |
| | | rw.reporting_work_id, |
| | | MAX(rw.this_completed_quantity) AS this_completed_quantity, |
| | | MAX(rw.this_worn_quantity) AS this_worn_quantity, |
| | | MAX(ogd.child_width) AS child_width, |
| | | MAX(ogd.child_height) AS child_height |
| | | FROM reporting_work as rw left join reporting_work_detail as rwd on rw.reporting_work_id=rwd.reporting_work_id |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=rw.order_id and ogd.order_number=rwd.order_number and ogd.technology_number=rwd.technology_number |
| | | left join sd.`order` as o on o.order_id=rw.order_id |
| | | WHERE rw.reviewed_state != 2 |
| | | and rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time < #{selectTime2} |
| | | and position(#{orderId} in rw.order_id) |
| | | AND rw.reviewed_state != -1 |
| | | AND o.create_order > 0 |
| | | SUM(rw.this_completed_quantity) AS thisCompletedQuantity, |
| | | ROUND(SUM(ogd.child_width * ogd.child_height * rw.this_completed_quantity / 1000000), 2) AS completedArea, |
| | | SUM(rw.this_worn_quantity) AS thisWornQuantity, |
| | | ROUND(SUM(ogd.child_width * ogd.child_height * rw.this_worn_quantity / 1000000), 2) AS wornArea |
| | | FROM reporting_work AS rw |
| | | LEFT JOIN reporting_work_detail AS rwd ON rw.reporting_work_id = rwd.reporting_work_id |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = rw.order_id |
| | | AND ogd.order_number = rwd.order_number |
| | | AND ogd.technology_number = rwd.technology_number |
| | | LEFT JOIN sd.`order` AS o ON o.order_id = rw.order_id |
| | | WHERE rw.reviewed_state != 2 |
| | | and rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time < #{selectTime2} |
| | | AND position(#{orderId} in rw.order_id) |
| | | AND rw.reviewed_state != -1 |
| | | AND o.create_order > 0 |
| | | <if test="reportingWork.reportingWorkId != null and reportingWork.reportingWorkId != ''"> |
| | | and rw.reporting_work_id regexp #{reportingWork.reportingWorkId} |
| | | </if> |
| | |
| | | <if test="reportingWork.teamsGroupsName != null and reportingWork.teamsGroupsName != ''"> |
| | | and rw.teams_groups_name regexp #{reportingWork.teamsGroupsName} |
| | | </if> |
| | | GROUP BY rw.reporting_work_id -- 按 reporting_work_id 进行分组,确保唯一 |
| | | |
| | | ) AS subquery; |
| | | |
| | | </select> |
| | | |
| | |
| | | od.shape, |
| | | fgi.actual_signal_area, |
| | | od.area, |
| | | od.gross_area, |
| | | dd.area as gross_area, |
| | | od.compute_area, |
| | | od.compute_gross_area, |
| | | dd.area as compute_gross_area, |
| | | od.processing_note, |
| | | od.edging_type, |
| | | od.perimeter, |
| | |
| | | <result column="levelTwo" property="levelTwo"/> |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="createTime" property="createTime"/> |
| | | <result column="weights" property="weight"/> |
| | | |
| | | <result column="order_type" property="order.orderType"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | |
| | | <select id="getOrderReport" resultMap="orderMap"> |
| | | SELECT |
| | | *, |
| | | round(a.weight*a.quantity,2) as weights, |
| | | a.create_time as createTime, |
| | | d.type_name as levelOne, |
| | | e.type_name as levelTwo |
| | | from order_detail as a |
| | | from sd.order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | |
| | | <select id="exportOrderReport" > |
| | | SELECT |
| | | *, |
| | | round(a.weight*a.quantity,2) as weights, |
| | | b.processing_note as processingNotes, |
| | | a.create_time as createTime, |
| | | d.type_name as level_one, |
| | | e.type_name as level_two |
| | | from order_detail as a |
| | | from sd.order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(a.create_time)>=#{dates[0]} and date(a.create_time) <= #{dates[1]} and b.order_review>0 |
| | | order by b.order_id desc |
| | | </select> |
| | | |
| | | |
| | |
| | | a.edging_type, |
| | | b.pack_type, |
| | | round(sum(a.perimeter),2) as perimeter, |
| | | round(sum(a.weight),2) as weight, |
| | | round(sum(a.weight*a.quantity),2) as weights, |
| | | a.price, |
| | | sum(a.gross_amount ) as gross_amount, |
| | | b.al_type, |
| | |
| | | a.remarks, |
| | | a.bend_radius, |
| | | a.edging_type, |
| | | a.weight, |
| | | round(sum(a.weight*a.quantity),2) as weights, |
| | | a.perimeter, |
| | | a.other_columns, |
| | | a.warehouse_num, |
| | |
| | | concat(a.width," * " , a.height) as size, |
| | | b.area, |
| | | b.glass_child as glassChild, |
| | | d.product_name as productName |
| | | d.product_name as productName, |
| | | d.building_number as buildingNumber, |
| | | d.remarks as remarks, |
| | | d.processing_note as processingNote |
| | | from pp.optimize_heat_detail as a |
| | | left join sd.order_glass_detail as b |
| | | on b.order_number = a.order_sort |
| | |
| | | and a.technology_number=#{technologyNumber} |
| | | |
| | | </select> |
| | | |
| | | <select id="selectShiftQuantitySv"> |
| | | select CAST(concat(b.order_id,'/',a.order_number,'/',a.technology_number) as char ) as 'order_id', |
| | | c.child_width, |
| | | c.child_height, |
| | | a.completed_quantity, |
| | | a.breakage_quantity |
| | | from pp.reporting_work as b |
| | | left join pp.reporting_work_detail as a |
| | | on a.reporting_work_id = b.reporting_work_id |
| | | left join sd.order_glass_detail as c |
| | | on b.order_id = c.order_id |
| | | and c.order_number = a.order_number |
| | | and c.technology_number = a.technology_number |
| | | where b.reviewed_state >=0 |
| | | and b.creator_id = #{creatorId} |
| | | and UNIX_TIMESTAMP(b.reporting_work_time) BETWEEN UNIX_TIMESTAMP(#{startDate}) and UNIX_TIMESTAMP(#{endDate}) |
| | | order by b.id desc |
| | | </select> |
| | | </mapper> |