NNowhZzU
2024-01-26 6f2a4980f4ca7a794b103cfde9946a905c5ba399
Merge remote-tracking branch 'origin/master'

# Conflicts:
# north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue
32个文件已修改
3 文件已重命名
29个文件已添加
3125 ■■■■ 已修改文件
.gitignore 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/.idea/dataSources.local.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/package-lock.json 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue 313 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue 258 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue 377 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 333 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/pom.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/OrderTestController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/BasicDataController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/OrderTest.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedGoodsInventory.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedOperateLog.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/BaseBom.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/Device.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/DeviceMaintenance.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/OrderBom.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/SetupBom.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/WorkprogressMonthlySettlement.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/BasicData.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderDetail.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderGlassDetail.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/OrderTestMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | 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/mapper/sd/BasicDateMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/impl/OrderServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java 91 ●●●●● 补丁 | 查看 | 原始文档 | 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 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicDateService.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/application.yml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml 398 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/BasicData.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/test/java/com/example/erp/service/sd/BasicDateServiceTest.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/test/java/com/example/erp/service/sd/OrderServiceTest.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/application.yml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/FolwCard.xml 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/WordOrder.xml 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/BasicData.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/OrderMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/Product.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -10,3 +10,6 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# Ignore .idea files
**/.idea/
north-glass-erp/.idea/dataSources.local.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="dataSourceStorageLocal" created-in="IU-232.9559.62">
  <component name="dataSourceStorageLocal" created-in="IU-232.8660.185">
    <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
      <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0">
        <extra-name-characters>#@</extra-name-characters>
