chenlu
2024-02-23 92f00c92b4e6c1c61ce8461d9b72fd2969e66802
流程卡新增
12个文件已修改
1个文件已添加
846 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue 195 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 284 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/FolwCard.xml 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/WordOrder.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -11,9 +11,12 @@
import Sortable from 'sortablejs'
import BasicTable from '@/components/basic/BasicTable.vue'
import {VXETable} from "vxe-table";
import useUserInfoStore from "@/stores/userInfo";
let productGlassTypeStore = useProductGlassTypeStore()
let router = useRouter()
const userStore = useUserInfoStore()
const username = userStore.user.userName
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
@@ -39,6 +42,15 @@
  }
}
let flag = $ref(true)
function intoCreateProduct(){
  if(flag){
    router.push(`/main/processCard/SplittingDetails?orderId=${orderId}`)
  }else {
    router.push('/main/processCard/SplittingDetails?orderId=${orderId}')
  }
  flag=!flag
}
//定义时间
const form = reactive({
@@ -74,7 +86,7 @@
    orderNumber: '',
    height: '',
    computeGrossArea: '',
    quantity: '',
    binningQuantity: '',
    shape:'',
    width:'',
    weight:''
@@ -99,7 +111,7 @@
request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => {
  if (res.code == 200) {
    //console.log(res.data)
    console.log(res.data)
    pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    xGrid.value.reloadData(produceList)
@@ -114,9 +126,11 @@
  // 手动触发筛选
  $panel.changeOption(event, !!option.data, option)
}
function padLeftZero(str) {
  return ('00' + str).substr(str.length)
}
function filterChanged(column) {
  gridOptions.loading = true
  //筛选条件发生变化条件发生变化
@@ -135,6 +149,7 @@
  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)
@@ -187,8 +202,8 @@
    {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: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis"},
    {field: 'computeGrossArea', title: '待分面积'},
    {field: 'totalThickness', title: '总厚度'},
    {field: 'thickness', title: '玻璃厚度'},
    {field: 'weight', title: '重量'}
@@ -204,12 +219,10 @@
    zoom: true,
    custom: true
  },
  data:  [
  ],//table body实际数据
  data: [],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['总数量','总面积','分箱数']
    let footList = ['baiscQuantity', 'computeGrossArea', 'totalThickness','thickness', 'weight']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
@@ -259,7 +272,13 @@
  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: '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"},
@@ -269,18 +288,16 @@
  ],//表头按钮
  toolbarConfig: {
    // buttons: [{
    //
    // }],
    buttons: [
      {code: 'saveFlowCard', name: '保存', status: 'primary', icon: 'vxe-icon-save'},
    ],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  data:  [
  ],//table body实际数据
  data: [],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['总数量','总面积','分箱数']
@@ -385,21 +402,127 @@
      })
    }
  }
  catch (e){
  } catch (e) {
    ElMessage.warning(e.message)
  }
}
//向左边表格添加数据
const addLeft =   () => {
  try {
    //左边表格定义
    const $gridLeft = xGridLeft.value
    //右边表格定义
    const $grid = xGrid.value
    //获取右边表格checkbox选中的数据
    const checkedList = $grid.getCheckboxRecords()
    //获取左边表格checkbox选中的数据
    const checkedListLeft = $gridLeft.getCheckboxRecords()
    //判断右边表格是否有选中的数据
    if (checkedList.length === 0) {
      ElMessage.warning("请先选择右侧数据")
      return
    }
    if (checkedListLeft.length !== 1) {
      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.baiscQuantity < checkedNum.value) throw new Error("请输入小于等于可用数量的数字");
        item.baiscQuantity = item.baiscQuantity - checkedNum.value
        //左边表格数据
        let leftData = $gridLeft.getTableData().fullData
        //左边表格数据中查找当前数据下标
        let filterIndex = leftData.findIndex(item1 => item1.orderNumber === item.orderNumber)
        //如果右边表格数据中存在当前数据则数量相加
        if (filterIndex >= 0) {
          leftData[filterIndex].quantity = leftData[filterIndex].quantity * 1 + checkedNum.value * 1
          if (item.baiscQuantity === 0) {
            $grid.remove(checkedList)
          }
        } else {
          item.quantity = checkedNum.value
          item.processId = checkedListLeft[0].processId
          item.landingSequence = checkedListLeft[0].landingSequence
          $gridLeft.insert(item)
        }
      })
    } else if (checkedNum.value === '') {//判断数量输入框有无输入数字
      checkedList.forEach((item) => {
        item.processId = checkedListLeft[0].processId
        item.landingSequence = checkedListLeft[0].landingSequence
      })
      $gridLeft.insertAt(checkedList)
      $grid.remove(checkedList)
    }
  } catch (e) {
    ElMessage.warning(e.message)
  }
}
//保存流程卡数据
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGridLeft.value
    if ($grid) {
      switch (code) {
        case 'saveFlowCard': {
          const $table = xGridLeft.value
          const $tableRight = xGrid.value
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            const selectRight = $tableRight.getCheckboxRecords()
            if (selectRecords.length === 0){
              ElMessage.warning("请先选择保存的数据")
              return
            }
            if (selectRight.length > 0){
              ElMessage.warning("请先将右侧数据全部建立流程卡后保存")
              return;
            }
            //console.log(selectRecords[0].quantity)
            let flowCardData = ref({
              flowCard: selectRecords,
              userName:username,
              productionId:productionId
            })
           console.log(flowCardData.value)
            request.post("/processCard/addFlowCard", flowCardData.value).then((res) => {
              if (res.code == 200) {
                ElMessage.success("保存成功")
                location.reload();
              } else {
                ElMessage.warning(res.msg)
                router.push("/login")
              }
            })
          }
          return;
}
      }
    }
  },
}
</script>
<template>
  <div>
    <div class="common-layout" style="height: 100%">
    <div class="header">
      <el-button
