Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
# Conflicts:
# north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
| | |
| | | <database-info product="MySQL" version="8.0.19" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.19" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | | <identifier-quote-string>`</identifier-quote-string> |
| | | <jdbc-catalog-is-schema>true</jdbc-catalog-is-schema> |
| | | </database-info> |
| | | <case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" /> |
| | | <secret-storage>master_key</secret-storage> |
| | |
| | | export default { |
| | | serverUrl:"localhost:8086" |
| | | serverUrl:"localhost:8080" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | name: 'damageReport', |
| | | component: () => import('../views/pp/report/DamageReport.vue'), |
| | | }, |
| | | { |
| | | //跨工序次破报表 |
| | | path: 'crossProcessBreaking', |
| | | name: 'crossProcessBreaking', |
| | | component: () => import('../views/pp/report/crossProcessBreaking.vue'), |
| | | }, |
| | | // { |
| | | // path: '', |
| | | // redirect:'/main/report/ProductionSchedule' |
| | |
| | | <div id="main"> |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/machine/SelectMachine' }">设备管理</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/machine/SelectMachine' }">设备情况</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/machine/AddMachine' }">设备新增</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/machine/MaintenanceAndRepair' }">保养与维修</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/machine/AddMaintenanceAndRepair' }">保养与维修新增</el-breadcrumb-item> |
| | |
| | | import {useRouter} from 'vue-router' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from 'vue-i18n' |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import request from "@/utils/request"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: {id: row.id}}) |
| | | request.post(`/maintenance/openSelectId/${row.id}`).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | getMaintenanceRepair.value = res.data.data[0] |
| | | dialogTableVisible.value=true |
| | | } else { |
| | | |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/maintenance/deleteMaintenance/${row.id}`).then((res) => { |
| | | if (res.code === 200) { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('workOrder.deleteOk')) |
| | | router.push({path: '/main/machine/MaintenanceAndRepair', query: {random:Math.random()}}) |
| | | router.push({path: '/main/machine/MaintenanceAndRepair', query: {startTime:startTime,endTime:endTime,random:Math.random()}}) |
| | | } else { |
| | | |
| | | ElMessage.warning(res.msg) |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //获取3天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()+3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | const form = reactive({ |
| | | date1: '', |
| | | }) |
| | | |
| | | const getMaintenanceRepair = ref({ |
| | | id: '', |
| | | device_id: '', |
| | | type: '', |
| | | device_name: '', |
| | | fault_time: '', |
| | | fault_reason: '', |
| | | maintenance_time: '', |
| | | maintenance_illustrate: '', |
| | | start_time: '', |
| | | stop_time: '', |
| | | process: '', |
| | | personnel: '', |
| | | cost: '', |
| | | }) |
| | | |
| | | //第一次加载获取近3天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | //首次加载 |
| | | request.post(`/maintenance/selectMaintenance/${startTime}/${endTime}`).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/maintenance/selectMaintenance/${startTime}/${endTime}`).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | |
| | | const size = ref<'default' | 'large' | 'small'>('default') |
| | | |
| | | const value1 = ref('') |
| | | const dialogFormVisible = ref(false) |
| | | const dialogTableVisible = ref(false) |
| | | const formLabelWidth = '140px' |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | :default-time="defaultTime" |
| | | |
| | | /> |
| | | |
| | | <el-button |
| | | @click="getWorkOrder()" |
| | | id="select" |
| | | type="primary" :icon="Search">{{$t('basicData.search')}} |
| | | </el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button link size="small" type="primary" @click="dialogFormVisible = true">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'edit');" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">删除</el-button> |
| | | </template> |
| | | |
| | |
| | | |
| | | </vxe-grid> |
| | | |
| | | <el-dialog v-model="dialogFormVisible" title="保养与维修编辑"> |
| | | <el-dialog v-model="dialogTableVisible" title="保养与维修编辑"> |
| | | |
| | | <el-form :model="form"> |
| | | <el-row> |
| | |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="dialogFormVisible = false"> |
| | | 确认 |
| | | <el-button @click="dialogTableVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="updateBasic"> |
| | | 修改 |
| | | </el-button> |
| | | </span> |
| | | </template> |
| | |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | #selectForm { |
| | | width: 40%; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | |
| | | const getBasicData = ref({ |
| | | id: '', |
| | | basic_type: '', |
| | | basic_name: '', |
| | | d_basic_name: '', |
| | | }) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | |
| | | //首次加载 |
| | | request.post(`/maintenance/selectMachine`).then((res) => { |
| | | if (res.code == 200) { |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 140, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '设备编号', width: 120, title: '设备编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '标准名称',width: 120, title: '标准名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '设备名称', width: 130,title: '设备名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '购买时间',width: 120, title: '购买时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '安装时间', width: 100,title: '安装时间', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '使用周期', width: 100,title: '使用周期(年)', sortable: true}, |
| | | {field: '使用状态',width: 100, title: '使用状态', sortable: true}, |
| | | {field: '维修次数',width: 120, title: '维修次数', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '保养次数', width: 120,title: '保养次数', sortable: true}, |
| | | {field: '最后维修时间',width: 120, title: '最后维修时间', sortable: true}, |
| | | {field: '最后保养时间',width: 120, title: '最后保养时间', sortable: true}, |
| | | {field: '维修费用',width: 120, title: '维修费用', sortable: true}, |
| | | {field: '保养费用',width: 120, title: '保养费用', sortable: true}, |
| | | {field: '所在工艺',width: 120, title: '所在工艺', sortable: true}, |
| | | {field: '作废状态',width: 120, title: '作废状态', sortable: true}, |
| | | {field: 'deviceId', width: 120, title: '设备编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged }, |
| | | {field: 'deviceName', width: 130,title: '设备名称' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'type',width: 100, title: '使用状态',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged }, |
| | | {field: 'faultCount',width: 120, title: '维修次数' ,showOverflow:"ellipsis"}, |
| | | {field: 'maintenanceCount', width: 120,title: '保养次数', }, |
| | | {field: 'faultLastTime',width: 120, title: '最后维修时间', }, |
| | | {field: 'maintenanceLastTime',width: 120, title: '最后保养时间', }, |
| | | {field: 'faultCost',width: 120, title: '维修费用', }, |
| | | {field: 'maintenanceCost',width: 120, title: '保养费用', }, |
| | | {field: 'process',width: 120, title: '所在工艺',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged } |
| | | ], |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "设备编号": 'SB2209211', |
| | | '标准名称': '钢化炉(22E)', |
| | | '设备名称': '钢化炉(22E)', |
| | | '购买时间': '2022-03-16', |
| | | '安装时间':'2022-03-16', |
| | | '使用周期':'313', |
| | | '使用状态':'使用中', |
| | | '维修次数':'0', |
| | | '保养次数':'0', |
| | | '最后维修时间':'', |
| | | '最后保养时间':'', |
| | | '维修费用':'', |
| | | '保养费用':'', |
| | | '所在工艺':'钢化', |
| | | '作废状态':'正常', |
| | | }, |
| | | { |
| | | "设备编号": 'SB2209211', |
| | | '标准名称': '钢化炉(22E)', |
| | | '设备名称': '钢化炉(22E)', |
| | | '购买时间': '2022-03-16', |
| | | '安装时间':'2022-03-16', |
| | | '使用周期':'313', |
| | | '使用状态':'使用中', |
| | | '维修次数':'0', |
| | | '保养次数':'0', |
| | | '最后维修时间':'', |
| | | '最后保养时间':'', |
| | | '维修费用':'', |
| | | '保养费用':'', |
| | | '所在工艺':'钢化', |
| | | '作废状态':'正常', |
| | | }, |
| | | { |
| | | "设备编号": 'SB2209211', |
| | | '标准名称': '钢化炉(22E)', |
| | | '设备名称': '钢化炉(22E)', |
| | | '购买时间': '2022-03-16', |
| | | '安装时间':'2022-03-16', |
| | | '使用周期':'313', |
| | | '使用状态':'使用中', |
| | | '维修次数':'0', |
| | | '保养次数':'0', |
| | | '最后维修时间':'', |
| | | '最后保养时间':'', |
| | | '维修费用':'', |
| | | '保养费用':'', |
| | | '所在工艺':'钢化', |
| | | '作废状态':'正常', |
| | | }, |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['维修次数','保养次数','维修费用','保养费用'] |
| | | let footList=['','','',''] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | const dialogFormVisible = ref(false) |
| | | const formLabelWidth = '140px' |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="dialogFormVisible = true" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="text" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | switch (menu.code) { |
| | | case 'copyChecked' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" ||result.cell === "plan_end_time"){ |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | break |
| | | } |
| | | case 'copyAll' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" ||result.cell === "plan_end_time") { |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | break |
| | | } |
| | | case 'clearChecked' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" ||result.cell === "plan_end_time") { |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | dataList.forEach((item,index) =>{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | break |
| | | } |
| | | } |
| | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['quantity', 'computeGrossArea',] |
| | | let footList = ['quantity', 'orderDetail.computeGrossArea',] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
New file |
| | |
| | | <script setup> |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import request from "@/utils/request" |
| | | import { ref} from "vue" |
| | | |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type:'expand',fixed:"left",width: 80}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'reportingWork.reportingWorkTime', width: 120, title: '报工时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'responsibleProcess',width: 120, title: '责任工序', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'responsibleTeam', width: 130,title: '责任班组', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'breakageType', width: 100,title: '次破类型', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'breakageReason', width: 100,title: '次破原因', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'breakageQuantity', width: 100,title: '次破数量', sortable: true}, |
| | | {field: 'area',width: 100, title: '次破面积', sortable: true}, |
| | | {field: 'order.project', width: 120,title: '项目名称', sortable: true}, |
| | | {field: 'order.orderId',width: 120, title: '销售单号', sortable: true}, |
| | | {field: 'orderGlassDetail.glassChild',width: 120, title: '单品名称', sortable: true}, |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/report/crossProcessBreaking', |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount'] |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <basic-table |
| | | :childrenData="childrenData"/> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | </style> |
| | |
| | | <el-menu-item index="/main/report/TeamOutput">班组产量</el-menu-item> |
| | | <el-menu-item index="/main/report/EquipmentOutput">设备产量</el-menu-item> |
| | | </el-sub-menu> |
| | | <el-sub-menu index="3" popper-class="test"> |
| | | <template #title>次破报表</template> |
| | | <el-menu-item index="/main/report/DamageReport">次破报表</el-menu-item> |
| | | <el-menu-item index="/main/report/CrossProcessBreaking">跨工序次破</el-menu-item> |
| | | </el-sub-menu> |
| | | |
| | | <el-menu-item index="/main/report/SplittingDetailsOutside">分架明细</el-menu-item> |
| | | <el-menu-item index="/main/report/TaskCompletionStatus">任务完成情况</el-menu-item> |
| | | <el-menu-item index="/main/report/RawMaterialRequisition">原片领料</el-menu-item> |
| | |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | height="400px" |
| | | size="small" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | |
| | | }) |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.orderDetail.productName}`).then((res) => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let state = optionVal.value |
| | | console.log(startTime, endTime, state) |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.productionId}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('workOrder.deleteOk')) |
| | | location.reload(); |
| | | //location.reload(); |
| | | router.push({path: '/main/workOrder/SelectWorkOrder', query: {startTime:startTime,endTime:endTime,state:state,random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | //获取3天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | .toISOString() |
| | |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | //第一次加载获取近3天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let state = optionVal.value |
| | | |
| | | //第一次加载数据 |
| | | |
| | | console.log('第一次加载数据:',state,startTime,endTime) |
| | | request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${state}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | |
| | | , width: 130 |
| | | }, |
| | | {field: 'order.batch', title: t('order.batch'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | {field: 'orderDetail.productName', title: t('order.product'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210}, |
| | | {field: 'orderDetail.computeArea', title: t('order.computeArea'), showOverflow: "ellipsis", width: 110}, |
| | | {field: 'orderDetail.quantity', title: t('order.quantity'), width: 70}, |
| | | {field: 'orderDetail.computeGrossArea', title: t('order.trueGrossArea'),}, |
| | | {field: 'orderDetail.perimeter', title: t('workOrder.perimeter'), showOverflow: "ellipsis"}, |
| | | {field: 'orderDetail.bendRadius', title: t('order.bendRadius'),}, |
| | | {field: 'orderDetail.processingNote', title: t('order.processingNote'),} |
| | | {field: 'order.project', title: '项目名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210}, |
| | | {field: 'order.orderType', title: '订单类型', showOverflow: "ellipsis", width: 110}, |
| | | {field: 'orderDetail.grossArea', title: '面积', width: 70}, |
| | | {field: 'orderDetail.quantity', title: '数量',}, |
| | | {field: 'order.creator', title: '创建人',}, |
| | | ],//表头按钮 |
| | | data: null,//表格数据 |
| | | toolbarConfig: { |
| | |
| | | {field: 'order.customerBatch',width:120, title: '客户批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/order/getOrderReport/1', |
| | | url :'/order/getOrderReport', |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount'] |
| | | }) |
| | | |
| | |
| | | } |
| | | }, |
| | | server: { |
| | | port: 5173,//端口号 |
| | | port: 80,//端口号 |
| | | host: true,//ip地址 或 '0.0.0.0' 或 "loaclhost" |
| | | open: false, //启动后是否自动打开浏览器 |
| | | https: false, // 是否开启 https |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | } |
| | | |
| | | @ApiOperation("查询维修保养数据接口") |
| | | @PostMapping ("/selectMaintenance") |
| | | public Result selectMaintenance() { |
| | | return Result.seccess(deviceMaintenanceService.selectMaintenanceSv()); |
| | | @PostMapping ("/selectMaintenance/{selectTime1}/{selectTime2}") |
| | | public Result selectMaintenance( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2 |
| | | ) { |
| | | return Result.seccess(deviceMaintenanceService.selectMaintenanceSv(selectTime1,selectTime2)); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("查询设备管理接口") |
| | | @PostMapping ("/selectMachine") |
| | | public Result selectMachine() { |
| | | return Result.seccess(deviceMaintenanceService.selectMachineSv()); |
| | | } |
| | | |
| | | @ApiOperation("根据Id查询对应数据接口") |
| | | @PostMapping ("/openSelectId/{id}") |
| | | public Result openSelectId( |
| | | @PathVariable String id){ |
| | | return Result.seccess(deviceMaintenanceService.openSelectIdSv(id)); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.ReportService; |
| | |
| | | return Result.seccess(reportService.processCardProgressSv(orderId,columns)); |
| | | } |
| | | |
| | | @ApiOperation("跨工序次破") |
| | | @PostMapping("/crossProcessBreaking/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getOrderReport(@PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @RequestBody DamageDetails damageDetails) { |
| | | return Result.seccess(reportService.crossProcessBreakingSv(pageNum,pageSize,selectDate,damageDetails)); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | //删除工单 |
| | | @ApiOperation("删除工单接口") |
| | | @PostMapping("/deleteOrderWork/{orderId}/{productName}") |
| | | @PostMapping("/deleteOrderWork/{orderId}/{productionId}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productName |
| | | @PathVariable String productionId |
| | | ){ |
| | | if(workOrderService.deleteOrderWorkSv(orderId,productName)){ |
| | | if(workOrderService.deleteOrderWorkSv(orderId,productionId)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.Product; |
| | | import lombok.Data; |
| | | |
| | | |
| | |
| | | private Integer qualityInsStatus; |
| | | //数量 |
| | | private Integer quantity; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String area; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private ReportingWork reportingWork; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private Order order; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private OrderGlassDetail orderGlassDetail; |
| | | } |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | |
| | | //故障日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime faultTime; |
| | | //故障原因 |
| | | private String faultReason; |
| | | //保养日期 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime maintenanceTime; |
| | |
| | | private LocalDateTime createTime; |
| | | //修改时间 |
| | | private LocalDateTime updateTime; |
| | | //故障原因 |
| | | private String faultReason; |
| | | |
| | | //外键设备表 |
| | | private Device device; |
| | | |
| | | @TableField(select = false,exist= false) |
| | | private String faultCount; |
| | | @TableField(select = false,exist= false) |
| | | private String maintenanceCount; |
| | | @TableField(select = false,exist= false) |
| | | private String faultLastTime; |
| | | @TableField(select = false,exist= false) |
| | | private String maintenanceLastTime; |
| | | @TableField(select = false,exist= false) |
| | | private String faultCost; |
| | | @TableField(select = false,exist= false) |
| | | private String maintenanceCost; |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @TableName("sd.order_glass_detail") |
| | |
| | | import com.example.erp.entity.pp.DeviceMaintenance; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.sql.Date; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | String faultReason, LocalDateTime maintenanceTime, String maintenanceIllustrate, |
| | | LocalDateTime stopTime, LocalDateTime startTime,String process, String personnel, String cost); |
| | | |
| | | List<DeviceMaintenance> selectMaintenanceMp(); |
| | | List<DeviceMaintenance> selectMaintenanceMp(Date selectTime1, Date selectTime2); |
| | | |
| | | Boolean deleteMaintenanceMp(String id); |
| | | |
| | | List<DeviceMaintenance> selectMachineMp(); |
| | | |
| | | List<Map<String,String>> openSelectIdMp(String id); |
| | | } |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | public interface ReportMapper { |
| | | |
| | | List<Map<String, String>> processCardProgressMp(String orderId); |
| | | |
| | | List<DamageDetails> getProcessBreaking(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | |
| | | Map<String,Integer> getProcessBreakingTotal(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | } |
| | |
| | | Integer selectOrderNumber(String productIdVl); |
| | | |
| | | //删除工单,将对应产品生产订单号改为null |
| | | Boolean deleteOrderWorkMp(String orderId, String productName); |
| | | Boolean deleteOrderWorkMp(String orderId, String productionId); |
| | | |
| | | Integer selectWorkCount(String orderId); |
| | | |
| | | Boolean updateWorkType(String orderId, Integer state); |
| | | |
| | | Integer selectYesWorkCount(String orderId); |
| | | |
| | | Integer selectProcessCard(String orderId); |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> selectMaintenanceSv() { |
| | | public Map<String, Object> selectMaintenanceSv(Date selectTime1, Date selectTime2) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", deviceMaintenanceMapper.selectMaintenanceMp()); |
| | | map.put("data", deviceMaintenanceMapper.selectMaintenanceMp(selectTime1,selectTime2)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> selectMachineSv() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", deviceMaintenanceMapper.selectMachineMp()); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> openSelectIdSv(String id) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", deviceMaintenanceMapper.openSelectIdMp(id)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.mapper.pp.ReportMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private final ReportMapper reportMapper; |
| | | |
| | | private final OrderProcessDetailMapper orderProcessDetailMapper; |
| | | |
| | | |
| | | |
| | | public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper) { |
| | | this.reportMapper = reportMapper; |
| | |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String,Object> crossProcessBreakingSv(Integer pageNum, Integer pageSize, List<String> selectDate, DamageDetails damageDetails) { |
| | | 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",reportMapper.getProcessBreaking(offset, pageSize, startDate, endDate, damageDetails)); |
| | | map.put("total",reportMapper.getProcessBreakingTotal(offset, pageSize, startDate, endDate, damageDetails)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | // map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | //删除生产订单 |
| | | public Boolean deleteOrderWorkSv(String orderId, String productName) { |
| | | if (!orderId.isEmpty() && !productName.isEmpty()) { |
| | | public Boolean deleteOrderWorkSv(String orderId, String productionId) { |
| | | if (!orderId.isEmpty() && !productionId.isEmpty()) { |
| | | //查询该订单是否已经建立流程卡 |
| | | Integer getProcessCard = workOrderMapper.selectProcessCard(orderId); |
| | | if (getProcessCard == 0){ |
| | | //删除订单小片表生产订单号 |
| | | workOrderMapper.deleteOrderWorkMp(orderId, productName); |
| | | workOrderMapper.deleteOrderWorkMp(orderId, productionId); |
| | | int state = 0; |
| | | int states = 1; |
| | | //查询该订单未转生产订单的条数 |
| | |
| | | workOrderMapper.updateWorkType(orderId, states); |
| | | } |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | } |
| | | |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | |
| | | server: |
| | | port: 8086 |
| | | port: 8080 |
| | | |
| | | |
| | | spring: |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | #mybatis-plus: |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | |
| | | </insert> |
| | | |
| | | <select id="selectMaintenanceMp" resultMap="DeviceMaintenanceMapper"> |
| | | select * from device_maintenance |
| | | select * from device_maintenance where DATE_FORMAT((create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </select> |
| | | |
| | | <delete id="deleteMaintenanceMp"> |
| | | delete from device_maintenance where id = #{id} |
| | | </delete> |
| | | |
| | | <select id="selectMachineMp"> |
| | | select dm.device_id,dm.device_name, |
| | | if(dm.type=1,'维修','保养') as type, |
| | | (select count(*) from device_maintenance where id = dm.id and type = 1) as faultCount, |
| | | (select count(*) from device_maintenance where id = dm.id and type = 2) as maintenanceCount, |
| | | (select date(fault_time) from device_maintenance where id = dm.id and type = 1 order by fault_time desc limit 1) as faultLastTime, |
| | | (select date(maintenance_time) from device_maintenance where id = dm.id and type = 2 order by maintenance_time desc limit 1) as maintenanceLastTime, |
| | | (select sum(cost) from device_maintenance where id = dm.id and dm.type=1) as faultCost, |
| | | (select sum(cost) from device_maintenance where id = dm.id and dm.type=2) as maintenanceCost, |
| | | dm.process |
| | | from device_maintenance as dm |
| | | group by dm.device_id |
| | | |
| | | </select> |
| | | |
| | | <select id="openSelectIdMp"> |
| | | select * from device_maintenance where id = #{id} |
| | | </select> |
| | | </mapper> |
| | |
| | | od.product_name, |
| | | SUM( od.quantity) as quantity, |
| | | SUM(od.compute_gross_area) as compute_gross_area, |
| | | od.perimeter |
| | | sum(od.perimeter) as perimeter |
| | | from sd.order_detail as od left join |
| | | (select order_id,order_number,production_id,splitting_status from sd.order_glass_detail |
| | | GROUP BY order_id,order_number |
| | |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number |
| | | set ogd.splitting_status=0 |
| | | where ogd.order_id = #{orderId} |
| | | and fc.process_id = #{processId} |
| | | and ogd.production_id = left(#{processId},11) |
| | | |
| | | </update> |
| | | |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="damageDetailsTableMap" type="com.example.erp.entity.pp.DamageDetails"> |
| | | <result column="responsible_process" property="responsibleProcess"/> |
| | | <result column="responsible_team" property="responsibleTeam"/> |
| | | <result column="breakage_type" property="breakageType"/> |
| | | <result column="breakage_reason" property="breakageReason"/> |
| | | <result column="breakage_quantity" property="breakageQuantity"/> |
| | | <result column="area" property="area"/> |
| | | <result column="reporting_work_id" property="reportingWork.reportingWorkId"/> |
| | | <result column="reporting_work_time" property="reportingWork.reportingWorkTime"/> |
| | | <result column="this_process" property="reportingWork.thisProcess"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="glass_child" property="orderGlassDetail.glassChild"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | where a.order_id = #{orderId} |
| | | |
| | | </select> |
| | | |
| | | <select id="getProcessBreaking" resultMap="damageDetailsTableMap"> |
| | | select rw.reporting_work_id,rw.reporting_work_time,dd.responsible_process,dd.responsible_team, |
| | | dd.breakage_type,dd.breakage_reason,ROUND((dd.breakage_quantity)) as breakage_quantity, |
| | | round(ogd.child_width*ogd.child_height*(dd.breakage_quantity)/1000000,2) as area,rw.this_process, |
| | | o.project,o.order_id,ogd.glass_child |
| | | from |
| | | damage_details as dd |
| | | left join reporting_work as rw |
| | | on rw.reporting_work_id=dd.reporting_work_id |
| | | left join sd.order as o |
| | | on rw.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id=o.order_id and ogd.order_number=dd.order_number |
| | | and ogd.technology_number and dd.technology_number |
| | | where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) <= #{endDate} |
| | | and rw.this_worn_quantity>0 and dd.available=0 |
| | | and reviewed_state!=2 |
| | | and rw.this_process!=dd.responsible_process |
| | | GROUP BY dd.id |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <select id="getProcessBreakingTotal"> |
| | | select |
| | | CEILING(count(dd.id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct dd.id) as 'total' |
| | | from |
| | | damage_details as dd |
| | | left join reporting_work as rw |
| | | on rw.reporting_work_id=dd.reporting_work_id |
| | | left join sd.order as o |
| | | on rw.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id=o.order_id and ogd.order_number=dd.order_number |
| | | and ogd.technology_number and dd.technology_number |
| | | where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) <= #{endDate} |
| | | and rw.this_worn_quantity>0 and dd.available=0 |
| | | and reviewed_state!=2 |
| | | and rw.this_process!=dd.responsible_process |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="splitting_status" property="splittingStatus"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_area" property="computeArea"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | </association> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="order_type" property="order.orderType"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="area" property="order.area"/> |
| | | <result column="creator" property="order.creator"/> |
| | | <!-- <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">--> |
| | | <!-- <result column="product_id" property="productId"/>--> |
| | | <!-- <result column="product_name" property="productName"/>--> |
| | | <!-- <result column="compute_area" property="computeArea"/>--> |
| | | <result column="quantity" property="orderDetail.quantity"/> |
| | | <!-- <result column="compute_gross_area" property="computeGrossArea"/>--> |
| | | <!-- <result column="perimeter" property="perimeter"/>--> |
| | | <!-- <result column="bend_radius" property="bendRadius"/>--> |
| | | <!-- <result column="processing_note" property="processingNote"/>--> |
| | | <result column="gross_area" property="orderDetail.grossArea"/> |
| | | <!-- </association>--> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectWordOrder" resultMap="wordOrderMap"> |
| | | select |
| | | o.order_id, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | o.project, |
| | | o.order_type, |
| | | o.area as gross_area, |
| | | o.quantity as quantity, |
| | | o.creator |
| | | from sd.order_detail as od |
| | | left join `order` as o |
| | | on o.order_id=od.order_id |
| | | where o.production_order!=2 and o.order_review=2 |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | where isnull(ogd.production_id) and o.order_review=2 and o.production_order!=2 |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and o.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | <if test="orderGlassDetail.order.project != null and orderGlassDetail.order.project!= ''"> |
| | | and o.project regexp #{orderGlassDetail.order.project} |
| | | </if> |
| | | <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''"> |
| | | and o.order_type regexp #{orderGlassDetail.order.orderType} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by o.order_id |
| | |
| | | <select id="selectWordOrderNo" resultMap="wordOrderMap"> |
| | | select |
| | | o.order_id, |
| | | od.order_number, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | o.project, |
| | | o.order_type, |
| | | (od.gross_area) as gross_area, |
| | | (od.quantity) as quantity, |
| | | o.creator, |
| | | od.id |
| | | from sd.order_glass_detail as ogd |
| | | left join order_detail as od |
| | | on od.order_id=ogd.order_id |
| | | and ogd.order_number=od.order_number |
| | | left join `order` as o |
| | | on o.order_id=ogd.order_id |
| | | where ogd.production_id IS NOT NULL |
| | | |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and ogd.order_id regexp #{orderGlassDetail.orderId} |
| | | and o.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | <if test="orderGlassDetail.order.project != null and orderGlassDetail.order.project!= ''"> |
| | | and o.project regexp #{orderGlassDetail.order.project} |
| | | </if> |
| | | <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''"> |
| | | and o.order_type regexp #{orderGlassDetail.order.orderType} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by ogd.production_id,ogd.order_number |
| | | order by ogd.id desc |
| | | |
| | | |
| | | ; |
| | | group by od.id,ogd.order_id,od.order_number |
| | | order by od.id desc |
| | | </select> |
| | | |
| | | <select id="addWordOrder" > |
| | |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where od.order_id = #{orderId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="selectWorkCount"> |
| | |
| | | </select> |
| | | |
| | | <update id="updateWorkType"> |
| | | update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId} |
| | | update sd.order as o |
| | | set o.production_order=#{state} |
| | | where o.order_id = #{orderId} |
| | | </update> |
| | | <select id="selectProcessCard"> |
| | | select processing_card from sd.`order` where order_id = #{orderId} |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | server: |
| | | port: 8086 |
| | | port: 8080 |
| | | |
| | | |
| | | spring: |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | #mybatis-plus: |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | |
| | | </insert> |
| | | |
| | | <select id="selectMaintenanceMp" resultMap="DeviceMaintenanceMapper"> |
| | | select * from device_maintenance |
| | | select * from device_maintenance where DATE_FORMAT((create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </select> |
| | | |
| | | <delete id="deleteMaintenanceMp"> |
| | | delete from device_maintenance where id = #{id} |
| | | </delete> |
| | | |
| | | <select id="selectMachineMp"> |
| | | select dm.device_id,dm.device_name, |
| | | if(dm.type=1,'维修','保养') as type, |
| | | (select count(*) from device_maintenance where id = dm.id and type = 1) as faultCount, |
| | | (select count(*) from device_maintenance where id = dm.id and type = 2) as maintenanceCount, |
| | | (select date(fault_time) from device_maintenance where id = dm.id and type = 1 order by fault_time desc limit 1) as faultLastTime, |
| | | (select date(maintenance_time) from device_maintenance where id = dm.id and type = 2 order by maintenance_time desc limit 1) as maintenanceLastTime, |
| | | (select sum(cost) from device_maintenance where id = dm.id and dm.type=1) as faultCost, |
| | | (select sum(cost) from device_maintenance where id = dm.id and dm.type=2) as maintenanceCost, |
| | | dm.process |
| | | from device_maintenance as dm |
| | | group by dm.device_id |
| | | |
| | | </select> |
| | | |
| | | <select id="openSelectIdMp"> |
| | | select * from device_maintenance where id = #{id} |
| | | </select> |
| | | </mapper> |
| | |
| | | od.product_name, |
| | | SUM( od.quantity) as quantity, |
| | | SUM(od.compute_gross_area) as compute_gross_area, |
| | | od.perimeter |
| | | sum(od.perimeter) as perimeter |
| | | from sd.order_detail as od left join |
| | | (select order_id,order_number,production_id,splitting_status from sd.order_glass_detail |
| | | GROUP BY order_id,order_number |
| | |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number |
| | | set ogd.splitting_status=0 |
| | | where ogd.order_id = #{orderId} |
| | | and fc.process_id = #{processId} |
| | | and ogd.production_id = left(#{processId},11) |
| | | |
| | | </update> |
| | | |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="damageDetailsTableMap" type="com.example.erp.entity.pp.DamageDetails"> |
| | | <result column="responsible_process" property="responsibleProcess"/> |
| | | <result column="responsible_team" property="responsibleTeam"/> |
| | | <result column="breakage_type" property="breakageType"/> |
| | | <result column="breakage_reason" property="breakageReason"/> |
| | | <result column="breakage_quantity" property="breakageQuantity"/> |
| | | <result column="area" property="area"/> |
| | | <result column="reporting_work_id" property="reportingWork.reportingWorkId"/> |
| | | <result column="reporting_work_time" property="reportingWork.reportingWorkTime"/> |
| | | <result column="this_process" property="reportingWork.thisProcess"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="glass_child" property="orderGlassDetail.glassChild"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | where a.order_id = #{orderId} |
| | | |
| | | </select> |
| | | |
| | | <select id="getProcessBreaking" resultMap="damageDetailsTableMap"> |
| | | select rw.reporting_work_id,rw.reporting_work_time,dd.responsible_process,dd.responsible_team, |
| | | dd.breakage_type,dd.breakage_reason,ROUND((dd.breakage_quantity)) as breakage_quantity, |
| | | round(ogd.child_width*ogd.child_height*(dd.breakage_quantity)/1000000,2) as area,rw.this_process, |
| | | o.project,o.order_id,ogd.glass_child |
| | | from |
| | | damage_details as dd |
| | | left join reporting_work as rw |
| | | on rw.reporting_work_id=dd.reporting_work_id |
| | | left join sd.order as o |
| | | on rw.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id=o.order_id and ogd.order_number=dd.order_number |
| | | and ogd.technology_number and dd.technology_number |
| | | where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) <= #{endDate} |
| | | and rw.this_worn_quantity>0 and dd.available=0 |
| | | and reviewed_state!=2 |
| | | and rw.this_process!=dd.responsible_process |
| | | GROUP BY dd.id |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <select id="getProcessBreakingTotal"> |
| | | select |
| | | CEILING(count(dd.id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct dd.id) as 'total' |
| | | from |
| | | damage_details as dd |
| | | left join reporting_work as rw |
| | | on rw.reporting_work_id=dd.reporting_work_id |
| | | left join sd.order as o |
| | | on rw.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id=o.order_id and ogd.order_number=dd.order_number |
| | | and ogd.technology_number and dd.technology_number |
| | | where date(rw.reporting_work_time)>=#{startDate} and date(rw.reporting_work_time) <= #{endDate} |
| | | and rw.this_worn_quantity>0 and dd.available=0 |
| | | and reviewed_state!=2 |
| | | and rw.this_process!=dd.responsible_process |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="splitting_status" property="splittingStatus"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_area" property="computeArea"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | </association> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="order_type" property="order.orderType"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="area" property="order.area"/> |
| | | <result column="creator" property="order.creator"/> |
| | | <!-- <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">--> |
| | | <!-- <result column="product_id" property="productId"/>--> |
| | | <!-- <result column="product_name" property="productName"/>--> |
| | | <!-- <result column="compute_area" property="computeArea"/>--> |
| | | <result column="quantity" property="orderDetail.quantity"/> |
| | | <!-- <result column="compute_gross_area" property="computeGrossArea"/>--> |
| | | <!-- <result column="perimeter" property="perimeter"/>--> |
| | | <!-- <result column="bend_radius" property="bendRadius"/>--> |
| | | <!-- <result column="processing_note" property="processingNote"/>--> |
| | | <result column="gross_area" property="orderDetail.grossArea"/> |
| | | <!-- </association>--> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectWordOrder" resultMap="wordOrderMap"> |
| | | select |
| | | o.order_id, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | o.project, |
| | | o.order_type, |
| | | o.area as gross_area, |
| | | o.quantity as quantity, |
| | | o.creator |
| | | from sd.order_detail as od |
| | | left join `order` as o |
| | | on o.order_id=od.order_id |
| | | where o.production_order!=2 and o.order_review=2 |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | where isnull(ogd.production_id) and o.order_review=2 and o.production_order!=2 |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and o.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | <if test="orderGlassDetail.order.project != null and orderGlassDetail.order.project!= ''"> |
| | | and o.project regexp #{orderGlassDetail.order.project} |
| | | </if> |
| | | <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''"> |
| | | and o.order_type regexp #{orderGlassDetail.order.orderType} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by o.order_id |
| | |
| | | <select id="selectWordOrderNo" resultMap="wordOrderMap"> |
| | | select |
| | | o.order_id, |
| | | od.order_number, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | o.project, |
| | | o.order_type, |
| | | (od.gross_area) as gross_area, |
| | | (od.quantity) as quantity, |
| | | o.creator, |
| | | od.id |
| | | from sd.order_glass_detail as ogd |
| | | left join order_detail as od |
| | | on od.order_id=ogd.order_id |
| | | and ogd.order_number=od.order_number |
| | | left join `order` as o |
| | | on o.order_id=ogd.order_id |
| | | where ogd.production_id IS NOT NULL |
| | | |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and ogd.order_id regexp #{orderGlassDetail.orderId} |
| | | and o.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | <if test="orderGlassDetail.order.project != null and orderGlassDetail.order.project!= ''"> |
| | | and o.project regexp #{orderGlassDetail.order.project} |
| | | </if> |
| | | <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''"> |
| | | and o.order_type regexp #{orderGlassDetail.order.orderType} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by ogd.production_id,ogd.order_number |
| | | order by ogd.id desc |
| | | |
| | | |
| | | ; |
| | | group by od.id,ogd.order_id,od.order_number |
| | | order by od.id desc |
| | | </select> |
| | | |
| | | <select id="addWordOrder" > |
| | |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where od.order_id = #{orderId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="selectWorkCount"> |
| | |
| | | </select> |
| | | |
| | | <update id="updateWorkType"> |
| | | update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId} |
| | | update sd.order as o |
| | | set o.production_order=#{state} |
| | | where o.order_id = #{orderId} |
| | | </update> |
| | | <select id="selectProcessCard"> |
| | | select processing_card from sd.`order` where order_id = #{orderId} |
| | | </select> |
| | | </mapper> |