廖井涛
2024-04-12 e3cc5fb859a4e3c56c1dfa4d7892b233a30874fa
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

# Conflicts:
# north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
36个文件已修改
1个文件已添加
1093 ■■■■■ 已修改文件
north-glass-erp/.idea/dataSources.local.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/machine/Machine.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/machine/MaintenanceAndRepair.vue 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/machine/SelectMachine.vue 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/Report.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/vite.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/DamageDetails.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/DeviceMaintenance.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderGlassDetail.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/DeviceMaintenanceMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/WorkOrderMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/DeviceMaintenanceService.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/application.yml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/DeviceMaintenance.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml 151 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/application.yml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/DeviceMaintenance.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/FolwCard.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/Report.xml 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/WordOrder.xml 151 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/.idea/dataSources.local.xml
@@ -23,7 +23,6 @@
      <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>
north-glass-erp/northglass-erp/config.js
@@ -1,4 +1,4 @@
export default {
  serverUrl:"localhost:8086"
  serverUrl:"localhost:8080"
  //serverUrl:"res.abeim.cn"
}
north-glass-erp/northglass-erp/src/router/index.js
@@ -548,6 +548,12 @@
              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'
north-glass-erp/northglass-erp/src/views/pp/machine/Machine.vue
@@ -19,7 +19,7 @@
  <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>
north-glass-erp/northglass-erp/src/views/pp/machine/MaintenanceAndRepair.vue
@@ -4,9 +4,9 @@
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()
@@ -15,15 +15,26 @@
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)
@@ -48,6 +59,69 @@
  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()
@@ -147,24 +221,36 @@
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"
        />
        &nbsp;&nbsp;
        <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"
@@ -185,7 +271,7 @@
      <!--左边固定显示的插槽-->
      <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>
@@ -200,7 +286,7 @@
    </vxe-grid>
    <el-dialog v-model="dialogFormVisible" title="保养与维修编辑">
    <el-dialog v-model="dialogTableVisible" title="保养与维修编辑">
      <el-form :model="form">
        <el-row>
@@ -296,9 +382,9 @@
      </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>
@@ -311,4 +397,8 @@
  width: 99%;
  height: 100%;
}
#selectForm {
  width: 40%;
  text-align: center;
}
</style>
north-glass-erp/northglass-erp/src/views/pp/machine/SelectMachine.vue
@@ -1,8 +1,24 @@
<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' :{
@@ -30,8 +46,25 @@
  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,//保持源数据