@@ -23,18 +23,14 @@
      <database-info product="MySQL" version="8.0.19" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.19" exact-driver-version="8.0">
        <extra-name-characters>#@</extra-name-characters>
        <identifier-quote-string>`</identifier-quote-string>
        <jdbc-catalog-is-schema>true</jdbc-catalog-is-schema>
      </database-info>
      <case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" />
      <secret-storage>master_key</secret-storage>
      <user-name>root</user-name>
      <schema-mapping>
        <introspection-scope>
          <node kind="schema">
            <name qname="erp_user_info" />
            <name qname="mm" />
            <name qname="pp" />
            <name qname="sd" />
          </node>
          <node kind="schema" negative="1" />
        </introspection-scope>
      </schema-mapping>
    </data-source>
north-glass-erp/northglass-erp/package-lock.json
@@ -12,6 +12,7 @@
        "@vue-macros/reactivity-transform": "^0.3.23",
        "axios": "^1.5.1",
        "element-plus": "^2.4.0",
        "moment": "^2.30.1",
        "pinia": "^2.1.6",
        "pinia-plugin-persistedstate": "^3.2.0",
        "sortablejs": "^1.15.1",
@@ -1204,6 +1205,14 @@
        "node": ">= 0.6"
      }
    },
    "node_modules/moment": {
      "version": "2.30.1",
      "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
      "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
      "engines": {
        "node": "*"
      }
    },
    "node_modules/nanoid": {
      "version": "3.3.6",
      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
@@ -2323,6 +2332,11 @@
        "mime-db": "1.52.0"
      }
    },
    "moment": {
      "version": "2.30.1",
      "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
      "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
    },
    "nanoid": {
      "version": "3.3.6",
      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
north-glass-erp/northglass-erp/package.json
@@ -12,6 +12,7 @@
    "@vue-macros/reactivity-transform": "^0.3.23",
    "axios": "^1.5.1",
    "element-plus": "^2.4.0",
    "moment": "^2.30.1",
    "pinia": "^2.1.6",
    "pinia-plugin-persistedstate": "^3.2.0",
    "sortablejs": "^1.15.1",
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
@@ -2,7 +2,12 @@
import {reactive, ref} from "vue";
import {useRouter} from  'vue-router'
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import VXETable from "vxe-table";
let router=useRouter()
let produceList = ref([])
let tableRef = ref([])
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
@@ -21,6 +26,109 @@
    }
  }
}
const hasDecimal=(value)=>{
  const regex=/\./ // 定义正则表达式,查找小数点
  return regex.test(value) //返回true/false
}
const hasDecimalhtml=(item,row)=>{
  let aa=item.split('.').length
  if (aa===2){
    return row[item.split('.')[0]][item.split('.')[1]]
  }else if(aa===3){
    return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]]
  }
}
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
  orderDetail:{
    orderNumber:'',
    productName:'',
    productId:'',
    width:'',
    height:'',
    quantity:''
  },
  order:{
    orderId:'',
    creater:'',
    project:'',
    area:'',
    batch:''
  }
})
//第一次调用
request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data)
    pageTotal.value=res.data.total
    pageNum=1
    produceList = deepClone(res.data.data)
    xGrid.value.loadData(produceList)
    gridOptions.loading=false
  }else{
    ElMessage.warning(res.msg)
    router.push("/login")
  }
})
//定义页面总页数
let pageTotal=ref('')
//定义当前页数
let pageNum=$ref(1)
let pageState = null
/*使用筛选,后端获取数据*/
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("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      pageTotal.value=res.data.total
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
@@ -55,34 +163,29 @@
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: '50'},
    {type:'expand',fixed:"left",slots: { content:'content' },width: '60'},
    { type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    { type: 'seq',fixed:"left", title: '自序', width: '80' },
    // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"},
    {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'floorNumber', width: '120',title: '楼层编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'finishedProductNumber',width: '100', title: '成品编号', sortable: true,showOverflow:"ellipsis"},
    {field: 'finishedProductName', width: '100',title: ' 成品名称', sortable: true},
    {field: 'productName',width: '100', title: '产品名称', sortable: true},
    {field: 'length', width: '100',title: '长度', sortable: true},
    {field: 'width',width: '100', title: '宽度', sortable: true},
    {field: 'salesperson', width: '100',title: '业务员', sortable: true},
    {field: 'customerName',width: '100', title: '客户名称', sortable: true},
    {field: 'projectName', width: '100',title: '项目名称', sortable: true},
    {field: 'orderNumber',width: '140', title: '订序', sortable: true},
    {field: 'totalOrders',width: '140', title: '订单总数', sortable: true},
    {field: 'quantity',width: '100', title: '数量', sortable: true},
    {field: 'completion',width: '140', title: '完工', sortable: true},
    {field: 'area',width: '140', title: '面积', sortable: true},
    {field: 'processCardNumber',width: '100', title: '流程卡号', sortable: true},
    {field: 'quantityEntered',width: '100', title: '已入数量', sortable: true},
    {field: 'nextProcess',width: '100', title: ' 下工序', sortable: true},
    {field: 'Batch',width: '100', title: '批次', sortable: true},
    {field: 'order.orderId', width: '150',title: '销售单号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.buildingNumber', width: '120',title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId',width: '100', title: '产品编号', filters:[{ data: '' }],showOverflow:"ellipsis",slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName',width: '100', title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.width', width: '100',title: '宽度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.height',width: '100', title: '高度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.creater', width: '100',title: '业务员', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.project', width: '100',title: '项目名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderNumber',width: '140', title: '订序', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.quantity',width: '140', title: '订单总数', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'inventoryQuantity',width: '100', title: '完工数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.area',width: '140', title: '面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'processId',width: '100', title: '流程卡号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'receivedQuantity',width: '100', title: '已入数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.batch',width: '100', title: '批次', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
  ],//表头按钮
  toolbarConfig: {
    buttons: [{
      'name': '确认入库',status: 'primary',
      'code':'add'
    }
      ],
@@ -91,103 +194,15 @@
    print: true,
    zoom: true,
    custom: true
  },
  data:  [
    {
      "SalesOrderNumber": "NG23072003",
      "floorNumber": "10059419",
      "finishedProductNumber": "0604000027",
      "finishedProductName": "NG23072003A01",
      "productName": '钢化玻璃',
      "length": "1075.00",
      "width": "440.00",
      "salesperson": "小岳",
      "customerName": "大头",
      "projectName": "Tempered Glass",
      "orderNumber": "1",
      "totalOrders": "3800",
      "quantity": "1140",
      "completion":'1140',
      "area": "505.270000",
      "processCardNumber": "NG23112311A01",
      "quantityEntered": "0",
      "nextProcess": "Finished Product",
      "Batch": "一",
    },
    {
      "SalesOrderNumber": "NG23072003",
      "floorNumber": "10059419",
      "finishedProductNumber": "0604000027",
      "finishedProductName": "NG23072003A01",
      "productName": '钢化玻璃',
      "length": "1075.00",
      "width": "440.00",
      "salesperson": "小岳",
      "customerName": "大头",
      "projectName": "Tempered Glass",
      "orderNumber": "1",
      "totalOrders": "3800",
      "quantity": "1140",
      "completion":'1140',
      "area": "505.270000",
      "processCardNumber": "NG23112311A01",
      "quantityEntered": "0",
      "nextProcess": "Finished Product",
      "Batch": "一",
    },
    {
      "SalesOrderNumber": "NG23072003",
      "floorNumber": "10059419",
      "finishedProductNumber": "0604000027",
      "finishedProductName": "NG23072003A01",
      "productName": '钢化玻璃',
      "length": "1075.00",
      "width": "440.00",
      "salesperson": "小岳",
      "customerName": "大头",
      "projectName": "Tempered Glass",
      "orderNumber": "1",
      "totalOrders": "3800",
      "quantity": "1140",
      "completion":'1140',
      "area": "505.270000",
      "processCardNumber": "NG23112311A01",
      "quantityEntered": "0",
      "nextProcess": "Finished Product",
      "Batch": "一",
    },
    {
      "SalesOrderNumber": "NG23072003",
      "floorNumber": "10059419",
      "finishedProductNumber": "0604000027",
      "finishedProductName": "NG23072003A01",
      "productName": '钢化玻璃',
      "length": "1075.00",
      "width": "440.00",
      "salesperson": "小岳",
      "customerName": "大头",
      "projectName": "Tempered Glass",
      "orderNumber": "1",
      "totalOrders": "3800",
      "quantity": "1140",
      "completion":'1140',
      "area": "505.270000",
      "processCardNumber": "NG23112311A01",
      "quantityEntered": "0",
      "nextProcess": "Finished Product",
      "Batch": "一",
    },
  ],//table body实际数据
  }
  ,//table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
          return `页数:${pageNum}/${pageTotal.value}`
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        return ''
      })
    ]
@@ -195,14 +210,64 @@
})
const  xGrid = ref();
const storageRegion = ref(null);
const remark = ref(null);
const flowcard = ref(null);
const gridEvents = {
  toolbarButtonClick ({ code }) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'add': {
          alert('我接收到子组件传送的编辑信息')
          return;
          //判断输入框值不能为null
          if(storageRegion.value!==null && storageRegion.value!=""){
            const $table = xGrid.value
            if ($table) {
              const selectRecords = $table.getCheckboxRecords()
              //循环获取选中的复选框
              for (let i=0;i<selectRecords.length;i++){
                //定义后端需要的参数
                let flowData = ref({
                  finishedGoodsInventory:{
                    storageRegion:storageRegion.value,
                    remark:remark.value
                  },
                  flowcard:selectRecords[0]
                })
                console.log(flowcard.value)
                request.post("/FinishedGoodsInventory/addseletwarehousing",flowData.value).then((res) => {
                 /* request.post("/FinishedGoodsInventory/addseletwarehousing/"+storageRegion.value+"/"+remark.value,flowData.value).then((res) => {*/
                  if(res.code===200){
                    alert(`入库成功`)
                    request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => {
                      if(res.code===200){
                        console.log(res.data)
                        pageTotal.value=res.data.total
                        pageNum=1
                        produceList = deepClone(res.data.data)
                        xGrid.value.loadData(produceList)
                        gridOptions.loading=false
                      }else{
                        ElMessage.warning(res.msg)
                        router.push("/login")
                      }
                    })
                  }else{
                    ElMessage.warning(res.msg)
                    router.push("/login")
                  }
                })
              }
            }
            return;
          }else{
            alert(`请输入库位`)
          }
        }
      }
@@ -215,6 +280,17 @@
<template>
  <div class="main-div-customer">
    <div id="selectForm">
        <el-input style="width: 200px" v-model="storageRegion" class="m-2" placeholder="请输入库位">
      </el-input>
        <el-input style="width: 200px" v-model="remark" class="m-2" placeholder="请输入备注">
        </el-input>
    </div>
    <vxe-grid
        max-height="100%"
        @filter-change="filterChanged"
@@ -227,9 +303,10 @@
      <!--      下拉显示所有信息插槽-->
      <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,key,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{item.title+':  '}}</span>
            <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span>
            <span v-else>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
@@ -2,7 +2,11 @@
import {reactive, ref} from "vue";
import {useRouter} from  'vue-router'
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
let router=useRouter()
let produceList = ref([])
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
@@ -20,6 +24,100 @@
      break
    }
  }
}
const hasDecimal=(value)=>{
  const regex=/\./ // 定义正则表达式,查找小数点
  return regex.test(value) //返回true/false
}
const hasDecimalhtml=(item,row)=>{
  let aa=item.split('.').length
  if (aa===2){
    return row[item.split('.')[0]][item.split('.')[1]]
  }else if(aa===3){
    return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]]
  }
}
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
  orderDetail:{
    orderNumber:'',
    productName:'',
    productId:'',
    width:'',
    height:''
  },
  order:{
    orderId:'',
    orderType:'',
    project:''
  }
})
//第一次调用
request.post("/FinishedGoodsInventory/getselet/1/100",filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data)
    pageTotal.value=res.data.total
    pageNum=1
    produceList = deepClone(res.data.data)
    xGrid.value.loadData(produceList)
    gridOptions.loading=false
  }else{
    ElMessage.warning(res.msg)
    router.push("/login")
  }
})
//定义页面总页数
let pageTotal=ref('')
//定义当前页数
let pageNum=$ref(1)
let pageState = null
/*使用筛选,后端获取数据*/
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("/FinishedGoodsInventory/getselet/1/100",filterData.value).then((res) => {
    if(res.code==200){
      console.log(res.data.data)
      pageTotal.value=res.data.total
      pageNum=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
    }
  })
}
@@ -55,40 +153,33 @@
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: '50'},
    {type:'expand',fixed:"left",slots: { content:'content' },width: '60'},
    // { type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    { type: 'seq',fixed:"left", title: '自序', width: '80' },
    // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"},
    {field: 'OrderNumber', width:'150', title: '订单序号', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } },
    {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'ProjectName', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'OrderType', width: '100',title: '订单类型', sortable: true},
    {field: 'ProcessCardNumber',width: '100', title: '流程卡号', sortable: true,showOverflow:"ellipsis"},
    {field: 'ProductName', width: '100',title: '产品名称', sortable: true},
    {field: 'ProductNumber',width: '100', title: '产品编号', sortable: true},
    {field: 'CustomerNumber', width: '100',title: '客户编号', sortable: true},
    {field: 'CustomerName',width: '100', title: '客户名称', sortable: true},
    {field: 'Length', width: '100',title: '长度', sortable: true},
    {field: 'Width',width: '100', title: '宽度', sortable: true},
    {field: 'Thickness', width: '100',title: '厚度', sortable: true},
    {field: 'InventoryCount',width: '140', title: '库存数', sortable: true},
    {field: 'ActualSingleArea',width: '140', title: '实际单片面积', sortable: true},
    {field: 'Area',width: '100', title: '面积', sortable: true},
    {field: 'SettlementSingleArea',width: '140', title: '结算单片面积', sortable: true},
    {field: 'SettlementTotalArea',width: '140', title: '结算总面积', sortable: true},
    {field: 'AvailableQuantity',width: '100', title: '可用数量', sortable: true},
    {field: 'FloorNumber',width: '100', title: '楼层编号', sortable: true},
    {field: 'DeliveryAddress',width: '100', title: '送货地址', sortable: true},
    {field: 'Batch',width: '100', title: '批次', sortable: true},
    {field: 'Salesman',width: '100', title: '业务员', sortable: true},
    {field: 'OrdinaryMillimeter',width: '100', title: '平凡毫米', sortable: true},
    {field: 'Weight',width: '100', title: '重量', sortable: true},
    {field: 'LastWarehousingDate',width: '140', title: '最后入库日期', sortable: true},
    {field: 'LocationNumber',width: '100', title: '库位编号', sortable: true},
    {field: 'StorageArea',width: '100', title: '存储区域', sortable: true},
    {field: 'Location',width: '100', title: '库位', sortable: true},
    {field: 'DocumentStatus',width: '100', title: '单据状态', sortable: true},
    {field: 'remark',width: '80', title: '备注', sortable: true},
    {field: 'orderDetail.orderNumber', width:'150', title: '订单序号', filters:[{ data: '' }],editRender: { name: 'input', attrs: { placeholder: '' } } },
    {field: 'order.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.project', width: '120',title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.orderType', width: '100',title: '订单类型', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName', width: '100',title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId',width: '100', title: '产品编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.width', width: '100',title: '宽度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.height',width: '100', title: '高度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'inventory',width: '140', title: '库存数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'quantityAvailable',width: '140', title: '可用数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'actualSignalArea',width: '140', title: '实际单片面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'area',width: '100', title: '总面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    /*{field: 'warehouseNumber',width: '100', title: '仓库编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},*/
    {field: 'storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'status',width: '100', title: '状态', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'enterStorageTime',width: '140', title: '入库时间', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'updateTime',width: '140', title: '修改时间', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'endTime',width: '100', title: '出库时间', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'remark',width: '80', title: '备注', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
  ],//表头按钮
  toolbarConfig: {
    buttons: [
@@ -103,109 +194,13 @@
    zoom: true,
    custom: true
  },
  data:  [
    {
      "OrderNumber": "1",
      "SalesOrderNumber": "NG23072003",
      "ProjectName": "钢化玻璃",
      "OrderType": "普通订单",
      "ProcessCardNumber": "NG23072003A01",
      "ProductName": '',
      "ProductNumber": "06040000022",
      "CustomerNumber": "KD0071",
      "CustomerName": "件",
      "Length": "1075.00",
      "Width": "440.00",
      "Thickness": "3.00",
      "InventoryCount": "360",
      "ActualSingleArea": "0.473000",
      "Area": "170.28",
      "SettlementSingleArea": "0.47",
      "SettlementTotalArea": "170.28",
      "AvailableQuantity": "360",
      "FloorNumber": "10927769",
      "DeliveryAddress": "上海",
      "Batch": "测试",
      "OrdinaryMillimeter": "陈宗凯",
      "Weight": "1915.6500",
      "LastWarehousingDate": "2023-09-22 08:31:17",
      "LocationNumber": "成品库",
      "StorageArea": "测试",
      "Location": "2",
      "DocumentStatus": "1",
      "Remarks": "测试",
    },
    {
      "OrderNumber": "1",
      "SalesOrderNumber": "NG23072003",
      "ProjectName": "钢化玻璃",
      "OrderType": "普通订单",
      "ProcessCardNumber": "NG23072003A01",
      "ProductName": '',
      "ProductNumber": "06040000022",
      "CustomerNumber": "KD0071",
      "CustomerName": "件",
      "Length": "1075.00",
      "Width": "440.00",
      "Thickness": "3.00",
      "InventoryCount": "360",
      "ActualSingleArea": "0.473000",
      "Area": "170.28",
      "SettlementSingleArea": "0.47",
      "SettlementTotalArea": "170.28",
      "AvailableQuantity": "360",
      "FloorNumber": "10927769",
      "DeliveryAddress": "上海",
      "Batch": "测试",
      "OrdinaryMillimeter": "陈宗凯",
      "Weight": "1915.6500",
      "LastWarehousingDate": "2023-09-22 08:31:17",
      "LocationNumber": "成品库",
      "StorageArea": "测试",
      "Location": "2",
      "DocumentStatus": "1",
      "Remarks": "测试",
    },{
      "OrderNumber": "1",
      "SalesOrderNumber": "NG23072003",
      "ProjectName": "钢化玻璃",
      "OrderType": "普通订单",
      "ProcessCardNumber": "NG23072003A01",
      "ProductName": '',
      "ProductNumber": "06040000022",
      "CustomerNumber": "KD0071",
      "CustomerName": "件",
      "Length": "1075.00",
      "Width": "440.00",
      "Thickness": "3.00",
      "InventoryCount": "360",
      "ActualSingleArea": "0.473000",
      "Area": "170.28",
      "SettlementSingleArea": "0.47",
      "SettlementTotalArea": "170.28",
      "AvailableQuantity": "360",
      "FloorNumber": "10927769",
      "DeliveryAddress": "上海",
      "Batch": "测试",
      "OrdinaryMillimeter": "陈宗凯",
      "Weight": "1915.6500",
      "LastWarehousingDate": "2023-09-22 08:31:17",
      "LocationNumber": "成品库",
      "StorageArea": "测试",
      "Location": "2",
      "DocumentStatus": "1",
      "Remarks": "测试",
    },
  ],//table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
          return `页数:${pageNum}/${pageTotal.value}`
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        return ''
      })
    ]
@@ -240,6 +235,8 @@
}
</script>
<template>
@@ -259,7 +256,8 @@
        <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)">{{ hasDecimalhtml(item.field,row) }}</span>
            <span v-else>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue
@@ -132,7 +132,6 @@
import dayjs from "dayjs";
import {VXETable} from "vxe-table";
import {ElMessage, ElMessageBox} from "element-plus";
import ERPMessage from '@/components/basic/ERPMessage.vue'
let router = useRouter()
north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue
@@ -6,7 +6,7 @@
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      alert('点击了保存')
      alert('我接收到子组件传送的编辑信息')
      //router.push({path: '/main/processCard/AddProcessCard', query: { id: row.id }})
      break
    }
@@ -65,27 +65,26 @@
    {title: '操作', width: 70, slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'reworkTeams',width: 150, title: '返工班组', editRender: { name: 'input', attrs: { placeholder: '' } }},
/*    {field: 'reworkNumber',width: 120, title: '返工编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' } /!* , sortable: true*!/, },*/
    {field: 'salesOrderNo',width: 120, title: '销售单号' /* , sortable: true*/,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'processCardNo',width: 120, title: '流程卡号' /* , sortable: true*/,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'entryName', width: 120,title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' } /* , sortable: true*/},
    {field: 'batch',width: 80, title: '批次' /* , sortable: true*/,showOverflow:"ellipsis"},
    {field: 'serialNumber',width: 80, title: '序号' /* , sortable: true*/},
    {field: 'singlePieceName',width: 120, title: '单片名称' /* , sortable: true*/},
    {field: 'marking',width: 80, title: '标记' /* , sortable: true*/,showOverflow:"ellipsis"},
    {field: 'pieces',width: 90, title: '片标记' /* , sortable: true*/},
    {field: 'number',width: 80, title: '数量' /* , sortable: true*/},
    {field: 'width',width: 80, title: '宽' /* , sortable: true*/},
    {field: 'height',width: 80, title: '高' /* , sortable: true*/},
    {field: 'shape',width: 80, title: '形状' /* , sortable: true*/},
    {field: 'type',width: 100, title: '返工工序' /* , sortable: true*/},
    {field: 'type',width: 100, title: '返工类型' /* , sortable: true*/},
    {field: 'damage',width: 120, title: '返工原因' /* , sortable: true*/},
    {field: 'device',width: 120, title: '责任设备' /* , sortable: true*/},
    {field: 'teams',width: 120, title: '责任班组' /* , sortable: true*/},
    {field: 'area',width: 120, title: '返工面积' /* , sortable: true*/},
    {field: 'qualityInspector',width: 100, title: '质检员' /* , sortable: true*/}
    {field: 'reworkTeams',width: 90, title: '返工班组', editRender: { name: 'input', attrs: { placeholder: '' } }},
    {field: 'salesOrderNo',width: 120, title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'processCardNo',width: 120, title: '流程卡号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'entryName', width: 120,title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'batch',width: 80, title: '批次', sortable: true,showOverflow:"ellipsis"},
    {field: 'serialNumber',width: 80, title: '序号', sortable: true},
    {field: 'singlePieceName',width: 120, title: '单片名称', sortable: true},
    {field: 'marking',width: 80, title: '标记', sortable: true,showOverflow:"ellipsis"},
    {field: 'pieces',width: 90, title: '片标记', sortable: true},
    {field: 'number',width: 80, title: '数量', sortable: true},
    {field: 'width',width: 80, title: '宽', sortable: true},
    {field: 'height',width: 80, title: '高', sortable: true},
    {field: 'shape',width: 80, title: '形状', sortable: true},
    {field: 'type',width: 100, title: '返工工序', sortable: true},
    {field: 'type',width: 100, title: '返工类型', sortable: true},
    {field: 'damage',width: 120, title: '返工原因', sortable: true},
    {field: 'device',width: 120, title: '责任设备', sortable: true},
    {field: 'teams',width: 120, title: '责任班组', sortable: true},
    {field: 'area',width: 120, title: '返工面积', sortable: true},
    {field: 'qualityInspector',width: 100, title: '质检员', sortable: true}
  ],//表头按钮
  toolbarConfig: {
@@ -159,11 +158,7 @@
      })
    ]
  }
  ,
  /*合并脚*/
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 2}
  ],
})
@@ -194,6 +189,7 @@
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">保存</el-button>
      </template>
      <template #num1_filter="{ column, $panel }">
@@ -202,17 +198,16 @@
            <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
          </div>
        </div>
      </template>
    </vxe-grid>
  </div>
</template>
<style scoped>
.main-div-customer{
  width: 99%;
  height: 98%;
  height: 100%;
}
</style>
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -1,21 +1,58 @@
<script setup>
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";
import {reactive, ref} from "vue";
import {useRouter} from  'vue-router'
let router=useRouter()
const getTableRow = (row,type) =>{
let productGlassTypeStore = useProductGlassTypeStore()
let router = useRouter()
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' :{
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/workOrder/addWorkOrder', query: { id: row.id }})
      router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}})
      break
    }
    case 'delete':{
    case 'delete': {
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
function padLeftZero(str) {
  return ('00' + str).substr(str.length)
}
//定义时间
const form = reactive({
  date1: '',
})
//定义转单状态
const optionVal = ref('0')
const options = [
  {
    value: '0',
    label: '已转',
  },
  {
    value: '1',
    label: '未转',
  },
]
//表尾求和
const sumNum = (list, field) => {
@@ -26,21 +63,156 @@
  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({
  order: {
    batch: ''
  },
    orderDetail: {
    productName: '',
    computeArea: '',
    quantity: '',
    computeGrossArea: '',
    perimeter: '',
    bendRadius: '',
    processingNote: ''
  }
})
//定义页面总页数
let pageTotal = ref('')
//定义数据返回结果
let produceList = ref([])
//定义当前页数
let pageNum = $ref(1)
let pageState = null
//获取七天前到当前时间
function getNowTime() {
  const start = new Date(new Date().getTime()- 3600 * 1000 * 24 * 7)
      .toISOString()
      .replace('T', ' ')
      .slice(0,10) //默认开始时间7天前
  const end = new Date(new Date().getTime())
      .toISOString()
      .replace('T', ' ')
      .slice(0,10)//默认结束时间当前时间
  return [start, end]
}
//第一次加载获取近七天时间和默认状态
form.date1=getNowTime()
let startTime = form.date1[0]
let endTime = form.date1[1]
let state = optionVal.value
//第一次加载数据
request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${state}`, 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)
    gridOptions.loading = false
  } else {
    ElMessage.warning(res.msg)
  }
})
//点击查询
const getWorkOrder = () => {
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let selectState=optionVal.value
  request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${selectState}`, filterData.value).then((res) => {
    if (res.code == 200) {
      pageTotal.value = res.data.total
      xGrid.value.loadData(res.data.data)
      gridOptions.loading = false
    } else {
      ElMessage.warning(res.msg)
    }
  })
}
/*使用筛选,后端获取数据*/
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]
  let selectState=optionVal.value
  request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${selectState}`, 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",//表格加边框
  loading: true,
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 60, useKey: true},//鼠标移动或选择高亮
  id: 'demo_1',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  scrollX: {enabled: true},
  scrollY: {enabled: true, gt: 0},//开启虚拟滚动
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
@@ -56,22 +228,28 @@
    mode: 'row',
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'salesOrderNo', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
    {field: 'productionOrderNo', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'batch', title: '批次', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'monolithicTotalArea', title: '单片总面积', sortable: true,showOverflow:"ellipsis"},
    {field: 'total', title: '总数量', sortable: true},
    {field: 'productTotalArea', title: '成品总面积', sortable: true},
    {field: 'perimeter', title: '周长', sortable: true,showOverflow:"ellipsis"},
    {field: 'radius', title: '半径', sortable: true},
    {field: 'createTime', title: '加工要求', sortable: true}
  columns: [
    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
    {title: '操作', width: 110, slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'seq', fixed: "left", title: '自序', width: 50},
    {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'},},
    {
      field: 'productionId',
      title: '生产订单号',
      showOverflow: "ellipsis",
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'}
    },
    {field: 'order.batch', title: '批次', filters: [{data: ''}], slots: {filter: 'num1_filter'}},
    {field: 'orderDetail.productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'},},
    {field: 'orderDetail.computeArea', title: '单片总面积', showOverflow: "ellipsis"},
    {field: 'orderDetail.quantity', title: '总数量',},
    {field: 'orderDetail.computeGrossArea', title: '成品总面积',},
    {field: 'orderDetail.perimeter', title: '周长', showOverflow: "ellipsis"},
    {field: 'orderDetail.bendRadius', title: '半径',},
    {field: 'orderDetail.processingNote', title: '加工要求',}
  ],//表头按钮
  data: null,//表格数据
  toolbarConfig: {
    // buttons: [{
    //
@@ -82,103 +260,10 @@
    zoom: true,
    custom: true
  },
  data:  [
    {
      salesOrderNo: 'NG231201',
      productionOrderNo: 'NG231201A',
      entryName: '信合春天里',
      batch: '23批',
      productName: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)',
      monolithicTotalArea: '509.78',
      total: '169',
      productTotalArea: '175.31',
      perimeter: '99.84',
      radius: '0',
      createTime: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。',
    },
    {
      salesOrderNo: 'NG231201',
      productionOrderNo: 'NG231201B',
      entryName: '信合春天里',
      batch: '23批',
      productName: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)',
      monolithicTotalArea: '509.78',
      total: '169',
      productTotalArea: '175.31',
      perimeter: '99.84',
      radius: '0',
      createTime: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。',
    },
    {
      salesOrderNo: 'NG231202',
      productionOrderNo: 'NG231202A',
      entryName: '信合春天里',
      batch: '23批',
      productName: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)',
      monolithicTotalArea: '509.78',
      total: '169',
      productTotalArea: '175.31',
      perimeter: '99.84',
      radius: '0',
      createTime: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。',
    },
    {
      salesOrderNo: 'NG231203',
      productionOrderNo: 'NG231203A',
      entryName: '信合春天里',
      batch: '23批',
      productName: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)',
      monolithicTotalArea: '509.78',
      total: '169',
      productTotalArea: '175.31',
      perimeter: '99.84',
      radius: '0',
      createTime: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。',
    },
    {
      salesOrderNo: 'NG231204',
      productionOrderNo: 'NG231204A',
      entryName: '信合春天里',
      batch: '23批',
      productName: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)',
      monolithicTotalArea: '509.78',
      total: '169',
      productTotalArea: '175.31',
      perimeter: '99.84',
      radius: '0',
      createTime: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。',
    },
    {
      salesOrderNo: 'NG231205',
      productionOrderNo: 'NG231205A',
      entryName: '信合春天里',
      batch: '23批',
      productName: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)',
      monolithicTotalArea: '509.78',
      total: '169',
      productTotalArea: '175.31',
      perimeter: '99.84',
      radius: '0',
      createTime: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。',
    },
    {
      salesOrderNo: 'NG231206',
      productionOrderNo: 'NG231206A',
      entryName: '信合春天里',
      batch: '23批',
      productName: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)',
      monolithicTotalArea: '509.78',
      total: '169',
      productTotalArea: '175.31',
      perimeter: '99.84',
      radius: '0',
      createTime: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。',
    },
  ],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['total','monolithicTotalArea','productTotalArea']
    return[
  footerMethod({columns, data}) {//页脚函数
    let footList = ['', '', '']
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
@@ -193,32 +278,6 @@
})
const form = reactive({
  name: '',
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})
const value = ref('')
const options = [
  {
    value: 'Option1',
    label: 'Option1',
  },
  {
    value: 'Option2',
    label: 'Option2',
  },
  {
    value: 'Option3',
    label: 'Option3',
  },
]
</script>
@@ -229,12 +288,15 @@
        <el-date-picker
            v-model="form.date1"
            type="daterange"
            format="YYYY/MM/DD"
            value-format="YYYY-MM-DD"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            :default-time="defaultTime"
        />
        &nbsp;&nbsp;
        <el-select v-model="value" class="m-2" placeholder="是否转工单">
        <el-select :default-first-option="true" ref="getSelect" style="width: 120px" v-model="optionVal" class="m-2" placeholder="是否转工单">
          <el-option
              v-for="item in options"
              :key="item.value"
