廖井涛
2024-02-23 b0edff4c02128b722a9a6674b016536d4395872d
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
18个文件已修改
1508 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue 566 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/WorkOrderMapper.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/FolwCard.xml 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/WordOrder.xml 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -1,89 +1,401 @@
<script setup>
import {ArrowLeftBold} from "@element-plus/icons-vue";
import {useRouter} from "vue-router";
const router = useRouter()
let flag = $ref(true)
function intoCreateProduct(){
  if(flag){
    router.push('/main/processCard/SplittingDetails')
  }else {
    router.push('/main/processCard/SplittingDetails')
import request from "@/utils/request"
import deepClone from "@/utils/deepClone"
import {ElDatePicker, ElMessage} from "element-plus"
import useProductGlassTypeStore from "@/stores/sd/product/productGlassType"
import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
import {Search} from "@element-plus/icons-vue"
import GlassType from "@/components/sd/product/GlassType.vue"
import {useRouter} from 'vue-router'
import Sortable from 'sortablejs'
import BasicTable from '@/components/basic/BasicTable.vue'
import {VXETable} from "vxe-table";
let productGlassTypeStore = useProductGlassTypeStore()
let router = useRouter()
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}})
      break
    }
    case 'setType': {
      alert('我接收到子组件传送的删除信息')
      break
    }
    case 'delete': {
      request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => {
        if (res.code == 200) {
          ElMessage.success("删除成功")
          location.reload();
        } else {
          ElMessage.warning(res.msg)
          router.push("/login")
        }
      })
      break
    }
  }
  flag=!flag
}
const tableData = [
  {
    processCard: 'NG231201A01',
    orderSequence: '1',
    landingSequence: '1',
    floorNumber: '14-BSGB05',
    shape: '普形',
    longSide: '5000',
    shortSide: '4400',
    total: '24',
    totalThickness: '26',
//定义时间
const form = reactive({
  date1: '',
})
//表尾求和
const sumNum = (list, field) => {
  let count = 0
  list.forEach(item => {
    count += Number(item[field])
  })
  return count.toFixed(2)
}
//定义滚动条高度
let scrollTop = ref(null)
let scrollHeight = ref(null)
let clientHeight = ref(null)
const scrollEvnt = (row) => {
  // 内容高度
  scrollTop.value = row.$event.target.scrollTop
  scrollHeight.value = row.$event.target.scrollHeight
  clientHeight.value = row.$event.target.clientHeight
}
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
  product: {
    thickness: '',
    totalThickness:''
  },
  {
    processCard: 'NG231201A01',
    orderSequence: '2',
    landingSequence: '2',
    floorNumber: '15-BSGB05',
    shape: '普形',
    longSide: '5000',
    shortSide: '4400',
    total: '24',
    totalThickness: '26',
  orderDetail: {
    orderNumber: '',
    height: '',
    computeGrossArea: '',
    quantity: '',
    shape:'',
    width:'',
    weight:''
  }
})
//定义页面总页数
let pageTotal = ref('')
//定义数据返回结果
let produceList = ref([])
//定义当前页数
let pageNum = $ref(1)
let pageState = null
const {currentRoute} = useRouter()
const route = currentRoute.value
let orderId = route.query.orderId
let productionId = route.query.productionId
//第一次加载数据
request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => {
  if (res.code == 200) {
    //console.log(res.data)
    pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    xGrid.value.reloadData(produceList)
    gridOptions.loading = false
  } else {
    ElMessage.warning(res.msg)
  }
})
/*使用筛选,后端获取数据*/
const changeFilterEvent = (event, option, $panel,) => {
  // 手动触发筛选
  $panel.changeOption(event, !!option.data, option)
}
function padLeftZero(str) {
  return ('00' + str).substr(str.length)
}
function filterChanged(column) {
  gridOptions.loading = true
  //筛选条件发生变化条件发生变化
  let value = column.datas[0] != undefined ? column.datas[0] : ''
  value = value.trim()
  //判断是否存在外键
  if (column.property.indexOf('.') > -1) {
    const columnArr = column.property.split('.')
    filterData.value[columnArr[0]] = {
      [columnArr[1]]: value
    }
  } else {
    filterData.value[column.property] = value
  }
  request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => {
    if(res.code==200){
      pageTotal.value=res.data.total
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
    }
  })
}
/*后端返回结果多层嵌套展示*/
const hasDecimal = (value) => {
  const regex = /\./; // 定义正则表达式,查找小数点
  return regex.test(value); // 返回true/false
}
//右侧子组件接收参数
const xGrid = ref()
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  {
    processCard: 'NG231201A02',
    orderSequence: '3',
    landingSequence: '3',
    floorNumber: '16-BSGB05',
    shape: '普形',
    longSide: '5000',
    shortSide: '4400',
    total: '24',
    totalThickness: '26',
  filterConfig: {   //筛选配置项
    remote: true
  },
]
const tableData2 = [
  {
    orderSequence: '4',
    floorNumber: '17-BSGB08',
    shape: '普形',
    longSide: '4600',
    shortSide: '3880',
    undividedQuantity: '15',
    undividedArea: '99.84',
    totalThickness:'28',
    glassThickness:'24',
    undividedWeight:'111'
  customConfig: {
    storage: true
  },
  {
    orderSequence: '5',
    floorNumber: '18-BSGB08',
    shape: '普形',
    longSide: '4600',
    shortSide: '3880',
    undividedQuantity: '15',
    undividedArea: '99.84',
    totalThickness:'28',
    glassThickness:'24',
    undividedWeight:'111'
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
  columns:[
    {type: 'checkbox', fixed: "left", title: '选择'},
    {field: 'orderNumber', title: '订序',filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
    {field: 'shape',  title: '形状', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'width', title: '宽', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'height', title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'baiscQuantity', title: '数量', showOverflow:"ellipsis"},
    {field: 'computeGrossArea', title: '面积'},
    {field: 'totalThickness', title: '总厚度'},
    {field: 'thickness', title: '玻璃厚度'},
    {field: 'weight', title: '重量'}
  ],//表头按钮
  toolbarConfig: {
    // buttons: [{
    //
    // }],
    // import: false,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
  {
    orderSequence: '6',
    floorNumber: '19-BSGB08',
    shape: '普形',
    longSide: '4600',
    shortSide: '3880',
    undividedQuantity: '15',
    undividedArea: '99.84',
    totalThickness:'28',
    glassThickness:'24',
    undividedWeight:'111'
  data:  [
  ],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['总数量','总面积','分箱数']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
  }
})
//左侧子组件接收参数
const xGridLeft = ref()
const gridLeftOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
]
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
  columns:[
    {type: 'checkbox', fixed: "left", title: '选择'},
    {field: 'processId', title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },width:130 },
    {field: 'orderNumber',  title: '订序', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'landingSequence', title: '落架顺序', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'shape', title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'width', title: '宽', showOverflow:"ellipsis"},
    {field: 'height', title: '高'},
    {field: 'quantity', title: '总数量'},
    {field: 'totalThickness', title: '总厚度'},
  ],//表头按钮
  toolbarConfig: {
    // buttons: [{
    //
    // }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  data:  [
  ],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['总数量','总面积','分箱数']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
  }
})
//创建流程卡
const createProcessCard = () => {
  const $grid = xGrid.value
  const checkedList = $grid.getCheckboxRecords()
  if(checkedList.length===0){
    ElMessage.warning("请先选择右侧数据")
    return
  }
  //productionId
  const $gridLeft = xGridLeft.value
  const leftData = $gridLeft.getTableData().fullData
  let index = 1
  if(leftData.length!==0){
    index =  leftData[0].landingSequence + 1
    //index = index.toString().padStart(2, '0')
  }
  const processId = productionId + index.toString().padStart(2, '0')
  checkedList.forEach((item) => {
    item.processId = processId
    item.landingSequence = index
  })
  $gridLeft.insertAt(checkedList)
  $grid.remove(checkedList)
}
let checkedNum =  ref('')
//向右边表格添加数据
const addRight =   () => {
  try{
    //左边表格定义
    const $gridLeft = xGridLeft.value
    //右边表格定义
    const $grid = xGrid.value
    //获取左边表格checkbox选中的数据
    const checkedList = $gridLeft.getCheckboxRecords()
    //判断左边表格是否有选中的数据
    if(checkedList.length===0){
      ElMessage.warning("请先选择左侧数据")
      return
    }
    const  regex = /^(\d+|)$/;
    if(!regex.test(checkedNum.value)){
      ElMessage.warning("请输入正整数")
      return
    }
    //判断正整数
    if(/^[1-9]\d*$/.test(checkedNum.value)){
      //对选中的左边表格数据进行循环
      checkedList.forEach((item)=> {
        //判断可用数量是否大于等于输入的数量,不满足则抛出异常
        if(item.quantity <checkedNum.value) throw new Error("请输入小于等于可用数量的数字");
        //左边表格可用数量减去输入的数量
        item.quantity = item.quantity-checkedNum.value
        //右边表格数据
        let rightData = $grid.getTableData().fullData
        //右边表格数据中查找当前数据下标
        let filterIndex = rightData.findIndex(item1 => item1.orderNumber === item.orderNumber)
        //如果右边表格数据中存在当前数据则数量相加
        if (filterIndex>=0){
          rightData[filterIndex].baiscQuantity =rightData[filterIndex].baiscQuantity*1+ checkedNum.value*1
          //如果左边数量为0时删除此条数据
          if(item.quantity=== 0){
            $gridLeft.remove(item)
          }
        }else {
          //右边表格没有此条数据则往右边表格插入数据
          item.baiscQuantity = checkedNum.value
          $grid.insert(item)
        }
      })
    }else if(checkedNum.value===''){//判断数量输入框有无输入数字
      checkedList.forEach((item)=> {
        let rightData = $grid.getTableData().fullData
        let filterIndex = rightData.findIndex(item1 => item1.orderNumber === item.orderNumber)
        //无输入并且如果右边表格数据中存在当前数据则数量相加
        if(filterIndex>-1){
          rightData[filterIndex].baiscQuantity =rightData[filterIndex].baiscQuantity*1+ item.quantity*1
        }else{
          $grid.insert(item)
        }
        $gridLeft.remove(item)
      })
    }
  }
  catch (e){
    ElMessage.warning(e.message)
  }
}
//向左边表格添加数据
const addLeft =   () => {
}
</script>
<template>
@@ -107,46 +419,92 @@
    <div class="common-layout">
      <el-container height="100%">
        <el-aside width="44%" style="">
          <el-table :data="tableData" border style="width: 100%" height="100%">
            <el-table-column sortable prop="processCard" label="流程卡号" width="120" />
            <el-table-column prop="orderSequence" label="订序" width="60" />
            <el-table-column prop="landingSequence" label="落架顺序" width="85" />
            <el-table-column prop="floorNumber" label="楼层编号" :show-overflow-tooltip='true' width="120" />
            <el-table-column prop="shape" label="形状" width="65" />
            <el-table-column prop="longSide" label="长边" width="65" />
            <el-table-column prop="shortSide" label="短边" width="65" />
            <el-table-column prop="total" label="总数量" width="75" />
            <el-table-column prop="totalThickness" label="总厚度" width="75" />
          </el-table><!-- <h1>{{msg}}</h1> -->
          <vxe-grid
              max-height="100%"
              @filter-change="filterChanged"
              class="mytable-scrollbar"
              ref="xGridLeft"
              v-bind="gridLeftOptions"
          >
            <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
            <!--      下拉显示所有信息插槽-->
            <template #content="{ row }">
              <ul class="expand-wrapper">
                <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
                  <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
                  <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
                  <span v-else>{{ row[item.field] }}</span>
                </li>
              </ul>
            </template>
            <!--左边固定显示的插槽-->
            <template #button_slot="{ row }">
              <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button>
              <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button>
              <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>
            </template>
            <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)"/>
                </div>
              </div>
            </template>
          </vxe-grid>
        </el-aside>
        <el-main width="12%" style="">
          <span>未分数量:45</span><br>
          <span>未分重量:333</span><br>
          <span>选中数量:</span><br>
          <el-button type="primary"> → </el-button>
          <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br>
          <el-button type="primary" @click="addRight"> → </el-button>
          <br>
          <br>
          <el-button type="primary">  ← </el-button>
          <el-button type="primary" @click="addLeft">  ← </el-button>
          <br>
          <br>
          <el-button type="primary">建立流程卡</el-button>
          <el-button @click="createProcessCard" type="primary">建立流程卡</el-button>
        </el-main>
        <el-aside width="44%" style="">
          <el-table :data="tableData2" border style="width: 100%" height="100%">
            <el-table-column prop="orderSequence" label="订序" width="60" />
            <el-table-column prop="floorNumber" label="楼层编号" :show-overflow-tooltip='true' width="100" />
            <el-table-column prop="shape" label="形状" width="65" />
            <el-table-column prop="longSide" label="长边" width="60" />
            <el-table-column prop="shortSide" label="短边" width="60" />
            <el-table-column prop="undividedQuantity" label="待分数量" width="85" />
            <el-table-column prop="undividedArea" label="待分面积" width="85" />
            <el-table-column prop="totalThickness" label="总厚度" width="75" />
            <el-table-column prop="glassThickness" label="玻璃厚度" width="85" />
            <el-table-column prop="undividedWeight" label="待分重量" width="85" />
          </el-table><!-- <h1>{{msg}}</h1> -->
          <vxe-grid
              max-height="100%"
              @filter-change="filterChanged"
              class="mytable-scrollbar"
              ref="xGrid"
              v-bind="gridOptions"
          >
            <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
            <!--      下拉显示所有信息插槽-->
            <template #content="{ row }">
              <ul class="expand-wrapper">
                <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
                  <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
                  <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
                  <span v-else>{{ row[item.field] }}</span>
                </li>
              </ul>
            </template>
            <!--左边固定显示的插槽-->
            <template #button_slot="{ row }">
              <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button>
              <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button>
              <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>
            </template>
            <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)"/>
                </div>
              </div>
            </template>
          </vxe-grid>
        </el-aside>
      </el-container>
    </div>
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue
@@ -79,7 +79,7 @@
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10) //默认开始时间7天前
  const end = new Date(new Date().getTime())
  const end = new Date(new Date().getTime()+ 3600 * 1000 * 24)
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10)//默认结束时间当前时间
@@ -205,16 +205,16 @@
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {title: '操作', width: 80, slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'orderId',  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
    {field: 'customerName', title: '客户名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'project', title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'batch', title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'otherRemarks', title: '原片要求', sortable: true,showOverflow:"ellipsis"},
    {field: 'icon', title: '商标选项', sortable: true},
    {field: 'orderType', title: '订单类型', sortable: true},
    {field: 'salesman', title: '业务员', sortable: true},
    {field: 'processingNote', title: '加工要求', sortable: true,showOverflow:"ellipsis"},
    {field: 'deliveryAddress', title: '送货地址', sortable: true},
    {field: 'order.orderId',  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
    {field: 'order.customerName', title: '客户名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.project', title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.batch', title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.otherRemarks', title: '原片要求', sortable: true,showOverflow:"ellipsis"},
    {field: 'order.icon', title: '商标选项', sortable: true},
    {field: 'order.orderType', title: '订单类型', sortable: true},
    {field: 'order.salesman', title: '业务员', sortable: true},
    {field: 'order.processingNote', title: '加工要求', sortable: true,showOverflow:"ellipsis"},
    {field: 'order.deliveryAddress', title: '送货地址', sortable: true},
  ],//表头按钮
  toolbarConfig: {
@@ -284,11 +284,13 @@
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row}">
      <template #content="{ row }">
        <ul class="expand-wrapper">
          <li  v-for="(item,key,index) in row">
            <span style="font-weight: bold">{{key+':  '}}</span>
            <span>{{ item }}</span>
          <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
            <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
            <span v-else>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -17,12 +17,23 @@
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}})
      router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}})
      break
    }
    case 'setType': {
      alert('我接收到子组件传送的删除信息')
      break
    }
    case 'delete': {
      alert('我接收到子组件传送的删除信息')
      request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => {
        if (res.code == 200) {
          ElMessage.success("删除成功")
          location.reload();
        } else {
          ElMessage.warning(res.msg)
          router.push("/login")
        }
      })
      break
    }
  }