@@ -50,7 +83,7 @@
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
    // remote: true
  },
  customConfig: {
    storage: true
@@ -62,23 +95,17 @@
  },//表头参数
  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: {
@@ -92,61 +119,10 @@
    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) {
@@ -168,16 +144,7 @@
const dialogFormVisible = ref(false)
const formLabelWidth = '140px'
const form = reactive({
  name: '',
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})
</script>
@@ -185,7 +152,6 @@
  <div class="main-div-customer">
    <vxe-grid
        max-height="100%"
        @filter-change="filterChanged"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
@@ -202,16 +168,11 @@
        </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>
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -538,39 +538,46 @@
      switch (menu.code) {
        case 'copyChecked' :{
          let result = toolbarButtonClickEvent()
          if(result){
            const dataList = xGrid.value.getTableData().visibleData
            const val = dataList[result.start][result.cell]
            dataList.forEach((item,index) =>{
              if(index>=result.start && index<=result.end){
                item[result.cell] = val
              }
            })
          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]
              dataList.forEach((item,index) =>{
                if(index>=result.start && index<=result.end){
                  item[result.cell] = val
                }
              })
            }
          }
          break
        }
        case 'copyAll' :{
          let result = toolbarButtonClickEvent()
          if(result){
            const dataList = xGrid.value.getTableData().visibleData
            const val = dataList[result.start][result.cell]
            dataList.forEach((item,index) =>{
              if(index>=result.start ){
                item[result.cell] = val
              }
            })
          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]
              dataList.forEach((item, index) => {
                if (index >= result.start) {
                  item[result.cell] = val
                }
              })
            }
          }
          break
        }
        case 'clearChecked' :{
          let result = toolbarButtonClickEvent()
          if(result){
            const dataList = xGrid.value.getTableData().visibleData
            dataList.forEach((item,index) =>{
              if(index>=result.start && index<=result.end){
                item[result.cell] = ''
              }
            })
          if (result.cell === "scheduled_start_time" ||result.cell === "plan_end_time") {
            if (result) {
              const dataList = xGrid.value.getTableData().visibleData
              dataList.forEach((item, index) => {
                if (index >= result.start && index <= result.end) {
                  item[result.cell] = ''
                }
              })
            }
          }
          break
        }
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -252,6 +252,7 @@
//子组件接收参数
const xGrid = ref()
const gridOptions = reactive({
  loading: true,
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
@@ -310,7 +311,7 @@
  ],//table body实际数据
  //脚部求和
  footerMethod({columns, data}) {//页脚函数
    let footList = ['quantity', 'computeGrossArea',]
    let footList = ['quantity', 'orderDetail.computeGrossArea',]
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue
New file
@@ -0,0 +1,34 @@
<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>
north-glass-erp/northglass-erp/src/views/pp/report/Report.vue
@@ -57,7 +57,12 @@
          <el-menu-item index="/main/report/TeamOutput">班组产量</el-menu-item>
          <el-menu-item index="/main/report/EquipmentOutput">设备产量</el-menu-item>
        </el-sub-menu>
        <el-menu-item  index="/main/report/DamageReport">次破报表</el-menu-item>
        <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>
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1097,6 +1097,7 @@
          ref="xGrid"
          class="mytable-scrollbar"
          max-height="100%"
          height="400px"
          size="small"
          v-bind="gridOptions"
          v-on="gridEvents"
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
@@ -31,10 +31,6 @@
      })
      break
    }
    case  'setType':{
      alert('我接收到子组件传送的反审状态')
      break
    }
  }
}
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -26,13 +26,17 @@
      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
@@ -103,7 +107,7 @@
let pageNum = $ref(1)
let pageState = null
//获取七天前到当前时间
//获取3天前到当前时间
function getNowTime() {
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3)
      .toISOString()
@@ -117,14 +121,14 @@
}
//第一次加载获取近七天时间和默认状态
//第一次加载获取近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) {
@@ -247,13 +251,11 @@
      , 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: {
north-glass-erp/northglass-erp/src/views/sd/order/OrderReport.vue
@@ -45,7 +45,7 @@
    {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']
})
north-glass-erp/northglass-erp/vite.config.js
@@ -16,7 +16,7 @@
    }
  }, 
  server: {
    port: 5173,//端口号
    port: 80,//端口号
    host: true,//ip地址 或 '0.0.0.0' 或 "loaclhost"
    open: false, //启动后是否自动打开浏览器
    https: false, // 是否开启 https
north-glass-erp/src/main/java/com/example/erp/controller/pp/DeviceMaintenanceController.java
@@ -9,6 +9,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.sql.Date;
import java.util.Map;
@RestController
@@ -47,9 +48,12 @@
    }
    @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));
    }
@@ -64,4 +68,17 @@
        }
    }
    @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));
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -2,7 +2,9 @@
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;
@@ -33,4 +35,14 @@
        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));
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java
@@ -58,12 +58,12 @@
    //删除工单
    @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,"删除失败");
north-glass-erp/src/main/java/com/example/erp/entity/pp/DamageDetails.java
@@ -1,7 +1,11 @@
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;
@@ -45,4 +49,16 @@
    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;
}
north-glass-erp/src/main/java/com/example/erp/entity/pp/DeviceMaintenance.java
@@ -1,5 +1,6 @@
package com.example.erp.entity.pp;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@@ -20,8 +21,6 @@
    //故障日期
    @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;
@@ -43,8 +42,24 @@
    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;
}
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderGlassDetail.java
@@ -7,6 +7,7 @@
import lombok.Data;
import java.time.LocalDate;
import java.util.List;
@Data
@TableName("sd.order_glass_detail")
@@ -37,7 +38,7 @@
    //@TableField(select = false)