@@ -243,7 +305,11 @@
          />
        </el-select>
        &nbsp;&nbsp;
        <el-button type="primary">查询</el-button>
        <el-button
            @click="getWorkOrder"
            id="select"
            type="primary" :icon="Search">查询
        </el-button>
      </el-row>
    </div>
@@ -261,7 +327,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>
@@ -286,10 +354,11 @@
</template>
<style scoped>
.main-div-customer{
.main-div-customer {
  width: 99%;
  height: 100%;
}
#selectForm {
  width: 50%;
  text-align: center;
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -1,9 +1,12 @@
<script setup>
<script lang="ts"  setup>
import {reactive, ref} from "vue"
import {VXETable} from "vxe-table"
import {useRouter} from "vue-router"
const router = useRouter()
import * as XLXS from "xlsx"
import {ElMessage} from "element-plus"
import request from "@/utils/request"
import deepClone from "@/utils/deepClone"
const router = useRouter()
const xGrid = ref()
const gridOptions = reactive({
  border:  "full",//表格加边框
@@ -18,6 +21,15 @@
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  menuConfig: {
    body: {
      options: [
        [
          { code: 'addRow', name: '添加', prefixIcon: 'vxe-icon-square-plus', visible: true, disabled: false }
        ]
      ]
    }
  },
  columnConfig: {
    resizable: true,
    useKey: true
@@ -30,45 +42,103 @@
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    mode: 'cell',
    showStatus: true
  },//表头参数
  columns:[
    // {title: '操作', width: 110,fixed:"left",slots: { default: 'openProductList' }},
    {type: 'seq',fixed:"left", title: '自序', width: 80 },
    {field: 'orderID',width:120,  title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '产品',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '单片面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '结算单片面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderID',width:120,  title: '外购',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
    {field: 'buildingNumber',width:120,  title: '楼号',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'productId',width:140,  title: '产品ID',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'productName',width:120,  title: '产品',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'price',width:140,  title: '单价',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity',width:120,  title: '数量',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'grossAmount',width:120,  title: '总金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'width',width:120,  title: '宽',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'height',width:120,  title: '高',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'area',width:150,  title: '实际单片面积',filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true},
    {field: 'grossArea',width:140,  title: '实际总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true},
    {field: 'computeArea',width:180,  title: '结算单片面积',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'computeGrossArea',width:140,  title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'shape',width:120,  title: '形状',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'bendRadius',width:140,  title: '弯钢弧度',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'edgingType',width:140,  title: '磨边类型',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'processingNote',width:140,  title: '加工要求',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'remarks',width:120,  title: '备注',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
  ],//表头按钮
  ],
  //表单验证
  editRules: {
    buildingNumber: [
      { required: false},
      { min: 0, max: 255, message: '名称长度在 0 到 255 个字符' }
    ],
    productId: [
      { required: true, message: '请选择产品' }
    ],
    price: [
      {
        validator ({ cellValue }) {
          const regex = /^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/
          if (cellValue && !regex.test(cellValue)) {
            return new Error('输入0.00~99999.99的数字')
          }
        }
      }
    ],
    computeArea: [
      {
        validator ({ cellValue }) {
          const regex = /^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/
          if (cellValue && !regex.test(cellValue)) {
            return new Error('输入0.00~99999.99的数字')
          }
        }
      }
    ],
    quantity: [
      { type: 'number', min: 0, message: '请输入大于等于0的数值' }
    ],
    width:[
      {
        validator ({ cellValue }) {
          const regex = /^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/
          if (cellValue && !regex.test(cellValue)) {
            return new Error('输入0.00~99999.99的数字')
          }
        }
      }
    ],
    height:[
      {
        validator ({ cellValue }) {
          const regex = /^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/
          if (cellValue && !regex.test(cellValue)) {
            return new Error('输入0.00~99999.99的数字')
          }
        }
      }
    ]
  },
  toolbarConfig: {
    buttons: [
      {'code': 'remarks', 'name': '加工要求'},
      {'code': 'Craft', 'name': '工艺',status: 'primary'},
      {'code': 'add', 'name': '审核',status: 'primary',disabled: true},
      {'code': 'add', 'name': '保存',status: 'primary',icon: 'vxe-icon-save'}
      {'code': 'saveOrder', 'name': '保存',status: 'primary',icon: 'vxe-icon-save'}
    ],
    import: false,
    export: true,
    print: true,
    slots: {
      tools: 'toolbar_buttons'
    },
    // import: false,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
  data:  [
  ],//table body实际数据
  }
  ,
  //table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
@@ -84,26 +154,173 @@
  }
})
const gridEvents = {
  toolbarButtonClick ({ code }) {
  async toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'Craft': {
          router.push({path: '/main/order/updateOrderCraft', query: { orderID: 12123 }})
          await router.push({path: '/main/order/updateOrderCraft', query: {orderID: 12123}})
          break
        }
        case 'saveOrder': {
          if ($grid.getTableData().tableData.length === 0){
            ElMessage.error('没有表格数据!')
            return
          }
          console.log($grid.getTableData().tableData)
          if ($grid) {
            const errMap = await $grid.validate(true)
            if (errMap) {
              ElMessage.error(`校验不通过!`)
              return
            }
            let order ={
              title:titleUploadData.value,
              detail:$grid.getTableData().tableData
            }
            saveOrder(order)
          }
          break
        }
      }
    }
  },//头部按钮事件
  menuClick ({ menu, row, column }) {
    const $grid = xGrid.value
    if ($grid) {
      switch (menu.code) {
        case 'deleteList': {
          $grid.removeCheckboxRow()
          break
        }
        case 'addRow': {
          if ($grid.getTableData().tableData.length >=240){
            ElMessage.error('表格数据已达到最大值!')
            return
          }
          $grid.insert({})
          //console.log($grid.getRecordset().insertRecords)
          break
        }
      }
    }
  },
  cellDblclick (params) {//表格内容双击打开产品界面
    const { row } = params
    //alert("我打开了产品界面")
  }
}
// 定义表头上传数据
const titleUploadData = ref({
  project:'',
  orderType:'',
  alType:'',
  icon:'',
  orderClassify:'',
  packType:'',
  deliveryDate:''
})
//定义接收加载表头下拉数据
const titleSelectJson = ref({
  orderType:[],
  alType:[],
  icon:[],
  orderClassify:[],
  packType:[],
})
//页面第一次加载执行
request.get(`/basicData/orderBasicData`).then((res) => {
  if(res.code==200){
    titleSelectJson.value=deepClone(res.data)
    titleUploadData.value.orderType = titleSelectJson.value.orderType[0].id
    titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].id
    titleUploadData.value.icon = titleSelectJson.value.icon[0].id
    titleUploadData.value.packType = titleSelectJson.value.packType[0].id
    titleUploadData.value.alType = titleSelectJson.value.alType[0].id
    const today = new Date
    today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000))
    titleUploadData.value.deliveryDate = today.getFullYear() +
        '-' + ("0" + (today.getMonth() + 1)).slice(-2)
        + '-' + ("0" + today.getDate()).slice(-2)
  }else{
    ElMessage.warning(res.msg)
  }
})
const saveOrder = (order) => {
  request.post(`/order/saveOrder`,order).then((res) => {
    if(res.code==200){
      ElMessage.success('保存成功')
    }else {
      ElMessage.warning(res.msg)
    }
  })
}
const countAmount = (row) => {
  return
}
const area = (row) => {
  return parseFloat((row.width * row.height/1000000).toFixed(2))
}
const countArea = (row) => {
  return parseFloat((row.width * row.height/1000000).toFixed(2))*row.quantity
}
//导入功能
const impotEvent = async () => {
  const $grid = xGrid.value
  const { files } = await $grid.readFile({
    types: ['xls', 'xlsx']
  })
  const fileReader = new FileReader()
  fileReader.onload = (event) => {
    const data = event.target ? event.target.result : ''
    const workbook = XLXS.read(data, { type: 'binary' })
    let jsonData = XLXS.utils.sheet_to_json(workbook.Sheets.Sheet1).slice(1)
    if(jsonData.length>240){
      ElMessage.error('导入数据不能超过240条,请分订单导入')
      return
    }
    jsonData.forEach((item,index) => {
      //item.computeArea
      //console.log()
      if(item.computeArea === undefined){
        item.computeArea = area(item)
      }
      item.computeGrossArea = parseFloat((item.computeArea*item.quantity).toString())
    })
    xGrid.value.loadData(jsonData)
  }
  fileReader.readAsBinaryString(files[0])
}
//行单元格修改修改触发此事件
const editClosedEvent = ({ row, column }) => {
  //判断修改相应的数值修改面积与金额
   if (['width', 'height', 'quantity', 'price'].includes(column.property)) {
      row.area = area(row)
      row.grossArea = countArea(row)
      row.computeArea = row.area
      row.computeGrossArea = row.grossArea
      row.grossAmount=row.price * row.computeGrossArea
   }else if(column.property === 'computeArea'){
     row.computeGrossArea=parseFloat((row.computeArea*row.quantity).toString())
     row.grossAmount=row.price * row.computeGrossArea
   }
}
</script>
<template>
  <div class="main-div">
    <div class="order-primary" style="background-color: white">
      <el-row>
        <el-col  :span="2"><el-text>*项目名称:</el-text></el-col>