@@ -411,20 +534,21 @@
          round >
        {{flag?'返回':'返回'}}
      </el-button>
      <el-button type="primary">保存分架</el-button>
      <el-button type="primary">分架汇总</el-button>
      <el-button type="primary">左侧全选</el-button>
      <el-button type="primary">右侧全选</el-button>
        <!--      <el-button  type="primary">保存分架</el-button>-->
<!--              <el-button type="primary" :hidden="true">分架汇总</el-button>-->
        <div style="width: 100px;">
    </div>
    <div class="common-layout">
      <el-container height="100%">
        <el-aside width="44%" style="">
      </div>
      <el-container height="600px">
        <el-aside width="44%" >
          <vxe-grid
              max-height="100%"
              @filter-change="filterChanged"
              class="mytable-scrollbar"
              ref="xGridLeft"
              v-bind="gridLeftOptions"
              v-on="gridEvents"
          >
            <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
            <!--      下拉显示所有信息插槽-->
@@ -432,7 +556,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 v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</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>
@@ -457,8 +583,6 @@
        </el-aside>
        <el-main width="12%" style="">
          <span>未分数量:45</span><br>
          <span>未分重量:333</span><br>
          <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br>
          <el-button type="primary" @click="addRight"> → </el-button>
          <br>
@@ -469,10 +593,10 @@
          <el-button @click="createProcessCard" type="primary">建立流程卡</el-button>
        </el-main>
        <el-aside width="44%" style="">
        <el-aside width="45%" height="500px" style="">
          <vxe-grid
              max-height="100%"
              max-height="97%"
              @filter-change="filterChanged"
              class="mytable-scrollbar"
              ref="xGrid"
@@ -484,7 +608,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 v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</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>
@@ -516,6 +642,12 @@
  height: 100%;
}
.header{
  width: 100%;
  height: 35px;
  margin-top: -20px;
}
.el-aside{
  height: 100%;
}
@@ -524,7 +656,6 @@
  height: 100%;
  text-align: center;
}
</style>
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectAddProcess.vue
@@ -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: '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},
    {field: 'order.orderId',  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' } , },
    {field: 'order.customerName', title: '客户名称',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.project', title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.batch', title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, },
    {field: 'order.otherRemarks', title: '原片要求' ,showOverflow:"ellipsis",filters:[{ data: '' },],slots: { filter: 'num1_filter' }},
    {field: 'order.icon', title: '商标选项',filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
    {field: 'order.orderType', title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
    {field: 'order.salesman', title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.processingNote', title: '加工要求',showOverflow:"ellipsis"},
    {field: 'order.deliveryAddress', title: '送货地址',},
  ],//表头按钮
  toolbarConfig: {
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -26,7 +26,7 @@
          ElMessage.success("排版成功")
          location.reload();
        } else {
          console.log(res.code)
          ElMessage.warning(res.msg)
        }
      })
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue
@@ -45,17 +45,14 @@
let filterData = ref({
  orderGlassDetail: {
    productName: '',
    computeArea: '',
    quantity: '',
    computeGrossArea: '',
    perimeter: '',
    bendRadius: '',
    processingNote: ''
    productionId: '',
  },
  orderDetail:{
    orderDetail:''
    orderId:'',
    productId:'',
    productName:'',
  }
})
//定义页面总页数
@@ -116,7 +113,7 @@
  }