//   @ManyToOne(fetch = FetchType.LAZY)
    @TableField(select = false,exist = false)
    private  OrderDetail orderDetail;
    private OrderDetail  orderDetail;
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/DeviceMaintenanceMapper.java
@@ -3,7 +3,7 @@
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;
@@ -25,7 +25,11 @@
                                    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);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportMapper.java
@@ -1,7 +1,9 @@
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;
@@ -14,4 +16,8 @@
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);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/WorkOrderMapper.java
@@ -30,11 +30,13 @@
    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);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/DeviceMaintenanceService.java
@@ -9,6 +9,7 @@
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;
@@ -62,9 +63,9 @@
        }
    }
    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;
    }
@@ -77,4 +78,16 @@
            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;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -5,6 +5,7 @@
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;
@@ -12,6 +13,7 @@
import org.springframework.stereotype.Service;
import java.sql.Date;
import java.time.LocalDate;
import java.util.*;
import java.util.stream.Collectors;
@@ -21,6 +23,8 @@
    private final ReportMapper reportMapper;
    private final OrderProcessDetailMapper orderProcessDetailMapper;
    public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper) {
        this.reportMapper = reportMapper;
@@ -98,4 +102,27 @@
        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;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java
@@ -86,22 +86,30 @@
    }
    //删除生产订单
    public Boolean deleteOrderWorkSv(String orderId, String productName) {
        if (!orderId.isEmpty() && !productName.isEmpty()) {
            //删除订单小片表生产订单号
            workOrderMapper.deleteOrderWorkMp(orderId, productName);
            int state = 0;
            int states = 1;
            //查询该订单未转生产订单的条数
            Integer noWorkCount = workOrderMapper.selectWorkCount(orderId);
            //查询该订单转生产订单的条数
            Integer yesWorkCount = workOrderMapper.selectYesWorkCount(orderId);
            if (noWorkCount.equals(yesWorkCount)) {
                workOrderMapper.updateWorkType(orderId, state);
            } else {
                workOrderMapper.updateWorkType(orderId, states);
    public Boolean deleteOrderWorkSv(String orderId, String productionId) {
        if (!orderId.isEmpty() && !productionId.isEmpty()) {
            //查询该订单是否已经建立流程卡
            Integer getProcessCard = workOrderMapper.selectProcessCard(orderId);
            if (getProcessCard == 0){
                //删除订单小片表生产订单号
                workOrderMapper.deleteOrderWorkMp(orderId, productionId);
                int state = 0;
                int states = 1;
                //查询该订单未转生产订单的条数
                Integer noWorkCount = workOrderMapper.selectWorkCount(orderId);
                //查询该订单转生产订单的条数
                Integer yesWorkCount = workOrderMapper.selectYesWorkCount(orderId);
                if (noWorkCount.equals(yesWorkCount)) {
                    workOrderMapper.updateWorkType(orderId, state);
                } else {
                    workOrderMapper.updateWorkType(orderId, states);
                }
                return true;
            }
            return true;
            else {
                return false;
            }
        } else {
            return false;
        }
north-glass-erp/src/main/resources/application.yml
@@ -1,6 +1,6 @@
server:
  port: 8086
  port: 8080
spring:
@@ -28,4 +28,7 @@
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
          driver-class-name: com.mysql.cj.jdbc.Driver
#mybatis-plus:
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
north-glass-erp/src/main/resources/mapper/pp/DeviceMaintenance.xml
@@ -63,10 +63,29 @@
    </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>
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -174,7 +174,7 @@
        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
@@ -192,7 +192,7 @@
                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>
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -44,12 +44,28 @@
            <result column="total_thickness" property="totalThickness"/>
            <result column="thickness" property="thickness"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </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
@@ -100,4 +116,48 @@
        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) &lt;= #{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) &lt;= #{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>
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -10,56 +10,56 @@
        <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>
        <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
            and o.order_id regexp #{orderGlassDetail.orderId}
        </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
            and o.batch regexp #{orderGlassDetail.order.batch}
        </if>
        <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((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
        </if>
        group by o.order_id
        order by o.id desc
@@ -71,21 +71,25 @@
    <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}
@@ -93,22 +97,21 @@
        <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" >
    <select id="addWordOrder">
        select od.order_id,
        od.product_id,
        od.product_name,
@@ -118,7 +121,7 @@
        from sd.order_detail as od
        left join sd.order as o
        on od.order_id =o.order_id
        where od.order_id = #{orderId}  and  o.production_order!=2
        where od.order_id = #{orderId} and o.production_order!=2
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
@@ -132,13 +135,13 @@
        ;
    </select>
    <select id="selectOrderNumber" >
        select ifnull(count(ogd.production_id),0)
    <select id="selectOrderNumber">
        select ifnull(count(ogd.production_id), 0)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productIdVl}
    </select>
    <update id="addOrderWorkMp" >
    <update id="addOrderWorkMp">
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -147,11 +150,11 @@
            ogd.founder=#{userName}
        where od.order_id = #{orderId}
          and od.product_id =#{productId}
          and od.product_id = #{productId}
          and od.product_name = #{productName}
    </update>
<!--    删除工单-->
    <!--    删除工单-->
    <update id="deleteOrderWorkMp">
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -159,7 +162,6 @@
            ogd.production_time=null,
            ogd.founder=null
        where od.order_id = #{orderId}
          and od.product_name = #{productName}
    </update>
    <select id="selectWorkCount">
@@ -172,10 +174,15 @@
    <select id="selectYesWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where  order_id = #{orderId}
        where order_id = #{orderId}
    </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>
north-glass-erp/target/classes/application.yml
@@ -1,6 +1,6 @@
server:
  port: 8086
  port: 8080
spring:
@@ -28,4 +28,7 @@
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
          driver-class-name: com.mysql.cj.jdbc.Driver
#mybatis-plus:
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
north-glass-erp/target/classes/mapper/pp/DeviceMaintenance.xml
@@ -63,10 +63,29 @@
    </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>
north-glass-erp/target/classes/mapper/pp/FolwCard.xml
@@ -174,7 +174,7 @@
        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
@@ -192,7 +192,7 @@
                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>
north-glass-erp/target/classes/mapper/pp/Report.xml
@@ -44,12 +44,28 @@
            <result column="total_thickness" property="totalThickness"/>
            <result column="thickness" property="thickness"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </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
@@ -100,4 +116,48 @@
        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) &lt;= #{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) &lt;= #{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>
north-glass-erp/target/classes/mapper/pp/WordOrder.xml
@@ -10,56 +10,56 @@
        <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>
        <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
            and o.order_id regexp #{orderGlassDetail.orderId}
        </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
            and o.batch regexp #{orderGlassDetail.order.batch}
        </if>
        <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((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
        </if>
        group by o.order_id
        order by o.id desc
@@ -71,21 +71,25 @@
    <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}
@@ -93,22 +97,21 @@
        <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" >
    <select id="addWordOrder">
        select od.order_id,
        od.product_id,
        od.product_name,
@@ -118,7 +121,7 @@
        from sd.order_detail as od
        left join sd.order as o
        on od.order_id =o.order_id
        where od.order_id = #{orderId}  and  o.production_order!=2
        where od.order_id = #{orderId} and o.production_order!=2
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
@@ -132,13 +135,13 @@
        ;
    </select>
    <select id="selectOrderNumber" >
        select ifnull(count(ogd.production_id),0)
    <select id="selectOrderNumber">
        select ifnull(count(ogd.production_id), 0)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productIdVl}
    </select>
    <update id="addOrderWorkMp" >
    <update id="addOrderWorkMp">
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -147,11 +150,11 @@
            ogd.founder=#{userName}
        where od.order_id = #{orderId}
          and od.product_id =#{productId}
          and od.product_id = #{productId}
          and od.product_name = #{productName}
    </update>
<!--    删除工单-->
    <!--    删除工单-->
    <update id="deleteOrderWorkMp">
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -159,7 +162,6 @@
            ogd.production_time=null,
            ogd.founder=null
        where od.order_id = #{orderId}
          and od.product_name = #{productName}
    </update>
    <select id="selectWorkCount">
@@ -172,10 +174,15 @@
    <select id="selectYesWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where  order_id = #{orderId}
        where order_id = #{orderId}
    </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>