@@ -116,26 +333,42 @@
        </el-col>
        <el-col  :span="2"><el-text>*订单类型:</el-text></el-col>
        <el-col  :span="2">
          <el-select  clearable placeholder=" " >
            <el-option />
          <el-select v-model="titleUploadData.orderType"  clearable placeholder=""  >
            <el-option
                v-for="item in titleSelectJson['orderType']"
                :key="item.id"
                :label="item.basicName"
                :value="item.id"
            />
          </el-select>
        </el-col>
        <el-col  :span="2"><el-text>订单分类:</el-text></el-col>
        <el-col  :span="2">
          <el-select  clearable placeholder=" " >
            <el-option/>
          <el-select v-model="titleUploadData.orderClassify" clearable placeholder=" " >
            <el-option
                v-for="item in titleSelectJson['orderClassify']"
                :key="item.id"
                :label="item.basicName"
                :value="item.id"
            />
          </el-select>
        </el-col>
        <el-col  :span="2"><el-text>商标选项:</el-text></el-col>
        <el-col  :span="2">
          <el-select  clearable placeholder=" " >
            <el-option/>
          <el-select v-model="titleUploadData.icon" clearable placeholder=" " >
            <el-option  v-for="item in titleSelectJson['icon']"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.id"/>
          </el-select>
        </el-col>
        <el-col  :span="2"><el-text>包装方式:</el-text></el-col>
        <el-col  :span="2">
          <el-select  clearable placeholder=" " >
            <el-option/>
          <el-select v-model="titleUploadData.packType" clearable placeholder=" " >
            <el-option v-for="item in titleSelectJson['packType']"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.id"/>
          </el-select>
        </el-col>
        <!--      <el-col :span="2"><el-text  /></el-col>-->
@@ -146,9 +379,10 @@
        <el-col  :span="2"><el-text>交货日期:</el-text></el-col>
        <el-col  :span="2">
          <el-date-picker
              type="week"
              format="[Week] ww"
              placeholder="选择日期"/>
              v-model="titleUploadData.deliveryDate"
              type="date"
              placeholder="Pick a day"
              />
        </el-col>
        <el-col  :span="2"><el-text>批次:</el-text></el-col>
        <el-col  :span="2"><el-input/></el-col>
@@ -166,8 +400,11 @@
        </el-col>
        <el-col  :span="2"><el-text>铝条方式:</el-text></el-col>
        <el-col  :span="2">
          <el-select  clearable placeholder=" " >
            <el-option/>
          <el-select v-model="titleUploadData.alType" clearable placeholder=" " >
            <el-option v-for="item in titleSelectJson['alType']"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.id"/>
          </el-select>
        </el-col>
      </el-row>
@@ -201,6 +438,7 @@
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          @edit-closed="editClosedEvent"
      >
        <template #num1_filter="{ column, $panel }">
          <div>
@@ -209,6 +447,11 @@
            </div>
          </div>
        </template>
        <template #toolbar_buttons>
          <vxe-button  @click="impotEvent">导入</vxe-button>
        </template>
      </vxe-grid>
    </div>
  </div>