console.log(filterData.value)
  request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => {
    if (res.code == 200) {
      pageTotal.value = res.data.total
@@ -170,29 +167,30 @@
    {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: '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: 'orderId',  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },  },
    {field: 'orderGlassDetail.productionId', title: '生产订单号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId', title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' },},
    {field: 'orderDetail.quantity', title: '总数量',showOverflow:"ellipsis"},
    {field: 'orderDetail.computeGrossArea', title: '总面积', },
    {field: 'orderDetail.perimeter', title: '周长',},
  ],//表头按钮
  toolbarConfig: {
    // buttons: [{
    //
    // }],
    import: false,
    export: true,
    print: true,
    // import: false,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
  data: null,//表格数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['总数量','总面积']
    console.log(columns,data)
    let footList=['data.orderDetail.quantity','data.orderDetail.computeGrossArea']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -12,6 +12,7 @@
import org.springframework.web.bind.annotation.*;
import java.sql.Date;
import java.util.Map;
@RestController
@RequestMapping("/processCard")
@@ -45,8 +46,8 @@
    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));
    }
@@ -85,9 +86,21 @@
    public Result SelectNoCard(
            @PathVariable String orderId,
            @PathVariable String productionId,
            @RequestBody OrderDetail orderDetail){
        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,orderDetail));
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard));
    }
    //添加流程卡
    @PostMapping("/addFlowCard")
    public Result AddOrderWork( @RequestBody Map<String,Object> object){
        System.out.println("obj:"+object);
        if(flowCardService.AddFlowCardSv(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"保存失败");
        }
    }
}
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java
@@ -27,7 +27,7 @@
    //工艺确认序号
    private Integer technologyNumber;
    //分架数量
    private Integer binningQuantity;
    private Integer quantity;
    //已优化数量
    private Integer optimizeQuantity;
    //排版状态
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -8,6 +8,7 @@
import java.sql.Date;
import java.util.List;
import java.util.Map;
@Mapper
public interface FlowCardMapper {
@@ -18,13 +19,13 @@
    List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard);
    //分架明细查询
    List<OrderDetail> DetailsSelectMp(String orderId, OrderDetail orderDetail);
    List<FlowCard> DetailsSelectMp(String orderId, FlowCard flowCard);
    //删除工单
    Boolean DeleteFlowCardMp(String orderId, String processId);
    //分架新增明细查询
    List<OrderDetail> SelectNoCardMp(String orderId, String productionId, OrderDetail orderDetail);
    List<Map<String,String>> SelectNoCardMp(String orderId, String productionId, FlowCard flowCard);
    //修改排版状态
    Boolean UpdateLayoutStatusMp(String processId);
@@ -32,4 +33,15 @@
    Integer SelectLayoutStatus(String processId);
    Integer ReportingWorkCount(String processId);
    Boolean AddFlowCardMp(String processId, Integer orderNumber, Integer landingSequence, Integer quantity, String productionId, String userName);
    Boolean UpdateFlowState(String productionId, Integer orderNumber);
    Integer SelectFlowCount(String productionId);
    Boolean UpdateProcessingCard(String productionId, int state);
    Boolean UpdateDeleteState(String orderId, String processId);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -1,6 +1,8 @@
package com.example.erp.service.pp;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
@@ -12,6 +14,7 @@
import java.sql.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@@ -36,9 +39,9 @@
    }
    //分架明细查询
    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;
    }
