工程修改功能完善,模拟计算流程卡查询明细完善,第一次优化右键添加原片功能
| | |
| | | //接受子组件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 id="computeCard"> |
| | | <compute-card :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> |
| | |
| | | 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({ |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | showStatus: true |
| | | }, |
| | | columns:[ |
| | | {field: 'id',width: 150, title: 'ID',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'projectNumber',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}, |
| | | {field: 'glass_type',width: 150, title: '膜系',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'glass_thickness',width: 150, title: '厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'type',width: 150, title: '类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'state',width: 150, title: '状态',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: 'glass_total_area',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'process_qty',width: 150, title: '流程数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'process_cards',width: 150, title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {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,//表格数据 |
| | |
| | | } |
| | | //刷新工程号 |
| | | processCardRef.value.getProjectId(); |
| | | processCardRef.value.selectFlowCardList(); |
| | | 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); |
| | |
| | | <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> |
| | |
| | | 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: 'seq', title: t('basicData.Number'), width: 80}, |
| | | {field: 'projectNumber', width: 100, title: '工程号', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {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 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> |
| | |
| | | }); |
| | | |
| | | |
| | | |
| | | const selectOptions = [ |
| | | { |
| | | value: '0', |
| | | label: '默认' |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '优先竖排' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '优先横排' |
| | | } |
| | | ] |
| | | |
| | | |
| | | // 定义混排等级 |
| | |
| | | // 定义其他表单数据 |
| | | 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('') // 工程片数 |
| | |
| | | furnaceLength.value=formattedData[0].load_length |
| | | spacingLong.value=formattedData[0].x_space |
| | | spacingWidth.value=formattedData[0].y_space |
| | | heatingTime.value=formattedData[0].tempering_time |
| | | |
| | | } |
| | | } else { |
| | |
| | | <el-button type="primary" style="margin-left: 20px" :icon="SuccessFilled" @click="handleSave">保存</el-button> |
| | | </div> |
| | | </div><br> |
| | | <div class="demo-progress" style="margin-top: 5px"> |
| | | <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 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" |
| | |
| | | :step="1"/> |
| | | <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 |
| | |
| | | |
| | | .input { |
| | | width: 80px; |
| | | margin-left: 20px; |
| | | height: 30px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | const props = defineProps({ |
| | | tableData: Array, |
| | | processId: null, |
| | | technologyNumber: null, |
| | | patchState: null, |
| | | }); |
| | | |
| | | watch(() => props.tableData, async (newData) => { |
| | |
| | | |
| | | // 提取所有唯一的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 requests = newData.map(item => |
| | | request.post(`/glassOptimize/selectComputeDetail/${item.process_id}/${item.technologyNumber}/${item.patchState}`) |
| | | );*/ |
| | | |
| | | /*try { |
| | | const responses = await Promise.all(requests); |
| | | |
| | | // 整合数据 |
| | |
| | | emit('sendData', processData); |
| | | } catch (error) { |
| | | console.error('请求失败:', error); |
| | | } |
| | | }*/ |
| | | } |
| | | } else { |
| | | console.error('传递给表格的数据格式不符合要求,期望是数组格式'); |
| | |
| | | cellClick({row}) { |
| | | rowClickIndex.value = row |
| | | // Emit 事件将更新后的值传递给父组件 |
| | | emit('upProcessId', rowClickIndex.value.process_id); |
| | | emit('upProcessId', rowClickIndex.value.process_id,rowClickIndex.value.patch_state,rowClickIndex.value.technology_number); |
| | | emit('updateTechnologyNumber', rowClickIndex.value.process_id,rowClickIndex.value.patch_state,rowClickIndex.value.technology_number); |
| | | } |
| | | } |
| | | |
| | |
| | | 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: { |
| | |
| | | |
| | | |
| | | 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: 'rightTrim', title: '右修边',}, |
| | | {field: 'upTrim', title: '上修边',}, |
| | | {field: 'available_quantity', 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 }, |
| | | ], |
| | | [] |
| | | ] |
| | | }, |
| | | }, |
| | |
| | | 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; |
| | | } |
| | | // 添加确认提示弹窗,询问用户是否进行当前操作 |
| | |
| | | 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 = {}; |
| | |
| | | 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(() => { |
| | | addListener(xGrid.value,gridOptions) |
| | | if(route.params.projectNo!=null){ |
| | | projectNo=route.params.projectNo |
| | | selectMaterialStore(); |
| | |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | },{ |
| | | field: 'patch_state', |
| | | width: 100, |
| | | title: '补片状态' |
| | | }, |
| | | |
| | | |
| | |
| | | |
| | | //小圆点单选框 |
| | | let radio = ref(1); |
| | | let isButtonDisabledAdd = false; |
| | | let isButtonDisabledUpdate = true; |
| | | let isButtonDisabledAdd = ref(false); |
| | | let isButtonDisabledUpdate = ref(true); |
| | | |
| | | const selectFlowCardList = async () => { |
| | | request.post(`/glassOptimize/getFlowCardList/${optionVal.value}/${radio.value}`).then((res) => { |
| | | if (res.code == 200) { |
| | | getProjectId() |
| | | isButtonDisabledAdd=false |
| | | isButtonDisabledUpdate = true |
| | | 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=true |
| | | isButtonDisabledUpdate=false |
| | | isButtonDisabledAdd.value=true |
| | | isButtonDisabledUpdate.value=false |
| | | xGrid.value.loadData(deepClone(res.data.data)) |
| | | xGrid.value.getTableData().fullData.forEach(item => { |
| | | if(item.occupyState===0){ |
| | |
| | | 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; |
| | |
| | | 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) |
| | | } |
| | |
| | | <!-- <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" id="add" type="primary" :disabled="isButtonDisabledAdd" @click="addProject(1)">创建</el-button> |
| | | <el-button style="margin-left: 20px;" id="update" :disabled="isButtonDisabledUpdate" @click="addProject(2)">修改</el-button> |
| | | <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" |
| | |
| | | size="small" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | :row-class-name="handleRowClassName" |
| | | > |
| | | <template #num2_filter="{ column, $panel }"> |
| | |
| | | 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> |
| | |
| | | @PostMapping("/deleteProject/{projectNumber}") |
| | | public Result deleteProject( |
| | | @PathVariable String projectNumber){ |
| | | return Result.seccess(glassOptimizeService.deleteProject(projectNumber)); |
| | | return Result.seccess(glassOptimizeService.deleteProject(projectNumber,1)); |
| | | } |
| | | |
| | | //模拟计算工程号查询 |
| | |
| | | |
| | | //模拟计算流程卡详情 |
| | | @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("模拟计算") |
| | |
| | | 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 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(); |
| | |
| | | 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 java.util.concurrent.TimeoutException; |
| | | |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @DS("sd") |
| | | public class GlassOptimizeService { |
| | | @Autowired |
| | | GlassOptimizeMapper glassOptimizeMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | | RabbitMQUtil rabbitMQUtil; |
| | | //模拟计算 |
| | |
| | | public Map<String, Object> materialStoreSv(String thickness, String model, String projectNumber) { |
| | | Map<String, Object> stringObjectMap = glassOptimizeMapper.selectProjectCount(projectNumber); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(Integer.parseInt(stringObjectMap.get("state").toString())<=10){ |
| | | if(Integer.parseInt(stringObjectMap.get("state").toString())<10){ |
| | | map.put("data", glassOptimizeMapper.materialStoreMp(thickness,model)); |
| | | map.put("edgeTrimming", glassOptimizeMapper.getEdgeTrimming()); |
| | | }else if(Integer.parseInt(stringObjectMap.get("state").toString())==10){ |
| | | map.put("data", glassOptimizeMapper.materialStoreMp(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 boolean deleteProject(String projectNumber) { |
| | | public boolean deleteProject(String projectNumber,Integer type) { |
| | | Map<String, Object> stringObjectMap = glassOptimizeMapper.selectProjectCount(projectNumber); |
| | | if(stringObjectMap.get("state").equals(10)){ |
| | | glassOptimizeMapper.deleteOptimizeHeatDetail(projectNumber); |
| | |
| | | glassOptimizeMapper.updatePatchLogProjectReturn(patchLog.getProcessId(),patchLog.getTechnologyNumber(),projectNumber); |
| | | } |
| | | } |
| | | |
| | | glassOptimizeMapper.deleteProjectMp(projectNumber); |
| | | //判断是否是修改工程 |
| | | if(type.equals(1)){ |
| | | glassOptimizeMapper.deleteProjectMp(projectNumber); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //模拟计算流程卡详情 |
| | | 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(); |
| | | } |
| | | 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); |
| | | 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(); |
| | | } |
| | | 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(";"); |
| | | 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"; |
| | | |
| | | } |
| | | 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); |
| | | glassOptimizeMapper.addProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea.doubleValue(),userName, |
| | | flowCardList.size(), String.valueOf(processId),type); |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | } 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) { |
| | |
| | | GlassType as glassType, |
| | | patch_state, |
| | | 占用 as occupyState |
| | | FROM pp.v_optimize_porject_modify where |
| | | FROM pp.v_optimize_porject_modify_merg where |
| | | GlassType REGEXP #{type} and GlassType REGEXP #{thickness} |
| | | and (工程号 is null or 工程号 = #{projectNO}) order by 占用 |
| | | 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} |
| | |
| | | |
| | | <!--模拟计算流程卡详情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"> |
| | |
| | | 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,glass_type, glass_thickness, |
| | | glass_total,glass_total_area,type,state,process_qty,process_cards) |