north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
@@ -134,9 +134,8 @@
//第一次加载数据
request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => {
request.post(`/product/1/100/${productGlassTypeStore.GlassType}`,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)
north-glass-erp/pom.xml
@@ -78,7 +78,7 @@
            <version>3.5.1</version>
        </dependency>
<!--        SwaggerUi-->
        <!--        SwaggerUi-->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
@@ -102,11 +102,11 @@
            <artifactId>spring-boot-starter-cache</artifactId>
        </dependency>
<!--websocket-->
<!--        <dependency>-->
<!--            <groupId>org.springframework.boot</groupId>-->
<!--            <artifactId>spring-boot-starter-websocket</artifactId>-->
<!--        </dependency>-->
        <!--websocket-->
        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-websocket</artifactId>-->
        <!--        </dependency>-->
        <dependency>
            <groupId>io.netty</groupId>
@@ -119,6 +119,11 @@
            <artifactId>fastjson</artifactId>
            <version>1.2.24</version>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-commons</artifactId>
            <version>2.5.8</version>
        </dependency>
    </dependencies>
@@ -168,4 +173,4 @@
            </snapshots>
        </pluginRepository>
    </pluginRepositories>-->
</project>
</project>
north-glass-erp/src/main/java/com/example/erp/controller/OrderTestController.java
File was renamed from north-glass-erp/src/main/java/com/example/erp/controller/OrderController.java
@@ -1,19 +1,16 @@
package com.example.erp.controller;
import com.example.erp.common.Result;
import com.example.erp.mapper.OrderMapper;
import com.example.erp.entity.Order;
import com.example.erp.mapper.OrderTestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
//@CrossOrigin  //解决单个controller 跨域问题
@RestController
@RequestMapping("/order")
@RequestMapping("/order11111111")
public class OrderController {
public class OrderTestController {
    @Autowired
    private OrderMapper orderMapper;
    private OrderTestMapper orderMapper;
//    @GetMapping //查询order表结果集
//    public Result index(){
north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
New file
@@ -0,0 +1,44 @@
package com.example.erp.controller.mm;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.mm.FinishedGoodsInventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.example.erp.entity.mm.FinishedGoodsInventory;
import java.util.Map;
@RestController
@RequestMapping("/FinishedGoodsInventory")
public class FinishedGoodsInventoryController {
    @Autowired
    FinishedGoodsInventoryService finishedGoodsInventoryService;
    @PostMapping("/getselet/{pageNum}/{pageSize}")
    public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){
        System.out.println(finishedGoodsInventory);
        return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory));
    }
    @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}")
    public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){
        System.out.println(flowCard);
        return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard));
    }
    @PostMapping("/addseletwarehousing")
    public Result addseletwarehousing( @RequestBody Map<String,Map<String,Object>> object){
        if(finishedGoodsInventoryService.addseletwarehousing(object)){
            return Result.seccess();
        }else {
           throw new ServiceException(Constants.Code_500,"入库失败");
        }
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
New file
@@ -0,0 +1,23 @@
package com.example.erp.controller.pp;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.common.Result;
import com.example.erp.service.pp.FlowCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.sql.Date;
@RestController
@RequestMapping("/processCard")
public class ProcessCardController {
    @Autowired
    FlowCardService flowCardService;
    @PostMapping  ("/flowCard/{selectTime1}/{selectTime2}}")
    public Result DateProcess(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard));
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java
New file
@@ -0,0 +1,25 @@
package com.example.erp.controller.pp;
import com.example.erp.common.Result;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.service.pp.WorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.sql.Date;
@RestController
@RequestMapping("/workOrder")
public class WorkOrderController {
    @Autowired
    WorkOrderService workOrderService;
    @PostMapping  ("/orderGlassDetail/{selectTime1}/{selectTime2}/{state}")
    public Result DateWork(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @PathVariable Integer state,
            @RequestBody OrderGlassDetail orderGlassDetail){
        return Result.seccess(workOrderService.defaultDateWork(selectTime1,selectTime2,state,orderGlassDetail));
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/sd/BasicDataController.java
New file
@@ -0,0 +1,22 @@
package com.example.erp.controller.sd;
import com.example.erp.common.Result;
import com.example.erp.service.sd.BasicDateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@RequestMapping("/basicData")
public class BasicDataController {
    @Autowired
    BasicDateService basicDateService;
    @GetMapping("/orderBasicData")
    public Result getOrderBasicData(){
        return Result.seccess(basicDateService.getOrderBasicData());
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
New file
@@ -0,0 +1,27 @@
package com.example.erp.controller.sd;
import cn.hutool.json.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.erp.common.Result;
import com.example.erp.entity.sd.Order;
import com.example.erp.service.sd.OrderService;
import org.apache.tomcat.Jar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @PostMapping("/saveOrder")
    public Result saveOrder(@RequestBody Map<String, Object> orderMap) {
        return Result.seccess(orderService.saveOrder(orderMap));
    }
}
north-glass-erp/src/main/java/com/example/erp/entity/OrderTest.java
File was renamed from north-glass-erp/src/main/java/com/example/erp/entity/Order.java
@@ -7,7 +7,7 @@
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`order`")
public class Order {
public class OrderTest {
    @TableId(type = IdType.AUTO)
    private  Integer id;
    private  String orderId;
north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedGoodsInventory.java
@@ -2,8 +2,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.erp.entity.sd.Customer;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.*;
import lombok.Data;
import java.time.LocalDate;
@@ -13,14 +12,14 @@
    @TableId(type = IdType.AUTO)
    private Long id;
    private String orderId;
    private Integer orderNumber;
    private Order order;
    private OrderDetail orderDetail;
    private Integer inventory    ;
    private Double actualSignalArea;
    private Double area;
    private Integer quantityAvailable;
    private String warehouseNumber;
    private LocalDate storageRegion;
    private String storageRegion;
    private Integer status;
    private LocalDate enterStorageTime;
    private String remark;
north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedOperateLog.java
@@ -13,10 +13,13 @@
    private Long id;
    private String operationOrderNumber;
    private Long productNumber;
    private Integer operationNumber    ;
    private Integer operationNumber;
    private Integer quantity;
    private String operateType;
    private String operator;
    private LocalDate operateTime;
    private String staterOperationOrderNumber;
    private String endOperationOrderNumber;;
}
north-glass-erp/src/main/java/com/example/erp/entity/pp/BaseBom.java
@@ -2,9 +2,10 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.time.LocalDate;
@Data
public class BaseBom {
    @TableId(type = IdType.AUTO)
    //自增id
north-glass-erp/src/main/java/com/example/erp/entity/pp/Device.java
@@ -1,7 +1,9 @@
package com.example.erp.entity.pp;
import java.time.LocalDate;
import lombok.Data;
import java.time.LocalDate;
@Data
public class Device {
    //自增ID
    private Integer id;
north-glass-erp/src/main/java/com/example/erp/entity/pp/DeviceMaintenance.java
@@ -1,7 +1,9 @@
package com.example.erp.entity.pp;
import java.time.LocalDate;
import lombok.Data;
import java.time.LocalDate;
@Data
public class DeviceMaintenance {
    //自增id
    private Integer id;
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java
@@ -2,9 +2,13 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
import lombok.Data;
import java.time.LocalDate;
@Data
public class FlowCard {
    @TableId(type = IdType.AUTO)
    //自增id
@@ -19,6 +23,8 @@
    private Integer orderNumber;
    //工艺确认序号
    private Integer technologyNumber;
    //分架数量
    private Integer binningQuantity;
    //已优化数量
    private Integer optimizeQuantity;
    //排版状态
@@ -53,9 +59,9 @@
    private LocalDate updateTime;
    //外键订单表
//    private Order order;
//    //外键订单明细表
//    private OrderDetail orderDetail;
//    //外键订单工艺审核表
//    private orderGlassDetail orderGlassDetail;
    private Order order;
    //外键订单明细表
    private OrderDetail orderDetail;
    //外键订单工艺审核表
    private OrderGlassDetail orderGlassDetail;
}
north-glass-erp/src/main/java/com/example/erp/entity/pp/OrderBom.java
@@ -1,7 +1,9 @@
package com.example.erp.entity.pp;
import java.time.LocalDate;
import lombok.Data;
import java.time.LocalDate;
@Data
public class OrderBom {
    //自增ID
    private Integer id;
north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java
@@ -2,9 +2,10 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.time.LocalDate;
@Data
public class ReportingWork {
    @TableId(type = IdType.AUTO)
    //自增id
north-glass-erp/src/main/java/com/example/erp/entity/pp/SetupBom.java
@@ -1,7 +1,9 @@
package com.example.erp.entity.pp;
import java.time.LocalDate;
import lombok.Data;
import java.time.LocalDate;
@Data
public class SetupBom {
    //自增ID
    private Integer id;
north-glass-erp/src/main/java/com/example/erp/entity/pp/WorkprogressMonthlySettlement.java
@@ -1,7 +1,9 @@
package com.example.erp.entity.pp;
import java.time.LocalDate;
import lombok.Data;
import java.time.LocalDate;
@Data
public class WorkprogressMonthlySettlement {
    //自增ID
    private Integer id;
north-glass-erp/src/main/java/com/example/erp/entity/sd/BasicData.java
@@ -11,8 +11,8 @@
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String basicType;
    private String name;
    private String type;
    private String basicName;
    private String basicCategory;
    private LocalDate createTime;
    private LocalDate updateTime;
}
north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java
@@ -2,18 +2,20 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDate;
@Data
@TableName("`order`")
public class Order {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String orderId;
    private String project;
    private String customerId;
    private String customerName;
    private String orderType;
    private String orderClassify;
@@ -34,13 +36,13 @@
    private Double otherMoney;
    private String otherMoneyRemarks;
    private String processingNote;
    private String otherRemaks;
    private String otherRemarks;
    private Double area;
    private Long quantity;
    private String verifierId;
    private String verifier;
    private String createrId;
    private String creater;
    private String creatorId;
    private String creator;
    private Integer createOrder;
    private Integer processReview;
    private Integer orderReview;
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderDetail.java
@@ -14,6 +14,7 @@
    private Integer orderNumber;
    private String buildingNumber;
    private Integer productId;
    private String productName;
    private Double price;
    private Long quantity;
@@ -39,6 +40,6 @@
    private LocalDate updateTime;
    private Order order;
    private Product product;
    //private Product product;
}
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderGlassDetail.java
@@ -11,6 +11,8 @@
    @TableId(type = IdType.AUTO)
    private Long id;
    private String orderId;
    private String orderNumber;
    private Integer technologyNumber;
    private String glassAddress;
    private String glassChild;
north-glass-erp/src/main/java/com/example/erp/mapper/OrderTestMapper.java
File was renamed from north-glass-erp/src/main/java/com/example/erp/mapper/OrderMapper.java
@@ -1,13 +1,11 @@
package com.example.erp.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.entity.Order;
import com.example.erp.entity.OrderTest;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
public interface OrderTestMapper extends BaseMapper<OrderTest> {
//    @Select("select * from `order`")
//    List<Order> findAll();
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java
@@ -1,12 +1,42 @@
package com.example.erp.mapper.mm;
import com.example.erp.entity.mm.FinishedGoodsInventory;
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.Product;
import com.example.erp.entity.userInfo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.repository.CrudRepository;
import java.util.List;
@Mapper
public interface FinishedGoodsInventoryMapper {
    List<FinishedGoodsInventory> defaultProduct(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
public interface FinishedGoodsInventoryMapper extends CrudRepository<FinishedGoodsInventory,Long> {
    List<FinishedGoodsInventory> defaultfinishedGoods(@Param("offset") Integer offset,
                                                      @Param("pageSize") Integer pageSize,
                                                      @Param("finishedGoodsInventory") FinishedGoodsInventory finishedGoodsInventory);
    Integer getPageTotal(Integer offset, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory);
    List<FlowCard> getseletwarehousing(@Param("offset") Integer offset,
                                       @Param("pageSize") Integer pageSize,
                                       @Param("flowCard") FlowCard flowCard);
    Integer getseletwarehousingPageTotal(Integer offset, Integer pageSize,FlowCard flowCard);
    Integer findOrderNumberdcount(Integer orderNumber);
    Boolean updateInventory(FlowCard flowCard);
    Boolean updateflowcard(FlowCard flowCard);
    Boolean insertFinishedGoodsInventory(@Param("flowCard") FlowCard flowCard,
                                         @Param("storageRegion") String storageRegion,
                                         @Param("remark") String remark);
}
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java
@@ -1,12 +1,17 @@
package com.example.erp.mapper.mm;
import com.example.erp.entity.mm.FinishedGoodsInventory;
import com.example.erp.entity.mm.FinishedOperateLog;
import com.example.erp.entity.pp.FlowCard;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.repository.CrudRepository;
import java.util.List;
@Mapper
public interface FinishedOperateLogMapper {
    List<FinishedOperateLog> defaultProduct(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
public interface FinishedOperateLogMapper extends CrudRepository<FinishedOperateLog,Long> {
    FinishedOperateLog getselectFinishedOperateLog();
    Boolean insertFinishedOperateLog(FlowCard flowCard);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
New file
@@ -0,0 +1,13 @@
package com.example.erp.mapper.pp;
import com.example.erp.entity.pp.FlowCard;
import org.apache.ibatis.annotations.Mapper;
import java.sql.Date;
import java.util.List;
@Mapper
public interface FlowCardMapper {
    List<FlowCard> selectFlowCard(Date selectTime1, Date selectTime2,FlowCard flowCard);
  //  Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/WorkOrderMapper.java
New file
@@ -0,0 +1,16 @@
package com.example.erp.mapper.pp;
import com.example.erp.entity.sd.Product;
import com.example.erp.entity.sd.OrderGlassDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.sql.Date;
import java.util.List;
@Mapper
public interface WorkOrderMapper {
    List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, Integer state,OrderGlassDetail orderGlassDetail);
  //  Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product);
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/BasicDateMapper.java
New file
@@ -0,0 +1,16 @@
package com.example.erp.mapper.sd;
import com.example.erp.entity.sd.BasicData;
import com.example.erp.service.sd.BasicDateService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Map;
@Mapper
public interface BasicDateMapper {
    List<BasicData> getOrderBasicData();
    List<String> getOrderBasicDataType();
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderDetailMapper.java
New file
@@ -0,0 +1,14 @@
package com.example.erp.mapper.sd;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
    boolean insertBatch(List<OrderDetail> orderDetails);
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java
New file
@@ -0,0 +1,10 @@
package com.example.erp.mapper.sd;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.entity.sd.Order;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
    Integer selectMaxOrderId();
}
north-glass-erp/src/main/java/com/example/erp/service/impl/OrderServiceImpl.java
@@ -2,12 +2,12 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.erp.entity.Order;
import com.example.erp.mapper.OrderMapper;
import com.example.erp.entity.OrderTest;
import com.example.erp.mapper.OrderTestMapper;
import com.example.erp.service.IOrderService;
import org.springframework.stereotype.Service;
@Service
@DS("erp_sd")
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {
public class OrderServiceImpl extends ServiceImpl<OrderTestMapper, OrderTest> implements IOrderService {
}
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
New file
@@ -0,0 +1,91 @@
package com.example.erp.service.mm;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.mm.FinishedGoodsInventory;
import com.example.erp.entity.mm.FinishedOperateLog;
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.mapper.mm.FinishedGoodsInventoryMapper;
import com.example.erp.mapper.mm.FinishedOperateLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.SQLException;
import java.time.LocalDate;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@DS("mm")
public class FinishedGoodsInventoryService {
    @Autowired
    FinishedGoodsInventoryMapper finishedGoodsInventoryMapper;
    @Autowired
    FinishedOperateLogMapper finishedOperateLogMapper;
    public Map<String,Object> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory) {
        Integer offset = (pageNum-1)*pageSize;
        Map<String,Object> map = new HashMap<>();
        map.put("data",finishedGoodsInventoryMapper.defaultfinishedGoods(offset,pageSize,finishedGoodsInventory));
        map.put("total",finishedGoodsInventoryMapper.getPageTotal(offset,pageSize,finishedGoodsInventory));
        return map;
    }
    public Map<String,Object> getseletwarehousing(Integer pageNum, Integer pageSize, FlowCard flowCard) {
        Integer offset = (pageNum-1)*pageSize;
        Map<String,Object> map = new HashMap<>();
        map.put("data",finishedGoodsInventoryMapper.getseletwarehousing(offset,pageSize,flowCard));
        map.put("total",finishedGoodsInventoryMapper.getseletwarehousingPageTotal(offset,pageSize,flowCard));
        return map;
    }
    public Boolean addseletwarehousing(Map<String,Map<String,Object>> object) {
        Map<String,Object> maps=  object.get("finishedGoodsInventory");
        String storageRegion= maps.get("storageRegion").toString();
        String remark= maps.get("remark").toString();
        JSONObject jsonObject = new JSONObject(object.get("flowcard"));
        FlowCard flowCard = JSONObject.parseObject(JSONObject.toJSONString(jsonObject), FlowCard.class);
        System.out.println("数据2:"+flowCard);
        //添加出入库记录
        finishedOperateLogMapper.insertFinishedOperateLog(flowCard);
        System.out.println(flowCard.getOrder().getOrderId());
        Integer finishedGoodsInventorycount=finishedGoodsInventoryMapper.findOrderNumberdcount(flowCard.getOrderNumber());
        System.out.println("数量:"+finishedGoodsInventorycount);
        if(finishedGoodsInventorycount>0){
            finishedGoodsInventoryMapper.updateInventory(flowCard);
            finishedGoodsInventoryMapper.updateflowcard(flowCard);
            return true;
        }else{
            if (finishedGoodsInventoryMapper.insertFinishedGoodsInventory(flowCard,storageRegion,remark)){
                finishedGoodsInventoryMapper.updateflowcard(flowCard);
                return true;
            }else{
                return false;
            }
        }
        /*Order order=finishedGoodsInventoryMapper.findOrderId(flowCard.getOrder().getOrderId());
        OrderDetail orderDetail=finishedGoodsInventoryMapper.findOrderNumber(flowCard.getOrderNumber());*/
        /*finishedGoodsInventory.setOrder(order);
        finishedGoodsInventory.setOrderDetail(orderDetail);
        finishedGoodsInventory.setInventory(flowCard.getInventoryQuantity());
        finishedGoodsInventory.setActualSignalArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth());
        finishedGoodsInventory.setArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth()*flowCard.getInventoryQuantity());
        finishedGoodsInventory.setQuantityAvailable(flowCard.getInventoryQuantity());
        finishedGoodsInventory.setWarehouseNumber(flowCard.getOrderDetail().getBuildingNumber());
        finishedGoodsInventory.setStorageRegion(flowCard.getOrderDetail().getBuildingNumber());
        finishedGoodsInventory.setStatus(0);
        finishedGoodsInventory.setEnterStorageTime(LocalDate.now());
        finishedGoodsInventory.setUpdateTime(LocalDate.now());
        finishedGoodsInventory.setEndTime(null);
        finishedGoodsInventory.setRemark("");*/
    }
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
New file
@@ -0,0 +1,30 @@
package com.example.erp.service.pp;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.mapper.pp.FlowCardMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.Date;
import java.util.HashMap;
import java.util.Map;
@Service
@DS("pp")
public class FlowCardService {
    @Autowired
     FlowCardMapper flowCardMapper;
    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));
        map.put("data", flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        //   map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product));
        return map;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java
New file
@@ -0,0 +1,29 @@
package com.example.erp.service.pp;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.mapper.pp.WorkOrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.Date;
import java.util.HashMap;
import java.util.Map;
@Service
@DS("sd")
public class WorkOrderService {
    @Autowired
    WorkOrderMapper workOrderMapper;
    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));
        map.put("data", workOrderMapper.selectWordOrder( selectTime1,selectTime2,state, orderGlassDetail));
     //   map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product));
        return map;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicDateService.java
New file
@@ -0,0 +1,43 @@
package com.example.erp.service.sd;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.mapper.sd.BasicDateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.erp.entity.sd.BasicData;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@DS("sd")
public class BasicDateService {
    @Autowired
    BasicDateMapper basicDateMapper;
    //获取订单基本数据
public Map<String, List<Object>> getOrderBasicData() {
        //获取订单基本数据类型
        List<String> orderBasicDataType = basicDateMapper.getOrderBasicDataType();
        //获取订单基本数据
        List<BasicData> orderBasicData = basicDateMapper.getOrderBasicData();
        //创建Map对象
        Map<String, List<Object>> orderBasicDataMap = new HashMap<>(); ;
        //创建List对象
        //遍历订单基本数据类型
        for(String item :orderBasicDataType){
            List<Object> orderBasicDataList = new ArrayList<>();
            //将类型和List对象放入Map中
            orderBasicDataMap.put(item,orderBasicDataList);
        }
        //遍历订单基本数据
        for (BasicData item : orderBasicData){
            //将数据放入List中
            orderBasicDataMap.get(item.getBasicCategory()).add(item);
        }
        //返回Map对象
        return orderBasicDataMap;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
New file
@@ -0,0 +1,72 @@
package com.example.erp.service.sd;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.mapper.sd.OrderDetailMapper;
import com.example.erp.mapper.sd.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service
@DS("sd")
public class OrderService {
    @Autowired
    private OrderMapper orderMapper;
    @Autowired
    private OrderDetailMapper orderDetailMapper;
    public boolean saveOrder(Map<String,Object> orderMap) {
        JSONObject orderJson = new JSONObject(orderMap);
        Order order = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("title")), Order.class);
        List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("detail")), OrderDetail.class);
        boolean saveState = true;
        //判断传入id参数是否为空,未传入id为空插入订单表,传入更新表
        if(order.getOrderId() == null){
            saveState = insertOrder(order,OrderDetails);
        }else {
            saveState = updateOrder(order,OrderDetails);
        }
        return false;
    }
    @Transactional
    public boolean insertOrder(Order order,List<OrderDetail> OrderDetails) {
        Integer maxOrderId = orderMapper.selectMaxOrderId();
        //查询订单id,并且自增
        String formattedNumber = String.format("%02d", maxOrderId+1);
        //格式化当前日期
        Date currentDate = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd");
        String formattedDate = dateFormat.format(currentDate);
        //往主表插数据
        orderMapper.insert(order);
        //循环给订单明细表字段添加序号和周长
        for (int i = 0; i < OrderDetails.size(); i++) {
            OrderDetails.get(i).setOrderNumber(i+1);
            order.setOrderId(formattedDate);
            OrderDetails.get(i).setPerimeter(OrderDetails.get(i).getWidth()*OrderDetails.get(i).getHeight()*2);
        }
        //往明细表插数据
        orderDetailMapper.insertBatch(OrderDetails);
        return false;
    }
    public boolean updateOrder(Order order,List<OrderDetail> OrderDetails) {
        return  false;
    }
}
north-glass-erp/src/main/resources/application.yml
@@ -19,13 +19,13 @@
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
#        mm:
#          url: jdbc:mysql://localhost:3306/mm?serverTimezone=GMT%2b8
#          username: root
#          password: beibo.123/
#          driver-class-name: com.mysql.cj.jdbc.Driver
#        pp:
#          url: jdbc:mysql://localhost:3306/pp?serverTimezone=GMT%2b8
#          username: root
#          password: beibo.123/
#          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
New file
@@ -0,0 +1,398 @@
<?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.mm.FinishedGoodsInventoryMapper">
    <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory">
        <id column="fid" property="id"/>
        <result column="inventory" property="inventory"/>
        <result column="area" property="area"/>
        <result column="actual_signal_area" property="actualSignalArea"/>
        <result column="quantity_available" property="quantityAvailable"/>
        <result column="warehouse_number" property="warehouseNumber"/>
        <result column="storage_region" property="storageRegion"/>
        <result column="status" property="status"/>
        <result column="enter_storage_time" property="enterStorageTime"/>
        <result column="remark" property="remark"/>
        <result column="update_time" property="updateTime"/>
        <result column="end_time" property="endTime"/>
        <result column="order_id" property="order.orderId"/>
        <result column="project" property="order.project"/>
        <result column="order_type" property="order.orderType"/>
        <result column="order_number" property="orderDetail.orderNumber"/>
        <result column="width" property="orderDetail.width"/>
        <result column="height" property="orderDetail.height"/>
        <result column="product_name" property="orderDetail.productName"/>
        <result column="product_id" property="orderDetail.productId"/>
    </resultMap>
    <resultMap id="selectFlowCard" type="com.example.erp.entity.pp.FlowCard">
        <id column="id" property="id"/>
        <result column="order_number" property="orderNumber"/>
        <result column="inventory_quantity" property="inventoryQuantity"/>
        <result column="process_id" property="processId"/>
        <result column="received_quantity" property="receivedQuantity"/>
        <result column="order_id" property="order.orderId"/>
        <result column="project" property="order.project"/>
        <result column="creater" property="order.creater"/>
        <result column="area" property="order.area"/>
        <result column="batch" property="order.batch"/>
        <result column="building_number" property="orderDetail.buildingNumber"/>
        <result column="width" property="orderDetail.width"/>
        <result column="height" property="orderDetail.height"/>
        <result column="product_name" property="orderDetail.productName"/>
        <result column="product_id" property="orderDetail.productId"/>
        <result column="quantity" property="orderDetail.quantity"/>
    </resultMap>
    <update id="updateflowcard">
        update pp.flow_card
        set received_quantity=received_quantity+${inventoryQuantity}
        where order_number=#{orderNumber} and process_id=#{processId}
    </update>
    <update id="updateInventory">
        update mm.finished_goods_inventory
        set inventory=inventory+${inventoryQuantity},quantity_available=quantity_available+${inventoryQuantity},
            update_time=now(),area=area+actual_signal_area*${inventoryQuantity}
        where order_number=#{orderNumber}
    </update>
    <insert id="insertFinishedGoodsInventory"  useGeneratedKeys="true"  >
        insert into mm.finished_goods_inventory (order_id,
                                                 order_number,
                                                 inventory,
                                                 actual_signal_area,
                                                 area,
                                                 quantity_available,
                                                 warehouse_number,
                                                 storage_region,
                                                 `status`,
                                                 enter_storage_time,
                                                 update_time,
                                                 end_time,
                                                 remark
        )
        values (
                   #{flowCard.order.orderId} ,#{flowCard.orderNumber},#{flowCard.inventoryQuantity},ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}/1000000,2),
                   ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}*#{flowCard.inventoryQuantity}/1000000,2),
                #{flowCard.inventoryQuantity},null,#{storageRegion},
                0,now(),now(),null,#{remark}
               )
    </insert>
    <select id="findOrderNumberdcount" >
        select count(*)
        from  mm.`finished_goods_inventory`
        where order_number = #{orderNumber}
    </select>
    <select id="findOrderNumberd" >
        select *
        from  sd.finished_goods_inventory
         where order_number = #{orderNumber}
    </select>
    <select id="getseletwarehousing" resultMap="selectFlowCard">
        select
        fc.id,
        o.order_id,
        od.building_number,
        od.product_id,
        od.product_name,
        od.width,
        od.height,
        o.creater,
        o.project,
        fc.order_number,
        od.quantity,
        fc.inventory_quantity,
        o.area,
        fc.process_id,
        fc.received_quantity,
        o.batch
        from pp.flow_card fc left join sd.order_detail od on fc.order_number=od.order_number inner join sd.`order` o on
        o.order_id=fc.order_id
        <where>
                and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity
            <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
                and o.order_id regexp #{flowCard.order.orderId}
            </if>
            <if test="flowCard.orderDetail.buildingNumber != null and flowCard.orderDetail.buildingNumber != ''">
                and od.building_number regexp #{flowCard.orderDetail.buildingNumber}
            </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>
            <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.order.creater != null and flowCard.order.creater != ''">
                and o.creater regexp #{flowCard.order.creater}
            </if>
            <if test="flowCard.order.project != null and flowCard.order.project != ''">
                and o.project regexp #{flowCard.order.project}
            </if>
            <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''">
                and fc.order_number regexp #{flowCard.orderNumber}
            </if>
            <if test="flowCard.orderDetail.quantity != null and flowCard.orderDetail.quantity != ''">
                and od.quantity regexp #{flowCard.orderDetail.quantity}
            </if>
            <if test="flowCard.inventoryQuantity != null and flowCard.inventoryQuantity != ''">
                and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
            </if>
            <if test="flowCard.order.area != null and flowCard.order.area != ''">
                and o.area regexp #{flowCard.order.area}
            </if>
            <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
                and o.batch regexp #{flowCard.order.batch}
            </if>
            <if test="flowCard.processId != null and flowCard.processId != ''">
                and fc.process_id regexp #{flowCard.processId}
            </if>
            <if test="flowCard.receivedQuantity != null and flowCard.receivedQuantity != ''">
                and fc.received_quantity regexp #{flowCard.receivedQuantity}
            </if>
        </where>
        group by fc.order_number,fc.process_id order by fc.create_time
        limit #{offset},#{pageSize};
    </select>
    <select id="getseletwarehousingPageTotal" >
        select  CEILING(count(zu.order_number)/#{pageSize}) from (
        select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on
        fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id
        <where>
            and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity
            <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
                and o.order_id regexp #{flowCard.order.orderId}
            </if>
            <if test="flowCard.orderDetail.buildingNumber != null and flowCard.orderDetail.buildingNumber != ''">
                and od.building_number regexp #{flowCard.orderDetail.buildingNumber}
            </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>
            <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.order.creater != null and flowCard.order.creater != ''">
                and o.creater regexp #{flowCard.order.creater}
            </if>
            <if test="flowCard.order.project != null and flowCard.order.project != ''">
                and o.project regexp #{flowCard.order.project}
            </if>
            <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''">
                and fc.order_number regexp #{flowCard.orderNumber}
            </if>
            <if test="flowCard.orderDetail.quantity != null and flowCard.orderDetail.quantity != ''">
                and od.quantity regexp #{flowCard.orderDetail.quantity}
            </if>
            <if test="flowCard.inventoryQuantity != null and flowCard.inventoryQuantity != ''">
                and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
            </if>
            <if test="flowCard.order.area != null and flowCard.order.area != ''">
                and o.area regexp #{flowCard.order.area}
            </if>
            <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
                and o.batch regexp #{flowCard.order.batch}
            </if>
            <if test="flowCard.processId != null and flowCard.processId != ''">
                and fc.process_id regexp #{flowCard.processId}
            </if>
            <if test="flowCard.receivedQuantity != null and flowCard.receivedQuantity != ''">
                and fc.received_quantity regexp #{flowCard.receivedQuantity}
            </if>
        </where>
        group by fc.order_number,fc.process_id order by fc.create_time) as zu
    </select>
    <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory">
        select od.order_number,
        o.order_id,
        o.project,
        o.order_type,
        od.product_name,
        od.product_id,
        od.width,
        od.height,
        fgi.inventory,
        fgi.quantity_available,
        fgi.actual_signal_area,
        fgi.area,
        fgi.warehouse_number,
        fgi.storage_region,
        fgi.`status`,
        fgi.update_time,
        fgi.enter_storage_time,
        fgi.end_time,
        fgi.remark
        from finished_goods_inventory fgi
        left join sd.order_detail od on fgi.order_number = od.order_number
        inner join sd.`order` o on fgi.order_id = o.order_id
        <where>
            <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
                and od.width regexp #{finishedGoodsInventory.orderDetail.width}
            </if>
            <if test="finishedGoodsInventory.orderDetail.orderNumber != null and finishedGoodsInventory.orderDetail.orderNumber != ''">
                and od.order_number regexp #{finishedGoodsInventory.orderDetail.orderNumber}
            </if>
            <if test="finishedGoodsInventory.orderDetail.productName != null and finishedGoodsInventory.orderDetail.productName != ''">
                and od.product_name regexp #{finishedGoodsInventory.orderDetail.productName}
            </if>
            <if test="finishedGoodsInventory.orderDetail.productId != null and finishedGoodsInventory.orderDetail.productId != ''">
                and od.product_id regexp #{finishedGoodsInventory.orderDetail.productId}
            </if>
            <if test="finishedGoodsInventory.order.orderId != null and finishedGoodsInventory.order.orderId != ''">
                and o.order_id regexp #{finishedGoodsInventory.order.orderId}
            </if>
            <if test="finishedGoodsInventory.order.project != null and finishedGoodsInventory.order.project != ''">
                and o.project regexp #{finishedGoodsInventory.order.project}
            </if>
            <if test="finishedGoodsInventory.order.orderType != null and finishedGoodsInventory.order.orderType != ''">
                and o.order_type regexp #{finishedGoodsInventory.order.orderType}
            </if>
            <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''">
                and od.height regexp #{finishedGoodsInventory.orderDetail.height}
            </if>
            <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''">
                and fgi.inventory regexp #{finishedGoodsInventory.inventory}
            </if>
            <if test="finishedGoodsInventory.quantityAvailable != null and finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea}
            </if>
            <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''">
                and fgi.area regexp #{finishedGoodsInventory.area}
            </if>
            <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''">
                and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber}
            </if>
            <if test="finishedGoodsInventory.storageRegion != null and finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{finishedGoodsInventory.storageRegion}
            </if>
            <if test="finishedGoodsInventory.status != null and finishedGoodsInventory.status != ''">
                and fgi.`status` regexp #{finishedGoodsInventory.status}
            </if>
            <if test="finishedGoodsInventory.enterStorageTime != null and finishedGoodsInventory.enterStorageTime != ''">
                and fgi.enter_storage_time regexp #{finishedGoodsInventory.enterStorageTime}
            </if>
            <if test="finishedGoodsInventory.updateTime != null and finishedGoodsInventory.updateTime != ''">
                and fgi.update_time regexp #{finishedGoodsInventory.updateTime}
            </if>
            <if test="finishedGoodsInventory.endTime != null and finishedGoodsInventory.endTime != ''">
                and fgi.end_time regexp #{finishedGoodsInventory.endTime}
            </if>
            <if test="finishedGoodsInventory.remark != null and finishedGoodsInventory.remark != ''">
                and fgi.remark regexp #{finishedGoodsInventory.remark}
            </if>
        </where>
        order by fgi.id
        limit #{offset},#{pageSize}
        ;
    </select>
    <select id="getPageTotal">
        select
        CEILING(count(fgi.id)/#{pageSize})
        from finished_goods_inventory fgi
        left join sd.order_detail od on fgi.order_number = od.order_number
        inner join sd.`order` o on fgi.order_id = o.order_id
        <where>
            <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
                and od.width regexp #{finishedGoodsInventory.orderDetail.width}
            </if>
            <if test="finishedGoodsInventory.orderDetail.orderNumber != null and finishedGoodsInventory.orderDetail.orderNumber != ''">
                and od.order_number regexp #{finishedGoodsInventory.orderDetail.orderNumber}
            </if>
            <if test="finishedGoodsInventory.orderDetail.productName != null and finishedGoodsInventory.orderDetail.productName != ''">
                and od.product_name regexp #{finishedGoodsInventory.orderDetail.productName}
            </if>
            <if test="finishedGoodsInventory.orderDetail.productId != null and finishedGoodsInventory.orderDetail.productId != ''">
                and od.product_id regexp #{finishedGoodsInventory.orderDetail.productId}
            </if>
            <if test="finishedGoodsInventory.order.orderId != null and finishedGoodsInventory.order.orderId != ''">
                and o.order_id regexp #{finishedGoodsInventory.order.orderId}
            </if>
            <if test="finishedGoodsInventory.order.project != null and finishedGoodsInventory.order.project != ''">
                and o.project regexp #{finishedGoodsInventory.order.project}
            </if>
            <if test="finishedGoodsInventory.order.orderType != null and finishedGoodsInventory.order.orderType != ''">
                and o.order_type regexp #{finishedGoodsInventory.order.orderType}
            </if>
            <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''">
                and od.height regexp #{finishedGoodsInventory.orderDetail.height}
            </if>
            <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''">
                and fgi.inventory regexp #{finishedGoodsInventory.inventory}
            </if>
            <if test="finishedGoodsInventory.quantityAvailable != null and finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea}
            </if>
            <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''">
                and fgi.area regexp #{finishedGoodsInventory.area}
            </if>
            <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''">
                and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber}
            </if>
            <if test="finishedGoodsInventory.storageRegion != null and finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{finishedGoodsInventory.storageRegion}
            </if>
            <if test="finishedGoodsInventory.status != null and finishedGoodsInventory.status != ''">
                and fgi.`status` regexp #{finishedGoodsInventory.status}
            </if>
            <if test="finishedGoodsInventory.enterStorageTime != null and finishedGoodsInventory.enterStorageTime != ''">
                and fgi.enter_storage_time regexp #{finishedGoodsInventory.enterStorageTime}
            </if>
            <if test="finishedGoodsInventory.updateTime != null and finishedGoodsInventory.updateTime != ''">
                and fgi.update_time regexp #{finishedGoodsInventory.updateTime}
            </if>
            <if test="finishedGoodsInventory.endTime != null and finishedGoodsInventory.endTime != ''">
                and fgi.end_time regexp #{finishedGoodsInventory.endTime}
            </if>
            <if test="finishedGoodsInventory.remark != null and finishedGoodsInventory.remark != ''">
                and fgi.remark regexp #{finishedGoodsInventory.remark}
            </if>
        </where>
        order by fgi.id desc
        limit #{offset},#{pageSize}
        ;
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
New file
@@ -0,0 +1,39 @@
<?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.mm.FinishedOperateLogMapper">
    <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedOperateLog" >
        <id column="id" property="id"/>
        <result column="operation_order_number" property="operationOrderNumber"/>
        <result column="product_number" property="productNumber"/>
        <result column="operation_number" property="operationNumber"/>
        <result column="operate_type" property="operateType"/>
        <result column="operator" property="operator"/>
        <result column="operate_time" property="operateTime"/>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <select id="getselectFinishedOperateLog" >
        select
            *
        from
            mm.finished_operate_log limit 0,1;
    </select>
    <insert id="insertFinishedOperateLog"  useGeneratedKeys="true" keyProperty="id" >
        insert into mm.finished_operate_log(operation_order_number,
                                            product_number,
                                            operation_number,
                                            operate_type,
                                            operator,
                                            quantity,
                                            operate_time
        )
        values (
                   #{processId} ,#{orderDetail.productId},#{orderNumber},"入库","王五",#{inventoryQuantity},now()
               )
    </insert>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
New file
@@ -0,0 +1,107 @@
<?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="production_id" property="productionId"/>
        <result column="splitting_status" property="splittingStatus"/>
        <result column="create_time" property="createTime"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="batch" property="batch"/>
        </association>
        <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">
            <result column="product_name" property="productName"/>
            <result column="compute_area" property="computeArea"/>
            <result column="quantity" property="quantity"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="perimeter" property="perimeter"/>
            <result column="bend_radius" property="bendRadius"/>
            <result column="processing_note" property="processingNote"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <select id="selectFlowCard" resultMap="flowCardMap">
        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>
            <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
                and a.order_id regexp #{orderGlassDetail.orderId}
            </if>
            <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
                and a.production_id regexp #{orderGlassDetail.productionId}
            </if>
            <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
                and c.batch regexp #{orderGlassDetail.order.batch}
            </if>
            <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
                and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
            </if>
            <if test="orderGlassDetail.splittingStatus=0 " >
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.splittingStatus=1">
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((a.create_time),'%Y-%m-%d')  BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        </where>
        group by a.production_id,a.order_number
        order by a.id desc
        ;
    </select>
    <!--    <select id="getPageTotal" >-->
    <!--        select-->
    <!--        CEILING(count(a.id)/#{pageSize})-->
    <!--        from product as a-->
    <!--        left join basic_glass_type bgt on bgt.type_id = a.type_id-->
    <!--        <where>-->
    <!--            <if test="glassTypeId != null and glassTypeId != ''">-->
    <!--                and a.type_id regexp #{glassTypeId}-->
    <!--            </if>-->
    <!--            <if test="product.id != null and product.id != ''">-->
    <!--                and a.id regexp #{product.id}-->
    <!--            </if>-->
    <!--            <if test="product.productName != null and product.productName != ''">-->
    <!--                and a.product_name regexp #{product.productName}-->
    <!--            </if>-->
    <!--            <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">-->
    <!--                and bgt.type_name regexp #{product.basicGlassType.typeName}-->
    <!--            </if>-->
    <!--            <if test="product.query != null and product.query != ''">-->
    <!--                and a.query regexp #{product.query}-->
    <!--            </if>-->
    <!--            <if test="product.creator != null and product.creator != ''">-->
    <!--                and a.creator regexp #{product.creator}-->
    <!--            </if>-->
    <!--            <if test="product.createTime != null and product.createTime != ''">-->
    <!--                and date(a.create_time) regexp #{product.createTime}-->
    <!--            </if>-->
    <!--        </where>-->
    <!--        order by a.id desc-->
    <!--        ;-->
    <!--    </select>-->
</mapper>
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
New file
@@ -0,0 +1,107 @@
<?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.WorkOrderMapper">
    <resultMap id="wordOrderMap" type="com.example.erp.entity.sd.OrderGlassDetail">
        <result column="order_id" property="orderId"/>
        <result column="production_id" property="productionId"/>
        <result column="splitting_status" property="splittingStatus"/>
        <result column="create_time" property="createTime"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="batch" property="batch"/>
        </association>
        <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">
            <result column="product_name" property="productName"/>
            <result column="compute_area" property="computeArea"/>
            <result column="quantity" property="quantity"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="perimeter" property="perimeter"/>
            <result column="bend_radius" property="bendRadius"/>
            <result column="processing_note" property="processingNote"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </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>
            <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
                and a.order_id regexp #{orderGlassDetail.orderId}
            </if>
            <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
                and a.production_id regexp #{orderGlassDetail.productionId}
            </if>
            <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
                and c.batch regexp #{orderGlassDetail.order.batch}
            </if>
            <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
                and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
            </if>
            <if test="orderGlassDetail.splittingStatus=0 " >
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.splittingStatus=1">
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((a.create_time),'%Y-%m-%d')  BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        </where>
        group by a.production_id,a.order_number
        order by a.id desc
        ;
    </select>
    <!--    <select id="getPageTotal" >-->
    <!--        select-->
    <!--        CEILING(count(a.id)/#{pageSize})-->
    <!--        from product as a-->
    <!--        left join basic_glass_type bgt on bgt.type_id = a.type_id-->
    <!--        <where>-->
    <!--            <if test="glassTypeId != null and glassTypeId != ''">-->
    <!--                and a.type_id regexp #{glassTypeId}-->
    <!--            </if>-->
    <!--            <if test="product.id != null and product.id != ''">-->
    <!--                and a.id regexp #{product.id}-->
    <!--            </if>-->
    <!--            <if test="product.productName != null and product.productName != ''">-->
    <!--                and a.product_name regexp #{product.productName}-->
    <!--            </if>-->
    <!--            <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">-->
    <!--                and bgt.type_name regexp #{product.basicGlassType.typeName}-->
    <!--            </if>-->
    <!--            <if test="product.query != null and product.query != ''">-->
    <!--                and a.query regexp #{product.query}-->
    <!--            </if>-->
    <!--            <if test="product.creator != null and product.creator != ''">-->
    <!--                and a.creator regexp #{product.creator}-->
    <!--            </if>-->
    <!--            <if test="product.createTime != null and product.createTime != ''">-->
    <!--                and date(a.create_time) regexp #{product.createTime}-->
    <!--            </if>-->
    <!--        </where>-->
    <!--        order by a.id desc-->
    <!--        ;-->
    <!--    </select>-->
</mapper>
north-glass-erp/src/main/resources/mapper/sd/BasicData.xml
New file
@@ -0,0 +1,22 @@
<?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.sd.BasicDateMapper">
    <select id="getOrderBasicData">
        select
            *
        from
            basic_data as a
        where a.basic_type='order'
    </select>
    <select id="getOrderBasicDataType">
        select
            a.basic_category
        from
            basic_data as a
        where a.basic_type='order'
        group by  a.basic_category
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
New file
@@ -0,0 +1,57 @@
<?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.sd.OrderDetailMapper">
    <insert id="insertBatch" parameterType="java.util.List">
        INSERT INTO
            order_detail (order_id,
                            order_number,
                            building_number,
                            product_id,
                            product_name,
                            price,
                            quantity,
                            gross_amount,
                            width,
                            height,
                            shape,
                            area,
                            gross_area,
                            compute_area,
                            compute_gross_area,
                            processing_note,
                            remarks,
                            bend_radius,
                            edging_type,
                            weight,
                            perimeter
                          )
        values
        <foreach collection ="orderDetails" item="orderDetail" separator =",">
            (#{orderDetail.orderId},
            #{orderDetail.orderNumber},
            #{orderDetail.buildingNumber},
            #{orderDetail.productId},
            #{orderDetail.productName},
            #{orderDetail.price},
            #{orderDetail.quantity},
            #{orderDetail.grossAmount},
            #{orderDetail.width},
            #{orderDetail.height},
            #{orderDetail.shape},
            #{orderDetail.area},
            #{orderDetail.grossArea},
            #{orderDetail.computeArea},
            #{orderDetail.computeGrossArea},
            #{orderDetail.processingNote},
            #{orderDetail.remarks},
            #{orderDetail.bendRadius},
            #{orderDetail.edgingType},
            #{orderDetail.weight},
            #{orderDetail.perimeter}
             )
        </foreach>
    </insert>
</mapper>
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
New file
@@ -0,0 +1,15 @@
<?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.sd.OrderMapper">
    <select id="selectMaxOrderId">
        select
            COUNT(a.order_id)
        from
            `order` as a
        where
            a.create_time = curdate()
    </select>
</mapper>
north-glass-erp/src/test/java/com/example/erp/service/sd/BasicDateServiceTest.java
New file
@@ -0,0 +1,16 @@
package com.example.erp.service.sd;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class BasicDateServiceTest {
    @Autowired
    private BasicDateService basicDateService;
    @Test
    void  getOrderBasicData() {
        basicDateService.getOrderBasicData();
    }
}
north-glass-erp/src/test/java/com/example/erp/service/sd/OrderServiceTest.java
New file
@@ -0,0 +1,23 @@
package com.example.erp.service.sd;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.HashMap;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class OrderServiceTest {
    @Autowired
    OrderService orderService;
    @Test
    void testCreateOrder() {
        Map<String, Object> order =new HashMap<>();
        //orderService.saveOrder();
    }
}
north-glass-erp/target/classes/application.yml
@@ -19,13 +19,13 @@
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
#        mm:
#          url: jdbc:mysql://localhost:3306/mm?serverTimezone=GMT%2b8
#          username: root
#          password: beibo.123/
#          driver-class-name: com.mysql.cj.jdbc.Driver
#        pp:
#          url: jdbc:mysql://localhost:3306/pp?serverTimezone=GMT%2b8
#          username: root
#          password: beibo.123/
#          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
New file
@@ -0,0 +1,39 @@
<?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.mm.FinishedOperateLogMapper">
    <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedOperateLog" >
        <id column="id" property="id"/>
        <result column="operation_order_number" property="operationOrderNumber"/>
        <result column="product_number" property="productNumber"/>
        <result column="operation_number" property="operationNumber"/>
        <result column="operate_type" property="operateType"/>
        <result column="operator" property="operator"/>
        <result column="operate_time" property="operateTime"/>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <select id="getselectFinishedOperateLog" >
        select
            *
        from
            mm.finished_operate_log limit 0,1;
    </select>
    <insert id="insertFinishedOperateLog"  useGeneratedKeys="true" keyProperty="id" >
        insert into mm.finished_operate_log(operation_order_number,
                                            product_number,
                                            operation_number,
                                            operate_type,
                                            operator,
                                            quantity,
                                            operate_time
        )
        values (
                   #{processId} ,#{orderDetail.productId},#{orderNumber},"入库","王五",#{inventoryQuantity},now()
               )
    </insert>
</mapper>
north-glass-erp/target/classes/mapper/pp/FolwCard.xml
New file
@@ -0,0 +1,107 @@
<?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="production_id" property="productionId"/>
        <result column="splitting_status" property="splittingStatus"/>
        <result column="create_time" property="createTime"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="batch" property="batch"/>
        </association>
        <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">
            <result column="product_name" property="productName"/>
            <result column="compute_area" property="computeArea"/>
            <result column="quantity" property="quantity"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="perimeter" property="perimeter"/>
            <result column="bend_radius" property="bendRadius"/>
            <result column="processing_note" property="processingNote"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <select id="selectFlowCard" resultMap="flowCardMap">
        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>
            <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
                and a.order_id regexp #{orderGlassDetail.orderId}
            </if>
            <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
                and a.production_id regexp #{orderGlassDetail.productionId}
            </if>
            <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
                and c.batch regexp #{orderGlassDetail.order.batch}
            </if>
            <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
                and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
            </if>
            <if test="orderGlassDetail.splittingStatus=0 " >
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.splittingStatus=1">
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((a.create_time),'%Y-%m-%d')  BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        </where>
        group by a.production_id,a.order_number
        order by a.id desc
        ;
    </select>
    <!--    <select id="getPageTotal" >-->
    <!--        select-->
    <!--        CEILING(count(a.id)/#{pageSize})-->
    <!--        from product as a-->
    <!--        left join basic_glass_type bgt on bgt.type_id = a.type_id-->
    <!--        <where>-->
    <!--            <if test="glassTypeId != null and glassTypeId != ''">-->
    <!--                and a.type_id regexp #{glassTypeId}-->
    <!--            </if>-->
    <!--            <if test="product.id != null and product.id != ''">-->
    <!--                and a.id regexp #{product.id}-->
    <!--            </if>-->
    <!--            <if test="product.productName != null and product.productName != ''">-->
    <!--                and a.product_name regexp #{product.productName}-->
    <!--            </if>-->
    <!--            <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">-->
    <!--                and bgt.type_name regexp #{product.basicGlassType.typeName}-->
    <!--            </if>-->
    <!--            <if test="product.query != null and product.query != ''">-->
    <!--                and a.query regexp #{product.query}-->
    <!--            </if>-->
    <!--            <if test="product.creator != null and product.creator != ''">-->
    <!--                and a.creator regexp #{product.creator}-->
    <!--            </if>-->
    <!--            <if test="product.createTime != null and product.createTime != ''">-->
    <!--                and date(a.create_time) regexp #{product.createTime}-->
    <!--            </if>-->
    <!--        </where>-->
    <!--        order by a.id desc-->
    <!--        ;-->
    <!--    </select>-->
</mapper>
north-glass-erp/target/classes/mapper/pp/WordOrder.xml
New file
@@ -0,0 +1,107 @@
<?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.WorkOrderMapper">
    <resultMap id="wordOrderMap" type="com.example.erp.entity.sd.OrderGlassDetail">
        <result column="order_id" property="orderId"/>
        <result column="production_id" property="productionId"/>
        <result column="splitting_status" property="splittingStatus"/>
        <result column="create_time" property="createTime"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="batch" property="batch"/>
        </association>
        <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">
            <result column="product_name" property="productName"/>
            <result column="compute_area" property="computeArea"/>
            <result column="quantity" property="quantity"/>
            <result column="compute_gross_area" property="computeGrossArea"/>
            <result column="perimeter" property="perimeter"/>
            <result column="bend_radius" property="bendRadius"/>
            <result column="processing_note" property="processingNote"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->
    </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>
            <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
                and a.order_id regexp #{orderGlassDetail.orderId}
            </if>
            <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
                and a.production_id regexp #{orderGlassDetail.productionId}
            </if>
            <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
                and c.batch regexp #{orderGlassDetail.order.batch}
            </if>
            <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
                and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
            </if>
            <if test="orderGlassDetail.splittingStatus=0 " >
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.splittingStatus=1">
                and a.splitting_status regexp #{state}
            </if>
            <if test="orderGlassDetail.createTime != ''">
                and DATE_FORMAT((a.create_time),'%Y-%m-%d')  BETWEEN #{ selectTime1 } AND #{ selectTime2 }
            </if>
        </where>
        group by a.production_id,a.order_number
        order by a.id desc
        ;
    </select>
    <!--    <select id="getPageTotal" >-->
    <!--        select-->
    <!--        CEILING(count(a.id)/#{pageSize})-->
    <!--        from product as a-->
    <!--        left join basic_glass_type bgt on bgt.type_id = a.type_id-->
    <!--        <where>-->
    <!--            <if test="glassTypeId != null and glassTypeId != ''">-->
    <!--                and a.type_id regexp #{glassTypeId}-->
    <!--            </if>-->
    <!--            <if test="product.id != null and product.id != ''">-->
    <!--                and a.id regexp #{product.id}-->
    <!--            </if>-->
    <!--            <if test="product.productName != null and product.productName != ''">-->
    <!--                and a.product_name regexp #{product.productName}-->
    <!--            </if>-->
    <!--            <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">-->
    <!--                and bgt.type_name regexp #{product.basicGlassType.typeName}-->
    <!--            </if>-->
    <!--            <if test="product.query != null and product.query != ''">-->
    <!--                and a.query regexp #{product.query}-->
    <!--            </if>-->
    <!--            <if test="product.creator != null and product.creator != ''">-->
    <!--                and a.creator regexp #{product.creator}-->
    <!--            </if>-->
    <!--            <if test="product.createTime != null and product.createTime != ''">-->
    <!--                and date(a.create_time) regexp #{product.createTime}-->
    <!--            </if>-->
    <!--        </where>-->
    <!--        order by a.id desc-->
    <!--        ;-->
    <!--    </select>-->
</mapper>
north-glass-erp/target/classes/mapper/sd/BasicData.xml
New file
@@ -0,0 +1,22 @@
<?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.sd.BasicDateMapper">
    <select id="getOrderBasicData">
        select
            *
        from
            basic_data as a
        where a.basic_type='order'
    </select>
    <select id="getOrderBasicDataType">
        select
            a.basic_category
        from
            basic_data as a
        where a.basic_type='order'
        group by  a.basic_category
    </select>
</mapper>
north-glass-erp/target/classes/mapper/sd/OrderMapper.xml
New file
@@ -0,0 +1,15 @@
<?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.sd.OrderMapper">
    <select id="selectMaxOrderId">
        select
            COUNT(a.order_id)
        from
            `order` as a
        where
            a.create_time = curdate()
    </select>
</mapper>
north-glass-erp/target/classes/mapper/sd/Product.xml
@@ -15,10 +15,12 @@
        <result column="creator" property="creator"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <!--接收其他外键实体类数据-->
        <association property="basicGlassType" javaType="com.example.erp.entity.sd.BasicGlassType">
            <result column="type_id" property="typeID"/>
            <result column="type_name" property="typeName"/>
        </association>
        <!--<result column="g_typeId" property="glassTypes.typeId"/>
        <result column="g_type" property="glassTypes.type"/>-->