@@ -47,6 +50,9 @@
        if (!orderId.isEmpty() && !processId.isEmpty()) {
            Integer count=flowCardMapper.ReportingWorkCount(processId);
            if (count==0){
                //修改分架状态
                flowCardMapper.UpdateDeleteState(orderId, processId);
                //删除分架明细
                flowCardMapper.DeleteFlowCardMp(orderId, processId);
                return true;
            }
@@ -60,9 +66,9 @@
    }
    //分架新增明细查询
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, OrderDetail orderDetail) {
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.SelectNoCardMp(orderId, productionId, orderDetail));
        map.put("data", flowCardMapper.SelectNoCardMp(orderId, productionId, flowCard));
        return map;
    }
@@ -72,7 +78,7 @@
        if (!processId.isEmpty()) {
            Integer Status = flowCardMapper.SelectLayoutStatus(processId);
            if (Status == 0) {
            if (Status == 1) {
                flowCardMapper.UpdateLayoutStatusMp(processId);
            } else {
                return false;
@@ -83,4 +89,42 @@
            return false;
        }
    }
    public Boolean AddFlowCardSv(Map<String, Object> object) {
        String userName = "";
        if (object.get("userName") != null) {
            userName = object.get("userName").toString();
        }
        String productionId = "";
        if (object.get("productionId") != null) {
            productionId = object.get("productionId").toString();
        }
        List<FlowCard> FlowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class);
        if (!FlowCardList.isEmpty()) {
            for (FlowCard flowCard : FlowCardList) {
                //添加流程卡数据
                flowCardMapper.AddFlowCardMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getLandingSequence(),flowCard.getQuantity(),productionId,userName);
                //修改分架状态,将状态改为1
                flowCardMapper.UpdateFlowState(productionId,flowCard.getOrderNumber());
                //查询该订单未分架数量
               Integer FlowCount= flowCardMapper.SelectFlowCount(productionId);
               if (FlowCount==0){
                   //修改订单表分架状态为2
                   System.out.println("我来试试1");
                   flowCardMapper.UpdateProcessingCard(productionId,2);
               }
               else{
                   //修改订单表分架状态为1,未全部分架完成
                   System.out.println("我来试试2");
                   flowCardMapper.UpdateProcessingCard(productionId,1);
               }
            }
            return  true;
        } else {
            return  false;
        }
    }
}
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java
@@ -36,6 +36,7 @@
    public Map<String, Object> AddDateWork(String orderId, OrderDetail orderDetail) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", workOrderMapper.addWordOrder(orderId, orderDetail));
        return map;
    }
@@ -57,22 +58,29 @@
        if (!orderDetaillist.isEmpty()) {
            for (OrderDetail orderDetail : orderDetaillist) {
                //生成生产订单号
                for (int i = 0; i < count; i++) {
                    letters = lettr++;
                    productIdVl = orderID + letters;
                    //查询生成的生产订单号是否存在
                    Integer workCount = workOrderMapper.SelectOrderNumber(productIdVl);
                    System.out.println("生产订单号:" + productIdVl + " 查询结果:" + workCount);
                    if (workCount < 1) {
                        break;
                    }
                }
                System.out.println(productIdVl);
                //添加生产订单
                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) {
                    //条数为0修改转生产订单状态为2,否则为1
                    workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), State);
                } else {
                    workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), States);
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
New file
@@ -0,0 +1,284 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.erp.mapper.pp.FlowCardMapper">
    <resultMap id="flowCardMap" type="com.example.erp.entity.pp.FlowCard">
        <result column="order_id" property="orderId"/>
        <result column="process_Id" property="processId"/>
        <result column="quantity" property="quantity"/>
        <result column="founder" property="founder"/>
        <result column="create_time" property="createTime"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="project" property="project"/>
            <result column="order_id" property="orderId"/>
            <result column="customer_name" property="customerName"/>
            <result column="batch" property="batch"/>
            <result column="other_remarks" property="otherRemarks"/>
            <result column="icon" property="icon"/>
            <result column="order_type" property="orderType"/>
            <result column="salesman" property="salesman"/>
            <result column="processing_note" property="processingNote"/>
            <result column="delivery_address" property="deliveryAddress"/>
        </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_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"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <!--    流程卡管理查询-->
    <select id="selectFlowCard" resultMap="flowCardMap">
        select
        a.order_Id,
        a.process_Id,
        c.product_id,
        c.product_name,
        b.project,
        a.quantity,
        c.compute_gross_area,
        a.founder,
        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}
                    <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>
        group by a.process_Id;
    </select>
    <!--分架查询-->
    <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
        left join sd.order_glass_detail ogd on o.order_id = ogd.order_id
        where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and #{selectTime2}
        <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
            and o.order_id, regexp #{flowCard.order.orderId}
        </if>
        <if test="flowCard.order.customerName != null and flowCard.order.customerName != ''">
            and o.customer_name regexp #{flowCard.order.customerName}
        </if>
        <if test="flowCard.order.project != null and flowCard.order.project != ''">
            and o.project regexp #{flowCard.order.project}
        </if>
        <if test="flowCard.order.batch != null and flowCard.order.batch!= ''">
            and o.batch regexp #{flowCard.order.batch}
        </if>
        <if test="flowCard.order.otherRemarks != null and flowCard.order.otherRemarks!= ''">
            and o.other_remarks regexp #{flowCard.order.otherRemarks}
        </if>
        <if test="flowCard.order.icon != null and flowCard.order.icon!= ''">
            and o.icon regexp #{flowCard.order.icon}
        </if>
        <if test="flowCard.order.orderType != null and flowCard.order.orderType!= ''">
            and o.order_type regexp #{flowCard.order.orderType}
        </if>
        <if test="flowCard.order.salesman != null and flowCard.order.salesman!= ''">
            and o.salesman regexp #{flowCard.order.salesman}
        </if>
        group by o.order_id
        ;
    </select>