@@ -88,7 +99,7 @@
      .toISOString()
      .replace('T', ' ')
      .slice(0,10) //默认开始时间7天前
  const end = new Date(new Date().getTime())
  const end = new Date(new Date().getTime()+3600 * 1000 * 24)
      .toISOString()
      .replace('T', ' ')
      .slice(0,10)//默认结束时间当前时间
@@ -184,7 +195,7 @@
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue
@@ -16,7 +16,7 @@
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/processCard/AddProcessCard', query: { id: row.id }})
      router.push({path: '/main/processCard/AddProcessCard', query: { orderId: row.orderId,productionId:row.orderGlassDetail.productionId }})
      break
    }
    case 'delete':{
@@ -40,12 +40,11 @@
  scrollHeight.value = row.$event.target.scrollHeight
  clientHeight.value = row.$event.target.clientHeight
}
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
  order: {
    batch: ''
  },
  orderDetail: {
  orderGlassDetail: {
    productName: '',
    computeArea: '',
    quantity: '',
@@ -53,6 +52,9 @@
    perimeter: '',
    bendRadius: '',
    processingNote: ''
  },
  orderDetail:{
    orderDetail:''
  }
})
@@ -91,7 +93,50 @@
  return count.toFixed(2)
}
/*使用筛选,后端获取数据*/
const changeFilterEvent = (event, option, $panel,) => {
  // 手动触发筛选
  $panel.changeOption(event, !!option.data, option)
}
function filterChanged(column) {
  gridOptions.loading = true
  //筛选条件发生变化条件发生变化
  let value = column.datas[0] != undefined ? column.datas[0] : ''
  value = value.trim()
  //判断是否存在外键
  if (column.property.indexOf('.') > -1) {
    const columnArr = column.property.split('.')
    filterData.value[columnArr[0]] = {
      [columnArr[1]]: value
    }
  } else {
    filterData.value[column.property] = value
  }
//获取选中时间
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  request.post(`/processCard/selectAddProcess/${startTime}/${endTime}`, filterData.value).then((res) => {
    if (res.code == 200) {
      pageTotal.value = res.data.total
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading = false
    } else {
      ElMessage.warning(res.msg)
    }
  })
}
const hasDecimal = (value) => {
  const regex = /\./; // 定义正则表达式,查找小数点
  return regex.test(value); // 返回true/false
}
//子组件接收参数
const xGrid = ref()
const gridOptions = reactive({
  loading: true,
@@ -128,12 +173,12 @@
    {title: '操作', width: 80, slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'orderId',  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
    {field: 'productionId', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity', title: '总数量', sortable: true,showOverflow:"ellipsis"},
    {field: 'computeGrossArea', title: '总面积', sortable: true},
    {field: 'perimeter', title: '周长', sortable: true},
    {field: 'orderGlassDetail.productionId', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderDetail.quantity', title: '总数量', sortable: true,showOverflow:"ellipsis"},
    {field: 'orderDetail.computeGrossArea', title: '总面积', sortable: true},
    {field: 'orderDetail.perimeter', title: '周长', sortable: true},
  ],//表头按钮
  toolbarConfig: {
@@ -183,9 +228,11 @@
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row }">
        <ul class="expand-wrapper">
          <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{item.title+':  '}}</span>
            <span>{{ row[item.field] }}</span>
          <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
            <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
            <span v-else>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue
@@ -73,6 +73,7 @@
request.post(`/workOrder/addWork/${id}`, filterData.value).then((res) => {
  if (res.code == 200) {
    console.log(res.data.data)
    pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    xGrid.value.reloadData(produceList)
@@ -82,6 +83,41 @@
  }
})
/*使用筛选,后端获取数据*/
const changeFilterEvent = (event, option, $panel,) => {
  // 手动触发筛选
  $panel.changeOption(event, !!option.data, option)
}
function filterChanged(column) {
  gridOptions.loading = true
  //筛选条件发生变化条件发生变化
  let value = column.datas[0] != undefined ? column.datas[0] : ''
  value = value.trim()
  //判断是否存在外键
  if (column.property.indexOf('.') > -1) {
    const columnArr = column.property.split('.')
    filterData.value[columnArr[0]] = {
      [columnArr[1]]: value
    }
  } else {
    filterData.value[column.property] = value
  }
  request.post(`/workOrder/addWork/${id}`, filterData.value).then((res) => {
    if (res.code == 200) {
      pageTotal.value = res.data.total
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading = false
    } else {
      ElMessage.warning(res.msg)
    }
  })
}
//表尾求和
const sumNum = (list, field) => {
  let count = 0
@@ -89,6 +125,11 @@
    count += Number(item[field])
  })
  return count.toFixed(2)
}
const hasDecimal = (value) => {
  const regex = /\./; // 定义正则表达式,查找小数点
  return regex.test(value); // 返回true/false
}
//子组件接收参数
@@ -127,19 +168,12 @@
    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
    {type: 'checkbox', fixed: "left", title: '选择', width: 80},
    {type: 'seq', fixed: "left", title: '自序', width: 50},
    {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true,},
    {
      field: 'productId',
      title: '产品编号',
      sortable: true,
      showOverflow: "ellipsis",
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'}
    },
    {field: 'productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'quantity', title: '总数量', sortable: true},
    {field: 'computeGrossArea', title: '总面积', sortable: true},
    {field: 'perimeter', title: '周长', sortable: true, showOverflow: "ellipsis"},
    {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'},},
    {field: 'productId',title: '产品编号',showOverflow: "ellipsis",filters: [{data: ''}],slots: {filter: 'num1_filter'}},
    {field: 'productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, },
    {field: 'quantity', title: '总数量', },
    {field: 'computeGrossArea', title: '总面积', },
    {field: 'perimeter', title: '周长', showOverflow: "ellipsis"}
  ],//表头按钮
  toolbarConfig: {
@@ -227,7 +261,9 @@
        <ul class="expand-wrapper">
          <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
            <span>{{ row[item.field] }}</span>
            <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
            <span v-else>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -22,8 +22,6 @@
      break
    }
    case 'delete': {
      //console.log(row.orderDetail.productName)
      //request.post('/workOrder/deleteOrderWork/${row.orderId}', ,row.orderDetail.productName).then((res) => {
        request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.orderDetail.productName}`).then((res) => {
        if (res.code == 200) {
          ElMessage.success("删除成功")
@@ -50,7 +48,7 @@
//定义转单状态
const optionVal = ref('0')
const optionVal = ref('1')
const options = [
  {
    value: '0',
@@ -112,7 +110,7 @@
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10) //默认开始时间7天前
  const end = new Date(new Date().getTime())
  const end = new Date(new Date().getTime()+3600 * 1000 * 24)
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10)//默认结束时间当前时间
north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -33,9 +33,19 @@
  stuffLowE:null,
  stuffPosition:null,
  stuffThickness:null,
  //夹层数据
  InterlayerType:null,
  InterlayerThickness:null,
  InterlayerColor:null
  InterlayerColor:null,
  //中空数据
  hollowGasType:null,
  hollowGlueDepth:null,
  hollowThickness:null,
  hollowType:null,
  //流程
  process:null
})
let stuff = ref({
@@ -161,8 +171,8 @@
        <h5>工艺属性</h5>
        <el-checkbox
            v-model="processChecked"
            v-for="item in processList"
            :label="item"
            v-for="item in BasicData.process"
            :label="item.basicName"
            class="glass-process-checkbox"
             size="small" />
      </div>
@@ -172,19 +182,43 @@
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*中空厚度:" />
              clearable placeholder="*中空厚度:" >
            <el-option v-for="item in BasicData.hollowThickness"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*充气方式:" />
              clearable placeholder="*充气方式:" >
            <el-option v-for="item in BasicData.hollowGasType"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*封胶:" />
              clearable placeholder="*封胶:" >
            <el-option v-for="item in BasicData.hollowType"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*默认胶深:" />
              clearable placeholder="*默认胶深:" >
            <el-option v-for="item in BasicData.hollowGlueDepth"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-button
              size="small"
              type="primary"
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -1,9 +1,12 @@
package com.example.erp.controller.pp;
import com.example.erp.common.Constants;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
import com.example.erp.common.Result;
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.FlowCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -16,32 +19,60 @@
    @Autowired
    FlowCardService flowCardService;
    //流程卡管理查询
    @PostMapping  ("/flowCard/{selectTime1}/{selectTime2}")
    public Result DateProcess(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody FlowCard  flowCard){
        System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString());
        return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard));
        
    }
    //分架查询
    @PostMapping  ("/selectAddProcess/{selectTime1}/{selectTime2}")
    public Result SelectAddProcess(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody Order  order){
            @RequestBody FlowCard  flowCard){
    //    System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString());
        return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,order));
        return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard));
    }
    //分架明细查询
    @PostMapping  ("/detailsSelect/{orderId}")
    public Result DetailsSelect(
            @PathVariable String orderId,
            @RequestBody OrderDetail orderDetail){
        return Result.seccess(flowCardService.DetailsSelectSv(orderId,orderDetail));
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard));
    }
    //删除工单
    @PostMapping("/deleteFlowCard/{orderId}/{processId}")
    public Result deleteOrderWork(
            @PathVariable String orderId,
            @PathVariable String processId
    ){
        if(flowCardService.DeleteFlowCardSv(orderId,processId)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"删除失败");
        }
    }
    //分架明细查询
    @PostMapping  ("/selectNoCard/{orderId}/{productionId}")
    public Result SelectNoCard(
            @PathVariable String orderId,
            @PathVariable String productionId,
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard));
    }
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java
@@ -39,7 +39,7 @@
    }
    //添加工单
    @PostMapping("/addOrderWork")
    public Result AddOrderWork( @RequestBody Map<String,Object>  object){
        System.out.println("obj:"+object);
@@ -51,6 +51,7 @@
        }
    }
    //删除工单
    @PostMapping("/deleteOrderWork/{orderId}/{productName}")
    public Result deleteOrderWork(
            @PathVariable String orderId,
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java
@@ -5,6 +5,7 @@
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.entity.sd.Product;
import lombok.Data;
import java.time.LocalDate;
@@ -64,4 +65,6 @@
    private OrderDetail orderDetail;
    //外键订单工艺审核表
    private OrderGlassDetail orderGlassDetail;
    private  Product product;
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -3,17 +3,26 @@
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
import org.apache.ibatis.annotations.Mapper;
import java.sql.Date;
import java.util.List;
import java.util.Map;
@Mapper
public interface FlowCardMapper {
    //流程卡管理查询
    List<FlowCard> selectFlowCard(Date selectTime1, Date selectTime2,FlowCard flowCard);
    List<Order> selectFlowCardMp(Date selectTime1, Date selectTime2, Order order);
    //分架数据查询
    List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard);
    List<OrderDetail> DetailsSelectMp(String orderId, OrderDetail orderDetail);
    //  Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product);
    //分架明细查询
    List<FlowCard> DetailsSelectMp(String orderId, FlowCard flowCard);
    Boolean DeleteFlowCardMp(String orderId, String processId);
    List<Map<String,String>> SelectNoCardMp(String orderId, String productionId, FlowCard flowCard);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/WorkOrderMapper.java
@@ -11,20 +11,30 @@
@Mapper
public interface WorkOrderMapper {
    //工单管理查询未转工单数据
    List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail);
    //查询已转工单数据
    List<OrderGlassDetail> selectWordOrderNo(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail);
    //查询需要转工单明细
    List<OrderDetail> addWordOrder(String orderId, OrderDetail orderDetail);
    //转工单
    Boolean AddOrderWorkMp(String productIdVl,
                           @Param("orderId") String orderId,
                           @Param("productId") Integer productId,
                           @Param("productName") String productName,
                           String userName);
    //查询对应订单号订序
    Integer SelectOrderNumber(String productIdVl);
    //删除工单,将对应产品生产订单号改为null
    Boolean DeleteOrderWorkMp(String orderId, String productName);
    Integer SelectWorkCount(String orderId);
    Boolean UpdateWorkType(String orderId, Integer state);
    Integer SelectYesWorkCount(String orderId);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -5,6 +5,7 @@
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.mapper.pp.FlowCardMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -21,26 +22,37 @@
    public Map<String, Object>  selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        //System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        //   map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product));
        return map;
    }
    public Map<String, Object> selectAddProcess(Date selectTime1, Date selectTime2, Order order) {
    public Map<String, Object> selectAddProcess(Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        System.out.println(flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, order));
        map.put("data", flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, order));
        //   map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product));
        map.put("data", flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, flowCard));
        return map;
    }
    public Map<String, Object> DetailsSelectSv(String orderId, OrderDetail orderDetail) {
    public Map<String, Object> DetailsSelectSv(String orderId, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.DetailsSelectMp( orderId, orderDetail));
        map.put("data", flowCardMapper.DetailsSelectMp( orderId, flowCard));
        return map;
    }
        //   map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product));
    public Boolean DeleteFlowCardSv(String orderId, String processId) {
        if (!orderId.isEmpty()&&!processId.isEmpty()){
            flowCardMapper.DeleteFlowCardMp(orderId, processId);
            return true;
        }
        else {
            return false;
        }
    }
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.SelectNoCardMp( orderId,productionId, flowCard));
        return map;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java
@@ -25,10 +25,9 @@
    public Map<String, Object> defaultDateWork(Date selectTime1, Date selectTime2, Integer state, OrderGlassDetail orderGlassDetail) {
        Map<String, Object> map = new HashMap<>();
        // System.out.println(workOrderMapper.selectWordOrder( selectTime1,selectTime2,state, orderGlassDetail));
        if (state==1){
        if (state == 1) {
            map.put("data", workOrderMapper.selectWordOrder(selectTime1, selectTime2, orderGlassDetail));
        }
        else {
        } else {
            map.put("data", workOrderMapper.selectWordOrderNo(selectTime1, selectTime2, orderGlassDetail));
        }
@@ -62,15 +61,24 @@
                    letters = lettr++;
                    productIdVl = orderID + letters;
                    Integer workCount = workOrderMapper.SelectOrderNumber(productIdVl);
                    if (workCount <1)
                    {
                    if (workCount < 1) {
                        break;
                    }
                }
                System.out.println(productIdVl);
                workOrderMapper.AddOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(),userName);
                workOrderMapper.AddOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(), userName);
                Integer State = 2;
                Integer States = 1;
                Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderDetail.getOrderId());
                System.out.println(NoWorkCount);
                if (NoWorkCount == 0) {
                    workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), State);
                } else {
                    workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), States);
                }
            }
            return true;
        } else {
            return false;
@@ -79,11 +87,20 @@
    }
    public Boolean DeleteOrderWorkSv(String orderId, String productName) {
        if (!orderId.isEmpty()&&!productName.isEmpty()){
        if (!orderId.isEmpty() && !productName.isEmpty()) {
            workOrderMapper.DeleteOrderWorkMp(orderId, productName);
            Integer State = 0;
            Integer States = 1;
            Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderId);
            Integer YesWorkCount = workOrderMapper.SelectYesWorkCount(orderId);
            System.out.println(NoWorkCount);
            if (NoWorkCount ==YesWorkCount) {
                workOrderMapper.UpdateWorkType(orderId, State);
            } else {
                workOrderMapper.UpdateWorkType(orderId, States);
            }
            return true;
        }
        else {
        } else {
            return false;
        }
    }
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -27,6 +27,21 @@
            <result column="product_name" property="productName"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="processing_note" property="processingNote"/>
            <result column="quantity" property="quantity"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="perimeter" property="perimeter"/>
            <result column="order_number" property="orderNumber"/>
            <result column="width" property="width"/>
            <result column="height" property="height"/>
            <result column="shape" property="shape"/>
            <result column="weight" property="weight"/>
        </association>
        <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail">
            <result column="production_id" property="productionId"/>
        </association>
        <association property="product" javaType="com.example.erp.entity.sd.Product">
            <result column="total_thickness" property="totalThickness"/>
            <result column="thickness" property="thickness"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
@@ -46,49 +61,7 @@
        c.processing_note
        from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id
        left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
       where a.create_time between #{selectTime1} and #{selectTime2}
<!--        <where>-->
<!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
<!--                and a.order_id regexp #{flowCard.orderId}-->
<!--            </if>-->
<!--            <if test="flowCard.productionId != null and flowCard.productionId != ''">-->
<!--                and a.process_Id regexp #{flowCard.productionId}-->
<!--            </if>-->
<!--            <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">-->
<!--                and c.product_id regexp #{flowCard.orderDetail.productId}-->
<!--            </if>-->
<!--            <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">-->
<!--                and c.product_name regexp #{flowCard.orderDetail.productName}-->
<!--            </if>-->
<!--            <if test="flowCard.order.project != null and flowCard.order.project!= ''">-->
<!--                and b.project regexp #{flowCard.order.project}-->
<!--            </if>-->
<!--            <if test="flowCard.createTime != null and flowCard.createTime != ''">-->
<!--                and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }-->
<!--            </if>-->
<!--        </where>-->
        group by a.process_Id;
    </select>
    <select id="selectFlowCardMp">
        select o.order_id,
        o.customer_name,
        o.project,
        o.batch,
        o.other_remarks,
        o.icon,
        o.order_type,
        o.salesman,
        o.processing_note,
        o.delivery_address
        from sd.`order`  as o
        where o.create_time between #{selectTime1} and #{selectTime2}
        where a.create_time between #{selectTime1} and #{selectTime2}
        <!--        <where>-->
        <!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
        <!--                and a.order_id regexp #{flowCard.orderId}-->
@@ -113,10 +86,47 @@
        <!--            </if>-->
        <!--        </where>-->
      ;
        group by a.process_Id;
    </select>
    <select id="DetailsSelectMp">
    <select id="selectFlowCardMp" resultMap="flowCardMap">
        select o.order_id,
        o.customer_name,
        o.project,
        o.batch,
        o.other_remarks,
        o.icon,
        o.order_type,
        o.salesman,
        o.processing_note,
        o.delivery_address
        from sd.`order` as o
        where o.production_order=2 and o.create_time between #{selectTime1} and #{selectTime2}
        <!--        <where>-->
        <!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
        <!--                and a.order_id regexp #{flowCard.orderId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.productionId != null and flowCard.productionId != ''">-->
        <!--                and a.process_Id regexp #{flowCard.productionId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">-->
        <!--                and c.product_id regexp #{flowCard.orderDetail.productId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">-->
        <!--                and c.product_name regexp #{flowCard.orderDetail.productName}-->
        <!--            </if>-->
        <!--            <if test="flowCard.order.project != null and flowCard.order.project!= ''">-->
        <!--                and b.project regexp #{flowCard.order.project}-->
        <!--            </if>-->
        <!--        </where>-->
        ;
    </select>
    <select id="DetailsSelectMp" resultMap="flowCardMap">
        select od.order_id,
               ogd.production_id,
               od.product_id,
@@ -125,9 +135,57 @@
               od.compute_gross_area,
               od.perimeter
        from sd.order_detail as od
        left join sd.order_glass_detail as ogd
        on od.order_id = ogd.order_id and od.order_number = ogd.order_number
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id
        where od.order_id = #{orderId}
        group by od.order_id,ogd.production_id
        group by od.order_id, ogd.production_id
    </select>
    <update id="DeleteFlowCardMp">
        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
        set ogd.production_id=null,
            ogd.production_time=null,
            ogd.founder=null
        where od.order_id = #{orderId}
          and od.product_name = #{productName}
    </update>
<!--resultMap="flowCardMap"-->
    <select id="SelectNoCardMp" >
        select
        od.order_number AS 'orderNumber',
        od.width,
        od.height,
        od.shape,
        od.quantity,
        od.quantity as baiscQuantity,
        od.compute_gross_area as 'computeGrossArea',
        p.total_thickness AS 'totalThickness',
        p.thickness,
        od.weight
        from
        sd.order_detail as od
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id
        left join sd.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId}and ogd.production_id=#{productionId}
        <if test="flowCard.orderDetail.orderNumber != null and flowCard.orderDetail.orderNumber != ''">
            and od.order_number regexp #{flowCard.orderDetail.orderNumber}
        </if>
        <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
            and od.width regexp #{flowCard.orderDetail.width}
        </if>
        <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
            and od.height regexp #{flowCard.orderDetail.height}
        </if>
        <if test="flowCard.orderDetail.shape != null and flowCard.orderDetail.shape != ''">
            and od.shape regexp #{flowCard.orderDetail.shape}
        </if>
        GROUP BY od.order_number;
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -30,39 +30,39 @@
    </resultMap>
    <select id="selectWordOrder" resultMap="wordOrderMap">
        select
        a.order_id,
        a.production_id,
        c.batch,
        b.product_name,
        b.compute_area,
        b.quantity,
        b.compute_gross_area,
        b.perimeter,
        b.bend_radius,
        b.processing_note
        from order_glass_detail as a
        LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN
        `order` as c on a.order_id=c.order_id
        where isnull(a.production_id)
        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
        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 a.order_id regexp #{orderGlassDetail.orderId}
                and o.order_id regexp #{orderGlassDetail.orderId}
            </if>
            <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
                and a.production_id regexp #{orderGlassDetail.productionId}
                and ogd.production_id regexp #{orderGlassDetail.productionId}
            </if>
            <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
                and c.batch regexp #{orderGlassDetail.order.batch}
                and o.batch regexp #{orderGlassDetail.order.batch}
            </if>
            <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
                and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
                and od.product_name regexp #{orderGlassDetail.orderDetail.productName}
            </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
                and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        group by a.production_id,a.order_number
        order by a.id desc
        group by o.order_id
        order by o.id desc
        ;
@@ -70,45 +70,45 @@
    <select id="selectWordOrderNo" resultMap="wordOrderMap">
        select
        a.order_id,
        a.production_id,
        c.batch,
        b.product_name,
        b.compute_area,
        b.quantity,
        b.compute_gross_area,
        b.perimeter,
        b.bend_radius,
        b.processing_note
        from order_glass_detail as a
        LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN
        `order` as c on a.order_id=c.order_id
        where a.production_id IS NOT NULL
        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
        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 ogd.production_id IS NOT NULL
        <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
            and a.order_id regexp #{orderGlassDetail.orderId}
            and ogd.order_id regexp #{orderGlassDetail.orderId}
        </if>
        <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
            and a.production_id regexp #{orderGlassDetail.productionId}
            and ogd.production_id regexp #{orderGlassDetail.productionId}
        </if>
        <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
            and c.batch regexp #{orderGlassDetail.order.batch}
            and o.batch regexp #{orderGlassDetail.order.batch}
        </if>
        <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
            and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
            and od.product_name regexp #{orderGlassDetail.orderDetail.productName}
        </if>
        <if test="orderGlassDetail.createTime != ''">
            and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
        </if>
        group by a.production_id,a.order_number
        order by a.id desc
        group by ogd.production_id,ogd.order_number
        order by ogd.id desc
        ;
    </select>
    <select id="addWordOrder">
    <select id="addWordOrder" >
        select od.order_id,
               od.product_id,
               od.product_name,
@@ -117,20 +117,28 @@
               od.perimeter
        from 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
        where od.order_id = #{orderId}
          and ISNULL(ogd.production_id)
                           on od.order_id = ogd.order_id
        where od.order_id = #{orderId}  and ISNULL(ogd.production_id)
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and od.product_id regexp #{orderDetail.productId}
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and od.product_name regexp #{orderDetail.productName}
        </if>
        group by od.order_id, od.product_id, od.product_name
        ;
    </select>
    <select id="SelectOrderNumber">
    <select id="SelectOrderNumber" resultMap="wordOrderMap">
        select count(ogd.production_id)
        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
@@ -152,4 +160,21 @@
        where od.order_id = #{orderId}
          and od.product_name = #{productName}
    </update>
    <select id="SelectWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where ISNULL(production_id)
          and order_id = #{orderId}
    </select>
    <select id="SelectYesWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where  order_id = #{orderId}
    </select>
    <update id="UpdateWorkType">
        update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId}
    </update>
</mapper>
north-glass-erp/target/classes/mapper/pp/FolwCard.xml
@@ -27,6 +27,21 @@
            <result column="product_name" property="productName"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="processing_note" property="processingNote"/>
            <result column="quantity" property="quantity"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="perimeter" property="perimeter"/>
            <result column="order_number" property="orderNumber"/>
            <result column="width" property="width"/>
            <result column="height" property="height"/>
            <result column="shape" property="shape"/>
            <result column="weight" property="weight"/>
        </association>
        <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail">
            <result column="production_id" property="productionId"/>
        </association>
        <association property="product" javaType="com.example.erp.entity.sd.Product">
            <result column="total_thickness" property="totalThickness"/>
            <result column="thickness" property="thickness"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
@@ -46,49 +61,7 @@
        c.processing_note
        from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id
        left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
       where a.create_time between #{selectTime1} and #{selectTime2}
<!--        <where>-->
<!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
<!--                and a.order_id regexp #{flowCard.orderId}-->
<!--            </if>-->
<!--            <if test="flowCard.productionId != null and flowCard.productionId != ''">-->
<!--                and a.process_Id regexp #{flowCard.productionId}-->
<!--            </if>-->
<!--            <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">-->
<!--                and c.product_id regexp #{flowCard.orderDetail.productId}-->
<!--            </if>-->
<!--            <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">-->
<!--                and c.product_name regexp #{flowCard.orderDetail.productName}-->
<!--            </if>-->
<!--            <if test="flowCard.order.project != null and flowCard.order.project!= ''">-->
<!--                and b.project regexp #{flowCard.order.project}-->
<!--            </if>-->
<!--            <if test="flowCard.createTime != null and flowCard.createTime != ''">-->
<!--                and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }-->
<!--            </if>-->
<!--        </where>-->
        group by a.process_Id;
    </select>
    <select id="selectFlowCardMp">
        select o.order_id,
        o.customer_name,
        o.project,
        o.batch,
        o.other_remarks,
        o.icon,
        o.order_type,
        o.salesman,
        o.processing_note,
        o.delivery_address
        from sd.`order`  as o
        where o.create_time between #{selectTime1} and #{selectTime2}
        where a.create_time between #{selectTime1} and #{selectTime2}
        <!--        <where>-->
        <!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
        <!--                and a.order_id regexp #{flowCard.orderId}-->
@@ -113,10 +86,47 @@
        <!--            </if>-->
        <!--        </where>-->
      ;
        group by a.process_Id;
    </select>
    <select id="DetailsSelectMp">
    <select id="selectFlowCardMp" resultMap="flowCardMap">
        select o.order_id,
        o.customer_name,
        o.project,
        o.batch,
        o.other_remarks,
        o.icon,
        o.order_type,
        o.salesman,
        o.processing_note,
        o.delivery_address
        from sd.`order` as o
        where o.production_order=2 and o.create_time between #{selectTime1} and #{selectTime2}
        <!--        <where>-->
        <!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
        <!--                and a.order_id regexp #{flowCard.orderId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.productionId != null and flowCard.productionId != ''">-->
        <!--                and a.process_Id regexp #{flowCard.productionId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">-->
        <!--                and c.product_id regexp #{flowCard.orderDetail.productId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">-->
        <!--                and c.product_name regexp #{flowCard.orderDetail.productName}-->
        <!--            </if>-->
        <!--            <if test="flowCard.order.project != null and flowCard.order.project!= ''">-->
        <!--                and b.project regexp #{flowCard.order.project}-->
        <!--            </if>-->
        <!--        </where>-->
        ;
    </select>
    <select id="DetailsSelectMp" resultMap="flowCardMap">
        select od.order_id,
               ogd.production_id,
               od.product_id,
@@ -125,9 +135,56 @@
               od.compute_gross_area,
               od.perimeter
        from sd.order_detail as od
        left join sd.order_glass_detail as ogd
        on od.order_id = ogd.order_id and od.order_number = ogd.order_number
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id
        where od.order_id = #{orderId}
        group by od.order_id,ogd.production_id
        group by od.order_id, ogd.production_id
    </select>
    <update id="DeleteFlowCardMp">
        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
        set ogd.production_id=null,
            ogd.production_time=null,
            ogd.founder=null
        where od.order_id = #{orderId}
          and od.product_name = #{productName}
    </update>
<!--resultMap="flowCardMap"-->
    <select id="SelectNoCardMp" >
        select
        od.order_number AS 'orderNumber',
        od.width,
        od.height,
        od.shape,
        od.quantity,
        od.quantity as baiscQuantity,
        od.compute_gross_area as 'computeGrossArea',
        p.total_thickness AS 'totalThickness',
        p.thickness,
        od.weight
        from
        sd.order_detail as od
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id
        left join sd.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId}and ogd.production_id=#{productionId}
        <if test="flowCard.orderDetail.orderNumber != null and flowCard.orderDetail.orderNumber != ''">
            and od.order_number regexp #{flowCard.orderDetail.orderNumber}
        </if>
        <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
            and od.width regexp #{flowCard.orderDetail.width}
        </if>
        <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
            and od.height regexp #{flowCard.orderDetail.height}
        </if>
        <if test="flowCard.orderDetail.shape != null and flowCard.orderDetail.shape != ''">
            and od.shape regexp #{flowCard.orderDetail.shape}
        </if>
        GROUP BY od.order_number;
    </select>
</mapper>
north-glass-erp/target/classes/mapper/pp/WordOrder.xml
@@ -30,39 +30,39 @@
    </resultMap>
    <select id="selectWordOrder" resultMap="wordOrderMap">
        select
        a.order_id,
        a.production_id,
        c.batch,
        b.product_name,
        b.compute_area,
        b.quantity,
        b.compute_gross_area,
        b.perimeter,
        b.bend_radius,
        b.processing_note
        from order_glass_detail as a
        LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN
        `order` as c on a.order_id=c.order_id
        where isnull(a.production_id)
        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
        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 a.order_id regexp #{orderGlassDetail.orderId}
                and o.order_id regexp #{orderGlassDetail.orderId}
            </if>
            <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
                and a.production_id regexp #{orderGlassDetail.productionId}
                and ogd.production_id regexp #{orderGlassDetail.productionId}
            </if>
            <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
                and c.batch regexp #{orderGlassDetail.order.batch}
                and o.batch regexp #{orderGlassDetail.order.batch}
            </if>
            <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
                and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
                and od.product_name regexp #{orderGlassDetail.orderDetail.productName}
            </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
                and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        group by a.production_id,a.order_number
        order by a.id desc
        group by o.order_id
        order by o.id desc
        ;
@@ -70,45 +70,45 @@
    <select id="selectWordOrderNo" resultMap="wordOrderMap">
        select
        a.order_id,
        a.production_id,
        c.batch,
        b.product_name,
        b.compute_area,
        b.quantity,
        b.compute_gross_area,
        b.perimeter,
        b.bend_radius,
        b.processing_note
        from order_glass_detail as a
        LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN
        `order` as c on a.order_id=c.order_id
        where a.production_id IS NOT NULL
        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
        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 ogd.production_id IS NOT NULL
        <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
            and a.order_id regexp #{orderGlassDetail.orderId}
            and ogd.order_id regexp #{orderGlassDetail.orderId}
        </if>
        <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
            and a.production_id regexp #{orderGlassDetail.productionId}
            and ogd.production_id regexp #{orderGlassDetail.productionId}
        </if>
        <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
            and c.batch regexp #{orderGlassDetail.order.batch}
            and o.batch regexp #{orderGlassDetail.order.batch}
        </if>
        <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
            and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
            and od.product_name regexp #{orderGlassDetail.orderDetail.productName}
        </if>
        <if test="orderGlassDetail.createTime != ''">
            and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
        </if>
        group by a.production_id,a.order_number
        order by a.id desc
        group by ogd.production_id,ogd.order_number
        order by ogd.id desc
        ;
    </select>
    <select id="addWordOrder">
    <select id="addWordOrder" >
        select od.order_id,
               od.product_id,
               od.product_name,
@@ -117,20 +117,28 @@
               od.perimeter
        from 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
        where od.order_id = #{orderId}
          and ISNULL(ogd.production_id)
                           on od.order_id = ogd.order_id
        where od.order_id = #{orderId}  and ISNULL(ogd.production_id)
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and od.product_id regexp #{orderDetail.productId}
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and od.product_name regexp #{orderDetail.productName}
        </if>
        group by od.order_id, od.product_id, od.product_name
        ;
    </select>
    <select id="SelectOrderNumber">
    <select id="SelectOrderNumber" resultMap="wordOrderMap">
        select count(ogd.production_id)
        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
@@ -152,4 +160,21 @@
        where od.order_id = #{orderId}
          and od.product_name = #{productName}
    </update>
    <select id="SelectWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where ISNULL(production_id)
          and order_id = #{orderId}
    </select>
    <select id="SelectYesWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where  order_id = #{orderId}
    </select>
    <update id="UpdateWorkType">
        update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId}
    </update>
</mapper>