<!--    分架明细查询-->
    <select id="DetailsSelectMp" resultMap="flowCardMap">
        select od.order_id,
        ogd.production_id,
        od.product_id,
        od.product_name,
        SUM( od.quantity) as quantity,
        SUM(od.compute_gross_area) as 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
        where od.order_id = #{orderId} and ogd.splitting_status=0
        <if test="flowCard.orderDetail.orderId != null and flowCard.orderDetail.orderId != ''">
            and od.order_id regexp #{flowCard.orderDetail.orderId}
        </if>
        <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
            and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
        </if>
        <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
            and od.product_id regexp #{flowCard.orderDetail.productId}
        </if>
        <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''">
            and od.product_name regexp #{flowCard.orderDetail.productName}
        </if>
        group by od.order_id, ogd.production_id
    </select>
    <update id="UpdateDeleteState">
        update sd.order_glass_detail as ogd
        set ogd.production_id=null,
            ogd.production_time=null,
            ogd.founder=null
        where ogd.production_id = #{processId}
    </update>
    <!--    删除流程卡-->
    <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 ogd.production_id = #{processId}
    </update>
    <!--    分架新增明细查询-->
    <!--resultMap="flowCardMap"-->
    <select id="SelectNoCardMp" >
        select
        od.order_number,
        od.order_number AS 'orderNumber',
        od.width,
        od.height,
        od.shape,
        od.quantity,
        od.compute_gross_area,
        p.total_thickness,
        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 and od.order_number=ogd.order_number
        left join sd.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId} and ogd.production_id=#{productionId} and ogd.splitting_status=0
        GROUP BY od.order_number;
    </select>
    <!--修改排版状态-->
    <update id="UpdateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=2
        where fc.process_id = #{processId}
    </update>
<!--    查询对应流程卡号排版状态-->
    <select id="SelectLayoutStatus">
        select fc.layout_status
        from flow_card as fc
        where fc.process_id = #{processId}
        LIMIT 1
    </select>
<!--    查询报工表内是否有对应流程卡-->
    <select id="ReportingWorkCount">
        select COUNT(rw.process_id)
        from reporting_work as rw
        where rw.process_id = #{processId}
    </select>
<!--    插入Flow_card表-->
    <insert id="AddFlowCardMp">
        insert into
            flow_card (
            order_id,
            production_id,
            process_id,
            landing_sequence,
            order_number,
            technology_number,
            quantity,
            founder,
            splitFrame_time,
            create_time
        )
        select
            ogd.order_id,
            ogd.production_id,
            #{processId},
            #{landingSequence},
            ogd.order_number,
            ogd.technology_number,
            #{quantity},
            #{userName},
            NOW(),
            NOW()
        from sd.order_glass_detail as ogd
        where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber}
        GROUP BY ogd.technology_number
    </insert>
<!--    更新分架状态-->
    <update id="UpdateFlowState">
        update sd.order_glass_detail as ogd
        set ogd.splitting_status=1
        where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber}
    </update>
<!--    查询未分架的条数-->
    <select id="SelectFlowCount">
        select COUNT(*)
        from sd.order_glass_detail as ogd
        where ogd.order_id = left(#{productionId},10)
          and ogd.splitting_status = 0
    </select>
<!--   修改订单表分架状态-->
    <update id="UpdateProcessingCard">
        update sd.`order` as o
        set o.processing_card=#{state}
        where o.order_id=left(#{productionId},10)
    </update>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -112,13 +112,13 @@
        select od.order_id,
               od.product_id,
               od.product_name,
               od.quantity,
        sum( od.quantity) as quantity,
               od.compute_gross_area,
               od.perimeter
        from order_detail as od
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id
        where od.order_id = #{orderId}  and ISNULL(ogd.production_id)
        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
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
@@ -132,8 +132,8 @@
        ;
    </select>
    <select id="SelectOrderNumber" resultMap="wordOrderMap">
        select count(ogd.production_id)
    <select id="SelectOrderNumber" >
        select ifnull(count(ogd.production_id),0)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productIdVl}
    </select>
@@ -151,6 +151,7 @@
          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
north-glass-erp/target/classes/mapper/pp/FolwCard.xml
@@ -6,7 +6,7 @@
    <resultMap id="flowCardMap" type="com.example.erp.entity.pp.FlowCard">
        <result column="order_id" property="orderId"/>
        <result column="process_Id" property="processId"/>
        <result column="binning_quantity" property="binningQuantity"/>
        <result column="quantity" property="quantity"/>
        <result column="founder" property="founder"/>
        <result column="create_time" property="createTime"/>
        <!--接收其他外键实体类数据-->
@@ -56,7 +56,7 @@
        c.product_id,
        c.product_name,
        b.project,
        a.binning_quantity,
        a.quantity,
        c.compute_gross_area,
        a.founder,
        c.processing_note
@@ -97,27 +97,37 @@
        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>-->
        left join sd.order_glass_detail ogd on o.order_id = ogd.order_id
        where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and #{selectTime2}
        <!--            <if test="flowCard.order.project != null and flowCard.order.project!= ''">-->
        <!--                and b.project regexp #{flowCard.order.project}-->
        <!--            </if>-->
        <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
            and o.order_id, regexp #{flowCard.order.orderId}
        </if>
        <if test="flowCard.order.customerName != null and flowCard.order.customerName != ''">
            and o.customer_name regexp #{flowCard.order.customerName}
        </if>
        <if test="flowCard.order.project != null and flowCard.order.project != ''">
            and o.project regexp #{flowCard.order.project}
        </if>
        <if test="flowCard.order.batch != null and flowCard.order.batch!= ''">
            and o.batch regexp #{flowCard.order.batch}
        </if>
        <if test="flowCard.order.otherRemarks != null and flowCard.order.otherRemarks!= ''">
            and o.other_remarks regexp #{flowCard.order.otherRemarks}
        </if>
        <!--        </where>-->
        <if test="flowCard.order.icon != null and flowCard.order.icon!= ''">
            and o.icon regexp #{flowCard.order.icon}
        </if>
        <if test="flowCard.order.orderType != null and flowCard.order.orderType!= ''">
            and o.order_type regexp #{flowCard.order.orderType}
        </if>
        <if test="flowCard.order.salesman != null and flowCard.order.salesman!= ''">
            and o.salesman regexp #{flowCard.order.salesman}
        </if>
        group by o.order_id
        ;
    </select>
@@ -127,30 +137,37 @@
               ogd.production_id,
               od.product_id,
               od.product_name,
               od.quantity,
               od.compute_gross_area,
        SUM( od.quantity) as quantity,
        SUM(od.compute_gross_area) as compute_gross_area,
               od.perimeter
        from sd.order_detail as od
                 left join sd.order_glass_detail as ogd
        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
        where od.order_id = #{orderId}
<!--        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">-->
<!--            and od.order_id regexp #{orderDetail.orderId}-->
<!--        </if>-->
<!--        <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">-->
<!--            and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}-->
<!--        </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>-->
        where od.order_id = #{orderId} and ogd.splitting_status=0
        <if test="flowCard.orderDetail.orderId != null and flowCard.orderDetail.orderId != ''">
            and od.order_id regexp #{flowCard.orderDetail.orderId}
        </if>
        <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
            and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
        </if>
        <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
            and od.product_id regexp #{flowCard.orderDetail.productId}
        </if>
        <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''">
            and od.product_name regexp #{flowCard.orderDetail.productName}
        </if>
        group by od.order_id, ogd.production_id
    </select>
    <update id="UpdateDeleteState">
        update sd.order_glass_detail as ogd
        set ogd.production_id=null,
            ogd.production_time=null,
            ogd.founder=null
        where ogd.production_id = #{processId}
    <!--    删除工单-->
    </update>
    <!--    删除流程卡-->
    <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
@@ -158,19 +175,26 @@
            ogd.production_time=null,
            ogd.founder=null
        where od.order_id = #{orderId}
          and od.product_name = #{productName}
          and ogd.production_id = #{processId}
    </update>
    <!--    分架新增明细查询-->
    <select id="SelectNoCardMp" resultMap="flowCardMap">
    <!--resultMap="flowCardMap"-->
    <select id="SelectNoCardMp" >
        select
        od.order_number,
        od.order_number AS 'orderNumber',
        od.width,
        od.height,
        od.shape,
        od.quantity,
        od.compute_gross_area,
        p.total_thickness,
        od.quantity as baiscQuantity,
        od.compute_gross_area as 'computeGrossArea',
        p.total_thickness AS 'totalThickness',
        p.thickness,
        od.weight
        from
@@ -178,19 +202,6 @@
        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.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId}and ogd.production_id=#{productionId} and ogd.splitting_status=0
        <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;
@@ -199,7 +210,7 @@
    <!--修改排版状态-->
    <update id="UpdateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=1
        set fc.layout_status=2
        where fc.process_id = #{processId}
    </update>
@@ -217,4 +228,57 @@
        from reporting_work as rw
        where rw.process_id = #{processId}
    </select>
<!--    插入Flow_card表-->
    <insert id="AddFlowCardMp">
        insert into
            flow_card (
            order_id,
            production_id,
            process_id,
            landing_sequence,
            order_number,
            technology_number,
            quantity,
            founder,
            splitFrame_time,
            create_time
        )
        select
            ogd.order_id,
            ogd.production_id,
            #{processId},
            #{landingSequence},
            ogd.order_number,
            ogd.technology_number,
            #{quantity},
            #{userName},
            NOW(),
            NOW()
        from sd.order_glass_detail as ogd
        where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber}
        GROUP BY ogd.technology_number
    </insert>
<!--    更新分架状态-->
    <update id="UpdateFlowState">
        update sd.order_glass_detail as ogd
        set ogd.splitting_status=1
        where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber}
    </update>
<!--    查询未分架的条数-->
    <select id="SelectFlowCount">
        select COUNT(*)
        from sd.order_glass_detail as ogd
        where ogd.order_id = left(#{productionId},10)
          and ogd.splitting_status = 0
    </select>
<!--   修改订单表分架状态-->
    <update id="UpdateProcessingCard">
        update sd.`order` as o
        set o.processing_card=#{state}
        where o.order_id=left(#{productionId},10)
    </update>
</mapper>
north-glass-erp/target/classes/mapper/pp/WordOrder.xml
@@ -112,13 +112,13 @@
        select od.order_id,
               od.product_id,
               od.product_name,
               od.quantity,
        sum( od.quantity) as quantity,
               od.compute_gross_area,
               od.perimeter
        from order_detail as od
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id
        where od.order_id = #{orderId}  and ISNULL(ogd.production_id)
        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
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
@@ -132,8 +132,8 @@
        ;
    </select>
    <select id="SelectOrderNumber" resultMap="wordOrderMap">
        select count(ogd.production_id)
    <select id="SelectOrderNumber" >
        select ifnull(count(ogd.production_id),0)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productIdVl}
    </select>
@@ -151,6 +151,7 @@
          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